@smartos-lib/components 1.9.0-beta.4 → 1.9.0
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
|
`);gt.forEach((jr,Es)=>{jr&&D.insertText(t,jr),Es!==gt.length-1&&D.insertSoftBreak(t)})},{at:V});if(b.equals(V.anchor.path,V.focus.path)){var[Le,ke]=_.edges(V),Ne={start:Le.offset,end:ke.offset,text:me};if(me&&l&&$==="insertCompositionText"){var mt=l.start+l.text.search(/\S|$/),Nr=Ne.start+Ne.text.search(/\S|$/);Nr===mt+1&&Ne.end===l.start+l.text.length?(Ne.start-=1,l=null,O()):l=!1}else $==="insertText"?l===null?l=Ne:l&&_.isCollapsed(V)&&l.end+l.text.length===Le.offset?l=ws(ws({},l),{},{text:l.text+me}):l=!1:l=!1;if(Y){w(Le.path,Ne);return}}return h(()=>D.insertText(t,me),{at:V})}}}},C=()=>!!ur.get(t),E=()=>{var k;return!!((k=ht.get(t))!==null&&k!==void 0&&k.length)},B=()=>C()||E(),F=()=>o,A=k=>{ar.set(t,k),a&&(clearTimeout(a),a=null);var{selection:W}=t;if(k){var $=!W||!b.equals(W.anchor.path,k.anchor.path),V=!W||!b.equals(W.anchor.path.slice(0,-1),k.anchor.path.slice(0,-1));($&&l||V)&&(l=!1),($||E())&&(a=setTimeout(p,uO))}},S=()=>{(C()||!E())&&p()},P=k=>{E()||(f(!0),setTimeout(f))},O=()=>{C()||(i=setTimeout(p))},H=k=>{if(!(E()||C())&&k.some($=>td(t,$,k))){var W;(W=my.get(t))===null||W===void 0||W()}};return{flush:p,scheduleFlush:O,hasPendingDiffs:E,hasPendingAction:C,hasPendingChanges:B,isFlushing:F,handleUserSelect:A,handleCompositionEnd:y,handleCompositionStart:m,handleDOMBeforeInput:g,handleKeyDown:P,handleDomMutations:H,handleInput:S}}function lO(){var e=L.useRef(!1);return L.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var na=gs?L.useLayoutEffect:L.useEffect;function cO(e,t,n){var[r]=L.useState(()=>new MutationObserver(t));na(()=>{r.takeRecords()}),L.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 fO=["node"];function Fy(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 dO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fy(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var pO={subtree:!0,childList:!0,characterData:!0},vO=at?e=>{var{node:t}=e,n=_o(e,fO);if(!at)return null;var r=nr(),o=lO(),[u]=L.useState(()=>sO(dO({editor:r},n)));return cO(t,u.handleDomMutations,pO),Zf.set(r,u.scheduleFlush),o&&u.flush(),u}:()=>null,hO=["anchor","focus"],mO=["anchor","focus"],gO=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>t.hasOwnProperty(n)&&e[n]===t[n]),xy=(e,t)=>{var n=_o(e,hO),r=_o(t,mO);return e[Po]===t[Po]&&gO(n,r)},yO=(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)||!xy(r,o))return!1}return!0},DO=(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||!xy(r,o))return!1}return!0};function Sy(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 CO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sy(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var wO=e=>{var{isLast:t,leaf:n,parent:r,text:o}=e,u=nr(),a=T.findPath(u,o),i=b.parent(a),s=!!n[gy];return u.isVoid(r)?re.createElement(od,{length:q.string(r).length}):n.text===""&&r.children[r.children.length-1]===o&&!u.isInline(r)&&D.string(u,i)===""?re.createElement(od,{isLineBreak:!0,isMarkPlaceholder:s}):n.text===""?re.createElement(od,{isMarkPlaceholder:s}):t&&n.text.slice(-1)===`
|
59
59
|
`?re.createElement(Oy,{isTrailing:!0,text:n.text}):re.createElement(Oy,{text:n.text})},Oy=e=>{var{text:t,isTrailing:n=!1}=e,r=L.useRef(null),o=()=>"".concat(t??"").concat(n?`
|
60
60
|
`:""),[u]=L.useState(o);return na(()=>{var a=o();r.current&&r.current.textContent!==a&&(r.current.textContent=a)}),re.createElement(EO,{ref:r},u)},EO=L.memo(L.forwardRef((e,t)=>re.createElement("span",{"data-slate-string":!0,ref:t},e.children))),od=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",CO({},o),!at||!n?"\uFEFF":null,n?re.createElement("br",null):null)};function _y(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 ky(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_y(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_y(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var BO=at?300:0;function AO(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function Py(e){e.current&&(clearTimeout(e.current),e.current=null)}var bO=e=>{var{leaf:t,isLast:n,text:r,parent:o,renderPlaceholder:u,renderLeaf:a=g=>re.createElement(xO,ky({},g))}=e,i=nr(),s=L.useRef(null),l=L.useRef(null),[c,d]=L.useState(!1),p=L.useRef(null),y=L.useCallback(g=>{if(AO(s,g==null),g==null){var C;Yf.delete(i),(C=t.onPlaceholderResize)===null||C===void 0||C.call(t,null)}else{if(Yf.set(i,g),!s.current){var E=window.ResizeObserver||SS;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(wO,{isLast:n,leaf:t,parent:o,text:r}),f=!!t[Po];if(L.useEffect(()=>(f?p.current||(p.current=setTimeout(()=>{d(!0),p.current=null},BO)):(Py(p),d(!1)),()=>Py(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:Ju?"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})},FO=re.memo(bO,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&J.equals(t.leaf,e.leaf)&&t.leaf[Po]===e.leaf[Po]),xO=e=>{var{attributes:t,children:n}=e;return re.createElement("span",ky({},t),n)},SO=e=>{for(var{decorations:t,isLast:n,parent:r,renderPlaceholder:o,renderLeaf:u,text:a}=e,i=nr(),s=L.useRef(null),l=J.decorations(a,t),c=T.findKey(i,a),d=[],p=0;p<l.length;p++){var y=l[p];d.push(re.createElement(FO,{isLast:n&&p===l.length-1,key:"".concat(c.id,"-").concat(p),renderPlaceholder:o,leaf:y,text:a,parent:r,renderLeaf:u}))}var m=L.useCallback(f=>{var w=Cs.get(i);f?(w==null||w.set(c,f),Tr.set(a,f),ea.set(f,a)):(w==null||w.delete(c),Tr.delete(a),s.current&&ea.delete(s.current)),s.current=f},[s,i,c,a]);return re.createElement("span",{"data-slate-node":"text",ref:m},d)},Ty=re.memo(SO,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&DO(t.decorations,e.decorations));function Ry(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 ud(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ry(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ry(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var OO=e=>{var{decorations:t,element:n,renderElement:r=g=>re.createElement(kO,ud({},g)),renderPlaceholder:o,renderLeaf:u,selection:a}=e,i=nr(),s=RO(),l=i.isInline(n),c=T.findKey(i,n),d=L.useCallback(g=>{var C=Cs.get(i);g?(C==null||C.set(c,g),Tr.set(n,g),ea.set(g,n)):(C==null||C.delete(c),Tr.delete(n))},[i,c,n]),p=jy({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=T0(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(Ty,{renderPlaceholder:o,decorations:[],isLast:!1,parent:n,text:h})),qf.set(h,0),Qf.set(h,n)}return r({attributes:y,children:p,element:n})},_O=re.memo(OO,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&yO(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&_.equals(e.selection,t.selection))),kO=e=>{var{attributes:t,children:n,element:r}=e,o=nr(),u=o.isInline(r)?"span":"div";return re.createElement(u,ud(ud({},t),{},{style:{position:"relative"}}),n)},Ny=L.createContext(()=>[]),PO=()=>L.useContext(Ny),TO=L.createContext(!1),jy=e=>{for(var{decorations:t,node:n,renderElement:r,renderPlaceholder:o,renderLeaf:u,selection:a}=e,i=PO(),s=nr(),l=T.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=T.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(TO.Provider,{key:"provider-".concat(f.id),value:!!h},re.createElement(_O,{decorations:g,element:m,key:f.id,renderElement:r,renderPlaceholder:o,renderLeaf:u,selection:h}))):c.push(re.createElement(Ty,{decorations:g,key:f.id,isLast:d&&p===n.children.length-1,parent:n,renderPlaceholder:o,renderLeaf:u,text:m})),qf.set(m,p),Qf.set(m,n)}return c},Iy=L.createContext(!1),RO=()=>L.useContext(Iy),My=L.createContext(null),NO=()=>{var e=L.useContext(My);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function jO(){var e=nr(),t=L.useRef(!1),n=L.useRef(0),r=L.useCallback(()=>{if(!t.current){t.current=!0;var o=T.getWindow(e);o.cancelAnimationFrame(n.current),n.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return L.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:t,onUserInput:r}}var IO=3,MO={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"},$O={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"},LO={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Be=e=>{var t=MO[e],n=$O[e],r=LO[e],o=t&&Hf(t),u=n&&Hf(n),a=r&&Hf(r);return i=>!!(o&&o(i)||py&&u&&u(i)||!py&&a&&a(i))},Se={isBold:Be("bold"),isCompose:Be("compose"),isMoveBackward:Be("moveBackward"),isMoveForward:Be("moveForward"),isDeleteBackward:Be("deleteBackward"),isDeleteForward:Be("deleteForward"),isDeleteLineBackward:Be("deleteLineBackward"),isDeleteLineForward:Be("deleteLineForward"),isDeleteWordBackward:Be("deleteWordBackward"),isDeleteWordForward:Be("deleteWordForward"),isExtendBackward:Be("extendBackward"),isExtendForward:Be("extendForward"),isExtendLineBackward:Be("extendLineBackward"),isExtendLineForward:Be("extendLineForward"),isItalic:Be("italic"),isMoveLineBackward:Be("moveLineBackward"),isMoveLineForward:Be("moveLineForward"),isMoveWordBackward:Be("moveWordBackward"),isMoveWordForward:Be("moveWordForward"),isRedo:Be("redo"),isSoftBreak:Be("insertSoftBreak"),isSplitBlock:Be("splitBlock"),isTransposeCharacter:Be("transposeCharacter"),isUndo:Be("undo")},zO=(e,t)=>{var n=[],r=()=>{n=[]},o=a=>{if(t.current){var i=a.filter(s=>td(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}},VO={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class $y extends L.Component{constructor(){super(...arguments),$t(this,"context",null),$t(this,"manager",null),$t(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,VO)}componentDidMount(){var{receivedUserInput:t}=this.props,n=this.context;this.manager=zO(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}}$t($y,"contextType",Kf);var WO=at?$y:e=>{var{children:t}=e;return re.createElement(re.Fragment,null,t)},UO=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],HO=["text"];function Ly(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 ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ly(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ly(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var KO=e=>re.createElement(re.Fragment,null,jy(e)),qO=e=>{var t=L.useCallback(x=>re.createElement(QO,ln({},x)),[]),{autoFocus:n,decorate:r=YO,onDOMBeforeInput:o,placeholder:u,readOnly:a=!1,renderElement:i,renderLeaf:s,renderPlaceholder:l=t,scrollSelectionIntoView:c=GO,style:d={},as:p="div",disableDefaultStyles:y=!1}=e,m=_o(e,UO),f=NO(),[w,h]=L.useState(!1),g=L.useRef(null),C=L.useRef([]),[E,B]=L.useState(),{onUserInput:F,receivedUserInput:A}=jO(),[,S]=L.useReducer(x=>x+1,0);my.set(f,S),Gf.set(f,a);var P=L.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);L.useEffect(()=>{g.current&&n&&g.current.focus()},[n]);var O=L.useRef(),H=L.useMemo(()=>oS(()=>{var x=O.current;if((at||!T.isComposing(f))&&(!P.isUpdatingSelection||x!=null&&x.isFlushing())&&!P.isDraggingInternally){var j=T.findDocumentOrShadowRoot(f),{activeElement:N}=j,Q=T.toDOMNode(f,f),oe=j.getSelection();if(N===Q?(P.latestElement=N,or.set(f,!0)):or.delete(f),!oe)return I.deselect(f);var{anchorNode:ee,focusNode:ie}=oe,ce=T.hasEditableTarget(f,ee)||T.isTargetInsideNonReadonlyVoid(f,ee),de=T.hasEditableTarget(f,ie)||T.isTargetInsideNonReadonlyVoid(f,ie);if(ce&&de){var he=T.toSlateRange(f,oe,{exactMatch:!1,suppressThrow:!0});he&&(!T.isComposing(f)&&!(x!=null&&x.hasPendingChanges())&&!(x!=null&&x.isFlushing())?I.select(f,he):x==null||x.handleUserSelect(he))}a&&(!ce||!de)&&I.deselect(f)}},100),[f,a,P]),k=L.useMemo(()=>Zx(H,0),[H]);O.current=vO({node:g,onDOMSelectionChange:H,scheduleOnDOMSelectionChange:k}),na(()=>{var x,j,N;g.current&&(N=Jf(g.current))?(hy.set(f,N),ys.set(f,g.current),Tr.set(f,g.current),ea.set(g.current,f)):Tr.delete(f);var{selection:Q}=f,oe=T.findDocumentOrShadowRoot(f),ee=oe.getSelection();if(!(!ee||!T.isFocused(f)||(x=O.current)!==null&&x!==void 0&&x.hasPendingAction())){var ie=le=>{var Ie=ee.type!=="None";if(!(!Q&&!Ie)){var Re=ee.focusNode,Ae;if(ko&&ee.rangeCount>1){var xt=ee.getRangeAt(0),zt=ee.getRangeAt(ee.rangeCount-1);xt.startContainer===Re?Ae=zt.endContainer:Ae=xt.startContainer}else Ae=ee.anchorNode;var _e=ys.get(f),et=!1;if(_e.contains(Ae)&&_e.contains(Re)&&(et=!0),Ie&&et&&Q&&!le){var me=T.toSlateRange(f,ee,{exactMatch:!0,suppressThrow:!0});if(me&&_.equals(me,Q)){var Le;if(!P.hasMarkPlaceholder||(Le=Ae)!==null&&Le!==void 0&&(Le=Le.parentElement)!==null&&Le!==void 0&&Le.hasAttribute("data-slate-mark-placeholder"))return}}if(Q&&!T.hasRange(f,Q)){f.selection=T.toSlateRange(f,ee,{exactMatch:!1,suppressThrow:!0});return}P.isUpdatingSelection=!0;var ke=Q&&T.toDOMRange(f,Q);return ke?(T.isComposing(f)&&!at?ee.collapseToEnd():_.isBackward(Q)?ee.setBaseAndExtent(ke.endContainer,ke.endOffset,ke.startContainer,ke.startOffset):ee.setBaseAndExtent(ke.startContainer,ke.startOffset,ke.endContainer,ke.endOffset),c(f,ke)):ee.removeAllRanges(),ke}};ee.rangeCount<=1&&ie();var ce=((j=O.current)===null||j===void 0?void 0:j.isFlushing())==="action";if(!at||!ce){setTimeout(()=>{P.isUpdatingSelection=!1});return}var de=null,he=requestAnimationFrame(()=>{if(ce){var le=Ie=>{try{var Re=T.toDOMNode(f,f);Re.focus(),ie(Ie)}catch{}};le(),de=setTimeout(()=>{le(!0),P.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(he),de&&clearTimeout(de)}}});var W=L.useCallback(x=>{if(F(),!a&&T.hasEditableTarget(f,x.target)&&!XO(x,o)){var j;if(O.current)return O.current.handleDOMBeforeInput(x);k.flush(),H.flush();var{selection:N}=f,{inputType:Q}=x,oe=x.dataTransfer||x.data||void 0,ee=Q==="insertCompositionText"||Q==="deleteCompositionText";if(ee&&T.isComposing(f))return;var ie=!1;if(Q==="insertText"&&N&&_.isCollapsed(N)&&x.data&&x.data.length===1&&/[a-z ]/i.test(x.data)&&N.anchor.offset!==0){var ce,de;ie=!0,f.marks&&(ie=!1);var{anchor:he}=N,[le,Ie]=T.toDOMPoint(f,he),Re=(ce=le.parentElement)===null||ce===void 0?void 0:ce.closest("a"),Ae=T.getWindow(f);if(ie&&Re&&T.hasDOMNode(f,Re)){var xt,zt=Ae==null?void 0:Ae.document.createTreeWalker(Re,NodeFilter.SHOW_TEXT).lastChild();zt===le&&((xt=zt.textContent)===null||xt===void 0?void 0:xt.length)===Ie&&(ie=!1)}if(ie&&le.parentElement&&(Ae==null||(de=Ae.getComputedStyle(le.parentElement))===null||de===void 0?void 0:de.whiteSpace)==="pre"){var _e=D.above(f,{at:he.path,match:mt=>X.isElement(mt)&&D.isBlock(f,mt)});_e&&q.string(_e[0]).includes(" ")&&(ie=!1)}}if(!Q.startsWith("delete")||Q.startsWith("deleteBy")){var[et]=x.getTargetRanges();if(et){var me=T.toSlateRange(f,et,{exactMatch:!1,suppressThrow:!1});if(!N||!_.equals(N,me)){ie=!1;var Le=!ee&&f.selection&&D.rangeRef(f,f.selection);I.select(f,me),Le&&ta.set(f,Le)}}}if(ee)return;if(ie||x.preventDefault(),N&&_.isExpanded(N)&&Q.startsWith("delete")){var ke=Q.endsWith("Backward")?"backward":"forward";D.deleteFragment(f,{direction:ke});return}switch(Q){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":{Q==="insertFromComposition"&&T.isComposing(f)&&(h(!1),Rr.set(f,!1)),(oe==null?void 0:oe.constructor.name)==="DataTransfer"?T.insertData(f,oe):typeof oe=="string"&&(ie?C.current.push(()=>D.insertText(f,oe)):D.insertText(f,oe));break}}var Ne=(j=ta.get(f))===null||j===void 0?void 0:j.unref();ta.delete(f),Ne&&(!f.selection||!_.equals(f.selection,Ne))&&I.select(f,Ne)}},[f,H,F,o,a,k]),$=L.useCallback(x=>{x==null?(H.cancel(),k.cancel(),ys.delete(f),Tr.delete(f),g.current&&rr&&g.current.removeEventListener("beforeinput",W)):rr&&x.addEventListener("beforeinput",W),g.current=x},[H,k,f,W]);na(()=>{var x=T.getWindow(f);return x.document.addEventListener("selectionchange",k),()=>{x.document.removeEventListener("selectionchange",k)}},[k]);var V=r([f,[]]),G=u&&f.children.length===1&&Array.from(q.texts(f)).length===1&&q.string(f)===""&&!w,R=L.useCallback(x=>{if(x&&G){var j;B((j=x.getBoundingClientRect())===null||j===void 0?void 0:j.height)}else B(void 0)},[G]);if(G){var M=D.start(f,[]);V.push({[Po]:!0,placeholder:u,onPlaceholderResize:R,anchor:M,focus:M})}var{marks:U}=f;if(P.hasMarkPlaceholder=!1,f.selection&&_.isCollapsed(f.selection)&&U){var{anchor:Y}=f.selection,ne=q.leaf(f,Y.path),te=_o(ne,HO);if(!J.equals(ne,U,{loose:!0})){P.hasMarkPlaceholder=!0;var ve=Object.fromEntries(Object.keys(te).map(x=>[x,null]));V.push(ln(ln(ln({[gy]:!0},ve),U),{},{anchor:Y,focus:Y}))}}return L.useEffect(()=>{setTimeout(()=>{var{selection:x}=f;if(x){var{anchor:j}=x,N=q.leaf(f,j.path);if(U&&!J.equals(N,U,{loose:!0})){Xt.set(f,U);return}}Xt.delete(f)})}),re.createElement(Iy.Provider,{value:a},re.createElement(Ny.Provider,{value:r},re.createElement(WO,{node:g,receivedUserInput:A},re.createElement(p,ln(ln({role:a?void 0:"textbox","aria-multiline":a?void 0:!0},m),{},{spellCheck:rr||!gs?m.spellCheck:!1,autoCorrect:rr||!gs?m.autoCorrect:"false",autoCapitalize:rr||!gs?m.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!a,zindex:-1,suppressContentEditableWarning:!0,ref:$,style:ln(ln({},y?{}:ln({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},E?{minHeight:E}:{})),d),onBeforeInput:L.useCallback(x=>{if(!rr&&!a&&!it(x,m.onBeforeInput)&&T.hasSelectableTarget(f,x.target)&&(x.preventDefault(),!T.isComposing(f))){var j=x.data;D.insertText(f,j)}},[m.onBeforeInput,f,a]),onInput:L.useCallback(x=>{if(!it(x,m.onInput)){if(O.current){O.current.handleInput();return}for(var j of C.current)j();C.current=[]}},[m.onInput]),onBlur:L.useCallback(x=>{if(!(a||P.isUpdatingSelection||!T.hasSelectableTarget(f,x.target)||it(x,m.onBlur))){var j=T.findDocumentOrShadowRoot(f);if(P.latestElement!==j.activeElement){var{relatedTarget:N}=x,Q=T.toDOMNode(f,f);if(N!==Q&&!(Lt(N)&&N.hasAttribute("data-slate-spacer"))){if(N!=null&&ir(N)&&T.hasDOMNode(f,N)){var oe=T.toSlateNode(f,N);if(X.isElement(oe)&&!f.isVoid(oe))return}if(Ju){var ee=j.getSelection();ee==null||ee.removeAllRanges()}or.delete(f)}}}},[a,P.isUpdatingSelection,P.latestElement,f,m.onBlur]),onClick:L.useCallback(x=>{if(T.hasTarget(f,x.target)&&!it(x,m.onClick)&&ir(x.target)){var j=T.toSlateNode(f,x.target),N=T.findPath(f,j);if(!D.hasPath(f,N)||q.get(f,N)!==j)return;if(x.detail===IO&&N.length>=1){var Q=N;if(!(X.isElement(j)&&D.isBlock(f,j))){var oe,ee=D.above(f,{match:Re=>X.isElement(Re)&&D.isBlock(f,Re),at:N});Q=(oe=ee==null?void 0:ee[1])!==null&&oe!==void 0?oe:N.slice(0,1)}var ie=D.range(f,Q);I.select(f,ie);return}if(a)return;var ce=D.start(f,N),de=D.end(f,N),he=D.void(f,{at:ce}),le=D.void(f,{at:de});if(he&&le&&b.equals(he[1],le[1])){var Ie=D.range(f,ce);I.select(f,Ie)}}},[f,m.onClick,a]),onCompositionEnd:L.useCallback(x=>{if(T.hasSelectableTarget(f,x.target)){var j;if(T.isComposing(f)&&Promise.resolve().then(()=>{h(!1),Rr.set(f,!1)}),(j=O.current)===null||j===void 0||j.handleCompositionEnd(x),it(x,m.onCompositionEnd)||at)return;if(!Ju&&!$S&&!NS&&!zS&&!LS&&x.data){var N=Xt.get(f);Xt.delete(f),N!==void 0&&(Sn.set(f,f.marks),f.marks=N),D.insertText(f,x.data);var Q=Sn.get(f);Sn.delete(f),Q!==void 0&&(f.marks=Q)}}},[m.onCompositionEnd,f]),onCompositionUpdate:L.useCallback(x=>{T.hasSelectableTarget(f,x.target)&&!it(x,m.onCompositionUpdate)&&(T.isComposing(f)||(h(!0),Rr.set(f,!0)))},[m.onCompositionUpdate,f]),onCompositionStart:L.useCallback(x=>{if(T.hasSelectableTarget(f,x.target)){var j;if((j=O.current)===null||j===void 0||j.handleCompositionStart(x),it(x,m.onCompositionStart)||at)return;h(!0);var{selection:N}=f;if(N&&_.isExpanded(N)){D.deleteFragment(f);return}}},[m.onCompositionStart,f]),onCopy:L.useCallback(x=>{T.hasSelectableTarget(f,x.target)&&!it(x,m.onCopy)&&!zy(x)&&(x.preventDefault(),T.setFragmentData(f,x.clipboardData,"copy"))},[m.onCopy,f]),onCut:L.useCallback(x=>{if(!a&&T.hasSelectableTarget(f,x.target)&&!it(x,m.onCut)&&!zy(x)){x.preventDefault(),T.setFragmentData(f,x.clipboardData,"cut");var{selection:j}=f;if(j)if(_.isExpanded(j))D.deleteFragment(f);else{var N=q.parent(f,j.anchor.path);D.isVoid(f,N)&&I.delete(f)}}},[a,f,m.onCut]),onDragOver:L.useCallback(x=>{if(T.hasTarget(f,x.target)&&!it(x,m.onDragOver)){var j=T.toSlateNode(f,x.target);X.isElement(j)&&D.isVoid(f,j)&&x.preventDefault()}},[m.onDragOver,f]),onDragStart:L.useCallback(x=>{if(!a&&T.hasTarget(f,x.target)&&!it(x,m.onDragStart)){var j=T.toSlateNode(f,x.target),N=T.findPath(f,j),Q=X.isElement(j)&&D.isVoid(f,j)||D.void(f,{at:N,voids:!0});if(Q){var oe=D.range(f,N);I.select(f,oe)}P.isDraggingInternally=!0,T.setFragmentData(f,x.dataTransfer,"drag")}},[a,f,m.onDragStart,P]),onDrop:L.useCallback(x=>{if(!a&&T.hasTarget(f,x.target)&&!it(x,m.onDrop)){x.preventDefault();var j=f.selection,N=T.findEventRange(f,x),Q=x.dataTransfer;I.select(f,N),P.isDraggingInternally&&j&&!_.equals(j,N)&&!D.void(f,{at:N,voids:!0})&&I.delete(f,{at:j}),T.insertData(f,Q),T.isFocused(f)||T.focus(f)}P.isDraggingInternally=!1},[a,f,m.onDrop,P]),onDragEnd:L.useCallback(x=>{!a&&P.isDraggingInternally&&m.onDragEnd&&T.hasTarget(f,x.target)&&m.onDragEnd(x),P.isDraggingInternally=!1},[a,P,m,f]),onFocus:L.useCallback(x=>{if(!a&&!P.isUpdatingSelection&&T.hasEditableTarget(f,x.target)&&!it(x,m.onFocus)){var j=T.toDOMNode(f,f),N=T.findDocumentOrShadowRoot(f);if(P.latestElement=N.activeElement,ko&&x.target!==j){j.focus();return}or.set(f,!0)}},[a,P,f,m.onFocus]),onKeyDown:L.useCallback(x=>{if(!a&&T.hasEditableTarget(f,x.target)){var j;(j=O.current)===null||j===void 0||j.handleKeyDown(x);var{nativeEvent:N}=x;if(T.isComposing(f)&&N.isComposing===!1&&(Rr.set(f,!1),h(!1)),it(x,m.onKeyDown)||T.isComposing(f))return;var{selection:Q}=f,oe=f.children[Q!==null?Q.focus.path[0]:0],ee=T0(q.string(oe))==="rtl";if(Se.isRedo(N)){x.preventDefault();var ie=f;typeof ie.redo=="function"&&ie.redo();return}if(Se.isUndo(N)){x.preventDefault();var ce=f;typeof ce.undo=="function"&&ce.undo();return}if(Se.isMoveLineBackward(N)){x.preventDefault(),I.move(f,{unit:"line",reverse:!0});return}if(Se.isMoveLineForward(N)){x.preventDefault(),I.move(f,{unit:"line"});return}if(Se.isExtendLineBackward(N)){x.preventDefault(),I.move(f,{unit:"line",edge:"focus",reverse:!0});return}if(Se.isExtendLineForward(N)){x.preventDefault(),I.move(f,{unit:"line",edge:"focus"});return}if(Se.isMoveBackward(N)){x.preventDefault(),Q&&_.isCollapsed(Q)?I.move(f,{reverse:!ee}):I.collapse(f,{edge:ee?"end":"start"});return}if(Se.isMoveForward(N)){x.preventDefault(),Q&&_.isCollapsed(Q)?I.move(f,{reverse:ee}):I.collapse(f,{edge:ee?"start":"end"});return}if(Se.isMoveWordBackward(N)){x.preventDefault(),Q&&_.isExpanded(Q)&&I.collapse(f,{edge:"focus"}),I.move(f,{unit:"word",reverse:!ee});return}if(Se.isMoveWordForward(N)){x.preventDefault(),Q&&_.isExpanded(Q)&&I.collapse(f,{edge:"focus"}),I.move(f,{unit:"word",reverse:ee});return}if(rr){if((vy||Ju)&&Q&&(Se.isDeleteBackward(N)||Se.isDeleteForward(N))&&_.isCollapsed(Q)){var de=q.parent(f,Q.anchor.path);if(X.isElement(de)&&D.isVoid(f,de)&&(D.isInline(f,de)||D.isBlock(f,de))){x.preventDefault(),D.deleteBackward(f,{unit:"block"});return}}}else{if(Se.isBold(N)||Se.isItalic(N)||Se.isTransposeCharacter(N)){x.preventDefault();return}if(Se.isSoftBreak(N)){x.preventDefault(),D.insertSoftBreak(f);return}if(Se.isSplitBlock(N)){x.preventDefault(),D.insertBreak(f);return}if(Se.isDeleteBackward(N)){x.preventDefault(),Q&&_.isExpanded(Q)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f);return}if(Se.isDeleteForward(N)){x.preventDefault(),Q&&_.isExpanded(Q)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f);return}if(Se.isDeleteLineBackward(N)){x.preventDefault(),Q&&_.isExpanded(Q)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f,{unit:"line"});return}if(Se.isDeleteLineForward(N)){x.preventDefault(),Q&&_.isExpanded(Q)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f,{unit:"line"});return}if(Se.isDeleteWordBackward(N)){x.preventDefault(),Q&&_.isExpanded(Q)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f,{unit:"word"});return}if(Se.isDeleteWordForward(N)){x.preventDefault(),Q&&_.isExpanded(Q)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f,{unit:"word"});return}}}},[a,f,m.onKeyDown]),onPaste:L.useCallback(x=>{!a&&T.hasEditableTarget(f,x.target)&&!it(x,m.onPaste)&&(!rr||US(x.nativeEvent)||Ju)&&(x.preventDefault(),T.insertData(f,x.clipboardData))},[a,f,m.onPaste])}),re.createElement(KO,{decorations:V,node:f,renderElement:i,renderPlaceholder:l,renderLeaf:s,selection:f.selection})))))},QO=e=>{var{attributes:t,children:n}=e;return re.createElement("span",ln({},t),n,at&&re.createElement("br",null))},YO=()=>[],GO=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&_.isCollapsed(e.selection))){var n=t.startContainer.parentElement;n.getBoundingClientRect=t.getBoundingClientRect.bind(t),iS(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},it=(e,t)=>{if(!t)return!1;var n=t(e);return n??(e.isDefaultPrevented()||e.isPropagationStopped())},zy=e=>ir(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),XO=(e,t)=>{if(!t)return!1;var n=t(e);return n??e.defaultPrevented},ZO=L.createContext(!1),JO=L.createContext({});function e3(e){var t=L.useRef([]).current,n=L.useRef({editor:e}).current,r=L.useCallback(u=>{n.editor=u,t.forEach(a=>a(u))},[t,n]),o=L.useMemo(()=>({getSlate:()=>n.editor,addEventListener:u=>(t.push(u),()=>{t.splice(t.indexOf(u),1)})}),[t,n]);return{selectorContext:o,onChange:r}}var t3=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],n3=e=>{var{editor:t,children:n,onChange:r,onSelectionChange:o,onValueChange:u,initialValue:a}=e,i=_o(e,t3),[s,l]=re.useState(()=>{if(!q.isNodeList(a))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(ze.stringify(a)));if(!D.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(ze.stringify(t)));return t.children=a,Object.assign(t,i),{v:0,editor:t}}),{selectorContext:c,onChange:d}=e3(t),p=L.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]);L.useEffect(()=>(Xf.set(t,p),()=>{Xf.set(t,()=>{})}),[t,p]);var[y,m]=L.useState(T.isFocused(t));return L.useEffect(()=>{m(T.isFocused(t))},[t]),na(()=>{var f=()=>m(T.isFocused(t));return dy>=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(JO.Provider,{value:c},re.createElement(My.Provider,{value:s},re.createElement(Kf.Provider,{value:s.editor},re.createElement(ZO.Provider,{value:y},n))))},Vy=(e,t)=>{var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Wy=(e,t,n)=>{var r=T.toDOMRange(e,t).getBoundingClientRect(),o=T.toDOMRange(e,n).getBoundingClientRect();return Vy(r,o)&&Vy(o,r)},r3=(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(Wy(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;)Wy(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 Uy(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 Hy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uy(Object(n),!0).forEach(function(r){$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var o3=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 Cs.set(r,new WeakMap),r.addMark=(l,c)=>{var d,p;(d=Zf.get(r))===null||d===void 0||d(),!Xt.get(r)&&(p=ht.get(r))!==null&&p!==void 0&&p.length&&Xt.set(r,null),Sn.delete(r),i(l,c)},r.removeMark=l=>{var c;!Xt.get(r)&&(c=ht.get(r))!==null&&c!==void 0&&c.length&&Xt.set(r,null),Sn.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=r3(r,p);_.isCollapsed(y)||I.delete(r,{at:y})}}},r.apply=l=>{var c=[],d=[],p=ht.get(r);if(p!=null&&p.length){var y=p.map($=>rO($,l)).filter(Boolean);ht.set(r,y)}var m=ar.get(r);m&&ar.set(r,Ay(r,m,l));var f=ur.get(r);if(f!=null&&f.at){var w=ae.isPoint(f==null?void 0:f.at)?rd(r,f.at,l):Ay(r,f.at,l);ur.set(r,w?Hy(Hy({},f),{},{at:w}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{c.push(...To(r,l.path));break}case"set_selection":{var h;(h=ta.get(r))===null||h===void 0||h.unref(),ta.delete(r);break}case"insert_node":case"remove_node":{c.push(...To(r,b.parent(l.path)));break}case"merge_node":{var g=b.previous(l.path);c.push(...To(r,g));break}case"move_node":{var C=b.common(b.parent(l.path),b.parent(l.newPath));c.push(...To(r,C));var E;b.isBefore(l.path,l.newPath)?(c.push(...To(r,b.parent(l.path))),E=l.newPath):(c.push(...To(r,b.parent(l.newPath))),E=l.path);var B=q.get(t,b.parent(E)),F=T.findKey(r,B),A=D.pathRef(r,b.parent(E));d.push([A,F]);break}}o(l);for(var[S,P]of c){var[O]=D.node(r,S);Ds.set(O,P)}for(var[H,k]of d)if(H.current){var[W]=D.node(r,H.current);Ds.set(W,k)}},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=T.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=T.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 H=O.getAttribute("data-slate-zero-width")==="n";O.textContent=H?`
|
61
|
-
`:""}),yy(h)){var B=h.ownerDocument.createElement("span");B.style.whiteSpace="pre",B.appendChild(h),w.appendChild(B),h=B}var F=r.getFragment(),A=JSON.stringify(F),S=window.btoa(encodeURIComponent(A));h.setAttribute("data-slate-fragment",S),l.setData("application/".concat(n),S);var P=w.ownerDocument.createElement("div");return P.appendChild(w),P.setAttribute("hidden","true"),w.ownerDocument.body.appendChild(P),l.setData("text/html",P.innerHTML),l.setData("text/plain",Cy(P)),w.ownerDocument.body.removeChild(P),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var c=l.getData("application/".concat(n))||YS(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&&I.splitNodes(r,{always:!0}),r.insertText(y),p=!0;return!0}return!1},r.onChange=l=>{var c=dy<18?xo.unstable_batchedUpdates:d=>d();c(()=>{var d=Xf.get(r);d&&d(l),u(l)})},r},To=(e,t)=>{var n=[];for(var[r,o]of D.levels(e,{at:t})){var u=T.findKey(e,r);n.push([o,u])}return n},u3={isHistory(e){return Ue(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Rn.isOperationList(e.redos[0].operations))&&(e.undos.length===0||Rn.isOperationList(e.undos[0].operations))}},ad=new WeakMap,id=new WeakMap,Ro={isHistoryEditor(e){return u3.isHistory(e.history)&&D.isEditor(e)},isMerging(e){return id.get(e)},isSaving(e){return ad.get(e)},redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=Ro.isMerging(e);id.set(e,!1),t(),id.set(e,n)},withoutSaving(e,t){var n=Ro.isSaving(e);ad.set(e,!1),t(),ad.set(e,n)}},a3=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&&I.setSelection(t,u.selectionBefore),Ro.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];Ro.withoutSaving(t,()=>{D.withoutNormalizing(t,()=>{var a=u.operations.map(Rn.inverse).reverse();for(var i of a)t.apply(i);u.selectionBefore&&I.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=Ro.isSaving(t),c=Ro.isMerging(t);if(l==null&&(l=s3(r)),l){if(c==null&&(i==null?c=!1:o.length!==0?c=!0:c=i3(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},i3=(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)),s3=(e,t)=>e.type!=="set_selection";function l3(e){const n=`docx-h${e.element.level}`;return Te.jsx(n,{...e.attributes,children:e.children})}function c3(e){return Te.jsx("docx-blockquote",{...e.attributes,children:e.children})}const{Provider:f3,Consumer:d3}=L.createContext(!1);function p3(e){const t=e.element,n=`docx-${t.ordered?"o":"u"}l`;return Te.jsx(f3,{value:!!t.ordered,children:Te.jsx(n,{...e.attributes,children:e.children})})}function v3(e){return Te.jsx(d3,{children:t=>Te.jsx("docx-li",{className:t?"ordered":"",children:e.children})})}const h3={"#":"heading","##":"heading","###":"heading","####":"heading","#####":"heading","######":"heading",">":"blockquote","*":"list-item","-":"list-item","+":"list-item"},m3=[[/\*\*(.+?)\*\*$/,"bold"],[/\*(.+?)\*$/,"italic"],[/\~\~(.+?)\~\~$/,"del"],[/\~(.+?)\~$/,"underline"]];function g3(e){return e.element.type==="heading"?Te.jsx(l3,{...e}):e.element.type==="blockquote"?Te.jsx(c3,{...e}):e.element.type==="list"?Te.jsx(p3,{...e}):e.element.type==="list-item"?Te.jsx(v3,{...e}):Te.jsx("p",{...e.attributes,children:e.children})}function y3({attributes:e,children:t,leaf:n}){return n.bold&&(t=Te.jsx("strong",{children:t})),n.code&&(t=Te.jsx("code",{children:t})),n.italic&&(t=Te.jsx("em",{children:t})),n.del&&(t=Te.jsx("del",{children:t})),n.underline&&(t=Te.jsx("u",{children:t})),Te.jsx("span",{...e,children:t})}function D3(e){const{initialValue:t=[{type:"paragraph",children:[{text:""}]}],onBeforeInput:n,withOverride:r=c=>c}=e,o=L.useMemo(()=>r(o3(a3(IA()))),[]),u=L.useCallback(c=>Te.jsx(g3,{...c}),[]),a=L.useCallback(c=>Te.jsx(y3,{...c}),[]),i=L.useCallback(n?c=>{queueMicrotask(()=>n(c))}:()=>{},[o]),s=L.useCallback(c=>tE.trigger(c),[o]),l=L.useCallback(c=>Lp.trigger(c),[o]);return Sa.value=o,Te.jsx(n3,{editor:o,initialValue:t,onSelectionChange:s,onValueChange:l,children:Te.jsx(qO,{className:"smart-docx-editor",renderElement:u,renderLeaf:a,onDOMBeforeInput:i})})}const C3=nu(v.defineComponent({__name:"Markdown",props:{initialValue:{type:null}},setup(e){const t=e,n=LF(D3);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)&&ae.equals(l.anchor,D.end(u,d))){if(c.type==="list-item")return I.insertNodes(u,{type:"list-item",children:[{text:""}]},r(u));if(c.type!=="paragraph")return I.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=h3[f];if(w){I.select(u,m),_.isCollapsed(m)||I.delete(u);const h={type:w};w==="heading"?h.level=`${f.length}`:w==="blockquote"&&(h.type="paragraph"),I.setNodes(u,h,r(u)),w==="blockquote"?I.wrapNodes(u,{type:"blockquote",children:[]},r(u)):w==="list-item"&&I.wrapNodes(u,{type:"list",children:[]},r(u));return}else for(const[h,g]of m3){const[C,E]=f.match(h)||[];if(C){const B=D.before(u,c,{unit:"character",distance:C.length}),F=D.range(u,B,c);return I.insertText(u,E,{at:F}),I.setNodes(u,{[g]:!0},{at:F,match:A=>J.isText(A),split:!0}),I.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&&ae.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,I.unwrapNodes(u,{at:m})):f?(h=!0,I.moveNodes(u,{to:m})):w&&(h=!0,I.moveNodes(u,{to:b.next(m)})),h){I.setNodes(u,{type:"paragraph"});return}}else D.isEditor(y)&&y.children.length===1&&I.setNodes(u,{type:"paragraph"})}i(...l)}},u};{const{isValidSelection:u}=Vp();Qe(xa(),"dragstart",a=>{u.value&&a.preventDefault()})}return(u,a)=>(v.openBlock(),v.createBlock(v.unref(n),v.mergeProps(t,{withOverride:o}),null,16))}}),[["styles",["*[data-v-01a5af76],[data-v-01a5af76]:before,[data-v-01a5af76]: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-01a5af76]::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-01a5af76]{display:list-item}"]],["__scopeId","data-v-01a5af76"]]),w3=nu(v.defineComponent({__name:"index",props:{initialValue:{type:null}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createCommentVNode(" Markdown "),v.createVNode(C3,v.normalizeProps(v.guardReactiveProps(t)),null,16),v.createCommentVNode(" 菜单栏 "),v.createVNode(VA)],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"]]),E3=nu(v.defineComponent({__name:"index",props:{initialValue:{type:null}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createBlock(w3,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"]]),B3="1.9.0-beta.4";function A3(e=oE()){const t=xa(),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})}Xw(document.head,r,{childList:!0}),r()}),e}function b3(){const e=xa();return v.onMounted(()=>{var o;const t=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:r}=((o=globalThis.SmartCore)==null?void 0:o[B3])??{};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:A3()}}const F3=nu(v.defineComponent({__name:"App",props:{initialValue:{type:null}},emits:["change"],setup(e,{emit:t}){const n=t;return b3(),Lp.on(r=>{n("change",r)}),v.onMounted(()=>{Oa.value=xa().value.parentNode}),(r,o)=>{const u=YD;return v.openBlock(),v.createBlock(u,{namespace:"smart"},{default:v.withCtx(()=>[v.createVNode(E3,{"initial-value":r.initialValue},null,8,["initial-value"])]),_:1})}}}),[["styles",["*[data-v-6eedc1cf],[data-v-6eedc1cf]:before,[data-v-6eedc1cf]: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-6eedc1cf]::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-6eedc1cf"]]),x3="smart-docx-editor";function S3(e,t){var n;uE&&!customElements.get(e)&&customElements.define(e,(n=t.prototype)!=null&&n.connectedCallback?t:v.defineCustomElement(t))}S3(x3,F3)})((Ky=SmartCore["1.9.0-beta.4"])==null?void 0:Ky.Vue);
|
61
|
+
`:""}),yy(h)){var B=h.ownerDocument.createElement("span");B.style.whiteSpace="pre",B.appendChild(h),w.appendChild(B),h=B}var F=r.getFragment(),A=JSON.stringify(F),S=window.btoa(encodeURIComponent(A));h.setAttribute("data-slate-fragment",S),l.setData("application/".concat(n),S);var P=w.ownerDocument.createElement("div");return P.appendChild(w),P.setAttribute("hidden","true"),w.ownerDocument.body.appendChild(P),l.setData("text/html",P.innerHTML),l.setData("text/plain",Cy(P)),w.ownerDocument.body.removeChild(P),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var c=l.getData("application/".concat(n))||YS(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&&I.splitNodes(r,{always:!0}),r.insertText(y),p=!0;return!0}return!1},r.onChange=l=>{var c=dy<18?xo.unstable_batchedUpdates:d=>d();c(()=>{var d=Xf.get(r);d&&d(l),u(l)})},r},To=(e,t)=>{var n=[];for(var[r,o]of D.levels(e,{at:t})){var u=T.findKey(e,r);n.push([o,u])}return n},u3={isHistory(e){return Ue(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Rn.isOperationList(e.redos[0].operations))&&(e.undos.length===0||Rn.isOperationList(e.undos[0].operations))}},ad=new WeakMap,id=new WeakMap,Ro={isHistoryEditor(e){return u3.isHistory(e.history)&&D.isEditor(e)},isMerging(e){return id.get(e)},isSaving(e){return ad.get(e)},redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=Ro.isMerging(e);id.set(e,!1),t(),id.set(e,n)},withoutSaving(e,t){var n=Ro.isSaving(e);ad.set(e,!1),t(),ad.set(e,n)}},a3=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&&I.setSelection(t,u.selectionBefore),Ro.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];Ro.withoutSaving(t,()=>{D.withoutNormalizing(t,()=>{var a=u.operations.map(Rn.inverse).reverse();for(var i of a)t.apply(i);u.selectionBefore&&I.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=Ro.isSaving(t),c=Ro.isMerging(t);if(l==null&&(l=s3(r)),l){if(c==null&&(i==null?c=!1:o.length!==0?c=!0:c=i3(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},i3=(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)),s3=(e,t)=>e.type!=="set_selection";function l3(e){const n=`docx-h${e.element.level}`;return Te.jsx(n,{...e.attributes,children:e.children})}function c3(e){return Te.jsx("docx-blockquote",{...e.attributes,children:e.children})}const{Provider:f3,Consumer:d3}=L.createContext(!1);function p3(e){const t=e.element,n=`docx-${t.ordered?"o":"u"}l`;return Te.jsx(f3,{value:!!t.ordered,children:Te.jsx(n,{...e.attributes,children:e.children})})}function v3(e){return Te.jsx(d3,{children:t=>Te.jsx("docx-li",{className:t?"ordered":"",children:e.children})})}const h3={"#":"heading","##":"heading","###":"heading","####":"heading","#####":"heading","######":"heading",">":"blockquote","*":"list-item","-":"list-item","+":"list-item"},m3=[[/\*\*(.+?)\*\*$/,"bold"],[/\*(.+?)\*$/,"italic"],[/\~\~(.+?)\~\~$/,"del"],[/\~(.+?)\~$/,"underline"]];function g3(e){return e.element.type==="heading"?Te.jsx(l3,{...e}):e.element.type==="blockquote"?Te.jsx(c3,{...e}):e.element.type==="list"?Te.jsx(p3,{...e}):e.element.type==="list-item"?Te.jsx(v3,{...e}):Te.jsx("p",{...e.attributes,children:e.children})}function y3({attributes:e,children:t,leaf:n}){return n.bold&&(t=Te.jsx("strong",{children:t})),n.code&&(t=Te.jsx("code",{children:t})),n.italic&&(t=Te.jsx("em",{children:t})),n.del&&(t=Te.jsx("del",{children:t})),n.underline&&(t=Te.jsx("u",{children:t})),Te.jsx("span",{...e,children:t})}function D3(e){const{initialValue:t=[{type:"paragraph",children:[{text:""}]}],onBeforeInput:n,withOverride:r=c=>c}=e,o=L.useMemo(()=>r(o3(a3(IA()))),[]),u=L.useCallback(c=>Te.jsx(g3,{...c}),[]),a=L.useCallback(c=>Te.jsx(y3,{...c}),[]),i=L.useCallback(n?c=>{queueMicrotask(()=>n(c))}:()=>{},[o]),s=L.useCallback(c=>tE.trigger(c),[o]),l=L.useCallback(c=>Lp.trigger(c),[o]);return Sa.value=o,Te.jsx(n3,{editor:o,initialValue:t,onSelectionChange:s,onValueChange:l,children:Te.jsx(qO,{className:"smart-docx-editor",renderElement:u,renderLeaf:a,onDOMBeforeInput:i})})}const C3=nu(v.defineComponent({__name:"Markdown",props:{initialValue:{type:null}},setup(e){const t=e,n=LF(D3);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)&&ae.equals(l.anchor,D.end(u,d))){if(c.type==="list-item")return I.insertNodes(u,{type:"list-item",children:[{text:""}]},r(u));if(c.type!=="paragraph")return I.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=h3[f];if(w){I.select(u,m),_.isCollapsed(m)||I.delete(u);const h={type:w};w==="heading"?h.level=`${f.length}`:w==="blockquote"&&(h.type="paragraph"),I.setNodes(u,h,r(u)),w==="blockquote"?I.wrapNodes(u,{type:"blockquote",children:[]},r(u)):w==="list-item"&&I.wrapNodes(u,{type:"list",children:[]},r(u));return}else for(const[h,g]of m3){const[C,E]=f.match(h)||[];if(C){const B=D.before(u,c,{unit:"character",distance:C.length}),F=D.range(u,B,c);return I.insertText(u,E,{at:F}),I.setNodes(u,{[g]:!0},{at:F,match:A=>J.isText(A),split:!0}),I.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&&ae.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,I.unwrapNodes(u,{at:m})):f?(h=!0,I.moveNodes(u,{to:m})):w&&(h=!0,I.moveNodes(u,{to:b.next(m)})),h){I.setNodes(u,{type:"paragraph"});return}}else D.isEditor(y)&&y.children.length===1&&I.setNodes(u,{type:"paragraph"})}i(...l)}},u};{const{isValidSelection:u}=Vp();Qe(xa(),"dragstart",a=>{u.value&&a.preventDefault()})}return(u,a)=>(v.openBlock(),v.createBlock(v.unref(n),v.mergeProps(t,{withOverride:o}),null,16))}}),[["styles",["*[data-v-01a5af76],[data-v-01a5af76]:before,[data-v-01a5af76]: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-01a5af76]::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-01a5af76]{display:list-item}"]],["__scopeId","data-v-01a5af76"]]),w3=nu(v.defineComponent({__name:"index",props:{initialValue:{type:null}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createCommentVNode(" Markdown "),v.createVNode(C3,v.normalizeProps(v.guardReactiveProps(t)),null,16),v.createCommentVNode(" 菜单栏 "),v.createVNode(VA)],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"]]),E3=nu(v.defineComponent({__name:"index",props:{initialValue:{type:null}},setup(e){const t=e;return(n,r)=>(v.openBlock(),v.createBlock(w3,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"]]),B3="1.9.0";function A3(e=oE()){const t=xa(),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})}Xw(document.head,r,{childList:!0}),r()}),e}function b3(){const e=xa();return v.onMounted(()=>{var o;const t=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:r}=((o=globalThis.SmartCore)==null?void 0:o[B3])??{};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:A3()}}const F3=nu(v.defineComponent({__name:"App",props:{initialValue:{type:null}},emits:["change"],setup(e,{emit:t}){const n=t;return b3(),Lp.on(r=>{n("change",r)}),v.onMounted(()=>{Oa.value=xa().value.parentNode}),(r,o)=>{const u=YD;return v.openBlock(),v.createBlock(u,{namespace:"smart"},{default:v.withCtx(()=>[v.createVNode(E3,{"initial-value":r.initialValue},null,8,["initial-value"])]),_:1})}}}),[["styles",["*[data-v-6eedc1cf],[data-v-6eedc1cf]:before,[data-v-6eedc1cf]: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-6eedc1cf]::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-6eedc1cf"]]),x3="smart-docx-editor";function S3(e,t){var n;uE&&!customElements.get(e)&&customElements.define(e,(n=t.prototype)!=null&&n.connectedCallback?t:v.defineCustomElement(t))}S3(x3,F3)})((Ky=SmartCore["1.9.0"])==null?void 0:Ky.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"]]),la=["src"],ca=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,la))}}),[["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"]]),ua=Se(a.defineComponent({__name:"Video",props:{file:{type:null}},setup(t){const e=t,n=a.ref(),i=ft(()=>e.file);return je(i,()=>{const{playing:r}=po(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 fa(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 da="1.9.0-beta.4";function ha(t=vo()){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})}dn(document.head,i,{childList:!0}),i()}),t}function pa(){const t=lt();return a.onMounted(()=>{var r;const e=t.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:i}=((r=globalThis.SmartCore)==null?void 0:r[da])??{};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:ha()}}const ga={"size-full":"",relative:""},ma=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(()=>Ki[o.value]),l={image:sa,pdf:ca,video:ua},u=(f,d)=>{const{name:c,ext:h}=fa(f);i.value=d,r.value=c,o.value=h};return pa(),a.onMounted(()=>{const f=lt();qt.value=f.value.parentNode}),e({previewFile:u}),(f,d)=>{const c=yi;return a.openBlock(),a.createBlock(c,{namespace:"smart"},{default:a.withCtx(()=>[a.createElementVNode("div",ga,[a.createCommentVNode(" File / Blob 文件打开 "),a.unref(i)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(l[a.unref(s)]||zo),a.mergeProps({key:0,file:a.unref(i),fileName:a.unref(r),fileExt:a.unref(o)},a.unref(n)),null,16,["file","fileName","fileExt"])):a.createCommentVNode("v-if",!0)])]),_:1})}}}),[["styles",['*[data-v-f8443614],[data-v-f8443614]:before,[data-v-f8443614]: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-f8443614]::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-f8443614]{position:relative}.size-full[data-v-f8443614],[size-full=""][data-v-f8443614]{width:100%;height:100%}']],["__scopeId","data-v-f8443614"]]),va="smart-file-preview";function ba(t,e){var n;bo&&!customElements.get(t)&&customElements.define(t,(n=e.prototype)!=null&&n.connectedCallback?e:a.defineCustomElement(e))}function ya(t,e){return t._instance.exposed[e]}const Yn=a.defineCustomElement(ma);Object.assign(Yn.prototype,{previewFile(...t){return ya(this,"previewFile")(...t)}}),ba(va,Yn)})((Kn=SmartCore["1.9.0-beta.4"])==null?void 0:Kn.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"]]),la=["src"],ca=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,la))}}),[["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"]]),ua=Se(a.defineComponent({__name:"Video",props:{file:{type:null}},setup(t){const e=t,n=a.ref(),i=ft(()=>e.file);return je(i,()=>{const{playing:r}=po(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 fa(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 da="1.9.0";function ha(t=vo()){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})}dn(document.head,i,{childList:!0}),i()}),t}function pa(){const t=lt();return a.onMounted(()=>{var r;const e=t.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:i}=((r=globalThis.SmartCore)==null?void 0:r[da])??{};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:ha()}}const ga={"size-full":"",relative:""},ma=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(()=>Ki[o.value]),l={image:sa,pdf:ca,video:ua},u=(f,d)=>{const{name:c,ext:h}=fa(f);i.value=d,r.value=c,o.value=h};return pa(),a.onMounted(()=>{const f=lt();qt.value=f.value.parentNode}),e({previewFile:u}),(f,d)=>{const c=yi;return a.openBlock(),a.createBlock(c,{namespace:"smart"},{default:a.withCtx(()=>[a.createElementVNode("div",ga,[a.createCommentVNode(" File / Blob 文件打开 "),a.unref(i)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(l[a.unref(s)]||zo),a.mergeProps({key:0,file:a.unref(i),fileName:a.unref(r),fileExt:a.unref(o)},a.unref(n)),null,16,["file","fileName","fileExt"])):a.createCommentVNode("v-if",!0)])]),_:1})}}}),[["styles",['*[data-v-f8443614],[data-v-f8443614]:before,[data-v-f8443614]: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-f8443614]::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-f8443614]{position:relative}.size-full[data-v-f8443614],[size-full=""][data-v-f8443614]{width:100%;height:100%}']],["__scopeId","data-v-f8443614"]]),va="smart-file-preview";function ba(t,e){var n;bo&&!customElements.get(t)&&customElements.define(t,(n=e.prototype)!=null&&n.connectedCallback?e:a.defineCustomElement(e))}function ya(t,e){return t._instance.exposed[e]}const Yn=a.defineCustomElement(ma);Object.assign(Yn.prototype,{previewFile(...t){return ya(this,"previewFile")(...t)}}),ba(va,Yn)})((Kn=SmartCore["1.9.0"])==null?void 0:Kn.Vue);
|
@@ -1 +1 @@
|
|
1
|
-
var M,_,R;(function(f,g,O){"use strict";function w(e){return Object.prototype.toString.call(e)==="[object Object]"}function C(e,a){return Math.floor(Math.random()*(a-e+1)+e)}function B(){return String.fromCharCode(C(97,122))}function z(){return String.fromCharCode(C(65,90))}function U(e=12,a={}){const{lowercase:n=!0,uppercase:t=!1,number:r=!1}=a,o=[];let u;if(n&&o.push("l"),t&&o.push("u"),r&&o.push("n"),!(u=o.length))throw new Error("???");let c="";for(;e-- >0;){const p=u>1?C(0,u-1):0,b=o[p];b==="l"?c+=B():b==="u"?c+=z():b==="n"&&(c+=C(0,9))}return c}function I(){return U(1,{uppercase:!0})+U(17,{uppercase:!0,number:!0})}function A(e,a,n){n.set(a,e);for(const[t,r]of Object.entries(a)){let o=!1;if(w(r)||(o=Array.isArray(r))){let u;if(n.has(r))u=n.get(r);else{let c;u=o?Array.isArray(c=e[t])?c:[]:w(c=e[t])?c:{},A(u,r,n)}e[t]=u}else r!==void 0&&(e[t]=r)}}function L(e,...a){if(!w(e)&&!Array.isArray(e)||!a.length)return e;const n=new WeakMap;n.set(e,e);for(let t=0;t<a.length;){const r=a[t];if(w(r)||Array.isArray(r)){n.set(r,e),t++;continue}a.splice(t,1)}for(const t of a)A(e,t,n);return e}const V=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 G="1.9.0-beta.4";function q(e,a){let n,t,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)=>(t=d,r=s,{get(){return o.value&&(n=c(),o.value=!1),t(),n},set(l){p==null||p(l)}}));return Object.isExtensible(b)&&(b.trigger=u),b}function H(e){return f.getCurrentScope()?(f.onScopeDispose(e),!0):!1}function E(e){return typeof e=="function"?e():f.unref(e)}function j(e){if(!f.isRef(e))return f.reactive(e);const a=new Proxy({},{get(n,t,r){return f.unref(Reflect.get(e.value,t,r))},set(n,t,r){return f.isRef(e.value[t])&&!f.isRef(r)?e.value[t].value=r:e.value[t]=r,!0},deleteProperty(n,t){return Reflect.deleteProperty(e.value,t)},has(n,t){return Reflect.has(e.value,t)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return f.reactive(a)}function W(e){return j(f.computed(e))}function $(e,...a){const n=a.flat(),t=n[0];return W(()=>Object.fromEntries(typeof t=="function"?Object.entries(f.toRefs(e)).filter(([r,o])=>!t(E(o),r)):Object.entries(f.toRefs(e)).filter(r=>!n.includes(r[0]))))}const K=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const J=e=>e!=null;function Q(e,a,n){return f.watch(e,a,{...n,deep:!0})}function T(e){var a;const n=E(e);return(a=n==null?void 0:n.$el)!=null?a:n}const X=K?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,n={}){const{window:t=X,...r}=n;let o;const u=Z(()=>t&&"MutationObserver"in t),c=()=>{o&&(o.disconnect(),o=void 0)},p=f.computed(()=>{const l=E(e),y=(Array.isArray(l)?l:[l]).map(T).filter(J);return new Set(y)}),b=f.watch(()=>p.value,l=>{c(),u.value&&t&&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 H(s),{isSupported:u,stop:s,takeRecords:d}}function k(e){const a=f.getCurrentInstance(),n=q(()=>null,()=>e?T(e):a.proxy.$el);return f.onUpdated(n.trigger),f.onMounted(n.trigger),n}function fe(e=I()){const a=k(),n=`style[cssr-id^="${e}-"]`;return f.onMounted(()=>{function t(){const r=a.value.parentNode;r.querySelectorAll(n).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(n)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}ee(document.head,t,{childList:!0}),t()}),e}function ae(){const e=k();return f.onMounted(()=>{var r;const a=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:t}=((r=globalThis.SmartCore)==null?void 0:r[G])??{};if(n&&(a.appendChild(document.createElement("style")).textContent=n),t){const o=document.createElement("style");o.setAttribute("namespace","smart"),a.appendChild(o).textContent=t,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=t)}}),{classPrefix:fe()}}const te=((e,a)=>{const n=e.__vccOpts||e;for(const[t,r]of a)n[t]=r;return n})(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 n=e,t=f.useModel(e,"fileList"),r=f.ref(),{classPrefix:o}=ae(),u=$(n,["beforeUpload"]),c=f.ref(t.value.map(({fileName:d})=>({id:d,name:d,url:d,status:"finished"})));function p({file:d,onFinish:s,onError:l,onProgress:y}){const N=d.file,oe=n.beforeUpload??(h=>h),P=new FormData;P.set("file",N);const ce=oe({method:"post",url:"/admin/sys-file/upload",data:P,headers:{"Content-Type":"multipart/form-data"},onUploadProgress({loaded:h,total:m}){y({percent:m?Math.ceil(h/m*100):0})}});O.getConfigProvider("request")(ce).then(h=>{const m=h.data.data;d.url=m.url,d.status="finished",n.defaultUpload||c.value.splice(c.value.findIndex(({id:v})=>v===d.id),1,d),t.value.find(({fileName:v})=>v===m.url)||t.value.push({fileName:m.url,originalFileName:N.name}),s()}).catch(h=>{d.status="error",n.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<t.value.length;){const s=t.value[d].fileName;c.value.some(l=>l.url===s)?d++:t.value.splice(d,1)}},10)}return Q(t,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 n;V&&!customElements.get(e)&&customElements.define(e,(n=a.prototype)!=null&&n.connectedCallback?a:f.defineCustomElement(a))}function D(e,a){return e._instance.exposed[a]}const S=f.defineCustomElement(te);Object.assign(S.prototype,{getUploadRef(){return D(this,"uploadRef").value},getFileList(){return D(this,"fileList").value},submit(){return this.getUploadRef().submit()},clear(){return this.getUploadRef().clear()}}),re(ne,S)})((M=SmartCore["1.9.0-beta.4"])==null?void 0:M.Vue,(_=SmartCore["1.9.0-beta.4"])==null?void 0:_.NaiveUI,(R=SmartCore["1.9.0-beta.4"])==null?void 0:R.SmartCore);
|
1
|
+
var M,_,R;(function(f,g,O){"use strict";function w(e){return Object.prototype.toString.call(e)==="[object Object]"}function C(e,a){return Math.floor(Math.random()*(a-e+1)+e)}function B(){return String.fromCharCode(C(97,122))}function z(){return String.fromCharCode(C(65,90))}function U(e=12,a={}){const{lowercase:n=!0,uppercase:t=!1,number:r=!1}=a,o=[];let u;if(n&&o.push("l"),t&&o.push("u"),r&&o.push("n"),!(u=o.length))throw new Error("???");let c="";for(;e-- >0;){const p=u>1?C(0,u-1):0,b=o[p];b==="l"?c+=B():b==="u"?c+=z():b==="n"&&(c+=C(0,9))}return c}function I(){return U(1,{uppercase:!0})+U(17,{uppercase:!0,number:!0})}function A(e,a,n){n.set(a,e);for(const[t,r]of Object.entries(a)){let o=!1;if(w(r)||(o=Array.isArray(r))){let u;if(n.has(r))u=n.get(r);else{let c;u=o?Array.isArray(c=e[t])?c:[]:w(c=e[t])?c:{},A(u,r,n)}e[t]=u}else r!==void 0&&(e[t]=r)}}function L(e,...a){if(!w(e)&&!Array.isArray(e)||!a.length)return e;const n=new WeakMap;n.set(e,e);for(let t=0;t<a.length;){const r=a[t];if(w(r)||Array.isArray(r)){n.set(r,e),t++;continue}a.splice(t,1)}for(const t of a)A(e,t,n);return e}const V=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 G="1.9.0";function q(e,a){let n,t,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)=>(t=d,r=s,{get(){return o.value&&(n=c(),o.value=!1),t(),n},set(l){p==null||p(l)}}));return Object.isExtensible(b)&&(b.trigger=u),b}function H(e){return f.getCurrentScope()?(f.onScopeDispose(e),!0):!1}function E(e){return typeof e=="function"?e():f.unref(e)}function j(e){if(!f.isRef(e))return f.reactive(e);const a=new Proxy({},{get(n,t,r){return f.unref(Reflect.get(e.value,t,r))},set(n,t,r){return f.isRef(e.value[t])&&!f.isRef(r)?e.value[t].value=r:e.value[t]=r,!0},deleteProperty(n,t){return Reflect.deleteProperty(e.value,t)},has(n,t){return Reflect.has(e.value,t)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return f.reactive(a)}function W(e){return j(f.computed(e))}function $(e,...a){const n=a.flat(),t=n[0];return W(()=>Object.fromEntries(typeof t=="function"?Object.entries(f.toRefs(e)).filter(([r,o])=>!t(E(o),r)):Object.entries(f.toRefs(e)).filter(r=>!n.includes(r[0]))))}const K=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const J=e=>e!=null;function Q(e,a,n){return f.watch(e,a,{...n,deep:!0})}function T(e){var a;const n=E(e);return(a=n==null?void 0:n.$el)!=null?a:n}const X=K?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,n={}){const{window:t=X,...r}=n;let o;const u=Z(()=>t&&"MutationObserver"in t),c=()=>{o&&(o.disconnect(),o=void 0)},p=f.computed(()=>{const l=E(e),y=(Array.isArray(l)?l:[l]).map(T).filter(J);return new Set(y)}),b=f.watch(()=>p.value,l=>{c(),u.value&&t&&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 H(s),{isSupported:u,stop:s,takeRecords:d}}function k(e){const a=f.getCurrentInstance(),n=q(()=>null,()=>e?T(e):a.proxy.$el);return f.onUpdated(n.trigger),f.onMounted(n.trigger),n}function fe(e=I()){const a=k(),n=`style[cssr-id^="${e}-"]`;return f.onMounted(()=>{function t(){const r=a.value.parentNode;r.querySelectorAll(n).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(n)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}ee(document.head,t,{childList:!0}),t()}),e}function ae(){const e=k();return f.onMounted(()=>{var r;const a=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:t}=((r=globalThis.SmartCore)==null?void 0:r[G])??{};if(n&&(a.appendChild(document.createElement("style")).textContent=n),t){const o=document.createElement("style");o.setAttribute("namespace","smart"),a.appendChild(o).textContent=t,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=t)}}),{classPrefix:fe()}}const te=((e,a)=>{const n=e.__vccOpts||e;for(const[t,r]of a)n[t]=r;return n})(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 n=e,t=f.useModel(e,"fileList"),r=f.ref(),{classPrefix:o}=ae(),u=$(n,["beforeUpload"]),c=f.ref(t.value.map(({fileName:d})=>({id:d,name:d,url:d,status:"finished"})));function p({file:d,onFinish:s,onError:l,onProgress:y}){const N=d.file,oe=n.beforeUpload??(h=>h),P=new FormData;P.set("file",N);const ce=oe({method:"post",url:"/admin/sys-file/upload",data:P,headers:{"Content-Type":"multipart/form-data"},onUploadProgress({loaded:h,total:m}){y({percent:m?Math.ceil(h/m*100):0})}});O.getConfigProvider("request")(ce).then(h=>{const m=h.data.data;d.url=m.url,d.status="finished",n.defaultUpload||c.value.splice(c.value.findIndex(({id:v})=>v===d.id),1,d),t.value.find(({fileName:v})=>v===m.url)||t.value.push({fileName:m.url,originalFileName:N.name}),s()}).catch(h=>{d.status="error",n.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<t.value.length;){const s=t.value[d].fileName;c.value.some(l=>l.url===s)?d++:t.value.splice(d,1)}},10)}return Q(t,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 n;V&&!customElements.get(e)&&customElements.define(e,(n=a.prototype)!=null&&n.connectedCallback?a:f.defineCustomElement(a))}function D(e,a){return e._instance.exposed[a]}const S=f.defineCustomElement(te);Object.assign(S.prototype,{getUploadRef(){return D(this,"uploadRef").value},getFileList(){return D(this,"fileList").value},submit(){return this.getUploadRef().submit()},clear(){return this.getUploadRef().clear()}}),re(ne,S)})((M=SmartCore["1.9.0"])==null?void 0:M.Vue,(_=SmartCore["1.9.0"])==null?void 0:_.NaiveUI,(R=SmartCore["1.9.0"])==null?void 0:R.SmartCore);
|