@smartos-lib/components 2.0.10 → 2.0.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -58,4 +58,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
58
58
|
`);Ge.forEach((pn,Wr)=>{pn&&D.insertText(t,pn),Wr!==Ge.length-1&&D.insertSoftBreak(t)})},{at:z});if(b.equals(z.anchor.path,z.focus.path)){var[nt,Te]=_.edges(z),de={start:nt.offset,end:Te.offset,text:we};if(we&&l&&j==="insertCompositionText"){var Dt=l.start+l.text.search(/\S|$/),dn=de.start+de.text.search(/\S|$/);dn===Dt+1&&de.end===l.start+l.text.length?(de.start-=1,l=null,O()):l=!1}else j==="insertText"?l===null?l=de:l&&_.isCollapsed(z)&&l.end+l.text.length===nt.offset?l=Ns(Ns({},l),{},{text:l.text+we}):l=!1:l=!1;if(Q){w(nt.path,de);return}}return h(()=>D.insertText(t,we),{at:z})}}}},C=()=>!!lr.get(t),E=()=>{var P;return!!((P=gt.get(t))!==null&&P!==void 0&&P.length)},B=()=>C()||E(),x=()=>o,A=P=>{cr.set(t,P),a&&(clearTimeout(a),a=null);var{selection:L}=t;if(P){var j=!L||!b.equals(L.anchor.path,P.anchor.path),z=!L||!b.equals(L.anchor.path.slice(0,-1),P.anchor.path.slice(0,-1));(j&&l||z)&&(l=!1),(j||E())&&(a=setTimeout(p,U3))}},S=()=>{(C()||!E())&&p()},N=P=>{E()||(f(!0),setTimeout(f))},O=()=>{C()||(i=setTimeout(p))},V=P=>{if(!(E()||C())&&P.some(j=>Fd(t,j,P))){var L;(L=u1.get(t))===null||L===void 0||L()}};return{flush:p,scheduleFlush:O,hasPendingDiffs:E,hasPendingAction:C,hasPendingChanges:B,isFlushing:x,handleUserSelect:A,handleCompositionEnd:y,handleCompositionStart:m,handleDOMBeforeInput:g,handleKeyDown:N,handleDomMutations:V,handleInput:S}}function Y3(){var e=M.useRef(!1);return M.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var ca=Ps?M.useLayoutEffect:M.useEffect;function Q3(e,t,n){var[r]=M.useState(()=>new MutationObserver(t));ca(()=>{r.takeRecords()}),M.useEffect(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(e.current,n),()=>r.disconnect()},[r,e,n])}var G3=["node"];function h1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function X3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h1(Object(n),!0).forEach(function(r){Lt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Z3={subtree:!0,childList:!0,characterData:!0},J3=st?e=>{var{node:t}=e,n=Io(e,G3);if(!st)return null;var r=ar(),o=Y3(),[u]=M.useState(()=>q3(X3({editor:r},n)));return Q3(t,u.handleDomMutations,Z3),Ad.set(r,u.scheduleFlush),o&&u.flush(),u}:()=>null,eP=["anchor","focus"],tP=["anchor","focus"],nP=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>t.hasOwnProperty(n)&&e[n]===t[n]),m1=(e,t)=>{var n=Io(e,eP),r=Io(t,tP);return e[$o]===t[$o]&&nP(n,r)},rP=(e,t)=>{if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],o=t[n];if(!_.equals(r,o)||!m1(r,o))return!1}return!0},oP=(e,t)=>{if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],o=t[n];if(r.anchor.offset!==o.anchor.offset||r.focus.offset!==o.focus.offset||!m1(r,o))return!1}return!0};function g1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function uP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g1(Object(n),!0).forEach(function(r){Lt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var aP=e=>{var{isLast:t,leaf:n,parent:r,text:o}=e,u=ar(),a=k.findPath(u,o),i=b.parent(a),s=!!n[a1];return u.isVoid(r)?re.createElement(_d,{length:q.string(r).length}):n.text===""&&r.children[r.children.length-1]===o&&!u.isInline(r)&&D.string(u,i)===""?re.createElement(_d,{isLineBreak:!0,isMarkPlaceholder:s}):n.text===""?re.createElement(_d,{isMarkPlaceholder:s}):t&&n.text.slice(-1)===`
|
59
59
|
`?re.createElement(y1,{isTrailing:!0,text:n.text}):re.createElement(y1,{text:n.text})},y1=e=>{var{text:t,isTrailing:n=!1}=e,r=M.useRef(null),o=()=>"".concat(t??"").concat(n?`
|
60
60
|
`:""),[u]=M.useState(o);return ca(()=>{var a=o();r.current&&r.current.textContent!==a&&(r.current.textContent=a)}),re.createElement(iP,{ref:r},u)},iP=M.memo(M.forwardRef((e,t)=>re.createElement("span",{"data-slate-string":!0,ref:t},e.children))),_d=e=>{var{length:t=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=e,o={"data-slate-zero-width":n?"n":"z","data-slate-length":t};return r&&(o["data-slate-mark-placeholder"]=!0),re.createElement("span",uP({},o),!(st||e1)||!n?"\uFEFF":null,n?re.createElement("br",null):null)};function D1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function C1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D1(Object(n),!0).forEach(function(r){Lt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var sP=st?300:0;function lP(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function w1(e){e.current&&(clearTimeout(e.current),e.current=null)}var cP=e=>{var{leaf:t,isLast:n,text:r,parent:o,renderPlaceholder:u,renderLeaf:a=g=>re.createElement(dP,C1({},g))}=e,i=ar(),s=M.useRef(null),l=M.useRef(null),[c,d]=M.useState(!1),p=M.useRef(null),y=M.useCallback(g=>{if(lP(s,g==null),g==null){var C;wd.delete(i),(C=t.onPlaceholderResize)===null||C===void 0||C.call(t,null)}else{if(wd.set(i,g),!s.current){var E=window.ResizeObserver||p3;s.current=new E(()=>{var B;(B=t.onPlaceholderResize)===null||B===void 0||B.call(t,g)})}s.current.observe(g),l.current=g}},[l,t,i]),m=re.createElement(aP,{isLast:n,leaf:t,parent:o,text:r}),f=!!t[$o];if(M.useEffect(()=>(f?p.current||(p.current=setTimeout(()=>{d(!0),p.current=null},sP)):(w1(p),d(!1)),()=>w1(p)),[f,d]),f&&c){var w={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:Lr?"inherit":void 0},contentEditable:!1,ref:y}};m=re.createElement(re.Fragment,null,u(w),m)}var h={"data-slate-leaf":!0};return a({attributes:h,children:m,leaf:t,text:r})},fP=re.memo(cP,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Z.equals(t.leaf,e.leaf)&&t.leaf[$o]===e.leaf[$o]),dP=e=>{var{attributes:t,children:n}=e;return re.createElement("span",C1({},t),n)},pP=e=>{for(var{decorations:t,isLast:n,parent:r,renderPlaceholder:o,renderLeaf:u,text:a}=e,i=ar(),s=M.useRef(null),l=Z.decorations(a,t),c=k.findKey(i,a),d=[],p=0;p<l.length;p++){var y=l[p];d.push(re.createElement(fP,{isLast:n&&p===l.length-1,key:"".concat(c.id,"-").concat(p),renderPlaceholder:o,leaf:y,text:a,parent:r,renderLeaf:u}))}var m=M.useCallback(f=>{var w=Rs.get(i);f?(w==null||w.set(c,f),zr.set(a,f),sa.set(f,a)):(w==null||w.delete(c),zr.delete(a),s.current&&sa.delete(s.current)),s.current=f},[s,i,c,a]);return re.createElement("span",{"data-slate-node":"text",ref:m},d)},E1=re.memo(pP,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&oP(t.decorations,e.decorations));function B1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B1(Object(n),!0).forEach(function(r){Lt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var vP=e=>{var{decorations:t,element:n,renderElement:r=g=>re.createElement(mP,Pd({},g)),renderPlaceholder:o,renderLeaf:u,selection:a}=e,i=ar(),s=DP(),l=i.isInline(n),c=k.findKey(i,n),d=M.useCallback(g=>{var C=Rs.get(i);g?(C==null||C.set(c,g),zr.set(n,g),sa.set(g,n)):(C==null||C.delete(c),zr.delete(n))},[i,c,n]),p=b1({decorations:t,node:n,renderElement:r,renderPlaceholder:o,renderLeaf:u,selection:a}),y={"data-slate-node":"element",ref:d};if(l&&(y["data-slate-inline"]=!0),!l&&D.hasInlines(i,n)){var m=q.string(n),f=Cy(m);f==="rtl"&&(y.dir=f)}if(D.isVoid(i,n)){y["data-slate-void"]=!0,!s&&l&&(y.contentEditable=!1);var w=l?"span":"div",[[h]]=q.texts(n);p=re.createElement(w,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},re.createElement(E1,{renderPlaceholder:o,decorations:[],isLast:!1,parent:n,text:h})),Dd.set(h,0),Cd.set(h,n)}return r({attributes:y,children:p,element:n})},hP=re.memo(vP,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&rP(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&_.equals(e.selection,t.selection))),mP=e=>{var{attributes:t,children:n,element:r}=e,o=ar(),u=o.isInline(r)?"span":"div";return re.createElement(u,Pd(Pd({},t),{},{style:{position:"relative"}}),n)},A1=M.createContext(()=>[]),gP=()=>M.useContext(A1),yP=M.createContext(!1),b1=e=>{for(var{decorations:t,node:n,renderElement:r,renderPlaceholder:o,renderLeaf:u,selection:a}=e,i=gP(),s=ar(),l=k.findPath(s,n),c=[],d=X.isElement(n)&&!s.isInline(n)&&D.hasInlines(s,n),p=0;p<n.children.length;p++){var y=l.concat(p),m=n.children[p],f=k.findKey(s,m),w=D.range(s,y),h=a&&_.intersection(w,a),g=i([m,y]);for(var C of t){var E=_.intersection(C,w);E&&g.push(E)}X.isElement(m)?c.push(re.createElement(yP.Provider,{key:"provider-".concat(f.id),value:!!h},re.createElement(hP,{decorations:g,element:m,key:f.id,renderElement:r,renderPlaceholder:o,renderLeaf:u,selection:h}))):c.push(re.createElement(E1,{decorations:g,key:f.id,isLast:d&&p===n.children.length-1,parent:n,renderPlaceholder:o,renderLeaf:u,text:m})),Dd.set(m,p),Cd.set(m,n)}return c},x1=M.createContext(!1),DP=()=>M.useContext(x1),F1=M.createContext(null),CP=()=>{var e=M.useContext(F1);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function wP(){var e=ar(),t=M.useRef(!1),n=M.useRef(0),r=M.useCallback(()=>{if(!t.current){t.current=!0;var o=k.getWindow(e);o.cancelAnimationFrame(n.current),n.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return M.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:t,onUserInput:r}}var EP=3,BP={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},AP={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},bP={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},xe=e=>{var t=BP[e],n=AP[e],r=bP[e],o=t&&hd(t),u=n&&hd(n),a=r&&hd(r);return i=>!!(o&&o(i)||t1&&u&&u(i)||!t1&&a&&a(i))},_e={isBold:xe("bold"),isCompose:xe("compose"),isMoveBackward:xe("moveBackward"),isMoveForward:xe("moveForward"),isDeleteBackward:xe("deleteBackward"),isDeleteForward:xe("deleteForward"),isDeleteLineBackward:xe("deleteLineBackward"),isDeleteLineForward:xe("deleteLineForward"),isDeleteWordBackward:xe("deleteWordBackward"),isDeleteWordForward:xe("deleteWordForward"),isExtendBackward:xe("extendBackward"),isExtendForward:xe("extendForward"),isExtendLineBackward:xe("extendLineBackward"),isExtendLineForward:xe("extendLineForward"),isItalic:xe("italic"),isMoveLineBackward:xe("moveLineBackward"),isMoveLineForward:xe("moveLineForward"),isMoveWordBackward:xe("moveWordBackward"),isMoveWordForward:xe("moveWordForward"),isRedo:xe("redo"),isSoftBreak:xe("insertSoftBreak"),isSplitBlock:xe("splitBlock"),isTransposeCharacter:xe("transposeCharacter"),isUndo:xe("undo")},xP=(e,t)=>{var n=[],r=()=>{n=[]},o=a=>{if(t.current){var i=a.filter(s=>Fd(e,s,a));n.push(...i)}};function u(){n.length>0&&(n.reverse().forEach(a=>{a.type!=="characterData"&&(a.removedNodes.forEach(i=>{a.target.insertBefore(i,a.nextSibling)}),a.addedNodes.forEach(i=>{a.target.removeChild(i)}))}),r())}return{registerMutations:o,restoreDOM:u,clear:r}},FP={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class S1 extends M.Component{constructor(){super(...arguments),Lt(this,"context",null),Lt(this,"manager",null),Lt(this,"mutationObserver",null)}observe(){var t,{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(n.current,FP)}componentDidMount(){var{receivedUserInput:t}=this.props,n=this.context;this.manager=xP(n,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,n,r,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var u;(u=this.manager)===null||u===void 0||u.registerMutations(o)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}Lt(S1,"contextType",md);var SP=st?S1:e=>{var{children:t}=e;return re.createElement(re.Fragment,null,t)},OP=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],_P=["text"];function O1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function fn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O1(Object(n),!0).forEach(function(r){Lt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var PP=e=>re.createElement(re.Fragment,null,b1(e)),kP=e=>{var t=M.useCallback(F=>re.createElement(TP,fn({},F)),[]),{autoFocus:n,decorate:r=RP,onDOMBeforeInput:o,placeholder:u,readOnly:a=!1,renderElement:i,renderLeaf:s,renderPlaceholder:l=t,scrollSelectionIntoView:c=NP,style:d={},as:p="div",disableDefaultStyles:y=!1}=e,m=Io(e,OP),f=CP(),[w,h]=M.useState(!1),g=M.useRef(null),C=M.useRef([]),[E,B]=M.useState(),x=M.useRef(!1),{onUserInput:A,receivedUserInput:S}=wP(),[,N]=M.useReducer(F=>F+1,0);u1.set(f,N),Ed.set(f,a);var O=M.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);M.useEffect(()=>{g.current&&n&&g.current.focus()},[n]);var V=M.useRef(),P=M.useMemo(()=>W_(()=>{var F=k.toDOMNode(f,f),W=F.getRootNode();if(r1&&!x.current&&Lr&&W instanceof ShadowRoot){x.current=!0;var U=R3();U?document.execCommand("indent"):R.deselect(f),x.current=!1;return}var Y=V.current;if((st||!k.isComposing(f))&&(!O.isUpdatingSelection||Y!=null&&Y.isFlushing())&&!O.isDraggingInternally){var ie=k.findDocumentOrShadowRoot(f),{activeElement:ee}=ie,he=k.toDOMNode(f,f),pe=ie.getSelection();if(ee===he?(O.latestElement=ee,sr.set(f,!0)):sr.delete(f),!pe)return R.deselect(f);var{anchorNode:se,focusNode:ae}=pe,me=k.hasEditableTarget(f,se)||k.isTargetInsideNonReadonlyVoid(f,se),Pe=k.hasEditableTarget(f,ae)||k.isTargetInsideNonReadonlyVoid(f,ae);if(me&&Pe){var ve=k.toSlateRange(f,pe,{exactMatch:!1,suppressThrow:!0});ve&&(!k.isComposing(f)&&!(Y!=null&&Y.hasPendingChanges())&&!(Y!=null&&Y.isFlushing())?R.select(f,ve):Y==null||Y.handleUserSelect(ve))}a&&(!me||!Pe)&&R.deselect(f)}},100),[f,a,O]),L=M.useMemo(()=>I_(P,0),[P]);V.current=J3({node:g,onDOMSelectionChange:P,scheduleOnDOMSelectionChange:L}),ca(()=>{var F,W,U;g.current&&(U=bd(g.current))?(o1.set(f,U),ks.set(f,g.current),zr.set(f,g.current),sa.set(g.current,f)):zr.delete(f);var{selection:Y}=f,ie=k.findDocumentOrShadowRoot(f),ee=ie.getSelection();if(!(!ee||!k.isFocused(f)||(F=V.current)!==null&&F!==void 0&&F.hasPendingAction())){var he=me=>{var Pe=ee.type!=="None";if(!(!Y&&!Pe)){var ve=ee.focusNode,Qe;if(Mo&&ee.rangeCount>1){var yt=ee.getRangeAt(0),je=ee.getRangeAt(ee.rangeCount-1);yt.startContainer===ve?Qe=je.endContainer:Qe=yt.startContainer}else Qe=ee.anchorNode;var We=ks.get(f),we=!1;if(We.contains(Qe)&&We.contains(ve)&&(we=!0),Pe&&we&&Y&&!me){var nt=k.toSlateRange(f,ee,{exactMatch:!0,suppressThrow:!0});if(nt&&_.equals(nt,Y)){var Te;if(!O.hasMarkPlaceholder||(Te=Qe)!==null&&Te!==void 0&&(Te=Te.parentElement)!==null&&Te!==void 0&&Te.hasAttribute("data-slate-mark-placeholder"))return}}if(Y&&!k.hasRange(f,Y)){f.selection=k.toSlateRange(f,ee,{exactMatch:!1,suppressThrow:!0});return}O.isUpdatingSelection=!0;var de=Y&&k.toDOMRange(f,Y);return de?(k.isComposing(f)&&!st?ee.collapseToEnd():_.isBackward(Y)?ee.setBaseAndExtent(de.endContainer,de.endOffset,de.startContainer,de.startOffset):ee.setBaseAndExtent(de.startContainer,de.startOffset,de.endContainer,de.endOffset),c(f,de)):ee.removeAllRanges(),de}};ee.rangeCount<=1&&he();var pe=((W=V.current)===null||W===void 0?void 0:W.isFlushing())==="action";if(!st||!pe){setTimeout(()=>{O.isUpdatingSelection=!1});return}var se=null,ae=requestAnimationFrame(()=>{if(pe){var me=Pe=>{try{var ve=k.toDOMNode(f,f);ve.focus(),he(Pe)}catch{}};me(),se=setTimeout(()=>{me(!0),O.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(ae),se&&clearTimeout(se)}}});var j=M.useCallback(F=>{var W=k.toDOMNode(f,f),U=W.getRootNode();if(r1&&x!==null&&x!==void 0&&x.current&&Lr&&U instanceof ShadowRoot){var Y=F.getTargetRanges(),ie=Y[0],ee=new window.Range;ee.setStart(ie.startContainer,ie.startOffset),ee.setEnd(ie.endContainer,ie.endOffset);var he=k.toSlateRange(f,ee,{exactMatch:!1,suppressThrow:!1});R.select(f,he),F.preventDefault(),F.stopImmediatePropagation();return}if(A(),!a&&k.hasEditableTarget(f,F.target)&&!jP(F,o)){var pe;if(V.current)return V.current.handleDOMBeforeInput(F);L.flush(),P.flush();var{selection:se}=f,{inputType:ae}=F,me=F.dataTransfer||F.data||void 0,Pe=ae==="insertCompositionText"||ae==="deleteCompositionText";if(Pe&&k.isComposing(f))return;var ve=!1;if(ae==="insertText"&&se&&_.isCollapsed(se)&&F.data&&F.data.length===1&&/[a-z ]/i.test(F.data)&&se.anchor.offset!==0){var Qe,yt;ve=!0,f.marks&&(ve=!1);var{anchor:je}=se,[We,we]=k.toDOMPoint(f,je),nt=(Qe=We.parentElement)===null||Qe===void 0?void 0:Qe.closest("a"),Te=k.getWindow(f);if(ve&&nt&&k.hasDOMNode(f,nt)){var de,Dt=Te==null?void 0:Te.document.createTreeWalker(nt,NodeFilter.SHOW_TEXT).lastChild();Dt===We&&((de=Dt.textContent)===null||de===void 0?void 0:de.length)===we&&(ve=!1)}if(ve&&We.parentElement&&(Te==null||(yt=Te.getComputedStyle(We.parentElement))===null||yt===void 0?void 0:yt.whiteSpace)==="pre"){var dn=D.above(f,{at:je.path,match:js=>X.isElement(js)&&D.isBlock(f,js)});dn&&q.string(dn[0]).includes(" ")&&(ve=!1)}}if(!ae.startsWith("delete")||ae.startsWith("deleteBy")){var[Ge]=F.getTargetRanges();if(Ge){var pn=k.toSlateRange(f,Ge,{exactMatch:!1,suppressThrow:!1});if(!se||!_.equals(se,pn)){ve=!1;var Wr=!Pe&&f.selection&&D.rangeRef(f,f.selection);R.select(f,pn),Wr&&la.set(f,Wr)}}}if(Pe)return;if(ve||F.preventDefault(),se&&_.isExpanded(se)&&ae.startsWith("delete")){var _n=ae.endsWith("Backward")?"backward":"forward";D.deleteFragment(f,{direction:_n});return}switch(ae){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{D.deleteFragment(f);break}case"deleteContent":case"deleteContentForward":{D.deleteForward(f);break}case"deleteContentBackward":{D.deleteBackward(f);break}case"deleteEntireSoftLine":{D.deleteBackward(f,{unit:"line"}),D.deleteForward(f,{unit:"line"});break}case"deleteHardLineBackward":{D.deleteBackward(f,{unit:"block"});break}case"deleteSoftLineBackward":{D.deleteBackward(f,{unit:"line"});break}case"deleteHardLineForward":{D.deleteForward(f,{unit:"block"});break}case"deleteSoftLineForward":{D.deleteForward(f,{unit:"line"});break}case"deleteWordBackward":{D.deleteBackward(f,{unit:"word"});break}case"deleteWordForward":{D.deleteForward(f,{unit:"word"});break}case"insertLineBreak":D.insertSoftBreak(f);break;case"insertParagraph":{D.insertBreak(f);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{ae==="insertFromComposition"&&k.isComposing(f)&&(h(!1),Vr.set(f,!1)),(me==null?void 0:me.constructor.name)==="DataTransfer"?k.insertData(f,me):typeof me=="string"&&(ve?C.current.push(()=>D.insertText(f,me)):D.insertText(f,me));break}}var fa=(pe=la.get(f))===null||pe===void 0?void 0:pe.unref();la.delete(f),fa&&(!f.selection||!_.equals(f.selection,fa))&&R.select(f,fa)}},[f,P,A,o,a,L]),z=M.useCallback(F=>{F==null?(P.cancel(),L.cancel(),ks.delete(f),zr.delete(f),g.current&&ir&&g.current.removeEventListener("beforeinput",j)):ir&&F.addEventListener("beforeinput",j),g.current=F},[P,L,f,j]);ca(()=>{var F=k.getWindow(f);return F.document.addEventListener("selectionchange",L),()=>{F.document.removeEventListener("selectionchange",L)}},[L]);var G=r([f,[]]),T=u&&f.children.length===1&&Array.from(q.texts(f)).length===1&&q.string(f)===""&&!w,I=M.useCallback(F=>{if(F&&T){var W;B((W=F.getBoundingClientRect())===null||W===void 0?void 0:W.height)}else B(void 0)},[T]);if(T){var K=D.start(f,[]);G.push({[$o]:!0,placeholder:u,onPlaceholderResize:I,anchor:K,focus:K})}var{marks:Q}=f;if(O.hasMarkPlaceholder=!1,f.selection&&_.isCollapsed(f.selection)&&Q){var{anchor:ne}=f.selection,te=q.leaf(f,ne.path),ye=Io(te,_P);if(!Z.equals(te,Q,{loose:!0})){O.hasMarkPlaceholder=!0;var fe=Object.fromEntries(Object.keys(ye).map(F=>[F,null]));G.push(fn(fn(fn({[a1]:!0},fe),Q),{},{anchor:ne,focus:ne}))}}return M.useEffect(()=>{setTimeout(()=>{var{selection:F}=f;if(F){var{anchor:W}=F,U=q.leaf(f,W.path);if(Q&&!Z.equals(U,Q,{loose:!0})){Zt.set(f,Q);return}}Zt.delete(f)})}),re.createElement(x1.Provider,{value:a},re.createElement(A1.Provider,{value:r},re.createElement(SP,{node:g,receivedUserInput:S},re.createElement(p,fn(fn({role:a?void 0:"textbox","aria-multiline":a?void 0:!0},m),{},{spellCheck:ir||!Ps?m.spellCheck:!1,autoCorrect:ir||!Ps?m.autoCorrect:"false",autoCapitalize:ir||!Ps?m.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!a,zindex:-1,suppressContentEditableWarning:!0,ref:z,style:fn(fn({},y?{}:fn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},E?{minHeight:E}:{})),d),onBeforeInput:M.useCallback(F=>{if(!ir&&!a&&!lt(F,m.onBeforeInput)&&k.hasSelectableTarget(f,F.target)&&(F.preventDefault(),!k.isComposing(f))){var W=F.data;D.insertText(f,W)}},[m.onBeforeInput,f,a]),onInput:M.useCallback(F=>{if(!lt(F,m.onInput)){if(V.current){V.current.handleInput();return}for(var W of C.current)W();C.current=[]}},[m.onInput]),onBlur:M.useCallback(F=>{if(!(a||O.isUpdatingSelection||!k.hasSelectableTarget(f,F.target)||lt(F,m.onBlur))){var W=k.findDocumentOrShadowRoot(f);if(O.latestElement!==W.activeElement){var{relatedTarget:U}=F,Y=k.toDOMNode(f,f);if(U!==Y&&!(zt(U)&&U.hasAttribute("data-slate-spacer"))){if(U!=null&&fr(U)&&k.hasDOMNode(f,U)){var ie=k.toSlateNode(f,U);if(X.isElement(ie)&&!f.isVoid(ie))return}if(Lr){var ee=W.getSelection();ee==null||ee.removeAllRanges()}sr.delete(f)}}}},[a,O.isUpdatingSelection,O.latestElement,f,m.onBlur]),onClick:M.useCallback(F=>{if(k.hasTarget(f,F.target)&&!lt(F,m.onClick)&&fr(F.target)){var W=k.toSlateNode(f,F.target),U=k.findPath(f,W);if(!D.hasPath(f,U)||q.get(f,U)!==W)return;if(F.detail===EP&&U.length>=1){var Y=U;if(!(X.isElement(W)&&D.isBlock(f,W))){var ie,ee=D.above(f,{match:ve=>X.isElement(ve)&&D.isBlock(f,ve),at:U});Y=(ie=ee==null?void 0:ee[1])!==null&&ie!==void 0?ie:U.slice(0,1)}var he=D.range(f,Y);R.select(f,he);return}if(a)return;var pe=D.start(f,U),se=D.end(f,U),ae=D.void(f,{at:pe}),me=D.void(f,{at:se});if(ae&&me&&b.equals(ae[1],me[1])){var Pe=D.range(f,pe);R.select(f,Pe)}}},[f,m.onClick,a]),onCompositionEnd:M.useCallback(F=>{if(k.hasSelectableTarget(f,F.target)){var W;if(k.isComposing(f)&&Promise.resolve().then(()=>{h(!1),Vr.set(f,!1)}),(W=V.current)===null||W===void 0||W.handleCompositionEnd(F),lt(F,m.onCompositionEnd)||st)return;if(!Lr&&!B3&&!e1&&!b3&&!A3&&F.data){var U=Zt.get(f);Zt.delete(f),U!==void 0&&(On.set(f,f.marks),f.marks=U),D.insertText(f,F.data);var Y=On.get(f);On.delete(f),Y!==void 0&&(f.marks=Y)}}},[m.onCompositionEnd,f]),onCompositionUpdate:M.useCallback(F=>{k.hasSelectableTarget(f,F.target)&&!lt(F,m.onCompositionUpdate)&&(k.isComposing(f)||(h(!0),Vr.set(f,!0)))},[m.onCompositionUpdate,f]),onCompositionStart:M.useCallback(F=>{if(k.hasSelectableTarget(f,F.target)){var W;if((W=V.current)===null||W===void 0||W.handleCompositionStart(F),lt(F,m.onCompositionStart)||st)return;h(!0);var{selection:U}=f;if(U&&_.isExpanded(U)){D.deleteFragment(f);return}}},[m.onCompositionStart,f]),onCopy:M.useCallback(F=>{k.hasSelectableTarget(f,F.target)&&!lt(F,m.onCopy)&&!_1(F)&&(F.preventDefault(),k.setFragmentData(f,F.clipboardData,"copy"))},[m.onCopy,f]),onCut:M.useCallback(F=>{if(!a&&k.hasSelectableTarget(f,F.target)&&!lt(F,m.onCut)&&!_1(F)){F.preventDefault(),k.setFragmentData(f,F.clipboardData,"cut");var{selection:W}=f;if(W)if(_.isExpanded(W))D.deleteFragment(f);else{var U=q.parent(f,W.anchor.path);D.isVoid(f,U)&&R.delete(f)}}},[a,f,m.onCut]),onDragOver:M.useCallback(F=>{if(k.hasTarget(f,F.target)&&!lt(F,m.onDragOver)){var W=k.toSlateNode(f,F.target);X.isElement(W)&&D.isVoid(f,W)&&F.preventDefault()}},[m.onDragOver,f]),onDragStart:M.useCallback(F=>{if(!a&&k.hasTarget(f,F.target)&&!lt(F,m.onDragStart)){var W=k.toSlateNode(f,F.target),U=k.findPath(f,W),Y=X.isElement(W)&&D.isVoid(f,W)||D.void(f,{at:U,voids:!0});if(Y){var ie=D.range(f,U);R.select(f,ie)}O.isDraggingInternally=!0,k.setFragmentData(f,F.dataTransfer,"drag")}},[a,f,m.onDragStart,O]),onDrop:M.useCallback(F=>{if(!a&&k.hasTarget(f,F.target)&&!lt(F,m.onDrop)){F.preventDefault();var W=f.selection,U=k.findEventRange(f,F),Y=F.dataTransfer;R.select(f,U),O.isDraggingInternally&&W&&!_.equals(W,U)&&!D.void(f,{at:U,voids:!0})&&R.delete(f,{at:W}),k.insertData(f,Y),k.isFocused(f)||k.focus(f)}O.isDraggingInternally=!1},[a,f,m.onDrop,O]),onDragEnd:M.useCallback(F=>{!a&&O.isDraggingInternally&&m.onDragEnd&&k.hasTarget(f,F.target)&&m.onDragEnd(F),O.isDraggingInternally=!1},[a,O,m,f]),onFocus:M.useCallback(F=>{if(!a&&!O.isUpdatingSelection&&k.hasEditableTarget(f,F.target)&&!lt(F,m.onFocus)){var W=k.toDOMNode(f,f),U=k.findDocumentOrShadowRoot(f);if(O.latestElement=U.activeElement,Mo&&F.target!==W){W.focus();return}sr.set(f,!0)}},[a,O,f,m.onFocus]),onKeyDown:M.useCallback(F=>{if(!a&&k.hasEditableTarget(f,F.target)){var W;(W=V.current)===null||W===void 0||W.handleKeyDown(F);var{nativeEvent:U}=F;if(k.isComposing(f)&&U.isComposing===!1&&(Vr.set(f,!1),h(!1)),lt(F,m.onKeyDown)||k.isComposing(f))return;var{selection:Y}=f,ie=f.children[Y!==null?Y.focus.path[0]:0],ee=Cy(q.string(ie))==="rtl";if(_e.isRedo(U)){F.preventDefault();var he=f;typeof he.redo=="function"&&he.redo();return}if(_e.isUndo(U)){F.preventDefault();var pe=f;typeof pe.undo=="function"&&pe.undo();return}if(_e.isMoveLineBackward(U)){F.preventDefault(),R.move(f,{unit:"line",reverse:!0});return}if(_e.isMoveLineForward(U)){F.preventDefault(),R.move(f,{unit:"line"});return}if(_e.isExtendLineBackward(U)){F.preventDefault(),R.move(f,{unit:"line",edge:"focus",reverse:!0});return}if(_e.isExtendLineForward(U)){F.preventDefault(),R.move(f,{unit:"line",edge:"focus"});return}if(_e.isMoveBackward(U)){F.preventDefault(),Y&&_.isCollapsed(Y)?R.move(f,{reverse:!ee}):R.collapse(f,{edge:ee?"end":"start"});return}if(_e.isMoveForward(U)){F.preventDefault(),Y&&_.isCollapsed(Y)?R.move(f,{reverse:ee}):R.collapse(f,{edge:ee?"start":"end"});return}if(_e.isMoveWordBackward(U)){F.preventDefault(),Y&&_.isExpanded(Y)&&R.collapse(f,{edge:"focus"}),R.move(f,{unit:"word",reverse:!ee});return}if(_e.isMoveWordForward(U)){F.preventDefault(),Y&&_.isExpanded(Y)&&R.collapse(f,{edge:"focus"}),R.move(f,{unit:"word",reverse:ee});return}if(ir){if((n1||Lr)&&Y&&(_e.isDeleteBackward(U)||_e.isDeleteForward(U))&&_.isCollapsed(Y)){var se=q.parent(f,Y.anchor.path);if(X.isElement(se)&&D.isVoid(f,se)&&(D.isInline(f,se)||D.isBlock(f,se))){F.preventDefault(),D.deleteBackward(f,{unit:"block"});return}}}else{if(_e.isBold(U)||_e.isItalic(U)||_e.isTransposeCharacter(U)){F.preventDefault();return}if(_e.isSoftBreak(U)){F.preventDefault(),D.insertSoftBreak(f);return}if(_e.isSplitBlock(U)){F.preventDefault(),D.insertBreak(f);return}if(_e.isDeleteBackward(U)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f);return}if(_e.isDeleteForward(U)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f);return}if(_e.isDeleteLineBackward(U)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f,{unit:"line"});return}if(_e.isDeleteLineForward(U)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f,{unit:"line"});return}if(_e.isDeleteWordBackward(U)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f,{unit:"word"});return}if(_e.isDeleteWordForward(U)){F.preventDefault(),Y&&_.isExpanded(Y)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f,{unit:"word"});return}}}},[a,f,m.onKeyDown]),onPaste:M.useCallback(F=>{!a&&k.hasEditableTarget(f,F.target)&&!lt(F,m.onPaste)&&(!ir||S3(F.nativeEvent)||Lr)&&(F.preventDefault(),k.insertData(f,F.clipboardData))},[a,f,m.onPaste])}),re.createElement(PP,{decorations:G,node:f,renderElement:i,renderPlaceholder:l,renderLeaf:s,selection:f.selection})))))},TP=e=>{var{attributes:t,children:n}=e;return re.createElement("span",fn({},t),n,st&&re.createElement("br",null))},RP=()=>[],NP=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&_.isCollapsed(e.selection))){var n=t.startContainer.parentElement;n.getBoundingClientRect=t.getBoundingClientRect.bind(t),K_(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},lt=(e,t)=>{if(!t)return!1;var n=t(e);return n??(e.isDefaultPrevented()||e.isPropagationStopped())},_1=e=>fr(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),jP=(e,t)=>{if(!t)return!1;var n=t(e);return n??e.defaultPrevented},IP=M.createContext(!1),MP=M.createContext({});function $P(e){var t=M.useRef([]).current,n=M.useRef({editor:e}).current,r=M.useCallback(u=>{n.editor=u,t.forEach(a=>a(u))},[t,n]),o=M.useMemo(()=>({getSlate:()=>n.editor,addEventListener:u=>(t.push(u),()=>{t.splice(t.indexOf(u),1)})}),[t,n]);return{selectorContext:o,onChange:r}}var LP=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],zP=e=>{var{editor:t,children:n,onChange:r,onSelectionChange:o,onValueChange:u,initialValue:a}=e,i=Io(e,LP),[s,l]=re.useState(()=>{if(!q.isNodeList(a))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Le.stringify(a)));if(!D.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Le.stringify(t)));return t.children=a,Object.assign(t,i),{v:0,editor:t}}),{selectorContext:c,onChange:d}=$P(t),p=M.useCallback(f=>{var w;switch(r&&r(t.children),f==null||(w=f.operation)===null||w===void 0?void 0:w.type){case"set_selection":o==null||o(t.selection);break;default:u==null||u(t.children)}l(h=>({v:h.v+1,editor:t})),d(t)},[t,d,r,o,u]);M.useEffect(()=>(Bd.set(t,p),()=>{Bd.set(t,()=>{})}),[t,p]);var[y,m]=M.useState(k.isFocused(t));return M.useEffect(()=>{m(k.isFocused(t))},[t]),ca(()=>{var f=()=>m(k.isFocused(t));return Jy>=17?(document.addEventListener("focusin",f),document.addEventListener("focusout",f),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",f)}):(document.addEventListener("focus",f,!0),document.addEventListener("blur",f,!0),()=>{document.removeEventListener("focus",f,!0),document.removeEventListener("blur",f,!0)})},[]),re.createElement(MP.Provider,{value:c},re.createElement(F1.Provider,{value:s},re.createElement(md.Provider,{value:s.editor},re.createElement(IP.Provider,{value:y},n))))},P1=(e,t)=>{var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},k1=(e,t,n)=>{var r=k.toDOMRange(e,t).getBoundingClientRect(),o=k.toDOMRange(e,n).getBoundingClientRect();return P1(r,o)&&P1(o,r)},VP=(e,t)=>{var n=D.range(e,_.end(t)),r=Array.from(D.positions(e,{at:t})),o=0,u=r.length,a=Math.floor(u/2);if(k1(e,D.range(e,r[o]),n))return D.range(e,r[o],n);if(r.length<2)return D.range(e,r[r.length-1],n);for(;a!==r.length&&a!==o;)k1(e,D.range(e,r[a]),n)?u=a:o=a,a=Math.floor((o+u)/2);return D.range(e,r[u],n)};function T1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function R1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T1(Object(n),!0).forEach(function(r){Lt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var WP=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=t,{apply:o,onChange:u,deleteBackward:a,addMark:i,removeMark:s}=r;return Rs.set(r,new WeakMap),r.addMark=(l,c)=>{var d,p;(d=Ad.get(r))===null||d===void 0||d(),!Zt.get(r)&&(p=gt.get(r))!==null&&p!==void 0&&p.length&&Zt.set(r,null),On.delete(r),i(l,c)},r.removeMark=l=>{var c;!Zt.get(r)&&(c=gt.get(r))!==null&&c!==void 0&&c.length&&Zt.set(r,null),On.delete(r),s(l)},r.deleteBackward=l=>{if(l!=="line")return a(l);if(r.selection&&_.isCollapsed(r.selection)){var c=D.above(r,{match:m=>X.isElement(m)&&D.isBlock(r,m),at:r.selection});if(c){var[,d]=c,p=D.range(r,d,r.selection.anchor),y=VP(r,p);_.isCollapsed(y)||R.delete(r,{at:y})}}},r.apply=l=>{var c=[],d=[],p=gt.get(r);if(p!=null&&p.length){var y=p.map(j=>V3(j,l)).filter(Boolean);gt.set(r,y)}var m=cr.get(r);m&&cr.set(r,p1(r,m,l));var f=lr.get(r);if(f!=null&&f.at){var w=ue.isPoint(f==null?void 0:f.at)?Od(r,f.at,l):p1(r,f.at,l);lr.set(r,w?R1(R1({},f),{},{at:w}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{c.push(...Lo(r,l.path));break}case"set_selection":{var h;(h=la.get(r))===null||h===void 0||h.unref(),la.delete(r);break}case"insert_node":case"remove_node":{c.push(...Lo(r,b.parent(l.path)));break}case"merge_node":{var g=b.previous(l.path);c.push(...Lo(r,g));break}case"move_node":{var C=b.common(b.parent(l.path),b.parent(l.newPath));c.push(...Lo(r,C));var E;b.isBefore(l.path,l.newPath)?(c.push(...Lo(r,b.parent(l.path))),E=l.newPath):(c.push(...Lo(r,b.parent(l.newPath))),E=l.path);var B=q.get(t,b.parent(E)),x=k.findKey(r,B),A=D.pathRef(r,b.parent(E));d.push([A,x]);break}}o(l);for(var[S,N]of c){var[O]=D.node(r,S);Ts.set(O,N)}for(var[V,P]of d)if(V.current){var[L]=D.node(r,V.current);Ts.set(L,P)}},r.setFragmentData=l=>{var{selection:c}=r;if(c){var[d,p]=_.edges(c),y=D.void(r,{at:d.path}),m=D.void(r,{at:p.path});if(!(_.isCollapsed(c)&&!y)){var f=k.toDOMRange(r,c),w=f.cloneContents(),h=w.childNodes[0];if(w.childNodes.forEach(O=>{O.textContent&&O.textContent.trim()!==""&&(h=O)}),m){var[g]=m,C=f.cloneRange(),E=k.toDOMNode(r,g);C.setEndAfter(E),w=C.cloneContents()}if(y&&(h=w.querySelector("[data-slate-spacer]")),Array.from(w.querySelectorAll("[data-slate-zero-width]")).forEach(O=>{var V=O.getAttribute("data-slate-zero-width")==="n";O.textContent=V?`
|
61
|
-
`:""}),i1(h)){var B=h.ownerDocument.createElement("span");B.style.whiteSpace="pre",B.appendChild(h),w.appendChild(B),h=B}var x=r.getFragment(),A=JSON.stringify(x),S=window.btoa(encodeURIComponent(A));h.setAttribute("data-slate-fragment",S),l.setData("application/".concat(n),S);var N=w.ownerDocument.createElement("div");return N.appendChild(w),N.setAttribute("hidden","true"),w.ownerDocument.body.appendChild(N),l.setData("text/html",N.innerHTML),l.setData("text/plain",l1(N)),w.ownerDocument.body.removeChild(N),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var c=l.getData("application/".concat(n))||T3(l);if(c){var d=decodeURIComponent(window.atob(c)),p=JSON.parse(d);return r.insertFragment(p),!0}return!1},r.insertTextData=l=>{var c=l.getData("text/plain");if(c){var d=c.split(/\r\n|\r|\n/),p=!1;for(var y of d)p&&R.splitNodes(r,{always:!0}),r.insertText(y),p=!0;return!0}return!1},r.onChange=l=>{var c=Jy<18?Ro.unstable_batchedUpdates:d=>d();c(()=>{var d=Bd.get(r);d&&d(l),u(l)})},r},Lo=(e,t)=>{var n=[];for(var[r,o]of D.levels(e,{at:t})){var u=k.findKey(e,r);n.push([o,u])}return n},UP={isHistory(e){return Ue(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Mn.isOperationList(e.redos[0].operations))&&(e.undos.length===0||Mn.isOperationList(e.undos[0].operations))}},kd=new WeakMap,Td=new WeakMap,zo={isHistoryEditor(e){return UP.isHistory(e.history)&&D.isEditor(e)},isMerging(e){return Td.get(e)},isSaving(e){return kd.get(e)},redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=zo.isMerging(e);Td.set(e,!1),t(),Td.set(e,n)},withoutSaving(e,t){var n=zo.isSaving(e);kd.set(e,!1),t(),kd.set(e,n)}},HP=e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:r}=t,{redos:o}=r;if(o.length>0){var u=o[o.length-1];u.selectionBefore&&R.setSelection(t,u.selectionBefore),zo.withoutSaving(t,()=>{D.withoutNormalizing(t,()=>{for(var a of u.operations)t.apply(a)})}),r.redos.pop(),t.writeHistory("undos",u)}},t.undo=()=>{var{history:r}=t,{undos:o}=r;if(o.length>0){var u=o[o.length-1];zo.withoutSaving(t,()=>{D.withoutNormalizing(t,()=>{var a=u.operations.map(Mn.inverse).reverse();for(var i of a)t.apply(i);u.selectionBefore&&R.setSelection(t,u.selectionBefore)})}),t.writeHistory("redos",u),r.undos.pop()}},t.apply=r=>{var{operations:o,history:u}=t,{undos:a}=u,i=a[a.length-1],s=i&&i.operations[i.operations.length-1],l=zo.isSaving(t),c=zo.isMerging(t);if(l==null&&(l=qP(r)),l){if(c==null&&(i==null?c=!1:o.length!==0?c=!0:c=KP(r,s)),i&&c)i.operations.push(r);else{var d={operations:[r],selectionBefore:t.selection};t.writeHistory("undos",d)}for(;a.length>100;)a.shift();u.redos=[]}n(r)},t.writeHistory=(r,o)=>{t.history[r].push(o)},t},KP=(e,t)=>!!(t&&e.type==="insert_text"&&t.type==="insert_text"&&e.offset===t.offset+t.text.length&&b.equals(e.path,t.path)||t&&e.type==="remove_text"&&t.type==="remove_text"&&e.offset+e.text.length===t.offset&&b.equals(e.path,t.path)),qP=(e,t)=>e.type!=="set_selection";function YP(e){const n=`docx-h${e.element.level}`;return Ne.jsx(n,{...e.attributes,children:e.children})}function QP(e){return Ne.jsx("docx-blockquote",{...e.attributes,children:e.children})}const{Provider:GP,Consumer:XP}=M.createContext(!1);function ZP(e){const t=e.element,n=`docx-${t.ordered?"o":"u"}l`;return Ne.jsx(GP,{value:!!t.ordered,children:Ne.jsx(n,{...e.attributes,children:e.children})})}function JP(e){return Ne.jsx(XP,{children:t=>Ne.jsx("docx-li",{className:t?"ordered":"",children:e.children})})}const ek={"#":"heading","##":"heading","###":"heading","####":"heading","#####":"heading","######":"heading",">":"blockquote","*":"list-item","-":"list-item","+":"list-item"},tk=[[/\*\*(.+?)\*\*$/,"bold"],[/\*(.+?)\*$/,"italic"],[/~~(.+?)~~$/,"del"],[/~(.+?)~$/,"underline"]];function nk(e){return e.element.type==="heading"?Ne.jsx(YP,{...e}):e.element.type==="blockquote"?Ne.jsx(QP,{...e}):e.element.type==="list"?Ne.jsx(ZP,{...e}):e.element.type==="list-item"?Ne.jsx(JP,{...e}):Ne.jsx("p",{...e.attributes,children:e.children})}function rk({attributes:e,children:t,leaf:n}){return n.bold&&(t=Ne.jsx("strong",{children:t})),n.code&&(t=Ne.jsx("code",{children:t})),n.italic&&(t=Ne.jsx("em",{children:t})),n.del&&(t=Ne.jsx("del",{children:t})),n.underline&&(t=Ne.jsx("u",{children:t})),Ne.jsx("span",{...e,children:t})}function ok(e){const{initialValue:t=[{type:"paragraph",children:[{text:""}]}],onBeforeInput:n,withOverride:r=c=>c}=e,o=M.useMemo(()=>r(WP(HP(wx()))),[]),u=M.useCallback(c=>Ne.jsx(nk,{...c}),[]),a=M.useCallback(c=>Ne.jsx(rk,{...c}),[]),i=M.useCallback(n?c=>{queueMicrotask(()=>n(c))}:()=>{},[o]),s=M.useCallback(c=>MA.trigger(c),[o]),l=M.useCallback(c=>Sv.trigger(c),[o]);return za.value=o,Ne.jsx(zP,{editor:o,initialValue:t,onSelectionChange:s,onValueChange:l,children:Ne.jsx(kP,{className:"smart-docx-editor",renderElement:u,renderLeaf:a,onDOMBeforeInput:i})})}const uk=fu(v.defineComponent({__name:"Markdown",props:{initialValue:{type:Array}},setup(e){const t=e,n=bO(ok);function r(u){return{match:a=>X.isElement(a)&&D.isBlock(u,a)}}const o=u=>{const{insertText:a,deleteBackward:i,insertBreak:s}=u;return u.insertBreak=()=>{const{selection:l}=u;if(l&&_.isCollapsed(l)){const[c,d]=D.above(u,r(u))||[];if(c&&X.isElement(c)&&ue.equals(l.anchor,D.end(u,d))){if(c.type==="list-item")return R.insertNodes(u,{type:"list-item",children:[{text:""}]},r(u));if(c.type!=="paragraph")return R.insertNodes(u,{type:"paragraph",children:[{text:""}]},r(u))}}s()},u.insertText=l=>{const{selection:c}=u;if(l.endsWith(" ")&&c&&_.isCollapsed(c)){const d=D.above(u,r(u)),p=d?d[1]:[],y=D.start(u,p),m={anchor:c.anchor,focus:y},f=D.string(u,m)+l.slice(0,-1),w=ek[f];if(w){R.select(u,m),_.isCollapsed(m)||R.delete(u);const h={type:w};w==="heading"?h.level=`${f.length}`:w==="blockquote"&&(h.type="paragraph"),R.setNodes(u,h,r(u)),w==="blockquote"?R.wrapNodes(u,{type:"blockquote",children:[]},r(u)):w==="list-item"&&R.wrapNodes(u,{type:"list",children:[]},r(u));return}else for(const[h,g]of tk){const[C,E]=f.match(h)||[];if(C){const B=D.before(u,c,{unit:"character",distance:C.length}),x=D.range(u,B,c);return R.insertText(u,E,{at:x}),R.setNodes(u,{[g]:!0},{at:x,match:A=>Z.isText(A),split:!0}),R.insertNodes(u,{text:" "})}}}a(l)},u.deleteBackward=(...l)=>{const{selection:c}=u;if(c&&_.isCollapsed(c)){const[d,p]=D.above(u,r(u))||[];if(d&&ue.equals(c.anchor,D.start(u,p))){const[y,m]=D.parent(u,p);if(y)if(X.isElement(y)){const f=y.children[0]===d,w=y.children.at(-1)===d;let h=!1;if(f&&w?(h=!0,R.unwrapNodes(u,{at:m})):f?(h=!0,R.moveNodes(u,{to:m})):w&&(h=!0,R.moveNodes(u,{to:b.next(m)})),h){R.setNodes(u,{type:"paragraph"});return}}else D.isEditor(y)&&y.children.length===1&&R.setNodes(u,{type:"paragraph"})}i(...l)}},u};{const{isValidSelection:u}=_v();Xe(La(),"dragstart",a=>{u.value&&a.preventDefault()})}return(u,a)=>(v.openBlock(),v.createBlock(v.unref(n),v.mergeProps(t,{"with-override":o}),null,16))}}),[["styles",["[data-v-14d7ea7c],[data-v-14d7ea7c]:before,[data-v-14d7ea7c]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-14d7ea7c]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.list-item[data-v-14d7ea7c]{display:list-item}"]],["__scopeId","data-v-14d7ea7c"]]),ak=fu(v.defineComponent({__name:"index",props:{initialValue:{type:Array}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createCommentVNode(" Markdown "),v.createVNode(uk,v.normalizeProps(v.guardReactiveProps(t)),null,16),v.createCommentVNode(" 菜单栏 "),v.createVNode(xx)],64))}}),[["styles",[`@charset "UTF-8";[data-use-vue-component-wrap],[__use_react_component_wrap]{display:contents}.smart-docx-editor{font-size:1rem;line-height:1.5rem;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.3s;outline:2px solid transparent;outline-offset:2px;width:100%;height:100%}.smart-docx-editor>:first-child{margin-top:0!important}docx-h1,docx-h2,docx-h3,docx-h4,docx-h5,docx-h6{display:block;font-weight:700}docx-h1{margin-top:26px;margin-bottom:10px;font-size:26px}docx-h2{margin-top:22px;margin-bottom:8px;font-size:22px}docx-h3{margin-top:20px;margin-bottom:8px;font-size:20px}docx-h4{margin-top:18px;margin-bottom:8px;font-size:18px}docx-h5{margin-top:18px;margin-bottom:8px;font-size:16px}docx-h6{margin-top:16px;margin-bottom:8px;font-size:16px}docx-blockquote{display:block;--un-text-opacity:1;color:rgb(82 82 82 / var(--un-text-opacity));border-left-width:2px;--un-border-opacity:1;--un-border-left-opacity:var(--un-border-opacity);border-left-color:rgb(163 163 163 / var(--un-border-left-opacity));border-left-style:solid;margin-top:.5rem;margin-bottom:.5rem;padding-left:.75rem}:host-context(.dark) docx-blockquote{--un-text-opacity:1;color:rgb(163 163 163 / var(--un-text-opacity))}docx-ul,docx-ol,docx-li{display:block}docx-li{list-style-type:none}docx-li:not(.ordered){position:relative;padding-left:1.5rem;line-height:1.5rem}docx-li:not(.ordered):before{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 14a2 2 0 1 1 0-4a2 2 0 0 1 0 4Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;pointer-events:none;position:absolute;top:0;left:0;display:flex;--un-translate-x:-25%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));align-items:center;justify-content:left;content:"";width:1.5rem;height:1.5rem}`,"[data-v-1360e702],[data-v-1360e702]:before,[data-v-1360e702]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-1360e702]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-1360e702"]]),ik=fu(v.defineComponent({__name:"index",props:{initialValue:{type:Array}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createBlock(ak,v.normalizeProps(v.guardReactiveProps(t)),null,16))}}),[["styles",["[data-v-9cb0b441],[data-v-9cb0b441]:before,[data-v-9cb0b441]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-9cb0b441]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-9cb0b441"]]),sk="2.0.10";function lk(e=zA()){const t=La(),n=`style[cssr-id^="${e}-"]`;return v.onMounted(()=>{function r(){const o=t.value.parentNode;o.querySelectorAll(n).forEach(u=>{o.removeChild(u)}),Array.from(document.querySelectorAll(n)).forEach(u=>{o.appendChild(u.cloneNode()).textContent=u.textContent})}Fv(document.head,r,{childList:!0}),r()}),e}function ck(){const e=La();return v.onMounted(()=>{var o;const t=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:r}=((o=globalThis.SmartCore)==null?void 0:o[sk])??{};if(n&&(t.appendChild(document.createElement("style")).textContent=n),r){const u=document.createElement("style");u.setAttribute("namespace","smart"),t.appendChild(u).textContent=r,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(u.cloneNode()).textContent=r)}}),{classPrefix:lk()}}const fk=fu(v.defineComponent({__name:"App",props:{initialValue:{type:Array}},emits:["change"],setup(e,{emit:t}){const n=t;return ck(),Sv.on(r=>{n("change",r)}),v.onMounted(()=>{Va.value=La().value.parentNode}),(r,o)=>{const u=ZE;return v.openBlock(),v.createBlock(u,{namespace:"smart"},{default:v.withCtx(()=>[v.createVNode(ik,{"initial-value":r.initialValue},null,8,["initial-value"])]),_:1})}}}),[["styles",["[data-v-59b0d3b6],[data-v-59b0d3b6]:before,[data-v-59b0d3b6]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-59b0d3b6]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-59b0d3b6"]]),dk="smart-docx-editor";function pk(e,t){var n;VA&&!customElements.get(e)&&customElements.define(e,(n=t.prototype)!=null&&n.connectedCallback?t:v.defineCustomElement(t))}pk(dk,fk)})((N1=SmartCore["2.0.10"])==null?void 0:N1.Vue);
|
61
|
+
`:""}),i1(h)){var B=h.ownerDocument.createElement("span");B.style.whiteSpace="pre",B.appendChild(h),w.appendChild(B),h=B}var x=r.getFragment(),A=JSON.stringify(x),S=window.btoa(encodeURIComponent(A));h.setAttribute("data-slate-fragment",S),l.setData("application/".concat(n),S);var N=w.ownerDocument.createElement("div");return N.appendChild(w),N.setAttribute("hidden","true"),w.ownerDocument.body.appendChild(N),l.setData("text/html",N.innerHTML),l.setData("text/plain",l1(N)),w.ownerDocument.body.removeChild(N),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var c=l.getData("application/".concat(n))||T3(l);if(c){var d=decodeURIComponent(window.atob(c)),p=JSON.parse(d);return r.insertFragment(p),!0}return!1},r.insertTextData=l=>{var c=l.getData("text/plain");if(c){var d=c.split(/\r\n|\r|\n/),p=!1;for(var y of d)p&&R.splitNodes(r,{always:!0}),r.insertText(y),p=!0;return!0}return!1},r.onChange=l=>{var c=Jy<18?Ro.unstable_batchedUpdates:d=>d();c(()=>{var d=Bd.get(r);d&&d(l),u(l)})},r},Lo=(e,t)=>{var n=[];for(var[r,o]of D.levels(e,{at:t})){var u=k.findKey(e,r);n.push([o,u])}return n},UP={isHistory(e){return Ue(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Mn.isOperationList(e.redos[0].operations))&&(e.undos.length===0||Mn.isOperationList(e.undos[0].operations))}},kd=new WeakMap,Td=new WeakMap,zo={isHistoryEditor(e){return UP.isHistory(e.history)&&D.isEditor(e)},isMerging(e){return Td.get(e)},isSaving(e){return kd.get(e)},redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=zo.isMerging(e);Td.set(e,!1),t(),Td.set(e,n)},withoutSaving(e,t){var n=zo.isSaving(e);kd.set(e,!1),t(),kd.set(e,n)}},HP=e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:r}=t,{redos:o}=r;if(o.length>0){var u=o[o.length-1];u.selectionBefore&&R.setSelection(t,u.selectionBefore),zo.withoutSaving(t,()=>{D.withoutNormalizing(t,()=>{for(var a of u.operations)t.apply(a)})}),r.redos.pop(),t.writeHistory("undos",u)}},t.undo=()=>{var{history:r}=t,{undos:o}=r;if(o.length>0){var u=o[o.length-1];zo.withoutSaving(t,()=>{D.withoutNormalizing(t,()=>{var a=u.operations.map(Mn.inverse).reverse();for(var i of a)t.apply(i);u.selectionBefore&&R.setSelection(t,u.selectionBefore)})}),t.writeHistory("redos",u),r.undos.pop()}},t.apply=r=>{var{operations:o,history:u}=t,{undos:a}=u,i=a[a.length-1],s=i&&i.operations[i.operations.length-1],l=zo.isSaving(t),c=zo.isMerging(t);if(l==null&&(l=qP(r)),l){if(c==null&&(i==null?c=!1:o.length!==0?c=!0:c=KP(r,s)),i&&c)i.operations.push(r);else{var d={operations:[r],selectionBefore:t.selection};t.writeHistory("undos",d)}for(;a.length>100;)a.shift();u.redos=[]}n(r)},t.writeHistory=(r,o)=>{t.history[r].push(o)},t},KP=(e,t)=>!!(t&&e.type==="insert_text"&&t.type==="insert_text"&&e.offset===t.offset+t.text.length&&b.equals(e.path,t.path)||t&&e.type==="remove_text"&&t.type==="remove_text"&&e.offset+e.text.length===t.offset&&b.equals(e.path,t.path)),qP=(e,t)=>e.type!=="set_selection";function YP(e){const n=`docx-h${e.element.level}`;return Ne.jsx(n,{...e.attributes,children:e.children})}function QP(e){return Ne.jsx("docx-blockquote",{...e.attributes,children:e.children})}const{Provider:GP,Consumer:XP}=M.createContext(!1);function ZP(e){const t=e.element,n=`docx-${t.ordered?"o":"u"}l`;return Ne.jsx(GP,{value:!!t.ordered,children:Ne.jsx(n,{...e.attributes,children:e.children})})}function JP(e){return Ne.jsx(XP,{children:t=>Ne.jsx("docx-li",{className:t?"ordered":"",children:e.children})})}const ek={"#":"heading","##":"heading","###":"heading","####":"heading","#####":"heading","######":"heading",">":"blockquote","*":"list-item","-":"list-item","+":"list-item"},tk=[[/\*\*(.+?)\*\*$/,"bold"],[/\*(.+?)\*$/,"italic"],[/~~(.+?)~~$/,"del"],[/~(.+?)~$/,"underline"]];function nk(e){return e.element.type==="heading"?Ne.jsx(YP,{...e}):e.element.type==="blockquote"?Ne.jsx(QP,{...e}):e.element.type==="list"?Ne.jsx(ZP,{...e}):e.element.type==="list-item"?Ne.jsx(JP,{...e}):Ne.jsx("p",{...e.attributes,children:e.children})}function rk({attributes:e,children:t,leaf:n}){return n.bold&&(t=Ne.jsx("strong",{children:t})),n.code&&(t=Ne.jsx("code",{children:t})),n.italic&&(t=Ne.jsx("em",{children:t})),n.del&&(t=Ne.jsx("del",{children:t})),n.underline&&(t=Ne.jsx("u",{children:t})),Ne.jsx("span",{...e,children:t})}function ok(e){const{initialValue:t=[{type:"paragraph",children:[{text:""}]}],onBeforeInput:n,withOverride:r=c=>c}=e,o=M.useMemo(()=>r(WP(HP(wx()))),[]),u=M.useCallback(c=>Ne.jsx(nk,{...c}),[]),a=M.useCallback(c=>Ne.jsx(rk,{...c}),[]),i=M.useCallback(n?c=>{queueMicrotask(()=>n(c))}:()=>{},[o]),s=M.useCallback(c=>MA.trigger(c),[o]),l=M.useCallback(c=>Sv.trigger(c),[o]);return za.value=o,Ne.jsx(zP,{editor:o,initialValue:t,onSelectionChange:s,onValueChange:l,children:Ne.jsx(kP,{className:"smart-docx-editor",renderElement:u,renderLeaf:a,onDOMBeforeInput:i})})}const uk=fu(v.defineComponent({__name:"Markdown",props:{initialValue:{type:Array}},setup(e){const t=e,n=bO(ok);function r(u){return{match:a=>X.isElement(a)&&D.isBlock(u,a)}}const o=u=>{const{insertText:a,deleteBackward:i,insertBreak:s}=u;return u.insertBreak=()=>{const{selection:l}=u;if(l&&_.isCollapsed(l)){const[c,d]=D.above(u,r(u))||[];if(c&&X.isElement(c)&&ue.equals(l.anchor,D.end(u,d))){if(c.type==="list-item")return R.insertNodes(u,{type:"list-item",children:[{text:""}]},r(u));if(c.type!=="paragraph")return R.insertNodes(u,{type:"paragraph",children:[{text:""}]},r(u))}}s()},u.insertText=l=>{const{selection:c}=u;if(l.endsWith(" ")&&c&&_.isCollapsed(c)){const d=D.above(u,r(u)),p=d?d[1]:[],y=D.start(u,p),m={anchor:c.anchor,focus:y},f=D.string(u,m)+l.slice(0,-1),w=ek[f];if(w){R.select(u,m),_.isCollapsed(m)||R.delete(u);const h={type:w};w==="heading"?h.level=`${f.length}`:w==="blockquote"&&(h.type="paragraph"),R.setNodes(u,h,r(u)),w==="blockquote"?R.wrapNodes(u,{type:"blockquote",children:[]},r(u)):w==="list-item"&&R.wrapNodes(u,{type:"list",children:[]},r(u));return}else for(const[h,g]of tk){const[C,E]=f.match(h)||[];if(C){const B=D.before(u,c,{unit:"character",distance:C.length}),x=D.range(u,B,c);return R.insertText(u,E,{at:x}),R.setNodes(u,{[g]:!0},{at:x,match:A=>Z.isText(A),split:!0}),R.insertNodes(u,{text:" "})}}}a(l)},u.deleteBackward=(...l)=>{const{selection:c}=u;if(c&&_.isCollapsed(c)){const[d,p]=D.above(u,r(u))||[];if(d&&ue.equals(c.anchor,D.start(u,p))){const[y,m]=D.parent(u,p);if(y)if(X.isElement(y)){const f=y.children[0]===d,w=y.children.at(-1)===d;let h=!1;if(f&&w?(h=!0,R.unwrapNodes(u,{at:m})):f?(h=!0,R.moveNodes(u,{to:m})):w&&(h=!0,R.moveNodes(u,{to:b.next(m)})),h){R.setNodes(u,{type:"paragraph"});return}}else D.isEditor(y)&&y.children.length===1&&R.setNodes(u,{type:"paragraph"})}i(...l)}},u};{const{isValidSelection:u}=_v();Xe(La(),"dragstart",a=>{u.value&&a.preventDefault()})}return(u,a)=>(v.openBlock(),v.createBlock(v.unref(n),v.mergeProps(t,{"with-override":o}),null,16))}}),[["styles",["[data-v-14d7ea7c],[data-v-14d7ea7c]:before,[data-v-14d7ea7c]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-14d7ea7c]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.list-item[data-v-14d7ea7c]{display:list-item}"]],["__scopeId","data-v-14d7ea7c"]]),ak=fu(v.defineComponent({__name:"index",props:{initialValue:{type:Array}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createCommentVNode(" Markdown "),v.createVNode(uk,v.normalizeProps(v.guardReactiveProps(t)),null,16),v.createCommentVNode(" 菜单栏 "),v.createVNode(xx)],64))}}),[["styles",[`@charset "UTF-8";[data-use-vue-component-wrap],[__use_react_component_wrap]{display:contents}.smart-docx-editor{font-size:1rem;line-height:1.5rem;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.3s;outline:2px solid transparent;outline-offset:2px;width:100%;height:100%}.smart-docx-editor>:first-child{margin-top:0!important}docx-h1,docx-h2,docx-h3,docx-h4,docx-h5,docx-h6{display:block;font-weight:700}docx-h1{margin-top:26px;margin-bottom:10px;font-size:26px}docx-h2{margin-top:22px;margin-bottom:8px;font-size:22px}docx-h3{margin-top:20px;margin-bottom:8px;font-size:20px}docx-h4{margin-top:18px;margin-bottom:8px;font-size:18px}docx-h5{margin-top:18px;margin-bottom:8px;font-size:16px}docx-h6{margin-top:16px;margin-bottom:8px;font-size:16px}docx-blockquote{display:block;--un-text-opacity:1;color:rgb(82 82 82 / var(--un-text-opacity));border-left-width:2px;--un-border-opacity:1;--un-border-left-opacity:var(--un-border-opacity);border-left-color:rgb(163 163 163 / var(--un-border-left-opacity));border-left-style:solid;margin-top:.5rem;margin-bottom:.5rem;padding-left:.75rem}:host-context(.dark) docx-blockquote{--un-text-opacity:1;color:rgb(163 163 163 / var(--un-text-opacity))}docx-ul,docx-ol,docx-li{display:block}docx-li{list-style-type:none}docx-li:not(.ordered){position:relative;padding-left:1.5rem;line-height:1.5rem}docx-li:not(.ordered):before{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 14a2 2 0 1 1 0-4a2 2 0 0 1 0 4Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;pointer-events:none;position:absolute;top:0;left:0;display:flex;--un-translate-x:-25%;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));align-items:center;justify-content:left;content:"";width:1.5rem;height:1.5rem}`,"[data-v-1360e702],[data-v-1360e702]:before,[data-v-1360e702]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-1360e702]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-1360e702"]]),ik=fu(v.defineComponent({__name:"index",props:{initialValue:{type:Array}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createBlock(ak,v.normalizeProps(v.guardReactiveProps(t)),null,16))}}),[["styles",["[data-v-9cb0b441],[data-v-9cb0b441]:before,[data-v-9cb0b441]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-9cb0b441]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-9cb0b441"]]),sk="2.0.11";function lk(e=zA()){const t=La(),n=`style[cssr-id^="${e}-"]`;return v.onMounted(()=>{function r(){const o=t.value.parentNode;o.querySelectorAll(n).forEach(u=>{o.removeChild(u)}),Array.from(document.querySelectorAll(n)).forEach(u=>{o.appendChild(u.cloneNode()).textContent=u.textContent})}Fv(document.head,r,{childList:!0}),r()}),e}function ck(){const e=La();return v.onMounted(()=>{var o;const t=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:r}=((o=globalThis.SmartCore)==null?void 0:o[sk])??{};if(n&&(t.appendChild(document.createElement("style")).textContent=n),r){const u=document.createElement("style");u.setAttribute("namespace","smart"),t.appendChild(u).textContent=r,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(u.cloneNode()).textContent=r)}}),{classPrefix:lk()}}const fk=fu(v.defineComponent({__name:"App",props:{initialValue:{type:Array}},emits:["change"],setup(e,{emit:t}){const n=t;return ck(),Sv.on(r=>{n("change",r)}),v.onMounted(()=>{Va.value=La().value.parentNode}),(r,o)=>{const u=ZE;return v.openBlock(),v.createBlock(u,{namespace:"smart"},{default:v.withCtx(()=>[v.createVNode(ik,{"initial-value":r.initialValue},null,8,["initial-value"])]),_:1})}}}),[["styles",["[data-v-59b0d3b6],[data-v-59b0d3b6]:before,[data-v-59b0d3b6]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-59b0d3b6]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-59b0d3b6"]]),dk="smart-docx-editor";function pk(e,t){var n;VA&&!customElements.get(e)&&customElements.define(e,(n=t.prototype)!=null&&n.connectedCallback?t:v.defineCustomElement(t))}pk(dk,fk)})((N1=SmartCore["2.0.11"])==null?void 0:N1.Vue);
|
@@ -28,4 +28,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
28
28
|
* Released under the MIT license
|
29
29
|
*
|
30
30
|
* Date: 2023-09-17T03:16:35.830Z
|
31
|
-
*/.viewer-zoom-in:before,.viewer-zoom-out:before,.viewer-one-to-one:before,.viewer-reset:before,.viewer-prev:before,.viewer-play:before,.viewer-next:before,.viewer-rotate-left:before,.viewer-rotate-right:before,.viewer-flip-horizontal:before,.viewer-flip-vertical:before,.viewer-fullscreen:before,.viewer-fullscreen-exit:before,.viewer-close:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-size:280px;color:transparent;display:block;font-size:0;height:20px;line-height:0;width:20px}.viewer-zoom-in:before{background-position:0 0;content:"Zoom In"}.viewer-zoom-out:before{background-position:-20px 0;content:"Zoom Out"}.viewer-one-to-one:before{background-position:-40px 0;content:"One to One"}.viewer-reset:before{background-position:-60px 0;content:"Reset"}.viewer-prev:before{background-position:-80px 0;content:"Previous"}.viewer-play:before{background-position:-100px 0;content:"Play"}.viewer-next:before{background-position:-120px 0;content:"Next"}.viewer-rotate-left:before{background-position:-140px 0;content:"Rotate Left"}.viewer-rotate-right:before{background-position:-160px 0;content:"Rotate Right"}.viewer-flip-horizontal:before{background-position:-180px 0;content:"Flip Horizontal"}.viewer-flip-vertical:before{background-position:-200px 0;content:"Flip Vertical"}.viewer-fullscreen:before{background-position:-220px 0;content:"Enter Full Screen"}.viewer-fullscreen-exit:before{background-position:-240px 0;content:"Exit Full Screen"}.viewer-close:before{background-position:-260px 0;content:"Close"}.viewer-container{bottom:0;direction:ltr;font-size:0;left:0;line-height:0;overflow:hidden;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.viewer-container::-moz-selection,.viewer-container *::-moz-selection{background-color:transparent}.viewer-container::selection,.viewer-container *::selection{background-color:transparent}.viewer-container:focus{outline:0}.viewer-container img{display:block;height:auto;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.viewer-canvas{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.viewer-canvas>img{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:#00000080;overflow:hidden}.viewer-list{box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;transition:opacity .15s;width:30px}.viewer-list>li:focus,.viewer-list>li:hover{opacity:.75}.viewer-list>li:focus{outline:0}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:focus,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;left:0;position:absolute;right:0;top:0;z-index:1}.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:6px 3px}.viewer-toolbar>ul>li{background-color:#00000080;border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:focus,.viewer-toolbar>ul>li:hover{background-color:#000c}.viewer-toolbar>ul>li:focus{box-shadow:0 0 3px #fff;outline:0;position:relative;z-index:1}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:#000c;border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1.2;margin:5px 5%;max-width:90%;min-height:14px;opacity:.8;overflow:hidden;text-overflow:ellipsis;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{-webkit-app-region:no-drag;background-color:#00000080;border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:#000c}.viewer-button:focus{box-shadow:0 0 3px #fff;outline:0}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:#00000080}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{transition:all .3s}@keyframes viewer-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.viewer-loading:after{animation:viewer-spinner 1s linear infinite;border:4px solid rgba(255,255,255,.1);border-left-color:#ffffff80;border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width: 767px){.viewer-hide-xs-down{display:none}}@media (max-width: 991px){.viewer-hide-sm-down{display:none}}@media (max-width: 1199px){.viewer-hide-md-down{display:none}}.viewer-button.viewer-fullscreen{display:none}`,'[data-v-de658cb7],[data-v-de658cb7]:before,[data-v-de658cb7]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-de658cb7]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.inline[data-v-de658cb7]{display:inline}.transition[data-v-de658cb7]{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[size-full=""][data-v-de658cb7]{width:100%;height:100%}[hidden=""][data-v-de658cb7]{display:none}']],["__scopeId","data-v-de658cb7"]]),fa=["src"],da=Se(a.defineComponent({__name:"Pdf",props:{file:{type:null}},setup(t){const e=t,n=ft(()=>e.file);return(i,r)=>(a.openBlock(),a.createElementBlock("iframe",{"size-full":"",frameborder:"0",src:a.unref(n)},null,8,fa))}}),[["styles",['[data-v-a8464349],[data-v-a8464349]:before,[data-v-a8464349]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-a8464349]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.size-full[data-v-a8464349],[size-full=""][data-v-a8464349]{width:100%;height:100%}']],["__scopeId","data-v-a8464349"]]),ha=Se(a.defineComponent({__name:"Video",props:{file:{type:null}},setup(t){const e=t,n=a.ref(),i=ft(()=>e.file);return Ve(i,()=>{const{playing:r}=vo(n,{src:()=>i.value});a.nextTick(()=>{r.value=!0})}),(r,o)=>(a.openBlock(),a.createElementBlock("video",{ref_key:"videoRef",ref:n,class:"size-full absolute top-0 left-0",controls:""},null,512))}}),[["styles",["[data-v-9e308ade],[data-v-9e308ade]:before,[data-v-9e308ade]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-9e308ade]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.absolute[data-v-9e308ade]{position:absolute}.left-0[data-v-9e308ade]{left:0}.top-0[data-v-9e308ade]{top:0}.size-full[data-v-9e308ade]{width:100%;height:100%}"]],["__scopeId","data-v-9e308ade"]]);function pa(t){const e=t.split(".");return{name:e.length>1?e.slice(0,-1).join("."):t,ext:e.length>1?e.reverse()[0].toLowerCase():""}}const ga="2.0.10";function ma(t=wo()){const e=lt(),n=`style[cssr-id^="${t}-"]`;return a.onMounted(()=>{function i(){const r=e.value.parentNode;r.querySelectorAll(n).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(n)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}hn(document.head,i,{childList:!0}),i()}),t}function va(){const t=lt();return a.onMounted(()=>{var r;const e=t.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:i}=((r=globalThis.SmartCore)==null?void 0:r[ga])??{};if(n&&(e.appendChild(document.createElement("style")).textContent=n),i){const o=document.createElement("style");o.setAttribute("namespace","smart"),e.appendChild(o).textContent=i,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=i)}}),{classPrefix:ma()}}const ba={"size-full":"",relative:""},ya=Se(a.defineComponent({__name:"index",setup(t,{expose:e}){const n=a.useAttrs(),i=a.shallowRef(),r=a.ref(),o=a.ref(),s=a.computed(()=>Ji[o.value]),l={image:ua,pdf:da,video:ha},u=(f,d)=>{const{name:c,ext:h}=pa(f);i.value=d,r.value=c,o.value=h};return va(),a.onMounted(()=>{const f=lt();qt.value=f.value.parentNode}),e({previewFile:u}),(f,d)=>{const c=ki;return a.openBlock(),a.createBlock(c,{namespace:"smart"},{default:a.withCtx(()=>[a.createElementVNode("div",ba,[a.createCommentVNode(" File / Blob 文件打开 "),a.unref(i)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(l[a.unref(s)]||No),a.mergeProps({key:0,file:a.unref(i),"file-name":a.unref(r),"file-ext":a.unref(o)},a.unref(n)),null,16,["file","file-name","file-ext"])):a.createCommentVNode("v-if",!0)])]),_:1})}}}),[["styles",['[data-v-576658dd],[data-v-576658dd]:before,[data-v-576658dd]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-576658dd]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[relative=""][data-v-576658dd]{position:relative}.size-full[data-v-576658dd],[size-full=""][data-v-576658dd]{width:100%;height:100%}']],["__scopeId","data-v-576658dd"]]),wa="smart-file-preview";function xa(t,e){var n;xo&&!customElements.get(t)&&customElements.define(t,(n=e.prototype)!=null&&n.connectedCallback?e:a.defineCustomElement(e))}function ka(t,e){return t._instance.exposed[e]}const Kn=a.defineCustomElement(ya);Object.assign(Kn.prototype,{previewFile(...t){return ka(this,"previewFile")(...t)}}),xa(wa,Kn)})((Gn=SmartCore["2.0.10"])==null?void 0:Gn.Vue);
|
31
|
+
*/.viewer-zoom-in:before,.viewer-zoom-out:before,.viewer-one-to-one:before,.viewer-reset:before,.viewer-prev:before,.viewer-play:before,.viewer-next:before,.viewer-rotate-left:before,.viewer-rotate-right:before,.viewer-flip-horizontal:before,.viewer-flip-vertical:before,.viewer-fullscreen:before,.viewer-fullscreen-exit:before,.viewer-close:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-size:280px;color:transparent;display:block;font-size:0;height:20px;line-height:0;width:20px}.viewer-zoom-in:before{background-position:0 0;content:"Zoom In"}.viewer-zoom-out:before{background-position:-20px 0;content:"Zoom Out"}.viewer-one-to-one:before{background-position:-40px 0;content:"One to One"}.viewer-reset:before{background-position:-60px 0;content:"Reset"}.viewer-prev:before{background-position:-80px 0;content:"Previous"}.viewer-play:before{background-position:-100px 0;content:"Play"}.viewer-next:before{background-position:-120px 0;content:"Next"}.viewer-rotate-left:before{background-position:-140px 0;content:"Rotate Left"}.viewer-rotate-right:before{background-position:-160px 0;content:"Rotate Right"}.viewer-flip-horizontal:before{background-position:-180px 0;content:"Flip Horizontal"}.viewer-flip-vertical:before{background-position:-200px 0;content:"Flip Vertical"}.viewer-fullscreen:before{background-position:-220px 0;content:"Enter Full Screen"}.viewer-fullscreen-exit:before{background-position:-240px 0;content:"Exit Full Screen"}.viewer-close:before{background-position:-260px 0;content:"Close"}.viewer-container{bottom:0;direction:ltr;font-size:0;left:0;line-height:0;overflow:hidden;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.viewer-container::-moz-selection,.viewer-container *::-moz-selection{background-color:transparent}.viewer-container::selection,.viewer-container *::selection{background-color:transparent}.viewer-container:focus{outline:0}.viewer-container img{display:block;height:auto;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.viewer-canvas{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.viewer-canvas>img{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:#00000080;overflow:hidden}.viewer-list{box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;transition:opacity .15s;width:30px}.viewer-list>li:focus,.viewer-list>li:hover{opacity:.75}.viewer-list>li:focus{outline:0}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:focus,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;left:0;position:absolute;right:0;top:0;z-index:1}.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:6px 3px}.viewer-toolbar>ul>li{background-color:#00000080;border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:focus,.viewer-toolbar>ul>li:hover{background-color:#000c}.viewer-toolbar>ul>li:focus{box-shadow:0 0 3px #fff;outline:0;position:relative;z-index:1}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:#000c;border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1.2;margin:5px 5%;max-width:90%;min-height:14px;opacity:.8;overflow:hidden;text-overflow:ellipsis;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{-webkit-app-region:no-drag;background-color:#00000080;border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:#000c}.viewer-button:focus{box-shadow:0 0 3px #fff;outline:0}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:#00000080}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{transition:all .3s}@keyframes viewer-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.viewer-loading:after{animation:viewer-spinner 1s linear infinite;border:4px solid rgba(255,255,255,.1);border-left-color:#ffffff80;border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width: 767px){.viewer-hide-xs-down{display:none}}@media (max-width: 991px){.viewer-hide-sm-down{display:none}}@media (max-width: 1199px){.viewer-hide-md-down{display:none}}.viewer-button.viewer-fullscreen{display:none}`,'[data-v-de658cb7],[data-v-de658cb7]:before,[data-v-de658cb7]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-de658cb7]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.inline[data-v-de658cb7]{display:inline}.transition[data-v-de658cb7]{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[size-full=""][data-v-de658cb7]{width:100%;height:100%}[hidden=""][data-v-de658cb7]{display:none}']],["__scopeId","data-v-de658cb7"]]),fa=["src"],da=Se(a.defineComponent({__name:"Pdf",props:{file:{type:null}},setup(t){const e=t,n=ft(()=>e.file);return(i,r)=>(a.openBlock(),a.createElementBlock("iframe",{"size-full":"",frameborder:"0",src:a.unref(n)},null,8,fa))}}),[["styles",['[data-v-a8464349],[data-v-a8464349]:before,[data-v-a8464349]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-a8464349]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.size-full[data-v-a8464349],[size-full=""][data-v-a8464349]{width:100%;height:100%}']],["__scopeId","data-v-a8464349"]]),ha=Se(a.defineComponent({__name:"Video",props:{file:{type:null}},setup(t){const e=t,n=a.ref(),i=ft(()=>e.file);return Ve(i,()=>{const{playing:r}=vo(n,{src:()=>i.value});a.nextTick(()=>{r.value=!0})}),(r,o)=>(a.openBlock(),a.createElementBlock("video",{ref_key:"videoRef",ref:n,class:"size-full absolute top-0 left-0",controls:""},null,512))}}),[["styles",["[data-v-9e308ade],[data-v-9e308ade]:before,[data-v-9e308ade]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-9e308ade]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.absolute[data-v-9e308ade]{position:absolute}.left-0[data-v-9e308ade]{left:0}.top-0[data-v-9e308ade]{top:0}.size-full[data-v-9e308ade]{width:100%;height:100%}"]],["__scopeId","data-v-9e308ade"]]);function pa(t){const e=t.split(".");return{name:e.length>1?e.slice(0,-1).join("."):t,ext:e.length>1?e.reverse()[0].toLowerCase():""}}const ga="2.0.11";function ma(t=wo()){const e=lt(),n=`style[cssr-id^="${t}-"]`;return a.onMounted(()=>{function i(){const r=e.value.parentNode;r.querySelectorAll(n).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(n)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}hn(document.head,i,{childList:!0}),i()}),t}function va(){const t=lt();return a.onMounted(()=>{var r;const e=t.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:i}=((r=globalThis.SmartCore)==null?void 0:r[ga])??{};if(n&&(e.appendChild(document.createElement("style")).textContent=n),i){const o=document.createElement("style");o.setAttribute("namespace","smart"),e.appendChild(o).textContent=i,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=i)}}),{classPrefix:ma()}}const ba={"size-full":"",relative:""},ya=Se(a.defineComponent({__name:"index",setup(t,{expose:e}){const n=a.useAttrs(),i=a.shallowRef(),r=a.ref(),o=a.ref(),s=a.computed(()=>Ji[o.value]),l={image:ua,pdf:da,video:ha},u=(f,d)=>{const{name:c,ext:h}=pa(f);i.value=d,r.value=c,o.value=h};return va(),a.onMounted(()=>{const f=lt();qt.value=f.value.parentNode}),e({previewFile:u}),(f,d)=>{const c=ki;return a.openBlock(),a.createBlock(c,{namespace:"smart"},{default:a.withCtx(()=>[a.createElementVNode("div",ba,[a.createCommentVNode(" File / Blob 文件打开 "),a.unref(i)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(l[a.unref(s)]||No),a.mergeProps({key:0,file:a.unref(i),"file-name":a.unref(r),"file-ext":a.unref(o)},a.unref(n)),null,16,["file","file-name","file-ext"])):a.createCommentVNode("v-if",!0)])]),_:1})}}}),[["styles",['[data-v-576658dd],[data-v-576658dd]:before,[data-v-576658dd]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-576658dd]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[relative=""][data-v-576658dd]{position:relative}.size-full[data-v-576658dd],[size-full=""][data-v-576658dd]{width:100%;height:100%}']],["__scopeId","data-v-576658dd"]]),wa="smart-file-preview";function xa(t,e){var n;xo&&!customElements.get(t)&&customElements.define(t,(n=e.prototype)!=null&&n.connectedCallback?e:a.defineCustomElement(e))}function ka(t,e){return t._instance.exposed[e]}const Kn=a.defineCustomElement(ya);Object.assign(Kn.prototype,{previewFile(...t){return ka(this,"previewFile")(...t)}}),xa(wa,Kn)})((Gn=SmartCore["2.0.11"])==null?void 0:Gn.Vue);
|
@@ -1 +1 @@
|
|
1
|
-
var P,M,_;(function(f,g,R){"use strict";function C(e){return Object.prototype.toString.call(e)==="[object Object]"}function w(e,a){return Math.floor(Math.random()*(a-e+1)+e)}function O(){return String.fromCharCode(w(97,122))}function B(){return String.fromCharCode(w(65,90))}function U(e=12,a={}){const{lowercase:t=!0,uppercase:n=!1,number:r=!1}=a,o=[];let u;if(t&&o.push("l"),n&&o.push("u"),r&&o.push("n"),!(u=o.length))throw new Error("???");let c="";for(;e-- >0;){const p=u>1?w(0,u-1):0,b=o[p];b==="l"?c+=O():b==="u"?c+=B():b==="n"&&(c+=w(0,9))}return c}function z(){return U(1,{uppercase:!0})+U(17,{uppercase:!0,number:!0})}function A(e,a,t){t.set(a,e);for(const[n,r]of Object.entries(a)){let o=!1;if(C(r)||(o=Array.isArray(r))){let u;if(t.has(r))u=t.get(r);else{let c;u=o?Array.isArray(c=e[n])?c:[]:C(c=e[n])?c:{},A(u,r,t)}e[n]=u}else r!==void 0&&(e[n]=r)}}function L(e,...a){if(!C(e)&&!Array.isArray(e)||!a.length)return e;const t=new WeakMap;t.set(e,e);for(let n=0;n<a.length;){const r=a[n];if(C(r)||Array.isArray(r)){t.set(r,e),n++;continue}a.splice(n,1)}for(const n of a)A(e,n,t);return e}const I=typeof window<"u",i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",rose:{1:"#ffe4e6",2:"#fecdd3",3:"#fda4af",4:"#fb7185",5:"#f43f5e",6:"#e11d48",7:"#be123c",8:"#9f1239",9:"#881337",50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519",DEFAULT:"#fb7185"},pink:{1:"#fce7f3",2:"#fbcfe8",3:"#f9a8d4",4:"#f472b6",5:"#ec4899",6:"#db2777",7:"#be185d",8:"#9d174d",9:"#831843",50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724",DEFAULT:"#f472b6"},fuchsia:{1:"#fae8ff",2:"#f5d0fe",3:"#f0abfc",4:"#e879f9",5:"#d946ef",6:"#c026d3",7:"#a21caf",8:"#86198f",9:"#701a75",50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e",DEFAULT:"#e879f9"},purple:{1:"#f3e8ff",2:"#e9d5ff",3:"#d8b4fe",4:"#c084fc",5:"#a855f7",6:"#9333ea",7:"#7e22ce",8:"#6b21a8",9:"#581c87",50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764",DEFAULT:"#c084fc"},violet:{1:"#ede9fe",2:"#ddd6fe",3:"#c4b5fd",4:"#a78bfa",5:"#8b5cf6",6:"#7c3aed",7:"#6d28d9",8:"#5b21b6",9:"#4c1d95",50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065",DEFAULT:"#a78bfa"},indigo:{1:"#e0e7ff",2:"#c7d2fe",3:"#a5b4fc",4:"#818cf8",5:"#6366f1",6:"#4f46e5",7:"#4338ca",8:"#3730a3",9:"#312e81",50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b",DEFAULT:"#818cf8"},blue:{1:"#dbeafe",2:"#bfdbfe",3:"#93c5fd",4:"#60a5fa",5:"#3b82f6",6:"#2563eb",7:"#1d4ed8",8:"#1e40af",9:"#1e3a8a",50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554",DEFAULT:"#60a5fa"},sky:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},cyan:{1:"#cffafe",2:"#a5f3fc",3:"#67e8f9",4:"#22d3ee",5:"#06b6d4",6:"#0891b2",7:"#0e7490",8:"#155e75",9:"#164e63",50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344",DEFAULT:"#22d3ee"},teal:{1:"#ccfbf1",2:"#99f6e4",3:"#5eead4",4:"#2dd4bf",5:"#14b8a6",6:"#0d9488",7:"#0f766e",8:"#115e59",9:"#134e4a",50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e",DEFAULT:"#2dd4bf"},emerald:{1:"#d1fae5",2:"#a7f3d0",3:"#6ee7b7",4:"#34d399",5:"#10b981",6:"#059669",7:"#047857",8:"#065f46",9:"#064e3b",50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22",DEFAULT:"#34d399"},green:{1:"#dcfce7",2:"#bbf7d0",3:"#86efac",4:"#4ade80",5:"#22c55e",6:"#16a34a",7:"#15803d",8:"#166534",9:"#14532d",50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16",DEFAULT:"#4ade80"},lime:{1:"#ecfccb",2:"#d9f99d",3:"#bef264",4:"#a3e635",5:"#84cc16",6:"#65a30d",7:"#4d7c0f",8:"#3f6212",9:"#365314",50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05",DEFAULT:"#a3e635"},yellow:{1:"#fef9c3",2:"#fef08a",3:"#fde047",4:"#facc15",5:"#eab308",6:"#ca8a04",7:"#a16207",8:"#854d0e",9:"#713f12",50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006",DEFAULT:"#facc15"},amber:{1:"#fef3c7",2:"#fde68a",3:"#fcd34d",4:"#fbbf24",5:"#f59e0b",6:"#d97706",7:"#b45309",8:"#92400e",9:"#78350f",50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03",DEFAULT:"#fbbf24"},orange:{1:"#ffedd5",2:"#fed7aa",3:"#fdba74",4:"#fb923c",5:"#f97316",6:"#ea580c",7:"#c2410c",8:"#9a3412",9:"#7c2d12",50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407",DEFAULT:"#fb923c"},red:{1:"#fee2e2",2:"#fecaca",3:"#fca5a5",4:"#f87171",5:"#ef4444",6:"#dc2626",7:"#b91c1c",8:"#991b1b",9:"#7f1d1d",50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a",DEFAULT:"#f87171"},gray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},slate:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},zinc:{1:"#f4f4f5",2:"#e4e4e7",3:"#d4d4d8",4:"#a1a1aa",5:"#71717a",6:"#52525b",7:"#3f3f46",8:"#27272a",9:"#18181b",50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b",DEFAULT:"#a1a1aa"},neutral:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},stone:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},light:{1:"#fcfcfc",2:"#fafafa",3:"#f8f9fa",4:"#f6f6f6",5:"#f2f2f2",6:"#f1f3f5",7:"#e9ecef",8:"#dee2e6",9:"#dde1e3",50:"#fdfdfd",100:"#fcfcfc",200:"#fafafa",300:"#f8f9fa",400:"#f6f6f6",500:"#f2f2f2",600:"#f1f3f5",700:"#e9ecef",800:"#dee2e6",900:"#dde1e3",950:"#d8dcdf",DEFAULT:"#f6f6f6"},dark:{1:"#3c3c3c",2:"#323232",3:"#2d2d2d",4:"#222222",5:"#1f1f1f",6:"#1c1c1e",7:"#1b1b1b",8:"#181818",9:"#0f0f0f",50:"#4a4a4a",100:"#3c3c3c",200:"#323232",300:"#2d2d2d",400:"#222222",500:"#1f1f1f",600:"#1c1c1e",700:"#1b1b1b",800:"#181818",900:"#0f0f0f",950:"#080808",DEFAULT:"#222222"},lightblue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},lightBlue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},warmgray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},warmGray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},truegray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},trueGray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},coolgray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},coolGray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},bluegray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},blueGray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},primary:"#2080f0","primary-hover":"#4098fc","primary-active":"#1060c9",info:"#909399","info-hover":"#a6a9ad","info-active":"#82848a",success:"#18a058","success-hover":"#36ad6a","success-active":"#0c7a43",warning:"#f0a020","warning-hover":"#fcb040","warning-active":"#c97c10",error:"#d03050","error-hover":"#de576d","error-active":"#ab1f3f"},x={sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},F={common:{fontFamily:x.sans,fontFamilyMono:x.mono,primaryColor:i.primary,primaryColorHover:i["primary-hover"],primaryColorPressed:i["primary-active"],primaryColorSuppl:i.primary,infoColor:i.info,infoColorHover:i["info-hover"],infoColorPressed:i["info-active"],infoColorSuppl:i.info,successColor:i.success,successColorHover:i["success-hover"],successColorPressed:i["success-active"],successColorSuppl:i.success,warningColor:i.warning,warningColorHover:i["warning-hover"],warningColorPressed:i["warning-active"],warningColorSuppl:i.warning,errorColor:i.error,errorColorHover:i["error-hover"],errorColorPressed:i["error-active"],errorColorSuppl:i.error}};L({},F,{}),L({},F,{Button:{textColorPrimary:"#FFF",textColorHoverPrimary:"#FFF",textColorPressedPrimary:"#FFF",textColorFocusPrimary:"#FFF",textColorDisabledPrimary:"#FFF"}});const V="2.0.10";function G(e,a){let t,n,r;const o=f.ref(!0),u=()=>{o.value=!0,r()};f.watch(e,u,{flush:"sync"});const c=typeof a=="function"?a:a.get,p=typeof a=="function"?void 0:a.set,b=f.customRef((d,s)=>(n=d,r=s,{get(){return o.value&&(t=c(),o.value=!1),n(),t},set(l){p==null||p(l)}}));return Object.isExtensible(b)&&(b.trigger=u),b}function q(e){return f.getCurrentScope()?(f.onScopeDispose(e),!0):!1}function E(e){return typeof e=="function"?e():f.unref(e)}function H(e){if(!f.isRef(e))return f.reactive(e);const a=new Proxy({},{get(t,n,r){return f.unref(Reflect.get(e.value,n,r))},set(t,n,r){return f.isRef(e.value[n])&&!f.isRef(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return f.reactive(a)}function j(e){return H(f.computed(e))}function W(e,...a){const t=a.flat(),n=t[0];return j(()=>Object.fromEntries(typeof n=="function"?Object.entries(f.toRefs(e)).filter(([r,o])=>!n(E(o),r)):Object.entries(f.toRefs(e)).filter(r=>!t.includes(r[0]))))}const $=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const K=e=>e!=null;function J(e,a,t){return f.watch(e,a,{...t,deep:!0})}function Q(e){var a;const t=E(e);return(a=t==null?void 0:t.$el)!=null?a:t}const X=$?window:void 0;function Y(){const e=f.ref(!1),a=f.getCurrentInstance();return a&&f.onMounted(()=>{e.value=!0},a),e}function Z(e){const a=Y();return f.computed(()=>(a.value,!!e()))}function ee(e,a,t={}){const{window:n=X,...r}=t;let o;const u=Z(()=>n&&"MutationObserver"in n),c=()=>{o&&(o.disconnect(),o=void 0)},p=f.computed(()=>{const l=E(e),y=(Array.isArray(l)?l:[l]).map(Q).filter(K);return new Set(y)}),b=f.watch(()=>p.value,l=>{c(),u.value&&l.size&&(o=new MutationObserver(a),l.forEach(y=>o.observe(y,r)))},{immediate:!0,flush:"post"}),d=()=>o==null?void 0:o.takeRecords(),s=()=>{c(),b()};return q(s),{isSupported:u,stop:s,takeRecords:d}}function T(e){const a=f.getCurrentInstance(),t=G(()=>null,()=>a.proxy.$el);return f.onUpdated(t.trigger),f.onMounted(t.trigger),t}function fe(e=z()){const a=T(),t=`style[cssr-id^="${e}-"]`;return f.onMounted(()=>{function n(){const r=a.value.parentNode;r.querySelectorAll(t).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(t)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}ee(document.head,n,{childList:!0}),n()}),e}function ae(){const e=T();return f.onMounted(()=>{var r;const a=e.value.parentNode,{tailwindResetStyle:t,elementPlusStyle:n}=((r=globalThis.SmartCore)==null?void 0:r[V])??{};if(t&&(a.appendChild(document.createElement("style")).textContent=t),n){const o=document.createElement("style");o.setAttribute("namespace","smart"),a.appendChild(o).textContent=n,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=n)}}),{classPrefix:fe()}}const te=((e,a)=>{const t=e.__vccOpts||e;for(const[n,r]of a)t[n]=r;return t})(f.defineComponent({__name:"index",props:f.mergeModels({beforeUpload:{type:Function},accept:{type:null},defaultFileList:{type:null},defaultUpload:{type:null},disabled:{type:null},directory:{type:null},directoryDnd:{type:null},fileListClass:{type:null},fileListStyle:{type:null},imageGroupProps:{type:null},inputProps:{type:null},listType:{type:null},max:{type:null},multiple:{type:null},renderIcon:{type:null},shouldUseThumbnailUrl:{type:null},showCancelButton:{type:null},showDownloadButton:{type:null},showRemoveButton:{type:null},showRetryButton:{type:null},showFileList:{type:null},showPreviewButton:{type:null},showTrigger:{type:null},triggerClass:{type:null},triggerStyle:{type:null},onError:{type:null},onFinish:{type:null}},{fileList:{default:()=>[]},fileListModifiers:{}}),emits:["update:fileList"],setup(e,{expose:a}){const t=e,n=f.useModel(e,"fileList"),r=f.ref(),{classPrefix:o}=ae(),u=W(t,["beforeUpload"]),c=f.ref(n.value.map(({fileName:d})=>({id:d,name:d,url:d,status:"finished"})));function p({file:d,onFinish:s,onError:l,onProgress:y}){const S=d.file,oe=t.beforeUpload??(h=>h),N=new FormData;N.set("file",S);const ce=oe({method:"post",url:"/admin/sys-file/upload",data:N,headers:{"Content-Type":"multipart/form-data"},onUploadProgress({loaded:h,total:m}){y({percent:m?Math.ceil(h/m*100):0})}});R.getConfigProvider("request")(ce).then(h=>{const m=h.data.data;d.url=m.url,d.status="finished",t.defaultUpload||c.value.splice(c.value.findIndex(({id:v})=>v===d.id),1,d),n.value.find(({fileName:v})=>v===m.url)||n.value.push({fileName:m.url,originalFileName:S.name}),s()}).catch(h=>{d.status="error",t.defaultUpload||c.value.splice(c.value.findIndex(({id:m})=>m===d.id),1,d),l(),console.error(h)})}function b(){setTimeout(()=>{for(let d=0;d<n.value.length;){const s=n.value[d].fileName;c.value.some(l=>l.url===s)?d++:n.value.splice(d,1)}},10)}return J(n,d=>{d.forEach(({fileName:s})=>{c.value.some(l=>l.url===s)||c.value.push({id:s,name:s,url:s,status:"finished"})});for(let s=0;s<c.value.length;){const l=c.value[s];l.status==="finished"&&l.url&&!d.some(({fileName:y})=>y===l.url)?c.value.splice(s,1):s++}}),a({uploadRef:r,fileList:c}),(d,s)=>(f.openBlock(),f.createBlock(f.unref(g.NConfigProvider),{"cls-prefix":f.unref(o),"theme-overrides":f.unref(F),locale:f.unref(g.zhCN),abstract:""},{default:f.withCtx(()=>[f.createVNode(f.unref(g.NUpload),f.mergeProps({ref_key:"uploadRef",ref:r},f.unref(u),{"file-list":f.unref(c),"onUpdate:fileList":s[0]||(s[0]=l=>f.isRef(c)?c.value=l:null),"custom-request":p,onRemove:b}),{default:f.withCtx(()=>[f.renderSlot(d.$slots,"default",{},()=>[[void 0,"image"].includes(d.listType)?(f.openBlock(),f.createBlock(f.unref(g.NButton),{key:0},{default:f.withCtx(()=>[f.createTextVNode("选择文件")]),_:1})):f.createCommentVNode("v-if",!0)],!0)]),_:3},16,["file-list"])]),_:3},8,["cls-prefix","theme-overrides","locale"]))}}),[["styles",["[data-v-da18f512],[data-v-da18f512]:before,[data-v-da18f512]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-da18f512]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-da18f512"]]),ne="smart-upload";function re(e,a){var t;I&&!customElements.get(e)&&customElements.define(e,(t=a.prototype)!=null&&t.connectedCallback?a:f.defineCustomElement(a))}function k(e,a){return e._instance.exposed[a]}const D=f.defineCustomElement(te);Object.assign(D.prototype,{getUploadRef(){return k(this,"uploadRef").value},getFileList(){return k(this,"fileList").value},submit(){return this.getUploadRef().submit()},clear(){return this.getUploadRef().clear()}}),re(ne,D)})((P=SmartCore["2.0.10"])==null?void 0:P.Vue,(M=SmartCore["2.0.10"])==null?void 0:M.NaiveUI,(_=SmartCore["2.0.10"])==null?void 0:_.SmartCore);
|
1
|
+
var P,M,_;(function(f,g,R){"use strict";function C(e){return Object.prototype.toString.call(e)==="[object Object]"}function w(e,a){return Math.floor(Math.random()*(a-e+1)+e)}function O(){return String.fromCharCode(w(97,122))}function B(){return String.fromCharCode(w(65,90))}function U(e=12,a={}){const{lowercase:t=!0,uppercase:n=!1,number:r=!1}=a,o=[];let u;if(t&&o.push("l"),n&&o.push("u"),r&&o.push("n"),!(u=o.length))throw new Error("???");let c="";for(;e-- >0;){const p=u>1?w(0,u-1):0,b=o[p];b==="l"?c+=O():b==="u"?c+=B():b==="n"&&(c+=w(0,9))}return c}function z(){return U(1,{uppercase:!0})+U(17,{uppercase:!0,number:!0})}function A(e,a,t){t.set(a,e);for(const[n,r]of Object.entries(a)){let o=!1;if(C(r)||(o=Array.isArray(r))){let u;if(t.has(r))u=t.get(r);else{let c;u=o?Array.isArray(c=e[n])?c:[]:C(c=e[n])?c:{},A(u,r,t)}e[n]=u}else r!==void 0&&(e[n]=r)}}function L(e,...a){if(!C(e)&&!Array.isArray(e)||!a.length)return e;const t=new WeakMap;t.set(e,e);for(let n=0;n<a.length;){const r=a[n];if(C(r)||Array.isArray(r)){t.set(r,e),n++;continue}a.splice(n,1)}for(const n of a)A(e,n,t);return e}const I=typeof window<"u",i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",rose:{1:"#ffe4e6",2:"#fecdd3",3:"#fda4af",4:"#fb7185",5:"#f43f5e",6:"#e11d48",7:"#be123c",8:"#9f1239",9:"#881337",50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519",DEFAULT:"#fb7185"},pink:{1:"#fce7f3",2:"#fbcfe8",3:"#f9a8d4",4:"#f472b6",5:"#ec4899",6:"#db2777",7:"#be185d",8:"#9d174d",9:"#831843",50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724",DEFAULT:"#f472b6"},fuchsia:{1:"#fae8ff",2:"#f5d0fe",3:"#f0abfc",4:"#e879f9",5:"#d946ef",6:"#c026d3",7:"#a21caf",8:"#86198f",9:"#701a75",50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e",DEFAULT:"#e879f9"},purple:{1:"#f3e8ff",2:"#e9d5ff",3:"#d8b4fe",4:"#c084fc",5:"#a855f7",6:"#9333ea",7:"#7e22ce",8:"#6b21a8",9:"#581c87",50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764",DEFAULT:"#c084fc"},violet:{1:"#ede9fe",2:"#ddd6fe",3:"#c4b5fd",4:"#a78bfa",5:"#8b5cf6",6:"#7c3aed",7:"#6d28d9",8:"#5b21b6",9:"#4c1d95",50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065",DEFAULT:"#a78bfa"},indigo:{1:"#e0e7ff",2:"#c7d2fe",3:"#a5b4fc",4:"#818cf8",5:"#6366f1",6:"#4f46e5",7:"#4338ca",8:"#3730a3",9:"#312e81",50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b",DEFAULT:"#818cf8"},blue:{1:"#dbeafe",2:"#bfdbfe",3:"#93c5fd",4:"#60a5fa",5:"#3b82f6",6:"#2563eb",7:"#1d4ed8",8:"#1e40af",9:"#1e3a8a",50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554",DEFAULT:"#60a5fa"},sky:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},cyan:{1:"#cffafe",2:"#a5f3fc",3:"#67e8f9",4:"#22d3ee",5:"#06b6d4",6:"#0891b2",7:"#0e7490",8:"#155e75",9:"#164e63",50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344",DEFAULT:"#22d3ee"},teal:{1:"#ccfbf1",2:"#99f6e4",3:"#5eead4",4:"#2dd4bf",5:"#14b8a6",6:"#0d9488",7:"#0f766e",8:"#115e59",9:"#134e4a",50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e",DEFAULT:"#2dd4bf"},emerald:{1:"#d1fae5",2:"#a7f3d0",3:"#6ee7b7",4:"#34d399",5:"#10b981",6:"#059669",7:"#047857",8:"#065f46",9:"#064e3b",50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22",DEFAULT:"#34d399"},green:{1:"#dcfce7",2:"#bbf7d0",3:"#86efac",4:"#4ade80",5:"#22c55e",6:"#16a34a",7:"#15803d",8:"#166534",9:"#14532d",50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16",DEFAULT:"#4ade80"},lime:{1:"#ecfccb",2:"#d9f99d",3:"#bef264",4:"#a3e635",5:"#84cc16",6:"#65a30d",7:"#4d7c0f",8:"#3f6212",9:"#365314",50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05",DEFAULT:"#a3e635"},yellow:{1:"#fef9c3",2:"#fef08a",3:"#fde047",4:"#facc15",5:"#eab308",6:"#ca8a04",7:"#a16207",8:"#854d0e",9:"#713f12",50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006",DEFAULT:"#facc15"},amber:{1:"#fef3c7",2:"#fde68a",3:"#fcd34d",4:"#fbbf24",5:"#f59e0b",6:"#d97706",7:"#b45309",8:"#92400e",9:"#78350f",50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03",DEFAULT:"#fbbf24"},orange:{1:"#ffedd5",2:"#fed7aa",3:"#fdba74",4:"#fb923c",5:"#f97316",6:"#ea580c",7:"#c2410c",8:"#9a3412",9:"#7c2d12",50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407",DEFAULT:"#fb923c"},red:{1:"#fee2e2",2:"#fecaca",3:"#fca5a5",4:"#f87171",5:"#ef4444",6:"#dc2626",7:"#b91c1c",8:"#991b1b",9:"#7f1d1d",50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a",DEFAULT:"#f87171"},gray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},slate:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},zinc:{1:"#f4f4f5",2:"#e4e4e7",3:"#d4d4d8",4:"#a1a1aa",5:"#71717a",6:"#52525b",7:"#3f3f46",8:"#27272a",9:"#18181b",50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b",DEFAULT:"#a1a1aa"},neutral:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},stone:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},light:{1:"#fcfcfc",2:"#fafafa",3:"#f8f9fa",4:"#f6f6f6",5:"#f2f2f2",6:"#f1f3f5",7:"#e9ecef",8:"#dee2e6",9:"#dde1e3",50:"#fdfdfd",100:"#fcfcfc",200:"#fafafa",300:"#f8f9fa",400:"#f6f6f6",500:"#f2f2f2",600:"#f1f3f5",700:"#e9ecef",800:"#dee2e6",900:"#dde1e3",950:"#d8dcdf",DEFAULT:"#f6f6f6"},dark:{1:"#3c3c3c",2:"#323232",3:"#2d2d2d",4:"#222222",5:"#1f1f1f",6:"#1c1c1e",7:"#1b1b1b",8:"#181818",9:"#0f0f0f",50:"#4a4a4a",100:"#3c3c3c",200:"#323232",300:"#2d2d2d",400:"#222222",500:"#1f1f1f",600:"#1c1c1e",700:"#1b1b1b",800:"#181818",900:"#0f0f0f",950:"#080808",DEFAULT:"#222222"},lightblue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},lightBlue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},warmgray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},warmGray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},truegray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},trueGray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},coolgray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},coolGray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},bluegray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},blueGray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},primary:"#2080f0","primary-hover":"#4098fc","primary-active":"#1060c9",info:"#909399","info-hover":"#a6a9ad","info-active":"#82848a",success:"#18a058","success-hover":"#36ad6a","success-active":"#0c7a43",warning:"#f0a020","warning-hover":"#fcb040","warning-active":"#c97c10",error:"#d03050","error-hover":"#de576d","error-active":"#ab1f3f"},x={sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},F={common:{fontFamily:x.sans,fontFamilyMono:x.mono,primaryColor:i.primary,primaryColorHover:i["primary-hover"],primaryColorPressed:i["primary-active"],primaryColorSuppl:i.primary,infoColor:i.info,infoColorHover:i["info-hover"],infoColorPressed:i["info-active"],infoColorSuppl:i.info,successColor:i.success,successColorHover:i["success-hover"],successColorPressed:i["success-active"],successColorSuppl:i.success,warningColor:i.warning,warningColorHover:i["warning-hover"],warningColorPressed:i["warning-active"],warningColorSuppl:i.warning,errorColor:i.error,errorColorHover:i["error-hover"],errorColorPressed:i["error-active"],errorColorSuppl:i.error}};L({},F,{}),L({},F,{Button:{textColorPrimary:"#FFF",textColorHoverPrimary:"#FFF",textColorPressedPrimary:"#FFF",textColorFocusPrimary:"#FFF",textColorDisabledPrimary:"#FFF"}});const V="2.0.11";function G(e,a){let t,n,r;const o=f.ref(!0),u=()=>{o.value=!0,r()};f.watch(e,u,{flush:"sync"});const c=typeof a=="function"?a:a.get,p=typeof a=="function"?void 0:a.set,b=f.customRef((d,s)=>(n=d,r=s,{get(){return o.value&&(t=c(),o.value=!1),n(),t},set(l){p==null||p(l)}}));return Object.isExtensible(b)&&(b.trigger=u),b}function q(e){return f.getCurrentScope()?(f.onScopeDispose(e),!0):!1}function E(e){return typeof e=="function"?e():f.unref(e)}function H(e){if(!f.isRef(e))return f.reactive(e);const a=new Proxy({},{get(t,n,r){return f.unref(Reflect.get(e.value,n,r))},set(t,n,r){return f.isRef(e.value[n])&&!f.isRef(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return f.reactive(a)}function j(e){return H(f.computed(e))}function W(e,...a){const t=a.flat(),n=t[0];return j(()=>Object.fromEntries(typeof n=="function"?Object.entries(f.toRefs(e)).filter(([r,o])=>!n(E(o),r)):Object.entries(f.toRefs(e)).filter(r=>!t.includes(r[0]))))}const $=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const K=e=>e!=null;function J(e,a,t){return f.watch(e,a,{...t,deep:!0})}function Q(e){var a;const t=E(e);return(a=t==null?void 0:t.$el)!=null?a:t}const X=$?window:void 0;function Y(){const e=f.ref(!1),a=f.getCurrentInstance();return a&&f.onMounted(()=>{e.value=!0},a),e}function Z(e){const a=Y();return f.computed(()=>(a.value,!!e()))}function ee(e,a,t={}){const{window:n=X,...r}=t;let o;const u=Z(()=>n&&"MutationObserver"in n),c=()=>{o&&(o.disconnect(),o=void 0)},p=f.computed(()=>{const l=E(e),y=(Array.isArray(l)?l:[l]).map(Q).filter(K);return new Set(y)}),b=f.watch(()=>p.value,l=>{c(),u.value&&l.size&&(o=new MutationObserver(a),l.forEach(y=>o.observe(y,r)))},{immediate:!0,flush:"post"}),d=()=>o==null?void 0:o.takeRecords(),s=()=>{c(),b()};return q(s),{isSupported:u,stop:s,takeRecords:d}}function T(e){const a=f.getCurrentInstance(),t=G(()=>null,()=>a.proxy.$el);return f.onUpdated(t.trigger),f.onMounted(t.trigger),t}function fe(e=z()){const a=T(),t=`style[cssr-id^="${e}-"]`;return f.onMounted(()=>{function n(){const r=a.value.parentNode;r.querySelectorAll(t).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(t)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}ee(document.head,n,{childList:!0}),n()}),e}function ae(){const e=T();return f.onMounted(()=>{var r;const a=e.value.parentNode,{tailwindResetStyle:t,elementPlusStyle:n}=((r=globalThis.SmartCore)==null?void 0:r[V])??{};if(t&&(a.appendChild(document.createElement("style")).textContent=t),n){const o=document.createElement("style");o.setAttribute("namespace","smart"),a.appendChild(o).textContent=n,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=n)}}),{classPrefix:fe()}}const te=((e,a)=>{const t=e.__vccOpts||e;for(const[n,r]of a)t[n]=r;return t})(f.defineComponent({__name:"index",props:f.mergeModels({beforeUpload:{type:Function},accept:{type:null},defaultFileList:{type:null},defaultUpload:{type:null},disabled:{type:null},directory:{type:null},directoryDnd:{type:null},fileListClass:{type:null},fileListStyle:{type:null},imageGroupProps:{type:null},inputProps:{type:null},listType:{type:null},max:{type:null},multiple:{type:null},renderIcon:{type:null},shouldUseThumbnailUrl:{type:null},showCancelButton:{type:null},showDownloadButton:{type:null},showRemoveButton:{type:null},showRetryButton:{type:null},showFileList:{type:null},showPreviewButton:{type:null},showTrigger:{type:null},triggerClass:{type:null},triggerStyle:{type:null},onError:{type:null},onFinish:{type:null}},{fileList:{default:()=>[]},fileListModifiers:{}}),emits:["update:fileList"],setup(e,{expose:a}){const t=e,n=f.useModel(e,"fileList"),r=f.ref(),{classPrefix:o}=ae(),u=W(t,["beforeUpload"]),c=f.ref(n.value.map(({fileName:d})=>({id:d,name:d,url:d,status:"finished"})));function p({file:d,onFinish:s,onError:l,onProgress:y}){const S=d.file,oe=t.beforeUpload??(h=>h),N=new FormData;N.set("file",S);const ce=oe({method:"post",url:"/admin/sys-file/upload",data:N,headers:{"Content-Type":"multipart/form-data"},onUploadProgress({loaded:h,total:m}){y({percent:m?Math.ceil(h/m*100):0})}});R.getConfigProvider("request")(ce).then(h=>{const m=h.data.data;d.url=m.url,d.status="finished",t.defaultUpload||c.value.splice(c.value.findIndex(({id:v})=>v===d.id),1,d),n.value.find(({fileName:v})=>v===m.url)||n.value.push({fileName:m.url,originalFileName:S.name}),s()}).catch(h=>{d.status="error",t.defaultUpload||c.value.splice(c.value.findIndex(({id:m})=>m===d.id),1,d),l(),console.error(h)})}function b(){setTimeout(()=>{for(let d=0;d<n.value.length;){const s=n.value[d].fileName;c.value.some(l=>l.url===s)?d++:n.value.splice(d,1)}},10)}return J(n,d=>{d.forEach(({fileName:s})=>{c.value.some(l=>l.url===s)||c.value.push({id:s,name:s,url:s,status:"finished"})});for(let s=0;s<c.value.length;){const l=c.value[s];l.status==="finished"&&l.url&&!d.some(({fileName:y})=>y===l.url)?c.value.splice(s,1):s++}}),a({uploadRef:r,fileList:c}),(d,s)=>(f.openBlock(),f.createBlock(f.unref(g.NConfigProvider),{"cls-prefix":f.unref(o),"theme-overrides":f.unref(F),locale:f.unref(g.zhCN),abstract:""},{default:f.withCtx(()=>[f.createVNode(f.unref(g.NUpload),f.mergeProps({ref_key:"uploadRef",ref:r},f.unref(u),{"file-list":f.unref(c),"onUpdate:fileList":s[0]||(s[0]=l=>f.isRef(c)?c.value=l:null),"custom-request":p,onRemove:b}),{default:f.withCtx(()=>[f.renderSlot(d.$slots,"default",{},()=>[[void 0,"image"].includes(d.listType)?(f.openBlock(),f.createBlock(f.unref(g.NButton),{key:0},{default:f.withCtx(()=>[f.createTextVNode("选择文件")]),_:1})):f.createCommentVNode("v-if",!0)],!0)]),_:3},16,["file-list"])]),_:3},8,["cls-prefix","theme-overrides","locale"]))}}),[["styles",["[data-v-da18f512],[data-v-da18f512]:before,[data-v-da18f512]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-da18f512]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-da18f512"]]),ne="smart-upload";function re(e,a){var t;I&&!customElements.get(e)&&customElements.define(e,(t=a.prototype)!=null&&t.connectedCallback?a:f.defineCustomElement(a))}function k(e,a){return e._instance.exposed[a]}const D=f.defineCustomElement(te);Object.assign(D.prototype,{getUploadRef(){return k(this,"uploadRef").value},getFileList(){return k(this,"fileList").value},submit(){return this.getUploadRef().submit()},clear(){return this.getUploadRef().clear()}}),re(ne,D)})((P=SmartCore["2.0.11"])==null?void 0:P.Vue,(M=SmartCore["2.0.11"])==null?void 0:M.NaiveUI,(_=SmartCore["2.0.11"])==null?void 0:_.SmartCore);
|