import{Plugin as y}from"@ckeditor/ckeditor5-core";import{EventInfo as z,getRangeFromMouseEvent as Me,uid as H,toUnit as Re,delay as G,DomEmitterMixin as x,global as h,Rect as D,ResizeObserver as Ae,env as m,createElement as K}from"@ckeditor/ckeditor5-utils";import{DomEventObserver as ve,ViewDataTransfer as Te,ModelRange as Pe,PointerObserver as Oe,ModelLiveRange as T}from"@ckeditor/ckeditor5-engine";import{Widget as Se,isWidget as A}from"@ckeditor/ckeditor5-widget";import{View as xe}from"@ckeditor/ckeditor5-ui";/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/class E extends ve{domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];constructor(e){super(e);const n=this.document;this.listenTo(n,"paste",r("clipboardInput"),{priority:"low"}),this.listenTo(n,"drop",r("clipboardInput"),{priority:"low"}),this.listenTo(n,"dragover",r("dragging"),{priority:"low"});function r(i){return(a,o)=>{o.preventDefault();const s=o.dropRange?[o.dropRange]:null,c=new z(n,i);n.fire(c,{dataTransfer:o.dataTransfer,method:a.name,targetRanges:s,target:o.target,domEvent:o.domEvent}),c.stop.called&&o.stopPropagation()}}}onDomEvent(e){const n="clipboardData"in e?e.clipboardData:e.dataTransfer,r=e.type=="drop"||e.type=="paste",i={dataTransfer:new Te(n,{cacheFiles:r})};if(e.type=="drop"||e.type=="dragover"){const a=Me(e);i.dropRange=a&&this.view.domConverter.domRangeToView(a)}this.fire(e.type,e,i)}}/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/function X(t){return t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/^\s/,"&nbsp;").replace(/\s$/,"&nbsp;").replace(/\s\s/g," &nbsp;"),(t.includes("</p><p>")||t.includes("<br>"))&&(t=`<p>${t}</p>`),t}/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/function Y(t){return t.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(e,n)=>n.length==1?" ":n).replace(/<!--[\s\S]*?-->/g,"")}/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/const J=["figcaption","li"],Q=["ol","ul"];function C(t,e){if(e.is("$text")||e.is("$textProxy"))return e.data;if(e.is("element","img")&&e.hasAttribute("alt"))return e.getAttribute("alt");if(e.is("element","br"))return`
`;let n="",r=null;for(const i of e.getChildren())n+=Ce(i,r)+C(t,i),r=i;if(e.is("rawElement")){const a=document.implementation.createHTMLDocument("").createElement("div");e.render(a,t),n+=Z(a)}return n}function Z(t){let e="";if(t.nodeType===Node.TEXT_NODE)return t.textContent;if(t.tagName==="BR")return`
`;for(const n of t.childNodes)e+=Z(n);return e}function Ce(t,e){return e?t.is("element","li")&&!t.isEmpty&&t.getChild(0).is("containerElement")||Q.includes(t.name)&&Q.includes(e.name)?`

`:!t.is("containerElement")&&!e.is("containerElement")?"":J.includes(t.name)||J.includes(e.name)?`
`:t.is("element")&&t.getCustomProperty("dataPipeline:transparentRendering")||e.is("element")&&e.getCustomProperty("dataPipeline:transparentRendering")?"":`

`:""}function ee(t){return t}function I(t){return t==="__proto__"}function te(t){switch(typeof t){case"number":case"symbol":return!1;case"string":return t.includes(".")||t.includes("[")||t.includes("]")}}function re(t){return typeof t=="string"||typeof t=="symbol"?t:Object.is(t?.valueOf?.(),-0)?"-0":String(t)}function ne(t){const e=[],n=t.length;if(n===0)return e;let r=0,i="",a="",o=!1;for(t.charCodeAt(0)===46&&(e.push(""),r++);r<n;){const s=t[r];a?s==="\\"&&r+1<n?(r++,i+=t[r]):s===a?a="":i+=s:o?s==='"'||s==="'"?a=s:s==="]"?(o=!1,e.push(i),i=""):i+=s:s==="["?(o=!0,i&&(e.push(i),i="")):s==="."?i&&(e.push(i),i=""):i+=s,r++}return i&&e.push(i),e}function F(t,e,n){if(t==null)return n;switch(typeof e){case"string":{if(I(e))return n;const r=t[e];return r===void 0?te(e)?F(t,ne(e),n):n:r}case"number":case"symbol":{typeof e=="number"&&(e=re(e));const r=t[e];return r===void 0?n:r}default:{if(Array.isArray(e))return Ie(t,e,n);if(Object.is(e?.valueOf(),-0)?e="-0":e=String(e),I(e))return n;const r=t[e];return r===void 0?n:r}}}function Ie(t,e,n){if(e.length===0)return n;let r=t;for(let i=0;i<e.length;i++){if(r==null||I(e[i]))return n;r=r[e[i]]}return r===void 0?n:r}function Fe(t){return function(e){return F(e,t)}}function Be(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function ie(t){return t==null||typeof t!="object"&&typeof t!="function"}function oe(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function je(t,e,n){return typeof n!="function"?j(t,e):B(t,e,function r(i,a,o,s,c,d){const l=n(i,a,o,s,c,d);return l!==void 0?!!l:B(i,a,r,d)},new Map)}function B(t,e,n,r){if(e===t)return!0;switch(typeof e){case"object":return Ne(t,e,n,r);case"function":return Object.keys(e).length>0?B(t,{...e},n,r):oe(t,e);default:return Be(t)?typeof e=="string"?e==="":!0:oe(t,e)}}function Ne(t,e,n,r){if(e==null)return!0;if(Array.isArray(e))return se(t,e,n,r);if(e instanceof Map)return Le(t,e,n,r);if(e instanceof Set)return Ue(t,e,n,r);const i=Object.keys(e);if(t==null)return i.length===0;if(i.length===0)return!0;if(r&&r.has(e))return r.get(e)===t;r&&r.set(e,t);try{for(let a=0;a<i.length;a++){const o=i[a];if(!ie(t)&&!(o in t)||e[o]===void 0&&t[o]!==void 0||e[o]===null&&t[o]!==null||!n(t[o],e[o],o,t,e,r))return!1}return!0}finally{r&&r.delete(e)}}function Le(t,e,n,r){if(e.size===0)return!0;if(!(t instanceof Map))return!1;for(const[i,a]of e.entries()){const o=t.get(i);if(n(o,a,i,t,e,r)===!1)return!1}return!0}function se(t,e,n,r){if(e.length===0)return!0;if(!Array.isArray(t))return!1;const i=new Set;for(let a=0;a<e.length;a++){const o=e[a];let s=!1;for(let c=0;c<t.length;c++){if(i.has(c))continue;const d=t[c];let l=!1;if(n(d,o,a,t,e,r)&&(l=!0),l){i.add(c),s=!0;break}}if(!s)return!1}return!0}function Ue(t,e,n,r){return e.size===0?!0:t instanceof Set?se([...t],[...e],n,r):!1}function j(t,e){return je(t,e,()=>{})}function Ve(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function ae(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const $e="[object RegExp]",ce="[object String]",le="[object Number]",de="[object Boolean]",ge="[object Arguments]",We="[object Symbol]",qe="[object Date]",ze="[object Map]",He="[object Set]",Ge="[object Array]",Ke="[object ArrayBuffer]",Xe="[object Object]",Ye="[object DataView]",Je="[object Uint8Array]",Qe="[object Uint8ClampedArray]",Ze="[object Uint16Array]",et="[object Uint32Array]",tt="[object Int8Array]",rt="[object Int16Array]",nt="[object Int32Array]",it="[object Float32Array]",ot="[object Float64Array]";function st(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function at(t,e){return k(t,void 0,t,new Map,e)}function k(t,e,n,r=new Map,i=void 0){const a=i?.(t,e,n,r);if(a!=null)return a;if(ie(t))return t;if(r.has(t))return r.get(t);if(Array.isArray(t)){const o=new Array(t.length);r.set(t,o);for(let s=0;s<t.length;s++)o[s]=k(t[s],s,n,r,i);return Object.hasOwn(t,"index")&&(o.index=t.index),Object.hasOwn(t,"input")&&(o.input=t.input),o}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const o=new RegExp(t.source,t.flags);return o.lastIndex=t.lastIndex,o}if(t instanceof Map){const o=new Map;r.set(t,o);for(const[s,c]of t)o.set(s,k(c,s,n,r,i));return o}if(t instanceof Set){const o=new Set;r.set(t,o);for(const s of t)o.add(k(s,void 0,n,r,i));return o}if(typeof Buffer<"u"&&Buffer.isBuffer(t))return t.subarray();if(st(t)){const o=new(Object.getPrototypeOf(t)).constructor(t.length);r.set(t,o);for(let s=0;s<t.length;s++)o[s]=k(t[s],s,n,r,i);return o}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const o=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return r.set(t,o),_(o,t,n,r,i),o}if(typeof File<"u"&&t instanceof File){const o=new File([t],t.name,{type:t.type});return r.set(t,o),_(o,t,n,r,i),o}if(t instanceof Blob){const o=new Blob([t],{type:t.type});return r.set(t,o),_(o,t,n,r,i),o}if(t instanceof Error){const o=new t.constructor;return r.set(t,o),o.message=t.message,o.name=t.name,o.stack=t.stack,o.cause=t.cause,_(o,t,n,r,i),o}if(typeof t=="object"&&ct(t)){const o=Object.create(Object.getPrototypeOf(t));return r.set(t,o),_(o,t,n,r,i),o}return t}function _(t,e,n=t,r,i){const a=[...Object.keys(e),...Ve(e)];for(let o=0;o<a.length;o++){const s=a[o],c=Object.getOwnPropertyDescriptor(t,s);(c==null||c.writable)&&(t[s]=k(e[s],s,n,r,i))}}function ct(t){switch(ae(t)){case ge:case Ge:case Ke:case Ye:case de:case qe:case it:case ot:case tt:case rt:case nt:case ze:case le:case Xe:case $e:case He:case ce:case We:case Je:case Qe:case Ze:case et:return!0;default:return!1}}function lt(t){return k(t,void 0,t,new Map,void 0)}function dt(t){return t=lt(t),e=>j(e,t)}function gt(t,e){return at(t,(n,r,i,a)=>{if(typeof t=="object")switch(Object.prototype.toString.call(t)){case le:case ce:case de:{const o=new t.constructor(t?.valueOf());return _(o,t),o}case ge:{const o={};return _(o,t),o.length=t.length,o[Symbol.iterator]=t[Symbol.iterator],o}default:return}})}function ft(t){return gt(t)}const pt=/^(?:0|[1-9]\d*)$/;function ut(t,e=Number.MAX_SAFE_INTEGER){switch(typeof t){case"number":return Number.isInteger(t)&&t>=0&&t<e;case"symbol":return!1;case"string":return pt.test(t)}}function ht(t){return t!==null&&typeof t=="object"&&ae(t)==="[object Arguments]"}function mt(t,e){let n;if(Array.isArray(e)?n=e:typeof e=="string"&&te(e)&&t?.[e]==null?n=ne(e):n=[e],n.length===0)return!1;let r=t;for(let i=0;i<n.length;i++){const a=n[i];if((r==null||!Object.hasOwn(r,a))&&!((Array.isArray(r)||ht(r))&&ut(a)&&a<r.length))return!1;r=r[a]}return!0}function bt(t,e){switch(typeof t){case"object":{Object.is(t?.valueOf(),-0)&&(t="-0");break}case"number":{t=re(t);break}}return e=ft(e),function(n){const r=F(n,t);return r===void 0?mt(n,t):e===void 0?r===void 0:j(r,e)}}function yt(t){if(t==null)return ee;switch(typeof t){case"function":return t;case"object":return Array.isArray(t)&&t.length===2?bt(t[0],t[1]):dt(t);case"string":case"symbol":case"number":return Fe(t)}}function kt(t,e,{signal:n,edges:r}={}){let i,a=null;const o=r!=null&&r.includes("leading"),s=r==null||r.includes("trailing"),c=()=>{a!==null&&(t.apply(i,a),i=void 0,a=null)},d=()=>{s&&c(),p()};let l=null;const f=()=>{l!=null&&clearTimeout(l),l=setTimeout(()=>{l=null,d()},e)},g=()=>{l!==null&&(clearTimeout(l),l=null)},p=()=>{g(),i=void 0,a=null},u=()=>{g(),c()},b=function(...v){if(n?.aborted)return;i=this,a=v;const w=l==null;f(),o&&w&&c()};return b.schedule=f,b.cancel=p,b.flush=u,n?.addEventListener("abort",p,{once:!0}),b}function _t(t,e=0,n={}){typeof n!="object"&&(n={});const{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=Array(2);r&&(o[0]="leading"),i&&(o[1]="trailing");let s,c=null;const d=kt(function(...g){s=t.apply(this,g),c=null},e,{edges:o}),l=function(...g){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=t.apply(this,g),c=Date.now(),d.cancel(),d.schedule(),s):(d.apply(this,g),s)},f=()=>(d.flush(),s);return l.cancel=d.cancel,l.flush=f,l}function fe(t,e=0,n={}){typeof n!="object"&&(n={});const{leading:r=!0,trailing:i=!0}=n;return _t(t,e,{leading:r,trailing:i,maxWait:e})}function wt(t,e){const n={},r=Object.keys(t);for(let i=0;i<r.length;i++){const a=r[i],o=t[a];n[a]=e(o,a,t)}return n}function Dt(t,e=ee){return t==null?{}:wt(t,yt(e))}/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/class N extends y{_markersToCopy=new Map;static get pluginName(){return"ClipboardMarkersUtils"}static get isOfficialPlugin(){return!0}_registerMarkerToCopy(e,n){this._markersToCopy.set(e,n)}_copySelectedFragmentWithMarkers(e,n,r=i=>i.model.getSelectedContent(i.model.document.selection)){return this.editor.model.change(i=>{const a=i.model.document.selection;i.setSelection(n);const o=this._insertFakeMarkersIntoSelection(i,i.model.document.selection,e),s=r(i),c=this._removeFakeMarkersInsideElement(i,s);for(const[d,l]of Object.entries(o)){c[d]||=i.createRangeIn(s);for(const f of l)i.remove(f)}s.markers.clear();for(const[d,l]of Object.entries(c))s.markers.set(d,l);return i.setSelection(a),s})}_pasteMarkersIntoTransformedElement(e,n){const r=this._getPasteMarkersFromRangeMap(e);return this.editor.model.change(i=>{const a=this._insertFakeMarkersElements(i,r),o=n(i),s=this._removeFakeMarkersInsideElement(i,o);for(const c of Object.values(a).flat())i.remove(c);for(const[c,d]of Object.entries(s))i.model.markers.has(c)||i.addMarker(c,{usingOperation:!0,affectsData:!0,range:d});return o})}_pasteFragmentWithMarkers(e){const n=this._getPasteMarkersFromRangeMap(e.markers);e.markers.clear();for(const r of n)e.markers.set(r.name,r.range);return this.editor.model.insertContent(e)}_forceMarkersCopy(e,n,r={allowedActions:"all",copyPartiallySelected:!0,duplicateOnPaste:!0}){const i=this._markersToCopy.get(e);this._markersToCopy.set(e,r),n(),i?this._markersToCopy.set(e,i):this._markersToCopy.delete(e)}_isMarkerCopyable(e,n){const r=this._getMarkerClipboardConfig(e);if(!r)return!1;if(!n)return!0;const{allowedActions:i}=r;return i==="all"||i.includes(n)}_hasMarkerConfiguration(e){return!!this._getMarkerClipboardConfig(e)}_getMarkerClipboardConfig(e){const[n]=e.split(":");return this._markersToCopy.get(n)||null}_insertFakeMarkersIntoSelection(e,n,r){const i=this._getCopyableMarkersFromSelection(e,n,r);return this._insertFakeMarkersElements(e,i)}_getCopyableMarkersFromSelection(e,n,r){const i=Array.from(n.getRanges()),a=new Set(i.flatMap(s=>Array.from(e.model.markers.getMarkersIntersectingRange(s)))),o=s=>{if(!this._isMarkerCopyable(s.name,r))return!1;const{copyPartiallySelected:d}=this._getMarkerClipboardConfig(s.name);if(!d){const l=s.getRange();return i.some(f=>f.containsRange(l,!0))}return!0};return Array.from(a).filter(o).map(s=>({name:r==="dragstart"?this._getUniqueMarkerName(s.name):s.name,range:s.getRange()}))}_getPasteMarkersFromRangeMap(e,n=null){const{model:r}=this.editor;return(e instanceof Map?Array.from(e.entries()):Object.entries(e)).flatMap(([a,o])=>{if(!this._hasMarkerConfiguration(a))return[{name:a,range:o}];if(this._isMarkerCopyable(a,n)){const s=this._getMarkerClipboardConfig(a),c=r.markers.has(a)&&r.markers.get(a).getRange().root.rootName==="$graveyard";return(s.duplicateOnPaste||c)&&(a=this._getUniqueMarkerName(a)),[{name:a,range:o}]}return[]})}_insertFakeMarkersElements(e,n){const r={},i=n.flatMap(a=>{const{start:o,end:s}=a.range;return[{position:o,marker:a,type:"start"},{position:s,marker:a,type:"end"}]}).sort(({position:a},{position:o})=>a.isBefore(o)?1:-1);for(const{position:a,marker:o,type:s}of i){const c=e.createElement("$marker",{"data-name":o.name,"data-type":s});r[o.name]||(r[o.name]=[]),r[o.name].push(c),e.insert(c,a)}return r}_removeFakeMarkersInsideElement(e,n){const i=this._getAllFakeMarkersFromElement(e,n).reduce((a,o)=>{const s=o.markerElement&&e.createPositionBefore(o.markerElement);let c=a[o.name],d=!1;return c?.start&&c?.end&&(this._getMarkerClipboardConfig(o.name).duplicateOnPaste?a[this._getUniqueMarkerName(o.name)]=a[o.name]:d=!0,c=null),d||(a[o.name]={...c,[o.type]:s}),o.markerElement&&e.remove(o.markerElement),a},{});return Dt(i,a=>new Pe(a.start||e.createPositionFromPath(n,[0]),a.end||e.createPositionAt(n,"end")))}_getAllFakeMarkersFromElement(e,n){const r=Array.from(e.createRangeIn(n)).flatMap(({item:o})=>{if(!o.is("element","$marker"))return[];const s=o.getAttribute("data-name"),c=o.getAttribute("data-type");return[{markerElement:o,name:s,type:c}]}),i=[],a=[];for(const o of r)o.type==="end"&&(r.some(c=>c.name===o.name&&c.type==="start")||i.push({markerElement:null,name:o.name,type:"start"})),o.type==="start"&&(r.some(c=>c.name===o.name&&c.type==="end")||a.unshift({markerElement:null,name:o.name,type:"end"}));return[...i,...r,...a]}_getUniqueMarkerName(e){const n=e.split(":"),r=H().substring(1,6);return n.length===3?`${n.slice(0,2).join(":")}:${r}`:`${n.join(":")}:${r}`}}/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/class M extends y{static get pluginName(){return"ClipboardPipeline"}static get isOfficialPlugin(){return!0}static get requires(){return[N]}init(){this.editor.editing.view.addObserver(E),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(e,n,r){const i=this.editor.plugins.get("ClipboardMarkersUtils");this.editor.model.enqueueChange({isUndoable:r==="cut"},()=>{const a=i._copySelectedFragmentWithMarkers(r,n);this.fire("outputTransformation",{dataTransfer:e,content:a,method:r})})}_setupPasteDrop(){const e=this.editor,n=e.model,r=e.editing.view,i=r.document,a=this.editor.plugins.get("ClipboardMarkersUtils");this.listenTo(i,"clipboardInput",(o,s)=>{s.method=="paste"&&!e.model.canEditAt(e.model.document.selection)&&o.stop()},{priority:"highest"}),this.listenTo(i,"clipboardInput",(o,s)=>{const c=s.dataTransfer;let d;if(s.content)d=s.content;else{let g="";c.getData("text/html")?g=Y(c.getData("text/html")):c.getData("text/plain")&&(g=X(c.getData("text/plain"))),d=this.editor.data.htmlProcessor.toView(g)}const l=new z(this,"inputTransformation"),f=c.getData("application/ckeditor5-editor-id")||null;this.fire(l,{content:d,dataTransfer:c,sourceEditorId:f,targetRanges:s.targetRanges,method:s.method}),l.stop.called&&o.stop(),r.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(o,s)=>{if(s.content.isEmpty)return;const d=this.editor.data.toModel(s.content,"$clipboardHolder");d.childCount!=0&&(o.stop(),n.change(()=>{this.fire("contentInsertion",{content:d,method:s.method,sourceEditorId:s.sourceEditorId,dataTransfer:s.dataTransfer,targetRanges:s.targetRanges})}))},{priority:"low"}),this.listenTo(this,"contentInsertion",(o,s)=>{s.resultRange=a._pasteFragmentWithMarkers(s.content)},{priority:"low"})}_setupCopyCut(){const e=this.editor,n=e.model.document,i=e.editing.view.document,a=(o,s)=>{const c=s.dataTransfer;s.preventDefault(),this._fireOutputTransformationEvent(c,n.selection,o.name)};this.listenTo(i,"copy",a,{priority:"low"}),this.listenTo(i,"cut",(o,s)=>{e.model.canEditAt(e.model.document.selection)?a(o,s):s.preventDefault()},{priority:"low"}),this.listenTo(this,"outputTransformation",(o,s)=>{const c=e.data.toView(s.content,{isClipboardPipeline:!0});i.fire("clipboardOutput",{dataTransfer:s.dataTransfer,content:c,method:s.method})},{priority:"low"}),this.listenTo(i,"clipboardOutput",(o,s)=>{s.content.isEmpty||(s.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(s.content)),s.dataTransfer.setData("text/plain",C(e.data.htmlProcessor.domConverter,s.content)),s.dataTransfer.setData("application/ckeditor5-editor-id",this.editor.id)),s.method=="cut"&&e.model.deleteContent(n.selection)},{priority:"low"})}}/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*//* istanbul ignore file -- @preserve */const L=Re("px");class pe extends xe{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",e.if("isVisible","ck-hidden",n=>!n)],style:{left:e.to("left",n=>L(n)),top:e.to("top",n=>L(n)),width:e.to("width",n=>L(n))}}})}}/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/class R extends y{removeDropMarkerDelayed=G(()=>this.removeDropMarker(),40);_updateDropMarkerThrottled=fe(e=>this._updateDropMarker(e),40);_reconvertMarkerThrottled=fe(()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")},0);_dropTargetLineView=new pe;_domEmitter=new(x());_scrollables=new Map;static get pluginName(){return"DragDropTarget"}static get isOfficialPlugin(){return!0}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:e}of this._scrollables.values())e.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(e,n,r,i,a,o){this.removeDropMarkerDelayed.cancel();const s=ue(this.editor,e,n,r,i,a,o);/* istanbul ignore next -- @preserve */if(s){if(o&&o.containsRange(s))return this.removeDropMarker();this._updateDropMarkerThrottled(s)}}getFinalDropRange(e,n,r,i,a,o){const s=ue(this.editor,e,n,r,i,a,o);return this.removeDropMarker(),s}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change(n=>{n.removeMarker("drop-target")})}_setupDropMarker(){const e=this.editor;e.ui.view.body.add(this._dropTargetLineView),e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(n,{writer:r})=>{if(e.model.schema.checkChild(n.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(r);n.markerRange.isCollapsed?this._updateDropTargetLine(n.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const n=this.editor,r=n.model.markers;n.model.change(i=>{r.has("drop-target")?r.get("drop-target").getRange().isEqual(e)||i.updateMarker("drop-target",{range:e}):i.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})})}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},function(n){const r=this.toDomElement(n);return r.append("\u2060",n.createElement("span"),"\u2060"),r})}_updateDropTargetLine(e){const n=this.editor.editing,r=e.start.nodeBefore,i=e.start.nodeAfter,a=e.start.parent,o=r?n.mapper.toViewElement(r):null,s=o?n.view.domConverter.mapViewToDom(o):null,c=i?n.mapper.toViewElement(i):null,d=c?n.view.domConverter.mapViewToDom(c):null,l=n.mapper.toViewElement(a);if(!l)return;const f=n.view.domConverter.mapViewToDom(l),g=this._getScrollableRect(l),{scrollX:p,scrollY:u}=h.window,b=s?new D(s):null,v=d?new D(d):null,w=new D(f).excludeScrollbarsAndBorders(),$=b?b.bottom:w.top,O=v?v.top:w.bottom,W=h.window.getComputedStyle(f),S=$<=O?($+O)/2:O;if(g.top<S&&S<g.bottom){const we=w.left+parseFloat(W.paddingLeft),De=w.right-parseFloat(W.paddingRight),q=Math.max(we+p,g.left),Ee=Math.min(De+p,g.right);this._dropTargetLineView.set({isVisible:!0,left:q,top:S+u,width:Ee-q})}else this._dropTargetLineView.isVisible=!1}_getScrollableRect(e){const n=e.root.rootName;let r;if(this._scrollables.has(n))r=this._scrollables.get(n).domElement;else{const i=this.editor.editing.view.domConverter.mapViewToDom(e);r=Mt(i),this._domEmitter.listenTo(r,"scroll",this._reconvertMarkerThrottled,{usePassive:!0});const a=new Ae(r,this._reconvertMarkerThrottled);this._scrollables.set(n,{domElement:r,resizeObserver:a})}return new D(r).excludeScrollbarsAndBorders()}}function ue(t,e,n,r,i,a,o){const s=t.model,c=t.editing.mapper;let l=me(t,e);for(;l;){if(!a){if(s.schema.checkChild(l,"$text")){if(n){const f=n[0].start,g=c.toModelPosition(f);if(!o||Array.from(o.getItems({shallow:!0})).every(u=>s.schema.checkChild(g,u))){if(s.schema.checkChild(g,"$text"))return s.createRange(g);if(f)return P(t,me(t,f.parent),r,i)}}}else if(s.schema.isInline(l))return P(t,l,r,i)}if(s.schema.isBlock(l))return P(t,l,r,i);if(s.schema.checkChild(l,"$block")){const f=Array.from(l.getChildren()).filter(u=>u.is("element")&&!Et(t,u));let g=0,p=f.length;if(p==0)return s.createRange(s.createPositionAt(l,"end"));for(;g<p-1;){const u=Math.floor((g+p)/2);he(t,f[u],r,i)=="before"?p=u:g=u}return P(t,f[g],r,i)}l=l.parent}return null}function Et(t,e){const n=t.editing.mapper,r=t.editing.view.domConverter,i=n.toViewElement(e);if(!i)return!0;const a=r.mapViewToDom(i);return h.window.getComputedStyle(a).float!="none"}function P(t,e,n,r){const i=t.model;return i.createRange(i.createPositionAt(e,he(t,e,n,r)))}function he(t,e,n,r){const i=t.editing.mapper,a=t.editing.view.domConverter,o=i.toViewElement(e),s=a.mapViewToDom(o),c=new D(s);return t.model.schema.isInline(e)?n<(c.left+c.right)/2?"before":"after":r<(c.top+c.bottom)/2?"before":"after"}function me(t,e){const n=t.editing.mapper,r=t.editing.view,i=n.toModelElement(e);if(i)return i;const a=r.createPositionBefore(e),o=n.findMappedViewAncestor(a);return n.toModelElement(o)}function Mt(t){let e=t;do{e=e.parentElement;const n=h.window.getComputedStyle(e).overflowY;if(n=="auto"||n=="scroll")break}while(e.tagName!="BODY");return e}/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/class U extends y{_isBlockDragging=!1;_domEmitter=new(x());static get pluginName(){return"DragDropBlockToolbar"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(this.listenTo(e,"change:isReadOnly",(n,r,i)=>{i?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")}),m.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const r=e.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(r,"dragstart",(i,a)=>this._handleBlockDragStart(a)),this._domEmitter.listenTo(h.document,"dragover",(i,a)=>this._handleBlockDragging(a)),this._domEmitter.listenTo(h.document,"drop",(i,a)=>this._handleBlockDragging(a)),this._domEmitter.listenTo(h.document,"dragend",()=>this._handleBlockDragEnd(),{useCapture:!0}),this.isEnabled&&r.setAttribute("draggable","true"),this.on("change:isEnabled",(i,a,o)=>{r.setAttribute("draggable",o?"true":"false")})}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const n=this.editor.model,r=n.document.selection,i=this.editor.editing.view,a=Array.from(r.getSelectedBlocks()),o=n.createRange(n.createPositionBefore(a[0]),n.createPositionAfter(a[a.length-1]));n.change(s=>s.setSelection(o)),this._isBlockDragging=!0,i.focus(),i.getObserver(E).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const n=e.clientX+(this.editor.locale.contentLanguageDirection=="ltr"?100:-100),r=e.clientY,i=document.elementFromPoint(n,r),a=this.editor.editing.view;!i||!i.closest(".ck-editor__editable")||a.getObserver(E).onDomEvent({...e,type:e.type,dataTransfer:e.dataTransfer,target:i,clientX:n,clientY:r,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()})}_handleBlockDragEnd(){this._isBlockDragging=!1}}function Rt(t,{insertAt:e}={}){if(typeof document>"u")return;const n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",window.litNonce&&r.setAttribute("nonce",window.litNonce),e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}Rt('.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}.ck.ck-clipboard-drop-target-line{pointer-events:none;position:absolute;z-index:var(--ck-z-default)}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}.ck.ck-clipboard-drop-target-line{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);height:0;margin-top:-1px}.ck.ck-clipboard-drop-target-line:before{border-style:solid;content:"";height:0;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-width)*-.5);width:0}[dir=ltr] .ck.ck-clipboard-drop-target-line:before{border-color:transparent transparent transparent var(--ck-clipboard-drop-target-color);border-width:calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5) var(--ck-clipboard-drop-target-dot-height);left:-1px}[dir=rtl] .ck.ck-clipboard-drop-target-line:before{border-color:transparent var(--ck-clipboard-drop-target-color) transparent transparent;border-width:calc(var(--ck-clipboard-drop-target-dot-width)*.5) var(--ck-clipboard-drop-target-dot-height) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0;right:-1px}');/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/class V extends y{_draggedRange;_draggingUid;_draggableElement;_clearDraggableAttributesDelayed=G(()=>this._clearDraggableAttributes(),40);_blockMode=!1;_domEmitter=new(x());_previewContainer;static get pluginName(){return"DragDrop"}static get isOfficialPlugin(){return!0}static get requires(){return[M,Se,R,U]}init(){const e=this.editor,n=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,n.addObserver(E),n.addObserver(Oe),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",(r,i,a)=>{a?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}),this.on("change:isEnabled",(r,i,a)=>{a||this._finalizeDragging(!1)}),m.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,n=e.model,r=e.editing.view,i=r.document,a=e.plugins.get(R);this.listenTo(i,"dragstart",(o,s)=>{if(s.target?.is("editableElement")){s.preventDefault();return}if(this._prepareDraggedRange(s.target),!this._draggedRange){s.preventDefault();return}this._draggingUid=H(),s.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",s.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const c=n.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(s.dataTransfer,c,"dragstart");const{dataTransfer:l,domTarget:f,domEvent:g}=s,{clientX:p}=g;this._updatePreview({dataTransfer:l,domTarget:f,clientX:p}),s.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")},{priority:"low"}),this.listenTo(i,"dragend",(o,s)=>{this._finalizeDragging(!s.dataTransfer.isCanceled&&s.dataTransfer.dropEffect=="move")},{priority:"low"}),this._domEmitter.listenTo(h.document,"dragend",()=>{this._blockMode=!1},{useCapture:!0}),this.listenTo(i,"dragenter",()=>{this.isEnabled&&r.focus()}),this.listenTo(i,"dragleave",()=>{a.removeDropMarkerDelayed()}),this.listenTo(i,"dragging",(o,s)=>{if(!this.isEnabled){s.dataTransfer.dropEffect="none";return}const{clientX:c,clientY:d}=s.domEvent;a.updateDropMarker(s.target,s.targetRanges,c,d,this._blockMode,this._draggedRange),this._draggedRange||(s.dataTransfer.dropEffect="copy"),m.isGecko||(s.dataTransfer.effectAllowed=="copy"?s.dataTransfer.dropEffect="copy":["all","copyMove"].includes(s.dataTransfer.effectAllowed)&&(s.dataTransfer.dropEffect="move")),o.stop()},{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,r=e.editing.view.document,i=e.plugins.get(R);this.listenTo(r,"clipboardInput",(a,o)=>{if(o.method!="drop")return;const{clientX:s,clientY:c}=o.domEvent,d=i.getFinalDropRange(o.target,o.targetRanges,s,c,this._blockMode,this._draggedRange);if(!d){this._finalizeDragging(!1),a.stop();return}if(this._draggedRange&&this._draggingUid!=o.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),be(o.dataTransfer)=="move"&&this._draggedRange&&this._draggedRange.containsRange(d,!0)){this._finalizeDragging(!1),a.stop();return}o.targetRanges=[e.editing.mapper.toViewRange(d)]},{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(M);e.on("contentInsertion",(n,r)=>{if(!this.isEnabled||r.method!=="drop")return;const i=r.targetRanges.map(a=>this.editor.editing.mapper.toModelRange(a));this.editor.model.change(a=>a.setSelection(i))},{priority:"high"}),e.on("contentInsertion",(n,r)=>{if(!this.isEnabled||r.method!=="drop")return;const i=be(r.dataTransfer)=="move",a=!r.resultRange||!r.resultRange.isCollapsed;this._finalizeDragging(a&&i)},{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,n=e.editing.view,r=n.document;this.listenTo(r,"pointerdown",(i,a)=>{if(m.isAndroid||!a)return;this._clearDraggableAttributesDelayed.cancel();let o=ye(a.target);if(m.isBlink&&!e.isReadOnly&&!o&&!r.selection.isCollapsed){const s=r.selection.getSelectedElement();(!s||!A(s))&&(o=r.selection.editableElement)}o&&(n.change(s=>{s.setAttribute("draggable","true",o)}),this._draggableElement=e.editing.mapper.toModelElement(o))}),this.listenTo(r,"pointerup",()=>{m.isAndroid||this._clearDraggableAttributesDelayed()})}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change(n=>{this._draggableElement&&this._draggableElement.root.rootName!="$graveyard"&&n.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null})}_finalizeDragging(e){const n=this.editor,r=n.model;n.plugins.get(R).removeDropMarker(),this._clearDraggableAttributes(),n.plugins.has("WidgetToolbarRepository")&&n.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&r.change(a=>{const o=r.createSelection(this._draggedRange);r.deleteContent(o,{doNotAutoparagraph:!0});const s=o.getFirstPosition().parent;s.isEmpty&&!r.schema.checkChild(s,"$text")&&r.schema.checkChild(s,"paragraph")&&a.insertElement("paragraph",s,0)}),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const n=this.editor,r=n.model,i=r.document.selection,a=e?ye(e):null;if(a){const d=n.editing.mapper.toModelElement(a);this._draggedRange=T.fromRange(r.createRangeOn(d)),this._blockMode=r.schema.isBlock(d),n.plugins.has("WidgetToolbarRepository")&&n.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop");return}if(i.isCollapsed&&!i.getFirstPosition().parent.isEmpty)return;const o=Array.from(i.getSelectedBlocks()),s=i.getFirstRange();if(o.length==0){this._draggedRange=T.fromRange(s);return}const c=ke(r,o);if(o.length>1)this._draggedRange=T.fromRange(c),this._blockMode=!0;else if(o.length==1){const d=s.start.isTouching(c.start)&&s.end.isTouching(c.end);this._draggedRange=T.fromRange(d?c:s),this._blockMode=d}r.change(d=>d.setSelection(this._draggedRange.toRange()))}_updatePreview({dataTransfer:e,domTarget:n,clientX:r}){const i=this.editor.editing.view,a=i.document.selection.editableElement,o=i.domConverter.mapViewToDom(a),s=h.window.getComputedStyle(o);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=K(h.document,"div",{style:"position: fixed; left: -999999px;"}),h.document.body.appendChild(this._previewContainer));const c=K(h.document,"div");c.className="ck ck-content ck-clipboard-preview";const d=new D(o),l=parseFloat(s.paddingLeft),f=parseFloat(s.paddingRight),g=parseFloat(s.width)-l-f;if(o.contains(n))if(m.isiOS)c.style.maxWidth=`${g}px`,c.style.padding="10px",c.style.minWidth="200px",c.style.minHeight="20px",c.style.boxSizing="border-box",c.style.backgroundColor="var(--ck-color-base-background)";else return;else if(m.isiOS)c.style.width=`${g}px`,c.style.backgroundColor="var(--ck-color-base-background)";else{const p=d.left-r+l;c.style.width=`${g+p}px`,c.style.paddingLeft=`${p}px`}i.domConverter.setContentOf(c,e.getData("text/html")),e.setDragImage(c,0,0),this._previewContainer.appendChild(c)}}function be(t){return m.isGecko?t.dropEffect:["all","copyMove"].includes(t.effectAllowed)?"move":"copy"}function ye(t){if(t.is("editableElement"))return null;if(t.hasClass("ck-widget__selection-handle"))return t.findAncestor(A);if(A(t))return t;const e=t.findAncestor(n=>A(n)||n.is("editableElement"));return A(e)?e:null}function ke(t,e){const n=e[0],r=e[e.length-1],i=n.getCommonAncestor(r),a=t.createPositionBefore(n),o=t.createPositionAfter(r);if(i&&i.is("element")&&!t.schema.isLimit(i)){const s=t.createRangeOn(i),c=a.isTouching(s.start),d=o.isTouching(s.end);if(c&&d)return ke(t,[i])}return t.createRange(a,o)}/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/class _e extends y{static get pluginName(){return"PastePlainText"}static get isOfficialPlugin(){return!0}static get requires(){return[M]}init(){const e=this.editor,n=e.model,r=e.editing.view,i=n.document.selection;r.addObserver(E),e.plugins.get(M).on("contentInsertion",(a,o)=>{At(o.content,n)&&n.change(s=>{const c=Array.from(i.getAttributes()).filter(([l])=>n.schema.getAttributeProperties(l).isFormatting);i.isCollapsed||n.deleteContent(i,{doNotAutoparagraph:!0}),c.push(...i.getAttributes());const d=s.createRangeIn(o.content);for(const l of d.getItems())for(const f of c)n.schema.checkAttribute(l,f[0])&&s.setAttribute(f[0],f[1],l)})})}}function At(t,e){let n=e.createRangeIn(t);if(t.childCount==1){const r=t.getChild(0);r.is("element")&&e.schema.isBlock(r)&&!e.schema.isObject(r)&&!e.schema.isLimit(r)&&(n=e.createRangeIn(r))}for(const r of n.getItems())if(!e.schema.isInline(r)||Array.from(r.getAttributeKeys()).find(a=>e.schema.getAttributeProperties(a).isFormatting))return!1;return!0}/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/class vt extends y{static get pluginName(){return"Clipboard"}static get isOfficialPlugin(){return!0}static get requires(){return[N,M,V,_e]}init(){const e=this.editor,n=this.editor.t;e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Copy selected content"),keystroke:"CTRL+C"},{label:n("Paste content"),keystroke:"CTRL+V"},{label:n("Paste content as plain text"),keystroke:"CTRL+SHIFT+V"}]})}}export{vt as Clipboard,N as ClipboardMarkersUtils,E as ClipboardObserver,M as ClipboardPipeline,V as DragDrop,U as DragDropBlockToolbar,R as DragDropTarget,_e as PastePlainText,pe as _ClipboardLineView,V as _DragDrop,U as _DragDropBlockToolbar,R as _DragDropTarget,Y as _normalizeClipboardData,X as plainTextToHtml,C as viewToPlainText};
