2 lines
9.4 KiB
JavaScript
2 lines
9.4 KiB
JavaScript
|
|
var H=Object.defineProperty;var k=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var B=(e,n,t)=>n in e?H(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,x=(e,n)=>{for(var t in n||(n={}))q.call(n,t)&&B(e,t,n[t]);if(k)for(var t of k(n))G.call(n,t)&&B(e,t,n[t]);return e};import{n as Y,o as W}from"./setting.daca20c8.js";import{a4 as F,d as E,t as $,v as w,y as J,af as Q,ag as X,ah as Z,ai as D,z as A,c as ee,V as ne,o as j,a as O,i as c,ac as f,ae as te,a3 as ae,r as C,w as g,F as ie,f as I,j as oe}from"./vendor.bbaa8c82.js";import{m as re}from"./index.334ddd57.js";import{_ as le}from"./index.dea291f2.js";import{F as ue}from"./index.25de4236.js";import"./index.8c1870ba.js";import"./index.dffce763.js";var se=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],de=function(e){return se.map(function(n){return n.toLowerCase()}).indexOf(e.toLowerCase())!==-1},ce=function(e,n,t){Object.keys(n).filter(de).forEach(function(o){var r=n[o];typeof r=="function"&&(o==="onInit"?r(e,t):t.on(o.substring(2),function(a){return r(a,t)}))})},fe=function(e,n,t,o){var r=e.modelEvents?e.modelEvents:null,a=Array.isArray(r)?r.join(" "):r;F(o,function(u,l){t&&typeof u=="string"&&u!==l&&u!==t.getContent({format:e.outputFormat})&&t.setContent(u)}),t.on(a||"change input undo redo",function(){n.emit("update:modelValue",t.getContent({format:e.outputFormat}))})},me=function(e,n,t,o,r,a){o.setContent(a()),t.attrs["onUpdate:modelValue"]&&fe(n,t,o,r),ce(e,t.attrs,o)},P=0,L=function(e){var n=Date.now(),t=Math.floor(Math.random()*1e9);return P++,e+"_"+t+P+String(n)},ve=function(e){return e!==null&&e.tagName.toLowerCase()==="textarea"},z=function(e){return typeof e=="undefined"||e===""?[]:Array.isArray(e)?e:e.split(" ")},pe=function(e,n){return z(e).concat(z(n))},ge=function(e){return e==null},M=function(){return{listeners:[],scriptId:L("tiny-script"),scriptLoaded:!1}},ye=function(){var e=M(),n=function(r,a,u,l){var i=a.createElement("script");i.referrerPolicy="origin",i.type="application/javascript",i.id=r,i.src=u;var m=function(){i.removeEventListener("load",m),l()};i.addEventListener("load",m),a.head&&a.head.appendChild(i)},t=function(r,a,u){e.scriptLoaded?u():(e.listeners.push(u),r.getElementById(e.scriptId)||n(e.scriptId,r,a,function(){e.listeners.forEach(function(l){return l()}),e.scriptLoaded=!0}))},o=function(){e=M()};return{load:t,reinitialize:o}},_e=ye(),he=function(){return typeof window!="undefined"?window:global},y=function(){var e=he();return e&&e.tinymce?e.tinymce:null},be={apiKey:String,cloudChannel:String,id:String,init:Object,initialValue:String,inline:Boolean,modelEvents:[String,Array],plugins:[String,Array],tagName:String,toolbar:[String,Array],modelValue:String,disabled:Boolean,tinymceScriptSrc:String,outputFormat:{type:String,validator:function(e){return e==="html"||e==="text"}}},_=globalThis&&globalThis.__assign||function(){return _=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++){n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_.apply(this,arguments)},Ce=function(e,n,t,o){return e(o||"div",{id:n,ref:t})},Se=function(e,n,t){return e("textarea",{id:n,visibility:"hidden",ref:t})},we=E({props:be,setup:function(e,n){var
|