diff --git a/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js b/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js index e8b1ec00fac..b6c6cee87ec 100644 --- a/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js +++ b/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js @@ -2,4 +2,4 @@ /*! * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. - */(()=>{var e={"./node_modules/color-convert/conversions.js":(e,t,o)=>{const s=o("./node_modules/color-name/index.js"),i={};for(const e of Object.keys(s))i[s[e]]=e;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:o}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:o})}n.rgb.hsl=function(e){const t=e[0]/255,o=e[1]/255,s=e[2]/255,i=Math.min(t,o,s),n=Math.max(t,o,s),r=n-i;let a,c;n===i?a=0:t===n?a=(o-s)/r:o===n?a=2+(s-t)/r:s===n&&(a=4+(t-o)/r),a=Math.min(60*a,360),a<0&&(a+=360);const l=(i+n)/2;return c=n===i?0:l<=.5?r/(n+i):r/(2-n-i),[a,100*c,100*l]},n.rgb.hsv=function(e){let t,o,s,i,n;const r=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(r,a,c),d=l-Math.min(r,a,c),h=function(e){return(l-e)/6/d+.5};return 0===d?(i=0,n=0):(n=d/l,t=h(r),o=h(a),s=h(c),r===l?i=s-o:a===l?i=1/3+t-s:c===l&&(i=2/3+o-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*n,100*l]},n.rgb.hwb=function(e){const t=e[0],o=e[1];let s=e[2];const i=n.rgb.hsl(e)[0],r=1/255*Math.min(t,Math.min(o,s));return s=1-1/255*Math.max(t,Math.max(o,s)),[i,100*r,100*s]},n.rgb.cmyk=function(e){const t=e[0]/255,o=e[1]/255,s=e[2]/255,i=Math.min(1-t,1-o,1-s);return[100*((1-t-i)/(1-i)||0),100*((1-o-i)/(1-i)||0),100*((1-s-i)/(1-i)||0),100*i]},n.rgb.keyword=function(e){const t=i[e];if(t)return t;let o,n=1/0;for(const t of Object.keys(s)){const i=s[t],c=(a=i,((r=e)[0]-a[0])**2+(r[1]-a[1])**2+(r[2]-a[2])**2);c.04045?((t+.055)/1.055)**2.4:t/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92;return[100*(.4124*t+.3576*o+.1805*s),100*(.2126*t+.7152*o+.0722*s),100*(.0193*t+.1192*o+.9505*s)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let o=t[0],s=t[1],i=t[2];o/=95.047,s/=100,i/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*s-16,500*(o-s),200*(s-i)]},n.hsl.rgb=function(e){const t=e[0]/360,o=e[1]/100,s=e[2]/100;let i,n,r;if(0===o)return r=255*s,[r,r,r];i=s<.5?s*(1+o):s+o-s*o;const a=2*s-i,c=[0,0,0];for(let e=0;e<3;e++)n=t+1/3*-(e-1),n<0&&n++,n>1&&n--,r=6*n<1?a+6*(i-a)*n:2*n<1?i:3*n<2?a+(i-a)*(2/3-n)*6:a,c[e]=255*r;return c},n.hsl.hsv=function(e){const t=e[0];let o=e[1]/100,s=e[2]/100,i=o;const n=Math.max(s,.01);s*=2,o*=s<=1?s:2-s,i*=n<=1?n:2-n;return[t,100*(0===s?2*i/(n+i):2*o/(s+o)),100*((s+o)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,o=e[1]/100;let s=e[2]/100;const i=Math.floor(t)%6,n=t-Math.floor(t),r=255*s*(1-o),a=255*s*(1-o*n),c=255*s*(1-o*(1-n));switch(s*=255,i){case 0:return[s,c,r];case 1:return[a,s,r];case 2:return[r,s,c];case 3:return[r,a,s];case 4:return[c,r,s];case 5:return[s,r,a]}},n.hsv.hsl=function(e){const t=e[0],o=e[1]/100,s=e[2]/100,i=Math.max(s,.01);let n,r;r=(2-o)*s;const a=(2-o)*i;return n=o*i,n/=a<=1?a:2-a,n=n||0,r/=2,[t,100*n,100*r]},n.hwb.rgb=function(e){const t=e[0]/360;let o=e[1]/100,s=e[2]/100;const i=o+s;let n;i>1&&(o/=i,s/=i);const r=Math.floor(6*t),a=1-s;n=6*t-r,1&r&&(n=1-n);const c=o+n*(a-o);let l,d,h;switch(r){default:case 6:case 0:l=a,d=c,h=o;break;case 1:l=c,d=a,h=o;break;case 2:l=o,d=a,h=c;break;case 3:l=o,d=c,h=a;break;case 4:l=c,d=o,h=a;break;case 5:l=a,d=o,h=c}return[255*l,255*d,255*h]},n.cmyk.rgb=function(e){const t=e[0]/100,o=e[1]/100,s=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,o*(1-i)+i)),255*(1-Math.min(1,s*(1-i)+i))]},n.xyz.rgb=function(e){const t=e[0]/100,o=e[1]/100,s=e[2]/100;let i,n,r;return i=3.2406*t+-1.5372*o+-.4986*s,n=-.9689*t+1.8758*o+.0415*s,r=.0557*t+-.204*o+1.057*s,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,i=Math.min(Math.max(0,i),1),n=Math.min(Math.max(0,n),1),r=Math.min(Math.max(0,r),1),[255*i,255*n,255*r]},n.xyz.lab=function(e){let t=e[0],o=e[1],s=e[2];t/=95.047,o/=100,s/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;return[116*o-16,500*(t-o),200*(o-s)]},n.lab.xyz=function(e){let t,o,s;o=(e[0]+16)/116,t=e[1]/500+o,s=o-e[2]/200;const i=o**3,n=t**3,r=s**3;return o=i>.008856?i:(o-16/116)/7.787,t=n>.008856?n:(t-16/116)/7.787,s=r>.008856?r:(s-16/116)/7.787,t*=95.047,o*=100,s*=108.883,[t,o,s]},n.lab.lch=function(e){const t=e[0],o=e[1],s=e[2];let i;i=360*Math.atan2(s,o)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(o*o+s*s),i]},n.lch.lab=function(e){const t=e[0],o=e[1],s=e[2]/360*2*Math.PI;return[t,o*Math.cos(s),o*Math.sin(s)]},n.rgb.ansi16=function(e,t=null){const[o,s,i]=e;let r=null===t?n.rgb.hsv(e)[2]:t;if(r=Math.round(r/50),0===r)return 30;let a=30+(Math.round(i/255)<<2|Math.round(s/255)<<1|Math.round(o/255));return 2===r&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],o=e[1],s=e[2];if(t===o&&o===s)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(s/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const o=.5*(1+~~(e>50));return[(1&t)*o*255,(t>>1&1)*o*255,(t>>2&1)*o*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let o=t[0];3===t[0].length&&(o=o.split("").map((e=>e+e)).join(""));const s=parseInt(o,16);return[s>>16&255,s>>8&255,255&s]},n.rgb.hcg=function(e){const t=e[0]/255,o=e[1]/255,s=e[2]/255,i=Math.max(Math.max(t,o),s),n=Math.min(Math.min(t,o),s),r=i-n;let a,c;return a=r<1?n/(1-r):0,c=r<=0?0:i===t?(o-s)/r%6:i===o?2+(s-t)/r:4+(t-o)/r,c/=6,c%=1,[360*c,100*r,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,o=e[2]/100,s=o<.5?2*t*o:2*t*(1-o);let i=0;return s<1&&(i=(o-.5*s)/(1-s)),[e[0],100*s,100*i]},n.hsv.hcg=function(e){const t=e[1]/100,o=e[2]/100,s=t*o;let i=0;return s<1&&(i=(o-s)/(1-s)),[e[0],100*s,100*i]},n.hcg.rgb=function(e){const t=e[0]/360,o=e[1]/100,s=e[2]/100;if(0===o)return[255*s,255*s,255*s];const i=[0,0,0],n=t%1*6,r=n%1,a=1-r;let c=0;switch(Math.floor(n)){case 0:i[0]=1,i[1]=r,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=r;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=r,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-o)*s,[255*(o*i[0]+c),255*(o*i[1]+c),255*(o*i[2]+c)]},n.hcg.hsv=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);let s=0;return o>0&&(s=t/o),[e[0],100*s,100*o]},n.hcg.hsl=function(e){const t=e[1]/100,o=e[2]/100*(1-t)+.5*t;let s=0;return o>0&&o<.5?s=t/(2*o):o>=.5&&o<1&&(s=t/(2*(1-o))),[e[0],100*s,100*o]},n.hcg.hwb=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);return[e[0],100*(o-t),100*(1-o)]},n.hwb.hcg=function(e){const t=e[1]/100,o=1-e[2]/100,s=o-t;let i=0;return s<1&&(i=(o-s)/(1-s)),[e[0],100*s,100*i]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),o=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(o.length)+o},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},"./node_modules/color-convert/index.js":(e,t,o)=>{const s=o("./node_modules/color-convert/conversions.js"),i=o("./node_modules/color-convert/route.js"),n={};Object.keys(s).forEach((e=>{n[e]={},Object.defineProperty(n[e],"channels",{value:s[e].channels}),Object.defineProperty(n[e],"labels",{value:s[e].labels});const t=i(e);Object.keys(t).forEach((o=>{const s=t[o];n[e][o]=function(e){const t=function(...t){const o=t[0];if(null==o)return o;o.length>1&&(t=o);const s=e(t);if("object"==typeof s)for(let e=s.length,t=0;t1&&(t=o),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(s)}))})),e.exports=n},"./node_modules/color-convert/route.js":(e,t,o)=>{const s=o("./node_modules/color-convert/conversions.js");function i(e){const t=function(){const e={},t=Object.keys(s);for(let o=t.length,s=0;s{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,'.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}: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}',""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}@media (forced-colors:active){.ck .ck-placeholder,.ck.ck-placeholder{forced-color-adjust:preserve-parent-color}}.ck .ck-placeholder:before,.ck.ck-placeholder:before{cursor:text}@media (forced-colors:none){.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text)}}@media (forced-colors:active){.ck .ck-placeholder:before,.ck.ck-placeholder:before{font-style:italic;margin-left:1px}}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/arialiveannouncer/arialiveannouncer.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-aria-live-announcer{left:-10000px;position:absolute;top:-10000px}.ck.ck-aria-live-region-list{list-style-type:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/autocomplete/autocomplete.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-autocomplete{position:relative}.ck.ck-autocomplete>.ck-search__results{position:absolute;z-index:var(--ck-z-panel)}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{bottom:100%}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{bottom:auto;top:100%}.ck.ck-autocomplete>.ck-search__results{border-radius:0}.ck-rounded-corners .ck.ck-autocomplete>.ck-search__results,.ck.ck-autocomplete>.ck-search__results.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-autocomplete>.ck-search__results{background:var(--ck-color-base-background);border:1px solid var(--ck-color-dropdown-panel-border);box-shadow:var(--ck-drop-shadow),0 0;max-height:200px;min-width:auto;overflow-y:auto}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{border-bottom-left-radius:0;border-bottom-right-radius:0;margin-bottom:-1px}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{border-top-left-radius:0;border-top-right-radius:0;margin-top:-1px}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir=ltr] .ck.ck-button,[dir=ltr] a.ck.ck-button{justify-content:left}[dir=rtl] .ck.ck-button,[dir=rtl] a.ck.ck-button{justify-content:right}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}@media (prefers-reduced-motion:reduce){.ck.ck-button,a.ck.ck-button{transition:none}}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{opacity:.5}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}@media (prefers-reduced-motion:reduce){.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{transition:none}}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/collapsible/collapsible.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;color:inherit;font-weight:700;padding:var(--ck-list-button-padding);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:var(--ck-spacing-medium) var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{transition:box-shadow .2s ease}@media (forced-colors:none){.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile.ck-color-selector__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}}@media (forced-colors:active){.ck.ck-color-grid__tile{height:unset;min-height:unset;min-width:unset;padding:0 var(--ck-spacing-small);width:unset}.ck.ck-color-grid__tile .ck-button__label{display:inline-block}}@media (prefers-reduced-motion:reduce){.ck.ck-color-grid__tile{transition:none}}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorpicker/colorpicker.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".color-picker-hex-input{width:max-content}.color-picker-hex-input .ck.ck-input{min-width:unset}.ck.ck-color-picker__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;margin:var(--ck-spacing-large) 0 0;width:unset}.ck.ck-color-picker__row .ck.ck-labeled-field-view{padding-top:unset}.ck.ck-color-picker__row .ck.ck-input-text{width:unset}.ck.ck-color-picker__row .ck-color-picker__hash-view{padding-right:var(--ck-spacing-medium);padding-top:var(--ck-spacing-tiny)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorselector/colorselector.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{align-items:center;display:flex}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{justify-content:flex-start}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{display:flex;flex-direction:row;justify-content:space-around}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-cancel,.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-save{flex:1}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{width:100%}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-left:var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment label.ck.ck-color-grid__label{font-weight:unset}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker{padding:8px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker{height:100px;min-width:180px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation){border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue){border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius)}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue-pointer),.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation-pointer){height:15px;width:15px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{padding:0 8px 8px}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dialog/dialog.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-dialog-overlay{bottom:0;left:0;overscroll-behavior:none;position:fixed;right:0;top:0;user-select:none}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent{animation:none;background:none;pointer-events:none}.ck.ck-dialog{overscroll-behavior:none;position:absolute;width:fit-content}.ck.ck-dialog .ck.ck-form__header{flex-shrink:0}.ck.ck-dialog .ck.ck-form__header .ck-form__header__label{cursor:grab}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent .ck.ck-dialog{pointer-events:all}:root{--ck-dialog-overlay-background-color:rgba(0,0,0,.5);--ck-dialog-drop-shadow:0px 0px 6px 2px rgba(0,0,0,.15);--ck-dialog-max-width:100vw;--ck-dialog-max-height:90vh;--ck-color-dialog-background:var(--ck-color-base-background);--ck-color-dialog-form-header-border:var(--ck-color-base-border)}.ck.ck-dialog-overlay{animation:ck-dialog-fade-in .3s;background:var(--ck-dialog-overlay-background-color);z-index:var(--ck-z-dialog)}.ck.ck-dialog{border-radius:0}.ck-rounded-corners .ck.ck-dialog,.ck.ck-dialog.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dialog{box-shadow:var(--ck-drop-shadow),0 0;--ck-drop-shadow:var(--ck-dialog-drop-shadow);background:var(--ck-color-dialog-background);border:1px solid var(--ck-color-base-border);max-height:var(--ck-dialog-max-height);max-width:var(--ck-dialog-max-width)}.ck.ck-dialog .ck.ck-form__header{border-bottom:1px solid var(--ck-color-dialog-form-header-border)}@keyframes ck-dialog-fade-in{0%{background:transparent}to{background:var(--ck-dialog-overlay-background-color)}}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dialog/dialogactions.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-dialog .ck.ck-dialog__actions{display:flex;justify-content:flex-end;padding:var(--ck-spacing-large)}.ck.ck-dialog .ck.ck-dialog__actions>*+*{margin-left:var(--ck-spacing-large)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-panel) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}.ck.ck-dropdown__panel:focus{outline:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-dropdown>.ck-dropdown__panel>.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton>.ck-splitbutton__arrow:not(:focus){border-bottom-width:0;border-top-width:0}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:focus:after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:focus:after{--ck-color-split-button-hover-border:var(--ck-color-focus-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/accessibilityhelp.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-accessibility-help-dialog-max-width:600px;--ck-accessibility-help-dialog-max-height:400px;--ck-accessibility-help-dialog-border-color:#ccced1;--ck-accessibility-help-dialog-code-background-color:#ededed;--ck-accessibility-help-dialog-kbd-shadow-color:#9c9c9c}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content{border:1px solid transparent;max-height:var(--ck-accessibility-help-dialog-max-height);max-width:var(--ck-accessibility-help-dialog-max-width);overflow:auto;padding:var(--ck-spacing-large);user-select:text}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content{*{white-space:normal}}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content .ck-label{display:none}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h3{font-size:1.2em;font-weight:700}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h4{font-size:1em;font-weight:700}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h3,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h4,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content p,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content table{margin:1em 0}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl{border-bottom:none;border-top:1px solid var(--ck-accessibility-help-dialog-border-color);display:grid;grid-template-columns:2fr 1fr}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dd,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dt{border-bottom:1px solid var(--ck-accessibility-help-dialog-border-color);padding:.4em 0}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dt{grid-column-start:1}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dd{grid-column-start:2;text-align:right}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content code,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd{background:var(--ck-accessibility-help-dialog-code-background-color);border-radius:2px;display:inline-block;font-size:.9em;line-height:1;padding:.4em;text-align:center;vertical-align:middle}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content code{font-family:monospace}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd{box-shadow:0 1px 1px var(--ck-accessibility-help-dialog-kbd-shadow-color);margin:0 1px;min-width:1.8em}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd+kbd{margin-left:2px}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__header h2.ck-form__header__label{flex-grow:1}:root{--ck-form-header-height:44px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}[dir=ltr] .ck.ck-form__header>.ck-icon{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-form__header>.ck-icon{margin-left:var(--ck-spacing-medium)}.ck.ck-form__header .ck-form__header__label{--ck-font-size-base:15px;font-weight:700}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/highlightedtext/highlightedtext.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-highlighted-text mark{background:var(--ck-color-highlight-background);font-size:inherit;font-weight:inherit;line-height:inherit;vertical-align:initial}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}@media (prefers-reduced-motion:reduce){.ck.ck-input{transition:none}}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}@media (prefers-reduced-motion:reduce){.ck.ck-input.ck-error{animation:none}}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0;transform:translate(calc(var(--ck-spacing-medium)*-1),-6px) scale(.75);transform-origin:100% 0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}@media (prefers-reduced-motion:reduce){.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transition:none}}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}:root{--ck-list-button-padding:calc(var(--ck-line-height-base)*0.11*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*0.4*var(--ck-font-size-base))}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item>.ck-button{border-radius:0;min-height:unset;width:100%}[dir=ltr] .ck.ck-list__item>.ck-button{text-align:left}[dir=rtl] .ck.ck-list__item>.ck-button{text-align:right}.ck.ck-list__item>.ck-button{padding:var(--ck-list-button-padding)}.ck.ck-list__item>.ck-button:active{box-shadow:none}.ck.ck-list__item>.ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item>.ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item>.ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item>.ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item>.ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item>.ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item>.ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck-list .ck-list__group{padding-top:var(--ck-spacing-medium);:not(.ck-hidden)~&{border-top:1px solid var(--ck-color-base-border)}}.ck-list .ck-list__group>.ck-label{font-size:11px;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-medium) 0 var(--ck-spacing-medium)}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubar.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-menu-bar{background:var(--ck-color-base-background);border:1px solid var(--ck-color-toolbar-border);display:flex;flex-wrap:wrap;gap:var(--ck-spacing-small);justify-content:flex-start;padding:var(--ck-spacing-small);width:100%}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenu.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-menu-bar__menu{display:block;font-size:inherit;position:relative}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level{max-width:100%}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenubutton.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-menu-bar__menu>.ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button{padding:var(--ck-list-button-padding);width:100%}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button>.ck-button__label{flex-grow:1;overflow:hidden;text-overflow:ellipsis}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button.ck-disabled>.ck-button__label{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-menu-bar__menu>.ck-menu-bar__menu__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-menu-bar__menu>.ck-menu-bar__menu__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button{min-height:unset;padding:var(--ck-spacing-small) var(--ck-spacing-medium)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button .ck-button__label{line-height:unset;width:unset}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button .ck-icon{display:none}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button{border-radius:0}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:focus{border-color:transparent;box-shadow:none}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:focus:not(.ck-on){background:var(--ck-color-button-default-hover-background)}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:not(:has(.ck-button__icon))>.ck-button__label{margin-left:calc(var(--ck-icon-size) - var(--ck-spacing-small))}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{transform:rotate(-90deg)}[dir=rtl] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{transform:rotate(90deg)}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button.ck-disabled>.ck-menu-bar__menu__button__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenulistitem.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-menu-bar-menu-item-min-width:18em}.ck.ck-menu-bar__menu .ck.ck-menu-bar__menu__item{min-width:var(--ck-menu-bar-menu-item-min-width)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenulistitembutton.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button{border-radius:0}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container,.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container .ck-spinner{--ck-toolbar-spinner-size:20px}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button:focus{border-color:transparent;box-shadow:none}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button:focus:not(.ck-on){background:var(--ck-color-button-default-hover-background)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__panel>ul>.ck-menu-bar__menu__item>.ck-menu-bar__menu__item__button:not(:has(.ck-button__icon))>.ck-button__label{margin-left:calc(var(--ck-icon-size) - var(--ck-spacing-small))}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenupanel.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-menu-bar-menu-max-width:75vw;--ck-menu-bar-nested-menu-horizontal-offset:5px}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{max-width:var(--ck-menu-bar-menu-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw{bottom:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{bottom:auto;top:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se{left:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{right:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{left:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en{bottom:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{right:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn{bottom:0}:root{--ck-menu-bar-menu-panel-max-width:75vw}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{border-radius:0}.ck-rounded-corners .ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;height:fit-content;max-width:var(--ck-menu-bar-menu-panel-max-width)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se{border-top-left-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{border-top-right-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne{border-bottom-left-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn{border-bottom-right-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel:focus{outline:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-panel)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-panel) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-panel)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/search/search.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{position:absolute;top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{left:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{right:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view .ck-search__reset{position:absolute;top:50%;transform:translateY(-50%)}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{display:block}.ck.ck-search>.ck-search__results>.ck-search__info:not(.ck-hidden)~*{display:none}:root{--ck-search-field-view-horizontal-spacing:calc(var(--ck-icon-size) + var(--ck-spacing-medium))}.ck.ck-search>.ck-labeled-field-view .ck-input{width:100%}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon{--ck-labeled-field-label-default-position-x:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon>.ck-labeled-field-view__input-wrapper>.ck-icon{opacity:.5;pointer-events:none}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input,[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input:not(.ck-input-text_empty){padding-left:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset{--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset.ck-labeled-field-view_empty{--ck-labeled-field-empty-unfocused-max-width:100% - var(--ck-search-field-view-horizontal-spacing) - var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{background:none;min-height:auto;min-width:auto;opacity:.5;padding:0}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{left:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset:hover{opacity:1}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input:not(.ck-input-text_empty),[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input{padding-right:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-search__results{min-width:100%}.ck.ck-search>.ck-search__results>.ck-search__info{padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-search>.ck-search__results>.ck-search__info *{white-space:normal}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{font-weight:700}.ck.ck-search>.ck-search__results>.ck-search__info>span:last-child{margin-top:var(--ck-spacing-medium)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/spinner/spinner.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-spinner-container{display:block;position:relative}.ck.ck-spinner{left:0;margin:0 auto;position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:1}:root{--ck-toolbar-spinner-size:18px}.ck.ck-spinner-container{animation:ck-spinner-rotate 1.5s linear infinite;height:var(--ck-toolbar-spinner-size);width:var(--ck-toolbar-spinner-size)}@media (prefers-reduced-motion:reduce){.ck.ck-spinner-container{animation-duration:3s}}.ck.ck-spinner{border:2px solid var(--ck-color-text);border-radius:50%;border-top:2px solid transparent;height:var(--ck-toolbar-spinner-size);width:var(--ck-toolbar-spinner-size)}@keyframes ck-spinner-rotate{to{transform:rotate(1turn)}}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/textarea/textarea.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck-textarea{overflow-x:hidden}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{background:var(--ck-color-toolbar-border);height:var(--ck-icon-size);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck.ck-toolbar:focus{outline:none}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-balloon-panel.ck-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:calc(var(--ck-z-dialog) + 100);--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-tooltip-text-padding:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip.ck-tooltip_multi-line .ck-tooltip__text{display:inline-block;max-width:200px;padding:var(--ck-tooltip-text-padding) 0;white-space:break-spaces}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck-hidden{display:none!important}:root{--ck-z-default:1;--ck-z-panel:calc(var(--ck-z-default) + 999);--ck-z-dialog:9999}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-powered-by-line-height:10px;--ck-powered-by-padding-vertical:2px;--ck-powered-by-padding-horizontal:4px;--ck-powered-by-text-color:#4f4f4f;--ck-powered-by-border-radius:var(--ck-border-radius);--ck-powered-by-background:#fff;--ck-powered-by-border-color:var(--ck-color-focus-border)}.ck.ck-balloon-panel.ck-powered-by-balloon{--ck-border-radius:var(--ck-powered-by-border-radius);background:var(--ck-powered-by-background);box-shadow:none;min-height:unset;z-index:calc(var(--ck-z-panel) - 1)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by{line-height:var(--ck-powered-by-line-height)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by a{align-items:center;cursor:pointer;display:flex;filter:grayscale(80%);line-height:var(--ck-powered-by-line-height);opacity:.66;padding:var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-powered-by__label{color:var(--ck-powered-by-text-color);cursor:pointer;font-size:7.5px;font-weight:700;letter-spacing:-.2px;line-height:normal;margin-right:4px;padding-left:2px;text-transform:uppercase}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-icon{cursor:pointer;display:block}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by:hover a{filter:grayscale(0);opacity:1}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_inside]{border-color:transparent}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_border]{border:var(--ck-focus-ring);border-color:var(--ck-powered-by-border-color)}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-dialog-background:var(--ck-custom-background);--ck-color-dialog-form-header-border:var(--ck-custom-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-color-light-red:#fcc;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{background:transparent;border:0;box-sizing:border-box;height:auto;margin:0;padding:0;position:static;text-decoration:none;transition:none;vertical-align:middle;width:auto;word-wrap:break-word}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget{transition:none}}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}@media (forced-colors:none){.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background)}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{transition:none}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{transition:none}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button{transition:none}}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button svg{transition:none}}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button:hover,.ck .ck-widget .ck-widget__type-around__button:hover svg line,.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:none}}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',""]);const n=i},"./node_modules/css-loader/dist/runtime/api.js":e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,s){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(s)for(var n=0;n{"use strict";o.d(t,{uB:()=>r,ob:()=>d,HY:()=>h,CC:()=>y,KE:()=>k,mJ:()=>x,fE:()=>c,TS:()=>C,k_:()=>i,JF:()=>v,Pt:()=>T,Jl:()=>A});var s=o("./packages/ckeditor5-utils/src/index.ts");class i extends((0,s.VM)()){editor;_disableStack=new Set;constructor(e){super(),this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",n,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",n),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function n(e){e.return=!1,e.stop()}class r extends((0,s.VM)()){editor;_isEnabledBasedOnSelection;_affectsData;_disableStack;constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.listenTo(e,"change:isReadOnly",(()=>{this.refresh()})),this.on("set:isEnabled",(t=>{if(!this.affectsData)return;const o=e.model.document.selection,s=!("$graveyard"==o.getFirstPosition().root.rootName)&&e.model.canEditAt(o);(e.isReadOnly||this._isEnabledBasedOnSelection&&!s)&&(t.return=!1,t.stop())}),{priority:"highest"}),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",a,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",a),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function a(e){e.return=!1,e.stop()}class c extends r{_childCommandsDefinitions=[];refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){(0,s.Yy)(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find((({command:e})=>e.isEnabled));return e&&e.command}}class l extends((0,s.Mm)()){_context;_plugins=new Map;_availablePlugins;_contextPlugins;constructor(e,t=[],o=[]){super(),this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of o)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new s.Yb("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],o=[]){const i=this,n=this._context;!function e(t,o=new Set){t.forEach((t=>{c(t)&&(o.has(t)||(o.add(t),t.pluginName&&!i._availablePlugins.has(t.pluginName)&&i._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,o)))}))}(e),u(e);const r=[...function e(t,o=new Set){return t.map((e=>c(e)?e:i._availablePlugins.get(e))).reduce(((t,s)=>o.has(s)?t:(o.add(s),s.requires&&(u(s.requires,s),e(s.requires,o).forEach((e=>t.add(e)))),t.add(s))),new Set)}(e.filter((e=>!d(e,t))))];!function(e,t){for(const o of t){if("function"!=typeof o)throw new s.Yb("plugincollection-replace-plugin-invalid-type",null,{pluginItem:o});const t=o.pluginName;if(!t)throw new s.Yb("plugincollection-replace-plugin-missing-name",null,{pluginItem:o});if(o.requires&&o.requires.length)throw new s.Yb("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const n=i._availablePlugins.get(t);if(!n)throw new s.Yb("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const r=e.indexOf(n);if(-1===r){if(i._contextPlugins.has(n))return;throw new s.Yb("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(n.requires&&n.requires.length)throw new s.Yb("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(r,1,o),i._availablePlugins.set(t,o)}}(r,o);const a=r.map((e=>{let t=i._contextPlugins.get(e);return t=t||new e(n),i._add(e,t),t}));return p(a,"init").then((()=>p(a,"afterInit"))).then((()=>a));function c(e){return"function"==typeof e}function l(e){return c(e)&&!!e.isContextPlugin}function d(e,t){return t.some((t=>t===e||(h(e)===t||h(t)===e)))}function h(e){return c(e)?e.pluginName||e.name:e}function u(e,o=null){e.map((e=>c(e)?e:i._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(c(e))return;if(t)throw new s.Yb("plugincollection-soft-required",n,{missingPlugin:e,requiredBy:h(t)});throw new s.Yb("plugincollection-plugin-not-found",n,{plugin:e})}(e,o),function(e,t){if(!l(t))return;if(l(e))return;throw new s.Yb("plugincollection-context-required",n,{plugin:h(e),requiredBy:h(t)})}(e,o),function(e,o){if(!o)return;if(!d(e,t))return;throw new s.Yb("plugincollection-required",n,{plugin:h(e),requiredBy:h(o)})}(e,o)}))}function p(e,t){return e.reduce(((e,o)=>o[t]?i._contextPlugins.has(o)?e:e.then(o[t].bind(o)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const o=e.pluginName;if(o){if(this._plugins.has(o))throw new s.Yb("plugincollection-plugin-name-conflict",null,{pluginName:o,plugin1:this._plugins.get(o).constructor,plugin2:e});this._plugins.set(o,t)}}}class d{config;plugins;locale;t;editors;static defaultConfig;static builtinPlugins;_contextOwner=null;constructor(e){const{translations:t,...o}=e||{};this.config=new s.TS(o,this.constructor.defaultConfig);const i=this.constructor.builtinPlugins;this.config.define("plugins",i),this.plugins=new l(this,i);const n=this.config.get("language")||{};this.locale=new s.hT({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content"),translations:t}),this.t=this.locale.t,this.editors=new s.pM}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const o of e.concat(t)){if("function"!=typeof o)throw new s.Yb("context-initplugins-constructor-only",null,{Plugin:o});if(!0!==o.isContextPlugin)throw new s.Yb("context-initplugins-invalid-plugin",null,{Plugin:o})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new s.Yb("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const o=new this(e);t(o.initPlugins().then((()=>o)))}))}}class h extends((0,s.VM)()){context;constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}class u extends s.EP{editor;constructor(e){super(),this.editor=e}set(e,t,o={}){if("string"==typeof t){const e=t;t=(t,o)=>{this.editor.execute(e),o()}}super.set(e,t,o)}}var p=o("./packages/ckeditor5-engine/src/index.ts"),m=o("./packages/ckeditor5-watchdog/src/index.ts");class f{_commands;constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const o=this.get(e);if(!o)throw new s.Yb("commandcollection-command-not-found",this,{commandName:e});return o.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}const g="contentEditing",_="common";class b{keystrokeInfos=new Map;_editor;constructor(e){this._editor=e;const t=e.config.get("menuBar.isVisible"),o=e.locale.t;this.addKeystrokeInfoCategory({id:g,label:o("Content editing keystrokes"),description:o("These keyboard shortcuts allow for quick access to content editing features.")});const s=[{label:o("Close contextual balloons, dropdowns, and dialogs"),keystroke:"Esc"},{label:o("Open the accessibility help dialog"),keystroke:"Alt+0"},{label:o("Move focus between form fields (inputs, buttons, etc.)"),keystroke:[["Tab"],["Shift+Tab"]]},{label:o("Move focus to the toolbar, navigate between toolbars"),keystroke:"Alt+F10",mayRequireFn:!0},{label:o("Navigate through the toolbar or menu bar"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]},{label:o("Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content."),keystroke:[["Enter"],["Space"]]}];t&&s.push({label:o("Move focus to the menu bar, navigate between menu bars"),keystroke:"Alt+F9",mayRequireFn:!0}),this.addKeystrokeInfoCategory({id:"navigation",label:o("User interface and content navigation keystrokes"),description:o("Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface."),groups:[{id:"common",keystrokes:s}]})}addKeystrokeInfoCategory({id:e,label:t,description:o,groups:s}){this.keystrokeInfos.set(e,{id:e,label:t,description:o,groups:new Map}),this.addKeystrokeInfoGroup({categoryId:e,id:_}),s&&s.forEach((t=>{this.addKeystrokeInfoGroup({categoryId:e,...t})}))}addKeystrokeInfoGroup({categoryId:e=g,id:t,label:o,keystrokes:i}){const n=this.keystrokeInfos.get(e);if(!n)throw new s.Yb("accessibility-unknown-keystroke-info-category",this._editor,{groupId:t,categoryId:e});n.groups.set(t,{id:t,label:o,keystrokes:i||[]})}addKeystrokeInfos({categoryId:e=g,groupId:t=_,keystrokes:o}){if(!this.keystrokeInfos.has(e))throw new s.Yb("accessibility-unknown-keystroke-info-category",this._editor,{categoryId:e,keystrokes:o});const i=this.keystrokeInfos.get(e);if(!i.groups.has(t))throw new s.Yb("accessibility-unknown-keystroke-info-group",this._editor,{groupId:t,categoryId:e,keystrokes:o});i.groups.get(t).keystrokes.push(...o)}}class k extends((0,s.VM)()){accessibility;commands;config;conversion;data;editing;locale;model;plugins;keystrokes;t;static defaultConfig;static builtinPlugins;_context;_readOnlyLocks;constructor(e={}){super();const t=this.constructor,{translations:o,...i}=t.defaultConfig||{},{translations:n=o,...r}=e,a=e.language||i.language;this._context=e.context||new d({language:a,translations:n}),this._context._addEditor(this,!e.context);const c=Array.from(t.builtinPlugins||[]);this.config=new s.TS(r,i),this.config.define("plugins",c),this.config.define(this._context._getEditorConfig()),this.plugins=new l(this,c,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new f,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new p.Kx,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const h=new p.tG;this.data=new p.P3(this.model,h),this.editing=new p.L_(this.model,h),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new p.dY([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new u(this),this.keystrokes.listenTo(this.editing.view.document),this.accessibility=new b(this)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new s.Yb("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new s.Yb("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new s.Yb("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}setData(e){this.data.set(e)}getData(e){return this.data.get(e)}initPlugins(){const e=this.config,t=e.get("plugins"),o=e.get("removePlugins")||[],s=e.get("extraPlugins")||[],i=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(s),o,i)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){s.Yb.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}static Context=d;static EditorWatchdog=m.VJ;static ContextWatchdog=m.Zd}var w=o("./node_modules/lodash-es/isFunction.js");function v(e){if(!(0,w.A)(e.updateSourceElement))throw new s.Yb("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(function(e){return!!e&&"textarea"===e.tagName.toLowerCase()}(t)&&t.form){let o;const s=t.form,i=()=>e.updateSourceElement();(0,w.A)(s.submit)&&(o=s.submit,s.submit=()=>{i(),o.apply(s)}),s.addEventListener("submit",i),e.on("destroy",(()=>{s.removeEventListener("submit",i),o&&(s.submit=o)}))}}function y(e){return e}function x(e){return class extends e{sourceElement;updateSourceElement(e){if(!this.sourceElement)throw new s.Yb("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),o=this.sourceElement instanceof HTMLTextAreaElement;if(!t&&!o)return void(0,s.C_)(this.sourceElement,"");const i="string"==typeof e?e:this.data.get();(0,s.C_)(this.sourceElement,i)}}}function A(e,t){if(t.ckeditorInstance)throw new s.Yb("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}x.updateSourceElement=x(Object).prototype.updateSourceElement;class C extends h{_actions;static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new s.pM({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new s.Yb("pendingactions-add-invalid-message",this);const t=new((0,s.VM)());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const T={bold:'',cancel:'',caption:'',check:'',cog:'',colorPalette:'',eraser:'',history:'',image:'',imageUpload:'',imageAssetManager:'',imageUrl:'',lowVision:'',textAlternative:'',loupe:'',previousArrow:'',nextArrow:'',importExport:'',paragraph:'',plus:'',text:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeCustom:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:'',quote:'',threeVerticalDots:'',dragIndicator:'',redo:'',undo:'',bulletedList:'',numberedList:'',todoList:'',codeBlock:'',browseFiles:'',heading1:'',heading2:'',heading3:'',heading4:'',heading5:'',heading6:'',horizontalLine:'',html:'',indent:'',outdent:'',table:''}},"./packages/ckeditor5-engine/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{Zq:()=>me,ML:()=>Ss,cJ:()=>re,Re:()=>Ri,dY:()=>hs,P3:()=>ds,_v:()=>yt,kB:()=>di,oi:()=>ao,P$:()=>it,FY:()=>dt,$A:()=>ht,zN:()=>Ce,L_:()=>Ho,gK:()=>Pt,Hg:()=>jt,vp:()=>kt,BZ:()=>oi,q6:()=>ls,ZG:()=>As,m8:()=>Ks,Oo:()=>so,m4:()=>Es,PN:()=>C,GY:()=>Ts,Kx:()=>Oi,q$:()=>ji,hW:()=>xs,fS:()=>Ms,nu:()=>ct,cr:()=>Is,yX:()=>Dt,Q6:()=>$t,EZ:()=>Os,A4:()=>Ke,gf:()=>Vs,at:()=>Rs,_A:()=>Cs,DG:()=>$,tG:()=>W,Yi:()=>Tt,EY:()=>Vt,Qo:()=>Rt,rU:()=>It,Wq:()=>Ii,UJ:()=>me,xQ:()=>G,Vg:()=>pe,f5:()=>Ae,OQ:()=>J,m2:()=>K,Vt:()=>_e,aZ:()=>ye,Un:()=>Q,HQ:()=>y,u$:()=>ee,cw:()=>ke,ib:()=>ms,XI:()=>Bn,vQ:()=>Sn,IG:()=>Fn,kF:()=>Vn,je:()=>Dn,JV:()=>Mn,aU:()=>Nn,_$:()=>On,D0:()=>dn,v7:()=>hn,vt:()=>vn,mC:()=>yn,Kc:()=>h,JT:()=>d,qE:()=>an,rC:()=>rn,QS:()=>nn,SH:()=>Z,gz:()=>cn,M1:()=>ln,YU:()=>p,s5:()=>tn,_o:()=>$i,Vq:()=>Ki,ew:()=>qi,fp:()=>Gi,E:()=>Qi,Cd:()=>Ji,mv:()=>sn,$0:()=>m,Zu:()=>u,_j:()=>Ls});var s=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=o.n(s),n=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css"),r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i()(n.A,r);n.A.locals;var a=o("./packages/ckeditor5-utils/src/index.ts");const c=new WeakMap;let l=!1;function d({view:e,element:t,text:o,isDirectHost:s=!0,keepOnFocus:i=!1}){const n=e.document;function r(o){c.get(n).set(t,{text:o,isDirectHost:s,keepOnFocus:i,hostElement:s?t:null}),e.change((e=>f(n,e)))}c.has(n)||(c.set(n,new Map),n.registerPostFixer((e=>f(n,e))),n.on("change:isComposing",(()=>{e.change((e=>f(n,e)))}),{priority:"high"})),t.is("editableElement")&&t.on("change:placeholder",((e,t,o)=>{r(o)})),t.placeholder?r(t.placeholder):o&&r(o),o&&function(){l||(0,a.FF)("enableplaceholder-deprecated-text-option");l=!0}()}function h(e,t){const o=t.document;c.has(o)&&e.change((e=>{const s=c.get(o),i=s.get(t);e.removeAttribute("data-placeholder",i.hostElement),p(e,i.hostElement),s.delete(t)}))}function u(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}function p(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function m(e,t){if(!e.isAttached())return!1;if(Array.from(e.getChildren()).some((e=>!e.is("uiElement"))))return!1;const o=e.document,s=o.selection.anchor;return(!o.isComposing||!s||s.parent!==e)&&(!!t||(!o.isFocused||!!s&&s.parent!==e))}function f(e,t){const o=c.get(e),s=[];let i=!1;for(const[e,n]of o)n.isDirectHost&&(s.push(e),g(t,e,n)&&(i=!0));for(const[e,n]of o){if(n.isDirectHost)continue;const o=_(e);o&&(s.includes(o)||(n.hostElement=o,g(t,e,n)&&(i=!0)))}return i}function g(e,t,o){const{text:s,isDirectHost:i,hostElement:n}=o;let r=!1;n.getAttribute("data-placeholder")!==s&&(e.setAttribute("data-placeholder",s,n),r=!0);return(i||1==t.childCount)&&m(n,o.keepOnFocus)?u(e,n)&&(r=!0):p(e,n)&&(r=!0),r}function _(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}class b{is(){throw new Error("is() method is abstract")}}var k=o("./node_modules/lodash-es/_baseClone.js");const w=function(e){return(0,k.A)(e,4)};class v extends((0,a.Mm)(b)){document;parent;constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new a.Yb("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),s=e.getAncestors(t);let i=0;for(;o[i]==s[i]&&o[i];)i++;return 0===i?null:o[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),s=(0,a.ww)(t,o);switch(s){case"prefix":return!0;case"extension":return!1;default:return t[s]e.data.length)throw new a.Yb("view-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.data.length)throw new a.Yb("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let o=e.includeSelf?this.textNode:this.parent;for(;null!==o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}}x.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};var A=o("./node_modules/lodash-es/isPlainObject.js");class C{_patterns=[];constructor(...e){this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const o=T(t,e);if(o)return{element:t,pattern:e,match:o}}return null}matchAll(...e){const t=[];for(const o of e)for(const e of this._patterns){const s=T(o,e);s&&t.push({element:o,pattern:e,match:s})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function T(e,t){if("function"==typeof t)return t(e);const o={};return t.name&&(o.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!o.name)||t.attributes&&(o.attributes=function(e,t){const o=new Set(t.getAttributeKeys());(0,A.A)(e)?(void 0!==e.style&&(0,a.FF)("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&(0,a.FF)("matcher-pattern-deprecated-attributes-class-key",e)):(o.delete("style"),o.delete("class"));return E(e,o,(e=>t.getAttribute(e)))}(t.attributes,e),!o.attributes)||t.classes&&(o.classes=function(e,t){return E(e,t.getClassNames(),(()=>{}))}(t.classes,e),!o.classes)||t.styles&&(o.styles=function(e,t){return E(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!o.styles)?null:o}function E(e,t,o){const s=function(e){if(Array.isArray(e))return e.map((e=>(0,A.A)(e)?(void 0!==e.key&&void 0!==e.value||(0,a.FF)("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]));if((0,A.A)(e))return Object.entries(e);return[[e,!0]]}(e),i=Array.from(t),n=[];if(s.forEach((([e,t])=>{i.forEach((s=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,s)&&function(e,t,o){if(!0===e)return!0;const s=o(t);return e===s||e instanceof RegExp&&!!String(s).match(e)}(t,s,o)&&n.push(s)}))})),s.length&&!(n.lengthi?0:i+t),(o=o>i?i:o)<0&&(o+=i),i=t>o?0:o-t>>>0,t>>>=0;for(var n=Array(i);++st===e));return Array.isArray(t)}set(e,t){if((0,P.A)(e))for(const[t,o]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,o,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=q(e);B(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this.getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!(0,P.A)(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this.getStylesEntries().map((([e])=>e))}clear(){this._styles={}}getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const o of t)e.push(...this._styleProcessor.getReducedForm(o,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const o=t.splice(0,t.length-1).join("."),s=(0,D.A)(this._styles,o);if(!s)return;!Object.keys(s).length&&this.remove(o)}}class W{_normalizers;_extractors;_reducers;_consumables;constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,o){if((0,P.A)(t))U(o,q(e),t);else if(this._normalizers.has(e)){const s=this._normalizers.get(e),{path:i,value:n}=s(t);U(o,i,n)}else U(o,e,t)}getNormalized(e,t){if(!e)return(0,N.A)({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const o=this._extractors.get(e);if("string"==typeof o)return(0,D.A)(t,o);const s=o(e,t);if(s)return s}return(0,D.A)(t,q(e))}getReducedForm(e,t){const o=this.getNormalized(e,t);if(void 0===o)return[];if(this._reducers.has(e)){return this._reducers.get(e)(o)}return[[e,o]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const o=this.getNormalized(t,e);return o&&"object"==typeof o?Object.keys(o).length:o})),o=new Set([...t,...Object.keys(e)]);return Array.from(o)}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const o of t)this._mapStyleNames(o,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function q(e){return e.replace("-",".")}function U(e,t,o){let s=o;(0,P.A)(o)&&(s=(0,N.A)({},(0,D.A)(e,t),o)),H(e,t,s)}class K extends v{name;_unsafeAttributesToRender=[];_attrs;_children;_classes;_styles;_customProperties=new Map;constructor(e,t,o,s){if(super(e),this.name=t,this._attrs=function(e){const t=(0,a.av)(e);for(const[e,o]of t)null===o?t.delete(e):"string"!=typeof o&&t.set(e,String(o));return t}(o),this._children=[],s&&this._insertChild(0,s),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Y(this._classes,e),this._attrs.delete("class")}this._styles=new $(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof K))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,o]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==o)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new C(...e);let o=this.parent;for(;o&&!o.is("documentFragment");){if(t.match(o))return o;o=o.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),o=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==o?"":` ${o}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const o of this.getChildren())t.push(o._clone(e));const o=new this.constructor(this.document,this.name,this._attrs,t);return o._classes=new Set(this._classes),o._styles.set(this._styles.getNormalized()),o._customProperties=new Map(this._customProperties),o.getFillerOffset=this.getFillerOffset,o._unsafeAttributesToRender=this._unsafeAttributesToRender,o}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let o=0;const s=function(e,t){if("string"==typeof t)return[new y(e,t)];(0,a.xZ)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new y(e,t):t instanceof x?new y(e,t.data):t))}(this.document,t);for(const t of s)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of(0,a.$r)(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of(0,a.$r)(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of(0,a.$r)(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function Y(e,t){const o=t.split(/\s+/);e.clear(),o.forEach((t=>e.add(t)))}K.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class G extends K{constructor(e,t,o,s){super(e,t,o,s),this.getFillerOffset=Z}}function Z(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}G.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class J extends((0,a.VM)(G)){constructor(e,t,o,s){super(e,t,o,s),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}J.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const X=Symbol("rootName");class Q extends J{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(X)}set rootName(e){this._setCustomProperty(X,e)}set _name(e){this.name=e}}Q.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class ee{direction;boundaries;singleCharacters;shallow;ignoreElementEnd;_position;_boundaryStartParent;_boundaryEndParent;constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new a.Yb("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new a.Yb("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=te._createAt(e.startPosition):this._position=te._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o;do{o=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&e.offset===o.childCount)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let s;if(o instanceof y){if(e.isAtEnd)return this._position=te._createAfter(o),this._next();s=o.data[e.offset]}else s=o.getChild(e.offset);if(s instanceof K){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(e))return{done:!0,value:void 0};e.offset++}else e=new te(s,0);return this._position=e,this._formatReturnValue("elementStart",s,t,e,1)}if(s instanceof y){if(this.singleCharacters)return e=new te(s,0),this._position=e,this._next();let o,i=s.data.length;return s==this._boundaryEndParent?(i=this.boundaries.end.offset,o=new x(s,0,i),e=te._createAfter(o)):(o=new x(s,0,s.data.length),e.offset++),this._position=e,this._formatReturnValue("text",o,t,e,i)}if("string"==typeof s){let s;if(this.singleCharacters)s=1;else{s=(o===this._boundaryEndParent?this.boundaries.end.offset:o.data.length)-e.offset}const i=new x(o,e.offset,s);return e.offset+=s,this._position=e,this._formatReturnValue("text",i,t,e,s)}return e=te._createAfter(o),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",o,t,e)}_previous(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&0===e.offset)return{done:!0,value:void 0};if(o==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let s;if(o instanceof y){if(e.isAtStart)return this._position=te._createBefore(o),this._previous();s=o.data[e.offset-1]}else s=o.getChild(e.offset-1);if(s instanceof K)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",s,t,e,1)):(e=new te(s,s.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",s,t,e));if(s instanceof y){if(this.singleCharacters)return e=new te(s,s.data.length),this._position=e,this._previous();let o,i=s.data.length;if(s==this._boundaryStartParent){const t=this.boundaries.start.offset;o=new x(s,t,s.data.length-t),i=o.data.length,e=te._createBefore(o)}else o=new x(s,0,s.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",o,t,e,i)}if("string"==typeof s){let s;if(this.singleCharacters)s=1;else{const t=o===this._boundaryStartParent?this.boundaries.start.offset:0;s=e.offset-t}e.offset-=s;const i=new x(o,e.offset,s);return this._position=e,this._formatReturnValue("text",i,t,e,s)}return e=te._createBefore(o),this._position=e,this._formatReturnValue("elementStart",o,t,e,1)}_formatReturnValue(e,t,o,s,i){return t instanceof x&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?o=te._createAfter(t.textNode):(s=te._createAfter(t.textNode),this._position=s)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?o=te._createBefore(t.textNode):(s=te._createBefore(t.textNode),this._position=s))),{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:s,length:i}}}}class te extends b{parent;offset;constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof J);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=te._createAt(this),o=t.offset+e;return t.offset=o<0?0:o,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const o=new ee(t);return o.skip(e),o.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),o=e.getAncestors();let s=0;for(;t[s]==o[s]&&t[s];)s++;return 0===s?null:t[s-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],o=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),o.push(e.offset);const s=(0,a.ww)(t,o);switch(s){case"prefix":return"before";case"extension":return"after";default:return t[s]0?new this(o,s):new this(s,o)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(te._createBefore(e),t)}}function se(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}oe.prototype.is=function(e){return"range"===e||"view:range"===e};class ie extends((0,a.Mm)(b)){_ranges;_lastRangeBackward;_isFake;_fakeSelectionLabel;constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const s of e._ranges)if(t.isEqual(s)){o=!0;break}if(!o)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=(0,a.U9)(this.getRanges());if(t!=(0,a.U9)(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let o=!1;for(let s of e.getRanges())if(s=s.getTrimmed(),t.start.isEqual(s.start)&&t.end.isEqual(s.end)){o=!0;break}if(!o)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,o,s]=e;if("object"==typeof o&&(s=o,o=void 0),null===t)this._setRanges([]),this._setFakeOptions(s);else if(t instanceof ie||t instanceof ne)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof oe)this._setRanges([t],s&&s.backward),this._setFakeOptions(s);else if(t instanceof te)this._setRanges([new oe(t)]),this._setFakeOptions(s);else if(t instanceof v){const e=!!s&&!!s.backward;let i;if(void 0===o)throw new a.Yb("view-selection-setto-required-second-parameter",this);i="in"==o?oe._createIn(t):"on"==o?oe._createOn(t):new oe(te._createAt(t,o)),this._setRanges([i],e),this._setFakeOptions(s)}else{if(!(0,a.xZ)(t))throw new a.Yb("view-selection-setto-not-selectable",this);this._setRanges(t,s&&s.backward),this._setFakeOptions(s)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new a.Yb("view-selection-setfocus-no-ranges",this);const o=te._createAt(e,t);if("same"==o.compareWith(this.focus))return;const s=this.anchor;this._ranges.pop(),"before"==o.compareWith(s)?this._addRange(new oe(o,s),!0):this._addRange(new oe(s,o)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof oe))throw new a.Yb("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new a.Yb("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new oe(e.start,e.end))}}ie.prototype.is=function(e){return"selection"===e||"view:selection"===e};class ne extends((0,a.Mm)(b)){_selection;constructor(...e){super(),this._selection=new ie,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}ne.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class re extends a.vY{startRange;_eventPhase;_currentTarget;constructor(e,t,o){super(e,t),this.startRange=o,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const ae=Symbol("bubbling contexts");function ce(e){return class extends e{fire(e,...t){try{const o=e instanceof a.vY?e:new a.vY(this,e),s=ue(this);if(!s.size)return;if(le(o,"capturing",this),de(s,"$capture",o,...t))return o.return;const i=o.startRange||this.selection.getFirstRange(),n=i?i.getContainedElement():null,r=!!n&&Boolean(he(s,n));let c=n||function(e){if(!e)return null;const t=e.start.parent,o=e.end.parent,s=t.getPath(),i=o.getPath();return s.length>i.length?t:o}(i);if(le(o,"atTarget",c),!r){if(de(s,"$text",o,...t))return o.return;le(o,"bubbling",c)}for(;c;){if(c.is("rootElement")){if(de(s,"$root",o,...t))return o.return}else if(c.is("element")&&de(s,c.name,o,...t))return o.return;if(de(s,c,o,...t))return o.return;c=c.parent,le(o,"bubbling",c)}return le(o,"bubbling",this),de(s,"$document",o,...t),o.return}catch(e){a.Yb.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,o){const s=(0,a.$r)(o.context||"$document"),i=ue(this);for(const n of s){let s=i.get(n);s||(s=new((0,a.Mm)()),i.set(n,s)),this.listenTo(s,e,t,o)}}_removeEventListener(e,t){const o=ue(this);for(const s of o.values())this.stopListening(s,e,t)}}}{const e=ce(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{ce[t]=e.prototype[t]}))}function le(e,t,o){e instanceof re&&(e._eventPhase=t,e._currentTarget=o)}function de(e,t,o,...s){const i="string"==typeof t?e.get(t):he(e,t);return!!i&&(i.fire(o,...s),o.stop.called)}function he(e,t){for(const[o,s]of e)if("function"==typeof o&&o(t))return s;return null}function ue(e){return e[ae]||(e[ae]=new Map),e[ae]}class pe extends(ce((0,a.VM)())){selection;roots;stylesProcessor;_postFixers=new Set;constructor(e){super(),this.selection=new ne,this.roots=new a.pM({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.forEach((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(t=o(e),t)break}while(t)}}class me extends K{static DEFAULT_PRIORITY=10;_priority=10;_id=null;_clonesGroup=null;constructor(e,t,o,s){super(e,t,o,s),this.getFillerOffset=fe}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new a.Yb("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function fe(){if(ge(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(ge(e)>1)return null;e=e.parent}return!e||ge(e)>1?null:this.childCount}function ge(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}me.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class _e extends K{constructor(e,t,o,s){super(e,t,o,s),this.getFillerOffset=be}_insertChild(e,t){if(t&&(t instanceof v||Array.from(t).length>0))throw new a.Yb("view-emptyelement-cannot-add",[this,t]);return 0}}function be(){return null}_e.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class ke extends K{constructor(e,t,o,s){super(e,t,o,s),this.getFillerOffset=ve}_insertChild(e,t){if(t&&(t instanceof v||Array.from(t).length>0))throw new a.Yb("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function we(e){e.document.on("arrowKey",((t,o)=>function(e,t,o){if(t.keyCode==a.uP.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),s=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(s||t.shiftKey){const t=e.focusNode,i=e.focusOffset,n=o.domPositionToView(t,i);if(null===n)return;let r=!1;const a=n.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(r=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(r){const t=o.viewPositionToDom(a);s?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,o,e.domConverter)),{priority:"low"})}function ve(){return null}ke.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class ye extends K{constructor(e,t,o,s){super(e,t,o,s),this.getFillerOffset=xe}_insertChild(e,t){if(t&&(t instanceof v||Array.from(t).length>0))throw new a.Yb("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function xe(){return null}ye.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ae extends((0,a.Mm)(b)){document;_children=[];_customProperties=new Map;constructor(e,t){super(),this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}get getFillerOffset(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let o=0;const s=function(e,t){if("string"==typeof t)return[new y(e,t)];(0,a.xZ)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new y(e,t):t instanceof x?new y(e,t.data):t))}(this.document,t);for(const t of s)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o{const o=e[e.length-1],s=!t.is("uiElement");return o&&o.breakAttributes==s?o.nodes.push(t):e.push({breakAttributes:s,nodes:[t]}),e}),[]);let s=null,i=e;for(const{nodes:e,breakAttributes:t}of o){const o=this._insertNodes(i,e,t);s||(s=o.start),i=o.end}return s?new oe(s,i):new oe(e)}remove(e){const t=e instanceof oe?e:oe._createOn(e);if(je(t,this.document),t.isCollapsed)return new Ae(this.document);const{start:o,end:s}=this._breakAttributesRange(t,!0),i=o.parent,n=s.offset-o.offset,r=i._removeChildren(o.offset,n);for(const e of r)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(o);return t.start=a,t.end=a.clone(),new Ae(this.document,r)}clear(e,t){je(e,this.document);const o=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const s of o){const o=s.item;let i;if(o.is("element")&&t.isSimilar(o))i=oe._createOn(o);else if(!s.nextPosition.isAfter(e.start)&&o.is("$textProxy")){const e=o.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(i=oe._createIn(e))}i&&(i.end.isAfter(e.end)&&(i.end=e.end),i.start.isBefore(e.start)&&(i.start=e.start),this.remove(i))}}move(e,t){let o;if(t.isAfter(e.end)){const s=(t=this._breakAttributes(t,!0)).parent,i=s.childCount;e=this._breakAttributesRange(e,!0),o=this.remove(e),t.offset+=s.childCount-i}else o=this.remove(e);return this.insert(t,o)}wrap(e,t){if(!(t instanceof me))throw new a.Yb("view-writer-wrap-invalid-attribute",this.document);if(je(e,this.document),e.isCollapsed){let s=e.start;s.parent.is("element")&&(o=s.parent,!Array.from(o.getChildren()).some((e=>!e.is("uiElement"))))&&(s=s.getLastMatchingPosition((e=>e.item.is("uiElement")))),s=this._wrapPosition(s,t);const i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(e.start)&&this.setSelection(s),new oe(s)}return this._wrapRange(e,t);var o}unwrap(e,t){if(!(t instanceof me))throw new a.Yb("view-writer-unwrap-invalid-attribute",this.document);if(je(e,this.document),e.isCollapsed)return e;const{start:o,end:s}=this._breakAttributesRange(e,!0),i=o.parent,n=this._unwrapChildren(i,o.offset,s.offset,t),r=this.mergeAttributes(n.start);r.isEqual(n.start)||n.end.offset--;const c=this.mergeAttributes(n.end);return new oe(r,c)}rename(e,t){const o=new G(this.document,e,t.getAttributes());return this.insert(te._createAfter(t),o),this.move(oe._createIn(t),te._createAt(o,0)),this.remove(oe._createOn(t)),o}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return te._createAt(e,t)}createPositionAfter(e){return te._createAfter(e)}createPositionBefore(e){return te._createBefore(e)}createRange(e,t){return new oe(e,t)}createRangeOn(e){return oe._createOn(e)}createRangeIn(e){return oe._createIn(e)}createSelection(...e){return new ie(...e)}createSlot(e="children"){if(!this._slotFactory)throw new a.Yb("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,o){let s,i;if(s=o?Te(e):e.parent.is("$text")?e.parent.parent:e.parent,!s)throw new a.Yb("view-writer-invalid-position-container",this.document);i=o?this._breakAttributes(e,!0):e.parent.is("$text")?Se(e):e;const n=s._insertChild(i.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const r=i.getShiftedBy(n),c=this.mergeAttributes(i);c.isEqual(i)||r.offset--;const l=this.mergeAttributes(r);return new oe(c,l)}_wrapChildren(e,t,o,s){let i=t;const n=[];for(;i!1,e.parent._insertChild(e.offset,o);const s=new oe(e,e.getShiftedBy(1));this.wrap(s,t);const i=new te(o.parent,o.index);o._remove();const n=i.nodeBefore,r=i.nodeAfter;return n instanceof y&&r instanceof y?Me(n,r):Pe(i)}_wrapAttributeElement(e,t){if(!Ie(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&t.hasAttribute(o)&&t.getAttribute(o)!==e.getAttribute(o))return!1;for(const o of e.getStyleNames())if(t.hasStyle(o)&&t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&(t.hasAttribute(o)||this.setAttribute(o,e.getAttribute(o),t));for(const o of e.getStyleNames())t.hasStyle(o)||this.setStyle(o,e.getStyle(o),t);for(const o of e.getClassNames())t.hasClass(o)||this.addClass(o,t);return!0}_unwrapAttributeElement(e,t){if(!Ie(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&(!t.hasAttribute(o)||t.getAttribute(o)!==e.getAttribute(o)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const o of e.getStyleNames())if(!t.hasStyle(o)||t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&this.removeAttribute(o,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const o=e.start,s=e.end;if(je(e,this.document),e.isCollapsed){const o=this._breakAttributes(e.start,t);return new oe(o,o)}const i=this._breakAttributes(s,t),n=i.parent.childCount,r=this._breakAttributes(o,t);return i.offset+=i.parent.childCount-n,new oe(r,i)}_breakAttributes(e,t=!1){const o=e.offset,s=e.parent;if(e.parent.is("emptyElement"))throw new a.Yb("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new a.Yb("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new a.Yb("view-writer-cannot-break-raw-element",this.document);if(!t&&s.is("$text")&&Re(s.parent))return e.clone();if(Re(s))return e.clone();if(s.is("$text"))return this._breakAttributes(Se(e),t);if(o==s.childCount){const e=new te(s.parent,s.index+1);return this._breakAttributes(e,t)}if(0===o){const e=new te(s.parent,s.index);return this._breakAttributes(e,t)}{const e=s.index+1,i=s._clone();s.parent._insertChild(e,i),this._addToClonedElementsGroup(i);const n=s.childCount-o,r=s._removeChildren(o,n);i._appendChild(r);const a=new te(s.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let o=this._cloneGroups.get(t);o||(o=new Set,this._cloneGroups.set(t,o)),o.add(e),e._clonesGroup=o}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const o=this._cloneGroups.get(t);o&&o.delete(e)}}function Te(e){let t=e.parent;for(;!Re(t);){if(!t)return;t=t.parent}return t}function Ee(e,t){return e.priorityt.priority)&&e.getIdentity()o instanceof e)))throw new a.Yb("view-writer-insert-invalid-node-type",t);o.is("$text")||Ve(o.getChildren(),t)}}function Re(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function je(e,t){const o=Te(e.start),s=Te(e.end);if(!o||!s||o!==s)throw new a.Yb("view-writer-invalid-range-container",t)}function Ie(e,t){return null===e.id&&null===t.id}const Be=e=>e.createTextNode(" "),De=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},Ne=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},Fe=7,Le="⁠".repeat(Fe);function ze(e){return"string"==typeof e?e.substr(0,Fe)===Le:(0,a.KH)(e)&&e.data.substr(0,Fe)===Le}function He(e){return e.data.length==Fe&&ze(e)}function $e(e){const t="string"==typeof e?e:e.data;return ze(e)?t.slice(Fe):t}function We(e,t){if(t.keyCode==a.uP.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,o=e.getRangeAt(0).startOffset;ze(t)&&o<=Fe&&e.collapse(t,0)}}}var qe=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css"),Ue={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i()(qe.A,Ue);qe.A.locals;class Ke extends((0,a.VM)()){domDocuments=new Set;domConverter;markedAttributes=new Set;markedChildren=new Set;markedTexts=new Set;selection;_inlineFiller=null;_fakeSelectionContainer=null;constructor(e,t){super(),this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),a._K.isBlink&&!a._K.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e){throw new a.Yb("view-renderer-unknown-type",this)}this.markedChildren.add(t)}}}render(){if(this.isComposing&&!a._K.isAndroid)return;let e=null;const t=!(a._K.isBlink&&!a._K.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=te._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),o=t.parent.ownerDocument;ze(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=Ye(o,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.domConverter._clearTemporaryCustomProperties(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const o=Array.from(t.childNodes),s=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),i=this._diffNodeLists(o,s),n=this._findUpdateActions(i,o,s,Ge);if(-1!==n.indexOf("update")){const t={equal:0,insert:0,delete:0};for(const i of n)if("update"===i){const i=t.equal+t.insert,n=t.equal+t.delete,r=e.getChild(i);!r||r.is("uiElement")||r.is("rawElement")||this._updateElementMappings(r,o[n]),(0,a.TF)(s[i]),t.equal++}else t[i]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?te._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&(0,a.KH)(t.parent)&&ze(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!ze(e))throw new a.Yb("view-renderer-filler-was-lost",this);He(e)?e.remove():e.data=e.data.substr(Fe),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,o=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;const s=e.nodeBefore,i=e.nodeAfter;return!(s instanceof y||i instanceof y)&&(!!(o!==t.getFillerOffset()||s&&s.is("element","br"))&&(!a._K.isAndroid||!s&&!i))}_updateText(e,t){const o=this.domConverter.findCorrespondingDomText(e);let s=this.domConverter.viewToDom(e).data;const i=t.inlineFillerPosition;i&&i.parent==e.parent&&i.offset==e.index&&(s=Le+s),Xe(o,s)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const o=Array.from(t.attributes).map((e=>e.name)),s=e.getAttributeKeys();for(const o of s)this.domConverter.setDomElementAttribute(t,o,e.getAttribute(o),e);for(const s of o)e.hasAttribute(s)||this.domConverter.removeDomElementAttribute(t,s)}_updateChildren(e,t){const o=this.domConverter.mapViewToDom(e);if(!o)return;if(a._K.isAndroid){let e=null;for(const t of Array.from(o.childNodes)){if(e&&(0,a.KH)(e)&&(0,a.KH)(t)){o.normalize();break}e=t}}const s=t.inlineFillerPosition,i=o.childNodes,n=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));s&&s.parent===e&&Ye(o.ownerDocument,n,s.offset);const r=this._diffNodeLists(i,n),c=this._findUpdateActions(r,i,n,Ze);let l=0;const d=new Set;for(const e of c)"delete"===e?(d.add(i[l]),(0,a.TF)(i[l])):"equal"!==e&&"update"!==e||l++;l=0;for(const e of c)"insert"===e?((0,a.PT)(o,l,n[l]),l++):"update"===e?(Xe(i[l],n[l].data),l++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(n[l])),l++);for(const e of d)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const o=Array.from(e);if(0==o.length||!t)return o;const s=o[o.length-1];s==t&&o.pop();return o}(e,this._fakeSelectionContainer),(0,a.Ui)(e,t,Je.bind(null,this.domConverter))}_findUpdateActions(e,t,o,s){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let i=[],n=[],r=[];const c={equal:0,insert:0,delete:0};for(const l of e)"insert"===l?r.push(o[c.equal+c.insert]):"delete"===l?n.push(t[c.equal+c.delete]):(i=i.concat((0,a.Ui)(n,r,s).map((e=>"equal"===e?"update":e))),i.push("equal"),n=[],r=[]),c[l]++;return i.concat((0,a.Ui)(n,r,s).map((e=>"equal"===e?"update":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(a._K.isBlink&&!a._K.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&a._K.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const o=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(o,this.selection),!this._fakeSelectionNeedsUpdate(e))return;o.parentElement&&o.parentElement==e||e.appendChild(o),o.textContent=this.selection.fakeSelectionLabel||" ";const s=t.getSelection(),i=t.createRange();s.removeAllRanges(),i.selectNodeContents(o),s.addRange(i)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const o=this.domConverter.viewPositionToDom(this.selection.anchor),s=this.domConverter.viewPositionToDom(this.selection.focus);t.setBaseAndExtent(o.parent,o.offset,s.parent,s.offset),a._K.isGecko&&function(e,t){let o=e.parent,s=e.offset;(0,a.KH)(o)&&He(o)&&(s=(0,a.qh)(o)+1,o=o.parentNode);if(o.nodeType!=Node.ELEMENT_NODE||s!=o.childNodes.length-1)return;const i=o.childNodes[s];i&&"BR"==i.tagName&&t.addRange(t.getRangeAt(0))}(s,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,o=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(o.anchorNode!==t&&!t.contains(o.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const o=e.activeElement,s=this.domConverter.mapDomToView(o);o&&s&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function Ye(e,t,o){const s=t instanceof Array?t:t.childNodes,i=s[o];if((0,a.KH)(i))return i.data=Le+i.data,i;{const i=e.createTextNode(Le);return Array.isArray(t)?s.splice(o,0,i):(0,a.PT)(t,o,i),i}}function Ge(e,t){return(0,a.Ll)(e)&&(0,a.Ll)(t)&&!(0,a.KH)(e)&&!(0,a.KH)(t)&&!(0,a.Cn)(e)&&!(0,a.Cn)(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function Ze(e,t){return(0,a.Ll)(e)&&(0,a.Ll)(t)&&(0,a.KH)(e)&&(0,a.KH)(t)}function Je(e,t,o){return t===o||((0,a.KH)(t)&&(0,a.KH)(o)?t.data===o.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(o)))}function Xe(e,t){const o=e.data;if(o==t)return;const s=(0,a.Mr)(o,t);for(const t of s)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}const Qe=Ne(a.Sf.document),et=Be(a.Sf.document),tt=De(a.Sf.document),ot="data-ck-unsafe-attribute-",st="data-ck-unsafe-element";class it{document;renderingMode;blockFillerMode;preElements;blockElements;inlineObjectElements;unsafeElements;_domDocument;_domToViewMapping=new WeakMap;_viewToDomMapping=new WeakMap;_fakeSelectionMapping=new WeakMap;_rawContentElementMatcher=new C;_inlineObjectElementMatcher=new C;_elementsWithTemporaryCustomProperties=new Set;constructor(e,{blockFillerMode:t,renderingMode:o="editing"}={}){this.document=e,this.renderingMode=o,this.blockFillerMode=t||("editing"===o?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?a.Sf.document:a.Sf.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new ie(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,o){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===o&&("src"===e||"srcset"===e)||("source"===o&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const o=(new DOMParser).parseFromString(t,"text/html"),s=o.createDocumentFragment(),i=o.body.childNodes;for(;i.length>0;)s.appendChild(i[0]);const n=o.createTreeWalker(s,NodeFilter.SHOW_ELEMENT),r=[];let a;for(;a=n.nextNode();)r.push(a);for(const e of r){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(at(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(s)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{const o=e;if(this.mapViewToDom(o)){if(!o.getCustomProperty("editingPipeline:doNotReuseOnce"))return this.mapViewToDom(o);this._elementsWithTemporaryCustomProperties.add(o)}let s;if(o.is("documentFragment"))s=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(s,o);else{if(o.is("uiElement"))return s="$comment"===o.name?this._domDocument.createComment(o.getCustomProperty("$rawContent")):o.render(this._domDocument,this),t.bind&&this.bindElements(s,o),s;this._shouldRenameElement(o.name)?(at(o.name),s=this._createReplacementDomElement(o.name)):s=o.hasAttribute("xmlns")?this._domDocument.createElementNS(o.getAttribute("xmlns"),o.name):this._domDocument.createElement(o.name),o.is("rawElement")&&o.render(s,this),t.bind&&this.bindElements(s,o);for(const e of o.getAttributeKeys())this.setDomElementAttribute(s,e,o.getAttribute(e),o)}if(!1!==t.withChildren)for(const e of this.viewChildrenToDom(o,t))s instanceof HTMLTemplateElement?s.content.appendChild(e):s.appendChild(e);return s}}setDomElementAttribute(e,t,o,s){const i=this.shouldRenderAttribute(t,o,e.tagName.toLowerCase())||s&&s.shouldRenderUnsafeAttribute(t);i||(0,a.FF)("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:o}),(0,a.i8)(t)?(e.hasAttribute(t)&&!i?e.removeAttribute(t):e.hasAttribute(ot+t)&&i&&e.removeAttribute(ot+t),e.setAttribute(i?t:ot+t,o)):(0,a.FF)("domconverter-invalid-attribute-detected",{domElement:e,key:t,value:o})}removeDomElementAttribute(e,t){t!=st&&(e.removeAttribute(t),e.removeAttribute(ot+t))}*viewChildrenToDom(e,t={}){const o=e.getFillerOffset&&e.getFillerOffset();let s=0;for(const i of e.getChildren()){o===s&&(yield this._getBlockFiller());const e=i.is("element")&&!!i.getCustomProperty("dataPipeline:transparentRendering")&&!(0,a.$1)(i.getAttributes());e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(i,t):(e&&(0,a.FF)("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:i}),yield this.viewToDom(i,t)),s++}o===s&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),o=this.viewPositionToDom(e.end),s=this._domDocument.createRange();return s.setStart(t.parent,t.offset),s.setEnd(o.parent,o.offset),s}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const o=this.findCorrespondingDomText(t);if(!o)return null;let s=e.offset;return ze(o)&&(s+=Fe),{parent:o,offset:s}}{let o,s,i;if(0===e.offset){if(o=this.mapViewToDom(t),!o)return null;i=o.childNodes[0]}else{const t=e.nodeBefore;if(s=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!s)return null;o=s.parentNode,i=s.nextSibling}if((0,a.KH)(i)&&ze(i))return{parent:i,offset:Fe};return{parent:o,offset:s?(0,a.qh)(s)+1:0}}}domToView(e,t={}){const o=[],s=this._domToView(e,t,o),i=s.next().value;return i?(s.next(),this._processDomInlineNodes(null,o,t),i.is("$text")&&0==i.data.length?null:i):null}*domChildrenToView(e,t={},o=[]){let s=[];s=e instanceof HTMLTemplateElement?[...e.content.childNodes]:[...e.childNodes];for(let i=0;i{const{scrollLeft:t,scrollTop:o}=e;s.push([t,o])})),t.focus(),nt(t,(e=>{const[t,o]=s.shift();e.scrollLeft=t,e.scrollTop=o})),a.Sf.window.scrollTo(e,o)}}_clearDomSelection(){const e=this.mapViewToDom(this.document.selection.editableElement);if(!e)return;const t=e.ownerDocument.defaultView.getSelection(),o=this.domSelectionToView(t);o&&o.rangeCount>0&&t.removeAllRanges()}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(Qe):!("BR"!==e.tagName||!rt(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(tt)||function(e,t){const o=e.isEqualNode(et);return o&&rt(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const o=t.collapsed;return t.detach(),o}getHostViewElement(e){const t=(0,a.DS)(e);for(t.pop();t.length;){const e=t.pop(),o=this._domToViewMapping.get(e);if(o&&(o.is("uiElement")||o.is("rawElement")))return o}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}registerInlineObjectMatcher(e){this._inlineObjectElementMatcher.add(e)}_clearTemporaryCustomProperties(){for(const e of this._elementsWithTemporaryCustomProperties)e._removeCustomProperty("editingPipeline:doNotReuseOnce");this._elementsWithTemporaryCustomProperties.clear()}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return Be(this._domDocument);case"markedNbsp":return De(this._domDocument);case"br":return Ne(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if((0,a.KH)(e)&&ze(e)&&t0?t[e-1]:null,c=e+1e.is("element")&&t.includes(e.name)))}(e,this.preElements))return!0;for(const t of e.getAncestors({parentFirst:!0}))if(t.is("element")&&t.hasStyle("white-space")&&"inherit"!==t.getStyle("white-space"))return["pre","pre-wrap","break-spaces"].includes(t.getStyle("white-space"));return!1}_getTouchingInlineViewNode(e,t){const o=new ee({startPosition:t?te._createAfter(e):te._createBefore(e),direction:t?"forward":"backward"});for(const e of o){if(e.item.is("element","br"))return null;if(this._isInlineObjectElement(e.item))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("$textProxy"))return e.item}return null}_isBlockDomElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isBlockViewElement(e){return e.is("element")&&this.blockElements.includes(e.name)}_isInlineObjectElement(e){return!!e.is("element")&&("br"==e.name||this.inlineObjectElements.includes(e.name)||!!this._inlineObjectElementMatcher.match(e))}_createViewElement(e,t){if((0,a.Cn)(e))return new ke(this.document,"$comment");const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new K(this.document,o)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&e.is("element")&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const o=this._domDocument.createElement("span");if(o.setAttribute(st,e),t){for(;t.firstChild;)o.appendChild(t.firstChild);for(const e of t.getAttributeNames())o.setAttribute(e,t.getAttribute(e))}return o}}function nt(e,t){let o=e;for(;o;)t(o),o=o.parentElement}function rt(e,t){const o=e.parentNode;return!!o&&!!o.tagName&&t.includes(o.tagName.toLowerCase())}function at(e){"script"===e&&(0,a.FF)("domconverter-unsafe-script-element-detected"),"style"===e&&(0,a.FF)("domconverter-unsafe-style-element-detected")}class ct extends((0,a.c5)()){view;document;_isEnabled=!1;constructor(e){super(),this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}var lt=o("./node_modules/lodash-es/assignIn.js");class dt{view;document;domEvent;domTarget;constructor(e,t,o){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,(0,lt.A)(this,o)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class ht extends ct{useCapture=!1;observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,o){this.isEnabled&&this.document.fire(e,new dt(this.view,t,o))}}class ut extends ht{domEventType=["keydown","keyup"];onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return(0,a.QC)(this)}};this.fire(e.type,e,t)}}var pt=o("./node_modules/lodash-es/debounce.js");class mt extends ct{_fireSelectionChangeDoneDebounced;constructor(e){super(e),this._fireSelectionChangeDoneDebounced=(0,pt.A)((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&o.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(o.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,o=new ie(t.getRanges(),{backward:t.isBackward,fake:!1});e!=a.uP.arrowleft&&e!=a.uP.arrowup||o.setTo(o.getFirstPosition()),e!=a.uP.arrowright&&e!=a.uP.arrowdown||o.setTo(o.getLastPosition());const s={oldSelection:t,newSelection:o,domSelection:null};this.document.fire("selectionChange",s),this._fireSelectionChangeDoneDebounced(s)}}var ft=o("./node_modules/lodash-es/_baseIsEqual.js");const gt=function(e,t,o){var s=(o="function"==typeof o?o:void 0)?o(e,t):void 0;return void 0===s?(0,ft.A)(e,t,void 0,o):!!s};class _t extends ct{domConverter;renderer;_config;_domElements;_mutationObserver;constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,o=new Set,s=new Set;for(const o of e){const e=t.mapDomToView(o.target);e&&(e.is("uiElement")||e.is("rawElement")||"childList"!==o.type||this._isBogusBrMutation(o)||s.add(e))}for(const i of e){const e=t.mapDomToView(i.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===i.type){const e=t.findCorrespondingViewText(i.target);e&&!s.has(e.parent)?o.add(e):!e&&ze(i.target)&&s.add(t.mapDomToView(i.target.parentNode))}}let i=!1;for(const e of o)i=!0,this.renderer.markToSync("text",e);for(const e of s){const o=t.mapViewToDom(e),s=Array.from(e.getChildren()),n=Array.from(t.domChildrenToView(o,{withChildren:!1}));gt(s,n,bt)||(i=!0,this.renderer.markToSync("children",e))}i&&this.view.forceRender()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}function bt(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}class kt extends ht{_renderTimeoutId;_isFocusChanging=!1;domEventType=["focus","blur"];constructor(e){super(e),this.useCapture=!0;const t=this.document;t.on("focus",(()=>{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),e.change((()=>{}))}),50)})),t.on("blur",((o,s)=>{const i=t.selection.editableElement;null!==i&&i!==s.target||(t.isFocused=!1,this._isFocusChanging=!1,e.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class wt extends ct{mutationObserver;focusObserver;selection;domConverter;_documents;_fireSelectionChangeDoneDebounced;_clearInfiniteLoopInterval;_documentIsSelectingInactivityTimeoutDebounced;_loopbackCounter;constructor(e){super(e),this.mutationObserver=e.getObserver(_t),this.focusObserver=e.getObserver(kt),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=(0,pt.A)((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=(0,pt.A)((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,o=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",o,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",o,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",o,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,o)=>{this.document.isComposing&&!a._K.isAndroid||(this._handleSelectionChange(o,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e,t){if(!this.isEnabled)return;const o=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(o.anchorNode))return;this.mutationObserver.flush();const s=this.domConverter.domSelectionToView(o);if(0!=s.rangeCount){if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.selection.isEqual(s)||!this.domConverter.isDomSelectionCorrect(o))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.selection.isSimilar(s))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:s,domSelection:o};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class vt extends ht{domEventType=["compositionstart","compositionupdate","compositionend"];constructor(e){super(e);const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class yt{_files;_native;constructor(e,t={}){this._files=t.cacheFiles?xt(e):null,this._native=e}get files(){return this._files||(this._files=xt(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,o){this._native.setDragImage(e,t,o)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function xt(e){const t=Array.from(e.files||[]),o=Array.from(e.items||[]);return t.length?t:o.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class At extends ht{domEventType="beforeinput";onDomEvent(e){const t=e.getTargetRanges(),o=this.view,s=o.document;let i=null,n=null,r=[];if(e.dataTransfer&&(i=new yt(e.dataTransfer)),null!==e.data?n=e.data:i&&(n=i.getData("text/plain")),s.selection.isFake)r=Array.from(s.selection.getRanges());else if(t.length)r=t.map((e=>{const t=o.domConverter.domPositionToView(e.startContainer,e.startOffset),s=o.domConverter.domPositionToView(e.endContainer,e.endOffset);return t?o.createRange(t,s):s?o.createRange(s):void 0})).filter((e=>!!e));else if(a._K.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();r=Array.from(o.domConverter.domSelectionToView(t).getRanges())}if(a._K.isAndroid&&"insertCompositionText"==e.inputType&&n&&n.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[o.createRange(r[0].end)]});else if("insertText"==e.inputType&&n&&n.includes("\n")){const t=n.split(/\n{1,2}/g);let o=r;for(let n=0;n{if(this.isEnabled&&(0,a.Yt)(t.keyCode)){const o=new re(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(o,t),o.stop.called&&e.stop()}}))}observe(){}stopObserving(){}}class Tt extends ct{constructor(e){super(e);const t=this.document;t.on("keydown",((e,o)=>{if(!this.isEnabled||o.keyCode!=a.uP.tab||o.ctrlKey)return;const s=new re(t,"tab",t.selection.getFirstRange());t.fire(s,o),s.stop.called&&e.stop()}))}observe(){}stopObserving(){}}var Et=o("./node_modules/lodash-es/cloneDeep.js");class Pt extends((0,a.VM)()){document;domConverter;domRoots=new Map;_renderer;_initialDomRootAttributes=new WeakMap;_observers=new Map;_writer;_ongoingChange=!1;_postFixersInProgress=!1;_renderingDisabled=!1;_hasChangedSinceTheLastRendering=!1;constructor(e){super(),this.document=new pe(e),this.domConverter=new it(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new Ke(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new Ce(this.document),this.addObserver(_t),this.addObserver(kt),this.addObserver(wt),this.addObserver(ut),this.addObserver(mt),this.addObserver(vt),this.addObserver(Ct),this.addObserver(At),this.addObserver(Tt),this.document.on("arrowKey",We,{priority:"low"}),we(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0})),a._K.isiOS&&this.listenTo(this.document,"blur",((e,t)=>{this.domConverter.mapDomToView(t.domEvent.relatedTarget)||this.domConverter._clearDomSelection()}))}attachDomRoot(e,t="main"){const o=this.document.getRoot(t);o._name=e.tagName.toLowerCase();const s={};for(const{name:t,value:i}of Array.from(e.attributes))s[t]=i,"class"===t?this._writer.addClass(i.split(" "),o):this._writer.setAttribute(t,i,o);this._initialDomRootAttributes.set(e,s);const i=()=>{this._writer.setAttribute("contenteditable",(!o.isReadOnly).toString(),o),o.isReadOnly?this._writer.addClass("ck-read-only",o):this._writer.removeClass("ck-read-only",o)};i(),this.domRoots.set(t,e),this.domConverter.bindElements(e,o),this._renderer.markToSync("children",o),this._renderer.markToSync("attributes",o),this._renderer.domDocuments.add(e.ownerDocument),o.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),o.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),o.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),o.on("change:isReadOnly",(()=>this.change(i))),o.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const o of this._observers.values())o.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const o=this._initialDomRootAttributes.get(t);for(const e in o)t.setAttribute(e,o[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,o]of this.domRoots)t.observe(o,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:o=20,ancestorOffset:s=20}={}){const i=this.document.selection.getFirstRange();if(!i)return;const n=(0,Et.A)({alignToTop:e,forceScroll:t,viewportOffset:o,ancestorOffset:s});"number"==typeof o&&(o={top:o,bottom:o,left:o,right:o});const r={target:this.domConverter.viewRangeToDom(i),viewportOffset:o,ancestorOffset:s,alignToTop:e,forceScroll:t};this.fire("scrollToTheSelection",r,n),(0,a.vK)(r)}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new a.Yb("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){a.Yb.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(kt).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return te._createAt(e,t)}createPositionAfter(e){return te._createAfter(e)}createPositionBefore(e){return te._createBefore(e)}createRange(e,t){return new oe(e,t)}createRangeOn(e){return oe._createOn(e)}createRangeIn(e){return oe._createIn(e)}createSelection(...e){return new ie(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class St{is(){throw new Error("is() method is abstract")}}class Mt extends St{parent=null;_attrs;constructor(e){super(),this._attrs=(0,a.av)(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new a.Yb("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new a.Yb("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),s=e.getAncestors(t);let i=0;for(;o[i]==s[i]&&o[i];)i++;return 0===i?null:o[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),s=(0,a.ww)(t,o);switch(s){case"prefix":return!0;case"extension":return!1;default:return t[s](e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=(0,a.av)(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}Mt.prototype.is=function(e){return"node"===e||"model:node"===e};class Ot{_nodes=[];constructor(e){e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new a.Yb("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const o of this._nodes){if(e>=t&&ee.toJSON()))}}class Vt extends Mt{_data;constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Vt(this.data,this.getAttributes())}static fromJSON(e){return new Vt(e.data,e.attributes)}}Vt.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class Rt extends St{textNode;data;offsetInText;constructor(e,t,o){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new a.Yb("model-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.offsetSize)throw new a.Yb("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}Rt.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class jt extends Mt{name;_children=new Ot;constructor(e,t,o){super(t),this.name=e,o&&this._insertChild(0,o)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}findAncestor(e,t={}){let o=t.includeSelf?this:this.parent;for(;o;){if(o.name===e)return o;o=o.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new jt(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Vt(e)];(0,a.xZ)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Vt(e):e instanceof Rt?new Vt(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}static fromJSON(e){let t;if(e.children){t=[];for(const o of e.children)o.name?t.push(jt.fromJSON(o)):t.push(Vt.fromJSON(o))}return new jt(e.name,e.attributes,t)}}jt.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class It{direction;boundaries;singleCharacters;shallow;ignoreElementEnd;_position;_boundaryStartParent;_boundaryEndParent;_visitedParent;constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new a.Yb("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new a.Yb("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=Dt._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o,s,i;do{s=this.position,i=this._visitedParent,({done:t,value:o}=this.next())}while(!t&&e(o));t||(this._position=s,this._visitedParent=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),o=this._visitedParent;if(null===o.parent&&t.offset===o.maxOffset)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const s=Nt(t,o),i=s||Ft(t,o,s);if(i instanceof jt){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(t))return{done:!0,value:void 0};t.offset++}else t.path.push(0),this._visitedParent=i;return this._position=t,Bt("elementStart",i,e,t,1)}if(i instanceof Vt){let s;if(this.singleCharacters)s=1;else{let e=i.endOffset;this._boundaryEndParent==o&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),s=t.offset-e}const i=t.offset-n.startOffset,r=new Rt(n,i-s,s);return t.offset-=s,this._position=t,Bt("text",r,e,t,s)}return t.path.pop(),this._position=t,this._visitedParent=o.parent,Bt("elementStart",o,e,t,1)}}function Bt(e,t,o,s,i){return{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:s,length:i}}}class Dt extends St{root;path;stickiness;constructor(e,t,o="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new a.Yb("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new a.Yb("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=o}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t1)return!1;if(1===t)return zt(e,this,o);if(-1===t)return zt(this,e,o)}return this.path.length===e.path.length||(this.path.length>e.path.length?Ht(this.path,t):Ht(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;const t=this.getParentPath(),o=e.getParentPath();return"same"==(0,a.ww)(t,o)}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=Dt._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let o;return t.containsPosition(this)||t.start.isEqual(this)?(o=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(o=o._getTransformedByDeletion(e.deletionPosition,1))):o=this.isEqual(e.deletionPosition)?Dt._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),o}_getTransformedByDeletion(e,t){const o=Dt._createAt(this);if(this.root!=e.root)return o;if("same"==(0,a.ww)(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;o.offset-=t}}else if("prefix"==(0,a.ww)(e.getParentPath(),this.getParentPath())){const s=e.path.length-1;if(e.offset<=this.path[s]){if(e.offset+t>this.path[s])return null;o.path[s]-=t}}return o}_getTransformedByInsertion(e,t){const o=Dt._createAt(this);if(this.root!=e.root)return o;if("same"==(0,a.ww)(e.getParentPath(),this.getParentPath()))(e.offset=t;){if(e.path[s]+i!==o.maxOffset)return!1;i=1,s--,o=o.parent}return!0}(e,o+1))}function Ht(e,t){for(;tt+1;){const t=s.maxOffset-o.offset;0!==t&&e.push(new $t(o,o.getShiftedBy(t))),o.path=o.path.slice(0,-1),o.offset++,s=s.parent}for(;o.path.length<=this.end.path.length;){const t=this.end.path[o.path.length-1],s=t-o.offset;0!==s&&e.push(new $t(o,o.getShiftedBy(s))),o.offset=t,o.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new It(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new It(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new It(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new $t(this.start,this.end)]}getTransformedByOperations(e){const t=[new $t(this.start,this.end)];for(const o of e)for(let e=0;e0?new this(o,s):new this(s,o)}static _createIn(e){return new this(Dt._createAt(e,0),Dt._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(Dt._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new a.Yb("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const o=e.indexOf(t),s=new this(t.start,t.end);if(o>0)for(let t=o-1;e[t].end.isEqual(s.start);t++)s.start=Dt._createAt(e[t].start);for(let t=o+1;t{if(t.viewPosition)return;const o=this._modelToViewMapping.get(t.modelPosition.parent);if(!o)throw new a.Yb("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(o,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const o=this.findMappedViewAncestor(t.viewPosition),s=this._viewToModelMapping.get(o),i=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,o);t.modelPosition=Dt._createAt(s,i)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const o=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(o)==e&&this._modelToViewMapping.delete(o))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const o=this._markerNameToElements.get(t)||new Set;o.add(e);const s=this._elementToMarkerNames.get(e)||new Set;s.add(t),this._markerNameToElements.set(t,o),this._elementToMarkerNames.set(e,s)}unbindElementFromMarkerName(e,t){const o=this._markerNameToElements.get(t);o&&(o.delete(e),0==o.size&&this._markerNameToElements.delete(t));const s=this._elementToMarkerNames.get(e);s&&(s.delete(t),0==s.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new $t(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new oe(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const o={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",o),o.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const o=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())o.add(t);else o.add(e);return o}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,o){if(o!=e){return this._toModelOffset(e.parent,e.index,o)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let s=0;for(let o=0;o1?t[0]+":"+t[1]:t[0]}class Kt extends((0,a.Mm)()){_conversionApi;_firedEventsMap;constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,o){const s=this._createConversionApi(o,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,s);const i=this._reduceChanges(e.getChanges());for(const e of i)"insert"===e.type?this._convertInsert($t._createFromPositionAndShift(e.position,e.length),s):"reinsert"===e.type?this._convertReinsert($t._createFromPositionAndShift(e.position,e.length),s):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,s):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,s);s.mapper.flushDeferredBindings();for(const e of s.mapper.flushUnboundMarkerNames()){const o=t.get(e).getRange();this._convertMarkerRemove(e,o,s),this._convertMarkerAdd(e,o,s)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,s);s.consumable.verifyAllConsumed("insert")}convert(e,t,o,s={}){const i=this._createConversionApi(o,void 0,s);this._convertInsert(e,i);for(const[e,o]of t)this._convertMarkerAdd(e,o,i);i.consumable.verifyAllConsumed("insert")}convertSelection(e,t,o){const s=this._createConversionApi(o);this.fire("cleanSelection",{selection:e},s);const i=e.getFirstPosition().root;if(!s.mapper.toViewElement(i))return;const n=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this._addConsumablesForSelection(s.consumable,e,n),this.fire("selection",{selection:e},s),e.isCollapsed){for(const t of n)if(s.consumable.test(e,"addMarker:"+t.name)){const o=t.getRange();if(!Yt(e.getFirstPosition(),t,s.mapper))continue;const i={item:e,markerName:t.name,markerRange:o};this.fire(`addMarker:${t.name}`,i,s)}for(const t of e.getAttributeKeys())if(s.consumable.test(e,"attribute:"+t)){const o={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.fire(`attribute:${t}:$text`,o,s)}}}_convertInsert(e,t,o={}){o.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,e);for(const o of Array.from(e.getWalker({shallow:!0})).map(Gt))this._testAndFire("insert",o,t)}_convertRemove(e,t,o,s){this.fire(`remove:${o}`,{position:e,length:t},s)}_convertAttribute(e,t,o,s,i){this._addConsumablesForRange(i.consumable,e,`attribute:${t}`);for(const n of e){const e={item:n.item,range:$t._createFromPositionAndShift(n.previousPosition,n.length),attributeKey:t,attributeOldValue:o,attributeNewValue:s};this._testAndFire(`attribute:${t}`,e,i)}}_convertReinsert(e,t){const o=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,o);for(const e of o.map(Gt))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,o){if("$graveyard"==t.root.rootName)return;const s=`addMarker:${e}`;if(o.consumable.add(t,s),this.fire(s,{markerName:e,markerRange:t},o),o.consumable.consume(t,s)){this._addConsumablesForRange(o.consumable,t,s);for(const i of t.getItems()){if(!o.consumable.test(i,s))continue;const n={item:i,range:$t._createOn(i),markerName:e,markerRange:t};this.fire(s,n,o)}}}_convertMarkerRemove(e,t,o){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},o)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const o of t){const t=o.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o)}}return e}_addConsumablesForRange(e,t,o){for(const s of t.getItems())e.add(s,o);return e}_addConsumablesForSelection(e,t,o){e.add(t,"selection");for(const s of o)e.add(t,"addMarker:"+s.name);for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o);return e}_testAndFire(e,t,o){const s=function(e,t){const o=t.item.is("element")?t.item.name:"$text";return`${e}:${o}`}(e,t),i=t.item.is("$textProxy")?o.consumable._getSymbolForTextProxy(t.item):t.item,n=this._firedEventsMap.get(o),r=n.get(i);if(r){if(r.has(s))return;r.add(s)}else n.set(i,new Set([s]));this.fire(s,t,o)}_testAndFireAddAttributes(e,t){const o={item:e,range:$t._createOn(e)};for(const e of o.item.getAttributeKeys())o.attributeKey=e,o.attributeOldValue=null,o.attributeNewValue=o.item.getAttribute(e),this._testAndFire(`attribute:${e}`,o,t)}_createConversionApi(e,t=new Set,o={}){const s={...this._conversionApi,consumable:new qt,writer:e,options:o,convertItem:e=>this._convertInsert($t._createOn(e),s),convertChildren:e=>this._convertInsert($t._createIn(e),s,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,s),canReuseView:e=>!t.has(s.mapper.toModelElement(e))};return this._firedEventsMap.set(s,new Map),s}}function Yt(e,t,o){const s=t.getRange(),i=Array.from(e.getAncestors());i.shift(),i.reverse();return!i.some((e=>{if(s.containsItem(e)){return!!o.toViewElement(e).getCustomProperty("addHighlight")}}))}function Gt(e){return{item:e.item,range:$t._createFromPositionAndShift(e.previousPosition,e.length)}}class Zt extends((0,a.Mm)(St)){_lastRangeBackward=!1;_attrs=new Map;_ranges=[];constructor(...e){super(),e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const s of e._ranges)if(t.isEqual(s)){o=!0;break}if(!o)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new $t(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new $t(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new $t(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,o,s]=e;if("object"==typeof o&&(s=o,o=void 0),null===t)this._setRanges([]);else if(t instanceof Zt)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof $t)this._setRanges([t],!!s&&!!s.backward);else if(t instanceof Dt)this._setRanges([new $t(t)]);else if(t instanceof Mt){const e=!!s&&!!s.backward;let i;if("in"==o)i=$t._createIn(t);else if("on"==o)i=$t._createOn(t);else{if(void 0===o)throw new a.Yb("model-selection-setto-required-second-parameter",[this,t]);i=new $t(Dt._createAt(t,o))}this._setRanges([i],e)}else{if(!(0,a.xZ)(t))throw new a.Yb("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,s&&!!s.backward)}}_setRanges(e,t=!1){const o=Array.from(e),s=o.some((t=>{if(!(t instanceof $t))throw new a.Yb("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(o.length!==this._ranges.length||s)&&(this._replaceAllRanges(o),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new a.Yb("model-selection-setfocus-no-ranges",[this,e]);const o=Dt._createAt(e,t);if("same"==o.compareWith(this.focus))return;const s=this.anchor;this._ranges.length&&this._popRange(),"before"==o.compareWith(s)?(this._pushRange(new $t(o,s)),this._lastRangeBackward=!0):(this._pushRange(new $t(s,o)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const o=Qt(t.start,e);to(o,t)&&(yield o);for(const o of t.getWalker()){const s=o.item;"elementEnd"==o.type&&Xt(s,e,t)&&(yield s)}const s=Qt(t.end,e);oo(s,t)&&(yield s)}}containsEntireContent(e=this.anchor.root){const t=Dt._createAt(e,0),o=Dt._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&o.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new $t(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function Jt(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function Xt(e,t,o){return Jt(e,t)&&eo(e,o)}function Qt(e,t){const o=e.parent.root.document.model.schema,s=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let i=!1;const n=s.find((e=>!i&&(i=o.isLimit(e),!i&&Jt(e,t))));return s.forEach((e=>t.add(e))),n}function eo(e,t){const o=function(e){const t=e.root.document.model.schema;let o=e.parent;for(;o;){if(t.isBlock(o))return o;o=o.parent}}(e);if(!o)return!0;return!t.containsRange($t._createOn(o),!0)}function to(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(Dt._createAt(e,e.maxOffset))&&eo(e,t))}function oo(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(Dt._createAt(e,0))&&eo(e,t))}Zt.prototype.is=function(e){return"selection"===e||"model:selection"===e};class so extends((0,a.Mm)($t)){constructor(e,t){super(e,t),io.call(this)}detach(){this.stopListening()}toRange(){return new $t(this.start,this.end)}static fromRange(e){return new so(e.start,e.end)}}function io(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&no.call(this,o)}),{priority:"low"})}function no(e){const t=this.getTransformedByOperation(e),o=$t._createFromRanges(t),s=!o.isEqual(this),i=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let n=null;if(s){"$graveyard"==o.root.rootName&&(n="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=o.start,this.end=o.end,this.fire("change:range",t,{deletionPosition:n})}else i&&this.fire("change:content",this.toRange(),{deletionPosition:n})}so.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const ro="selection:";class ao extends((0,a.Mm)(St)){_selection;constructor(e){super(),this._selection=new co(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return ro+e}static _isStoreAttributeKey(e){return e.startsWith(ro)}}ao.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class co extends Zt{markers=new a.pM({idProperty:"name"});_model;_document;_attributePriority=new Map;_selectionRestorePosition=null;_hasChangedRange=!1;_overriddenGravityRegister=new Set;_observedMarkers=new Set;constructor(e){super(),this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&"marker"!=o.type&&"rename"!=o.type&&"noop"!=o.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,o,s)=>{this._updateMarker(t,s)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const o=e.document.differ;for(const s of o.getChanges()){if("insert"!=s.type)continue;const o=s.position.parent;s.length===o.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(o.getAttributeKeys()).filter((e=>e.startsWith(ro)));for(const s of t)e.removeAttribute(s,o)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=s.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const o=t.name.split(":",1)[0];if(!this._observedMarkers.has(o))continue;const s=t.getRange();for(const o of this.getRanges())s.containsRange(o,!o.isCollapsed)&&e.push(t)}const o=Array.from(this.markers);for(const o of e)this.markers.has(o)||(this.markers.add(o),t=!0);for(const o of Array.from(this.markers))e.includes(o)||(this.markers.remove(o),t=!0);t&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateMarker(e,t){const o=e.name.split(":",1)[0];if(!this._observedMarkers.has(o))return;let s=!1;const i=Array.from(this.markers),n=this.markers.has(e);if(t){let o=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){o=!0;break}o&&!n?(this.markers.add(e),s=!0):!o&&n&&(this.markers.remove(e),s=!0)}else n&&(this.markers.remove(e),s=!0);s&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(e){const t=(0,a.av)(this._getSurroundingAttributes()),o=(0,a.av)(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const s=[];for(const[e,t]of this.getAttributes())o.has(e)&&o.get(e)===t||s.push(e);for(const[e]of o)this.hasAttribute(e)||s.push(e);s.length>0&&this.fire("change:attribute",{attributeKeys:s,directChange:!1})}_setAttribute(e,t,o=!0){const s=o?"normal":"low";if("low"==s&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,s),!0)}_removeAttribute(e,t=!0){const o=t?"normal":"low";return("low"!=o||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,o),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,o]of this.getAttributes())e.get(t)!==o&&this._removeAttribute(t,!1);for(const[o,s]of e){this._setAttribute(o,s,!1)&&t.add(o)}return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(ro)){const o=t.substr(10);yield[o,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;if("$graveyard"==e.root.rootName)return null;let o=null;if(this.isCollapsed){const s=e.textNode?e.textNode:e.nodeBefore,i=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(o=lo(s,t)),o||(o=lo(i,t)),!this.isGravityOverridden&&!o){let e=s;for(;e&&!o;)e=e.previousSibling,o=lo(e,t)}if(!o){let e=i;for(;e&&!o;)e=e.nextSibling,o=lo(e,t)}o||(o=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const s of e){if(s.item.is("element")&&t.isObject(s.item)){o=lo(s.item,t);break}if("text"==s.type){o=s.item.getAttributes();break}}}return o}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function lo(e,t){if(!e)return null;if(e instanceof Rt||e instanceof Vt)return e.getAttributes();if(!t.isInline(e))return null;if(!t.isObject(e))return[];const o=[];for(const[s,i]of e.getAttributes())t.checkAttribute("$text",s)&&!1!==t.getAttributeProperties(s).copyFromObject&&o.push([s,i]);return o}class ho{_dispatchers;constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}class uo extends ho{elementToElement(e){return this.add(function(e){const t=bo(e.model),o=ko(e.view,"container");t.attributes.length&&(t.children=!0);return s=>{s.on(`insert:${t.name}`,fo(o,Ao(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&s.on("reduceChanges",xo(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=bo(e.model),o=ko(e.view,"container");return t.children=!0,s=>{if(s._conversionApi.schema.checkChild(t.name,"$text"))throw new a.Yb("conversion-element-to-structure-disallowed-text",s,{elementName:t.name});var i,n;s.on(`insert:${t.name}`,(i=o,n=Ao(t),(e,t,o)=>{if(!n(t.item,o.consumable,{preflight:!0}))return;const s=new Map;o.writer._registerSlotFactory(function(e,t,o){return(s,i)=>{const n=s.createContainerElement("$slot");let r=null;if("children"===i)r=Array.from(e.getChildren());else{if("function"!=typeof i)throw new a.Yb("conversion-slot-mode-unknown",o.dispatcher,{modeOrFilter:i});r=Array.from(e.getChildren()).filter((e=>i(e)))}return t.set(n,r),n}}(t.item,s,o));const r=i(t.item,o,t);if(o.writer._clearSlotFactory(),!r)return;!function(e,t,o){const s=Array.from(t.values()).flat(),i=new Set(s);if(i.size!=s.length)throw new a.Yb("conversion-slot-filter-overlap",o.dispatcher,{element:e});if(i.size!=e.childCount)throw new a.Yb("conversion-slot-filter-incomplete",o.dispatcher,{element:e})}(t.item,s,o),n(t.item,o.consumable);const c=o.mapper.toViewPosition(t.range.start);o.mapper.bindElements(t.item,r),o.writer.insert(c,r),o.convertAttributes(t.item),function(e,t,o,s){o.mapper.on("modelToViewPosition",r,{priority:"highest"});let i=null,n=null;for([i,n]of t)Co(e,n,o,s),o.writer.move(o.writer.createRangeIn(i),o.writer.createPositionBefore(i)),o.writer.remove(i);function r(e,t){const o=t.modelPosition.nodeAfter,s=n.indexOf(o);s<0||(t.viewPosition=t.mapper.findPositionIn(i,s))}o.mapper.off("modelToViewPosition",r)}(r,s,o,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),s.on("reduceChanges",xo(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){e=(0,Et.A)(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=ko(e.view[o],"attribute");else e.view=ko(e.view,"attribute");const s=wo(e);return t=>{t.on(o,mo(s),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=(0,Et.A)(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=vo(e.view[o]);else e.view=vo(e.view);const s=wo(e);return t=>{var i;t.on(o,(i=s,(e,t,o)=>{if(!o.consumable.test(t.item,e.name))return;const s=i(t.attributeOldValue,o,t),n=i(t.attributeNewValue,o,t);if(!s&&!n)return;o.consumable.consume(t.item,e.name);const r=o.mapper.toViewElement(t.item),c=o.writer;if(!r)throw new a.Yb("conversion-attribute-to-attribute-on-text",o.dispatcher,t);if(null!==t.attributeOldValue&&s)if("class"==s.key){const e="string"==typeof s.value?s.value.split(/\s+/):s.value;for(const t of e)c.removeClass(t,r)}else if("style"==s.key)if("string"==typeof s.value){const e=new $(c.document.stylesProcessor);e.setTo(s.value);for(const[t]of e.getStylesEntries())c.removeStyle(t,r)}else{const e=Object.keys(s.value);for(const t of e)c.removeStyle(t,r)}else c.removeAttribute(s.key,r);if(null!==t.attributeNewValue&&n)if("class"==n.key){const e="string"==typeof n.value?n.value.split(/\s+/):n.value;for(const t of e)c.addClass(t,r)}else if("style"==n.key)if("string"==typeof n.value){const e=new $(c.document.stylesProcessor);e.setTo(n.value);for(const[t,o]of e.getStylesEntries())c.setStyle(t,o,r)}else{const e=Object.keys(n.value);for(const t of e)c.setStyle(t,n.value[t],r)}else c.setAttribute(n.key,n.value,r)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=ko(e.view,"ui");return o=>{o.on(`addMarker:${e.model}`,go(t),{priority:e.converterPriority||"normal"}),o.on(`removeMarker:${e.model}`,((e,t,o)=>{const s=o.mapper.markerNameToElements(t.markerName);if(s){for(const e of s)o.mapper.unbindElementFromMarkerName(e,t.markerName),o.writer.clear(o.writer.createRangeOn(e),e);o.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var o;t.on(`addMarker:${e.model}`,(o=e.view,(e,t,s)=>{if(!t.item)return;if(!(t.item instanceof Zt||t.item instanceof ao||t.item.is("$textProxy")))return;const i=yo(o,t,s);if(!i)return;if(!s.consumable.consume(t.item,e.name))return;const n=s.writer,r=po(n,i),a=n.document.selection;if(t.item instanceof Zt||t.item instanceof ao)n.wrap(a.getFirstRange(),r);else{const e=s.mapper.toViewRange(t.range),o=n.wrap(e,r);for(const e of o.getItems())if(e.is("attributeElement")&&e.isSimilar(r)){s.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,o,s)=>{if(!o.item)return;if(!(o.item instanceof jt))return;const i=yo(e,o,s);if(!i)return;if(!s.consumable.test(o.item,t.name))return;const n=s.mapper.toViewElement(o.item);if(n&&n.getCustomProperty("addHighlight")){s.consumable.consume(o.item,t.name);for(const e of $t._createIn(o.item))s.consumable.consume(e.item,t.name);n.getCustomProperty("addHighlight")(n,i,s.writer),s.mapper.bindElementToMarker(n,o.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,o,s)=>{if(o.markerRange.isCollapsed)return;const i=yo(e,o,s);if(!i)return;const n=po(s.writer,i),r=s.mapper.markerNameToElements(o.markerName);if(r){for(const e of r)if(s.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("attributeElement"))s.writer.unwrap(s.writer.createRangeOn(e),n);else{e.getCustomProperty("removeHighlight")(e,i.id,s.writer)}s.writer.clearClonedElementsGroup(o.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){e=(0,Et.A)(e);const t=e.model;let o=e.view;o||(o=o=>({group:t,name:o.substr(e.model.length+1)}));return s=>{var i;s.on(`addMarker:${t}`,(i=o,(e,t,o)=>{const s=i(t.markerName,o);if(!s)return;const n=t.markerRange;o.consumable.consume(n,e.name)&&(_o(n,!1,o,t,s),_o(n,!0,o,t,s),e.stop())}),{priority:e.converterPriority||"normal"}),s.on(`removeMarker:${t}`,function(e){return(t,o,s)=>{const i=e(o.markerName,s);if(!i)return;const n=s.mapper.markerNameToElements(o.markerName);if(n){for(const e of n)s.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("containerElement")?(r(`data-${i.group}-start-before`,e),r(`data-${i.group}-start-after`,e),r(`data-${i.group}-end-before`,e),r(`data-${i.group}-end-after`,e)):s.writer.clear(s.writer.createRangeOn(e),e);s.writer.clearClonedElementsGroup(o.markerName),t.stop()}function r(e,t){if(t.hasAttribute(e)){const o=new Set(t.getAttribute(e).split(","));o.delete(i.name),0==o.size?s.writer.removeAttribute(e,t):s.writer.setAttribute(e,Array.from(o).join(","),t)}}}}(o),{priority:e.converterPriority||"normal"})}}(e))}}function po(e,t){const o=e.createAttributeElement("span",t.attributes);return t.classes&&o._addClass(t.classes),"number"==typeof t.priority&&(o._priority=t.priority),o._id=t.id,o}function mo(e){return(t,o,s)=>{if(!s.consumable.test(o.item,t.name))return;const i=e(o.attributeOldValue,s,o),n=e(o.attributeNewValue,s,o);if(!i&&!n)return;s.consumable.consume(o.item,t.name);const r=s.writer,a=r.document.selection;if(o.item instanceof Zt||o.item instanceof ao)r.wrap(a.getFirstRange(),n);else{let e=s.mapper.toViewRange(o.range);null!==o.attributeOldValue&&i&&(e=r.unwrap(e,i)),null!==o.attributeNewValue&&n&&r.wrap(e,n)}}}function fo(e,t=Eo){return(o,s,i)=>{if(!t(s.item,i.consumable,{preflight:!0}))return;const n=e(s.item,i,s);if(!n)return;t(s.item,i.consumable);const r=i.mapper.toViewPosition(s.range.start);i.mapper.bindElements(s.item,n),i.writer.insert(r,n),i.convertAttributes(s.item),Co(n,s.item.getChildren(),i,{reconversion:s.reconversion})}}function go(e){return(t,o,s)=>{o.isOpening=!0;const i=e(o,s);o.isOpening=!1;const n=e(o,s);if(!i||!n)return;const r=o.markerRange;if(r.isCollapsed&&!s.consumable.consume(r,t.name))return;for(const e of r)if(!s.consumable.consume(e.item,t.name))return;const a=s.mapper,c=s.writer;c.insert(a.toViewPosition(r.start),i),s.mapper.bindElementToMarker(i,o.markerName),r.isCollapsed||(c.insert(a.toViewPosition(r.end),n),s.mapper.bindElementToMarker(n,o.markerName)),t.stop()}}function _o(e,t,o,s,i){const n=t?e.start:e.end,r=n.nodeAfter&&n.nodeAfter.is("element")?n.nodeAfter:null,a=n.nodeBefore&&n.nodeBefore.is("element")?n.nodeBefore:null;if(r||a){let e,n;t&&r||!t&&!a?(e=r,n=!0):(e=a,n=!1);const c=o.mapper.toViewElement(e);if(c)return void function(e,t,o,s,i,n){const r=`data-${n.group}-${t?"start":"end"}-${o?"before":"after"}`,a=e.hasAttribute(r)?e.getAttribute(r).split(","):[];a.unshift(n.name),s.writer.setAttribute(r,a.join(","),e),s.mapper.bindElementToMarker(e,i.markerName)}(c,t,n,o,s,i)}!function(e,t,o,s,i){const n=`${i.group}-${t?"start":"end"}`,r=i.name?{name:i.name}:null,a=o.writer.createUIElement(n,r);o.writer.insert(e,a),o.mapper.bindElementToMarker(a,s.markerName)}(o.mapper.toViewPosition(n),t,o,s,i)}function bo(e){return"string"==typeof e&&(e={name:e}),{name:e.name,attributes:e.attributes?(0,a.$r)(e.attributes):[],children:!!e.children}}function ko(e,t){return"function"==typeof e?e:(o,s)=>function(e,t,o){"string"==typeof e&&(e={name:e});let s;const i=t.writer,n=Object.assign({},e.attributes);if("container"==o)s=i.createContainerElement(e.name,n);else if("attribute"==o){const t={priority:e.priority||me.DEFAULT_PRIORITY};s=i.createAttributeElement(e.name,n,t)}else s=i.createUIElement(e.name,n);if(e.styles){const t=Object.keys(e.styles);for(const o of t)i.setStyle(o,e.styles[o],s)}if(e.classes){const t=e.classes;if("string"==typeof t)i.addClass(t,s);else for(const e of t)i.addClass(e,s)}return s}(e,s,t)}function wo(e){return e.model.values?(t,o,s)=>{const i=e.view[t];return i?i(t,o,s):null}:e.view}function vo(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function yo(e,t,o){const s="function"==typeof e?e(t,o):e;return s?(s.priority||(s.priority=10),s.id||(s.id=t.markerName),s):null}function xo(e){const t=function(e){return(t,o)=>{if(!t.is("element",e.name))return!1;if("attribute"==o.type){if(e.attributes.includes(o.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,o)=>{const s=[];o.reconvertedElements||(o.reconvertedElements=new Set);for(const e of o.changes){const i="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(i&&t(i,e)){if(!o.reconvertedElements.has(i)){o.reconvertedElements.add(i);const e=Dt._createBefore(i);let t=s.length;for(let o=s.length-1;o>=0;o--){const i=s[o],n=("attribute"==i.type?i.range.start:i.position).compareWith(e);if("before"==n||"remove"==i.type&&"same"==n)break;t=o}s.splice(t,0,{type:"remove",name:i.name,position:e,length:1},{type:"reinsert",name:i.name,position:e,length:1})}}else s.push(e)}o.changes=s}}function Ao(e){return(t,o,s={})=>{const i=["insert"];for(const o of e.attributes)t.hasAttribute(o)&&i.push(`attribute:${o}`);return!!i.every((e=>o.test(t,e)))&&(s.preflight||i.forEach((e=>o.consume(t,e))),!0)}}function Co(e,t,o,s){for(const i of t)To(e.root,i,o,s)||o.convertItem(i)}function To(e,t,o,s){const{writer:i,mapper:n}=o;if(!s.reconversion)return!1;const r=n.toViewElement(t);return!(!r||r.root==e)&&(!!o.canReuseView(r)&&(i.move(i.createRangeOn(r),n.toViewPosition(Dt._createBefore(t))),!0))}function Eo(e,t,{preflight:o}={}){return o?t.test(e,"insert"):t.consume(e,"insert")}function Po(e){const{schema:t,document:o}=e.model;for(const s of o.getRoots())if(s.isEmpty&&!t.checkChild(s,"$text")&&t.checkChild(s,"paragraph"))return e.insertElement("paragraph",s),!0;return!1}function So(e,t,o){const s=o.createContext(e);return!!o.checkChild(s,"paragraph")&&!!o.checkChild(s.push("paragraph"),t)}function Mo(e,t){const o=t.createElement("paragraph");return t.insert(o,e),t.createPositionAt(o,0)}class Oo extends ho{elementToElement(e){return this.add(Vo(e))}elementToAttribute(e){return this.add(function(e){e=(0,Et.A)(e),Io(e);const t=Bo(e,!1),o=Ro(e.view),s=o?`element:${o}`:"element";return o=>{o.on(s,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=(0,Et.A)(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key,o=void 0===e.view.value?/[\s\S]*/:e.view.value;let s;if("class"==t||"style"==t){const e="class"==t?"classes":"styles";s={[e]:o}}else s={attributes:{[t]:o}};e.view.name&&(s.name=e.view.name);return e.view=s,t}(e));Io(e,t);const o=Bo(e,!0);return t=>{t.on("element",o,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,o)=>{const s="string"==typeof e?e:e(t,o);return o.writer.createElement("$marker",{"data-name":s})}}(e.model);return Vo({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){e=(0,Et.A)(e),e.model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},o=jo(Do(t,"start")),s=jo(Do(t,"end"));return i=>{i.on(`element:${e.view}-start`,o,{priority:e.converterPriority||"normal"}),i.on(`element:${e.view}-end`,s,{priority:e.converterPriority||"normal"});const n=a.vx.low,r=a.vx.highest,c=a.vx.get(e.converterPriority)/r;i.on("element",function(e){return(t,o,s)=>{const i=`data-${e.view}`;function n(t,i){for(const n of i){const i=e.model(n,s),r=s.writer.createElement("$marker",{"data-name":i});s.writer.insert(r,t),o.modelCursor.isEqual(t)?o.modelCursor=o.modelCursor.getShiftedBy(1):o.modelCursor=o.modelCursor._getTransformedByInsertion(t,1),o.modelRange=o.modelRange._getTransformedByInsertion(t,1)[0]}}(s.consumable.test(o.viewItem,{attributes:i+"-end-after"})||s.consumable.test(o.viewItem,{attributes:i+"-start-after"})||s.consumable.test(o.viewItem,{attributes:i+"-end-before"})||s.consumable.test(o.viewItem,{attributes:i+"-start-before"}))&&(o.modelRange||Object.assign(o,s.convertChildren(o.viewItem,o.modelCursor)),s.consumable.consume(o.viewItem,{attributes:i+"-end-after"})&&n(o.modelRange.end,o.viewItem.getAttribute(i+"-end-after").split(",")),s.consumable.consume(o.viewItem,{attributes:i+"-start-after"})&&n(o.modelRange.end,o.viewItem.getAttribute(i+"-start-after").split(",")),s.consumable.consume(o.viewItem,{attributes:i+"-end-before"})&&n(o.modelRange.start,o.viewItem.getAttribute(i+"-end-before").split(",")),s.consumable.consume(o.viewItem,{attributes:i+"-start-before"})&&n(o.modelRange.start,o.viewItem.getAttribute(i+"-start-before").split(",")))}}(t),{priority:n+c})}}(e))}}function Vo(e){const t=jo(e=(0,Et.A)(e)),o=Ro(e.view),s=o?`element:${o}`:"element";return o=>{o.on(s,t,{priority:e.converterPriority||"normal"})}}function Ro(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function jo(e){const t=new C(e.view);return(o,s,i)=>{const n=t.match(s.viewItem);if(!n)return;const r=n.match;if(r.name=!0,!i.consumable.test(s.viewItem,r))return;const a=function(e,t,o){return e instanceof Function?e(t,o):o.writer.createElement(e)}(e.model,s.viewItem,i);a&&i.safeInsert(a,s.modelCursor)&&(i.consumable.consume(s.viewItem,r),i.convertChildren(s.viewItem,a),i.updateConversionResult(a,s))}}function Io(e,t=null){const o=null===t||(e=>e.getAttribute(t)),s="object"!=typeof e.model?e.model:e.model.key,i="object"!=typeof e.model||void 0===e.model.value?o:e.model.value;e.model={key:s,value:i}}function Bo(e,t){const o=new C(e.view);return(s,i,n)=>{if(!i.modelRange&&t)return;const r=o.match(i.viewItem);if(!r)return;if(!function(e,t){const o="function"==typeof e?e(t):e;if("object"==typeof o&&!Ro(o))return!1;return!o.classes&&!o.attributes&&!o.styles}(e.view,i.viewItem)?delete r.match.name:r.match.name=!0,!n.consumable.test(i.viewItem,r.match))return;const a=e.model.key,c="function"==typeof e.model.value?e.model.value(i.viewItem,n):e.model.value;if(null===c)return;i.modelRange||Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor));const l=function(e,t,o,s){let i=!1;for(const n of Array.from(e.getItems({shallow:o})))s.schema.checkAttribute(n,t.key)&&(i=!0,n.hasAttribute(t.key)||s.writer.setAttribute(t.key,t.value,n));return i}(i.modelRange,{key:a,value:c},t,n);l&&(n.consumable.test(i.viewItem,{name:!0})&&(r.match.name=!0),n.consumable.consume(i.viewItem,r.match))}}function Do(e,t){return{view:`${e.view}-${t}`,model:(t,o)=>{const s=t.getAttribute("name"),i=e.model(s,o);return o.writer.createElement("$marker",{"data-name":i})}}}function No(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.selection,s=t.schema,i=[];let n=!1;for(const e of o.getRanges()){const t=Fo(e,s);t&&!t.isEqual(e)?(i.push(t),n=!0):i.push(e)}n&&e.setSelection(function(e){const t=[...e],o=new Set;let s=1;for(;s!o.has(t)))}(i),{backward:o.isBackward});return!1}(t,e)))}function Fo(e,t){return e.isCollapsed?function(e,t){const o=e.start,s=t.getNearestSelectionRange(o);if(!s){const e=o.getAncestors().reverse().find((e=>t.isObject(e)));return e?$t._createOn(e):null}if(!s.isCollapsed)return s;const i=s.start;if(o.isEqual(i))return null;return new $t(i)}(e,t):function(e,t){const{start:o,end:s}=e,i=t.checkChild(o,"$text"),n=t.checkChild(s,"$text"),r=t.getLimitElement(o),a=t.getLimitElement(s);if(r===a){if(i&&n)return null;if(function(e,t,o){const s=e.nodeAfter&&!o.isLimit(e.nodeAfter)||o.checkChild(e,"$text"),i=t.nodeBefore&&!o.isLimit(t.nodeBefore)||o.checkChild(t,"$text");return s||i}(o,s,t)){const e=o.nodeAfter&&t.isSelectable(o.nodeAfter)?null:t.getNearestSelectionRange(o,"forward"),i=s.nodeBefore&&t.isSelectable(s.nodeBefore)?null:t.getNearestSelectionRange(s,"backward"),n=e?e.start:o,r=i?i.end:s;return new $t(n,r)}}const c=r&&!r.is("rootElement"),l=a&&!a.is("rootElement");if(c||l){const e=o.nodeAfter&&s.nodeBefore&&o.nodeAfter.parent===s.nodeBefore.parent,i=c&&(!e||!zo(o.nodeAfter,t)),n=l&&(!e||!zo(s.nodeBefore,t));let d=o,h=s;return i&&(d=Dt._createBefore(Lo(r,t))),n&&(h=Dt._createAfter(Lo(a,t))),new $t(d,h)}return null}(e,t)}function Lo(e,t){let o=e,s=o;for(;t.isLimit(s)&&s.parent;)o=s,s=s.parent;return o}function zo(e,t){return e&&t.isSelectable(e)}class Ho extends((0,a.VM)()){model;view;mapper;downcastDispatcher;constructor(e,t){super(),this.model=e,this.view=new Pt(t),this.mapper=new Wt,this.downcastDispatcher=new Kt({mapper:this.mapper,schema:e.schema});const o=this.model.document,s=o.selection,i=this.model.markers;var n,r,c;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(o,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(o.differ,i,e),this.downcastDispatcher.convertSelection(s,i,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(o,s)=>{const i=s.newSelection,n=[];for(const e of i.getRanges())n.push(t.toModelRange(e));const r=e.createSelection(n,{backward:i.isBackward});r.isEqual(e.document.selection)||e.change((e=>{e.setSelection(r)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(n=this.mapper,r=this.model.schema,c=this.view,(e,t)=>{if(!c.document.isComposing||a._K.isAndroid)for(let e=0;e{if(!o.consumable.consume(t.item,e.name))return;const s=o.writer,i=o.mapper.toViewPosition(t.range.start),n=s.createText(t.item.data);s.insert(i,n)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,o)=>{const s=o.mapper.toViewPosition(t.position),i=t.position.getShiftedBy(t.length),n=o.mapper.toViewPosition(i,{isPhantom:!0}),r=o.writer.createRange(s,n),a=o.writer.remove(r.getTrimmed());for(const e of o.writer.createRangeIn(a).getItems())o.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("cleanSelection",((e,t,o)=>{const s=o.writer,i=s.document.selection;for(const e of i.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&o.writer.mergeAttributes(e.start);s.setSelection(null)})),this.downcastDispatcher.on("selection",((e,t,o)=>{const s=t.selection;if(s.isCollapsed)return;if(!o.consumable.consume(s,"selection"))return;const i=[];for(const e of s.getRanges())i.push(o.mapper.toViewRange(e));o.writer.setSelection(i,{backward:s.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const s=t.selection;if(!s.isCollapsed)return;if(!o.consumable.consume(s,"selection"))return;const i=o.writer,n=s.getFirstPosition(),r=o.mapper.toViewPosition(n),a=i.breakAttributes(r);i.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new Q(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,o=this.model.markers.get(t);if(!o)throw new a.Yb("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(o)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class $o{_consumables=new Map;add(e,t){let o;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?o=this._consumables.get(e):(o=new qo(e),this._consumables.set(e,o)),o.add(t))}test(e,t){const o=this._consumables.get(e);return void 0===o?null:e.is("$text")||e.is("documentFragment")?o:o.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const o=this._consumables.get(e);void 0!==o&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):o.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},o=e.getAttributeKeys();for(const e of o)"style"!=e&&"class"!=e&&t.attributes.push(e);const s=e.getClassNames();for(const e of s)t.classes.push(e);const i=e.getStyleNames();for(const e of i)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new $o),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,$o.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const o of e.getChildren())t=$o.createFrom(o,t);return t}}const Wo=["attributes","classes","styles"];class qo{element;_canConsumeName;_consumables;constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of Wo)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of Wo)if(t in e){const o=this._test(t,e[t]);if(!0!==o)return o}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of Wo)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of Wo)t in e&&this._revert(t,e[t])}_add(e,t){const o=(0,a.$r)(t),s=this._consumables[e];for(const t of o){if("attributes"===e&&("class"===t||"style"===t))throw new a.Yb("viewconsumable-invalid-attribute",this);if(s.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))s.set(e,!0)}}_test(e,t){const o=(0,a.$r)(t),s=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){const e=s.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",o=this._test(e,[...this._consumables[e].keys()]);if(!0!==o)return o}return!0}_consume(e,t){const o=(0,a.$r)(t),s=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){if(s.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))s.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const o=(0,a.$r)(t),s=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){!1===s.get(t)&&s.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class Uo extends((0,a.VM)()){_sourceDefinitions={};_attributeProperties={};_compiledDefinitions;constructor(){super(),this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new Ko(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new Ko(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new a.Yb("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new a.Yb("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const o=this.getDefinition(e.last);return!!o&&o.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof Dt){const t=e.nodeBefore,o=e.nodeAfter;if(!(t instanceof jt))throw new a.Yb("schema-check-merge-no-element-before",this);if(!(o instanceof jt))throw new a.Yb("schema-check-merge-no-element-after",this);return this.checkMerge(t,o)}for(const o of t.getChildren())if(!this.checkChild(e,o))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[o,s])=>{if(!s)return;const i=e(o,s);"boolean"==typeof i&&(t.stop(),t.return=i)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[o,s])=>{const i=e(o,s);"boolean"==typeof i&&(t.stop(),t.return=i)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof Dt)t=e.parent;else{t=(e instanceof $t?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const o=t.getCommonAncestor();return e?e.getCommonAncestor(o,{includeSelf:!0}):o}),null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const o=[...e.getFirstPosition().getAncestors(),new Vt("",e.getAttributes())];return this.checkAttribute(o,t)}{const o=e.getRanges();for(const e of o)for(const o of e)if(this.checkAttribute(o.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const o of e)yield*this._getValidRangesForRange(o,t)}getNearestSelectionRange(e,t="both"){if("$graveyard"==e.root.rootName)return null;if(this.checkChild(e,"$text"))return new $t(e);let o,s;const i=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(o=new It({boundaries:$t._createIn(i),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(s=new It({boundaries:$t._createIn(i),startPosition:e}));for(const e of function*(e,t){let o=!1;for(;!o;){if(o=!0,e){const t=e.next();t.done||(o=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(o=!1,yield{walker:t,value:e.value})}}}(o,s)){const t=e.walker==o?"elementEnd":"elementStart",s=e.value;if(s.type==t&&this.isObject(s.item))return $t._createOn(s.item);if(this.checkChild(s.nextPosition,"$text"))return new $t(s.nextPosition)}return null}findAllowedParent(e,t){let o=e.parent;for(;o;){if(this.checkChild(o,t))return o;if(this.isLimit(o))return null;o=o.parent}return null}setAllowedAttributes(e,t,o){const s=o.model;for(const[i,n]of Object.entries(t))s.schema.checkAttribute(e,i)&&o.setAttribute(i,n,e)}removeDisallowedAttributes(e,t){for(const o of e)if(o.is("$text"))rs(this,o,t);else{const e=$t._createIn(o).getPositions();for(const o of e){rs(this,o.nodeBefore||o.parent,t)}}}getAttributesWithProperty(e,t,o){const s={};for(const[i,n]of e.getAttributes()){const e=this.getAttributeProperties(i);void 0!==e[t]&&(void 0!==o&&o!==e[t]||(s[i]=n))}return s}createContext(e){return new Ko(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,o=Object.keys(t);for(const s of o)e[s]=Yo(t[s],s);const s=Object.values(e);for(const t of s)Go(e,t),Zo(e,t),Jo(e,t),Xo(e,t);for(const t of s)Qo(e,t);for(const t of s)es(e,t);for(const t of s)ts(e,t);for(const t of s)os(e,t);for(const t of s)ss(e,t);this._compiledDefinitions=function(e){const t={};for(const o of Object.values(e))t[o.name]={name:o.name,isBlock:!!o.isBlock,isContent:!!o.isContent,isInline:!!o.isInline,isLimit:!!o.isLimit,isObject:!!o.isObject,isSelectable:!!o.isSelectable,allowIn:Array.from(o.allowIn).filter((t=>!!e[t])),allowChildren:Array.from(o.allowChildren).filter((t=>!!e[t])),allowAttributes:Array.from(o.allowAttributes)};return t}(e)}_checkContextMatch(e,t,o=t.length-1){const s=t.getItem(o);if(e.allowIn.includes(s.name)){if(0==o)return!0;{const e=this.getDefinition(s);return this._checkContextMatch(e,t,o-1)}}return!1}*_getValidRangesForRange(e,t){let o=e.start,s=e.start;for(const i of e.getItems({shallow:!0}))i.is("element")&&(yield*this._getValidRangesForRange($t._createIn(i),t)),this.checkAttribute(i,t)||(o.isEqual(s)||(yield new $t(o,s)),o=Dt._createAfter(i)),s=Dt._createAfter(i);o.isEqual(s)||(yield new $t(o,s))}findOptimalInsertionRange(e,t){const o=e.getSelectedElement();if(o&&this.isObject(o)&&!this.isInline(o))return"before"==t||"after"==t?new $t(Dt._createAt(o,t)):$t._createOn(o);const s=(0,a.$1)(e.getSelectedBlocks());if(!s)return new $t(e.focus);if(s.isEmpty)return new $t(Dt._createAt(s,0));const i=Dt._createAfter(s);return e.focus.isTouching(i)?new $t(i):new $t(Dt._createBefore(s))}}class Ko{_items;constructor(e){if(e instanceof Ko)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(ns)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Ko([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Yo(e,t){const o={name:t,allowIn:new Set,allowChildren:new Set,disallowIn:new Set,disallowChildren:new Set,allowContentOf:new Set,allowWhere:new Set,allowAttributes:new Set,disallowAttributes:new Set,allowAttributesOf:new Set,inheritTypesFrom:new Set};return function(e,t){for(const o of e){const e=Object.keys(o).filter((e=>e.startsWith("is")));for(const s of e)t[s]=!!o[s]}}(e,o),is(e,o,"allowIn"),is(e,o,"allowChildren"),is(e,o,"disallowIn"),is(e,o,"disallowChildren"),is(e,o,"allowContentOf"),is(e,o,"allowWhere"),is(e,o,"allowAttributes"),is(e,o,"disallowAttributes"),is(e,o,"allowAttributesOf"),is(e,o,"inheritTypesFrom"),function(e,t){for(const o of e){const e=o.inheritAllFrom;e&&(t.allowContentOf.add(e),t.allowWhere.add(e),t.allowAttributesOf.add(e),t.inheritTypesFrom.add(e))}}(e,o),o}function Go(e,t){for(const o of t.allowIn){const s=e[o];s?s.allowChildren.add(t.name):t.allowIn.delete(o)}}function Zo(e,t){for(const o of t.allowChildren){const s=e[o];s?s.allowIn.add(t.name):t.allowChildren.delete(o)}}function Jo(e,t){for(const o of t.disallowIn){const s=e[o];s?s.disallowChildren.add(t.name):t.disallowIn.delete(o)}}function Xo(e,t){for(const o of t.disallowChildren){const s=e[o];s?s.disallowIn.add(t.name):t.disallowChildren.delete(o)}}function Qo(e,t){for(const e of t.disallowChildren)t.allowChildren.delete(e);for(const e of t.disallowIn)t.allowIn.delete(e);for(const e of t.disallowAttributes)t.allowAttributes.delete(e)}function es(e,t){for(const o of t.allowContentOf){const s=e[o];s&&(s.disallowChildren.forEach((o=>{t.allowChildren.has(o)||(t.disallowChildren.add(o),e[o].disallowIn.add(t.name))})),s.allowChildren.forEach((o=>{t.disallowChildren.has(o)||(t.allowChildren.add(o),e[o].allowIn.add(t.name))})))}}function ts(e,t){for(const o of t.allowWhere){const s=e[o];s&&(s.disallowIn.forEach((o=>{t.allowIn.has(o)||(t.disallowIn.add(o),e[o].disallowChildren.add(t.name))})),s.allowIn.forEach((o=>{t.disallowIn.has(o)||(t.allowIn.add(o),e[o].allowChildren.add(t.name))})))}}function os(e,t){for(const o of t.allowAttributesOf){const s=e[o];if(!s)return;s.allowAttributes.forEach((e=>{t.disallowAttributes.has(e)||t.allowAttributes.add(e)}))}}function ss(e,t){for(const o of t.inheritTypesFrom){const s=e[o];if(s){const e=Object.keys(s).filter((e=>e.startsWith("is")));for(const o of e)o in t||(t[o]=s[o])}}}function is(e,t,o){for(const s of e){let e=s[o];"string"==typeof e&&(e=[e]),Array.isArray(e)&&e.forEach((e=>t[o].add(e)))}}function ns(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function rs(e,t,o){for(const s of t.getAttributeKeys())e.checkAttribute(t,s)||o.removeAttribute(s,t)}class as extends((0,a.Mm)()){conversionApi;_splitParts=new Map;_cursorParents=new Map;_modelCursor=null;_emptyElementsToKeep=new Set;constructor(e){super(),this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,o=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let o;for(const s of new Ko(e)){const e={};for(const t of s.getAttributeKeys())e[t]=s.getAttribute(t);const i=t.createElement(s.name,e);o&&t.insert(i,o),o=Dt._createAt(i,0)}return o}(o,t),this.conversionApi.writer=t,this.conversionApi.consumable=$o.createFrom(e),this.conversionApi.store={};const{modelRange:s}=this._convertItem(e,this._modelCursor),i=t.createDocumentFragment();if(s){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,i);i.markers=function(e,t){const o=new Set,s=new Map,i=$t._createIn(e).getItems();for(const e of i)e.is("element","$marker")&&o.add(e);for(const e of o){const o=e.getAttribute("data-name"),i=t.createPositionBefore(e);s.has(o)?s.get(o).end=i.clone():s.set(o,new $t(i.clone())),t.remove(e)}return s}(i,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,i}_convertItem(e,t){const o={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,o,this.conversionApi):e.is("$text")?this.fire("text",o,this.conversionApi):this.fire("documentFragment",o,this.conversionApi),o.modelRange&&!(o.modelRange instanceof $t))throw new a.Yb("view-conversion-dispatcher-incorrect-result",this);return{modelRange:o.modelRange,modelCursor:o.modelCursor}}_convertChildren(e,t){let o=t.is("position")?t:Dt._createAt(t,0);const s=new $t(o);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,o);e.modelRange instanceof $t&&(s.end=e.modelRange.end,o=e.modelCursor)}return{modelRange:s,modelCursor:o}}_safeInsert(e,t){const o=this._splitToAllowedParent(e,t);return!!o&&(this.conversionApi.writer.insert(e,o.position),!0)}_updateConversionResult(e,t){const o=this._getSplitParts(e),s=this.conversionApi.writer;t.modelRange||(t.modelRange=s.createRange(s.createPositionBefore(e),s.createPositionAfter(o[o.length-1])));const i=this._cursorParents.get(e);t.modelCursor=i?s.createPositionAt(i,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:o,writer:s}=this.conversionApi;let i=o.findAllowedParent(t,e);if(i){if(i===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(i)&&(i=null)}if(!i)return So(t,e,o)?{position:Mo(t,s)}:null;const n=this.conversionApi.writer.split(t,i),r=[];for(const e of n.range.getWalker())if("elementEnd"==e.type)r.push(e.item);else{const t=r.pop(),o=e.item;this._registerSplitPair(t,o)}const a=n.range.end.parent;return this._cursorParents.set(e,a),{position:n.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const o=this._splitParts.get(e);this._splitParts.set(t,o),o.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class cs{getHtml(e){const t=a.Sf.document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class ls{domParser;domConverter;htmlWriter;skipComments=!0;constructor(e){this.domParser=new DOMParser,this.domConverter=new it(e,{renderingMode:"data"}),this.htmlWriter=new cs}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`${e}`);const t=this.domParser.parseFromString(e,"text/html"),o=t.createDocumentFragment(),s=t.body.childNodes;for(;s.length>0;)o.appendChild(s[0]);return o}}class ds extends((0,a.Mm)()){model;mapper;downcastDispatcher;upcastDispatcher;viewDocument;stylesProcessor;htmlProcessor;processor;_viewWriter;constructor(e,t){super(),this.model=e,this.mapper=new Wt,this.downcastDispatcher=new Kt({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const s=o.writer,i=o.mapper.toViewPosition(t.range.start),n=s.createText(t.item.data);s.insert(i,n)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new as({schema:e.schema}),this.viewDocument=new pe(t),this.stylesProcessor=t,this.htmlProcessor=new ls(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Ce(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:o,consumable:s,writer:i})=>{let n=t.modelCursor;if(!s.test(t.viewItem))return;if(!o.checkChild(n,"$text")){if(!So(n,"$text",o))return;if(0==t.viewItem.data.trim().length)return;const e=n.nodeBefore;n=Mo(n,i),e&&e.is("element","$marker")&&(i.move(i.createRangeOn(e),n),n=i.createPositionAfter(e))}s.consume(t.viewItem);const r=i.createText(t.viewItem.data);i.insert(r,n),t.modelRange=i.createRange(n,n.getShiftedBy(r.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:s}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=s}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:s}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=s}}),{priority:"lowest"}),(0,a.VM)().prototype.decorate.call(this,"init"),(0,a.VM)().prototype.decorate.call(this,"set"),(0,a.VM)().prototype.decorate.call(this,"get"),(0,a.VM)().prototype.decorate.call(this,"toView"),(0,a.VM)().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},Po)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:o="empty"}=e;if(!this._checkIfRootsExists([t]))throw new a.Yb("datacontroller-get-non-existent-root",this);const s=this.model.document.getRoot(t);return s.isAttached()||(0,a.FF)("datacontroller-get-detached-root",this),"empty"!==o||this.model.hasContent(s,{ignoreWhitespaces:!0})?this.stringify(s,e):""}stringify(e,t={}){const o=this.toView(e,t);return this.processor.toData(o)}toView(e,t={}){const o=this.viewDocument,s=this._viewWriter;this.mapper.clearBindings();const i=$t._createIn(e),n=new Ae(o);this.mapper.bindElements(e,n);const r=e.is("documentFragment")?e.markers:function(e){const t=[],o=e.root.document;if(!o)return new Map;const s=$t._createIn(e);for(const e of o.model.markers){const o=e.getRange(),i=o.isCollapsed,n=o.start.isEqual(s.start)||o.end.isEqual(s.end);if(i&&n)t.push([e.name,o]);else{const i=s.getIntersection(o);i&&t.push([e.name,i])}}return t.sort((([e,t],[o,s])=>{if("after"!==t.end.compareWith(s.start))return 1;if("before"!==t.start.compareWith(s.end))return-1;switch(t.start.compareWith(s.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(s.end)){case"before":return 1;case"after":return-1;default:return o.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(i,r,s,t),n}init(e){if(this.model.document.version)throw new a.Yb("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new a.Yb("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const o of Object.keys(t)){const s=this.model.document.getRoot(o);e.insert(this.parse(t[o],s),s,0)}})),Promise.resolve()}set(e,t={}){let o={};if("string"==typeof e?o.main=e:o=e,!this._checkIfRootsExists(Object.keys(o)))throw new a.Yb("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(o)){const s=this.model.document.getRoot(t);e.remove(e.createRangeIn(s)),e.insert(this.parse(o[t],s),s,0)}}))}parse(e,t="$root"){const o=this.processor.toView(e);return this.toModel(o,t)}toModel(e,t="$root"){return this.model.change((o=>this.upcastDispatcher.convert(e,o,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class hs{_helpers=new Map;_downcast;_upcast;constructor(e,t){this._downcast=(0,a.$r)(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=(0,a.$r)(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const o=this._downcast.includes(t);if(!this._upcast.includes(t)&&!o)throw new a.Yb("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:o})}for(e){if(!this._helpers.has(e))throw new a.Yb("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:o}of us(e))this.for("upcast").elementToElement({model:t,view:o,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:o}of us(e))this.for("upcast").elementToAttribute({view:o,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:o}of us(e))this.for("upcast").attributeToAttribute({view:o,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:o}){if(this._helpers.has(e))throw new a.Yb("conversion-group-exists",this);const s=o?new uo(t):new Oo(t);this._helpers.set(e,s)}}function*us(e){if(e.model.values)for(const t of e.model.values){const o={key:e.model.key,value:t},s=e.view[t],i=e.upcastAlso?e.upcastAlso[t]:void 0;yield*ps(o,s,i)}else yield*ps(e.model,e.view,e.upcastAlso)}function*ps(e,t,o){if(yield{model:e,view:t},o)for(const t of(0,a.$r)(o))yield{model:e,view:t}}class ms{namespaces;domParser;domConverter;htmlWriter;skipComments=!0;constructor(e,t={}){this.namespaces=t.namespaces||[],this.domParser=new DOMParser,this.domConverter=new it(e,{renderingMode:"data"}),this.htmlWriter=new cs}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{keepOriginalCase:!0,skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e=``xmlns:${e}="nsp"`)).join(" ")}>${e}`;const t=this.domParser.parseFromString(e,"text/xml"),o=t.querySelector("parsererror");if(o)throw new Error("Parse error - "+o.textContent);const s=t.createDocumentFragment(),i=t.documentElement.childNodes;for(;i.length>0;)s.appendChild(i[0]);return s}}class fs{baseVersion;isDocumentOperation;batch;constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function gs(e,t){const o=ks(t),s=o.reduce(((e,t)=>e+t.offsetSize),0),i=e.parent;vs(e);const n=e.index;return i._insertChild(n,o),ws(i,n+o.length),ws(i,n),new $t(e,e.getShiftedBy(s))}function _s(e){if(!e.isFlat)throw new a.Yb("operation-utils-remove-range-not-flat",this);const t=e.start.parent;vs(e.start),vs(e.end);const o=t._removeChildren(e.start.index,e.end.index-e.start.index);return ws(t,e.start.index),o}function bs(e,t){if(!e.isFlat)throw new a.Yb("operation-utils-move-range-not-flat",this);const o=_s(e);return gs(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),o)}function ks(e){const t=[];!function e(o){if("string"==typeof o)t.push(new Vt(o));else if(o instanceof Rt)t.push(new Vt(o.data,o.getAttributes()));else if(o instanceof Mt)t.push(o);else if((0,a.xZ)(o))for(const t of o)e(t);else{}}(e);for(let e=1;ee.maxOffset)throw new a.Yb("move-operation-nodes-do-not-exist",this);if(e===t&&o=o&&this.targetPosition.path[e]e._clone(!0)))),t=new As(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new Dt(e,[0]);return new xs(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0)))),gs(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const o=[];for(const t of e.nodes)t.name?o.push(jt.fromJSON(t)):o.push(Vt.fromJSON(t));const s=new As(Dt.fromJSON(e.position,t),o,e.baseVersion);return s.shouldReceiveAttributes=e.shouldReceiveAttributes,s}}class Cs extends fs{splitPosition;howMany;insertionPosition;graveyardPosition;constructor(e,t,o,s,i){super(i),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=o,this.graveyardPosition=s?s.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new Dt(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new $t(this.splitPosition,e)}get affectedSelectable(){const e=[$t._createFromPositionAndShift(this.splitPosition,0),$t._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push($t._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new Cs(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new Dt(e,[0]);return new Ts(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset0&&(e.sourcePosition.isEqual(t.sourcePosition.getShiftedBy(t.howMany))&&this._setRelation(e,t,"mergeSourceAffected"),e.targetPosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeTargetWasBefore"));else if(e instanceof Es){const o=e.newRange;if(!o)return;if(t instanceof xs){const s=$t._createFromPositionAndShift(t.sourcePosition,t.howMany),i=s.containsPosition(o.start)||s.start.isEqual(o.start),n=s.containsPosition(o.end)||s.end.isEqual(o.end);!i&&!n||s.containsRange(o)||this._setRelation(e,t,{side:i?"left":"right",path:i?o.start.path.slice():o.end.path.slice()})}else if(t instanceof Ts){const s=o.start.isEqual(t.targetPosition),i=o.start.isEqual(t.deletionPosition),n=o.end.isEqual(t.deletionPosition),r=o.end.isEqual(t.sourcePosition);(s||i||n||r)&&this._setRelation(e,t,{wasInLeftElement:s,wasStartBeforeMergedElement:i,wasEndBeforeMergedElement:n,wasInRightElement:r})}}}getContext(e,t,o){return{aIsStrong:o,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const o=this.originalOperations.get(t),s=this._history.getUndoneOperation(o);if(!s)return null;const i=this.originalOperations.get(e),n=this._relations.get(i);return n&&n.get(s)||null}_setRelation(e,t,o){const s=this.originalOperations.get(e),i=this.originalOperations.get(t);let n=this._relations.get(s);n||(n=new Map,this._relations.set(s,n)),n.set(i,o)}}function Hs(e,t){for(const o of e)o.baseVersion=t++}function $s(e,t){for(let o=0;o{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const s=e.range.getDifference(t.range).map((t=>new Ss(t,e.key,e.oldValue,e.newValue,0))),i=e.range.getIntersection(t.range);return i&&o.aIsStrong&&s.push(new Ss(i,t.key,t.newValue,e.newValue,0)),0==s.length?[new Ms(0)]:s}return[e]})),Ds(Ss,As,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const o=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new Ss(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const s=Ws(t,e.key,e.oldValue);s&&o.unshift(s)}return o}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),Ds(Ss,Ts,((e,t)=>{const o=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&o.push($t._createFromPositionAndShift(t.graveyardPosition,1));const s=e.range._getTransformedByMergeOperation(t);return s.isCollapsed||o.push(s),o.map((t=>new Ss(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),Ds(Ss,xs,((e,t)=>function(e,t){const o=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);let s=null,i=[];o.containsRange(e,!0)?s=e:e.start.hasSameParentAs(o.start)?(i=e.getDifference(o),s=e.getIntersection(o)):i=[e];const n=[];for(let e of i){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const o=t.getMovedRangeStart(),s=e.start.hasSameParentAs(o),i=e._getTransformedByInsertion(o,t.howMany,s);n.push(...i)}s&&n.push(s._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return n}(e.range,t).map((t=>new Ss(t,e.key,e.oldValue,e.newValue,e.baseVersion))))),Ds(Ss,Cs,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const o=e.clone();return o.range=new $t(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,o]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),Ds(As,Ss,((e,t)=>{const o=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const s=Ws(e,t.key,t.newValue);s&&o.push(s)}return o})),Ds(As,As,((e,t,o)=>(e.position.isEqual(t.position)&&o.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),Ds(As,xs,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),Ds(As,Cs,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),Ds(As,Ts,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),Ds(Es,As,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),Ds(Es,Es,((e,t,o)=>{if(e.name==t.name){if(!o.aIsStrong)return[new Ms(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),Ds(Es,Ts,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),Ds(Es,xs,((e,t,o)=>{if(e.oldRange&&(e.oldRange=$t._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(o.abRelation){const s=$t._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=s.end,e.newRange.start.path=o.abRelation.path,[e];if("right"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=s.start,e.newRange.end.path=o.abRelation.path,[e]}e.newRange=$t._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),Ds(Es,Cs,((e,t,o)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(o.abRelation){const s=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&o.abRelation.wasStartBeforeMergedElement?e.newRange.start=Dt._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!o.abRelation.wasInLeftElement&&(e.newRange.start=Dt._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasInRightElement?e.newRange.end=Dt._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasEndBeforeMergedElement?e.newRange.end=Dt._createAt(t.insertionPosition):e.newRange.end=s.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),Ds(Ts,As,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),Ds(Ts,Ts,((e,t,o)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(o.bWasUndone){const o=t.graveyardPosition.path.slice();return o.push(0),e.sourcePosition=new Dt(t.graveyardPosition.root,o),e.howMany=0,[e]}return[new Ms(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!o.bWasUndone&&"splitAtSource"!=o.abRelation){const s="$graveyard"==e.targetPosition.root.rootName,i="$graveyard"==t.targetPosition.root.rootName;if(i&&!s||!(s&&!i)&&o.aIsStrong){const o=t.targetPosition._getTransformedByMergeOperation(t),s=e.targetPosition._getTransformedByMergeOperation(t);return[new xs(o,e.howMany,s,0)]}return[new Ms(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&o.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),Ds(Ts,xs,((e,t,o)=>{const s=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!o.bWasUndone&&!o.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&s.containsPosition(e.sourcePosition)?[new Ms(0)]:(t.sourcePosition.getShiftedBy(t.howMany).isEqual(e.sourcePosition)?e.sourcePosition.stickiness="toNone":t.targetPosition.isEqual(e.sourcePosition)&&"mergeSourceAffected"==o.abRelation?e.sourcePosition.stickiness="toNext":t.sourcePosition.isEqual(e.targetPosition)?(e.targetPosition.stickiness="toNone",e.howMany-=t.howMany):t.targetPosition.isEqual(e.targetPosition)&&"mergeTargetWasBefore"==o.abRelation?(e.targetPosition.stickiness="toPrevious",e.howMany+=t.howMany):(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany)),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.sourcePosition.stickiness="toPrevious",e.targetPosition.stickiness="toNext",e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),Ds(Ts,Cs,((e,t,o)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const s=0!=t.howMany,i=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(s||i||"mergeTargetNotMoved"==o.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==o.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==o.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),Ds(xs,As,((e,t)=>{const o=$t._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),Ds(xs,xs,((e,t,o)=>{const s=$t._createFromPositionAndShift(e.sourcePosition,e.howMany),i=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);let n,r=o.aIsStrong,c=!o.aIsStrong;if("insertBefore"==o.abRelation||"insertAfter"==o.baRelation?c=!0:"insertAfter"!=o.abRelation&&"insertBefore"!=o.baRelation||(c=!1),n=e.targetPosition.isEqual(t.targetPosition)&&c?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),qs(e,t)&&qs(t,e))return[t.getReversed()];if(s.containsPosition(t.targetPosition)&&s.containsRange(i,!0))return s.start=s.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),s.end=s.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Us([s],n);if(i.containsPosition(e.targetPosition)&&i.containsRange(s,!0))return s.start=s.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),s.end=s.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Us([s],n);const l=(0,a.ww)(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return s.start=s.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),s.end=s.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Us([s],n);"remove"!=e.type||"remove"==t.type||o.aWasUndone||o.forceWeakRemove?"remove"==e.type||"remove"!=t.type||o.bWasUndone||o.forceWeakRemove||(r=!1):r=!0;const d=[],h=s.getDifference(i);for(const e of h){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const o="same"==(0,a.ww)(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),s=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,o);d.push(...s)}const u=s.getIntersection(i);return null!==u&&r&&(u.start=u.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),u.end=u.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===d.length?d.push(u):1==d.length?i.start.isBefore(s.start)||i.start.isEqual(s.start)?d.unshift(u):d.push(u):d.splice(1,0,u)),0===d.length?[new Ms(e.baseVersion)]:Us(d,n)})),Ds(xs,Cs,((e,t,o)=>{let s=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=o.abRelation||(s=e.targetPosition._getTransformedBySplitOperation(t));const i=$t._createFromPositionAndShift(e.sourcePosition,e.howMany);if(i.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=s,[e];if(i.start.hasSameParentAs(t.splitPosition)&&i.containsPosition(t.splitPosition)){let e=new $t(t.splitPosition,i.end);e=e._getTransformedBySplitOperation(t);return Us([new $t(i.start,t.splitPosition),e],s)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==o.abRelation&&(s=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==o.abRelation&&(s=e.targetPosition);const n=[i._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const s=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);e.howMany>1&&s&&!o.aWasUndone&&n.push($t._createFromPositionAndShift(t.insertionPosition,1))}return Us(n,s)})),Ds(xs,Ts,((e,t,o)=>{const s=$t._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&s.containsPosition(t.sourcePosition))if("remove"!=e.type||o.forceWeakRemove){if(1==e.howMany)return o.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new Ms(0)]}else if(!o.aWasUndone){const o=[];let s=t.graveyardPosition.clone(),i=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(o.push(new xs(e.sourcePosition,e.howMany-1,e.targetPosition,0)),s=s._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),i=i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const n=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),r=new xs(s,1,n,0),a=r.getMovedRangeStart().path.slice();a.push(0);const c=new Dt(r.targetPosition.root,a);i=i._getTransformedByMove(s,n,1);const l=new xs(i,t.howMany,c,0);return o.push(r),o.push(l),o}const i=$t._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),Ds(Os,As,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),Ds(Os,Ts,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),Ds(Os,xs,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),Ds(Os,Os,((e,t,o)=>{if(e.position.isEqual(t.position)){if(!o.aIsStrong)return[new Ms(0)];e.oldName=t.newName}return[e]})),Ds(Os,Cs,((e,t)=>{const o=e.position.path,s=t.splitPosition.getParentPath();if("same"==(0,a.ww)(o,s)&&!t.graveyardPosition){const t=new Os(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),Ds(Vs,Vs,((e,t,o)=>{if(e.root===t.root&&e.key===t.key){if(!o.aIsStrong||e.newValue===t.newValue)return[new Ms(0)];e.oldValue=t.newValue}return[e]})),Ds(Rs,Rs,((e,t)=>e.rootName===t.rootName&&e.isAdd===t.isAdd?[new Ms(0)]:[e])),Ds(Cs,As,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!o.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const o=t.graveyardPosition.path.slice();o.push(0);const s=new Dt(t.graveyardPosition.root,o),i=Cs.getInsertionPosition(new Dt(t.graveyardPosition.root,o)),n=new Cs(s,0,i,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Cs.getInsertionPosition(e.splitPosition),e.graveyardPosition=n.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[n,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Cs.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),Ds(Cs,xs,((e,t,o)=>{const s=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const i=s.start.isEqual(e.graveyardPosition)||s.containsPosition(e.graveyardPosition);if(!o.bWasUndone&&i){const o=e.splitPosition._getTransformedByMoveOperation(t),s=e.graveyardPosition._getTransformedByMoveOperation(t),i=s.path.slice();i.push(0);const n=new Dt(s.root,i);return[new xs(o,e.howMany,n,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const i=e.splitPosition.isEqual(t.targetPosition);if(i&&("insertAtSource"==o.baRelation||"splitBefore"==o.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=Cs.getInsertionPosition(e.splitPosition),[e];if(i&&o.abRelation&&o.abRelation.howMany){const{howMany:t,offset:s}=o.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(s),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&s.containsPosition(e.splitPosition)){const o=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=o,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new Ms(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new Ms(0)];if("splitBefore"==o.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const s="$graveyard"==e.splitPosition.root.rootName,i="$graveyard"==t.splitPosition.root.rootName;if(i&&!s||!(s&&!i)&&o.aIsStrong){const o=[];return t.howMany&&o.push(new xs(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&o.push(new xs(e.splitPosition,e.howMany,e.moveTargetPosition,0)),o}return[new Ms(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==o.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==o.baRelation){const o=t.insertionPosition.path.slice();o.push(0);const s=new Dt(t.insertionPosition.root,o);return[e,new xs(e.insertionPosition,1,s,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset{const o=t[0];o.isDocumentOperation&&Gs.call(this,o)}),{priority:"low"})}function Gs(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}Ks.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class Zs{operations;isUndoable;isLocal;isUndo;isTyping;constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},(0,a.FF)("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:o=!0,isUndo:s=!1,isTyping:i=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=o,this.isUndo=s,this.isTyping=i}get type(){return(0,a.FF)("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class Js{static _statesPriority=[void 0,"refresh","rename","move"];_markerCollection;_changesInElement=new Map;_elementsSnapshots=new Map;_elementChildrenSnapshots=new Map;_elementState=new Map;_changedMarkers=new Map;_changedRoots=new Map;_changeCount=0;_cachedChanges=null;_cachedChangesWithGraveyard=null;_refreshedItems=new Set;constructor(e){this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),o=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),o||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);const s=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);for(const e of s.getItems({shallow:!0}))this._setElementState(e,"move");break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=$t._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}this._setElementState(t.position.nodeAfter,"rename");break}case"split":{const e=t.splitPosition.parent;if(!this._isInInsertedElement(e)){this._markRemove(e,t.splitPosition.offset,t.howMany);const o=$t._createFromPositionAndShift(t.splitPosition,t.howMany);for(const e of o.getItems({shallow:!0}))this._setElementState(e,"move")}this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&(this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1),this._setElementState(t.graveyardPosition.nodeAfter,"move"));break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const o=t.graveyardPosition.parent;this._markInsert(o,t.graveyardPosition.offset,1),this._setElementState(e,"move");const s=t.targetPosition.parent;if(!this._isInInsertedElement(s)){this._markInsert(s,t.targetPosition.offset,e.maxOffset);const o=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);for(const e of o.getItems({shallow:!0}))this._setElementState(e,"move")}break}case"detachRoot":case"addRoot":{const e=t.affectedSelectable;if(!e._isLoaded)return;if(e.isAttached()==t.isAdd)return;this._bufferRootStateChange(t.rootName,t.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!t.root._isLoaded)return;const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,o){t.range&&t.range.root.is("rootElement")&&!t.range.root._isLoaded&&(t.range=null),o.range&&o.range.root.is("rootElement")&&!o.range.root._isLoaded&&(o.range=null);let s=this._changedMarkers.get(e);s?s.newMarkerData=o:(s={newMarkerData:o,oldMarkerData:t},this._changedMarkers.set(e,s)),null==s.oldMarkerData.range&&null==o.range&&this._changedMarkers.delete(e)}getMarkersToRemove(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.oldMarkerData.range&&e.push({name:t,range:o.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.newMarkerData.range&&e.push({name:t,range:o.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this.getChanges().length)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const o=e.range&&!t.range,s=!e.range&&t.range,i=e.range&&t.range&&!e.range.isEqual(t.range);if(o||s||i)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const o=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamee));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(ti),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t={...e};return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementChildrenSnapshots.clear(),this._elementsSnapshots.clear(),this._elementState.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems.clear(),this._cachedChanges=null}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e),this._setElementState(e,"refresh");const t=$t._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_bufferRootLoad(e){if(e.isAttached()){this._bufferRootStateChange(e.rootName,!0),this._markInsert(e,0,e.maxOffset);for(const t of e.getAttributeKeys())this._bufferRootAttributeChange(e.rootName,t,null,e.getAttribute(t));for(const t of this._markerCollection)if(t.getRange().root==e){const e=t.getData();this.bufferMarkerChange(t.name,{...e,range:null},e)}}}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const o=this._changedRoots.get(e);void 0!==o.state?(delete o.state,void 0===o.attributes&&this._changedRoots.delete(e)):o.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,o,s){const i=this._changedRoots.get(e)||{name:e},n=i.attributes||{};if(n[t]){const e=n[t];s===e.oldValue?delete n[t]:e.newValue=s}else n[t]={oldValue:o,newValue:s};0===Object.entries(n).length?(delete i.attributes,void 0===i.state&&this._changedRoots.delete(e)):(i.attributes=n,this._changedRoots.set(e,i))}_markInsert(e,t,o){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const s={type:"insert",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,s)}_markRemove(e,t,o){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const s={type:"remove",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,s),this._removeAllNestedChanges(e,t,o)}_markAttribute(e){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshots(e);const o=this._getChangesForElement(e);this._handleChange(t,o),o.push(t);for(let e=0;eo&&this._elementState.set(e,t)}_getDiffActionForNode(e,t){if(!e.is("element"))return t;if(!this._elementsSnapshots.has(e))return t;const o=this._elementState.get(e);return o&&"move"!=o?o:t}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshots(e){if(this._elementChildrenSnapshots.has(e))return;const t=Qs(e.getChildren());this._elementChildrenSnapshots.set(e,t);for(const e of t)this._elementsSnapshots.set(e.node,e)}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const o of t){const s=e.offset+e.howMany,i=o.offset+o.howMany;if("insert"==e.type&&("insert"==o.type&&(e.offset<=o.offset?o.offset+=e.howMany:e.offseto.offset){if(s>i){const e={type:"attribute",offset:i,howMany:s-i,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=o.offset&&e.offseti?(e.nodesToHandle=s-i,e.offset=i):e.nodesToHandle=0);if("remove"==o.type&&e.offseto.offset){const i={type:"attribute",offset:o.offset,howMany:s-o.offset,count:this._changeCount++};this._handleChange(i,t),t.push(i),e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==o.type&&(e.offset>=o.offset&&s<=i?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=o.offset&&s>=i&&(o.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,o,s,i){const n={type:"insert",position:Dt._createAt(e,t),name:s.name,attributes:new Map(s.attributes),length:1,changeCount:this._changeCount++,action:o};return"insert"!=o&&i&&(n.before={name:i.name,attributes:new Map(i.attributes)}),n}_getRemoveDiff(e,t,o,s){return{type:"remove",action:o,position:Dt._createAt(e,t),name:s.name,attributes:new Map(s.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,o){const s=[];o=new Map(o);for(const[i,n]of t){const t=o.has(i)?o.get(i):null;t!==n&&s.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:i,attributeOldValue:n,attributeNewValue:t,changeCount:this._changeCount++}),o.delete(i)}for(const[t,i]of o)s.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return s}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const o=this._changesInElement.get(t),s=e.startOffset;if(o)for(const e of o)if("insert"==e.type&&s>=e.offset&&ss){for(let t=0;tthis._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new a.Yb("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const o=this._operations[0];void 0===e&&(e=o.baseVersion);let s=t-1;for(const[t,o]of this._gaps)e>t&&et&&sthis.lastOperation.baseVersion)return[];let i=this._baseVersionToOperationIndex.get(e);void 0===i&&(i=0);let n=this._baseVersionToOperationIndex.get(s);return void 0===n&&(n=this._operations.length-1),this._operations.slice(i,n+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class si extends jt{rootName;_document;_isAttached=!0;_isLoaded=!0;constructor(e,t,o="main"){super(t),this._document=e,this.rootName=o}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}si.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};const ii="$graveyard";class ni extends((0,a.Mm)()){model;history;selection;roots;differ;isReadOnly;_postFixers;_hasSelectionChangedFromTheLastChangeBlock;constructor(e){super(),this.model=e,this.history=new oi,this.selection=new ao(this),this.roots=new a.pM({idProperty:"rootName"}),this.differ=new Js(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",ii),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.differ.bufferOperation(o)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.history.addOperation(o)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,o,s,i)=>{const n={...t.getData(),range:s};this.differ.bufferMarkerChange(t.name,i,n),null===o&&t.on("change",((e,o)=>{const s=t.getData();this.differ.bufferMarkerChange(t.name,{...s,range:o},s)}))})),this.registerPostFixer((e=>{let t=!1;for(const o of this.roots)o.isAttached()||o.isEmpty||(e.remove(e.createRangeIn(o)),t=!0);for(const o of this.model.markers)o.getRange().root.isAttached()||(e.removeMarker(o),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(ii)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new a.Yb("model-document-createroot-name-exists",this,{name:t});const o=new si(this,e,t);return this.roots.add(o),o}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return this.getRoots(e).map((e=>e.rootName))}getRoots(e=!1){return this.roots.filter((t=>t!=this.graveyard&&(e||t.isAttached())&&t._isLoaded))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=w(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const e=this.getRoots();return e.length?e[0]:this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,o=t.schema,s=t.createPositionFromPath(e,[0]);return o.getNearestSelectionRange(s)||t.createRange(s)}_validateSelectionRange(e){return ri(e.start)&&ri(e.end)}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(this.selection.refresh(),t=o(e),t)break}while(t)}}function ri(e){const t=e.textNode;if(t){const o=t.data,s=e.offset-t.startOffset;return!(0,a.P5)(o,s)&&!(0,a.Iw)(o,s)}return!0}class ai extends((0,a.Mm)()){_markers=new Map;[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof ci?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,o=!1,s=!1){const i=e instanceof ci?e.name:e;if(i.includes(","))throw new a.Yb("markercollection-incorrect-marker-name",this);const n=this._markers.get(i);if(n){const e=n.getData(),r=n.getRange();let a=!1;return r.isEqual(t)||(n._attachLiveRange(so.fromRange(t)),a=!0),o!=n.managedUsingOperations&&(n._managedUsingOperations=o,a=!0),"boolean"==typeof s&&s!=n.affectsData&&(n._affectsData=s,a=!0),a&&this.fire(`update:${i}`,n,r,t,e),n}const r=so.fromRange(t),c=new ci(i,r,o,s);return this._markers.set(i,c),this.fire(`update:${i}`,c,null,t,{...c.getData(),range:null}),c}_remove(e){const t=e instanceof ci?e.name:e,o=this._markers.get(t);return!!o&&(this._markers.delete(t),this.fire(`update:${t}`,o,o.getRange(),null,o.getData()),this._destroyMarker(o),!0)}_refresh(e){const t=e instanceof ci?e.name:e,o=this._markers.get(t);if(!o)throw new a.Yb("markercollection-refresh-marker-not-exists",this);const s=o.getRange();this.fire(`update:${t}`,o,s,s,o.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class ci extends((0,a.Mm)(St)){name;_managedUsingOperations;_affectsData;_liveRange;constructor(e,t,o,s){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=o,this._affectsData=s}get managedUsingOperations(){if(!this._liveRange)throw new a.Yb("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new a.Yb("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new a.Yb("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new a.Yb("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new a.Yb("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}ci.prototype.is=function(e){return"marker"===e||"model:marker"===e};class li extends fs{sourcePosition;howMany;constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new a.Yb("detach-operation-on-document-node",this)}_execute(){_s($t._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class di extends St{markers=new Map;_children=new Ot;constructor(e){super(),e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const o of e)o.name?t.push(jt.fromJSON(o)):t.push(Vt.fromJSON(o));return new di(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Vt(e)];(0,a.xZ)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Vt(e):e instanceof Rt?new Vt(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}}di.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class hi{model;batch;constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new Vt(e,t)}createElement(e,t){return new jt(e,t)}createDocumentFragment(){return new di}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,o=0){if(this._assertWriterUsedCorrectly(),e instanceof Vt&&""==e.data)return;const s=Dt._createAt(t,o);if(e.parent){if(gi(e.root,s.root))return void this.move($t._createOn(e),s);if(e.root.document)throw new a.Yb("model-writer-insert-forbidden-move",this);this.remove(e)}const i=s.root.document?s.root.document.version:null,n=new As(s,e,i);if(e instanceof Vt&&(n.shouldReceiveAttributes=!0),this.batch.addOperation(n),this.model.applyOperation(n),e instanceof di)for(const[t,o]of e.markers){const e=Dt._createAt(o.root,0),i={range:new $t(o.start._getCombined(e,s),o.end._getCombined(e,s)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,i):this.addMarker(t,i)}}insertText(e,t,o,s){t instanceof di||t instanceof jt||t instanceof Dt?this.insert(this.createText(e),t,o):this.insert(this.createText(e,t),o,s)}insertElement(e,t,o,s){t instanceof di||t instanceof jt||t instanceof Dt?this.insert(this.createElement(e),t,o):this.insert(this.createElement(e,t),o,s)}append(e,t){this.insert(e,t,"end")}appendText(e,t,o){t instanceof di||t instanceof jt?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),o,"end")}appendElement(e,t,o){t instanceof di||t instanceof jt?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),o,"end")}setAttribute(e,t,o){if(this._assertWriterUsedCorrectly(),o instanceof $t){const s=o.getMinimalFlatRanges();for(const o of s)ui(this,e,t,o)}else pi(this,e,t,o)}setAttributes(e,t){for(const[o,s]of(0,a.av)(e))this.setAttribute(o,s,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof $t){const o=t.getMinimalFlatRanges();for(const t of o)ui(this,e,null,t)}else pi(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof $t)for(const o of e.getItems())t(o);else t(e)}move(e,t,o){if(this._assertWriterUsedCorrectly(),!(e instanceof $t))throw new a.Yb("writer-move-invalid-range",this);if(!e.isFlat)throw new a.Yb("writer-move-range-not-flat",this);const s=Dt._createAt(t,o);if(s.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!gi(e.root,s.root))throw new a.Yb("writer-move-different-document",this);const i=e.root.document?e.root.document.version:null,n=new xs(e.start,e.end.offset-e.start.offset,s,i);this.batch.addOperation(n),this.model.applyOperation(n)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof $t?e:$t._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),fi(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,o=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof jt))throw new a.Yb("writer-merge-no-element-before",this);if(!(o instanceof jt))throw new a.Yb("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,o){return this.model.createPositionFromPath(e,t,o)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,o=e.nodeAfter;this.move($t._createIn(o),Dt._createAt(t,"end")),this.remove(o)}_merge(e){const t=Dt._createAt(e.nodeBefore,"end"),o=Dt._createAt(e.nodeAfter,0),s=e.root.document.graveyard,i=new Dt(s,[0]),n=e.root.document.version,r=new Ts(o,e.nodeAfter.maxOffset,t,i,n);this.batch.addOperation(r),this.model.applyOperation(r)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof jt))throw new a.Yb("writer-rename-not-element-instance",this);const o=e.root.document?e.root.document.version:null,s=new Os(Dt._createBefore(e),e.name,t,o);this.batch.addOperation(s),this.model.applyOperation(s)}split(e,t){this._assertWriterUsedCorrectly();let o,s,i=e.parent;if(!i.parent)throw new a.Yb("writer-split-element-no-parent",this);if(t||(t=i.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new a.Yb("writer-split-invalid-limit-element",this);do{const t=i.root.document?i.root.document.version:null,n=i.maxOffset-e.offset,r=Cs.getInsertionPosition(e),a=new Cs(e,n,r,null,t);this.batch.addOperation(a),this.model.applyOperation(a),o||s||(o=i,s=e.parent.nextSibling),i=(e=this.createPositionAfter(e.parent)).parent}while(i!==t);return{position:e,range:new $t(Dt._createAt(o,"end"),Dt._createAt(s,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new a.Yb("writer-wrap-range-not-flat",this);const o=t instanceof jt?t:new jt(t);if(o.childCount>0)throw new a.Yb("writer-wrap-element-not-empty",this);if(null!==o.parent)throw new a.Yb("writer-wrap-element-attached",this);this.insert(o,e.start);const s=new $t(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(s,Dt._createAt(o,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new a.Yb("writer-unwrap-element-no-parent",this);this.move($t._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new a.Yb("writer-addmarker-no-usingoperation",this);const o=t.usingOperation,s=t.range,i=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new a.Yb("writer-addmarker-marker-exists",this);if(!s)throw new a.Yb("writer-addmarker-no-range",this);return o?(mi(this,e,null,s,i),this.model.markers.get(e)):this.model.markers._set(e,s,o,i)}updateMarker(e,t){this._assertWriterUsedCorrectly();const o="string"==typeof e?e:e.name,s=this.model.markers.get(o);if(!s)throw new a.Yb("writer-updatemarker-marker-not-exists",this);if(!t)return(0,a.FF)("writer-updatemarker-reconvert-using-editingcontroller",{markerName:o}),void this.model.markers._refresh(s);const i="boolean"==typeof t.usingOperation,n="boolean"==typeof t.affectsData,r=n?t.affectsData:s.affectsData;if(!i&&!t.range&&!n)throw new a.Yb("writer-updatemarker-wrong-options",this);const c=s.getRange(),l=t.range?t.range:c;i&&t.usingOperation!==s.managedUsingOperations?t.usingOperation?mi(this,o,null,l,r):(mi(this,o,c,null,r),this.model.markers._set(o,l,void 0,r)):s.managedUsingOperations?mi(this,o,c,l,r):this.model.markers._set(o,l,void 0,r)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new a.Yb("writer-removemarker-no-marker",this);const o=this.model.markers.get(t);if(!o.managedUsingOperations)return void this.model.markers._remove(t);mi(this,t,o.getRange(),null,o.affectsData)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const o=this.model.document.getRoot(e);if(o&&o.isAttached())throw new a.Yb("writer-addroot-root-exists",this);const s=this.model.document,i=new Rs(e,t,!0,s,s.version);return this.batch.addOperation(i),this.model.applyOperation(i),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new a.Yb("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const o=this.model.document,s=new Rs(t.rootName,t.name,!1,o,o.version);this.batch.addOperation(s),this.model.applyOperation(s)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,o]of(0,a.av)(e))this._setSelectionAttribute(t,o)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const o=this.model.document.selection;if(o.isCollapsed&&o.anchor.parent.isEmpty){const s=ao._getStoreAttributeKey(e);this.setAttribute(s,t,o.anchor.parent)}o._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const o=ao._getStoreAttributeKey(e);this.removeAttribute(o,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new a.Yb("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const o of this.model.markers){if(!o.managedUsingOperations)continue;const s=o.getRange();let i=!1;if("move"===e){const e=t;i=e.containsPosition(s.start)||e.start.isEqual(s.start)||e.containsPosition(s.end)||e.end.isEqual(s.end)}else{const e=t,o=e.nodeBefore,n=e.nodeAfter,r=s.start.parent==o&&s.start.isAtEnd,a=s.end.parent==n&&0==s.end.offset,c=s.end.nodeAfter==n,l=s.start.nodeAfter==n;i=r||a||c||l}i&&this.updateMarker(o.name,{range:s})}}}function ui(e,t,o,s){const i=e.model,n=i.document;let r,a,c,l=s.start;for(const e of s.getWalker({shallow:!0}))c=e.item.getAttribute(t),r&&a!=c&&(a!=o&&d(),l=r),r=e.nextPosition,a=c;function d(){const s=new $t(l,r),c=s.root.document?n.version:null,d=new Ss(s,t,a,o,c);e.batch.addOperation(d),i.applyOperation(d)}r instanceof Dt&&r!=l&&a!=o&&d()}function pi(e,t,o,s){const i=e.model,n=i.document,r=s.getAttribute(t);let a,c;if(r!=o){if(s.root===s){const e=s.document?n.version:null;c=new Vs(s,t,r,o,e)}else{a=new $t(Dt._createBefore(s),e.createPositionAfter(s));const i=a.root.document?n.version:null;c=new Ss(a,t,r,o,i)}e.batch.addOperation(c),i.applyOperation(c)}}function mi(e,t,o,s,i){const n=e.model,r=n.document,a=new Es(t,o,s,n.markers,!!i,r.version);e.batch.addOperation(a),n.applyOperation(a)}function fi(e,t,o,s){let i;if(e.root.document){const o=s.document,n=new Dt(o.graveyard,[0]);i=new xs(e,t,n,o.version)}else i=new li(e,t);o.addOperation(i),s.applyOperation(i)}function gi(e,t){return e===t||e instanceof si&&t instanceof si}function _i(e,t,o={}){if(t.isCollapsed)return;const s=t.getFirstRange();if("$graveyard"==s.root.rootName)return;const i=e.schema;e.change((e=>{if(!o.doNotResetEntireContent&&function(e,t){const o=e.getLimitElement(t);if(!t.containsEntireContent(o))return!1;const s=t.getFirstRange();if(s.start.parent==s.end.parent)return!1;return e.checkChild(o,"paragraph")}(i,t))return void function(e,t){const o=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(o)),vi(e,e.createPositionAt(o,0),t)}(e,t);const n={};if(!o.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(n,i.getAttributesWithProperty(e,"copyOnReplace",!0))}const[r,a]=function(e){const t=e.root.document.model,o=e.start;let s=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const o=function(e){const t=e.parent,o=t.root.document.model.schema,s=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of s){if(o.isLimit(e))return null;if(o.isBlock(e))return e}}(s);if(o&&s.isTouching(t.createPositionAt(o,0))){const o=t.createSelection(e);t.modifySelection(o,{direction:"backward"});const i=o.getLastPosition(),n=t.createRange(i,s);t.hasContent(n,{ignoreMarkers:!0})||(s=i)}}return[Ks.fromPosition(o,"toPrevious"),Ks.fromPosition(s,"toNext")]}(s);r.isTouching(a)||e.remove(e.createRange(r,a)),o.leaveUnmerged||(!function(e,t,o){const s=e.model;if(!wi(e.model.schema,t,o))return;const[i,n]=function(e,t){const o=e.getAncestors(),s=t.getAncestors();let i=0;for(;o[i]&&o[i]==s[i];)i++;return[o[i],s[i]]}(t,o);if(!i||!n)return;!s.hasContent(i,{ignoreMarkers:!0})&&s.hasContent(n,{ignoreMarkers:!0})?ki(e,t,o,i.parent):bi(e,t,o,i.parent)}(e,r,a),i.removeDisallowedAttributes(r.parent.getChildren(),e)),yi(e,t,r),!o.doNotAutoparagraph&&function(e,t){const o=e.checkChild(t,"$text"),s=e.checkChild(t,"paragraph");return!o&&s}(i,r)&&vi(e,r,t,n),r.detach(),a.detach()}))}function bi(e,t,o,s){const i=t.parent,n=o.parent;if(i!=s&&n!=s){for(t=e.createPositionAfter(i),(o=e.createPositionBefore(n)).isEqual(t)||e.insert(n,t),e.merge(t);o.parent.isEmpty;){const t=o.parent;o=e.createPositionBefore(t),e.remove(t)}wi(e.model.schema,t,o)&&bi(e,t,o,s)}}function ki(e,t,o,s){const i=t.parent,n=o.parent;if(i!=s&&n!=s){for(t=e.createPositionAfter(i),(o=e.createPositionBefore(n)).isEqual(t)||e.insert(i,o);t.parent.isEmpty;){const o=t.parent;t=e.createPositionBefore(o),e.remove(o)}o=e.createPositionBefore(n),function(e,t){const o=t.nodeBefore,s=t.nodeAfter;o.name!=s.name&&e.rename(o,s.name);e.clearAttributes(o),e.setAttributes(Object.fromEntries(s.getAttributes()),o),e.merge(t)}(e,o),wi(e.model.schema,t,o)&&ki(e,t,o,s)}}function wi(e,t,o){const s=t.parent,i=o.parent;return s!=i&&(!e.isLimit(s)&&!e.isLimit(i)&&function(e,t,o){const s=new $t(e,t);for(const e of s.getWalker())if(o.isLimit(e.item))return!1;return!0}(t,o,e))}function vi(e,t,o,s={}){const i=e.createElement("paragraph");e.model.schema.setAllowedAttributes(i,s,e),e.insert(i,t),yi(e,o,e.createPositionAt(i,0))}function yi(e,t,o){t instanceof ao?e.setSelection(o):t.setTo(o)}function xi(e,t){const o=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{o.push(e.start.parent),t.remove(e)})),o.forEach((e=>{let o=e;for(;o.parent&&o.isEmpty;){const e=t.createRangeOn(o);o=o.parent,t.remove(e)}}))}class Ai{model;writer;position;canMergeWith;schema;_documentFragment;_documentFragmentPosition;_firstNode=null;_lastNode=null;_lastAutoParagraph=null;_filterAttributesOf=[];_affectedStart=null;_affectedEnd=null;_nodeToSelect=null;constructor(e,t,o){this.model=e,this.writer=t,this.position=o,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),o=this.writer.createPositionAfter(e);if(o.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new a.Yb("insertcontent-invalid-insertion-position",this);this.position=o,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?$t._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new $t(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=Ks.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new a.Yb("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=Ks.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Ks.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof jt))return;if(!this._canMergeLeft(e))return;const t=Ks._createBefore(e);t.stickiness="toNext";const o=Ks.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=Ks._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=Ks._createAt(t.nodeBefore,"end","toNext")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof jt))return;if(!this._canMergeRight(e))return;const t=Ks._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new a.Yb("insertcontent-invalid-insertion-position",this);this.position=Dt._createAt(t.nodeBefore,"end");const o=Ks.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=Ks._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=Ks._createAt(t.nodeBefore,0,"toPrevious")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof jt&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof jt&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function Ci(e,t,o,s={}){if(!e.schema.isObject(t))throw new a.Yb("insertobject-element-not-an-object",e,{object:t});const i=o||e.document.selection;let n=i;s.findOptimalPosition&&e.schema.isBlock(t)&&(n=e.createSelection(e.schema.findOptimalInsertionRange(i,s.findOptimalPosition)));const r=(0,a.$1)(i.getSelectedBlocks()),c={};return r&&Object.assign(c,e.schema.getAttributesWithProperty(r,"copyOnReplace",!0)),e.change((o=>{n.isCollapsed||e.deleteContent(n,{doNotAutoparagraph:!0});let i=t;const r=n.anchor.parent;!e.schema.checkChild(r,t)&&e.schema.checkChild(r,"paragraph")&&e.schema.checkChild("paragraph",t)&&(i=o.createElement("paragraph"),o.insert(t,i)),e.schema.setAllowedAttributes(i,c,o);const l=e.insertContent(i,n);return l.isCollapsed||s.setSelection&&function(e,t,o,s){const i=e.model;if("on"==o)return void e.setSelection(t,"on");if("after"!=o)throw new a.Yb("insertobject-invalid-place-parameter-value",i);let n=t.nextSibling;if(i.schema.isInline(t))return void e.setSelection(t,"after");const r=n&&i.schema.checkChild(n,"$text");!r&&i.schema.checkChild(t.parent,"paragraph")&&(n=e.createElement("paragraph"),i.schema.setAllowedAttributes(n,s,e),i.insertContent(n,e.createPositionAfter(t)));n&&e.setSelection(n,0)}(o,t,s.setSelection,c),l}))}const Ti=' ,.?!:;"-()';function Ei(e,t){const{isForward:o,walker:s,unit:i,schema:n,treatEmojiAsSingleUnit:r}=e,{type:c,item:l,nextPosition:d}=t;if("text"==c)return"word"===e.unit?function(e,t){let o=e.position.textNode;o||(o=t?e.position.nodeAfter:e.position.nodeBefore);for(;o&&o.is("$text");){const s=e.position.offset-o.startOffset;if(Mi(o,s,t))o=t?e.position.nodeAfter:e.position.nodeBefore;else{if(Si(o.data,s,t))break;e.next()}}return e.position}(s,o):function(e,t,o){const s=e.position.textNode;if(s){const i=s.data;let n=e.position.offset-s.startOffset;for(;(0,a.P5)(i,n)||"character"==t&&(0,a.Iw)(i,n)||o&&(0,a.SQ)(i,n);)e.next(),n=e.position.offset-s.startOffset}return e.position}(s,i,r);if(c==(o?"elementStart":"elementEnd")){if(n.isSelectable(l))return Dt._createAt(l,o?"after":"before");if(n.checkChild(d,"$text"))return d}else{if(n.isLimit(l))return void s.skip((()=>!0));if(n.checkChild(d,"$text"))return d}}function Pi(e,t){const o=e.root,s=Dt._createAt(o,t?"end":0);return t?new $t(e,s):new $t(s,e)}function Si(e,t,o){const s=t+(o?0:-1);return Ti.includes(e.charAt(s))}function Mi(e,t,o){return t===(o?e.offsetSize:0)}class Oi extends((0,a.VM)()){markers;document;schema;_pendingChanges;_currentWriter;constructor(){super(),this.markers=new ai,this.document=new ni(this),this.schema=new Uo,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),No(this),this.document.registerPostFixer(Po),this.on("insertContent",((e,[t,o])=>{e.return=function(e,t,o){return e.change((s=>{const i=o||e.document.selection;i.isCollapsed||e.deleteContent(i,{doNotAutoparagraph:!0});const n=new Ai(e,s,i.anchor),r=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[o,s]of t.markers){const{start:t,end:i}=s,n=t.isEqual(i);e.push({position:t,name:o,isCollapsed:n},{position:i,name:o,isCollapsed:n})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:o,name:i,isCollapsed:n}of e){let e=null,a=null;const c=o.parent===t&&o.isAtStart,l=o.parent===t&&o.isAtEnd;c||l?n&&(a=c?"start":"end"):(e=s.createElement("$marker"),s.insert(e,o)),r.push({name:i,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];n.handleNodes(a);let c=n.getSelectionRange();if(t.is("documentFragment")&&r.length){const e=c?so.fromRange(c):null,t={};for(let e=r.length-1;e>=0;e--){const{name:o,element:i,collapsed:a}=r[e],c=!t[o];if(c&&(t[o]=[]),i){const e=s.createPositionAt(i,"before");t[o].push(e),s.remove(i)}else{const e=n.getAffectedRange();if(!e){a&&t[o].push(n.position);continue}a?t[o].push(e[a]):t[o].push(c?e.start:e.end)}}for(const[e,[o,i]]of Object.entries(t))o&&i&&o.root===i.root&&o.root.document&&!s.model.markers.has(e)&&s.addMarker(e,{usingOperation:!0,affectsData:!0,range:new $t(o,i)});e&&(c=e.toRange(),e.detach())}c&&(i instanceof ao?s.setSelection(c):i.setTo(c));const l=n.getAffectedRange()||e.createRange(i.anchor);return n.destroy(),l}))}(this,t,o)})),this.on("insertObject",((e,[t,o,s])=>{e.return=Ci(this,t,o,s)})),this.on("canEditAt",(e=>{const t=!this.document.isReadOnly;e.return=t,t||e.stop()}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Zs,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){a.Yb.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new Zs):e instanceof Zs||(e=new Zs(e)):e=new Zs,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){a.Yb.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,o,...s){const i=Vi(t,o);return this.fire("insertContent",[e,i,o,...s])}insertObject(e,t,o,s,...i){const n=Vi(t,o);return this.fire("insertObject",[e,n,s,s,...i])}deleteContent(e,t){_i(this,e,t)}modifySelection(e,t){!function(e,t,o={}){const s=e.schema,i="backward"!=o.direction,n=o.unit?o.unit:"character",r=!!o.treatEmojiAsSingleUnit,a=t.focus,c=new It({boundaries:Pi(a,i),singleCharacters:!0,direction:i?"forward":"backward"}),l={walker:c,schema:s,isForward:i,unit:n,treatEmojiAsSingleUnit:r};let d;for(;d=c.next();){if(d.done)return;const o=Ei(l,d.value);if(o)return void(t instanceof ao?e.change((e=>{e.setSelectionFocus(o)})):t.setFocus(o))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const o=e.createDocumentFragment(),s=t.getFirstRange();if(!s||s.isCollapsed)return o;const i=s.start.root,n=s.start.getCommonPath(s.end),r=i.getNodeByPath(n);let a;a=s.start.parent==s.end.parent?s:e.createRange(e.createPositionAt(r,s.start.path[n.length]),e.createPositionAt(r,s.end.path[n.length]+1));const c=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),o):e.append(e.cloneElement(t,!0),o);if(a!=s){const t=s._getTransformedByMove(a.start,e.createPositionAt(o,0),c)[0],i=e.createRange(e.createPositionAt(o,0),t.start);xi(e.createRange(t.end,e.createPositionAt(o,"end")),e),xi(i,e)}return o}))}(this,e)}hasContent(e,t={}){const o=e instanceof $t?e:$t._createIn(e);if(o.isCollapsed)return!1;const{ignoreWhitespaces:s=!1,ignoreMarkers:i=!1}=t;if(!i)for(const e of this.markers.getMarkersIntersectingRange(o))if(e.affectsData)return!0;for(const e of o.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!s)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}canEditAt(e){const t=Vi(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,o){return new Dt(e,t,o)}createPositionAt(e,t){return Dt._createAt(e,t)}createPositionAfter(e){return Dt._createAfter(e)}createPositionBefore(e){return Dt._createBefore(e)}createRange(e,t){return new $t(e,t)}createRangeIn(e){return $t._createIn(e)}createRangeOn(e){return $t._createOn(e)}createSelection(...e){return new Zt(...e)}createBatch(e){return new Zs(e)}createOperationFromJSON(e){return Is.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new hi(this,t);const o=this._pendingChanges[0].callback(this._currentWriter);e.push(o),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function Vi(e,t){if(e)return e instanceof Zt||e instanceof ao?e:e instanceof Mt?t||0===t?new Zt(e,t):e.is("rootElement")?new Zt(e,"in"):new Zt(e,"on"):new Zt(e)}class Ri extends ht{domEventType="click";onDomEvent(e){this.fire(e.type,e)}}class ji extends ht{domEventType=["mousedown","mouseup","mouseover","mouseout"];onDomEvent(e){this.fire(e.type,e)}}class Ii{document;constructor(e){this.document=e}createDocumentFragment(e){return new Ae(this.document,e)}createElement(e,t,o){return new K(this.document,e,t,o)}createText(e){return new y(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,o){return o._insertChild(e,t)}removeChildren(e,t,o){return o._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const o=e.parent;if(o){const s=o.getChildIndex(e);return this.removeChildren(s,1,o),this.insertChild(s,t,o),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const o=t.getChildIndex(e);this.remove(e),this.insertChild(o,e.getChildren(),t)}}rename(e,t){const o=new K(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,o)?o:null}setAttribute(e,t,o){o._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,o){(0,A.A)(e)&&void 0===o?t._setStyle(e):o._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,o){o._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return te._createAt(e,t)}createPositionAfter(e){return te._createAfter(e)}createPositionBefore(e){return te._createBefore(e)}createRange(e,t){return new oe(e,t)}createRangeOn(e){return oe._createOn(e)}createRangeIn(e){return oe._createIn(e)}createSelection(...e){return new ie(...e)}}const Bi=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Di=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,Ni=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Fi=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,Li=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,zi=/\w+\((?:[^()]|\([^()]*\))*\)|\S+/gi,Hi=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function $i(e){return e.startsWith("#")?Bi.test(e):e.startsWith("rgb")?Di.test(e)||Ni.test(e):e.startsWith("hsl")?Fi.test(e)||Li.test(e):Hi.has(e.toLowerCase())}const Wi=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function qi(e){return Wi.includes(e)}const Ui=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Ki(e){return Ui.test(e)}const Yi=/^[+-]?[0-9]*([.][0-9]+)?%$/;function Gi(e){return Yi.test(e)}const Zi=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function Ji(e){return Zi.includes(e)}const Xi=["center","top","bottom","left","right"];function Qi(e){return Xi.includes(e)}const en=["fixed","scroll","local"];function tn(e){return en.includes(e)}const on=/^url\(/;function sn(e){return on.test(e)}function nn(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=ln(e),o=t[0],s=t[2]||o,i=t[1]||o;return{top:o,bottom:s,right:i,left:t[3]||i}}function rn(e){return t=>{const{top:o,right:s,bottom:i,left:n}=t,r=[];return[o,s,n,i].every((e=>!!e))?r.push([e,an(t)]):(o&&r.push([e+"-top",o]),s&&r.push([e+"-right",s]),i&&r.push([e+"-bottom",i]),n&&r.push([e+"-left",n])),r}}function an({top:e,right:t,bottom:o,left:s}){const i=[];return s!==t?i.push(e,t,o,s):o!==e?i.push(e,t,o):t!==e?i.push(e,t):i.push(e),i.join(" ")}function cn(e){return t=>({path:e,value:nn(t)})}function ln(e){const t=e.matchAll(zi);return Array.from(t).map((e=>e[0]))}function dn(e){e.setNormalizer("background",(e=>{const t={},o=ln(e);for(const e of o)Ji(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):Qi(e)?(t.position=t.position||[],t.position.push(e)):tn(e)?t.attachment=e:$i(e)?t.color=e:sn(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function hn(e){e.setNormalizer("border",(e=>{const{color:t,style:o,width:s}=bn(e);return{path:"border",value:{color:nn(t),style:nn(o),width:nn(s)}}})),e.setNormalizer("border-top",un("top")),e.setNormalizer("border-right",un("right")),e.setNormalizer("border-bottom",un("bottom")),e.setNormalizer("border-left",un("left")),e.setNormalizer("border-color",pn("color")),e.setNormalizer("border-width",pn("width")),e.setNormalizer("border-style",pn("style")),e.setNormalizer("border-top-color",fn("color","top")),e.setNormalizer("border-top-style",fn("style","top")),e.setNormalizer("border-top-width",fn("width","top")),e.setNormalizer("border-right-color",fn("color","right")),e.setNormalizer("border-right-style",fn("style","right")),e.setNormalizer("border-right-width",fn("width","right")),e.setNormalizer("border-bottom-color",fn("color","bottom")),e.setNormalizer("border-bottom-style",fn("style","bottom")),e.setNormalizer("border-bottom-width",fn("width","bottom")),e.setNormalizer("border-left-color",fn("color","left")),e.setNormalizer("border-left-style",fn("style","left")),e.setNormalizer("border-left-width",fn("width","left")),e.setExtractor("border-top",gn("top")),e.setExtractor("border-right",gn("right")),e.setExtractor("border-bottom",gn("bottom")),e.setExtractor("border-left",gn("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",rn("border-color")),e.setReducer("border-style",rn("border-style")),e.setReducer("border-width",rn("border-width")),e.setReducer("border-top",kn("top")),e.setReducer("border-right",kn("right")),e.setReducer("border-bottom",kn("bottom")),e.setReducer("border-left",kn("left")),e.setReducer("border",function(){return t=>{const o=_n(t,"top"),s=_n(t,"right"),i=_n(t,"bottom"),n=_n(t,"left"),r=[o,s,i,n],a={width:e(r,"width"),style:e(r,"style"),color:e(r,"color")},c=wn(a,"all");if(c.length)return c;return[...Object.entries(a).reduce(((e,[t,o])=>(o&&(e.push([`border-${t}`,o]),r.forEach((e=>delete e[t]))),e)),[]),...wn(o,"top"),...wn(s,"right"),...wn(i,"bottom"),...wn(n,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function un(e){return t=>{const{color:o,style:s,width:i}=bn(t),n={};return void 0!==o&&(n.color={[e]:o}),void 0!==s&&(n.style={[e]:s}),void 0!==i&&(n.width={[e]:i}),{path:"border",value:n}}}function pn(e){return t=>({path:"border",value:mn(t,e)})}function mn(e,t){return{[t]:nn(e)}}function fn(e,t){return o=>({path:"border",value:{[e]:{[t]:o}}})}function gn(e){return(t,o)=>{if(o.border)return _n(o.border,e)}}function _n(e,t){const o={};return e.width&&e.width[t]&&(o.width=e.width[t]),e.style&&e.style[t]&&(o.style=e.style[t]),e.color&&e.color[t]&&(o.color=e.color[t]),o}function bn(e){const t={},o=ln(e);for(const e of o)Ki(e)||/thin|medium|thick/.test(e)?t.width=e:qi(e)?t.style=e:t.color=e;return t}function kn(e){return t=>wn(t,e)}function wn(e,t){const o=[];if(e&&e.width&&o.push("width"),e&&e.style&&o.push("style"),e&&e.color&&o.push("color"),3==o.length){const s=o.map((t=>e[t])).join(" ");return["all"==t?["border",s]:[`border-${t}`,s]]}return"all"==t?[]:o.map((o=>[`border-${t}-${o}`,e[o]]))}function vn(e){e.setNormalizer("margin",cn("margin")),e.setNormalizer("margin-top",(e=>({path:"margin.top",value:e}))),e.setNormalizer("margin-right",(e=>({path:"margin.right",value:e}))),e.setNormalizer("margin-bottom",(e=>({path:"margin.bottom",value:e}))),e.setNormalizer("margin-left",(e=>({path:"margin.left",value:e}))),e.setReducer("margin",rn("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function yn(e){e.setNormalizer("padding",cn("padding")),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",rn("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}const xn="[",An="]",Cn="{",Tn="}",En={container:G,attribute:me,empty:_e,ui:ke,raw:ye},Pn={setContentOf:(e,t)=>{e.innerHTML=t}};function Sn(e,t={}){if(!(e instanceof Pt))throw new TypeError("View needs to be an instance of module:engine/view/view~View.");const o=e.document,s=!!t.withoutSelection,i=t.rootName||"main",n=o.getRoot(i),r={showType:t.showType,showPriority:t.showPriority,renderUIElements:t.renderUIElements,renderRawElements:t.renderRawElements,ignoreRoot:!0,domConverter:t.domConverter};return s?Sn._stringify(n,null,r):Sn._stringify(n,o.selection,r)}function Mn(e,t,o={}){if(!(e instanceof Pt))throw new TypeError("View needs to be an instance of module:engine/view/view~View.");const s=e.document,i=o.rootName||"main",n=s.getRoot(i);e.change((e=>{const o=Mn._parse(t,{rootElement:n});o.view&&o.selection&&e.setSelection(o.selection)}))}function On(e,t=null,o={}){let s;s=t instanceof te||t instanceof oe?new ne(t):t;return new jn(e,s,o).stringify()}function Vn(e,t={}){const o=new pe(new W);t.order=t.order||[];const s=new Rn({sameSelectionCharacters:t.sameSelectionCharacters});let i=new ms(o,{namespaces:Object.keys(En)}).toView(e);if(i=In(i),t.rootElement){const e=t.rootElement,o=i._removeChildren(0,i.childCount);e._removeChildren(0,e.childCount),e._appendChild(o),i=e}const n=s.parse(i,t.order);if(i.is("documentFragment")&&1===i.childCount&&(i=i.getChild(0)),n.length){return{view:i,selection:new ne(n,{backward:!!t.lastRangeBackward})}}return i.parent&&i._remove(),i}Sn._stringify=On,Mn._parse=Vn;class Rn{sameSelectionCharacters;_positions;constructor(e){this.sameSelectionCharacters=!!e.sameSelectionCharacters}parse(e,t){this._positions=[],this._getPositions(e);let o=this._createRanges();if(t.length){if(t.length!=o.length)throw new Error(`Parse error - there are ${o.length} ranges found, but ranges order array contains ${t.length} elements.`);o=this._sortRanges(o,t)}return o}_getPositions(e){if(e.is("documentFragment")||e.is("element")){const t=[...e.getChildren()];for(const e of t)this._getPositions(e)}if(e.is("$text")){const t=new RegExp(`[${Cn}${Tn}\\${An}\\${xn}]`,"g");let o,s=e.data,i=0;const n=[];for(;o=t.exec(s);){const e=o.index,t=o[0];n.push({bracket:t,textOffset:e-i}),i++}s=s.replace(t,""),e._data=s;const r=e.index,a=e.parent;s||e._remove();for(const t of n)if(s)if(this.sameSelectionCharacters||!this.sameSelectionCharacters&&(t.bracket==Cn||t.bracket==Tn))this._positions.push({bracket:t.bracket,position:new te(e,t.textOffset)});else{if(!this.sameSelectionCharacters&&0!==t.textOffset&&t.textOffset!==s.length)throw new Error(`Parse error - range delimiter '${t.bracket}' is placed inside text node.`);const e=0===t.textOffset?r:r+1;this._positions.push({bracket:t.bracket,position:new te(a,e)})}else{if(!this.sameSelectionCharacters&&t.bracket==Cn||t.bracket==Tn)throw new Error(`Parse error - text range delimiter '${t.bracket}' is placed inside empty text node. `);this._positions.push({bracket:t.bracket,position:new te(a,r)})}}}_sortRanges(e,t){const o=[];let s=0;for(const i of t){if(void 0===e[i-1])throw new Error("Parse error - provided ranges order is invalid.");o[i-1]=e[s],s++}return o}_createRanges(){const e=[];let t=null;for(const o of this._positions){if(!t&&(o.bracket==An||o.bracket==Tn))throw new Error(`Parse error - end of range was found '${o.bracket}' but range was not started before.`);if(t&&(o.bracket==xn||o.bracket==Cn))throw new Error(`Parse error - start of range was found '${o.bracket}' but one range is already started.`);o.bracket==xn||o.bracket==Cn?t=new oe(o.position,o.position):(t.end=o.position,e.push(t),t=null)}if(null!==t)throw new Error("Parse error - range was started but no end delimiter was found.");return e}}class jn{root;selection;ranges;showType;showPriority;showAttributeElementId;ignoreRoot;sameSelectionCharacters;renderUIElements;renderRawElements;domConverter;constructor(e,t,o){this.root=e,this.selection=t,this.ranges=[],t&&(this.ranges=[...t.getRanges()]),this.showType=!!o.showType,this.showPriority=!!o.showPriority,this.showAttributeElementId=!!o.showAttributeElementId,this.ignoreRoot=!!o.ignoreRoot,this.sameSelectionCharacters=!!o.sameSelectionCharacters,this.renderUIElements=!!o.renderUIElements,this.renderRawElements=!!o.renderRawElements,this.domConverter=o.domConverter||Pn}stringify(){let e="";return this._walkView(this.root,(t=>{e+=t})),e}_walkView(e,t){const o=this.ignoreRoot&&this.root===e;if(e.is("element")||e.is("documentFragment")){if(e.is("element")&&!o&&t(this._stringifyElementOpen(e)),this.renderUIElements&&e.is("uiElement"))t(e.render(document,this.domConverter).innerHTML);else if(this.renderRawElements&&e.is("rawElement")){const o=document.createElement("div");e.render(o,this.domConverter),t(o.innerHTML)}else{let o=0;t(this._stringifyElementRanges(e,o));for(const s of e.getChildren())this._walkView(s,t),o++,t(this._stringifyElementRanges(e,o))}e.is("element")&&!o&&t(this._stringifyElementClose(e))}e.is("$text")&&t(this._stringifyTextRanges(e))}_stringifyElementRanges(e,t){let o="",s="",i="";for(const n of this.ranges)n.start.parent==e&&n.start.offset===t&&(n.isCollapsed?i+=xn+An:o+=xn),n.end.parent!==e||n.end.offset!==t||n.isCollapsed||(s+=An);return s+i+o}_stringifyTextRanges(e){const t=e.data.length,o=e.data.split("");let s,i;this.sameSelectionCharacters?(s=xn,i=An):(s=Cn,i=Tn),o[t]="";const n=o.map((e=>({letter:e,start:"",end:"",collapsed:""})));for(const o of this.ranges){const r=o.start,a=o.end;r.parent==e&&r.offset>=0&&r.offset<=t&&(o.isCollapsed?n[a.offset].collapsed+=s+i:n[r.offset].start+=s),a.parent==e&&a.offset>=0&&a.offset<=t&&!o.isCollapsed&&(n[a.offset].end+=i)}return n.map((e=>e.end+e.collapsed+e.start+e.letter)).join("")}_stringifyElementOpen(e){const t=this._stringifyElementPriority(e),o=this._stringifyElementId(e);return`<${[[this._stringifyElementType(e),e.name].filter((e=>""!==e)).join(":"),t,o,this._stringifyElementAttributes(e)].filter((e=>""!==e)).join(" ")}>`}_stringifyElementClose(e){return`""!==e)).join(":")}>`}_stringifyElementType(e){if(this.showType)for(const t in En)if(e instanceof En[t])return t;return""}_stringifyElementPriority(e){return this.showPriority&&e.is("attributeElement")?`view-priority="${e.priority}"`:""}_stringifyElementId(e){return this.showAttributeElementId&&e.is("attributeElement")&&e.id?`view-id="${e.id}"`:""}_stringifyElementAttributes(e){const t=[],o=[...e.getAttributeKeys()].sort();for(const s of o){let o;o="class"===s?[...e.getClassNames()].sort().join(" "):"style"===s?[...e.getStyleNames()].sort().map((t=>`${t}:${e.getStyle(t).replace(/"/g,""")}`)).join(";"):e.getAttribute(s),t.push(`${s}="${o}"`)}return t.join(" ")}}function In(e){if(e.is("element")||e.is("documentFragment")){const t=e.is("documentFragment")?new Ae(e.document):function(e,t){const o=function(e){const t=e.name.split(":"),o=function(e){const t=parseInt(e,10);if(!isNaN(t))return t;return null}(e.getAttribute("view-priority")),s=e.hasAttribute("view-id")?e.getAttribute("view-id"):null;if(e._removeAttribute("view-priority"),e._removeAttribute("view-id"),1==t.length)return{name:t[0],type:null!==o?"attribute":null,priority:o,id:s};const i=function(e){return e in En?e:null}(t[0]);if(i)return{name:t[1],type:i,priority:o,id:s};throw new Error(`Parse error - cannot parse element's name: ${e.name}.`)}(t),s=En[o.type],i=s?new s(e,o.name):new K(e,o.name);i.is("attributeElement")&&(null!==o.priority&&(i._priority=o.priority),null!==o.id&&(i._id=o.id));for(const e of t.getAttributeKeys())i._setAttribute(e,t.getAttribute(e));return i}(e.document,e);for(const o of[...e.getChildren()]){if(t.is("emptyElement"))throw new Error("Parse error - cannot parse inside EmptyElement.");if(t.is("uiElement"))throw new Error("Parse error - cannot parse inside UIElement.");if(t.is("rawElement"))throw new Error("Parse error - cannot parse inside RawElement.");t._appendChild(In(o))}return t}return e}function Bn(e,t={}){if(!(e instanceof Oi))throw new TypeError("Model needs to be an instance of module:engine/model/model~Model.");const o=t.rootName||"main",s=e.document.getRoot(o);return Bn._stringify(s,t.withoutSelection?null:e.document.selection,t.convertMarkers?e.markers:null)}function Dn(e,t,o={}){if(!(e instanceof Oi))throw new TypeError("Model needs to be an instance of module:engine/model/model~Model.");let s,i=null;const n=e.document.getRoot(o.rootName||"main"),r=Dn._parse(t,e.schema,{lastRangeBackward:o.lastRangeBackward,selectionAttributes:o.selectionAttributes,context:[n.name]});function a(t){if(t.remove(t.createRangeIn(n)),t.insert(s,n),t.setSelection(null),t.removeSelectionAttribute(e.document.selection.getAttributeKeys()),i){const e=[];for(const t of i.getRanges()){const o=new Dt(n,t.start.path),s=new Dt(n,t.end.path);e.push(new $t(o,s))}t.setSelection(e,{backward:i.isBackward}),o.selectionAttributes&&t.setSelectionAttribute(i.getAttributes())}}"model"in r?(s=r.model,i=r.selection):s=r,void 0!==o.batchType?e.enqueueChange(o.batchType,a):e.change(a)}function Nn(e,t=null,o=null){const s=new Oi,i=new Wt;let n,r=null;if(e instanceof si||e instanceof di)n=s.createRangeIn(e);else if(e.parent)n=new $t(s.createPositionBefore(e),s.createPositionAfter(e));else{const t=new di(e);n=s.createRangeIn(t)}t instanceof Zt||t instanceof ao?r=t:(t instanceof $t||t instanceof Dt)&&(r=new Zt(t));const a=new W,c=new Pt(a),l=c.document,d=new Q(l,"div");d.rootName="main",l.roots.add(d);const h=new Kt({mapper:i,schema:s.schema});i.bindElements(e.root,d),h.on("insert:$text",((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const s=o.writer,i=o.mapper.toViewPosition(t.range.start),n=s.createText(t.item.data);s.insert(i,n)})),h.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),h.on("attribute",((e,t,o)=>{if(t.item instanceof Zt||t.item instanceof ao||t.item.is("$textProxy")){mo(((e,{writer:o})=>o.createAttributeElement("model-text-with-attributes",{[t.attributeKey]:Hn(e)})))(e,t,o)}})),h.on("insert",fo((e=>{const t=$n(e.getAttributes(),Hn);return new G(l,e.name,t)}))),h.on("selection",((e,t,o)=>{const s=t.selection;if(s.isCollapsed)return;if(!o.consumable.consume(s,"selection"))return;const i=[];for(const e of s.getRanges())i.push(o.mapper.toViewRange(e));o.writer.setSelection(i,{backward:s.isBackward})})),h.on("selection",((e,t,o)=>{const s=t.selection;if(!s.isCollapsed)return;if(!o.consumable.consume(s,"selection"))return;const i=o.writer,n=s.getFirstPosition(),r=o.mapper.toViewPosition(n),a=i.breakAttributes(r);i.setSelection(a)})),h.on("addMarker",go(((e,{writer:t})=>{const o=e.markerName+":"+(e.isOpening?"start":"end");return t.createUIElement(o)})));const u=new Map;if(o)for(const e of Array.from(o).sort(((e,t)=>e.name{const i=s.convertChildren(o.viewItem,o.modelCursor);e.bindElements(o.modelCursor.parent,o.viewItem),o=Object.assign(o,i),t.stop()}}(s)),d.on("element:model-text-with-attributes",Ln()),d.on("element",function(e){return(t,o,s)=>{const i=o.viewItem.name;if(!s.schema.checkChild(o.modelCursor,i))throw new Error(`Element '${i}' was not allowed in given position.`);const n=$n(o.viewItem.getAttributes(),zn),r=s.writer.createElement(o.viewItem.name,n);s.writer.insert(r,o.modelCursor),e.bindElements(r,o.viewItem),s.convertChildren(o.viewItem,r),o.modelRange=$t._createOn(r),o.modelCursor=o.modelRange.end,t.stop()}}(s)),d.on("text",Ln());let h=l.change((e=>d.convert(n.root,e,o.context||"$root")));if(s.bindElements(h,n.root),1==h.childCount&&(h=h.getChild(0)),r){const e=[];for(const t of r.getRanges())e.push(s.toModelRange(t));c=new Zt(e,{backward:r.isBackward});for(const[e,t]of(0,a.av)(o.selectionAttributes||[]))c.setAttribute(e,t)}return c?{model:h,selection:c}:h}function Ln(){return(e,t,o)=>{if(!o.schema.checkChild(t.modelCursor,"$text"))throw new Error("Text was not allowed in given position.");let s;if(t.viewItem.is("element")){const e=$n(t.viewItem.getAttributes(),zn),i=t.viewItem.getChild(0);s=o.writer.createText(i.data,e)}else s=o.writer.createText(t.viewItem.data);o.writer.insert(s,t.modelCursor),t.modelRange=$t._createFromPositionAndShift(t.modelCursor,s.offsetSize),t.modelCursor=t.modelRange.end,e.stop()}}function zn(e){try{return JSON.parse(e)}catch(t){return e}}function Hn(e){return(0,A.A)(e)?JSON.stringify(e):e}function*$n(e,t){for(const[o,s]of e)yield[o,t(s)]}Bn._stringify=Nn,Dn._parse=Fn},"./packages/ckeditor5-enter/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{x:()=>h,D:()=>f});var s=o("./packages/ckeditor5-core/src/index.ts");function*i(e,t){for(const o of t)o&&e.getAttributeProperties(o[0]).copyOnEnter&&(yield o)}class n extends s.uB{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,o=t.document.selection,s=t.schema,n=o.isCollapsed,a=o.getFirstRange(),c=a.start.parent,l=a.end.parent;if(s.isLimit(c)||s.isLimit(l))return n||c!=l||t.deleteContent(o),!1;if(n){const t=i(e.model.schema,o.getAttributes());return r(e,a.start),e.setSelectionAttribute(t),!0}{const s=!(a.start.isAtStart&&a.end.isAtEnd),i=c==l;if(t.deleteContent(o,{leaveUnmerged:s}),s){if(i)return r(e,o.focus),!0;e.setSelection(l,0)}}return!1}}function r(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}var a=o("./packages/ckeditor5-engine/src/index.ts"),c=o("./packages/ckeditor5-utils/src/index.ts");const l={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class d extends a.nu{constructor(e){super(e);const t=this.document;let o=!1;t.on("keydown",((e,t)=>{o=t.shiftKey})),t.on("beforeinput",((s,i)=>{if(!this.isEnabled)return;let n=i.inputType;c._K.isSafari&&o&&"insertParagraph"==n&&(n="insertLineBreak");const r=i.domEvent,d=l[n];if(!d)return;const h=new a.cJ(t,"enter",i.targetRanges[0]);t.fire(h,new a.FY(e,r,{isSoft:d.isSoft})),h.stop.called&&s.stop()}))}observe(){}stopObserving(){}}class h extends s.k_{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,o=t.document,s=this.editor.t;t.addObserver(d),e.commands.add("enter",new n(e)),this.listenTo(o,"enter",((s,i)=>{o.isComposing||i.preventDefault(),i.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:s("Insert a hard break (a new paragraph)"),keystroke:"Enter"}]})}}class u extends s.uB{execute(){const e=this.editor.model,t=e.document;e.change((o=>{!function(e,t,o){const s=o.isCollapsed,n=o.getFirstRange(),r=n.start.parent,a=n.end.parent,c=r==a;if(s){const s=i(e.schema,o.getAttributes());p(e,t,n.end),t.removeSelectionAttribute(o.getAttributeKeys()),t.setSelectionAttribute(s)}else{const s=!(n.start.isAtStart&&n.end.isAtEnd);e.deleteContent(o,{leaveUnmerged:s}),c?p(e,t,o.focus):s&&t.setSelection(a,0)}}(e,o,t.selection),this.fire("afterExecute",{writer:o})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const o=t.anchor;if(!o||!e.checkChild(o,"softBreak"))return!1;const s=t.getFirstRange(),i=s.start.parent,n=s.end.parent;if((m(i,e)||m(n,e))&&i!==n)return!1;return!0}(e.schema,t.selection)}}function p(e,t,o){const s=t.createElement("softBreak");e.insertContent(s,o),t.setSelection(s,"after")}function m(e,t){return!e.is("rootElement")&&(t.isLimit(e)||m(e.parent,t))}class f extends s.k_{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,o=e.conversion,s=e.editing.view,i=s.document,n=this.editor.t;t.register("softBreak",{allowWhere:"$text",isInline:!0}),o.for("upcast").elementToElement({model:"softBreak",view:"br"}),o.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),s.addObserver(d),e.commands.add("shiftEnter",new u(e)),this.listenTo(i,"enter",((t,o)=>{i.isComposing||o.preventDefault(),o.isSoft&&(e.execute("shiftEnter"),s.scrollToTheSelection())}),{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert a soft break (a <br> element)"),keystroke:"Shift+Enter"}]})}}},"./packages/ckeditor5-typing/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{ep:()=>k,pd:()=>d,Ki:()=>r,De:()=>j,qV:()=>y,Vp:()=>x,IG:()=>w,Py:()=>F,lO:()=>L,ex:()=>v,Il:()=>z});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-utils/src/index.ts");class n{model;limit;_isLocked;_size;_batch=null;_changeCallback;_selectionChangeCallback;constructor(e,t=20){this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){this.isLocked&&!e||(this._batch=null,this._size=0)}}class r extends s.uB{_buffer;constructor(e,t){super(e),this._buffer=new n(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,o=t.document,s=e.text||"",i=s.length;let n=o.selection;if(e.selection?n=e.selection:e.range&&(n=t.createSelection(e.range)),!t.canEditAt(n))return;const r=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock();const a=Array.from(o.selection.getAttributes());t.deleteContent(n),s&&t.insertContent(e.createText(s,a),n),r?e.setSelection(r):n.is("documentSelection")||e.setSelection(n),this._buffer.unlock(),this._buffer.input(i)}))}}var a=o("./packages/ckeditor5-engine/src/index.ts");const c=["insertText","insertReplacementText"];class l extends a.nu{focusObserver;constructor(e){super(e),this.focusObserver=e.getObserver(a.vp),i._K.isAndroid&&c.push("insertCompositionText");const t=e.document;t.on("beforeinput",((o,s)=>{if(!this.isEnabled)return;const{data:n,targetRanges:r,inputType:l,domEvent:d}=s;if(!c.includes(l))return;this.focusObserver.flush();const h=new i.vY(t,"insertText");t.fire(h,new a.FY(e,d,{text:n,selection:e.createSelection(r)})),h.stop.called&&o.stop()})),t.on("compositionend",((o,{data:s,domEvent:n})=>{this.isEnabled&&!i._K.isAndroid&&s&&t.fire("insertText",new a.FY(e,n,{text:s,selection:t.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class d extends s.k_{static get pluginName(){return"Input"}init(){const e=this.editor,t=e.model,o=e.editing.view,s=t.document.selection;o.addObserver(l);const n=new r(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",n),e.commands.add("input",n),this.listenTo(o.document,"insertText",((s,n)=>{o.document.isComposing||n.preventDefault();const{text:r,selection:a,resultRange:c}=n,l=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));let d=r;if(i._K.isAndroid){const e=Array.from(l[0].getItems()).reduce(((e,t)=>e+(t.is("$textProxy")?t.data:"")),"");e&&(e.length<=d.length?d.startsWith(e)&&(d=d.substring(e.length),l[0].start=l[0].start.getShiftedBy(e.length)):e.startsWith(d)&&(l[0].start=l[0].start.getShiftedBy(d.length),d=""))}const h={text:d,selection:t.createSelection(l)};c&&(h.resultRange=e.editing.mapper.toModelRange(c)),e.execute("insertText",h),o.scrollToTheSelection()})),i._K.isAndroid?this.listenTo(o.document,"keydown",((e,i)=>{!s.isCollapsed&&229==i.keyCode&&o.document.isComposing&&h(t,n)})):this.listenTo(o.document,"compositionstart",(()=>{s.isCollapsed||h(t,n)}))}}function h(e,t){if(!t.isEnabled)return;const o=t.buffer;o.lock(),e.enqueueChange(o.batch,(()=>{e.deleteContent(e.document.selection)})),o.unlock()}class u extends s.uB{direction;_buffer;constructor(e,t){super(e),this.direction=t,this._buffer=new n(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,o=t.document;t.enqueueChange(this._buffer.batch,(s=>{this._buffer.lock();const n=s.createSelection(e.selection||o.selection);if(!t.canEditAt(n))return;const r=e.sequence||1,a=n.isCollapsed;if(n.isCollapsed&&t.modifySelection(n,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(r))return void this._replaceEntireContentWithParagraph(s);if(this._shouldReplaceFirstBlockWithParagraph(n,r))return void this.editor.execute("paragraph",{selection:n});if(n.isCollapsed)return;let c=0;n.getFirstRange().getMinimalFlatRanges().forEach((e=>{c+=(0,i.U9)(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(n,{doNotResetEntireContent:a,direction:this.direction}),this._buffer.input(c),s.setSelection(n),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,o=t.document.selection,s=t.schema.getLimitElement(o);if(!(o.isCollapsed&&o.containsEntireContent(s)))return!1;if(!t.schema.checkChild(s,"paragraph"))return!1;const i=s.getChild(0);return!i||!i.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,o=t.document.selection,s=t.schema.getLimitElement(o),i=e.createElement("paragraph");e.remove(e.createRangeIn(s)),e.insert(i,s),e.setSelection(i,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const o=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const s=e.getFirstPosition(),i=o.schema.getLimitElement(s),n=i.getChild(0);return s.parent==n&&(!!e.containsEntireContent(n)&&(!!o.schema.checkChild(i,"paragraph")&&"paragraph"!=n.name))}}const p="word",m="selection",f="backward",g="forward",_={deleteContent:{unit:m,direction:f},deleteContentBackward:{unit:"codePoint",direction:f},deleteWordBackward:{unit:p,direction:f},deleteHardLineBackward:{unit:m,direction:f},deleteSoftLineBackward:{unit:m,direction:f},deleteContentForward:{unit:"character",direction:g},deleteWordForward:{unit:p,direction:g},deleteHardLineForward:{unit:m,direction:g},deleteSoftLineForward:{unit:m,direction:g}};class b extends a.nu{constructor(e){super(e);const t=e.document;let o=0;t.on("keydown",(()=>{o++})),t.on("keyup",(()=>{o=0})),t.on("beforeinput",((s,n)=>{if(!this.isEnabled)return;const{targetRanges:r,domEvent:c,inputType:l}=n,d=_[l];if(!d)return;const h={direction:d.direction,unit:d.unit,sequence:o};h.unit==m&&(h.selectionToRemove=e.createSelection(r[0])),"deleteContentBackward"===l&&(i._K.isAndroid&&(h.sequence=1),function(e){if(1!=e.length||e[0].isCollapsed)return!1;const t=e[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let o=0;for(const{nextPosition:e,item:s}of t){if(e.parent.is("$text")){const t=e.parent.data,s=e.offset;if((0,i.P5)(t,s)||(0,i.Iw)(t,s)||(0,i.SQ)(t,s))continue;o++}else(s.is("containerElement")||s.is("emptyElement"))&&o++;if(o>1)return!0}return!1}(r)&&(h.unit=m,h.selectionToRemove=e.createSelection(r)));const u=new a.cJ(t,"delete",r[0]);t.fire(u,new a.FY(e,c,h)),u.stop.called&&s.stop()})),i._K.isBlink&&function(e){const t=e.view,o=t.document;let s=null,n=!1;function r(e){return e==i.uP.backspace||e==i.uP.delete}function c(e){return e==i.uP.backspace?f:g}o.on("keydown",((e,{keyCode:t})=>{s=t,n=!1})),o.on("keyup",((i,{keyCode:l,domEvent:d})=>{const h=o.selection,u=e.isEnabled&&l==s&&r(l)&&!h.isCollapsed&&!n;if(s=null,u){const e=h.getFirstRange(),s=new a.cJ(o,"delete",e),i={unit:m,direction:c(l),selectionToRemove:h};o.fire(s,new a.FY(t,d,i))}})),o.on("beforeinput",((e,{inputType:t})=>{const o=_[t];r(s)&&o&&o.direction==c(s)&&(n=!0)}),{priority:"high"}),o.on("beforeinput",((e,{inputType:t,data:o})=>{s==i.uP.delete&&"insertText"==t&&""==o&&e.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class k extends s.k_{_undoOnBackspace;static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,o=t.document,s=e.model.document;t.addObserver(b),this._undoOnBackspace=!1;const i=new u(e,"forward");e.commands.add("deleteForward",i),e.commands.add("forwardDelete",i),e.commands.add("delete",new u(e,"backward")),this.listenTo(o,"delete",((s,i)=>{o.isComposing||i.preventDefault();const{direction:n,sequence:r,selectionToRemove:a,unit:c}=i,l="forward"===n?"deleteForward":"delete",d={sequence:r};if("selection"==c){const t=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));d.selection=e.model.createSelection(t)}else d.unit=c;e.execute(l,d),t.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(o,"delete",((t,o)=>{this._undoOnBackspace&&"backward"==o.direction&&1==o.sequence&&"codePoint"==o.unit&&(this._undoOnBackspace=!1,e.execute("undo"),o.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(s,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class w extends s.k_{static get requires(){return[d,k]}static get pluginName(){return"Typing"}}function v(e,t){let o=e.start;return{text:Array.from(e.getWalker({ignoreElementEnd:!1})).reduce(((e,{item:s})=>s.is("$text")||s.is("$textProxy")?e+s.data:(o=t.createPositionAfter(s),"")),""),range:t.createRange(o,e.end)}}class y extends((0,i.VM)()){model;testCallback;_hasMatch;constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:o})=>{o&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const o=this.model,s=o.document.selection,i=o.createRange(o.createPositionAt(s.focus.parent,0),s.focus),{text:n,range:r}=v(i,o),a=this.testCallback(n);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const o=Object.assign(t,{text:n,range:r});"object"==typeof a&&Object.assign(o,a),this.fire(`matched:${e}`,o)}}}class x extends s.k_{attributes;_overrideUid;_isNextGravityRestorationSkipped=!1;static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,o=e.editing.view,s=e.locale,n=t.document.selection;this.listenTo(o.document,"arrowKey",((e,t)=>{if(!n.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const o=t.keyCode==i.uP.arrowright,r=t.keyCode==i.uP.arrowleft;if(!o&&!r)return;const a=s.contentLanguageDirection;let c=!1;c="ltr"===a&&o||"rtl"===a&&r?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===c&&e.stop()}),{context:"$text",priority:"highest"}),this.listenTo(n,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&S(n.getFirstPosition(),this.attributes)||this._restoreGravity())})),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,o=this.editor.model,s=o.document.selection,i=s.getFirstPosition();return!this._isGravityOverridden&&((!i.isAtStart||!A(s,t))&&(!!S(i,t)&&(E(e),A(s,t)&&S(i,t,!0)?T(o,t):this._overrideGravity(),!0)))}_handleBackwardMovement(e){const t=this.attributes,o=this.editor.model,s=o.document.selection,i=s.getFirstPosition();return this._isGravityOverridden?(E(e),this._restoreGravity(),S(i,t,!0)?T(o,t):C(o,t,i),!0):i.isAtStart?!!A(s,t)&&(E(e),C(o,t,i),!0):!A(s,t)&&S(i,t,!0)?(E(e),C(o,t,i),!0):!!P(i,t)&&(i.isAtEnd&&!A(s,t)&&S(i,t)?(E(e),C(o,t,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}_enableClickingAfterNode(){const e=this.editor,t=e.model,o=t.document.selection,s=e.editing.view.document;e.editing.view.addObserver(a.q$);let i=!1;this.listenTo(s,"mousedown",(()=>{i=!0})),this.listenTo(s,"selectionChange",(()=>{const e=this.attributes;if(!i)return;if(i=!1,!o.isCollapsed)return;if(!A(o,e))return;const s=o.getFirstPosition();S(s,e)&&(s.isAtStart||S(s,e,!0)?T(t,e):this._isGravityOverridden||this._overrideGravity())}))}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection,o=this.attributes;this.listenTo(e,"insertContent",(()=>{const s=t.getFirstPosition();A(t,o)&&S(s,o)&&T(e,o)}),{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,t=e.model,o=t.document.selection,s=e.editing.view;let i=!1,n=!1;this.listenTo(s.document,"delete",((e,t)=>{i="backward"===t.direction}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{if(!i)return;const e=o.getFirstPosition();n=A(o,this.attributes)&&!P(e,this.attributes)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{i&&(i=!1,n||e.model.enqueueChange((()=>{const e=o.getFirstPosition();A(o,this.attributes)&&S(e,this.attributes)&&(e.isAtStart||S(e,this.attributes,!0)?T(t,this.attributes):this._isGravityOverridden||this._overrideGravity())})))}),{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function A(e,t){for(const o of t)if(e.hasAttribute(o))return!0;return!1}function C(e,t,o){const s=o.nodeBefore;e.change((o=>{if(s){const t=[],i=e.schema.isObject(s)&&e.schema.isInline(s);for(const[o,n]of s.getAttributes())!e.schema.checkAttribute("$text",o)||i&&!1===e.schema.getAttributeProperties(o).copyFromObject||t.push([o,n]);o.setSelectionAttribute(t)}else o.removeSelectionAttribute(t)}))}function T(e,t){e.change((e=>{e.removeSelectionAttribute(t)}))}function E(e){e.preventDefault()}function P(e,t){return S(e.getShiftedBy(-1),t)}function S(e,t,o=!1){const{nodeBefore:s,nodeAfter:i}=e;for(const e of t){const t=s?s.getAttribute(e):void 0,n=i?i.getAttribute(e):void 0;if((!o||void 0!==t&&void 0!==n)&&n!==t)return!0}return!1}var M=o("./node_modules/lodash-es/escapeRegExp.js");const O={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:N('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:N("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:N("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:N('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:N('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:N("'"),to:[null,"‚",null,"’"]}},V={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},R=["symbols","mathematical","typography","quotes"];class j extends s.k_{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(e){super(e),e.config.define("typing",{transformations:{include:R}})}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,o=e.plugins.get("Delete"),s=function(e){const t=e.extra||[],o=e.remove||[],s=e=>!o.includes(e);return function(e){const t=new Set;for(const o of e)if("string"==typeof o&&V[o])for(const e of V[o])t.add(e);else t.add(o);return Array.from(t)}(e.include.concat(t).filter(s)).filter(s).map((e=>"string"==typeof e&&O[e]?O[e]:e)).filter((e=>"object"==typeof e)).map((e=>({from:I(e.from),to:B(e.to)})))}(e.config.get("typing.transformations")),i=new y(e.model,(e=>{for(const t of s){if(t.from.test(e))return{normalizedTransformation:t}}}));i.on("matched:data",((e,s)=>{if(!s.batch.isTyping)return;const{from:i,to:n}=s.normalizedTransformation,r=i.exec(s.text),a=n(r.slice(1)),c=s.range;let l=r.index;t.enqueueChange((e=>{for(let o=1;o{o.requestUndoOnBackspace()}))}))})),i.bind("isEnabled").to(this)}}function I(e){return"string"==typeof e?new RegExp(`(${(0,M.A)(e)})$`):e}function B(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}function D(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function N(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function F(e,t,o,s){return s.createRange(L(e,t,o,!0,s),L(e,t,o,!1,s))}function L(e,t,o,s,i){let n=e.textNode||(s?e.nodeBefore:e.nodeAfter),r=null;for(;n&&n.getAttribute(t)==o;)r=n,n=s?n.previousSibling:n.nextSibling;return r?i.createPositionAt(r,s?"before":"after"):e}function z(e,t,o,s){const i=e.editing.view,n=new Set;i.document.registerPostFixer((i=>{const r=e.model.document.selection;let a=!1;if(r.hasAttribute(t)){const c=F(r.getFirstPosition(),t,r.getAttribute(t),e.model),l=e.editing.mapper.toViewRange(c);for(const e of l.getItems())e.is("element",o)&&!e.hasClass(s)&&(i.addClass(s,e),n.add(e),a=!0)}return a})),e.conversion.for("editingDowncast").add((e=>{function t(){i.change((e=>{for(const t of n.values())e.removeClass(s,t),n.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}},"./packages/ckeditor5-ui/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{KO:()=>ve,uI:()=>Hs,Jr:()=>zo,bQ:()=>ti,Lz:()=>ai,v1:()=>ye,Xt:()=>ms,e0:()=>H,_:()=>q,Kn:()=>Oe,pQ:()=>Ne,ph:()=>yo,oB:()=>Ro,vF:()=>Ie,eH:()=>jo,pU:()=>Ts,wi:()=>I,ep:()=>bi,lG:()=>le,_m:()=>ce,nu:()=>re,lU:()=>lt,Vz:()=>nt,BO:()=>ct,Gn:()=>ls,nc:()=>ps,eF:()=>Te,H:()=>G,Dy:()=>Y,MZ:()=>Zs,Ln:()=>z,WU:()=>_s,LU:()=>gs,Zz:()=>et,hK:()=>Qe,E6:()=>Xe,y0:()=>fe,xE:()=>Ye,m_:()=>yt,BD:()=>wt,Je:()=>vt,uO:()=>Ct,kS:()=>ue,GG:()=>Fi,I8:()=>pi,BY:()=>Ni,zj:()=>Di,yJ:()=>$i,Eg:()=>bs,wD:()=>js,b8:()=>Fs,XE:()=>Qs,AO:()=>Pt,xw:()=>Vs,Wm:()=>Ce,Bj:()=>a,OB:()=>st,Cy:()=>ht,IY:()=>dt,X3:()=>gt,JV:()=>Uo,Ss:()=>V,s3:()=>i,Jc:()=>ws,G6:()=>Oi,l1:()=>D,O:()=>Bt,fM:()=>jt,wy:()=>R,yu:()=>Rt,By:()=>$t,F_:()=>zt,Vr:()=>Lt,GR:()=>Ht,Zn:()=>Nt,b2:()=>Ve,I0:()=>j,tp:()=>J,eG:()=>X,lF:()=>Re,mB:()=>ki,iv:()=>je,fl:()=>ut,Z5:()=>B});var s=o("./packages/ckeditor5-utils/src/index.ts");class i extends s.pM{_parentElement;constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,o)=>{this._renderViewIntoCollectionParent(t,o)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new s.Yb("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const o of this)for(const s of e)o.delegate(s).to(t);this.on("add",((o,s)=>{for(const o of e)s.delegate(o).to(t)})),this.on("remove",((o,s)=>{for(const o of e)s.stopDelegating(o,t)}))}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}var n=o("./node_modules/lodash-es/cloneDeepWith.js"),r=o("./node_modules/lodash-es/isObject.js");class a extends((0,s.Mm)()){ns;tag;text;attributes;children;eventListeners;_isRendered;_revertData;constructor(e){super(),Object.assign(this,_(g(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new s.Yb("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const o of t.children)x(o)?yield o:A(o)&&(yield*e(o))}(this)}static bind(e,t){return{to:(o,s)=>new l({eventNameOrFunction:o,attribute:o,observable:e,emitter:t,callback:s}),if:(o,s,i)=>new d({observable:e,emitter:t,attribute:o,valueIfTrue:s,callback:i})}}static extend(e,t){if(e._isRendered)throw new s.Yb("template-extend-render",[this,e]);v(e,_(g(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new s.Yb("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),h(this.text)?this._bindToObservable({schema:this.text,updater:p(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,o=e.revertData;for(const s in this.attributes){const i=t.getAttribute(s),n=this.attributes[s];o&&(o.attributes[s]=i);const r=T(n)?n[0].ns:null;if(h(n)){const a=T(n)?n[0].value:n;o&&E(s)&&a.unshift(i),this._bindToObservable({schema:a,updater:m(t,s,r),data:e})}else if("style"==s&&"string"!=typeof n[0])this._renderStyleAttribute(n[0],e);else{o&&i&&E(s)&&n.unshift(i);const e=n.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce(k,"");y(e)||t.setAttributeNS(r,s,e)}}}_renderStyleAttribute(e,t){const o=t.node;for(const s in e){const i=e[s];h(i)?this._bindToObservable({schema:[i],updater:f(o,s),data:t}):o.style[s]=i}}_renderElementChildren(e){const t=e.node,o=e.intoFragment?document.createDocumentFragment():t,i=e.isApplying;let n=0;for(const r of this.children)if(C(r)){if(!i){r.setParent(t);for(const e of r)o.appendChild(e.element)}}else if(x(r))i||(r.isRendered||r.render(),o.appendChild(r.element));else if((0,s.Ll)(r))o.appendChild(r);else if(i){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),r._renderNode({intoFragment:!1,node:o.childNodes[n++],isApplying:!0,revertData:t})}else o.appendChild(r.render());e.intoFragment&&t.appendChild(o)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const o=this.eventListeners[t].map((o=>{const[s,i]=t.split("@");return o.activateDomEventListener(s,i,e)}));e.revertData&&e.revertData.bindings.push(o)}}_bindToObservable({schema:e,updater:t,data:o}){const s=o.revertData;u(e,t,o);const i=e.filter((e=>!y(e))).filter((e=>e.observable)).map((s=>s.activateAttributeListener(e,t,o)));s&&s.bindings.push(i)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const o=e;for(const e in t.attributes){const s=t.attributes[e];null===s?o.removeAttribute(e):o.setAttribute(e,s)}for(let e=0;eu(e,t,o);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,s),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,s)}}}class l extends c{eventNameOrFunction;constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,o){const s=(e,o)=>{t&&!o.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(o):this.observable.fire(this.eventNameOrFunction,o))};return this.emitter.listenTo(o.node,e,s),()=>{this.emitter.stopListening(o.node,e,s)}}}class d extends c{valueIfTrue;constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!y(super.getValue(e))&&(this.valueIfTrue||!0)}}function h(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(h):e instanceof c)}function u(e,t,{node:o}){const s=function(e,t){return e.map((e=>e instanceof c?e.getValue(t):e))}(e,o);let i;i=1==e.length&&e[0]instanceof d?s[0]:s.reduce(k,""),y(i)?t.remove():t.set(i)}function p(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function m(e,t,o){return{set(s){e.setAttributeNS(o,t,s)},remove(){e.removeAttributeNS(o,t)}}}function f(e,t){return{set(o){e.style[t]=o},remove(){e.style[t]=null}}}function g(e){return(0,n.A)(e,(e=>{if(e&&(e instanceof c||A(e)||x(e)||C(e)))return e}))}function _(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=(0,s.$r)(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)b(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=(0,s.$r)(e[t].value)),b(e,t)}(e.attributes);const t=[];if(e.children)if(C(e.children))t.push(e.children);else for(const o of e.children)A(o)||x(o)||(0,s.Ll)(o)?t.push(o):t.push(new a(o));e.children=t}return e}function b(e,t){e[t]=(0,s.$r)(e[t])}function k(e,t){return y(t)?e:y(e)?t:`${e} ${t}`}function w(e,t){for(const o in t)e[o]?e[o].push(...t[o]):e[o]=t[o]}function v(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),w(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),w(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new s.Yb("ui-template-extend-children-mismatch",e);let o=0;for(const s of t.children)v(e.children[o++],s)}}function y(e){return!e&&0!==e}function x(e){return e instanceof V}function A(e){return e instanceof a}function C(e){return e instanceof i}function T(e){return(0,r.A)(e[0])&&e[0].ns}function E(e){return"class"==e||"style"==e}var P=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),S=o.n(P),M=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css"),O={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(M.A,O);M.A.locals;class V extends((0,s.c5)((0,s.VM)())){element;isRendered;locale;t;template;_viewCollections;_unboundChildren;_bindTemplate;constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new s.pM,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,o)=>{o.locale=e,o.t=e&&e.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=a.bind(this,this)}createCollection(e){const t=new i(e);return this._viewCollections.add(t),t}registerChild(e){(0,s.xZ)(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){(0,s.xZ)(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new a(e)}extendTemplate(e){a.extend(this.template,e)}render(){if(this.isRendered)throw new s.Yb("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e=>e.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}function R({emitter:e,activator:t,callback:o,contextElements:s}){e.listenTo(document,"mousedown",((e,i)=>{if(!t())return;const n="function"==typeof i.composedPath?i.composedPath():[],r="function"==typeof s?s():s;for(const e of r)if(e.contains(i.target)||n.includes(e))return;o()}))}function j(e){const t=e;t.set("_isCssTransitionsDisabled",!1),t.disableCssTransitions=()=>{t._isCssTransitionsDisabled=!0},t.enableCssTransitions=()=>{t._isCssTransitionsDisabled=!1},t.extendTemplate({attributes:{class:[t.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}function I(e){return class extends e{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...e){super(...e),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function B({view:e}){e.listenTo(e.element,"submit",((t,o)=>{o.preventDefault(),e.fire("submit")}),{useCapture:!0})}function D({keystrokeHandler:e,focusTracker:t,gridItems:o,numberOfColumns:s,uiLanguageDirection:i}){const n="number"==typeof s?()=>s:s;function r(e){return s=>{const i=o.find((e=>e.element===t.focusedElement)),n=o.getIndex(i),r=e(n,o);o.get(r).focus(),s.stopPropagation(),s.preventDefault()}}function a(e,t){return e===t-1?0:e+1}function c(e,t){return 0===e?t-1:e-1}e.set("arrowright",r(((e,t)=>"rtl"===i?c(e,t.length):a(e,t.length)))),e.set("arrowleft",r(((e,t)=>"rtl"===i?a(e,t.length):c(e,t.length)))),e.set("arrowup",r(((e,t)=>{let o=e-n();return o<0&&(o=e+n()*Math.floor(t.length/n()),o>t.length-1&&(o-=n())),o}))),e.set("arrowdown",r(((e,t)=>{let o=e+n();return o>t.length-1&&(o=e%n()),o})))}var N=o("./packages/ckeditor5-core/src/index.ts"),F=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css"),L={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(F.A,L);F.A.locals;class z extends V{static presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.set("isVisible",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon",e.if("isVisible","ck-hidden",(e=>!e)),"ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:t,value:o}of Array.from(e.attributes))z.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,o);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((e=>{e.style.fill=this.fillColor}))}}class H extends V{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:e.to("style"),id:e.to("id")},children:[{text:e.to("text")}]})}}var $=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css"),W={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()($.A,W);$.A.locals;class q extends V{children;labelView;iconView;keystrokeView;_focusDelayed=null;constructor(e,t=new H){super(e);const o=this.bindTemplate,i=(0,s.Ld)();this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${i}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._setupLabelView(t),this.iconView=new z,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const n={tag:"button",attributes:{class:["ck","ck-button",o.to("class"),o.if("isEnabled","ck-disabled",(e=>!e)),o.if("isVisible","ck-hidden",(e=>!e)),o.to("isOn",(e=>e?"ck-on":"ck-off")),o.if("withText","ck-button_with-text"),o.if("withKeystroke","ck-button_with-keystroke")],role:o.to("role"),type:o.to("type",(e=>e||"button")),tabindex:o.to("tabindex"),"aria-checked":o.to("ariaChecked"),"aria-label":o.to("ariaLabel"),"aria-labelledby":o.to("ariaLabelledBy"),"aria-disabled":o.if("isEnabled",!0,(e=>!e)),"aria-pressed":o.to("isOn",(e=>!!this.isToggleable&&String(!!e))),"data-cke-tooltip-text":o.to("_tooltipString"),"data-cke-tooltip-position":o.to("tooltipPosition")},children:this.children,on:{click:o.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};s._K.isSafari&&(this._focusDelayed||(this._focusDelayed=(0,s.cb)((()=>this.focus()),0)),n.on.mousedown=o.to((()=>{this._focusDelayed()})),n.on.mouseup=o.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(n)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_setupLabelView(e){return e.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),e}_createKeystrokeView(){const e=new V;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>(0,s.YA)(e)))}]}),e}_getTooltipString(e,t,o){return e?"string"==typeof e?e:(o&&(o=(0,s.YA)(o)),e instanceof Function?e(t,o):`${t}${o?` (${o})`:""}`):""}}var U=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css"),K={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(U.A,K);U.A.locals;class Y extends V{children;iconView;constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",o.to("class")]},children:this.children}),t.icon&&(this.iconView=new z,this.iconView.content=t.icon,this.children.add(this.iconView));const s=new V(e);s.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"],role:"presentation"},children:[{text:o.to("label")}]}),this.children.add(s)}}class G extends((0,s.Mm)()){focusables;focusTracker;keystrokeHandler;actions;constructor(e){if(super(),this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let o=e.actions[t];"string"==typeof o&&(o=[o]);for(const s of o)e.keystrokeHandler.set(s,((e,o)=>{this[t](),o()}))}this.on("forwardCycle",(()=>this.focusFirst()),{priority:"low"}),this.on("backwardCycle",(()=>this.focusLast()),{priority:"low"})}get first(){return this.focusables.find(Z)||null}get last(){return this.focusables.filter(Z).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,o)=>{const s=t.element===this.focusTracker.focusedElement;return s&&(e=o),s})),e)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const e=this.next;e&&this.focusables.getIndex(e)===this.current||e===this.first?this.fire("forwardCycle"):this._focus(e,1)}focusPrevious(){const e=this.previous;e&&this.focusables.getIndex(e)===this.current||e===this.last?this.fire("backwardCycle"):this._focus(e,-1)}_focus(e,t){e&&this.focusTracker.focusedElement!==e.element&&e.focus(t)}_getDomFocusableItem(e){const t=this.focusables.length;if(!t)return null;const o=this.current;if(null===o)return this[1===e?"first":"last"];let s=this.focusables.get(o),i=(o+t+e)%t;do{const o=this.focusables.get(i);if(Z(o)){s=o;break}i=(i+t+e)%t}while(i!==o);return s}}function Z(e){return J(e)&&(0,s.zN)(e.element)}function J(e){return!(!("focus"in e)||"function"!=typeof e.focus)}function X(e){return J(e)&&"focusCycler"in e&&e.focusCycler instanceof G}function Q(e){return class extends e{_onDragBound=this._onDrag.bind(this);_onDragEndBound=this._onDragEnd.bind(this);_lastDraggingCoordinates={x:0,y:0};constructor(...e){super(...e),this.on("render",(()=>{this._attachListeners()})),this.set("isDragging",!1)}_attachListeners(){this.listenTo(this.element,"mousedown",this._onDragStart.bind(this)),this.listenTo(this.element,"touchstart",this._onDragStart.bind(this))}_attachDragListeners(){this.listenTo(s.Sf.document,"mouseup",this._onDragEndBound),this.listenTo(s.Sf.document,"touchend",this._onDragEndBound),this.listenTo(s.Sf.document,"mousemove",this._onDragBound),this.listenTo(s.Sf.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening(s.Sf.document,"mouseup",this._onDragEndBound),this.stopListening(s.Sf.document,"touchend",this._onDragEndBound),this.stopListening(s.Sf.document,"mousemove",this._onDragBound),this.stopListening(s.Sf.document,"touchmove",this._onDragBound)}_onDragStart(e,t){if(!this._isHandleElementPressed(t))return;this._attachDragListeners();let o=0,s=0;t instanceof MouseEvent?(o=t.clientX,s=t.clientY):(o=t.touches[0].clientX,s=t.touches[0].clientY),this._lastDraggingCoordinates={x:o,y:s},this.isDragging=!0}_onDrag(e,t){if(!this.isDragging)return void this._detachDragListeners();let o=0,s=0;t instanceof MouseEvent?(o=t.clientX,s=t.clientY):(o=t.touches[0].clientX,s=t.touches[0].clientY),t.preventDefault(),this.fire("drag",{deltaX:Math.round(o-this._lastDraggingCoordinates.x),deltaY:Math.round(s-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:o,y:s}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(e){return!!this.dragHandleElement&&(this.dragHandleElement===e.target||e.target instanceof HTMLElement&&this.dragHandleElement.contains(e.target))}}}var ee=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dialog/dialogactions.css"),te={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(ee.A,te);ee.A.locals;class oe extends V{children;keystrokes;focusCycler;_focusTracker;_focusables;constructor(e){super(e),this.children=this.createCollection(),this.keystrokes=new s.EP,this._focusTracker=new s.$x,this._focusables=new i,this.focusCycler=new G({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__actions"]},children:this.children})}render(){super.render(),this.keystrokes.listenTo(this.element)}setButtons(e){for(const t of e){const e=new q(this.locale);let o;for(o in e.on("execute",(()=>t.onExecute())),t.onCreate&&t.onCreate(e),t)"onExecute"!=o&&"onCreate"!=o&&e.set(o,t[o]);this.children.add(e)}this._updateFocusCyclableItems()}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}_updateFocusCyclableItems(){Array.from(this.children).forEach((e=>{this._focusables.add(e),this._focusTracker.add(e.element)}))}}class se extends V{children;constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__content"]},children:this.children})}reset(){for(;this.children.length;)this.children.remove(0)}}var ie=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dialog/dialog.css"),ne={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(ie.A,ne);ie.A.locals;const re={SCREEN_CENTER:"screen-center",EDITOR_CENTER:"editor-center",EDITOR_TOP_SIDE:"editor-top-side",EDITOR_TOP_CENTER:"editor-top-center",EDITOR_BOTTOM_CENTER:"editor-bottom-center",EDITOR_ABOVE_CENTER:"editor-above-center",EDITOR_BELOW_CENTER:"editor-below-center"},ae=(0,s.To)("px");class ce extends(Q(V)){parts;headerView;closeButtonView;actionsView;static defaultOffset=15;contentView;keystrokes;focusTracker;wasMoved=!1;_getCurrentDomRoot;_getViewportOffset;_focusables;_focusCycler;constructor(e,{getCurrentDomRoot:t,getViewportOffset:o}){super(e);const n=this.bindTemplate,r=e.t;this.set("className",""),this.set("ariaLabel",r("Editor dialog")),this.set("isModal",!1),this.set("position",re.SCREEN_CENTER),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=t,this._getViewportOffset=o,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new s.EP,this.focusTracker=new s.$x,this._focusables=new i,this._focusCycler=new G({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",n.if("isModal","ck-dialog-overlay__transparent",(e=>!e)),n.if("_isVisible","ck-hidden",(e=>!e))],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",n.to("className")],role:"dialog","aria-label":n.to("ariaLabel"),style:{top:n.to("_top",(e=>ae(e))),left:n.to("_left",(e=>ae(e))),visibility:n.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",((e,t)=>{this.fire("close",{source:"escKeyPress"}),t()})),this.on("drag",((e,{deltaX:t,deltaY:o})=>{this.wasMoved=!0,this.moveBy(t,o)})),this.listenTo(s.Sf.window,"resize",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.listenTo(s.Sf.document,"scroll",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.on("change:_isVisible",((e,t,o)=>{o&&(this._isTransparent=!0,setTimeout((()=>{this.updatePosition(),this._isTransparent=!1,this.focus()}),10))})),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView?this.headerView.element:null}setupParts({icon:e,title:t,hasCloseButton:o=!0,content:s,actionButtons:i}){t&&(this.headerView=new Y(this.locale,{icon:e}),o&&(this.closeButtonView=this._createCloseButton(),this.headerView.children.add(this.closeButtonView)),this.headerView.label=t,this.ariaLabel=t,this.parts.add(this.headerView,0)),s&&(s instanceof V&&(s=[s]),this.contentView=new se(this.locale),this.contentView.children.addMany(s),this.parts.add(this.contentView)),i&&(this.actionsView=new oe(this.locale),this.actionsView.setButtons(i),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(e,t){const o=this._getViewportRect(),s=this._getDialogRect();e+s.width>o.right&&(e=o.right-s.width),e{this._focusables.add(e),this.focusTracker.add(e.element),X(e)&&(this.listenTo(e.focusCycler,"forwardCycle",(e=>{this._focusCycler.focusNext(),this._focusCycler.next!==this._focusCycler.focusables.get(this._focusCycler.current)&&e.stop()})),this.listenTo(e.focusCycler,"backwardCycle",(e=>{this._focusCycler.focusPrevious(),this._focusCycler.previous!==this._focusCycler.focusables.get(this._focusCycler.current)&&e.stop()})))}))}_createCloseButton(){const e=new q(this.locale),t=this.locale.t;return e.set({label:t("Close"),tooltip:!0,icon:N.Pt.cancel}),e.on("execute",(()=>this.fire("close",{source:"closeButton"}))),e}}class le extends N.k_{view;static _visibleDialogPlugin;_onHide;static get pluginName(){return"Dialog"}constructor(e){super(e);const t=e.t;this._initShowHideListeners(),this._initFocusToggler(),this._initMultiRootIntegration(),this.set("id",null),e.accessibility.addKeystrokeInfos({categoryId:"navigation",keystrokes:[{label:t("Move focus in and out of an active dialog window"),keystroke:"Ctrl+F6",mayRequireFn:!0}]})}_initShowHideListeners(){this.on("show",((e,t)=>{this._show(t)})),this.on("show",((e,t)=>{t.onShow&&t.onShow(this)}),{priority:"low"}),this.on("hide",(()=>{le._visibleDialogPlugin&&le._visibleDialogPlugin._hide()})),this.on("hide",(()=>{this._onHide&&(this._onHide(this),this._onHide=void 0)}),{priority:"low"})}_initFocusToggler(){const e=this.editor;e.keystrokes.set("Ctrl+F6",((t,o)=>{this.isOpen&&!this.view.isModal&&(this.view.focusTracker.isFocused?e.editing.view.focus():this.view.focus(),o())}))}_initMultiRootIntegration(){const e=this.editor.model;e.document.on("change:data",(()=>{if(!this.view)return;const t=e.document.differ.getChangedRoots();for(const e of t)e.state&&this.view.updatePosition()}))}show(e){this.hide(),this.fire(`show:${e.id}`,e)}_show({id:e,icon:t,title:o,hasCloseButton:s=!0,content:i,actionButtons:n,className:r,isModal:a,position:c,onHide:l}){const d=this.editor;this.view=new ce(d.locale,{getCurrentDomRoot:()=>d.editing.view.getDomRoot(d.model.document.selection.anchor.root.rootName),getViewportOffset:()=>d.ui.viewportOffset});const h=this.view;h.on("close",(()=>{this.hide()})),d.ui.view.body.add(h),d.ui.focusTracker.add(h.element),d.keystrokes.listenTo(h.element),c||(c=a?re.SCREEN_CENTER:re.EDITOR_CENTER),h.set({position:c,_isVisible:!0,className:r,isModal:a}),h.setupParts({icon:t,title:o,hasCloseButton:s,content:i,actionButtons:n}),this.id=e,l&&(this._onHide=l),this.isOpen=!0,le._visibleDialogPlugin=this}hide(){le._visibleDialogPlugin&&le._visibleDialogPlugin.fire(`hide:${le._visibleDialogPlugin.id}`)}_hide(){if(!this.view)return;const e=this.editor,t=this.view;t.contentView&&t.contentView.reset(),e.ui.view.body.remove(t),e.ui.focusTracker.remove(t.element),e.keystrokes.stopListening(t.element),t.destroy(),e.editing.view.focus(),this.id=null,this.isOpen=!1,le._visibleDialogPlugin=null}}var de=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenulistitembutton.css"),he={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(de.A,he);de.A.locals;class ue extends q{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}var pe=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css"),me={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(pe.A,me);pe.A.locals;class fe extends V{id;constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${(0,s.Ld)()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class ge extends V{constructor(e,t){super(e);const o=e.t,i=new fe;i.text=o("Help Contents. To close this dialog press ESC."),this.setTemplate({tag:"div",attributes:{class:["ck","ck-accessibility-help-dialog__content"],"aria-labelledby":i.id,role:"document",tabindex:-1},children:[(0,s.n)(document,"p",{},o("Below, you can find a list of keyboard shortcuts that can be used in the editor.")),...this._createCategories(Array.from(t.values())),i]})}focus(){this.element.focus()}_createCategories(e){return e.map((e=>{const t=[(0,s.n)(document,"h3",{},e.label),...Array.from(e.groups.values()).map((e=>this._createGroup(e))).flat()];return e.description&&t.splice(1,0,(0,s.n)(document,"p",{},e.description)),(0,s.n)(document,"section",{},t)}))}_createGroup(e){const t=e.keystrokes.sort(((e,t)=>e.label.localeCompare(t.label))).map((e=>this._createGroupRow(e))).flat(),o=[(0,s.n)(document,"dl",{},t)];return e.label&&o.unshift((0,s.n)(document,"h4",{},e.label)),o}_createGroupRow(e){const t=this.locale.t,o=(0,s.n)(document,"dt"),i=(0,s.n)(document,"dd"),n=function(e){if("string"==typeof e)return[[e]];if("string"==typeof e[0])return[e];return e}(e.keystroke),r=[];for(const e of n)r.push(e.map(_e).join(""));return o.innerHTML=e.label,i.innerHTML=r.join(", ")+(e.mayRequireFn&&s._K.isMac?` ${t("(may require Fn)")}`:""),[o,i]}}function _e(e){return(0,s.YA)(e).split("+").map((e=>`${e}`)).join("+")}const be='';var ke=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/accessibilityhelp.css"),we={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(ke.A,we);ke.A.locals;class ve extends N.k_{contentView=null;static get requires(){return[le]}static get pluginName(){return"AccessibilityHelp"}init(){const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("accessibilityHelp",(()=>{const e=this._createButton(q);return e.set({tooltip:!0,withText:!1,label:t("Accessibility help")}),e})),e.ui.componentFactory.add("menuBar:accessibilityHelp",(()=>{const e=this._createButton(ue);return e.label=t("Accessibility"),e})),e.keystrokes.set("Alt+0",((e,t)=>{this._showDialog(),t()})),this._setupRootLabels()}_createButton(e){const t=new e(this.editor.locale);return t.set({keystroke:"Alt+0",icon:be}),t.on("execute",(()=>this._showDialog())),t}_setupRootLabels(){const e=this.editor,t=e.editing.view,o=e.t;function i(e,t){const i=`${t.getAttribute("aria-label")}. ${o("Press %0 for help.",[(0,s.YA)("Alt+0")])}`;e.setAttribute("aria-label",i,t)}e.ui.on("ready",(()=>{t.change((e=>{for(const o of t.document.roots)i(e,o)})),e.on("addRoot",((o,s)=>{const n=e.editing.view.document.getRoot(s.rootName);t.change((e=>i(e,n)))}),{priority:"low"})}))}_showDialog(){const e=this.editor,t=e.plugins.get("Dialog"),o=e.locale.t;this.contentView||(this.contentView=new ge(e.locale,e.accessibility.keystrokeInfos)),t.show({id:"accessibilityHelp",className:"ck-accessibility-help-dialog",title:o("Accessibility help"),icon:be,hasCloseButton:!0,content:this.contentView})}}class ye extends i{locale;_bodyCollectionContainer;constructor(e,t=[]){super(t),this.locale=e}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new a({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=(0,s.n)(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}var xe=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css"),Ae={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(xe.A,Ae);xe.A.locals;class Ce extends q{toggleSwitchView;constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new V;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}class Te extends q{buttonView;_fileInputView;constructor(e){super(e),this.buttonView=this,this._fileInputView=new Ee(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.on("execute",(()=>{this._fileInputView.open()})),this.extendTemplate({attributes:{class:"ck-file-dialog-button"}})}render(){super.render(),this.children.add(this._fileInputView)}}class Ee extends V{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}const Pe='';var Se=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/collapsible/collapsible.css"),Me={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Se.A,Me);Se.A.locals;class Oe extends V{buttonView;children;constructor(e,t){super(e);const o=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),t&&this.children.addMany(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",o.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:o.if("isCollapsed","hidden"),"aria-labelledby":o.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}focus(){this.buttonView.focus()}_createButtonView(){const e=new q(this.locale),t=e.bindTemplate;return e.set({withText:!0,icon:Pe}),e.extendTemplate({attributes:{"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",(e=>!e)),e.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),e}}function Ve(e,t){const o=e.t,s={Black:o("Black"),"Dim grey":o("Dim grey"),Grey:o("Grey"),"Light grey":o("Light grey"),White:o("White"),Red:o("Red"),Orange:o("Orange"),Yellow:o("Yellow"),"Light green":o("Light green"),Green:o("Green"),Aquamarine:o("Aquamarine"),Turquoise:o("Turquoise"),"Light blue":o("Light blue"),Blue:o("Blue"),Purple:o("Purple")};return t.map((e=>{const t=s[e.label];return t&&t!=e.label&&(e.label=t),e}))}function Re(e){return e.map(je).filter((e=>!!e))}function je(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}class Ie extends q{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon='',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color",(e=>s._K.isMediaForcedColors?null:e))},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-selector__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}var Be=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css"),De={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Be.A,De);Be.A.locals;class Ne extends V{columns;items;focusTracker;keystrokes;constructor(e,t){super(e);const o=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=t&&t.columns?t.columns:5;const i={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new s.$x,this.keystrokes=new s.EP,this.items.on("add",((e,t)=>{t.isOn=t.color===this.selectedColor})),o.forEach((e=>{const t=new Ie;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),this.items.add(t)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:i}}),this.on("change:selectedColor",((e,t,o)=>{for(const e of this.items)e.isOn=e.color===o}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),D({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}var Fe=o("./node_modules/color-name/index.js");const Le=function(e){var t,o,s=[],i=1;if("string"==typeof e)if(Fe[e])s=Fe[e].slice(),o="rgb";else if("transparent"===e)i=0,o="rgb",s=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var n=e.slice(1);i=1,(c=n.length)<=4?(s=[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)],4===c&&(i=parseInt(n[3]+n[3],16)/255)):(s=[parseInt(n[0]+n[1],16),parseInt(n[2]+n[3],16),parseInt(n[4]+n[5],16)],8===c&&(i=parseInt(n[6]+n[7],16)/255)),s[0]||(s[0]=0),s[1]||(s[1]=0),s[2]||(s[2]=0),o="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var r=t[1],a="rgb"===r;o=n=r.replace(/a$/,"");var c="cmyk"===n?4:"gray"===n?1:3;s=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===c?parseFloat(e)/100:"rgb"===n?255*parseFloat(e)/100:parseFloat(e);if("h"===n[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==ze[e])return ze[e]}return parseFloat(e)})),r===n&&s.push(1),i=a||void 0===s[c]?1:s[c],s=s.slice(0,c)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(s=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),o=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(s=[e[0],e[1],e[2]],o="rgb",i=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(o="rgb",s=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(o="hsl",s=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),i=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(i/=100)):(o="rgb",s=[e>>>16,(65280&e)>>>8,255&e]);return{space:o,values:s,alpha:i}};var ze={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};var He=o("./node_modules/color-convert/index.js");function $e(e,t){if(!e)return"";const o=We(e);if(!o)return"";if(o.space===t)return e;if(s=o,!Object.keys(He).includes(s.space))return"";var s;const i=He[o.space][t];if(!i)return"";return function(e,t){switch(t){case"hex":return`#${e}`;case"rgb":return`rgb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"hsl":return`hsl( ${e[0]}, ${e[1]}%, ${e[2]}% )`;case"hwb":return`hwb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"lab":return`lab( ${e[0]}% ${e[1]} ${e[2]} )`;case"lch":return`lch( ${e[0]}% ${e[1]} ${e[2]} )`;default:return""}}(i("hex"===o.space?o.hexValue:o.values),t)}function We(e){if(e.startsWith("#")){const t=Le(e);return{space:"hex",values:t.values,hexValue:e,alpha:t.alpha}}const t=Le(e);return t.space?t:null}var qe=o("./node_modules/lodash-es/debounce.js"),Ue=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css"),Ke={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ue.A,Ke);Ue.A.locals;class Ye extends V{fieldView;labelView;statusView;fieldWrapperChildren;constructor(e,t){super(e);const o=`ck-labeled-field-view-${(0,s.Ld)()}`,i=`ck-labeled-field-view-status-${(0,s.Ld)()}`;this.fieldView=t(this,o,i),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(o),this.statusView=this._createStatusView(i),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const n=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",n.to("class"),n.if("isEnabled","ck-disabled",(e=>!e)),n.if("isEmpty","ck-labeled-field-view_empty"),n.if("isFocused","ck-labeled-field-view_focused"),n.if("placeholder","ck-labeled-field-view_placeholder"),n.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new fe(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new V(this.locale),o=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",o.if("errorText","ck-labeled-field-view__status_error"),o.if("_statusText","ck-hidden",(e=>!e))],id:e,role:o.if("errorText","alert")},children:[{text:o.to("_statusText")}]}),t}focus(e){this.fieldView.focus(e)}}class Ge extends V{focusTracker;constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("tabIndex",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.set("ariaLabel",void 0),this.focusTracker=new s.$x,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),tabindex:t.to("tabIndex"),readonly:t.to("isReadOnly"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById"),"aria-label":t.to("ariaLabel")},on:{input:t.to(((...e)=>{this.fire("input",...e),this._updateIsEmpty()})),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((e,t,o)=>{this._setDomElementValue(o),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}reset(){this.value=this.element.value="",this._updateIsEmpty()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}var Ze=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css"),Je={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ze.A,Je);Ze.A.locals;class Xe extends Ge{constructor(e){super(e),this.set("inputMode","text");const t=this.bindTemplate;this.extendTemplate({attributes:{inputmode:t.to("inputMode")}})}}class Qe extends Xe{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class et extends Xe{constructor(e,{min:t,max:o,step:s}={}){super(e);const i=this.bindTemplate;this.set("min",t),this.set("max",o),this.set("step",s),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:i.to("min"),max:i.to("max"),step:i.to("step")}})}}var tt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/textarea/textarea.css"),ot={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(tt.A,ot);tt.A.locals;class st extends Ge{_resizeObserver;_isUpdateAutoGrowHeightPending=!1;constructor(e){super(e);const t=(0,s.To)("px");this.set("minRows",2),this.set("maxRows",5),this.set("_height",null),this.set("resize","none"),this._resizeObserver=null,this.on("change:minRows",this._validateMinMaxRows.bind(this)),this.on("change:maxRows",this._validateMinMaxRows.bind(this));const o=this.bindTemplate;this.template.tag="textarea",this.extendTemplate({attributes:{class:["ck-textarea"],style:{height:o.to("_height",(e=>e?t(e):null)),resize:o.to("resize")},rows:o.to("minRows")}})}render(){super.render();let e=!1;this.on("input",(()=>{this._updateAutoGrowHeight(!0),this.fire("update")})),this.on("change:value",(()=>{s.Sf.window.requestAnimationFrame((()=>{(0,s.zN)(this.element)?(this._updateAutoGrowHeight(),this.fire("update")):this._isUpdateAutoGrowHeightPending=!0}))})),this._resizeObserver=new s.tb(this.element,(t=>{const o=!!t.contentRect.width&&!!t.contentRect.height;!e&&o&&this._isUpdateAutoGrowHeightPending&&s.Sf.window.requestAnimationFrame((()=>{this._updateAutoGrowHeight(),this.fire("update")})),e=o}))}destroy(){this._resizeObserver&&this._resizeObserver.destroy()}reset(){super.reset(),this._updateAutoGrowHeight(),this.fire("update")}_updateAutoGrowHeight(e){const t=this.element;if(!t.offsetParent)return void(this._isUpdateAutoGrowHeightPending=!0);this._isUpdateAutoGrowHeightPending=!1;const o=it(t,"1"),i=it(t,t.value),n=o.ownerDocument.defaultView.getComputedStyle(o),r=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),a=(0,s.Md)(o),c=parseFloat(n.lineHeight),l=a.top+a.bottom,d=new s.rw(o).height,h=Math.round((i.scrollHeight-r)/c),u=this.maxRows*c+r+l,p=1===h?d:this.minRows*c+r+l;this._height=Math.min(Math.max(Math.max(h,this.minRows)*c+r+l,p),u),e&&(t.scrollTop=t.scrollHeight),o.remove(),i.remove()}_validateMinMaxRows(){if(this.minRows>this.maxRows)throw new s.Yb("ui-textarea-view-min-rows-greater-than-max-rows",{textareaView:this,minRows:this.minRows,maxRows:this.maxRows})}}function it(e,t){const o=e.cloneNode();return o.style.position="absolute",o.style.top="-99999px",o.style.left="-99999px",o.style.height="auto",o.style.overflow="hidden",o.style.width=e.ownerDocument.defaultView.getComputedStyle(e).width,o.tabIndex=-1,o.rows=1,o.value=t,e.parentNode.insertBefore(o,e),o}class nt extends V{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():(0,s.FF)("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}var rt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css"),at={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(rt.A,at);rt.A.locals;class ct extends V{buttonView;panelView;focusTracker;keystrokes;listView;toolbarView;constructor(e,t,o){super(e);const i=this.bindTemplate;this.buttonView=t,this.panelView=o,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new s.EP,this.focusTracker=new s.$x,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",i.to("class"),i.if("isEnabled","ck-disabled",(e=>!e))],id:i.to("id"),"aria-describedby":i.to("ariaDescribedById")},children:[t,o]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":i.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.on("change:isOpen",((e,t,o)=>{if(o)if("auto"===this.panelPosition){const e=ct._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=e?e.name:this._panelPositions[0].name}else this.panelView.position=this.panelPosition})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:o,southWest:s,northEast:i,northWest:n,southMiddleEast:r,southMiddleWest:a,northMiddleEast:c,northMiddleWest:l}=ct.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[o,s,r,a,e,i,n,c,l,t]:[s,o,a,r,e,n,i,l,c,t]}static defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})};static _getOptimalPosition=s.W}class lt extends q{arrowView;constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new z;return e.content=Pe,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class dt extends V{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class ht extends V{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function ut(e){if(Array.isArray(e))return{items:e,removeItems:[]};const t={items:[],removeItems:[]};return e?{...t,...e}:t}var pt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css"),mt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(pt.A,mt);pt.A.locals;const ft=(()=>({alignLeft:N.Pt.alignLeft,bold:N.Pt.bold,importExport:N.Pt.importExport,paragraph:N.Pt.paragraph,plus:N.Pt.plus,text:N.Pt.text,threeVerticalDots:N.Pt.threeVerticalDots,pilcrow:N.Pt.pilcrow,dragIndicator:N.Pt.dragIndicator}))();class gt extends V{options;items;focusTracker;keystrokes;itemsView;children;focusables;_focusCycler;_behavior;constructor(e,t){super(e);const o=this.bindTemplate,i=this.t;this.options=t||{},this.set("ariaLabel",i("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new s.$x,this.keystrokes=new s.EP,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new _t(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const n="rtl"===e.uiLanguageDirection;this._focusCycler=new G({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[n?"arrowright":"arrowleft","arrowup"],focusNext:[n?"arrowleft":"arrowright","arrowdown"]}});const r=["ck","ck-toolbar",o.to("class"),o.if("isCompact","ck-toolbar_compact")];var a;this.options.shouldGroupWhenFull&&this.options.isFloating&&r.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:r,role:"toolbar","aria-label":o.to("ariaLabel"),style:{maxWidth:o.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(a=this,a.bindTemplate.to((e=>{e.target===a.element&&e.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new kt(this):new bt(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,o){this.items.addMany(this._buildItemsFromConfig(e,t,o))}_buildItemsFromConfig(e,t,o){const s=ut(e),i=o||s.removeItems;return this._cleanItemsConfiguration(s.items,t,i).map((e=>(0,r.A)(e)?this._createNestedToolbarDropdown(e,t,i):"|"===e?new dt:"-"===e?new ht:t.create(e))).filter((e=>!!e))}_cleanItemsConfiguration(e,t,o){const i=e.filter(((e,i,n)=>"|"===e||-1===o.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||((0,s.FF)("toolbarview-line-break-ignored-when-grouping-items",n),!1):!(!(0,r.A)(e)&&!t.has(e))||((0,s.FF)("toolbarview-item-unavailable",{item:e}),!1))));return this._cleanSeparatorsAndLineBreaks(i)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,o=e.length,s=e.findIndex(t);if(-1===s)return[];const i=o-e.slice().reverse().findIndex(t);return e.slice(s,i).filter(((e,o,s)=>{if(t(e))return!0;return!(o>0&&s[o-1]===e)}))}_createNestedToolbarDropdown(e,t,o){let{label:i,icon:n,items:r,tooltip:a=!0,withText:c=!1}=e;if(r=this._cleanItemsConfiguration(r,t,o),!r.length)return null;const l=Rt(this.locale);return i||(0,s.FF)("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:i,tooltip:a,withText:!!c}),!1!==n?l.buttonView.icon=ft[n]||n||N.Pt.threeVerticalDots:l.buttonView.withText=!0,jt(l,(()=>l.toolbarView._buildItemsFromConfig(r,t,o))),l}}class _t extends V{children;constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class bt{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>J(e)?e:null)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class kt{view;viewChildren;viewFocusables;viewItemsView;viewFocusTracker;viewLocale;ungroupedItems;groupedItems;groupedItemsDropdown;resizeObserver=null;cachedPadding=null;shouldUpdateGroupingOnNextResize=!1;viewElement;constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),e.children.on("change",this._updateFocusCyclableItems.bind(this)),e.items.on("change",((e,t)=>{const o=t.index,s=Array.from(t.added);for(const e of t.removed)o>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=o;ethis.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!(0,s.zN)(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,o=new s.rw(e.lastChild),i=new s.rw(e);if(!this.cachedPadding){const o=s.Sf.window.getComputedStyle(e),i="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(o[i])}return"ltr"===t?o.right>i.right-this.cachedPadding:o.left{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new dt),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,o=Rt(e);return o.class="ck-toolbar__grouped-dropdown",o.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",jt(o,this.groupedItems),o.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:N.Pt.threeVerticalDots}),o}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{J(e)&&this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class wt extends V{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",(e=>!e))],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class vt extends V{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class yt extends V{labelView;items;children;constructor(e,t=new fe){super(e);const o=this.bindTemplate,s=new Ct(e);this.set({label:"",isVisible:!0}),this.labelView=t,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,s]),s.set({role:"group",ariaLabelledBy:t.id}),s.focusTracker.destroy(),s.keystrokes.destroy(),this.items=s.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",o.if("isVisible","ck-hidden",(e=>!e))]},children:this.children})}focus(){if(this.items){const e=this.items.find((e=>!(e instanceof vt)));e&&e.focus()}}}var xt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css"),At={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(xt.A,At);xt.A.locals;class Ct extends V{focusables;items;focusTracker;keystrokes;_focusCycler;_listItemGroupToChangeListeners=new WeakMap;constructor(e){super(e);const t=this.bindTemplate;this.focusables=new i,this.items=this.createCollection(),this.focusTracker=new s.$x,this.keystrokes=new s.EP,this._focusCycler=new G({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const e of this.items)e instanceof yt?this._registerFocusableItemsGroup(e):e instanceof wt&&this._registerFocusableListItem(e);this.items.on("change",((e,t)=>{for(const e of t.removed)e instanceof yt?this._deregisterFocusableItemsGroup(e):e instanceof wt&&this._deregisterFocusableListItem(e);for(const e of Array.from(t.added).reverse())e instanceof yt?this._registerFocusableItemsGroup(e,t.index):this._registerFocusableListItem(e,t.index)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_registerFocusableListItem(e,t){this.focusTracker.add(e.element),this.focusables.add(e,t)}_deregisterFocusableListItem(e){this.focusTracker.remove(e.element),this.focusables.remove(e)}_getOnGroupItemsChangeCallback(e){return(t,o)=>{for(const e of o.removed)this._deregisterFocusableListItem(e);for(const t of Array.from(o.added).reverse())this._registerFocusableListItem(t,this.items.getIndex(e)+o.index)}}_registerFocusableItemsGroup(e,t){Array.from(e.items).forEach(((e,o)=>{const s=void 0!==t?t+o:void 0;this._registerFocusableListItem(e,s)}));const o=this._getOnGroupItemsChangeCallback(e);this._listItemGroupToChangeListeners.set(e,o),e.items.on("change",o)}_deregisterFocusableItemsGroup(e){for(const t of e.items)this._deregisterFocusableListItem(t);e.items.off("change",this._listItemGroupToChangeListeners.get(e)),this._listItemGroupToChangeListeners.delete(e)}}var Tt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css"),Et={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Tt.A,Et);Tt.A.locals;class Pt extends V{children;actionView;arrowView;keystrokes;focusTracker;constructor(e,t){super(e);const o=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(t),this.arrowView=this._createArrowView(),this.keystrokes=new s.EP,this.focusTracker=new s.$x,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",o.to("class"),o.if("isVisible","ck-hidden",(e=>!e)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())})),this.keystrokes.set("arrowleft",((e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(e){const t=e||new q;return e||t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const e=new q,t=e.bindTemplate;return e.icon=Pe,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}var St=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css"),Mt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(St.A,Mt);St.A.locals;var Ot=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css"),Vt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ot.A,Vt);Ot.A.locals;function Rt(e,t=lt){const o="function"==typeof t?new t(e):t,i=new nt(e),n=new ct(e,o,i);return o.bind("isEnabled").to(n),o instanceof Pt?o.arrowView.bind("isOn").to(n,"isOpen"):o.bind("isOn").to(n,"isOpen"),function(e){(function(e){e.on("render",(()=>{R({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:()=>[e.element,...e.focusTracker._elements]})}))})(e),function(e){e.on("execute",(t=>{t.source instanceof Ce||(e.isOpen=!1)}))}(e),function(e){e.focusTracker.on("change:isFocused",((t,o,s)=>{e.isOpen&&!s&&(e.isOpen=!1)}))}(e),function(e){e.keystrokes.set("arrowdown",((t,o)=>{e.isOpen&&(e.panelView.focus(),o())})),e.keystrokes.set("arrowup",((t,o)=>{e.isOpen&&(e.panelView.focusLast(),o())}))}(e),function(e){e.on("change:isOpen",((t,o,i)=>{if(i)return;const n=e.panelView.element;n&&n.contains(s.Sf.document.activeElement)&&e.buttonView.focus()}))}(e),function(e){e.on("change:isOpen",((t,o,s)=>{s&&e.panelView.focus()}),{priority:"low"})}(e)}(n),n}function jt(e,t,o={}){e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.isOpen?It(e,t,o):e.once("change:isOpen",(()=>It(e,t,o)),{priority:"highest"}),o.enableActiveItemFocusOnDropdownOpen&&Nt(e,(()=>e.toolbarView.items.find((e=>e.isOn))))}function It(e,t,o){const s=e.locale,n=s.t,r=e.toolbarView=new gt(s),a="function"==typeof t?t():t;r.ariaLabel=o.ariaLabel||n("Dropdown toolbar"),o.maxWidth&&(r.maxWidth=o.maxWidth),o.class&&(r.class=o.class),o.isCompact&&(r.isCompact=o.isCompact),o.isVertical&&(r.isVertical=!0),a instanceof i?r.items.bindTo(a).using((e=>e)):r.items.addMany(a),e.panelView.children.add(r),r.items.delegate("execute").to(e)}function Bt(e,t,o={}){e.isOpen?Dt(e,t,o):e.once("change:isOpen",(()=>Dt(e,t,o)),{priority:"highest"}),Nt(e,(()=>e.listView.items.find((e=>e instanceof wt&&e.children.first.isOn))))}function Dt(e,t,o){const s=e.locale,i=e.listView=new Ct(s),n="function"==typeof t?t():t;i.ariaLabel=o.ariaLabel,i.role=o.role,Ft(e,i.items,n,s),e.panelView.children.add(i),i.items.delegate("execute").to(e)}function Nt(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const o=t();o&&("function"==typeof o.focus?o.focus():(0,s.FF)("ui-dropdown-focus-child-on-open-child-missing-focus",{view:o}))}),{priority:s.vx.low-10})}function Ft(e,t,o,s){t.bindTo(o).using((t=>{if("separator"===t.type)return new vt(s);if("group"===t.type){const o=new yt(s);return o.set({label:t.label}),Ft(e,o.items,t.items,s),o.items.delegate("execute").to(e),o}if("button"===t.type||"switchbutton"===t.type){const e=new wt(s);let o;return"button"===t.type?(o=new q(s),o.bind("ariaChecked").to(o,"isOn")):o=new Ce(s),o.bind(...Object.keys(t.model)).to(t.model),o.delegate("execute").to(e),e.children.add(o),e}return null}))}const Lt=(e,t,o)=>{const s=new Qe(e.locale);return s.set({id:t,ariaDescribedById:o}),s.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),s.bind("hasError").to(e,"errorText",(e=>!!e)),s.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(s),s},zt=(e,t,o)=>{const s=new et(e.locale);return s.set({id:t,ariaDescribedById:o,inputMode:"numeric"}),s.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),s.bind("hasError").to(e,"errorText",(e=>!!e)),s.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(s),s},Ht=(e,t,o)=>{const s=new st(e.locale);return s.set({id:t,ariaDescribedById:o}),s.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),s.bind("hasError").to(e,"errorText",(e=>!!e)),s.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(s),s},$t=(e,t,o)=>{const s=Rt(e.locale);return s.set({id:t,ariaDescribedById:o}),s.bind("isEnabled").to(e),s},Wt=(e,t=0,o=1)=>e>o?o:eMath.round(o*e)/o,Ut=(Math.PI,e=>("#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?qt(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?qt(parseInt(e.substring(6,8),16)/255,2):1})),Kt=({h:e,s:t,v:o,a:s})=>{const i=(200-t)*o/100;return{h:qt(e),s:qt(i>0&&i<200?t*o/100/(i<=100?i:200-i)*100:0),l:qt(i/2),a:qt(s,2)}},Yt=e=>{const{h:t,s:o,l:s}=Kt(e);return`hsl(${t}, ${o}%, ${s}%)`},Gt=({h:e,s:t,v:o,a:s})=>{e=e/360*6,t/=100,o/=100;const i=Math.floor(e),n=o*(1-t),r=o*(1-(e-i)*t),a=o*(1-(1-e+i)*t),c=i%6;return{r:qt(255*[o,r,n,n,a,o][c]),g:qt(255*[a,o,o,r,n,n][c]),b:qt(255*[n,n,a,o,o,r][c]),a:qt(s,2)}},Zt=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},Jt=({r:e,g:t,b:o,a:s})=>{const i=s<1?Zt(qt(255*s)):"";return"#"+Zt(e)+Zt(t)+Zt(o)+i},Xt=({r:e,g:t,b:o,a:s})=>{const i=Math.max(e,t,o),n=i-Math.min(e,t,o),r=n?i===e?(t-o)/n:i===t?2+(o-e)/n:4+(e-t)/n:0;return{h:qt(60*(r<0?r+6:r)),s:qt(i?n/i*100:0),v:qt(i/255*100),a:s}},Qt=(e,t)=>{if(e===t)return!0;for(const o in e)if(e[o]!==t[o])return!1;return!0},eo={},to=e=>{let t=eo[e];return t||(t=document.createElement("template"),t.innerHTML=e,eo[e]=t),t},oo=(e,t,o)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))};let so=!1;const io=e=>"touches"in e,no=(e,t)=>{const o=io(t)?t.touches[0]:t,s=e.el.getBoundingClientRect();oo(e.el,"move",e.getMove({x:Wt((o.pageX-(s.left+window.pageXOffset))/s.width),y:Wt((o.pageY-(s.top+window.pageYOffset))/s.height)}))};class ro{constructor(e,t,o,s){const i=to(`
`);e.appendChild(i.content.cloneNode(!0));const n=e.querySelector(`[part=${t}]`);n.addEventListener("mousedown",this),n.addEventListener("touchstart",this),n.addEventListener("keydown",this),this.el=n,this.xy=s,this.nodes=[n.firstChild,n]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(so?"touchmove":"mousemove",this),t(so?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!(e=>!(so&&!io(e)||(so||(so=io(e)),0)))(e)||!so&&0!=e.button)return;this.el.focus(),no(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),no(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((e,t)=>{const o=t.keyCode;o>40||e.xy&&o<37||o<33||(t.preventDefault(),oo(e.el,"move",e.getMove({x:39===o?.01:37===o?-.01:34===o?.05:33===o?-.05:35===o?1:36===o?-1:0,y:40===o?.01:38===o?-.01:0},!0)))})(this,e)}}style(e){e.forEach(((e,t)=>{for(const o in e)this.nodes[t].style.setProperty(o,e[o])}))}}class ao extends ro{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:e/360*100+"%",color:Yt({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${qt(e)}`)}getMove(e,t){return{h:t?Wt(this.h+360*e.x,0,360):360*e.x}}}class co extends ro{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:100-e.v+"%",left:`${e.s}%`,color:Yt(e)},{"background-color":Yt({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${qt(e.s)}%, Brightness ${qt(e.v)}%`)}getMove(e,t){return{s:t?Wt(this.hsva.s+100*e.x,0,100):100*e.x,v:t?Wt(this.hsva.v-100*e.y,0,100):Math.round(100-100*e.y)}}}const lo=Symbol("same"),ho=Symbol("color"),uo=Symbol("hsva"),po=Symbol("update"),mo=Symbol("parts"),fo=Symbol("css"),go=Symbol("sliders");class _o extends HTMLElement{static get observedAttributes(){return["color"]}get[fo](){return[':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[go](){return[co,ao]}get color(){return this[ho]}set color(e){if(!this[lo](e)){const t=this.colorModel.toHsva(e);this[po](t),this[ho]=e}}constructor(){super();const e=to(``),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[mo]=this[go].map((e=>new e(t)))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,o){const s=this.colorModel.fromAttr(o);this[lo](s)||(this.color=s)}handleEvent(e){const t=this[uo],o={...t,...e.detail};let s;this[po](o),Qt(o,t)||this[lo](s=this.colorModel.fromHsva(o))||(this[ho]=s,oo(this,"color-changed",{value:s}))}[lo](e){return this.color&&this.colorModel.equal(e,this.color)}[po](e){this[uo]=e,this[mo].forEach((t=>t.update(e)))}}const bo={defaultColor:"#000",toHsva:e=>Xt(Ut(e)),fromHsva:({h:e,s:t,v:o})=>Jt(Gt({h:e,s:t,v:o,a:1})),equal:(e,t)=>e.toLowerCase()===t.toLowerCase()||Qt(Ut(e),Ut(t)),fromAttr:e=>e};class ko extends _o{get colorModel(){return bo}}var wo=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorpicker/colorpicker.css"),vo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(wo.A,vo);wo.A.locals;class yo extends V{hexInputRow;_debounceColorPickerEvent;_config;constructor(e,t={}){super(e),this.set({color:"",_hexColor:""}),this.hexInputRow=this._createInputRow();const o=this.createCollection();t.hideInput||o.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:o}),this._config=t,this._debounceColorPickerEvent=(0,qe.A)((e=>{this.set("color",e),this.fire("colorSelected",{color:this.color})}),150,{leading:!0}),this.on("set:color",((e,t,o)=>{e.return=$e(o,this._config.format||"hsl")})),this.on("change:color",(()=>{this._hexColor=xo(this.color)})),this.on("change:_hexColor",(()=>{document.activeElement!==this.picker&&this.picker.setAttribute("color",this._hexColor),xo(this.color)!=xo(this._hexColor)&&(this.color=this._hexColor)}))}render(){var e,t;if(super.render(),e="hex-color-picker",t=ko,void 0===customElements.get(e)&&customElements.define(e,t),this.picker=s.Sf.document.createElement("hex-color-picker"),this.picker.setAttribute("class","hex-color-picker"),this.picker.setAttribute("tabindex","-1"),this._createSlidersView(),this.element){this.hexInputRow.element?this.element.insertBefore(this.picker,this.hexInputRow.element):this.element.appendChild(this.picker);const e=document.createElement("style");e.textContent='[role="slider"]:focus [part$="pointer"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}',this.picker.shadowRoot.appendChild(e)}this.picker.addEventListener("color-changed",(e=>{const t=e.detail.value;this._debounceColorPickerEvent(t)}))}focus(){if(!this._config.hideInput&&(s._K.isGecko||s._K.isiOS||s._K.isSafari)){this.hexInputRow.children.get(1).focus()}this.slidersView.first.focus()}_createSlidersView(){const e=[...this.picker.shadowRoot.children].filter((e=>"slider"===e.getAttribute("role"))).map((e=>new Ao(e)));this.slidersView=this.createCollection(),e.forEach((e=>{this.slidersView.add(e)}))}_createInputRow(){const e=this._createColorInput();return new To(this.locale,e)}_createColorInput(){const e=new Ye(this.locale,Lt),{t}=this.locale;return e.set({label:t("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",(t=>e.isFocused?e.fieldView.value:t.startsWith("#")?t.substring(1):t)),e.fieldView.on("input",(()=>{const t=e.fieldView.element.value;if(t){const e=Eo(t);e&&this._debounceColorPickerEvent(e)}})),e}isValid(){const{t:e}=this.locale;return this.resetValidationStatus(),!!this.hexInputRow.getParsedColor()||(this.hexInputRow.inputView.errorText=e('Please enter a valid color (e.g. "ff0000").'),!1)}resetValidationStatus(){this.hexInputRow.inputView.errorText=null}}function xo(e){let t=function(e){if(!e)return"";const t=We(e);return t?"hex"===t.space?t.hexValue:$e(e,"hex"):"#000"}(e);return t||(t="#000"),4===t.length&&(t="#"+[t[1],t[1],t[2],t[2],t[3],t[3]].join("")),t.toLowerCase()}class Ao extends V{constructor(e){super(),this.element=e}focus(){this.element.focus()}}class Co extends V{constructor(e){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class To extends V{children;inputView;constructor(e,t){super(e),this.inputView=t,this.children=this.createCollection([new Co,this.inputView]),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}getParsedColor(){return Eo(this.inputView.fieldView.element.value)}}function Eo(e){if(!e)return null;const t=e.trim().replace(/^#/,"");return[3,4,6,8].includes(t.length)&&/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test(t)?`#${t}`:null}class Po extends((0,s.VM)(s.pM)){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(e,t){return this.find((t=>t.color===e.color))?this:super.add(e,t)}hasColor(e){return!!this.find((t=>t.color===e))}}class So extends V{items;colorDefinitions;focusTracker;columns;documentColors;documentColorsCount;staticColorsGrid;documentColorsGrid;colorPickerButtonView;removeColorButtonView;_focusables;_documentColorsLabel;_removeButtonLabel;_colorPickerLabel;constructor(e,{colors:t,columns:o,removeButtonLabel:s,documentColorsLabel:i,documentColorsCount:n,colorPickerLabel:r,focusTracker:a,focusables:c}){super(e);const l=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=a,this.items=this.createCollection(),this.colorDefinitions=t,this.columns=o,this.documentColors=new Po,this.documentColorsCount=n,this._focusables=c,this._removeButtonLabel=s,this._colorPickerLabel=r,this._documentColorsLabel=i,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-fragment",l.if("isVisible","ck-hidden",(e=>!e))]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,t){const o=e.document,s=this.documentColorsCount;this.documentColors.clear();for(const i of o.getRoots()){const o=e.createRangeIn(i);for(const e of o.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=s))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,o=this.selectedColor;t.selectedColor=o,e&&(e.selectedColor=o)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=a.bind(this.documentColors,this.documentColors),t=new fe(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}this._createColorPickerButton(),this._addColorSelectorElementsToFocusTracker()}focus(){this.removeColorButtonView.focus()}destroy(){super.destroy()}addColorPickerButton(){this.colorPickerButtonView&&(this.items.add(this.colorPickerButtonView),this.focusTracker.add(this.colorPickerButtonView.element),this._focusables.add(this.colorPickerButtonView))}_addColorSelectorElementsToFocusTracker(){this.focusTracker.add(this.removeColorButtonView.element),this._focusables.add(this.removeColorButtonView),this.staticColorsGrid&&(this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid)),this.documentColorsGrid&&(this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid))}_createColorPickerButton(){this.colorPickerButtonView=new q,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:N.Pt.colorPalette,class:"ck-color-selector__color-picker"}),this.colorPickerButtonView.on("execute",(()=>{this.fire("colorPicker:show")}))}_createRemoveColorButton(){const e=new q;return e.set({withText:!0,icon:N.Pt.eraser,label:this._removeButtonLabel}),e.class="ck-color-selector__remove-color",e.on("execute",(()=>{this.fire("execute",{value:null,source:"removeColorButton"})})),e.render(),e}_createStaticColorsGrid(){const e=new Ne(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",((e,t)=>{this.fire("execute",{value:t.value,source:"staticColorsGrid"})})),e}_createDocumentColorsGrid(){const e=a.bind(this.documentColors,this.documentColors),t=new Ne(this.locale,{columns:this.columns});return t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using((e=>{const t=new Ie;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",(()=>{this.fire("execute",{value:e.color,source:"documentColorsGrid"})})),t})),this.documentColors.on("change:isEmpty",((e,o,s)=>{s&&(t.selectedColor=null)})),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find((t=>t.color===e));t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class Mo extends V{items;colorPickerView;saveButtonView;cancelButtonView;actionBarView;focusTracker;keystrokes;_focusables;_colorPickerViewConfig;constructor(e,{focusTracker:t,focusables:o,keystrokes:s,colorPickerViewConfig:i}){super(e),this.items=this.createCollection(),this.focusTracker=t,this.keystrokes=s,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=o,this._colorPickerViewConfig=i;const n=this.bindTemplate,{saveButtonView:r,cancelButtonView:a}=this._createActionButtons();this.saveButtonView=r,this.cancelButtonView=a,this.actionBarView=this._createActionBarView({saveButtonView:r,cancelButtonView:a}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-fragment",n.if("isVisible","ck-hidden",(e=>!e))]},children:this.items})}render(){super.render();const e=new yo(this.locale,{...this._colorPickerViewConfig});this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",((t,o,s)=>{e.color=s})),this.items.add(this.colorPickerView),this.items.add(this.actionBarView),this._addColorPickersElementsToFocusTracker(),this._stopPropagationOnArrowsKeys(),this._executeOnEnterPress(),this._executeUponColorChange()}destroy(){super.destroy()}focus(){this.colorPickerView.focus()}resetValidationStatus(){this.colorPickerView.resetValidationStatus()}_executeOnEnterPress(){this.keystrokes.set("enter",(e=>{this.isVisible&&this.focusTracker.focusedElement!==this.cancelButtonView.element&&this.colorPickerView.isValid()&&(this.fire("execute",{value:this.selectedColor}),e.stopPropagation(),e.preventDefault())}))}_stopPropagationOnArrowsKeys(){const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const e of this.colorPickerView.slidersView)this.focusTracker.add(e.element),this._focusables.add(e);const e=this.colorPickerView.hexInputRow.children.get(1);e.element&&(this.focusTracker.add(e.element),this._focusables.add(e)),this.focusTracker.add(this.saveButtonView.element),this._focusables.add(this.saveButtonView),this.focusTracker.add(this.cancelButtonView.element),this._focusables.add(this.cancelButtonView)}_createActionBarView({saveButtonView:e,cancelButtonView:t}){const o=new V,s=this.createCollection();return s.add(e),s.add(t),o.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector_action-bar"]},children:s}),o}_createActionButtons(){const e=this.locale,t=e.t,o=new q(e),s=new q(e);return o.set({icon:N.Pt.check,class:"ck-button-save",type:"button",withText:!1,label:t("Accept")}),s.set({icon:N.Pt.cancel,class:"ck-button-cancel",type:"button",withText:!1,label:t("Cancel")}),o.on("execute",(()=>{this.colorPickerView.isValid()&&this.fire("execute",{source:"colorPickerSaveButton",value:this.selectedColor})})),s.on("execute",(()=>{this.fire("colorPicker:cancel")})),{saveButtonView:o,cancelButtonView:s}}_executeUponColorChange(){this.colorPickerView.on("colorSelected",((e,t)=>{this.fire("execute",{value:t.color,source:"colorPicker"}),this.set("selectedColor",t.color)}))}}var Oo=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorselector/colorselector.css"),Vo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Oo.A,Vo);Oo.A.locals;class Ro extends V{focusTracker;keystrokes;items;colorGridsFragmentView;colorPickerFragmentView;_focusCycler;_focusables;_colorPickerViewConfig;constructor(e,{colors:t,columns:o,removeButtonLabel:n,documentColorsLabel:r,documentColorsCount:a,colorPickerLabel:c,colorPickerViewConfig:l}){super(e),this.items=this.createCollection(),this.focusTracker=new s.$x,this.keystrokes=new s.EP,this._focusables=new i,this._colorPickerViewConfig=l,this._focusCycler=new G({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsFragmentView=new So(e,{colors:t,columns:o,removeButtonLabel:n,documentColorsLabel:r,documentColorsCount:a,colorPickerLabel:c,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerFragmentView=new Mo(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerViewConfig:l}),this.set("_isColorGridsFragmentVisible",!0),this.set("_isColorPickerFragmentVisible",!1),this.set("selectedColor",void 0),this.colorGridsFragmentView.bind("isVisible").to(this,"_isColorGridsFragmentVisible"),this.colorPickerFragmentView.bind("isVisible").to(this,"_isColorPickerFragmentVisible"),this.on("change:selectedColor",((e,t,o)=>{this.colorGridsFragmentView.set("selectedColor",o),this.colorPickerFragmentView.set("selectedColor",o)})),this.colorGridsFragmentView.on("change:selectedColor",((e,t,o)=>{this.set("selectedColor",o)})),this.colorPickerFragmentView.on("change:selectedColor",((e,t,o)=>{this.set("selectedColor",o)})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector"]},children:this.items})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendUI(){this._appendColorGridsFragment(),this._colorPickerViewConfig&&this._appendColorPickerFragment()}showColorPickerFragment(){this.colorPickerFragmentView.colorPickerView&&!this._isColorPickerFragmentVisible&&(this._isColorPickerFragmentVisible=!0,this.colorPickerFragmentView.focus(),this.colorPickerFragmentView.resetValidationStatus(),this._isColorGridsFragmentVisible=!1)}showColorGridsFragment(){this._isColorGridsFragmentVisible||(this._isColorGridsFragmentVisible=!0,this.colorGridsFragmentView.focus(),this._isColorPickerFragmentVisible=!1)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}updateDocumentColors(e,t){this.colorGridsFragmentView.updateDocumentColors(e,t)}updateSelectedColors(){this.colorGridsFragmentView.updateSelectedColors()}_appendColorGridsFragment(){this.items.length||(this.items.add(this.colorGridsFragmentView),this.colorGridsFragmentView.delegate("execute").to(this),this.colorGridsFragmentView.delegate("colorPicker:show").to(this))}_appendColorPickerFragment(){2!==this.items.length&&(this.items.add(this.colorPickerFragmentView),this.colorGridsFragmentView.colorPickerButtonView&&this.colorGridsFragmentView.colorPickerButtonView.on("execute",(()=>{this.showColorPickerFragment()})),this.colorGridsFragmentView.addColorPickerButton(),this.colorPickerFragmentView.delegate("execute").to(this),this.colorPickerFragmentView.delegate("colorPicker:cancel").to(this))}}class jo{editor;_components=new Map;constructor(e){this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(Io(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new s.Yb("componentfactory-item-missing",this,{name:e});return this._components.get(Io(e)).callback(this.editor.locale)}has(e){return this._components.has(Io(e))}}function Io(e){return String(e).toLowerCase()}var Bo=o("./node_modules/lodash-es/isElement.js"),Do=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css"),No={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Do.A,No);Do.A.locals;const Fo=(0,s.To)("px"),Lo={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}};class zo extends V{content;_pinWhenIsVisibleCallback;constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",Fo),left:t.to("left",Fo)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=zo.defaultPositions,o=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:s.Sf.document.body,fitInViewport:!0},e),i=zo._getOptimalPosition(o)||Lo,n=parseInt(i.left),r=parseInt(i.top),a=i.name,c=i.config||{},{withArrow:l=!0}=c;this.top=r,this.left=n,this.position=a,this.withArrow=l}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=Ho(e.target),o=e.limiter?Ho(e.limiter):s.Sf.document.body;this.listenTo(s.Sf.document,"scroll",((s,i)=>{const n=i.target,r=t&&n.contains(t),a=o&&n.contains(o);!r&&!a&&t&&o||this.attachTo(e)}),{useCapture:!0}),this.listenTo(s.Sf.window,"resize",(()=>{this.attachTo(e)}))}_stopPinning(){this.stopListening(s.Sf.document,"scroll"),this.stopListening(s.Sf.window,"resize")}static generatePositions(e={}){const{sideOffset:t=zo.arrowSideOffset,heightOffset:o=zo.arrowHeightOffset,stickyVerticalOffset:s=zo.stickyVerticalOffset,config:i}=e;return{northWestArrowSouthWest:(e,o)=>({top:n(e,o),left:e.left-t,name:"arrow_sw",...i&&{config:i}}),northWestArrowSouthMiddleWest:(e,o)=>({top:n(e,o),left:e.left-.25*o.width-t,name:"arrow_smw",...i&&{config:i}}),northWestArrowSouth:(e,t)=>({top:n(e,t),left:e.left-t.width/2,name:"arrow_s",...i&&{config:i}}),northWestArrowSouthMiddleEast:(e,o)=>({top:n(e,o),left:e.left-.75*o.width+t,name:"arrow_sme",...i&&{config:i}}),northWestArrowSouthEast:(e,o)=>({top:n(e,o),left:e.left-o.width+t,name:"arrow_se",...i&&{config:i}}),northArrowSouthWest:(e,o)=>({top:n(e,o),left:e.left+e.width/2-t,name:"arrow_sw",...i&&{config:i}}),northArrowSouthMiddleWest:(e,o)=>({top:n(e,o),left:e.left+e.width/2-.25*o.width-t,name:"arrow_smw",...i&&{config:i}}),northArrowSouth:(e,t)=>({top:n(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...i&&{config:i}}),northArrowSouthMiddleEast:(e,o)=>({top:n(e,o),left:e.left+e.width/2-.75*o.width+t,name:"arrow_sme",...i&&{config:i}}),northArrowSouthEast:(e,o)=>({top:n(e,o),left:e.left+e.width/2-o.width+t,name:"arrow_se",...i&&{config:i}}),northEastArrowSouthWest:(e,o)=>({top:n(e,o),left:e.right-t,name:"arrow_sw",...i&&{config:i}}),northEastArrowSouthMiddleWest:(e,o)=>({top:n(e,o),left:e.right-.25*o.width-t,name:"arrow_smw",...i&&{config:i}}),northEastArrowSouth:(e,t)=>({top:n(e,t),left:e.right-t.width/2,name:"arrow_s",...i&&{config:i}}),northEastArrowSouthMiddleEast:(e,o)=>({top:n(e,o),left:e.right-.75*o.width+t,name:"arrow_sme",...i&&{config:i}}),northEastArrowSouthEast:(e,o)=>({top:n(e,o),left:e.right-o.width+t,name:"arrow_se",...i&&{config:i}}),southWestArrowNorthWest:e=>({top:r(e),left:e.left-t,name:"arrow_nw",...i&&{config:i}}),southWestArrowNorthMiddleWest:(e,o)=>({top:r(e),left:e.left-.25*o.width-t,name:"arrow_nmw",...i&&{config:i}}),southWestArrowNorth:(e,t)=>({top:r(e),left:e.left-t.width/2,name:"arrow_n",...i&&{config:i}}),southWestArrowNorthMiddleEast:(e,o)=>({top:r(e),left:e.left-.75*o.width+t,name:"arrow_nme",...i&&{config:i}}),southWestArrowNorthEast:(e,o)=>({top:r(e),left:e.left-o.width+t,name:"arrow_ne",...i&&{config:i}}),southArrowNorthWest:e=>({top:r(e),left:e.left+e.width/2-t,name:"arrow_nw",...i&&{config:i}}),southArrowNorthMiddleWest:(e,o)=>({top:r(e),left:e.left+e.width/2-.25*o.width-t,name:"arrow_nmw",...i&&{config:i}}),southArrowNorth:(e,t)=>({top:r(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...i&&{config:i}}),southArrowNorthMiddleEast:(e,o)=>({top:r(e),left:e.left+e.width/2-.75*o.width+t,name:"arrow_nme",...i&&{config:i}}),southArrowNorthEast:(e,o)=>({top:r(e),left:e.left+e.width/2-o.width+t,name:"arrow_ne",...i&&{config:i}}),southEastArrowNorthWest:e=>({top:r(e),left:e.right-t,name:"arrow_nw",...i&&{config:i}}),southEastArrowNorthMiddleWest:(e,o)=>({top:r(e),left:e.right-.25*o.width-t,name:"arrow_nmw",...i&&{config:i}}),southEastArrowNorth:(e,t)=>({top:r(e),left:e.right-t.width/2,name:"arrow_n",...i&&{config:i}}),southEastArrowNorthMiddleEast:(e,o)=>({top:r(e),left:e.right-.75*o.width+t,name:"arrow_nme",...i&&{config:i}}),southEastArrowNorthEast:(e,o)=>({top:r(e),left:e.right-o.width+t,name:"arrow_ne",...i&&{config:i}}),westArrowEast:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.left-t.width-o,name:"arrow_e",...i&&{config:i}}),eastArrowWest:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.right+o,name:"arrow_w",...i&&{config:i}}),viewportStickyNorth:(e,t,o,n)=>{const r=n||o;return e.getIntersection(r)?r.height-e.height>s?null:{top:r.top+s,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...i}}:null}};function n(e,t){return e.top-t.height-o}function r(e){return e.bottom+o}}static arrowSideOffset=25;static arrowHeightOffset=10;static stickyVerticalOffset=20;static _getOptimalPosition=s.W;static defaultPositions=zo.generatePositions()}function Ho(e){return(0,Bo.A)(e)?e:(0,s._Z)(e)?e.commonAncestorContainer:"function"==typeof e?Ho(e()):null}var $o=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css"),Wo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()($o.A,Wo);$o.A.locals;const qo="ck-tooltip";class Uo extends((0,s.c5)()){tooltipTextView;balloonPanelView;static defaultBalloonPositions=zo.generatePositions({heightOffset:5,sideOffset:13});_currentElementWithTooltip=null;_currentTooltipPosition=null;_resizeObserver=null;_mutationObserver=null;_pinTooltipDebounced;_unpinTooltipDebounced;_watchdogExcluded;static _editors=new Set;static _instance=null;constructor(e){if(super(),Uo._editors.add(e),Uo._instance)return Uo._instance;Uo._instance=this,this.tooltipTextView=new V(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new zo(e.locale),this.balloonPanelView.class=qo,this.balloonPanelView.content.add(this.tooltipTextView),this._mutationObserver=function(e){const t=new MutationObserver((()=>{e()}));return{attach(e){t.observe(e,{attributes:!0,attributeFilter:["data-cke-tooltip-text","data-cke-tooltip-position"]})},detach(){t.disconnect()}}}((()=>{this._updateTooltipPosition()})),this._pinTooltipDebounced=(0,qe.A)(this._pinTooltip,600),this._unpinTooltipDebounced=(0,qe.A)(this._unpinTooltip,400),this.listenTo(s.Sf.document,"keydown",this._onKeyDown.bind(this),{useCapture:!0}),this.listenTo(s.Sf.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(s.Sf.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(s.Sf.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(s.Sf.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(s.Sf.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;Uo._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),Uo._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Uo._instance=null)}static getPositioningFunctions(e){const t=Uo.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onKeyDown(e,t){"Escape"===t.key&&this._currentElementWithTooltip&&(this._unpinTooltip(),t.stopPropagation())}_onEnterOrFocus(e,{target:t}){const o=Ko(t);o?o!==this._currentElementWithTooltip&&(this._unpinTooltip(),"focus"!==e.name||o.matches(":hover")?this._pinTooltipDebounced(o,Yo(o)):this._pinTooltip(o,Yo(o))):"focus"===e.name&&this._unpinTooltip()}_onLeaveOrBlur(e,{target:t,relatedTarget:o}){if("mouseleave"===e.name){if(!(0,Bo.A)(t))return;const e=this.balloonPanelView.element,s=e&&(e===o||e.contains(o)),i=!s&&t===e;if(s)return void this._unpinTooltipDebounced.cancel();if(!i&&this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const n=Ko(t),r=Ko(o);(i||n&&n!==r)&&this._unpinTooltipDebounced()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltipDebounced()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:o,cssClass:i}){this._unpinTooltip();const n=(0,s.$1)(Uo._editors.values()).ui.view.body;n.has(this.balloonPanelView)||n.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.class=[qo,i].filter((e=>e)).join(" "),this.balloonPanelView.pin({target:e,positions:Uo.getPositioningFunctions(o)}),this._resizeObserver=new s.tb(e,(()=>{(0,s.zN)(e)||this._unpinTooltip()})),this._mutationObserver.attach(e);for(const e of Uo._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=o}_unpinTooltip(){this._unpinTooltipDebounced.cancel(),this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of Uo._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this.tooltipTextView.text="",this._resizeObserver&&this._resizeObserver.destroy(),this._mutationObserver.detach()}_updateTooltipPosition(){if(!this._currentElementWithTooltip)return;const e=Yo(this._currentElementWithTooltip);(0,s.zN)(this._currentElementWithTooltip)&&e.text?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Uo.getPositioningFunctions(e.position)}):this._unpinTooltip()}}function Ko(e){return(0,Bo.A)(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}function Yo(e){return{text:e.dataset.ckeTooltipText,position:e.dataset.ckeTooltipPosition||"s",cssClass:e.dataset.ckeTooltipClass||""}}var Go=o("./node_modules/lodash-es/throttle.js");const Zo=50,Jo=350,Xo="Powered by";class Qo extends((0,s.c5)()){editor;_balloonView;_showBalloonThrottled;_lastFocusedEditableElement;constructor(e){super(),this.editor=e,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=(0,Go.A)(this._showBalloon.bind(this),50,{leading:!0}),e.on("ready",this._handleEditorReady.bind(this))}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;(!!e.config.get("ui.poweredBy.forceVisible")||"VALID"!==(0,s.rQ)(e.config.get("licenseKey")))&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",((e,t,o)=>{this._updateLastFocusedEditableElement(),o?this._showBalloon():this._hideBalloon()})),e.ui.focusTracker.on("change:focusedElement",((e,t,o)=>{this._updateLastFocusedEditableElement(),o&&this._showBalloon()})),e.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const e=this.editor,t=this._balloonView=new zo,o=os(e),s=new es(e.locale,o.label);t.content.add(s),t.set({class:"ck-powered-by-balloon"}),e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this._balloonView=t}_showBalloon(){if(!this._lastFocusedEditableElement)return;const e=function(e,t){const o=os(e),s="right"===o.side?function(e,t){return ts(e,t,((e,o)=>e.left+e.width-o.width-t.horizontalOffset))}(t,o):function(e,t){return ts(e,t,(e=>e.left+t.horizontalOffset))}(t,o);return{target:t,positions:[s]}}(this.editor,this._lastFocusedEditableElement);e&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,o=e.ui.focusTracker.focusedElement;if(!t||!o)return void(this._lastFocusedEditableElement=null);const s=Array.from(e.ui.getEditableElementsNames()).map((t=>e.ui.getEditableElement(t)));s.includes(o)?this._lastFocusedEditableElement=o:this._lastFocusedEditableElement=s[0]}}class es extends V{constructor(e,t){super(e);const o=new z,s=this.bindTemplate;o.set({content:'\n',isColorInherited:!1}),o.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],o],on:{dragstart:s.to((e=>e.preventDefault()))}}]})}}function ts(e,t,o){return(i,n)=>{const r=new s.rw(e);if(r.width{for(const e of Object.values(ns))this.announce("",e)}))}announce(e,t=ns.POLITE){const o=this.editor;if(!o.ui.view)return;this.view||(this.view=new as(o.locale),o.ui.view.body.add(this.view));const{politeness:s,isUnsafeHTML:i}="string"==typeof t?{politeness:t}:t;let n=this.view.regionViews.find((e=>e.politeness===s));n||(n=new cs(o,s),this.view.regionViews.add(n)),n.announce({announcement:e,isUnsafeHTML:i})}}class as extends V{regionViews;constructor(e){super(e),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class cs extends V{politeness;_domConverter;_pruneAnnouncementsInterval;constructor(e,t){super(e.locale),this.setTemplate({tag:"div",attributes:{role:"region","aria-live":t,"aria-relevant":"additions"},children:[{tag:"ul",attributes:{class:["ck","ck-aria-live-region-list"]}}]}),e.on("destroy",(()=>{null!==this._pruneAnnouncementsInterval&&(clearInterval(this._pruneAnnouncementsInterval),this._pruneAnnouncementsInterval=null)})),this.politeness=t,this._domConverter=e.data.htmlProcessor.domConverter,this._pruneAnnouncementsInterval=setInterval((()=>{this.element&&this._listElement.firstChild&&this._listElement.firstChild.remove()}),5e3)}announce({announcement:e,isUnsafeHTML:t}){if(!e.trim().length)return;const o=document.createElement("li");t?this._domConverter.setContentOf(o,e):o.innerText=e,this._listElement.appendChild(o)}get _listElement(){return this.element.querySelector("ul")}}class ls extends((0,s.VM)()){editor;componentFactory;focusTracker;tooltipManager;poweredBy;ariaLiveAnnouncer;isReady=!1;_editableElementsMap=new Map;_focusableToolbarDefinitions=[];constructor(e){super();const t=e.editing.view;this.editor=e,this.componentFactory=new jo(e),this.focusTracker=new s.$x,this.tooltipManager=new Uo(e),this.poweredBy=new Qo(e),this.ariaLiveAnnouncer=new rs(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{this.isReady=!0})),this.listenTo(t.document,"layoutChanged",this.update.bind(this)),this.listenTo(t,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const o=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?o():this.once("ready",o)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)})),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const o=e.config.get("toolbar.viewportTopOffset");return o?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:o}):{top:0}}_initFocusTracking(){const e=this.editor,t=e.editing.view;let o,s;e.keystrokes.set("Alt+F10",((e,i)=>{const n=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(n)&&!Array.from(t.domRoots.values()).includes(n)&&(o=n);const r=this._getCurrentFocusedToolbarDefinition();r&&s||(s=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e{const i=this._getCurrentFocusedToolbarDefinition();i&&(o?(o.focus(),o=null):e.editing.view.focus(),i.options.afterBlur&&i.options.afterBlur(),s())}))}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:o,options:i}=t;((0,s.zN)(o.element)||i.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>ds(e)-ds(t))),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:o}}=e;return o&&o(),!!(0,s.zN)(t.element)&&(t.focus(),!0)}_handleScrollToTheSelection(e,t){const o={top:0,bottom:0,left:0,right:0,...this.viewportOffset};t.viewportOffset.top+=o.top,t.viewportOffset.bottom+=o.bottom,t.viewportOffset.left+=o.left,t.viewportOffset.right+=o.right}}function ds(e){const{toolbarView:t,options:o}=e;let i=10;return(0,s.zN)(t.element)&&i--,o.isContextual&&i--,i}var hs=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css"),us={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(hs.A,us);hs.A.locals;class ps extends V{body;constructor(e){super(e),this.body=new ye(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class ms extends ps{top;main;_voiceLabelView;constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new fe;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class fs extends V{name=null;_editingView;_editableElement;_hasExternalElement;constructor(e,t,o){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=o,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change((o=>{const s=e.document.getRoot(t.name);o.addClass(t.isFocused?"ck-focused":"ck-blurred",s),o.removeClass(t.isFocused?"ck-blurred":"ck-focused",s)}))}e.isRenderingInProgress?function o(s){e.once("change:isRenderingInProgress",((e,i,n)=>{n?o(s):t(s)}))}(this):t(this)}}class gs extends fs{_generateLabel;constructor(e,t,o,s={}){super(e,t,o);const i=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=s.label||(()=>i("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const o=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),o)}))}}class _s extends V{constructor(e){super(e);const t=this.bindTemplate;this.setTemplate({tag:"iframe",attributes:{class:["ck","ck-reset_all"],sandbox:"allow-same-origin allow-scripts"},on:{load:t.to("loaded")}})}render(){return new Promise((e=>(this.on("loaded",e),super.render())))}}class bs extends N.HY{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}var ks=o("./node_modules/lodash-es/assignIn.js");class ws extends((0,s.VM)()){constructor(e,t){super(),t&&(0,ks.A)(this,t),e&&this.set(e)}}var vs=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css"),ys={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(vs.A,ys);vs.A.locals;var xs=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css"),As={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(xs.A,As);xs.A.locals;const Cs=(0,s.To)("px");class Ts extends N.k_{positionLimiter;visibleStack;_viewToStack=new Map;_idToStack=new Map;_view=null;_rotatorView=null;_fakePanelsView=null;static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new s.Yb("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const o=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),o.set(e.view,e),this._viewToStack.set(e.view,o),o===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new s.Yb("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new s.Yb("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new zo(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find((t=>t[1]===e))[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new Es(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,o)=>{if(o<2)return"";const s=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[s,o])})),e.buttonNextView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),e.buttonPrevView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),e}_createFakePanelsView(){const e=new Ps(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-1,2):0)),e.listenTo(this.view,"change:top",(()=>e.updatePosition())),e.listenTo(this.view,"change:left",(()=>e.updatePosition())),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:o=!0,singleViewMode:s=!1}){this.view.class=t,this.view.withArrow=o,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),s&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class Es extends V{focusTracker;buttonPrevView;buttonNextView;content;constructor(e){super(e);const t=e.t,o=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new s.$x,this.buttonPrevView=this._createButtonView(t("Previous"),N.Pt.previousArrow),this.buttonNextView=this._createButtonView(t("Next"),N.Pt.nextArrow),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",o.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:o.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const o=new q(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o}}class Ps extends V{content;_balloonPanelView;constructor(e,t){super(e);const o=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",o.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:o.to("top",Cs),left:o.to("left",Cs),width:o.to("width",Cs),height:o.to("height",Cs)}},children:this.content}),this.on("change:numberOfPanels",((e,t,o,s)=>{o>s?this._addPanels(o-s):this._removePanels(s-o),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new V;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:o,height:i}=new s.rw(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:o,height:i})}}}var Ss=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css"),Ms={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ss.A,Ms);Ss.A.locals;const Os=(0,s.To)("px");class Vs extends V{content;contentPanelElement;_contentPanelPlaceholder;constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new a({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",(e=>e?"block":"none")),height:t.to("isSticky",(e=>e?Os(this._contentPanelRect.height):null))}}}).render(),this.contentPanelElement=new a({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",(e=>e?Os(this._contentPanelPlaceholder.getBoundingClientRect().width):null)),top:t.to("_stickyTopOffset",(e=>e?Os(e):e)),bottom:t.to("_stickyBottomOffset",(e=>e?Os(e):e)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this.contentPanelElement]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo(s.Sf.document,"scroll",(()=>{this.checkIfShouldBeSticky()}),{useCapture:!0}),this.listenTo(this,"change:isActive",(()=>{this.checkIfShouldBeSticky()}))}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive)return void this._unstick();const e=new s.rw(this.limiterElement);let t=e.getVisible();if(t){const e=new s.rw(s.Sf.window);e.top+=this.viewportTopOffset,e.height-=this.viewportTopOffset,t=t.getIntersection(e)}if(t&&e.topt.bottom){const o=Math.max(e.bottom-t.bottom,0)+this.limiterBottomOffset;e.bottom-o>e.top+this._contentPanelRect.height?this._stickToBottomOfLimiter(o):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset{this.reset(),this.focus(),this.fire("reset")})),this.resetButtonView.bind("isVisible").to(this.fieldView,"isEmpty",(e=>!e)),this.fieldWrapperChildren.add(this.resetButtonView),this.extendTemplate({attributes:{class:"ck-search__query_with-reset"}}))}reset(){this.fieldView.reset(),this._viewConfig.showResetButton&&(this.resetButtonView.isVisible=!1)}}class js extends V{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,primaryText:"",secondaryText:""}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__info",e.if("isVisible","ck-hidden",(e=>!e))],tabindex:-1},children:[{tag:"span",children:[{text:[e.to("primaryText")]}]},{tag:"span",children:[{text:[e.to("secondaryText")]}]}]})}focus(){this.element.focus()}}class Is extends V{focusTracker;children;_focusCycler;constructor(e){super(e),this.children=this.createCollection(),this.focusTracker=new s.$x,this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__results"],tabindex:-1},children:this.children}),this._focusCycler=new G({focusables:this.children,focusTracker:this.focusTracker})}render(){super.render();for(const e of this.children)this.focusTracker.add(e.element)}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}var Bs=o("./node_modules/lodash-es/escapeRegExp.js"),Ds=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/search/search.css"),Ns={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ds.A,Ns);Ds.A.locals;class Fs extends V{focusTracker;keystrokes;resultsView;filteredView;infoView;queryView;focusCycler;_config;constructor(e,t){super(e),this._config=t,this.filteredView=t.filteredView,this.queryView=this._createSearchTextQueryView(),this.focusTracker=new s.$x,this.keystrokes=new s.EP,this.resultsView=new Is(e),this.children=this.createCollection(),this.focusableChildren=this.createCollection([this.queryView,this.resultsView]),this.set("isEnabled",!0),this.set("resultsCount",0),this.set("totalItemsCount",0),t.infoView&&t.infoView.instance?this.infoView=t.infoView.instance:(this.infoView=new js,this._enableDefaultInfoViewBehavior(),this.on("render",(()=>{this.search("")}))),this.resultsView.children.addMany([this.infoView,this.filteredView]),this.focusCycler=new G({focusables:this.focusableChildren,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.on("search",((e,{resultsCount:t,totalItemsCount:o})=>{this.resultsCount=t,this.totalItemsCount=o})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search",t.class||null],tabindex:"-1"},children:this.children})}render(){super.render(),this.children.addMany([this.queryView,this.resultsView]);const e=e=>e.stopPropagation();for(const e of this.focusableChildren)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}focus(){this.queryView.focus()}reset(){this.queryView.reset(),this.search("")}search(e){const t=e?new RegExp((0,Bs.A)(e),"ig"):null,o=this.filteredView.filter(t);this.fire("search",{query:e,...o})}_createSearchTextQueryView(){const e=new Rs(this.locale,this._config.queryView);return this.listenTo(e.fieldView,"input",(()=>{this.search(e.fieldView.element.value)})),e.on("reset",(()=>this.reset())),e.bind("isEnabled").to(this),e}_enableDefaultInfoViewBehavior(){const e=this.locale.t,t=this.infoView;function o(e,{query:t,resultsCount:o,totalItemsCount:s}){return"function"==typeof e?e(t,o,s):e}this.on("search",((s,i)=>{if(i.resultsCount)t.set({isVisible:!1});else{const s=this._config.infoView&&this._config.infoView.text;let n,r;i.totalItemsCount?s&&s.notFound?(n=s.notFound.primary,r=s.notFound.secondary):(n=e("No results found"),r=""):s&&s.noSearchableItems?(n=s.noSearchableItems.primary,r=s.noSearchableItems.secondary):(n=e("No searchable items"),r=""),t.set({primaryText:o(n,i),secondaryText:o(r,i),isVisible:!0})}}))}}var Ls=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/autocomplete/autocomplete.css"),zs={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ls.A,zs);Ls.A.locals;class Hs extends Fs{_config;constructor(e,t){super(e,t),this._config=t;const o=(0,s.To)("px");this.extendTemplate({attributes:{class:["ck-autocomplete"]}});const i=this.resultsView.bindTemplate;this.resultsView.set("isVisible",!1),this.resultsView.set("_position","s"),this.resultsView.set("_width",0),this.resultsView.extendTemplate({attributes:{class:[i.if("isVisible","ck-hidden",(e=>!e)),i.to("_position",(e=>`ck-search__results_${e}`))],style:{width:i.to("_width",o)}}}),this.focusTracker.on("change:isFocused",((e,o,s)=>{this._updateResultsVisibility(),s?this.resultsView.element.scrollTop=0:t.resetOnBlur&&this.queryView.reset()})),this.on("search",(()=>{this._updateResultsVisibility(),this._updateResultsViewWidthAndPosition()})),this.keystrokes.set("esc",((e,t)=>{this.resultsView.isVisible&&(this.queryView.focus(),this.resultsView.isVisible=!1,t())})),this.listenTo(s.Sf.document,"scroll",(()=>{this._updateResultsViewWidthAndPosition()})),this.on("change:isEnabled",(()=>{this._updateResultsVisibility()})),this.filteredView.on("execute",((e,{value:t})=>{this.focus(),this.reset(),this.queryView.fieldView.value=this.queryView.fieldView.element.value=t,this.resultsView.isVisible=!1})),this.resultsView.on("change:isVisible",(()=>{this._updateResultsViewWidthAndPosition()}))}_updateResultsViewWidthAndPosition(){if(!this.resultsView.isVisible)return;this.resultsView._width=new s.rw(this.queryView.fieldView.element).width;const e=Hs._getOptimalPosition({element:this.resultsView.element,target:this.queryView.element,fitInViewport:!0,positions:Hs.defaultResultsPositions});this.resultsView._position=e?e.name:"s"}_updateResultsVisibility(){const e=void 0===this._config.queryMinChars?0:this._config.queryMinChars,t=this.queryView.fieldView.element.value.length;this.resultsView.isVisible=this.focusTracker.isFocused&&this.isEnabled&&t>=e}static defaultResultsPositions=[e=>({top:e.bottom,left:e.left,name:"s"}),(e,t)=>({top:e.top-t.height,left:e.left,name:"n"})];static _getOptimalPosition=s.W}const $s=function(e){return function(t){return null==e?void 0:e[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"});var Ws=o("./node_modules/lodash-es/toString.js"),qs=/[&<>"']/g,Us=RegExp(qs.source);const Ks=function(e){return(e=(0,Ws.A)(e))&&Us.test(e)?e.replace(qs,$s):e};var Ys=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/highlightedtext/highlightedtext.css"),Gs={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ys.A,Gs);Ys.A.locals;class Zs extends V{constructor(){super(),this.set("text",void 0),this.setTemplate({tag:"span",attributes:{class:["ck","ck-highlighted-text"]}}),this.on("render",(()=>{this.on("change:text",(()=>{this._updateInnerHTML(this.text)})),this._updateInnerHTML(this.text)}))}highlightText(e){this._updateInnerHTML(function(e,t){if(!t)return Ks(e);const o=[];let s=0,i=t.exec(e);for(;null!==i;){const n=i.index;n!==s&&o.push({text:e.substring(s,n),isMatch:!1}),o.push({text:i[0],isMatch:!0}),s=t.lastIndex,i=t.exec(e)}s!==e.length&&o.push({text:e.substring(s),isMatch:!1});return o.map((e=>(e.text=Ks(e.text),e))).map((e=>e.isMatch?`${e.text}`:e.text)).join("")}(this.text||"",e))}_updateInnerHTML(e){this.element.innerHTML=e||""}}var Js=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/spinner/spinner.css"),Xs={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Js.A,Xs);Js.A.locals;class Qs extends V{constructor(){super(),this.set("isVisible",!1);const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-spinner-container",e.if("isVisible","ck-hidden",(e=>!e))]},children:[{tag:"span",attributes:{class:["ck","ck-spinner"]}}]})}}const ei=(0,s.To)("px");class ti extends N.k_{toolbarView;focusTracker;_balloonConfig;_resizeObserver=null;_balloon;_fireSelectionChangeDebounced;static get pluginName(){return"BalloonToolbar"}static get requires(){return[Ts]}constructor(e){super(e),this._balloonConfig=ut(e.config.get("balloonToolbar")),this.toolbarView=this._createToolbarView(),this.focusTracker=new s.$x,e.ui.once("ready",(()=>{this.focusTracker.add(e.ui.getEditableElement()),this.focusTracker.add(this.toolbarView.element)})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this.show(!0),afterBlur:()=>this.hide(),isContextual:!0}),this._balloon=e.plugins.get(Ts),this._fireSelectionChangeDebounced=(0,qe.A)((()=>this.fire("_selectionChangeDebounced")),200),this.decorate("show")}init(){const e=this.editor,t=e.model.document.selection;this.listenTo(this.focusTracker,"change:isFocused",((e,t,o)=>{const s=this._balloon.visibleView===this.toolbarView;!o&&s?this.hide():o&&this.show()})),this.listenTo(t,"change:range",((e,o)=>{(o.directChange||t.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()})),this.listenTo(this,"_selectionChangeDebounced",(()=>{this.editor.editing.view.document.isFocused&&this.show()})),this._balloonConfig.shouldNotGroupWhenFull||this.listenTo(e,"ready",(()=>{const t=e.ui.view.editable.element;this._resizeObserver=new s.tb(t,(e=>{this.toolbarView.maxWidth=ei(.9*e.contentRect.width)}))})),this.listenTo(this.toolbarView,"groupedItemsUpdate",(()=>{this._updatePosition()})),e.ui.once("ready",(()=>{this.toolbarView.fillFromConfig(this._balloonConfig,this.editor.ui.componentFactory)}))}_createToolbarView(){const e=this.editor.locale.t,t=!this._balloonConfig.shouldNotGroupWhenFull,o=new gt(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return o.ariaLabel=e("Editor contextual toolbar"),o.render(),o}show(e=!1){const t=this.editor,o=t.model.document.selection,s=t.model.schema;this._balloon.hasView(this.toolbarView)||o.isCollapsed&&!e||function(e,t){if(1===e.rangeCount)return!1;return[...e.getRanges()].every((e=>{const o=e.getContainedElement();return o&&t.isSelectable(o)}))}(o,s)||Array.from(this.toolbarView.items).every((e=>void 0!==e.isEnabled&&!e.isEnabled))||(this.listenTo(this.editor.ui,"update",(()=>{this._updatePosition()})),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.ui,"update"),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document,o=t.selection,i=t.selection.isBackward;return{target:()=>{const t=i?o.getFirstRange():o.getLastRange(),n=s.rw.getDomRangeRects(e.domConverter.viewRangeToDom(t));return i?n[0]:(n.length>1&&0===n[n.length-1].width&&n.pop(),n[n.length-1])},positions:this._getBalloonPositions(i)}}_updatePosition(){this._balloon.updatePosition(this._getBalloonPositionData())}destroy(){super.destroy(),this.stopListening(),this._fireSelectionChangeDebounced.cancel(),this.toolbarView.destroy(),this.focusTracker.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getBalloonPositions(e){const t=s._K.isSafari&&s._K.isiOS?zo.generatePositions({heightOffset:Math.max(zo.arrowHeightOffset,Math.round(20/s.Sf.window.visualViewport.scale))}):zo.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.northWestArrowSouthMiddleEast,t.northWestArrowSouthMiddleWest,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast,t.southWestArrowNorthMiddleWest,t.southWestArrowNorthMiddleEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.southEastArrowNorthMiddleEast,t.southEastArrowNorthMiddleWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest,t.northEastArrowSouthMiddleEast,t.northEastArrowSouthMiddleWest]}}var oi=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css"),si={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(oi.A,si);oi.A.locals;const ii=(0,s.To)("px");class ni extends q{constructor(e){super(e);const t=this.bindTemplate;this.isVisible=!1,this.isToggleable=!0,this.set("top",0),this.set("left",0),this.extendTemplate({attributes:{class:"ck-block-toolbar-button",style:{top:t.to("top",(e=>ii(e))),left:t.to("left",(e=>ii(e)))}}})}}const ri=(0,s.To)("px");class ai extends N.k_{toolbarView;panelView;buttonView;_resizeObserver=null;_blockToolbarConfig;static get pluginName(){return"BlockToolbar"}constructor(e){super(e),this._blockToolbarConfig=ut(this.editor.config.get("blockToolbar")),this.toolbarView=this._createToolbarView(),this.panelView=this._createPanelView(),this.buttonView=this._createButtonView(),R({emitter:this.panelView,contextElements:[this.panelView.element,this.buttonView.element],activator:()=>this.panelView.isVisible,callback:()=>this._hidePanel()})}init(){const e=this.editor,t=e.t,o=t("Click to edit block"),s=t("Drag to move"),i=t("Edit block"),n=e.plugins.has("DragDropBlockToolbar"),r=n?`${o}\n${s}`:i;this.buttonView.label=r,n&&(this.buttonView.element.dataset.ckeTooltipClass="ck-tooltip_multi-line"),this.listenTo(e.model.document.selection,"change:range",((e,t)=>{t.directChange&&this._hidePanel()})),this.listenTo(e.ui,"update",(()=>this._updateButton())),this.listenTo(e,"change:isReadOnly",(()=>this._updateButton()),{priority:"low"}),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>this._updateButton())),this.listenTo(this.buttonView,"change:isVisible",((e,t,o)=>{o?this.buttonView.listenTo(window,"resize",(()=>this._updateButton())):(this.buttonView.stopListening(window,"resize"),this._hidePanel())})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this._showPanel(),afterBlur:()=>this._hidePanel()}),e.ui.once("ready",(()=>{this.toolbarView.fillFromConfig(this._blockToolbarConfig,this.editor.ui.componentFactory);for(const e of this.toolbarView.items)e.on("execute",(()=>this._hidePanel(!0)),{priority:"high"})}))}destroy(){super.destroy(),this.panelView.destroy(),this.buttonView.destroy(),this.toolbarView.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_createToolbarView(){const e=this.editor.locale.t,t=!this._blockToolbarConfig.shouldNotGroupWhenFull,o=new gt(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return o.ariaLabel=e("Editor block content toolbar"),o}_createPanelView(){const e=this.editor,t=new zo(e.locale);return t.content.add(this.toolbarView),t.class="ck-toolbar-container",e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this.toolbarView.keystrokes.set("Esc",((e,t)=>{this._hidePanel(!0),t()})),t}_createButtonView(){const e=this.editor,t=e.t,o=new ni(e.locale),s=this._blockToolbarConfig.icon,i=ft[s]||s||ft.dragIndicator;return o.set({label:t("Edit block"),icon:i,withText:!1}),o.bind("isOn").to(this.panelView,"isVisible"),o.bind("tooltip").to(this.panelView,"isVisible",(e=>!e)),this.listenTo(o,"execute",(()=>{this.panelView.isVisible?this._hidePanel(!0):this._showPanel()})),e.ui.view.body.add(o),e.ui.focusTracker.add(o.element),o}_updateButton(){const e=this.editor,t=e.model,o=e.editing.view;if(!e.ui.focusTracker.isFocused)return void this._hideButton();if(!e.model.canEditAt(e.model.document.selection))return void this._hideButton();const s=Array.from(t.document.selection.getSelectedBlocks())[0];if(!s||Array.from(this.toolbarView.items).every((e=>!e.isEnabled)))return void this._hideButton();const i=o.domConverter.mapViewToDom(e.editing.mapper.toViewElement(s));this.buttonView.isVisible=!0,this._setupToolbarResize(),this._attachButtonToElement(i),this.panelView.isVisible&&this._showPanel()}_hideButton(){this.buttonView.isVisible=!1}_showPanel(){if(!this.buttonView.isVisible)return;const e=this.panelView.isVisible;this.panelView.show();const t=this._getSelectedEditableElement();this.toolbarView.maxWidth=this._getToolbarMaxWidth(t),this.panelView.pin({target:this.buttonView.element,limiter:t}),e||this.toolbarView.items.get(0).focus()}_getSelectedEditableElement(){const e=this.editor.model.document.selection.getFirstRange().root.rootName;return this.editor.ui.getEditableElement(e)}_hidePanel(e){this.panelView.isVisible=!1,e&&this.editor.editing.view.focus()}_attachButtonToElement(e){const t=window.getComputedStyle(e),o=new s.rw(this._getSelectedEditableElement()),i=parseInt(t.paddingTop,10),n=parseInt(t.lineHeight,10)||1.2*parseInt(t.fontSize,10),r=new s.rw(this.buttonView.element),a=new s.rw(e);let c;c="ltr"===this.editor.locale.uiLanguageDirection?o.left-r.width:o.right;const l=a.top+i+(n-r.height)/2;r.moveTo(c,l);const d=r.toAbsoluteRect();this.buttonView.top=d.top,this.buttonView.left=d.left}_setupToolbarResize(){const e=this._getSelectedEditableElement();this._blockToolbarConfig.shouldNotGroupWhenFull||(this._resizeObserver&&this._resizeObserver.element!==e&&(this._resizeObserver.destroy(),this._resizeObserver=null),this._resizeObserver||(this._resizeObserver=new s.tb(e,(()=>{this.toolbarView.maxWidth=this._getToolbarMaxWidth(e)}))))}_getToolbarMaxWidth(e){const t=new s.rw(e),o=new s.rw(this.buttonView.element),i="rtl"===this.editor.locale.uiLanguageDirection?o.left-t.right+o.width:t.left-o.left;return ri(t.width+i)}}var ci=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenubutton.css"),li={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(ci.A,li);ci.A.locals;class di extends q{arrowView;constructor(e){super(e);const t=this.bindTemplate;this.set({withText:!0,role:"menuitem"}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__button"],"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e))),"data-cke-tooltip-disabled":t.to("isOn")},on:{mouseenter:t.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new z;return e.content=Pe,e.extendTemplate({attributes:{class:"ck-menu-bar__menu__button__arrow"}}),e}}var hi=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenulistitem.css"),ui={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(hi.A,ui);hi.A.locals;class pi extends wt{constructor(e,t){super(e);const o=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item"]},on:{mouseenter:o.to("mouseenter")}}),this.delegate("mouseenter").to(t)}}var mi=o("./node_modules/lodash-es/cloneDeep.js");const fi={toggleMenusAndFocusItemsOnHover(e){e.on("menu:mouseenter",(t=>{if(e.isOpen){for(const o of e.menus){const e=t.path[0],s=e instanceof pi&&e.children.first===o;o.isOpen=(t.path.includes(o)||s)&&o.isEnabled}t.source.focus()}}))},focusCycleMenusOnArrows(e){const t="rtl"===e.locale.uiLanguageDirection;function o(t,o){const s=e.children.getIndex(t),i=t.isOpen,n=e.children.length,r=e.children.get((s+n+o)%n);t.isOpen=!1,i&&(r.isOpen=!0),r.buttonView.focus()}e.on("menu:arrowright",(e=>{o(e.source,t?-1:1)})),e.on("menu:arrowleft",(e=>{o(e.source,t?1:-1)}))},closeMenusWhenTheBarCloses(e){e.on("change:isOpen",(()=>{e.isOpen||e.menus.forEach((e=>{e.isOpen=!1}))}))},closeMenuWhenAnotherOnTheSameLevelOpens(e){e.on("menu:change:isOpen",((t,o,s)=>{s&&e.menus.filter((e=>t.source.parentMenuView===e.parentMenuView&&t.source!==e&&e.isOpen)).forEach((e=>{e.isOpen=!1}))}))},closeOnClickOutside(e){R({emitter:e,activator:()=>e.isOpen,callback:()=>e.close(),contextElements:()=>e.children.map((e=>e.element))})}},gi={openAndFocusPanelOnArrowDownKey(e){e.keystrokes.set("arrowdown",((t,o)=>{e.focusTracker.focusedElement===e.buttonView.element&&(e.isOpen||(e.isOpen=!0),e.panelView.focus(),o())}))},openOnArrowRightKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowleft":"arrowright";e.keystrokes.set(t,((t,o)=>{e.focusTracker.focusedElement===e.buttonView.element&&e.isEnabled&&(e.isOpen||(e.isOpen=!0),e.panelView.focus(),o())}))},openOnButtonClick(e){e.buttonView.on("execute",(()=>{e.isOpen=!0,e.panelView.focus()}))},toggleOnButtonClick(e){e.buttonView.on("execute",(()=>{e.isOpen=!e.isOpen,e.isOpen&&e.panelView.focus()}))},closeOnArrowLeftKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowright":"arrowleft";e.keystrokes.set(t,((t,o)=>{e.isOpen&&(e.isOpen=!1,e.focus(),o())}))},closeOnEscKey(e){e.keystrokes.set("esc",((t,o)=>{e.isOpen&&(e.isOpen=!1,e.focus(),o())}))},closeOnParentClose(e){e.parentMenuView.on("change:isOpen",((t,o,s)=>{s||t.source!==e.parentMenuView||(e.isOpen=!1)}))}},_i={southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),eastSouth:e=>({top:e.top,left:e.right-5,name:"es"}),eastNorth:(e,t)=>({top:e.top-t.height,left:e.right-5,name:"en"}),westSouth:(e,t)=>({top:e.top,left:e.left-t.width+5,name:"ws"}),westNorth:(e,t)=>({top:e.top-t.height,left:e.left-t.width+5,name:"wn"})},bi=[{menuId:"file",label:"File",groups:[{groupId:"export",items:["menuBar:exportPdf","menuBar:exportWord"]},{groupId:"import",items:["menuBar:importWord"]},{groupId:"revisionHistory",items:["menuBar:revisionHistory"]}]},{menuId:"edit",label:"Edit",groups:[{groupId:"undo",items:["menuBar:undo","menuBar:redo"]},{groupId:"selectAll",items:["menuBar:selectAll"]},{groupId:"findAndReplace",items:["menuBar:findAndReplace"]}]},{menuId:"view",label:"View",groups:[{groupId:"sourceEditing",items:["menuBar:sourceEditing"]},{groupId:"showBlocks",items:["menuBar:showBlocks"]},{groupId:"restrictedEditingException",items:["menuBar:restrictedEditingException"]}]},{menuId:"insert",label:"Insert",groups:[{groupId:"insertMainWidgets",items:["menuBar:insertImage","menuBar:ckbox","menuBar:ckfinder","menuBar:insertTable"]},{groupId:"insertInline",items:["menuBar:link","menuBar:comment"]},{groupId:"insertMinorWidgets",items:["menuBar:mediaEmbed","menuBar:insertTemplate","menuBar:blockQuote","menuBar:codeBlock","menuBar:htmlEmbed"]},{groupId:"insertStructureWidgets",items:["menuBar:horizontalLine","menuBar:pageBreak","menuBar:tableOfContents"]},{groupId:"restrictedEditing",items:["menuBar:restrictedEditing"]}]},{menuId:"format",label:"Format",groups:[{groupId:"textAndFont",items:[{menuId:"text",label:"Text",groups:[{groupId:"basicStyles",items:["menuBar:bold","menuBar:italic","menuBar:underline","menuBar:strikethrough","menuBar:superscript","menuBar:subscript","menuBar:code"]},{groupId:"textPartLanguage",items:["menuBar:textPartLanguage"]}]},{menuId:"font",label:"Font",groups:[{groupId:"fontProperties",items:["menuBar:fontSize","menuBar:fontFamily"]},{groupId:"fontColors",items:["menuBar:fontColor","menuBar:fontBackgroundColor"]},{groupId:"highlight",items:["menuBar:highlight"]}]},"menuBar:heading"]},{groupId:"list",items:["menuBar:bulletedList","menuBar:numberedList","menuBar:multiLevelList","menuBar:todoList"]},{groupId:"indent",items:["menuBar:alignment","menuBar:indent","menuBar:outdent"]},{groupId:"caseChange",items:["menuBar:caseChange"]},{groupId:"removeFormat",items:["menuBar:removeFormat"]}]},{menuId:"tools",label:"Tools",groups:[{groupId:"aiTools",items:["menuBar:aiAssistant","menuBar:aiCommands"]},{groupId:"tools",items:["menuBar:trackChanges","menuBar:commentsArchive"]}]},{menuId:"help",label:"Help",groups:[{groupId:"help",items:["menuBar:accessibilityHelp"]}]}];function ki(e){let t;return t="items"in e&&e.items?{items:e.items,removeItems:[],addItems:[],isVisible:!0,isUsingDefaultConfig:!1,...e}:{items:(0,mi.A)(bi),addItems:[],removeItems:[],isVisible:!0,isUsingDefaultConfig:!0,...e},t}function wi({normalizedConfig:e,locale:t,componentFactory:o}){const i=(0,mi.A)(e);return function(e,t){const o=t.removeItems,i=[];t.items=t.items.filter((({menuId:e})=>!o.includes(e)||(i.push(e),!1))),Ai(t.items,(e=>{e.groups=e.groups.filter((({groupId:e})=>!o.includes(e)||(i.push(e),!1)));for(const t of e.groups)t.items=t.items.filter((e=>{const t=Si(e);return!o.includes(t)||(i.push(t),!1)}))}));for(const t of o)i.includes(t)||(0,s.FF)("menu-bar-item-could-not-be-removed",{menuBarConfig:e,itemName:t})}(e,i),function(e,t){const o=t.addItems,i=[];for(const e of o){const o=Ei(e.position),s=Pi(e.position);if(Ci(e))if(s){const n=t.items.findIndex((e=>e.menuId===s));if(-1!=n)"before"===o?(t.items.splice(n,0,e.menu),i.push(e)):"after"===o&&(t.items.splice(n+1,0,e.menu),i.push(e));else{vi(t,e.menu,s,o)&&i.push(e)}}else"start"===o?(t.items.unshift(e.menu),i.push(e)):"end"===o&&(t.items.push(e.menu),i.push(e));else if(Ti(e))Ai(t.items,(t=>{if(t.menuId===s)"start"===o?(t.groups.unshift(e.group),i.push(e)):"end"===o&&(t.groups.push(e.group),i.push(e));else{const n=t.groups.findIndex((e=>e.groupId===s));-1!==n&&("before"===o?(t.groups.splice(n,0,e.group),i.push(e)):"after"===o&&(t.groups.splice(n+1,0,e.group),i.push(e)))}}));else{vi(t,e.item,s,o)&&i.push(e)}}for(const t of o)i.includes(t)||(0,s.FF)("menu-bar-item-could-not-be-added",{menuBarConfig:e,addedItemConfig:t})}(e,i),function(e,t,o){Ai(t.items,(i=>{for(const n of i.groups)n.items=n.items.filter((n=>{const r="string"==typeof n&&!o.has(n);return r&&!t.isUsingDefaultConfig&&(0,s.FF)("menu-bar-item-unavailable",{menuBarConfig:e,parentMenuConfig:(0,mi.A)(i),componentName:n}),!r}))}))}(e,i,o),yi(e,i),function(e,t){const o=t.t,s={File:o({string:"File",id:"MENU_BAR_MENU_FILE"}),Edit:o({string:"Edit",id:"MENU_BAR_MENU_EDIT"}),View:o({string:"View",id:"MENU_BAR_MENU_VIEW"}),Insert:o({string:"Insert",id:"MENU_BAR_MENU_INSERT"}),Format:o({string:"Format",id:"MENU_BAR_MENU_FORMAT"}),Tools:o({string:"Tools",id:"MENU_BAR_MENU_TOOLS"}),Help:o({string:"Help",id:"MENU_BAR_MENU_HELP"}),Text:o({string:"Text",id:"MENU_BAR_MENU_TEXT"}),Font:o({string:"Font",id:"MENU_BAR_MENU_FONT"})};Ai(e.items,(e=>{e.label in s&&(e.label=s[e.label])}))}(i,t),i}function vi(e,t,o,s){let i=!1;return Ai(e.items,(e=>{for(const{groupId:n,items:r}of e.groups){if(i)return;if(n===o)"start"===s?(r.unshift(t),i=!0):"end"===s&&(r.push(t),i=!0);else{const e=r.findIndex((e=>Si(e)===o));-1!==e&&("before"===s?(r.splice(e,0,t),i=!0):"after"===s&&(r.splice(e+1,0,t),i=!0))}}})),i}function yi(e,t){const o=t.isUsingDefaultConfig;let s=!1;t.items=t.items.filter((t=>!!t.groups.length||(xi(e,t,o),!1))),t.items.length?(Ai(t.items,(t=>{t.groups=t.groups.filter((e=>!!e.items.length||(s=!0,!1)));for(const i of t.groups)i.items=i.items.filter((t=>!(Mi(t)&&!t.groups.length)||(xi(e,t,o),s=!0,!1)))})),s&&yi(e,t)):xi(e,e,o)}function xi(e,t,o){o||(0,s.FF)("menu-bar-menu-empty",{menuBarConfig:e,emptyMenuConfig:t})}function Ai(e,t){if(Array.isArray(e))for(const t of e)o(t);function o(e){t(e);for(const t of e.groups)for(const e of t.items)Mi(e)&&o(e)}}function Ci(e){return"object"==typeof e&&"menu"in e}function Ti(e){return"object"==typeof e&&"group"in e}function Ei(e){return e.startsWith("start")?"start":e.startsWith("end")?"end":e.startsWith("after")?"after":"before"}function Pi(e){const t=e.match(/^[^:]+:(.+)/);return t?t[1]:null}function Si(e){return"string"==typeof e?e:e.menuId}function Mi(e){return"object"==typeof e&&"menuId"in e}function Oi(e,t){const o=t.element;e.ui.focusTracker.add(o),e.keystrokes.listenTo(o);const s=ki(e.config.get("menuBar")||{});t.fillFromConfig(s,e.ui.componentFactory),e.keystrokes.set("Esc",((t,s)=>{o.contains(e.ui.focusTracker.focusedElement)&&(e.editing.view.focus(),s())})),e.keystrokes.set("Alt+F9",((s,i)=>{o.contains(e.ui.focusTracker.focusedElement)||(t.focus(),i())}))}var Vi=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenupanel.css"),Ri={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Vi.A,Ri);Vi.A.locals;class ji extends V{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-menu-bar__menu__panel",t.to("position",(e=>`ck-menu-bar__menu__panel_position_${e}`)),t.if("isVisible","ck-hidden",(e=>!e))],tabindex:"-1"},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(e=1){this.children.length&&(1===e?this.children.first.focus():this.children.last.focus())}}var Ii=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenu.css"),Bi={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ii.A,Bi);Ii.A.locals;class Di extends V{buttonView;panelView;focusTracker;keystrokes;constructor(e){super(e);const t=this.bindTemplate;this.buttonView=new di(e),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.panelView=new ji(e),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new s.EP,this.focusTracker=new s.$x,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("panelPosition","w"),this.set("class",void 0),this.set("parentMenuView",null),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar__menu",t.to("class"),t.if("isEnabled","ck-disabled",(e=>!e)),t.if("parentMenuView","ck-menu-bar__menu_top-level",(e=>!e))]},children:[this.buttonView,this.panelView]})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.keystrokes.listenTo(this.element),gi.closeOnEscKey(this),this._repositionPanelOnOpen()}_attachBehaviors(){this.parentMenuView?(gi.openOnButtonClick(this),gi.openOnArrowRightKey(this),gi.closeOnArrowLeftKey(this),gi.closeOnParentClose(this)):(this._propagateArrowKeystrokeEvents(),gi.openAndFocusPanelOnArrowDownKey(this),gi.toggleOnButtonClick(this))}_propagateArrowKeystrokeEvents(){this.keystrokes.set("arrowright",((e,t)=>{this.fire("arrowright"),t()})),this.keystrokes.set("arrowleft",((e,t)=>{this.fire("arrowleft"),t()}))}_repositionPanelOnOpen(){this.on("change:isOpen",((e,t,o)=>{if(!o)return;const s=Di._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=s?s.name:this._panelPositions[0].name}))}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:t,northEast:o,northWest:s,westSouth:i,eastSouth:n,westNorth:r,eastNorth:a}=_i;return"ltr"===this.locale.uiLanguageDirection?this.parentMenuView?[n,a,i,r]:[e,t,o,s]:this.parentMenuView?[i,r,n,a]:[t,e,s,o]}static _getOptimalPosition=s.W}class Ni extends Ct{constructor(e){super(e),this.role="menu"}}class Fi extends Te{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}var Li=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubar.css"),zi={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Li.A,zi);Li.A.locals;const Hi=["mouseenter","arrowleft","arrowright","change:isOpen"];class $i extends V{children;menus=[];constructor(e){super(e);const t=e.t;this.set("isOpen",!1),this._setupIsOpenUpdater(),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar"],"aria-label":t("Editor menu bar"),role:"menubar"},children:this.children})}fillFromConfig(e,t){const o=wi({normalizedConfig:e,locale:this.locale,componentFactory:t}).items.map((e=>this._createMenu({componentFactory:t,menuDefinition:e})));this.children.addMany(o)}render(){super.render(),fi.toggleMenusAndFocusItemsOnHover(this),fi.closeMenusWhenTheBarCloses(this),fi.closeMenuWhenAnotherOnTheSameLevelOpens(this),fi.focusCycleMenusOnArrows(this),fi.closeOnClickOutside(this)}focus(){this.children.first&&this.children.first.focus()}close(){for(const e of this.children)e.isOpen=!1}registerMenu(e,t=null){t?(e.delegate(...Hi).to(t),e.parentMenuView=t):e.delegate(...Hi).to(this,(e=>"menu:"+e)),e._attachBehaviors(),this.menus.push(e)}_createMenu({componentFactory:e,menuDefinition:t,parentMenuView:o}){const s=this.locale,i=new Di(s);return this.registerMenu(i,o),i.buttonView.set({label:t.label}),i.once("change:isOpen",(()=>{const o=new Ni(s);o.ariaLabel=t.label,i.panelView.children.add(o),o.items.addMany(this._createMenuItems({menuDefinition:t,parentMenuView:i,componentFactory:e}))})),i}_createMenuItems({menuDefinition:e,parentMenuView:t,componentFactory:o}){const s=this.locale,i=[];for(const n of e.groups){for(const e of n.items){const n=new pi(s,t);if((0,r.A)(e))n.children.add(this._createMenu({componentFactory:o,menuDefinition:e,parentMenuView:t}));else{const s=this._createMenuItemContentFromFactory({componentName:e,componentFactory:o,parentMenuView:t});if(!s)continue;n.children.add(s)}i.push(n)}n!==e.groups[e.groups.length-1]&&i.push(new vt(s))}return i}_createMenuItemContentFromFactory({componentName:e,parentMenuView:t,componentFactory:o}){const i=o.create(e);return i instanceof Di||i instanceof ue||i instanceof Fi?(this._registerMenuTree(i,t),i.on("execute",(()=>{this.close()})),i):((0,s.FF)("menu-bar-component-unsupported",{componentName:e,componentView:i}),null)}_registerMenuTree(e,t){if(!(e instanceof Di))return void e.delegate("mouseenter").to(t);this.registerMenu(e,t);const o=e.panelView.children.filter((e=>e instanceof Ni))[0];if(!o)return void e.delegate("mouseenter").to(t);const s=o.items.filter((e=>e instanceof wt));for(const t of s)this._registerMenuTree(t.children.get(0),e)}_setupIsOpenUpdater(){let e;this.on("menu:change:isOpen",((t,o,s)=>{clearTimeout(e),s?this.isOpen=!0:e=setTimeout((()=>{this.isOpen=Array.from(this.children).some((e=>e.isOpen))}),0)}))}}},"./packages/ckeditor5-utils/src/index.ts":(e,t,o)=>{"use strict";let s;o.d(t,{Yb:()=>S,pM:()=>Ot,TS:()=>ve,c5:()=>Ee,PZ:()=>ce,Mm:()=>z,vY:()=>x,$x:()=>Rt,EP:()=>jt,hT:()=>Mt,VM:()=>oe,rw:()=>Ne,tb:()=>$e,KL:()=>le,ww:()=>he,U9:()=>de,n:()=>_e,cb:()=>zt,Ui:()=>k,q8:()=>w,_K:()=>a,Nv:()=>Nt,Mr:()=>g,j3:()=>Me,$1:()=>Vt,DS:()=>Oe,Md:()=>Re,QC:()=>bt,pG:()=>Ve,YA:()=>wt,iJ:()=>Tt,Kf:()=>yt,W:()=>Xe,Sf:()=>i,qh:()=>Ue,PT:()=>Ke,Yy:()=>E,Yt:()=>vt,mY:()=>$t,Cn:()=>Ye,HK:()=>xt,kv:()=>Wt,Iw:()=>Kt,SQ:()=>Gt,P5:()=>Ut,xZ:()=>ue,k$:()=>qt,Ll:()=>Ae,_Z:()=>Ie,KH:()=>je,i8:()=>Ge,zN:()=>Ze,uP:()=>gt,vV:()=>O,FF:()=>M,jh:()=>v,ZX:()=>kt,vx:()=>T,kM:()=>B,TF:()=>tt,L5:()=>Dt,bi:()=>st,vK:()=>ot,C_:()=>We,eL:()=>Lt,$r:()=>Et,av:()=>It,To:()=>qe,Ld:()=>C,rQ:()=>Ht,rE:()=>I,uk:()=>Bt});try{s={window,document}}catch(e){s={window:{},document:{}}}const i=s;function n(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}const r=n(),a={isMac:c(r),isWindows:l(r),isGecko:d(r),isSafari:h(r),isiOS:u(r),isAndroid:p(r),isBlink:m(r),get isMediaForcedColors(){return!!i.window.matchMedia&&i.window.matchMedia("(forced-colors: active)").matches},get isMotionReduced(){return!!i.window.matchMedia&&i.window.matchMedia("(prefers-reduced-motion)").matches},features:{isRegExpUnicodePropertySupported:f()}};function c(e){return e.indexOf("macintosh")>-1}function l(e){return e.indexOf("windows")>-1}function d(e){return!!e.match(/gecko\/\d+/)}function h(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}function u(e){return!!e.match(/iphone|ipad/i)||c(e)&&navigator.maxTouchPoints>0}function p(e){return e.indexOf("android")>-1}function m(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}function f(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}function g(e,t,o,s){o=o||function(e,t){return e===t};const i=Array.isArray(e)?e:Array.prototype.slice.call(e),n=Array.isArray(t)?t:Array.prototype.slice.call(t),r=function(e,t,o){const s=_(e,t,o);if(-1===s)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const i=b(e,s),n=b(t,s),r=_(i,n,o),a=e.length-r,c=t.length-r;return{firstIndex:s,lastIndexOld:a,lastIndexNew:c}}(i,n,o),a=s?function(e,t){const{firstIndex:o,lastIndexOld:s,lastIndexNew:i}=e;if(-1===o)return Array(t).fill("equal");let n=[];o>0&&(n=n.concat(Array(o).fill("equal")));i-o>0&&(n=n.concat(Array(i-o).fill("insert")));s-o>0&&(n=n.concat(Array(s-o).fill("delete")));i0&&o.push({index:s,type:"insert",values:e.slice(s,n)});i-s>0&&o.push({index:s+(n-s),type:"delete",howMany:i-s});return o}(n,r);return a}function _(e,t,o){for(let s=0;s200||i>200||s+i>300)return k.fastDiff(e,t,o,!0);let n,r;if(il?-1:1;d[s+u]&&(d[s]=d[s+u].slice(0)),d[s]||(d[s]=[]),d[s].push(i>l?n:r);let p=Math.max(i,l),m=p-s;for(;ml;p--)h[p]=u(p);h[l]=u(l),m++}while(h[l]!==c);return d[l].slice(1)}function w(e,t){const o=[];let s=0,i=null;return e.forEach((e=>{"equal"==e?(n(),s++):"insert"==e?(i&&"insert"==i.type?i.values.push(t[s]):(n(),i={type:"insert",index:s,values:[t[s]]}),s++):i&&"delete"==i.type?i.howMany++:(n(),i={type:"delete",index:s,howMany:1})})),n(),o;function n(){i&&(o.push(i),i=null)}}function v(e,...t){t.forEach((t=>{const o=Object.getOwnPropertyNames(t),s=Object.getOwnPropertySymbols(t);o.concat(s).forEach((o=>{if(o in e.prototype)return;if("function"==typeof t&&("length"==o||"name"==o||"prototype"==o))return;const s=Object.getOwnPropertyDescriptor(t,o);s.enumerable=!1,Object.defineProperty(e.prototype,o,s)}))}))}k.fastDiff=g;const y=function(){return function e(){e.called=!0}};class x{source;name;path;stop;off;return;constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=y(),this.off=y()}}const A=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function C(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0,s=4294967296*Math.random()>>>0;return"e"+A[255&e]+A[e>>8&255]+A[e>>16&255]+A[e>>24&255]+A[255&t]+A[t>>8&255]+A[t>>16&255]+A[t>>24&255]+A[255&o]+A[o>>8&255]+A[o>>16&255]+A[o>>24&255]+A[255&s]+A[s>>8&255]+A[s>>16&255]+A[s>>24&255]}const T={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function E(e,t){const o=T.get(t.priority);for(let s=0;s{if("object"==typeof t&&null!==t){if(o.has(t))return`[object ${t.constructor.name}]`;o.add(t)}return t},i=t?` ${JSON.stringify(t,s)}`:"",n=V(e);return e+i+n}(e,o)),this.name="CKEditorError",this.context=t,this.data=o}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const o=new S(e.message,t);throw o.stack=e.stack,o}}function M(e,t){console.warn(...R(e,t))}function O(e,t){console.error(...R(e,t))}function V(e){return`\nRead more: ${P}#error-${e}`}function R(e,t){const o=V(e);return t?[e,t,o]:[e,o]}const j="42.0.0",I=j,B=new Date(2024,5,26);if(globalThis.CKEDITOR_VERSION)throw new S("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=j;const D=Symbol("listeningTo"),N=Symbol("emitterId"),F=Symbol("delegations"),L=z(Object);function z(e){if(!e)return L;return class extends e{on(e,t,o){this.listenTo(this,e,t,o)}once(e,t,o){let s=!1;this.listenTo(this,e,((e,...o)=>{s||(s=!0,e.off(),t.call(this,e,...o))}),o)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,o,s={}){let i,n;this[D]||(this[D]={});const r=this[D];$(e)||H(e);const a=$(e);(i=r[a])||(i=r[a]={emitter:e,callbacks:{}}),(n=i.callbacks[t])||(n=i.callbacks[t]=[]),n.push(o),function(e,t,o,s,i){t._addEventListener?t._addEventListener(o,s,i):e._addEventListener.call(t,o,s,i)}(this,e,t,o,s)}stopListening(e,t,o){const s=this[D];let i=e&&$(e);const n=s&&i?s[i]:void 0,r=n&&t?n.callbacks[t]:void 0;if(!(!s||e&&!n||t&&!r))if(o){Y(this,e,t,o);-1!==r.indexOf(o)&&(1===r.length?delete n.callbacks[t]:Y(this,e,t,o))}else if(r){for(;o=r.pop();)Y(this,e,t,o);delete n.callbacks[t]}else if(n){for(t in n.callbacks)this.stopListening(e,t);delete s[i]}else{for(i in s)this.stopListening(s[i].emitter);delete this[D]}}fire(e,...t){try{const o=e instanceof x?e:new x(this,e),s=o.name;let i=U(this,s);if(o.path.push(this),i){const e=[o,...t];i=Array.from(i);for(let t=0;t{this[F]||(this[F]=new Map),e.forEach((e=>{const s=this[F].get(e);s?s.set(t,o):this[F].set(e,new Map([[t,o]]))}))}}}stopDelegating(e,t){if(this[F])if(e)if(t){const o=this[F].get(e);o&&o.delete(t)}else this[F].delete(e);else this[F].clear()}_addEventListener(e,t,o){!function(e,t){const o=W(e);if(o[t])return;let s=t,i=null;const n=[];for(;""!==s&&!o[s];)o[s]={callbacks:[],childEvents:[]},n.push(o[s]),i&&o[s].childEvents.push(i),i=s,s=s.substr(0,s.lastIndexOf(":"));if(""!==s){for(const e of n)e.callbacks=o[s].callbacks.slice();o[s].childEvents.push(i)}}(this,e);const s=q(this,e),i={callback:t,priority:T.get(o.priority)};for(const e of s)E(e,i)}_removeEventListener(e,t){const o=q(this,e);for(const e of o)for(let o=0;o-1?U(e,t.substr(0,t.lastIndexOf(":"))):null}function K(e,t,o){for(let[s,i]of e){i?"function"==typeof i&&(i=i(t.name)):i=t.name;const e=new x(t.source,i);e.path=[...t.path],s.fire(e,...o)}}function Y(e,t,o,s){t._removeEventListener?t._removeEventListener(o,s):e._removeEventListener.call(t,o,s)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{z[e]=L.prototype[e]}));var G=o("./node_modules/lodash-es/isObject.js");const Z=Symbol("observableProperties"),J=Symbol("boundObservables"),X=Symbol("boundProperties"),Q=Symbol("decoratedMethods"),ee=Symbol("decoratedOriginal"),te=oe(z());function oe(e){if(!e)return te;return class extends e{set(e,t){if((0,G.A)(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);se(this);const o=this[Z];if(e in this&&!o.has(e))throw new S("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>o.get(e),set(t){const s=o.get(e);let i=this.fire(`set:${e}`,e,t,s);void 0===i&&(i=t),s===i&&o.has(e)||(o.set(e,i),this.fire(`change:${e}`,e,i,s))}}),this[e]=t}bind(...e){if(!e.length||!re(e))throw new S("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new S("observable-bind-duplicate-properties",this);se(this);const t=this[X];e.forEach((e=>{if(t.has(e))throw new S("observable-bind-rebind",this)}));const o=new Map;return e.forEach((e=>{const s={property:e,to:[]};t.set(e,s),o.set(e,s)})),{to:ie,toMany:ne,_observable:this,_bindProperties:e,_to:[],_bindings:o}}unbind(...e){if(!this[Z])return;const t=this[X],o=this[J];if(e.length){if(!re(e))throw new S("observable-unbind-wrong-properties",this);e.forEach((e=>{const s=t.get(e);s&&(s.to.forEach((([e,t])=>{const i=o.get(e),n=i[t];n.delete(s),n.size||delete i[t],Object.keys(i).length||(o.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else o.forEach(((e,t)=>{this.stopListening(t,"change")})),o.clear(),t.clear()}decorate(e){se(this);const t=this[e];if(!t)throw new S("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,o)=>{e.return=t.apply(this,o)})),this[e]=function(...t){return this.fire(e,t)},this[e][ee]=t,this[Q]||(this[Q]=[]),this[Q].push(e)}stopListening(e,t,o){if(!e&&this[Q]){for(const e of this[Q])this[e]=this[e][ee];delete this[Q]}super.stopListening(e,t,o)}[Z];[Q];[X];[J]}}function se(e){e[Z]||(Object.defineProperty(e,Z,{value:new Map}),Object.defineProperty(e,J,{value:new Map}),Object.defineProperty(e,X,{value:new Map}))}function ie(...e){const t=function(...e){if(!e.length)throw new S("observable-bind-to-parse-error",null);const t={to:[]};let o;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)o.properties.push(e);else{if("object"!=typeof e)throw new S("observable-bind-to-parse-error",null);o={observable:e,properties:[]},t.to.push(o)}})),t}(...e),o=Array.from(this._bindings.keys()),s=o.length;if(!t.callback&&t.to.length>1)throw new S("observable-bind-to-no-callback",this);if(s>1&&t.callback)throw new S("observable-bind-to-extra-callback",this);var i;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==s)throw new S("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(o[0]).callback=t.callback),i=this._observable,this._to.forEach((e=>{const t=i[J];let o;t.get(e.observable)||i.listenTo(e.observable,"change",((s,n)=>{o=t.get(e.observable)[n],o&&o.forEach((e=>{ae(i,e.property)}))}))})),function(e){let t;e._bindings.forEach(((o,s)=>{e._to.forEach((i=>{t=i.properties[o.callback?0:e._bindProperties.indexOf(s)],o.to.push([i.observable,t]),function(e,t,o,s){const i=e[J],n=i.get(o),r=n||{};r[s]||(r[s]=new Set);r[s].add(t),n||i.set(o,r)}(e._observable,o,i.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{ae(this._observable,e)}))}function ne(e,t,o){if(this._bindings.size>1)throw new S("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const o=e.map((e=>[e,t]));return Array.prototype.concat.apply([],o)}(e,t),o)}function re(e){return e.every((e=>"string"==typeof e))}function ae(e,t){const o=e[X].get(t);let s;o.callback?s=o.callback.apply(e,o.to.map((e=>e[0][e[1]]))):(s=o.to[0],s=s[0][s[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=s:e.set(t,s)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{oe[e]=te.prototype[e]}));class ce{_replacedElements;constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach((({element:e,newElement:t})=>{e.style.display="",t&&t.remove()})),this._replacedElements=[]}}function le(e){let t=new AbortController;function o(...o){return t.abort(),t=new AbortController,e(t.signal,...o)}return o.abort=()=>t.abort(),o}function de(e){let t=0;for(const o of e)t++;return t}function he(e,t){const o=Math.min(e.length,t.length);for(let s=0;s{this._setToTarget(e,s,t[s],o)}))}}function ye(e){return(0,ke.A)(e,xe)}function xe(e){return(0,we.A)(e)||"function"==typeof e?e:void 0}function Ae(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function Ce(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const Te=Ee(z());function Ee(e){if(!e)return Te;return class extends e{listenTo(e,t,o,s={}){if(Ae(e)||Ce(e)){const i={capture:!!s.useCapture,passive:!!s.usePassive},n=this._getProxyEmitter(e,i)||new Pe(e,i);this.listenTo(n,t,o,s)}else super.listenTo(e,t,o,s)}stopListening(e,t,o){if(Ae(e)||Ce(e)){const s=this._getAllProxyEmitters(e);for(const e of s)this.stopListening(e,t,o)}else super.stopListening(e,t,o)}_getProxyEmitter(e,t){return function(e,t){const o=e[D];return o&&o[t]?o[t].emitter:null}(this,Se(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{Ee[e]=Te.prototype[e]}));class Pe extends(z()){_domNode;_options;constructor(e,t){super(),H(this,Se(e,t)),this._domNode=e,this._options=t}_domListeners;attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,o){this.attach(e),z().prototype._addEventListener.call(this,e,t,o)}_removeEventListener(e,t){z().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function Se(e,t){let o=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=C())}(e);for(const e of Object.keys(t).sort())t[e]&&(o+="-"+e);return o}function Me(e){let t=e.parentElement;if(!t)return null;for(;"BODY"!=t.tagName;){const e=t.style.overflowY||i.window.getComputedStyle(t).overflowY;if("auto"===e||"scroll"===e)break;if(t=t.parentElement,!t)return null}return t}function Oe(e){const t=[];let o=e;for(;o&&o.nodeType!=Node.DOCUMENT_NODE;)t.unshift(o),o=o.parentNode;return t}function Ve(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function Re(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function je(e){return"[object Text]"==Object.prototype.toString.call(e)}function Ie(e){return"[object Range]"==Object.prototype.toString.apply(e)}function Be(e){return e&&e.parentNode?e.offsetParent===i.document.body?null:e.offsetParent:null}const De=["top","right","bottom","left","width","height"];class Ne{top;right;bottom;left;width;height;_source;constructor(e){const t=Ie(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),ze(e)||t)if(t){const t=Ne.getDomRangeRects(e);Fe(this,Ne.getBoundingRect(t))}else Fe(this,e.getBoundingClientRect());else if(Ce(e)){const{innerWidth:t,innerHeight:o}=e;Fe(this,{top:0,right:t,bottom:o,left:0,width:t,height:o})}else Fe(this,e)}clone(){return new Ne(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};if(t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0)return null;{const e=new Ne(t);return e._source=this._source,e}}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(Le(e))return t;let o,s=e,i=e.parentNode||e.commonAncestorContainer;for(;i&&!Le(i);){const e="visible"===((n=i)instanceof HTMLElement?n.ownerDocument.defaultView.getComputedStyle(n).overflow:"visible");s instanceof HTMLElement&&"absolute"===He(s)&&(o=s);const r=He(i);if(e||o&&("relative"===r&&e||"relative"!==r)){s=i,i=i.parentNode;continue}const a=new Ne(i),c=t.getIntersection(a);if(!c)return null;c.getArea(){for(const t of e){const e=$e._getElementCallbacks(t.target);if(e)for(const o of e)o(t)}}))}}function We(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function qe(e){return t=>t+e}function Ue(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Ke(e,t,o){e.insertBefore(o,e.childNodes[t]||null)}function Ye(e){return e&&e.nodeType===Node.COMMENT_NODE}function Ge(e){try{i.document.createAttribute(e)}catch(e){return!1}return!0}function Ze(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}var Je=o("./node_modules/lodash-es/isFunction.js");function Xe({element:e,target:t,positions:o,limiter:s,fitInViewport:n,viewportOffsetConfig:r}){(0,Je.A)(t)&&(t=t()),(0,Je.A)(s)&&(s=s());const a=Be(e),c=function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new Ne(i.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(r),l=new Ne(e),d=Qe(t,c);let h;if(!d||!c.getIntersection(d))return null;const u={targetRect:d,elementRect:l,positionedElementAncestor:a,viewportRect:c};if(s||n){if(s){const e=Qe(s,c);e&&(u.limiterRect=e)}h=function(e,t){const{elementRect:o}=t,s=o.getArea(),i=e.map((e=>new et(e,t))).filter((e=>!!e.name));let n=0,r=null;for(const e of i){const{limiterIntersectionArea:t,viewportIntersectionArea:o}=e;if(t===s)return e;const i=o**2+t**2;i>n&&(n=i,r=e)}return r}(o,u)}else h=new et(o[0],u);return h}function Qe(e,t){const o=new Ne(e).getVisible();return o?o.getIntersection(t):null}class et{name;config;_positioningFunctionCoordinates;_options;_cachedRect;_cachedAbsoluteRect;constructor(e,t){const o=e(t.targetRect,t.elementRect,t.viewportRect,t.limiterRect);if(!o)return;const{left:s,top:i,name:n,config:r}=o;this.name=n,this.config=r,this._positioningFunctionCoordinates={left:s,top:i},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;return e?e.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=this._rect.toAbsoluteRect()),this._cachedAbsoluteRect}}function tt(e){const t=e.parentNode;t&&t.removeChild(e)}function ot({target:e,viewportOffset:t=0,ancestorOffset:o=0,alignToTop:s,forceScroll:i}){const n=dt(e);let r=n,a=null;for(t=function(e){if("number"==typeof e)return{top:e,bottom:e,left:e,right:e};return e}(t);r;){let c;c=ht(r==n?e:a),nt({parent:c,getRect:()=>ut(e,r),alignToTop:s,ancestorOffset:o,forceScroll:i});const l=ut(e,r);if(it({window:r,rect:l,viewportOffset:t,alignToTop:s,forceScroll:i}),r.parent!=r){if(a=r.frameElement,r=r.parent,!a)return}else r=null}}function st(e,t,o){nt({parent:ht(e),getRect:()=>new Ne(e),ancestorOffset:t,limiterElement:o})}function it({window:e,rect:t,alignToTop:o,forceScroll:s,viewportOffset:i}){const n=t.clone().moveBy(0,i.bottom),r=t.clone().moveBy(0,-i.top),a=new Ne(e).excludeScrollbarsAndBorders(),c=o&&s,l=[r,n].every((e=>a.contains(e)));let{scrollX:d,scrollY:h}=e;const u=d,p=h;c?h-=a.top-t.top+i.top:l||(at(r,a)?h-=a.top-t.top+i.top:rt(n,a)&&(h+=o?t.top-a.top-i.top:t.bottom-a.bottom+i.bottom)),l||(ct(t,a)?d-=a.left-t.left+i.left:lt(t,a)&&(d+=t.right-a.right+i.right)),d==u&&h===p||e.scrollTo(d,h)}function nt({parent:e,getRect:t,alignToTop:o,forceScroll:s,ancestorOffset:i=0,limiterElement:n}){const r=dt(e),a=o&&s;let c,l,d;const h=n||r.document.body;for(;e!=h;)l=t(),c=new Ne(e).excludeScrollbarsAndBorders(),d=c.contains(l),a?e.scrollTop-=c.top-l.top+i:d||(at(l,c)?e.scrollTop-=c.top-l.top+i:rt(l,c)&&(e.scrollTop+=o?l.top-c.top-i:l.bottom-c.bottom+i)),d||(ct(l,c)?e.scrollLeft-=c.left-l.left+i:lt(l,c)&&(e.scrollLeft+=l.right-c.right+i)),e=e.parentNode}function rt(e,t){return e.bottom>t.bottom}function at(e,t){return e.topt.right}function dt(e){return Ie(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function ht(e){if(Ie(e)){let t=e.commonAncestorContainer;return je(t)&&(t=t.parentNode),t}return e.parentNode}function ut(e,t){const o=dt(e),s=new Ne(e);if(o===t)return s;{let e=o;for(;e!=t;){const t=e.frameElement,o=new Ne(t).excludeScrollbarsAndBorders();s.moveBy(o.left,o.top),e=e.parent}}return s}const pt={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},mt={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},ft={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},gt=At(),_t=Object.fromEntries(Object.entries(gt).map((([e,t])=>{let o;return o=t in ft?ft[t]:e.charAt(0).toUpperCase()+e.slice(1),[t,o]})));function bt(e){let t;if("string"==typeof e){if(t=gt[e.toLowerCase()],!t)throw new S("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?gt.alt:0)+(e.ctrlKey?gt.ctrl:0)+(e.shiftKey?gt.shift:0)+(e.metaKey?gt.cmd:0);return t}function kt(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return bt(e.slice(0,-1));const t=bt(e);return(a.isMac||a.isiOS)&&t==gt.ctrl?gt.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function wt(e){let t=kt(e);return Object.entries(a.isMac||a.isiOS?pt:mt).reduce(((e,[o,s])=>(t>[o]&&(t&=~gt[o],e+=s),e)),"")+(t?_t[t]:"")}function vt(e){return e==gt.arrowright||e==gt.arrowleft||e==gt.arrowup||e==gt.arrowdown}function yt(e,t){const o="ltr"===t;switch(e){case gt.arrowleft:return o?"left":"right";case gt.arrowright:return o?"right":"left";case gt.arrowup:return"up";case gt.arrowdown:return"down"}}function xt(e,t){const o=yt(e,t);return"down"===o||"right"===o}function At(){const e={pageup:33,pagedown:34,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){e[String.fromCharCode(t).toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;return Object.assign(e,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),e}const Ct=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig"];function Tt(e){return Ct.includes(e)?"rtl":"ltr"}function Et(e){return Array.isArray(e)?e:[e]}var Pt=o("./node_modules/lodash-es/merge.js");function St(e,t,o=1,s){if("number"!=typeof o)throw new S("translation-service-quantity-not-a-number",null,{quantity:o});const n=s||i.window.CKEDITOR_TRANSLATIONS,r=function(e){return Object.keys(e).length}(n);1===r&&(e=Object.keys(n)[0]);const a=t.id||t.string;if(0===r||!function(e,t,o){return!!o[e]&&!!o[e].dictionary[t]}(e,a,n))return 1!==o?t.plural:t.string;const c=n[e].dictionary,l=n[e].getPluralForm||(e=>1===e?0:1),d=c[a];if("string"==typeof d)return d;return d[Number(l(o))]}i.window.CKEDITOR_TRANSLATIONS||(i.window.CKEDITOR_TRANSLATIONS={});class Mt{uiLanguage;uiLanguageDirection;contentLanguage;contentLanguageDirection;t;translations;constructor({uiLanguage:e="en",contentLanguage:t,translations:o}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=Tt(this.uiLanguage),this.contentLanguageDirection=Tt(this.contentLanguage),this.translations=function(e){return Array.isArray(e)?e.reduce(((e,t)=>(0,Pt.A)(e,t))):e}(o),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=Et(t),"string"==typeof e&&(e={string:e});const o=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,o)=>othis._items.length||t<0)throw new S("collection-add-item-invalid-index",this);let o=0;for(const s of e){const e=this._getItemIdBeforeAdding(s),i=t+o;this._items.splice(i,0,s),this._itemMap.set(e,s),this.fire("add",s,i),o++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new S("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,o]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:o}),t}map(e,t){return this._items.map(e,t)}forEach(e,t){this._items.forEach(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new S("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,o=(o,s,i)=>{const n=t._bindToCollection==this,r=t._bindToInternalToExternalMap.get(s);if(n&&r)this._bindToExternalToInternalMap.set(s,r),this._bindToInternalToExternalMap.set(r,s);else{const o=e(s);if(!o)return void this._skippedIndexesFromExternal.push(i);let n=i;for(const e of this._skippedIndexesFromExternal)i>e&&n--;for(const e of t._skippedIndexesFromExternal)n>=e&&n++;this._bindToExternalToInternalMap.set(s,o),this._bindToInternalToExternalMap.set(o,s),this.add(o,n);for(let e=0;e{const s=this._bindToExternalToInternalMap.get(t);s&&this.remove(s),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(ot&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let o;if(t in e){if(o=e[t],"string"!=typeof o)throw new S("collection-add-invalid-id",this);if(this.get(o))throw new S("collection-add-item-already-exists",this)}else e[t]=o=C();return o}_remove(e){let t,o,s,i=!1;const n=this._idProperty;if("string"==typeof e?(o=e,s=this._itemMap.get(o),i=!s,s&&(t=this._items.indexOf(s))):"number"==typeof e?(t=e,s=this._items[t],i=!s,s&&(o=s[n])):(s=e,o=s[n],t=this._items.indexOf(s),i=-1==t||!this._itemMap.get(o)),i)throw new S("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(o);const r=this._bindToInternalToExternalMap.get(s);return this._bindToInternalToExternalMap.delete(s),this._bindToExternalToInternalMap.delete(r),this.fire("remove",s,t),[s,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function Vt(e){const t=e.next();return t.done?null:t.value}class Rt extends(Ee(oe())){_elements=new Set;_nextEventLoopTimeout=null;constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null)}add(e){if(this._elements.has(e))throw new S("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class jt{_listener;constructor(){this._listener=new(Ee())}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+bt(t),t)}))}set(e,t,o={}){const s=kt(e),i=o.priority;this._listener.listenTo(this._listener,"_keydown:"+s,((e,o)=>{t(o,(()=>{o.preventDefault(),o.stopPropagation(),e.stop()})),e.return=!0}),{priority:i})}press(e){return!!this._listener.fire("_keydown:"+bt(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function It(e){return ue(e)?new Map(e):function(e){const t=new Map;for(const o in e)t.set(o,e[o]);return t}(e)}function Bt(e,t={}){return new Promise(((o,s)=>{const i=t.signal||(new AbortController).signal;i.throwIfAborted();const n=setTimeout((function(){i.removeEventListener("abort",r),o()}),e);function r(){clearTimeout(n),s(i.reason)}i.addEventListener("abort",r,{once:!0})}))}async function Dt(e,t={}){const{maxAttempts:o=4,retryDelay:s=Nt(),signal:i=(new AbortController).signal}=t;i.throwIfAborted();for(let t=0;;t++){try{return await e()}catch(e){if(t+1>=o)throw e}await Bt(s(t),{signal:i})}}function Nt(e={}){const{delay:t=1e3,factor:o=2,maxDelay:s=1e4}=e;return e=>Math.min(o**e*t,s)}const Ft=1e4;function Lt(e,t,o,s){if(Math.max(t.length,e.length)>Ft)return e.slice(0,o).concat(t).concat(e.slice(o+s,e.length));{const i=Array.from(e);return i.splice(o,s,...t),i}}function zt(e,t){let o;function s(...i){s.cancel(),o=setTimeout((()=>e(...i)),t)}return s.cancel=()=>{clearTimeout(o)},s}function Ht(e){function t(e){return e.length>=40&&e.length<=255?"VALID":"INVALID"}if(!e)return"INVALID";let o="";try{o=atob(e)}catch(e){return"INVALID"}const s=o.split("-"),i=s[0],n=s[1];if(!n)return t(e);try{atob(n)}catch(o){try{if(atob(i),!atob(i).length)return t(e)}catch(o){return t(e)}}if(i.length<40||i.length>255)return"INVALID";let r="";try{atob(i),r=atob(n)}catch(e){return"INVALID"}if(8!==r.length)return"INVALID";const a=Number(r.substring(0,4)),c=Number(r.substring(4,6))-1,l=Number(r.substring(6,8)),d=new Date(a,c,l);return de.indexe.source)).join("|")+")";return new RegExp(`${e}|${t}(?:‍${t})*`,"ug")}},"./packages/ckeditor5-watchdog/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{Zd:()=>p,VJ:()=>d,Io:()=>s});class s{crashes=[];state="initializing";_crashNumberLimit;_now=Date.now;_minimumNonErrorTimePeriod;_boundErrorHandler;_listeners;constructor(e){if(this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const o=this._listeners[e]||[];for(const e of o)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const o=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:o}),o?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function i(e,t=new Set){const o=[e],s=new Set;let i=0;for(;o.length>i;){const e=o[i++];if(!s.has(e)&&n(e)&&!t.has(e))if(s.add(e),Symbol.iterator in e)try{for(const t of e)o.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&o.push(e[t])}return s}function n(e){const t=Object.prototype.toString.call(e),o=typeof e;return!("number"===o||"boolean"===o||"string"===o||"symbol"===o||"function"===o||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function r(e,t,o=new Set){if(e===t&&("object"==typeof(s=e)&&null!==s))return!0;var s;const n=i(e,o),r=i(t,o);for(const e of n)if(r.has(e))return!0;return!1}var a=o("./node_modules/lodash-es/throttle.js"),c=o("./node_modules/lodash-es/isElement.js"),l=o("./node_modules/lodash-es/cloneDeepWith.js");class d extends s{_editor=null;_lifecyclePromise=null;_throttledSave;_data;_lastDocumentVersion;_elementOrData;_initUsingData=!0;_editables={};_config;_excludedProps;constructor(e,t={}){super(t),this._throttledSave=(0,a.A)(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,o)=>e.create(t,o)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{const e={},t=[],o=this._config.rootsAttributes||{},s={};for(const[i,n]of Object.entries(this._data.roots))n.isLoaded?(e[i]="",s[i]=o[i]||{}):t.push(i);const i={...this._config,extraPlugins:this._config.extraPlugins||[],lazyRoots:t,rootsAttributes:s,_watchdogInitialData:this._data};return delete i.initialData,i.extraPlugins.push(h),this._initUsingData?this.create(e,i,i.context):(0,c.A)(this._elementOrData)?this.create(this._elementOrData,i,i.context):this.create(this._editables,i,i.context)})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,o){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then((()=>(super._startErrorHandling(),this._elementOrData=e,this._initUsingData="string"==typeof e||Object.keys(e).length>0&&"string"==typeof Object.values(e)[0],this._config=this._cloneEditorConfiguration(t)||{},this._config.context=o,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this.state="ready",this._fire("stateChange")})).finally((()=>{this._lifecyclePromise=null})),this._lifecyclePromise}destroy(){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))).finally((()=>{this._lifecyclePromise=null})),this._lifecyclePromise}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.cancel();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e=this._editor,t=e.model.document.roots.filter((e=>e.isAttached()&&"$graveyard"!=e.rootName)),{plugins:o}=e,s=o.has("CommentsRepository")&&o.get("CommentsRepository"),i=o.has("TrackChanges")&&o.get("TrackChanges"),n={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};t.forEach((e=>{n.roots[e.rootName]={content:JSON.stringify(Array.from(e.getChildren())),attributes:JSON.stringify(Array.from(e.getAttributes())),isLoaded:e._isLoaded}}));for(const t of e.model.markers)t._affectsData&&(n.markers[t.name]={rangeJSON:t.getRange().toJSON(),usingOperation:t._managedUsingOperations,affectsData:t._affectsData});return s&&(n.commentThreads=JSON.stringify(s.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),i&&(n.suggestions=JSON.stringify(i.getSuggestions({toJSON:!0,skipNotAttached:!0}))),n}_getEditables(){const e={};for(const t of this.editor.model.document.getRootNames()){const o=this.editor.ui.getEditableElement(t);o&&(e[t]=o)}return e}_isErrorComingFromThisItem(e){return r(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return(0,l.A)(e,((e,t)=>(0,c.A)(e)||"context"===t?e:void 0))}}class h{editor;_data;constructor(e){this.editor=e,this._data=e.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",(e=>{e.stop(),this.editor.model.enqueueChange({isUndoable:!1},(e=>{this._restoreCollaborationData(),this._restoreEditorData(e)})),this.editor.data.fire("ready")}),{priority:999})}_createNode(e,t){if("name"in t){const o=e.createElement(t.name,t.attributes);if(t.children)for(const s of t.children)o._appendChild(this._createNode(e,s));return o}return e.createText(t.data,t.attributes)}_restoreEditorData(e){const t=this.editor;Object.entries(this._data.roots).forEach((([o,{content:s,attributes:i}])=>{const n=JSON.parse(s),r=JSON.parse(i),a=t.model.document.getRoot(o);for(const[t,o]of r)e.setAttribute(t,o,a);for(const t of n){const o=this._createNode(e,t);e.insert(o,a,"end")}})),Object.entries(this._data.markers).forEach((([o,s])=>{const{document:i}=t.model,{rangeJSON:{start:n,end:r},...a}=s,c=i.getRoot(n.root),l=e.createPositionFromPath(c,n.path,n.stickiness),d=e.createPositionFromPath(c,r.path,r.stickiness),h=e.createRange(l,d);e.addMarker(o,{range:h,...a})}))}_restoreCollaborationData(){const e=JSON.parse(this._data.commentThreads),t=JSON.parse(this._data.suggestions);e.forEach((e=>{const t=this.editor.config.get("collaboration.channelId"),o=this.editor.plugins.get("CommentsRepository");if(o.hasCommentThread(e.threadId)){o.getCommentThread(e.threadId).remove()}o.addCommentThread({channelId:t,...e})})),t.forEach((e=>{const t=this.editor.plugins.get("TrackChangesEditing");if(t.hasSuggestion(e.id)){t.getSuggestion(e.id).attributes=e.attributes}else t.addSuggestionData(e)}))}}const u=Symbol("MainQueueId");class p extends s{_watchdogs=new Map;_watchdogConfig;_context=null;_contextProps=new Set;_actionQueues=new m;_contextConfig;_item;constructor(e,t={}){super(t),this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(u,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=f(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new d(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((o,{error:s,causesRestart:i})=>{this._fire("itemError",{itemId:e.id,error:s}),i&&this._actionQueues.enqueue(e.id,(()=>new Promise((o=>{const s=()=>{t.off("restart",s),this._fire("itemRestart",{itemId:e.id}),o()};t.on("restart",s)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=f(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue(u,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(u,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=i(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return r(this._context,e.context)}}class m{_onEmptyCallbacks=[];_queues=new Map;_activeActions=0;onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const o=e===u;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const s=(o?Promise.all(this._queues.values()):Promise.all([this._queues.get(u),this._queues.get(e)])).then(t),i=s.catch((()=>{}));return this._queues.set(e,i),s.finally((()=>{this._activeActions--,this._queues.get(e)===i&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function f(e){return Array.isArray(e)?e:[e]}},"./packages/ckeditor5-widget/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{iW:()=>m,w_:()=>f,x0:()=>q,VE:()=>se,oP:()=>K,oT:()=>F,Wu:()=>E,Hq:()=>P,iB:()=>A,p9:()=>y,p4:()=>g,_s:()=>w,je:()=>v,Ex:()=>_,YN:()=>x,$u:()=>C});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-engine/src/index.ts"),n=o("./packages/ckeditor5-typing/src/index.ts"),r=o("./packages/ckeditor5-utils/src/index.ts"),a=o("./packages/ckeditor5-ui/src/index.ts"),c=o("./packages/ckeditor5-enter/src/index.ts");class l extends((0,r.Mm)()){_stack=[];add(e,t){const o=this._stack,s=o[0];this._insertDescriptor(e);const i=o[0];s===i||d(s,i)||this.fire("change:top",{oldDescriptor:s,newDescriptor:i,writer:t})}remove(e,t){const o=this._stack,s=o[0];this._removeDescriptor(e);const i=o[0];s===i||d(s,i)||this.fire("change:top",{oldDescriptor:s,newDescriptor:i,writer:t})}_insertDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e.id));if(d(e,t[o]))return;o>-1&&t.splice(o,1);let s=0;for(;t[s]&&h(t[s],e);)s++;t.splice(s,0,e)}_removeDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e));o>-1&&t.splice(o,1)}}function d(e,t){return e&&t&&e.priority==t.priority&&u(e.classes)==u(t.classes)}function h(e,t){return e.priority>t.priority||!(e.priorityu(t.classes)}function u(e){return Array.isArray(e)?e.sort().join(","):e}const p='',m="ck-widget",f="ck-widget_selected";function g(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function _(e,t,o={}){if(!e.is("containerElement"))throw new r.Yb("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(m,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=T,t.setCustomProperty("widgetLabel",[],e),o.label&&v(e,o.label),o.hasSelectionHandle&&function(e,t){const o=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),o=new a.Ln;return o.set("content",p),o.render(),t.appendChild(o.element),t}));t.insert(t.createPositionAt(e,0),o),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),w(e,t),e}function b(e,t,o){if(t.classes&&o.addClass((0,r.$r)(t.classes),e),t.attributes)for(const s in t.attributes)o.setAttribute(s,t.attributes[s],e)}function k(e,t,o){if(t.classes&&o.removeClass((0,r.$r)(t.classes),e),t.attributes)for(const s in t.attributes)o.removeAttribute(s,e)}function w(e,t,o=b,s=k){const i=new l;i.on("change:top",((t,i)=>{i.oldDescriptor&&s(e,i.oldDescriptor,i.writer),i.newDescriptor&&o(e,i.newDescriptor,i.writer)}));t.setCustomProperty("addHighlight",((e,t,o)=>i.add(t,o)),e),t.setCustomProperty("removeHighlight",((e,t,o)=>i.remove(t,o)),e)}function v(e,t){e.getCustomProperty("widgetLabel").push(t)}function y(e){return e.getCustomProperty("widgetLabel").reduce(((e,t)=>"function"==typeof t?e?e+". "+t():t():e?e+". "+t:t),"")}function x(e,t,o={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),t.setAttribute("tabindex","-1",e),o.label&&t.setAttribute("aria-label",o.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",((o,s,i)=>{t.setAttribute("contenteditable",i?"false":"true",e)})),e.on("change:isFocused",((o,s,i)=>{i?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),w(e,t),e}function A(e,t){const o=e.getSelectedElement();if(o){const s=O(e);if(s)return t.createRange(t.createPositionAt(o,s))}return t.schema.findOptimalInsertionRange(e)}function C(e,t){return(o,s)=>{const{mapper:i,viewPosition:n}=s,r=i.findMappedViewAncestor(n);if(!t(r))return;const a=i.toModelElement(r);s.modelPosition=e.createPositionAt(a,n.isAtStart?"before":"after")}}function T(){return null}function E(e){const t=e=>{const{width:t,paddingLeft:o,paddingRight:s}=e.ownerDocument.defaultView.getComputedStyle(e);return parseFloat(t)-(parseFloat(o)||0)-(parseFloat(s)||0)},o=e.parentElement;if(!o)return 0;let s=t(o);let i=0,n=o;for(;isNaN(s);){if(n=n.parentElement,++i>5)return 0;s=t(n)}return s}function P(e,t=new r.rw(e)){const o=E(e);return o?t.width/o*100:0}const S="widget-type-around";function M(e,t,o){return!!e&&g(e)&&!o.isInline(t)}function O(e){return e.getAttribute(S)}var V=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),R=o.n(V),j=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css"),I={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()(j.A,I);j.A.locals;const B=["before","after"],D=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,N="ck-widget__type-around_disabled";class F extends s.k_{_currentFakeCaretModelElement=null;static get pluginName(){return"WidgetTypeAround"}static get requires(){return[c.x,n.ep]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((o,s,i)=>{t.change((e=>{for(const o of t.document.roots)i?e.removeClass(N,o):e.addClass(N,o)})),i||e.model.change((e=>{e.removeSelectionAttribute(S)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const o=this.editor,s=o.editing.view,i=o.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);o.execute("insertParagraph",{position:o.model.createPositionAt(e,t),attributes:i}),s.focus(),s.scrollToTheSelection()}_listenToIfEnabled(e,t,o,s){this.listenTo(e,t,((...e)=>{this.isEnabled&&o(...e)}),s)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=O(e);if(!t)return!1;const o=e.getSelectedElement();return this._insertParagraph(o,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,o=e.locale.t,s={before:o("Insert paragraph before block"),after:o("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,i,n)=>{const r=n.mapper.toViewElement(i.item);if(r&&M(r,i.item,t)){!function(e,t,o){const s=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const o=this.toDomElement(e);return function(e,t){for(const o of B){const s=new a.Bj({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${o}`],title:t[o],"aria-hidden":"true"},children:[e.ownerDocument.importNode(D,!0)]});e.appendChild(s.render())}}(o,t),function(e){const t=new a.Bj({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(o),o}));e.insert(e.createPositionAt(o,"end"),s)}(n.writer,s,r);r.getCustomProperty("widgetLabel").push((()=>this.isEnabled?o("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,o=t.document.selection,s=t.schema,i=e.editing.view;function n(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(i.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[g,"$text"],priority:"high"}),this._listenToIfEnabled(o,"change:range",((t,o)=>{o.directChange&&e.model.change((e=>{e.removeSelectionAttribute(S)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=o.getSelectedElement();if(t){if(M(e.editing.mapper.toViewElement(t),t,s))return}e.model.change((e=>{e.removeSelectionAttribute(S)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,o)=>{const i=o.writer;if(this._currentFakeCaretModelElement){const e=o.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(i.removeClass(B.map(n),e),this._currentFakeCaretModelElement=null)}const r=t.selection.getSelectedElement();if(!r)return;const a=o.mapper.toViewElement(r);if(!M(a,r,s))return;const c=O(t.selection);c&&(i.addClass(n(c),a),this._currentFakeCaretModelElement=r)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,o,s)=>{s||e.model.change((e=>{e.removeSelectionAttribute(S)}))}))}_handleArrowKeyPress(e,t){const o=this.editor,s=o.model,i=s.document.selection,n=s.schema,a=o.editing.view,c=t.keyCode,l=(0,r.HK)(c,o.locale.contentLanguageDirection),d=a.document.selection.getSelectedElement();let h;M(d,o.editing.mapper.toModelElement(d),n)?h=this._handleArrowKeyPressOnSelectedWidget(l):i.isCollapsed?h=this._handleArrowKeyPressWhenSelectionNextToAWidget(l):t.shiftKey||(h=this._handleArrowKeyPressWhenNonCollapsedSelection(l)),h&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,o=O(t.document.selection);return t.change((t=>{if(!o)return t.setSelectionAttribute(S,e?"after":"before"),!0;if(!(o===(e?"after":"before")))return t.removeSelectionAttribute(S),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,o=t.model,s=o.schema,i=t.plugins.get("Widget"),n=i._getObjectElementNextToSelection(e);return!!M(t.editing.mapper.toViewElement(n),n,s)&&(o.change((t=>{i._setSelectionOverElement(n),t.setSelectionAttribute(S,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,o=t.model,s=o.schema,i=t.editing.mapper,n=o.document.selection,r=e?n.getLastPosition().nodeBefore:n.getFirstPosition().nodeAfter;return!!M(i.toViewElement(r),r,s)&&(o.change((t=>{t.setSelection(r,"on"),t.setSelectionAttribute(S,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((o,s)=>{const i=s.domTarget.closest(".ck-widget__type-around__button");if(!i)return;const n=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(i),r=function(e,t){const o=e.closest(".ck-widget");return t.mapDomToView(o)}(i,t.domConverter),a=e.editing.mapper.toModelElement(r);this._insertParagraph(a,n),s.preventDefault(),o.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,o=e.editing.view;this._listenToIfEnabled(o.document,"enter",((o,s)=>{if("atTarget"!=o.eventPhase)return;const i=t.getSelectedElement(),n=e.editing.mapper.toViewElement(i),r=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:M(n,i,r)&&(this._insertParagraph(i,s.isSoft?"before":"after"),a=!0),a&&(s.preventDefault(),o.stop())}),{context:g})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",((t,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=e.selection)}),{priority:"high"}),r._K.isAndroid?this._listenToIfEnabled(e,"keydown",((e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(e,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,o=e.model,s=o.schema;this._listenToIfEnabled(t.document,"delete",((t,i)=>{if("atTarget"!=t.eventPhase)return;const n=O(o.document.selection);if(!n)return;const r=i.direction,a=o.document.selection.getSelectedElement(),c="forward"==r;if("before"===n===c)e.execute("delete",{selection:o.createSelection(a,"on")});else{const t=s.getNearestSelectionRange(o.createPositionAt(a,n),r);if(t)if(t.isCollapsed){const i=o.createSelection(t.start);if(o.modifySelection(i,{direction:r}),i.focus.isEqual(t.start)){const e=function(e,t){let o=t;for(const s of t.getAncestors({parentFirst:!0})){if(s.childCount>1||e.isLimit(s))break;o=s}return o}(s,t.start.parent);o.deleteContent(o.createSelection(e,"on"),{doNotAutoparagraph:!0})}else o.change((o=>{o.setSelection(t),e.execute(c?"deleteForward":"delete")}))}else o.change((o=>{o.setSelection(t),e.execute(c?"deleteForward":"delete")}))}i.preventDefault(),t.stop()}),{context:g})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,o=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[s,i])=>{if(i&&!i.is("documentSelection"))return;const n=O(o);return n?(e.stop(),t.change((e=>{const i=o.getSelectedElement(),r=t.createPositionAt(i,n),a=e.createSelection(r),c=t.insertContent(s,a);return e.setSelection(a),c}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,o)=>{const[,s,i={}]=o;if(s&&!s.is("documentSelection"))return;const n=O(t);n&&(i.findOptimalPosition=n,o[3]=i)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[o])=>{if(o&&!o.is("documentSelection"))return;O(t)&&e.stop()}),{priority:"high"})}}function L(e){const t=e.model;return(o,s)=>{const i=s.keyCode==r.uP.arrowup,n=s.keyCode==r.uP.arrowdown,a=s.shiftKey,c=t.document.selection;if(!i&&!n)return;const l=n;if(a&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(c,l))return;const d=function(e,t,o){const s=e.model;if(o){const e=t.isCollapsed?t.focus:t.getLastPosition(),o=z(s,e,"forward");if(!o)return null;const i=s.createRange(e,o),n=H(s.schema,i,"backward");return n?s.createRange(e,n):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),o=z(s,e,"backward");if(!o)return null;const i=s.createRange(o,e),n=H(s.schema,i,"forward");return n?s.createRange(n,e):null}}(e,c,l);if(d){if(d.isCollapsed){if(c.isCollapsed)return;if(a)return}(d.isCollapsed||function(e,t,o){const s=e.model,i=e.view.domConverter;if(o){const e=s.createSelection(t.start);s.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=s.createRange(e.focus,t.end))}const n=e.mapper.toViewRange(t),a=i.viewRangeToDom(n),c=r.rw.getDomRangeRects(a);let l;for(const e of c)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,d,l))&&(t.change((e=>{const o=l?d.end:d.start;if(a){const s=t.createSelection(c.anchor);s.setFocus(o),e.setSelection(s)}else e.setSelection(o)})),o.stop(),s.preventDefault(),s.stopPropagation())}}}function z(e,t,o){const s=e.schema,i=e.createRangeIn(t.root),n="forward"==o?"elementStart":"elementEnd";for(const{previousPosition:e,item:r,type:a}of i.getWalker({startPosition:t,direction:o})){if(s.isLimit(r)&&!s.isInline(r))return e;if(a==n&&s.isBlock(r))return null}return null}function H(e,t,o){const s="backward"==o?t.end:t.start;if(e.checkChild(s,"$text"))return s;for(const{nextPosition:s}of t.getWalker({direction:o}))if(e.checkChild(s,"$text"))return s;return null}var $=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css"),W={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()($.A,W);$.A.locals;class q extends s.k_{_previouslySelected=new Set;static get pluginName(){return"Widget"}static get requires(){return[F,n.ep]}init(){const e=this.editor,t=e.editing.view,o=t.document,s=e.t;this.editor.editing.downcastDispatcher.on("selection",((t,o,s)=>{const i=s.writer,n=o.selection;if(n.isCollapsed)return;const r=n.getSelectedElement();if(!r)return;const a=e.editing.mapper.toViewElement(r);g(a)&&s.consumable.consume(n,"selection")&&i.setSelection(i.createRangeOn(a),{fake:!0,label:y(a)})})),this.editor.editing.downcastDispatcher.on("selection",((e,t,o)=>{this._clearPreviouslySelectedWidgets(o.writer);const s=o.writer,i=s.document.selection;let n=null;for(const e of i.getRanges())for(const t of e){const e=t.item;g(e)&&!U(e,n)&&(s.addClass(f,e),this._previouslySelected.add(e),n=e)}}),{priority:"low"}),t.addObserver(i.q$),this.listenTo(o,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(o,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[g,"$text"]}),this.listenTo(o,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(o,"arrowKey",L(this.editor.editing),{context:"$text"}),this.listenTo(o,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"}),this.listenTo(o,"tab",((e,t)=>{"atTarget"==e.eventPhase&&(t.shiftKey||this._selectFirstNestedEditable()&&(t.preventDefault(),e.stop()))}),{context:g,priority:"low"}),this.listenTo(o,"tab",((e,t)=>{t.shiftKey&&this._selectAncestorWidget()&&(t.preventDefault(),e.stop())}),{priority:"low"}),this.listenTo(o,"keydown",((e,t)=>{t.keystroke==r.uP.esc&&this._selectAncestorWidget()&&(t.preventDefault(),e.stop())}),{priority:"low"}),e.accessibility.addKeystrokeInfoGroup({id:"widget",label:s("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:s("Move focus from an editable area back to the parent widget"),keystroke:"Esc"},{label:s("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:s("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:s("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:s("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(e,t){const o=this.editor,s=o.editing.view,i=s.document;let n=t.target;if(t.domEvent.detail>=3)return void(this._selectBlockContent(n)&&t.preventDefault());if(function(e){let t=e;for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(g(t))return!1;t=t.parent}return!1}(n))return;if(!g(n)&&(n=n.findAncestor(g),!n))return;r._K.isAndroid&&t.preventDefault(),i.isFocused||s.focus();const a=o.editing.mapper.toModelElement(n);this._setSelectionOverElement(a)}_selectBlockContent(e){const t=this.editor,o=t.model,s=t.editing.mapper,n=o.schema,r=s.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),a=function(e,t){for(const o of e.getAncestors({includeSelf:!0,parentFirst:!0})){if(t.checkChild(o,"$text"))return o;if(t.isLimit(o)&&!t.isObject(o))break}return null}(s.toModelElement(r),o.schema);return!!a&&(o.change((e=>{const t=n.isLimit(a)?null:function(e,t){const o=new i.rU({startPosition:e});for(const{item:e}of o){if(t.isLimit(e)||!e.is("element"))return null;if(t.checkChild(e,"$text"))return e}return null}(e.createPositionAfter(a),n),o=e.createPositionAt(a,0),s=t?e.createPositionAt(t,0):e.createPositionAt(a,"end");e.setSelection(e.createRange(o,s))})),!0)}_handleSelectionChangeOnArrowKeyPress(e,t){const o=t.keyCode,s=this.editor.model,i=s.schema,n=s.document.selection,a=n.getSelectedElement(),c=(0,r.Kf)(o,this.editor.locale.contentLanguageDirection),l="down"==c||"right"==c,d="up"==c||"down"==c;if(a&&i.isObject(a)){const o=l?n.getLastPosition():n.getFirstPosition(),r=i.getNearestSelectionRange(o,l?"forward":"backward");return void(r&&(s.change((e=>{e.setSelection(r)})),t.preventDefault(),e.stop()))}if(!n.isCollapsed&&!t.shiftKey){const o=n.getFirstPosition(),r=n.getLastPosition(),a=o.nodeAfter,c=r.nodeBefore;return void((a&&i.isObject(a)||c&&i.isObject(c))&&(s.change((e=>{e.setSelection(l?r:o)})),t.preventDefault(),e.stop()))}if(!n.isCollapsed)return;const h=this._getObjectElementNextToSelection(l);if(h&&i.isObject(h)){if(i.isInline(h)&&d)return;this._setSelectionOverElement(h),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const o=this.editor.model,s=o.schema,i=o.document.selection.getSelectedElement();i&&s.isObject(i)&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.model.document.selection;if(!this.editor.model.canEditAt(t))return;if(!t.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);return o?(this.editor.model.change((e=>{let s=t.anchor.parent;for(;s.isEmpty;){const t=s;s=t.parent,e.remove(t)}this._setSelectionOverElement(o)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,o=t.schema,s=t.document.selection,i=t.createSelection(s);if(t.modifySelection(i,{direction:e?"forward":"backward"}),i.isEqual(s))return null;const n=e?i.focus.nodeBefore:i.focus.nodeAfter;return n&&o.isObject(n)?n:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(f,t);this._previouslySelected.clear()}_selectFirstNestedEditable(){const e=this.editor,t=this.editor.editing.view.document;for(const o of t.selection.getFirstRange().getItems())if(o.is("editableElement")){const t=e.editing.mapper.toModelElement(o);if(!t)continue;const s=e.model.createPositionAt(t,0),i=e.model.schema.getNearestSelectionRange(s,"forward");return e.model.change((e=>{e.setSelection(i)})),!0}return!1}_selectAncestorWidget(){const e=this.editor,t=e.editing.mapper,o=e.editing.view.document.selection.getFirstPosition().parent,s=(o.is("$text")?o.parent:o).findAncestor(g);if(!s)return!1;const i=t.toModelElement(s);return!!i&&(e.model.change((e=>{e.setSelection(i,"on")})),!0)}}function U(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class K extends s.k_{_toolbarDefinitions=new Map;_balloon;static get requires(){return[a.pU]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!g(t))})(e.editing.view.document.selection)&&t.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:o,getRelatedElement:s,balloonClassName:i="ck-toolbar-container"}){if(!o.length)return void(0,r.FF)("widget-toolbar-no-items",{toolbarId:e});const n=this.editor,c=n.t,l=new a.X3(n.locale);if(l.ariaLabel=t||c("Widget toolbar"),this._toolbarDefinitions.has(e))throw new r.Yb("widget-toolbar-duplicated",this,{toolbarId:e});const d={view:l,getRelatedElement:s,balloonClassName:i,itemsConfig:o,initialized:!1};n.ui.addToolbar(l,{isContextual:!0,beforeFocus:()=>{const e=s(n.editing.view.document.selection);e&&this._showToolbar(d,e)},afterBlur:()=>{this._hideToolbar(d)}}),this._toolbarDefinitions.set(e,d)}_updateToolbarsVisibility(){let e=0,t=null,o=null;for(const s of this._toolbarDefinitions.values()){const i=s.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&i)if(this.editor.ui.focusTracker.isFocused){const n=i.getAncestors().length;n>e&&(e=n,t=i,o=s)}else this._isToolbarVisible(s)&&this._hideToolbar(s);else this._isToolbarInBalloon(s)&&this._hideToolbar(s)}o&&this._showToolbar(o,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?Y(this.editor,t):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:G(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);Y(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function Y(e,t){const o=e.plugins.get("ContextualBalloon"),s=G(e,t);o.updatePosition(s)}function G(e,t){const o=e.editing.view,s=a.Jr.defaultPositions;return{target:o.domConverter.mapViewToDom(t),positions:[s.northArrowSouth,s.northArrowSouthWest,s.northArrowSouthEast,s.southArrowNorth,s.southArrowNorthWest,s.southArrowNorthEast,s.viewportStickyNorth]}}class Z extends((0,r.VM)()){_referenceCoordinates;_options;_originalWidth;_originalHeight;_originalWidthPercents;_aspectRatio;constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,o){const s=new r.rw(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const o of t)if(e.classList.contains(J(o)))return o}(e),this._referenceCoordinates=function(e,t){const o=new r.rw(e),s=t.split("-"),i={x:"right"==s[1]?o.right:o.left,y:"bottom"==s[0]?o.bottom:o.top};return i.x+=e.ownerDocument.defaultView.scrollX,i.y+=e.ownerDocument.defaultView.scrollY,i}(t,function(e){const t=e.split("-"),o={top:"bottom",bottom:"top",left:"right",right:"left"};return`${o[t[0]]}-${o[t[1]]}`}(this.activeHandlePosition)),this._originalWidth=s.width,this._originalHeight=s.height,this._aspectRatio=s.width/s.height;const i=o.style.width;i&&i.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(i):this._originalWidthPercents=P(o,s)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function J(e){return`ck-widget__resizer__handle-${e}`}class X extends a.Ss{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",(e=>e?`ck-orientation-${e}`:""))],style:{display:e.if("_isVisible","none",(e=>!e))}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",((e,t)=>null!==e&&null!==t)),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",((t,o,s)=>"px"===e.unit?`${t}×${o}`:`${s}%`)),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",((e,t,o)=>t<50||o<50?"above-center":e))}_dismiss(){this.unbind(),this._isVisible=!1}}class Q extends((0,r.VM)()){_state;_sizeView;_options;_viewResizerWrapper=null;_initialViewWidth;constructor(e){super(),this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((e,t)=>e&&t)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())}),{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change((e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((e=>{e.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change((o=>{const s=o.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const o=this.toDomElement(t);return e._appendHandles(o),e._appendSizeUI(o),o}));o.insert(o.createPositionAt(t,"end"),s),o.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=s,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(e){this._state=new Z(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change((e=>{const o=this._options.unit||"%",s=("%"===o?t.widthPercents:t.width)+o;e.setStyle("width",s,this._options.viewElement)}));const o=this._getHandleHost(),s=new r.rw(o),i=Math.round(s.width),n=Math.round(s.height),a=new r.rw(o);t.width=Math.round(a.width),t.height=Math.round(a.height),this.redraw(s),this.state.update({...t,handleHostWidth:i,handleHostHeight:n})}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(t)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((o=t)&&o.ownerDocument&&o.ownerDocument.contains(o)))return;var o;const s=t.parentElement,i=this._getHandleHost(),n=this._viewResizerWrapper,a=[n.getStyle("width"),n.getStyle("height"),n.getStyle("left"),n.getStyle("top")];let c;if(s.isSameNode(i)){const t=e||new r.rw(i);c=[t.width+"px",t.height+"px",void 0,void 0]}else c=[i.offsetWidth+"px",i.offsetHeight+"px",i.offsetLeft+"px",i.offsetTop+"px"];"same"!==(0,r.ww)(a,c)&&this._options.editor.editing.view.change((e=>{e.setStyle({width:c[0],height:c[1],left:c[2],top:c[3]},n)}))}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(e){const t=this.state,o={x:(s=e).pageX,y:s.pageY};var s;const i=!this._options.isCentered||this._options.isCentered(this),n={x:t._referenceCoordinates.x-(o.x+t.originalWidth),y:o.y-t.originalHeight-t._referenceCoordinates.y};i&&t.activeHandlePosition.endsWith("-right")&&(n.x=o.x-(t._referenceCoordinates.x+t.originalWidth)),i&&(n.x*=2);let r=Math.abs(t.originalWidth+n.x),a=Math.abs(t.originalHeight+n.y);return"width"==(r/t.aspectRatio>a?"width":"height")?a=r/t.aspectRatio:r=a*t.aspectRatio,{width:Math.round(r),height:Math.round(a),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*r*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const s of t)e.appendChild(new a.Bj({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(o=s,`ck-widget__resizer__handle-${o}`)}}).render());var o}_appendSizeUI(e){this._sizeView=new X,this._sizeView.render(),e.appendChild(this._sizeView.element)}}var ee=o("./node_modules/lodash-es/throttle.js"),te=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css"),oe={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()(te.A,oe);te.A.locals;class se extends s.k_{_resizers=new Map;_observer;_redrawSelectedResizerThrottled;static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=r.Sf.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(i.q$),this._observer=new((0,r.c5)()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=(0,ee.A)((()=>this.redrawSelectedResizer()),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())}),{priority:"lowest"}),this._observer.listenTo(r.Sf.window,"resize",this._redrawSelectedResizerThrottled);const o=this.editor.editing.view.document.selection;o.on("change",(()=>{const e=o.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()}))}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new Q(e),o=this.editor.plugins;if(t.attach(),o.has("WidgetToolbarRepository")){const e=o.get("WidgetToolbarRepository");t.on("begin",(()=>{e.forceDisabled("resize")}),{priority:"lowest"}),t.on("cancel",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"}),t.on("commit",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(e.viewElement,t);const s=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(s)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const o=t.domTarget;Q.isResizeHandle(o)&&(this._activeResizer=this._getResizerByHandle(o)||null,this._activeResizer&&(this._activeResizer.begin(o),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":(e,t,o)=>{"use strict";var s,i=function(){return void 0===s&&(s=Boolean(window&&document&&document.all&&!window.atob)),s},n=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),r=[];function a(e){for(var t=-1,o=0;o{"use strict";o.r(t),o.d(t,{Clipboard:()=>he,ClipboardMarkersUtils:()=>H,ClipboardPipeline:()=>$,DragDrop:()=>re,DragDropBlockToolbar:()=>te,DragDropTarget:()=>G,PastePlainText:()=>de});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-utils/src/index.ts"),n=o("./packages/ckeditor5-engine/src/index.ts");class r extends n.$A{domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];constructor(e){super(e);const t=this.document;function o(e){return(o,s)=>{s.preventDefault();const n=s.dropRange?[s.dropRange]:null,r=new i.vY(t,e);t.fire(r,{dataTransfer:s.dataTransfer,method:o.name,targetRanges:n,target:s.target,domEvent:s.domEvent}),r.stop.called&&s.stopPropagation()}}this.listenTo(t,"paste",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",o("dragging"),{priority:"low"})}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,o="drop"==e.type||"paste"==e.type,s={dataTransfer:new n._v(t,{cacheFiles:o})};"drop"!=e.type&&"dragover"!=e.type||(s.dropRange=function(e,t){const o=t.target.ownerDocument,s=t.clientX,i=t.clientY;let n;o.caretRangeFromPoint&&o.caretRangeFromPoint(s,i)?n=o.caretRangeFromPoint(s,i):t.rangeParent&&(n=o.createRange(),n.setStart(t.rangeParent,t.rangeOffset),n.collapse(!0));if(n)return e.domConverter.domRangeToView(n);return null}(this.view,e)),this.fire(e.type,e,s)}}const a=["figcaption","li"],c=["ol","ul"];function l(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"\n";let t="",o=null;for(const s of e.getChildren())t+=d(s,o)+l(s),o=s;return t}function d(e,t){return t?e.is("element","li")&&!e.isEmpty&&e.getChild(0).is("containerElement")||c.includes(e.name)&&c.includes(t.name)?"\n\n":e.is("containerElement")||t.is("containerElement")?a.includes(e.name)||a.includes(t.name)?"\n":"\n\n":"":""}var h=o("./node_modules/lodash-es/_baseAssignValue.js"),u=o("./node_modules/lodash-es/_baseFor.js"),p=o("./node_modules/lodash-es/keys.js");const m=function(e,t){return e&&(0,u.A)(e,t,p.A)};var f=o("./node_modules/lodash-es/_Stack.js"),g=o("./node_modules/lodash-es/_baseIsEqual.js");const _=function(e,t,o,s){var i=o.length,n=i,r=!s;if(null==e)return!n;for(e=Object(e);i--;){var a=o[i];if(r&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++ie.model.getSelectedContent(e.model.document.selection))){return this.editor.model.change((s=>{const i=s.model.document.selection;s.setSelection(t);const n=this._insertFakeMarkersIntoSelection(s,s.model.document.selection,e),r=o(s),a=this._removeFakeMarkersInsideElement(s,r);for(const[e,t]of Object.entries(n)){a[e]||=s.createRangeIn(r);for(const e of t)s.remove(e)}r.markers.clear();for(const[e,t]of Object.entries(a))r.markers.set(e,t);return s.setSelection(i),r}))}_pasteMarkersIntoTransformedElement(e,t){const o=this._getPasteMarkersFromRangeMap(e);return this.editor.model.change((e=>{const s=this._insertFakeMarkersElements(e,o),i=t(e),n=this._removeFakeMarkersInsideElement(e,i);for(const t of Object.values(s).flat())e.remove(t);for(const[t,o]of Object.entries(n))e.model.markers.has(t)||e.addMarker(t,{usingOperation:!0,affectsData:!0,range:o});return i}))}_pasteFragmentWithMarkers(e){const t=this._getPasteMarkersFromRangeMap(e.markers);e.markers.clear();for(const o of t)e.markers.set(o.name,o.range);return this.editor.model.insertContent(e)}_forceMarkersCopy(e,t,o={allowedActions:"all",copyPartiallySelected:!0,duplicateOnPaste:!0}){const s=this._markersToCopy.get(e);this._markersToCopy.set(e,o),t(),s?this._markersToCopy.set(e,s):this._markersToCopy.delete(e)}_isMarkerCopyable(e,t){const o=this._getMarkerClipboardConfig(e);if(!o)return!1;if(!t)return!0;const{allowedActions:s}=o;return"all"===s||s.includes(t)}_hasMarkerConfiguration(e){return!!this._getMarkerClipboardConfig(e)}_getMarkerClipboardConfig(e){const[t]=e.split(":");return this._markersToCopy.get(t)||null}_insertFakeMarkersIntoSelection(e,t,o){const s=this._getCopyableMarkersFromSelection(e,t,o);return this._insertFakeMarkersElements(e,s)}_getCopyableMarkersFromSelection(e,t,o){const s=Array.from(t.getRanges()),i=new Set(s.flatMap((t=>Array.from(e.model.markers.getMarkersIntersectingRange(t)))));return Array.from(i).filter((e=>{if(!this._isMarkerCopyable(e.name,o))return!1;const{copyPartiallySelected:t}=this._getMarkerClipboardConfig(e.name);if(!t){const t=e.getRange();return s.some((e=>e.containsRange(t,!0)))}return!0})).map((e=>({name:"dragstart"===o?this._getUniqueMarkerName(e.name):e.name,range:e.getRange()})))}_getPasteMarkersFromRangeMap(e,t=null){const{model:o}=this.editor;return(e instanceof Map?Array.from(e.entries()):Object.entries(e)).flatMap((([e,s])=>{if(!this._hasMarkerConfiguration(e))return[{name:e,range:s}];if(this._isMarkerCopyable(e,t)){const t=this._getMarkerClipboardConfig(e),i=o.markers.has(e)&&"$graveyard"===o.markers.get(e).getRange().root.rootName;return(t.duplicateOnPaste||i)&&(e=this._getUniqueMarkerName(e)),[{name:e,range:s}]}return[]}))}_insertFakeMarkersElements(e,t){const o={},s=t.flatMap((e=>{const{start:t,end:o}=e.range;return[{position:t,marker:e,type:"start"},{position:o,marker:e,type:"end"}]})).sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:t,marker:i,type:n}of s){const s=e.createElement("$marker",{"data-name":i.name,"data-type":n});o[i.name]||(o[i.name]=[]),o[i.name].push(s),e.insert(s,t)}return o}_removeFakeMarkersInsideElement(e,t){const o=this._getAllFakeMarkersFromElement(e,t).reduce(((t,o)=>{const s=o.markerElement&&e.createPositionBefore(o.markerElement);let i=t[o.name],n=!1;if(i&&i.start&&i.end){this._getMarkerClipboardConfig(o.name).duplicateOnPaste?t[this._getUniqueMarkerName(o.name)]=t[o.name]:n=!0,i=null}return n||(t[o.name]={...i,[o.type]:s}),o.markerElement&&e.remove(o.markerElement),t}),{});return z(o,(o=>new n.Q6(o.start||e.createPositionFromPath(t,[0]),o.end||e.createPositionAt(t,"end"))))}_getAllFakeMarkersFromElement(e,t){const o=Array.from(e.createRangeIn(t)).flatMap((({item:e})=>{if(!e.is("element","$marker"))return[];const t=e.getAttribute("data-name"),o=e.getAttribute("data-type");return[{markerElement:e,name:t,type:o}]})),s=[],i=[];for(const e of o){if("end"===e.type){o.some((t=>t.name===e.name&&"start"===t.type))||s.push({markerElement:null,name:e.name,type:"start"})}if("start"===e.type){o.some((t=>t.name===e.name&&"end"===t.type))||i.unshift({markerElement:null,name:e.name,type:"end"})}}return[...s,...o,...i]}_getUniqueMarkerName(e){const t=e.split(":"),o=(0,i.Ld)().substring(1,6);return 3===t.length?`${t.slice(0,2).join(":")}:${o}`:`${t.join(":")}:${o}`}}class $ extends s.k_{static get pluginName(){return"ClipboardPipeline"}static get requires(){return[H]}init(){this.editor.editing.view.addObserver(r),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(e,t,o){const s=this.editor.plugins.get("ClipboardMarkersUtils");this.editor.model.enqueueChange({isUndoable:"cut"===o},(()=>{const i=s._copySelectedFragmentWithMarkers(o,t);this.fire("outputTransformation",{dataTransfer:e,content:i,method:o})}))}_setupPasteDrop(){const e=this.editor,t=e.model,o=e.editing.view,s=o.document,n=this.editor.plugins.get("ClipboardMarkersUtils");this.listenTo(s,"clipboardInput",((t,o)=>{"paste"!=o.method||e.model.canEditAt(e.model.document.selection)||t.stop()}),{priority:"highest"}),this.listenTo(s,"clipboardInput",((e,t)=>{const s=t.dataTransfer;let n;if(t.content)n=t.content;else{let e="";s.getData("text/html")?e=function(e){return e.replace(/(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(//g,"")}(s.getData("text/html")):s.getData("text/plain")&&(((r=(r=s.getData("text/plain")).replace(/&/g,"&").replace(//g,">").replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
").replace(/\t/g,"    ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).includes("

")||r.includes("
"))&&(r=`

${r}

`),e=r),n=this.editor.data.htmlProcessor.toView(e)}var r;const a=new i.vY(this,"inputTransformation");this.fire(a,{content:n,dataTransfer:s,targetRanges:t.targetRanges,method:t.method}),a.stop.called&&e.stop(),o.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,o)=>{if(o.content.isEmpty)return;const s=this.editor.data.toModel(o.content,"$clipboardHolder");0!=s.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:s,method:o.method,dataTransfer:o.dataTransfer,targetRanges:o.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,t)=>{t.resultRange=n._pasteFragmentWithMarkers(t.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,o=e.editing.view.document,s=(e,o)=>{const s=o.dataTransfer;o.preventDefault(),this._fireOutputTransformationEvent(s,t.selection,e.name)};this.listenTo(o,"copy",s,{priority:"low"}),this.listenTo(o,"cut",((t,o)=>{e.model.canEditAt(e.model.document.selection)?s(t,o):o.preventDefault()}),{priority:"low"}),this.listenTo(this,"outputTransformation",((t,s)=>{const i=e.data.toView(s.content);o.fire("clipboardOutput",{dataTransfer:s.dataTransfer,content:i,method:s.method})}),{priority:"low"}),this.listenTo(o,"clipboardOutput",((o,s)=>{s.content.isEmpty||(s.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(s.content)),s.dataTransfer.setData("text/plain",l(s.content))),"cut"==s.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}var W=o("./packages/ckeditor5-widget/src/index.ts"),q=o("./packages/ckeditor5-ui/src/index.ts");const U=(0,i.To)("px");class K extends q.Ss{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",(e=>!e))],style:{left:e.to("left",(e=>U(e))),top:e.to("top",(e=>U(e))),width:e.to("width",(e=>U(e)))}}})}}var Y=o("./node_modules/lodash-es/throttle.js");class G extends s.k_{removeDropMarkerDelayed=(0,i.cb)((()=>this.removeDropMarker()),40);_updateDropMarkerThrottled=(0,Y.A)((e=>this._updateDropMarker(e)),40);_reconvertMarkerThrottled=(0,Y.A)((()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")}),0);_dropTargetLineView=new K;_domEmitter=new((0,i.c5)());_scrollables=new Map;static get pluginName(){return"DragDropTarget"}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,t,o,s,i,n){this.removeDropMarkerDelayed.cancel();const r=Z(this.editor,e,t,o,s,i,n);if(r)return n&&n.containsRange(r)?this.removeDropMarker():void this._updateDropMarkerThrottled(r)}getFinalDropRange(e,t,o,s,i,n){const r=Z(this.editor,e,t,o,s,i,n);return this.removeDropMarker(),r}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change((e=>{e.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:(t,{writer:o})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(o);t.markerRange.isCollapsed?this._updateDropTargetLine(t.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const t=this.editor,o=t.model.markers;t.model.change((t=>{o.has("drop-target")?o.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("⁠",e.createElement("span"),"⁠"),t}))}_updateDropTargetLine(e){const t=this.editor.editing,o=e.start.nodeBefore,s=e.start.nodeAfter,n=e.start.parent,r=o?t.mapper.toViewElement(o):null,a=r?t.view.domConverter.mapViewToDom(r):null,c=s?t.mapper.toViewElement(s):null,l=c?t.view.domConverter.mapViewToDom(c):null,d=t.mapper.toViewElement(n);if(!d)return;const h=t.view.domConverter.mapViewToDom(d),u=this._getScrollableRect(d),{scrollX:p,scrollY:m}=i.Sf.window,f=a?new i.rw(a):null,g=l?new i.rw(l):null,_=new i.rw(h).excludeScrollbarsAndBorders(),b=f?f.bottom:_.top,k=g?g.top:_.bottom,w=i.Sf.window.getComputedStyle(h),v=b<=k?(b+k)/2:k;if(u.topa.schema.checkChild(n,e)))){if(a.schema.checkChild(n,"$text"))return a.createRange(n);if(t)return X(e,ee(e,t.parent),s,i)}}}else if(a.schema.isInline(l))return X(e,l,s,i);if(a.schema.isBlock(l))return X(e,l,s,i);if(a.schema.checkChild(l,"$block")){const t=Array.from(l.getChildren()).filter((t=>t.is("element")&&!J(e,t)));let o=0,n=t.length;if(0==n)return a.createRange(a.createPositionAt(l,"end"));for(;o{o?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")})),i._K.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const t=e.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(t,"dragstart",((e,t)=>this._handleBlockDragStart(t))),this._domEmitter.listenTo(i.Sf.document,"dragover",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(i.Sf.document,"drop",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(i.Sf.document,"dragend",(()=>this._handleBlockDragEnd()),{useCapture:!0}),this.isEnabled&&t.setAttribute("draggable","true"),this.on("change:isEnabled",((e,o,s)=>{t.setAttribute("draggable",s?"true":"false")}))}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const t=this.editor.model,o=t.document.selection,s=this.editor.editing.view,i=Array.from(o.getSelectedBlocks()),n=t.createRange(t.createPositionBefore(i[0]),t.createPositionAfter(i[i.length-1]));t.change((e=>e.setSelection(n))),this._isBlockDragging=!0,s.focus(),s.getObserver(r).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const t=e.clientX+("ltr"==this.editor.locale.contentLanguageDirection?100:-100),o=e.clientY,s=document.elementFromPoint(t,o),i=this.editor.editing.view;s&&s.closest(".ck-editor__editable")&&i.getObserver(r).onDomEvent({...e,type:e.type,dataTransfer:e.dataTransfer,target:s,clientX:t,clientY:o,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()})}_handleBlockDragEnd(){this._isBlockDragging=!1}}var oe=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),se=o.n(oe),ie=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css"),ne={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};se()(ie.A,ne);ie.A.locals;class re extends s.k_{_draggedRange;_draggingUid;_draggableElement;_clearDraggableAttributesDelayed=(0,i.cb)((()=>this._clearDraggableAttributes()),40);_blockMode=!1;_domEmitter=new((0,i.c5)());_previewContainer;static get pluginName(){return"DragDrop"}static get requires(){return[$,W.x0,G,te]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,t.addObserver(r),t.addObserver(n.q$),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,o)=>{o?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,o)=>{o||this._finalizeDragging(!1)})),i._K.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,t=e.model,o=e.editing.view,s=o.document,n=e.plugins.get(G);this.listenTo(s,"dragstart",((e,o)=>{if(o.target&&o.target.is("editableElement"))return void o.preventDefault();if(this._prepareDraggedRange(o.target),!this._draggedRange)return void o.preventDefault();this._draggingUid=(0,i.Ld)(),o.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",o.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const s=t.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(o.dataTransfer,s,"dragstart");const{dataTransfer:n,domTarget:r,domEvent:a}=o,{clientX:c}=a;this._updatePreview({dataTransfer:n,domTarget:r,clientX:c}),o.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(s,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this._domEmitter.listenTo(i.Sf.document,"dragend",(()=>{this._blockMode=!1}),{useCapture:!0}),this.listenTo(s,"dragenter",(()=>{this.isEnabled&&o.focus()})),this.listenTo(s,"dragleave",(()=>{n.removeDropMarkerDelayed()})),this.listenTo(s,"dragging",((e,t)=>{if(!this.isEnabled)return void(t.dataTransfer.dropEffect="none");const{clientX:o,clientY:s}=t.domEvent;n.updateDropMarker(t.target,t.targetRanges,o,s,this._blockMode,this._draggedRange),this._draggedRange||(t.dataTransfer.dropEffect="copy"),i._K.isGecko||("copy"==t.dataTransfer.effectAllowed?t.dataTransfer.dropEffect="copy":["all","copyMove"].includes(t.dataTransfer.effectAllowed)&&(t.dataTransfer.dropEffect="move")),e.stop()}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document,o=e.plugins.get(G);this.listenTo(t,"clipboardInput",((t,s)=>{if("drop"!=s.method)return;const{clientX:i,clientY:n}=s.domEvent,r=o.getFinalDropRange(s.target,s.targetRanges,i,n,this._blockMode,this._draggedRange);if(!r)return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=s.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==ae(s.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(r,!0))return this._finalizeDragging(!1),void t.stop();s.targetRanges=[e.editing.mapper.toViewRange(r)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get($);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(o)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o="move"==ae(t.dataTransfer),s=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(s&&o)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,o=t.document;this.listenTo(o,"mousedown",((s,n)=>{if(i._K.isAndroid||!n)return;this._clearDraggableAttributesDelayed.cancel();let r=ce(n.target);if(i._K.isBlink&&!e.isReadOnly&&!r&&!o.selection.isCollapsed){const e=o.selection.getSelectedElement();e&&(0,W.p4)(e)||(r=o.selection.editableElement)}r&&(t.change((e=>{e.setAttribute("draggable","true",r)})),this._draggableElement=e.editing.mapper.toModelElement(r))})),this.listenTo(o,"mouseup",(()=>{i._K.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_finalizeDragging(e){const t=this.editor,o=t.model;if(t.plugins.get(G).removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&o.change((e=>{const t=o.createSelection(this._draggedRange);o.deleteContent(t,{doNotAutoparagraph:!0});const s=t.getFirstPosition().parent;s.isEmpty&&!o.schema.checkChild(s,"$text")&&o.schema.checkChild(s,"paragraph")&&e.insertElement("paragraph",s,0)})),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const t=this.editor,o=t.model,s=o.document.selection,i=e?ce(e):null;if(i){const e=t.editing.mapper.toModelElement(i);if(this._draggedRange=n.Oo.fromRange(o.createRangeOn(e)),this._blockMode=o.schema.isBlock(e),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}return}if(s.isCollapsed&&!s.getFirstPosition().parent.isEmpty)return;const r=Array.from(s.getSelectedBlocks()),a=s.getFirstRange();if(0==r.length)return void(this._draggedRange=n.Oo.fromRange(a));const c=le(o,r);if(r.length>1)this._draggedRange=n.Oo.fromRange(c),this._blockMode=!0;else if(1==r.length){const e=a.start.isTouching(c.start)&&a.end.isTouching(c.end);this._draggedRange=n.Oo.fromRange(e?c:a),this._blockMode=e}o.change((e=>e.setSelection(this._draggedRange.toRange())))}_updatePreview({dataTransfer:e,domTarget:t,clientX:o}){const s=this.editor.editing.view,n=s.document.selection.editableElement,r=s.domConverter.mapViewToDom(n),a=i.Sf.window.getComputedStyle(r);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=(0,i.n)(i.Sf.document,"div",{style:"position: fixed; left: -999999px;"}),i.Sf.document.body.appendChild(this._previewContainer));const c=new i.rw(r);if(r.contains(t))return;const l=parseFloat(a.paddingLeft),d=(0,i.n)(i.Sf.document,"div");d.className="ck ck-content",d.style.width=a.width,d.style.paddingLeft=`${c.left-o+l}px`,i._K.isiOS&&(d.style.backgroundColor="white"),d.innerHTML=e.getData("text/html"),e.setDragImage(d,0,0),this._previewContainer.appendChild(d)}}function ae(e){return i._K.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function ce(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(W.p4);if((0,W.p4)(e))return e;const t=e.findAncestor((e=>(0,W.p4)(e)||e.is("editableElement")));return(0,W.p4)(t)?t:null}function le(e,t){const o=t[0],s=t[t.length-1],i=o.getCommonAncestor(s),n=e.createPositionBefore(o),r=e.createPositionAfter(s);if(i&&i.is("element")&&!e.schema.isLimit(i)){const t=e.createRangeOn(i),o=n.isTouching(t.start),s=r.isTouching(t.end);if(o&&s)return le(e,[i])}return e.createRange(n,r)}class de extends s.k_{static get pluginName(){return"PastePlainText"}static get requires(){return[$]}init(){const e=this.editor,t=e.model,o=e.editing.view,s=o.document,i=t.document.selection;let n=!1;o.addObserver(r),this.listenTo(s,"keydown",((e,t)=>{n=t.shiftKey})),e.plugins.get($).on("contentInsertion",((e,o)=>{(n||function(e,t){if(e.childCount>1)return!1;const o=e.getChild(0);if(t.isObject(o))return!1;return 0==Array.from(o.getAttributeKeys()).length}(o.content,t.schema))&&t.change((e=>{const s=Array.from(i.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));i.isCollapsed||t.deleteContent(i,{doNotAutoparagraph:!0}),s.push(...i.getAttributes());const n=e.createRangeIn(o.content);for(const t of n.getItems())t.is("$textProxy")&&e.setAttributes(s,t)}))}))}}class he extends s.k_{static get pluginName(){return"Clipboard"}static get requires(){return[H,$,re,de]}init(){const e=this.editor,t=this.editor.t;e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Copy selected content"),keystroke:"CTRL+C"},{label:t("Paste content"),keystroke:"CTRL+V"},{label:t("Paste content as plain text"),keystroke:"CTRL+SHIFT+V"}]})}}},"./src/core.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Command:()=>s.uB,Context:()=>s.ob,ContextPlugin:()=>s.HY,DataApiMixin:()=>s.CC,Editor:()=>s.KE,ElementApiMixin:()=>s.mJ,MultiCommand:()=>s.fE,PendingActions:()=>s.TS,Plugin:()=>s.k_,attachToForm:()=>s.JF,icons:()=>s.Pt,secureSourceElement:()=>s.Jl});var s=o("./packages/ckeditor5-core/src/index.ts")},"./src/engine.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{AttributeElement:()=>s.Zq,AttributeOperation:()=>s.ML,BubblingEventInfo:()=>s.cJ,ClickObserver:()=>s.Re,Conversion:()=>s.dY,DataController:()=>s.P3,DataTransfer:()=>s._v,DocumentFragment:()=>s.kB,DocumentSelection:()=>s.oi,DomConverter:()=>s.P$,DomEventData:()=>s.FY,DomEventObserver:()=>s.$A,DowncastWriter:()=>s.zN,EditingController:()=>s.L_,EditingView:()=>s.gK,Element:()=>s.Hg,FocusObserver:()=>s.vp,History:()=>s.BZ,HtmlDataProcessor:()=>s.q6,InsertOperation:()=>s.ZG,LivePosition:()=>s.m8,LiveRange:()=>s.Oo,MarkerOperation:()=>s.m4,Matcher:()=>s.PN,MergeOperation:()=>s.GY,Model:()=>s.Kx,MouseObserver:()=>s.q$,MoveOperation:()=>s.hW,NoOperation:()=>s.fS,Observer:()=>s.nu,OperationFactory:()=>s.cr,Position:()=>s.yX,Range:()=>s.Q6,RenameOperation:()=>s.EZ,Renderer:()=>s.A4,RootAttributeOperation:()=>s.gf,RootOperation:()=>s.at,SplitOperation:()=>s._A,StylesMap:()=>s.DG,StylesProcessor:()=>s.tG,TabObserver:()=>s.Yi,Text:()=>s.EY,TextProxy:()=>s.Qo,TreeWalker:()=>s.rU,UpcastWriter:()=>s.Wq,ViewAttributeElement:()=>s.UJ,ViewContainerElement:()=>s.xQ,ViewDocument:()=>s.Vg,ViewDocumentFragment:()=>s.f5,ViewEditableElement:()=>s.OQ,ViewElement:()=>s.m2,ViewEmptyElement:()=>s.Vt,ViewRawElement:()=>s.aZ,ViewRootEditableElement:()=>s.Un,ViewText:()=>s.HQ,ViewTreeWalker:()=>s.u$,ViewUIElement:()=>s.cw,XmlDataProcessor:()=>s.ib,_getModelData:()=>s.XI,_getViewData:()=>s.vQ,_parseModel:()=>s.IG,_parseView:()=>s.kF,_setModelData:()=>s.je,_setViewData:()=>s.JV,_stringifyModel:()=>s.aU,_stringifyView:()=>s._$,addBackgroundRules:()=>s.D0,addBorderRules:()=>s.v7,addMarginRules:()=>s.vt,addPaddingRules:()=>s.mC,disablePlaceholder:()=>s.Kc,enablePlaceholder:()=>s.JT,getBoxSidesShorthandValue:()=>s.qE,getBoxSidesValueReducer:()=>s.rC,getBoxSidesValues:()=>s.QS,getFillerOffset:()=>s.SH,getPositionShorthandNormalizer:()=>s.gz,getShorthandValues:()=>s.M1,hidePlaceholder:()=>s.YU,isAttachment:()=>s.s5,isColor:()=>s._o,isLength:()=>s.Vq,isLineStyle:()=>s.ew,isPercentage:()=>s.fp,isPosition:()=>s.E,isRepeat:()=>s.Cd,isURL:()=>s.mv,needsPlaceholder:()=>s.$0,showPlaceholder:()=>s.Zu,transformSets:()=>s._j});var s=o("./packages/ckeditor5-engine/src/index.ts")},"./src/enter.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Enter:()=>s.x,ShiftEnter:()=>s.D});var s=o("./packages/ckeditor5-enter/src/index.ts")},"./src/paragraph.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Paragraph:()=>c,ParagraphButtonUI:()=>d});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-utils/src/index.ts");class n extends s.uB{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=e.document,o=(0,i.$1)(t.selection.getSelectedBlocks());this.value=!!o&&o.is("element","paragraph"),this.isEnabled=!!o&&r(o,e.schema)}execute(e={}){const t=this.editor.model,o=t.document,s=e.selection||o.selection;t.canEditAt(s)&&t.change((e=>{const o=s.getSelectedBlocks();for(const s of o)!s.is("element","paragraph")&&r(s,t.schema)&&e.rename(s,"paragraph")}))}}function r(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class a extends s.uB{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,o=e.attributes;let s=e.position;t.canEditAt(s)&&t.change((e=>{if(s=this._findPositionToInsertParagraph(s,e),!s)return;const i=e.createElement("paragraph");o&&t.schema.setAllowedAttributes(i,o,e),t.insertContent(i,s),e.setSelection(i,"in")}))}_findPositionToInsertParagraph(e,t){const o=this.editor.model;if(o.schema.checkChild(e,"paragraph"))return e;const s=o.schema.findAllowedParent(e,"paragraph");if(!s)return null;const i=e.parent,n=o.schema.checkChild(i,"$text");return i.isEmpty||n&&e.isAtEnd?o.createPositionAfter(i):!i.isEmpty&&n&&e.isAtStart?o.createPositionBefore(i):t.split(e,s).position}}class c extends s.k_{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new n(e)),e.commands.add("insertParagraph",new a(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>c.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}static paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"])}var l=o("./packages/ckeditor5-ui/src/index.ts");class d extends s.k_{static get requires(){return[c]}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("paragraph",(o=>{const i=new l._(o),n=e.commands.get("paragraph");return i.label=t("Paragraph"),i.icon=s.Pt.paragraph,i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(n),i.bind("isOn").to(n,"value"),i.on("execute",(()=>{e.execute("paragraph")})),i}))}}},"./src/select-all.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{SelectAll:()=>h,SelectAllEditing:()=>c,SelectAllUI:()=>d});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-utils/src/index.ts");class n extends s.uB{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let o=e.schema.getLimitElement(t);if(t.containsEntireContent(o)||!r(e.schema,o))do{if(o=o.parent,!o)return}while(!r(e.schema,o));e.change((e=>{e.setSelection(o,"in")}))}}function r(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const a=(0,i.ZX)("Ctrl+A");class c extends s.k_{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.t,o=e.editing.view.document;e.commands.add("selectAll",new n(e)),this.listenTo(o,"keydown",((t,o)=>{(0,i.QC)(o)===a&&(e.execute("selectAll"),o.preventDefault())})),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Select all"),keystroke:"CTRL+A"}]})}}var l=o("./packages/ckeditor5-ui/src/index.ts");class d extends s.k_{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(()=>{const e=this._createButton(l._);return e.set({tooltip:!0}),e})),e.ui.componentFactory.add("menuBar:selectAll",(()=>this._createButton(l.kS)))}_createButton(e){const t=this.editor,o=t.locale,s=t.commands.get("selectAll"),i=new e(t.locale),n=o.t;return i.set({label:n("Select all"),icon:'',keystroke:"Ctrl+A"}),i.bind("isEnabled").to(s,"isEnabled"),this.listenTo(i,"execute",(()=>{t.execute("selectAll"),t.editing.view.focus()})),i}}class h extends s.k_{static get requires(){return[c,d]}static get pluginName(){return"SelectAll"}}},"./src/typing.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Delete:()=>s.ep,Input:()=>s.pd,InsertTextCommand:()=>s.Ki,TextTransformation:()=>s.De,TextWatcher:()=>s.qV,TwoStepCaretMovement:()=>s.Vp,Typing:()=>s.IG,findAttributeRange:()=>s.Py,findAttributeRangeBound:()=>s.lO,getLastTextLine:()=>s.ex,inlineHighlight:()=>s.Il});var s=o("./packages/ckeditor5-typing/src/index.ts")},"./src/ui.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{AccessibilityHelp:()=>s.KO,AutocompleteView:()=>s.uI,BalloonPanelView:()=>s.Jr,BalloonToolbar:()=>s.bQ,BlockToolbar:()=>s.Lz,BodyCollection:()=>s.v1,BoxedEditorUIView:()=>s.Xt,ButtonLabelView:()=>s.e0,ButtonView:()=>s._,CollapsibleView:()=>s.Kn,ColorGridView:()=>s.pQ,ColorPickerView:()=>s.ph,ColorSelectorView:()=>s.oB,ColorTileView:()=>s.vF,ComponentFactory:()=>s.eH,ContextualBalloon:()=>s.pU,CssTransitionDisablerMixin:()=>s.wi,DefaultMenuBarItems:()=>s.ep,Dialog:()=>s.lG,DialogView:()=>s._m,DialogViewPosition:()=>s.nu,DropdownButtonView:()=>s.lU,DropdownPanelView:()=>s.Vz,DropdownView:()=>s.BO,EditorUI:()=>s.Gn,EditorUIView:()=>s.nc,FileDialogButtonView:()=>s.eF,FocusCycler:()=>s.H,FormHeaderView:()=>s.Dy,HighlightedTextView:()=>s.MZ,IconView:()=>s.Ln,IframeView:()=>s.WU,InlineEditableUIView:()=>s.LU,InputNumberView:()=>s.Zz,InputTextView:()=>s.hK,InputView:()=>s.E6,LabelView:()=>s.y0,LabeledFieldView:()=>s.xE,ListItemGroupView:()=>s.m_,ListItemView:()=>s.BD,ListSeparatorView:()=>s.Je,ListView:()=>s.uO,MenuBarMenuListItemButtonView:()=>s.kS,MenuBarMenuListItemFileDialogButtonView:()=>s.GG,MenuBarMenuListItemView:()=>s.I8,MenuBarMenuListView:()=>s.BY,MenuBarMenuView:()=>s.zj,MenuBarView:()=>s.yJ,Notification:()=>s.Eg,SearchInfoView:()=>s.wD,SearchTextView:()=>s.b8,SpinnerView:()=>s.XE,SplitButtonView:()=>s.AO,StickyPanelView:()=>s.xw,SwitchButtonView:()=>s.Wm,Template:()=>s.Bj,TextareaView:()=>s.OB,ToolbarLineBreakView:()=>s.Cy,ToolbarSeparatorView:()=>s.IY,ToolbarView:()=>s.X3,TooltipManager:()=>s.JV,View:()=>s.Ss,ViewCollection:()=>s.s3,ViewModel:()=>s.Jc,_initMenuBar:()=>s.G6,addKeyboardHandlingForGrid:()=>s.l1,addListToDropdown:()=>s.O,addToolbarToDropdown:()=>s.fM,clickOutsideHandler:()=>s.wy,createDropdown:()=>s.yu,createLabeledDropdown:()=>s.By,createLabeledInputNumber:()=>s.F_,createLabeledInputText:()=>s.Vr,createLabeledTextarea:()=>s.GR,focusChildOnDropdownOpen:()=>s.Zn,getLocalizedColorOptions:()=>s.b2,injectCssTransitionDisabler:()=>s.I0,isFocusable:()=>s.tp,isViewWithFocusCycler:()=>s.eG,normalizeColorOptions:()=>s.lF,normalizeMenuBarConfig:()=>s.mB,normalizeSingleColorDefinition:()=>s.iv,normalizeToolbarConfig:()=>s.fl,submitHandler:()=>s.Z5});var s=o("./packages/ckeditor5-ui/src/index.ts")},"./src/undo.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Undo:()=>p,UndoEditing:()=>d,UndoUI:()=>u});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-engine/src/index.ts");class n extends s.uB{_stack=[];_createdBatches=new WeakSet;constructor(e){super(e),this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",((e,t)=>{t[1]={...t[1]};const o=t[1];o.batchType||(o.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,o={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:o}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,o){const s=this.editor.model,i=s.document,n=[],c=e.map((e=>e.getTransformedByOperations(o))),l=c.flat();for(const e of c){const t=e.filter((e=>e.root!=i.graveyard)).filter((e=>!a(e,l)));t.length&&(r(t),n.push(t[0]))}n.length&&s.change((e=>{e.setSelection(n,{backward:t})}))}_undo(e,t){const o=this.editor.model,s=o.document;this._createdBatches.add(t);const n=e.operations.slice().filter((e=>e.isDocumentOperation));n.reverse();for(const e of n){const n=e.baseVersion+1,r=Array.from(s.history.getOperations(n)),a=(0,i._j)([e.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let n of a){const r=n.affectedSelectable;r&&!o.canEditAt(r)&&(n=new i.fS(n.baseVersion)),t.addOperation(n),o.applyOperation(n),s.history.setOperationAsUndone(e,n)}}}}function r(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;tt!==e&&t.containsRange(e,!0)))}class c extends n{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,o=this._stack.splice(t,1)[0],s=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(s,(()=>{this._undo(o.batch,s);const e=this.editor.model.document.history.getOperations(o.batch.baseVersion);this._restoreSelection(o.selection.ranges,o.selection.isBackward,e)})),this.fire("revert",o.batch,s),this.refresh()}}class l extends n{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const o=e.batch.operations[e.batch.operations.length-1].baseVersion+1,s=this.editor.model.document.history.getOperations(o);this._restoreSelection(e.selection.ranges,e.selection.isBackward,s),this._undo(e.batch,t)})),this.refresh()}}class d extends s.k_{_undoCommand;_redoCommand;_batchRegistry=new WeakSet;static get pluginName(){return"UndoEditing"}init(){const e=this.editor,t=e.t;this._undoCommand=new c(e),this._redoCommand=new l(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const o=t[0];if(!o.isDocumentOperation)return;const s=o.batch,i=this._redoCommand.createdBatches.has(s),n=this._undoCommand.createdBatches.has(s);this._batchRegistry.has(s)||(this._batchRegistry.add(s),s.isUndoable&&(i?this._undoCommand.addBatch(s):n||(this._undoCommand.addBatch(s),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,o)=>{this._redoCommand.addBatch(o)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Undo"),keystroke:"CTRL+Z"},{label:t("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}var h=o("./packages/ckeditor5-ui/src/index.ts");class u extends s.k_{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,o=e.t,i="ltr"==t.uiLanguageDirection?s.Pt.undo:s.Pt.redo,n="ltr"==t.uiLanguageDirection?s.Pt.redo:s.Pt.undo;this._addButtonsToFactory("undo",o("Undo"),"CTRL+Z",i),this._addButtonsToFactory("redo",o("Redo"),"CTRL+Y",n)}_addButtonsToFactory(e,t,o,s){const i=this.editor;i.ui.componentFactory.add(e,(()=>{const i=this._createButton(h._,e,t,o,s);return i.set({tooltip:!0}),i})),i.ui.componentFactory.add("menuBar:"+e,(()=>this._createButton(h.kS,e,t,o,s)))}_createButton(e,t,o,s,i){const n=this.editor,r=n.locale,a=n.commands.get(t),c=new e(r);return c.set({label:o,icon:i,keystroke:s}),c.bind("isEnabled").to(a,"isEnabled"),this.listenTo(c,"execute",(()=>{n.execute(t),n.editing.view.focus()})),c}}class p extends s.k_{static get requires(){return[d,u]}static get pluginName(){return"Undo"}}},"./src/upload.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Base64UploadAdapter:()=>c,FileRepository:()=>r,SimpleUploadAdapter:()=>d});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-utils/src/index.ts");class n extends((0,i.VM)()){total;_reader;_data;constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((o,s)=>{t.onload=()=>{const e=t.result;this._data=e,o(e)},t.onerror=()=>{s("error")},t.onabort=()=>{s("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}class r extends s.k_{loaders=new i.pM;_loadersMap=new Map;_pendingAction=null;static get pluginName(){return"FileRepository"}static get requires(){return[s.TS]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return(0,i.FF)("filerepository-no-upload-adapter"),null;const t=new a(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof a?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,o)=>{e===t&&this._loadersMap.delete(o)}))}_updatePendingAction(){const e=this.editor.plugins.get(s.TS);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,o=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(o(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",o)}}else e.remove(this._pendingAction),this._pendingAction=null}}class a extends((0,i.VM)()){id;_filePromiseWrapper;_adapter;_reader;constructor(e,t){super(),this.id=(0,i.Ld)(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new n,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new i.Yb("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new i.Yb("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((o,s)=>{t.rejecter=s,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,o(e)})).catch((e=>{t.isFulfilled=!0,s(e)}))})),t}}class c extends s.k_{static get requires(){return[r]}static get pluginName(){return"Base64UploadAdapter"}init(){this.editor.plugins.get(r).createUploadAdapter=e=>new l(e)}}class l{loader;reader;constructor(e){this.loader=e}upload(){return new Promise(((e,t)=>{const o=this.reader=new window.FileReader;o.addEventListener("load",(()=>{e({default:o.result})})),o.addEventListener("error",(e=>{t(e)})),o.addEventListener("abort",(()=>{t()})),this.loader.file.then((e=>{o.readAsDataURL(e)}))}))}abort(){this.reader.abort()}}class d extends s.k_{static get requires(){return[r]}static get pluginName(){return"SimpleUploadAdapter"}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(r).createUploadAdapter=t=>new h(t,e):(0,i.FF)("simple-upload-adapter-missing-uploadurl"))}}class h{loader;options;xhr;constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then((e=>new Promise(((t,o)=>{this._initRequest(),this._initListeners(t,o,e),this._sendRequest(e)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,o){const s=this.xhr,i=this.loader,n=`Couldn't upload file: ${o.name}.`;s.addEventListener("error",(()=>t(n))),s.addEventListener("abort",(()=>t())),s.addEventListener("load",(()=>{const o=s.response;if(!o||o.error)return t(o&&o.error&&o.error.message?o.error.message:n);const i=o.url?{default:o.url}:o.urls;e({...o,urls:i})})),s.upload&&s.upload.addEventListener("progress",(e=>{e.lengthComputable&&(i.uploadTotal=e.total,i.uploaded=e.loaded)}))}_sendRequest(e){const t=this.options.headers||{},o=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=o;const s=new FormData;s.append("upload",e),this.xhr.send(s)}}},"./src/utils.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{CKEditorError:()=>s.Yb,Collection:()=>s.pM,Config:()=>s.TS,DomEmitterMixin:()=>s.c5,ElementReplacer:()=>s.PZ,EmitterMixin:()=>s.Mm,EventInfo:()=>s.vY,FocusTracker:()=>s.$x,KeystrokeHandler:()=>s.EP,Locale:()=>s.hT,ObservableMixin:()=>s.VM,Rect:()=>s.rw,ResizeObserver:()=>s.tb,abortableDebounce:()=>s.KL,compareArrays:()=>s.ww,count:()=>s.U9,createElement:()=>s.n,delay:()=>s.cb,diff:()=>s.Ui,diffToChanges:()=>s.q8,env:()=>s._K,exponentialDelay:()=>s.Nv,fastDiff:()=>s.Mr,findClosestScrollableAncestor:()=>s.j3,first:()=>s.$1,getAncestors:()=>s.DS,getBorderWidths:()=>s.Md,getCode:()=>s.QC,getDataFromElement:()=>s.pG,getEnvKeystrokeText:()=>s.YA,getLanguageDirection:()=>s.iJ,getLocalizedArrowKeyCodeDirection:()=>s.Kf,getOptimalPosition:()=>s.W,global:()=>s.Sf,indexOf:()=>s.qh,insertAt:()=>s.PT,insertToPriorityArray:()=>s.Yy,isArrowKeyCode:()=>s.Yt,isCombiningMark:()=>s.mY,isComment:()=>s.Cn,isForwardArrowKeyCode:()=>s.HK,isHighSurrogateHalf:()=>s.kv,isInsideCombinedSymbol:()=>s.Iw,isInsideEmojiSequence:()=>s.SQ,isInsideSurrogatePair:()=>s.P5,isIterable:()=>s.xZ,isLowSurrogateHalf:()=>s.k$,isNode:()=>s.Ll,isRange:()=>s._Z,isText:()=>s.KH,isValidAttributeName:()=>s.i8,isVisible:()=>s.zN,keyCodes:()=>s.uP,logError:()=>s.vV,logWarning:()=>s.FF,mix:()=>s.jh,parseKeystroke:()=>s.ZX,priorities:()=>s.vx,releaseDate:()=>s.kM,remove:()=>s.TF,retry:()=>s.L5,scrollAncestorsToShowTarget:()=>s.bi,scrollViewportToShowTarget:()=>s.vK,setDataInElement:()=>s.C_,spliceArray:()=>s.eL,toArray:()=>s.$r,toMap:()=>s.av,toUnit:()=>s.To,uid:()=>s.Ld,verifyLicense:()=>s.rQ,version:()=>s.rE,wait:()=>s.uk});var s=o("./packages/ckeditor5-utils/src/index.ts")},"./src/watchdog.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{ContextWatchdog:()=>s.Zd,EditorWatchdog:()=>s.VJ,Watchdog:()=>s.Io});var s=o("./packages/ckeditor5-watchdog/src/index.ts")},"./src/widget.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{WIDGET_CLASS_NAME:()=>s.iW,WIDGET_SELECTED_CLASS_NAME:()=>s.w_,Widget:()=>s.x0,WidgetResize:()=>s.VE,WidgetToolbarRepository:()=>s.oP,WidgetTypeAround:()=>s.oT,calculateResizeHostAncestorWidth:()=>s.Wu,calculateResizeHostPercentageWidth:()=>s.Hq,findOptimalInsertionRange:()=>s.iB,getLabel:()=>s.p9,isWidget:()=>s.p4,setHighlightHandling:()=>s._s,setLabel:()=>s.je,toWidget:()=>s.Ex,toWidgetEditable:()=>s.YN,viewToModelPositionOutsideModelElement:()=>s.$u});var s=o("./packages/ckeditor5-widget/src/index.ts")},"?7cdd":(e,t,o)=>{e.exports=o},"./node_modules/lodash-es/_ListCache.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>u});const s=function(){this.__data__=[],this.size=0};var i=o("./node_modules/lodash-es/eq.js");const n=function(e,t){for(var o=e.length;o--;)if((0,i.A)(e[o][0],t))return o;return-1};var r=Array.prototype.splice;const a=function(e){var t=this.__data__,o=n(t,e);return!(o<0)&&(o==t.length-1?t.pop():r.call(t,o,1),--this.size,!0)};const c=function(e){var t=this.__data__,o=n(t,e);return o<0?void 0:t[o][1]};const l=function(e){return n(this.__data__,e)>-1};const d=function(e,t){var o=this.__data__,s=n(o,e);return s<0?(++this.size,o.push([e,t])):o[s][1]=t,this};function h(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_getNative.js"),i=o("./node_modules/lodash-es/_root.js");const n=(0,s.A)(i.A,"Map")},"./node_modules/lodash-es/_MapCache.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>x});const s=(0,o("./node_modules/lodash-es/_getNative.js").A)(Object,"create");const i=function(){this.__data__=s?s(null):{},this.size=0};const n=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var r=Object.prototype.hasOwnProperty;const a=function(e){var t=this.__data__;if(s){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(t,e)?t[e]:void 0};var c=Object.prototype.hasOwnProperty;const l=function(e){var t=this.__data__;return s?void 0!==t[e]:c.call(t,e)};const d=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=s&&void 0===t?"__lodash_hash_undefined__":t,this};function h(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t{"use strict";o.d(t,{A:()=>u});var s=o("./node_modules/lodash-es/_ListCache.js");const i=function(){this.__data__=new s.A,this.size=0};const n=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o};const r=function(e){return this.__data__.get(e)};const a=function(e){return this.__data__.has(e)};var c=o("./node_modules/lodash-es/_Map.js"),l=o("./node_modules/lodash-es/_MapCache.js");const d=function(e,t){var o=this.__data__;if(o instanceof s.A){var i=o.__data__;if(!c.A||i.length<199)return i.push([e,t]),this.size=++o.size,this;o=this.__data__=new l.A(i)}return o.set(e,t),this.size=o.size,this};function h(e){var t=this.__data__=new s.A(e);this.size=t.size}h.prototype.clear=i,h.prototype.delete=n,h.prototype.get=r,h.prototype.has=a,h.prototype.set=d;const u=h},"./node_modules/lodash-es/_Symbol.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=o("./node_modules/lodash-es/_root.js").A.Symbol},"./node_modules/lodash-es/_Uint8Array.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=o("./node_modules/lodash-es/_root.js").A.Uint8Array},"./node_modules/lodash-es/_arrayLikeKeys.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>d});const s=function(e,t){for(var o=-1,s=Array(e);++o{"use strict";o.d(t,{A:()=>s});const s=function(e,t){for(var o=-1,s=t.length,i=e.length;++o{"use strict";o.d(t,{A:()=>r});var s=o("./node_modules/lodash-es/_baseAssignValue.js"),i=o("./node_modules/lodash-es/eq.js"),n=Object.prototype.hasOwnProperty;const r=function(e,t,o){var r=e[t];n.call(e,t)&&(0,i.A)(r,o)&&(void 0!==o||t in e)||(0,s.A)(e,t,o)}},"./node_modules/lodash-es/_baseAssignValue.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_defineProperty.js");const i=function(e,t,o){"__proto__"==t&&s.A?(0,s.A)(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}},"./node_modules/lodash-es/_baseClone.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>Q});var s=o("./node_modules/lodash-es/_Stack.js");const i=function(e,t){for(var o=-1,s=null==e?0:e.length;++o{"use strict";o.d(t,{A:()=>s});const s=function(e){return function(t,o,s){for(var i=-1,n=Object(t),r=s(t),a=r.length;a--;){var c=r[e?a:++i];if(!1===o(n[c],c,n))break}return t}}()},"./node_modules/lodash-es/_baseGet.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_castPath.js"),i=o("./node_modules/lodash-es/_toKey.js");const n=function(e,t){for(var o=0,n=(t=(0,s.A)(t,e)).length;null!=e&&o{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_arrayPush.js"),i=o("./node_modules/lodash-es/isArray.js");const n=function(e,t,o){var n=t(e);return(0,i.A)(e)?n:(0,s.A)(n,o(e))}},"./node_modules/lodash-es/_baseGetTag.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>u});var s=o("./node_modules/lodash-es/_Symbol.js"),i=Object.prototype,n=i.hasOwnProperty,r=i.toString,a=s.A?s.A.toStringTag:void 0;const c=function(e){var t=n.call(e,a),o=e[a];try{e[a]=void 0;var s=!0}catch(e){}var i=r.call(e);return s&&(t?e[a]=o:delete e[a]),i};var l=Object.prototype.toString;const d=function(e){return l.call(e)};var h=s.A?s.A.toStringTag:void 0;const u=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?c(e):d(e)}},"./node_modules/lodash-es/_baseIsEqual.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>R});var s=o("./node_modules/lodash-es/_Stack.js"),i=o("./node_modules/lodash-es/_MapCache.js");const n=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const r=function(e){return this.__data__.has(e)};function a(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new i.A;++ta))return!1;var u=n.get(e),p=n.get(t);if(u&&p)return u==t&&p==e;var m=-1,f=!0,g=2&o?new c:void 0;for(n.set(e,t),n.set(t,e);++m{"use strict";o.d(t,{A:()=>s});const s=function(e){return function(t){return e(t)}}},"./node_modules/lodash-es/_castPath.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>u});var s=o("./node_modules/lodash-es/isArray.js"),i=o("./node_modules/lodash-es/_isKey.js"),n=o("./node_modules/lodash-es/_MapCache.js");function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var o=function(){var s=arguments,i=t?t.apply(this,s):s[0],n=o.cache;if(n.has(i))return n.get(i);var r=e.apply(this,s);return o.cache=n.set(i,r)||n,r};return o.cache=new(r.Cache||n.A),o}r.Cache=n.A;const a=r;var c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g;const d=function(e){var t=a(e,(function(e){return 500===o.size&&o.clear(),e})),o=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(c,(function(e,o,s,i){t.push(s?i.replace(l,"$1"):o||e)})),t}));var h=o("./node_modules/lodash-es/toString.js");const u=function(e,t){return(0,s.A)(e)?e:(0,i.A)(e,t)?[e]:d((0,h.A)(e))}},"./node_modules/lodash-es/_cloneArrayBuffer.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_Uint8Array.js");const i=function(e){var t=new e.constructor(e.byteLength);return new s.A(t).set(new s.A(e)),t}},"./node_modules/lodash-es/_cloneBuffer.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var s=o("./node_modules/lodash-es/_root.js"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=i&&"object"==typeof module&&module&&!module.nodeType&&module,r=n&&n.exports===i?s.A.Buffer:void 0,a=r?r.allocUnsafe:void 0;const c=function(e,t){if(t)return e.slice();var o=e.length,s=a?a(o):new e.constructor(o);return e.copy(s),s}},"./node_modules/lodash-es/_cloneTypedArray.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_cloneArrayBuffer.js");const i=function(e,t){var o=t?(0,s.A)(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}},"./node_modules/lodash-es/_copyArray.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e,t){var o=-1,s=e.length;for(t||(t=Array(s));++o{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_assignValue.js"),i=o("./node_modules/lodash-es/_baseAssignValue.js");const n=function(e,t,o,n){var r=!o;o||(o={});for(var a=-1,c=t.length;++a{"use strict";o.d(t,{A:()=>b});var s=o("./node_modules/lodash-es/identity.js");const i=function(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)};var n=Math.max;const r=function(e,t,o){return t=n(void 0===t?e.length-1:t,0),function(){for(var s=arguments,r=-1,a=n(s.length-t,0),c=Array(a);++r0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(l);const u=function(e,t){return h(r(e,t,s.A),e+"")};var p=o("./node_modules/lodash-es/eq.js"),m=o("./node_modules/lodash-es/isArrayLike.js"),f=o("./node_modules/lodash-es/_isIndex.js"),g=o("./node_modules/lodash-es/isObject.js");const _=function(e,t,o){if(!(0,g.A)(o))return!1;var s=typeof t;return!!("number"==s?(0,m.A)(o)&&(0,f.A)(t,o.length):"string"==s&&t in o)&&(0,p.A)(o[t],e)};const b=function(e){return u((function(t,o){var s=-1,i=o.length,n=i>1?o[i-1]:void 0,r=i>2?o[2]:void 0;for(n=e.length>3&&"function"==typeof n?(i--,n):void 0,r&&_(o[0],o[1],r)&&(n=i<3?void 0:n,i=1),t=Object(t);++s{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_getNative.js");const i=function(){try{var e=(0,s.A)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},"./node_modules/lodash-es/_freeGlobal.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s="object"==typeof global&&global&&global.Object===Object&&global},"./node_modules/lodash-es/_getAllKeys.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var s=o("./node_modules/lodash-es/_baseGetAllKeys.js"),i=o("./node_modules/lodash-es/_getSymbols.js"),n=o("./node_modules/lodash-es/keys.js");const r=function(e){return(0,s.A)(e,n.A,i.A)}},"./node_modules/lodash-es/_getNative.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>b});var s=o("./node_modules/lodash-es/isFunction.js");const i=o("./node_modules/lodash-es/_root.js").A["__core-js_shared__"];var n,r=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";const a=function(e){return!!r&&r in e};var c=o("./node_modules/lodash-es/isObject.js"),l=o("./node_modules/lodash-es/_toSource.js"),d=/^\[object .+?Constructor\]$/,h=Function.prototype,u=Object.prototype,p=h.toString,m=u.hasOwnProperty,f=RegExp("^"+p.call(m).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const g=function(e){return!(!(0,c.A)(e)||a(e))&&((0,s.A)(e)?f:d).test((0,l.A)(e))};const _=function(e,t){return null==e?void 0:e[t]};const b=function(e,t){var o=_(e,t);return g(o)?o:void 0}},"./node_modules/lodash-es/_getPrototype.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=(0,o("./node_modules/lodash-es/_overArg.js").A)(Object.getPrototypeOf,Object)},"./node_modules/lodash-es/_getSymbols.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>a});const s=function(e,t){for(var o=-1,s=null==e?0:e.length,i=0,n=[];++o{"use strict";o.d(t,{A:()=>x});var s=o("./node_modules/lodash-es/_getNative.js"),i=o("./node_modules/lodash-es/_root.js");const n=(0,s.A)(i.A,"DataView");var r=o("./node_modules/lodash-es/_Map.js");const a=(0,s.A)(i.A,"Promise");const c=(0,s.A)(i.A,"Set");const l=(0,s.A)(i.A,"WeakMap");var d=o("./node_modules/lodash-es/_baseGetTag.js"),h=o("./node_modules/lodash-es/_toSource.js"),u="[object Map]",p="[object Promise]",m="[object Set]",f="[object WeakMap]",g="[object DataView]",_=(0,h.A)(n),b=(0,h.A)(r.A),k=(0,h.A)(a),w=(0,h.A)(c),v=(0,h.A)(l),y=d.A;(n&&y(new n(new ArrayBuffer(1)))!=g||r.A&&y(new r.A)!=u||a&&y(a.resolve())!=p||c&&y(new c)!=m||l&&y(new l)!=f)&&(y=function(e){var t=(0,d.A)(e),o="[object Object]"==t?e.constructor:void 0,s=o?(0,h.A)(o):"";if(s)switch(s){case _:return g;case b:return u;case k:return p;case w:return m;case v:return f}return t});const x=y},"./node_modules/lodash-es/_initCloneObject.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var s=o("./node_modules/lodash-es/isObject.js"),i=Object.create;const n=function(){function e(){}return function(t){if(!(0,s.A)(t))return{};if(i)return i(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();var r=o("./node_modules/lodash-es/_getPrototype.js"),a=o("./node_modules/lodash-es/_isPrototype.js");const c=function(e){return"function"!=typeof e.constructor||(0,a.A)(e)?{}:n((0,r.A)(e))}},"./node_modules/lodash-es/_isIndex.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=/^(?:0|[1-9]\d*)$/;const i=function(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&s.test(e))&&e>-1&&e%1==0&&e{"use strict";o.d(t,{A:()=>a});var s=o("./node_modules/lodash-es/isArray.js"),i=o("./node_modules/lodash-es/isSymbol.js"),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;const a=function(e,t){if((0,s.A)(e))return!1;var o=typeof e;return!("number"!=o&&"symbol"!=o&&"boolean"!=o&&null!=e&&!(0,i.A)(e))||(r.test(e)||!n.test(e)||null!=t&&e in Object(t))}},"./node_modules/lodash-es/_isPrototype.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=Object.prototype;const i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||s)}},"./node_modules/lodash-es/_nodeUtil.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var s=o("./node_modules/lodash-es/_freeGlobal.js"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=i&&"object"==typeof module&&module&&!module.nodeType&&module,r=n&&n.exports===i&&s.A.process;const a=function(){try{var e=n&&n.require&&n.require("util").types;return e||r&&r.binding&&r.binding("util")}catch(e){}}()},"./node_modules/lodash-es/_overArg.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e,t){return function(o){return e(t(o))}}},"./node_modules/lodash-es/_root.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_freeGlobal.js"),i="object"==typeof self&&self&&self.Object===Object&&self;const n=s.A||i||Function("return this")()},"./node_modules/lodash-es/_toKey.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/isSymbol.js");const i=function(e){if("string"==typeof e||(0,s.A)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},"./node_modules/lodash-es/_toSource.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=Function.prototype.toString;const i=function(e){if(null!=e){try{return s.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},"./node_modules/lodash-es/assignIn.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var s=o("./node_modules/lodash-es/_copyObject.js"),i=o("./node_modules/lodash-es/_createAssigner.js"),n=o("./node_modules/lodash-es/keysIn.js");const r=(0,i.A)((function(e,t){(0,s.A)(t,(0,n.A)(t),e)}))},"./node_modules/lodash-es/cloneDeep.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_baseClone.js");const i=function(e){return(0,s.A)(e,5)}},"./node_modules/lodash-es/cloneDeepWith.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_baseClone.js");const i=function(e,t){return t="function"==typeof t?t:void 0,(0,s.A)(e,5,t)}},"./node_modules/lodash-es/debounce.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>b});var s=o("./node_modules/lodash-es/isObject.js"),i=o("./node_modules/lodash-es/_root.js");const n=function(){return i.A.Date.now()};var r=/\s/;const a=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t};var c=/^\s+/;const l=function(e){return e?e.slice(0,a(e)+1).replace(c,""):e};var d=o("./node_modules/lodash-es/isSymbol.js"),h=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,p=/^0o[0-7]+$/i,m=parseInt;const f=function(e){if("number"==typeof e)return e;if((0,d.A)(e))return NaN;if((0,s.A)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,s.A)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=l(e);var o=u.test(e);return o||p.test(e)?m(e.slice(2),o?2:8):h.test(e)?NaN:+e};var g=Math.max,_=Math.min;const b=function(e,t,o){var i,r,a,c,l,d,h=0,u=!1,p=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var o=i,s=r;return i=r=void 0,h=t,c=e.apply(s,o)}function k(e){var o=e-d;return void 0===d||o>=t||o<0||p&&e-h>=a}function w(){var e=n();if(k(e))return v(e);l=setTimeout(w,function(e){var o=t-(e-d);return p?_(o,a-(e-h)):o}(e))}function v(e){return l=void 0,m&&i?b(e):(i=r=void 0,c)}function y(){var e=n(),o=k(e);if(i=arguments,r=this,d=e,o){if(void 0===l)return function(e){return h=e,l=setTimeout(w,t),u?b(e):c}(d);if(p)return clearTimeout(l),l=setTimeout(w,t),b(d)}return void 0===l&&(l=setTimeout(w,t)),c}return t=f(t)||0,(0,s.A)(o)&&(u=!!o.leading,a=(p="maxWait"in o)?g(f(o.maxWait)||0,t):a,m="trailing"in o?!!o.trailing:m),y.cancel=function(){void 0!==l&&clearTimeout(l),h=0,i=d=r=l=void 0},y.flush=function(){return void 0===l?c:v(n())},y}},"./node_modules/lodash-es/eq.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e,t){return e===t||e!=e&&t!=t}},"./node_modules/lodash-es/escapeRegExp.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var s=o("./node_modules/lodash-es/toString.js"),i=/[\\^$.*+?()[\]{}|]/g,n=RegExp(i.source);const r=function(e){return(e=(0,s.A)(e))&&n.test(e)?e.replace(i,"\\$&"):e}},"./node_modules/lodash-es/get.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_baseGet.js");const i=function(e,t,o){var i=null==e?void 0:(0,s.A)(e,t);return void 0===i?o:i}},"./node_modules/lodash-es/identity.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e){return e}},"./node_modules/lodash-es/isArguments.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>l});var s=o("./node_modules/lodash-es/_baseGetTag.js"),i=o("./node_modules/lodash-es/isObjectLike.js");const n=function(e){return(0,i.A)(e)&&"[object Arguments]"==(0,s.A)(e)};var r=Object.prototype,a=r.hasOwnProperty,c=r.propertyIsEnumerable;const l=n(function(){return arguments}())?n:function(e){return(0,i.A)(e)&&a.call(e,"callee")&&!c.call(e,"callee")}},"./node_modules/lodash-es/isArray.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=Array.isArray},"./node_modules/lodash-es/isArrayLike.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/isFunction.js"),i=o("./node_modules/lodash-es/isLength.js");const n=function(e){return null!=e&&(0,i.A)(e.length)&&!(0,s.A)(e)}},"./node_modules/lodash-es/isBuffer.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var s=o("./node_modules/lodash-es/_root.js");const i=function(){return!1};var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=r&&r.exports===n?s.A.Buffer:void 0;const c=(a?a.isBuffer:void 0)||i},"./node_modules/lodash-es/isElement.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/isObjectLike.js"),i=o("./node_modules/lodash-es/isPlainObject.js");const n=function(e){return(0,s.A)(e)&&1===e.nodeType&&!(0,i.A)(e)}},"./node_modules/lodash-es/isFunction.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_baseGetTag.js"),i=o("./node_modules/lodash-es/isObject.js");const n=function(e){if(!(0,i.A)(e))return!1;var t=(0,s.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},"./node_modules/lodash-es/isLength.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},"./node_modules/lodash-es/isObject.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},"./node_modules/lodash-es/isObjectLike.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e){return null!=e&&"object"==typeof e}},"./node_modules/lodash-es/isPlainObject.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>h});var s=o("./node_modules/lodash-es/_baseGetTag.js"),i=o("./node_modules/lodash-es/_getPrototype.js"),n=o("./node_modules/lodash-es/isObjectLike.js"),r=Function.prototype,a=Object.prototype,c=r.toString,l=a.hasOwnProperty,d=c.call(Object);const h=function(e){if(!(0,n.A)(e)||"[object Object]"!=(0,s.A)(e))return!1;var t=(0,i.A)(e);if(null===t)return!0;var o=l.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&c.call(o)==d}},"./node_modules/lodash-es/isSymbol.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_baseGetTag.js"),i=o("./node_modules/lodash-es/isObjectLike.js");const n=function(e){return"symbol"==typeof e||(0,i.A)(e)&&"[object Symbol]"==(0,s.A)(e)}},"./node_modules/lodash-es/isTypedArray.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>h});var s=o("./node_modules/lodash-es/_baseGetTag.js"),i=o("./node_modules/lodash-es/isLength.js"),n=o("./node_modules/lodash-es/isObjectLike.js"),r={};r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1;const a=function(e){return(0,n.A)(e)&&(0,i.A)(e.length)&&!!r[(0,s.A)(e)]};var c=o("./node_modules/lodash-es/_baseUnary.js"),l=o("./node_modules/lodash-es/_nodeUtil.js"),d=l.A&&l.A.isTypedArray;const h=d?(0,c.A)(d):a},"./node_modules/lodash-es/keys.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>l});var s=o("./node_modules/lodash-es/_arrayLikeKeys.js"),i=o("./node_modules/lodash-es/_isPrototype.js");const n=(0,o("./node_modules/lodash-es/_overArg.js").A)(Object.keys,Object);var r=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,i.A)(e))return n(e);var t=[];for(var o in Object(e))r.call(e,o)&&"constructor"!=o&&t.push(o);return t};var c=o("./node_modules/lodash-es/isArrayLike.js");const l=function(e){return(0,c.A)(e)?(0,s.A)(e):a(e)}},"./node_modules/lodash-es/keysIn.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var s=o("./node_modules/lodash-es/_arrayLikeKeys.js"),i=o("./node_modules/lodash-es/isObject.js"),n=o("./node_modules/lodash-es/_isPrototype.js");const r=function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t};var a=Object.prototype.hasOwnProperty;const c=function(e){if(!(0,i.A)(e))return r(e);var t=(0,n.A)(e),o=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&o.push(s);return o};var l=o("./node_modules/lodash-es/isArrayLike.js");const d=function(e){return(0,l.A)(e)?(0,s.A)(e,!0):c(e)}},"./node_modules/lodash-es/merge.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>P});var s=o("./node_modules/lodash-es/_Stack.js"),i=o("./node_modules/lodash-es/_baseAssignValue.js"),n=o("./node_modules/lodash-es/eq.js");const r=function(e,t,o){(void 0!==o&&!(0,n.A)(e[t],o)||void 0===o&&!(t in e))&&(0,i.A)(e,t,o)};var a=o("./node_modules/lodash-es/_baseFor.js"),c=o("./node_modules/lodash-es/_cloneBuffer.js"),l=o("./node_modules/lodash-es/_cloneTypedArray.js"),d=o("./node_modules/lodash-es/_copyArray.js"),h=o("./node_modules/lodash-es/_initCloneObject.js"),u=o("./node_modules/lodash-es/isArguments.js"),p=o("./node_modules/lodash-es/isArray.js"),m=o("./node_modules/lodash-es/isArrayLike.js"),f=o("./node_modules/lodash-es/isObjectLike.js");const g=function(e){return(0,f.A)(e)&&(0,m.A)(e)};var _=o("./node_modules/lodash-es/isBuffer.js"),b=o("./node_modules/lodash-es/isFunction.js"),k=o("./node_modules/lodash-es/isObject.js"),w=o("./node_modules/lodash-es/isPlainObject.js"),v=o("./node_modules/lodash-es/isTypedArray.js");const y=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var x=o("./node_modules/lodash-es/_copyObject.js"),A=o("./node_modules/lodash-es/keysIn.js");const C=function(e){return(0,x.A)(e,(0,A.A)(e))};const T=function(e,t,o,s,i,n,a){var m=y(e,o),f=y(t,o),x=a.get(f);if(x)r(e,o,x);else{var A=n?n(m,f,o+"",e,t,a):void 0,T=void 0===A;if(T){var E=(0,p.A)(f),P=!E&&(0,_.A)(f),S=!E&&!P&&(0,v.A)(f);A=f,E||P||S?(0,p.A)(m)?A=m:g(m)?A=(0,d.A)(m):P?(T=!1,A=(0,c.A)(f,!0)):S?(T=!1,A=(0,l.A)(f,!0)):A=[]:(0,w.A)(f)||(0,u.A)(f)?(A=m,(0,u.A)(m)?A=C(m):(0,k.A)(m)&&!(0,b.A)(m)||(A=(0,h.A)(f))):T=!1}T&&(a.set(f,A),i(A,f,s,n,a),a.delete(f)),r(e,o,A)}};const E=function e(t,o,i,n,c){t!==o&&(0,a.A)(o,(function(a,l){if(c||(c=new s.A),(0,k.A)(a))T(t,o,l,i,e,n,c);else{var d=n?n(y(t,l),a,l+"",t,o,c):void 0;void 0===d&&(d=a),r(t,l,d)}}),A.A)};const P=(0,o("./node_modules/lodash-es/_createAssigner.js").A)((function(e,t,o){E(e,t,o)}))},"./node_modules/lodash-es/stubArray.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(){return[]}},"./node_modules/lodash-es/throttle.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/debounce.js"),i=o("./node_modules/lodash-es/isObject.js");const n=function(e,t,o){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return(0,i.A)(o)&&(n="leading"in o?!!o.leading:n,r="trailing"in o?!!o.trailing:r),(0,s.A)(e,t,{leading:n,maxWait:t,trailing:r})}},"./node_modules/lodash-es/toString.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var s=o("./node_modules/lodash-es/_Symbol.js");const i=function(e,t){for(var o=-1,s=null==e?0:e.length,i=Array(s);++o{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var s=o("?7cdd");(window.CKEditor5=window.CKEditor5||{}).dll=s})(),function(e){e.CKEditor5=e.CKEditor5||{};const t=["utils","core","engine","ui","clipboard","enter","paragraph","select-all","typing","undo","upload","widget","watchdog"];for(const o of t){const t=o.replace(/-([a-z])/g,((e,t)=>t.toUpperCase()));e.CKEditor5[t]=e.CKEditor5.dll(`./src/${o}.js`)}}(window); \ No newline at end of file + */(()=>{var e={"./node_modules/color-convert/conversions.js":(e,t,o)=>{const s=o("./node_modules/color-name/index.js"),i={};for(const e of Object.keys(s))i[s[e]]=e;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:o}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:o})}n.rgb.hsl=function(e){const t=e[0]/255,o=e[1]/255,s=e[2]/255,i=Math.min(t,o,s),n=Math.max(t,o,s),r=n-i;let a,c;n===i?a=0:t===n?a=(o-s)/r:o===n?a=2+(s-t)/r:s===n&&(a=4+(t-o)/r),a=Math.min(60*a,360),a<0&&(a+=360);const l=(i+n)/2;return c=n===i?0:l<=.5?r/(n+i):r/(2-n-i),[a,100*c,100*l]},n.rgb.hsv=function(e){let t,o,s,i,n;const r=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(r,a,c),d=l-Math.min(r,a,c),h=function(e){return(l-e)/6/d+.5};return 0===d?(i=0,n=0):(n=d/l,t=h(r),o=h(a),s=h(c),r===l?i=s-o:a===l?i=1/3+t-s:c===l&&(i=2/3+o-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*n,100*l]},n.rgb.hwb=function(e){const t=e[0],o=e[1];let s=e[2];const i=n.rgb.hsl(e)[0],r=1/255*Math.min(t,Math.min(o,s));return s=1-1/255*Math.max(t,Math.max(o,s)),[i,100*r,100*s]},n.rgb.cmyk=function(e){const t=e[0]/255,o=e[1]/255,s=e[2]/255,i=Math.min(1-t,1-o,1-s);return[100*((1-t-i)/(1-i)||0),100*((1-o-i)/(1-i)||0),100*((1-s-i)/(1-i)||0),100*i]},n.rgb.keyword=function(e){const t=i[e];if(t)return t;let o,n=1/0;for(const t of Object.keys(s)){const i=s[t],c=(a=i,((r=e)[0]-a[0])**2+(r[1]-a[1])**2+(r[2]-a[2])**2);c.04045?((t+.055)/1.055)**2.4:t/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92;return[100*(.4124*t+.3576*o+.1805*s),100*(.2126*t+.7152*o+.0722*s),100*(.0193*t+.1192*o+.9505*s)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let o=t[0],s=t[1],i=t[2];o/=95.047,s/=100,i/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*s-16,500*(o-s),200*(s-i)]},n.hsl.rgb=function(e){const t=e[0]/360,o=e[1]/100,s=e[2]/100;let i,n,r;if(0===o)return r=255*s,[r,r,r];i=s<.5?s*(1+o):s+o-s*o;const a=2*s-i,c=[0,0,0];for(let e=0;e<3;e++)n=t+1/3*-(e-1),n<0&&n++,n>1&&n--,r=6*n<1?a+6*(i-a)*n:2*n<1?i:3*n<2?a+(i-a)*(2/3-n)*6:a,c[e]=255*r;return c},n.hsl.hsv=function(e){const t=e[0];let o=e[1]/100,s=e[2]/100,i=o;const n=Math.max(s,.01);s*=2,o*=s<=1?s:2-s,i*=n<=1?n:2-n;return[t,100*(0===s?2*i/(n+i):2*o/(s+o)),100*((s+o)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,o=e[1]/100;let s=e[2]/100;const i=Math.floor(t)%6,n=t-Math.floor(t),r=255*s*(1-o),a=255*s*(1-o*n),c=255*s*(1-o*(1-n));switch(s*=255,i){case 0:return[s,c,r];case 1:return[a,s,r];case 2:return[r,s,c];case 3:return[r,a,s];case 4:return[c,r,s];case 5:return[s,r,a]}},n.hsv.hsl=function(e){const t=e[0],o=e[1]/100,s=e[2]/100,i=Math.max(s,.01);let n,r;r=(2-o)*s;const a=(2-o)*i;return n=o*i,n/=a<=1?a:2-a,n=n||0,r/=2,[t,100*n,100*r]},n.hwb.rgb=function(e){const t=e[0]/360;let o=e[1]/100,s=e[2]/100;const i=o+s;let n;i>1&&(o/=i,s/=i);const r=Math.floor(6*t),a=1-s;n=6*t-r,1&r&&(n=1-n);const c=o+n*(a-o);let l,d,h;switch(r){default:case 6:case 0:l=a,d=c,h=o;break;case 1:l=c,d=a,h=o;break;case 2:l=o,d=a,h=c;break;case 3:l=o,d=c,h=a;break;case 4:l=c,d=o,h=a;break;case 5:l=a,d=o,h=c}return[255*l,255*d,255*h]},n.cmyk.rgb=function(e){const t=e[0]/100,o=e[1]/100,s=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,o*(1-i)+i)),255*(1-Math.min(1,s*(1-i)+i))]},n.xyz.rgb=function(e){const t=e[0]/100,o=e[1]/100,s=e[2]/100;let i,n,r;return i=3.2406*t+-1.5372*o+-.4986*s,n=-.9689*t+1.8758*o+.0415*s,r=.0557*t+-.204*o+1.057*s,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,i=Math.min(Math.max(0,i),1),n=Math.min(Math.max(0,n),1),r=Math.min(Math.max(0,r),1),[255*i,255*n,255*r]},n.xyz.lab=function(e){let t=e[0],o=e[1],s=e[2];t/=95.047,o/=100,s/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;return[116*o-16,500*(t-o),200*(o-s)]},n.lab.xyz=function(e){let t,o,s;o=(e[0]+16)/116,t=e[1]/500+o,s=o-e[2]/200;const i=o**3,n=t**3,r=s**3;return o=i>.008856?i:(o-16/116)/7.787,t=n>.008856?n:(t-16/116)/7.787,s=r>.008856?r:(s-16/116)/7.787,t*=95.047,o*=100,s*=108.883,[t,o,s]},n.lab.lch=function(e){const t=e[0],o=e[1],s=e[2];let i;i=360*Math.atan2(s,o)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(o*o+s*s),i]},n.lch.lab=function(e){const t=e[0],o=e[1],s=e[2]/360*2*Math.PI;return[t,o*Math.cos(s),o*Math.sin(s)]},n.rgb.ansi16=function(e,t=null){const[o,s,i]=e;let r=null===t?n.rgb.hsv(e)[2]:t;if(r=Math.round(r/50),0===r)return 30;let a=30+(Math.round(i/255)<<2|Math.round(s/255)<<1|Math.round(o/255));return 2===r&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],o=e[1],s=e[2];if(t===o&&o===s)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(s/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const o=.5*(1+~~(e>50));return[(1&t)*o*255,(t>>1&1)*o*255,(t>>2&1)*o*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let o=t[0];3===t[0].length&&(o=o.split("").map((e=>e+e)).join(""));const s=parseInt(o,16);return[s>>16&255,s>>8&255,255&s]},n.rgb.hcg=function(e){const t=e[0]/255,o=e[1]/255,s=e[2]/255,i=Math.max(Math.max(t,o),s),n=Math.min(Math.min(t,o),s),r=i-n;let a,c;return a=r<1?n/(1-r):0,c=r<=0?0:i===t?(o-s)/r%6:i===o?2+(s-t)/r:4+(t-o)/r,c/=6,c%=1,[360*c,100*r,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,o=e[2]/100,s=o<.5?2*t*o:2*t*(1-o);let i=0;return s<1&&(i=(o-.5*s)/(1-s)),[e[0],100*s,100*i]},n.hsv.hcg=function(e){const t=e[1]/100,o=e[2]/100,s=t*o;let i=0;return s<1&&(i=(o-s)/(1-s)),[e[0],100*s,100*i]},n.hcg.rgb=function(e){const t=e[0]/360,o=e[1]/100,s=e[2]/100;if(0===o)return[255*s,255*s,255*s];const i=[0,0,0],n=t%1*6,r=n%1,a=1-r;let c=0;switch(Math.floor(n)){case 0:i[0]=1,i[1]=r,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=r;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=r,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-o)*s,[255*(o*i[0]+c),255*(o*i[1]+c),255*(o*i[2]+c)]},n.hcg.hsv=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);let s=0;return o>0&&(s=t/o),[e[0],100*s,100*o]},n.hcg.hsl=function(e){const t=e[1]/100,o=e[2]/100*(1-t)+.5*t;let s=0;return o>0&&o<.5?s=t/(2*o):o>=.5&&o<1&&(s=t/(2*(1-o))),[e[0],100*s,100*o]},n.hcg.hwb=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);return[e[0],100*(o-t),100*(1-o)]},n.hwb.hcg=function(e){const t=e[1]/100,o=1-e[2]/100,s=o-t;let i=0;return s<1&&(i=(o-s)/(1-s)),[e[0],100*s,100*i]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),o=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(o.length)+o},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},"./node_modules/color-convert/index.js":(e,t,o)=>{const s=o("./node_modules/color-convert/conversions.js"),i=o("./node_modules/color-convert/route.js"),n={};Object.keys(s).forEach((e=>{n[e]={},Object.defineProperty(n[e],"channels",{value:s[e].channels}),Object.defineProperty(n[e],"labels",{value:s[e].labels});const t=i(e);Object.keys(t).forEach((o=>{const s=t[o];n[e][o]=function(e){const t=function(...t){const o=t[0];if(null==o)return o;o.length>1&&(t=o);const s=e(t);if("object"==typeof s)for(let e=s.length,t=0;t1&&(t=o),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(s)}))})),e.exports=n},"./node_modules/color-convert/route.js":(e,t,o)=>{const s=o("./node_modules/color-convert/conversions.js");function i(e){const t=function(){const e={},t=Object.keys(s);for(let o=t.length,s=0;s{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,'.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}: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}',""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}@media (forced-colors:active){.ck .ck-placeholder,.ck.ck-placeholder{forced-color-adjust:preserve-parent-color}}.ck .ck-placeholder:before,.ck.ck-placeholder:before{cursor:text}@media (forced-colors:none){.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text)}}@media (forced-colors:active){.ck .ck-placeholder:before,.ck.ck-placeholder:before{font-style:italic;margin-left:1px}}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/arialiveannouncer/arialiveannouncer.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-aria-live-announcer{left:-10000px;position:absolute;top:-10000px}.ck.ck-aria-live-region-list{list-style-type:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/autocomplete/autocomplete.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-autocomplete{position:relative}.ck.ck-autocomplete>.ck-search__results{position:absolute;z-index:var(--ck-z-panel)}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{bottom:100%}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{bottom:auto;top:100%}.ck.ck-autocomplete>.ck-search__results{border-radius:0}.ck-rounded-corners .ck.ck-autocomplete>.ck-search__results,.ck.ck-autocomplete>.ck-search__results.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-autocomplete>.ck-search__results{background:var(--ck-color-base-background);border:1px solid var(--ck-color-dropdown-panel-border);box-shadow:var(--ck-drop-shadow),0 0;max-height:200px;min-width:auto;overflow-y:auto}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{border-bottom-left-radius:0;border-bottom-right-radius:0;margin-bottom:-1px}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{border-top-left-radius:0;border-top-right-radius:0;margin-top:-1px}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir=ltr] .ck.ck-button,[dir=ltr] a.ck.ck-button{justify-content:left}[dir=rtl] .ck.ck-button,[dir=rtl] a.ck.ck-button{justify-content:right}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}@media (prefers-reduced-motion:reduce){.ck.ck-button,a.ck.ck-button{transition:none}}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{opacity:.5}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}@media (prefers-reduced-motion:reduce){.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{transition:none}}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/collapsible/collapsible.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;color:inherit;font-weight:700;padding:var(--ck-list-button-padding);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:var(--ck-spacing-medium) var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{transition:box-shadow .2s ease}@media (forced-colors:none){.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile.ck-color-selector__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}}@media (forced-colors:active){.ck.ck-color-grid__tile{height:unset;min-height:unset;min-width:unset;padding:0 var(--ck-spacing-small);width:unset}.ck.ck-color-grid__tile .ck-button__label{display:inline-block}}@media (prefers-reduced-motion:reduce){.ck.ck-color-grid__tile{transition:none}}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorpicker/colorpicker.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".color-picker-hex-input{width:max-content}.color-picker-hex-input .ck.ck-input{min-width:unset}.ck.ck-color-picker__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;margin:var(--ck-spacing-large) 0 0;width:unset}.ck.ck-color-picker__row .ck.ck-labeled-field-view{padding-top:unset}.ck.ck-color-picker__row .ck.ck-input-text{width:unset}.ck.ck-color-picker__row .ck-color-picker__hash-view{padding-right:var(--ck-spacing-medium);padding-top:var(--ck-spacing-tiny)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorselector/colorselector.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{align-items:center;display:flex}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{justify-content:flex-start}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{display:flex;flex-direction:row;justify-content:space-around}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-cancel,.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-save{flex:1}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{width:100%}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-left:var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment label.ck.ck-color-grid__label{font-weight:unset}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker{padding:8px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker{height:100px;min-width:180px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation){border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue){border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius)}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue-pointer),.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation-pointer){height:15px;width:15px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{padding:0 8px 8px}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dialog/dialog.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-dialog-overlay{bottom:0;left:0;overscroll-behavior:none;position:fixed;right:0;top:0;user-select:none}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent{animation:none;background:none;pointer-events:none}.ck.ck-dialog{overscroll-behavior:none;position:absolute;width:fit-content}.ck.ck-dialog .ck.ck-form__header{flex-shrink:0}.ck.ck-dialog .ck.ck-form__header .ck-form__header__label{cursor:grab}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent .ck.ck-dialog{pointer-events:all}:root{--ck-dialog-overlay-background-color:rgba(0,0,0,.5);--ck-dialog-drop-shadow:0px 0px 6px 2px rgba(0,0,0,.15);--ck-dialog-max-width:100vw;--ck-dialog-max-height:90vh;--ck-color-dialog-background:var(--ck-color-base-background);--ck-color-dialog-form-header-border:var(--ck-color-base-border)}.ck.ck-dialog-overlay{animation:ck-dialog-fade-in .3s;background:var(--ck-dialog-overlay-background-color);z-index:var(--ck-z-dialog)}.ck.ck-dialog{border-radius:0}.ck-rounded-corners .ck.ck-dialog,.ck.ck-dialog.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dialog{box-shadow:var(--ck-drop-shadow),0 0;--ck-drop-shadow:var(--ck-dialog-drop-shadow);background:var(--ck-color-dialog-background);border:1px solid var(--ck-color-base-border);max-height:var(--ck-dialog-max-height);max-width:var(--ck-dialog-max-width)}.ck.ck-dialog .ck.ck-form__header{border-bottom:1px solid var(--ck-color-dialog-form-header-border)}@keyframes ck-dialog-fade-in{0%{background:transparent}to{background:var(--ck-dialog-overlay-background-color)}}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dialog/dialogactions.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-dialog .ck.ck-dialog__actions{display:flex;justify-content:flex-end;padding:var(--ck-spacing-large)}.ck.ck-dialog .ck.ck-dialog__actions>*+*{margin-left:var(--ck-spacing-large)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-panel) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}.ck.ck-dropdown__panel:focus{outline:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-dropdown>.ck-dropdown__panel>.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton>.ck-splitbutton__arrow:not(:focus){border-bottom-width:0;border-top-width:0}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:focus:after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:focus:after{--ck-color-split-button-hover-border:var(--ck-color-focus-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/accessibilityhelp.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-accessibility-help-dialog-max-width:600px;--ck-accessibility-help-dialog-max-height:400px;--ck-accessibility-help-dialog-border-color:#ccced1;--ck-accessibility-help-dialog-code-background-color:#ededed;--ck-accessibility-help-dialog-kbd-shadow-color:#9c9c9c}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content{border:1px solid transparent;max-height:var(--ck-accessibility-help-dialog-max-height);max-width:var(--ck-accessibility-help-dialog-max-width);overflow:auto;padding:var(--ck-spacing-large);user-select:text}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content{*{white-space:normal}}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content .ck-label{display:none}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h3{font-size:1.2em;font-weight:700}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h4{font-size:1em;font-weight:700}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h3,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h4,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content p,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content table{margin:1em 0}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl{border-bottom:none;border-top:1px solid var(--ck-accessibility-help-dialog-border-color);display:grid;grid-template-columns:2fr 1fr}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dd,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dt{border-bottom:1px solid var(--ck-accessibility-help-dialog-border-color);padding:.4em 0}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dt{grid-column-start:1}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dd{grid-column-start:2;text-align:right}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content code,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd{background:var(--ck-accessibility-help-dialog-code-background-color);border-radius:2px;display:inline-block;font-size:.9em;line-height:1;padding:.4em;text-align:center;vertical-align:middle}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content code{font-family:monospace}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd{box-shadow:0 1px 1px var(--ck-accessibility-help-dialog-kbd-shadow-color);margin:0 1px;min-width:1.8em}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd+kbd{margin-left:2px}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__header h2.ck-form__header__label{flex-grow:1}:root{--ck-form-header-height:44px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}[dir=ltr] .ck.ck-form__header>.ck-icon{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-form__header>.ck-icon{margin-left:var(--ck-spacing-medium)}.ck.ck-form__header .ck-form__header__label{--ck-font-size-base:15px;font-weight:700}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/highlightedtext/highlightedtext.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-highlighted-text mark{background:var(--ck-color-highlight-background);font-size:inherit;font-weight:inherit;line-height:inherit;vertical-align:initial}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}@media (prefers-reduced-motion:reduce){.ck.ck-input{transition:none}}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}@media (prefers-reduced-motion:reduce){.ck.ck-input.ck-error{animation:none}}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0;transform:translate(calc(var(--ck-spacing-medium)*-1),-6px) scale(.75);transform-origin:100% 0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}@media (prefers-reduced-motion:reduce){.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transition:none}}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}:root{--ck-list-button-padding:calc(var(--ck-line-height-base)*0.11*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*0.4*var(--ck-font-size-base))}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item>.ck-button{border-radius:0;min-height:unset;width:100%}[dir=ltr] .ck.ck-list__item>.ck-button{text-align:left}[dir=rtl] .ck.ck-list__item>.ck-button{text-align:right}.ck.ck-list__item>.ck-button{padding:var(--ck-list-button-padding)}.ck.ck-list__item>.ck-button:active{box-shadow:none}.ck.ck-list__item>.ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item>.ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item>.ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item>.ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item>.ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item>.ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item>.ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck-list .ck-list__group{padding-top:var(--ck-spacing-medium);:not(.ck-hidden)~&{border-top:1px solid var(--ck-color-base-border)}}.ck-list .ck-list__group>.ck-label{font-size:11px;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-medium) 0 var(--ck-spacing-medium)}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubar.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-menu-bar{background:var(--ck-color-base-background);border:1px solid var(--ck-color-toolbar-border);display:flex;flex-wrap:wrap;gap:var(--ck-spacing-small);justify-content:flex-start;padding:var(--ck-spacing-small);width:100%}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenu.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-menu-bar__menu{display:block;font-size:inherit;position:relative}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level{max-width:100%}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenubutton.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-menu-bar__menu>.ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button{padding:var(--ck-list-button-padding);width:100%}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button>.ck-button__label{flex-grow:1;overflow:hidden;text-overflow:ellipsis}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button.ck-disabled>.ck-button__label{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-menu-bar__menu>.ck-menu-bar__menu__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-menu-bar__menu>.ck-menu-bar__menu__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button{min-height:unset;padding:var(--ck-spacing-small) var(--ck-spacing-medium)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button .ck-button__label{line-height:unset;width:unset}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button .ck-icon{display:none}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button{border-radius:0}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:focus{border-color:transparent;box-shadow:none}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:focus:not(.ck-on){background:var(--ck-color-button-default-hover-background)}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:not(:has(.ck-button__icon))>.ck-button__label{margin-left:calc(var(--ck-icon-size) - var(--ck-spacing-small))}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{transform:rotate(-90deg)}[dir=rtl] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{transform:rotate(90deg)}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button.ck-disabled>.ck-menu-bar__menu__button__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenulistitem.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-menu-bar-menu-item-min-width:18em}.ck.ck-menu-bar__menu .ck.ck-menu-bar__menu__item{min-width:var(--ck-menu-bar-menu-item-min-width)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenulistitembutton.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button{border-radius:0}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container,.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container .ck-spinner{--ck-toolbar-spinner-size:20px}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button:focus{border-color:transparent;box-shadow:none}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button:focus:not(.ck-on){background:var(--ck-color-button-default-hover-background)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__panel>ul>.ck-menu-bar__menu__item>.ck-menu-bar__menu__item__button:not(:has(.ck-button__icon))>.ck-button__label{margin-left:calc(var(--ck-icon-size) - var(--ck-spacing-small))}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenupanel.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-menu-bar-menu-max-width:75vw;--ck-menu-bar-nested-menu-horizontal-offset:5px}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{max-width:var(--ck-menu-bar-menu-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw{bottom:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{bottom:auto;top:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se{left:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{right:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{left:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en{bottom:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{right:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn{bottom:0}:root{--ck-menu-bar-menu-panel-max-width:75vw}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{border-radius:0}.ck-rounded-corners .ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;height:fit-content;max-width:var(--ck-menu-bar-menu-panel-max-width)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se{border-top-left-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{border-top-right-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne{border-bottom-left-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn{border-bottom-right-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel:focus{outline:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-panel)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-panel) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-panel)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/search/search.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{position:absolute;top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{left:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{right:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view .ck-search__reset{position:absolute;top:50%;transform:translateY(-50%)}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{display:block}.ck.ck-search>.ck-search__results>.ck-search__info:not(.ck-hidden)~*{display:none}:root{--ck-search-field-view-horizontal-spacing:calc(var(--ck-icon-size) + var(--ck-spacing-medium))}.ck.ck-search>.ck-labeled-field-view .ck-input{width:100%}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon{--ck-labeled-field-label-default-position-x:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon>.ck-labeled-field-view__input-wrapper>.ck-icon{opacity:.5;pointer-events:none}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input,[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input:not(.ck-input-text_empty){padding-left:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset{--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset.ck-labeled-field-view_empty{--ck-labeled-field-empty-unfocused-max-width:100% - var(--ck-search-field-view-horizontal-spacing) - var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{background:none;min-height:auto;min-width:auto;opacity:.5;padding:0}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{left:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset:hover{opacity:1}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input:not(.ck-input-text_empty),[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input{padding-right:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-search__results{min-width:100%}.ck.ck-search>.ck-search__results>.ck-search__info{padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-search>.ck-search__results>.ck-search__info *{white-space:normal}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{font-weight:700}.ck.ck-search>.ck-search__results>.ck-search__info>span:last-child{margin-top:var(--ck-spacing-medium)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/spinner/spinner.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-spinner-container{display:block;position:relative}.ck.ck-spinner{left:0;margin:0 auto;position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:1}:root{--ck-toolbar-spinner-size:18px}.ck.ck-spinner-container{animation:ck-spinner-rotate 1.5s linear infinite;height:var(--ck-toolbar-spinner-size);width:var(--ck-toolbar-spinner-size)}@media (prefers-reduced-motion:reduce){.ck.ck-spinner-container{animation-duration:3s}}.ck.ck-spinner{border:2px solid var(--ck-color-text);border-radius:50%;border-top:2px solid transparent;height:var(--ck-toolbar-spinner-size);width:var(--ck-toolbar-spinner-size)}@keyframes ck-spinner-rotate{to{transform:rotate(1turn)}}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/textarea/textarea.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck-textarea{overflow-x:hidden}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{background:var(--ck-color-toolbar-border);height:var(--ck-icon-size);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck.ck-toolbar:focus{outline:none}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck.ck-balloon-panel.ck-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:calc(var(--ck-z-dialog) + 100);--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-tooltip-text-padding:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip.ck-tooltip_multi-line .ck-tooltip__text{display:inline-block;max-width:200px;padding:var(--ck-tooltip-text-padding) 0;white-space:break-spaces}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck-hidden{display:none!important}:root{--ck-z-default:1;--ck-z-panel:calc(var(--ck-z-default) + 999);--ck-z-dialog:9999}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-powered-by-line-height:10px;--ck-powered-by-padding-vertical:2px;--ck-powered-by-padding-horizontal:4px;--ck-powered-by-text-color:#4f4f4f;--ck-powered-by-border-radius:var(--ck-border-radius);--ck-powered-by-background:#fff;--ck-powered-by-border-color:var(--ck-color-focus-border)}.ck.ck-balloon-panel.ck-powered-by-balloon{--ck-border-radius:var(--ck-powered-by-border-radius);background:var(--ck-powered-by-background);box-shadow:none;min-height:unset;z-index:calc(var(--ck-z-panel) - 1)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by{line-height:var(--ck-powered-by-line-height)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by a{align-items:center;cursor:pointer;display:flex;filter:grayscale(80%);line-height:var(--ck-powered-by-line-height);opacity:.66;padding:var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-powered-by__label{color:var(--ck-powered-by-text-color);cursor:pointer;font-size:7.5px;font-weight:700;letter-spacing:-.2px;line-height:normal;margin-right:4px;padding-left:2px;text-transform:uppercase}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-icon{cursor:pointer;display:block}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by:hover a{filter:grayscale(0);opacity:1}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_inside]{border-color:transparent}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_border]{border:var(--ck-focus-ring);border-color:var(--ck-powered-by-border-color)}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-dialog-background:var(--ck-custom-background);--ck-color-dialog-form-header-border:var(--ck-custom-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-color-light-red:#fcc;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{background:transparent;border:0;box-sizing:border-box;height:auto;margin:0;padding:0;position:static;text-decoration:none;transition:none;vertical-align:middle;width:auto;word-wrap:break-word}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget{transition:none}}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}@media (forced-colors:none){.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background)}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{transition:none}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{transition:none}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}",""]);const n=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/css-loader/dist/runtime/api.js"),i=o.n(s)()((function(e){return e[1]}));i.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button{transition:none}}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button svg{transition:none}}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button:hover,.ck .ck-widget .ck-widget__type-around__button:hover svg line,.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:none}}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',""]);const n=i},"./node_modules/css-loader/dist/runtime/api.js":e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,s){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(s)for(var n=0;n{"use strict";o.d(t,{uB:()=>r,ob:()=>d,HY:()=>h,CC:()=>y,KE:()=>k,mJ:()=>x,fE:()=>c,TS:()=>C,k_:()=>i,JF:()=>v,Pt:()=>T,Jl:()=>A});var s=o("./packages/ckeditor5-utils/src/index.ts");class i extends((0,s.VM)()){editor;_disableStack=new Set;constructor(e){super(),this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",n,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",n),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function n(e){e.return=!1,e.stop()}class r extends((0,s.VM)()){editor;_isEnabledBasedOnSelection;_affectsData;_disableStack;constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.listenTo(e,"change:isReadOnly",(()=>{this.refresh()})),this.on("set:isEnabled",(t=>{if(!this.affectsData)return;const o=e.model.document.selection,s=!("$graveyard"==o.getFirstPosition().root.rootName)&&e.model.canEditAt(o);(e.isReadOnly||this._isEnabledBasedOnSelection&&!s)&&(t.return=!1,t.stop())}),{priority:"highest"}),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",a,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",a),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function a(e){e.return=!1,e.stop()}class c extends r{_childCommandsDefinitions=[];refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){(0,s.Yy)(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find((({command:e})=>e.isEnabled));return e&&e.command}}class l extends((0,s.Mm)()){_context;_plugins=new Map;_availablePlugins;_contextPlugins;constructor(e,t=[],o=[]){super(),this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of o)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new s.Yb("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],o=[]){const i=this,n=this._context;!function e(t,o=new Set){t.forEach((t=>{c(t)&&(o.has(t)||(o.add(t),t.pluginName&&!i._availablePlugins.has(t.pluginName)&&i._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,o)))}))}(e),u(e);const r=[...function e(t,o=new Set){return t.map((e=>c(e)?e:i._availablePlugins.get(e))).reduce(((t,s)=>o.has(s)?t:(o.add(s),s.requires&&(u(s.requires,s),e(s.requires,o).forEach((e=>t.add(e)))),t.add(s))),new Set)}(e.filter((e=>!d(e,t))))];!function(e,t){for(const o of t){if("function"!=typeof o)throw new s.Yb("plugincollection-replace-plugin-invalid-type",null,{pluginItem:o});const t=o.pluginName;if(!t)throw new s.Yb("plugincollection-replace-plugin-missing-name",null,{pluginItem:o});if(o.requires&&o.requires.length)throw new s.Yb("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const n=i._availablePlugins.get(t);if(!n)throw new s.Yb("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const r=e.indexOf(n);if(-1===r){if(i._contextPlugins.has(n))return;throw new s.Yb("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(n.requires&&n.requires.length)throw new s.Yb("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(r,1,o),i._availablePlugins.set(t,o)}}(r,o);const a=r.map((e=>{let t=i._contextPlugins.get(e);return t=t||new e(n),i._add(e,t),t}));return p(a,"init").then((()=>p(a,"afterInit"))).then((()=>a));function c(e){return"function"==typeof e}function l(e){return c(e)&&!!e.isContextPlugin}function d(e,t){return t.some((t=>t===e||(h(e)===t||h(t)===e)))}function h(e){return c(e)?e.pluginName||e.name:e}function u(e,o=null){e.map((e=>c(e)?e:i._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(c(e))return;if(t)throw new s.Yb("plugincollection-soft-required",n,{missingPlugin:e,requiredBy:h(t)});throw new s.Yb("plugincollection-plugin-not-found",n,{plugin:e})}(e,o),function(e,t){if(!l(t))return;if(l(e))return;throw new s.Yb("plugincollection-context-required",n,{plugin:h(e),requiredBy:h(t)})}(e,o),function(e,o){if(!o)return;if(!d(e,t))return;throw new s.Yb("plugincollection-required",n,{plugin:h(e),requiredBy:h(o)})}(e,o)}))}function p(e,t){return e.reduce(((e,o)=>o[t]?i._contextPlugins.has(o)?e:e.then(o[t].bind(o)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const o=e.pluginName;if(o){if(this._plugins.has(o))throw new s.Yb("plugincollection-plugin-name-conflict",null,{pluginName:o,plugin1:this._plugins.get(o).constructor,plugin2:e});this._plugins.set(o,t)}}}class d{config;plugins;locale;t;editors;static defaultConfig;static builtinPlugins;_contextOwner=null;constructor(e){const{translations:t,...o}=e||{};this.config=new s.TS(o,this.constructor.defaultConfig);const i=this.constructor.builtinPlugins;this.config.define("plugins",i),this.plugins=new l(this,i);const n=this.config.get("language")||{};this.locale=new s.hT({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content"),translations:t}),this.t=this.locale.t,this.editors=new s.pM}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const o of e.concat(t)){if("function"!=typeof o)throw new s.Yb("context-initplugins-constructor-only",null,{Plugin:o});if(!0!==o.isContextPlugin)throw new s.Yb("context-initplugins-invalid-plugin",null,{Plugin:o})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new s.Yb("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const o=new this(e);t(o.initPlugins().then((()=>o)))}))}}class h extends((0,s.VM)()){context;constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}class u extends s.EP{editor;constructor(e){super(),this.editor=e}set(e,t,o={}){if("string"==typeof t){const e=t;t=(t,o)=>{this.editor.execute(e),o()}}super.set(e,t,o)}}var p=o("./packages/ckeditor5-engine/src/index.ts"),m=o("./packages/ckeditor5-watchdog/src/index.ts");class f{_commands;constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const o=this.get(e);if(!o)throw new s.Yb("commandcollection-command-not-found",this,{commandName:e});return o.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}const g="contentEditing",_="common";class b{keystrokeInfos=new Map;_editor;constructor(e){this._editor=e;const t=e.config.get("menuBar.isVisible"),o=e.locale.t;this.addKeystrokeInfoCategory({id:g,label:o("Content editing keystrokes"),description:o("These keyboard shortcuts allow for quick access to content editing features.")});const s=[{label:o("Close contextual balloons, dropdowns, and dialogs"),keystroke:"Esc"},{label:o("Open the accessibility help dialog"),keystroke:"Alt+0"},{label:o("Move focus between form fields (inputs, buttons, etc.)"),keystroke:[["Tab"],["Shift+Tab"]]},{label:o("Move focus to the toolbar, navigate between toolbars"),keystroke:"Alt+F10",mayRequireFn:!0},{label:o("Navigate through the toolbar or menu bar"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]},{label:o("Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content."),keystroke:[["Enter"],["Space"]]}];t&&s.push({label:o("Move focus to the menu bar, navigate between menu bars"),keystroke:"Alt+F9",mayRequireFn:!0}),this.addKeystrokeInfoCategory({id:"navigation",label:o("User interface and content navigation keystrokes"),description:o("Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface."),groups:[{id:"common",keystrokes:s}]})}addKeystrokeInfoCategory({id:e,label:t,description:o,groups:s}){this.keystrokeInfos.set(e,{id:e,label:t,description:o,groups:new Map}),this.addKeystrokeInfoGroup({categoryId:e,id:_}),s&&s.forEach((t=>{this.addKeystrokeInfoGroup({categoryId:e,...t})}))}addKeystrokeInfoGroup({categoryId:e=g,id:t,label:o,keystrokes:i}){const n=this.keystrokeInfos.get(e);if(!n)throw new s.Yb("accessibility-unknown-keystroke-info-category",this._editor,{groupId:t,categoryId:e});n.groups.set(t,{id:t,label:o,keystrokes:i||[]})}addKeystrokeInfos({categoryId:e=g,groupId:t=_,keystrokes:o}){if(!this.keystrokeInfos.has(e))throw new s.Yb("accessibility-unknown-keystroke-info-category",this._editor,{categoryId:e,keystrokes:o});const i=this.keystrokeInfos.get(e);if(!i.groups.has(t))throw new s.Yb("accessibility-unknown-keystroke-info-group",this._editor,{groupId:t,categoryId:e,keystrokes:o});i.groups.get(t).keystrokes.push(...o)}}class k extends((0,s.VM)()){accessibility;commands;config;conversion;data;editing;locale;model;plugins;keystrokes;t;static defaultConfig;static builtinPlugins;_context;_readOnlyLocks;constructor(e={}){super();const t=this.constructor,{translations:o,...i}=t.defaultConfig||{},{translations:n=o,...r}=e,a=e.language||i.language;this._context=e.context||new d({language:a,translations:n}),this._context._addEditor(this,!e.context);const c=Array.from(t.builtinPlugins||[]);this.config=new s.TS(r,i),this.config.define("plugins",c),this.config.define(this._context._getEditorConfig()),this.plugins=new l(this,c,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new f,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new p.Kx,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const h=new p.tG;this.data=new p.P3(this.model,h),this.editing=new p.L_(this.model,h),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new p.dY([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new u(this),this.keystrokes.listenTo(this.editing.view.document),this.accessibility=new b(this)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new s.Yb("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new s.Yb("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new s.Yb("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}setData(e){this.data.set(e)}getData(e){return this.data.get(e)}initPlugins(){const e=this.config,t=e.get("plugins"),o=e.get("removePlugins")||[],s=e.get("extraPlugins")||[],i=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(s),o,i)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){s.Yb.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}static Context=d;static EditorWatchdog=m.VJ;static ContextWatchdog=m.Zd}var w=o("./node_modules/lodash-es/isFunction.js");function v(e){if(!(0,w.A)(e.updateSourceElement))throw new s.Yb("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(function(e){return!!e&&"textarea"===e.tagName.toLowerCase()}(t)&&t.form){let o;const s=t.form,i=()=>e.updateSourceElement();(0,w.A)(s.submit)&&(o=s.submit,s.submit=()=>{i(),o.apply(s)}),s.addEventListener("submit",i),e.on("destroy",(()=>{s.removeEventListener("submit",i),o&&(s.submit=o)}))}}function y(e){return e}function x(e){return class extends e{sourceElement;updateSourceElement(e){if(!this.sourceElement)throw new s.Yb("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),o=this.sourceElement instanceof HTMLTextAreaElement;if(!t&&!o)return void(0,s.C_)(this.sourceElement,"");const i="string"==typeof e?e:this.data.get();(0,s.C_)(this.sourceElement,i)}}}function A(e,t){if(t.ckeditorInstance)throw new s.Yb("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}x.updateSourceElement=x(Object).prototype.updateSourceElement;class C extends h{_actions;static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new s.pM({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new s.Yb("pendingactions-add-invalid-message",this);const t=new((0,s.VM)());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const T={bold:'',cancel:'',caption:'',check:'',cog:'',colorPalette:'',eraser:'',history:'',image:'',imageUpload:'',imageAssetManager:'',imageUrl:'',lowVision:'',textAlternative:'',loupe:'',previousArrow:'',nextArrow:'',importExport:'',paragraph:'',plus:'',text:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeCustom:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:'',quote:'',threeVerticalDots:'',dragIndicator:'',redo:'',undo:'',bulletedList:'',numberedList:'',todoList:'',codeBlock:'',browseFiles:'',heading1:'',heading2:'',heading3:'',heading4:'',heading5:'',heading6:'',horizontalLine:'',html:'',indent:'',outdent:'',table:''}},"./packages/ckeditor5-engine/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{Zq:()=>me,ML:()=>Ss,cJ:()=>re,Re:()=>Ri,dY:()=>hs,P3:()=>ds,_v:()=>yt,kB:()=>di,oi:()=>ao,P$:()=>it,FY:()=>dt,$A:()=>ht,zN:()=>Ce,L_:()=>Ho,gK:()=>Pt,Hg:()=>jt,vp:()=>kt,BZ:()=>oi,q6:()=>ls,ZG:()=>As,m8:()=>Ks,Oo:()=>so,m4:()=>Es,PN:()=>C,GY:()=>Ts,Kx:()=>Oi,q$:()=>ji,hW:()=>xs,fS:()=>Ms,nu:()=>ct,cr:()=>Is,yX:()=>Dt,Q6:()=>$t,EZ:()=>Os,A4:()=>Ke,gf:()=>Vs,at:()=>Rs,_A:()=>Cs,DG:()=>$,tG:()=>W,Yi:()=>Tt,EY:()=>Vt,Qo:()=>Rt,rU:()=>It,Wq:()=>Ii,UJ:()=>me,xQ:()=>G,Vg:()=>pe,f5:()=>Ae,OQ:()=>J,m2:()=>K,Vt:()=>_e,aZ:()=>ye,Un:()=>Q,HQ:()=>y,u$:()=>ee,cw:()=>ke,ib:()=>ms,XI:()=>Bn,vQ:()=>Sn,IG:()=>Fn,kF:()=>Vn,je:()=>Dn,JV:()=>Mn,aU:()=>Nn,_$:()=>On,D0:()=>dn,v7:()=>hn,vt:()=>vn,mC:()=>yn,Kc:()=>h,JT:()=>d,qE:()=>an,rC:()=>rn,QS:()=>nn,SH:()=>Z,gz:()=>cn,M1:()=>ln,YU:()=>p,s5:()=>tn,_o:()=>$i,Vq:()=>Ki,ew:()=>qi,fp:()=>Gi,E:()=>Qi,Cd:()=>Ji,mv:()=>sn,$0:()=>m,Zu:()=>u,_j:()=>Ls});var s=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=o.n(s),n=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css"),r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i()(n.A,r);n.A.locals;var a=o("./packages/ckeditor5-utils/src/index.ts");const c=new WeakMap;let l=!1;function d({view:e,element:t,text:o,isDirectHost:s=!0,keepOnFocus:i=!1}){const n=e.document;function r(o){c.get(n).set(t,{text:o,isDirectHost:s,keepOnFocus:i,hostElement:s?t:null}),e.change((e=>f(n,e)))}c.has(n)||(c.set(n,new Map),n.registerPostFixer((e=>f(n,e))),n.on("change:isComposing",(()=>{e.change((e=>f(n,e)))}),{priority:"high"})),t.is("editableElement")&&t.on("change:placeholder",((e,t,o)=>{r(o)})),t.placeholder?r(t.placeholder):o&&r(o),o&&function(){l||(0,a.FF)("enableplaceholder-deprecated-text-option");l=!0}()}function h(e,t){const o=t.document;c.has(o)&&e.change((e=>{const s=c.get(o),i=s.get(t);e.removeAttribute("data-placeholder",i.hostElement),p(e,i.hostElement),s.delete(t)}))}function u(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}function p(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function m(e,t){if(!e.isAttached())return!1;if(Array.from(e.getChildren()).some((e=>!e.is("uiElement"))))return!1;const o=e.document,s=o.selection.anchor;return(!o.isComposing||!s||s.parent!==e)&&(!!t||(!o.isFocused||!!s&&s.parent!==e))}function f(e,t){const o=c.get(e),s=[];let i=!1;for(const[e,n]of o)n.isDirectHost&&(s.push(e),g(t,e,n)&&(i=!0));for(const[e,n]of o){if(n.isDirectHost)continue;const o=_(e);o&&(s.includes(o)||(n.hostElement=o,g(t,e,n)&&(i=!0)))}return i}function g(e,t,o){const{text:s,isDirectHost:i,hostElement:n}=o;let r=!1;n.getAttribute("data-placeholder")!==s&&(e.setAttribute("data-placeholder",s,n),r=!0);return(i||1==t.childCount)&&m(n,o.keepOnFocus)?u(e,n)&&(r=!0):p(e,n)&&(r=!0),r}function _(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}class b{is(){throw new Error("is() method is abstract")}}var k=o("./node_modules/lodash-es/_baseClone.js");const w=function(e){return(0,k.A)(e,4)};class v extends((0,a.Mm)(b)){document;parent;constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new a.Yb("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),s=e.getAncestors(t);let i=0;for(;o[i]==s[i]&&o[i];)i++;return 0===i?null:o[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),s=(0,a.ww)(t,o);switch(s){case"prefix":return!0;case"extension":return!1;default:return t[s]e.data.length)throw new a.Yb("view-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.data.length)throw new a.Yb("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let o=e.includeSelf?this.textNode:this.parent;for(;null!==o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}}x.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};var A=o("./node_modules/lodash-es/isPlainObject.js");class C{_patterns=[];constructor(...e){this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const o=T(t,e);if(o)return{element:t,pattern:e,match:o}}return null}matchAll(...e){const t=[];for(const o of e)for(const e of this._patterns){const s=T(o,e);s&&t.push({element:o,pattern:e,match:s})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function T(e,t){if("function"==typeof t)return t(e);const o={};return t.name&&(o.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!o.name)||t.attributes&&(o.attributes=function(e,t){const o=new Set(t.getAttributeKeys());(0,A.A)(e)?(void 0!==e.style&&(0,a.FF)("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&(0,a.FF)("matcher-pattern-deprecated-attributes-class-key",e)):(o.delete("style"),o.delete("class"));return E(e,o,(e=>t.getAttribute(e)))}(t.attributes,e),!o.attributes)||t.classes&&(o.classes=function(e,t){return E(e,t.getClassNames(),(()=>{}))}(t.classes,e),!o.classes)||t.styles&&(o.styles=function(e,t){return E(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!o.styles)?null:o}function E(e,t,o){const s=function(e){if(Array.isArray(e))return e.map((e=>(0,A.A)(e)?(void 0!==e.key&&void 0!==e.value||(0,a.FF)("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]));if((0,A.A)(e))return Object.entries(e);return[[e,!0]]}(e),i=Array.from(t),n=[];if(s.forEach((([e,t])=>{i.forEach((s=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,s)&&function(e,t,o){if(!0===e)return!0;const s=o(t);return e===s||e instanceof RegExp&&!!String(s).match(e)}(t,s,o)&&n.push(s)}))})),s.length&&!(n.lengthi?0:i+t),(o=o>i?i:o)<0&&(o+=i),i=t>o?0:o-t>>>0,t>>>=0;for(var n=Array(i);++st===e));return Array.isArray(t)}set(e,t){if((0,P.A)(e))for(const[t,o]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,o,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=q(e);B(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this.getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!(0,P.A)(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this.getStylesEntries().map((([e])=>e))}clear(){this._styles={}}getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const o of t)e.push(...this._styleProcessor.getReducedForm(o,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const o=t.splice(0,t.length-1).join("."),s=(0,D.A)(this._styles,o);if(!s)return;!Object.keys(s).length&&this.remove(o)}}class W{_normalizers;_extractors;_reducers;_consumables;constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,o){if((0,P.A)(t))U(o,q(e),t);else if(this._normalizers.has(e)){const s=this._normalizers.get(e),{path:i,value:n}=s(t);U(o,i,n)}else U(o,e,t)}getNormalized(e,t){if(!e)return(0,N.A)({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const o=this._extractors.get(e);if("string"==typeof o)return(0,D.A)(t,o);const s=o(e,t);if(s)return s}return(0,D.A)(t,q(e))}getReducedForm(e,t){const o=this.getNormalized(e,t);if(void 0===o)return[];if(this._reducers.has(e)){return this._reducers.get(e)(o)}return[[e,o]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const o=this.getNormalized(t,e);return o&&"object"==typeof o?Object.keys(o).length:o})),o=new Set([...t,...Object.keys(e)]);return Array.from(o)}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const o of t)this._mapStyleNames(o,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function q(e){return e.replace("-",".")}function U(e,t,o){let s=o;(0,P.A)(o)&&(s=(0,N.A)({},(0,D.A)(e,t),o)),H(e,t,s)}class K extends v{name;_unsafeAttributesToRender=[];_attrs;_children;_classes;_styles;_customProperties=new Map;constructor(e,t,o,s){if(super(e),this.name=t,this._attrs=function(e){const t=(0,a.av)(e);for(const[e,o]of t)null===o?t.delete(e):"string"!=typeof o&&t.set(e,String(o));return t}(o),this._children=[],s&&this._insertChild(0,s),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Y(this._classes,e),this._attrs.delete("class")}this._styles=new $(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof K))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,o]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==o)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new C(...e);let o=this.parent;for(;o&&!o.is("documentFragment");){if(t.match(o))return o;o=o.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),o=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==o?"":` ${o}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const o of this.getChildren())t.push(o._clone(e));const o=new this.constructor(this.document,this.name,this._attrs,t);return o._classes=new Set(this._classes),o._styles.set(this._styles.getNormalized()),o._customProperties=new Map(this._customProperties),o.getFillerOffset=this.getFillerOffset,o._unsafeAttributesToRender=this._unsafeAttributesToRender,o}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let o=0;const s=function(e,t){if("string"==typeof t)return[new y(e,t)];(0,a.xZ)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new y(e,t):t instanceof x?new y(e,t.data):t))}(this.document,t);for(const t of s)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of(0,a.$r)(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of(0,a.$r)(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of(0,a.$r)(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function Y(e,t){const o=t.split(/\s+/);e.clear(),o.forEach((t=>e.add(t)))}K.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class G extends K{constructor(e,t,o,s){super(e,t,o,s),this.getFillerOffset=Z}}function Z(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}G.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class J extends((0,a.VM)(G)){constructor(e,t,o,s){super(e,t,o,s),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}J.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const X=Symbol("rootName");class Q extends J{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(X)}set rootName(e){this._setCustomProperty(X,e)}set _name(e){this.name=e}}Q.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class ee{direction;boundaries;singleCharacters;shallow;ignoreElementEnd;_position;_boundaryStartParent;_boundaryEndParent;constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new a.Yb("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new a.Yb("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=te._createAt(e.startPosition):this._position=te._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o;do{o=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&e.offset===o.childCount)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let s;if(o instanceof y){if(e.isAtEnd)return this._position=te._createAfter(o),this._next();s=o.data[e.offset]}else s=o.getChild(e.offset);if(s instanceof K){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(e))return{done:!0,value:void 0};e.offset++}else e=new te(s,0);return this._position=e,this._formatReturnValue("elementStart",s,t,e,1)}if(s instanceof y){if(this.singleCharacters)return e=new te(s,0),this._position=e,this._next();let o,i=s.data.length;return s==this._boundaryEndParent?(i=this.boundaries.end.offset,o=new x(s,0,i),e=te._createAfter(o)):(o=new x(s,0,s.data.length),e.offset++),this._position=e,this._formatReturnValue("text",o,t,e,i)}if("string"==typeof s){let s;if(this.singleCharacters)s=1;else{s=(o===this._boundaryEndParent?this.boundaries.end.offset:o.data.length)-e.offset}const i=new x(o,e.offset,s);return e.offset+=s,this._position=e,this._formatReturnValue("text",i,t,e,s)}return e=te._createAfter(o),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",o,t,e)}_previous(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&0===e.offset)return{done:!0,value:void 0};if(o==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let s;if(o instanceof y){if(e.isAtStart)return this._position=te._createBefore(o),this._previous();s=o.data[e.offset-1]}else s=o.getChild(e.offset-1);if(s instanceof K)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",s,t,e,1)):(e=new te(s,s.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",s,t,e));if(s instanceof y){if(this.singleCharacters)return e=new te(s,s.data.length),this._position=e,this._previous();let o,i=s.data.length;if(s==this._boundaryStartParent){const t=this.boundaries.start.offset;o=new x(s,t,s.data.length-t),i=o.data.length,e=te._createBefore(o)}else o=new x(s,0,s.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",o,t,e,i)}if("string"==typeof s){let s;if(this.singleCharacters)s=1;else{const t=o===this._boundaryStartParent?this.boundaries.start.offset:0;s=e.offset-t}e.offset-=s;const i=new x(o,e.offset,s);return this._position=e,this._formatReturnValue("text",i,t,e,s)}return e=te._createBefore(o),this._position=e,this._formatReturnValue("elementStart",o,t,e,1)}_formatReturnValue(e,t,o,s,i){return t instanceof x&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?o=te._createAfter(t.textNode):(s=te._createAfter(t.textNode),this._position=s)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?o=te._createBefore(t.textNode):(s=te._createBefore(t.textNode),this._position=s))),{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:s,length:i}}}}class te extends b{parent;offset;constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof J);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=te._createAt(this),o=t.offset+e;return t.offset=o<0?0:o,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const o=new ee(t);return o.skip(e),o.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),o=e.getAncestors();let s=0;for(;t[s]==o[s]&&t[s];)s++;return 0===s?null:t[s-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],o=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),o.push(e.offset);const s=(0,a.ww)(t,o);switch(s){case"prefix":return"before";case"extension":return"after";default:return t[s]0?new this(o,s):new this(s,o)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(te._createBefore(e),t)}}function se(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}oe.prototype.is=function(e){return"range"===e||"view:range"===e};class ie extends((0,a.Mm)(b)){_ranges;_lastRangeBackward;_isFake;_fakeSelectionLabel;constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const s of e._ranges)if(t.isEqual(s)){o=!0;break}if(!o)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=(0,a.U9)(this.getRanges());if(t!=(0,a.U9)(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let o=!1;for(let s of e.getRanges())if(s=s.getTrimmed(),t.start.isEqual(s.start)&&t.end.isEqual(s.end)){o=!0;break}if(!o)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,o,s]=e;if("object"==typeof o&&(s=o,o=void 0),null===t)this._setRanges([]),this._setFakeOptions(s);else if(t instanceof ie||t instanceof ne)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof oe)this._setRanges([t],s&&s.backward),this._setFakeOptions(s);else if(t instanceof te)this._setRanges([new oe(t)]),this._setFakeOptions(s);else if(t instanceof v){const e=!!s&&!!s.backward;let i;if(void 0===o)throw new a.Yb("view-selection-setto-required-second-parameter",this);i="in"==o?oe._createIn(t):"on"==o?oe._createOn(t):new oe(te._createAt(t,o)),this._setRanges([i],e),this._setFakeOptions(s)}else{if(!(0,a.xZ)(t))throw new a.Yb("view-selection-setto-not-selectable",this);this._setRanges(t,s&&s.backward),this._setFakeOptions(s)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new a.Yb("view-selection-setfocus-no-ranges",this);const o=te._createAt(e,t);if("same"==o.compareWith(this.focus))return;const s=this.anchor;this._ranges.pop(),"before"==o.compareWith(s)?this._addRange(new oe(o,s),!0):this._addRange(new oe(s,o)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof oe))throw new a.Yb("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new a.Yb("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new oe(e.start,e.end))}}ie.prototype.is=function(e){return"selection"===e||"view:selection"===e};class ne extends((0,a.Mm)(b)){_selection;constructor(...e){super(),this._selection=new ie,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}ne.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class re extends a.vY{startRange;_eventPhase;_currentTarget;constructor(e,t,o){super(e,t),this.startRange=o,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const ae=Symbol("bubbling contexts");function ce(e){return class extends e{fire(e,...t){try{const o=e instanceof a.vY?e:new a.vY(this,e),s=ue(this);if(!s.size)return;if(le(o,"capturing",this),de(s,"$capture",o,...t))return o.return;const i=o.startRange||this.selection.getFirstRange(),n=i?i.getContainedElement():null,r=!!n&&Boolean(he(s,n));let c=n||function(e){if(!e)return null;const t=e.start.parent,o=e.end.parent,s=t.getPath(),i=o.getPath();return s.length>i.length?t:o}(i);if(le(o,"atTarget",c),!r){if(de(s,"$text",o,...t))return o.return;le(o,"bubbling",c)}for(;c;){if(c.is("rootElement")){if(de(s,"$root",o,...t))return o.return}else if(c.is("element")&&de(s,c.name,o,...t))return o.return;if(de(s,c,o,...t))return o.return;c=c.parent,le(o,"bubbling",c)}return le(o,"bubbling",this),de(s,"$document",o,...t),o.return}catch(e){a.Yb.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,o){const s=(0,a.$r)(o.context||"$document"),i=ue(this);for(const n of s){let s=i.get(n);s||(s=new((0,a.Mm)()),i.set(n,s)),this.listenTo(s,e,t,o)}}_removeEventListener(e,t){const o=ue(this);for(const s of o.values())this.stopListening(s,e,t)}}}{const e=ce(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{ce[t]=e.prototype[t]}))}function le(e,t,o){e instanceof re&&(e._eventPhase=t,e._currentTarget=o)}function de(e,t,o,...s){const i="string"==typeof t?e.get(t):he(e,t);return!!i&&(i.fire(o,...s),o.stop.called)}function he(e,t){for(const[o,s]of e)if("function"==typeof o&&o(t))return s;return null}function ue(e){return e[ae]||(e[ae]=new Map),e[ae]}class pe extends(ce((0,a.VM)())){selection;roots;stylesProcessor;_postFixers=new Set;constructor(e){super(),this.selection=new ne,this.roots=new a.pM({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.forEach((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(t=o(e),t)break}while(t)}}class me extends K{static DEFAULT_PRIORITY=10;_priority=10;_id=null;_clonesGroup=null;constructor(e,t,o,s){super(e,t,o,s),this.getFillerOffset=fe}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new a.Yb("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function fe(){if(ge(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(ge(e)>1)return null;e=e.parent}return!e||ge(e)>1?null:this.childCount}function ge(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}me.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class _e extends K{constructor(e,t,o,s){super(e,t,o,s),this.getFillerOffset=be}_insertChild(e,t){if(t&&(t instanceof v||Array.from(t).length>0))throw new a.Yb("view-emptyelement-cannot-add",[this,t]);return 0}}function be(){return null}_e.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class ke extends K{constructor(e,t,o,s){super(e,t,o,s),this.getFillerOffset=ve}_insertChild(e,t){if(t&&(t instanceof v||Array.from(t).length>0))throw new a.Yb("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function we(e){e.document.on("arrowKey",((t,o)=>function(e,t,o){if(t.keyCode==a.uP.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),s=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(s||t.shiftKey){const t=e.focusNode,i=e.focusOffset,n=o.domPositionToView(t,i);if(null===n)return;let r=!1;const a=n.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(r=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(r){const t=o.viewPositionToDom(a);s?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,o,e.domConverter)),{priority:"low"})}function ve(){return null}ke.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class ye extends K{constructor(e,t,o,s){super(e,t,o,s),this.getFillerOffset=xe}_insertChild(e,t){if(t&&(t instanceof v||Array.from(t).length>0))throw new a.Yb("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function xe(){return null}ye.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ae extends((0,a.Mm)(b)){document;_children=[];_customProperties=new Map;constructor(e,t){super(),this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}get getFillerOffset(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let o=0;const s=function(e,t){if("string"==typeof t)return[new y(e,t)];(0,a.xZ)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new y(e,t):t instanceof x?new y(e,t.data):t))}(this.document,t);for(const t of s)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o{const o=e[e.length-1],s=!t.is("uiElement");return o&&o.breakAttributes==s?o.nodes.push(t):e.push({breakAttributes:s,nodes:[t]}),e}),[]);let s=null,i=e;for(const{nodes:e,breakAttributes:t}of o){const o=this._insertNodes(i,e,t);s||(s=o.start),i=o.end}return s?new oe(s,i):new oe(e)}remove(e){const t=e instanceof oe?e:oe._createOn(e);if(je(t,this.document),t.isCollapsed)return new Ae(this.document);const{start:o,end:s}=this._breakAttributesRange(t,!0),i=o.parent,n=s.offset-o.offset,r=i._removeChildren(o.offset,n);for(const e of r)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(o);return t.start=a,t.end=a.clone(),new Ae(this.document,r)}clear(e,t){je(e,this.document);const o=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const s of o){const o=s.item;let i;if(o.is("element")&&t.isSimilar(o))i=oe._createOn(o);else if(!s.nextPosition.isAfter(e.start)&&o.is("$textProxy")){const e=o.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(i=oe._createIn(e))}i&&(i.end.isAfter(e.end)&&(i.end=e.end),i.start.isBefore(e.start)&&(i.start=e.start),this.remove(i))}}move(e,t){let o;if(t.isAfter(e.end)){const s=(t=this._breakAttributes(t,!0)).parent,i=s.childCount;e=this._breakAttributesRange(e,!0),o=this.remove(e),t.offset+=s.childCount-i}else o=this.remove(e);return this.insert(t,o)}wrap(e,t){if(!(t instanceof me))throw new a.Yb("view-writer-wrap-invalid-attribute",this.document);if(je(e,this.document),e.isCollapsed){let s=e.start;s.parent.is("element")&&(o=s.parent,!Array.from(o.getChildren()).some((e=>!e.is("uiElement"))))&&(s=s.getLastMatchingPosition((e=>e.item.is("uiElement")))),s=this._wrapPosition(s,t);const i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(e.start)&&this.setSelection(s),new oe(s)}return this._wrapRange(e,t);var o}unwrap(e,t){if(!(t instanceof me))throw new a.Yb("view-writer-unwrap-invalid-attribute",this.document);if(je(e,this.document),e.isCollapsed)return e;const{start:o,end:s}=this._breakAttributesRange(e,!0),i=o.parent,n=this._unwrapChildren(i,o.offset,s.offset,t),r=this.mergeAttributes(n.start);r.isEqual(n.start)||n.end.offset--;const c=this.mergeAttributes(n.end);return new oe(r,c)}rename(e,t){const o=new G(this.document,e,t.getAttributes());return this.insert(te._createAfter(t),o),this.move(oe._createIn(t),te._createAt(o,0)),this.remove(oe._createOn(t)),o}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return te._createAt(e,t)}createPositionAfter(e){return te._createAfter(e)}createPositionBefore(e){return te._createBefore(e)}createRange(e,t){return new oe(e,t)}createRangeOn(e){return oe._createOn(e)}createRangeIn(e){return oe._createIn(e)}createSelection(...e){return new ie(...e)}createSlot(e="children"){if(!this._slotFactory)throw new a.Yb("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,o){let s,i;if(s=o?Te(e):e.parent.is("$text")?e.parent.parent:e.parent,!s)throw new a.Yb("view-writer-invalid-position-container",this.document);i=o?this._breakAttributes(e,!0):e.parent.is("$text")?Se(e):e;const n=s._insertChild(i.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const r=i.getShiftedBy(n),c=this.mergeAttributes(i);c.isEqual(i)||r.offset--;const l=this.mergeAttributes(r);return new oe(c,l)}_wrapChildren(e,t,o,s){let i=t;const n=[];for(;i!1,e.parent._insertChild(e.offset,o);const s=new oe(e,e.getShiftedBy(1));this.wrap(s,t);const i=new te(o.parent,o.index);o._remove();const n=i.nodeBefore,r=i.nodeAfter;return n instanceof y&&r instanceof y?Me(n,r):Pe(i)}_wrapAttributeElement(e,t){if(!Ie(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&t.hasAttribute(o)&&t.getAttribute(o)!==e.getAttribute(o))return!1;for(const o of e.getStyleNames())if(t.hasStyle(o)&&t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&(t.hasAttribute(o)||this.setAttribute(o,e.getAttribute(o),t));for(const o of e.getStyleNames())t.hasStyle(o)||this.setStyle(o,e.getStyle(o),t);for(const o of e.getClassNames())t.hasClass(o)||this.addClass(o,t);return!0}_unwrapAttributeElement(e,t){if(!Ie(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&(!t.hasAttribute(o)||t.getAttribute(o)!==e.getAttribute(o)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const o of e.getStyleNames())if(!t.hasStyle(o)||t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&this.removeAttribute(o,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const o=e.start,s=e.end;if(je(e,this.document),e.isCollapsed){const o=this._breakAttributes(e.start,t);return new oe(o,o)}const i=this._breakAttributes(s,t),n=i.parent.childCount,r=this._breakAttributes(o,t);return i.offset+=i.parent.childCount-n,new oe(r,i)}_breakAttributes(e,t=!1){const o=e.offset,s=e.parent;if(e.parent.is("emptyElement"))throw new a.Yb("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new a.Yb("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new a.Yb("view-writer-cannot-break-raw-element",this.document);if(!t&&s.is("$text")&&Re(s.parent))return e.clone();if(Re(s))return e.clone();if(s.is("$text"))return this._breakAttributes(Se(e),t);if(o==s.childCount){const e=new te(s.parent,s.index+1);return this._breakAttributes(e,t)}if(0===o){const e=new te(s.parent,s.index);return this._breakAttributes(e,t)}{const e=s.index+1,i=s._clone();s.parent._insertChild(e,i),this._addToClonedElementsGroup(i);const n=s.childCount-o,r=s._removeChildren(o,n);i._appendChild(r);const a=new te(s.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let o=this._cloneGroups.get(t);o||(o=new Set,this._cloneGroups.set(t,o)),o.add(e),e._clonesGroup=o}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const o=this._cloneGroups.get(t);o&&o.delete(e)}}function Te(e){let t=e.parent;for(;!Re(t);){if(!t)return;t=t.parent}return t}function Ee(e,t){return e.priorityt.priority)&&e.getIdentity()o instanceof e)))throw new a.Yb("view-writer-insert-invalid-node-type",t);o.is("$text")||Ve(o.getChildren(),t)}}function Re(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function je(e,t){const o=Te(e.start),s=Te(e.end);if(!o||!s||o!==s)throw new a.Yb("view-writer-invalid-range-container",t)}function Ie(e,t){return null===e.id&&null===t.id}const Be=e=>e.createTextNode(" "),De=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},Ne=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},Fe=7,Le="⁠".repeat(Fe);function ze(e){return"string"==typeof e?e.substr(0,Fe)===Le:(0,a.KH)(e)&&e.data.substr(0,Fe)===Le}function He(e){return e.data.length==Fe&&ze(e)}function $e(e){const t="string"==typeof e?e:e.data;return ze(e)?t.slice(Fe):t}function We(e,t){if(t.keyCode==a.uP.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,o=e.getRangeAt(0).startOffset;ze(t)&&o<=Fe&&e.collapse(t,0)}}}var qe=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css"),Ue={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i()(qe.A,Ue);qe.A.locals;class Ke extends((0,a.VM)()){domDocuments=new Set;domConverter;markedAttributes=new Set;markedChildren=new Set;markedTexts=new Set;selection;_inlineFiller=null;_fakeSelectionContainer=null;constructor(e,t){super(),this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),a._K.isBlink&&!a._K.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e){throw new a.Yb("view-renderer-unknown-type",this)}this.markedChildren.add(t)}}}render(){if(this.isComposing&&!a._K.isAndroid)return;let e=null;const t=!(a._K.isBlink&&!a._K.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=te._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),o=t.parent.ownerDocument;ze(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=Ye(o,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.domConverter._clearTemporaryCustomProperties(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const o=Array.from(t.childNodes),s=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),i=this._diffNodeLists(o,s),n=this._findUpdateActions(i,o,s,Ge);if(-1!==n.indexOf("update")){const t={equal:0,insert:0,delete:0};for(const i of n)if("update"===i){const i=t.equal+t.insert,n=t.equal+t.delete,r=e.getChild(i);!r||r.is("uiElement")||r.is("rawElement")||this._updateElementMappings(r,o[n]),(0,a.TF)(s[i]),t.equal++}else t[i]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?te._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&(0,a.KH)(t.parent)&&ze(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!ze(e))throw new a.Yb("view-renderer-filler-was-lost",this);He(e)?e.remove():e.data=e.data.substr(Fe),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,o=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;const s=e.nodeBefore,i=e.nodeAfter;return!(s instanceof y||i instanceof y)&&(!!(o!==t.getFillerOffset()||s&&s.is("element","br"))&&(!a._K.isAndroid||!s&&!i))}_updateText(e,t){const o=this.domConverter.findCorrespondingDomText(e);let s=this.domConverter.viewToDom(e).data;const i=t.inlineFillerPosition;i&&i.parent==e.parent&&i.offset==e.index&&(s=Le+s),Xe(o,s)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const o=Array.from(t.attributes).map((e=>e.name)),s=e.getAttributeKeys();for(const o of s)this.domConverter.setDomElementAttribute(t,o,e.getAttribute(o),e);for(const s of o)e.hasAttribute(s)||this.domConverter.removeDomElementAttribute(t,s)}_updateChildren(e,t){const o=this.domConverter.mapViewToDom(e);if(!o)return;if(a._K.isAndroid){let e=null;for(const t of Array.from(o.childNodes)){if(e&&(0,a.KH)(e)&&(0,a.KH)(t)){o.normalize();break}e=t}}const s=t.inlineFillerPosition,i=o.childNodes,n=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));s&&s.parent===e&&Ye(o.ownerDocument,n,s.offset);const r=this._diffNodeLists(i,n),c=this._findUpdateActions(r,i,n,Ze);let l=0;const d=new Set;for(const e of c)"delete"===e?(d.add(i[l]),(0,a.TF)(i[l])):"equal"!==e&&"update"!==e||l++;l=0;for(const e of c)"insert"===e?((0,a.PT)(o,l,n[l]),l++):"update"===e?(Xe(i[l],n[l].data),l++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(n[l])),l++);for(const e of d)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const o=Array.from(e);if(0==o.length||!t)return o;const s=o[o.length-1];s==t&&o.pop();return o}(e,this._fakeSelectionContainer),(0,a.Ui)(e,t,Je.bind(null,this.domConverter))}_findUpdateActions(e,t,o,s){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let i=[],n=[],r=[];const c={equal:0,insert:0,delete:0};for(const l of e)"insert"===l?r.push(o[c.equal+c.insert]):"delete"===l?n.push(t[c.equal+c.delete]):(i=i.concat((0,a.Ui)(n,r,s).map((e=>"equal"===e?"update":e))),i.push("equal"),n=[],r=[]),c[l]++;return i.concat((0,a.Ui)(n,r,s).map((e=>"equal"===e?"update":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(a._K.isBlink&&!a._K.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&a._K.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const o=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(o,this.selection),!this._fakeSelectionNeedsUpdate(e))return;o.parentElement&&o.parentElement==e||e.appendChild(o),o.textContent=this.selection.fakeSelectionLabel||" ";const s=t.getSelection(),i=t.createRange();s.removeAllRanges(),i.selectNodeContents(o),s.addRange(i)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const o=this.domConverter.viewPositionToDom(this.selection.anchor),s=this.domConverter.viewPositionToDom(this.selection.focus);t.setBaseAndExtent(o.parent,o.offset,s.parent,s.offset),a._K.isGecko&&function(e,t){let o=e.parent,s=e.offset;(0,a.KH)(o)&&He(o)&&(s=(0,a.qh)(o)+1,o=o.parentNode);if(o.nodeType!=Node.ELEMENT_NODE||s!=o.childNodes.length-1)return;const i=o.childNodes[s];i&&"BR"==i.tagName&&t.addRange(t.getRangeAt(0))}(s,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,o=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(o.anchorNode!==t&&!t.contains(o.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const o=e.activeElement,s=this.domConverter.mapDomToView(o);o&&s&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function Ye(e,t,o){const s=t instanceof Array?t:t.childNodes,i=s[o];if((0,a.KH)(i))return i.data=Le+i.data,i;{const i=e.createTextNode(Le);return Array.isArray(t)?s.splice(o,0,i):(0,a.PT)(t,o,i),i}}function Ge(e,t){return(0,a.Ll)(e)&&(0,a.Ll)(t)&&!(0,a.KH)(e)&&!(0,a.KH)(t)&&!(0,a.Cn)(e)&&!(0,a.Cn)(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function Ze(e,t){return(0,a.Ll)(e)&&(0,a.Ll)(t)&&(0,a.KH)(e)&&(0,a.KH)(t)}function Je(e,t,o){return t===o||((0,a.KH)(t)&&(0,a.KH)(o)?t.data===o.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(o)))}function Xe(e,t){const o=e.data;if(o==t)return;const s=(0,a.Mr)(o,t);for(const t of s)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}const Qe=Ne(a.Sf.document),et=Be(a.Sf.document),tt=De(a.Sf.document),ot="data-ck-unsafe-attribute-",st="data-ck-unsafe-element";class it{document;renderingMode;blockFillerMode;preElements;blockElements;inlineObjectElements;unsafeElements;_domDocument;_domToViewMapping=new WeakMap;_viewToDomMapping=new WeakMap;_fakeSelectionMapping=new WeakMap;_rawContentElementMatcher=new C;_inlineObjectElementMatcher=new C;_elementsWithTemporaryCustomProperties=new Set;constructor(e,{blockFillerMode:t,renderingMode:o="editing"}={}){this.document=e,this.renderingMode=o,this.blockFillerMode=t||("editing"===o?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?a.Sf.document:a.Sf.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new ie(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,o){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===o&&("src"===e||"srcset"===e)||("source"===o&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const o=(new DOMParser).parseFromString(t,"text/html"),s=o.createDocumentFragment(),i=o.body.childNodes;for(;i.length>0;)s.appendChild(i[0]);const n=o.createTreeWalker(s,NodeFilter.SHOW_ELEMENT),r=[];let a;for(;a=n.nextNode();)r.push(a);for(const e of r){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(at(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(s)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{const o=e;if(this.mapViewToDom(o)){if(!o.getCustomProperty("editingPipeline:doNotReuseOnce"))return this.mapViewToDom(o);this._elementsWithTemporaryCustomProperties.add(o)}let s;if(o.is("documentFragment"))s=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(s,o);else{if(o.is("uiElement"))return s="$comment"===o.name?this._domDocument.createComment(o.getCustomProperty("$rawContent")):o.render(this._domDocument,this),t.bind&&this.bindElements(s,o),s;this._shouldRenameElement(o.name)?(at(o.name),s=this._createReplacementDomElement(o.name)):s=o.hasAttribute("xmlns")?this._domDocument.createElementNS(o.getAttribute("xmlns"),o.name):this._domDocument.createElement(o.name),o.is("rawElement")&&o.render(s,this),t.bind&&this.bindElements(s,o);for(const e of o.getAttributeKeys())this.setDomElementAttribute(s,e,o.getAttribute(e),o)}if(!1!==t.withChildren)for(const e of this.viewChildrenToDom(o,t))s instanceof HTMLTemplateElement?s.content.appendChild(e):s.appendChild(e);return s}}setDomElementAttribute(e,t,o,s){const i=this.shouldRenderAttribute(t,o,e.tagName.toLowerCase())||s&&s.shouldRenderUnsafeAttribute(t);i||(0,a.FF)("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:o}),(0,a.i8)(t)?(e.hasAttribute(t)&&!i?e.removeAttribute(t):e.hasAttribute(ot+t)&&i&&e.removeAttribute(ot+t),e.setAttribute(i?t:ot+t,o)):(0,a.FF)("domconverter-invalid-attribute-detected",{domElement:e,key:t,value:o})}removeDomElementAttribute(e,t){t!=st&&(e.removeAttribute(t),e.removeAttribute(ot+t))}*viewChildrenToDom(e,t={}){const o=e.getFillerOffset&&e.getFillerOffset();let s=0;for(const i of e.getChildren()){o===s&&(yield this._getBlockFiller());const e=i.is("element")&&!!i.getCustomProperty("dataPipeline:transparentRendering")&&!(0,a.$1)(i.getAttributes());e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(i,t):(e&&(0,a.FF)("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:i}),yield this.viewToDom(i,t)),s++}o===s&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),o=this.viewPositionToDom(e.end),s=this._domDocument.createRange();return s.setStart(t.parent,t.offset),s.setEnd(o.parent,o.offset),s}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const o=this.findCorrespondingDomText(t);if(!o)return null;let s=e.offset;return ze(o)&&(s+=Fe),{parent:o,offset:s}}{let o,s,i;if(0===e.offset){if(o=this.mapViewToDom(t),!o)return null;i=o.childNodes[0]}else{const t=e.nodeBefore;if(s=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!s)return null;o=s.parentNode,i=s.nextSibling}if((0,a.KH)(i)&&ze(i))return{parent:i,offset:Fe};return{parent:o,offset:s?(0,a.qh)(s)+1:0}}}domToView(e,t={}){const o=[],s=this._domToView(e,t,o),i=s.next().value;return i?(s.next(),this._processDomInlineNodes(null,o,t),i.is("$text")&&0==i.data.length?null:i):null}*domChildrenToView(e,t={},o=[]){let s=[];s=e instanceof HTMLTemplateElement?[...e.content.childNodes]:[...e.childNodes];for(let i=0;i{const{scrollLeft:t,scrollTop:o}=e;s.push([t,o])})),t.focus(),nt(t,(e=>{const[t,o]=s.shift();e.scrollLeft=t,e.scrollTop=o})),a.Sf.window.scrollTo(e,o)}}_clearDomSelection(){const e=this.mapViewToDom(this.document.selection.editableElement);if(!e)return;const t=e.ownerDocument.defaultView.getSelection(),o=this.domSelectionToView(t);o&&o.rangeCount>0&&t.removeAllRanges()}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(Qe):!("BR"!==e.tagName||!rt(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(tt)||function(e,t){const o=e.isEqualNode(et);return o&&rt(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const o=t.collapsed;return t.detach(),o}getHostViewElement(e){const t=(0,a.DS)(e);for(t.pop();t.length;){const e=t.pop(),o=this._domToViewMapping.get(e);if(o&&(o.is("uiElement")||o.is("rawElement")))return o}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}registerInlineObjectMatcher(e){this._inlineObjectElementMatcher.add(e)}_clearTemporaryCustomProperties(){for(const e of this._elementsWithTemporaryCustomProperties)e._removeCustomProperty("editingPipeline:doNotReuseOnce");this._elementsWithTemporaryCustomProperties.clear()}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return Be(this._domDocument);case"markedNbsp":return De(this._domDocument);case"br":return Ne(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if((0,a.KH)(e)&&ze(e)&&t0?t[e-1]:null,c=e+1e.is("element")&&t.includes(e.name)))}(e,this.preElements))return!0;for(const t of e.getAncestors({parentFirst:!0}))if(t.is("element")&&t.hasStyle("white-space")&&"inherit"!==t.getStyle("white-space"))return["pre","pre-wrap","break-spaces"].includes(t.getStyle("white-space"));return!1}_getTouchingInlineViewNode(e,t){const o=new ee({startPosition:t?te._createAfter(e):te._createBefore(e),direction:t?"forward":"backward"});for(const e of o){if(e.item.is("element","br"))return null;if(this._isInlineObjectElement(e.item))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("$textProxy"))return e.item}return null}_isBlockDomElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isBlockViewElement(e){return e.is("element")&&this.blockElements.includes(e.name)}_isInlineObjectElement(e){return!!e.is("element")&&("br"==e.name||this.inlineObjectElements.includes(e.name)||!!this._inlineObjectElementMatcher.match(e))}_createViewElement(e,t){if((0,a.Cn)(e))return new ke(this.document,"$comment");const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new K(this.document,o)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&e.is("element")&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const o=this._domDocument.createElement("span");if(o.setAttribute(st,e),t){for(;t.firstChild;)o.appendChild(t.firstChild);for(const e of t.getAttributeNames())o.setAttribute(e,t.getAttribute(e))}return o}}function nt(e,t){let o=e;for(;o;)t(o),o=o.parentElement}function rt(e,t){const o=e.parentNode;return!!o&&!!o.tagName&&t.includes(o.tagName.toLowerCase())}function at(e){"script"===e&&(0,a.FF)("domconverter-unsafe-script-element-detected"),"style"===e&&(0,a.FF)("domconverter-unsafe-style-element-detected")}class ct extends((0,a.c5)()){view;document;_isEnabled=!1;constructor(e){super(),this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}var lt=o("./node_modules/lodash-es/assignIn.js");class dt{view;document;domEvent;domTarget;constructor(e,t,o){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,(0,lt.A)(this,o)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class ht extends ct{useCapture=!1;observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,o){this.isEnabled&&this.document.fire(e,new dt(this.view,t,o))}}class ut extends ht{domEventType=["keydown","keyup"];onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return(0,a.QC)(this)}};this.fire(e.type,e,t)}}var pt=o("./node_modules/lodash-es/debounce.js");class mt extends ct{_fireSelectionChangeDoneDebounced;constructor(e){super(e),this._fireSelectionChangeDoneDebounced=(0,pt.A)((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&o.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(o.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,o=new ie(t.getRanges(),{backward:t.isBackward,fake:!1});e!=a.uP.arrowleft&&e!=a.uP.arrowup||o.setTo(o.getFirstPosition()),e!=a.uP.arrowright&&e!=a.uP.arrowdown||o.setTo(o.getLastPosition());const s={oldSelection:t,newSelection:o,domSelection:null};this.document.fire("selectionChange",s),this._fireSelectionChangeDoneDebounced(s)}}var ft=o("./node_modules/lodash-es/_baseIsEqual.js");const gt=function(e,t,o){var s=(o="function"==typeof o?o:void 0)?o(e,t):void 0;return void 0===s?(0,ft.A)(e,t,void 0,o):!!s};class _t extends ct{domConverter;renderer;_config;_domElements;_mutationObserver;constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,o=new Set,s=new Set;for(const o of e){const e=t.mapDomToView(o.target);e&&(e.is("uiElement")||e.is("rawElement")||"childList"!==o.type||this._isBogusBrMutation(o)||s.add(e))}for(const i of e){const e=t.mapDomToView(i.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===i.type){const e=t.findCorrespondingViewText(i.target);e&&!s.has(e.parent)?o.add(e):!e&&ze(i.target)&&s.add(t.mapDomToView(i.target.parentNode))}}let i=!1;for(const e of o)i=!0,this.renderer.markToSync("text",e);for(const e of s){const o=t.mapViewToDom(e),s=Array.from(e.getChildren()),n=Array.from(t.domChildrenToView(o,{withChildren:!1}));gt(s,n,bt)||(i=!0,this.renderer.markToSync("children",e))}i&&this.view.forceRender()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}function bt(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}class kt extends ht{_renderTimeoutId;_isFocusChanging=!1;domEventType=["focus","blur"];constructor(e){super(e),this.useCapture=!0;const t=this.document;t.on("focus",(()=>{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),e.change((()=>{}))}),50)})),t.on("blur",((o,s)=>{const i=t.selection.editableElement;null!==i&&i!==s.target||(t.isFocused=!1,this._isFocusChanging=!1,e.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class wt extends ct{mutationObserver;focusObserver;selection;domConverter;_documents;_fireSelectionChangeDoneDebounced;_clearInfiniteLoopInterval;_documentIsSelectingInactivityTimeoutDebounced;_loopbackCounter;constructor(e){super(e),this.mutationObserver=e.getObserver(_t),this.focusObserver=e.getObserver(kt),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=(0,pt.A)((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=(0,pt.A)((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,o=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",o,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",o,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",o,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,o)=>{this.document.isComposing&&!a._K.isAndroid||(this._handleSelectionChange(o,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e,t){if(!this.isEnabled)return;const o=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(o.anchorNode))return;this.mutationObserver.flush();const s=this.domConverter.domSelectionToView(o);if(0!=s.rangeCount){if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.selection.isEqual(s)||!this.domConverter.isDomSelectionCorrect(o))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.selection.isSimilar(s))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:s,domSelection:o};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class vt extends ht{domEventType=["compositionstart","compositionupdate","compositionend"];constructor(e){super(e);const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class yt{_files;_native;constructor(e,t={}){this._files=t.cacheFiles?xt(e):null,this._native=e}get files(){return this._files||(this._files=xt(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,o){this._native.setDragImage(e,t,o)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function xt(e){const t=Array.from(e.files||[]),o=Array.from(e.items||[]);return t.length?t:o.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class At extends ht{domEventType="beforeinput";onDomEvent(e){const t=e.getTargetRanges(),o=this.view,s=o.document;let i=null,n=null,r=[];if(e.dataTransfer&&(i=new yt(e.dataTransfer)),null!==e.data?n=e.data:i&&(n=i.getData("text/plain")),s.selection.isFake)r=Array.from(s.selection.getRanges());else if(t.length)r=t.map((e=>{const t=o.domConverter.domPositionToView(e.startContainer,e.startOffset),s=o.domConverter.domPositionToView(e.endContainer,e.endOffset);return t?o.createRange(t,s):s?o.createRange(s):void 0})).filter((e=>!!e));else if(a._K.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();r=Array.from(o.domConverter.domSelectionToView(t).getRanges())}if(a._K.isAndroid&&"insertCompositionText"==e.inputType&&n&&n.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[o.createRange(r[0].end)]});else if("insertText"==e.inputType&&n&&n.includes("\n")){const t=n.split(/\n{1,2}/g);let o=r;for(let n=0;n{if(this.isEnabled&&(0,a.Yt)(t.keyCode)){const o=new re(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(o,t),o.stop.called&&e.stop()}}))}observe(){}stopObserving(){}}class Tt extends ct{constructor(e){super(e);const t=this.document;t.on("keydown",((e,o)=>{if(!this.isEnabled||o.keyCode!=a.uP.tab||o.ctrlKey)return;const s=new re(t,"tab",t.selection.getFirstRange());t.fire(s,o),s.stop.called&&e.stop()}))}observe(){}stopObserving(){}}var Et=o("./node_modules/lodash-es/cloneDeep.js");class Pt extends((0,a.VM)()){document;domConverter;domRoots=new Map;_renderer;_initialDomRootAttributes=new WeakMap;_observers=new Map;_writer;_ongoingChange=!1;_postFixersInProgress=!1;_renderingDisabled=!1;_hasChangedSinceTheLastRendering=!1;constructor(e){super(),this.document=new pe(e),this.domConverter=new it(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new Ke(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new Ce(this.document),this.addObserver(_t),this.addObserver(kt),this.addObserver(wt),this.addObserver(ut),this.addObserver(mt),this.addObserver(vt),this.addObserver(Ct),this.addObserver(At),this.addObserver(Tt),this.document.on("arrowKey",We,{priority:"low"}),we(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0})),a._K.isiOS&&this.listenTo(this.document,"blur",((e,t)=>{this.domConverter.mapDomToView(t.domEvent.relatedTarget)||this.domConverter._clearDomSelection()}))}attachDomRoot(e,t="main"){const o=this.document.getRoot(t);o._name=e.tagName.toLowerCase();const s={};for(const{name:t,value:i}of Array.from(e.attributes))s[t]=i,"class"===t?this._writer.addClass(i.split(" "),o):this._writer.setAttribute(t,i,o);this._initialDomRootAttributes.set(e,s);const i=()=>{this._writer.setAttribute("contenteditable",(!o.isReadOnly).toString(),o),o.isReadOnly?this._writer.addClass("ck-read-only",o):this._writer.removeClass("ck-read-only",o)};i(),this.domRoots.set(t,e),this.domConverter.bindElements(e,o),this._renderer.markToSync("children",o),this._renderer.markToSync("attributes",o),this._renderer.domDocuments.add(e.ownerDocument),o.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),o.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),o.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),o.on("change:isReadOnly",(()=>this.change(i))),o.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const o of this._observers.values())o.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const o=this._initialDomRootAttributes.get(t);for(const e in o)t.setAttribute(e,o[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,o]of this.domRoots)t.observe(o,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:o=20,ancestorOffset:s=20}={}){const i=this.document.selection.getFirstRange();if(!i)return;const n=(0,Et.A)({alignToTop:e,forceScroll:t,viewportOffset:o,ancestorOffset:s});"number"==typeof o&&(o={top:o,bottom:o,left:o,right:o});const r={target:this.domConverter.viewRangeToDom(i),viewportOffset:o,ancestorOffset:s,alignToTop:e,forceScroll:t};this.fire("scrollToTheSelection",r,n),(0,a.vK)(r)}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new a.Yb("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){a.Yb.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(kt).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return te._createAt(e,t)}createPositionAfter(e){return te._createAfter(e)}createPositionBefore(e){return te._createBefore(e)}createRange(e,t){return new oe(e,t)}createRangeOn(e){return oe._createOn(e)}createRangeIn(e){return oe._createIn(e)}createSelection(...e){return new ie(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class St{is(){throw new Error("is() method is abstract")}}class Mt extends St{parent=null;_attrs;constructor(e){super(),this._attrs=(0,a.av)(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new a.Yb("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new a.Yb("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),s=e.getAncestors(t);let i=0;for(;o[i]==s[i]&&o[i];)i++;return 0===i?null:o[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),s=(0,a.ww)(t,o);switch(s){case"prefix":return!0;case"extension":return!1;default:return t[s](e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=(0,a.av)(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}Mt.prototype.is=function(e){return"node"===e||"model:node"===e};class Ot{_nodes=[];constructor(e){e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new a.Yb("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const o of this._nodes){if(e>=t&&ee.toJSON()))}}class Vt extends Mt{_data;constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Vt(this.data,this.getAttributes())}static fromJSON(e){return new Vt(e.data,e.attributes)}}Vt.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class Rt extends St{textNode;data;offsetInText;constructor(e,t,o){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new a.Yb("model-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.offsetSize)throw new a.Yb("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}Rt.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class jt extends Mt{name;_children=new Ot;constructor(e,t,o){super(t),this.name=e,o&&this._insertChild(0,o)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}findAncestor(e,t={}){let o=t.includeSelf?this:this.parent;for(;o;){if(o.name===e)return o;o=o.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new jt(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Vt(e)];(0,a.xZ)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Vt(e):e instanceof Rt?new Vt(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}static fromJSON(e){let t;if(e.children){t=[];for(const o of e.children)o.name?t.push(jt.fromJSON(o)):t.push(Vt.fromJSON(o))}return new jt(e.name,e.attributes,t)}}jt.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class It{direction;boundaries;singleCharacters;shallow;ignoreElementEnd;_position;_boundaryStartParent;_boundaryEndParent;_visitedParent;constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new a.Yb("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new a.Yb("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=Dt._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o,s,i;do{s=this.position,i=this._visitedParent,({done:t,value:o}=this.next())}while(!t&&e(o));t||(this._position=s,this._visitedParent=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),o=this._visitedParent;if(null===o.parent&&t.offset===o.maxOffset)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const s=Nt(t,o),i=s||Ft(t,o,s);if(i instanceof jt){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(t))return{done:!0,value:void 0};t.offset++}else t.path.push(0),this._visitedParent=i;return this._position=t,Bt("elementStart",i,e,t,1)}if(i instanceof Vt){let s;if(this.singleCharacters)s=1;else{let e=i.endOffset;this._boundaryEndParent==o&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),s=t.offset-e}const i=t.offset-n.startOffset,r=new Rt(n,i-s,s);return t.offset-=s,this._position=t,Bt("text",r,e,t,s)}return t.path.pop(),this._position=t,this._visitedParent=o.parent,Bt("elementStart",o,e,t,1)}}function Bt(e,t,o,s,i){return{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:s,length:i}}}class Dt extends St{root;path;stickiness;constructor(e,t,o="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new a.Yb("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new a.Yb("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=o}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t1)return!1;if(1===t)return zt(e,this,o);if(-1===t)return zt(this,e,o)}return this.path.length===e.path.length||(this.path.length>e.path.length?Ht(this.path,t):Ht(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;const t=this.getParentPath(),o=e.getParentPath();return"same"==(0,a.ww)(t,o)}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=Dt._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let o;return t.containsPosition(this)||t.start.isEqual(this)?(o=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(o=o._getTransformedByDeletion(e.deletionPosition,1))):o=this.isEqual(e.deletionPosition)?Dt._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),o}_getTransformedByDeletion(e,t){const o=Dt._createAt(this);if(this.root!=e.root)return o;if("same"==(0,a.ww)(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;o.offset-=t}}else if("prefix"==(0,a.ww)(e.getParentPath(),this.getParentPath())){const s=e.path.length-1;if(e.offset<=this.path[s]){if(e.offset+t>this.path[s])return null;o.path[s]-=t}}return o}_getTransformedByInsertion(e,t){const o=Dt._createAt(this);if(this.root!=e.root)return o;if("same"==(0,a.ww)(e.getParentPath(),this.getParentPath()))(e.offset=t;){if(e.path[s]+i!==o.maxOffset)return!1;i=1,s--,o=o.parent}return!0}(e,o+1))}function Ht(e,t){for(;tt+1;){const t=s.maxOffset-o.offset;0!==t&&e.push(new $t(o,o.getShiftedBy(t))),o.path=o.path.slice(0,-1),o.offset++,s=s.parent}for(;o.path.length<=this.end.path.length;){const t=this.end.path[o.path.length-1],s=t-o.offset;0!==s&&e.push(new $t(o,o.getShiftedBy(s))),o.offset=t,o.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new It(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new It(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new It(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new $t(this.start,this.end)]}getTransformedByOperations(e){const t=[new $t(this.start,this.end)];for(const o of e)for(let e=0;e0?new this(o,s):new this(s,o)}static _createIn(e){return new this(Dt._createAt(e,0),Dt._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(Dt._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new a.Yb("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const o=e.indexOf(t),s=new this(t.start,t.end);if(o>0)for(let t=o-1;e[t].end.isEqual(s.start);t++)s.start=Dt._createAt(e[t].start);for(let t=o+1;t{if(t.viewPosition)return;const o=this._modelToViewMapping.get(t.modelPosition.parent);if(!o)throw new a.Yb("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(o,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const o=this.findMappedViewAncestor(t.viewPosition),s=this._viewToModelMapping.get(o),i=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,o);t.modelPosition=Dt._createAt(s,i)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const o=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(o)==e&&this._modelToViewMapping.delete(o))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const o=this._markerNameToElements.get(t)||new Set;o.add(e);const s=this._elementToMarkerNames.get(e)||new Set;s.add(t),this._markerNameToElements.set(t,o),this._elementToMarkerNames.set(e,s)}unbindElementFromMarkerName(e,t){const o=this._markerNameToElements.get(t);o&&(o.delete(e),0==o.size&&this._markerNameToElements.delete(t));const s=this._elementToMarkerNames.get(e);s&&(s.delete(t),0==s.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new $t(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new oe(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const o={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",o),o.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const o=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())o.add(t);else o.add(e);return o}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,o){if(o!=e){return this._toModelOffset(e.parent,e.index,o)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let s=0;for(let o=0;o1?t[0]+":"+t[1]:t[0]}class Kt extends((0,a.Mm)()){_conversionApi;_firedEventsMap;constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,o){const s=this._createConversionApi(o,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,s);const i=this._reduceChanges(e.getChanges());for(const e of i)"insert"===e.type?this._convertInsert($t._createFromPositionAndShift(e.position,e.length),s):"reinsert"===e.type?this._convertReinsert($t._createFromPositionAndShift(e.position,e.length),s):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,s):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,s);s.mapper.flushDeferredBindings();for(const e of s.mapper.flushUnboundMarkerNames()){const o=t.get(e).getRange();this._convertMarkerRemove(e,o,s),this._convertMarkerAdd(e,o,s)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,s);s.consumable.verifyAllConsumed("insert")}convert(e,t,o,s={}){const i=this._createConversionApi(o,void 0,s);this._convertInsert(e,i);for(const[e,o]of t)this._convertMarkerAdd(e,o,i);i.consumable.verifyAllConsumed("insert")}convertSelection(e,t,o){const s=this._createConversionApi(o);this.fire("cleanSelection",{selection:e},s);const i=e.getFirstPosition().root;if(!s.mapper.toViewElement(i))return;const n=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this._addConsumablesForSelection(s.consumable,e,n),this.fire("selection",{selection:e},s),e.isCollapsed){for(const t of n)if(s.consumable.test(e,"addMarker:"+t.name)){const o=t.getRange();if(!Yt(e.getFirstPosition(),t,s.mapper))continue;const i={item:e,markerName:t.name,markerRange:o};this.fire(`addMarker:${t.name}`,i,s)}for(const t of e.getAttributeKeys())if(s.consumable.test(e,"attribute:"+t)){const o={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.fire(`attribute:${t}:$text`,o,s)}}}_convertInsert(e,t,o={}){o.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,e);for(const o of Array.from(e.getWalker({shallow:!0})).map(Gt))this._testAndFire("insert",o,t)}_convertRemove(e,t,o,s){this.fire(`remove:${o}`,{position:e,length:t},s)}_convertAttribute(e,t,o,s,i){this._addConsumablesForRange(i.consumable,e,`attribute:${t}`);for(const n of e){const e={item:n.item,range:$t._createFromPositionAndShift(n.previousPosition,n.length),attributeKey:t,attributeOldValue:o,attributeNewValue:s};this._testAndFire(`attribute:${t}`,e,i)}}_convertReinsert(e,t){const o=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,o);for(const e of o.map(Gt))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,o){if("$graveyard"==t.root.rootName)return;const s=`addMarker:${e}`;if(o.consumable.add(t,s),this.fire(s,{markerName:e,markerRange:t},o),o.consumable.consume(t,s)){this._addConsumablesForRange(o.consumable,t,s);for(const i of t.getItems()){if(!o.consumable.test(i,s))continue;const n={item:i,range:$t._createOn(i),markerName:e,markerRange:t};this.fire(s,n,o)}}}_convertMarkerRemove(e,t,o){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},o)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const o of t){const t=o.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o)}}return e}_addConsumablesForRange(e,t,o){for(const s of t.getItems())e.add(s,o);return e}_addConsumablesForSelection(e,t,o){e.add(t,"selection");for(const s of o)e.add(t,"addMarker:"+s.name);for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o);return e}_testAndFire(e,t,o){const s=function(e,t){const o=t.item.is("element")?t.item.name:"$text";return`${e}:${o}`}(e,t),i=t.item.is("$textProxy")?o.consumable._getSymbolForTextProxy(t.item):t.item,n=this._firedEventsMap.get(o),r=n.get(i);if(r){if(r.has(s))return;r.add(s)}else n.set(i,new Set([s]));this.fire(s,t,o)}_testAndFireAddAttributes(e,t){const o={item:e,range:$t._createOn(e)};for(const e of o.item.getAttributeKeys())o.attributeKey=e,o.attributeOldValue=null,o.attributeNewValue=o.item.getAttribute(e),this._testAndFire(`attribute:${e}`,o,t)}_createConversionApi(e,t=new Set,o={}){const s={...this._conversionApi,consumable:new qt,writer:e,options:o,convertItem:e=>this._convertInsert($t._createOn(e),s),convertChildren:e=>this._convertInsert($t._createIn(e),s,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,s),canReuseView:e=>!t.has(s.mapper.toModelElement(e))};return this._firedEventsMap.set(s,new Map),s}}function Yt(e,t,o){const s=t.getRange(),i=Array.from(e.getAncestors());i.shift(),i.reverse();return!i.some((e=>{if(s.containsItem(e)){return!!o.toViewElement(e).getCustomProperty("addHighlight")}}))}function Gt(e){return{item:e.item,range:$t._createFromPositionAndShift(e.previousPosition,e.length)}}class Zt extends((0,a.Mm)(St)){_lastRangeBackward=!1;_attrs=new Map;_ranges=[];constructor(...e){super(),e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const s of e._ranges)if(t.isEqual(s)){o=!0;break}if(!o)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new $t(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new $t(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new $t(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,o,s]=e;if("object"==typeof o&&(s=o,o=void 0),null===t)this._setRanges([]);else if(t instanceof Zt)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof $t)this._setRanges([t],!!s&&!!s.backward);else if(t instanceof Dt)this._setRanges([new $t(t)]);else if(t instanceof Mt){const e=!!s&&!!s.backward;let i;if("in"==o)i=$t._createIn(t);else if("on"==o)i=$t._createOn(t);else{if(void 0===o)throw new a.Yb("model-selection-setto-required-second-parameter",[this,t]);i=new $t(Dt._createAt(t,o))}this._setRanges([i],e)}else{if(!(0,a.xZ)(t))throw new a.Yb("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,s&&!!s.backward)}}_setRanges(e,t=!1){const o=Array.from(e),s=o.some((t=>{if(!(t instanceof $t))throw new a.Yb("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(o.length!==this._ranges.length||s)&&(this._replaceAllRanges(o),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new a.Yb("model-selection-setfocus-no-ranges",[this,e]);const o=Dt._createAt(e,t);if("same"==o.compareWith(this.focus))return;const s=this.anchor;this._ranges.length&&this._popRange(),"before"==o.compareWith(s)?(this._pushRange(new $t(o,s)),this._lastRangeBackward=!0):(this._pushRange(new $t(s,o)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const o=Qt(t.start,e);to(o,t)&&(yield o);for(const o of t.getWalker()){const s=o.item;"elementEnd"==o.type&&Xt(s,e,t)&&(yield s)}const s=Qt(t.end,e);oo(s,t)&&(yield s)}}containsEntireContent(e=this.anchor.root){const t=Dt._createAt(e,0),o=Dt._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&o.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new $t(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function Jt(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function Xt(e,t,o){return Jt(e,t)&&eo(e,o)}function Qt(e,t){const o=e.parent.root.document.model.schema,s=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let i=!1;const n=s.find((e=>!i&&(i=o.isLimit(e),!i&&Jt(e,t))));return s.forEach((e=>t.add(e))),n}function eo(e,t){const o=function(e){const t=e.root.document.model.schema;let o=e.parent;for(;o;){if(t.isBlock(o))return o;o=o.parent}}(e);if(!o)return!0;return!t.containsRange($t._createOn(o),!0)}function to(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(Dt._createAt(e,e.maxOffset))&&eo(e,t))}function oo(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(Dt._createAt(e,0))&&eo(e,t))}Zt.prototype.is=function(e){return"selection"===e||"model:selection"===e};class so extends((0,a.Mm)($t)){constructor(e,t){super(e,t),io.call(this)}detach(){this.stopListening()}toRange(){return new $t(this.start,this.end)}static fromRange(e){return new so(e.start,e.end)}}function io(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&no.call(this,o)}),{priority:"low"})}function no(e){const t=this.getTransformedByOperation(e),o=$t._createFromRanges(t),s=!o.isEqual(this),i=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let n=null;if(s){"$graveyard"==o.root.rootName&&(n="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=o.start,this.end=o.end,this.fire("change:range",t,{deletionPosition:n})}else i&&this.fire("change:content",this.toRange(),{deletionPosition:n})}so.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const ro="selection:";class ao extends((0,a.Mm)(St)){_selection;constructor(e){super(),this._selection=new co(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return ro+e}static _isStoreAttributeKey(e){return e.startsWith(ro)}}ao.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class co extends Zt{markers=new a.pM({idProperty:"name"});_model;_document;_attributePriority=new Map;_selectionRestorePosition=null;_hasChangedRange=!1;_overriddenGravityRegister=new Set;_observedMarkers=new Set;constructor(e){super(),this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&"marker"!=o.type&&"rename"!=o.type&&"noop"!=o.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,o,s)=>{this._updateMarker(t,s)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const o=e.document.differ;for(const s of o.getChanges()){if("insert"!=s.type)continue;const o=s.position.parent;s.length===o.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(o.getAttributeKeys()).filter((e=>e.startsWith(ro)));for(const s of t)e.removeAttribute(s,o)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=s.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const o=t.name.split(":",1)[0];if(!this._observedMarkers.has(o))continue;const s=t.getRange();for(const o of this.getRanges())s.containsRange(o,!o.isCollapsed)&&e.push(t)}const o=Array.from(this.markers);for(const o of e)this.markers.has(o)||(this.markers.add(o),t=!0);for(const o of Array.from(this.markers))e.includes(o)||(this.markers.remove(o),t=!0);t&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateMarker(e,t){const o=e.name.split(":",1)[0];if(!this._observedMarkers.has(o))return;let s=!1;const i=Array.from(this.markers),n=this.markers.has(e);if(t){let o=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){o=!0;break}o&&!n?(this.markers.add(e),s=!0):!o&&n&&(this.markers.remove(e),s=!0)}else n&&(this.markers.remove(e),s=!0);s&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(e){const t=(0,a.av)(this._getSurroundingAttributes()),o=(0,a.av)(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const s=[];for(const[e,t]of this.getAttributes())o.has(e)&&o.get(e)===t||s.push(e);for(const[e]of o)this.hasAttribute(e)||s.push(e);s.length>0&&this.fire("change:attribute",{attributeKeys:s,directChange:!1})}_setAttribute(e,t,o=!0){const s=o?"normal":"low";if("low"==s&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,s),!0)}_removeAttribute(e,t=!0){const o=t?"normal":"low";return("low"!=o||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,o),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,o]of this.getAttributes())e.get(t)!==o&&this._removeAttribute(t,!1);for(const[o,s]of e){this._setAttribute(o,s,!1)&&t.add(o)}return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(ro)){const o=t.substr(10);yield[o,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;if("$graveyard"==e.root.rootName)return null;let o=null;if(this.isCollapsed){const s=e.textNode?e.textNode:e.nodeBefore,i=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(o=lo(s,t)),o||(o=lo(i,t)),!this.isGravityOverridden&&!o){let e=s;for(;e&&!o;)e=e.previousSibling,o=lo(e,t)}if(!o){let e=i;for(;e&&!o;)e=e.nextSibling,o=lo(e,t)}o||(o=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const s of e){if(s.item.is("element")&&t.isObject(s.item)){o=lo(s.item,t);break}if("text"==s.type){o=s.item.getAttributes();break}}}return o}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function lo(e,t){if(!e)return null;if(e instanceof Rt||e instanceof Vt)return e.getAttributes();if(!t.isInline(e))return null;if(!t.isObject(e))return[];const o=[];for(const[s,i]of e.getAttributes())t.checkAttribute("$text",s)&&!1!==t.getAttributeProperties(s).copyFromObject&&o.push([s,i]);return o}class ho{_dispatchers;constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}class uo extends ho{elementToElement(e){return this.add(function(e){const t=bo(e.model),o=ko(e.view,"container");t.attributes.length&&(t.children=!0);return s=>{s.on(`insert:${t.name}`,fo(o,Ao(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&s.on("reduceChanges",xo(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=bo(e.model),o=ko(e.view,"container");return t.children=!0,s=>{if(s._conversionApi.schema.checkChild(t.name,"$text"))throw new a.Yb("conversion-element-to-structure-disallowed-text",s,{elementName:t.name});var i,n;s.on(`insert:${t.name}`,(i=o,n=Ao(t),(e,t,o)=>{if(!n(t.item,o.consumable,{preflight:!0}))return;const s=new Map;o.writer._registerSlotFactory(function(e,t,o){return(s,i)=>{const n=s.createContainerElement("$slot");let r=null;if("children"===i)r=Array.from(e.getChildren());else{if("function"!=typeof i)throw new a.Yb("conversion-slot-mode-unknown",o.dispatcher,{modeOrFilter:i});r=Array.from(e.getChildren()).filter((e=>i(e)))}return t.set(n,r),n}}(t.item,s,o));const r=i(t.item,o,t);if(o.writer._clearSlotFactory(),!r)return;!function(e,t,o){const s=Array.from(t.values()).flat(),i=new Set(s);if(i.size!=s.length)throw new a.Yb("conversion-slot-filter-overlap",o.dispatcher,{element:e});if(i.size!=e.childCount)throw new a.Yb("conversion-slot-filter-incomplete",o.dispatcher,{element:e})}(t.item,s,o),n(t.item,o.consumable);const c=o.mapper.toViewPosition(t.range.start);o.mapper.bindElements(t.item,r),o.writer.insert(c,r),o.convertAttributes(t.item),function(e,t,o,s){o.mapper.on("modelToViewPosition",r,{priority:"highest"});let i=null,n=null;for([i,n]of t)Co(e,n,o,s),o.writer.move(o.writer.createRangeIn(i),o.writer.createPositionBefore(i)),o.writer.remove(i);function r(e,t){const o=t.modelPosition.nodeAfter,s=n.indexOf(o);s<0||(t.viewPosition=t.mapper.findPositionIn(i,s))}o.mapper.off("modelToViewPosition",r)}(r,s,o,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),s.on("reduceChanges",xo(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){e=(0,Et.A)(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=ko(e.view[o],"attribute");else e.view=ko(e.view,"attribute");const s=wo(e);return t=>{t.on(o,mo(s),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=(0,Et.A)(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=vo(e.view[o]);else e.view=vo(e.view);const s=wo(e);return t=>{var i;t.on(o,(i=s,(e,t,o)=>{if(!o.consumable.test(t.item,e.name))return;const s=i(t.attributeOldValue,o,t),n=i(t.attributeNewValue,o,t);if(!s&&!n)return;o.consumable.consume(t.item,e.name);const r=o.mapper.toViewElement(t.item),c=o.writer;if(!r)throw new a.Yb("conversion-attribute-to-attribute-on-text",o.dispatcher,t);if(null!==t.attributeOldValue&&s)if("class"==s.key){const e="string"==typeof s.value?s.value.split(/\s+/):s.value;for(const t of e)c.removeClass(t,r)}else if("style"==s.key)if("string"==typeof s.value){const e=new $(c.document.stylesProcessor);e.setTo(s.value);for(const[t]of e.getStylesEntries())c.removeStyle(t,r)}else{const e=Object.keys(s.value);for(const t of e)c.removeStyle(t,r)}else c.removeAttribute(s.key,r);if(null!==t.attributeNewValue&&n)if("class"==n.key){const e="string"==typeof n.value?n.value.split(/\s+/):n.value;for(const t of e)c.addClass(t,r)}else if("style"==n.key)if("string"==typeof n.value){const e=new $(c.document.stylesProcessor);e.setTo(n.value);for(const[t,o]of e.getStylesEntries())c.setStyle(t,o,r)}else{const e=Object.keys(n.value);for(const t of e)c.setStyle(t,n.value[t],r)}else c.setAttribute(n.key,n.value,r)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=ko(e.view,"ui");return o=>{o.on(`addMarker:${e.model}`,go(t),{priority:e.converterPriority||"normal"}),o.on(`removeMarker:${e.model}`,((e,t,o)=>{const s=o.mapper.markerNameToElements(t.markerName);if(s){for(const e of s)o.mapper.unbindElementFromMarkerName(e,t.markerName),o.writer.clear(o.writer.createRangeOn(e),e);o.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var o;t.on(`addMarker:${e.model}`,(o=e.view,(e,t,s)=>{if(!t.item)return;if(!(t.item instanceof Zt||t.item instanceof ao||t.item.is("$textProxy")))return;const i=yo(o,t,s);if(!i)return;if(!s.consumable.consume(t.item,e.name))return;const n=s.writer,r=po(n,i),a=n.document.selection;if(t.item instanceof Zt||t.item instanceof ao)n.wrap(a.getFirstRange(),r);else{const e=s.mapper.toViewRange(t.range),o=n.wrap(e,r);for(const e of o.getItems())if(e.is("attributeElement")&&e.isSimilar(r)){s.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,o,s)=>{if(!o.item)return;if(!(o.item instanceof jt))return;const i=yo(e,o,s);if(!i)return;if(!s.consumable.test(o.item,t.name))return;const n=s.mapper.toViewElement(o.item);if(n&&n.getCustomProperty("addHighlight")){s.consumable.consume(o.item,t.name);for(const e of $t._createIn(o.item))s.consumable.consume(e.item,t.name);n.getCustomProperty("addHighlight")(n,i,s.writer),s.mapper.bindElementToMarker(n,o.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,o,s)=>{if(o.markerRange.isCollapsed)return;const i=yo(e,o,s);if(!i)return;const n=po(s.writer,i),r=s.mapper.markerNameToElements(o.markerName);if(r){for(const e of r)if(s.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("attributeElement"))s.writer.unwrap(s.writer.createRangeOn(e),n);else{e.getCustomProperty("removeHighlight")(e,i.id,s.writer)}s.writer.clearClonedElementsGroup(o.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){e=(0,Et.A)(e);const t=e.model;let o=e.view;o||(o=o=>({group:t,name:o.substr(e.model.length+1)}));return s=>{var i;s.on(`addMarker:${t}`,(i=o,(e,t,o)=>{const s=i(t.markerName,o);if(!s)return;const n=t.markerRange;o.consumable.consume(n,e.name)&&(_o(n,!1,o,t,s),_o(n,!0,o,t,s),e.stop())}),{priority:e.converterPriority||"normal"}),s.on(`removeMarker:${t}`,function(e){return(t,o,s)=>{const i=e(o.markerName,s);if(!i)return;const n=s.mapper.markerNameToElements(o.markerName);if(n){for(const e of n)s.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("containerElement")?(r(`data-${i.group}-start-before`,e),r(`data-${i.group}-start-after`,e),r(`data-${i.group}-end-before`,e),r(`data-${i.group}-end-after`,e)):s.writer.clear(s.writer.createRangeOn(e),e);s.writer.clearClonedElementsGroup(o.markerName),t.stop()}function r(e,t){if(t.hasAttribute(e)){const o=new Set(t.getAttribute(e).split(","));o.delete(i.name),0==o.size?s.writer.removeAttribute(e,t):s.writer.setAttribute(e,Array.from(o).join(","),t)}}}}(o),{priority:e.converterPriority||"normal"})}}(e))}}function po(e,t){const o=e.createAttributeElement("span",t.attributes);return t.classes&&o._addClass(t.classes),"number"==typeof t.priority&&(o._priority=t.priority),o._id=t.id,o}function mo(e){return(t,o,s)=>{if(!s.consumable.test(o.item,t.name))return;const i=e(o.attributeOldValue,s,o),n=e(o.attributeNewValue,s,o);if(!i&&!n)return;s.consumable.consume(o.item,t.name);const r=s.writer,a=r.document.selection;if(o.item instanceof Zt||o.item instanceof ao)r.wrap(a.getFirstRange(),n);else{let e=s.mapper.toViewRange(o.range);null!==o.attributeOldValue&&i&&(e=r.unwrap(e,i)),null!==o.attributeNewValue&&n&&r.wrap(e,n)}}}function fo(e,t=Eo){return(o,s,i)=>{if(!t(s.item,i.consumable,{preflight:!0}))return;const n=e(s.item,i,s);if(!n)return;t(s.item,i.consumable);const r=i.mapper.toViewPosition(s.range.start);i.mapper.bindElements(s.item,n),i.writer.insert(r,n),i.convertAttributes(s.item),Co(n,s.item.getChildren(),i,{reconversion:s.reconversion})}}function go(e){return(t,o,s)=>{o.isOpening=!0;const i=e(o,s);o.isOpening=!1;const n=e(o,s);if(!i||!n)return;const r=o.markerRange;if(r.isCollapsed&&!s.consumable.consume(r,t.name))return;for(const e of r)if(!s.consumable.consume(e.item,t.name))return;const a=s.mapper,c=s.writer;c.insert(a.toViewPosition(r.start),i),s.mapper.bindElementToMarker(i,o.markerName),r.isCollapsed||(c.insert(a.toViewPosition(r.end),n),s.mapper.bindElementToMarker(n,o.markerName)),t.stop()}}function _o(e,t,o,s,i){const n=t?e.start:e.end,r=n.nodeAfter&&n.nodeAfter.is("element")?n.nodeAfter:null,a=n.nodeBefore&&n.nodeBefore.is("element")?n.nodeBefore:null;if(r||a){let e,n;t&&r||!t&&!a?(e=r,n=!0):(e=a,n=!1);const c=o.mapper.toViewElement(e);if(c)return void function(e,t,o,s,i,n){const r=`data-${n.group}-${t?"start":"end"}-${o?"before":"after"}`,a=e.hasAttribute(r)?e.getAttribute(r).split(","):[];a.unshift(n.name),s.writer.setAttribute(r,a.join(","),e),s.mapper.bindElementToMarker(e,i.markerName)}(c,t,n,o,s,i)}!function(e,t,o,s,i){const n=`${i.group}-${t?"start":"end"}`,r=i.name?{name:i.name}:null,a=o.writer.createUIElement(n,r);o.writer.insert(e,a),o.mapper.bindElementToMarker(a,s.markerName)}(o.mapper.toViewPosition(n),t,o,s,i)}function bo(e){return"string"==typeof e&&(e={name:e}),{name:e.name,attributes:e.attributes?(0,a.$r)(e.attributes):[],children:!!e.children}}function ko(e,t){return"function"==typeof e?e:(o,s)=>function(e,t,o){"string"==typeof e&&(e={name:e});let s;const i=t.writer,n=Object.assign({},e.attributes);if("container"==o)s=i.createContainerElement(e.name,n);else if("attribute"==o){const t={priority:e.priority||me.DEFAULT_PRIORITY};s=i.createAttributeElement(e.name,n,t)}else s=i.createUIElement(e.name,n);if(e.styles){const t=Object.keys(e.styles);for(const o of t)i.setStyle(o,e.styles[o],s)}if(e.classes){const t=e.classes;if("string"==typeof t)i.addClass(t,s);else for(const e of t)i.addClass(e,s)}return s}(e,s,t)}function wo(e){return e.model.values?(t,o,s)=>{const i=e.view[t];return i?i(t,o,s):null}:e.view}function vo(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function yo(e,t,o){const s="function"==typeof e?e(t,o):e;return s?(s.priority||(s.priority=10),s.id||(s.id=t.markerName),s):null}function xo(e){const t=function(e){return(t,o)=>{if(!t.is("element",e.name))return!1;if("attribute"==o.type){if(e.attributes.includes(o.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,o)=>{const s=[];o.reconvertedElements||(o.reconvertedElements=new Set);for(const e of o.changes){const i="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(i&&t(i,e)){if(!o.reconvertedElements.has(i)){o.reconvertedElements.add(i);const e=Dt._createBefore(i);let t=s.length;for(let o=s.length-1;o>=0;o--){const i=s[o],n=("attribute"==i.type?i.range.start:i.position).compareWith(e);if("before"==n||"remove"==i.type&&"same"==n)break;t=o}s.splice(t,0,{type:"remove",name:i.name,position:e,length:1},{type:"reinsert",name:i.name,position:e,length:1})}}else s.push(e)}o.changes=s}}function Ao(e){return(t,o,s={})=>{const i=["insert"];for(const o of e.attributes)t.hasAttribute(o)&&i.push(`attribute:${o}`);return!!i.every((e=>o.test(t,e)))&&(s.preflight||i.forEach((e=>o.consume(t,e))),!0)}}function Co(e,t,o,s){for(const i of t)To(e.root,i,o,s)||o.convertItem(i)}function To(e,t,o,s){const{writer:i,mapper:n}=o;if(!s.reconversion)return!1;const r=n.toViewElement(t);return!(!r||r.root==e)&&(!!o.canReuseView(r)&&(i.move(i.createRangeOn(r),n.toViewPosition(Dt._createBefore(t))),!0))}function Eo(e,t,{preflight:o}={}){return o?t.test(e,"insert"):t.consume(e,"insert")}function Po(e){const{schema:t,document:o}=e.model;for(const s of o.getRoots())if(s.isEmpty&&!t.checkChild(s,"$text")&&t.checkChild(s,"paragraph"))return e.insertElement("paragraph",s),!0;return!1}function So(e,t,o){const s=o.createContext(e);return!!o.checkChild(s,"paragraph")&&!!o.checkChild(s.push("paragraph"),t)}function Mo(e,t){const o=t.createElement("paragraph");return t.insert(o,e),t.createPositionAt(o,0)}class Oo extends ho{elementToElement(e){return this.add(Vo(e))}elementToAttribute(e){return this.add(function(e){e=(0,Et.A)(e),Io(e);const t=Bo(e,!1),o=Ro(e.view),s=o?`element:${o}`:"element";return o=>{o.on(s,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=(0,Et.A)(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key,o=void 0===e.view.value?/[\s\S]*/:e.view.value;let s;if("class"==t||"style"==t){const e="class"==t?"classes":"styles";s={[e]:o}}else s={attributes:{[t]:o}};e.view.name&&(s.name=e.view.name);return e.view=s,t}(e));Io(e,t);const o=Bo(e,!0);return t=>{t.on("element",o,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,o)=>{const s="string"==typeof e?e:e(t,o);return o.writer.createElement("$marker",{"data-name":s})}}(e.model);return Vo({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){e=(0,Et.A)(e),e.model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},o=jo(Do(t,"start")),s=jo(Do(t,"end"));return i=>{i.on(`element:${e.view}-start`,o,{priority:e.converterPriority||"normal"}),i.on(`element:${e.view}-end`,s,{priority:e.converterPriority||"normal"});const n=a.vx.low,r=a.vx.highest,c=a.vx.get(e.converterPriority)/r;i.on("element",function(e){return(t,o,s)=>{const i=`data-${e.view}`;function n(t,i){for(const n of i){const i=e.model(n,s),r=s.writer.createElement("$marker",{"data-name":i});s.writer.insert(r,t),o.modelCursor.isEqual(t)?o.modelCursor=o.modelCursor.getShiftedBy(1):o.modelCursor=o.modelCursor._getTransformedByInsertion(t,1),o.modelRange=o.modelRange._getTransformedByInsertion(t,1)[0]}}(s.consumable.test(o.viewItem,{attributes:i+"-end-after"})||s.consumable.test(o.viewItem,{attributes:i+"-start-after"})||s.consumable.test(o.viewItem,{attributes:i+"-end-before"})||s.consumable.test(o.viewItem,{attributes:i+"-start-before"}))&&(o.modelRange||Object.assign(o,s.convertChildren(o.viewItem,o.modelCursor)),s.consumable.consume(o.viewItem,{attributes:i+"-end-after"})&&n(o.modelRange.end,o.viewItem.getAttribute(i+"-end-after").split(",")),s.consumable.consume(o.viewItem,{attributes:i+"-start-after"})&&n(o.modelRange.end,o.viewItem.getAttribute(i+"-start-after").split(",")),s.consumable.consume(o.viewItem,{attributes:i+"-end-before"})&&n(o.modelRange.start,o.viewItem.getAttribute(i+"-end-before").split(",")),s.consumable.consume(o.viewItem,{attributes:i+"-start-before"})&&n(o.modelRange.start,o.viewItem.getAttribute(i+"-start-before").split(",")))}}(t),{priority:n+c})}}(e))}}function Vo(e){const t=jo(e=(0,Et.A)(e)),o=Ro(e.view),s=o?`element:${o}`:"element";return o=>{o.on(s,t,{priority:e.converterPriority||"normal"})}}function Ro(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function jo(e){const t=new C(e.view);return(o,s,i)=>{const n=t.match(s.viewItem);if(!n)return;const r=n.match;if(r.name=!0,!i.consumable.test(s.viewItem,r))return;const a=function(e,t,o){return e instanceof Function?e(t,o):o.writer.createElement(e)}(e.model,s.viewItem,i);a&&i.safeInsert(a,s.modelCursor)&&(i.consumable.consume(s.viewItem,r),i.convertChildren(s.viewItem,a),i.updateConversionResult(a,s))}}function Io(e,t=null){const o=null===t||(e=>e.getAttribute(t)),s="object"!=typeof e.model?e.model:e.model.key,i="object"!=typeof e.model||void 0===e.model.value?o:e.model.value;e.model={key:s,value:i}}function Bo(e,t){const o=new C(e.view);return(s,i,n)=>{if(!i.modelRange&&t)return;const r=o.match(i.viewItem);if(!r)return;if(!function(e,t){const o="function"==typeof e?e(t):e;if("object"==typeof o&&!Ro(o))return!1;return!o.classes&&!o.attributes&&!o.styles}(e.view,i.viewItem)?delete r.match.name:r.match.name=!0,!n.consumable.test(i.viewItem,r.match))return;const a=e.model.key,c="function"==typeof e.model.value?e.model.value(i.viewItem,n):e.model.value;if(null===c)return;i.modelRange||Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor));const l=function(e,t,o,s){let i=!1;for(const n of Array.from(e.getItems({shallow:o})))s.schema.checkAttribute(n,t.key)&&(i=!0,n.hasAttribute(t.key)||s.writer.setAttribute(t.key,t.value,n));return i}(i.modelRange,{key:a,value:c},t,n);l&&(n.consumable.test(i.viewItem,{name:!0})&&(r.match.name=!0),n.consumable.consume(i.viewItem,r.match))}}function Do(e,t){return{view:`${e.view}-${t}`,model:(t,o)=>{const s=t.getAttribute("name"),i=e.model(s,o);return o.writer.createElement("$marker",{"data-name":i})}}}function No(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.selection,s=t.schema,i=[];let n=!1;for(const e of o.getRanges()){const t=Fo(e,s);t&&!t.isEqual(e)?(i.push(t),n=!0):i.push(e)}n&&e.setSelection(function(e){const t=[...e],o=new Set;let s=1;for(;s!o.has(t)))}(i),{backward:o.isBackward});return!1}(t,e)))}function Fo(e,t){return e.isCollapsed?function(e,t){const o=e.start,s=t.getNearestSelectionRange(o);if(!s){const e=o.getAncestors().reverse().find((e=>t.isObject(e)));return e?$t._createOn(e):null}if(!s.isCollapsed)return s;const i=s.start;if(o.isEqual(i))return null;return new $t(i)}(e,t):function(e,t){const{start:o,end:s}=e,i=t.checkChild(o,"$text"),n=t.checkChild(s,"$text"),r=t.getLimitElement(o),a=t.getLimitElement(s);if(r===a){if(i&&n)return null;if(function(e,t,o){const s=e.nodeAfter&&!o.isLimit(e.nodeAfter)||o.checkChild(e,"$text"),i=t.nodeBefore&&!o.isLimit(t.nodeBefore)||o.checkChild(t,"$text");return s||i}(o,s,t)){const e=o.nodeAfter&&t.isSelectable(o.nodeAfter)?null:t.getNearestSelectionRange(o,"forward"),i=s.nodeBefore&&t.isSelectable(s.nodeBefore)?null:t.getNearestSelectionRange(s,"backward"),n=e?e.start:o,r=i?i.end:s;return new $t(n,r)}}const c=r&&!r.is("rootElement"),l=a&&!a.is("rootElement");if(c||l){const e=o.nodeAfter&&s.nodeBefore&&o.nodeAfter.parent===s.nodeBefore.parent,i=c&&(!e||!zo(o.nodeAfter,t)),n=l&&(!e||!zo(s.nodeBefore,t));let d=o,h=s;return i&&(d=Dt._createBefore(Lo(r,t))),n&&(h=Dt._createAfter(Lo(a,t))),new $t(d,h)}return null}(e,t)}function Lo(e,t){let o=e,s=o;for(;t.isLimit(s)&&s.parent;)o=s,s=s.parent;return o}function zo(e,t){return e&&t.isSelectable(e)}class Ho extends((0,a.VM)()){model;view;mapper;downcastDispatcher;constructor(e,t){super(),this.model=e,this.view=new Pt(t),this.mapper=new Wt,this.downcastDispatcher=new Kt({mapper:this.mapper,schema:e.schema});const o=this.model.document,s=o.selection,i=this.model.markers;var n,r,c;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(o,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(o.differ,i,e),this.downcastDispatcher.convertSelection(s,i,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(o,s)=>{const i=s.newSelection,n=[];for(const e of i.getRanges())n.push(t.toModelRange(e));const r=e.createSelection(n,{backward:i.isBackward});r.isEqual(e.document.selection)||e.change((e=>{e.setSelection(r)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(n=this.mapper,r=this.model.schema,c=this.view,(e,t)=>{if(!c.document.isComposing||a._K.isAndroid)for(let e=0;e{if(!o.consumable.consume(t.item,e.name))return;const s=o.writer,i=o.mapper.toViewPosition(t.range.start),n=s.createText(t.item.data);s.insert(i,n)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,o)=>{const s=o.mapper.toViewPosition(t.position),i=t.position.getShiftedBy(t.length),n=o.mapper.toViewPosition(i,{isPhantom:!0}),r=o.writer.createRange(s,n),a=o.writer.remove(r.getTrimmed());for(const e of o.writer.createRangeIn(a).getItems())o.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("cleanSelection",((e,t,o)=>{const s=o.writer,i=s.document.selection;for(const e of i.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&o.writer.mergeAttributes(e.start);s.setSelection(null)})),this.downcastDispatcher.on("selection",((e,t,o)=>{const s=t.selection;if(s.isCollapsed)return;if(!o.consumable.consume(s,"selection"))return;const i=[];for(const e of s.getRanges())i.push(o.mapper.toViewRange(e));o.writer.setSelection(i,{backward:s.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const s=t.selection;if(!s.isCollapsed)return;if(!o.consumable.consume(s,"selection"))return;const i=o.writer,n=s.getFirstPosition(),r=o.mapper.toViewPosition(n),a=i.breakAttributes(r);i.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new Q(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,o=this.model.markers.get(t);if(!o)throw new a.Yb("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(o)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class $o{_consumables=new Map;add(e,t){let o;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?o=this._consumables.get(e):(o=new qo(e),this._consumables.set(e,o)),o.add(t))}test(e,t){const o=this._consumables.get(e);return void 0===o?null:e.is("$text")||e.is("documentFragment")?o:o.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const o=this._consumables.get(e);void 0!==o&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):o.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},o=e.getAttributeKeys();for(const e of o)"style"!=e&&"class"!=e&&t.attributes.push(e);const s=e.getClassNames();for(const e of s)t.classes.push(e);const i=e.getStyleNames();for(const e of i)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new $o),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,$o.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const o of e.getChildren())t=$o.createFrom(o,t);return t}}const Wo=["attributes","classes","styles"];class qo{element;_canConsumeName;_consumables;constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of Wo)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of Wo)if(t in e){const o=this._test(t,e[t]);if(!0!==o)return o}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of Wo)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of Wo)t in e&&this._revert(t,e[t])}_add(e,t){const o=(0,a.$r)(t),s=this._consumables[e];for(const t of o){if("attributes"===e&&("class"===t||"style"===t))throw new a.Yb("viewconsumable-invalid-attribute",this);if(s.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))s.set(e,!0)}}_test(e,t){const o=(0,a.$r)(t),s=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){const e=s.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",o=this._test(e,[...this._consumables[e].keys()]);if(!0!==o)return o}return!0}_consume(e,t){const o=(0,a.$r)(t),s=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){if(s.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))s.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const o=(0,a.$r)(t),s=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){!1===s.get(t)&&s.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class Uo extends((0,a.VM)()){_sourceDefinitions={};_attributeProperties={};_compiledDefinitions;constructor(){super(),this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new Ko(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new Ko(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new a.Yb("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new a.Yb("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const o=this.getDefinition(e.last);return!!o&&o.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof Dt){const t=e.nodeBefore,o=e.nodeAfter;if(!(t instanceof jt))throw new a.Yb("schema-check-merge-no-element-before",this);if(!(o instanceof jt))throw new a.Yb("schema-check-merge-no-element-after",this);return this.checkMerge(t,o)}for(const o of t.getChildren())if(!this.checkChild(e,o))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[o,s])=>{if(!s)return;const i=e(o,s);"boolean"==typeof i&&(t.stop(),t.return=i)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[o,s])=>{const i=e(o,s);"boolean"==typeof i&&(t.stop(),t.return=i)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof Dt)t=e.parent;else{t=(e instanceof $t?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const o=t.getCommonAncestor();return e?e.getCommonAncestor(o,{includeSelf:!0}):o}),null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const o=[...e.getFirstPosition().getAncestors(),new Vt("",e.getAttributes())];return this.checkAttribute(o,t)}{const o=e.getRanges();for(const e of o)for(const o of e)if(this.checkAttribute(o.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const o of e)yield*this._getValidRangesForRange(o,t)}getNearestSelectionRange(e,t="both"){if("$graveyard"==e.root.rootName)return null;if(this.checkChild(e,"$text"))return new $t(e);let o,s;const i=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(o=new It({boundaries:$t._createIn(i),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(s=new It({boundaries:$t._createIn(i),startPosition:e}));for(const e of function*(e,t){let o=!1;for(;!o;){if(o=!0,e){const t=e.next();t.done||(o=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(o=!1,yield{walker:t,value:e.value})}}}(o,s)){const t=e.walker==o?"elementEnd":"elementStart",s=e.value;if(s.type==t&&this.isObject(s.item))return $t._createOn(s.item);if(this.checkChild(s.nextPosition,"$text"))return new $t(s.nextPosition)}return null}findAllowedParent(e,t){let o=e.parent;for(;o;){if(this.checkChild(o,t))return o;if(this.isLimit(o))return null;o=o.parent}return null}setAllowedAttributes(e,t,o){const s=o.model;for(const[i,n]of Object.entries(t))s.schema.checkAttribute(e,i)&&o.setAttribute(i,n,e)}removeDisallowedAttributes(e,t){for(const o of e)if(o.is("$text"))rs(this,o,t);else{const e=$t._createIn(o).getPositions();for(const o of e){rs(this,o.nodeBefore||o.parent,t)}}}getAttributesWithProperty(e,t,o){const s={};for(const[i,n]of e.getAttributes()){const e=this.getAttributeProperties(i);void 0!==e[t]&&(void 0!==o&&o!==e[t]||(s[i]=n))}return s}createContext(e){return new Ko(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,o=Object.keys(t);for(const s of o)e[s]=Yo(t[s],s);const s=Object.values(e);for(const t of s)Go(e,t),Zo(e,t),Jo(e,t),Xo(e,t);for(const t of s)Qo(e,t);for(const t of s)es(e,t);for(const t of s)ts(e,t);for(const t of s)os(e,t);for(const t of s)ss(e,t);this._compiledDefinitions=function(e){const t={};for(const o of Object.values(e))t[o.name]={name:o.name,isBlock:!!o.isBlock,isContent:!!o.isContent,isInline:!!o.isInline,isLimit:!!o.isLimit,isObject:!!o.isObject,isSelectable:!!o.isSelectable,allowIn:Array.from(o.allowIn).filter((t=>!!e[t])),allowChildren:Array.from(o.allowChildren).filter((t=>!!e[t])),allowAttributes:Array.from(o.allowAttributes)};return t}(e)}_checkContextMatch(e,t,o=t.length-1){const s=t.getItem(o);if(e.allowIn.includes(s.name)){if(0==o)return!0;{const e=this.getDefinition(s);return this._checkContextMatch(e,t,o-1)}}return!1}*_getValidRangesForRange(e,t){let o=e.start,s=e.start;for(const i of e.getItems({shallow:!0}))i.is("element")&&(yield*this._getValidRangesForRange($t._createIn(i),t)),this.checkAttribute(i,t)||(o.isEqual(s)||(yield new $t(o,s)),o=Dt._createAfter(i)),s=Dt._createAfter(i);o.isEqual(s)||(yield new $t(o,s))}findOptimalInsertionRange(e,t){const o=e.getSelectedElement();if(o&&this.isObject(o)&&!this.isInline(o))return"before"==t||"after"==t?new $t(Dt._createAt(o,t)):$t._createOn(o);const s=(0,a.$1)(e.getSelectedBlocks());if(!s)return new $t(e.focus);if(s.isEmpty)return new $t(Dt._createAt(s,0));const i=Dt._createAfter(s);return e.focus.isTouching(i)?new $t(i):new $t(Dt._createBefore(s))}}class Ko{_items;constructor(e){if(e instanceof Ko)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(ns)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Ko([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Yo(e,t){const o={name:t,allowIn:new Set,allowChildren:new Set,disallowIn:new Set,disallowChildren:new Set,allowContentOf:new Set,allowWhere:new Set,allowAttributes:new Set,disallowAttributes:new Set,allowAttributesOf:new Set,inheritTypesFrom:new Set};return function(e,t){for(const o of e){const e=Object.keys(o).filter((e=>e.startsWith("is")));for(const s of e)t[s]=!!o[s]}}(e,o),is(e,o,"allowIn"),is(e,o,"allowChildren"),is(e,o,"disallowIn"),is(e,o,"disallowChildren"),is(e,o,"allowContentOf"),is(e,o,"allowWhere"),is(e,o,"allowAttributes"),is(e,o,"disallowAttributes"),is(e,o,"allowAttributesOf"),is(e,o,"inheritTypesFrom"),function(e,t){for(const o of e){const e=o.inheritAllFrom;e&&(t.allowContentOf.add(e),t.allowWhere.add(e),t.allowAttributesOf.add(e),t.inheritTypesFrom.add(e))}}(e,o),o}function Go(e,t){for(const o of t.allowIn){const s=e[o];s?s.allowChildren.add(t.name):t.allowIn.delete(o)}}function Zo(e,t){for(const o of t.allowChildren){const s=e[o];s?s.allowIn.add(t.name):t.allowChildren.delete(o)}}function Jo(e,t){for(const o of t.disallowIn){const s=e[o];s?s.disallowChildren.add(t.name):t.disallowIn.delete(o)}}function Xo(e,t){for(const o of t.disallowChildren){const s=e[o];s?s.disallowIn.add(t.name):t.disallowChildren.delete(o)}}function Qo(e,t){for(const e of t.disallowChildren)t.allowChildren.delete(e);for(const e of t.disallowIn)t.allowIn.delete(e);for(const e of t.disallowAttributes)t.allowAttributes.delete(e)}function es(e,t){for(const o of t.allowContentOf){const s=e[o];s&&(s.disallowChildren.forEach((o=>{t.allowChildren.has(o)||(t.disallowChildren.add(o),e[o].disallowIn.add(t.name))})),s.allowChildren.forEach((o=>{t.disallowChildren.has(o)||(t.allowChildren.add(o),e[o].allowIn.add(t.name))})))}}function ts(e,t){for(const o of t.allowWhere){const s=e[o];s&&(s.disallowIn.forEach((o=>{t.allowIn.has(o)||(t.disallowIn.add(o),e[o].disallowChildren.add(t.name))})),s.allowIn.forEach((o=>{t.disallowIn.has(o)||(t.allowIn.add(o),e[o].allowChildren.add(t.name))})))}}function os(e,t){for(const o of t.allowAttributesOf){const s=e[o];if(!s)return;s.allowAttributes.forEach((e=>{t.disallowAttributes.has(e)||t.allowAttributes.add(e)}))}}function ss(e,t){for(const o of t.inheritTypesFrom){const s=e[o];if(s){const e=Object.keys(s).filter((e=>e.startsWith("is")));for(const o of e)o in t||(t[o]=s[o])}}}function is(e,t,o){for(const s of e){let e=s[o];"string"==typeof e&&(e=[e]),Array.isArray(e)&&e.forEach((e=>t[o].add(e)))}}function ns(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function rs(e,t,o){for(const s of t.getAttributeKeys())e.checkAttribute(t,s)||o.removeAttribute(s,t)}class as extends((0,a.Mm)()){conversionApi;_splitParts=new Map;_cursorParents=new Map;_modelCursor=null;_emptyElementsToKeep=new Set;constructor(e){super(),this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,o=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let o;for(const s of new Ko(e)){const e={};for(const t of s.getAttributeKeys())e[t]=s.getAttribute(t);const i=t.createElement(s.name,e);o&&t.insert(i,o),o=Dt._createAt(i,0)}return o}(o,t),this.conversionApi.writer=t,this.conversionApi.consumable=$o.createFrom(e),this.conversionApi.store={};const{modelRange:s}=this._convertItem(e,this._modelCursor),i=t.createDocumentFragment();if(s){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,i);i.markers=function(e,t){const o=new Set,s=new Map,i=$t._createIn(e).getItems();for(const e of i)e.is("element","$marker")&&o.add(e);for(const e of o){const o=e.getAttribute("data-name"),i=t.createPositionBefore(e);s.has(o)?s.get(o).end=i.clone():s.set(o,new $t(i.clone())),t.remove(e)}return s}(i,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,i}_convertItem(e,t){const o={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,o,this.conversionApi):e.is("$text")?this.fire("text",o,this.conversionApi):this.fire("documentFragment",o,this.conversionApi),o.modelRange&&!(o.modelRange instanceof $t))throw new a.Yb("view-conversion-dispatcher-incorrect-result",this);return{modelRange:o.modelRange,modelCursor:o.modelCursor}}_convertChildren(e,t){let o=t.is("position")?t:Dt._createAt(t,0);const s=new $t(o);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,o);e.modelRange instanceof $t&&(s.end=e.modelRange.end,o=e.modelCursor)}return{modelRange:s,modelCursor:o}}_safeInsert(e,t){const o=this._splitToAllowedParent(e,t);return!!o&&(this.conversionApi.writer.insert(e,o.position),!0)}_updateConversionResult(e,t){const o=this._getSplitParts(e),s=this.conversionApi.writer;t.modelRange||(t.modelRange=s.createRange(s.createPositionBefore(e),s.createPositionAfter(o[o.length-1])));const i=this._cursorParents.get(e);t.modelCursor=i?s.createPositionAt(i,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:o,writer:s}=this.conversionApi;let i=o.findAllowedParent(t,e);if(i){if(i===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(i)&&(i=null)}if(!i)return So(t,e,o)?{position:Mo(t,s)}:null;const n=this.conversionApi.writer.split(t,i),r=[];for(const e of n.range.getWalker())if("elementEnd"==e.type)r.push(e.item);else{const t=r.pop(),o=e.item;this._registerSplitPair(t,o)}const a=n.range.end.parent;return this._cursorParents.set(e,a),{position:n.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const o=this._splitParts.get(e);this._splitParts.set(t,o),o.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class cs{getHtml(e){const t=a.Sf.document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class ls{domParser;domConverter;htmlWriter;skipComments=!0;constructor(e){this.domParser=new DOMParser,this.domConverter=new it(e,{renderingMode:"data"}),this.htmlWriter=new cs}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`${e}`);const t=this.domParser.parseFromString(e,"text/html"),o=t.createDocumentFragment(),s=t.body.childNodes;for(;s.length>0;)o.appendChild(s[0]);return o}}class ds extends((0,a.Mm)()){model;mapper;downcastDispatcher;upcastDispatcher;viewDocument;stylesProcessor;htmlProcessor;processor;_viewWriter;constructor(e,t){super(),this.model=e,this.mapper=new Wt,this.downcastDispatcher=new Kt({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const s=o.writer,i=o.mapper.toViewPosition(t.range.start),n=s.createText(t.item.data);s.insert(i,n)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new as({schema:e.schema}),this.viewDocument=new pe(t),this.stylesProcessor=t,this.htmlProcessor=new ls(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Ce(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:o,consumable:s,writer:i})=>{let n=t.modelCursor;if(!s.test(t.viewItem))return;if(!o.checkChild(n,"$text")){if(!So(n,"$text",o))return;if(0==t.viewItem.data.trim().length)return;const e=n.nodeBefore;n=Mo(n,i),e&&e.is("element","$marker")&&(i.move(i.createRangeOn(e),n),n=i.createPositionAfter(e))}s.consume(t.viewItem);const r=i.createText(t.viewItem.data);i.insert(r,n),t.modelRange=i.createRange(n,n.getShiftedBy(r.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:s}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=s}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:s}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=s}}),{priority:"lowest"}),(0,a.VM)().prototype.decorate.call(this,"init"),(0,a.VM)().prototype.decorate.call(this,"set"),(0,a.VM)().prototype.decorate.call(this,"get"),(0,a.VM)().prototype.decorate.call(this,"toView"),(0,a.VM)().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},Po)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:o="empty"}=e;if(!this._checkIfRootsExists([t]))throw new a.Yb("datacontroller-get-non-existent-root",this);const s=this.model.document.getRoot(t);return s.isAttached()||(0,a.FF)("datacontroller-get-detached-root",this),"empty"!==o||this.model.hasContent(s,{ignoreWhitespaces:!0})?this.stringify(s,e):""}stringify(e,t={}){const o=this.toView(e,t);return this.processor.toData(o)}toView(e,t={}){const o=this.viewDocument,s=this._viewWriter;this.mapper.clearBindings();const i=$t._createIn(e),n=new Ae(o);this.mapper.bindElements(e,n);const r=e.is("documentFragment")?e.markers:function(e){const t=[],o=e.root.document;if(!o)return new Map;const s=$t._createIn(e);for(const e of o.model.markers){const o=e.getRange(),i=o.isCollapsed,n=o.start.isEqual(s.start)||o.end.isEqual(s.end);if(i&&n)t.push([e.name,o]);else{const i=s.getIntersection(o);i&&t.push([e.name,i])}}return t.sort((([e,t],[o,s])=>{if("after"!==t.end.compareWith(s.start))return 1;if("before"!==t.start.compareWith(s.end))return-1;switch(t.start.compareWith(s.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(s.end)){case"before":return 1;case"after":return-1;default:return o.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(i,r,s,t),n}init(e){if(this.model.document.version)throw new a.Yb("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new a.Yb("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const o of Object.keys(t)){const s=this.model.document.getRoot(o);e.insert(this.parse(t[o],s),s,0)}})),Promise.resolve()}set(e,t={}){let o={};if("string"==typeof e?o.main=e:o=e,!this._checkIfRootsExists(Object.keys(o)))throw new a.Yb("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(o)){const s=this.model.document.getRoot(t);e.remove(e.createRangeIn(s)),e.insert(this.parse(o[t],s),s,0)}}))}parse(e,t="$root"){const o=this.processor.toView(e);return this.toModel(o,t)}toModel(e,t="$root"){return this.model.change((o=>this.upcastDispatcher.convert(e,o,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class hs{_helpers=new Map;_downcast;_upcast;constructor(e,t){this._downcast=(0,a.$r)(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=(0,a.$r)(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const o=this._downcast.includes(t);if(!this._upcast.includes(t)&&!o)throw new a.Yb("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:o})}for(e){if(!this._helpers.has(e))throw new a.Yb("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:o}of us(e))this.for("upcast").elementToElement({model:t,view:o,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:o}of us(e))this.for("upcast").elementToAttribute({view:o,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:o}of us(e))this.for("upcast").attributeToAttribute({view:o,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:o}){if(this._helpers.has(e))throw new a.Yb("conversion-group-exists",this);const s=o?new uo(t):new Oo(t);this._helpers.set(e,s)}}function*us(e){if(e.model.values)for(const t of e.model.values){const o={key:e.model.key,value:t},s=e.view[t],i=e.upcastAlso?e.upcastAlso[t]:void 0;yield*ps(o,s,i)}else yield*ps(e.model,e.view,e.upcastAlso)}function*ps(e,t,o){if(yield{model:e,view:t},o)for(const t of(0,a.$r)(o))yield{model:e,view:t}}class ms{namespaces;domParser;domConverter;htmlWriter;skipComments=!0;constructor(e,t={}){this.namespaces=t.namespaces||[],this.domParser=new DOMParser,this.domConverter=new it(e,{renderingMode:"data"}),this.htmlWriter=new cs}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{keepOriginalCase:!0,skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e=``xmlns:${e}="nsp"`)).join(" ")}>${e}`;const t=this.domParser.parseFromString(e,"text/xml"),o=t.querySelector("parsererror");if(o)throw new Error("Parse error - "+o.textContent);const s=t.createDocumentFragment(),i=t.documentElement.childNodes;for(;i.length>0;)s.appendChild(i[0]);return s}}class fs{baseVersion;isDocumentOperation;batch;constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function gs(e,t){const o=ks(t),s=o.reduce(((e,t)=>e+t.offsetSize),0),i=e.parent;vs(e);const n=e.index;return i._insertChild(n,o),ws(i,n+o.length),ws(i,n),new $t(e,e.getShiftedBy(s))}function _s(e){if(!e.isFlat)throw new a.Yb("operation-utils-remove-range-not-flat",this);const t=e.start.parent;vs(e.start),vs(e.end);const o=t._removeChildren(e.start.index,e.end.index-e.start.index);return ws(t,e.start.index),o}function bs(e,t){if(!e.isFlat)throw new a.Yb("operation-utils-move-range-not-flat",this);const o=_s(e);return gs(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),o)}function ks(e){const t=[];!function e(o){if("string"==typeof o)t.push(new Vt(o));else if(o instanceof Rt)t.push(new Vt(o.data,o.getAttributes()));else if(o instanceof Mt)t.push(o);else if((0,a.xZ)(o))for(const t of o)e(t);else{}}(e);for(let e=1;ee.maxOffset)throw new a.Yb("move-operation-nodes-do-not-exist",this);if(e===t&&o=o&&this.targetPosition.path[e]e._clone(!0)))),t=new As(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new Dt(e,[0]);return new xs(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0)))),gs(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const o=[];for(const t of e.nodes)t.name?o.push(jt.fromJSON(t)):o.push(Vt.fromJSON(t));const s=new As(Dt.fromJSON(e.position,t),o,e.baseVersion);return s.shouldReceiveAttributes=e.shouldReceiveAttributes,s}}class Cs extends fs{splitPosition;howMany;insertionPosition;graveyardPosition;constructor(e,t,o,s,i){super(i),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=o,this.graveyardPosition=s?s.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new Dt(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new $t(this.splitPosition,e)}get affectedSelectable(){const e=[$t._createFromPositionAndShift(this.splitPosition,0),$t._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push($t._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new Cs(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new Dt(e,[0]);return new Ts(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset0&&(e.sourcePosition.isEqual(t.sourcePosition.getShiftedBy(t.howMany))&&this._setRelation(e,t,"mergeSourceAffected"),e.targetPosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeTargetWasBefore"));else if(e instanceof Es){const o=e.newRange;if(!o)return;if(t instanceof xs){const s=$t._createFromPositionAndShift(t.sourcePosition,t.howMany),i=s.containsPosition(o.start)||s.start.isEqual(o.start),n=s.containsPosition(o.end)||s.end.isEqual(o.end);!i&&!n||s.containsRange(o)||this._setRelation(e,t,{side:i?"left":"right",path:i?o.start.path.slice():o.end.path.slice()})}else if(t instanceof Ts){const s=o.start.isEqual(t.targetPosition),i=o.start.isEqual(t.deletionPosition),n=o.end.isEqual(t.deletionPosition),r=o.end.isEqual(t.sourcePosition);(s||i||n||r)&&this._setRelation(e,t,{wasInLeftElement:s,wasStartBeforeMergedElement:i,wasEndBeforeMergedElement:n,wasInRightElement:r})}}}getContext(e,t,o){return{aIsStrong:o,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const o=this.originalOperations.get(t),s=this._history.getUndoneOperation(o);if(!s)return null;const i=this.originalOperations.get(e),n=this._relations.get(i);return n&&n.get(s)||null}_setRelation(e,t,o){const s=this.originalOperations.get(e),i=this.originalOperations.get(t);let n=this._relations.get(s);n||(n=new Map,this._relations.set(s,n)),n.set(i,o)}}function Hs(e,t){for(const o of e)o.baseVersion=t++}function $s(e,t){for(let o=0;o{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const s=e.range.getDifference(t.range).map((t=>new Ss(t,e.key,e.oldValue,e.newValue,0))),i=e.range.getIntersection(t.range);return i&&o.aIsStrong&&s.push(new Ss(i,t.key,t.newValue,e.newValue,0)),0==s.length?[new Ms(0)]:s}return[e]})),Ds(Ss,As,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const o=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new Ss(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const s=Ws(t,e.key,e.oldValue);s&&o.unshift(s)}return o}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),Ds(Ss,Ts,((e,t)=>{const o=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&o.push($t._createFromPositionAndShift(t.graveyardPosition,1));const s=e.range._getTransformedByMergeOperation(t);return s.isCollapsed||o.push(s),o.map((t=>new Ss(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),Ds(Ss,xs,((e,t)=>function(e,t){const o=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);let s=null,i=[];o.containsRange(e,!0)?s=e:e.start.hasSameParentAs(o.start)?(i=e.getDifference(o),s=e.getIntersection(o)):i=[e];const n=[];for(let e of i){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const o=t.getMovedRangeStart(),s=e.start.hasSameParentAs(o),i=e._getTransformedByInsertion(o,t.howMany,s);n.push(...i)}s&&n.push(s._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return n}(e.range,t).map((t=>new Ss(t,e.key,e.oldValue,e.newValue,e.baseVersion))))),Ds(Ss,Cs,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const o=e.clone();return o.range=new $t(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,o]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),Ds(As,Ss,((e,t)=>{const o=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const s=Ws(e,t.key,t.newValue);s&&o.push(s)}return o})),Ds(As,As,((e,t,o)=>(e.position.isEqual(t.position)&&o.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),Ds(As,xs,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),Ds(As,Cs,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),Ds(As,Ts,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),Ds(Es,As,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),Ds(Es,Es,((e,t,o)=>{if(e.name==t.name){if(!o.aIsStrong)return[new Ms(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),Ds(Es,Ts,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),Ds(Es,xs,((e,t,o)=>{if(e.oldRange&&(e.oldRange=$t._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(o.abRelation){const s=$t._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=s.end,e.newRange.start.path=o.abRelation.path,[e];if("right"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=s.start,e.newRange.end.path=o.abRelation.path,[e]}e.newRange=$t._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),Ds(Es,Cs,((e,t,o)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(o.abRelation){const s=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&o.abRelation.wasStartBeforeMergedElement?e.newRange.start=Dt._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!o.abRelation.wasInLeftElement&&(e.newRange.start=Dt._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasInRightElement?e.newRange.end=Dt._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasEndBeforeMergedElement?e.newRange.end=Dt._createAt(t.insertionPosition):e.newRange.end=s.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),Ds(Ts,As,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),Ds(Ts,Ts,((e,t,o)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(o.bWasUndone){const o=t.graveyardPosition.path.slice();return o.push(0),e.sourcePosition=new Dt(t.graveyardPosition.root,o),e.howMany=0,[e]}return[new Ms(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!o.bWasUndone&&"splitAtSource"!=o.abRelation){const s="$graveyard"==e.targetPosition.root.rootName,i="$graveyard"==t.targetPosition.root.rootName;if(i&&!s||!(s&&!i)&&o.aIsStrong){const o=t.targetPosition._getTransformedByMergeOperation(t),s=e.targetPosition._getTransformedByMergeOperation(t);return[new xs(o,e.howMany,s,0)]}return[new Ms(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&o.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),Ds(Ts,xs,((e,t,o)=>{const s=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!o.bWasUndone&&!o.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&s.containsPosition(e.sourcePosition)?[new Ms(0)]:(t.sourcePosition.getShiftedBy(t.howMany).isEqual(e.sourcePosition)?e.sourcePosition.stickiness="toNone":t.targetPosition.isEqual(e.sourcePosition)&&"mergeSourceAffected"==o.abRelation?e.sourcePosition.stickiness="toNext":t.sourcePosition.isEqual(e.targetPosition)?(e.targetPosition.stickiness="toNone",e.howMany-=t.howMany):t.targetPosition.isEqual(e.targetPosition)&&"mergeTargetWasBefore"==o.abRelation?(e.targetPosition.stickiness="toPrevious",e.howMany+=t.howMany):(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany)),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.sourcePosition.stickiness="toPrevious",e.targetPosition.stickiness="toNext",e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),Ds(Ts,Cs,((e,t,o)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const s=0!=t.howMany,i=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(s||i||"mergeTargetNotMoved"==o.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==o.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==o.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),Ds(xs,As,((e,t)=>{const o=$t._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),Ds(xs,xs,((e,t,o)=>{const s=$t._createFromPositionAndShift(e.sourcePosition,e.howMany),i=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);let n,r=o.aIsStrong,c=!o.aIsStrong;if("insertBefore"==o.abRelation||"insertAfter"==o.baRelation?c=!0:"insertAfter"!=o.abRelation&&"insertBefore"!=o.baRelation||(c=!1),n=e.targetPosition.isEqual(t.targetPosition)&&c?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),qs(e,t)&&qs(t,e))return[t.getReversed()];if(s.containsPosition(t.targetPosition)&&s.containsRange(i,!0))return s.start=s.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),s.end=s.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Us([s],n);if(i.containsPosition(e.targetPosition)&&i.containsRange(s,!0))return s.start=s.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),s.end=s.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Us([s],n);const l=(0,a.ww)(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return s.start=s.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),s.end=s.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Us([s],n);"remove"!=e.type||"remove"==t.type||o.aWasUndone||o.forceWeakRemove?"remove"==e.type||"remove"!=t.type||o.bWasUndone||o.forceWeakRemove||(r=!1):r=!0;const d=[],h=s.getDifference(i);for(const e of h){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const o="same"==(0,a.ww)(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),s=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,o);d.push(...s)}const u=s.getIntersection(i);return null!==u&&r&&(u.start=u.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),u.end=u.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===d.length?d.push(u):1==d.length?i.start.isBefore(s.start)||i.start.isEqual(s.start)?d.unshift(u):d.push(u):d.splice(1,0,u)),0===d.length?[new Ms(e.baseVersion)]:Us(d,n)})),Ds(xs,Cs,((e,t,o)=>{let s=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=o.abRelation||(s=e.targetPosition._getTransformedBySplitOperation(t));const i=$t._createFromPositionAndShift(e.sourcePosition,e.howMany);if(i.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=s,[e];if(i.start.hasSameParentAs(t.splitPosition)&&i.containsPosition(t.splitPosition)){let e=new $t(t.splitPosition,i.end);e=e._getTransformedBySplitOperation(t);return Us([new $t(i.start,t.splitPosition),e],s)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==o.abRelation&&(s=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==o.abRelation&&(s=e.targetPosition);const n=[i._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const s=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);e.howMany>1&&s&&!o.aWasUndone&&n.push($t._createFromPositionAndShift(t.insertionPosition,1))}return Us(n,s)})),Ds(xs,Ts,((e,t,o)=>{const s=$t._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&s.containsPosition(t.sourcePosition))if("remove"!=e.type||o.forceWeakRemove){if(1==e.howMany)return o.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new Ms(0)]}else if(!o.aWasUndone){const o=[];let s=t.graveyardPosition.clone(),i=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(o.push(new xs(e.sourcePosition,e.howMany-1,e.targetPosition,0)),s=s._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),i=i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const n=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),r=new xs(s,1,n,0),a=r.getMovedRangeStart().path.slice();a.push(0);const c=new Dt(r.targetPosition.root,a);i=i._getTransformedByMove(s,n,1);const l=new xs(i,t.howMany,c,0);return o.push(r),o.push(l),o}const i=$t._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),Ds(Os,As,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),Ds(Os,Ts,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),Ds(Os,xs,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),Ds(Os,Os,((e,t,o)=>{if(e.position.isEqual(t.position)){if(!o.aIsStrong)return[new Ms(0)];e.oldName=t.newName}return[e]})),Ds(Os,Cs,((e,t)=>{const o=e.position.path,s=t.splitPosition.getParentPath();if("same"==(0,a.ww)(o,s)&&!t.graveyardPosition){const t=new Os(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),Ds(Vs,Vs,((e,t,o)=>{if(e.root===t.root&&e.key===t.key){if(!o.aIsStrong||e.newValue===t.newValue)return[new Ms(0)];e.oldValue=t.newValue}return[e]})),Ds(Rs,Rs,((e,t)=>e.rootName===t.rootName&&e.isAdd===t.isAdd?[new Ms(0)]:[e])),Ds(Cs,As,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!o.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const o=t.graveyardPosition.path.slice();o.push(0);const s=new Dt(t.graveyardPosition.root,o),i=Cs.getInsertionPosition(new Dt(t.graveyardPosition.root,o)),n=new Cs(s,0,i,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Cs.getInsertionPosition(e.splitPosition),e.graveyardPosition=n.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[n,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Cs.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),Ds(Cs,xs,((e,t,o)=>{const s=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const i=s.start.isEqual(e.graveyardPosition)||s.containsPosition(e.graveyardPosition);if(!o.bWasUndone&&i){const o=e.splitPosition._getTransformedByMoveOperation(t),s=e.graveyardPosition._getTransformedByMoveOperation(t),i=s.path.slice();i.push(0);const n=new Dt(s.root,i);return[new xs(o,e.howMany,n,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const i=e.splitPosition.isEqual(t.targetPosition);if(i&&("insertAtSource"==o.baRelation||"splitBefore"==o.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=Cs.getInsertionPosition(e.splitPosition),[e];if(i&&o.abRelation&&o.abRelation.howMany){const{howMany:t,offset:s}=o.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(s),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&s.containsPosition(e.splitPosition)){const o=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=o,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new Ms(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new Ms(0)];if("splitBefore"==o.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const s="$graveyard"==e.splitPosition.root.rootName,i="$graveyard"==t.splitPosition.root.rootName;if(i&&!s||!(s&&!i)&&o.aIsStrong){const o=[];return t.howMany&&o.push(new xs(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&o.push(new xs(e.splitPosition,e.howMany,e.moveTargetPosition,0)),o}return[new Ms(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==o.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==o.baRelation){const o=t.insertionPosition.path.slice();o.push(0);const s=new Dt(t.insertionPosition.root,o);return[e,new xs(e.insertionPosition,1,s,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset{const o=t[0];o.isDocumentOperation&&Gs.call(this,o)}),{priority:"low"})}function Gs(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}Ks.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class Zs{operations;isUndoable;isLocal;isUndo;isTyping;constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},(0,a.FF)("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:o=!0,isUndo:s=!1,isTyping:i=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=o,this.isUndo=s,this.isTyping=i}get type(){return(0,a.FF)("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class Js{static _statesPriority=[void 0,"refresh","rename","move"];_markerCollection;_changesInElement=new Map;_elementsSnapshots=new Map;_elementChildrenSnapshots=new Map;_elementState=new Map;_changedMarkers=new Map;_changedRoots=new Map;_changeCount=0;_cachedChanges=null;_cachedChangesWithGraveyard=null;_refreshedItems=new Set;constructor(e){this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),o=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),o||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);const s=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);for(const e of s.getItems({shallow:!0}))this._setElementState(e,"move");break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=$t._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}this._setElementState(t.position.nodeAfter,"rename");break}case"split":{const e=t.splitPosition.parent;if(!this._isInInsertedElement(e)){this._markRemove(e,t.splitPosition.offset,t.howMany);const o=$t._createFromPositionAndShift(t.splitPosition,t.howMany);for(const e of o.getItems({shallow:!0}))this._setElementState(e,"move")}this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&(this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1),this._setElementState(t.graveyardPosition.nodeAfter,"move"));break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const o=t.graveyardPosition.parent;this._markInsert(o,t.graveyardPosition.offset,1),this._setElementState(e,"move");const s=t.targetPosition.parent;if(!this._isInInsertedElement(s)){this._markInsert(s,t.targetPosition.offset,e.maxOffset);const o=$t._createFromPositionAndShift(t.sourcePosition,t.howMany);for(const e of o.getItems({shallow:!0}))this._setElementState(e,"move")}break}case"detachRoot":case"addRoot":{const e=t.affectedSelectable;if(!e._isLoaded)return;if(e.isAttached()==t.isAdd)return;this._bufferRootStateChange(t.rootName,t.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!t.root._isLoaded)return;const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,o){t.range&&t.range.root.is("rootElement")&&!t.range.root._isLoaded&&(t.range=null),o.range&&o.range.root.is("rootElement")&&!o.range.root._isLoaded&&(o.range=null);let s=this._changedMarkers.get(e);s?s.newMarkerData=o:(s={newMarkerData:o,oldMarkerData:t},this._changedMarkers.set(e,s)),null==s.oldMarkerData.range&&null==o.range&&this._changedMarkers.delete(e)}getMarkersToRemove(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.oldMarkerData.range&&e.push({name:t,range:o.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.newMarkerData.range&&e.push({name:t,range:o.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this.getChanges().length)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const o=e.range&&!t.range,s=!e.range&&t.range,i=e.range&&t.range&&!e.range.isEqual(t.range);if(o||s||i)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const o=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamee));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(ti),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t={...e};return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementChildrenSnapshots.clear(),this._elementsSnapshots.clear(),this._elementState.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems.clear(),this._cachedChanges=null}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e),this._setElementState(e,"refresh");const t=$t._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_bufferRootLoad(e){if(e.isAttached()){this._bufferRootStateChange(e.rootName,!0),this._markInsert(e,0,e.maxOffset);for(const t of e.getAttributeKeys())this._bufferRootAttributeChange(e.rootName,t,null,e.getAttribute(t));for(const t of this._markerCollection)if(t.getRange().root==e){const e=t.getData();this.bufferMarkerChange(t.name,{...e,range:null},e)}}}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const o=this._changedRoots.get(e);void 0!==o.state?(delete o.state,void 0===o.attributes&&this._changedRoots.delete(e)):o.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,o,s){const i=this._changedRoots.get(e)||{name:e},n=i.attributes||{};if(n[t]){const e=n[t];s===e.oldValue?delete n[t]:e.newValue=s}else n[t]={oldValue:o,newValue:s};0===Object.entries(n).length?(delete i.attributes,void 0===i.state&&this._changedRoots.delete(e)):(i.attributes=n,this._changedRoots.set(e,i))}_markInsert(e,t,o){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const s={type:"insert",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,s)}_markRemove(e,t,o){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const s={type:"remove",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,s),this._removeAllNestedChanges(e,t,o)}_markAttribute(e){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshots(e);const o=this._getChangesForElement(e);this._handleChange(t,o),o.push(t);for(let e=0;eo&&this._elementState.set(e,t)}_getDiffActionForNode(e,t){if(!e.is("element"))return t;if(!this._elementsSnapshots.has(e))return t;const o=this._elementState.get(e);return o&&"move"!=o?o:t}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshots(e){if(this._elementChildrenSnapshots.has(e))return;const t=Qs(e.getChildren());this._elementChildrenSnapshots.set(e,t);for(const e of t)this._elementsSnapshots.set(e.node,e)}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const o of t){const s=e.offset+e.howMany,i=o.offset+o.howMany;if("insert"==e.type&&("insert"==o.type&&(e.offset<=o.offset?o.offset+=e.howMany:e.offseto.offset){if(s>i){const e={type:"attribute",offset:i,howMany:s-i,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=o.offset&&e.offseti?(e.nodesToHandle=s-i,e.offset=i):e.nodesToHandle=0);if("remove"==o.type&&e.offseto.offset){const i={type:"attribute",offset:o.offset,howMany:s-o.offset,count:this._changeCount++};this._handleChange(i,t),t.push(i),e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==o.type&&(e.offset>=o.offset&&s<=i?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=o.offset&&s>=i&&(o.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,o,s,i){const n={type:"insert",position:Dt._createAt(e,t),name:s.name,attributes:new Map(s.attributes),length:1,changeCount:this._changeCount++,action:o};return"insert"!=o&&i&&(n.before={name:i.name,attributes:new Map(i.attributes)}),n}_getRemoveDiff(e,t,o,s){return{type:"remove",action:o,position:Dt._createAt(e,t),name:s.name,attributes:new Map(s.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,o){const s=[];o=new Map(o);for(const[i,n]of t){const t=o.has(i)?o.get(i):null;t!==n&&s.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:i,attributeOldValue:n,attributeNewValue:t,changeCount:this._changeCount++}),o.delete(i)}for(const[t,i]of o)s.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return s}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const o=this._changesInElement.get(t),s=e.startOffset;if(o)for(const e of o)if("insert"==e.type&&s>=e.offset&&ss){for(let t=0;tthis._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new a.Yb("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const o=this._operations[0];void 0===e&&(e=o.baseVersion);let s=t-1;for(const[t,o]of this._gaps)e>t&&et&&sthis.lastOperation.baseVersion)return[];let i=this._baseVersionToOperationIndex.get(e);void 0===i&&(i=0);let n=this._baseVersionToOperationIndex.get(s);return void 0===n&&(n=this._operations.length-1),this._operations.slice(i,n+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class si extends jt{rootName;_document;_isAttached=!0;_isLoaded=!0;constructor(e,t,o="main"){super(t),this._document=e,this.rootName=o}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}si.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};const ii="$graveyard";class ni extends((0,a.Mm)()){model;history;selection;roots;differ;isReadOnly;_postFixers;_hasSelectionChangedFromTheLastChangeBlock;constructor(e){super(),this.model=e,this.history=new oi,this.selection=new ao(this),this.roots=new a.pM({idProperty:"rootName"}),this.differ=new Js(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",ii),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.differ.bufferOperation(o)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.history.addOperation(o)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,o,s,i)=>{const n={...t.getData(),range:s};this.differ.bufferMarkerChange(t.name,i,n),null===o&&t.on("change",((e,o)=>{const s=t.getData();this.differ.bufferMarkerChange(t.name,{...s,range:o},s)}))})),this.registerPostFixer((e=>{let t=!1;for(const o of this.roots)o.isAttached()||o.isEmpty||(e.remove(e.createRangeIn(o)),t=!0);for(const o of this.model.markers)o.getRange().root.isAttached()||(e.removeMarker(o),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(ii)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new a.Yb("model-document-createroot-name-exists",this,{name:t});const o=new si(this,e,t);return this.roots.add(o),o}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return this.getRoots(e).map((e=>e.rootName))}getRoots(e=!1){return this.roots.filter((t=>t!=this.graveyard&&(e||t.isAttached())&&t._isLoaded))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=w(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const e=this.getRoots();return e.length?e[0]:this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,o=t.schema,s=t.createPositionFromPath(e,[0]);return o.getNearestSelectionRange(s)||t.createRange(s)}_validateSelectionRange(e){return ri(e.start)&&ri(e.end)}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(this.selection.refresh(),t=o(e),t)break}while(t)}}function ri(e){const t=e.textNode;if(t){const o=t.data,s=e.offset-t.startOffset;return!(0,a.P5)(o,s)&&!(0,a.Iw)(o,s)}return!0}class ai extends((0,a.Mm)()){_markers=new Map;[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof ci?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,o=!1,s=!1){const i=e instanceof ci?e.name:e;if(i.includes(","))throw new a.Yb("markercollection-incorrect-marker-name",this);const n=this._markers.get(i);if(n){const e=n.getData(),r=n.getRange();let a=!1;return r.isEqual(t)||(n._attachLiveRange(so.fromRange(t)),a=!0),o!=n.managedUsingOperations&&(n._managedUsingOperations=o,a=!0),"boolean"==typeof s&&s!=n.affectsData&&(n._affectsData=s,a=!0),a&&this.fire(`update:${i}`,n,r,t,e),n}const r=so.fromRange(t),c=new ci(i,r,o,s);return this._markers.set(i,c),this.fire(`update:${i}`,c,null,t,{...c.getData(),range:null}),c}_remove(e){const t=e instanceof ci?e.name:e,o=this._markers.get(t);return!!o&&(this._markers.delete(t),this.fire(`update:${t}`,o,o.getRange(),null,o.getData()),this._destroyMarker(o),!0)}_refresh(e){const t=e instanceof ci?e.name:e,o=this._markers.get(t);if(!o)throw new a.Yb("markercollection-refresh-marker-not-exists",this);const s=o.getRange();this.fire(`update:${t}`,o,s,s,o.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class ci extends((0,a.Mm)(St)){name;_managedUsingOperations;_affectsData;_liveRange;constructor(e,t,o,s){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=o,this._affectsData=s}get managedUsingOperations(){if(!this._liveRange)throw new a.Yb("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new a.Yb("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new a.Yb("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new a.Yb("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new a.Yb("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}ci.prototype.is=function(e){return"marker"===e||"model:marker"===e};class li extends fs{sourcePosition;howMany;constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new a.Yb("detach-operation-on-document-node",this)}_execute(){_s($t._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class di extends St{markers=new Map;_children=new Ot;constructor(e){super(),e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const o of e)o.name?t.push(jt.fromJSON(o)):t.push(Vt.fromJSON(o));return new di(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Vt(e)];(0,a.xZ)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Vt(e):e instanceof Rt?new Vt(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}}di.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class hi{model;batch;constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new Vt(e,t)}createElement(e,t){return new jt(e,t)}createDocumentFragment(){return new di}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,o=0){if(this._assertWriterUsedCorrectly(),e instanceof Vt&&""==e.data)return;const s=Dt._createAt(t,o);if(e.parent){if(gi(e.root,s.root))return void this.move($t._createOn(e),s);if(e.root.document)throw new a.Yb("model-writer-insert-forbidden-move",this);this.remove(e)}const i=s.root.document?s.root.document.version:null,n=new As(s,e,i);if(e instanceof Vt&&(n.shouldReceiveAttributes=!0),this.batch.addOperation(n),this.model.applyOperation(n),e instanceof di)for(const[t,o]of e.markers){const e=Dt._createAt(o.root,0),i={range:new $t(o.start._getCombined(e,s),o.end._getCombined(e,s)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,i):this.addMarker(t,i)}}insertText(e,t,o,s){t instanceof di||t instanceof jt||t instanceof Dt?this.insert(this.createText(e),t,o):this.insert(this.createText(e,t),o,s)}insertElement(e,t,o,s){t instanceof di||t instanceof jt||t instanceof Dt?this.insert(this.createElement(e),t,o):this.insert(this.createElement(e,t),o,s)}append(e,t){this.insert(e,t,"end")}appendText(e,t,o){t instanceof di||t instanceof jt?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),o,"end")}appendElement(e,t,o){t instanceof di||t instanceof jt?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),o,"end")}setAttribute(e,t,o){if(this._assertWriterUsedCorrectly(),o instanceof $t){const s=o.getMinimalFlatRanges();for(const o of s)ui(this,e,t,o)}else pi(this,e,t,o)}setAttributes(e,t){for(const[o,s]of(0,a.av)(e))this.setAttribute(o,s,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof $t){const o=t.getMinimalFlatRanges();for(const t of o)ui(this,e,null,t)}else pi(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof $t)for(const o of e.getItems())t(o);else t(e)}move(e,t,o){if(this._assertWriterUsedCorrectly(),!(e instanceof $t))throw new a.Yb("writer-move-invalid-range",this);if(!e.isFlat)throw new a.Yb("writer-move-range-not-flat",this);const s=Dt._createAt(t,o);if(s.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!gi(e.root,s.root))throw new a.Yb("writer-move-different-document",this);const i=e.root.document?e.root.document.version:null,n=new xs(e.start,e.end.offset-e.start.offset,s,i);this.batch.addOperation(n),this.model.applyOperation(n)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof $t?e:$t._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),fi(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,o=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof jt))throw new a.Yb("writer-merge-no-element-before",this);if(!(o instanceof jt))throw new a.Yb("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,o){return this.model.createPositionFromPath(e,t,o)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,o=e.nodeAfter;this.move($t._createIn(o),Dt._createAt(t,"end")),this.remove(o)}_merge(e){const t=Dt._createAt(e.nodeBefore,"end"),o=Dt._createAt(e.nodeAfter,0),s=e.root.document.graveyard,i=new Dt(s,[0]),n=e.root.document.version,r=new Ts(o,e.nodeAfter.maxOffset,t,i,n);this.batch.addOperation(r),this.model.applyOperation(r)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof jt))throw new a.Yb("writer-rename-not-element-instance",this);const o=e.root.document?e.root.document.version:null,s=new Os(Dt._createBefore(e),e.name,t,o);this.batch.addOperation(s),this.model.applyOperation(s)}split(e,t){this._assertWriterUsedCorrectly();let o,s,i=e.parent;if(!i.parent)throw new a.Yb("writer-split-element-no-parent",this);if(t||(t=i.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new a.Yb("writer-split-invalid-limit-element",this);do{const t=i.root.document?i.root.document.version:null,n=i.maxOffset-e.offset,r=Cs.getInsertionPosition(e),a=new Cs(e,n,r,null,t);this.batch.addOperation(a),this.model.applyOperation(a),o||s||(o=i,s=e.parent.nextSibling),i=(e=this.createPositionAfter(e.parent)).parent}while(i!==t);return{position:e,range:new $t(Dt._createAt(o,"end"),Dt._createAt(s,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new a.Yb("writer-wrap-range-not-flat",this);const o=t instanceof jt?t:new jt(t);if(o.childCount>0)throw new a.Yb("writer-wrap-element-not-empty",this);if(null!==o.parent)throw new a.Yb("writer-wrap-element-attached",this);this.insert(o,e.start);const s=new $t(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(s,Dt._createAt(o,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new a.Yb("writer-unwrap-element-no-parent",this);this.move($t._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new a.Yb("writer-addmarker-no-usingoperation",this);const o=t.usingOperation,s=t.range,i=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new a.Yb("writer-addmarker-marker-exists",this);if(!s)throw new a.Yb("writer-addmarker-no-range",this);return o?(mi(this,e,null,s,i),this.model.markers.get(e)):this.model.markers._set(e,s,o,i)}updateMarker(e,t){this._assertWriterUsedCorrectly();const o="string"==typeof e?e:e.name,s=this.model.markers.get(o);if(!s)throw new a.Yb("writer-updatemarker-marker-not-exists",this);if(!t)return(0,a.FF)("writer-updatemarker-reconvert-using-editingcontroller",{markerName:o}),void this.model.markers._refresh(s);const i="boolean"==typeof t.usingOperation,n="boolean"==typeof t.affectsData,r=n?t.affectsData:s.affectsData;if(!i&&!t.range&&!n)throw new a.Yb("writer-updatemarker-wrong-options",this);const c=s.getRange(),l=t.range?t.range:c;i&&t.usingOperation!==s.managedUsingOperations?t.usingOperation?mi(this,o,null,l,r):(mi(this,o,c,null,r),this.model.markers._set(o,l,void 0,r)):s.managedUsingOperations?mi(this,o,c,l,r):this.model.markers._set(o,l,void 0,r)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new a.Yb("writer-removemarker-no-marker",this);const o=this.model.markers.get(t);if(!o.managedUsingOperations)return void this.model.markers._remove(t);mi(this,t,o.getRange(),null,o.affectsData)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const o=this.model.document.getRoot(e);if(o&&o.isAttached())throw new a.Yb("writer-addroot-root-exists",this);const s=this.model.document,i=new Rs(e,t,!0,s,s.version);return this.batch.addOperation(i),this.model.applyOperation(i),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new a.Yb("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const o=this.model.document,s=new Rs(t.rootName,t.name,!1,o,o.version);this.batch.addOperation(s),this.model.applyOperation(s)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,o]of(0,a.av)(e))this._setSelectionAttribute(t,o)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const o=this.model.document.selection;if(o.isCollapsed&&o.anchor.parent.isEmpty){const s=ao._getStoreAttributeKey(e);this.setAttribute(s,t,o.anchor.parent)}o._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const o=ao._getStoreAttributeKey(e);this.removeAttribute(o,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new a.Yb("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const o of this.model.markers){if(!o.managedUsingOperations)continue;const s=o.getRange();let i=!1;if("move"===e){const e=t;i=e.containsPosition(s.start)||e.start.isEqual(s.start)||e.containsPosition(s.end)||e.end.isEqual(s.end)}else{const e=t,o=e.nodeBefore,n=e.nodeAfter,r=s.start.parent==o&&s.start.isAtEnd,a=s.end.parent==n&&0==s.end.offset,c=s.end.nodeAfter==n,l=s.start.nodeAfter==n;i=r||a||c||l}i&&this.updateMarker(o.name,{range:s})}}}function ui(e,t,o,s){const i=e.model,n=i.document;let r,a,c,l=s.start;for(const e of s.getWalker({shallow:!0}))c=e.item.getAttribute(t),r&&a!=c&&(a!=o&&d(),l=r),r=e.nextPosition,a=c;function d(){const s=new $t(l,r),c=s.root.document?n.version:null,d=new Ss(s,t,a,o,c);e.batch.addOperation(d),i.applyOperation(d)}r instanceof Dt&&r!=l&&a!=o&&d()}function pi(e,t,o,s){const i=e.model,n=i.document,r=s.getAttribute(t);let a,c;if(r!=o){if(s.root===s){const e=s.document?n.version:null;c=new Vs(s,t,r,o,e)}else{a=new $t(Dt._createBefore(s),e.createPositionAfter(s));const i=a.root.document?n.version:null;c=new Ss(a,t,r,o,i)}e.batch.addOperation(c),i.applyOperation(c)}}function mi(e,t,o,s,i){const n=e.model,r=n.document,a=new Es(t,o,s,n.markers,!!i,r.version);e.batch.addOperation(a),n.applyOperation(a)}function fi(e,t,o,s){let i;if(e.root.document){const o=s.document,n=new Dt(o.graveyard,[0]);i=new xs(e,t,n,o.version)}else i=new li(e,t);o.addOperation(i),s.applyOperation(i)}function gi(e,t){return e===t||e instanceof si&&t instanceof si}function _i(e,t,o={}){if(t.isCollapsed)return;const s=t.getFirstRange();if("$graveyard"==s.root.rootName)return;const i=e.schema;e.change((e=>{if(!o.doNotResetEntireContent&&function(e,t){const o=e.getLimitElement(t);if(!t.containsEntireContent(o))return!1;const s=t.getFirstRange();if(s.start.parent==s.end.parent)return!1;return e.checkChild(o,"paragraph")}(i,t))return void function(e,t){const o=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(o)),vi(e,e.createPositionAt(o,0),t)}(e,t);const n={};if(!o.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(n,i.getAttributesWithProperty(e,"copyOnReplace",!0))}const[r,a]=function(e){const t=e.root.document.model,o=e.start;let s=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const o=function(e){const t=e.parent,o=t.root.document.model.schema,s=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of s){if(o.isLimit(e))return null;if(o.isBlock(e))return e}}(s);if(o&&s.isTouching(t.createPositionAt(o,0))){const o=t.createSelection(e);t.modifySelection(o,{direction:"backward"});const i=o.getLastPosition(),n=t.createRange(i,s);t.hasContent(n,{ignoreMarkers:!0})||(s=i)}}return[Ks.fromPosition(o,"toPrevious"),Ks.fromPosition(s,"toNext")]}(s);r.isTouching(a)||e.remove(e.createRange(r,a)),o.leaveUnmerged||(!function(e,t,o){const s=e.model;if(!wi(e.model.schema,t,o))return;const[i,n]=function(e,t){const o=e.getAncestors(),s=t.getAncestors();let i=0;for(;o[i]&&o[i]==s[i];)i++;return[o[i],s[i]]}(t,o);if(!i||!n)return;!s.hasContent(i,{ignoreMarkers:!0})&&s.hasContent(n,{ignoreMarkers:!0})?ki(e,t,o,i.parent):bi(e,t,o,i.parent)}(e,r,a),i.removeDisallowedAttributes(r.parent.getChildren(),e)),yi(e,t,r),!o.doNotAutoparagraph&&function(e,t){const o=e.checkChild(t,"$text"),s=e.checkChild(t,"paragraph");return!o&&s}(i,r)&&vi(e,r,t,n),r.detach(),a.detach()}))}function bi(e,t,o,s){const i=t.parent,n=o.parent;if(i!=s&&n!=s){for(t=e.createPositionAfter(i),(o=e.createPositionBefore(n)).isEqual(t)||e.insert(n,t),e.merge(t);o.parent.isEmpty;){const t=o.parent;o=e.createPositionBefore(t),e.remove(t)}wi(e.model.schema,t,o)&&bi(e,t,o,s)}}function ki(e,t,o,s){const i=t.parent,n=o.parent;if(i!=s&&n!=s){for(t=e.createPositionAfter(i),(o=e.createPositionBefore(n)).isEqual(t)||e.insert(i,o);t.parent.isEmpty;){const o=t.parent;t=e.createPositionBefore(o),e.remove(o)}o=e.createPositionBefore(n),function(e,t){const o=t.nodeBefore,s=t.nodeAfter;o.name!=s.name&&e.rename(o,s.name);e.clearAttributes(o),e.setAttributes(Object.fromEntries(s.getAttributes()),o),e.merge(t)}(e,o),wi(e.model.schema,t,o)&&ki(e,t,o,s)}}function wi(e,t,o){const s=t.parent,i=o.parent;return s!=i&&(!e.isLimit(s)&&!e.isLimit(i)&&function(e,t,o){const s=new $t(e,t);for(const e of s.getWalker())if(o.isLimit(e.item))return!1;return!0}(t,o,e))}function vi(e,t,o,s={}){const i=e.createElement("paragraph");e.model.schema.setAllowedAttributes(i,s,e),e.insert(i,t),yi(e,o,e.createPositionAt(i,0))}function yi(e,t,o){t instanceof ao?e.setSelection(o):t.setTo(o)}function xi(e,t){const o=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{o.push(e.start.parent),t.remove(e)})),o.forEach((e=>{let o=e;for(;o.parent&&o.isEmpty;){const e=t.createRangeOn(o);o=o.parent,t.remove(e)}}))}class Ai{model;writer;position;canMergeWith;schema;_documentFragment;_documentFragmentPosition;_firstNode=null;_lastNode=null;_lastAutoParagraph=null;_filterAttributesOf=[];_affectedStart=null;_affectedEnd=null;_nodeToSelect=null;constructor(e,t,o){this.model=e,this.writer=t,this.position=o,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),o=this.writer.createPositionAfter(e);if(o.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new a.Yb("insertcontent-invalid-insertion-position",this);this.position=o,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?$t._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new $t(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=Ks.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new a.Yb("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=Ks.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Ks.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof jt))return;if(!this._canMergeLeft(e))return;const t=Ks._createBefore(e);t.stickiness="toNext";const o=Ks.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=Ks._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=Ks._createAt(t.nodeBefore,"end","toNext")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof jt))return;if(!this._canMergeRight(e))return;const t=Ks._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new a.Yb("insertcontent-invalid-insertion-position",this);this.position=Dt._createAt(t.nodeBefore,"end");const o=Ks.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=Ks._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=Ks._createAt(t.nodeBefore,0,"toPrevious")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof jt&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof jt&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function Ci(e,t,o,s={}){if(!e.schema.isObject(t))throw new a.Yb("insertobject-element-not-an-object",e,{object:t});const i=o||e.document.selection;let n=i;s.findOptimalPosition&&e.schema.isBlock(t)&&(n=e.createSelection(e.schema.findOptimalInsertionRange(i,s.findOptimalPosition)));const r=(0,a.$1)(i.getSelectedBlocks()),c={};return r&&Object.assign(c,e.schema.getAttributesWithProperty(r,"copyOnReplace",!0)),e.change((o=>{n.isCollapsed||e.deleteContent(n,{doNotAutoparagraph:!0});let i=t;const r=n.anchor.parent;!e.schema.checkChild(r,t)&&e.schema.checkChild(r,"paragraph")&&e.schema.checkChild("paragraph",t)&&(i=o.createElement("paragraph"),o.insert(t,i)),e.schema.setAllowedAttributes(i,c,o);const l=e.insertContent(i,n);return l.isCollapsed||s.setSelection&&function(e,t,o,s){const i=e.model;if("on"==o)return void e.setSelection(t,"on");if("after"!=o)throw new a.Yb("insertobject-invalid-place-parameter-value",i);let n=t.nextSibling;if(i.schema.isInline(t))return void e.setSelection(t,"after");const r=n&&i.schema.checkChild(n,"$text");!r&&i.schema.checkChild(t.parent,"paragraph")&&(n=e.createElement("paragraph"),i.schema.setAllowedAttributes(n,s,e),i.insertContent(n,e.createPositionAfter(t)));n&&e.setSelection(n,0)}(o,t,s.setSelection,c),l}))}const Ti=' ,.?!:;"-()';function Ei(e,t){const{isForward:o,walker:s,unit:i,schema:n,treatEmojiAsSingleUnit:r}=e,{type:c,item:l,nextPosition:d}=t;if("text"==c)return"word"===e.unit?function(e,t){let o=e.position.textNode;o||(o=t?e.position.nodeAfter:e.position.nodeBefore);for(;o&&o.is("$text");){const s=e.position.offset-o.startOffset;if(Mi(o,s,t))o=t?e.position.nodeAfter:e.position.nodeBefore;else{if(Si(o.data,s,t))break;e.next()}}return e.position}(s,o):function(e,t,o){const s=e.position.textNode;if(s){const i=s.data;let n=e.position.offset-s.startOffset;for(;(0,a.P5)(i,n)||"character"==t&&(0,a.Iw)(i,n)||o&&(0,a.SQ)(i,n);)e.next(),n=e.position.offset-s.startOffset}return e.position}(s,i,r);if(c==(o?"elementStart":"elementEnd")){if(n.isSelectable(l))return Dt._createAt(l,o?"after":"before");if(n.checkChild(d,"$text"))return d}else{if(n.isLimit(l))return void s.skip((()=>!0));if(n.checkChild(d,"$text"))return d}}function Pi(e,t){const o=e.root,s=Dt._createAt(o,t?"end":0);return t?new $t(e,s):new $t(s,e)}function Si(e,t,o){const s=t+(o?0:-1);return Ti.includes(e.charAt(s))}function Mi(e,t,o){return t===(o?e.offsetSize:0)}class Oi extends((0,a.VM)()){markers;document;schema;_pendingChanges;_currentWriter;constructor(){super(),this.markers=new ai,this.document=new ni(this),this.schema=new Uo,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),No(this),this.document.registerPostFixer(Po),this.on("insertContent",((e,[t,o])=>{e.return=function(e,t,o){return e.change((s=>{const i=o||e.document.selection;i.isCollapsed||e.deleteContent(i,{doNotAutoparagraph:!0});const n=new Ai(e,s,i.anchor),r=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[o,s]of t.markers){const{start:t,end:i}=s,n=t.isEqual(i);e.push({position:t,name:o,isCollapsed:n},{position:i,name:o,isCollapsed:n})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:o,name:i,isCollapsed:n}of e){let e=null,a=null;const c=o.parent===t&&o.isAtStart,l=o.parent===t&&o.isAtEnd;c||l?n&&(a=c?"start":"end"):(e=s.createElement("$marker"),s.insert(e,o)),r.push({name:i,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];n.handleNodes(a);let c=n.getSelectionRange();if(t.is("documentFragment")&&r.length){const e=c?so.fromRange(c):null,t={};for(let e=r.length-1;e>=0;e--){const{name:o,element:i,collapsed:a}=r[e],c=!t[o];if(c&&(t[o]=[]),i){const e=s.createPositionAt(i,"before");t[o].push(e),s.remove(i)}else{const e=n.getAffectedRange();if(!e){a&&t[o].push(n.position);continue}a?t[o].push(e[a]):t[o].push(c?e.start:e.end)}}for(const[e,[o,i]]of Object.entries(t))o&&i&&o.root===i.root&&o.root.document&&!s.model.markers.has(e)&&s.addMarker(e,{usingOperation:!0,affectsData:!0,range:new $t(o,i)});e&&(c=e.toRange(),e.detach())}c&&(i instanceof ao?s.setSelection(c):i.setTo(c));const l=n.getAffectedRange()||e.createRange(i.anchor);return n.destroy(),l}))}(this,t,o)})),this.on("insertObject",((e,[t,o,s])=>{e.return=Ci(this,t,o,s)})),this.on("canEditAt",(e=>{const t=!this.document.isReadOnly;e.return=t,t||e.stop()}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Zs,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){a.Yb.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new Zs):e instanceof Zs||(e=new Zs(e)):e=new Zs,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){a.Yb.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,o,...s){const i=Vi(t,o);return this.fire("insertContent",[e,i,o,...s])}insertObject(e,t,o,s,...i){const n=Vi(t,o);return this.fire("insertObject",[e,n,s,s,...i])}deleteContent(e,t){_i(this,e,t)}modifySelection(e,t){!function(e,t,o={}){const s=e.schema,i="backward"!=o.direction,n=o.unit?o.unit:"character",r=!!o.treatEmojiAsSingleUnit,a=t.focus,c=new It({boundaries:Pi(a,i),singleCharacters:!0,direction:i?"forward":"backward"}),l={walker:c,schema:s,isForward:i,unit:n,treatEmojiAsSingleUnit:r};let d;for(;d=c.next();){if(d.done)return;const o=Ei(l,d.value);if(o)return void(t instanceof ao?e.change((e=>{e.setSelectionFocus(o)})):t.setFocus(o))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const o=e.createDocumentFragment(),s=t.getFirstRange();if(!s||s.isCollapsed)return o;const i=s.start.root,n=s.start.getCommonPath(s.end),r=i.getNodeByPath(n);let a;a=s.start.parent==s.end.parent?s:e.createRange(e.createPositionAt(r,s.start.path[n.length]),e.createPositionAt(r,s.end.path[n.length]+1));const c=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),o):e.append(e.cloneElement(t,!0),o);if(a!=s){const t=s._getTransformedByMove(a.start,e.createPositionAt(o,0),c)[0],i=e.createRange(e.createPositionAt(o,0),t.start);xi(e.createRange(t.end,e.createPositionAt(o,"end")),e),xi(i,e)}return o}))}(this,e)}hasContent(e,t={}){const o=e instanceof $t?e:$t._createIn(e);if(o.isCollapsed)return!1;const{ignoreWhitespaces:s=!1,ignoreMarkers:i=!1}=t;if(!i)for(const e of this.markers.getMarkersIntersectingRange(o))if(e.affectsData)return!0;for(const e of o.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!s)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}canEditAt(e){const t=Vi(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,o){return new Dt(e,t,o)}createPositionAt(e,t){return Dt._createAt(e,t)}createPositionAfter(e){return Dt._createAfter(e)}createPositionBefore(e){return Dt._createBefore(e)}createRange(e,t){return new $t(e,t)}createRangeIn(e){return $t._createIn(e)}createRangeOn(e){return $t._createOn(e)}createSelection(...e){return new Zt(...e)}createBatch(e){return new Zs(e)}createOperationFromJSON(e){return Is.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new hi(this,t);const o=this._pendingChanges[0].callback(this._currentWriter);e.push(o),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function Vi(e,t){if(e)return e instanceof Zt||e instanceof ao?e:e instanceof Mt?t||0===t?new Zt(e,t):e.is("rootElement")?new Zt(e,"in"):new Zt(e,"on"):new Zt(e)}class Ri extends ht{domEventType="click";onDomEvent(e){this.fire(e.type,e)}}class ji extends ht{domEventType=["mousedown","mouseup","mouseover","mouseout"];onDomEvent(e){this.fire(e.type,e)}}class Ii{document;constructor(e){this.document=e}createDocumentFragment(e){return new Ae(this.document,e)}createElement(e,t,o){return new K(this.document,e,t,o)}createText(e){return new y(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,o){return o._insertChild(e,t)}removeChildren(e,t,o){return o._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const o=e.parent;if(o){const s=o.getChildIndex(e);return this.removeChildren(s,1,o),this.insertChild(s,t,o),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const o=t.getChildIndex(e);this.remove(e),this.insertChild(o,e.getChildren(),t)}}rename(e,t){const o=new K(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,o)?o:null}setAttribute(e,t,o){o._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,o){(0,A.A)(e)&&void 0===o?t._setStyle(e):o._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,o){o._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return te._createAt(e,t)}createPositionAfter(e){return te._createAfter(e)}createPositionBefore(e){return te._createBefore(e)}createRange(e,t){return new oe(e,t)}createRangeOn(e){return oe._createOn(e)}createRangeIn(e){return oe._createIn(e)}createSelection(...e){return new ie(...e)}}const Bi=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Di=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,Ni=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Fi=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,Li=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,zi=/\w+\((?:[^()]|\([^()]*\))*\)|\S+/gi,Hi=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function $i(e){return e.startsWith("#")?Bi.test(e):e.startsWith("rgb")?Di.test(e)||Ni.test(e):e.startsWith("hsl")?Fi.test(e)||Li.test(e):Hi.has(e.toLowerCase())}const Wi=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function qi(e){return Wi.includes(e)}const Ui=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Ki(e){return Ui.test(e)}const Yi=/^[+-]?[0-9]*([.][0-9]+)?%$/;function Gi(e){return Yi.test(e)}const Zi=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function Ji(e){return Zi.includes(e)}const Xi=["center","top","bottom","left","right"];function Qi(e){return Xi.includes(e)}const en=["fixed","scroll","local"];function tn(e){return en.includes(e)}const on=/^url\(/;function sn(e){return on.test(e)}function nn(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=ln(e),o=t[0],s=t[2]||o,i=t[1]||o;return{top:o,bottom:s,right:i,left:t[3]||i}}function rn(e){return t=>{const{top:o,right:s,bottom:i,left:n}=t,r=[];return[o,s,n,i].every((e=>!!e))?r.push([e,an(t)]):(o&&r.push([e+"-top",o]),s&&r.push([e+"-right",s]),i&&r.push([e+"-bottom",i]),n&&r.push([e+"-left",n])),r}}function an({top:e,right:t,bottom:o,left:s}){const i=[];return s!==t?i.push(e,t,o,s):o!==e?i.push(e,t,o):t!==e?i.push(e,t):i.push(e),i.join(" ")}function cn(e){return t=>({path:e,value:nn(t)})}function ln(e){const t=e.matchAll(zi);return Array.from(t).map((e=>e[0]))}function dn(e){e.setNormalizer("background",(e=>{const t={},o=ln(e);for(const e of o)Ji(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):Qi(e)?(t.position=t.position||[],t.position.push(e)):tn(e)?t.attachment=e:$i(e)?t.color=e:sn(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function hn(e){e.setNormalizer("border",(e=>{const{color:t,style:o,width:s}=bn(e);return{path:"border",value:{color:nn(t),style:nn(o),width:nn(s)}}})),e.setNormalizer("border-top",un("top")),e.setNormalizer("border-right",un("right")),e.setNormalizer("border-bottom",un("bottom")),e.setNormalizer("border-left",un("left")),e.setNormalizer("border-color",pn("color")),e.setNormalizer("border-width",pn("width")),e.setNormalizer("border-style",pn("style")),e.setNormalizer("border-top-color",fn("color","top")),e.setNormalizer("border-top-style",fn("style","top")),e.setNormalizer("border-top-width",fn("width","top")),e.setNormalizer("border-right-color",fn("color","right")),e.setNormalizer("border-right-style",fn("style","right")),e.setNormalizer("border-right-width",fn("width","right")),e.setNormalizer("border-bottom-color",fn("color","bottom")),e.setNormalizer("border-bottom-style",fn("style","bottom")),e.setNormalizer("border-bottom-width",fn("width","bottom")),e.setNormalizer("border-left-color",fn("color","left")),e.setNormalizer("border-left-style",fn("style","left")),e.setNormalizer("border-left-width",fn("width","left")),e.setExtractor("border-top",gn("top")),e.setExtractor("border-right",gn("right")),e.setExtractor("border-bottom",gn("bottom")),e.setExtractor("border-left",gn("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",rn("border-color")),e.setReducer("border-style",rn("border-style")),e.setReducer("border-width",rn("border-width")),e.setReducer("border-top",kn("top")),e.setReducer("border-right",kn("right")),e.setReducer("border-bottom",kn("bottom")),e.setReducer("border-left",kn("left")),e.setReducer("border",function(){return t=>{const o=_n(t,"top"),s=_n(t,"right"),i=_n(t,"bottom"),n=_n(t,"left"),r=[o,s,i,n],a={width:e(r,"width"),style:e(r,"style"),color:e(r,"color")},c=wn(a,"all");if(c.length)return c;return[...Object.entries(a).reduce(((e,[t,o])=>(o&&(e.push([`border-${t}`,o]),r.forEach((e=>delete e[t]))),e)),[]),...wn(o,"top"),...wn(s,"right"),...wn(i,"bottom"),...wn(n,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function un(e){return t=>{const{color:o,style:s,width:i}=bn(t),n={};return void 0!==o&&(n.color={[e]:o}),void 0!==s&&(n.style={[e]:s}),void 0!==i&&(n.width={[e]:i}),{path:"border",value:n}}}function pn(e){return t=>({path:"border",value:mn(t,e)})}function mn(e,t){return{[t]:nn(e)}}function fn(e,t){return o=>({path:"border",value:{[e]:{[t]:o}}})}function gn(e){return(t,o)=>{if(o.border)return _n(o.border,e)}}function _n(e,t){const o={};return e.width&&e.width[t]&&(o.width=e.width[t]),e.style&&e.style[t]&&(o.style=e.style[t]),e.color&&e.color[t]&&(o.color=e.color[t]),o}function bn(e){const t={},o=ln(e);for(const e of o)Ki(e)||/thin|medium|thick/.test(e)?t.width=e:qi(e)?t.style=e:t.color=e;return t}function kn(e){return t=>wn(t,e)}function wn(e,t){const o=[];if(e&&e.width&&o.push("width"),e&&e.style&&o.push("style"),e&&e.color&&o.push("color"),3==o.length){const s=o.map((t=>e[t])).join(" ");return["all"==t?["border",s]:[`border-${t}`,s]]}return"all"==t?[]:o.map((o=>[`border-${t}-${o}`,e[o]]))}function vn(e){e.setNormalizer("margin",cn("margin")),e.setNormalizer("margin-top",(e=>({path:"margin.top",value:e}))),e.setNormalizer("margin-right",(e=>({path:"margin.right",value:e}))),e.setNormalizer("margin-bottom",(e=>({path:"margin.bottom",value:e}))),e.setNormalizer("margin-left",(e=>({path:"margin.left",value:e}))),e.setReducer("margin",rn("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function yn(e){e.setNormalizer("padding",cn("padding")),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",rn("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}const xn="[",An="]",Cn="{",Tn="}",En={container:G,attribute:me,empty:_e,ui:ke,raw:ye},Pn={setContentOf:(e,t)=>{e.innerHTML=t}};function Sn(e,t={}){if(!(e instanceof Pt))throw new TypeError("View needs to be an instance of module:engine/view/view~View.");const o=e.document,s=!!t.withoutSelection,i=t.rootName||"main",n=o.getRoot(i),r={showType:t.showType,showPriority:t.showPriority,renderUIElements:t.renderUIElements,renderRawElements:t.renderRawElements,ignoreRoot:!0,domConverter:t.domConverter};return s?Sn._stringify(n,null,r):Sn._stringify(n,o.selection,r)}function Mn(e,t,o={}){if(!(e instanceof Pt))throw new TypeError("View needs to be an instance of module:engine/view/view~View.");const s=e.document,i=o.rootName||"main",n=s.getRoot(i);e.change((e=>{const o=Mn._parse(t,{rootElement:n});o.view&&o.selection&&e.setSelection(o.selection)}))}function On(e,t=null,o={}){let s;s=t instanceof te||t instanceof oe?new ne(t):t;return new jn(e,s,o).stringify()}function Vn(e,t={}){const o=new pe(new W);t.order=t.order||[];const s=new Rn({sameSelectionCharacters:t.sameSelectionCharacters});let i=new ms(o,{namespaces:Object.keys(En)}).toView(e);if(i=In(i),t.rootElement){const e=t.rootElement,o=i._removeChildren(0,i.childCount);e._removeChildren(0,e.childCount),e._appendChild(o),i=e}const n=s.parse(i,t.order);if(i.is("documentFragment")&&1===i.childCount&&(i=i.getChild(0)),n.length){return{view:i,selection:new ne(n,{backward:!!t.lastRangeBackward})}}return i.parent&&i._remove(),i}Sn._stringify=On,Mn._parse=Vn;class Rn{sameSelectionCharacters;_positions;constructor(e){this.sameSelectionCharacters=!!e.sameSelectionCharacters}parse(e,t){this._positions=[],this._getPositions(e);let o=this._createRanges();if(t.length){if(t.length!=o.length)throw new Error(`Parse error - there are ${o.length} ranges found, but ranges order array contains ${t.length} elements.`);o=this._sortRanges(o,t)}return o}_getPositions(e){if(e.is("documentFragment")||e.is("element")){const t=[...e.getChildren()];for(const e of t)this._getPositions(e)}if(e.is("$text")){const t=new RegExp(`[${Cn}${Tn}\\${An}\\${xn}]`,"g");let o,s=e.data,i=0;const n=[];for(;o=t.exec(s);){const e=o.index,t=o[0];n.push({bracket:t,textOffset:e-i}),i++}s=s.replace(t,""),e._data=s;const r=e.index,a=e.parent;s||e._remove();for(const t of n)if(s)if(this.sameSelectionCharacters||!this.sameSelectionCharacters&&(t.bracket==Cn||t.bracket==Tn))this._positions.push({bracket:t.bracket,position:new te(e,t.textOffset)});else{if(!this.sameSelectionCharacters&&0!==t.textOffset&&t.textOffset!==s.length)throw new Error(`Parse error - range delimiter '${t.bracket}' is placed inside text node.`);const e=0===t.textOffset?r:r+1;this._positions.push({bracket:t.bracket,position:new te(a,e)})}else{if(!this.sameSelectionCharacters&&t.bracket==Cn||t.bracket==Tn)throw new Error(`Parse error - text range delimiter '${t.bracket}' is placed inside empty text node. `);this._positions.push({bracket:t.bracket,position:new te(a,r)})}}}_sortRanges(e,t){const o=[];let s=0;for(const i of t){if(void 0===e[i-1])throw new Error("Parse error - provided ranges order is invalid.");o[i-1]=e[s],s++}return o}_createRanges(){const e=[];let t=null;for(const o of this._positions){if(!t&&(o.bracket==An||o.bracket==Tn))throw new Error(`Parse error - end of range was found '${o.bracket}' but range was not started before.`);if(t&&(o.bracket==xn||o.bracket==Cn))throw new Error(`Parse error - start of range was found '${o.bracket}' but one range is already started.`);o.bracket==xn||o.bracket==Cn?t=new oe(o.position,o.position):(t.end=o.position,e.push(t),t=null)}if(null!==t)throw new Error("Parse error - range was started but no end delimiter was found.");return e}}class jn{root;selection;ranges;showType;showPriority;showAttributeElementId;ignoreRoot;sameSelectionCharacters;renderUIElements;renderRawElements;domConverter;constructor(e,t,o){this.root=e,this.selection=t,this.ranges=[],t&&(this.ranges=[...t.getRanges()]),this.showType=!!o.showType,this.showPriority=!!o.showPriority,this.showAttributeElementId=!!o.showAttributeElementId,this.ignoreRoot=!!o.ignoreRoot,this.sameSelectionCharacters=!!o.sameSelectionCharacters,this.renderUIElements=!!o.renderUIElements,this.renderRawElements=!!o.renderRawElements,this.domConverter=o.domConverter||Pn}stringify(){let e="";return this._walkView(this.root,(t=>{e+=t})),e}_walkView(e,t){const o=this.ignoreRoot&&this.root===e;if(e.is("element")||e.is("documentFragment")){if(e.is("element")&&!o&&t(this._stringifyElementOpen(e)),this.renderUIElements&&e.is("uiElement"))t(e.render(document,this.domConverter).innerHTML);else if(this.renderRawElements&&e.is("rawElement")){const o=document.createElement("div");e.render(o,this.domConverter),t(o.innerHTML)}else{let o=0;t(this._stringifyElementRanges(e,o));for(const s of e.getChildren())this._walkView(s,t),o++,t(this._stringifyElementRanges(e,o))}e.is("element")&&!o&&t(this._stringifyElementClose(e))}e.is("$text")&&t(this._stringifyTextRanges(e))}_stringifyElementRanges(e,t){let o="",s="",i="";for(const n of this.ranges)n.start.parent==e&&n.start.offset===t&&(n.isCollapsed?i+=xn+An:o+=xn),n.end.parent!==e||n.end.offset!==t||n.isCollapsed||(s+=An);return s+i+o}_stringifyTextRanges(e){const t=e.data.length,o=e.data.split("");let s,i;this.sameSelectionCharacters?(s=xn,i=An):(s=Cn,i=Tn),o[t]="";const n=o.map((e=>({letter:e,start:"",end:"",collapsed:""})));for(const o of this.ranges){const r=o.start,a=o.end;r.parent==e&&r.offset>=0&&r.offset<=t&&(o.isCollapsed?n[a.offset].collapsed+=s+i:n[r.offset].start+=s),a.parent==e&&a.offset>=0&&a.offset<=t&&!o.isCollapsed&&(n[a.offset].end+=i)}return n.map((e=>e.end+e.collapsed+e.start+e.letter)).join("")}_stringifyElementOpen(e){const t=this._stringifyElementPriority(e),o=this._stringifyElementId(e);return`<${[[this._stringifyElementType(e),e.name].filter((e=>""!==e)).join(":"),t,o,this._stringifyElementAttributes(e)].filter((e=>""!==e)).join(" ")}>`}_stringifyElementClose(e){return`""!==e)).join(":")}>`}_stringifyElementType(e){if(this.showType)for(const t in En)if(e instanceof En[t])return t;return""}_stringifyElementPriority(e){return this.showPriority&&e.is("attributeElement")?`view-priority="${e.priority}"`:""}_stringifyElementId(e){return this.showAttributeElementId&&e.is("attributeElement")&&e.id?`view-id="${e.id}"`:""}_stringifyElementAttributes(e){const t=[],o=[...e.getAttributeKeys()].sort();for(const s of o){let o;o="class"===s?[...e.getClassNames()].sort().join(" "):"style"===s?[...e.getStyleNames()].sort().map((t=>`${t}:${e.getStyle(t).replace(/"/g,""")}`)).join(";"):e.getAttribute(s),t.push(`${s}="${o}"`)}return t.join(" ")}}function In(e){if(e.is("element")||e.is("documentFragment")){const t=e.is("documentFragment")?new Ae(e.document):function(e,t){const o=function(e){const t=e.name.split(":"),o=function(e){const t=parseInt(e,10);if(!isNaN(t))return t;return null}(e.getAttribute("view-priority")),s=e.hasAttribute("view-id")?e.getAttribute("view-id"):null;if(e._removeAttribute("view-priority"),e._removeAttribute("view-id"),1==t.length)return{name:t[0],type:null!==o?"attribute":null,priority:o,id:s};const i=function(e){return e in En?e:null}(t[0]);if(i)return{name:t[1],type:i,priority:o,id:s};throw new Error(`Parse error - cannot parse element's name: ${e.name}.`)}(t),s=En[o.type],i=s?new s(e,o.name):new K(e,o.name);i.is("attributeElement")&&(null!==o.priority&&(i._priority=o.priority),null!==o.id&&(i._id=o.id));for(const e of t.getAttributeKeys())i._setAttribute(e,t.getAttribute(e));return i}(e.document,e);for(const o of[...e.getChildren()]){if(t.is("emptyElement"))throw new Error("Parse error - cannot parse inside EmptyElement.");if(t.is("uiElement"))throw new Error("Parse error - cannot parse inside UIElement.");if(t.is("rawElement"))throw new Error("Parse error - cannot parse inside RawElement.");t._appendChild(In(o))}return t}return e}function Bn(e,t={}){if(!(e instanceof Oi))throw new TypeError("Model needs to be an instance of module:engine/model/model~Model.");const o=t.rootName||"main",s=e.document.getRoot(o);return Bn._stringify(s,t.withoutSelection?null:e.document.selection,t.convertMarkers?e.markers:null)}function Dn(e,t,o={}){if(!(e instanceof Oi))throw new TypeError("Model needs to be an instance of module:engine/model/model~Model.");let s,i=null;const n=e.document.getRoot(o.rootName||"main"),r=Dn._parse(t,e.schema,{lastRangeBackward:o.lastRangeBackward,selectionAttributes:o.selectionAttributes,context:[n.name]});function a(t){if(t.remove(t.createRangeIn(n)),t.insert(s,n),t.setSelection(null),t.removeSelectionAttribute(e.document.selection.getAttributeKeys()),i){const e=[];for(const t of i.getRanges()){const o=new Dt(n,t.start.path),s=new Dt(n,t.end.path);e.push(new $t(o,s))}t.setSelection(e,{backward:i.isBackward}),o.selectionAttributes&&t.setSelectionAttribute(i.getAttributes())}}"model"in r?(s=r.model,i=r.selection):s=r,void 0!==o.batchType?e.enqueueChange(o.batchType,a):e.change(a)}function Nn(e,t=null,o=null){const s=new Oi,i=new Wt;let n,r=null;if(e instanceof si||e instanceof di)n=s.createRangeIn(e);else if(e.parent)n=new $t(s.createPositionBefore(e),s.createPositionAfter(e));else{const t=new di(e);n=s.createRangeIn(t)}t instanceof Zt||t instanceof ao?r=t:(t instanceof $t||t instanceof Dt)&&(r=new Zt(t));const a=new W,c=new Pt(a),l=c.document,d=new Q(l,"div");d.rootName="main",l.roots.add(d);const h=new Kt({mapper:i,schema:s.schema});i.bindElements(e.root,d),h.on("insert:$text",((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const s=o.writer,i=o.mapper.toViewPosition(t.range.start),n=s.createText(t.item.data);s.insert(i,n)})),h.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),h.on("attribute",((e,t,o)=>{if(t.item instanceof Zt||t.item instanceof ao||t.item.is("$textProxy")){mo(((e,{writer:o})=>o.createAttributeElement("model-text-with-attributes",{[t.attributeKey]:Hn(e)})))(e,t,o)}})),h.on("insert",fo((e=>{const t=$n(e.getAttributes(),Hn);return new G(l,e.name,t)}))),h.on("selection",((e,t,o)=>{const s=t.selection;if(s.isCollapsed)return;if(!o.consumable.consume(s,"selection"))return;const i=[];for(const e of s.getRanges())i.push(o.mapper.toViewRange(e));o.writer.setSelection(i,{backward:s.isBackward})})),h.on("selection",((e,t,o)=>{const s=t.selection;if(!s.isCollapsed)return;if(!o.consumable.consume(s,"selection"))return;const i=o.writer,n=s.getFirstPosition(),r=o.mapper.toViewPosition(n),a=i.breakAttributes(r);i.setSelection(a)})),h.on("addMarker",go(((e,{writer:t})=>{const o=e.markerName+":"+(e.isOpening?"start":"end");return t.createUIElement(o)})));const u=new Map;if(o)for(const e of Array.from(o).sort(((e,t)=>e.name{const i=s.convertChildren(o.viewItem,o.modelCursor);e.bindElements(o.modelCursor.parent,o.viewItem),o=Object.assign(o,i),t.stop()}}(s)),d.on("element:model-text-with-attributes",Ln()),d.on("element",function(e){return(t,o,s)=>{const i=o.viewItem.name;if(!s.schema.checkChild(o.modelCursor,i))throw new Error(`Element '${i}' was not allowed in given position.`);const n=$n(o.viewItem.getAttributes(),zn),r=s.writer.createElement(o.viewItem.name,n);s.writer.insert(r,o.modelCursor),e.bindElements(r,o.viewItem),s.convertChildren(o.viewItem,r),o.modelRange=$t._createOn(r),o.modelCursor=o.modelRange.end,t.stop()}}(s)),d.on("text",Ln());let h=l.change((e=>d.convert(n.root,e,o.context||"$root")));if(s.bindElements(h,n.root),1==h.childCount&&(h=h.getChild(0)),r){const e=[];for(const t of r.getRanges())e.push(s.toModelRange(t));c=new Zt(e,{backward:r.isBackward});for(const[e,t]of(0,a.av)(o.selectionAttributes||[]))c.setAttribute(e,t)}return c?{model:h,selection:c}:h}function Ln(){return(e,t,o)=>{if(!o.schema.checkChild(t.modelCursor,"$text"))throw new Error("Text was not allowed in given position.");let s;if(t.viewItem.is("element")){const e=$n(t.viewItem.getAttributes(),zn),i=t.viewItem.getChild(0);s=o.writer.createText(i.data,e)}else s=o.writer.createText(t.viewItem.data);o.writer.insert(s,t.modelCursor),t.modelRange=$t._createFromPositionAndShift(t.modelCursor,s.offsetSize),t.modelCursor=t.modelRange.end,e.stop()}}function zn(e){try{return JSON.parse(e)}catch(t){return e}}function Hn(e){return(0,A.A)(e)?JSON.stringify(e):e}function*$n(e,t){for(const[o,s]of e)yield[o,t(s)]}Bn._stringify=Nn,Dn._parse=Fn},"./packages/ckeditor5-enter/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{x:()=>h,D:()=>f});var s=o("./packages/ckeditor5-core/src/index.ts");function*i(e,t){for(const o of t)o&&e.getAttributeProperties(o[0]).copyOnEnter&&(yield o)}class n extends s.uB{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,o=t.document.selection,s=t.schema,n=o.isCollapsed,a=o.getFirstRange(),c=a.start.parent,l=a.end.parent;if(s.isLimit(c)||s.isLimit(l))return n||c!=l||t.deleteContent(o),!1;if(n){const t=i(e.model.schema,o.getAttributes());return r(e,a.start),e.setSelectionAttribute(t),!0}{const s=!(a.start.isAtStart&&a.end.isAtEnd),i=c==l;if(t.deleteContent(o,{leaveUnmerged:s}),s){if(i)return r(e,o.focus),!0;e.setSelection(l,0)}}return!1}}function r(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}var a=o("./packages/ckeditor5-engine/src/index.ts"),c=o("./packages/ckeditor5-utils/src/index.ts");const l={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class d extends a.nu{constructor(e){super(e);const t=this.document;let o=!1;t.on("keydown",((e,t)=>{o=t.shiftKey})),t.on("beforeinput",((s,i)=>{if(!this.isEnabled)return;let n=i.inputType;c._K.isSafari&&o&&"insertParagraph"==n&&(n="insertLineBreak");const r=i.domEvent,d=l[n];if(!d)return;const h=new a.cJ(t,"enter",i.targetRanges[0]);t.fire(h,new a.FY(e,r,{isSoft:d.isSoft})),h.stop.called&&s.stop()}))}observe(){}stopObserving(){}}class h extends s.k_{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,o=t.document,s=this.editor.t;t.addObserver(d),e.commands.add("enter",new n(e)),this.listenTo(o,"enter",((s,i)=>{o.isComposing||i.preventDefault(),i.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:s("Insert a hard break (a new paragraph)"),keystroke:"Enter"}]})}}class u extends s.uB{execute(){const e=this.editor.model,t=e.document;e.change((o=>{!function(e,t,o){const s=o.isCollapsed,n=o.getFirstRange(),r=n.start.parent,a=n.end.parent,c=r==a;if(s){const s=i(e.schema,o.getAttributes());p(e,t,n.end),t.removeSelectionAttribute(o.getAttributeKeys()),t.setSelectionAttribute(s)}else{const s=!(n.start.isAtStart&&n.end.isAtEnd);e.deleteContent(o,{leaveUnmerged:s}),c?p(e,t,o.focus):s&&t.setSelection(a,0)}}(e,o,t.selection),this.fire("afterExecute",{writer:o})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const o=t.anchor;if(!o||!e.checkChild(o,"softBreak"))return!1;const s=t.getFirstRange(),i=s.start.parent,n=s.end.parent;if((m(i,e)||m(n,e))&&i!==n)return!1;return!0}(e.schema,t.selection)}}function p(e,t,o){const s=t.createElement("softBreak");e.insertContent(s,o),t.setSelection(s,"after")}function m(e,t){return!e.is("rootElement")&&(t.isLimit(e)||m(e.parent,t))}class f extends s.k_{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,o=e.conversion,s=e.editing.view,i=s.document,n=this.editor.t;t.register("softBreak",{allowWhere:"$text",isInline:!0}),o.for("upcast").elementToElement({model:"softBreak",view:"br"}),o.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),s.addObserver(d),e.commands.add("shiftEnter",new u(e)),this.listenTo(i,"enter",((t,o)=>{i.isComposing||o.preventDefault(),o.isSoft&&(e.execute("shiftEnter"),s.scrollToTheSelection())}),{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert a soft break (a <br> element)"),keystroke:"Shift+Enter"}]})}}},"./packages/ckeditor5-typing/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{ep:()=>k,pd:()=>d,Ki:()=>r,De:()=>j,qV:()=>y,Vp:()=>x,IG:()=>w,Py:()=>F,lO:()=>L,ex:()=>v,Il:()=>z});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-utils/src/index.ts");class n{model;limit;_isLocked;_size;_batch=null;_changeCallback;_selectionChangeCallback;constructor(e,t=20){this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){this.isLocked&&!e||(this._batch=null,this._size=0)}}class r extends s.uB{_buffer;constructor(e,t){super(e),this._buffer=new n(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,o=t.document,s=e.text||"",i=s.length;let n=o.selection;if(e.selection?n=e.selection:e.range&&(n=t.createSelection(e.range)),!t.canEditAt(n))return;const r=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock();const a=Array.from(o.selection.getAttributes());t.deleteContent(n),s&&t.insertContent(e.createText(s,a),n),r?e.setSelection(r):n.is("documentSelection")||e.setSelection(n),this._buffer.unlock(),this._buffer.input(i)}))}}var a=o("./packages/ckeditor5-engine/src/index.ts");const c=["insertText","insertReplacementText"];class l extends a.nu{focusObserver;constructor(e){super(e),this.focusObserver=e.getObserver(a.vp),i._K.isAndroid&&c.push("insertCompositionText");const t=e.document;t.on("beforeinput",((o,s)=>{if(!this.isEnabled)return;const{data:n,targetRanges:r,inputType:l,domEvent:d}=s;if(!c.includes(l))return;this.focusObserver.flush();const h=new i.vY(t,"insertText");t.fire(h,new a.FY(e,d,{text:n,selection:e.createSelection(r)})),h.stop.called&&o.stop()})),t.on("compositionend",((o,{data:s,domEvent:n})=>{this.isEnabled&&!i._K.isAndroid&&s&&t.fire("insertText",new a.FY(e,n,{text:s,selection:t.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class d extends s.k_{static get pluginName(){return"Input"}init(){const e=this.editor,t=e.model,o=e.editing.view,s=t.document.selection;o.addObserver(l);const n=new r(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",n),e.commands.add("input",n),this.listenTo(o.document,"insertText",((s,n)=>{o.document.isComposing||n.preventDefault();const{text:r,selection:a,resultRange:c}=n,l=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));let d=r;if(i._K.isAndroid){const e=Array.from(l[0].getItems()).reduce(((e,t)=>e+(t.is("$textProxy")?t.data:"")),"");e&&(e.length<=d.length?d.startsWith(e)&&(d=d.substring(e.length),l[0].start=l[0].start.getShiftedBy(e.length)):e.startsWith(d)&&(l[0].start=l[0].start.getShiftedBy(d.length),d=""))}const h={text:d,selection:t.createSelection(l)};c&&(h.resultRange=e.editing.mapper.toModelRange(c)),e.execute("insertText",h),o.scrollToTheSelection()})),i._K.isAndroid?this.listenTo(o.document,"keydown",((e,i)=>{!s.isCollapsed&&229==i.keyCode&&o.document.isComposing&&h(t,n)})):this.listenTo(o.document,"compositionstart",(()=>{s.isCollapsed||h(t,n)}))}}function h(e,t){if(!t.isEnabled)return;const o=t.buffer;o.lock(),e.enqueueChange(o.batch,(()=>{e.deleteContent(e.document.selection)})),o.unlock()}class u extends s.uB{direction;_buffer;constructor(e,t){super(e),this.direction=t,this._buffer=new n(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,o=t.document;t.enqueueChange(this._buffer.batch,(s=>{this._buffer.lock();const n=s.createSelection(e.selection||o.selection);if(!t.canEditAt(n))return;const r=e.sequence||1,a=n.isCollapsed;if(n.isCollapsed&&t.modifySelection(n,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(r))return void this._replaceEntireContentWithParagraph(s);if(this._shouldReplaceFirstBlockWithParagraph(n,r))return void this.editor.execute("paragraph",{selection:n});if(n.isCollapsed)return;let c=0;n.getFirstRange().getMinimalFlatRanges().forEach((e=>{c+=(0,i.U9)(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(n,{doNotResetEntireContent:a,direction:this.direction}),this._buffer.input(c),s.setSelection(n),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,o=t.document.selection,s=t.schema.getLimitElement(o);if(!(o.isCollapsed&&o.containsEntireContent(s)))return!1;if(!t.schema.checkChild(s,"paragraph"))return!1;const i=s.getChild(0);return!i||!i.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,o=t.document.selection,s=t.schema.getLimitElement(o),i=e.createElement("paragraph");e.remove(e.createRangeIn(s)),e.insert(i,s),e.setSelection(i,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const o=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const s=e.getFirstPosition(),i=o.schema.getLimitElement(s),n=i.getChild(0);return s.parent==n&&(!!e.containsEntireContent(n)&&(!!o.schema.checkChild(i,"paragraph")&&"paragraph"!=n.name))}}const p="word",m="selection",f="backward",g="forward",_={deleteContent:{unit:m,direction:f},deleteContentBackward:{unit:"codePoint",direction:f},deleteWordBackward:{unit:p,direction:f},deleteHardLineBackward:{unit:m,direction:f},deleteSoftLineBackward:{unit:m,direction:f},deleteContentForward:{unit:"character",direction:g},deleteWordForward:{unit:p,direction:g},deleteHardLineForward:{unit:m,direction:g},deleteSoftLineForward:{unit:m,direction:g}};class b extends a.nu{constructor(e){super(e);const t=e.document;let o=0;t.on("keydown",(()=>{o++})),t.on("keyup",(()=>{o=0})),t.on("beforeinput",((s,n)=>{if(!this.isEnabled)return;const{targetRanges:r,domEvent:c,inputType:l}=n,d=_[l];if(!d)return;const h={direction:d.direction,unit:d.unit,sequence:o};h.unit==m&&(h.selectionToRemove=e.createSelection(r[0])),"deleteContentBackward"===l&&(i._K.isAndroid&&(h.sequence=1),function(e){if(1!=e.length||e[0].isCollapsed)return!1;const t=e[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let o=0;for(const{nextPosition:e,item:s}of t){if(e.parent.is("$text")){const t=e.parent.data,s=e.offset;if((0,i.P5)(t,s)||(0,i.Iw)(t,s)||(0,i.SQ)(t,s))continue;o++}else(s.is("containerElement")||s.is("emptyElement"))&&o++;if(o>1)return!0}return!1}(r)&&(h.unit=m,h.selectionToRemove=e.createSelection(r)));const u=new a.cJ(t,"delete",r[0]);t.fire(u,new a.FY(e,c,h)),u.stop.called&&s.stop()})),i._K.isBlink&&function(e){const t=e.view,o=t.document;let s=null,n=!1;function r(e){return e==i.uP.backspace||e==i.uP.delete}function c(e){return e==i.uP.backspace?f:g}o.on("keydown",((e,{keyCode:t})=>{s=t,n=!1})),o.on("keyup",((i,{keyCode:l,domEvent:d})=>{const h=o.selection,u=e.isEnabled&&l==s&&r(l)&&!h.isCollapsed&&!n;if(s=null,u){const e=h.getFirstRange(),s=new a.cJ(o,"delete",e),i={unit:m,direction:c(l),selectionToRemove:h};o.fire(s,new a.FY(t,d,i))}})),o.on("beforeinput",((e,{inputType:t})=>{const o=_[t];r(s)&&o&&o.direction==c(s)&&(n=!0)}),{priority:"high"}),o.on("beforeinput",((e,{inputType:t,data:o})=>{s==i.uP.delete&&"insertText"==t&&""==o&&e.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class k extends s.k_{_undoOnBackspace;static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,o=t.document,s=e.model.document;t.addObserver(b),this._undoOnBackspace=!1;const i=new u(e,"forward");e.commands.add("deleteForward",i),e.commands.add("forwardDelete",i),e.commands.add("delete",new u(e,"backward")),this.listenTo(o,"delete",((s,i)=>{o.isComposing||i.preventDefault();const{direction:n,sequence:r,selectionToRemove:a,unit:c}=i,l="forward"===n?"deleteForward":"delete",d={sequence:r};if("selection"==c){const t=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));d.selection=e.model.createSelection(t)}else d.unit=c;e.execute(l,d),t.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(o,"delete",((t,o)=>{this._undoOnBackspace&&"backward"==o.direction&&1==o.sequence&&"codePoint"==o.unit&&(this._undoOnBackspace=!1,e.execute("undo"),o.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(s,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class w extends s.k_{static get requires(){return[d,k]}static get pluginName(){return"Typing"}}function v(e,t){let o=e.start;return{text:Array.from(e.getWalker({ignoreElementEnd:!1})).reduce(((e,{item:s})=>s.is("$text")||s.is("$textProxy")?e+s.data:(o=t.createPositionAfter(s),"")),""),range:t.createRange(o,e.end)}}class y extends((0,i.VM)()){model;testCallback;_hasMatch;constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:o})=>{o&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const o=this.model,s=o.document.selection,i=o.createRange(o.createPositionAt(s.focus.parent,0),s.focus),{text:n,range:r}=v(i,o),a=this.testCallback(n);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const o=Object.assign(t,{text:n,range:r});"object"==typeof a&&Object.assign(o,a),this.fire(`matched:${e}`,o)}}}class x extends s.k_{attributes;_overrideUid;_isNextGravityRestorationSkipped=!1;static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,o=e.editing.view,s=e.locale,n=t.document.selection;this.listenTo(o.document,"arrowKey",((e,t)=>{if(!n.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const o=t.keyCode==i.uP.arrowright,r=t.keyCode==i.uP.arrowleft;if(!o&&!r)return;const a=s.contentLanguageDirection;let c=!1;c="ltr"===a&&o||"rtl"===a&&r?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===c&&e.stop()}),{context:"$text",priority:"highest"}),this.listenTo(n,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&S(n.getFirstPosition(),this.attributes)||this._restoreGravity())})),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,o=this.editor.model,s=o.document.selection,i=s.getFirstPosition();return!this._isGravityOverridden&&((!i.isAtStart||!A(s,t))&&(!!S(i,t)&&(E(e),A(s,t)&&S(i,t,!0)?T(o,t):this._overrideGravity(),!0)))}_handleBackwardMovement(e){const t=this.attributes,o=this.editor.model,s=o.document.selection,i=s.getFirstPosition();return this._isGravityOverridden?(E(e),this._restoreGravity(),S(i,t,!0)?T(o,t):C(o,t,i),!0):i.isAtStart?!!A(s,t)&&(E(e),C(o,t,i),!0):!A(s,t)&&S(i,t,!0)?(E(e),C(o,t,i),!0):!!P(i,t)&&(i.isAtEnd&&!A(s,t)&&S(i,t)?(E(e),C(o,t,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}_enableClickingAfterNode(){const e=this.editor,t=e.model,o=t.document.selection,s=e.editing.view.document;e.editing.view.addObserver(a.q$);let i=!1;this.listenTo(s,"mousedown",(()=>{i=!0})),this.listenTo(s,"selectionChange",(()=>{const e=this.attributes;if(!i)return;if(i=!1,!o.isCollapsed)return;if(!A(o,e))return;const s=o.getFirstPosition();S(s,e)&&(s.isAtStart||S(s,e,!0)?T(t,e):this._isGravityOverridden||this._overrideGravity())}))}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection,o=this.attributes;this.listenTo(e,"insertContent",(()=>{const s=t.getFirstPosition();A(t,o)&&S(s,o)&&T(e,o)}),{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,t=e.model,o=t.document.selection,s=e.editing.view;let i=!1,n=!1;this.listenTo(s.document,"delete",((e,t)=>{i="backward"===t.direction}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{if(!i)return;const e=o.getFirstPosition();n=A(o,this.attributes)&&!P(e,this.attributes)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{i&&(i=!1,n||e.model.enqueueChange((()=>{const e=o.getFirstPosition();A(o,this.attributes)&&S(e,this.attributes)&&(e.isAtStart||S(e,this.attributes,!0)?T(t,this.attributes):this._isGravityOverridden||this._overrideGravity())})))}),{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function A(e,t){for(const o of t)if(e.hasAttribute(o))return!0;return!1}function C(e,t,o){const s=o.nodeBefore;e.change((o=>{if(s){const t=[],i=e.schema.isObject(s)&&e.schema.isInline(s);for(const[o,n]of s.getAttributes())!e.schema.checkAttribute("$text",o)||i&&!1===e.schema.getAttributeProperties(o).copyFromObject||t.push([o,n]);o.setSelectionAttribute(t)}else o.removeSelectionAttribute(t)}))}function T(e,t){e.change((e=>{e.removeSelectionAttribute(t)}))}function E(e){e.preventDefault()}function P(e,t){return S(e.getShiftedBy(-1),t)}function S(e,t,o=!1){const{nodeBefore:s,nodeAfter:i}=e;for(const e of t){const t=s?s.getAttribute(e):void 0,n=i?i.getAttribute(e):void 0;if((!o||void 0!==t&&void 0!==n)&&n!==t)return!0}return!1}var M=o("./node_modules/lodash-es/escapeRegExp.js");const O={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:N('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:N("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:N("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:N('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:N('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:N("'"),to:[null,"‚",null,"’"]}},V={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},R=["symbols","mathematical","typography","quotes"];class j extends s.k_{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(e){super(e),e.config.define("typing",{transformations:{include:R}})}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,o=e.plugins.get("Delete"),s=function(e){const t=e.extra||[],o=e.remove||[],s=e=>!o.includes(e);return function(e){const t=new Set;for(const o of e)if("string"==typeof o&&V[o])for(const e of V[o])t.add(e);else t.add(o);return Array.from(t)}(e.include.concat(t).filter(s)).filter(s).map((e=>"string"==typeof e&&O[e]?O[e]:e)).filter((e=>"object"==typeof e)).map((e=>({from:I(e.from),to:B(e.to)})))}(e.config.get("typing.transformations")),i=new y(e.model,(e=>{for(const t of s){if(t.from.test(e))return{normalizedTransformation:t}}}));i.on("matched:data",((e,s)=>{if(!s.batch.isTyping)return;const{from:i,to:n}=s.normalizedTransformation,r=i.exec(s.text),a=n(r.slice(1)),c=s.range;let l=r.index;t.enqueueChange((e=>{for(let o=1;o{o.requestUndoOnBackspace()}))}))})),i.bind("isEnabled").to(this)}}function I(e){return"string"==typeof e?new RegExp(`(${(0,M.A)(e)})$`):e}function B(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}function D(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function N(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function F(e,t,o,s){return s.createRange(L(e,t,o,!0,s),L(e,t,o,!1,s))}function L(e,t,o,s,i){let n=e.textNode||(s?e.nodeBefore:e.nodeAfter),r=null;for(;n&&n.getAttribute(t)==o;)r=n,n=s?n.previousSibling:n.nextSibling;return r?i.createPositionAt(r,s?"before":"after"):e}function z(e,t,o,s){const i=e.editing.view,n=new Set;i.document.registerPostFixer((i=>{const r=e.model.document.selection;let a=!1;if(r.hasAttribute(t)){const c=F(r.getFirstPosition(),t,r.getAttribute(t),e.model),l=e.editing.mapper.toViewRange(c);for(const e of l.getItems())e.is("element",o)&&!e.hasClass(s)&&(i.addClass(s,e),n.add(e),a=!0)}return a})),e.conversion.for("editingDowncast").add((e=>{function t(){i.change((e=>{for(const t of n.values())e.removeClass(s,t),n.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}},"./packages/ckeditor5-ui/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{KO:()=>ve,uI:()=>Hs,Jr:()=>zo,bQ:()=>ti,Lz:()=>ai,v1:()=>ye,Xt:()=>ms,e0:()=>H,_:()=>q,Kn:()=>Oe,pQ:()=>Ne,ph:()=>yo,oB:()=>Ro,vF:()=>Ie,eH:()=>jo,pU:()=>Ts,wi:()=>I,ep:()=>bi,lG:()=>le,_m:()=>ce,nu:()=>re,lU:()=>lt,Vz:()=>nt,BO:()=>ct,Gn:()=>ls,nc:()=>ps,eF:()=>Te,H:()=>G,Dy:()=>Y,MZ:()=>Zs,Ln:()=>z,WU:()=>_s,LU:()=>gs,Zz:()=>et,hK:()=>Qe,E6:()=>Xe,y0:()=>fe,xE:()=>Ye,m_:()=>yt,BD:()=>wt,Je:()=>vt,uO:()=>Ct,kS:()=>ue,GG:()=>Fi,I8:()=>pi,BY:()=>Ni,zj:()=>Di,yJ:()=>$i,Eg:()=>bs,wD:()=>js,b8:()=>Fs,XE:()=>Qs,AO:()=>Pt,xw:()=>Vs,Wm:()=>Ce,Bj:()=>a,OB:()=>st,Cy:()=>ht,IY:()=>dt,X3:()=>gt,JV:()=>Uo,Ss:()=>V,s3:()=>i,Jc:()=>ws,G6:()=>Oi,l1:()=>D,O:()=>Bt,fM:()=>jt,wy:()=>R,yu:()=>Rt,By:()=>$t,F_:()=>zt,Vr:()=>Lt,GR:()=>Ht,Zn:()=>Nt,b2:()=>Ve,I0:()=>j,tp:()=>J,eG:()=>X,lF:()=>Re,mB:()=>ki,iv:()=>je,fl:()=>ut,Z5:()=>B});var s=o("./packages/ckeditor5-utils/src/index.ts");class i extends s.pM{_parentElement;constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,o)=>{this._renderViewIntoCollectionParent(t,o)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new s.Yb("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const o of this)for(const s of e)o.delegate(s).to(t);this.on("add",((o,s)=>{for(const o of e)s.delegate(o).to(t)})),this.on("remove",((o,s)=>{for(const o of e)s.stopDelegating(o,t)}))}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}var n=o("./node_modules/lodash-es/cloneDeepWith.js"),r=o("./node_modules/lodash-es/isObject.js");class a extends((0,s.Mm)()){ns;tag;text;attributes;children;eventListeners;_isRendered;_revertData;constructor(e){super(),Object.assign(this,_(g(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new s.Yb("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const o of t.children)x(o)?yield o:A(o)&&(yield*e(o))}(this)}static bind(e,t){return{to:(o,s)=>new l({eventNameOrFunction:o,attribute:o,observable:e,emitter:t,callback:s}),if:(o,s,i)=>new d({observable:e,emitter:t,attribute:o,valueIfTrue:s,callback:i})}}static extend(e,t){if(e._isRendered)throw new s.Yb("template-extend-render",[this,e]);v(e,_(g(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new s.Yb("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),h(this.text)?this._bindToObservable({schema:this.text,updater:p(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,o=e.revertData;for(const s in this.attributes){const i=t.getAttribute(s),n=this.attributes[s];o&&(o.attributes[s]=i);const r=T(n)?n[0].ns:null;if(h(n)){const a=T(n)?n[0].value:n;o&&E(s)&&a.unshift(i),this._bindToObservable({schema:a,updater:m(t,s,r),data:e})}else if("style"==s&&"string"!=typeof n[0])this._renderStyleAttribute(n[0],e);else{o&&i&&E(s)&&n.unshift(i);const e=n.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce(k,"");y(e)||t.setAttributeNS(r,s,e)}}}_renderStyleAttribute(e,t){const o=t.node;for(const s in e){const i=e[s];h(i)?this._bindToObservable({schema:[i],updater:f(o,s),data:t}):o.style[s]=i}}_renderElementChildren(e){const t=e.node,o=e.intoFragment?document.createDocumentFragment():t,i=e.isApplying;let n=0;for(const r of this.children)if(C(r)){if(!i){r.setParent(t);for(const e of r)o.appendChild(e.element)}}else if(x(r))i||(r.isRendered||r.render(),o.appendChild(r.element));else if((0,s.Ll)(r))o.appendChild(r);else if(i){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),r._renderNode({intoFragment:!1,node:o.childNodes[n++],isApplying:!0,revertData:t})}else o.appendChild(r.render());e.intoFragment&&t.appendChild(o)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const o=this.eventListeners[t].map((o=>{const[s,i]=t.split("@");return o.activateDomEventListener(s,i,e)}));e.revertData&&e.revertData.bindings.push(o)}}_bindToObservable({schema:e,updater:t,data:o}){const s=o.revertData;u(e,t,o);const i=e.filter((e=>!y(e))).filter((e=>e.observable)).map((s=>s.activateAttributeListener(e,t,o)));s&&s.bindings.push(i)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const o=e;for(const e in t.attributes){const s=t.attributes[e];null===s?o.removeAttribute(e):o.setAttribute(e,s)}for(let e=0;eu(e,t,o);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,s),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,s)}}}class l extends c{eventNameOrFunction;constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,o){const s=(e,o)=>{t&&!o.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(o):this.observable.fire(this.eventNameOrFunction,o))};return this.emitter.listenTo(o.node,e,s),()=>{this.emitter.stopListening(o.node,e,s)}}}class d extends c{valueIfTrue;constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!y(super.getValue(e))&&(this.valueIfTrue||!0)}}function h(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(h):e instanceof c)}function u(e,t,{node:o}){const s=function(e,t){return e.map((e=>e instanceof c?e.getValue(t):e))}(e,o);let i;i=1==e.length&&e[0]instanceof d?s[0]:s.reduce(k,""),y(i)?t.remove():t.set(i)}function p(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function m(e,t,o){return{set(s){e.setAttributeNS(o,t,s)},remove(){e.removeAttributeNS(o,t)}}}function f(e,t){return{set(o){e.style[t]=o},remove(){e.style[t]=null}}}function g(e){return(0,n.A)(e,(e=>{if(e&&(e instanceof c||A(e)||x(e)||C(e)))return e}))}function _(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=(0,s.$r)(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)b(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=(0,s.$r)(e[t].value)),b(e,t)}(e.attributes);const t=[];if(e.children)if(C(e.children))t.push(e.children);else for(const o of e.children)A(o)||x(o)||(0,s.Ll)(o)?t.push(o):t.push(new a(o));e.children=t}return e}function b(e,t){e[t]=(0,s.$r)(e[t])}function k(e,t){return y(t)?e:y(e)?t:`${e} ${t}`}function w(e,t){for(const o in t)e[o]?e[o].push(...t[o]):e[o]=t[o]}function v(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),w(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),w(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new s.Yb("ui-template-extend-children-mismatch",e);let o=0;for(const s of t.children)v(e.children[o++],s)}}function y(e){return!e&&0!==e}function x(e){return e instanceof V}function A(e){return e instanceof a}function C(e){return e instanceof i}function T(e){return(0,r.A)(e[0])&&e[0].ns}function E(e){return"class"==e||"style"==e}var P=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),S=o.n(P),M=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css"),O={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(M.A,O);M.A.locals;class V extends((0,s.c5)((0,s.VM)())){element;isRendered;locale;t;template;_viewCollections;_unboundChildren;_bindTemplate;constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new s.pM,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,o)=>{o.locale=e,o.t=e&&e.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=a.bind(this,this)}createCollection(e){const t=new i(e);return this._viewCollections.add(t),t}registerChild(e){(0,s.xZ)(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){(0,s.xZ)(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new a(e)}extendTemplate(e){a.extend(this.template,e)}render(){if(this.isRendered)throw new s.Yb("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e=>e.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}function R({emitter:e,activator:t,callback:o,contextElements:s}){e.listenTo(document,"mousedown",((e,i)=>{if(!t())return;const n="function"==typeof i.composedPath?i.composedPath():[],r="function"==typeof s?s():s;for(const e of r)if(e.contains(i.target)||n.includes(e))return;o()}))}function j(e){const t=e;t.set("_isCssTransitionsDisabled",!1),t.disableCssTransitions=()=>{t._isCssTransitionsDisabled=!0},t.enableCssTransitions=()=>{t._isCssTransitionsDisabled=!1},t.extendTemplate({attributes:{class:[t.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}function I(e){return class extends e{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...e){super(...e),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function B({view:e}){e.listenTo(e.element,"submit",((t,o)=>{o.preventDefault(),e.fire("submit")}),{useCapture:!0})}function D({keystrokeHandler:e,focusTracker:t,gridItems:o,numberOfColumns:s,uiLanguageDirection:i}){const n="number"==typeof s?()=>s:s;function r(e){return s=>{const i=o.find((e=>e.element===t.focusedElement)),n=o.getIndex(i),r=e(n,o);o.get(r).focus(),s.stopPropagation(),s.preventDefault()}}function a(e,t){return e===t-1?0:e+1}function c(e,t){return 0===e?t-1:e-1}e.set("arrowright",r(((e,t)=>"rtl"===i?c(e,t.length):a(e,t.length)))),e.set("arrowleft",r(((e,t)=>"rtl"===i?a(e,t.length):c(e,t.length)))),e.set("arrowup",r(((e,t)=>{let o=e-n();return o<0&&(o=e+n()*Math.floor(t.length/n()),o>t.length-1&&(o-=n())),o}))),e.set("arrowdown",r(((e,t)=>{let o=e+n();return o>t.length-1&&(o=e%n()),o})))}var N=o("./packages/ckeditor5-core/src/index.ts"),F=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css"),L={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(F.A,L);F.A.locals;class z extends V{static presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.set("isVisible",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon",e.if("isVisible","ck-hidden",(e=>!e)),"ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:t,value:o}of Array.from(e.attributes))z.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,o);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((e=>{e.style.fill=this.fillColor}))}}class H extends V{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:e.to("style"),id:e.to("id")},children:[{text:e.to("text")}]})}}var $=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css"),W={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()($.A,W);$.A.locals;class q extends V{children;labelView;iconView;keystrokeView;_focusDelayed=null;constructor(e,t=new H){super(e);const o=this.bindTemplate,i=(0,s.Ld)();this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${i}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._setupLabelView(t),this.iconView=new z,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const n={tag:"button",attributes:{class:["ck","ck-button",o.to("class"),o.if("isEnabled","ck-disabled",(e=>!e)),o.if("isVisible","ck-hidden",(e=>!e)),o.to("isOn",(e=>e?"ck-on":"ck-off")),o.if("withText","ck-button_with-text"),o.if("withKeystroke","ck-button_with-keystroke")],role:o.to("role"),type:o.to("type",(e=>e||"button")),tabindex:o.to("tabindex"),"aria-checked":o.to("ariaChecked"),"aria-label":o.to("ariaLabel"),"aria-labelledby":o.to("ariaLabelledBy"),"aria-disabled":o.if("isEnabled",!0,(e=>!e)),"aria-pressed":o.to("isOn",(e=>!!this.isToggleable&&String(!!e))),"data-cke-tooltip-text":o.to("_tooltipString"),"data-cke-tooltip-position":o.to("tooltipPosition")},children:this.children,on:{click:o.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};s._K.isSafari&&(this._focusDelayed||(this._focusDelayed=(0,s.cb)((()=>this.focus()),0)),n.on.mousedown=o.to((()=>{this._focusDelayed()})),n.on.mouseup=o.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(n)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_setupLabelView(e){return e.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),e}_createKeystrokeView(){const e=new V;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>(0,s.YA)(e)))}]}),e}_getTooltipString(e,t,o){return e?"string"==typeof e?e:(o&&(o=(0,s.YA)(o)),e instanceof Function?e(t,o):`${t}${o?` (${o})`:""}`):""}}var U=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css"),K={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(U.A,K);U.A.locals;class Y extends V{children;iconView;constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",o.to("class")]},children:this.children}),t.icon&&(this.iconView=new z,this.iconView.content=t.icon,this.children.add(this.iconView));const s=new V(e);s.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"],role:"presentation"},children:[{text:o.to("label")}]}),this.children.add(s)}}class G extends((0,s.Mm)()){focusables;focusTracker;keystrokeHandler;actions;constructor(e){if(super(),this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let o=e.actions[t];"string"==typeof o&&(o=[o]);for(const s of o)e.keystrokeHandler.set(s,((e,o)=>{this[t](),o()}))}this.on("forwardCycle",(()=>this.focusFirst()),{priority:"low"}),this.on("backwardCycle",(()=>this.focusLast()),{priority:"low"})}get first(){return this.focusables.find(Z)||null}get last(){return this.focusables.filter(Z).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,o)=>{const s=t.element===this.focusTracker.focusedElement;return s&&(e=o),s})),e)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const e=this.next;e&&this.focusables.getIndex(e)===this.current||e===this.first?this.fire("forwardCycle"):this._focus(e,1)}focusPrevious(){const e=this.previous;e&&this.focusables.getIndex(e)===this.current||e===this.last?this.fire("backwardCycle"):this._focus(e,-1)}_focus(e,t){e&&this.focusTracker.focusedElement!==e.element&&e.focus(t)}_getDomFocusableItem(e){const t=this.focusables.length;if(!t)return null;const o=this.current;if(null===o)return this[1===e?"first":"last"];let s=this.focusables.get(o),i=(o+t+e)%t;do{const o=this.focusables.get(i);if(Z(o)){s=o;break}i=(i+t+e)%t}while(i!==o);return s}}function Z(e){return J(e)&&(0,s.zN)(e.element)}function J(e){return!(!("focus"in e)||"function"!=typeof e.focus)}function X(e){return J(e)&&"focusCycler"in e&&e.focusCycler instanceof G}function Q(e){return class extends e{_onDragBound=this._onDrag.bind(this);_onDragEndBound=this._onDragEnd.bind(this);_lastDraggingCoordinates={x:0,y:0};constructor(...e){super(...e),this.on("render",(()=>{this._attachListeners()})),this.set("isDragging",!1)}_attachListeners(){this.listenTo(this.element,"mousedown",this._onDragStart.bind(this)),this.listenTo(this.element,"touchstart",this._onDragStart.bind(this))}_attachDragListeners(){this.listenTo(s.Sf.document,"mouseup",this._onDragEndBound),this.listenTo(s.Sf.document,"touchend",this._onDragEndBound),this.listenTo(s.Sf.document,"mousemove",this._onDragBound),this.listenTo(s.Sf.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening(s.Sf.document,"mouseup",this._onDragEndBound),this.stopListening(s.Sf.document,"touchend",this._onDragEndBound),this.stopListening(s.Sf.document,"mousemove",this._onDragBound),this.stopListening(s.Sf.document,"touchmove",this._onDragBound)}_onDragStart(e,t){if(!this._isHandleElementPressed(t))return;this._attachDragListeners();let o=0,s=0;t instanceof MouseEvent?(o=t.clientX,s=t.clientY):(o=t.touches[0].clientX,s=t.touches[0].clientY),this._lastDraggingCoordinates={x:o,y:s},this.isDragging=!0}_onDrag(e,t){if(!this.isDragging)return void this._detachDragListeners();let o=0,s=0;t instanceof MouseEvent?(o=t.clientX,s=t.clientY):(o=t.touches[0].clientX,s=t.touches[0].clientY),t.preventDefault(),this.fire("drag",{deltaX:Math.round(o-this._lastDraggingCoordinates.x),deltaY:Math.round(s-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:o,y:s}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(e){return!!this.dragHandleElement&&(this.dragHandleElement===e.target||e.target instanceof HTMLElement&&this.dragHandleElement.contains(e.target))}}}var ee=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dialog/dialogactions.css"),te={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(ee.A,te);ee.A.locals;class oe extends V{children;keystrokes;focusCycler;_focusTracker;_focusables;constructor(e){super(e),this.children=this.createCollection(),this.keystrokes=new s.EP,this._focusTracker=new s.$x,this._focusables=new i,this.focusCycler=new G({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__actions"]},children:this.children})}render(){super.render(),this.keystrokes.listenTo(this.element)}setButtons(e){for(const t of e){const e=new q(this.locale);let o;for(o in e.on("execute",(()=>t.onExecute())),t.onCreate&&t.onCreate(e),t)"onExecute"!=o&&"onCreate"!=o&&e.set(o,t[o]);this.children.add(e)}this._updateFocusCyclableItems()}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}_updateFocusCyclableItems(){Array.from(this.children).forEach((e=>{this._focusables.add(e),this._focusTracker.add(e.element)}))}}class se extends V{children;constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__content"]},children:this.children})}reset(){for(;this.children.length;)this.children.remove(0)}}var ie=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dialog/dialog.css"),ne={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(ie.A,ne);ie.A.locals;const re={SCREEN_CENTER:"screen-center",EDITOR_CENTER:"editor-center",EDITOR_TOP_SIDE:"editor-top-side",EDITOR_TOP_CENTER:"editor-top-center",EDITOR_BOTTOM_CENTER:"editor-bottom-center",EDITOR_ABOVE_CENTER:"editor-above-center",EDITOR_BELOW_CENTER:"editor-below-center"},ae=(0,s.To)("px");class ce extends(Q(V)){parts;headerView;closeButtonView;actionsView;static defaultOffset=15;contentView;keystrokes;focusTracker;wasMoved=!1;_getCurrentDomRoot;_getViewportOffset;_focusables;_focusCycler;constructor(e,{getCurrentDomRoot:t,getViewportOffset:o}){super(e);const n=this.bindTemplate,r=e.t;this.set("className",""),this.set("ariaLabel",r("Editor dialog")),this.set("isModal",!1),this.set("position",re.SCREEN_CENTER),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=t,this._getViewportOffset=o,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new s.EP,this.focusTracker=new s.$x,this._focusables=new i,this._focusCycler=new G({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",n.if("isModal","ck-dialog-overlay__transparent",(e=>!e)),n.if("_isVisible","ck-hidden",(e=>!e))],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",n.to("className")],role:"dialog","aria-label":n.to("ariaLabel"),style:{top:n.to("_top",(e=>ae(e))),left:n.to("_left",(e=>ae(e))),visibility:n.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",((e,t)=>{this.fire("close",{source:"escKeyPress"}),t()})),this.on("drag",((e,{deltaX:t,deltaY:o})=>{this.wasMoved=!0,this.moveBy(t,o)})),this.listenTo(s.Sf.window,"resize",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.listenTo(s.Sf.document,"scroll",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.on("change:_isVisible",((e,t,o)=>{o&&(this._isTransparent=!0,setTimeout((()=>{this.updatePosition(),this._isTransparent=!1,this.focus()}),10))})),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView?this.headerView.element:null}setupParts({icon:e,title:t,hasCloseButton:o=!0,content:s,actionButtons:i}){t&&(this.headerView=new Y(this.locale,{icon:e}),o&&(this.closeButtonView=this._createCloseButton(),this.headerView.children.add(this.closeButtonView)),this.headerView.label=t,this.ariaLabel=t,this.parts.add(this.headerView,0)),s&&(s instanceof V&&(s=[s]),this.contentView=new se(this.locale),this.contentView.children.addMany(s),this.parts.add(this.contentView)),i&&(this.actionsView=new oe(this.locale),this.actionsView.setButtons(i),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(e,t){const o=this._getViewportRect(),s=this._getDialogRect();e+s.width>o.right&&(e=o.right-s.width),e{this._focusables.add(e),this.focusTracker.add(e.element),X(e)&&(this.listenTo(e.focusCycler,"forwardCycle",(e=>{this._focusCycler.focusNext(),this._focusCycler.next!==this._focusCycler.focusables.get(this._focusCycler.current)&&e.stop()})),this.listenTo(e.focusCycler,"backwardCycle",(e=>{this._focusCycler.focusPrevious(),this._focusCycler.previous!==this._focusCycler.focusables.get(this._focusCycler.current)&&e.stop()})))}))}_createCloseButton(){const e=new q(this.locale),t=this.locale.t;return e.set({label:t("Close"),tooltip:!0,icon:N.Pt.cancel}),e.on("execute",(()=>this.fire("close",{source:"closeButton"}))),e}}class le extends N.k_{view;static _visibleDialogPlugin;_onHide;static get pluginName(){return"Dialog"}constructor(e){super(e);const t=e.t;this._initShowHideListeners(),this._initFocusToggler(),this._initMultiRootIntegration(),this.set("id",null),e.accessibility.addKeystrokeInfos({categoryId:"navigation",keystrokes:[{label:t("Move focus in and out of an active dialog window"),keystroke:"Ctrl+F6",mayRequireFn:!0}]})}_initShowHideListeners(){this.on("show",((e,t)=>{this._show(t)})),this.on("show",((e,t)=>{t.onShow&&t.onShow(this)}),{priority:"low"}),this.on("hide",(()=>{le._visibleDialogPlugin&&le._visibleDialogPlugin._hide()})),this.on("hide",(()=>{this._onHide&&(this._onHide(this),this._onHide=void 0)}),{priority:"low"})}_initFocusToggler(){const e=this.editor;e.keystrokes.set("Ctrl+F6",((t,o)=>{this.isOpen&&!this.view.isModal&&(this.view.focusTracker.isFocused?e.editing.view.focus():this.view.focus(),o())}))}_initMultiRootIntegration(){const e=this.editor.model;e.document.on("change:data",(()=>{if(!this.view)return;const t=e.document.differ.getChangedRoots();for(const e of t)e.state&&this.view.updatePosition()}))}show(e){this.hide(),this.fire(`show:${e.id}`,e)}_show({id:e,icon:t,title:o,hasCloseButton:s=!0,content:i,actionButtons:n,className:r,isModal:a,position:c,onHide:l}){const d=this.editor;this.view=new ce(d.locale,{getCurrentDomRoot:()=>d.editing.view.getDomRoot(d.model.document.selection.anchor.root.rootName),getViewportOffset:()=>d.ui.viewportOffset});const h=this.view;h.on("close",(()=>{this.hide()})),d.ui.view.body.add(h),d.ui.focusTracker.add(h.element),d.keystrokes.listenTo(h.element),c||(c=a?re.SCREEN_CENTER:re.EDITOR_CENTER),h.set({position:c,_isVisible:!0,className:r,isModal:a}),h.setupParts({icon:t,title:o,hasCloseButton:s,content:i,actionButtons:n}),this.id=e,l&&(this._onHide=l),this.isOpen=!0,le._visibleDialogPlugin=this}hide(){le._visibleDialogPlugin&&le._visibleDialogPlugin.fire(`hide:${le._visibleDialogPlugin.id}`)}_hide(){if(!this.view)return;const e=this.editor,t=this.view;t.contentView&&t.contentView.reset(),e.ui.view.body.remove(t),e.ui.focusTracker.remove(t.element),e.keystrokes.stopListening(t.element),t.destroy(),e.editing.view.focus(),this.id=null,this.isOpen=!1,le._visibleDialogPlugin=null}}var de=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenulistitembutton.css"),he={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(de.A,he);de.A.locals;class ue extends q{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}var pe=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css"),me={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(pe.A,me);pe.A.locals;class fe extends V{id;constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${(0,s.Ld)()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class ge extends V{constructor(e,t){super(e);const o=e.t,i=new fe;i.text=o("Help Contents. To close this dialog press ESC."),this.setTemplate({tag:"div",attributes:{class:["ck","ck-accessibility-help-dialog__content"],"aria-labelledby":i.id,role:"document",tabindex:-1},children:[(0,s.n)(document,"p",{},o("Below, you can find a list of keyboard shortcuts that can be used in the editor.")),...this._createCategories(Array.from(t.values())),i]})}focus(){this.element.focus()}_createCategories(e){return e.map((e=>{const t=[(0,s.n)(document,"h3",{},e.label),...Array.from(e.groups.values()).map((e=>this._createGroup(e))).flat()];return e.description&&t.splice(1,0,(0,s.n)(document,"p",{},e.description)),(0,s.n)(document,"section",{},t)}))}_createGroup(e){const t=e.keystrokes.sort(((e,t)=>e.label.localeCompare(t.label))).map((e=>this._createGroupRow(e))).flat(),o=[(0,s.n)(document,"dl",{},t)];return e.label&&o.unshift((0,s.n)(document,"h4",{},e.label)),o}_createGroupRow(e){const t=this.locale.t,o=(0,s.n)(document,"dt"),i=(0,s.n)(document,"dd"),n=function(e){if("string"==typeof e)return[[e]];if("string"==typeof e[0])return[e];return e}(e.keystroke),r=[];for(const e of n)r.push(e.map(_e).join(""));return o.innerHTML=e.label,i.innerHTML=r.join(", ")+(e.mayRequireFn&&s._K.isMac?` ${t("(may require Fn)")}`:""),[o,i]}}function _e(e){return(0,s.YA)(e).split("+").map((e=>`${e}`)).join("+")}const be='';var ke=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/accessibilityhelp.css"),we={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(ke.A,we);ke.A.locals;class ve extends N.k_{contentView=null;static get requires(){return[le]}static get pluginName(){return"AccessibilityHelp"}init(){const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("accessibilityHelp",(()=>{const e=this._createButton(q);return e.set({tooltip:!0,withText:!1,label:t("Accessibility help")}),e})),e.ui.componentFactory.add("menuBar:accessibilityHelp",(()=>{const e=this._createButton(ue);return e.label=t("Accessibility"),e})),e.keystrokes.set("Alt+0",((e,t)=>{this._showDialog(),t()})),this._setupRootLabels()}_createButton(e){const t=new e(this.editor.locale);return t.set({keystroke:"Alt+0",icon:be}),t.on("execute",(()=>this._showDialog())),t}_setupRootLabels(){const e=this.editor,t=e.editing.view,o=e.t;function i(e,t){const i=`${t.getAttribute("aria-label")}. ${o("Press %0 for help.",[(0,s.YA)("Alt+0")])}`;e.setAttribute("aria-label",i,t)}e.ui.on("ready",(()=>{t.change((e=>{for(const o of t.document.roots)i(e,o)})),e.on("addRoot",((o,s)=>{const n=e.editing.view.document.getRoot(s.rootName);t.change((e=>i(e,n)))}),{priority:"low"})}))}_showDialog(){const e=this.editor,t=e.plugins.get("Dialog"),o=e.locale.t;this.contentView||(this.contentView=new ge(e.locale,e.accessibility.keystrokeInfos)),t.show({id:"accessibilityHelp",className:"ck-accessibility-help-dialog",title:o("Accessibility help"),icon:be,hasCloseButton:!0,content:this.contentView})}}class ye extends i{locale;_bodyCollectionContainer;constructor(e,t=[]){super(t),this.locale=e}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new a({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=(0,s.n)(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}var xe=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css"),Ae={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(xe.A,Ae);xe.A.locals;class Ce extends q{toggleSwitchView;constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new V;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}class Te extends q{buttonView;_fileInputView;constructor(e){super(e),this.buttonView=this,this._fileInputView=new Ee(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.on("execute",(()=>{this._fileInputView.open()})),this.extendTemplate({attributes:{class:"ck-file-dialog-button"}})}render(){super.render(),this.children.add(this._fileInputView)}}class Ee extends V{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}const Pe='';var Se=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/collapsible/collapsible.css"),Me={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Se.A,Me);Se.A.locals;class Oe extends V{buttonView;children;constructor(e,t){super(e);const o=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),t&&this.children.addMany(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",o.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:o.if("isCollapsed","hidden"),"aria-labelledby":o.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}focus(){this.buttonView.focus()}_createButtonView(){const e=new q(this.locale),t=e.bindTemplate;return e.set({withText:!0,icon:Pe}),e.extendTemplate({attributes:{"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",(e=>!e)),e.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),e}}function Ve(e,t){const o=e.t,s={Black:o("Black"),"Dim grey":o("Dim grey"),Grey:o("Grey"),"Light grey":o("Light grey"),White:o("White"),Red:o("Red"),Orange:o("Orange"),Yellow:o("Yellow"),"Light green":o("Light green"),Green:o("Green"),Aquamarine:o("Aquamarine"),Turquoise:o("Turquoise"),"Light blue":o("Light blue"),Blue:o("Blue"),Purple:o("Purple")};return t.map((e=>{const t=s[e.label];return t&&t!=e.label&&(e.label=t),e}))}function Re(e){return e.map(je).filter((e=>!!e))}function je(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}class Ie extends q{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon='',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color",(e=>s._K.isMediaForcedColors?null:e))},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-selector__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}var Be=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css"),De={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Be.A,De);Be.A.locals;class Ne extends V{columns;items;focusTracker;keystrokes;constructor(e,t){super(e);const o=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=t&&t.columns?t.columns:5;const i={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new s.$x,this.keystrokes=new s.EP,this.items.on("add",((e,t)=>{t.isOn=t.color===this.selectedColor})),o.forEach((e=>{const t=new Ie;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),this.items.add(t)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:i}}),this.on("change:selectedColor",((e,t,o)=>{for(const e of this.items)e.isOn=e.color===o}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),D({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}var Fe=o("./node_modules/color-name/index.js");const Le=function(e){var t,o,s=[],i=1;if("string"==typeof e)if(Fe[e])s=Fe[e].slice(),o="rgb";else if("transparent"===e)i=0,o="rgb",s=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var n=e.slice(1);i=1,(c=n.length)<=4?(s=[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)],4===c&&(i=parseInt(n[3]+n[3],16)/255)):(s=[parseInt(n[0]+n[1],16),parseInt(n[2]+n[3],16),parseInt(n[4]+n[5],16)],8===c&&(i=parseInt(n[6]+n[7],16)/255)),s[0]||(s[0]=0),s[1]||(s[1]=0),s[2]||(s[2]=0),o="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var r=t[1],a="rgb"===r;o=n=r.replace(/a$/,"");var c="cmyk"===n?4:"gray"===n?1:3;s=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===c?parseFloat(e)/100:"rgb"===n?255*parseFloat(e)/100:parseFloat(e);if("h"===n[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==ze[e])return ze[e]}return parseFloat(e)})),r===n&&s.push(1),i=a||void 0===s[c]?1:s[c],s=s.slice(0,c)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(s=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),o=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(s=[e[0],e[1],e[2]],o="rgb",i=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(o="rgb",s=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(o="hsl",s=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),i=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(i/=100)):(o="rgb",s=[e>>>16,(65280&e)>>>8,255&e]);return{space:o,values:s,alpha:i}};var ze={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};var He=o("./node_modules/color-convert/index.js");function $e(e,t){if(!e)return"";const o=We(e);if(!o)return"";if(o.space===t)return e;if(s=o,!Object.keys(He).includes(s.space))return"";var s;const i=He[o.space][t];if(!i)return"";return function(e,t){switch(t){case"hex":return`#${e}`;case"rgb":return`rgb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"hsl":return`hsl( ${e[0]}, ${e[1]}%, ${e[2]}% )`;case"hwb":return`hwb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"lab":return`lab( ${e[0]}% ${e[1]} ${e[2]} )`;case"lch":return`lch( ${e[0]}% ${e[1]} ${e[2]} )`;default:return""}}(i("hex"===o.space?o.hexValue:o.values),t)}function We(e){if(e.startsWith("#")){const t=Le(e);return{space:"hex",values:t.values,hexValue:e,alpha:t.alpha}}const t=Le(e);return t.space?t:null}var qe=o("./node_modules/lodash-es/debounce.js"),Ue=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css"),Ke={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ue.A,Ke);Ue.A.locals;class Ye extends V{fieldView;labelView;statusView;fieldWrapperChildren;constructor(e,t){super(e);const o=`ck-labeled-field-view-${(0,s.Ld)()}`,i=`ck-labeled-field-view-status-${(0,s.Ld)()}`;this.fieldView=t(this,o,i),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(o),this.statusView=this._createStatusView(i),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const n=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",n.to("class"),n.if("isEnabled","ck-disabled",(e=>!e)),n.if("isEmpty","ck-labeled-field-view_empty"),n.if("isFocused","ck-labeled-field-view_focused"),n.if("placeholder","ck-labeled-field-view_placeholder"),n.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new fe(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new V(this.locale),o=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",o.if("errorText","ck-labeled-field-view__status_error"),o.if("_statusText","ck-hidden",(e=>!e))],id:e,role:o.if("errorText","alert")},children:[{text:o.to("_statusText")}]}),t}focus(e){this.fieldView.focus(e)}}class Ge extends V{focusTracker;constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("tabIndex",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.set("ariaLabel",void 0),this.focusTracker=new s.$x,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),tabindex:t.to("tabIndex"),readonly:t.to("isReadOnly"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById"),"aria-label":t.to("ariaLabel")},on:{input:t.to(((...e)=>{this.fire("input",...e),this._updateIsEmpty()})),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((e,t,o)=>{this._setDomElementValue(o),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}reset(){this.value=this.element.value="",this._updateIsEmpty()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}var Ze=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css"),Je={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ze.A,Je);Ze.A.locals;class Xe extends Ge{constructor(e){super(e),this.set("inputMode","text");const t=this.bindTemplate;this.extendTemplate({attributes:{inputmode:t.to("inputMode")}})}}class Qe extends Xe{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class et extends Xe{constructor(e,{min:t,max:o,step:s}={}){super(e);const i=this.bindTemplate;this.set("min",t),this.set("max",o),this.set("step",s),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:i.to("min"),max:i.to("max"),step:i.to("step")}})}}var tt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/textarea/textarea.css"),ot={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(tt.A,ot);tt.A.locals;class st extends Ge{_resizeObserver;_isUpdateAutoGrowHeightPending=!1;constructor(e){super(e);const t=(0,s.To)("px");this.set("minRows",2),this.set("maxRows",5),this.set("_height",null),this.set("resize","none"),this._resizeObserver=null,this.on("change:minRows",this._validateMinMaxRows.bind(this)),this.on("change:maxRows",this._validateMinMaxRows.bind(this));const o=this.bindTemplate;this.template.tag="textarea",this.extendTemplate({attributes:{class:["ck-textarea"],style:{height:o.to("_height",(e=>e?t(e):null)),resize:o.to("resize")},rows:o.to("minRows")}})}render(){super.render();let e=!1;this.on("input",(()=>{this._updateAutoGrowHeight(!0),this.fire("update")})),this.on("change:value",(()=>{s.Sf.window.requestAnimationFrame((()=>{(0,s.zN)(this.element)?(this._updateAutoGrowHeight(),this.fire("update")):this._isUpdateAutoGrowHeightPending=!0}))})),this._resizeObserver=new s.tb(this.element,(t=>{const o=!!t.contentRect.width&&!!t.contentRect.height;!e&&o&&this._isUpdateAutoGrowHeightPending&&s.Sf.window.requestAnimationFrame((()=>{this._updateAutoGrowHeight(),this.fire("update")})),e=o}))}destroy(){this._resizeObserver&&this._resizeObserver.destroy()}reset(){super.reset(),this._updateAutoGrowHeight(),this.fire("update")}_updateAutoGrowHeight(e){const t=this.element;if(!t.offsetParent)return void(this._isUpdateAutoGrowHeightPending=!0);this._isUpdateAutoGrowHeightPending=!1;const o=it(t,"1"),i=it(t,t.value),n=o.ownerDocument.defaultView.getComputedStyle(o),r=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),a=(0,s.Md)(o),c=parseFloat(n.lineHeight),l=a.top+a.bottom,d=new s.rw(o).height,h=Math.round((i.scrollHeight-r)/c),u=this.maxRows*c+r+l,p=1===h?d:this.minRows*c+r+l;this._height=Math.min(Math.max(Math.max(h,this.minRows)*c+r+l,p),u),e&&(t.scrollTop=t.scrollHeight),o.remove(),i.remove()}_validateMinMaxRows(){if(this.minRows>this.maxRows)throw new s.Yb("ui-textarea-view-min-rows-greater-than-max-rows",{textareaView:this,minRows:this.minRows,maxRows:this.maxRows})}}function it(e,t){const o=e.cloneNode();return o.style.position="absolute",o.style.top="-99999px",o.style.left="-99999px",o.style.height="auto",o.style.overflow="hidden",o.style.width=e.ownerDocument.defaultView.getComputedStyle(e).width,o.tabIndex=-1,o.rows=1,o.value=t,e.parentNode.insertBefore(o,e),o}class nt extends V{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():(0,s.FF)("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}var rt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css"),at={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(rt.A,at);rt.A.locals;class ct extends V{buttonView;panelView;focusTracker;keystrokes;listView;toolbarView;constructor(e,t,o){super(e);const i=this.bindTemplate;this.buttonView=t,this.panelView=o,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new s.EP,this.focusTracker=new s.$x,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",i.to("class"),i.if("isEnabled","ck-disabled",(e=>!e))],id:i.to("id"),"aria-describedby":i.to("ariaDescribedById")},children:[t,o]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":i.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.on("change:isOpen",((e,t,o)=>{if(o)if("auto"===this.panelPosition){const e=ct._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=e?e.name:this._panelPositions[0].name}else this.panelView.position=this.panelPosition})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:o,southWest:s,northEast:i,northWest:n,southMiddleEast:r,southMiddleWest:a,northMiddleEast:c,northMiddleWest:l}=ct.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[o,s,r,a,e,i,n,c,l,t]:[s,o,a,r,e,n,i,l,c,t]}static defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})};static _getOptimalPosition=s.W}class lt extends q{arrowView;constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new z;return e.content=Pe,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class dt extends V{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class ht extends V{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function ut(e){if(Array.isArray(e))return{items:e,removeItems:[]};const t={items:[],removeItems:[]};return e?{...t,...e}:t}var pt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css"),mt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(pt.A,mt);pt.A.locals;const ft=(()=>({alignLeft:N.Pt.alignLeft,bold:N.Pt.bold,importExport:N.Pt.importExport,paragraph:N.Pt.paragraph,plus:N.Pt.plus,text:N.Pt.text,threeVerticalDots:N.Pt.threeVerticalDots,pilcrow:N.Pt.pilcrow,dragIndicator:N.Pt.dragIndicator}))();class gt extends V{options;items;focusTracker;keystrokes;itemsView;children;focusables;_focusCycler;_behavior;constructor(e,t){super(e);const o=this.bindTemplate,i=this.t;this.options=t||{},this.set("ariaLabel",i("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new s.$x,this.keystrokes=new s.EP,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new _t(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const n="rtl"===e.uiLanguageDirection;this._focusCycler=new G({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[n?"arrowright":"arrowleft","arrowup"],focusNext:[n?"arrowleft":"arrowright","arrowdown"]}});const r=["ck","ck-toolbar",o.to("class"),o.if("isCompact","ck-toolbar_compact")];var a;this.options.shouldGroupWhenFull&&this.options.isFloating&&r.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:r,role:"toolbar","aria-label":o.to("ariaLabel"),style:{maxWidth:o.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(a=this,a.bindTemplate.to((e=>{e.target===a.element&&e.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new kt(this):new bt(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,o){this.items.addMany(this._buildItemsFromConfig(e,t,o))}_buildItemsFromConfig(e,t,o){const s=ut(e),i=o||s.removeItems;return this._cleanItemsConfiguration(s.items,t,i).map((e=>(0,r.A)(e)?this._createNestedToolbarDropdown(e,t,i):"|"===e?new dt:"-"===e?new ht:t.create(e))).filter((e=>!!e))}_cleanItemsConfiguration(e,t,o){const i=e.filter(((e,i,n)=>"|"===e||-1===o.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||((0,s.FF)("toolbarview-line-break-ignored-when-grouping-items",n),!1):!(!(0,r.A)(e)&&!t.has(e))||((0,s.FF)("toolbarview-item-unavailable",{item:e}),!1))));return this._cleanSeparatorsAndLineBreaks(i)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,o=e.length,s=e.findIndex(t);if(-1===s)return[];const i=o-e.slice().reverse().findIndex(t);return e.slice(s,i).filter(((e,o,s)=>{if(t(e))return!0;return!(o>0&&s[o-1]===e)}))}_createNestedToolbarDropdown(e,t,o){let{label:i,icon:n,items:r,tooltip:a=!0,withText:c=!1}=e;if(r=this._cleanItemsConfiguration(r,t,o),!r.length)return null;const l=Rt(this.locale);return i||(0,s.FF)("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:i,tooltip:a,withText:!!c}),!1!==n?l.buttonView.icon=ft[n]||n||N.Pt.threeVerticalDots:l.buttonView.withText=!0,jt(l,(()=>l.toolbarView._buildItemsFromConfig(r,t,o))),l}}class _t extends V{children;constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class bt{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>J(e)?e:null)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class kt{view;viewChildren;viewFocusables;viewItemsView;viewFocusTracker;viewLocale;ungroupedItems;groupedItems;groupedItemsDropdown;resizeObserver=null;cachedPadding=null;shouldUpdateGroupingOnNextResize=!1;viewElement;constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),e.children.on("change",this._updateFocusCyclableItems.bind(this)),e.items.on("change",((e,t)=>{const o=t.index,s=Array.from(t.added);for(const e of t.removed)o>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=o;ethis.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!(0,s.zN)(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,o=new s.rw(e.lastChild),i=new s.rw(e);if(!this.cachedPadding){const o=s.Sf.window.getComputedStyle(e),i="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(o[i])}return"ltr"===t?o.right>i.right-this.cachedPadding:o.left{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new dt),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,o=Rt(e);return o.class="ck-toolbar__grouped-dropdown",o.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",jt(o,this.groupedItems),o.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:N.Pt.threeVerticalDots}),o}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{J(e)&&this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class wt extends V{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",(e=>!e))],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class vt extends V{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class yt extends V{labelView;items;children;constructor(e,t=new fe){super(e);const o=this.bindTemplate,s=new Ct(e);this.set({label:"",isVisible:!0}),this.labelView=t,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,s]),s.set({role:"group",ariaLabelledBy:t.id}),s.focusTracker.destroy(),s.keystrokes.destroy(),this.items=s.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",o.if("isVisible","ck-hidden",(e=>!e))]},children:this.children})}focus(){if(this.items){const e=this.items.find((e=>!(e instanceof vt)));e&&e.focus()}}}var xt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css"),At={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(xt.A,At);xt.A.locals;class Ct extends V{focusables;items;focusTracker;keystrokes;_focusCycler;_listItemGroupToChangeListeners=new WeakMap;constructor(e){super(e);const t=this.bindTemplate;this.focusables=new i,this.items=this.createCollection(),this.focusTracker=new s.$x,this.keystrokes=new s.EP,this._focusCycler=new G({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const e of this.items)e instanceof yt?this._registerFocusableItemsGroup(e):e instanceof wt&&this._registerFocusableListItem(e);this.items.on("change",((e,t)=>{for(const e of t.removed)e instanceof yt?this._deregisterFocusableItemsGroup(e):e instanceof wt&&this._deregisterFocusableListItem(e);for(const e of Array.from(t.added).reverse())e instanceof yt?this._registerFocusableItemsGroup(e,t.index):this._registerFocusableListItem(e,t.index)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_registerFocusableListItem(e,t){this.focusTracker.add(e.element),this.focusables.add(e,t)}_deregisterFocusableListItem(e){this.focusTracker.remove(e.element),this.focusables.remove(e)}_getOnGroupItemsChangeCallback(e){return(t,o)=>{for(const e of o.removed)this._deregisterFocusableListItem(e);for(const t of Array.from(o.added).reverse())this._registerFocusableListItem(t,this.items.getIndex(e)+o.index)}}_registerFocusableItemsGroup(e,t){Array.from(e.items).forEach(((e,o)=>{const s=void 0!==t?t+o:void 0;this._registerFocusableListItem(e,s)}));const o=this._getOnGroupItemsChangeCallback(e);this._listItemGroupToChangeListeners.set(e,o),e.items.on("change",o)}_deregisterFocusableItemsGroup(e){for(const t of e.items)this._deregisterFocusableListItem(t);e.items.off("change",this._listItemGroupToChangeListeners.get(e)),this._listItemGroupToChangeListeners.delete(e)}}var Tt=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css"),Et={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Tt.A,Et);Tt.A.locals;class Pt extends V{children;actionView;arrowView;keystrokes;focusTracker;constructor(e,t){super(e);const o=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(t),this.arrowView=this._createArrowView(),this.keystrokes=new s.EP,this.focusTracker=new s.$x,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",o.to("class"),o.if("isVisible","ck-hidden",(e=>!e)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())})),this.keystrokes.set("arrowleft",((e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(e){const t=e||new q;return e||t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const e=new q,t=e.bindTemplate;return e.icon=Pe,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}var St=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css"),Mt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(St.A,Mt);St.A.locals;var Ot=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css"),Vt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ot.A,Vt);Ot.A.locals;function Rt(e,t=lt){const o="function"==typeof t?new t(e):t,i=new nt(e),n=new ct(e,o,i);return o.bind("isEnabled").to(n),o instanceof Pt?o.arrowView.bind("isOn").to(n,"isOpen"):o.bind("isOn").to(n,"isOpen"),function(e){(function(e){e.on("render",(()=>{R({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:()=>[e.element,...e.focusTracker._elements]})}))})(e),function(e){e.on("execute",(t=>{t.source instanceof Ce||(e.isOpen=!1)}))}(e),function(e){e.focusTracker.on("change:isFocused",((t,o,s)=>{e.isOpen&&!s&&(e.isOpen=!1)}))}(e),function(e){e.keystrokes.set("arrowdown",((t,o)=>{e.isOpen&&(e.panelView.focus(),o())})),e.keystrokes.set("arrowup",((t,o)=>{e.isOpen&&(e.panelView.focusLast(),o())}))}(e),function(e){e.on("change:isOpen",((t,o,i)=>{if(i)return;const n=e.panelView.element;n&&n.contains(s.Sf.document.activeElement)&&e.buttonView.focus()}))}(e),function(e){e.on("change:isOpen",((t,o,s)=>{s&&e.panelView.focus()}),{priority:"low"})}(e)}(n),n}function jt(e,t,o={}){e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.isOpen?It(e,t,o):e.once("change:isOpen",(()=>It(e,t,o)),{priority:"highest"}),o.enableActiveItemFocusOnDropdownOpen&&Nt(e,(()=>e.toolbarView.items.find((e=>e.isOn))))}function It(e,t,o){const s=e.locale,n=s.t,r=e.toolbarView=new gt(s),a="function"==typeof t?t():t;r.ariaLabel=o.ariaLabel||n("Dropdown toolbar"),o.maxWidth&&(r.maxWidth=o.maxWidth),o.class&&(r.class=o.class),o.isCompact&&(r.isCompact=o.isCompact),o.isVertical&&(r.isVertical=!0),a instanceof i?r.items.bindTo(a).using((e=>e)):r.items.addMany(a),e.panelView.children.add(r),r.items.delegate("execute").to(e)}function Bt(e,t,o={}){e.isOpen?Dt(e,t,o):e.once("change:isOpen",(()=>Dt(e,t,o)),{priority:"highest"}),Nt(e,(()=>e.listView.items.find((e=>e instanceof wt&&e.children.first.isOn))))}function Dt(e,t,o){const s=e.locale,i=e.listView=new Ct(s),n="function"==typeof t?t():t;i.ariaLabel=o.ariaLabel,i.role=o.role,Ft(e,i.items,n,s),e.panelView.children.add(i),i.items.delegate("execute").to(e)}function Nt(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const o=t();o&&("function"==typeof o.focus?o.focus():(0,s.FF)("ui-dropdown-focus-child-on-open-child-missing-focus",{view:o}))}),{priority:s.vx.low-10})}function Ft(e,t,o,s){t.bindTo(o).using((t=>{if("separator"===t.type)return new vt(s);if("group"===t.type){const o=new yt(s);return o.set({label:t.label}),Ft(e,o.items,t.items,s),o.items.delegate("execute").to(e),o}if("button"===t.type||"switchbutton"===t.type){const e=new wt(s);let o;return"button"===t.type?(o=new q(s),o.bind("ariaChecked").to(o,"isOn")):o=new Ce(s),o.bind(...Object.keys(t.model)).to(t.model),o.delegate("execute").to(e),e.children.add(o),e}return null}))}const Lt=(e,t,o)=>{const s=new Qe(e.locale);return s.set({id:t,ariaDescribedById:o}),s.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),s.bind("hasError").to(e,"errorText",(e=>!!e)),s.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(s),s},zt=(e,t,o)=>{const s=new et(e.locale);return s.set({id:t,ariaDescribedById:o,inputMode:"numeric"}),s.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),s.bind("hasError").to(e,"errorText",(e=>!!e)),s.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(s),s},Ht=(e,t,o)=>{const s=new st(e.locale);return s.set({id:t,ariaDescribedById:o}),s.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),s.bind("hasError").to(e,"errorText",(e=>!!e)),s.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(s),s},$t=(e,t,o)=>{const s=Rt(e.locale);return s.set({id:t,ariaDescribedById:o}),s.bind("isEnabled").to(e),s},Wt=(e,t=0,o=1)=>e>o?o:eMath.round(o*e)/o,Ut=(Math.PI,e=>("#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?qt(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?qt(parseInt(e.substring(6,8),16)/255,2):1})),Kt=({h:e,s:t,v:o,a:s})=>{const i=(200-t)*o/100;return{h:qt(e),s:qt(i>0&&i<200?t*o/100/(i<=100?i:200-i)*100:0),l:qt(i/2),a:qt(s,2)}},Yt=e=>{const{h:t,s:o,l:s}=Kt(e);return`hsl(${t}, ${o}%, ${s}%)`},Gt=({h:e,s:t,v:o,a:s})=>{e=e/360*6,t/=100,o/=100;const i=Math.floor(e),n=o*(1-t),r=o*(1-(e-i)*t),a=o*(1-(1-e+i)*t),c=i%6;return{r:qt(255*[o,r,n,n,a,o][c]),g:qt(255*[a,o,o,r,n,n][c]),b:qt(255*[n,n,a,o,o,r][c]),a:qt(s,2)}},Zt=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},Jt=({r:e,g:t,b:o,a:s})=>{const i=s<1?Zt(qt(255*s)):"";return"#"+Zt(e)+Zt(t)+Zt(o)+i},Xt=({r:e,g:t,b:o,a:s})=>{const i=Math.max(e,t,o),n=i-Math.min(e,t,o),r=n?i===e?(t-o)/n:i===t?2+(o-e)/n:4+(e-t)/n:0;return{h:qt(60*(r<0?r+6:r)),s:qt(i?n/i*100:0),v:qt(i/255*100),a:s}},Qt=(e,t)=>{if(e===t)return!0;for(const o in e)if(e[o]!==t[o])return!1;return!0},eo={},to=e=>{let t=eo[e];return t||(t=document.createElement("template"),t.innerHTML=e,eo[e]=t),t},oo=(e,t,o)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))};let so=!1;const io=e=>"touches"in e,no=(e,t)=>{const o=io(t)?t.touches[0]:t,s=e.el.getBoundingClientRect();oo(e.el,"move",e.getMove({x:Wt((o.pageX-(s.left+window.pageXOffset))/s.width),y:Wt((o.pageY-(s.top+window.pageYOffset))/s.height)}))};class ro{constructor(e,t,o,s){const i=to(`
`);e.appendChild(i.content.cloneNode(!0));const n=e.querySelector(`[part=${t}]`);n.addEventListener("mousedown",this),n.addEventListener("touchstart",this),n.addEventListener("keydown",this),this.el=n,this.xy=s,this.nodes=[n.firstChild,n]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(so?"touchmove":"mousemove",this),t(so?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!(e=>!(so&&!io(e)||(so||(so=io(e)),0)))(e)||!so&&0!=e.button)return;this.el.focus(),no(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),no(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((e,t)=>{const o=t.keyCode;o>40||e.xy&&o<37||o<33||(t.preventDefault(),oo(e.el,"move",e.getMove({x:39===o?.01:37===o?-.01:34===o?.05:33===o?-.05:35===o?1:36===o?-1:0,y:40===o?.01:38===o?-.01:0},!0)))})(this,e)}}style(e){e.forEach(((e,t)=>{for(const o in e)this.nodes[t].style.setProperty(o,e[o])}))}}class ao extends ro{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:e/360*100+"%",color:Yt({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${qt(e)}`)}getMove(e,t){return{h:t?Wt(this.h+360*e.x,0,360):360*e.x}}}class co extends ro{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:100-e.v+"%",left:`${e.s}%`,color:Yt(e)},{"background-color":Yt({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${qt(e.s)}%, Brightness ${qt(e.v)}%`)}getMove(e,t){return{s:t?Wt(this.hsva.s+100*e.x,0,100):100*e.x,v:t?Wt(this.hsva.v-100*e.y,0,100):Math.round(100-100*e.y)}}}const lo=Symbol("same"),ho=Symbol("color"),uo=Symbol("hsva"),po=Symbol("update"),mo=Symbol("parts"),fo=Symbol("css"),go=Symbol("sliders");class _o extends HTMLElement{static get observedAttributes(){return["color"]}get[fo](){return[':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[go](){return[co,ao]}get color(){return this[ho]}set color(e){if(!this[lo](e)){const t=this.colorModel.toHsva(e);this[po](t),this[ho]=e}}constructor(){super();const e=to(``),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[mo]=this[go].map((e=>new e(t)))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,o){const s=this.colorModel.fromAttr(o);this[lo](s)||(this.color=s)}handleEvent(e){const t=this[uo],o={...t,...e.detail};let s;this[po](o),Qt(o,t)||this[lo](s=this.colorModel.fromHsva(o))||(this[ho]=s,oo(this,"color-changed",{value:s}))}[lo](e){return this.color&&this.colorModel.equal(e,this.color)}[po](e){this[uo]=e,this[mo].forEach((t=>t.update(e)))}}const bo={defaultColor:"#000",toHsva:e=>Xt(Ut(e)),fromHsva:({h:e,s:t,v:o})=>Jt(Gt({h:e,s:t,v:o,a:1})),equal:(e,t)=>e.toLowerCase()===t.toLowerCase()||Qt(Ut(e),Ut(t)),fromAttr:e=>e};class ko extends _o{get colorModel(){return bo}}var wo=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorpicker/colorpicker.css"),vo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(wo.A,vo);wo.A.locals;class yo extends V{hexInputRow;_debounceColorPickerEvent;_config;constructor(e,t={}){super(e),this.set({color:"",_hexColor:""}),this.hexInputRow=this._createInputRow();const o=this.createCollection();t.hideInput||o.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:o}),this._config=t,this._debounceColorPickerEvent=(0,qe.A)((e=>{this.set("color",e),this.fire("colorSelected",{color:this.color})}),150,{leading:!0}),this.on("set:color",((e,t,o)=>{e.return=$e(o,this._config.format||"hsl")})),this.on("change:color",(()=>{this._hexColor=xo(this.color)})),this.on("change:_hexColor",(()=>{document.activeElement!==this.picker&&this.picker.setAttribute("color",this._hexColor),xo(this.color)!=xo(this._hexColor)&&(this.color=this._hexColor)}))}render(){var e,t;if(super.render(),e="hex-color-picker",t=ko,void 0===customElements.get(e)&&customElements.define(e,t),this.picker=s.Sf.document.createElement("hex-color-picker"),this.picker.setAttribute("class","hex-color-picker"),this.picker.setAttribute("tabindex","-1"),this._createSlidersView(),this.element){this.hexInputRow.element?this.element.insertBefore(this.picker,this.hexInputRow.element):this.element.appendChild(this.picker);const e=document.createElement("style");e.textContent='[role="slider"]:focus [part$="pointer"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}',this.picker.shadowRoot.appendChild(e)}this.picker.addEventListener("color-changed",(e=>{const t=e.detail.value;this._debounceColorPickerEvent(t)}))}focus(){if(!this._config.hideInput&&(s._K.isGecko||s._K.isiOS||s._K.isSafari)){this.hexInputRow.children.get(1).focus()}this.slidersView.first.focus()}_createSlidersView(){const e=[...this.picker.shadowRoot.children].filter((e=>"slider"===e.getAttribute("role"))).map((e=>new Ao(e)));this.slidersView=this.createCollection(),e.forEach((e=>{this.slidersView.add(e)}))}_createInputRow(){const e=this._createColorInput();return new To(this.locale,e)}_createColorInput(){const e=new Ye(this.locale,Lt),{t}=this.locale;return e.set({label:t("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",(t=>e.isFocused?e.fieldView.value:t.startsWith("#")?t.substring(1):t)),e.fieldView.on("input",(()=>{const t=e.fieldView.element.value;if(t){const e=Eo(t);e&&this._debounceColorPickerEvent(e)}})),e}isValid(){const{t:e}=this.locale;return this.resetValidationStatus(),!!this.hexInputRow.getParsedColor()||(this.hexInputRow.inputView.errorText=e('Please enter a valid color (e.g. "ff0000").'),!1)}resetValidationStatus(){this.hexInputRow.inputView.errorText=null}}function xo(e){let t=function(e){if(!e)return"";const t=We(e);return t?"hex"===t.space?t.hexValue:$e(e,"hex"):"#000"}(e);return t||(t="#000"),4===t.length&&(t="#"+[t[1],t[1],t[2],t[2],t[3],t[3]].join("")),t.toLowerCase()}class Ao extends V{constructor(e){super(),this.element=e}focus(){this.element.focus()}}class Co extends V{constructor(e){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class To extends V{children;inputView;constructor(e,t){super(e),this.inputView=t,this.children=this.createCollection([new Co,this.inputView]),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}getParsedColor(){return Eo(this.inputView.fieldView.element.value)}}function Eo(e){if(!e)return null;const t=e.trim().replace(/^#/,"");return[3,4,6,8].includes(t.length)&&/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test(t)?`#${t}`:null}class Po extends((0,s.VM)(s.pM)){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(e,t){return this.find((t=>t.color===e.color))?this:super.add(e,t)}hasColor(e){return!!this.find((t=>t.color===e))}}class So extends V{items;colorDefinitions;focusTracker;columns;documentColors;documentColorsCount;staticColorsGrid;documentColorsGrid;colorPickerButtonView;removeColorButtonView;_focusables;_documentColorsLabel;_removeButtonLabel;_colorPickerLabel;constructor(e,{colors:t,columns:o,removeButtonLabel:s,documentColorsLabel:i,documentColorsCount:n,colorPickerLabel:r,focusTracker:a,focusables:c}){super(e);const l=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=a,this.items=this.createCollection(),this.colorDefinitions=t,this.columns=o,this.documentColors=new Po,this.documentColorsCount=n,this._focusables=c,this._removeButtonLabel=s,this._colorPickerLabel=r,this._documentColorsLabel=i,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-fragment",l.if("isVisible","ck-hidden",(e=>!e))]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,t){const o=e.document,s=this.documentColorsCount;this.documentColors.clear();for(const i of o.getRoots()){const o=e.createRangeIn(i);for(const e of o.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=s))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,o=this.selectedColor;t.selectedColor=o,e&&(e.selectedColor=o)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=a.bind(this.documentColors,this.documentColors),t=new fe(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}this._createColorPickerButton(),this._addColorSelectorElementsToFocusTracker()}focus(){this.removeColorButtonView.focus()}destroy(){super.destroy()}addColorPickerButton(){this.colorPickerButtonView&&(this.items.add(this.colorPickerButtonView),this.focusTracker.add(this.colorPickerButtonView.element),this._focusables.add(this.colorPickerButtonView))}_addColorSelectorElementsToFocusTracker(){this.focusTracker.add(this.removeColorButtonView.element),this._focusables.add(this.removeColorButtonView),this.staticColorsGrid&&(this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid)),this.documentColorsGrid&&(this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid))}_createColorPickerButton(){this.colorPickerButtonView=new q,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:N.Pt.colorPalette,class:"ck-color-selector__color-picker"}),this.colorPickerButtonView.on("execute",(()=>{this.fire("colorPicker:show")}))}_createRemoveColorButton(){const e=new q;return e.set({withText:!0,icon:N.Pt.eraser,label:this._removeButtonLabel}),e.class="ck-color-selector__remove-color",e.on("execute",(()=>{this.fire("execute",{value:null,source:"removeColorButton"})})),e.render(),e}_createStaticColorsGrid(){const e=new Ne(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",((e,t)=>{this.fire("execute",{value:t.value,source:"staticColorsGrid"})})),e}_createDocumentColorsGrid(){const e=a.bind(this.documentColors,this.documentColors),t=new Ne(this.locale,{columns:this.columns});return t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using((e=>{const t=new Ie;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",(()=>{this.fire("execute",{value:e.color,source:"documentColorsGrid"})})),t})),this.documentColors.on("change:isEmpty",((e,o,s)=>{s&&(t.selectedColor=null)})),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find((t=>t.color===e));t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class Mo extends V{items;colorPickerView;saveButtonView;cancelButtonView;actionBarView;focusTracker;keystrokes;_focusables;_colorPickerViewConfig;constructor(e,{focusTracker:t,focusables:o,keystrokes:s,colorPickerViewConfig:i}){super(e),this.items=this.createCollection(),this.focusTracker=t,this.keystrokes=s,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=o,this._colorPickerViewConfig=i;const n=this.bindTemplate,{saveButtonView:r,cancelButtonView:a}=this._createActionButtons();this.saveButtonView=r,this.cancelButtonView=a,this.actionBarView=this._createActionBarView({saveButtonView:r,cancelButtonView:a}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-fragment",n.if("isVisible","ck-hidden",(e=>!e))]},children:this.items})}render(){super.render();const e=new yo(this.locale,{...this._colorPickerViewConfig});this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",((t,o,s)=>{e.color=s})),this.items.add(this.colorPickerView),this.items.add(this.actionBarView),this._addColorPickersElementsToFocusTracker(),this._stopPropagationOnArrowsKeys(),this._executeOnEnterPress(),this._executeUponColorChange()}destroy(){super.destroy()}focus(){this.colorPickerView.focus()}resetValidationStatus(){this.colorPickerView.resetValidationStatus()}_executeOnEnterPress(){this.keystrokes.set("enter",(e=>{this.isVisible&&this.focusTracker.focusedElement!==this.cancelButtonView.element&&this.colorPickerView.isValid()&&(this.fire("execute",{value:this.selectedColor}),e.stopPropagation(),e.preventDefault())}))}_stopPropagationOnArrowsKeys(){const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const e of this.colorPickerView.slidersView)this.focusTracker.add(e.element),this._focusables.add(e);const e=this.colorPickerView.hexInputRow.children.get(1);e.element&&(this.focusTracker.add(e.element),this._focusables.add(e)),this.focusTracker.add(this.saveButtonView.element),this._focusables.add(this.saveButtonView),this.focusTracker.add(this.cancelButtonView.element),this._focusables.add(this.cancelButtonView)}_createActionBarView({saveButtonView:e,cancelButtonView:t}){const o=new V,s=this.createCollection();return s.add(e),s.add(t),o.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector_action-bar"]},children:s}),o}_createActionButtons(){const e=this.locale,t=e.t,o=new q(e),s=new q(e);return o.set({icon:N.Pt.check,class:"ck-button-save",type:"button",withText:!1,label:t("Accept")}),s.set({icon:N.Pt.cancel,class:"ck-button-cancel",type:"button",withText:!1,label:t("Cancel")}),o.on("execute",(()=>{this.colorPickerView.isValid()&&this.fire("execute",{source:"colorPickerSaveButton",value:this.selectedColor})})),s.on("execute",(()=>{this.fire("colorPicker:cancel")})),{saveButtonView:o,cancelButtonView:s}}_executeUponColorChange(){this.colorPickerView.on("colorSelected",((e,t)=>{this.fire("execute",{value:t.color,source:"colorPicker"}),this.set("selectedColor",t.color)}))}}var Oo=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorselector/colorselector.css"),Vo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Oo.A,Vo);Oo.A.locals;class Ro extends V{focusTracker;keystrokes;items;colorGridsFragmentView;colorPickerFragmentView;_focusCycler;_focusables;_colorPickerViewConfig;constructor(e,{colors:t,columns:o,removeButtonLabel:n,documentColorsLabel:r,documentColorsCount:a,colorPickerLabel:c,colorPickerViewConfig:l}){super(e),this.items=this.createCollection(),this.focusTracker=new s.$x,this.keystrokes=new s.EP,this._focusables=new i,this._colorPickerViewConfig=l,this._focusCycler=new G({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsFragmentView=new So(e,{colors:t,columns:o,removeButtonLabel:n,documentColorsLabel:r,documentColorsCount:a,colorPickerLabel:c,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerFragmentView=new Mo(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerViewConfig:l}),this.set("_isColorGridsFragmentVisible",!0),this.set("_isColorPickerFragmentVisible",!1),this.set("selectedColor",void 0),this.colorGridsFragmentView.bind("isVisible").to(this,"_isColorGridsFragmentVisible"),this.colorPickerFragmentView.bind("isVisible").to(this,"_isColorPickerFragmentVisible"),this.on("change:selectedColor",((e,t,o)=>{this.colorGridsFragmentView.set("selectedColor",o),this.colorPickerFragmentView.set("selectedColor",o)})),this.colorGridsFragmentView.on("change:selectedColor",((e,t,o)=>{this.set("selectedColor",o)})),this.colorPickerFragmentView.on("change:selectedColor",((e,t,o)=>{this.set("selectedColor",o)})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector"]},children:this.items})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendUI(){this._appendColorGridsFragment(),this._colorPickerViewConfig&&this._appendColorPickerFragment()}showColorPickerFragment(){this.colorPickerFragmentView.colorPickerView&&!this._isColorPickerFragmentVisible&&(this._isColorPickerFragmentVisible=!0,this.colorPickerFragmentView.focus(),this.colorPickerFragmentView.resetValidationStatus(),this._isColorGridsFragmentVisible=!1)}showColorGridsFragment(){this._isColorGridsFragmentVisible||(this._isColorGridsFragmentVisible=!0,this.colorGridsFragmentView.focus(),this._isColorPickerFragmentVisible=!1)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}updateDocumentColors(e,t){this.colorGridsFragmentView.updateDocumentColors(e,t)}updateSelectedColors(){this.colorGridsFragmentView.updateSelectedColors()}_appendColorGridsFragment(){this.items.length||(this.items.add(this.colorGridsFragmentView),this.colorGridsFragmentView.delegate("execute").to(this),this.colorGridsFragmentView.delegate("colorPicker:show").to(this))}_appendColorPickerFragment(){2!==this.items.length&&(this.items.add(this.colorPickerFragmentView),this.colorGridsFragmentView.colorPickerButtonView&&this.colorGridsFragmentView.colorPickerButtonView.on("execute",(()=>{this.showColorPickerFragment()})),this.colorGridsFragmentView.addColorPickerButton(),this.colorPickerFragmentView.delegate("execute").to(this),this.colorPickerFragmentView.delegate("colorPicker:cancel").to(this))}}class jo{editor;_components=new Map;constructor(e){this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(Io(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new s.Yb("componentfactory-item-missing",this,{name:e});return this._components.get(Io(e)).callback(this.editor.locale)}has(e){return this._components.has(Io(e))}}function Io(e){return String(e).toLowerCase()}var Bo=o("./node_modules/lodash-es/isElement.js"),Do=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css"),No={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Do.A,No);Do.A.locals;const Fo=(0,s.To)("px"),Lo={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}};class zo extends V{content;_pinWhenIsVisibleCallback;constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",Fo),left:t.to("left",Fo)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=zo.defaultPositions,o=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:s.Sf.document.body,fitInViewport:!0},e),i=zo._getOptimalPosition(o)||Lo,n=parseInt(i.left),r=parseInt(i.top),a=i.name,c=i.config||{},{withArrow:l=!0}=c;this.top=r,this.left=n,this.position=a,this.withArrow=l}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=Ho(e.target),o=e.limiter?Ho(e.limiter):s.Sf.document.body;this.listenTo(s.Sf.document,"scroll",((s,i)=>{const n=i.target,r=t&&n.contains(t),a=o&&n.contains(o);!r&&!a&&t&&o||this.attachTo(e)}),{useCapture:!0}),this.listenTo(s.Sf.window,"resize",(()=>{this.attachTo(e)}))}_stopPinning(){this.stopListening(s.Sf.document,"scroll"),this.stopListening(s.Sf.window,"resize")}static generatePositions(e={}){const{sideOffset:t=zo.arrowSideOffset,heightOffset:o=zo.arrowHeightOffset,stickyVerticalOffset:s=zo.stickyVerticalOffset,config:i}=e;return{northWestArrowSouthWest:(e,o)=>({top:n(e,o),left:e.left-t,name:"arrow_sw",...i&&{config:i}}),northWestArrowSouthMiddleWest:(e,o)=>({top:n(e,o),left:e.left-.25*o.width-t,name:"arrow_smw",...i&&{config:i}}),northWestArrowSouth:(e,t)=>({top:n(e,t),left:e.left-t.width/2,name:"arrow_s",...i&&{config:i}}),northWestArrowSouthMiddleEast:(e,o)=>({top:n(e,o),left:e.left-.75*o.width+t,name:"arrow_sme",...i&&{config:i}}),northWestArrowSouthEast:(e,o)=>({top:n(e,o),left:e.left-o.width+t,name:"arrow_se",...i&&{config:i}}),northArrowSouthWest:(e,o)=>({top:n(e,o),left:e.left+e.width/2-t,name:"arrow_sw",...i&&{config:i}}),northArrowSouthMiddleWest:(e,o)=>({top:n(e,o),left:e.left+e.width/2-.25*o.width-t,name:"arrow_smw",...i&&{config:i}}),northArrowSouth:(e,t)=>({top:n(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...i&&{config:i}}),northArrowSouthMiddleEast:(e,o)=>({top:n(e,o),left:e.left+e.width/2-.75*o.width+t,name:"arrow_sme",...i&&{config:i}}),northArrowSouthEast:(e,o)=>({top:n(e,o),left:e.left+e.width/2-o.width+t,name:"arrow_se",...i&&{config:i}}),northEastArrowSouthWest:(e,o)=>({top:n(e,o),left:e.right-t,name:"arrow_sw",...i&&{config:i}}),northEastArrowSouthMiddleWest:(e,o)=>({top:n(e,o),left:e.right-.25*o.width-t,name:"arrow_smw",...i&&{config:i}}),northEastArrowSouth:(e,t)=>({top:n(e,t),left:e.right-t.width/2,name:"arrow_s",...i&&{config:i}}),northEastArrowSouthMiddleEast:(e,o)=>({top:n(e,o),left:e.right-.75*o.width+t,name:"arrow_sme",...i&&{config:i}}),northEastArrowSouthEast:(e,o)=>({top:n(e,o),left:e.right-o.width+t,name:"arrow_se",...i&&{config:i}}),southWestArrowNorthWest:e=>({top:r(e),left:e.left-t,name:"arrow_nw",...i&&{config:i}}),southWestArrowNorthMiddleWest:(e,o)=>({top:r(e),left:e.left-.25*o.width-t,name:"arrow_nmw",...i&&{config:i}}),southWestArrowNorth:(e,t)=>({top:r(e),left:e.left-t.width/2,name:"arrow_n",...i&&{config:i}}),southWestArrowNorthMiddleEast:(e,o)=>({top:r(e),left:e.left-.75*o.width+t,name:"arrow_nme",...i&&{config:i}}),southWestArrowNorthEast:(e,o)=>({top:r(e),left:e.left-o.width+t,name:"arrow_ne",...i&&{config:i}}),southArrowNorthWest:e=>({top:r(e),left:e.left+e.width/2-t,name:"arrow_nw",...i&&{config:i}}),southArrowNorthMiddleWest:(e,o)=>({top:r(e),left:e.left+e.width/2-.25*o.width-t,name:"arrow_nmw",...i&&{config:i}}),southArrowNorth:(e,t)=>({top:r(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...i&&{config:i}}),southArrowNorthMiddleEast:(e,o)=>({top:r(e),left:e.left+e.width/2-.75*o.width+t,name:"arrow_nme",...i&&{config:i}}),southArrowNorthEast:(e,o)=>({top:r(e),left:e.left+e.width/2-o.width+t,name:"arrow_ne",...i&&{config:i}}),southEastArrowNorthWest:e=>({top:r(e),left:e.right-t,name:"arrow_nw",...i&&{config:i}}),southEastArrowNorthMiddleWest:(e,o)=>({top:r(e),left:e.right-.25*o.width-t,name:"arrow_nmw",...i&&{config:i}}),southEastArrowNorth:(e,t)=>({top:r(e),left:e.right-t.width/2,name:"arrow_n",...i&&{config:i}}),southEastArrowNorthMiddleEast:(e,o)=>({top:r(e),left:e.right-.75*o.width+t,name:"arrow_nme",...i&&{config:i}}),southEastArrowNorthEast:(e,o)=>({top:r(e),left:e.right-o.width+t,name:"arrow_ne",...i&&{config:i}}),westArrowEast:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.left-t.width-o,name:"arrow_e",...i&&{config:i}}),eastArrowWest:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.right+o,name:"arrow_w",...i&&{config:i}}),viewportStickyNorth:(e,t,o,n)=>{const r=n||o;return e.getIntersection(r)?r.height-e.height>s?null:{top:r.top+s,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...i}}:null}};function n(e,t){return e.top-t.height-o}function r(e){return e.bottom+o}}static arrowSideOffset=25;static arrowHeightOffset=10;static stickyVerticalOffset=20;static _getOptimalPosition=s.W;static defaultPositions=zo.generatePositions()}function Ho(e){return(0,Bo.A)(e)?e:(0,s._Z)(e)?e.commonAncestorContainer:"function"==typeof e?Ho(e()):null}var $o=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css"),Wo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()($o.A,Wo);$o.A.locals;const qo="ck-tooltip";class Uo extends((0,s.c5)()){tooltipTextView;balloonPanelView;static defaultBalloonPositions=zo.generatePositions({heightOffset:5,sideOffset:13});_currentElementWithTooltip=null;_currentTooltipPosition=null;_resizeObserver=null;_mutationObserver=null;_pinTooltipDebounced;_unpinTooltipDebounced;_watchdogExcluded;static _editors=new Set;static _instance=null;constructor(e){if(super(),Uo._editors.add(e),Uo._instance)return Uo._instance;Uo._instance=this,this.tooltipTextView=new V(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new zo(e.locale),this.balloonPanelView.class=qo,this.balloonPanelView.content.add(this.tooltipTextView),this._mutationObserver=function(e){const t=new MutationObserver((()=>{e()}));return{attach(e){t.observe(e,{attributes:!0,attributeFilter:["data-cke-tooltip-text","data-cke-tooltip-position"]})},detach(){t.disconnect()}}}((()=>{this._updateTooltipPosition()})),this._pinTooltipDebounced=(0,qe.A)(this._pinTooltip,600),this._unpinTooltipDebounced=(0,qe.A)(this._unpinTooltip,400),this.listenTo(s.Sf.document,"keydown",this._onKeyDown.bind(this),{useCapture:!0}),this.listenTo(s.Sf.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(s.Sf.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(s.Sf.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(s.Sf.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(s.Sf.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;Uo._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),Uo._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Uo._instance=null)}static getPositioningFunctions(e){const t=Uo.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onKeyDown(e,t){"Escape"===t.key&&this._currentElementWithTooltip&&(this._unpinTooltip(),t.stopPropagation())}_onEnterOrFocus(e,{target:t}){const o=Ko(t);o?o!==this._currentElementWithTooltip&&(this._unpinTooltip(),"focus"!==e.name||o.matches(":hover")?this._pinTooltipDebounced(o,Yo(o)):this._pinTooltip(o,Yo(o))):"focus"===e.name&&this._unpinTooltip()}_onLeaveOrBlur(e,{target:t,relatedTarget:o}){if("mouseleave"===e.name){if(!(0,Bo.A)(t))return;const e=this.balloonPanelView.element,s=e&&(e===o||e.contains(o)),i=!s&&t===e;if(s)return void this._unpinTooltipDebounced.cancel();if(!i&&this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const n=Ko(t),r=Ko(o);(i||n&&n!==r)&&this._unpinTooltipDebounced()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltipDebounced()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:o,cssClass:i}){this._unpinTooltip();const n=(0,s.$1)(Uo._editors.values()).ui.view.body;n.has(this.balloonPanelView)||n.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.class=[qo,i].filter((e=>e)).join(" "),this.balloonPanelView.pin({target:e,positions:Uo.getPositioningFunctions(o)}),this._resizeObserver=new s.tb(e,(()=>{(0,s.zN)(e)||this._unpinTooltip()})),this._mutationObserver.attach(e);for(const e of Uo._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=o}_unpinTooltip(){this._unpinTooltipDebounced.cancel(),this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of Uo._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this.tooltipTextView.text="",this._resizeObserver&&this._resizeObserver.destroy(),this._mutationObserver.detach()}_updateTooltipPosition(){if(!this._currentElementWithTooltip)return;const e=Yo(this._currentElementWithTooltip);(0,s.zN)(this._currentElementWithTooltip)&&e.text?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Uo.getPositioningFunctions(e.position)}):this._unpinTooltip()}}function Ko(e){return(0,Bo.A)(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}function Yo(e){return{text:e.dataset.ckeTooltipText,position:e.dataset.ckeTooltipPosition||"s",cssClass:e.dataset.ckeTooltipClass||""}}var Go=o("./node_modules/lodash-es/throttle.js");const Zo=50,Jo=350,Xo="Powered by";class Qo extends((0,s.c5)()){editor;_balloonView;_showBalloonThrottled;_lastFocusedEditableElement;constructor(e){super(),this.editor=e,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=(0,Go.A)(this._showBalloon.bind(this),50,{leading:!0}),e.on("ready",this._handleEditorReady.bind(this))}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;(!!e.config.get("ui.poweredBy.forceVisible")||"VALID"!==(0,s.rQ)(e.config.get("licenseKey")))&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",((e,t,o)=>{this._updateLastFocusedEditableElement(),o?this._showBalloon():this._hideBalloon()})),e.ui.focusTracker.on("change:focusedElement",((e,t,o)=>{this._updateLastFocusedEditableElement(),o&&this._showBalloon()})),e.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const e=this.editor,t=this._balloonView=new zo,o=os(e),s=new es(e.locale,o.label);t.content.add(s),t.set({class:"ck-powered-by-balloon"}),e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this._balloonView=t}_showBalloon(){if(!this._lastFocusedEditableElement)return;const e=function(e,t){const o=os(e),s="right"===o.side?function(e,t){return ts(e,t,((e,o)=>e.left+e.width-o.width-t.horizontalOffset))}(t,o):function(e,t){return ts(e,t,(e=>e.left+t.horizontalOffset))}(t,o);return{target:t,positions:[s]}}(this.editor,this._lastFocusedEditableElement);e&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,o=e.ui.focusTracker.focusedElement;if(!t||!o)return void(this._lastFocusedEditableElement=null);const s=Array.from(e.ui.getEditableElementsNames()).map((t=>e.ui.getEditableElement(t)));s.includes(o)?this._lastFocusedEditableElement=o:this._lastFocusedEditableElement=s[0]}}class es extends V{constructor(e,t){super(e);const o=new z,s=this.bindTemplate;o.set({content:'\n',isColorInherited:!1}),o.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],o],on:{dragstart:s.to((e=>e.preventDefault()))}}]})}}function ts(e,t,o){return(i,n)=>{const r=new s.rw(e);if(r.width{for(const e of Object.values(ns))this.announce("",e)}))}announce(e,t=ns.POLITE){const o=this.editor;if(!o.ui.view)return;this.view||(this.view=new as(o.locale),o.ui.view.body.add(this.view));const{politeness:s,isUnsafeHTML:i}="string"==typeof t?{politeness:t}:t;let n=this.view.regionViews.find((e=>e.politeness===s));n||(n=new cs(o,s),this.view.regionViews.add(n)),n.announce({announcement:e,isUnsafeHTML:i})}}class as extends V{regionViews;constructor(e){super(e),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class cs extends V{politeness;_domConverter;_pruneAnnouncementsInterval;constructor(e,t){super(e.locale),this.setTemplate({tag:"div",attributes:{role:"region","aria-live":t,"aria-relevant":"additions"},children:[{tag:"ul",attributes:{class:["ck","ck-aria-live-region-list"]}}]}),e.on("destroy",(()=>{null!==this._pruneAnnouncementsInterval&&(clearInterval(this._pruneAnnouncementsInterval),this._pruneAnnouncementsInterval=null)})),this.politeness=t,this._domConverter=e.data.htmlProcessor.domConverter,this._pruneAnnouncementsInterval=setInterval((()=>{this.element&&this._listElement.firstChild&&this._listElement.firstChild.remove()}),5e3)}announce({announcement:e,isUnsafeHTML:t}){if(!e.trim().length)return;const o=document.createElement("li");t?this._domConverter.setContentOf(o,e):o.innerText=e,this._listElement.appendChild(o)}get _listElement(){return this.element.querySelector("ul")}}class ls extends((0,s.VM)()){editor;componentFactory;focusTracker;tooltipManager;poweredBy;ariaLiveAnnouncer;isReady=!1;_editableElementsMap=new Map;_focusableToolbarDefinitions=[];constructor(e){super();const t=e.editing.view;this.editor=e,this.componentFactory=new jo(e),this.focusTracker=new s.$x,this.tooltipManager=new Uo(e),this.poweredBy=new Qo(e),this.ariaLiveAnnouncer=new rs(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{this.isReady=!0})),this.listenTo(t.document,"layoutChanged",this.update.bind(this)),this.listenTo(t,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const o=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?o():this.once("ready",o)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)})),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const o=e.config.get("toolbar.viewportTopOffset");return o?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:o}):{top:0}}_initFocusTracking(){const e=this.editor,t=e.editing.view;let o,s;e.keystrokes.set("Alt+F10",((e,i)=>{const n=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(n)&&!Array.from(t.domRoots.values()).includes(n)&&(o=n);const r=this._getCurrentFocusedToolbarDefinition();r&&s||(s=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e{const i=this._getCurrentFocusedToolbarDefinition();i&&(o?(o.focus(),o=null):e.editing.view.focus(),i.options.afterBlur&&i.options.afterBlur(),s())}))}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:o,options:i}=t;((0,s.zN)(o.element)||i.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>ds(e)-ds(t))),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:o}}=e;return o&&o(),!!(0,s.zN)(t.element)&&(t.focus(),!0)}_handleScrollToTheSelection(e,t){const o={top:0,bottom:0,left:0,right:0,...this.viewportOffset};t.viewportOffset.top+=o.top,t.viewportOffset.bottom+=o.bottom,t.viewportOffset.left+=o.left,t.viewportOffset.right+=o.right}}function ds(e){const{toolbarView:t,options:o}=e;let i=10;return(0,s.zN)(t.element)&&i--,o.isContextual&&i--,i}var hs=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css"),us={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(hs.A,us);hs.A.locals;class ps extends V{body;constructor(e){super(e),this.body=new ye(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class ms extends ps{top;main;_voiceLabelView;constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new fe;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class fs extends V{name=null;_editingView;_editableElement;_hasExternalElement;constructor(e,t,o){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=o,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change((o=>{const s=e.document.getRoot(t.name);o.addClass(t.isFocused?"ck-focused":"ck-blurred",s),o.removeClass(t.isFocused?"ck-blurred":"ck-focused",s)}))}e.isRenderingInProgress?function o(s){e.once("change:isRenderingInProgress",((e,i,n)=>{n?o(s):t(s)}))}(this):t(this)}}class gs extends fs{_generateLabel;constructor(e,t,o,s={}){super(e,t,o);const i=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=s.label||(()=>i("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const o=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),o)}))}}class _s extends V{constructor(e){super(e);const t=this.bindTemplate;this.setTemplate({tag:"iframe",attributes:{class:["ck","ck-reset_all"],sandbox:"allow-same-origin allow-scripts"},on:{load:t.to("loaded")}})}render(){return new Promise((e=>(this.on("loaded",e),super.render())))}}class bs extends N.HY{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}var ks=o("./node_modules/lodash-es/assignIn.js");class ws extends((0,s.VM)()){constructor(e,t){super(),t&&(0,ks.A)(this,t),e&&this.set(e)}}var vs=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css"),ys={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(vs.A,ys);vs.A.locals;var xs=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css"),As={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(xs.A,As);xs.A.locals;const Cs=(0,s.To)("px");class Ts extends N.k_{positionLimiter;visibleStack;_viewToStack=new Map;_idToStack=new Map;_view=null;_rotatorView=null;_fakePanelsView=null;static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new s.Yb("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const o=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),o.set(e.view,e),this._viewToStack.set(e.view,o),o===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new s.Yb("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new s.Yb("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new zo(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find((t=>t[1]===e))[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new Es(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,o)=>{if(o<2)return"";const s=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[s,o])})),e.buttonNextView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),e.buttonPrevView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),e}_createFakePanelsView(){const e=new Ps(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-1,2):0)),e.listenTo(this.view,"change:top",(()=>e.updatePosition())),e.listenTo(this.view,"change:left",(()=>e.updatePosition())),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:o=!0,singleViewMode:s=!1}){this.view.class=t,this.view.withArrow=o,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),s&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class Es extends V{focusTracker;buttonPrevView;buttonNextView;content;constructor(e){super(e);const t=e.t,o=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new s.$x,this.buttonPrevView=this._createButtonView(t("Previous"),N.Pt.previousArrow),this.buttonNextView=this._createButtonView(t("Next"),N.Pt.nextArrow),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",o.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:o.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const o=new q(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o}}class Ps extends V{content;_balloonPanelView;constructor(e,t){super(e);const o=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",o.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:o.to("top",Cs),left:o.to("left",Cs),width:o.to("width",Cs),height:o.to("height",Cs)}},children:this.content}),this.on("change:numberOfPanels",((e,t,o,s)=>{o>s?this._addPanels(o-s):this._removePanels(s-o),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new V;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:o,height:i}=new s.rw(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:o,height:i})}}}var Ss=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css"),Ms={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ss.A,Ms);Ss.A.locals;const Os=(0,s.To)("px");class Vs extends V{content;contentPanelElement;_contentPanelPlaceholder;constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new a({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",(e=>e?"block":"none")),height:t.to("isSticky",(e=>e?Os(this._contentPanelRect.height):null))}}}).render(),this.contentPanelElement=new a({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",(e=>e?Os(this._contentPanelPlaceholder.getBoundingClientRect().width):null)),top:t.to("_stickyTopOffset",(e=>e?Os(e):e)),bottom:t.to("_stickyBottomOffset",(e=>e?Os(e):e)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this.contentPanelElement]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo(s.Sf.document,"scroll",(()=>{this.checkIfShouldBeSticky()}),{useCapture:!0}),this.listenTo(this,"change:isActive",(()=>{this.checkIfShouldBeSticky()}))}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive)return void this._unstick();const e=new s.rw(this.limiterElement);let t=e.getVisible();if(t){const e=new s.rw(s.Sf.window);e.top+=this.viewportTopOffset,e.height-=this.viewportTopOffset,t=t.getIntersection(e)}if(t&&e.topt.bottom){const o=Math.max(e.bottom-t.bottom,0)+this.limiterBottomOffset;e.bottom-o>e.top+this._contentPanelRect.height?this._stickToBottomOfLimiter(o):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset{this.reset(),this.focus(),this.fire("reset")})),this.resetButtonView.bind("isVisible").to(this.fieldView,"isEmpty",(e=>!e)),this.fieldWrapperChildren.add(this.resetButtonView),this.extendTemplate({attributes:{class:"ck-search__query_with-reset"}}))}reset(){this.fieldView.reset(),this._viewConfig.showResetButton&&(this.resetButtonView.isVisible=!1)}}class js extends V{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,primaryText:"",secondaryText:""}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__info",e.if("isVisible","ck-hidden",(e=>!e))],tabindex:-1},children:[{tag:"span",children:[{text:[e.to("primaryText")]}]},{tag:"span",children:[{text:[e.to("secondaryText")]}]}]})}focus(){this.element.focus()}}class Is extends V{focusTracker;children;_focusCycler;constructor(e){super(e),this.children=this.createCollection(),this.focusTracker=new s.$x,this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__results"],tabindex:-1},children:this.children}),this._focusCycler=new G({focusables:this.children,focusTracker:this.focusTracker})}render(){super.render();for(const e of this.children)this.focusTracker.add(e.element)}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}var Bs=o("./node_modules/lodash-es/escapeRegExp.js"),Ds=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/search/search.css"),Ns={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ds.A,Ns);Ds.A.locals;class Fs extends V{focusTracker;keystrokes;resultsView;filteredView;infoView;queryView;focusCycler;_config;constructor(e,t){super(e),this._config=t,this.filteredView=t.filteredView,this.queryView=this._createSearchTextQueryView(),this.focusTracker=new s.$x,this.keystrokes=new s.EP,this.resultsView=new Is(e),this.children=this.createCollection(),this.focusableChildren=this.createCollection([this.queryView,this.resultsView]),this.set("isEnabled",!0),this.set("resultsCount",0),this.set("totalItemsCount",0),t.infoView&&t.infoView.instance?this.infoView=t.infoView.instance:(this.infoView=new js,this._enableDefaultInfoViewBehavior(),this.on("render",(()=>{this.search("")}))),this.resultsView.children.addMany([this.infoView,this.filteredView]),this.focusCycler=new G({focusables:this.focusableChildren,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.on("search",((e,{resultsCount:t,totalItemsCount:o})=>{this.resultsCount=t,this.totalItemsCount=o})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search",t.class||null],tabindex:"-1"},children:this.children})}render(){super.render(),this.children.addMany([this.queryView,this.resultsView]);const e=e=>e.stopPropagation();for(const e of this.focusableChildren)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}focus(){this.queryView.focus()}reset(){this.queryView.reset(),this.search("")}search(e){const t=e?new RegExp((0,Bs.A)(e),"ig"):null,o=this.filteredView.filter(t);this.fire("search",{query:e,...o})}_createSearchTextQueryView(){const e=new Rs(this.locale,this._config.queryView);return this.listenTo(e.fieldView,"input",(()=>{this.search(e.fieldView.element.value)})),e.on("reset",(()=>this.reset())),e.bind("isEnabled").to(this),e}_enableDefaultInfoViewBehavior(){const e=this.locale.t,t=this.infoView;function o(e,{query:t,resultsCount:o,totalItemsCount:s}){return"function"==typeof e?e(t,o,s):e}this.on("search",((s,i)=>{if(i.resultsCount)t.set({isVisible:!1});else{const s=this._config.infoView&&this._config.infoView.text;let n,r;i.totalItemsCount?s&&s.notFound?(n=s.notFound.primary,r=s.notFound.secondary):(n=e("No results found"),r=""):s&&s.noSearchableItems?(n=s.noSearchableItems.primary,r=s.noSearchableItems.secondary):(n=e("No searchable items"),r=""),t.set({primaryText:o(n,i),secondaryText:o(r,i),isVisible:!0})}}))}}var Ls=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/autocomplete/autocomplete.css"),zs={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ls.A,zs);Ls.A.locals;class Hs extends Fs{_config;constructor(e,t){super(e,t),this._config=t;const o=(0,s.To)("px");this.extendTemplate({attributes:{class:["ck-autocomplete"]}});const i=this.resultsView.bindTemplate;this.resultsView.set("isVisible",!1),this.resultsView.set("_position","s"),this.resultsView.set("_width",0),this.resultsView.extendTemplate({attributes:{class:[i.if("isVisible","ck-hidden",(e=>!e)),i.to("_position",(e=>`ck-search__results_${e}`))],style:{width:i.to("_width",o)}}}),this.focusTracker.on("change:isFocused",((e,o,s)=>{this._updateResultsVisibility(),s?this.resultsView.element.scrollTop=0:t.resetOnBlur&&this.queryView.reset()})),this.on("search",(()=>{this._updateResultsVisibility(),this._updateResultsViewWidthAndPosition()})),this.keystrokes.set("esc",((e,t)=>{this.resultsView.isVisible&&(this.queryView.focus(),this.resultsView.isVisible=!1,t())})),this.listenTo(s.Sf.document,"scroll",(()=>{this._updateResultsViewWidthAndPosition()})),this.on("change:isEnabled",(()=>{this._updateResultsVisibility()})),this.filteredView.on("execute",((e,{value:t})=>{this.focus(),this.reset(),this.queryView.fieldView.value=this.queryView.fieldView.element.value=t,this.resultsView.isVisible=!1})),this.resultsView.on("change:isVisible",(()=>{this._updateResultsViewWidthAndPosition()}))}_updateResultsViewWidthAndPosition(){if(!this.resultsView.isVisible)return;this.resultsView._width=new s.rw(this.queryView.fieldView.element).width;const e=Hs._getOptimalPosition({element:this.resultsView.element,target:this.queryView.element,fitInViewport:!0,positions:Hs.defaultResultsPositions});this.resultsView._position=e?e.name:"s"}_updateResultsVisibility(){const e=void 0===this._config.queryMinChars?0:this._config.queryMinChars,t=this.queryView.fieldView.element.value.length;this.resultsView.isVisible=this.focusTracker.isFocused&&this.isEnabled&&t>=e}static defaultResultsPositions=[e=>({top:e.bottom,left:e.left,name:"s"}),(e,t)=>({top:e.top-t.height,left:e.left,name:"n"})];static _getOptimalPosition=s.W}const $s=function(e){return function(t){return null==e?void 0:e[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"});var Ws=o("./node_modules/lodash-es/toString.js"),qs=/[&<>"']/g,Us=RegExp(qs.source);const Ks=function(e){return(e=(0,Ws.A)(e))&&Us.test(e)?e.replace(qs,$s):e};var Ys=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/highlightedtext/highlightedtext.css"),Gs={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ys.A,Gs);Ys.A.locals;class Zs extends V{constructor(){super(),this.set("text",void 0),this.setTemplate({tag:"span",attributes:{class:["ck","ck-highlighted-text"]}}),this.on("render",(()=>{this.on("change:text",(()=>{this._updateInnerHTML(this.text)})),this._updateInnerHTML(this.text)}))}highlightText(e){this._updateInnerHTML(function(e,t){if(!t)return Ks(e);const o=[];let s=0,i=t.exec(e);for(;null!==i;){const n=i.index;n!==s&&o.push({text:e.substring(s,n),isMatch:!1}),o.push({text:i[0],isMatch:!0}),s=t.lastIndex,i=t.exec(e)}s!==e.length&&o.push({text:e.substring(s),isMatch:!1});return o.map((e=>(e.text=Ks(e.text),e))).map((e=>e.isMatch?`${e.text}`:e.text)).join("")}(this.text||"",e))}_updateInnerHTML(e){this.element.innerHTML=e||""}}var Js=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/spinner/spinner.css"),Xs={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Js.A,Xs);Js.A.locals;class Qs extends V{constructor(){super(),this.set("isVisible",!1);const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-spinner-container",e.if("isVisible","ck-hidden",(e=>!e))]},children:[{tag:"span",attributes:{class:["ck","ck-spinner"]}}]})}}const ei=(0,s.To)("px");class ti extends N.k_{toolbarView;focusTracker;_balloonConfig;_resizeObserver=null;_balloon;_fireSelectionChangeDebounced;static get pluginName(){return"BalloonToolbar"}static get requires(){return[Ts]}constructor(e){super(e),this._balloonConfig=ut(e.config.get("balloonToolbar")),this.toolbarView=this._createToolbarView(),this.focusTracker=new s.$x,e.ui.once("ready",(()=>{this.focusTracker.add(e.ui.getEditableElement()),this.focusTracker.add(this.toolbarView.element)})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this.show(!0),afterBlur:()=>this.hide(),isContextual:!0}),this._balloon=e.plugins.get(Ts),this._fireSelectionChangeDebounced=(0,qe.A)((()=>this.fire("_selectionChangeDebounced")),200),this.decorate("show")}init(){const e=this.editor,t=e.model.document.selection;this.listenTo(this.focusTracker,"change:isFocused",((e,t,o)=>{const s=this._balloon.visibleView===this.toolbarView;!o&&s?this.hide():o&&this.show()})),this.listenTo(t,"change:range",((e,o)=>{(o.directChange||t.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()})),this.listenTo(this,"_selectionChangeDebounced",(()=>{this.editor.editing.view.document.isFocused&&this.show()})),this._balloonConfig.shouldNotGroupWhenFull||this.listenTo(e,"ready",(()=>{const t=e.ui.view.editable.element;this._resizeObserver=new s.tb(t,(e=>{this.toolbarView.maxWidth=ei(.9*e.contentRect.width)}))})),this.listenTo(this.toolbarView,"groupedItemsUpdate",(()=>{this._updatePosition()})),e.ui.once("ready",(()=>{this.toolbarView.fillFromConfig(this._balloonConfig,this.editor.ui.componentFactory)}))}_createToolbarView(){const e=this.editor.locale.t,t=!this._balloonConfig.shouldNotGroupWhenFull,o=new gt(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return o.ariaLabel=e("Editor contextual toolbar"),o.render(),o}show(e=!1){const t=this.editor,o=t.model.document.selection,s=t.model.schema;this._balloon.hasView(this.toolbarView)||o.isCollapsed&&!e||function(e,t){if(1===e.rangeCount)return!1;return[...e.getRanges()].every((e=>{const o=e.getContainedElement();return o&&t.isSelectable(o)}))}(o,s)||Array.from(this.toolbarView.items).every((e=>void 0!==e.isEnabled&&!e.isEnabled))||(this.listenTo(this.editor.ui,"update",(()=>{this._updatePosition()})),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.ui,"update"),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document,o=t.selection,i=t.selection.isBackward;return{target:()=>{const t=i?o.getFirstRange():o.getLastRange(),n=s.rw.getDomRangeRects(e.domConverter.viewRangeToDom(t));return i?n[0]:(n.length>1&&0===n[n.length-1].width&&n.pop(),n[n.length-1])},positions:this._getBalloonPositions(i)}}_updatePosition(){this._balloon.updatePosition(this._getBalloonPositionData())}destroy(){super.destroy(),this.stopListening(),this._fireSelectionChangeDebounced.cancel(),this.toolbarView.destroy(),this.focusTracker.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getBalloonPositions(e){const t=s._K.isSafari&&s._K.isiOS?zo.generatePositions({heightOffset:Math.max(zo.arrowHeightOffset,Math.round(20/s.Sf.window.visualViewport.scale))}):zo.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.northWestArrowSouthMiddleEast,t.northWestArrowSouthMiddleWest,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast,t.southWestArrowNorthMiddleWest,t.southWestArrowNorthMiddleEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.southEastArrowNorthMiddleEast,t.southEastArrowNorthMiddleWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest,t.northEastArrowSouthMiddleEast,t.northEastArrowSouthMiddleWest]}}var oi=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css"),si={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(oi.A,si);oi.A.locals;const ii=(0,s.To)("px");class ni extends q{constructor(e){super(e);const t=this.bindTemplate;this.isVisible=!1,this.isToggleable=!0,this.set("top",0),this.set("left",0),this.extendTemplate({attributes:{class:"ck-block-toolbar-button",style:{top:t.to("top",(e=>ii(e))),left:t.to("left",(e=>ii(e)))}}})}}const ri=(0,s.To)("px");class ai extends N.k_{toolbarView;panelView;buttonView;_resizeObserver=null;_blockToolbarConfig;static get pluginName(){return"BlockToolbar"}constructor(e){super(e),this._blockToolbarConfig=ut(this.editor.config.get("blockToolbar")),this.toolbarView=this._createToolbarView(),this.panelView=this._createPanelView(),this.buttonView=this._createButtonView(),R({emitter:this.panelView,contextElements:[this.panelView.element,this.buttonView.element],activator:()=>this.panelView.isVisible,callback:()=>this._hidePanel()})}init(){const e=this.editor,t=e.t,o=t("Click to edit block"),s=t("Drag to move"),i=t("Edit block"),n=e.plugins.has("DragDropBlockToolbar"),r=n?`${o}\n${s}`:i;this.buttonView.label=r,n&&(this.buttonView.element.dataset.ckeTooltipClass="ck-tooltip_multi-line"),this.listenTo(e.model.document.selection,"change:range",((e,t)=>{t.directChange&&this._hidePanel()})),this.listenTo(e.ui,"update",(()=>this._updateButton())),this.listenTo(e,"change:isReadOnly",(()=>this._updateButton()),{priority:"low"}),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>this._updateButton())),this.listenTo(this.buttonView,"change:isVisible",((e,t,o)=>{o?this.buttonView.listenTo(window,"resize",(()=>this._updateButton())):(this.buttonView.stopListening(window,"resize"),this._hidePanel())})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this._showPanel(),afterBlur:()=>this._hidePanel()}),e.ui.once("ready",(()=>{this.toolbarView.fillFromConfig(this._blockToolbarConfig,this.editor.ui.componentFactory);for(const e of this.toolbarView.items)e.on("execute",(()=>this._hidePanel(!0)),{priority:"high"})}))}destroy(){super.destroy(),this.panelView.destroy(),this.buttonView.destroy(),this.toolbarView.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_createToolbarView(){const e=this.editor.locale.t,t=!this._blockToolbarConfig.shouldNotGroupWhenFull,o=new gt(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return o.ariaLabel=e("Editor block content toolbar"),o}_createPanelView(){const e=this.editor,t=new zo(e.locale);return t.content.add(this.toolbarView),t.class="ck-toolbar-container",e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this.toolbarView.keystrokes.set("Esc",((e,t)=>{this._hidePanel(!0),t()})),t}_createButtonView(){const e=this.editor,t=e.t,o=new ni(e.locale),s=this._blockToolbarConfig.icon,i=ft[s]||s||ft.dragIndicator;return o.set({label:t("Edit block"),icon:i,withText:!1}),o.bind("isOn").to(this.panelView,"isVisible"),o.bind("tooltip").to(this.panelView,"isVisible",(e=>!e)),this.listenTo(o,"execute",(()=>{this.panelView.isVisible?this._hidePanel(!0):this._showPanel()})),e.ui.view.body.add(o),e.ui.focusTracker.add(o.element),o}_updateButton(){const e=this.editor,t=e.model,o=e.editing.view;if(!e.ui.focusTracker.isFocused)return void this._hideButton();if(!e.model.canEditAt(e.model.document.selection))return void this._hideButton();const s=Array.from(t.document.selection.getSelectedBlocks())[0];if(!s||Array.from(this.toolbarView.items).every((e=>!e.isEnabled)))return void this._hideButton();const i=o.domConverter.mapViewToDom(e.editing.mapper.toViewElement(s));this.buttonView.isVisible=!0,this._setupToolbarResize(),this._attachButtonToElement(i),this.panelView.isVisible&&this._showPanel()}_hideButton(){this.buttonView.isVisible=!1}_showPanel(){if(!this.buttonView.isVisible)return;const e=this.panelView.isVisible;this.panelView.show();const t=this._getSelectedEditableElement();this.toolbarView.maxWidth=this._getToolbarMaxWidth(t),this.panelView.pin({target:this.buttonView.element,limiter:t}),e||this.toolbarView.items.get(0).focus()}_getSelectedEditableElement(){const e=this.editor.model.document.selection.getFirstRange().root.rootName;return this.editor.ui.getEditableElement(e)}_hidePanel(e){this.panelView.isVisible=!1,e&&this.editor.editing.view.focus()}_attachButtonToElement(e){const t=window.getComputedStyle(e),o=new s.rw(this._getSelectedEditableElement()),i=parseInt(t.paddingTop,10),n=parseInt(t.lineHeight,10)||1.2*parseInt(t.fontSize,10),r=new s.rw(this.buttonView.element),a=new s.rw(e);let c;c="ltr"===this.editor.locale.uiLanguageDirection?o.left-r.width:o.right;const l=a.top+i+(n-r.height)/2;r.moveTo(c,l);const d=r.toAbsoluteRect();this.buttonView.top=d.top,this.buttonView.left=d.left}_setupToolbarResize(){const e=this._getSelectedEditableElement();this._blockToolbarConfig.shouldNotGroupWhenFull||(this._resizeObserver&&this._resizeObserver.element!==e&&(this._resizeObserver.destroy(),this._resizeObserver=null),this._resizeObserver||(this._resizeObserver=new s.tb(e,(()=>{this.toolbarView.maxWidth=this._getToolbarMaxWidth(e)}))))}_getToolbarMaxWidth(e){const t=new s.rw(e),o=new s.rw(this.buttonView.element),i="rtl"===this.editor.locale.uiLanguageDirection?o.left-t.right+o.width:t.left-o.left;return ri(t.width+i)}}var ci=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenubutton.css"),li={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(ci.A,li);ci.A.locals;class di extends q{arrowView;constructor(e){super(e);const t=this.bindTemplate;this.set({withText:!0,role:"menuitem"}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__button"],"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e))),"data-cke-tooltip-disabled":t.to("isOn")},on:{mouseenter:t.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new z;return e.content=Pe,e.extendTemplate({attributes:{class:"ck-menu-bar__menu__button__arrow"}}),e}}var hi=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenulistitem.css"),ui={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(hi.A,ui);hi.A.locals;class pi extends wt{constructor(e,t){super(e);const o=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item"]},on:{mouseenter:o.to("mouseenter")}}),this.delegate("mouseenter").to(t)}}var mi=o("./node_modules/lodash-es/cloneDeep.js");const fi={toggleMenusAndFocusItemsOnHover(e){e.on("menu:mouseenter",(t=>{if(e.isOpen){for(const o of e.menus){const e=t.path[0],s=e instanceof pi&&e.children.first===o;o.isOpen=(t.path.includes(o)||s)&&o.isEnabled}t.source.focus()}}))},focusCycleMenusOnArrows(e){const t="rtl"===e.locale.uiLanguageDirection;function o(t,o){const s=e.children.getIndex(t),i=t.isOpen,n=e.children.length,r=e.children.get((s+n+o)%n);t.isOpen=!1,i&&(r.isOpen=!0),r.buttonView.focus()}e.on("menu:arrowright",(e=>{o(e.source,t?-1:1)})),e.on("menu:arrowleft",(e=>{o(e.source,t?1:-1)}))},closeMenusWhenTheBarCloses(e){e.on("change:isOpen",(()=>{e.isOpen||e.menus.forEach((e=>{e.isOpen=!1}))}))},closeMenuWhenAnotherOnTheSameLevelOpens(e){e.on("menu:change:isOpen",((t,o,s)=>{s&&e.menus.filter((e=>t.source.parentMenuView===e.parentMenuView&&t.source!==e&&e.isOpen)).forEach((e=>{e.isOpen=!1}))}))},closeOnClickOutside(e){R({emitter:e,activator:()=>e.isOpen,callback:()=>e.close(),contextElements:()=>e.children.map((e=>e.element))})}},gi={openAndFocusPanelOnArrowDownKey(e){e.keystrokes.set("arrowdown",((t,o)=>{e.focusTracker.focusedElement===e.buttonView.element&&(e.isOpen||(e.isOpen=!0),e.panelView.focus(),o())}))},openOnArrowRightKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowleft":"arrowright";e.keystrokes.set(t,((t,o)=>{e.focusTracker.focusedElement===e.buttonView.element&&e.isEnabled&&(e.isOpen||(e.isOpen=!0),e.panelView.focus(),o())}))},openOnButtonClick(e){e.buttonView.on("execute",(()=>{e.isOpen=!0,e.panelView.focus()}))},toggleOnButtonClick(e){e.buttonView.on("execute",(()=>{e.isOpen=!e.isOpen,e.isOpen&&e.panelView.focus()}))},closeOnArrowLeftKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowright":"arrowleft";e.keystrokes.set(t,((t,o)=>{e.isOpen&&(e.isOpen=!1,e.focus(),o())}))},closeOnEscKey(e){e.keystrokes.set("esc",((t,o)=>{e.isOpen&&(e.isOpen=!1,e.focus(),o())}))},closeOnParentClose(e){e.parentMenuView.on("change:isOpen",((t,o,s)=>{s||t.source!==e.parentMenuView||(e.isOpen=!1)}))}},_i={southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),eastSouth:e=>({top:e.top,left:e.right-5,name:"es"}),eastNorth:(e,t)=>({top:e.top-t.height,left:e.right-5,name:"en"}),westSouth:(e,t)=>({top:e.top,left:e.left-t.width+5,name:"ws"}),westNorth:(e,t)=>({top:e.top-t.height,left:e.left-t.width+5,name:"wn"})},bi=[{menuId:"file",label:"File",groups:[{groupId:"export",items:["menuBar:exportPdf","menuBar:exportWord"]},{groupId:"import",items:["menuBar:importWord"]},{groupId:"revisionHistory",items:["menuBar:revisionHistory"]}]},{menuId:"edit",label:"Edit",groups:[{groupId:"undo",items:["menuBar:undo","menuBar:redo"]},{groupId:"selectAll",items:["menuBar:selectAll"]},{groupId:"findAndReplace",items:["menuBar:findAndReplace"]}]},{menuId:"view",label:"View",groups:[{groupId:"sourceEditing",items:["menuBar:sourceEditing"]},{groupId:"showBlocks",items:["menuBar:showBlocks"]},{groupId:"restrictedEditingException",items:["menuBar:restrictedEditingException"]}]},{menuId:"insert",label:"Insert",groups:[{groupId:"insertMainWidgets",items:["menuBar:insertImage","menuBar:ckbox","menuBar:ckfinder","menuBar:insertTable"]},{groupId:"insertInline",items:["menuBar:link","menuBar:comment"]},{groupId:"insertMinorWidgets",items:["menuBar:mediaEmbed","menuBar:insertTemplate","menuBar:blockQuote","menuBar:codeBlock","menuBar:htmlEmbed"]},{groupId:"insertStructureWidgets",items:["menuBar:horizontalLine","menuBar:pageBreak","menuBar:tableOfContents"]},{groupId:"restrictedEditing",items:["menuBar:restrictedEditing"]}]},{menuId:"format",label:"Format",groups:[{groupId:"textAndFont",items:[{menuId:"text",label:"Text",groups:[{groupId:"basicStyles",items:["menuBar:bold","menuBar:italic","menuBar:underline","menuBar:strikethrough","menuBar:superscript","menuBar:subscript","menuBar:code"]},{groupId:"textPartLanguage",items:["menuBar:textPartLanguage"]}]},{menuId:"font",label:"Font",groups:[{groupId:"fontProperties",items:["menuBar:fontSize","menuBar:fontFamily"]},{groupId:"fontColors",items:["menuBar:fontColor","menuBar:fontBackgroundColor"]},{groupId:"highlight",items:["menuBar:highlight"]}]},"menuBar:heading"]},{groupId:"list",items:["menuBar:bulletedList","menuBar:numberedList","menuBar:multiLevelList","menuBar:todoList"]},{groupId:"indent",items:["menuBar:alignment","menuBar:indent","menuBar:outdent"]},{groupId:"caseChange",items:["menuBar:caseChange"]},{groupId:"removeFormat",items:["menuBar:removeFormat"]}]},{menuId:"tools",label:"Tools",groups:[{groupId:"aiTools",items:["menuBar:aiAssistant","menuBar:aiCommands"]},{groupId:"tools",items:["menuBar:trackChanges","menuBar:commentsArchive"]}]},{menuId:"help",label:"Help",groups:[{groupId:"help",items:["menuBar:accessibilityHelp"]}]}];function ki(e){let t;return t="items"in e&&e.items?{items:e.items,removeItems:[],addItems:[],isVisible:!0,isUsingDefaultConfig:!1,...e}:{items:(0,mi.A)(bi),addItems:[],removeItems:[],isVisible:!0,isUsingDefaultConfig:!0,...e},t}function wi({normalizedConfig:e,locale:t,componentFactory:o}){const i=(0,mi.A)(e);return function(e,t){const o=t.removeItems,i=[];t.items=t.items.filter((({menuId:e})=>!o.includes(e)||(i.push(e),!1))),Ai(t.items,(e=>{e.groups=e.groups.filter((({groupId:e})=>!o.includes(e)||(i.push(e),!1)));for(const t of e.groups)t.items=t.items.filter((e=>{const t=Si(e);return!o.includes(t)||(i.push(t),!1)}))}));for(const t of o)i.includes(t)||(0,s.FF)("menu-bar-item-could-not-be-removed",{menuBarConfig:e,itemName:t})}(e,i),function(e,t){const o=t.addItems,i=[];for(const e of o){const o=Ei(e.position),s=Pi(e.position);if(Ci(e))if(s){const n=t.items.findIndex((e=>e.menuId===s));if(-1!=n)"before"===o?(t.items.splice(n,0,e.menu),i.push(e)):"after"===o&&(t.items.splice(n+1,0,e.menu),i.push(e));else{vi(t,e.menu,s,o)&&i.push(e)}}else"start"===o?(t.items.unshift(e.menu),i.push(e)):"end"===o&&(t.items.push(e.menu),i.push(e));else if(Ti(e))Ai(t.items,(t=>{if(t.menuId===s)"start"===o?(t.groups.unshift(e.group),i.push(e)):"end"===o&&(t.groups.push(e.group),i.push(e));else{const n=t.groups.findIndex((e=>e.groupId===s));-1!==n&&("before"===o?(t.groups.splice(n,0,e.group),i.push(e)):"after"===o&&(t.groups.splice(n+1,0,e.group),i.push(e)))}}));else{vi(t,e.item,s,o)&&i.push(e)}}for(const t of o)i.includes(t)||(0,s.FF)("menu-bar-item-could-not-be-added",{menuBarConfig:e,addedItemConfig:t})}(e,i),function(e,t,o){Ai(t.items,(i=>{for(const n of i.groups)n.items=n.items.filter((n=>{const r="string"==typeof n&&!o.has(n);return r&&!t.isUsingDefaultConfig&&(0,s.FF)("menu-bar-item-unavailable",{menuBarConfig:e,parentMenuConfig:(0,mi.A)(i),componentName:n}),!r}))}))}(e,i,o),yi(e,i),function(e,t){const o=t.t,s={File:o({string:"File",id:"MENU_BAR_MENU_FILE"}),Edit:o({string:"Edit",id:"MENU_BAR_MENU_EDIT"}),View:o({string:"View",id:"MENU_BAR_MENU_VIEW"}),Insert:o({string:"Insert",id:"MENU_BAR_MENU_INSERT"}),Format:o({string:"Format",id:"MENU_BAR_MENU_FORMAT"}),Tools:o({string:"Tools",id:"MENU_BAR_MENU_TOOLS"}),Help:o({string:"Help",id:"MENU_BAR_MENU_HELP"}),Text:o({string:"Text",id:"MENU_BAR_MENU_TEXT"}),Font:o({string:"Font",id:"MENU_BAR_MENU_FONT"})};Ai(e.items,(e=>{e.label in s&&(e.label=s[e.label])}))}(i,t),i}function vi(e,t,o,s){let i=!1;return Ai(e.items,(e=>{for(const{groupId:n,items:r}of e.groups){if(i)return;if(n===o)"start"===s?(r.unshift(t),i=!0):"end"===s&&(r.push(t),i=!0);else{const e=r.findIndex((e=>Si(e)===o));-1!==e&&("before"===s?(r.splice(e,0,t),i=!0):"after"===s&&(r.splice(e+1,0,t),i=!0))}}})),i}function yi(e,t){const o=t.isUsingDefaultConfig;let s=!1;t.items=t.items.filter((t=>!!t.groups.length||(xi(e,t,o),!1))),t.items.length?(Ai(t.items,(t=>{t.groups=t.groups.filter((e=>!!e.items.length||(s=!0,!1)));for(const i of t.groups)i.items=i.items.filter((t=>!(Mi(t)&&!t.groups.length)||(xi(e,t,o),s=!0,!1)))})),s&&yi(e,t)):xi(e,e,o)}function xi(e,t,o){o||(0,s.FF)("menu-bar-menu-empty",{menuBarConfig:e,emptyMenuConfig:t})}function Ai(e,t){if(Array.isArray(e))for(const t of e)o(t);function o(e){t(e);for(const t of e.groups)for(const e of t.items)Mi(e)&&o(e)}}function Ci(e){return"object"==typeof e&&"menu"in e}function Ti(e){return"object"==typeof e&&"group"in e}function Ei(e){return e.startsWith("start")?"start":e.startsWith("end")?"end":e.startsWith("after")?"after":"before"}function Pi(e){const t=e.match(/^[^:]+:(.+)/);return t?t[1]:null}function Si(e){return"string"==typeof e?e:e.menuId}function Mi(e){return"object"==typeof e&&"menuId"in e}function Oi(e,t){const o=t.element;e.ui.focusTracker.add(o),e.keystrokes.listenTo(o);const s=ki(e.config.get("menuBar")||{});t.fillFromConfig(s,e.ui.componentFactory),e.keystrokes.set("Esc",((t,s)=>{o.contains(e.ui.focusTracker.focusedElement)&&(e.editing.view.focus(),s())})),e.keystrokes.set("Alt+F9",((s,i)=>{o.contains(e.ui.focusTracker.focusedElement)||(t.focus(),i())}))}var Vi=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenupanel.css"),Ri={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Vi.A,Ri);Vi.A.locals;class ji extends V{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-menu-bar__menu__panel",t.to("position",(e=>`ck-menu-bar__menu__panel_position_${e}`)),t.if("isVisible","ck-hidden",(e=>!e))],tabindex:"-1"},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(e=1){this.children.length&&(1===e?this.children.first.focus():this.children.last.focus())}}var Ii=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubarmenu.css"),Bi={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Ii.A,Bi);Ii.A.locals;class Di extends V{buttonView;panelView;focusTracker;keystrokes;constructor(e){super(e);const t=this.bindTemplate;this.buttonView=new di(e),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.panelView=new ji(e),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new s.EP,this.focusTracker=new s.$x,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("panelPosition","w"),this.set("class",void 0),this.set("parentMenuView",null),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar__menu",t.to("class"),t.if("isEnabled","ck-disabled",(e=>!e)),t.if("parentMenuView","ck-menu-bar__menu_top-level",(e=>!e))]},children:[this.buttonView,this.panelView]})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.keystrokes.listenTo(this.element),gi.closeOnEscKey(this),this._repositionPanelOnOpen()}_attachBehaviors(){this.parentMenuView?(gi.openOnButtonClick(this),gi.openOnArrowRightKey(this),gi.closeOnArrowLeftKey(this),gi.closeOnParentClose(this)):(this._propagateArrowKeystrokeEvents(),gi.openAndFocusPanelOnArrowDownKey(this),gi.toggleOnButtonClick(this))}_propagateArrowKeystrokeEvents(){this.keystrokes.set("arrowright",((e,t)=>{this.fire("arrowright"),t()})),this.keystrokes.set("arrowleft",((e,t)=>{this.fire("arrowleft"),t()}))}_repositionPanelOnOpen(){this.on("change:isOpen",((e,t,o)=>{if(!o)return;const s=Di._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=s?s.name:this._panelPositions[0].name}))}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:t,northEast:o,northWest:s,westSouth:i,eastSouth:n,westNorth:r,eastNorth:a}=_i;return"ltr"===this.locale.uiLanguageDirection?this.parentMenuView?[n,a,i,r]:[e,t,o,s]:this.parentMenuView?[i,r,n,a]:[t,e,s,o]}static _getOptimalPosition=s.W}class Ni extends Ct{constructor(e){super(e),this.role="menu"}}class Fi extends Te{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}var Li=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/menubar/menubar.css"),zi={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};S()(Li.A,zi);Li.A.locals;const Hi=["mouseenter","arrowleft","arrowright","change:isOpen"];class $i extends V{children;menus=[];constructor(e){super(e);const t=e.t;this.set("isOpen",!1),this._setupIsOpenUpdater(),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar"],"aria-label":t("Editor menu bar"),role:"menubar"},children:this.children})}fillFromConfig(e,t){const o=wi({normalizedConfig:e,locale:this.locale,componentFactory:t}).items.map((e=>this._createMenu({componentFactory:t,menuDefinition:e})));this.children.addMany(o)}render(){super.render(),fi.toggleMenusAndFocusItemsOnHover(this),fi.closeMenusWhenTheBarCloses(this),fi.closeMenuWhenAnotherOnTheSameLevelOpens(this),fi.focusCycleMenusOnArrows(this),fi.closeOnClickOutside(this)}focus(){this.children.first&&this.children.first.focus()}close(){for(const e of this.children)e.isOpen=!1}registerMenu(e,t=null){t?(e.delegate(...Hi).to(t),e.parentMenuView=t):e.delegate(...Hi).to(this,(e=>"menu:"+e)),e._attachBehaviors(),this.menus.push(e)}_createMenu({componentFactory:e,menuDefinition:t,parentMenuView:o}){const s=this.locale,i=new Di(s);return this.registerMenu(i,o),i.buttonView.set({label:t.label}),i.once("change:isOpen",(()=>{const o=new Ni(s);o.ariaLabel=t.label,i.panelView.children.add(o),o.items.addMany(this._createMenuItems({menuDefinition:t,parentMenuView:i,componentFactory:e}))})),i}_createMenuItems({menuDefinition:e,parentMenuView:t,componentFactory:o}){const s=this.locale,i=[];for(const n of e.groups){for(const e of n.items){const n=new pi(s,t);if((0,r.A)(e))n.children.add(this._createMenu({componentFactory:o,menuDefinition:e,parentMenuView:t}));else{const s=this._createMenuItemContentFromFactory({componentName:e,componentFactory:o,parentMenuView:t});if(!s)continue;n.children.add(s)}i.push(n)}n!==e.groups[e.groups.length-1]&&i.push(new vt(s))}return i}_createMenuItemContentFromFactory({componentName:e,parentMenuView:t,componentFactory:o}){const i=o.create(e);return i instanceof Di||i instanceof ue||i instanceof Fi?(this._registerMenuTree(i,t),i.on("execute",(()=>{this.close()})),i):((0,s.FF)("menu-bar-component-unsupported",{componentName:e,componentView:i}),null)}_registerMenuTree(e,t){if(!(e instanceof Di))return void e.delegate("mouseenter").to(t);this.registerMenu(e,t);const o=e.panelView.children.filter((e=>e instanceof Ni))[0];if(!o)return void e.delegate("mouseenter").to(t);const s=o.items.filter((e=>e instanceof wt));for(const t of s)this._registerMenuTree(t.children.get(0),e)}_setupIsOpenUpdater(){let e;this.on("menu:change:isOpen",((t,o,s)=>{clearTimeout(e),s?this.isOpen=!0:e=setTimeout((()=>{this.isOpen=Array.from(this.children).some((e=>e.isOpen))}),0)}))}}},"./packages/ckeditor5-utils/src/index.ts":(e,t,o)=>{"use strict";let s;o.d(t,{Yb:()=>S,pM:()=>Ot,TS:()=>ve,c5:()=>Ee,PZ:()=>ce,Mm:()=>z,vY:()=>x,$x:()=>Rt,EP:()=>jt,hT:()=>Mt,VM:()=>oe,rw:()=>Ne,tb:()=>$e,KL:()=>le,ww:()=>he,U9:()=>de,n:()=>_e,cb:()=>zt,Ui:()=>k,q8:()=>w,_K:()=>a,Nv:()=>Nt,Mr:()=>g,j3:()=>Me,$1:()=>Vt,DS:()=>Oe,Md:()=>Re,QC:()=>bt,pG:()=>Ve,YA:()=>wt,iJ:()=>Tt,Kf:()=>yt,W:()=>Xe,Sf:()=>i,qh:()=>Ue,PT:()=>Ke,Yy:()=>E,Yt:()=>vt,mY:()=>$t,Cn:()=>Ye,HK:()=>xt,kv:()=>Wt,Iw:()=>Kt,SQ:()=>Gt,P5:()=>Ut,xZ:()=>ue,k$:()=>qt,Ll:()=>Ae,_Z:()=>Ie,KH:()=>je,i8:()=>Ge,zN:()=>Ze,uP:()=>gt,vV:()=>O,FF:()=>M,jh:()=>v,ZX:()=>kt,vx:()=>T,kM:()=>B,TF:()=>tt,L5:()=>Dt,bi:()=>st,vK:()=>ot,C_:()=>We,eL:()=>Lt,$r:()=>Et,av:()=>It,To:()=>qe,Ld:()=>C,rQ:()=>Ht,rE:()=>I,uk:()=>Bt});try{s={window,document}}catch(e){s={window:{},document:{}}}const i=s;function n(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}const r=n(),a={isMac:c(r),isWindows:l(r),isGecko:d(r),isSafari:h(r),isiOS:u(r),isAndroid:p(r),isBlink:m(r),get isMediaForcedColors(){return!!i.window.matchMedia&&i.window.matchMedia("(forced-colors: active)").matches},get isMotionReduced(){return!!i.window.matchMedia&&i.window.matchMedia("(prefers-reduced-motion)").matches},features:{isRegExpUnicodePropertySupported:f()}};function c(e){return e.indexOf("macintosh")>-1}function l(e){return e.indexOf("windows")>-1}function d(e){return!!e.match(/gecko\/\d+/)}function h(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}function u(e){return!!e.match(/iphone|ipad/i)||c(e)&&navigator.maxTouchPoints>0}function p(e){return e.indexOf("android")>-1}function m(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}function f(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}function g(e,t,o,s){o=o||function(e,t){return e===t};const i=Array.isArray(e)?e:Array.prototype.slice.call(e),n=Array.isArray(t)?t:Array.prototype.slice.call(t),r=function(e,t,o){const s=_(e,t,o);if(-1===s)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const i=b(e,s),n=b(t,s),r=_(i,n,o),a=e.length-r,c=t.length-r;return{firstIndex:s,lastIndexOld:a,lastIndexNew:c}}(i,n,o),a=s?function(e,t){const{firstIndex:o,lastIndexOld:s,lastIndexNew:i}=e;if(-1===o)return Array(t).fill("equal");let n=[];o>0&&(n=n.concat(Array(o).fill("equal")));i-o>0&&(n=n.concat(Array(i-o).fill("insert")));s-o>0&&(n=n.concat(Array(s-o).fill("delete")));i0&&o.push({index:s,type:"insert",values:e.slice(s,n)});i-s>0&&o.push({index:s+(n-s),type:"delete",howMany:i-s});return o}(n,r);return a}function _(e,t,o){for(let s=0;s200||i>200||s+i>300)return k.fastDiff(e,t,o,!0);let n,r;if(il?-1:1;d[s+u]&&(d[s]=d[s+u].slice(0)),d[s]||(d[s]=[]),d[s].push(i>l?n:r);let p=Math.max(i,l),m=p-s;for(;ml;p--)h[p]=u(p);h[l]=u(l),m++}while(h[l]!==c);return d[l].slice(1)}function w(e,t){const o=[];let s=0,i=null;return e.forEach((e=>{"equal"==e?(n(),s++):"insert"==e?(i&&"insert"==i.type?i.values.push(t[s]):(n(),i={type:"insert",index:s,values:[t[s]]}),s++):i&&"delete"==i.type?i.howMany++:(n(),i={type:"delete",index:s,howMany:1})})),n(),o;function n(){i&&(o.push(i),i=null)}}function v(e,...t){t.forEach((t=>{const o=Object.getOwnPropertyNames(t),s=Object.getOwnPropertySymbols(t);o.concat(s).forEach((o=>{if(o in e.prototype)return;if("function"==typeof t&&("length"==o||"name"==o||"prototype"==o))return;const s=Object.getOwnPropertyDescriptor(t,o);s.enumerable=!1,Object.defineProperty(e.prototype,o,s)}))}))}k.fastDiff=g;const y=function(){return function e(){e.called=!0}};class x{source;name;path;stop;off;return;constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=y(),this.off=y()}}const A=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function C(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0,s=4294967296*Math.random()>>>0;return"e"+A[255&e]+A[e>>8&255]+A[e>>16&255]+A[e>>24&255]+A[255&t]+A[t>>8&255]+A[t>>16&255]+A[t>>24&255]+A[255&o]+A[o>>8&255]+A[o>>16&255]+A[o>>24&255]+A[255&s]+A[s>>8&255]+A[s>>16&255]+A[s>>24&255]}const T={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function E(e,t){const o=T.get(t.priority);for(let s=0;s{if("object"==typeof t&&null!==t){if(o.has(t))return`[object ${t.constructor.name}]`;o.add(t)}return t},i=t?` ${JSON.stringify(t,s)}`:"",n=V(e);return e+i+n}(e,o)),this.name="CKEditorError",this.context=t,this.data=o}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const o=new S(e.message,t);throw o.stack=e.stack,o}}function M(e,t){console.warn(...R(e,t))}function O(e,t){console.error(...R(e,t))}function V(e){return`\nRead more: ${P}#error-${e}`}function R(e,t){const o=V(e);return t?[e,t,o]:[e,o]}const j="42.0.2",I=j,B=new Date(2024,6,25);if(globalThis.CKEDITOR_VERSION)throw new S("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=j;const D=Symbol("listeningTo"),N=Symbol("emitterId"),F=Symbol("delegations"),L=z(Object);function z(e){if(!e)return L;return class extends e{on(e,t,o){this.listenTo(this,e,t,o)}once(e,t,o){let s=!1;this.listenTo(this,e,((e,...o)=>{s||(s=!0,e.off(),t.call(this,e,...o))}),o)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,o,s={}){let i,n;this[D]||(this[D]={});const r=this[D];$(e)||H(e);const a=$(e);(i=r[a])||(i=r[a]={emitter:e,callbacks:{}}),(n=i.callbacks[t])||(n=i.callbacks[t]=[]),n.push(o),function(e,t,o,s,i){t._addEventListener?t._addEventListener(o,s,i):e._addEventListener.call(t,o,s,i)}(this,e,t,o,s)}stopListening(e,t,o){const s=this[D];let i=e&&$(e);const n=s&&i?s[i]:void 0,r=n&&t?n.callbacks[t]:void 0;if(!(!s||e&&!n||t&&!r))if(o){Y(this,e,t,o);-1!==r.indexOf(o)&&(1===r.length?delete n.callbacks[t]:Y(this,e,t,o))}else if(r){for(;o=r.pop();)Y(this,e,t,o);delete n.callbacks[t]}else if(n){for(t in n.callbacks)this.stopListening(e,t);delete s[i]}else{for(i in s)this.stopListening(s[i].emitter);delete this[D]}}fire(e,...t){try{const o=e instanceof x?e:new x(this,e),s=o.name;let i=U(this,s);if(o.path.push(this),i){const e=[o,...t];i=Array.from(i);for(let t=0;t{this[F]||(this[F]=new Map),e.forEach((e=>{const s=this[F].get(e);s?s.set(t,o):this[F].set(e,new Map([[t,o]]))}))}}}stopDelegating(e,t){if(this[F])if(e)if(t){const o=this[F].get(e);o&&o.delete(t)}else this[F].delete(e);else this[F].clear()}_addEventListener(e,t,o){!function(e,t){const o=W(e);if(o[t])return;let s=t,i=null;const n=[];for(;""!==s&&!o[s];)o[s]={callbacks:[],childEvents:[]},n.push(o[s]),i&&o[s].childEvents.push(i),i=s,s=s.substr(0,s.lastIndexOf(":"));if(""!==s){for(const e of n)e.callbacks=o[s].callbacks.slice();o[s].childEvents.push(i)}}(this,e);const s=q(this,e),i={callback:t,priority:T.get(o.priority)};for(const e of s)E(e,i)}_removeEventListener(e,t){const o=q(this,e);for(const e of o)for(let o=0;o-1?U(e,t.substr(0,t.lastIndexOf(":"))):null}function K(e,t,o){for(let[s,i]of e){i?"function"==typeof i&&(i=i(t.name)):i=t.name;const e=new x(t.source,i);e.path=[...t.path],s.fire(e,...o)}}function Y(e,t,o,s){t._removeEventListener?t._removeEventListener(o,s):e._removeEventListener.call(t,o,s)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{z[e]=L.prototype[e]}));var G=o("./node_modules/lodash-es/isObject.js");const Z=Symbol("observableProperties"),J=Symbol("boundObservables"),X=Symbol("boundProperties"),Q=Symbol("decoratedMethods"),ee=Symbol("decoratedOriginal"),te=oe(z());function oe(e){if(!e)return te;return class extends e{set(e,t){if((0,G.A)(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);se(this);const o=this[Z];if(e in this&&!o.has(e))throw new S("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>o.get(e),set(t){const s=o.get(e);let i=this.fire(`set:${e}`,e,t,s);void 0===i&&(i=t),s===i&&o.has(e)||(o.set(e,i),this.fire(`change:${e}`,e,i,s))}}),this[e]=t}bind(...e){if(!e.length||!re(e))throw new S("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new S("observable-bind-duplicate-properties",this);se(this);const t=this[X];e.forEach((e=>{if(t.has(e))throw new S("observable-bind-rebind",this)}));const o=new Map;return e.forEach((e=>{const s={property:e,to:[]};t.set(e,s),o.set(e,s)})),{to:ie,toMany:ne,_observable:this,_bindProperties:e,_to:[],_bindings:o}}unbind(...e){if(!this[Z])return;const t=this[X],o=this[J];if(e.length){if(!re(e))throw new S("observable-unbind-wrong-properties",this);e.forEach((e=>{const s=t.get(e);s&&(s.to.forEach((([e,t])=>{const i=o.get(e),n=i[t];n.delete(s),n.size||delete i[t],Object.keys(i).length||(o.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else o.forEach(((e,t)=>{this.stopListening(t,"change")})),o.clear(),t.clear()}decorate(e){se(this);const t=this[e];if(!t)throw new S("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,o)=>{e.return=t.apply(this,o)})),this[e]=function(...t){return this.fire(e,t)},this[e][ee]=t,this[Q]||(this[Q]=[]),this[Q].push(e)}stopListening(e,t,o){if(!e&&this[Q]){for(const e of this[Q])this[e]=this[e][ee];delete this[Q]}super.stopListening(e,t,o)}[Z];[Q];[X];[J]}}function se(e){e[Z]||(Object.defineProperty(e,Z,{value:new Map}),Object.defineProperty(e,J,{value:new Map}),Object.defineProperty(e,X,{value:new Map}))}function ie(...e){const t=function(...e){if(!e.length)throw new S("observable-bind-to-parse-error",null);const t={to:[]};let o;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)o.properties.push(e);else{if("object"!=typeof e)throw new S("observable-bind-to-parse-error",null);o={observable:e,properties:[]},t.to.push(o)}})),t}(...e),o=Array.from(this._bindings.keys()),s=o.length;if(!t.callback&&t.to.length>1)throw new S("observable-bind-to-no-callback",this);if(s>1&&t.callback)throw new S("observable-bind-to-extra-callback",this);var i;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==s)throw new S("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(o[0]).callback=t.callback),i=this._observable,this._to.forEach((e=>{const t=i[J];let o;t.get(e.observable)||i.listenTo(e.observable,"change",((s,n)=>{o=t.get(e.observable)[n],o&&o.forEach((e=>{ae(i,e.property)}))}))})),function(e){let t;e._bindings.forEach(((o,s)=>{e._to.forEach((i=>{t=i.properties[o.callback?0:e._bindProperties.indexOf(s)],o.to.push([i.observable,t]),function(e,t,o,s){const i=e[J],n=i.get(o),r=n||{};r[s]||(r[s]=new Set);r[s].add(t),n||i.set(o,r)}(e._observable,o,i.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{ae(this._observable,e)}))}function ne(e,t,o){if(this._bindings.size>1)throw new S("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const o=e.map((e=>[e,t]));return Array.prototype.concat.apply([],o)}(e,t),o)}function re(e){return e.every((e=>"string"==typeof e))}function ae(e,t){const o=e[X].get(t);let s;o.callback?s=o.callback.apply(e,o.to.map((e=>e[0][e[1]]))):(s=o.to[0],s=s[0][s[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=s:e.set(t,s)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{oe[e]=te.prototype[e]}));class ce{_replacedElements;constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach((({element:e,newElement:t})=>{e.style.display="",t&&t.remove()})),this._replacedElements=[]}}function le(e){let t=new AbortController;function o(...o){return t.abort(),t=new AbortController,e(t.signal,...o)}return o.abort=()=>t.abort(),o}function de(e){let t=0;for(const o of e)t++;return t}function he(e,t){const o=Math.min(e.length,t.length);for(let s=0;s{this._setToTarget(e,s,t[s],o)}))}}function ye(e){return(0,ke.A)(e,xe)}function xe(e){return(0,we.A)(e)||"function"==typeof e?e:void 0}function Ae(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function Ce(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const Te=Ee(z());function Ee(e){if(!e)return Te;return class extends e{listenTo(e,t,o,s={}){if(Ae(e)||Ce(e)){const i={capture:!!s.useCapture,passive:!!s.usePassive},n=this._getProxyEmitter(e,i)||new Pe(e,i);this.listenTo(n,t,o,s)}else super.listenTo(e,t,o,s)}stopListening(e,t,o){if(Ae(e)||Ce(e)){const s=this._getAllProxyEmitters(e);for(const e of s)this.stopListening(e,t,o)}else super.stopListening(e,t,o)}_getProxyEmitter(e,t){return function(e,t){const o=e[D];return o&&o[t]?o[t].emitter:null}(this,Se(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{Ee[e]=Te.prototype[e]}));class Pe extends(z()){_domNode;_options;constructor(e,t){super(),H(this,Se(e,t)),this._domNode=e,this._options=t}_domListeners;attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,o){this.attach(e),z().prototype._addEventListener.call(this,e,t,o)}_removeEventListener(e,t){z().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function Se(e,t){let o=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=C())}(e);for(const e of Object.keys(t).sort())t[e]&&(o+="-"+e);return o}function Me(e){let t=e.parentElement;if(!t)return null;for(;"BODY"!=t.tagName;){const e=t.style.overflowY||i.window.getComputedStyle(t).overflowY;if("auto"===e||"scroll"===e)break;if(t=t.parentElement,!t)return null}return t}function Oe(e){const t=[];let o=e;for(;o&&o.nodeType!=Node.DOCUMENT_NODE;)t.unshift(o),o=o.parentNode;return t}function Ve(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function Re(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function je(e){return"[object Text]"==Object.prototype.toString.call(e)}function Ie(e){return"[object Range]"==Object.prototype.toString.apply(e)}function Be(e){return e&&e.parentNode?e.offsetParent===i.document.body?null:e.offsetParent:null}const De=["top","right","bottom","left","width","height"];class Ne{top;right;bottom;left;width;height;_source;constructor(e){const t=Ie(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),ze(e)||t)if(t){const t=Ne.getDomRangeRects(e);Fe(this,Ne.getBoundingRect(t))}else Fe(this,e.getBoundingClientRect());else if(Ce(e)){const{innerWidth:t,innerHeight:o}=e;Fe(this,{top:0,right:t,bottom:o,left:0,width:t,height:o})}else Fe(this,e)}clone(){return new Ne(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};if(t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0)return null;{const e=new Ne(t);return e._source=this._source,e}}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(Le(e))return t;let o,s=e,i=e.parentNode||e.commonAncestorContainer;for(;i&&!Le(i);){const e="visible"===((n=i)instanceof HTMLElement?n.ownerDocument.defaultView.getComputedStyle(n).overflow:"visible");s instanceof HTMLElement&&"absolute"===He(s)&&(o=s);const r=He(i);if(e||o&&("relative"===r&&e||"relative"!==r)){s=i,i=i.parentNode;continue}const a=new Ne(i),c=t.getIntersection(a);if(!c)return null;c.getArea(){for(const t of e){const e=$e._getElementCallbacks(t.target);if(e)for(const o of e)o(t)}}))}}function We(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function qe(e){return t=>t+e}function Ue(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Ke(e,t,o){e.insertBefore(o,e.childNodes[t]||null)}function Ye(e){return e&&e.nodeType===Node.COMMENT_NODE}function Ge(e){try{i.document.createAttribute(e)}catch(e){return!1}return!0}function Ze(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}var Je=o("./node_modules/lodash-es/isFunction.js");function Xe({element:e,target:t,positions:o,limiter:s,fitInViewport:n,viewportOffsetConfig:r}){(0,Je.A)(t)&&(t=t()),(0,Je.A)(s)&&(s=s());const a=Be(e),c=function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new Ne(i.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(r),l=new Ne(e),d=Qe(t,c);let h;if(!d||!c.getIntersection(d))return null;const u={targetRect:d,elementRect:l,positionedElementAncestor:a,viewportRect:c};if(s||n){if(s){const e=Qe(s,c);e&&(u.limiterRect=e)}h=function(e,t){const{elementRect:o}=t,s=o.getArea(),i=e.map((e=>new et(e,t))).filter((e=>!!e.name));let n=0,r=null;for(const e of i){const{limiterIntersectionArea:t,viewportIntersectionArea:o}=e;if(t===s)return e;const i=o**2+t**2;i>n&&(n=i,r=e)}return r}(o,u)}else h=new et(o[0],u);return h}function Qe(e,t){const o=new Ne(e).getVisible();return o?o.getIntersection(t):null}class et{name;config;_positioningFunctionCoordinates;_options;_cachedRect;_cachedAbsoluteRect;constructor(e,t){const o=e(t.targetRect,t.elementRect,t.viewportRect,t.limiterRect);if(!o)return;const{left:s,top:i,name:n,config:r}=o;this.name=n,this.config=r,this._positioningFunctionCoordinates={left:s,top:i},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;return e?e.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=this._rect.toAbsoluteRect()),this._cachedAbsoluteRect}}function tt(e){const t=e.parentNode;t&&t.removeChild(e)}function ot({target:e,viewportOffset:t=0,ancestorOffset:o=0,alignToTop:s,forceScroll:i}){const n=dt(e);let r=n,a=null;for(t=function(e){if("number"==typeof e)return{top:e,bottom:e,left:e,right:e};return e}(t);r;){let c;c=ht(r==n?e:a),nt({parent:c,getRect:()=>ut(e,r),alignToTop:s,ancestorOffset:o,forceScroll:i});const l=ut(e,r);if(it({window:r,rect:l,viewportOffset:t,alignToTop:s,forceScroll:i}),r.parent!=r){if(a=r.frameElement,r=r.parent,!a)return}else r=null}}function st(e,t,o){nt({parent:ht(e),getRect:()=>new Ne(e),ancestorOffset:t,limiterElement:o})}function it({window:e,rect:t,alignToTop:o,forceScroll:s,viewportOffset:i}){const n=t.clone().moveBy(0,i.bottom),r=t.clone().moveBy(0,-i.top),a=new Ne(e).excludeScrollbarsAndBorders(),c=o&&s,l=[r,n].every((e=>a.contains(e)));let{scrollX:d,scrollY:h}=e;const u=d,p=h;c?h-=a.top-t.top+i.top:l||(at(r,a)?h-=a.top-t.top+i.top:rt(n,a)&&(h+=o?t.top-a.top-i.top:t.bottom-a.bottom+i.bottom)),l||(ct(t,a)?d-=a.left-t.left+i.left:lt(t,a)&&(d+=t.right-a.right+i.right)),d==u&&h===p||e.scrollTo(d,h)}function nt({parent:e,getRect:t,alignToTop:o,forceScroll:s,ancestorOffset:i=0,limiterElement:n}){const r=dt(e),a=o&&s;let c,l,d;const h=n||r.document.body;for(;e!=h;)l=t(),c=new Ne(e).excludeScrollbarsAndBorders(),d=c.contains(l),a?e.scrollTop-=c.top-l.top+i:d||(at(l,c)?e.scrollTop-=c.top-l.top+i:rt(l,c)&&(e.scrollTop+=o?l.top-c.top-i:l.bottom-c.bottom+i)),d||(ct(l,c)?e.scrollLeft-=c.left-l.left+i:lt(l,c)&&(e.scrollLeft+=l.right-c.right+i)),e=e.parentNode}function rt(e,t){return e.bottom>t.bottom}function at(e,t){return e.topt.right}function dt(e){return Ie(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function ht(e){if(Ie(e)){let t=e.commonAncestorContainer;return je(t)&&(t=t.parentNode),t}return e.parentNode}function ut(e,t){const o=dt(e),s=new Ne(e);if(o===t)return s;{let e=o;for(;e!=t;){const t=e.frameElement,o=new Ne(t).excludeScrollbarsAndBorders();s.moveBy(o.left,o.top),e=e.parent}}return s}const pt={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},mt={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},ft={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},gt=At(),_t=Object.fromEntries(Object.entries(gt).map((([e,t])=>{let o;return o=t in ft?ft[t]:e.charAt(0).toUpperCase()+e.slice(1),[t,o]})));function bt(e){let t;if("string"==typeof e){if(t=gt[e.toLowerCase()],!t)throw new S("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?gt.alt:0)+(e.ctrlKey?gt.ctrl:0)+(e.shiftKey?gt.shift:0)+(e.metaKey?gt.cmd:0);return t}function kt(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return bt(e.slice(0,-1));const t=bt(e);return(a.isMac||a.isiOS)&&t==gt.ctrl?gt.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function wt(e){let t=kt(e);return Object.entries(a.isMac||a.isiOS?pt:mt).reduce(((e,[o,s])=>(t>[o]&&(t&=~gt[o],e+=s),e)),"")+(t?_t[t]:"")}function vt(e){return e==gt.arrowright||e==gt.arrowleft||e==gt.arrowup||e==gt.arrowdown}function yt(e,t){const o="ltr"===t;switch(e){case gt.arrowleft:return o?"left":"right";case gt.arrowright:return o?"right":"left";case gt.arrowup:return"up";case gt.arrowdown:return"down"}}function xt(e,t){const o=yt(e,t);return"down"===o||"right"===o}function At(){const e={pageup:33,pagedown:34,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){e[String.fromCharCode(t).toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;return Object.assign(e,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),e}const Ct=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig"];function Tt(e){return Ct.includes(e)?"rtl":"ltr"}function Et(e){return Array.isArray(e)?e:[e]}var Pt=o("./node_modules/lodash-es/merge.js");function St(e,t,o=1,s){if("number"!=typeof o)throw new S("translation-service-quantity-not-a-number",null,{quantity:o});const n=s||i.window.CKEDITOR_TRANSLATIONS,r=function(e){return Object.keys(e).length}(n);1===r&&(e=Object.keys(n)[0]);const a=t.id||t.string;if(0===r||!function(e,t,o){return!!o[e]&&!!o[e].dictionary[t]}(e,a,n))return 1!==o?t.plural:t.string;const c=n[e].dictionary,l=n[e].getPluralForm||(e=>1===e?0:1),d=c[a];if("string"==typeof d)return d;return d[Number(l(o))]}i.window.CKEDITOR_TRANSLATIONS||(i.window.CKEDITOR_TRANSLATIONS={});class Mt{uiLanguage;uiLanguageDirection;contentLanguage;contentLanguageDirection;t;translations;constructor({uiLanguage:e="en",contentLanguage:t,translations:o}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=Tt(this.uiLanguage),this.contentLanguageDirection=Tt(this.contentLanguage),this.translations=function(e){return Array.isArray(e)?e.reduce(((e,t)=>(0,Pt.A)(e,t))):e}(o),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=Et(t),"string"==typeof e&&(e={string:e});const o=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,o)=>othis._items.length||t<0)throw new S("collection-add-item-invalid-index",this);let o=0;for(const s of e){const e=this._getItemIdBeforeAdding(s),i=t+o;this._items.splice(i,0,s),this._itemMap.set(e,s),this.fire("add",s,i),o++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new S("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,o]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:o}),t}map(e,t){return this._items.map(e,t)}forEach(e,t){this._items.forEach(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new S("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,o=(o,s,i)=>{const n=t._bindToCollection==this,r=t._bindToInternalToExternalMap.get(s);if(n&&r)this._bindToExternalToInternalMap.set(s,r),this._bindToInternalToExternalMap.set(r,s);else{const o=e(s);if(!o)return void this._skippedIndexesFromExternal.push(i);let n=i;for(const e of this._skippedIndexesFromExternal)i>e&&n--;for(const e of t._skippedIndexesFromExternal)n>=e&&n++;this._bindToExternalToInternalMap.set(s,o),this._bindToInternalToExternalMap.set(o,s),this.add(o,n);for(let e=0;e{const s=this._bindToExternalToInternalMap.get(t);s&&this.remove(s),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(ot&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let o;if(t in e){if(o=e[t],"string"!=typeof o)throw new S("collection-add-invalid-id",this);if(this.get(o))throw new S("collection-add-item-already-exists",this)}else e[t]=o=C();return o}_remove(e){let t,o,s,i=!1;const n=this._idProperty;if("string"==typeof e?(o=e,s=this._itemMap.get(o),i=!s,s&&(t=this._items.indexOf(s))):"number"==typeof e?(t=e,s=this._items[t],i=!s,s&&(o=s[n])):(s=e,o=s[n],t=this._items.indexOf(s),i=-1==t||!this._itemMap.get(o)),i)throw new S("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(o);const r=this._bindToInternalToExternalMap.get(s);return this._bindToInternalToExternalMap.delete(s),this._bindToExternalToInternalMap.delete(r),this.fire("remove",s,t),[s,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function Vt(e){const t=e.next();return t.done?null:t.value}class Rt extends(Ee(oe())){_elements=new Set;_nextEventLoopTimeout=null;constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null)}add(e){if(this._elements.has(e))throw new S("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class jt{_listener;constructor(){this._listener=new(Ee())}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+bt(t),t)}))}set(e,t,o={}){const s=kt(e),i=o.priority;this._listener.listenTo(this._listener,"_keydown:"+s,((e,o)=>{t(o,(()=>{o.preventDefault(),o.stopPropagation(),e.stop()})),e.return=!0}),{priority:i})}press(e){return!!this._listener.fire("_keydown:"+bt(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function It(e){return ue(e)?new Map(e):function(e){const t=new Map;for(const o in e)t.set(o,e[o]);return t}(e)}function Bt(e,t={}){return new Promise(((o,s)=>{const i=t.signal||(new AbortController).signal;i.throwIfAborted();const n=setTimeout((function(){i.removeEventListener("abort",r),o()}),e);function r(){clearTimeout(n),s(i.reason)}i.addEventListener("abort",r,{once:!0})}))}async function Dt(e,t={}){const{maxAttempts:o=4,retryDelay:s=Nt(),signal:i=(new AbortController).signal}=t;i.throwIfAborted();for(let t=0;;t++){try{return await e()}catch(e){if(t+1>=o)throw e}await Bt(s(t),{signal:i})}}function Nt(e={}){const{delay:t=1e3,factor:o=2,maxDelay:s=1e4}=e;return e=>Math.min(o**e*t,s)}const Ft=1e4;function Lt(e,t,o,s){if(Math.max(t.length,e.length)>Ft)return e.slice(0,o).concat(t).concat(e.slice(o+s,e.length));{const i=Array.from(e);return i.splice(o,s,...t),i}}function zt(e,t){let o;function s(...i){s.cancel(),o=setTimeout((()=>e(...i)),t)}return s.cancel=()=>{clearTimeout(o)},s}function Ht(e){function t(e){return e.length>=40&&e.length<=255?"VALID":"INVALID"}if(!e)return"INVALID";let o="";try{o=atob(e)}catch(e){return"INVALID"}const s=o.split("-"),i=s[0],n=s[1];if(!n)return t(e);try{atob(n)}catch(o){try{if(atob(i),!atob(i).length)return t(e)}catch(o){return t(e)}}if(i.length<40||i.length>255)return"INVALID";let r="";try{atob(i),r=atob(n)}catch(e){return"INVALID"}if(8!==r.length)return"INVALID";const a=Number(r.substring(0,4)),c=Number(r.substring(4,6))-1,l=Number(r.substring(6,8)),d=new Date(a,c,l);return de.indexe.source)).join("|")+")";return new RegExp(`${e}|${t}(?:‍${t})*`,"ug")}},"./packages/ckeditor5-watchdog/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{Zd:()=>p,VJ:()=>d,Io:()=>s});class s{crashes=[];state="initializing";_crashNumberLimit;_now=Date.now;_minimumNonErrorTimePeriod;_boundErrorHandler;_listeners;constructor(e){if(this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const o=this._listeners[e]||[];for(const e of o)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const o=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:o}),o?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function i(e,t=new Set){const o=[e],s=new Set;let i=0;for(;o.length>i;){const e=o[i++];if(!s.has(e)&&n(e)&&!t.has(e))if(s.add(e),Symbol.iterator in e)try{for(const t of e)o.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&o.push(e[t])}return s}function n(e){const t=Object.prototype.toString.call(e),o=typeof e;return!("number"===o||"boolean"===o||"string"===o||"symbol"===o||"function"===o||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function r(e,t,o=new Set){if(e===t&&("object"==typeof(s=e)&&null!==s))return!0;var s;const n=i(e,o),r=i(t,o);for(const e of n)if(r.has(e))return!0;return!1}var a=o("./node_modules/lodash-es/throttle.js"),c=o("./node_modules/lodash-es/isElement.js"),l=o("./node_modules/lodash-es/cloneDeepWith.js");class d extends s{_editor=null;_lifecyclePromise=null;_throttledSave;_data;_lastDocumentVersion;_elementOrData;_initUsingData=!0;_editables={};_config;_excludedProps;constructor(e,t={}){super(t),this._throttledSave=(0,a.A)(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,o)=>e.create(t,o)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{const e={},t=[],o=this._config.rootsAttributes||{},s={};for(const[i,n]of Object.entries(this._data.roots))n.isLoaded?(e[i]="",s[i]=o[i]||{}):t.push(i);const i={...this._config,extraPlugins:this._config.extraPlugins||[],lazyRoots:t,rootsAttributes:s,_watchdogInitialData:this._data};return delete i.initialData,i.extraPlugins.push(h),this._initUsingData?this.create(e,i,i.context):(0,c.A)(this._elementOrData)?this.create(this._elementOrData,i,i.context):this.create(this._editables,i,i.context)})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,o){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then((()=>(super._startErrorHandling(),this._elementOrData=e,this._initUsingData="string"==typeof e||Object.keys(e).length>0&&"string"==typeof Object.values(e)[0],this._config=this._cloneEditorConfiguration(t)||{},this._config.context=o,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this.state="ready",this._fire("stateChange")})).finally((()=>{this._lifecyclePromise=null})),this._lifecyclePromise}destroy(){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))).finally((()=>{this._lifecyclePromise=null})),this._lifecyclePromise}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.cancel();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e=this._editor,t=e.model.document.roots.filter((e=>e.isAttached()&&"$graveyard"!=e.rootName)),{plugins:o}=e,s=o.has("CommentsRepository")&&o.get("CommentsRepository"),i=o.has("TrackChanges")&&o.get("TrackChanges"),n={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};t.forEach((e=>{n.roots[e.rootName]={content:JSON.stringify(Array.from(e.getChildren())),attributes:JSON.stringify(Array.from(e.getAttributes())),isLoaded:e._isLoaded}}));for(const t of e.model.markers)t._affectsData&&(n.markers[t.name]={rangeJSON:t.getRange().toJSON(),usingOperation:t._managedUsingOperations,affectsData:t._affectsData});return s&&(n.commentThreads=JSON.stringify(s.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),i&&(n.suggestions=JSON.stringify(i.getSuggestions({toJSON:!0,skipNotAttached:!0}))),n}_getEditables(){const e={};for(const t of this.editor.model.document.getRootNames()){const o=this.editor.ui.getEditableElement(t);o&&(e[t]=o)}return e}_isErrorComingFromThisItem(e){return r(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return(0,l.A)(e,((e,t)=>(0,c.A)(e)||"context"===t?e:void 0))}}class h{editor;_data;constructor(e){this.editor=e,this._data=e.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",(e=>{e.stop(),this.editor.model.enqueueChange({isUndoable:!1},(e=>{this._restoreCollaborationData(),this._restoreEditorData(e)})),this.editor.data.fire("ready")}),{priority:999})}_createNode(e,t){if("name"in t){const o=e.createElement(t.name,t.attributes);if(t.children)for(const s of t.children)o._appendChild(this._createNode(e,s));return o}return e.createText(t.data,t.attributes)}_restoreEditorData(e){const t=this.editor;Object.entries(this._data.roots).forEach((([o,{content:s,attributes:i}])=>{const n=JSON.parse(s),r=JSON.parse(i),a=t.model.document.getRoot(o);for(const[t,o]of r)e.setAttribute(t,o,a);for(const t of n){const o=this._createNode(e,t);e.insert(o,a,"end")}})),Object.entries(this._data.markers).forEach((([o,s])=>{const{document:i}=t.model,{rangeJSON:{start:n,end:r},...a}=s,c=i.getRoot(n.root),l=e.createPositionFromPath(c,n.path,n.stickiness),d=e.createPositionFromPath(c,r.path,r.stickiness),h=e.createRange(l,d);e.addMarker(o,{range:h,...a})}))}_restoreCollaborationData(){const e=JSON.parse(this._data.commentThreads),t=JSON.parse(this._data.suggestions);e.forEach((e=>{const t=this.editor.config.get("collaboration.channelId"),o=this.editor.plugins.get("CommentsRepository");if(o.hasCommentThread(e.threadId)){o.getCommentThread(e.threadId).remove()}o.addCommentThread({channelId:t,...e})})),t.forEach((e=>{const t=this.editor.plugins.get("TrackChangesEditing");if(t.hasSuggestion(e.id)){t.getSuggestion(e.id).attributes=e.attributes}else t.addSuggestionData(e)}))}}const u=Symbol("MainQueueId");class p extends s{_watchdogs=new Map;_watchdogConfig;_context=null;_contextProps=new Set;_actionQueues=new m;_contextConfig;_item;constructor(e,t={}){super(t),this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(u,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=f(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new d(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((o,{error:s,causesRestart:i})=>{this._fire("itemError",{itemId:e.id,error:s}),i&&this._actionQueues.enqueue(e.id,(()=>new Promise((o=>{const s=()=>{t.off("restart",s),this._fire("itemRestart",{itemId:e.id}),o()};t.on("restart",s)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=f(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue(u,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(u,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=i(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return r(this._context,e.context)}}class m{_onEmptyCallbacks=[];_queues=new Map;_activeActions=0;onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const o=e===u;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const s=(o?Promise.all(this._queues.values()):Promise.all([this._queues.get(u),this._queues.get(e)])).then(t),i=s.catch((()=>{}));return this._queues.set(e,i),s.finally((()=>{this._activeActions--,this._queues.get(e)===i&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function f(e){return Array.isArray(e)?e:[e]}},"./packages/ckeditor5-widget/src/index.ts":(e,t,o)=>{"use strict";o.d(t,{iW:()=>m,w_:()=>f,x0:()=>q,VE:()=>se,oP:()=>K,oT:()=>F,Wu:()=>E,Hq:()=>P,iB:()=>A,p9:()=>y,p4:()=>g,_s:()=>w,je:()=>v,Ex:()=>_,YN:()=>x,$u:()=>C});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-engine/src/index.ts"),n=o("./packages/ckeditor5-typing/src/index.ts"),r=o("./packages/ckeditor5-utils/src/index.ts"),a=o("./packages/ckeditor5-ui/src/index.ts"),c=o("./packages/ckeditor5-enter/src/index.ts");class l extends((0,r.Mm)()){_stack=[];add(e,t){const o=this._stack,s=o[0];this._insertDescriptor(e);const i=o[0];s===i||d(s,i)||this.fire("change:top",{oldDescriptor:s,newDescriptor:i,writer:t})}remove(e,t){const o=this._stack,s=o[0];this._removeDescriptor(e);const i=o[0];s===i||d(s,i)||this.fire("change:top",{oldDescriptor:s,newDescriptor:i,writer:t})}_insertDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e.id));if(d(e,t[o]))return;o>-1&&t.splice(o,1);let s=0;for(;t[s]&&h(t[s],e);)s++;t.splice(s,0,e)}_removeDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e));o>-1&&t.splice(o,1)}}function d(e,t){return e&&t&&e.priority==t.priority&&u(e.classes)==u(t.classes)}function h(e,t){return e.priority>t.priority||!(e.priorityu(t.classes)}function u(e){return Array.isArray(e)?e.sort().join(","):e}const p='',m="ck-widget",f="ck-widget_selected";function g(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function _(e,t,o={}){if(!e.is("containerElement"))throw new r.Yb("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(m,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=T,t.setCustomProperty("widgetLabel",[],e),o.label&&v(e,o.label),o.hasSelectionHandle&&function(e,t){const o=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),o=new a.Ln;return o.set("content",p),o.render(),t.appendChild(o.element),t}));t.insert(t.createPositionAt(e,0),o),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),w(e,t),e}function b(e,t,o){if(t.classes&&o.addClass((0,r.$r)(t.classes),e),t.attributes)for(const s in t.attributes)o.setAttribute(s,t.attributes[s],e)}function k(e,t,o){if(t.classes&&o.removeClass((0,r.$r)(t.classes),e),t.attributes)for(const s in t.attributes)o.removeAttribute(s,e)}function w(e,t,o=b,s=k){const i=new l;i.on("change:top",((t,i)=>{i.oldDescriptor&&s(e,i.oldDescriptor,i.writer),i.newDescriptor&&o(e,i.newDescriptor,i.writer)}));t.setCustomProperty("addHighlight",((e,t,o)=>i.add(t,o)),e),t.setCustomProperty("removeHighlight",((e,t,o)=>i.remove(t,o)),e)}function v(e,t){e.getCustomProperty("widgetLabel").push(t)}function y(e){return e.getCustomProperty("widgetLabel").reduce(((e,t)=>"function"==typeof t?e?e+". "+t():t():e?e+". "+t:t),"")}function x(e,t,o={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),t.setAttribute("tabindex","-1",e),o.label&&t.setAttribute("aria-label",o.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",((o,s,i)=>{t.setAttribute("contenteditable",i?"false":"true",e)})),e.on("change:isFocused",((o,s,i)=>{i?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),w(e,t),e}function A(e,t){const o=e.getSelectedElement();if(o){const s=O(e);if(s)return t.createRange(t.createPositionAt(o,s))}return t.schema.findOptimalInsertionRange(e)}function C(e,t){return(o,s)=>{const{mapper:i,viewPosition:n}=s,r=i.findMappedViewAncestor(n);if(!t(r))return;const a=i.toModelElement(r);s.modelPosition=e.createPositionAt(a,n.isAtStart?"before":"after")}}function T(){return null}function E(e){const t=e=>{const{width:t,paddingLeft:o,paddingRight:s}=e.ownerDocument.defaultView.getComputedStyle(e);return parseFloat(t)-(parseFloat(o)||0)-(parseFloat(s)||0)},o=e.parentElement;if(!o)return 0;let s=t(o);let i=0,n=o;for(;isNaN(s);){if(n=n.parentElement,++i>5)return 0;s=t(n)}return s}function P(e,t=new r.rw(e)){const o=E(e);return o?t.width/o*100:0}const S="widget-type-around";function M(e,t,o){return!!e&&g(e)&&!o.isInline(t)}function O(e){return e.getAttribute(S)}var V=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),R=o.n(V),j=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css"),I={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()(j.A,I);j.A.locals;const B=["before","after"],D=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,N="ck-widget__type-around_disabled";class F extends s.k_{_currentFakeCaretModelElement=null;static get pluginName(){return"WidgetTypeAround"}static get requires(){return[c.x,n.ep]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((o,s,i)=>{t.change((e=>{for(const o of t.document.roots)i?e.removeClass(N,o):e.addClass(N,o)})),i||e.model.change((e=>{e.removeSelectionAttribute(S)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const o=this.editor,s=o.editing.view,i=o.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);o.execute("insertParagraph",{position:o.model.createPositionAt(e,t),attributes:i}),s.focus(),s.scrollToTheSelection()}_listenToIfEnabled(e,t,o,s){this.listenTo(e,t,((...e)=>{this.isEnabled&&o(...e)}),s)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=O(e);if(!t)return!1;const o=e.getSelectedElement();return this._insertParagraph(o,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,o=e.locale.t,s={before:o("Insert paragraph before block"),after:o("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,i,n)=>{const r=n.mapper.toViewElement(i.item);if(r&&M(r,i.item,t)){!function(e,t,o){const s=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const o=this.toDomElement(e);return function(e,t){for(const o of B){const s=new a.Bj({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${o}`],title:t[o],"aria-hidden":"true"},children:[e.ownerDocument.importNode(D,!0)]});e.appendChild(s.render())}}(o,t),function(e){const t=new a.Bj({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(o),o}));e.insert(e.createPositionAt(o,"end"),s)}(n.writer,s,r);r.getCustomProperty("widgetLabel").push((()=>this.isEnabled?o("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,o=t.document.selection,s=t.schema,i=e.editing.view;function n(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(i.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[g,"$text"],priority:"high"}),this._listenToIfEnabled(o,"change:range",((t,o)=>{o.directChange&&e.model.change((e=>{e.removeSelectionAttribute(S)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=o.getSelectedElement();if(t){if(M(e.editing.mapper.toViewElement(t),t,s))return}e.model.change((e=>{e.removeSelectionAttribute(S)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,o)=>{const i=o.writer;if(this._currentFakeCaretModelElement){const e=o.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(i.removeClass(B.map(n),e),this._currentFakeCaretModelElement=null)}const r=t.selection.getSelectedElement();if(!r)return;const a=o.mapper.toViewElement(r);if(!M(a,r,s))return;const c=O(t.selection);c&&(i.addClass(n(c),a),this._currentFakeCaretModelElement=r)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,o,s)=>{s||e.model.change((e=>{e.removeSelectionAttribute(S)}))}))}_handleArrowKeyPress(e,t){const o=this.editor,s=o.model,i=s.document.selection,n=s.schema,a=o.editing.view,c=t.keyCode,l=(0,r.HK)(c,o.locale.contentLanguageDirection),d=a.document.selection.getSelectedElement();let h;M(d,o.editing.mapper.toModelElement(d),n)?h=this._handleArrowKeyPressOnSelectedWidget(l):i.isCollapsed?h=this._handleArrowKeyPressWhenSelectionNextToAWidget(l):t.shiftKey||(h=this._handleArrowKeyPressWhenNonCollapsedSelection(l)),h&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,o=O(t.document.selection);return t.change((t=>{if(!o)return t.setSelectionAttribute(S,e?"after":"before"),!0;if(!(o===(e?"after":"before")))return t.removeSelectionAttribute(S),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,o=t.model,s=o.schema,i=t.plugins.get("Widget"),n=i._getObjectElementNextToSelection(e);return!!M(t.editing.mapper.toViewElement(n),n,s)&&(o.change((t=>{i._setSelectionOverElement(n),t.setSelectionAttribute(S,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,o=t.model,s=o.schema,i=t.editing.mapper,n=o.document.selection,r=e?n.getLastPosition().nodeBefore:n.getFirstPosition().nodeAfter;return!!M(i.toViewElement(r),r,s)&&(o.change((t=>{t.setSelection(r,"on"),t.setSelectionAttribute(S,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((o,s)=>{const i=s.domTarget.closest(".ck-widget__type-around__button");if(!i)return;const n=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(i),r=function(e,t){const o=e.closest(".ck-widget");return t.mapDomToView(o)}(i,t.domConverter),a=e.editing.mapper.toModelElement(r);this._insertParagraph(a,n),s.preventDefault(),o.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,o=e.editing.view;this._listenToIfEnabled(o.document,"enter",((o,s)=>{if("atTarget"!=o.eventPhase)return;const i=t.getSelectedElement(),n=e.editing.mapper.toViewElement(i),r=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:M(n,i,r)&&(this._insertParagraph(i,s.isSoft?"before":"after"),a=!0),a&&(s.preventDefault(),o.stop())}),{context:g})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",((t,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=e.selection)}),{priority:"high"}),r._K.isAndroid?this._listenToIfEnabled(e,"keydown",((e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(e,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,o=e.model,s=o.schema;this._listenToIfEnabled(t.document,"delete",((t,i)=>{if("atTarget"!=t.eventPhase)return;const n=O(o.document.selection);if(!n)return;const r=i.direction,a=o.document.selection.getSelectedElement(),c="forward"==r;if("before"===n===c)e.execute("delete",{selection:o.createSelection(a,"on")});else{const t=s.getNearestSelectionRange(o.createPositionAt(a,n),r);if(t)if(t.isCollapsed){const i=o.createSelection(t.start);if(o.modifySelection(i,{direction:r}),i.focus.isEqual(t.start)){const e=function(e,t){let o=t;for(const s of t.getAncestors({parentFirst:!0})){if(s.childCount>1||e.isLimit(s))break;o=s}return o}(s,t.start.parent);o.deleteContent(o.createSelection(e,"on"),{doNotAutoparagraph:!0})}else o.change((o=>{o.setSelection(t),e.execute(c?"deleteForward":"delete")}))}else o.change((o=>{o.setSelection(t),e.execute(c?"deleteForward":"delete")}))}i.preventDefault(),t.stop()}),{context:g})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,o=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[s,i])=>{if(i&&!i.is("documentSelection"))return;const n=O(o);return n?(e.stop(),t.change((e=>{const i=o.getSelectedElement(),r=t.createPositionAt(i,n),a=e.createSelection(r),c=t.insertContent(s,a);return e.setSelection(a),c}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,o)=>{const[,s,i={}]=o;if(s&&!s.is("documentSelection"))return;const n=O(t);n&&(i.findOptimalPosition=n,o[3]=i)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[o])=>{if(o&&!o.is("documentSelection"))return;O(t)&&e.stop()}),{priority:"high"})}}function L(e){const t=e.model;return(o,s)=>{const i=s.keyCode==r.uP.arrowup,n=s.keyCode==r.uP.arrowdown,a=s.shiftKey,c=t.document.selection;if(!i&&!n)return;const l=n;if(a&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(c,l))return;const d=function(e,t,o){const s=e.model;if(o){const e=t.isCollapsed?t.focus:t.getLastPosition(),o=z(s,e,"forward");if(!o)return null;const i=s.createRange(e,o),n=H(s.schema,i,"backward");return n?s.createRange(e,n):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),o=z(s,e,"backward");if(!o)return null;const i=s.createRange(o,e),n=H(s.schema,i,"forward");return n?s.createRange(n,e):null}}(e,c,l);if(d){if(d.isCollapsed){if(c.isCollapsed)return;if(a)return}(d.isCollapsed||function(e,t,o){const s=e.model,i=e.view.domConverter;if(o){const e=s.createSelection(t.start);s.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=s.createRange(e.focus,t.end))}const n=e.mapper.toViewRange(t),a=i.viewRangeToDom(n),c=r.rw.getDomRangeRects(a);let l;for(const e of c)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,d,l))&&(t.change((e=>{const o=l?d.end:d.start;if(a){const s=t.createSelection(c.anchor);s.setFocus(o),e.setSelection(s)}else e.setSelection(o)})),o.stop(),s.preventDefault(),s.stopPropagation())}}}function z(e,t,o){const s=e.schema,i=e.createRangeIn(t.root),n="forward"==o?"elementStart":"elementEnd";for(const{previousPosition:e,item:r,type:a}of i.getWalker({startPosition:t,direction:o})){if(s.isLimit(r)&&!s.isInline(r))return e;if(a==n&&s.isBlock(r))return null}return null}function H(e,t,o){const s="backward"==o?t.end:t.start;if(e.checkChild(s,"$text"))return s;for(const{nextPosition:s}of t.getWalker({direction:o}))if(e.checkChild(s,"$text"))return s;return null}var $=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css"),W={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()($.A,W);$.A.locals;class q extends s.k_{_previouslySelected=new Set;static get pluginName(){return"Widget"}static get requires(){return[F,n.ep]}init(){const e=this.editor,t=e.editing.view,o=t.document,s=e.t;this.editor.editing.downcastDispatcher.on("selection",((t,o,s)=>{const i=s.writer,n=o.selection;if(n.isCollapsed)return;const r=n.getSelectedElement();if(!r)return;const a=e.editing.mapper.toViewElement(r);g(a)&&s.consumable.consume(n,"selection")&&i.setSelection(i.createRangeOn(a),{fake:!0,label:y(a)})})),this.editor.editing.downcastDispatcher.on("selection",((e,t,o)=>{this._clearPreviouslySelectedWidgets(o.writer);const s=o.writer,i=s.document.selection;let n=null;for(const e of i.getRanges())for(const t of e){const e=t.item;g(e)&&!U(e,n)&&(s.addClass(f,e),this._previouslySelected.add(e),n=e)}}),{priority:"low"}),t.addObserver(i.q$),this.listenTo(o,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(o,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[g,"$text"]}),this.listenTo(o,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(o,"arrowKey",L(this.editor.editing),{context:"$text"}),this.listenTo(o,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"}),this.listenTo(o,"tab",((e,t)=>{"atTarget"==e.eventPhase&&(t.shiftKey||this._selectFirstNestedEditable()&&(t.preventDefault(),e.stop()))}),{context:g,priority:"low"}),this.listenTo(o,"tab",((e,t)=>{t.shiftKey&&this._selectAncestorWidget()&&(t.preventDefault(),e.stop())}),{priority:"low"}),this.listenTo(o,"keydown",((e,t)=>{t.keystroke==r.uP.esc&&this._selectAncestorWidget()&&(t.preventDefault(),e.stop())}),{priority:"low"}),e.accessibility.addKeystrokeInfoGroup({id:"widget",label:s("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:s("Move focus from an editable area back to the parent widget"),keystroke:"Esc"},{label:s("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:s("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:s("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:s("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(e,t){const o=this.editor,s=o.editing.view,i=s.document;let n=t.target;if(t.domEvent.detail>=3)return void(this._selectBlockContent(n)&&t.preventDefault());if(function(e){let t=e;for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(g(t))return!1;t=t.parent}return!1}(n))return;if(!g(n)&&(n=n.findAncestor(g),!n))return;r._K.isAndroid&&t.preventDefault(),i.isFocused||s.focus();const a=o.editing.mapper.toModelElement(n);this._setSelectionOverElement(a)}_selectBlockContent(e){const t=this.editor,o=t.model,s=t.editing.mapper,n=o.schema,r=s.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),a=function(e,t){for(const o of e.getAncestors({includeSelf:!0,parentFirst:!0})){if(t.checkChild(o,"$text"))return o;if(t.isLimit(o)&&!t.isObject(o))break}return null}(s.toModelElement(r),o.schema);return!!a&&(o.change((e=>{const t=n.isLimit(a)?null:function(e,t){const o=new i.rU({startPosition:e});for(const{item:e}of o){if(t.isLimit(e)||!e.is("element"))return null;if(t.checkChild(e,"$text"))return e}return null}(e.createPositionAfter(a),n),o=e.createPositionAt(a,0),s=t?e.createPositionAt(t,0):e.createPositionAt(a,"end");e.setSelection(e.createRange(o,s))})),!0)}_handleSelectionChangeOnArrowKeyPress(e,t){const o=t.keyCode,s=this.editor.model,i=s.schema,n=s.document.selection,a=n.getSelectedElement(),c=(0,r.Kf)(o,this.editor.locale.contentLanguageDirection),l="down"==c||"right"==c,d="up"==c||"down"==c;if(a&&i.isObject(a)){const o=l?n.getLastPosition():n.getFirstPosition(),r=i.getNearestSelectionRange(o,l?"forward":"backward");return void(r&&(s.change((e=>{e.setSelection(r)})),t.preventDefault(),e.stop()))}if(!n.isCollapsed&&!t.shiftKey){const o=n.getFirstPosition(),r=n.getLastPosition(),a=o.nodeAfter,c=r.nodeBefore;return void((a&&i.isObject(a)||c&&i.isObject(c))&&(s.change((e=>{e.setSelection(l?r:o)})),t.preventDefault(),e.stop()))}if(!n.isCollapsed)return;const h=this._getObjectElementNextToSelection(l);if(h&&i.isObject(h)){if(i.isInline(h)&&d)return;this._setSelectionOverElement(h),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const o=this.editor.model,s=o.schema,i=o.document.selection.getSelectedElement();i&&s.isObject(i)&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.model.document.selection;if(!this.editor.model.canEditAt(t))return;if(!t.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);return o?(this.editor.model.change((e=>{let s=t.anchor.parent;for(;s.isEmpty;){const t=s;s=t.parent,e.remove(t)}this._setSelectionOverElement(o)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,o=t.schema,s=t.document.selection,i=t.createSelection(s);if(t.modifySelection(i,{direction:e?"forward":"backward"}),i.isEqual(s))return null;const n=e?i.focus.nodeBefore:i.focus.nodeAfter;return n&&o.isObject(n)?n:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(f,t);this._previouslySelected.clear()}_selectFirstNestedEditable(){const e=this.editor,t=this.editor.editing.view.document;for(const o of t.selection.getFirstRange().getItems())if(o.is("editableElement")){const t=e.editing.mapper.toModelElement(o);if(!t)continue;const s=e.model.createPositionAt(t,0),i=e.model.schema.getNearestSelectionRange(s,"forward");return e.model.change((e=>{e.setSelection(i)})),!0}return!1}_selectAncestorWidget(){const e=this.editor,t=e.editing.mapper,o=e.editing.view.document.selection.getFirstPosition().parent,s=(o.is("$text")?o.parent:o).findAncestor(g);if(!s)return!1;const i=t.toModelElement(s);return!!i&&(e.model.change((e=>{e.setSelection(i,"on")})),!0)}}function U(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class K extends s.k_{_toolbarDefinitions=new Map;_balloon;static get requires(){return[a.pU]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!g(t))})(e.editing.view.document.selection)&&t.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:o,getRelatedElement:s,balloonClassName:i="ck-toolbar-container"}){if(!o.length)return void(0,r.FF)("widget-toolbar-no-items",{toolbarId:e});const n=this.editor,c=n.t,l=new a.X3(n.locale);if(l.ariaLabel=t||c("Widget toolbar"),this._toolbarDefinitions.has(e))throw new r.Yb("widget-toolbar-duplicated",this,{toolbarId:e});const d={view:l,getRelatedElement:s,balloonClassName:i,itemsConfig:o,initialized:!1};n.ui.addToolbar(l,{isContextual:!0,beforeFocus:()=>{const e=s(n.editing.view.document.selection);e&&this._showToolbar(d,e)},afterBlur:()=>{this._hideToolbar(d)}}),this._toolbarDefinitions.set(e,d)}_updateToolbarsVisibility(){let e=0,t=null,o=null;for(const s of this._toolbarDefinitions.values()){const i=s.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&i)if(this.editor.ui.focusTracker.isFocused){const n=i.getAncestors().length;n>e&&(e=n,t=i,o=s)}else this._isToolbarVisible(s)&&this._hideToolbar(s);else this._isToolbarInBalloon(s)&&this._hideToolbar(s)}o&&this._showToolbar(o,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?Y(this.editor,t):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:G(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);Y(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function Y(e,t){const o=e.plugins.get("ContextualBalloon"),s=G(e,t);o.updatePosition(s)}function G(e,t){const o=e.editing.view,s=a.Jr.defaultPositions;return{target:o.domConverter.mapViewToDom(t),positions:[s.northArrowSouth,s.northArrowSouthWest,s.northArrowSouthEast,s.southArrowNorth,s.southArrowNorthWest,s.southArrowNorthEast,s.viewportStickyNorth]}}class Z extends((0,r.VM)()){_referenceCoordinates;_options;_originalWidth;_originalHeight;_originalWidthPercents;_aspectRatio;constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,o){const s=new r.rw(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const o of t)if(e.classList.contains(J(o)))return o}(e),this._referenceCoordinates=function(e,t){const o=new r.rw(e),s=t.split("-"),i={x:"right"==s[1]?o.right:o.left,y:"bottom"==s[0]?o.bottom:o.top};return i.x+=e.ownerDocument.defaultView.scrollX,i.y+=e.ownerDocument.defaultView.scrollY,i}(t,function(e){const t=e.split("-"),o={top:"bottom",bottom:"top",left:"right",right:"left"};return`${o[t[0]]}-${o[t[1]]}`}(this.activeHandlePosition)),this._originalWidth=s.width,this._originalHeight=s.height,this._aspectRatio=s.width/s.height;const i=o.style.width;i&&i.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(i):this._originalWidthPercents=P(o,s)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function J(e){return`ck-widget__resizer__handle-${e}`}class X extends a.Ss{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",(e=>e?`ck-orientation-${e}`:""))],style:{display:e.if("_isVisible","none",(e=>!e))}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",((e,t)=>null!==e&&null!==t)),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",((t,o,s)=>"px"===e.unit?`${t}×${o}`:`${s}%`)),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",((e,t,o)=>t<50||o<50?"above-center":e))}_dismiss(){this.unbind(),this._isVisible=!1}}class Q extends((0,r.VM)()){_state;_sizeView;_options;_viewResizerWrapper=null;_initialViewWidth;constructor(e){super(),this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((e,t)=>e&&t)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())}),{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change((e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((e=>{e.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change((o=>{const s=o.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const o=this.toDomElement(t);return e._appendHandles(o),e._appendSizeUI(o),o}));o.insert(o.createPositionAt(t,"end"),s),o.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=s,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(e){this._state=new Z(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change((e=>{const o=this._options.unit||"%",s=("%"===o?t.widthPercents:t.width)+o;e.setStyle("width",s,this._options.viewElement)}));const o=this._getHandleHost(),s=new r.rw(o),i=Math.round(s.width),n=Math.round(s.height),a=new r.rw(o);t.width=Math.round(a.width),t.height=Math.round(a.height),this.redraw(s),this.state.update({...t,handleHostWidth:i,handleHostHeight:n})}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(t)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((o=t)&&o.ownerDocument&&o.ownerDocument.contains(o)))return;var o;const s=t.parentElement,i=this._getHandleHost(),n=this._viewResizerWrapper,a=[n.getStyle("width"),n.getStyle("height"),n.getStyle("left"),n.getStyle("top")];let c;if(s.isSameNode(i)){const t=e||new r.rw(i);c=[t.width+"px",t.height+"px",void 0,void 0]}else c=[i.offsetWidth+"px",i.offsetHeight+"px",i.offsetLeft+"px",i.offsetTop+"px"];"same"!==(0,r.ww)(a,c)&&this._options.editor.editing.view.change((e=>{e.setStyle({width:c[0],height:c[1],left:c[2],top:c[3]},n)}))}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(e){const t=this.state,o={x:(s=e).pageX,y:s.pageY};var s;const i=!this._options.isCentered||this._options.isCentered(this),n={x:t._referenceCoordinates.x-(o.x+t.originalWidth),y:o.y-t.originalHeight-t._referenceCoordinates.y};i&&t.activeHandlePosition.endsWith("-right")&&(n.x=o.x-(t._referenceCoordinates.x+t.originalWidth)),i&&(n.x*=2);let r=Math.abs(t.originalWidth+n.x),a=Math.abs(t.originalHeight+n.y);return"width"==(r/t.aspectRatio>a?"width":"height")?a=r/t.aspectRatio:r=a*t.aspectRatio,{width:Math.round(r),height:Math.round(a),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*r*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const s of t)e.appendChild(new a.Bj({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(o=s,`ck-widget__resizer__handle-${o}`)}}).render());var o}_appendSizeUI(e){this._sizeView=new X,this._sizeView.render(),e.appendChild(this._sizeView.element)}}var ee=o("./node_modules/lodash-es/throttle.js"),te=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css"),oe={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};R()(te.A,oe);te.A.locals;class se extends s.k_{_resizers=new Map;_observer;_redrawSelectedResizerThrottled;static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=r.Sf.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(i.q$),this._observer=new((0,r.c5)()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=(0,ee.A)((()=>this.redrawSelectedResizer()),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())}),{priority:"lowest"}),this._observer.listenTo(r.Sf.window,"resize",this._redrawSelectedResizerThrottled);const o=this.editor.editing.view.document.selection;o.on("change",(()=>{const e=o.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()}))}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new Q(e),o=this.editor.plugins;if(t.attach(),o.has("WidgetToolbarRepository")){const e=o.get("WidgetToolbarRepository");t.on("begin",(()=>{e.forceDisabled("resize")}),{priority:"lowest"}),t.on("cancel",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"}),t.on("commit",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(e.viewElement,t);const s=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(s)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const o=t.domTarget;Q.isResizeHandle(o)&&(this._activeResizer=this._getResizerByHandle(o)||null,this._activeResizer&&(this._activeResizer.begin(o),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":(e,t,o)=>{"use strict";var s,i=function(){return void 0===s&&(s=Boolean(window&&document&&document.all&&!window.atob)),s},n=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),r=[];function a(e){for(var t=-1,o=0;o{"use strict";o.r(t),o.d(t,{Clipboard:()=>he,ClipboardMarkersUtils:()=>H,ClipboardPipeline:()=>$,DragDrop:()=>re,DragDropBlockToolbar:()=>te,DragDropTarget:()=>G,PastePlainText:()=>de});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-utils/src/index.ts"),n=o("./packages/ckeditor5-engine/src/index.ts");class r extends n.$A{domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];constructor(e){super(e);const t=this.document;function o(e){return(o,s)=>{s.preventDefault();const n=s.dropRange?[s.dropRange]:null,r=new i.vY(t,e);t.fire(r,{dataTransfer:s.dataTransfer,method:o.name,targetRanges:n,target:s.target,domEvent:s.domEvent}),r.stop.called&&s.stopPropagation()}}this.listenTo(t,"paste",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",o("dragging"),{priority:"low"})}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,o="drop"==e.type||"paste"==e.type,s={dataTransfer:new n._v(t,{cacheFiles:o})};"drop"!=e.type&&"dragover"!=e.type||(s.dropRange=function(e,t){const o=t.target.ownerDocument,s=t.clientX,i=t.clientY;let n;o.caretRangeFromPoint&&o.caretRangeFromPoint(s,i)?n=o.caretRangeFromPoint(s,i):t.rangeParent&&(n=o.createRange(),n.setStart(t.rangeParent,t.rangeOffset),n.collapse(!0));if(n)return e.domConverter.domRangeToView(n);return null}(this.view,e)),this.fire(e.type,e,s)}}const a=["figcaption","li"],c=["ol","ul"];function l(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"\n";let t="",o=null;for(const s of e.getChildren())t+=d(s,o)+l(s),o=s;return t}function d(e,t){return t?e.is("element","li")&&!e.isEmpty&&e.getChild(0).is("containerElement")||c.includes(e.name)&&c.includes(t.name)?"\n\n":e.is("containerElement")||t.is("containerElement")?a.includes(e.name)||a.includes(t.name)?"\n":"\n\n":"":""}var h=o("./node_modules/lodash-es/_baseAssignValue.js"),u=o("./node_modules/lodash-es/_baseFor.js"),p=o("./node_modules/lodash-es/keys.js");const m=function(e,t){return e&&(0,u.A)(e,t,p.A)};var f=o("./node_modules/lodash-es/_Stack.js"),g=o("./node_modules/lodash-es/_baseIsEqual.js");const _=function(e,t,o,s){var i=o.length,n=i,r=!s;if(null==e)return!n;for(e=Object(e);i--;){var a=o[i];if(r&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++ie.model.getSelectedContent(e.model.document.selection)){return this.editor.model.change((s=>{const i=s.model.document.selection;s.setSelection(t);const n=this._insertFakeMarkersIntoSelection(s,s.model.document.selection,e),r=o(s),a=this._removeFakeMarkersInsideElement(s,r);for(const[e,t]of Object.entries(n)){a[e]||=s.createRangeIn(r);for(const e of t)s.remove(e)}r.markers.clear();for(const[e,t]of Object.entries(a))r.markers.set(e,t);return s.setSelection(i),r}))}_pasteMarkersIntoTransformedElement(e,t){const o=this._getPasteMarkersFromRangeMap(e);return this.editor.model.change((e=>{const s=this._insertFakeMarkersElements(e,o),i=t(e),n=this._removeFakeMarkersInsideElement(e,i);for(const t of Object.values(s).flat())e.remove(t);for(const[t,o]of Object.entries(n))e.model.markers.has(t)||e.addMarker(t,{usingOperation:!0,affectsData:!0,range:o});return i}))}_pasteFragmentWithMarkers(e){const t=this._getPasteMarkersFromRangeMap(e.markers);e.markers.clear();for(const o of t)e.markers.set(o.name,o.range);return this.editor.model.insertContent(e)}_forceMarkersCopy(e,t,o={allowedActions:"all",copyPartiallySelected:!0,duplicateOnPaste:!0}){const s=this._markersToCopy.get(e);this._markersToCopy.set(e,o),t(),s?this._markersToCopy.set(e,s):this._markersToCopy.delete(e)}_isMarkerCopyable(e,t){const o=this._getMarkerClipboardConfig(e);if(!o)return!1;if(!t)return!0;const{allowedActions:s}=o;return"all"===s||s.includes(t)}_hasMarkerConfiguration(e){return!!this._getMarkerClipboardConfig(e)}_getMarkerClipboardConfig(e){const[t]=e.split(":");return this._markersToCopy.get(t)||null}_insertFakeMarkersIntoSelection(e,t,o){const s=this._getCopyableMarkersFromSelection(e,t,o);return this._insertFakeMarkersElements(e,s)}_getCopyableMarkersFromSelection(e,t,o){const s=Array.from(t.getRanges()),i=new Set(s.flatMap((t=>Array.from(e.model.markers.getMarkersIntersectingRange(t)))));return Array.from(i).filter((e=>{if(!this._isMarkerCopyable(e.name,o))return!1;const{copyPartiallySelected:t}=this._getMarkerClipboardConfig(e.name);if(!t){const t=e.getRange();return s.some((e=>e.containsRange(t,!0)))}return!0})).map((e=>({name:"dragstart"===o?this._getUniqueMarkerName(e.name):e.name,range:e.getRange()})))}_getPasteMarkersFromRangeMap(e,t=null){const{model:o}=this.editor;return(e instanceof Map?Array.from(e.entries()):Object.entries(e)).flatMap((([e,s])=>{if(!this._hasMarkerConfiguration(e))return[{name:e,range:s}];if(this._isMarkerCopyable(e,t)){const t=this._getMarkerClipboardConfig(e),i=o.markers.has(e)&&"$graveyard"===o.markers.get(e).getRange().root.rootName;return(t.duplicateOnPaste||i)&&(e=this._getUniqueMarkerName(e)),[{name:e,range:s}]}return[]}))}_insertFakeMarkersElements(e,t){const o={},s=t.flatMap((e=>{const{start:t,end:o}=e.range;return[{position:t,marker:e,type:"start"},{position:o,marker:e,type:"end"}]})).sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:t,marker:i,type:n}of s){const s=e.createElement("$marker",{"data-name":i.name,"data-type":n});o[i.name]||(o[i.name]=[]),o[i.name].push(s),e.insert(s,t)}return o}_removeFakeMarkersInsideElement(e,t){const o=this._getAllFakeMarkersFromElement(e,t).reduce(((t,o)=>{const s=o.markerElement&&e.createPositionBefore(o.markerElement);let i=t[o.name],n=!1;if(i&&i.start&&i.end){this._getMarkerClipboardConfig(o.name).duplicateOnPaste?t[this._getUniqueMarkerName(o.name)]=t[o.name]:n=!0,i=null}return n||(t[o.name]={...i,[o.type]:s}),o.markerElement&&e.remove(o.markerElement),t}),{});return z(o,(o=>new n.Q6(o.start||e.createPositionFromPath(t,[0]),o.end||e.createPositionAt(t,"end"))))}_getAllFakeMarkersFromElement(e,t){const o=Array.from(e.createRangeIn(t)).flatMap((({item:e})=>{if(!e.is("element","$marker"))return[];const t=e.getAttribute("data-name"),o=e.getAttribute("data-type");return[{markerElement:e,name:t,type:o}]})),s=[],i=[];for(const e of o){if("end"===e.type){o.some((t=>t.name===e.name&&"start"===t.type))||s.push({markerElement:null,name:e.name,type:"start"})}if("start"===e.type){o.some((t=>t.name===e.name&&"end"===t.type))||i.unshift({markerElement:null,name:e.name,type:"end"})}}return[...s,...o,...i]}_getUniqueMarkerName(e){const t=e.split(":"),o=(0,i.Ld)().substring(1,6);return 3===t.length?`${t.slice(0,2).join(":")}:${o}`:`${t.join(":")}:${o}`}}class $ extends s.k_{static get pluginName(){return"ClipboardPipeline"}static get requires(){return[H]}init(){this.editor.editing.view.addObserver(r),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(e,t,o){const s=this.editor.plugins.get("ClipboardMarkersUtils");this.editor.model.enqueueChange({isUndoable:"cut"===o},(()=>{const i=s._copySelectedFragmentWithMarkers(o,t);this.fire("outputTransformation",{dataTransfer:e,content:i,method:o})}))}_setupPasteDrop(){const e=this.editor,t=e.model,o=e.editing.view,s=o.document,n=this.editor.plugins.get("ClipboardMarkersUtils");this.listenTo(s,"clipboardInput",((t,o)=>{"paste"!=o.method||e.model.canEditAt(e.model.document.selection)||t.stop()}),{priority:"highest"}),this.listenTo(s,"clipboardInput",((e,t)=>{const s=t.dataTransfer;let n;if(t.content)n=t.content;else{let e="";s.getData("text/html")?e=function(e){return e.replace(/(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(//g,"")}(s.getData("text/html")):s.getData("text/plain")&&(((r=(r=s.getData("text/plain")).replace(/&/g,"&").replace(//g,">").replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
").replace(/\t/g,"    ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).includes("

")||r.includes("
"))&&(r=`

${r}

`),e=r),n=this.editor.data.htmlProcessor.toView(e)}var r;const a=new i.vY(this,"inputTransformation");this.fire(a,{content:n,dataTransfer:s,targetRanges:t.targetRanges,method:t.method}),a.stop.called&&e.stop(),o.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,o)=>{if(o.content.isEmpty)return;const s=this.editor.data.toModel(o.content,"$clipboardHolder");0!=s.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:s,method:o.method,dataTransfer:o.dataTransfer,targetRanges:o.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,t)=>{t.resultRange=n._pasteFragmentWithMarkers(t.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,o=e.editing.view.document,s=(e,o)=>{const s=o.dataTransfer;o.preventDefault(),this._fireOutputTransformationEvent(s,t.selection,e.name)};this.listenTo(o,"copy",s,{priority:"low"}),this.listenTo(o,"cut",((t,o)=>{e.model.canEditAt(e.model.document.selection)?s(t,o):o.preventDefault()}),{priority:"low"}),this.listenTo(this,"outputTransformation",((t,s)=>{const i=e.data.toView(s.content);o.fire("clipboardOutput",{dataTransfer:s.dataTransfer,content:i,method:s.method})}),{priority:"low"}),this.listenTo(o,"clipboardOutput",((o,s)=>{s.content.isEmpty||(s.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(s.content)),s.dataTransfer.setData("text/plain",l(s.content))),"cut"==s.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}var W=o("./packages/ckeditor5-widget/src/index.ts"),q=o("./packages/ckeditor5-ui/src/index.ts");const U=(0,i.To)("px");class K extends q.Ss{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",(e=>!e))],style:{left:e.to("left",(e=>U(e))),top:e.to("top",(e=>U(e))),width:e.to("width",(e=>U(e)))}}})}}var Y=o("./node_modules/lodash-es/throttle.js");class G extends s.k_{removeDropMarkerDelayed=(0,i.cb)((()=>this.removeDropMarker()),40);_updateDropMarkerThrottled=(0,Y.A)((e=>this._updateDropMarker(e)),40);_reconvertMarkerThrottled=(0,Y.A)((()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")}),0);_dropTargetLineView=new K;_domEmitter=new((0,i.c5)());_scrollables=new Map;static get pluginName(){return"DragDropTarget"}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,t,o,s,i,n){this.removeDropMarkerDelayed.cancel();const r=Z(this.editor,e,t,o,s,i,n);if(r)return n&&n.containsRange(r)?this.removeDropMarker():void this._updateDropMarkerThrottled(r)}getFinalDropRange(e,t,o,s,i,n){const r=Z(this.editor,e,t,o,s,i,n);return this.removeDropMarker(),r}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change((e=>{e.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:(t,{writer:o})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(o);t.markerRange.isCollapsed?this._updateDropTargetLine(t.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const t=this.editor,o=t.model.markers;t.model.change((t=>{o.has("drop-target")?o.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("⁠",e.createElement("span"),"⁠"),t}))}_updateDropTargetLine(e){const t=this.editor.editing,o=e.start.nodeBefore,s=e.start.nodeAfter,n=e.start.parent,r=o?t.mapper.toViewElement(o):null,a=r?t.view.domConverter.mapViewToDom(r):null,c=s?t.mapper.toViewElement(s):null,l=c?t.view.domConverter.mapViewToDom(c):null,d=t.mapper.toViewElement(n);if(!d)return;const h=t.view.domConverter.mapViewToDom(d),u=this._getScrollableRect(d),{scrollX:p,scrollY:m}=i.Sf.window,f=a?new i.rw(a):null,g=l?new i.rw(l):null,_=new i.rw(h).excludeScrollbarsAndBorders(),b=f?f.bottom:_.top,k=g?g.top:_.bottom,w=i.Sf.window.getComputedStyle(h),v=b<=k?(b+k)/2:k;if(u.topa.schema.checkChild(n,e)))){if(a.schema.checkChild(n,"$text"))return a.createRange(n);if(t)return X(e,ee(e,t.parent),s,i)}}}else if(a.schema.isInline(l))return X(e,l,s,i);if(a.schema.isBlock(l))return X(e,l,s,i);if(a.schema.checkChild(l,"$block")){const t=Array.from(l.getChildren()).filter((t=>t.is("element")&&!J(e,t)));let o=0,n=t.length;if(0==n)return a.createRange(a.createPositionAt(l,"end"));for(;o{o?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")})),i._K.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const t=e.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(t,"dragstart",((e,t)=>this._handleBlockDragStart(t))),this._domEmitter.listenTo(i.Sf.document,"dragover",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(i.Sf.document,"drop",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(i.Sf.document,"dragend",(()=>this._handleBlockDragEnd()),{useCapture:!0}),this.isEnabled&&t.setAttribute("draggable","true"),this.on("change:isEnabled",((e,o,s)=>{t.setAttribute("draggable",s?"true":"false")}))}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const t=this.editor.model,o=t.document.selection,s=this.editor.editing.view,i=Array.from(o.getSelectedBlocks()),n=t.createRange(t.createPositionBefore(i[0]),t.createPositionAfter(i[i.length-1]));t.change((e=>e.setSelection(n))),this._isBlockDragging=!0,s.focus(),s.getObserver(r).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const t=e.clientX+("ltr"==this.editor.locale.contentLanguageDirection?100:-100),o=e.clientY,s=document.elementFromPoint(t,o),i=this.editor.editing.view;s&&s.closest(".ck-editor__editable")&&i.getObserver(r).onDomEvent({...e,type:e.type,dataTransfer:e.dataTransfer,target:s,clientX:t,clientY:o,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()})}_handleBlockDragEnd(){this._isBlockDragging=!1}}var oe=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),se=o.n(oe),ie=o("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css"),ne={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};se()(ie.A,ne);ie.A.locals;class re extends s.k_{_draggedRange;_draggingUid;_draggableElement;_clearDraggableAttributesDelayed=(0,i.cb)((()=>this._clearDraggableAttributes()),40);_blockMode=!1;_domEmitter=new((0,i.c5)());_previewContainer;static get pluginName(){return"DragDrop"}static get requires(){return[$,W.x0,G,te]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,t.addObserver(r),t.addObserver(n.q$),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,o)=>{o?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,o)=>{o||this._finalizeDragging(!1)})),i._K.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,t=e.model,o=e.editing.view,s=o.document,n=e.plugins.get(G);this.listenTo(s,"dragstart",((e,o)=>{if(o.target&&o.target.is("editableElement"))return void o.preventDefault();if(this._prepareDraggedRange(o.target),!this._draggedRange)return void o.preventDefault();this._draggingUid=(0,i.Ld)(),o.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",o.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const s=t.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(o.dataTransfer,s,"dragstart");const{dataTransfer:n,domTarget:r,domEvent:a}=o,{clientX:c}=a;this._updatePreview({dataTransfer:n,domTarget:r,clientX:c}),o.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(s,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this._domEmitter.listenTo(i.Sf.document,"dragend",(()=>{this._blockMode=!1}),{useCapture:!0}),this.listenTo(s,"dragenter",(()=>{this.isEnabled&&o.focus()})),this.listenTo(s,"dragleave",(()=>{n.removeDropMarkerDelayed()})),this.listenTo(s,"dragging",((e,t)=>{if(!this.isEnabled)return void(t.dataTransfer.dropEffect="none");const{clientX:o,clientY:s}=t.domEvent;n.updateDropMarker(t.target,t.targetRanges,o,s,this._blockMode,this._draggedRange),this._draggedRange||(t.dataTransfer.dropEffect="copy"),i._K.isGecko||("copy"==t.dataTransfer.effectAllowed?t.dataTransfer.dropEffect="copy":["all","copyMove"].includes(t.dataTransfer.effectAllowed)&&(t.dataTransfer.dropEffect="move")),e.stop()}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document,o=e.plugins.get(G);this.listenTo(t,"clipboardInput",((t,s)=>{if("drop"!=s.method)return;const{clientX:i,clientY:n}=s.domEvent,r=o.getFinalDropRange(s.target,s.targetRanges,i,n,this._blockMode,this._draggedRange);if(!r)return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=s.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==ae(s.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(r,!0))return this._finalizeDragging(!1),void t.stop();s.targetRanges=[e.editing.mapper.toViewRange(r)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get($);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(o)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o="move"==ae(t.dataTransfer),s=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(s&&o)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,o=t.document;this.listenTo(o,"mousedown",((s,n)=>{if(i._K.isAndroid||!n)return;this._clearDraggableAttributesDelayed.cancel();let r=ce(n.target);if(i._K.isBlink&&!e.isReadOnly&&!r&&!o.selection.isCollapsed){const e=o.selection.getSelectedElement();e&&(0,W.p4)(e)||(r=o.selection.editableElement)}r&&(t.change((e=>{e.setAttribute("draggable","true",r)})),this._draggableElement=e.editing.mapper.toModelElement(r))})),this.listenTo(o,"mouseup",(()=>{i._K.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_finalizeDragging(e){const t=this.editor,o=t.model;if(t.plugins.get(G).removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&o.change((e=>{const t=o.createSelection(this._draggedRange);o.deleteContent(t,{doNotAutoparagraph:!0});const s=t.getFirstPosition().parent;s.isEmpty&&!o.schema.checkChild(s,"$text")&&o.schema.checkChild(s,"paragraph")&&e.insertElement("paragraph",s,0)})),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const t=this.editor,o=t.model,s=o.document.selection,i=e?ce(e):null;if(i){const e=t.editing.mapper.toModelElement(i);if(this._draggedRange=n.Oo.fromRange(o.createRangeOn(e)),this._blockMode=o.schema.isBlock(e),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}return}if(s.isCollapsed&&!s.getFirstPosition().parent.isEmpty)return;const r=Array.from(s.getSelectedBlocks()),a=s.getFirstRange();if(0==r.length)return void(this._draggedRange=n.Oo.fromRange(a));const c=le(o,r);if(r.length>1)this._draggedRange=n.Oo.fromRange(c),this._blockMode=!0;else if(1==r.length){const e=a.start.isTouching(c.start)&&a.end.isTouching(c.end);this._draggedRange=n.Oo.fromRange(e?c:a),this._blockMode=e}o.change((e=>e.setSelection(this._draggedRange.toRange())))}_updatePreview({dataTransfer:e,domTarget:t,clientX:o}){const s=this.editor.editing.view,n=s.document.selection.editableElement,r=s.domConverter.mapViewToDom(n),a=i.Sf.window.getComputedStyle(r);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=(0,i.n)(i.Sf.document,"div",{style:"position: fixed; left: -999999px;"}),i.Sf.document.body.appendChild(this._previewContainer));const c=new i.rw(r);if(r.contains(t))return;const l=parseFloat(a.paddingLeft),d=(0,i.n)(i.Sf.document,"div");d.className="ck ck-content",d.style.width=a.width,d.style.paddingLeft=`${c.left-o+l}px`,i._K.isiOS&&(d.style.backgroundColor="white"),d.innerHTML=e.getData("text/html"),e.setDragImage(d,0,0),this._previewContainer.appendChild(d)}}function ae(e){return i._K.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function ce(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(W.p4);if((0,W.p4)(e))return e;const t=e.findAncestor((e=>(0,W.p4)(e)||e.is("editableElement")));return(0,W.p4)(t)?t:null}function le(e,t){const o=t[0],s=t[t.length-1],i=o.getCommonAncestor(s),n=e.createPositionBefore(o),r=e.createPositionAfter(s);if(i&&i.is("element")&&!e.schema.isLimit(i)){const t=e.createRangeOn(i),o=n.isTouching(t.start),s=r.isTouching(t.end);if(o&&s)return le(e,[i])}return e.createRange(n,r)}class de extends s.k_{static get pluginName(){return"PastePlainText"}static get requires(){return[$]}init(){const e=this.editor,t=e.model,o=e.editing.view,s=o.document,i=t.document.selection;let n=!1;o.addObserver(r),this.listenTo(s,"keydown",((e,t)=>{n=t.shiftKey})),e.plugins.get($).on("contentInsertion",((e,o)=>{(n||function(e,t){if(e.childCount>1)return!1;const o=e.getChild(0);if(t.isObject(o))return!1;return 0==Array.from(o.getAttributeKeys()).length}(o.content,t.schema))&&t.change((e=>{const s=Array.from(i.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));i.isCollapsed||t.deleteContent(i,{doNotAutoparagraph:!0}),s.push(...i.getAttributes());const n=e.createRangeIn(o.content);for(const t of n.getItems())t.is("$textProxy")&&e.setAttributes(s,t)}))}))}}class he extends s.k_{static get pluginName(){return"Clipboard"}static get requires(){return[H,$,re,de]}init(){const e=this.editor,t=this.editor.t;e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Copy selected content"),keystroke:"CTRL+C"},{label:t("Paste content"),keystroke:"CTRL+V"},{label:t("Paste content as plain text"),keystroke:"CTRL+SHIFT+V"}]})}}},"./src/core.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Command:()=>s.uB,Context:()=>s.ob,ContextPlugin:()=>s.HY,DataApiMixin:()=>s.CC,Editor:()=>s.KE,ElementApiMixin:()=>s.mJ,MultiCommand:()=>s.fE,PendingActions:()=>s.TS,Plugin:()=>s.k_,attachToForm:()=>s.JF,icons:()=>s.Pt,secureSourceElement:()=>s.Jl});var s=o("./packages/ckeditor5-core/src/index.ts")},"./src/engine.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{AttributeElement:()=>s.Zq,AttributeOperation:()=>s.ML,BubblingEventInfo:()=>s.cJ,ClickObserver:()=>s.Re,Conversion:()=>s.dY,DataController:()=>s.P3,DataTransfer:()=>s._v,DocumentFragment:()=>s.kB,DocumentSelection:()=>s.oi,DomConverter:()=>s.P$,DomEventData:()=>s.FY,DomEventObserver:()=>s.$A,DowncastWriter:()=>s.zN,EditingController:()=>s.L_,EditingView:()=>s.gK,Element:()=>s.Hg,FocusObserver:()=>s.vp,History:()=>s.BZ,HtmlDataProcessor:()=>s.q6,InsertOperation:()=>s.ZG,LivePosition:()=>s.m8,LiveRange:()=>s.Oo,MarkerOperation:()=>s.m4,Matcher:()=>s.PN,MergeOperation:()=>s.GY,Model:()=>s.Kx,MouseObserver:()=>s.q$,MoveOperation:()=>s.hW,NoOperation:()=>s.fS,Observer:()=>s.nu,OperationFactory:()=>s.cr,Position:()=>s.yX,Range:()=>s.Q6,RenameOperation:()=>s.EZ,Renderer:()=>s.A4,RootAttributeOperation:()=>s.gf,RootOperation:()=>s.at,SplitOperation:()=>s._A,StylesMap:()=>s.DG,StylesProcessor:()=>s.tG,TabObserver:()=>s.Yi,Text:()=>s.EY,TextProxy:()=>s.Qo,TreeWalker:()=>s.rU,UpcastWriter:()=>s.Wq,ViewAttributeElement:()=>s.UJ,ViewContainerElement:()=>s.xQ,ViewDocument:()=>s.Vg,ViewDocumentFragment:()=>s.f5,ViewEditableElement:()=>s.OQ,ViewElement:()=>s.m2,ViewEmptyElement:()=>s.Vt,ViewRawElement:()=>s.aZ,ViewRootEditableElement:()=>s.Un,ViewText:()=>s.HQ,ViewTreeWalker:()=>s.u$,ViewUIElement:()=>s.cw,XmlDataProcessor:()=>s.ib,_getModelData:()=>s.XI,_getViewData:()=>s.vQ,_parseModel:()=>s.IG,_parseView:()=>s.kF,_setModelData:()=>s.je,_setViewData:()=>s.JV,_stringifyModel:()=>s.aU,_stringifyView:()=>s._$,addBackgroundRules:()=>s.D0,addBorderRules:()=>s.v7,addMarginRules:()=>s.vt,addPaddingRules:()=>s.mC,disablePlaceholder:()=>s.Kc,enablePlaceholder:()=>s.JT,getBoxSidesShorthandValue:()=>s.qE,getBoxSidesValueReducer:()=>s.rC,getBoxSidesValues:()=>s.QS,getFillerOffset:()=>s.SH,getPositionShorthandNormalizer:()=>s.gz,getShorthandValues:()=>s.M1,hidePlaceholder:()=>s.YU,isAttachment:()=>s.s5,isColor:()=>s._o,isLength:()=>s.Vq,isLineStyle:()=>s.ew,isPercentage:()=>s.fp,isPosition:()=>s.E,isRepeat:()=>s.Cd,isURL:()=>s.mv,needsPlaceholder:()=>s.$0,showPlaceholder:()=>s.Zu,transformSets:()=>s._j});var s=o("./packages/ckeditor5-engine/src/index.ts")},"./src/enter.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Enter:()=>s.x,ShiftEnter:()=>s.D});var s=o("./packages/ckeditor5-enter/src/index.ts")},"./src/paragraph.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Paragraph:()=>c,ParagraphButtonUI:()=>d});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-utils/src/index.ts");class n extends s.uB{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=e.document,o=(0,i.$1)(t.selection.getSelectedBlocks());this.value=!!o&&o.is("element","paragraph"),this.isEnabled=!!o&&r(o,e.schema)}execute(e={}){const t=this.editor.model,o=t.document,s=e.selection||o.selection;t.canEditAt(s)&&t.change((e=>{const o=s.getSelectedBlocks();for(const s of o)!s.is("element","paragraph")&&r(s,t.schema)&&e.rename(s,"paragraph")}))}}function r(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class a extends s.uB{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,o=e.attributes;let s=e.position;t.canEditAt(s)&&t.change((e=>{if(s=this._findPositionToInsertParagraph(s,e),!s)return;const i=e.createElement("paragraph");o&&t.schema.setAllowedAttributes(i,o,e),t.insertContent(i,s),e.setSelection(i,"in")}))}_findPositionToInsertParagraph(e,t){const o=this.editor.model;if(o.schema.checkChild(e,"paragraph"))return e;const s=o.schema.findAllowedParent(e,"paragraph");if(!s)return null;const i=e.parent,n=o.schema.checkChild(i,"$text");return i.isEmpty||n&&e.isAtEnd?o.createPositionAfter(i):!i.isEmpty&&n&&e.isAtStart?o.createPositionBefore(i):t.split(e,s).position}}class c extends s.k_{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new n(e)),e.commands.add("insertParagraph",new a(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>c.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}static paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"])}var l=o("./packages/ckeditor5-ui/src/index.ts");class d extends s.k_{static get requires(){return[c]}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("paragraph",(o=>{const i=new l._(o),n=e.commands.get("paragraph");return i.label=t("Paragraph"),i.icon=s.Pt.paragraph,i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(n),i.bind("isOn").to(n,"value"),i.on("execute",(()=>{e.execute("paragraph")})),i}))}}},"./src/select-all.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{SelectAll:()=>h,SelectAllEditing:()=>c,SelectAllUI:()=>d});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-utils/src/index.ts");class n extends s.uB{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let o=e.schema.getLimitElement(t);if(t.containsEntireContent(o)||!r(e.schema,o))do{if(o=o.parent,!o)return}while(!r(e.schema,o));e.change((e=>{e.setSelection(o,"in")}))}}function r(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const a=(0,i.ZX)("Ctrl+A");class c extends s.k_{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.t,o=e.editing.view.document;e.commands.add("selectAll",new n(e)),this.listenTo(o,"keydown",((t,o)=>{(0,i.QC)(o)===a&&(e.execute("selectAll"),o.preventDefault())})),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Select all"),keystroke:"CTRL+A"}]})}}var l=o("./packages/ckeditor5-ui/src/index.ts");class d extends s.k_{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(()=>{const e=this._createButton(l._);return e.set({tooltip:!0}),e})),e.ui.componentFactory.add("menuBar:selectAll",(()=>this._createButton(l.kS)))}_createButton(e){const t=this.editor,o=t.locale,s=t.commands.get("selectAll"),i=new e(t.locale),n=o.t;return i.set({label:n("Select all"),icon:'',keystroke:"Ctrl+A"}),i.bind("isEnabled").to(s,"isEnabled"),this.listenTo(i,"execute",(()=>{t.execute("selectAll"),t.editing.view.focus()})),i}}class h extends s.k_{static get requires(){return[c,d]}static get pluginName(){return"SelectAll"}}},"./src/typing.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Delete:()=>s.ep,Input:()=>s.pd,InsertTextCommand:()=>s.Ki,TextTransformation:()=>s.De,TextWatcher:()=>s.qV,TwoStepCaretMovement:()=>s.Vp,Typing:()=>s.IG,findAttributeRange:()=>s.Py,findAttributeRangeBound:()=>s.lO,getLastTextLine:()=>s.ex,inlineHighlight:()=>s.Il});var s=o("./packages/ckeditor5-typing/src/index.ts")},"./src/ui.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{AccessibilityHelp:()=>s.KO,AutocompleteView:()=>s.uI,BalloonPanelView:()=>s.Jr,BalloonToolbar:()=>s.bQ,BlockToolbar:()=>s.Lz,BodyCollection:()=>s.v1,BoxedEditorUIView:()=>s.Xt,ButtonLabelView:()=>s.e0,ButtonView:()=>s._,CollapsibleView:()=>s.Kn,ColorGridView:()=>s.pQ,ColorPickerView:()=>s.ph,ColorSelectorView:()=>s.oB,ColorTileView:()=>s.vF,ComponentFactory:()=>s.eH,ContextualBalloon:()=>s.pU,CssTransitionDisablerMixin:()=>s.wi,DefaultMenuBarItems:()=>s.ep,Dialog:()=>s.lG,DialogView:()=>s._m,DialogViewPosition:()=>s.nu,DropdownButtonView:()=>s.lU,DropdownPanelView:()=>s.Vz,DropdownView:()=>s.BO,EditorUI:()=>s.Gn,EditorUIView:()=>s.nc,FileDialogButtonView:()=>s.eF,FocusCycler:()=>s.H,FormHeaderView:()=>s.Dy,HighlightedTextView:()=>s.MZ,IconView:()=>s.Ln,IframeView:()=>s.WU,InlineEditableUIView:()=>s.LU,InputNumberView:()=>s.Zz,InputTextView:()=>s.hK,InputView:()=>s.E6,LabelView:()=>s.y0,LabeledFieldView:()=>s.xE,ListItemGroupView:()=>s.m_,ListItemView:()=>s.BD,ListSeparatorView:()=>s.Je,ListView:()=>s.uO,MenuBarMenuListItemButtonView:()=>s.kS,MenuBarMenuListItemFileDialogButtonView:()=>s.GG,MenuBarMenuListItemView:()=>s.I8,MenuBarMenuListView:()=>s.BY,MenuBarMenuView:()=>s.zj,MenuBarView:()=>s.yJ,Notification:()=>s.Eg,SearchInfoView:()=>s.wD,SearchTextView:()=>s.b8,SpinnerView:()=>s.XE,SplitButtonView:()=>s.AO,StickyPanelView:()=>s.xw,SwitchButtonView:()=>s.Wm,Template:()=>s.Bj,TextareaView:()=>s.OB,ToolbarLineBreakView:()=>s.Cy,ToolbarSeparatorView:()=>s.IY,ToolbarView:()=>s.X3,TooltipManager:()=>s.JV,View:()=>s.Ss,ViewCollection:()=>s.s3,ViewModel:()=>s.Jc,_initMenuBar:()=>s.G6,addKeyboardHandlingForGrid:()=>s.l1,addListToDropdown:()=>s.O,addToolbarToDropdown:()=>s.fM,clickOutsideHandler:()=>s.wy,createDropdown:()=>s.yu,createLabeledDropdown:()=>s.By,createLabeledInputNumber:()=>s.F_,createLabeledInputText:()=>s.Vr,createLabeledTextarea:()=>s.GR,focusChildOnDropdownOpen:()=>s.Zn,getLocalizedColorOptions:()=>s.b2,injectCssTransitionDisabler:()=>s.I0,isFocusable:()=>s.tp,isViewWithFocusCycler:()=>s.eG,normalizeColorOptions:()=>s.lF,normalizeMenuBarConfig:()=>s.mB,normalizeSingleColorDefinition:()=>s.iv,normalizeToolbarConfig:()=>s.fl,submitHandler:()=>s.Z5});var s=o("./packages/ckeditor5-ui/src/index.ts")},"./src/undo.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Undo:()=>p,UndoEditing:()=>d,UndoUI:()=>u});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-engine/src/index.ts");class n extends s.uB{_stack=[];_createdBatches=new WeakSet;constructor(e){super(e),this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",((e,t)=>{t[1]={...t[1]};const o=t[1];o.batchType||(o.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,o={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:o}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,o){const s=this.editor.model,i=s.document,n=[],c=e.map((e=>e.getTransformedByOperations(o))),l=c.flat();for(const e of c){const t=e.filter((e=>e.root!=i.graveyard)).filter((e=>!a(e,l)));t.length&&(r(t),n.push(t[0]))}n.length&&s.change((e=>{e.setSelection(n,{backward:t})}))}_undo(e,t){const o=this.editor.model,s=o.document;this._createdBatches.add(t);const n=e.operations.slice().filter((e=>e.isDocumentOperation));n.reverse();for(const e of n){const n=e.baseVersion+1,r=Array.from(s.history.getOperations(n)),a=(0,i._j)([e.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let n of a){const r=n.affectedSelectable;r&&!o.canEditAt(r)&&(n=new i.fS(n.baseVersion)),t.addOperation(n),o.applyOperation(n),s.history.setOperationAsUndone(e,n)}}}}function r(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;tt!==e&&t.containsRange(e,!0)))}class c extends n{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,o=this._stack.splice(t,1)[0],s=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(s,(()=>{this._undo(o.batch,s);const e=this.editor.model.document.history.getOperations(o.batch.baseVersion);this._restoreSelection(o.selection.ranges,o.selection.isBackward,e)})),this.fire("revert",o.batch,s),this.refresh()}}class l extends n{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const o=e.batch.operations[e.batch.operations.length-1].baseVersion+1,s=this.editor.model.document.history.getOperations(o);this._restoreSelection(e.selection.ranges,e.selection.isBackward,s),this._undo(e.batch,t)})),this.refresh()}}class d extends s.k_{_undoCommand;_redoCommand;_batchRegistry=new WeakSet;static get pluginName(){return"UndoEditing"}init(){const e=this.editor,t=e.t;this._undoCommand=new c(e),this._redoCommand=new l(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const o=t[0];if(!o.isDocumentOperation)return;const s=o.batch,i=this._redoCommand.createdBatches.has(s),n=this._undoCommand.createdBatches.has(s);this._batchRegistry.has(s)||(this._batchRegistry.add(s),s.isUndoable&&(i?this._undoCommand.addBatch(s):n||(this._undoCommand.addBatch(s),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,o)=>{this._redoCommand.addBatch(o)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Undo"),keystroke:"CTRL+Z"},{label:t("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}var h=o("./packages/ckeditor5-ui/src/index.ts");class u extends s.k_{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,o=e.t,i="ltr"==t.uiLanguageDirection?s.Pt.undo:s.Pt.redo,n="ltr"==t.uiLanguageDirection?s.Pt.redo:s.Pt.undo;this._addButtonsToFactory("undo",o("Undo"),"CTRL+Z",i),this._addButtonsToFactory("redo",o("Redo"),"CTRL+Y",n)}_addButtonsToFactory(e,t,o,s){const i=this.editor;i.ui.componentFactory.add(e,(()=>{const i=this._createButton(h._,e,t,o,s);return i.set({tooltip:!0}),i})),i.ui.componentFactory.add("menuBar:"+e,(()=>this._createButton(h.kS,e,t,o,s)))}_createButton(e,t,o,s,i){const n=this.editor,r=n.locale,a=n.commands.get(t),c=new e(r);return c.set({label:o,icon:i,keystroke:s}),c.bind("isEnabled").to(a,"isEnabled"),this.listenTo(c,"execute",(()=>{n.execute(t),n.editing.view.focus()})),c}}class p extends s.k_{static get requires(){return[d,u]}static get pluginName(){return"Undo"}}},"./src/upload.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{Base64UploadAdapter:()=>c,FileRepository:()=>r,SimpleUploadAdapter:()=>d});var s=o("./packages/ckeditor5-core/src/index.ts"),i=o("./packages/ckeditor5-utils/src/index.ts");class n extends((0,i.VM)()){total;_reader;_data;constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((o,s)=>{t.onload=()=>{const e=t.result;this._data=e,o(e)},t.onerror=()=>{s("error")},t.onabort=()=>{s("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}class r extends s.k_{loaders=new i.pM;_loadersMap=new Map;_pendingAction=null;static get pluginName(){return"FileRepository"}static get requires(){return[s.TS]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return(0,i.FF)("filerepository-no-upload-adapter"),null;const t=new a(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof a?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,o)=>{e===t&&this._loadersMap.delete(o)}))}_updatePendingAction(){const e=this.editor.plugins.get(s.TS);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,o=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(o(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",o)}}else e.remove(this._pendingAction),this._pendingAction=null}}class a extends((0,i.VM)()){id;_filePromiseWrapper;_adapter;_reader;constructor(e,t){super(),this.id=(0,i.Ld)(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new n,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new i.Yb("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new i.Yb("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((o,s)=>{t.rejecter=s,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,o(e)})).catch((e=>{t.isFulfilled=!0,s(e)}))})),t}}class c extends s.k_{static get requires(){return[r]}static get pluginName(){return"Base64UploadAdapter"}init(){this.editor.plugins.get(r).createUploadAdapter=e=>new l(e)}}class l{loader;reader;constructor(e){this.loader=e}upload(){return new Promise(((e,t)=>{const o=this.reader=new window.FileReader;o.addEventListener("load",(()=>{e({default:o.result})})),o.addEventListener("error",(e=>{t(e)})),o.addEventListener("abort",(()=>{t()})),this.loader.file.then((e=>{o.readAsDataURL(e)}))}))}abort(){this.reader.abort()}}class d extends s.k_{static get requires(){return[r]}static get pluginName(){return"SimpleUploadAdapter"}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(r).createUploadAdapter=t=>new h(t,e):(0,i.FF)("simple-upload-adapter-missing-uploadurl"))}}class h{loader;options;xhr;constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then((e=>new Promise(((t,o)=>{this._initRequest(),this._initListeners(t,o,e),this._sendRequest(e)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,o){const s=this.xhr,i=this.loader,n=`Couldn't upload file: ${o.name}.`;s.addEventListener("error",(()=>t(n))),s.addEventListener("abort",(()=>t())),s.addEventListener("load",(()=>{const o=s.response;if(!o||o.error)return t(o&&o.error&&o.error.message?o.error.message:n);const i=o.url?{default:o.url}:o.urls;e({...o,urls:i})})),s.upload&&s.upload.addEventListener("progress",(e=>{e.lengthComputable&&(i.uploadTotal=e.total,i.uploaded=e.loaded)}))}_sendRequest(e){const t=this.options.headers||{},o=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=o;const s=new FormData;s.append("upload",e),this.xhr.send(s)}}},"./src/utils.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{CKEditorError:()=>s.Yb,Collection:()=>s.pM,Config:()=>s.TS,DomEmitterMixin:()=>s.c5,ElementReplacer:()=>s.PZ,EmitterMixin:()=>s.Mm,EventInfo:()=>s.vY,FocusTracker:()=>s.$x,KeystrokeHandler:()=>s.EP,Locale:()=>s.hT,ObservableMixin:()=>s.VM,Rect:()=>s.rw,ResizeObserver:()=>s.tb,abortableDebounce:()=>s.KL,compareArrays:()=>s.ww,count:()=>s.U9,createElement:()=>s.n,delay:()=>s.cb,diff:()=>s.Ui,diffToChanges:()=>s.q8,env:()=>s._K,exponentialDelay:()=>s.Nv,fastDiff:()=>s.Mr,findClosestScrollableAncestor:()=>s.j3,first:()=>s.$1,getAncestors:()=>s.DS,getBorderWidths:()=>s.Md,getCode:()=>s.QC,getDataFromElement:()=>s.pG,getEnvKeystrokeText:()=>s.YA,getLanguageDirection:()=>s.iJ,getLocalizedArrowKeyCodeDirection:()=>s.Kf,getOptimalPosition:()=>s.W,global:()=>s.Sf,indexOf:()=>s.qh,insertAt:()=>s.PT,insertToPriorityArray:()=>s.Yy,isArrowKeyCode:()=>s.Yt,isCombiningMark:()=>s.mY,isComment:()=>s.Cn,isForwardArrowKeyCode:()=>s.HK,isHighSurrogateHalf:()=>s.kv,isInsideCombinedSymbol:()=>s.Iw,isInsideEmojiSequence:()=>s.SQ,isInsideSurrogatePair:()=>s.P5,isIterable:()=>s.xZ,isLowSurrogateHalf:()=>s.k$,isNode:()=>s.Ll,isRange:()=>s._Z,isText:()=>s.KH,isValidAttributeName:()=>s.i8,isVisible:()=>s.zN,keyCodes:()=>s.uP,logError:()=>s.vV,logWarning:()=>s.FF,mix:()=>s.jh,parseKeystroke:()=>s.ZX,priorities:()=>s.vx,releaseDate:()=>s.kM,remove:()=>s.TF,retry:()=>s.L5,scrollAncestorsToShowTarget:()=>s.bi,scrollViewportToShowTarget:()=>s.vK,setDataInElement:()=>s.C_,spliceArray:()=>s.eL,toArray:()=>s.$r,toMap:()=>s.av,toUnit:()=>s.To,uid:()=>s.Ld,verifyLicense:()=>s.rQ,version:()=>s.rE,wait:()=>s.uk});var s=o("./packages/ckeditor5-utils/src/index.ts")},"./src/watchdog.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{ContextWatchdog:()=>s.Zd,EditorWatchdog:()=>s.VJ,Watchdog:()=>s.Io});var s=o("./packages/ckeditor5-watchdog/src/index.ts")},"./src/widget.js":(e,t,o)=>{"use strict";o.r(t),o.d(t,{WIDGET_CLASS_NAME:()=>s.iW,WIDGET_SELECTED_CLASS_NAME:()=>s.w_,Widget:()=>s.x0,WidgetResize:()=>s.VE,WidgetToolbarRepository:()=>s.oP,WidgetTypeAround:()=>s.oT,calculateResizeHostAncestorWidth:()=>s.Wu,calculateResizeHostPercentageWidth:()=>s.Hq,findOptimalInsertionRange:()=>s.iB,getLabel:()=>s.p9,isWidget:()=>s.p4,setHighlightHandling:()=>s._s,setLabel:()=>s.je,toWidget:()=>s.Ex,toWidgetEditable:()=>s.YN,viewToModelPositionOutsideModelElement:()=>s.$u});var s=o("./packages/ckeditor5-widget/src/index.ts")},"?7cdd":(e,t,o)=>{e.exports=o},"./node_modules/lodash-es/_ListCache.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>u});const s=function(){this.__data__=[],this.size=0};var i=o("./node_modules/lodash-es/eq.js");const n=function(e,t){for(var o=e.length;o--;)if((0,i.A)(e[o][0],t))return o;return-1};var r=Array.prototype.splice;const a=function(e){var t=this.__data__,o=n(t,e);return!(o<0)&&(o==t.length-1?t.pop():r.call(t,o,1),--this.size,!0)};const c=function(e){var t=this.__data__,o=n(t,e);return o<0?void 0:t[o][1]};const l=function(e){return n(this.__data__,e)>-1};const d=function(e,t){var o=this.__data__,s=n(o,e);return s<0?(++this.size,o.push([e,t])):o[s][1]=t,this};function h(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_getNative.js"),i=o("./node_modules/lodash-es/_root.js");const n=(0,s.A)(i.A,"Map")},"./node_modules/lodash-es/_MapCache.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>x});const s=(0,o("./node_modules/lodash-es/_getNative.js").A)(Object,"create");const i=function(){this.__data__=s?s(null):{},this.size=0};const n=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var r=Object.prototype.hasOwnProperty;const a=function(e){var t=this.__data__;if(s){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(t,e)?t[e]:void 0};var c=Object.prototype.hasOwnProperty;const l=function(e){var t=this.__data__;return s?void 0!==t[e]:c.call(t,e)};const d=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=s&&void 0===t?"__lodash_hash_undefined__":t,this};function h(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t{"use strict";o.d(t,{A:()=>u});var s=o("./node_modules/lodash-es/_ListCache.js");const i=function(){this.__data__=new s.A,this.size=0};const n=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o};const r=function(e){return this.__data__.get(e)};const a=function(e){return this.__data__.has(e)};var c=o("./node_modules/lodash-es/_Map.js"),l=o("./node_modules/lodash-es/_MapCache.js");const d=function(e,t){var o=this.__data__;if(o instanceof s.A){var i=o.__data__;if(!c.A||i.length<199)return i.push([e,t]),this.size=++o.size,this;o=this.__data__=new l.A(i)}return o.set(e,t),this.size=o.size,this};function h(e){var t=this.__data__=new s.A(e);this.size=t.size}h.prototype.clear=i,h.prototype.delete=n,h.prototype.get=r,h.prototype.has=a,h.prototype.set=d;const u=h},"./node_modules/lodash-es/_Symbol.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=o("./node_modules/lodash-es/_root.js").A.Symbol},"./node_modules/lodash-es/_Uint8Array.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=o("./node_modules/lodash-es/_root.js").A.Uint8Array},"./node_modules/lodash-es/_arrayLikeKeys.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>d});const s=function(e,t){for(var o=-1,s=Array(e);++o{"use strict";o.d(t,{A:()=>s});const s=function(e,t){for(var o=-1,s=t.length,i=e.length;++o{"use strict";o.d(t,{A:()=>r});var s=o("./node_modules/lodash-es/_baseAssignValue.js"),i=o("./node_modules/lodash-es/eq.js"),n=Object.prototype.hasOwnProperty;const r=function(e,t,o){var r=e[t];n.call(e,t)&&(0,i.A)(r,o)&&(void 0!==o||t in e)||(0,s.A)(e,t,o)}},"./node_modules/lodash-es/_baseAssignValue.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_defineProperty.js");const i=function(e,t,o){"__proto__"==t&&s.A?(0,s.A)(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}},"./node_modules/lodash-es/_baseClone.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>Q});var s=o("./node_modules/lodash-es/_Stack.js");const i=function(e,t){for(var o=-1,s=null==e?0:e.length;++o{"use strict";o.d(t,{A:()=>s});const s=function(e){return function(t,o,s){for(var i=-1,n=Object(t),r=s(t),a=r.length;a--;){var c=r[e?a:++i];if(!1===o(n[c],c,n))break}return t}}()},"./node_modules/lodash-es/_baseGet.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_castPath.js"),i=o("./node_modules/lodash-es/_toKey.js");const n=function(e,t){for(var o=0,n=(t=(0,s.A)(t,e)).length;null!=e&&o{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_arrayPush.js"),i=o("./node_modules/lodash-es/isArray.js");const n=function(e,t,o){var n=t(e);return(0,i.A)(e)?n:(0,s.A)(n,o(e))}},"./node_modules/lodash-es/_baseGetTag.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>u});var s=o("./node_modules/lodash-es/_Symbol.js"),i=Object.prototype,n=i.hasOwnProperty,r=i.toString,a=s.A?s.A.toStringTag:void 0;const c=function(e){var t=n.call(e,a),o=e[a];try{e[a]=void 0;var s=!0}catch(e){}var i=r.call(e);return s&&(t?e[a]=o:delete e[a]),i};var l=Object.prototype.toString;const d=function(e){return l.call(e)};var h=s.A?s.A.toStringTag:void 0;const u=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?c(e):d(e)}},"./node_modules/lodash-es/_baseIsEqual.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>R});var s=o("./node_modules/lodash-es/_Stack.js"),i=o("./node_modules/lodash-es/_MapCache.js");const n=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const r=function(e){return this.__data__.has(e)};function a(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new i.A;++ta))return!1;var u=n.get(e),p=n.get(t);if(u&&p)return u==t&&p==e;var m=-1,f=!0,g=2&o?new c:void 0;for(n.set(e,t),n.set(t,e);++m{"use strict";o.d(t,{A:()=>s});const s=function(e){return function(t){return e(t)}}},"./node_modules/lodash-es/_castPath.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>u});var s=o("./node_modules/lodash-es/isArray.js"),i=o("./node_modules/lodash-es/_isKey.js"),n=o("./node_modules/lodash-es/_MapCache.js");function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var o=function(){var s=arguments,i=t?t.apply(this,s):s[0],n=o.cache;if(n.has(i))return n.get(i);var r=e.apply(this,s);return o.cache=n.set(i,r)||n,r};return o.cache=new(r.Cache||n.A),o}r.Cache=n.A;const a=r;var c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g;const d=function(e){var t=a(e,(function(e){return 500===o.size&&o.clear(),e})),o=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(c,(function(e,o,s,i){t.push(s?i.replace(l,"$1"):o||e)})),t}));var h=o("./node_modules/lodash-es/toString.js");const u=function(e,t){return(0,s.A)(e)?e:(0,i.A)(e,t)?[e]:d((0,h.A)(e))}},"./node_modules/lodash-es/_cloneArrayBuffer.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_Uint8Array.js");const i=function(e){var t=new e.constructor(e.byteLength);return new s.A(t).set(new s.A(e)),t}},"./node_modules/lodash-es/_cloneBuffer.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var s=o("./node_modules/lodash-es/_root.js"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=i&&"object"==typeof module&&module&&!module.nodeType&&module,r=n&&n.exports===i?s.A.Buffer:void 0,a=r?r.allocUnsafe:void 0;const c=function(e,t){if(t)return e.slice();var o=e.length,s=a?a(o):new e.constructor(o);return e.copy(s),s}},"./node_modules/lodash-es/_cloneTypedArray.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_cloneArrayBuffer.js");const i=function(e,t){var o=t?(0,s.A)(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}},"./node_modules/lodash-es/_copyArray.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e,t){var o=-1,s=e.length;for(t||(t=Array(s));++o{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_assignValue.js"),i=o("./node_modules/lodash-es/_baseAssignValue.js");const n=function(e,t,o,n){var r=!o;o||(o={});for(var a=-1,c=t.length;++a{"use strict";o.d(t,{A:()=>b});var s=o("./node_modules/lodash-es/identity.js");const i=function(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)};var n=Math.max;const r=function(e,t,o){return t=n(void 0===t?e.length-1:t,0),function(){for(var s=arguments,r=-1,a=n(s.length-t,0),c=Array(a);++r0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(l);const u=function(e,t){return h(r(e,t,s.A),e+"")};var p=o("./node_modules/lodash-es/eq.js"),m=o("./node_modules/lodash-es/isArrayLike.js"),f=o("./node_modules/lodash-es/_isIndex.js"),g=o("./node_modules/lodash-es/isObject.js");const _=function(e,t,o){if(!(0,g.A)(o))return!1;var s=typeof t;return!!("number"==s?(0,m.A)(o)&&(0,f.A)(t,o.length):"string"==s&&t in o)&&(0,p.A)(o[t],e)};const b=function(e){return u((function(t,o){var s=-1,i=o.length,n=i>1?o[i-1]:void 0,r=i>2?o[2]:void 0;for(n=e.length>3&&"function"==typeof n?(i--,n):void 0,r&&_(o[0],o[1],r)&&(n=i<3?void 0:n,i=1),t=Object(t);++s{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_getNative.js");const i=function(){try{var e=(0,s.A)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},"./node_modules/lodash-es/_freeGlobal.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s="object"==typeof global&&global&&global.Object===Object&&global},"./node_modules/lodash-es/_getAllKeys.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var s=o("./node_modules/lodash-es/_baseGetAllKeys.js"),i=o("./node_modules/lodash-es/_getSymbols.js"),n=o("./node_modules/lodash-es/keys.js");const r=function(e){return(0,s.A)(e,n.A,i.A)}},"./node_modules/lodash-es/_getNative.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>b});var s=o("./node_modules/lodash-es/isFunction.js");const i=o("./node_modules/lodash-es/_root.js").A["__core-js_shared__"];var n,r=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";const a=function(e){return!!r&&r in e};var c=o("./node_modules/lodash-es/isObject.js"),l=o("./node_modules/lodash-es/_toSource.js"),d=/^\[object .+?Constructor\]$/,h=Function.prototype,u=Object.prototype,p=h.toString,m=u.hasOwnProperty,f=RegExp("^"+p.call(m).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const g=function(e){return!(!(0,c.A)(e)||a(e))&&((0,s.A)(e)?f:d).test((0,l.A)(e))};const _=function(e,t){return null==e?void 0:e[t]};const b=function(e,t){var o=_(e,t);return g(o)?o:void 0}},"./node_modules/lodash-es/_getPrototype.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=(0,o("./node_modules/lodash-es/_overArg.js").A)(Object.getPrototypeOf,Object)},"./node_modules/lodash-es/_getSymbols.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>a});const s=function(e,t){for(var o=-1,s=null==e?0:e.length,i=0,n=[];++o{"use strict";o.d(t,{A:()=>x});var s=o("./node_modules/lodash-es/_getNative.js"),i=o("./node_modules/lodash-es/_root.js");const n=(0,s.A)(i.A,"DataView");var r=o("./node_modules/lodash-es/_Map.js");const a=(0,s.A)(i.A,"Promise");const c=(0,s.A)(i.A,"Set");const l=(0,s.A)(i.A,"WeakMap");var d=o("./node_modules/lodash-es/_baseGetTag.js"),h=o("./node_modules/lodash-es/_toSource.js"),u="[object Map]",p="[object Promise]",m="[object Set]",f="[object WeakMap]",g="[object DataView]",_=(0,h.A)(n),b=(0,h.A)(r.A),k=(0,h.A)(a),w=(0,h.A)(c),v=(0,h.A)(l),y=d.A;(n&&y(new n(new ArrayBuffer(1)))!=g||r.A&&y(new r.A)!=u||a&&y(a.resolve())!=p||c&&y(new c)!=m||l&&y(new l)!=f)&&(y=function(e){var t=(0,d.A)(e),o="[object Object]"==t?e.constructor:void 0,s=o?(0,h.A)(o):"";if(s)switch(s){case _:return g;case b:return u;case k:return p;case w:return m;case v:return f}return t});const x=y},"./node_modules/lodash-es/_initCloneObject.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var s=o("./node_modules/lodash-es/isObject.js"),i=Object.create;const n=function(){function e(){}return function(t){if(!(0,s.A)(t))return{};if(i)return i(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();var r=o("./node_modules/lodash-es/_getPrototype.js"),a=o("./node_modules/lodash-es/_isPrototype.js");const c=function(e){return"function"!=typeof e.constructor||(0,a.A)(e)?{}:n((0,r.A)(e))}},"./node_modules/lodash-es/_isIndex.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=/^(?:0|[1-9]\d*)$/;const i=function(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&s.test(e))&&e>-1&&e%1==0&&e{"use strict";o.d(t,{A:()=>a});var s=o("./node_modules/lodash-es/isArray.js"),i=o("./node_modules/lodash-es/isSymbol.js"),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;const a=function(e,t){if((0,s.A)(e))return!1;var o=typeof e;return!("number"!=o&&"symbol"!=o&&"boolean"!=o&&null!=e&&!(0,i.A)(e))||(r.test(e)||!n.test(e)||null!=t&&e in Object(t))}},"./node_modules/lodash-es/_isPrototype.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=Object.prototype;const i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||s)}},"./node_modules/lodash-es/_nodeUtil.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var s=o("./node_modules/lodash-es/_freeGlobal.js"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=i&&"object"==typeof module&&module&&!module.nodeType&&module,r=n&&n.exports===i&&s.A.process;const a=function(){try{var e=n&&n.require&&n.require("util").types;return e||r&&r.binding&&r.binding("util")}catch(e){}}()},"./node_modules/lodash-es/_overArg.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e,t){return function(o){return e(t(o))}}},"./node_modules/lodash-es/_root.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_freeGlobal.js"),i="object"==typeof self&&self&&self.Object===Object&&self;const n=s.A||i||Function("return this")()},"./node_modules/lodash-es/_toKey.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/isSymbol.js");const i=function(e){if("string"==typeof e||(0,s.A)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},"./node_modules/lodash-es/_toSource.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=Function.prototype.toString;const i=function(e){if(null!=e){try{return s.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},"./node_modules/lodash-es/assignIn.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var s=o("./node_modules/lodash-es/_copyObject.js"),i=o("./node_modules/lodash-es/_createAssigner.js"),n=o("./node_modules/lodash-es/keysIn.js");const r=(0,i.A)((function(e,t){(0,s.A)(t,(0,n.A)(t),e)}))},"./node_modules/lodash-es/cloneDeep.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_baseClone.js");const i=function(e){return(0,s.A)(e,5)}},"./node_modules/lodash-es/cloneDeepWith.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_baseClone.js");const i=function(e,t){return t="function"==typeof t?t:void 0,(0,s.A)(e,5,t)}},"./node_modules/lodash-es/debounce.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>b});var s=o("./node_modules/lodash-es/isObject.js"),i=o("./node_modules/lodash-es/_root.js");const n=function(){return i.A.Date.now()};var r=/\s/;const a=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t};var c=/^\s+/;const l=function(e){return e?e.slice(0,a(e)+1).replace(c,""):e};var d=o("./node_modules/lodash-es/isSymbol.js"),h=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,p=/^0o[0-7]+$/i,m=parseInt;const f=function(e){if("number"==typeof e)return e;if((0,d.A)(e))return NaN;if((0,s.A)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,s.A)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=l(e);var o=u.test(e);return o||p.test(e)?m(e.slice(2),o?2:8):h.test(e)?NaN:+e};var g=Math.max,_=Math.min;const b=function(e,t,o){var i,r,a,c,l,d,h=0,u=!1,p=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var o=i,s=r;return i=r=void 0,h=t,c=e.apply(s,o)}function k(e){var o=e-d;return void 0===d||o>=t||o<0||p&&e-h>=a}function w(){var e=n();if(k(e))return v(e);l=setTimeout(w,function(e){var o=t-(e-d);return p?_(o,a-(e-h)):o}(e))}function v(e){return l=void 0,m&&i?b(e):(i=r=void 0,c)}function y(){var e=n(),o=k(e);if(i=arguments,r=this,d=e,o){if(void 0===l)return function(e){return h=e,l=setTimeout(w,t),u?b(e):c}(d);if(p)return clearTimeout(l),l=setTimeout(w,t),b(d)}return void 0===l&&(l=setTimeout(w,t)),c}return t=f(t)||0,(0,s.A)(o)&&(u=!!o.leading,a=(p="maxWait"in o)?g(f(o.maxWait)||0,t):a,m="trailing"in o?!!o.trailing:m),y.cancel=function(){void 0!==l&&clearTimeout(l),h=0,i=d=r=l=void 0},y.flush=function(){return void 0===l?c:v(n())},y}},"./node_modules/lodash-es/eq.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e,t){return e===t||e!=e&&t!=t}},"./node_modules/lodash-es/escapeRegExp.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var s=o("./node_modules/lodash-es/toString.js"),i=/[\\^$.*+?()[\]{}|]/g,n=RegExp(i.source);const r=function(e){return(e=(0,s.A)(e))&&n.test(e)?e.replace(i,"\\$&"):e}},"./node_modules/lodash-es/get.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o("./node_modules/lodash-es/_baseGet.js");const i=function(e,t,o){var i=null==e?void 0:(0,s.A)(e,t);return void 0===i?o:i}},"./node_modules/lodash-es/identity.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e){return e}},"./node_modules/lodash-es/isArguments.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>l});var s=o("./node_modules/lodash-es/_baseGetTag.js"),i=o("./node_modules/lodash-es/isObjectLike.js");const n=function(e){return(0,i.A)(e)&&"[object Arguments]"==(0,s.A)(e)};var r=Object.prototype,a=r.hasOwnProperty,c=r.propertyIsEnumerable;const l=n(function(){return arguments}())?n:function(e){return(0,i.A)(e)&&a.call(e,"callee")&&!c.call(e,"callee")}},"./node_modules/lodash-es/isArray.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=Array.isArray},"./node_modules/lodash-es/isArrayLike.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/isFunction.js"),i=o("./node_modules/lodash-es/isLength.js");const n=function(e){return null!=e&&(0,i.A)(e.length)&&!(0,s.A)(e)}},"./node_modules/lodash-es/isBuffer.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var s=o("./node_modules/lodash-es/_root.js");const i=function(){return!1};var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=r&&r.exports===n?s.A.Buffer:void 0;const c=(a?a.isBuffer:void 0)||i},"./node_modules/lodash-es/isElement.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/isObjectLike.js"),i=o("./node_modules/lodash-es/isPlainObject.js");const n=function(e){return(0,s.A)(e)&&1===e.nodeType&&!(0,i.A)(e)}},"./node_modules/lodash-es/isFunction.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_baseGetTag.js"),i=o("./node_modules/lodash-es/isObject.js");const n=function(e){if(!(0,i.A)(e))return!1;var t=(0,s.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},"./node_modules/lodash-es/isLength.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},"./node_modules/lodash-es/isObject.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},"./node_modules/lodash-es/isObjectLike.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(e){return null!=e&&"object"==typeof e}},"./node_modules/lodash-es/isPlainObject.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>h});var s=o("./node_modules/lodash-es/_baseGetTag.js"),i=o("./node_modules/lodash-es/_getPrototype.js"),n=o("./node_modules/lodash-es/isObjectLike.js"),r=Function.prototype,a=Object.prototype,c=r.toString,l=a.hasOwnProperty,d=c.call(Object);const h=function(e){if(!(0,n.A)(e)||"[object Object]"!=(0,s.A)(e))return!1;var t=(0,i.A)(e);if(null===t)return!0;var o=l.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&c.call(o)==d}},"./node_modules/lodash-es/isSymbol.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/_baseGetTag.js"),i=o("./node_modules/lodash-es/isObjectLike.js");const n=function(e){return"symbol"==typeof e||(0,i.A)(e)&&"[object Symbol]"==(0,s.A)(e)}},"./node_modules/lodash-es/isTypedArray.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>h});var s=o("./node_modules/lodash-es/_baseGetTag.js"),i=o("./node_modules/lodash-es/isLength.js"),n=o("./node_modules/lodash-es/isObjectLike.js"),r={};r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1;const a=function(e){return(0,n.A)(e)&&(0,i.A)(e.length)&&!!r[(0,s.A)(e)]};var c=o("./node_modules/lodash-es/_baseUnary.js"),l=o("./node_modules/lodash-es/_nodeUtil.js"),d=l.A&&l.A.isTypedArray;const h=d?(0,c.A)(d):a},"./node_modules/lodash-es/keys.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>l});var s=o("./node_modules/lodash-es/_arrayLikeKeys.js"),i=o("./node_modules/lodash-es/_isPrototype.js");const n=(0,o("./node_modules/lodash-es/_overArg.js").A)(Object.keys,Object);var r=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,i.A)(e))return n(e);var t=[];for(var o in Object(e))r.call(e,o)&&"constructor"!=o&&t.push(o);return t};var c=o("./node_modules/lodash-es/isArrayLike.js");const l=function(e){return(0,c.A)(e)?(0,s.A)(e):a(e)}},"./node_modules/lodash-es/keysIn.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var s=o("./node_modules/lodash-es/_arrayLikeKeys.js"),i=o("./node_modules/lodash-es/isObject.js"),n=o("./node_modules/lodash-es/_isPrototype.js");const r=function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t};var a=Object.prototype.hasOwnProperty;const c=function(e){if(!(0,i.A)(e))return r(e);var t=(0,n.A)(e),o=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&o.push(s);return o};var l=o("./node_modules/lodash-es/isArrayLike.js");const d=function(e){return(0,l.A)(e)?(0,s.A)(e,!0):c(e)}},"./node_modules/lodash-es/merge.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>P});var s=o("./node_modules/lodash-es/_Stack.js"),i=o("./node_modules/lodash-es/_baseAssignValue.js"),n=o("./node_modules/lodash-es/eq.js");const r=function(e,t,o){(void 0!==o&&!(0,n.A)(e[t],o)||void 0===o&&!(t in e))&&(0,i.A)(e,t,o)};var a=o("./node_modules/lodash-es/_baseFor.js"),c=o("./node_modules/lodash-es/_cloneBuffer.js"),l=o("./node_modules/lodash-es/_cloneTypedArray.js"),d=o("./node_modules/lodash-es/_copyArray.js"),h=o("./node_modules/lodash-es/_initCloneObject.js"),u=o("./node_modules/lodash-es/isArguments.js"),p=o("./node_modules/lodash-es/isArray.js"),m=o("./node_modules/lodash-es/isArrayLike.js"),f=o("./node_modules/lodash-es/isObjectLike.js");const g=function(e){return(0,f.A)(e)&&(0,m.A)(e)};var _=o("./node_modules/lodash-es/isBuffer.js"),b=o("./node_modules/lodash-es/isFunction.js"),k=o("./node_modules/lodash-es/isObject.js"),w=o("./node_modules/lodash-es/isPlainObject.js"),v=o("./node_modules/lodash-es/isTypedArray.js");const y=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var x=o("./node_modules/lodash-es/_copyObject.js"),A=o("./node_modules/lodash-es/keysIn.js");const C=function(e){return(0,x.A)(e,(0,A.A)(e))};const T=function(e,t,o,s,i,n,a){var m=y(e,o),f=y(t,o),x=a.get(f);if(x)r(e,o,x);else{var A=n?n(m,f,o+"",e,t,a):void 0,T=void 0===A;if(T){var E=(0,p.A)(f),P=!E&&(0,_.A)(f),S=!E&&!P&&(0,v.A)(f);A=f,E||P||S?(0,p.A)(m)?A=m:g(m)?A=(0,d.A)(m):P?(T=!1,A=(0,c.A)(f,!0)):S?(T=!1,A=(0,l.A)(f,!0)):A=[]:(0,w.A)(f)||(0,u.A)(f)?(A=m,(0,u.A)(m)?A=C(m):(0,k.A)(m)&&!(0,b.A)(m)||(A=(0,h.A)(f))):T=!1}T&&(a.set(f,A),i(A,f,s,n,a),a.delete(f)),r(e,o,A)}};const E=function e(t,o,i,n,c){t!==o&&(0,a.A)(o,(function(a,l){if(c||(c=new s.A),(0,k.A)(a))T(t,o,l,i,e,n,c);else{var d=n?n(y(t,l),a,l+"",t,o,c):void 0;void 0===d&&(d=a),r(t,l,d)}}),A.A)};const P=(0,o("./node_modules/lodash-es/_createAssigner.js").A)((function(e,t,o){E(e,t,o)}))},"./node_modules/lodash-es/stubArray.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>s});const s=function(){return[]}},"./node_modules/lodash-es/throttle.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o("./node_modules/lodash-es/debounce.js"),i=o("./node_modules/lodash-es/isObject.js");const n=function(e,t,o){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return(0,i.A)(o)&&(n="leading"in o?!!o.leading:n,r="trailing"in o?!!o.trailing:r),(0,s.A)(e,t,{leading:n,maxWait:t,trailing:r})}},"./node_modules/lodash-es/toString.js":(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var s=o("./node_modules/lodash-es/_Symbol.js");const i=function(e,t){for(var o=-1,s=null==e?0:e.length,i=Array(s);++o{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var s=o("?7cdd");(window.CKEditor5=window.CKEditor5||{}).dll=s})(),function(e){e.CKEditor5=e.CKEditor5||{};const t=["utils","core","engine","ui","clipboard","enter","paragraph","select-all","typing","undo","upload","widget","watchdog"];for(const o of t){const t=o.replace(/-([a-z])/g,((e,t)=>t.toUpperCase()));e.CKEditor5[t]=e.CKEditor5.dll(`./src/${o}.js`)}}(window); \ No newline at end of file diff --git a/core/assets/vendor/ckeditor5/table/table.js b/core/assets/vendor/ckeditor5/table/table.js index f6d3bb2968c..691d346bcbe 100644 --- a/core/assets/vendor/ckeditor5/table/table.js +++ b/core/assets/vendor/ckeditor5/table/table.js @@ -2,4 +2,4 @@ /*! * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. - */(()=>{var e={770:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-input-text:focus{z-index:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}",""]);const r=i},67:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}",""]);const r=i},839:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const r=i},712:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label,.ck[dir=rtl] .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}@media (prefers-reduced-motion:reduce){.ck .ck-insert-table-dropdown-grid-box{transition:none}}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}",""]);const r=i},25:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}",""]);const r=i},175:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-selector-caption-background:#f7f7f7;--ck-color-selector-caption-text:#333;--ck-color-selector-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-selector-caption-background);caption-side:top;color:var(--ck-color-selector-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}@media (forced-colors:active){.ck-content .table>figcaption{background-color:unset;color:unset}}@media (forced-colors:none){.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-selector-caption-highlighted-background)}to{background-color:var(--ck-color-selector-caption-background)}}",""]);const r=i},266:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}",""]);const r=i},363:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-selector-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table .ck-table-resized{table-layout:fixed}.ck-content .table table{overflow:hidden}.ck-content .table td,.ck-content .table th{overflow-wrap:break-word;position:relative}.ck.ck-editor__editable .table .ck-table-column-resizer{bottom:0;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:0;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer,.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer{display:none}.ck.ck-editor__editable .table .ck-table-column-resizer:hover,.ck.ck-editor__editable .table .ck-table-column-resizer__active{background-color:var(--ck-color-selector-column-resizer-hover);bottom:-999999px;opacity:.25;top:-999999px}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}",""]);const r=i},817:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-selector-focused-cell-background:rgba(158,201,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-selector-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}",""]);const r=i},911:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}@media (prefers-reduced-motion:reduce){.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:none}}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',""]);const r=i},218:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}",""]);const r=i},719:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',""]);const r=i},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var r=0;r{"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),l=[];function s(e){for(var t=-1,o=0;o{e.exports=o(237)("./src/clipboard.js")},782:(e,t,o)=>{e.exports=o(237)("./src/core.js")},783:(e,t,o)=>{e.exports=o(237)("./src/engine.js")},311:(e,t,o)=>{e.exports=o(237)("./src/ui.js")},584:(e,t,o)=>{e.exports=o(237)("./src/utils.js")},901:(e,t,o)=>{e.exports=o(237)("./src/widget.js")},237:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var r=t[n]={id:n,exports:{}};return e[n](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var n={};(()=>{"use strict";o.r(n),o.d(n,{PlainTableOutput:()=>Ze,Table:()=>Qe,TableCaption:()=>cn,TableCaptionEditing:()=>rn,TableCaptionUI:()=>ln,TableCellProperties:()=>zo,TableCellPropertiesEditing:()=>Eo,TableCellPropertiesUI:()=>wo,TableCellWidthEditing:()=>vo,TableClipboard:()=>Me,TableColumnResize:()=>jr,TableColumnResizeEditing:()=>Wr,TableEditing:()=>Re,TableKeyboard:()=>$e,TableMouse:()=>qe,TableProperties:()=>Qo,TablePropertiesEditing:()=>Uo,TablePropertiesUI:()=>Yo,TableSelection:()=>Oe,TableToolbar:()=>rt,TableUI:()=>Le,TableUtils:()=>ie});var e=o(782),t=o(901);function i(e,t){const{modelAttribute:o,styleName:n,viewElement:i,defaultValue:r,reduceBoxSides:l=!1,shouldUpcast:s=(()=>!0)}=t;e.for("upcast").attributeToAttribute({view:{name:i,styles:{[n]:/[\s\S]+/}},model:{key:o,value:e=>{if(!s(e))return;const t=e.getNormalizedStyle(n),o=l?a(t):t;return r!==o?o:void 0}}})}function r(e,t,o,n){e.for("upcast").add((e=>e.on("element:"+t,((e,t,i)=>{if(!t.modelRange)return;const r=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter((e=>t.viewItem.hasStyle(e)));if(!r.length)return;const l={styles:r};if(!i.consumable.test(t.viewItem,l))return;const s=[...t.modelRange.getItems({shallow:!0})].pop();i.consumable.consume(t.viewItem,l);const c={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},d={style:a(c.style),color:a(c.color),width:a(c.width)};d.style!==n.style&&i.writer.setAttribute(o.style,d.style,s),d.color!==n.color&&i.writer.setAttribute(o.color,d.color,s),d.width!==n.width&&i.writer.setAttribute(o.width,d.width,s)}))))}function l(e,t){const{modelElement:o,modelAttribute:n,styleName:i}=t;e.for("downcast").attributeToAttribute({model:{name:o,key:n},view:e=>({key:"style",value:{[i]:e}})})}function s(e,t){const{modelAttribute:o,styleName:n}=t;e.for("downcast").add((e=>e.on(`attribute:${o}:table`,((e,t,o)=>{const{item:i,attributeNewValue:r}=t,{mapper:l,writer:s}=o;if(!o.consumable.consume(t.item,e.name))return;const a=[...l.toViewElement(i).getChildren()].find((e=>e.is("element","table")));r?s.setStyle(n,r,a):s.removeStyle(n,a)}))))}function a(e){if(!e)return;const t=["top","right","bottom","left"];if(!t.every((t=>e[t])))return e;const o=e.top;return t.every((t=>e[t]===o))?o:e}function c(e,t,o,n,i=1){null!=t&&null!=i&&t>i?n.setAttribute(e,t,o):n.removeAttribute(e,o)}function d(e,t,o={}){const n=e.createElement("tableCell",o);return e.insertElement("paragraph",n),e.insert(n,t),n}function u(e,t){const o=t.parent.parent,n=parseInt(o.getAttribute("headingColumns")||"0"),{column:i}=e.getCellLocation(t);return!!n&&i{e.on("element:table",((e,t,o)=>{const n=t.viewItem;if(!o.consumable.test(n,{name:!0}))return;const{rows:i,headingRows:r,headingColumns:l}=function(e){let t,o=0;const n=[],i=[];let r;for(const l of Array.from(e.getChildren())){if("tbody"!==l.name&&"thead"!==l.name&&"tfoot"!==l.name)continue;"thead"!==l.name||r||(r=l);const e=Array.from(l.getChildren()).filter((e=>e.is("element","tr")));for(const s of e)if(r&&l===r||"tbody"===l.name&&Array.from(s.getChildren()).length&&Array.from(s.getChildren()).every((e=>e.is("element","th"))))o++,n.push(s);else{i.push(s);const e=f(s);(!t||eo.convertItem(e,o.writer.createPositionAt(a,"end")))),o.convertChildren(n,o.writer.createPositionAt(a,"end")),a.isEmpty){const e=o.writer.createElement("tableRow");o.writer.insert(e,o.writer.createPositionAt(a,"end")),d(o.writer,o.writer.createPositionAt(e,"end"))}o.updateConversionResult(a,t)}}))}}function p(e){return t=>{t.on(`element:${e}`,((e,t,{writer:o})=>{if(!t.modelRange)return;const n=t.modelRange.start.nodeAfter,i=o.createPositionAt(n,0);if(t.viewItem.isEmpty)return void o.insertElement("paragraph",i);const r=Array.from(n.getChildren());if(r.every((e=>e.is("element","$marker")))){const e=o.createElement("paragraph");o.insert(e,o.createPositionAt(n,0));for(const t of r)o.move(o.createRangeOn(t),o.createPositionAt(e,"end"))}}),{priority:"low"})}}function f(e){let t=0,o=0;const n=Array.from(e.getChildren()).filter((e=>"th"===e.name||"td"===e.name));for(;o1||i>1)&&this._recordSpans(o,i,n),this._shouldSkipSlot()||(t=this._formatOutValue(o)),this._nextCellAtColumn=this._column+n}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,o=this._column){return{done:!1,value:new _(this,e,t,o)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||o||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,o){const n={cell:e,row:this._row,column:this._column};for(let e=this._row;e0&&!this._jumpedToStartRow}_jumpToNonSpannedRowClosestToStartRow(){const e=this._getRowLength(0);for(let t=this._startRow;!this._jumpedToStartRow;t--)e===this._getRowLength(t)&&(this._row=t,this._rowIndex=t,this._jumpedToStartRow=!0)}_getRowLength(e){return[...this._table.getChild(e).getChildren()].reduce(((e,t)=>e+parseInt(t.getAttribute("colspan")||"1")),0)}}class _{constructor(e,t,o,n){this.cell=t,this.row=e._row,this.column=e._column,this.cellAnchorRow=o,this.cellAnchorColumn=n,this._cellIndex=e._cellIndex,this._rowIndex=e._rowIndex,this._table=e._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||"1")}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||"1")}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}function k(e,o){return(n,{writer:i})=>{const r=n.getAttribute("headingRows")||0,l=i.createContainerElement("table",null,[]),s=i.createContainerElement("figure",{class:"table"},l);r>0&&i.insert(i.createPositionAt(l,"end"),i.createContainerElement("thead",null,i.createSlot((e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=r))));for(const{positionOffset:e,filter:t}of o.additionalSlots)i.insert(i.createPositionAt(l,e),i.createSlot(t));return i.insert(i.createPositionAt(l,"after"),i.createSlot((e=>!e.is("element","tableRow")&&!o.additionalSlots.some((({filter:t})=>t(e)))))),o.asWidget?function(e,o){return o.setCustomProperty("table",!0,e),(0,t.toWidget)(e,o,{hasSelectionHandle:!0})}(s,i):s}}function v(e={}){return(o,{writer:n})=>{const i=o.parent,r=i.parent,l=r.getChildIndex(i),s=new w(r,{row:l}),a=r.getAttribute("headingRows")||0,c=r.getAttribute("headingColumns")||0;let d=null;for(const i of s)if(i.cell==o){const o=i.row{if(!t.parent.is("element","tableCell"))return null;if(!y(t))return null;if(e.asWidget)return o.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const e=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,e),e}}}function y(e){return 1==e.parent.childCount&&!!e.getAttributeKeys().next().done}class A extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,o=e.schema;this.isEnabled=function(e,t){const o=e.getFirstPosition().parent,n=o===o.root?o:o.parent;return t.checkChild(n,"table")}(t,o)}execute(e={}){const t=this.editor,o=t.model,n=t.plugins.get("TableUtils"),i=t.config.get("table.defaultHeadings.rows"),r=t.config.get("table.defaultHeadings.columns");void 0===e.headingRows&&i&&(e.headingRows=i),void 0===e.headingColumns&&r&&(e.headingColumns=r),o.change((t=>{const i=n.createTable(t,e);o.insertObject(i,null,null,{findOptimalPosition:"auto"}),t.setSelection(t.createPositionAt(i.getNodeByPath([0,0,0]),0))}))}}class T extends e.Command{constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="above"===this.order,i=o.getSelectionAffectedTableCells(t),r=o.getRowIndexes(i),l=n?r.first:r.last,s=i[0].findAncestor("table");o.insertRows(s,{at:n?l:l+1,copyStructureFromAbove:!n})}}class x extends e.Command{constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="left"===this.order,i=o.getSelectionAffectedTableCells(t),r=o.getColumnIndexes(i),l=n?r.first:r.last,s=i[0].findAncestor("table");o.insertColumns(s,{columns:1,at:n?l:l+1})}}class S extends e.Command{constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===e.length}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}function V(e,t,o){const{startRow:n,startColumn:i,endRow:r,endColumn:l}=t,s=o.createElement("table"),a=r-n+1;for(let e=0;e0){c("headingRows",r-o,e,i,0)}const l=parseInt(t.getAttribute("headingColumns")||"0");if(l>0){c("headingColumns",l-n,e,i,0)}}(s,e,n,i,o),s}function R(e,t,o=0){const n=[],i=new w(e,{startRow:o,endRow:t-1});for(const e of i){const{row:o,cellHeight:i}=e;o1&&(s.rowspan=a);const u=parseInt(e.getAttribute("colspan")||"1");u>1&&(s.colspan=u);const h=r+l,b=[...new w(i,{startRow:r,endRow:h,includeAllSlots:!0})];let m,g=null;for(const t of b){const{row:n,column:i,cell:r}=t;r===e&&void 0===m&&(m=i),void 0!==m&&m===i&&n===h&&(g=d(o,t.getPositionBefore(),s))}return c("rowspan",l,e,o),g}function P(e,t){const o=[],n=new w(e);for(const e of n){const{column:n,cellWidth:i}=e;n1&&(r.colspan=l);const s=parseInt(e.getAttribute("rowspan")||"1");s>1&&(r.rowspan=s);const a=d(n,n.createPositionAfter(e),r);return c("colspan",i,e,n),a}function z(e,t,o,n,i,r){const l=parseInt(e.getAttribute("colspan")||"1"),s=parseInt(e.getAttribute("rowspan")||"1");if(o+l-1>i){c("colspan",i-o+1,e,r,1)}if(t+s-1>n){c("rowspan",n-t+1,e,r,1)}}function B(e,t){const o=t.getColumns(e),n=new Array(o).fill(0);for(const{column:t}of new w(e))n[t]++;const i=n.reduce(((e,t,o)=>t?e:[...e,o]),[]);if(i.length>0){const o=i[i.length-1];return t.removeColumns(e,{at:o}),!0}return!1}function L(e,t){const o=[],n=t.getRows(e);for(let t=0;t0){const n=o[o.length-1];return t.removeRows(e,{at:n}),!0}return!1}function F(e,t){B(e,t)||L(e,t)}function W(e,t){const o=Array.from(new w(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(o.every((({cellHeight:e})=>1===e)))return t.lastRow;const n=o[0].cellHeight-1;return t.lastRow+n}function N(e,t){const o=Array.from(new w(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(o.every((({cellWidth:e})=>1===e)))return t.lastColumn;const n=o[0].cellWidth-1;return t.lastColumn+n}class O extends e.Command{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=e.document,o=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],n=this.value,i=this.direction;e.change((e=>{const t="right"==i||"down"==i,r=t?o:n,l=t?n:o,s=l.parent;!function(e,t,o){j(e)||(j(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end")));o.remove(e)}(l,r,e);const a=this.isHorizontal?"colspan":"rowspan",c=parseInt(o.getAttribute(a)||"1"),d=parseInt(n.getAttribute(a)||"1");e.setAttribute(a,c+d,r),e.setSelection(e.createRangeIn(r));const u=this.editor.plugins.get("TableUtils");F(s.findAncestor("table"),u)}))}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),o=t.getTableCellsContainingSelection(e.selection)[0];if(!o)return;const n=this.isHorizontal?function(e,t,o){const n=e.parent,i=n.parent,r="right"==t?e.nextSibling:e.previousSibling,l=(i.getAttribute("headingColumns")||0)>0;if(!r)return;const s="right"==t?e:r,a="right"==t?r:e,{column:c}=o.getCellLocation(s),{column:d}=o.getCellLocation(a),h=parseInt(s.getAttribute("colspan")||"1"),b=u(o,s),m=u(o,a);if(l&&b!=m)return;return c+h===d?r:void 0}(o,this.direction,t):function(e,t,o){const n=e.parent,i=n.parent,r=i.getChildIndex(n);if("down"==t&&r===o.getRows(i)-1||"up"==t&&0===r)return null;const l=parseInt(e.getAttribute("rowspan")||"1"),s=i.getAttribute("headingRows")||0,a="down"==t&&r+l===s,c="up"==t&&r===s;if(s&&(a||c))return null;const d=parseInt(e.getAttribute("rowspan")||"1"),u="down"==t?r+d:r,h=[...new w(i,{endRow:u})],b=h.find((t=>t.cell===e)),m=b.column,g=h.find((({row:e,cellHeight:o,column:n})=>n===m&&("down"==t?e===u:u===e+o)));return g&&g.cell?g.cell:null}(o,this.direction,t);if(!n)return;const i=this.isHorizontal?"rowspan":"colspan",r=parseInt(o.getAttribute(i)||"1");return parseInt(n.getAttribute(i)||"1")===r?n:void 0}}function j(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}class M extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),i=e.getRows(n)-1,r=e.getRowIndexes(t),l=0===r.first&&r.last===i;this.isEnabled=!l}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),i=o[0],r=i.findAncestor("table"),l=t.getCellLocation(i).column;e.change((e=>{const o=n.last-n.first+1;t.removeRows(r,{at:n.first,rows:o});const i=function(e,t,o,n){const i=e.getChild(Math.min(t,n-1));let r=i.getChild(0),l=0;for(const e of i.getChildren()){if(l>o)return r;r=e,l+=parseInt(e.getAttribute("colspan")||"1")}return r}(r,n.first,l,t.getRows(r));e.setSelection(e.createPositionAt(i,0))}))}}class D extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),i=e.getColumns(n),{first:r,last:l}=e.getColumnIndexes(t);this.isEnabled=l-re.cell===t)).column,last:i.find((e=>e.cell===o)).column},l=function(e,t,o,n){const i=parseInt(o.getAttribute("colspan")||"1");return i>1?o:t.previousSibling||o.nextSibling?o.nextSibling||t.previousSibling:n.first?e.reverse().find((({column:e})=>ee>n.last)).cell}(i,t,o,r);this.editor.model.change((t=>{const o=r.last-r.first+1;e.removeColumns(n,{at:r.first,columns:o}),t.setSelection(t.createPositionAt(l,0))}))}}class H extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o.length>0;this.isEnabled=n,this.value=n&&o.every((e=>this._isInHeading(e,e.parent.parent)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),i=n[0].findAncestor("table"),{first:r,last:l}=t.getRowIndexes(n),s=this.value?r:l+1,a=i.getAttribute("headingRows")||0;o.change((e=>{if(s){const t=R(i,s,s>a?a:0);for(const{cell:o}of t)I(o,s,e)}c("headingRows",s,i,e,0)}))}_isInHeading(e,t){const o=parseInt(t.getAttribute("headingRows")||"0");return!!o&&e.parent.index0;this.isEnabled=n,this.value=n&&o.every((e=>u(t,e)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),i=n[0].findAncestor("table"),{first:r,last:l}=t.getColumnIndexes(n),s=this.value?r:l+1;o.change((e=>{if(s){const t=P(i,s);for(const{cell:o,column:n}of t)E(o,n,s,e)}c("headingColumns",s,i,e,0)}))}}const $=5,K=2;function G(e,t){return 4e3/q(e,t)}function q(e,t){const o=J(e,"tbody",t)||J(e,"thead",t);return X(t.editing.view.domConverter.mapViewToDom(o))}function J(e,t,o){return[...[...o.editing.mapper.toViewElement(e).getChildren()].find((e=>e.is("element","table"))).getChildren()].find((e=>e.is("element",t)))}function X(e){const t=m.global.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseFloat(t.width)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth):parseFloat(t.width)}function Y(e){const t=Math.pow(10,K),o="number"==typeof e?e:parseFloat(e);return Math.round(o*t)/t}function Q(e){return e.map((e=>"number"==typeof e?e:parseFloat(e))).filter((e=>!Number.isNaN(e))).reduce(((e,t)=>e+t),0)}function Z(e){let t=function(e){const t=e.filter((e=>"auto"===e)).length;if(0===t)return e.map((e=>Y(e)));const o=Q(e),n=Math.max((100-o)/t,$);return e.map((e=>"auto"===e?n:e)).map((e=>Y(e)))}(e.map((e=>"auto"===e?e:parseFloat(e.replace("%","")))));const o=Q(t);return 100!==o&&(t=t.map((e=>Y(100*e/o))).map(((e,t,o)=>{if(!(t===o.length-1))return e;return Y(e+100-Q(o))}))),t.map((e=>e+"%"))}function ee(e){const t=m.global.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseInt(t.width):parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)+parseFloat(t.borderWidth)}function te(e,t,o,n){for(let i=0;ie.is("element","tableColumnGroup")))}function ne(e){const t=oe(e);return t?Array.from(t.getChildren()):[]}class ie extends e.Plugin{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,o=t.parent,n=o.getChildIndex(t),i=new w(o,{row:n});for(const{cell:t,row:o,column:n}of i)if(t===e)return{row:o,column:n}}createTable(e,t){const o=e.createElement("table"),n=t.rows||2,i=t.columns||2;return re(e,o,0,n,i),t.headingRows&&c("headingRows",Math.min(t.headingRows,n),o,e,0),t.headingColumns&&c("headingColumns",Math.min(t.headingColumns,i),o,e,0),o}insertRows(e,t={}){const o=this.editor.model,n=t.at||0,i=t.rows||1,r=void 0!==t.copyStructureFromAbove,l=t.copyStructureFromAbove?n-1:n,s=this.getRows(e),a=this.getColumns(e);if(n>s)throw new m.CKEditorError("tableutils-insertrows-insert-out-of-range",this,{options:t});o.change((t=>{const o=e.getAttribute("headingRows")||0;if(o>n&&c("headingRows",o+i,e,t,0),!r&&(0===n||n===s))return void re(t,e,n,i,a);const u=r?Math.max(n,l):n,h=new w(e,{endRow:u}),b=new Array(a).fill(1);for(const{row:e,column:o,cellHeight:s,cellWidth:a,cell:c}of h){const d=e+s-1,u=e<=l&&l<=d;e0&&d(t,i,n>1?{colspan:n}:void 0),e+=Math.abs(n)-1}}}))}insertColumns(e,t={}){const o=this.editor.model,n=t.at||0,i=t.columns||1;o.change((t=>{const o=e.getAttribute("headingColumns");ni-1)throw new m.CKEditorError("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});o.change((t=>{const o={first:r,last:l},{cellsToMove:n,cellsToTrim:i}=function(e,{first:t,last:o}){const n=new Map,i=[];for(const{row:r,column:l,cellHeight:s,cell:a}of new w(e,{endRow:o})){const e=r+s-1;if(r>=t&&r<=o&&e>o){const e=s-(o-r+1);n.set(l,{cell:a,rowspan:e})}if(r=t){let n;n=e>=o?o-t+1:e-t+1,i.push({cell:a,rowspan:s-n})}}return{cellsToMove:n,cellsToTrim:i}}(e,o);if(n.size){!function(e,t,o,n){const i=new w(e,{includeAllSlots:!0,row:t}),r=[...i],l=e.getChild(t);let s;for(const{column:e,cell:t,isAnchor:i}of r)if(o.has(e)){const{cell:t,rowspan:i}=o.get(e),r=s?n.createPositionAfter(s):n.createPositionAt(l,0);n.move(n.createRangeOn(t),r),c("rowspan",i,t,n),s=t}else i&&(s=t)}(e,l+1,n,t)}for(let o=l;o>=r;o--)t.remove(e.getChild(o));for(const{rowspan:e,cell:o}of i)c("rowspan",e,o,t);!function(e,{first:t,last:o},n){const i=e.getAttribute("headingRows")||0;if(t{!function(e,t,o){const n=e.getAttribute("headingColumns")||0;if(n&&t.first=n;i--){for(const{cell:o,column:n,cellWidth:r}of[...new w(e)])n<=i&&r>1&&n+r>i?c("colspan",r-1,o,t):n===i&&t.remove(o);if(o[i]){const e=0===i?o[1]:o[i-1],n=parseFloat(o[i].getAttribute("columnWidth")),r=parseFloat(e.getAttribute("columnWidth"));t.remove(o[i]),t.setAttribute("columnWidth",n+r+"%",e)}}L(e,this)||B(e,this)}))}splitCellVertically(e,t=2){const o=this.editor.model,n=e.parent.parent,i=parseInt(e.getAttribute("rowspan")||"1"),r=parseInt(e.getAttribute("colspan")||"1");o.change((o=>{if(r>1){const{newCellsSpan:n,updatedSpan:l}=se(r,t);c("colspan",l,e,o);const s={};n>1&&(s.colspan=n),i>1&&(s.rowspan=i);le(r>t?t-1:r-1,o,o.createPositionAfter(e),s)}if(rt===e)),d=s.filter((({cell:t,cellWidth:o,column:n})=>t!==e&&n===a||na));for(const{cell:e,cellWidth:t}of d)o.setAttribute("colspan",t+l,e);const u={};i>1&&(u.rowspan=i),le(l,o,o.createPositionAfter(e),u);const h=n.getAttribute("headingColumns")||0;h>a&&c("headingColumns",h+l,n,o)}}))}splitCellHorizontally(e,t=2){const o=this.editor.model,n=e.parent,i=n.parent,r=i.getChildIndex(n),l=parseInt(e.getAttribute("rowspan")||"1"),s=parseInt(e.getAttribute("colspan")||"1");o.change((o=>{if(l>1){const n=[...new w(i,{startRow:r,endRow:r+l-1,includeAllSlots:!0})],{newCellsSpan:a,updatedSpan:d}=se(l,t);c("rowspan",d,e,o);const{column:u}=n.find((({cell:t})=>t===e)),h={};a>1&&(h.rowspan=a),s>1&&(h.colspan=s);for(const e of n){const{column:t,row:n}=e;n>=r+d&&t===u&&(n+r+d)%a==0&&le(1,o,e.getPositionBefore(),h)}}if(lr){const e=i+n;o.setAttribute("rowspan",e,t)}const d={};s>1&&(d.colspan=s),re(o,i,r+1,n,1,d);const u=i.getAttribute("headingRows")||0;u>r&&c("headingRows",u+n,i,o)}}))}getColumns(e){return[...e.getChild(0).getChildren()].filter((e=>e.is("element","tableCell"))).reduce(((e,t)=>e+parseInt(t.getAttribute("colspan")||"1")),0)}getRows(e){return Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0)}createTableWalker(e,t={}){return new w(e,t)}getSelectedTableCells(e){const t=[];for(const o of this.sortRanges(e.getRanges())){const e=o.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){const t=[];for(const o of e.getRanges()){const e=o.start.findAncestor("tableCell");e&&t.push(e)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map((e=>e.parent.index));return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){const t=e[0].findAncestor("table"),o=[...new w(t)].filter((t=>e.includes(t.cell))).map((e=>e.column));return this._getFirstLastIndexesObject(o)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,o=new Set;let n=0;for(const i of e){const{row:e,column:r}=this.getCellLocation(i),l=parseInt(i.getAttribute("rowspan"))||1,s=parseInt(i.getAttribute("colspan"))||1;t.add(e),o.add(r),l>1&&t.add(e+l-1),s>1&&o.add(r+s-1),n+=l*s}const i=function(e,t){const o=Array.from(e.values()),n=Array.from(t.values()),i=Math.max(...o),r=Math.min(...o),l=Math.max(...n),s=Math.min(...n);return(i-r+1)*(l-s+1)}(t,o);return i==n}sortRanges(e){return Array.from(e).sort(ae)}_getFirstLastIndexesObject(e){const t=e.sort(((e,t)=>e-t));return{first:t[0],last:t[t.length-1]}}_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),o=this.getRowIndexes(e),n=parseInt(t.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(o,n))return!1;const i=this.getColumnIndexes(e),r=parseInt(t.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(i,r)}_areIndexesInSameSection({first:e,last:t},o){return e{const n=t.getSelectedTableCells(e.document.selection),i=n.shift(),{mergeWidth:r,mergeHeight:l}=function(e,t,o){let n=0,i=0;for(const e of t){const{row:t,column:r}=o.getCellLocation(e);n=he(e,r,n,"colspan"),i=he(e,t,i,"rowspan")}const{row:r,column:l}=o.getCellLocation(e),s=n-l,a=i-r;return{mergeWidth:s,mergeHeight:a}}(i,n,t);c("colspan",r,i,o),c("rowspan",l,i,o);for(const e of n)de(e,i,o);F(i.findAncestor("table"),t),o.setSelection(i,"in")}))}}function de(e,t,o){ue(e)||(ue(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end"))),o.remove(e)}function ue(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}function he(e,t,o,n){const i=parseInt(e.getAttribute(n)||"1");return Math.max(o,t+i)}class be extends e.Command{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),i=o[0].findAncestor("table"),r=[];for(let t=n.first;t<=n.last;t++)for(const o of i.getChild(t).getChildren())r.push(e.createRangeOn(o));e.change((e=>{e.setSelection(r)}))}}class me extends e.Command{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o[0],i=o.pop(),r=n.findAncestor("table"),l=e.getCellLocation(n),s=e.getCellLocation(i),a=Math.min(l.column,s.column),c=Math.max(l.column,s.column),d=[];for(const e of new w(r,{startColumn:a,endColumn:c}))d.push(t.createRangeOn(e.cell));t.change((e=>{e.setSelection(d)}))}}function ge(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.differ.getChanges();let n=!1;const i=new Set;for(const t of o){let o=null;"insert"==t.type&&"table"==t.name&&(o=t.position.nodeAfter),"insert"!=t.type&&"remove"!=t.type||"tableRow"!=t.name&&"tableCell"!=t.name||(o=t.position.findAncestor("table")),we(t)&&(o=t.range.start.findAncestor("table")),o&&!i.has(o)&&(n=pe(o,e)||n,n=fe(o,e)||n,i.add(o))}return n}(t,e)))}function pe(e,t){let o=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||"0"),o=Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0),n=[];for(const{row:i,cell:r,cellHeight:l}of new w(e)){if(l<2)continue;const e=ie){const t=e-i;n.push({cell:r,rowspan:t})}}return n}(e);if(n.length){o=!0;for(const e of n)c("rowspan",e.rowspan,e.cell,t,1)}return o}function fe(e,t){let o=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:o}of new w(e,{includeAllSlots:!0}))t[o]++;return t}(e),i=[];for(const[t,o]of n.entries())!o&&e.getChild(t).is("element","tableRow")&&i.push(t);if(i.length){o=!0;for(const o of i.reverse())t.remove(e.getChild(o)),n.splice(o,1)}const r=n.filter(((t,o)=>e.getChild(o).is("element","tableRow"))),l=r[0];if(!r.every((e=>e===l))){const n=r.reduce(((e,t)=>t>e?t:e),0);for(const[i,l]of r.entries()){const r=n-l;if(r){for(let o=0;ofunction(e,t){const o=t.document.differ.getChanges();let n=!1;for(const t of o)"insert"==t.type&&"table"==t.name&&(n=ke(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=ve(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=Ce(t.position.nodeAfter,e)||n),"remove"!=t.type&&"insert"!=t.type||!ye(t)||(n=Ce(t.position.parent,e)||n);return n}(t,e)))}function ke(e,t){let o=!1;for(const n of e.getChildren())n.is("element","tableRow")&&(o=ve(n,t)||o);return o}function ve(e,t){let o=!1;for(const n of e.getChildren())o=Ce(n,t)||o;return o}function Ce(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const o=Array.from(e.getChildren()).filter((e=>e.is("$text")));for(const e of o)t.wrap(t.createRangeOn(e),"paragraph");return!!o.length}function ye(e){return!!e.position.parent.is("element","tableCell")&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function Ae(e,t){if(!e.is("element","paragraph"))return!1;const o=t.toViewElement(e);return!!o&&y(e)!==o.is("element","span")}var Te=o(591),xe=o.n(Te),Se=o(817),Ve={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Se.A,Ve);Se.A.locals;class Re extends e.Plugin{static get pluginName(){return"TableEditing"}static get requires(){return[ie]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,t=e.model,o=t.schema,n=e.conversion,i=e.plugins.get(ie);o.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),o.register("tableRow",{allowIn:"table",isLimit:!0}),o.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),n.for("upcast").add((e=>{e.on("element:figure",((e,t,o)=>{if(!o.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(t.viewItem,{name:!0,classes:"table"});const i=o.convertItem(n,t.modelCursor),r=(0,m.first)(i.modelRange.getItems());r?(o.convertChildren(t.viewItem,o.writer.createPositionAt(r,"end")),o.updateConversionResult(r,t)):o.consumable.revert(t.viewItem,{name:!0,classes:"table"})}))})),n.for("upcast").add(g()),n.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:k(i,{asWidget:!0,additionalSlots:this._additionalSlots})}),n.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:k(i,{additionalSlots:this._additionalSlots})}),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add((e=>{e.on("element:tr",((e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()}),{priority:"high"})})),n.for("downcast").elementToElement({model:"tableRow",view:(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add(p("td")),n.for("upcast").add(p("th")),n.for("editingDowncast").elementToElement({model:"tableCell",view:v({asWidget:!0})}),n.for("dataDowncast").elementToElement({model:"tableCell",view:v()}),n.for("editingDowncast").elementToElement({model:"paragraph",view:C({asWidget:!0}),converterPriority:"high"}),n.for("dataDowncast").elementToElement({model:"paragraph",view:C(),converterPriority:"high"}),n.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),n.for("upcast").attributeToAttribute({model:{key:"colspan",value:Ie("colspan")},view:"colspan"}),n.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("upcast").attributeToAttribute({model:{key:"rowspan",value:Ie("rowspan")},view:"rowspan"}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new A(e)),e.commands.add("insertTableRowAbove",new T(e,{order:"above"})),e.commands.add("insertTableRowBelow",new T(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new x(e,{order:"left"})),e.commands.add("insertTableColumnRight",new x(e,{order:"right"})),e.commands.add("removeTableRow",new M(e)),e.commands.add("removeTableColumn",new D(e)),e.commands.add("splitTableCellVertically",new S(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new S(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new ce(e)),e.commands.add("mergeTableCellRight",new O(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new O(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new O(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new O(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new U(e)),e.commands.add("setTableRowHeader",new H(e)),e.commands.add("selectTableRow",new be(e)),e.commands.add("selectTableColumn",new me(e)),ge(t),_e(t),this.listenTo(t.document,"change:data",(()=>{!function(e,t){const o=e.document.differ;for(const e of o.getChanges()){let o,n=!1;if("attribute"==e.type){const t=e.range.start.nodeAfter;if(!t||!t.is("element","table"))continue;if("headingRows"!=e.attributeKey&&"headingColumns"!=e.attributeKey)continue;o=t,n="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(o=e.position.findAncestor("table"),n="tableRow"==e.name);if(!o)continue;const i=o.getAttribute("headingRows")||0,r=o.getAttribute("headingColumns")||0,l=new w(o);for(const e of l){const o=e.rowAe(e,t.mapper)));for(const e of o)t.reconvertItem(e)}}(t,e.editing)}))}registerAdditionalSlot(e){this._additionalSlots.push(e)}}function Ie(e){return t=>{const o=parseInt(t.getAttribute(e));return Number.isNaN(o)||o<=0?null:o}}var Pe=o(311),Ee=o(712),ze={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Ee.A,ze);Ee.A.locals;class Be extends Pe.View{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new m.KeystrokeHandler,this.focusTracker=new m.FocusTracker,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",((e,t)=>`${t} × ${e}`)),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:t.to("label")}]}],on:{mousedown:t.to((e=>{e.preventDefault()})),click:t.to((()=>{this.fire("execute")}))}}),this.on("boxover",((e,t)=>{const{row:o,column:n}=t.target.dataset;this.items.get(10*(parseInt(o,10)-1)+(parseInt(n,10)-1)).focus()})),this.focusTracker.on("change:focusedElement",((e,t,o)=>{if(!o)return;const{row:n,column:i}=o.dataset;this.set({rows:parseInt(n),columns:parseInt(i)})})),this.on("change:columns",(()=>this._highlightGridBoxes())),this.on("change:rows",(()=>this._highlightGridBoxes()))}render(){super.render(),(0,Pe.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}reset(){this.set({rows:1,columns:1})}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map(((o,n)=>{const i=Math.floor(n/10){const i=t.commands.get("insertTable"),r=(0,Pe.createDropdown)(n);let l;return r.bind("isEnabled").to(i),r.buttonView.set({icon:e.icons.table,label:o("Insert table"),tooltip:!0}),r.on("change:isOpen",(()=>{l||(l=new Be(n),r.panelView.children.add(l),l.delegate("execute").to(r),r.on("execute",(()=>{t.execute("insertTable",{rows:l.rows,columns:l.columns}),t.editing.view.focus()})))})),r})),t.ui.componentFactory.add("menuBar:insertTable",(n=>{const i=t.commands.get("insertTable"),r=new Pe.MenuBarMenuView(n),l=new Be(n);return l.delegate("execute").to(r),r.on("change:isOpen",((e,t,o)=>{o||l.reset()})),l.on("execute",(()=>{t.execute("insertTable",{rows:l.rows,columns:l.columns}),t.editing.view.focus()})),r.buttonView.set({label:o("Table"),icon:e.icons.table}),r.panelView.children.add(l),r.bind("isEnabled").to(i),r})),t.ui.componentFactory.add("tableColumn",(e=>{const t=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:o("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:n?"insertTableColumnLeft":"insertTableColumnRight",label:o("Insert column left")}},{type:"button",model:{commandName:n?"insertTableColumnRight":"insertTableColumnLeft",label:o("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:o("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:o("Select column")}}];return this._prepareDropdown(o("Column"),'',t,e)})),t.ui.componentFactory.add("tableRow",(e=>{const t=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:o("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:o("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:o("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:o("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:o("Select row")}}];return this._prepareDropdown(o("Row"),'',t,e)})),t.ui.componentFactory.add("mergeTableCells",(e=>{const t=[{type:"button",model:{commandName:"mergeTableCellUp",label:o("Merge cell up")}},{type:"button",model:{commandName:n?"mergeTableCellRight":"mergeTableCellLeft",label:o("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:o("Merge cell down")}},{type:"button",model:{commandName:n?"mergeTableCellLeft":"mergeTableCellRight",label:o("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:o("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:o("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(o("Merge cells"),'',t,e)}))}_prepareDropdown(e,t,o,n){const i=this.editor,r=(0,Pe.createDropdown)(n),l=this._fillDropdownWithListOptions(r,o);return r.buttonView.set({label:e,icon:t,tooltip:!0}),r.bind("isEnabled").toMany(l,"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(r,"execute",(e=>{i.execute(e.source.commandName),e.source instanceof Pe.SwitchButtonView||i.editing.view.focus()})),r}_prepareMergeSplitButtonDropdown(e,t,o,n){const i=this.editor,r=(0,Pe.createDropdown)(n,Pe.SplitButtonView),l="mergeTableCells",s=i.commands.get(l),a=this._fillDropdownWithListOptions(r,o);return r.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),r.bind("isEnabled").toMany([s,...a],"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(r.buttonView,"execute",(()=>{i.execute(l),i.editing.view.focus()})),this.listenTo(r,"execute",(e=>{i.execute(e.source.commandName),i.editing.view.focus()})),r}_fillDropdownWithListOptions(e,t){const o=this.editor,n=[],i=new m.Collection;for(const e of t)Fe(e,o,n,i);return(0,Pe.addListToDropdown)(e,i),n}}function Fe(e,t,o,n){if("button"===e.type||"switchbutton"===e.type){const n=e.model=new Pe.ViewModel(e.model),{commandName:i,bindIsOn:r}=e.model,l=t.commands.get(i);o.push(l),n.set({commandName:i}),n.bind("isEnabled").to(l),r&&n.bind("isOn").to(l,"value"),n.set({withText:!0})}n.add(e)}var We=o(719),Ne={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(We.A,Ne);We.A.locals;class Oe extends e.Plugin{static get pluginName(){return"TableSelection"}static get requires(){return[ie,ie]}init(){const e=this.editor,t=e.model,o=e.editing.view;this.listenTo(t,"deleteContent",((e,t)=>this._handleDeleteContent(e,t)),{priority:"high"}),this.listenTo(o.document,"insertText",((e,t)=>this._handleInsertTextEvent(e,t)),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(ie),t=this.editor.model.document.selection,o=e.getSelectedTableCells(t);return 0==o.length?null:o}getSelectionAsFragment(){const e=this.editor.plugins.get(ie),t=this.getSelectedTableCells();return t?this.editor.model.change((o=>{const n=o.createDocumentFragment(),{first:i,last:r}=e.getColumnIndexes(t),{first:l,last:s}=e.getRowIndexes(t),a=t[0].findAncestor("table");let c=s,d=r;if(e.isSelectionRectangular(t)){const e={firstColumn:i,lastColumn:r,firstRow:l,lastRow:s};c=W(a,e),d=N(a,e)}const u=V(a,{startRow:l,startColumn:i,endRow:c,endColumn:d},o);return o.insert(u,n,0),n})):null}setCellSelection(e,t){const o=this._getCellsToSelect(e,t);this.editor.model.change((e=>{e.setSelection(o.cells.map((t=>e.createRangeOn(t))),{backward:o.backward})}))}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=this.editor.model.document.selection,t=(0,m.first)(e.getRanges()).getContainedElement();return t&&t.is("element","tableCell")?t:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add((e=>e.on("selection",((e,o,n)=>{const i=n.writer;!function(e){for(const o of t)e.removeClass("ck-editor__editable_selected",o);t.clear()}(i);const r=this.getSelectedTableCells();if(!r)return;for(const e of r){const o=n.mapper.toViewElement(e);i.addClass("ck-editor__editable_selected",o),t.add(o)}const l=n.mapper.toViewElement(r[r.length-1]);i.setSelection(l,0)}),{priority:"lowest"})))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",(()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change((o=>{const n=o.createPositionAt(t[0],0),i=e.model.schema.getNearestSelectionRange(n);o.setSelection(i)}))}}))}_handleDeleteContent(e,t){const o=this.editor.plugins.get(ie),n=t[0],i=t[1],r=this.editor.model,l=!i||"backward"==i.direction,s=o.getSelectedTableCells(n);s.length&&(e.stop(),r.change((e=>{const t=s[l?s.length-1:0];r.change((e=>{for(const t of s)r.deleteContent(e.createSelection(t,"in"))}));const o=r.schema.getNearestSelectionRange(e.createPositionAt(t,0));n.is("documentSelection")?e.setSelection(o):n.setTo(o)})))}_handleInsertTextEvent(e,t){const o=this.editor,n=this.getSelectedTableCells();if(!n)return;const i=o.editing.view,r=o.editing.mapper,l=n.map((e=>i.createRangeOn(r.toViewElement(e))));t.selection=i.createSelection(l)}_getCellsToSelect(e,t){const o=this.editor.plugins.get("TableUtils"),n=o.getCellLocation(e),i=o.getCellLocation(t),r=Math.min(n.row,i.row),l=Math.max(n.row,i.row),s=Math.min(n.column,i.column),a=Math.max(n.column,i.column),c=new Array(l-r+1).fill(null).map((()=>[])),d={startRow:r,endRow:l,startColumn:s,endColumn:a};for(const{row:t,cell:o}of new w(e.findAncestor("table"),d))c[t-r].push(o);const u=i.rowe.reverse())),{cells:c.flat(),backward:u||h}}}var je=o(331);class Me extends e.Plugin{static get pluginName(){return"TableClipboard"}static get requires(){return[je.ClipboardMarkersUtils,je.ClipboardPipeline,Oe,ie]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",((e,t)=>this._onCopyCut(e,t))),this.listenTo(t,"cut",((e,t)=>this._onCopyCut(e,t))),this.listenTo(e.model,"insertContent",((e,[t,o])=>this._onInsertContent(e,t,o)),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const o=this.editor.editing.view,n=this.editor.plugins.get(Oe),i=this.editor.plugins.get(je.ClipboardMarkersUtils);n.getSelectedTableCells()&&("cut"!=e.name||this.editor.model.canEditAt(this.editor.model.document.selection))&&(t.preventDefault(),e.stop(),this.editor.model.enqueueChange({isUndoable:"cut"===e.name},(()=>{const r=i._copySelectedFragmentWithMarkers(e.name,this.editor.model.document.selection,(()=>n.getSelectionAsFragment()));o.document.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:this.editor.data.toView(r),method:e.name})})))}_onInsertContent(e,t,o){if(o&&!o.is("documentSelection"))return;const n=this.editor.model,i=this.editor.plugins.get(ie),r=this.editor.plugins.get(je.ClipboardMarkersUtils),l=this.getTableIfOnlyTableInContent(t,n);if(!l)return;const s=i.getSelectionAffectedTableCells(n.document.selection);s.length?(e.stop(),t.is("documentFragment")?r._pasteMarkersIntoTransformedElement(t.markers,(e=>this._replaceSelectedCells(l,s,e))):this.editor.model.change((e=>{this._replaceSelectedCells(l,s,e)}))):F(l,i)}_replaceSelectedCells(e,t,o){const n=this.editor.plugins.get(ie),i={width:n.getColumns(e),height:n.getRows(e)},r=function(e,t,o,n){const i=e[0].findAncestor("table"),r=n.getColumnIndexes(e),l=n.getRowIndexes(e),s={firstColumn:r.first,lastColumn:r.last,firstRow:l.first,lastRow:l.last},a=1===e.length;a&&(s.lastRow+=t.height-1,s.lastColumn+=t.width-1,function(e,t,o,n){const i=n.getColumns(e),r=n.getRows(e);o>i&&n.insertColumns(e,{at:i,columns:o-i});t>r&&n.insertRows(e,{at:r,rows:t-r})}(i,s.lastRow+1,s.lastColumn+1,n));a||!n.isSelectionRectangular(e)?function(e,t,o){const{firstRow:n,lastRow:i,firstColumn:r,lastColumn:l}=t,s={first:n,last:i},a={first:r,last:l};He(e,r,s,o),He(e,l+1,s,o),De(e,n,a,o),De(e,i+1,a,o,n)}(i,s,o):(s.lastRow=W(i,s),s.lastColumn=N(i,s));return s}(t,i,o,n),l=r.lastRow-r.firstRow+1,s=r.lastColumn-r.firstColumn+1;e=V(e,{startRow:0,startColumn:0,endRow:Math.min(l,i.height)-1,endColumn:Math.min(s,i.width)-1},o);const a=t[0].findAncestor("table"),c=this._replaceSelectedCellsWithPasted(e,i,a,r,o);if(this.editor.plugins.get("TableSelection").isEnabled){const e=n.sortRanges(c.map((e=>o.createRangeOn(e))));o.setSelection(e)}else o.setSelection(c[0],0);return a}_replaceSelectedCellsWithPasted(e,t,o,n,i){const{width:r,height:l}=t,s=function(e,t,o){const n=new Array(o).fill(null).map((()=>new Array(t).fill(null)));for(const{column:t,row:o,cell:i}of new w(e))n[o][t]=i;return n}(e,r,l),a=[...new w(o,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],c=[];let d;for(const e of a){const{row:t,column:o}=e;o===n.firstColumn&&(d=e.getPositionBefore());const a=t-n.firstRow,u=o-n.firstColumn,h=s[a%l][u%r],b=h?i.cloneElement(h):null,m=this._replaceTableSlotCell(e,b,d,i);m&&(z(m,t,o,n.lastRow,n.lastColumn,i),c.push(m),d=i.createPositionAfter(m))}const u=parseInt(o.getAttribute("headingRows")||"0"),h=parseInt(o.getAttribute("headingColumns")||"0"),b=n.firstRowUe(e,t,o))).map((({cell:e})=>I(e,t,n)))}function He(e,t,o,n){if(t<1)return;return P(e,t).filter((({row:e,cellHeight:t})=>Ue(e,t,o))).map((({cell:e,column:o})=>E(e,o,t,n)))}function Ue(e,t,o){const n=e+t-1,{first:i,last:r}=o;return e>=i&&e<=r||e=i}class $e extends e.Plugin{static get pluginName(){return"TableKeyboard"}static get requires(){return[Oe,ie]}init(){const e=this.editor,t=e.editing.view.document,o=e.t;this.listenTo(t,"arrowKey",((...e)=>this._onArrowKey(...e)),{context:"table"}),this.listenTo(t,"tab",((...e)=>this._handleTabOnSelectedTable(...e)),{context:"figure"}),this.listenTo(t,"tab",((...e)=>this._handleTab(...e)),{context:["th","td"]}),e.accessibility.addKeystrokeInfoGroup({id:"table",label:o("Keystrokes that can be used in a table cell"),keystrokes:[{label:o("Move the selection to the next cell"),keystroke:"Tab"},{label:o("Move the selection to the previous cell"),keystroke:"Shift+Tab"},{label:o("Insert a new table row (when in the last cell of a table)"),keystroke:"Tab"},{label:o("Navigate through the table"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]}]})}_handleTabOnSelectedTable(e,t){const o=this.editor,n=o.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t.preventDefault(),t.stopPropagation(),e.stop(),o.model.change((e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))})))}_handleTab(e,t){const o=this.editor,n=this.editor.plugins.get(ie),i=this.editor.plugins.get("TableSelection"),r=o.model.document.selection,l=!t.shiftKey;let s=n.getTableCellsContainingSelection(r)[0];if(s||(s=i.getFocusCell()),!s)return;t.preventDefault(),t.stopPropagation(),e.stop();const a=s.parent,c=a.parent,d=c.getChildIndex(a),u=a.getChildIndex(s),h=0===u;if(!l&&h&&0===d)return void o.model.change((e=>{e.setSelection(e.createRangeOn(c))}));const b=u===a.childCount-1,m=d===n.getRows(c)-1;if(l&&m&&b&&(o.execute("insertTableRowBelow"),d===n.getRows(c)-1))return void o.model.change((e=>{e.setSelection(e.createRangeOn(c))}));let g;if(l&&b){const e=c.getChild(d+1);g=e.getChild(0)}else if(!l&&h){const e=c.getChild(d-1);g=e.getChild(e.childCount-1)}else g=a.getChild(u+(l?1:-1));o.model.change((e=>{e.setSelection(e.createRangeIn(g))}))}_onArrowKey(e,t){const o=this.editor,n=t.keyCode,i=(0,m.getLocalizedArrowKeyCodeDirection)(n,o.locale.contentLanguageDirection);this._handleArrowKeys(i,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const o=this.editor.plugins.get(ie),n=this.editor.plugins.get("TableSelection"),i=this.editor.model,r=i.document.selection,l=["right","down"].includes(e),s=o.getSelectedTableCells(r);if(s.length){let o;return o=t?n.getFocusCell():l?s[s.length-1]:s[0],this._navigateFromCellInDirection(o,e,t),!0}const a=r.focus.findAncestor("tableCell");if(!a)return!1;if(!r.isCollapsed)if(t){if(r.isBackward==l&&!r.containsEntireContent(a))return!1}else{const e=r.getSelectedElement();if(!e||!i.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(r,a,l)&&(this._navigateFromCellInDirection(a,e,t),!0)}_isSelectionAtCellEdge(e,t,o){const n=this.editor.model,i=this.editor.model.schema,r=o?e.getLastPosition():e.getFirstPosition();if(!i.getLimitElement(r).is("element","tableCell")){return n.createPositionAt(t,o?"end":0).isTouching(r)}const l=n.createSelection(r);return n.modifySelection(l,{direction:o?"forward":"backward"}),r.isEqual(l.focus)}_navigateFromCellInDirection(e,t,o=!1){const n=this.editor.model,i=e.findAncestor("table"),r=[...new w(i,{includeAllSlots:!0})],{row:l,column:s}=r[r.length-1],a=r.find((({cell:t})=>t==e));let{row:c,column:d}=a;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=a.cellWidth;break;case"down":c+=a.cellHeight}if(c<0||c>l||d<0&&c<=0||d>s&&c>=l)return void n.change((e=>{e.setSelection(e.createRangeOn(i))}));d<0?(d=o?0:s,c--):d>s&&(d=o?s:0,c++);const u=r.find((e=>e.row==c&&e.column==d)).cell,h=["right","down"].includes(t),b=this.editor.plugins.get("TableSelection");if(o&&b.isEnabled){const t=b.getAnchorCell()||e;b.setCellSelection(t,u)}else{const e=n.createPositionAt(u,h?0:"end");n.change((t=>{t.setSelection(e)}))}}}var Ke=o(783);class Ge extends Ke.DomEventObserver{constructor(){super(...arguments),this.domEventType=["mousemove","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class qe extends e.Plugin{static get pluginName(){return"TableMouse"}static get requires(){return[Oe,ie]}init(){this.editor.editing.view.addObserver(Ge),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(ie);let o=!1;const n=e.plugins.get(Oe);this.listenTo(e.editing.view.document,"mousedown",((i,r)=>{const l=e.model.document.selection;if(!this.isEnabled||!n.isEnabled)return;if(!r.domEvent.shiftKey)return;const s=n.getAnchorCell()||t.getTableCellsContainingSelection(l)[0];if(!s)return;const a=this._getModelTableCellFromDomEvent(r);a&&Je(s,a)&&(o=!0,n.setCellSelection(s,a),r.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{o=!1})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{o&&e.stop()}),{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,o,n=!1,i=!1;const r=e.plugins.get(Oe);this.listenTo(e.editing.view.document,"mousedown",((e,o)=>{this.isEnabled&&r.isEnabled&&(o.domEvent.shiftKey||o.domEvent.ctrlKey||o.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(o)))})),this.listenTo(e.editing.view.document,"mousemove",((e,l)=>{if(!l.domEvent.buttons)return;if(!t)return;const s=this._getModelTableCellFromDomEvent(l);s&&Je(t,s)&&(o=s,n||o==t||(n=!0)),n&&(i=!0,r.setCellSelection(t,o),l.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{n=!1,i=!1,t=null,o=null})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{i&&e.stop()}),{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,o=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(o).parent.findAncestor("tableCell",{includeSelf:!0})}}function Je(e,t){return e.parent.parent==t.parent.parent}var Xe=o(25),Ye={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Xe.A,Ye);Xe.A.locals;class Qe extends e.Plugin{static get requires(){return[Re,Le,Oe,qe,$e,Me,t.Widget]}static get pluginName(){return"Table"}}class Ze extends e.Plugin{static get pluginName(){return"PlainTableOutput"}static get requires(){return[Qe]}init(){const e=this.editor;e.conversion.for("dataDowncast").elementToStructure({model:"table",view:et,converterPriority:"high"}),e.plugins.has("TableCaption")&&e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>{if("table"===e.parent.name)return t.createContainerElement("caption")},converterPriority:"high"}),e.plugins.has("TableProperties")&&function(e){const t={"border-width":"tableBorderWidth","border-color":"tableBorderColor","border-style":"tableBorderStyle","background-color":"tableBackgroundColor"};for(const[o,n]of Object.entries(t))e.conversion.for("dataDowncast").add((e=>e.on(`attribute:${n}:table`,((e,t,n)=>{const{item:i,attributeNewValue:r}=t,{mapper:l,writer:s}=n;if(!n.consumable.consume(i,e.name))return;const a=l.toViewElement(i);r?s.setStyle(o,r,a):s.removeStyle(o,a)}),{priority:"high"})))}(e)}}function et(e,{writer:t}){const o=e.getAttribute("headingRows")||0,n=t.createSlot((e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=o)),r=t.createSlot((e=>!e.is("element","tableRow"))),l=t.createContainerElement("thead",null,n),s=t.createContainerElement("tbody",null,i),a=[];return o&&a.push(l),othis._setInputValue(o)))}render(){super.render(),[this.inputView,this.dropdownView.buttonView].forEach((e=>{this.focusTracker.add(e.element),this._focusables.add(e)})),this.keystrokes.listenTo(this.element)}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,t=e.t,o=this.bindTemplate,n=this._createColorSelector(e),i=(0,Pe.createDropdown)(e),r=new Pe.View;return r.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:o.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",o.if("value","ck-hidden",(e=>""!=e))]}}]}),i.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),i.buttonView.children.add(r),i.buttonView.label=t("Color picker"),i.buttonView.tooltip=!0,i.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",i.panelView.children.add(n),i.bind("isEnabled").to(this,"isReadOnly",(e=>!e)),i.on("change:isOpen",((e,t,o)=>{o&&(n.updateSelectedColors(),n.showColorGridsFragment())})),i}_createInputTextView(){const e=this.locale,t=new Pe.InputTextView(e);return t.extendTemplate({on:{blur:t.bindTemplate.to("blur")}}),t.value=this.value,t.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(t),t.on("input",(()=>{const e=t.element.value,o=this.options.colorDefinitions.find((t=>e===t.label));this._stillTyping=!0,this.value=o&&o.color||e})),t.on("blur",(()=>{this._stillTyping=!1,this._setInputValue(t.element.value)})),t.delegate("input").to(this),t}_createColorSelector(e){const t=e.t,o=this.options.defaultColorValue||"",n=t(o?"Restore default":"Remove color"),i=new Pe.ColorSelectorView(e,{colors:this.options.colorDefinitions,columns:this.options.columns,removeButtonLabel:n,colorPickerLabel:t("Color picker"),colorPickerViewConfig:!1!==this.options.colorPickerConfig&&{...this.options.colorPickerConfig,hideInput:!0}});i.appendUI(),i.on("execute",((e,t)=>{"colorPickerSaveButton"!==t.source?(this.value=t.value||o,this.fire("input"),"colorPicker"!==t.source&&(this.dropdownView.isOpen=!1)):this.dropdownView.isOpen=!1}));let r=this.value;return i.on("colorPicker:cancel",(()=>{this.value=r,this.fire("input"),this.dropdownView.isOpen=!1})),i.colorGridsFragmentView.colorPickerButtonView.on("execute",(()=>{r=this.value})),i.bind("selectedColor").to(this,"value"),i}_setInputValue(e){if(!this._stillTyping){const t=ct(e),o=this.options.colorDefinitions.find((e=>t===ct(e.color)));this.inputView.value=o?o.label:e||""}}}function ct(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const dt=e=>""===e;function ut(e){return{none:e("None"),solid:e("Solid"),dotted:e("Dotted"),dashed:e("Dashed"),double:e("Double"),groove:e("Groove"),ridge:e("Ridge"),inset:e("Inset"),outset:e("Outset")}}function ht(e){return e('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function bt(e){return e('The value is invalid. Try "10px" or "2em" or simply "2".')}function mt(e){return e=e.trim().toLowerCase(),dt(e)||(0,Ke.isColor)(e)}function gt(e){return e=e.trim(),dt(e)||vt(e)||(0,Ke.isLength)(e)||(0,Ke.isPercentage)(e)}function pt(e){return e=e.trim(),dt(e)||vt(e)||(0,Ke.isLength)(e)}function ft(e,t){const o=new m.Collection,n=ut(e.t);for(const i in n){const r={type:"button",model:new Pe.ViewModel({_borderStyleValue:i,label:n[i],role:"menuitemradio",withText:!0})};"none"===i?r.model.bind("isOn").to(e,"borderStyle",(e=>"none"===t?!e:e===i)):r.model.bind("isOn").to(e,"borderStyle",(e=>e===i)),o.add(r)}return o}function wt(e){const{view:t,icons:o,toolbar:n,labels:i,propertyName:r,nameToValue:l,defaultValue:s}=e;for(const e in i){const a=new Pe.ButtonView(t.locale);a.set({label:i[e],icon:o[e],tooltip:i[e]});const c=l?l(e):e;a.bind("isOn").to(t,r,(e=>{let t=e;return""===e&&s&&(t=s),c===t})),a.on("execute",(()=>{t[r]=c})),n.items.add(a)}}const _t=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function kt(e){return(t,o,n)=>{const i=new at(t.locale,{colorDefinitions:(r=e.colorConfig,r.map((e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}})))),columns:e.columns,defaultColorValue:e.defaultColorValue,colorPickerConfig:e.colorPickerConfig});var r;return i.inputView.set({id:o,ariaDescribedById:n}),i.bind("isReadOnly").to(t,"isEnabled",(e=>!e)),i.bind("hasError").to(t,"errorText",(e=>!!e)),i.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused").to(i),i}}function vt(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}var Ct=o(839),yt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Ct.A,yt);Ct.A.locals;class At extends Pe.View{constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",o.to("class")],role:o.to("_role"),"aria-labelledby":o.to("_ariaLabelledBy")},children:this.children})}}var Tt=o(67),xt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Tt.A,xt);Tt.A.locals;var St=o(911),Vt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(St.A,Vt);St.A.locals;var Rt=o(266),It={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Rt.A,It);Rt.A.locals;class Pt extends Pe.View{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:i,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:l,backgroundInput:s}=this._createBackgroundFields(),{widthInput:a,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{horizontalAlignmentToolbar:h,verticalAlignmentToolbar:b,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new m.FocusTracker,this.keystrokes=new m.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=i,this.backgroundInput=s,this.paddingInput=this._createPaddingField(),this.widthInput=a,this.heightInput=d,this.horizontalAlignmentToolbar=h,this.verticalAlignmentToolbar=b;const{saveButtonView:p,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=p,this.cancelButtonView=f,this._focusables=new Pe.ViewCollection,this._focusCycler=new Pe.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Pe.FormHeaderView(e,{label:this.t("Cell properties")})),this.children.add(new At(e,{labelView:r,children:[r,o,i,n],class:"ck-table-form__border-row"})),this.children.add(new At(e,{labelView:l,children:[l,s],class:"ck-table-form__background-row"})),this.children.add(new At(e,{children:[new At(e,{labelView:u,children:[u,a,c,d],class:"ck-table-form__dimensions-row"}),new At(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new At(e,{labelView:g,children:[g,h,b],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new At(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,Pe.submitHandler)({view:this}),[this.borderColorInput,this.backgroundInput].forEach((e=>{e.fieldView.focusCycler.on("forwardCycle",(e=>{this._focusCycler.focusNext(),e.stop()})),e.fieldView.focusCycler.on("backwardCycle",(e=>{this._focusCycler.focusPrevious(),e.stop()}))})),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=kt({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,i=this.t,r=i("Style"),l=new Pe.LabelView(n);l.text=i("Border");const s=ut(i),a=new Pe.LabeledFieldView(n,Pe.createLabeledDropdown);a.set({label:r,class:"ck-table-form__border-style"}),a.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),a.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>s[e||"none"])),a.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),a.bind("isEmpty").to(this,"borderStyle",(e=>!e)),(0,Pe.addListToDropdown)(a.fieldView,ft(this,t.style),{role:"menu",ariaLabel:r});const c=new Pe.LabeledFieldView(n,Pe.createLabeledInputText);c.set({label:i("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",Et),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new Pe.LabeledFieldView(n,o);return d.set({label:i("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",Et),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,o,n,i)=>{Et(n)||(this.borderColor="",this.borderWidth=""),Et(i)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:l,borderStyleDropdown:a,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new Pe.LabelView(e);o.text=t("Background");const n=kt({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),i=new Pe.LabeledFieldView(e,n);return i.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new Pe.LabelView(e);o.text=t("Dimensions");const n=new Pe.LabeledFieldView(e,Pe.createLabeledInputText);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const i=new Pe.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new Pe.LabeledFieldView(e,Pe.createLabeledInputText);return r.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",(()=>{this.height=r.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:i,heightInput:r}}_createPaddingField(){const e=this.locale,t=this.t,o=new Pe.LabeledFieldView(e,Pe.createLabeledInputText);return o.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),o.fieldView.bind("value").to(this,"padding"),o.fieldView.on("input",(()=>{this.padding=o.fieldView.element.value})),o}_createAlignmentFields(){const t=this.locale,o=this.t,n=new Pe.LabelView(t),i={left:e.icons.alignLeft,center:e.icons.alignCenter,right:e.icons.alignRight,justify:e.icons.alignJustify,top:e.icons.alignTop,middle:e.icons.alignMiddle,bottom:e.icons.alignBottom};n.text=o("Table cell text alignment");const r=new Pe.ToolbarView(t),l="rtl"===t.contentLanguageDirection;r.set({isCompact:!0,ariaLabel:o("Horizontal text alignment toolbar")}),wt({view:this,icons:i,toolbar:r,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(l){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const s=new Pe.ToolbarView(t);return s.set({isCompact:!0,ariaLabel:o("Vertical text alignment toolbar")}),wt({view:this,icons:i,toolbar:s,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:r,verticalAlignmentToolbar:s,alignmentLabel:n}}_createActionButtons(){const t=this.locale,o=this.t,n=new Pe.ButtonView(t),i=new Pe.ButtonView(t),r=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return n.set({label:o("Save"),icon:e.icons.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(r,"errorText",((...e)=>e.every((e=>!e)))),i.set({label:o("Cancel"),icon:e.icons.cancel,class:"ck-button-cancel",withText:!0}),i.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:i}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,o=t("Align cell text to the left"),n=t("Align cell text to the center"),i=t("Align cell text to the right"),r=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:i,center:n,left:o,justify:r}:{left:o,center:n,right:i,justify:r}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function Et(e){return"none"!==e}const zt=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const Bt="object"==typeof global&&global&&global.Object===Object&&global;var Lt="object"==typeof self&&self&&self.Object===Object&&self;const Ft=Bt||Lt||Function("return this")();const Wt=function(){return Ft.Date.now()};var Nt=/\s/;const Ot=function(e){for(var t=e.length;t--&&Nt.test(e.charAt(t)););return t};var jt=/^\s+/;const Mt=function(e){return e?e.slice(0,Ot(e)+1).replace(jt,""):e};const Dt=Ft.Symbol;var Ht=Object.prototype,Ut=Ht.hasOwnProperty,$t=Ht.toString,Kt=Dt?Dt.toStringTag:void 0;const Gt=function(e){var t=Ut.call(e,Kt),o=e[Kt];try{e[Kt]=void 0;var n=!0}catch(e){}var i=$t.call(e);return n&&(t?e[Kt]=o:delete e[Kt]),i};var qt=Object.prototype.toString;const Jt=function(e){return qt.call(e)};var Xt=Dt?Dt.toStringTag:void 0;const Yt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Xt&&Xt in Object(e)?Gt(e):Jt(e)};const Qt=function(e){return null!=e&&"object"==typeof e};const Zt=function(e){return"symbol"==typeof e||Qt(e)&&"[object Symbol]"==Yt(e)};var eo=/^[-+]0x[0-9a-f]+$/i,to=/^0b[01]+$/i,oo=/^0o[0-7]+$/i,no=parseInt;const io=function(e){if("number"==typeof e)return e;if(Zt(e))return NaN;if(zt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=zt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Mt(e);var o=to.test(e);return o||oo.test(e)?no(e.slice(2),o?2:8):eo.test(e)?NaN:+e};var ro=Math.max,lo=Math.min;const so=function(e,t,o){var n,i,r,l,s,a,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var o=n,r=i;return n=i=void 0,c=t,l=e.apply(r,o)}function m(e){var o=e-a;return void 0===a||o>=t||o<0||u&&e-c>=r}function g(){var e=Wt();if(m(e))return p(e);s=setTimeout(g,function(e){var o=t-(e-a);return u?lo(o,r-(e-c)):o}(e))}function p(e){return s=void 0,h&&n?b(e):(n=i=void 0,l)}function f(){var e=Wt(),o=m(e);if(n=arguments,i=this,a=e,o){if(void 0===s)return function(e){return c=e,s=setTimeout(g,t),d?b(e):l}(a);if(u)return clearTimeout(s),s=setTimeout(g,t),b(a)}return void 0===s&&(s=setTimeout(g,t)),l}return t=io(t)||0,zt(o)&&(d=!!o.leading,r=(u="maxWait"in o)?ro(io(o.maxWait)||0,t):r,h="trailing"in o?!!o.trailing:h),f.cancel=function(){void 0!==s&&clearTimeout(s),c=0,n=a=i=s=void 0},f.flush=function(){return void 0===s?l:p(Wt())},f},ao=(()=>[Pe.BalloonPanelView.defaultPositions.northArrowSouth,Pe.BalloonPanelView.defaultPositions.northArrowSouthWest,Pe.BalloonPanelView.defaultPositions.northArrowSouthEast,Pe.BalloonPanelView.defaultPositions.southArrowNorth,Pe.BalloonPanelView.defaultPositions.southArrowNorthWest,Pe.BalloonPanelView.defaultPositions.southArrowNorthEast,Pe.BalloonPanelView.defaultPositions.viewportStickyNorth])();function co(e,t){const o=e.plugins.get("ContextualBalloon"),n=e.editing.view.document.selection;let i;"cell"===t?nt(n)&&(i=ho(e)):tt(n)&&(i=uo(e)),i&&o.updatePosition(i)}function uo(e){const t=b(e.model.document.selection),o=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.mapViewToDom(o),positions:ao}}function ho(e){const t=e.editing.mapper,o=e.editing.view.domConverter,n=e.model.document.selection;if(n.rangeCount>1)return{target:()=>function(e,t){const o=t.editing.mapper,n=t.editing.view.domConverter,i=Array.from(e).map((e=>{const t=bo(e.start),i=o.toViewElement(t);return new m.Rect(n.mapViewToDom(i))}));return m.Rect.getBoundingRect(i)}(n.getRanges(),e),positions:ao};const i=bo(n.getFirstPosition()),r=t.toViewElement(i);return{target:o.mapViewToDom(r),positions:ao}}function bo(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}function mo(e){if(!e||!zt(e))return e;const{top:t,right:o,bottom:n,left:i}=e;return t==o&&o==n&&n==i?t:void 0}function go(e,t){const o=parseFloat(e);return Number.isNaN(o)||String(o)!==String(e)?e:`${o}${t}`}function po(e,t={}){const o={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...e};return t.includeAlignmentProperty&&!o.alignment&&(o.alignment="center"),t.includePaddingProperty&&!o.padding&&(o.padding=""),t.includeVerticalAlignmentProperty&&!o.verticalAlignment&&(o.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!o.horizontalAlignment&&(o.horizontalAlignment=t.isRightToLeftContent?"right":"left"),o}const fo={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class wo extends e.Plugin{static get requires(){return[Pe.ContextualBalloon]}static get pluginName(){return"TableCellPropertiesUI"}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:_t,backgroundColors:_t})}init(){const e=this.editor,t=e.t;this._defaultTableCellProperties=po(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(Pe.ContextualBalloon),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",(o=>{const n=new Pe.ButtonView(o);n.set({label:t("Cell properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const i=Object.values(fo).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableCellProperties"),o=(0,Pe.normalizeColorOptions)(t.borderColors),n=(0,Pe.getLocalizedColorOptions)(e.locale,o),i=(0,Pe.normalizeColorOptions)(t.backgroundColors),r=(0,Pe.getLocalizedColorOptions)(e.locale,i),l=!1!==t.colorPicker,s=new Pt(e.locale,{borderColors:n,backgroundColors:r,defaultTableCellProperties:this._defaultTableCellProperties,colorPickerConfig:!!l&&(t.colorPicker||{})}),a=e.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),(0,Pe.clickOutsideHandler)({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=ht(a),d=bt(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableCellBorderColor",errorText:c,validator:mt})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableCellBorderWidth",errorText:d,validator:pt})),s.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:s.paddingInput,commandName:"tableCellPadding",errorText:d,validator:gt})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableCellWidth",errorText:d,validator:gt})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableCellHeight",errorText:d,validator:gt})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableCellBackgroundColor",errorText:c,validator:mt})),s.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),s.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(fo).map((([t,o])=>{const n=this._defaultTableCellProperties[t]||"";return[t,e.get(o).value||n]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:ho(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;nt(e.editing.view.document.selection)?this._isViewVisible&&co(e,"cell"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:i}=e,r=so((()=>{o.errorText=i}),500);return(e,i,l)=>{r.cancel(),this._isReady&&(n(l)?(this.editor.execute(t,{value:l,batch:this._undoStepBatch}),o.errorText=null):r())}}}class _o extends e.Command{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=this.editor,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(e={}){const{value:t,batch:o}=e,n=this.editor.model,i=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(n.document.selection),r=this._getValueToSet(t);n.enqueueChange(o,(e=>{r?i.forEach((t=>e.setAttribute(this.attributeName,r,t))):i.forEach((t=>e.removeAttribute(this.attributeName,t)))}))}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every((e=>this._getAttribute(e)===t))?t:void 0}}class ko extends _o{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=go(e,"px"))!==this._defaultValue)return e}}class vo extends e.Plugin{static get pluginName(){return"TableCellWidthEditing"}static get requires(){return[Re]}init(){const e=this.editor,t=po(e.config.get("table.tableCellProperties.defaultProperties"));h(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:t.width}),e.commands.add("tableCellWidth",new ko(e,t.width))}}class Co extends _o{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=go(e,"px");if(t!==this._defaultValue)return t}}class yo extends _o{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){const t=go(e,"px");if(t!==this._defaultValue)return t}}class Ao extends _o{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}class To extends _o{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class xo extends _o{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class So extends _o{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Vo extends _o{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Ro extends _o{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=go(e,"px");if(t!==this._defaultValue)return t}}const Io=/^(top|middle|bottom)$/,Po=/^(left|center|right|justify)$/;class Eo extends e.Plugin{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[Re,vo]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const n=po(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules(Ke.addBorderRules),function(e,t,o){const n={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};e.extend("tableCell",{allowAttributes:Object.values(n)}),r(t,"td",n,o),r(t,"th",n,o),l(t,{modelElement:"tableCell",modelAttribute:n.style,styleName:"border-style"}),l(t,{modelElement:"tableCell",modelAttribute:n.color,styleName:"border-color"}),l(t,{modelElement:"tableCell",modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableCellBorderStyle",new So(e,n.borderStyle)),e.commands.add("tableCellBorderColor",new Vo(e,n.borderColor)),e.commands.add("tableCellBorderWidth",new Ro(e,n.borderWidth)),h(t,o,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableCellHeight",new yo(e,n.height)),e.data.addStyleProcessorRules(Ke.addPaddingRules),h(t,o,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:n.padding}),e.commands.add("tableCellPadding",new Co(e,n.padding)),e.data.addStyleProcessorRules(Ke.addBackgroundRules),h(t,o,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableCellBackgroundColor",new Ao(e,n.backgroundColor)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:e=>({key:"style",value:{"text-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":Po}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getStyle("text-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:Po}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new xo(e,n.horizontalAlignment)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:e=>({key:"style",value:{"vertical-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":Io}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getStyle("vertical-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:Io}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getAttribute("valign");return t===o?null:t}}})}(t,o,n.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new To(e,n.verticalAlignment))}}class zo extends e.Plugin{static get pluginName(){return"TableCellProperties"}static get requires(){return[Eo,wo]}}class Bo extends e.Command{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=b(this.editor.model.document.selection);this.isEnabled=!!e,this.value=this._getValue(e)}execute(e={}){const t=this.editor.model,o=t.document.selection,{value:n,batch:i}=e,r=b(o),l=this._getValueToSet(n);t.enqueueChange(i,(e=>{l?e.setAttribute(this.attributeName,l,r):e.removeAttribute(this.attributeName,r)}))}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}}class Lo extends Bo{constructor(e,t){super(e,"tableBackgroundColor",t)}}class Fo extends Bo{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Wo extends Bo{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class No extends Bo{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=go(e,"px");if(t!==this._defaultValue)return t}}class Oo extends Bo{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=go(e,"px"))!==this._defaultValue)return e}}class jo extends Bo{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){if((e=go(e,"px"))!==this._defaultValue)return e}}class Mo extends Bo{constructor(e,t){super(e,"tableAlignment",t)}}const Do=/^(left|center|right)$/,Ho=/^(left|none|right)$/;class Uo extends e.Plugin{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[Re]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const n=po(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});e.data.addStyleProcessorRules(Ke.addBorderRules),function(e,t,o){const n={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};e.extend("table",{allowAttributes:Object.values(n)}),r(t,"table",n,o),s(t,{modelAttribute:n.color,styleName:"border-color"}),s(t,{modelAttribute:n.style,styleName:"border-style"}),s(t,{modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableBorderColor",new Fo(e,n.borderColor)),e.commands.add("tableBorderStyle",new Wo(e,n.borderStyle)),e.commands.add("tableBorderWidth",new No(e,n.borderWidth)),function(e,t,o){e.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:e=>({key:"style",value:{float:"center"===e?"none":e}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:Ho}},model:{key:"tableAlignment",value:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t===o?null:t}}}).attributeToAttribute({view:{attributes:{align:Do}},model:{name:"table",key:"tableAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.alignment),e.commands.add("tableAlignment",new Mo(e,n.alignment)),$o(t,o,{modelAttribute:"tableWidth",styleName:"width",defaultValue:n.width}),e.commands.add("tableWidth",new Oo(e,n.width)),$o(t,o,{modelAttribute:"tableHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableHeight",new jo(e,n.height)),e.data.addStyleProcessorRules(Ke.addBackgroundRules),function(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),i(t,{viewElement:"table",...o}),s(t,o)}(t,o,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableBackgroundColor",new Lo(e,n.backgroundColor))}}function $o(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),i(t,{viewElement:/^(table|figure)$/,shouldUpcast:e=>!("table"==e.name&&"figure"==e.parent.name),...o}),l(t,{modelElement:"table",...o})}var Ko=o(218),Go={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Ko.A,Go);Ko.A.locals;class qo extends Pe.View{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:i,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:l,backgroundInput:s}=this._createBackgroundFields(),{widthInput:a,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{alignmentToolbar:h,alignmentLabel:b}=this._createAlignmentFields();this.focusTracker=new m.FocusTracker,this.keystrokes=new m.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=i,this.backgroundInput=s,this.widthInput=a,this.heightInput=d,this.alignmentToolbar=h;const{saveButtonView:g,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=g,this.cancelButtonView=p,this._focusables=new Pe.ViewCollection,this._focusCycler=new Pe.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Pe.FormHeaderView(e,{label:this.t("Table properties")})),this.children.add(new At(e,{labelView:r,children:[r,o,i,n],class:"ck-table-form__border-row"})),this.children.add(new At(e,{labelView:l,children:[l,s],class:"ck-table-form__background-row"})),this.children.add(new At(e,{children:[new At(e,{labelView:u,children:[u,a,c,d],class:"ck-table-form__dimensions-row"}),new At(e,{labelView:b,children:[b,h],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new At(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,Pe.submitHandler)({view:this}),[this.borderColorInput,this.backgroundInput].forEach((e=>{e.fieldView.focusCycler.on("forwardCycle",(e=>{this._focusCycler.focusNext(),e.stop()})),e.fieldView.focusCycler.on("backwardCycle",(e=>{this._focusCycler.focusPrevious(),e.stop()}))})),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=kt({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,i=this.t,r=i("Style"),l=new Pe.LabelView(n);l.text=i("Border");const s=ut(i),a=new Pe.LabeledFieldView(n,Pe.createLabeledDropdown);a.set({label:r,class:"ck-table-form__border-style"}),a.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),a.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>s[e||"none"])),a.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),a.bind("isEmpty").to(this,"borderStyle",(e=>!e)),(0,Pe.addListToDropdown)(a.fieldView,ft(this,t.style),{role:"menu",ariaLabel:r});const c=new Pe.LabeledFieldView(n,Pe.createLabeledInputText);c.set({label:i("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",Jo),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new Pe.LabeledFieldView(n,o);return d.set({label:i("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",Jo),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,o,n,i)=>{Jo(n)||(this.borderColor="",this.borderWidth=""),Jo(i)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:l,borderStyleDropdown:a,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new Pe.LabelView(e);o.text=t("Background");const n=kt({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),i=new Pe.LabeledFieldView(e,n);return i.set({label:t("Color"),class:"ck-table-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new Pe.LabelView(e);o.text=t("Dimensions");const n=new Pe.LabeledFieldView(e,Pe.createLabeledInputText);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const i=new Pe.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new Pe.LabeledFieldView(e,Pe.createLabeledInputText);return r.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",(()=>{this.height=r.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:i,heightInput:r}}_createAlignmentFields(){const t=this.locale,o=this.t,n=new Pe.LabelView(t);n.text=o("Alignment");const i=new Pe.ToolbarView(t);return i.set({isCompact:!0,ariaLabel:o("Table alignment toolbar")}),wt({view:this,icons:{left:e.icons.objectLeft,center:e.icons.objectCenter,right:e.icons.objectRight},toolbar:i,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:n,alignmentToolbar:i}}_createActionButtons(){const t=this.locale,o=this.t,n=new Pe.ButtonView(t),i=new Pe.ButtonView(t),r=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return n.set({label:o("Save"),icon:e.icons.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(r,"errorText",((...e)=>e.every((e=>!e)))),i.set({label:o("Cancel"),icon:e.icons.cancel,class:"ck-button-cancel",withText:!0}),i.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:i}}get _alignmentLabels(){const e=this.locale,t=this.t,o=t("Align table to the left"),n=t("Center table"),i=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:i,center:n,left:o}:{left:o,center:n,right:i}}}function Jo(e){return"none"!==e}const Xo={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class Yo extends e.Plugin{static get requires(){return[Pe.ContextualBalloon]}static get pluginName(){return"TablePropertiesUI"}constructor(e){super(e),this.view=null,e.config.define("table.tableProperties",{borderColors:_t,backgroundColors:_t})}init(){const e=this.editor,t=e.t;this._defaultTableProperties=po(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(Pe.ContextualBalloon),e.ui.componentFactory.add("tableProperties",(o=>{const n=new Pe.ButtonView(o);n.set({label:t("Table properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const i=Object.values(Xo).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableProperties"),o=(0,Pe.normalizeColorOptions)(t.borderColors),n=(0,Pe.getLocalizedColorOptions)(e.locale,o),i=(0,Pe.normalizeColorOptions)(t.backgroundColors),r=(0,Pe.getLocalizedColorOptions)(e.locale,i),l=!1!==t.colorPicker,s=new qo(e.locale,{borderColors:n,backgroundColors:r,defaultTableProperties:this._defaultTableProperties,colorPickerConfig:!!l&&(t.colorPicker||{})}),a=e.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),(0,Pe.clickOutsideHandler)({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=ht(a),d=bt(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableBorderColor",errorText:c,validator:mt})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableBorderWidth",errorText:d,validator:pt})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableBackgroundColor",errorText:c,validator:mt})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableWidth",errorText:d,validator:gt})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableHeight",errorText:d,validator:gt})),s.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(Xo).map((([t,o])=>{const n=t,i=this._defaultTableProperties[n]||"";return[n,e.get(o).value||i]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:uo(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;tt(e.editing.view.document.selection)?this._isViewVisible&&co(e,"table"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:i}=e,r=so((()=>{o.errorText=i}),500);return(e,i,l)=>{r.cancel(),this._isReady&&(n(l)?(this.editor.execute(t,{value:l,batch:this._undoStepBatch}),o.errorText=null):r())}}}class Qo extends e.Plugin{static get pluginName(){return"TableProperties"}static get requires(){return[Uo,Yo]}}function Zo(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.differ.getChanges();let n=!1;for(const t of o){if("insert"!=t.type)continue;const o=t.position.parent;if(o.is("element","table")||"table"==t.name){const i="table"==t.name?t.position.nodeAfter:o,r=Array.from(i.getChildren()).filter((e=>e.is("element","caption"))),l=r.shift();if(!l)continue;for(const t of r)e.move(e.createRangeIn(t),l,"end"),e.remove(t);l.nextSibling&&(e.move(e.createRangeOn(l),i,"end"),n=!0),n=!!r.length||n}}return n}(t,e)))}function en(e){return!!e&&e.is("element","table")}function tn(e){for(const t of e.getChildren())if(t.is("element","caption"))return t;return null}function on(e){const t=e.parent;return"figcaption"==e.name&&t&&t.is("element","figure")&&t.hasClass("table")||"caption"==e.name&&t&&t.is("element","table")?{name:!0}:null}class nn extends e.Command{refresh(){const e=b(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?this.value=!!tn(e):this.value=!1}execute({focusCaptionOnShow:e=!1}={}){this.editor.model.change((t=>{this.value?this._hideTableCaption(t):this._showTableCaption(t,e)}))}_showTableCaption(e,t){const o=this.editor.model,n=b(o.document.selection),i=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(n)||e.createElement("caption");o.insertContent(i,n,"end"),t&&e.setSelection(i,"in")}_hideTableCaption(e){const t=this.editor.model,o=b(t.document.selection),n=this.editor.plugins.get("TableCaptionEditing"),i=tn(o);n._saveCaption(o,i),t.deleteContent(e.createSelection(i,"on"))}}class rn extends e.Plugin{static get pluginName(){return"TableCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,o=e.model.schema,n=e.editing.view,i=e.t;o.isRegistered("caption")?o.extend("caption",{allowIn:"table"}):o.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new nn(this.editor)),e.conversion.for("upcast").elementToElement({view:on,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>en(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:o})=>{if(!en(e.parent))return null;const r=o.createEditableElement("figcaption");return o.setCustomProperty("tableCaption",!0,r),r.placeholder=i("Enter table caption"),(0,Ke.enablePlaceholder)({view:n,element:r,keepOnFocus:!0}),(0,t.toWidgetEditable)(r,o)}}),Zo(e.model)}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Ke.Element.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}class ln extends e.Plugin{static get pluginName(){return"TableCaptionUI"}init(){const t=this.editor,o=t.editing.view,n=t.t;t.ui.componentFactory.add("toggleTableCaption",(i=>{const r=t.commands.get("toggleTableCaption"),l=new Pe.ButtonView(i);return l.set({icon:e.icons.caption,tooltip:!0,isToggleable:!0}),l.bind("isOn","isEnabled").to(r,"value","isEnabled"),l.bind("label").to(r,"value",(e=>n(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(l,"execute",(()=>{if(t.execute("toggleTableCaption",{focusCaptionOnShow:!0}),r.value){const e=function(e){const t=b(e);return t?tn(t):null}(t.model.document.selection),n=t.editing.mapper.toViewElement(e);if(!n)return;o.scrollToTheSelection(),o.change((e=>{e.addClass("table__caption_highlighted",n)}))}t.editing.view.focus()})),l}))}}var sn=o(175),an={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(sn.A,an);sn.A.locals;class cn extends e.Plugin{static get pluginName(){return"TableCaption"}static get requires(){return[rn,ln]}}const dn=function(){this.__data__=[],this.size=0};const un=function(e,t){return e===t||e!=e&&t!=t};const hn=function(e,t){for(var o=e.length;o--;)if(un(e[o][0],t))return o;return-1};var bn=Array.prototype.splice;const mn=function(e){var t=this.__data__,o=hn(t,e);return!(o<0)&&(o==t.length-1?t.pop():bn.call(t,o,1),--this.size,!0)};const gn=function(e){var t=this.__data__,o=hn(t,e);return o<0?void 0:t[o][1]};const pn=function(e){return hn(this.__data__,e)>-1};const fn=function(e,t){var o=this.__data__,n=hn(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this};function wn(e){var t=-1,o=null==e?0:e.length;for(this.clear();++ts))return!1;var c=r.get(e),d=r.get(t);if(c&&d)return c==t&&d==e;var u=-1,h=!0,b=2&o?new hi:void 0;for(r.set(e,t),r.set(t,e);++u-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991};var Ui={};Ui["[object Float32Array]"]=Ui["[object Float64Array]"]=Ui["[object Int8Array]"]=Ui["[object Int16Array]"]=Ui["[object Int32Array]"]=Ui["[object Uint8Array]"]=Ui["[object Uint8ClampedArray]"]=Ui["[object Uint16Array]"]=Ui["[object Uint32Array]"]=!0,Ui["[object Arguments]"]=Ui["[object Array]"]=Ui["[object ArrayBuffer]"]=Ui["[object Boolean]"]=Ui["[object DataView]"]=Ui["[object Date]"]=Ui["[object Error]"]=Ui["[object Function]"]=Ui["[object Map]"]=Ui["[object Number]"]=Ui["[object Object]"]=Ui["[object RegExp]"]=Ui["[object Set]"]=Ui["[object String]"]=Ui["[object WeakMap]"]=!1;const $i=function(e){return Qt(e)&&Hi(e.length)&&!!Ui[Yt(e)]};const Ki=function(e){return function(t){return e(t)}};var Gi="object"==typeof exports&&exports&&!exports.nodeType&&exports,qi=Gi&&"object"==typeof module&&module&&!module.nodeType&&module,Ji=qi&&qi.exports===Gi&&Bt.process,Xi=function(){try{var e=qi&&qi.require&&qi.require("util").types;return e||Ji&&Ji.binding&&Ji.binding("util")}catch(e){}}();var Yi=Xi&&Xi.isTypedArray;const Qi=Yi?Ki(Yi):$i;var Zi=Object.prototype.hasOwnProperty;const er=function(e,t){var o=yi(e),n=!o&&Li(e),i=!o&&!n&&ji(e),r=!o&&!n&&!i&&Qi(e),l=o||n||i||r,s=l?Ii(e.length,String):[],a=s.length;for(var c in e)!t&&!Zi.call(e,c)||l&&("length"==c||i&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Di(c,a))||s.push(c);return s};var tr=Object.prototype;const or=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||tr)};const nr=function(e,t){return function(o){return e(t(o))}}(Object.keys,Object);var ir=Object.prototype.hasOwnProperty;const rr=function(e){if(!or(e))return nr(e);var t=[];for(var o in Object(e))ir.call(e,o)&&"constructor"!=o&&t.push(o);return t};const lr=function(e){return null!=e&&Hi(e.length)&&!An(e)};const sr=function(e){return lr(e)?er(e):rr(e)};const ar=function(e){return Ai(e,sr,Ri)};var cr=Object.prototype.hasOwnProperty;const dr=function(e,t,o,n,i,r){var l=1&o,s=ar(e),a=s.length;if(a!=ar(t).length&&!l)return!1;for(var c=a;c--;){var d=s[c];if(!(l?d in t:cr.call(t,d)))return!1}var u=r.get(e),h=r.get(t);if(u&&h)return u==t&&h==e;var b=!0;r.set(e,t),r.set(t,e);for(var m=l;++c{r?e.setAttribute("tableWidth",r,n):e.removeAttribute("tableWidth",n);const t=o.get("TableColumnResizeEditing").getColumnGroupElement(n);if(!i&&!t)return;if(!i)return e.remove(t);const l=Z(i);if(t)Array.from(t.getChildren()).forEach(((t,o)=>e.setAttribute("columnWidth",l[o],t)));else{const t=e.createElement("tableColumnGroup");l.forEach((o=>e.appendElement("tableColumn",{columnWidth:o},t))),e.append(t,n)}}))}}function Fr(e){return t=>t.on("element:colgroup",((t,o,n)=>{const i=o.modelCursor.findAncestor("table"),r=oe(i);if(!r)return;const l=ne(r),s=e.getColumns(i);let a=(c=r,d=n.writer,ne(c).reduce(((e,t)=>{const o=t.getAttribute("columnWidth"),n=t.getAttribute("colSpan");if(!n)return e.push(o),e;for(let t=0;ta[t]||"auto")),(a.length!=l.length||a.includes("auto"))&&te(l,r,Z(a),n.writer)}),{priority:"low"})}class Wr extends e.Plugin{static get requires(){return[Re,ie]}static get pluginName(){return"TableColumnResizeEditing"}constructor(e){super(e),this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=new((0,m.DomEmitterMixin)()),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",((t,o,n)=>{const i=n?"removeClass":"addClass";e.editing.view.change((t=>{for(const o of e.editing.view.document.roots)t[i]("ck-column-resize_disabled",e.editing.view.document.getRoot(o.rootName))}))}))}init(){this._extendSchema(),this._registerPostFixer(),this._registerConverters(),this._registerResizingListeners(),this._registerResizerInserter();const e=this.editor,t=e.plugins.get("TableColumnResize");e.plugins.get("TableEditing").registerAdditionalSlot({filter:e=>e.is("element","tableColumnGroup"),positionOffset:0});const o=new Lr(e);e.commands.add("resizeTableWidth",o),e.commands.add("resizeColumnWidths",o),this.bind("_isResizingAllowed").to(e,"isReadOnly",t,"isEnabled",o,"isEnabled",((e,t,o)=>!e&&t&&o))}destroy(){this._domEmitter.stopListening(),super.destroy()}getColumnGroupElement(e){return oe(e)}getTableColumnElements(e){return ne(e)}getTableColumnsWidths(e){return function(e){return ne(e).map((e=>e.getAttribute("columnWidth")))}(e)}_extendSchema(){this.editor.model.schema.extend("table",{allowAttributes:["tableWidth"]}),this.editor.model.schema.register("tableColumnGroup",{allowIn:"table",isLimit:!0}),this.editor.model.schema.register("tableColumn",{allowIn:"tableColumnGroup",allowAttributes:["columnWidth","colSpan"],isLimit:!0})}_registerPostFixer(){const e=this.editor.model;function t(e,t,o){const n=o._tableUtilsPlugin.getColumns(t);if(0===n-e.length)return e;const i=e.map((e=>Number(e.replace("%","")))),r=function(e,t){const o=new Set;for(const n of e.getChanges())if("insert"==n.type&&n.position.nodeAfter&&"tableCell"==n.position.nodeAfter.name&&n.position.nodeAfter.getAncestors().includes(t))o.add(n.position.nodeAfter);else if("remove"==n.type){const e=n.position.nodeBefore||n.position.nodeAfter;"tableCell"==e.name&&e.getAncestors().includes(t)&&o.add(e)}return o}(o.editor.model.document.differ,t);for(const e of r){const r=n-i.length;if(0===r)continue;const s=r>0,a=o._tableUtilsPlugin.getCellLocation(e).column;if(s){const e=G(t,o.editor),n=(l=e,Array(r).fill(l));i.splice(a,0,...n)}else{const e=i.splice(a,Math.abs(r));i[a]+=Q(e)}}var l;return i.map((e=>e+"%"))}e.document.registerPostFixer((o=>{let n=!1;for(const i of function(e){const t=new Set;for(const o of e.document.differ.getChanges()){let n=null;switch(o.type){case"insert":n=["table","tableRow","tableCell"].includes(o.name)?o.position:null;break;case"remove":n=["tableRow","tableCell"].includes(o.name)?o.position:null;break;case"attribute":o.range.start.nodeAfter&&(n=["table","tableRow","tableCell"].includes(o.range.start.nodeAfter.name)?o.range.start:null)}if(!n)continue;const i=n.nodeAfter&&n.nodeAfter.is("element","table")?n.nodeAfter:n.findAncestor("table");for(const o of e.createRangeOn(i).getItems())o.is("element","table")&&oe(o)&&t.add(o)}return t}(e)){const e=this.getColumnGroupElement(i),r=this.getTableColumnElements(e),l=this.getTableColumnsWidths(e);let s=Z(l);s=t(s,i,this),zr(l,s)||(te(r,e,s,o),n=!0)}return n}))}_registerConverters(){const e=this.editor.conversion;e.for("upcast").attributeToAttribute({view:{name:"figure",key:"style",value:{width:/[\s\S]+/}},model:{name:"table",key:"tableWidth",value:e=>e.getStyle("width")}}),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableWidth"},view:e=>({name:"figure",key:"style",value:{width:e}})}),e.elementToElement({model:"tableColumnGroup",view:"colgroup"}),e.elementToElement({model:"tableColumn",view:"col"}),e.for("downcast").add((e=>e.on("insert:table",((e,t,o)=>{const n=o.writer,i=t.item,r=o.mapper.toViewElement(i),l=r.is("element","table")?r:Array.from(r.getChildren()).find((e=>e.is("element","table")));oe(i)?n.addClass("ck-table-resized",l):n.removeClass("ck-table-resized",l)}),{priority:"low"}))),e.for("upcast").add(Fr(this._tableUtilsPlugin)),e.for("upcast").attributeToAttribute({view:{name:"col",styles:{width:/.*/}},model:{key:"columnWidth",value:e=>{const t=e.getStyle("width");return t&&(t.endsWith("%")||t.endsWith("pt"))?t:"auto"}}}),e.for("upcast").attributeToAttribute({view:{name:"col",key:"span"},model:"colSpan"}),e.for("downcast").attributeToAttribute({model:{name:"tableColumn",key:"columnWidth"},view:e=>({key:"style",value:{width:e}})})}_registerResizingListeners(){const e=this.editor.editing.view;e.addObserver(Ge),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),this._domEmitter.listenTo(m.global.window.document,"mousemove",Br(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo(m.global.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_onMouseDownHandler(e,t){const o=t.target;if(!o.hasClass("ck-table-column-resizer"))return;if(!this._isResizingAllowed)return;const n=this.editor,i=n.editing.mapper.toModelElement(o.findAncestor("figure"));if(!n.model.canEditAt(i))return;t.preventDefault(),e.stop();const r=function(e,t,o){const n=Array(t.getColumns(e)),i=new w(e);for(const e of i){const t=o.editing.mapper.toViewElement(e.cell),i=ee(o.editing.view.domConverter.mapViewToDom(t));(!n[e.column]||ie.is("element","colgroup")))||s.change((e=>{!function(e,t,o){const n=e.createContainerElement("colgroup");for(let o=0;ofunction(e,t,o){const n=o.widths.viewFigureWidth/o.widths.viewFigureParentWidth;e.addClass("ck-table-resized",t),e.addClass("ck-table-column-resizer__active",o.elements.viewResizer),e.setStyle("width",`${Y(100*n)}%`,t.findAncestor("figure"))}(e,l,this._resizingData)))}_onMouseMoveHandler(e,t){if(!this._isResizingActive)return;if(!this._isResizingAllowed)return void this._onMouseUpHandler();const{columnPosition:o,flags:{isRightEdge:n,isTableCentered:i,isLtrContent:r},elements:{viewFigure:l,viewLeftColumn:s,viewRightColumn:a},widths:{viewFigureParentWidth:c,tableWidth:d,leftColumnWidth:u,rightColumnWidth:h}}=this._resizingData,b=40-u,m=n?c-d:h-40,g=(r?1:-1)*(n&&i?2:1),p=(f=(t.clientX-o)*g,w=Math.min(b,0),_=Math.max(m,0),Y(f<=w?w:f>=_?_:f));var f,w,_;0!==p&&this.editor.editing.view.change((e=>{const t=Y(100*(u+p)/d);if(e.setStyle("width",`${t}%`,s),n){const t=Y(100*(d+p)/c);e.setStyle("width",`${t}%`,l)}else{const t=Y(100*(h-p)/d);e.setStyle("width",`${t}%`,a)}}))}_onMouseUpHandler(){if(!this._isResizingActive)return;const{viewResizer:e,modelTable:t,viewFigure:o,viewColgroup:n}=this._resizingData.elements,i=this.editor,r=i.editing.view,l=this.getColumnGroupElement(t),s=Array.from(n.getChildren()).filter((e=>e.is("view:element"))),a=l?this.getTableColumnsWidths(l):null,c=s.map((e=>e.getStyle("width"))),d=!zr(a,c),u=t.getAttribute("tableWidth"),h=o.getStyle("width"),b=u!==h;(d||b)&&(this._isResizingAllowed?i.execute("resizeTableWidth",{table:t,tableWidth:`${Y(h)}%`,columnWidths:c}):r.change((e=>{if(a)for(const t of s)e.setStyle("width",a.shift(),t);else e.remove(n);b&&(u?e.setStyle("width",u,o):e.removeStyle("width",o)),a||u||e.removeClass("ck-table-resized",[...o.getChildren()].find((e=>"table"===e.name)))}))),r.change((t=>{t.removeClass("ck-table-column-resizer__active",e)})),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,t){const o=this.editor,n=e.domEvent.clientX,i=e.target,r=i.findAncestor("td")||i.findAncestor("th"),l=o.editing.mapper.toModelElement(r),s=l.findAncestor("table"),a=function(e,t){const o=t.getCellLocation(e).column;return{leftEdge:o,rightEdge:o+(e.getAttribute("colspan")||1)-1}}(l,this._tableUtilsPlugin).rightEdge,c=a===this._tableUtilsPlugin.getColumns(s)-1,d=!s.hasAttribute("tableAlignment"),u="rtl"!==o.locale.contentLanguageDirection,h=r.findAncestor("table"),b=h.findAncestor("figure"),m=[...h.getChildren()].find((e=>e.is("element","colgroup"))),g=m.getChild(a),p=c?void 0:m.getChild(a+1);return{columnPosition:n,flags:{isRightEdge:c,isTableCentered:d,isLtrContent:u},elements:{viewResizer:i,modelTable:s,viewFigure:b,viewColgroup:m,viewLeftColumn:g,viewRightColumn:p},widths:{viewFigureParentWidth:X(o.editing.view.domConverter.mapViewToDom(b.parent)),viewFigureWidth:X(o.editing.view.domConverter.mapViewToDom(b)),tableWidth:q(s,o),leftColumnWidth:t[a],rightColumnWidth:c?void 0:t[a+1]}}}_registerResizerInserter(){this.editor.conversion.for("editingDowncast").add((e=>{e.on("insert:tableCell",((e,t,o)=>{const n=t.item,i=o.mapper.toViewElement(n),r=o.writer;r.insert(r.createPositionAt(i,"end"),r.createUIElement("div",{class:"ck-table-column-resizer"}))}),{priority:"lowest"})}))}}var Nr=o(363),Or={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Nr.A,Or);Nr.A.locals;class jr extends e.Plugin{static get requires(){return[Wr,vo]}static get pluginName(){return"TableColumnResize"}}})(),(window.CKEditor5=window.CKEditor5||{}).table=n})(); \ No newline at end of file + */(()=>{var e={770:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-input-text:focus{z-index:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}",""]);const r=i},67:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}",""]);const r=i},839:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const r=i},712:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label,.ck[dir=rtl] .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}@media (prefers-reduced-motion:reduce){.ck .ck-insert-table-dropdown-grid-box{transition:none}}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}",""]);const r=i},25:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}",""]);const r=i},175:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-selector-caption-background:#f7f7f7;--ck-color-selector-caption-text:#333;--ck-color-selector-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-selector-caption-background);caption-side:top;color:var(--ck-color-selector-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}@media (forced-colors:active){.ck-content .table>figcaption{background-color:unset;color:unset}}@media (forced-colors:none){.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-selector-caption-highlighted-background)}to{background-color:var(--ck-color-selector-caption-background)}}",""]);const r=i},266:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}",""]);const r=i},363:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-selector-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table .ck-table-resized{table-layout:fixed}.ck-content .table table{overflow:hidden}.ck-content .table td,.ck-content .table th{overflow-wrap:break-word;position:relative}.ck.ck-editor__editable .table .ck-table-column-resizer{bottom:0;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:0;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer,.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer{display:none}.ck.ck-editor__editable .table .ck-table-column-resizer:hover,.ck.ck-editor__editable .table .ck-table-column-resizer__active{background-color:var(--ck-color-selector-column-resizer-hover);bottom:-999999px;opacity:.25;top:-999999px}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}",""]);const r=i},817:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-selector-focused-cell-background:rgba(158,201,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-selector-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}",""]);const r=i},911:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}@media (prefers-reduced-motion:reduce){.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:none}}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',""]);const r=i},218:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}",""]);const r=i},719:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(935),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',""]);const r=i},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var r=0;r{"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),l=[];function s(e){for(var t=-1,o=0;o{e.exports=o(237)("./src/clipboard.js")},782:(e,t,o)=>{e.exports=o(237)("./src/core.js")},783:(e,t,o)=>{e.exports=o(237)("./src/engine.js")},311:(e,t,o)=>{e.exports=o(237)("./src/ui.js")},584:(e,t,o)=>{e.exports=o(237)("./src/utils.js")},901:(e,t,o)=>{e.exports=o(237)("./src/widget.js")},237:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var r=t[n]={id:n,exports:{}};return e[n](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var n={};(()=>{"use strict";o.r(n),o.d(n,{PlainTableOutput:()=>Ze,Table:()=>Qe,TableCaption:()=>cn,TableCaptionEditing:()=>rn,TableCaptionUI:()=>ln,TableCellProperties:()=>zo,TableCellPropertiesEditing:()=>Eo,TableCellPropertiesUI:()=>wo,TableCellWidthEditing:()=>vo,TableClipboard:()=>Me,TableColumnResize:()=>jr,TableColumnResizeEditing:()=>Wr,TableEditing:()=>Re,TableKeyboard:()=>$e,TableMouse:()=>qe,TableProperties:()=>Qo,TablePropertiesEditing:()=>Uo,TablePropertiesUI:()=>Yo,TableSelection:()=>Oe,TableToolbar:()=>rt,TableUI:()=>Le,TableUtils:()=>ie});var e=o(782),t=o(901);function i(e,t){const{modelAttribute:o,styleName:n,viewElement:i,defaultValue:r,reduceBoxSides:l=!1,shouldUpcast:s=()=>!0}=t;e.for("upcast").attributeToAttribute({view:{name:i,styles:{[n]:/[\s\S]+/}},model:{key:o,value:e=>{if(!s(e))return;const t=e.getNormalizedStyle(n),o=l?a(t):t;return r!==o?o:void 0}}})}function r(e,t,o,n){e.for("upcast").add((e=>e.on("element:"+t,((e,t,i)=>{if(!t.modelRange)return;const r=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter((e=>t.viewItem.hasStyle(e)));if(!r.length)return;const l={styles:r};if(!i.consumable.test(t.viewItem,l))return;const s=[...t.modelRange.getItems({shallow:!0})].pop();i.consumable.consume(t.viewItem,l);const c={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},d={style:a(c.style),color:a(c.color),width:a(c.width)};d.style!==n.style&&i.writer.setAttribute(o.style,d.style,s),d.color!==n.color&&i.writer.setAttribute(o.color,d.color,s),d.width!==n.width&&i.writer.setAttribute(o.width,d.width,s)}))))}function l(e,t){const{modelElement:o,modelAttribute:n,styleName:i}=t;e.for("downcast").attributeToAttribute({model:{name:o,key:n},view:e=>({key:"style",value:{[i]:e}})})}function s(e,t){const{modelAttribute:o,styleName:n}=t;e.for("downcast").add((e=>e.on(`attribute:${o}:table`,((e,t,o)=>{const{item:i,attributeNewValue:r}=t,{mapper:l,writer:s}=o;if(!o.consumable.consume(t.item,e.name))return;const a=[...l.toViewElement(i).getChildren()].find((e=>e.is("element","table")));r?s.setStyle(n,r,a):s.removeStyle(n,a)}))))}function a(e){if(!e)return;const t=["top","right","bottom","left"];if(!t.every((t=>e[t])))return e;const o=e.top;return t.every((t=>e[t]===o))?o:e}function c(e,t,o,n,i=1){null!=t&&null!=i&&t>i?n.setAttribute(e,t,o):n.removeAttribute(e,o)}function d(e,t,o={}){const n=e.createElement("tableCell",o);return e.insertElement("paragraph",n),e.insert(n,t),n}function u(e,t){const o=t.parent.parent,n=parseInt(o.getAttribute("headingColumns")||"0"),{column:i}=e.getCellLocation(t);return!!n&&i{e.on("element:table",((e,t,o)=>{const n=t.viewItem;if(!o.consumable.test(n,{name:!0}))return;const{rows:i,headingRows:r,headingColumns:l}=function(e){let t,o=0;const n=[],i=[];let r;for(const l of Array.from(e.getChildren())){if("tbody"!==l.name&&"thead"!==l.name&&"tfoot"!==l.name)continue;"thead"!==l.name||r||(r=l);const e=Array.from(l.getChildren()).filter((e=>e.is("element","tr")));for(const s of e)if(r&&l===r||"tbody"===l.name&&Array.from(s.getChildren()).length&&Array.from(s.getChildren()).every((e=>e.is("element","th"))))o++,n.push(s);else{i.push(s);const e=f(s);(!t||eo.convertItem(e,o.writer.createPositionAt(a,"end")))),o.convertChildren(n,o.writer.createPositionAt(a,"end")),a.isEmpty){const e=o.writer.createElement("tableRow");o.writer.insert(e,o.writer.createPositionAt(a,"end")),d(o.writer,o.writer.createPositionAt(e,"end"))}o.updateConversionResult(a,t)}}))}}function p(e){return t=>{t.on(`element:${e}`,((e,t,{writer:o})=>{if(!t.modelRange)return;const n=t.modelRange.start.nodeAfter,i=o.createPositionAt(n,0);if(t.viewItem.isEmpty)return void o.insertElement("paragraph",i);const r=Array.from(n.getChildren());if(r.every((e=>e.is("element","$marker")))){const e=o.createElement("paragraph");o.insert(e,o.createPositionAt(n,0));for(const t of r)o.move(o.createRangeOn(t),o.createPositionAt(e,"end"))}}),{priority:"low"})}}function f(e){let t=0,o=0;const n=Array.from(e.getChildren()).filter((e=>"th"===e.name||"td"===e.name));for(;o1||i>1)&&this._recordSpans(o,i,n),this._shouldSkipSlot()||(t=this._formatOutValue(o)),this._nextCellAtColumn=this._column+n}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,o=this._column){return{done:!1,value:new _(this,e,t,o)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||o||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,o){const n={cell:e,row:this._row,column:this._column};for(let e=this._row;e0&&!this._jumpedToStartRow}_jumpToNonSpannedRowClosestToStartRow(){const e=this._getRowLength(0);for(let t=this._startRow;!this._jumpedToStartRow;t--)e===this._getRowLength(t)&&(this._row=t,this._rowIndex=t,this._jumpedToStartRow=!0)}_getRowLength(e){return[...this._table.getChild(e).getChildren()].reduce(((e,t)=>e+parseInt(t.getAttribute("colspan")||"1")),0)}}class _{constructor(e,t,o,n){this.cell=t,this.row=e._row,this.column=e._column,this.cellAnchorRow=o,this.cellAnchorColumn=n,this._cellIndex=e._cellIndex,this._rowIndex=e._rowIndex,this._table=e._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||"1")}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||"1")}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}function k(e,o){return(n,{writer:i})=>{const r=n.getAttribute("headingRows")||0,l=i.createContainerElement("table",null,[]),s=i.createContainerElement("figure",{class:"table"},l);r>0&&i.insert(i.createPositionAt(l,"end"),i.createContainerElement("thead",null,i.createSlot((e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=r))));for(const{positionOffset:e,filter:t}of o.additionalSlots)i.insert(i.createPositionAt(l,e),i.createSlot(t));return i.insert(i.createPositionAt(l,"after"),i.createSlot((e=>!e.is("element","tableRow")&&!o.additionalSlots.some((({filter:t})=>t(e)))))),o.asWidget?function(e,o){return o.setCustomProperty("table",!0,e),(0,t.toWidget)(e,o,{hasSelectionHandle:!0})}(s,i):s}}function v(e={}){return(o,{writer:n})=>{const i=o.parent,r=i.parent,l=r.getChildIndex(i),s=new w(r,{row:l}),a=r.getAttribute("headingRows")||0,c=r.getAttribute("headingColumns")||0;let d=null;for(const i of s)if(i.cell==o){const o=i.row{if(!t.parent.is("element","tableCell"))return null;if(!y(t))return null;if(e.asWidget)return o.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const e=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,e),e}}}function y(e){return 1==e.parent.childCount&&!!e.getAttributeKeys().next().done}class A extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,o=e.schema;this.isEnabled=function(e,t){const o=e.getFirstPosition().parent,n=o===o.root?o:o.parent;return t.checkChild(n,"table")}(t,o)}execute(e={}){const t=this.editor,o=t.model,n=t.plugins.get("TableUtils"),i=t.config.get("table.defaultHeadings.rows"),r=t.config.get("table.defaultHeadings.columns");void 0===e.headingRows&&i&&(e.headingRows=i),void 0===e.headingColumns&&r&&(e.headingColumns=r),o.change((t=>{const i=n.createTable(t,e);o.insertObject(i,null,null,{findOptimalPosition:"auto"}),t.setSelection(t.createPositionAt(i.getNodeByPath([0,0,0]),0))}))}}class T extends e.Command{constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="above"===this.order,i=o.getSelectionAffectedTableCells(t),r=o.getRowIndexes(i),l=n?r.first:r.last,s=i[0].findAncestor("table");o.insertRows(s,{at:n?l:l+1,copyStructureFromAbove:!n})}}class x extends e.Command{constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="left"===this.order,i=o.getSelectionAffectedTableCells(t),r=o.getColumnIndexes(i),l=n?r.first:r.last,s=i[0].findAncestor("table");o.insertColumns(s,{columns:1,at:n?l:l+1})}}class S extends e.Command{constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===e.length}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}function V(e,t,o){const{startRow:n,startColumn:i,endRow:r,endColumn:l}=t,s=o.createElement("table"),a=r-n+1;for(let e=0;e0){c("headingRows",r-o,e,i,0)}const l=parseInt(t.getAttribute("headingColumns")||"0");if(l>0){c("headingColumns",l-n,e,i,0)}}(s,e,n,i,o),s}function R(e,t,o=0){const n=[],i=new w(e,{startRow:o,endRow:t-1});for(const e of i){const{row:o,cellHeight:i}=e;o1&&(s.rowspan=a);const u=parseInt(e.getAttribute("colspan")||"1");u>1&&(s.colspan=u);const h=r+l,b=[...new w(i,{startRow:r,endRow:h,includeAllSlots:!0})];let m,g=null;for(const t of b){const{row:n,column:i,cell:r}=t;r===e&&void 0===m&&(m=i),void 0!==m&&m===i&&n===h&&(g=d(o,t.getPositionBefore(),s))}return c("rowspan",l,e,o),g}function P(e,t){const o=[],n=new w(e);for(const e of n){const{column:n,cellWidth:i}=e;n1&&(r.colspan=l);const s=parseInt(e.getAttribute("rowspan")||"1");s>1&&(r.rowspan=s);const a=d(n,n.createPositionAfter(e),r);return c("colspan",i,e,n),a}function z(e,t,o,n,i,r){const l=parseInt(e.getAttribute("colspan")||"1"),s=parseInt(e.getAttribute("rowspan")||"1");if(o+l-1>i){c("colspan",i-o+1,e,r,1)}if(t+s-1>n){c("rowspan",n-t+1,e,r,1)}}function B(e,t){const o=t.getColumns(e),n=new Array(o).fill(0);for(const{column:t}of new w(e))n[t]++;const i=n.reduce(((e,t,o)=>t?e:[...e,o]),[]);if(i.length>0){const o=i[i.length-1];return t.removeColumns(e,{at:o}),!0}return!1}function L(e,t){const o=[],n=t.getRows(e);for(let t=0;t0){const n=o[o.length-1];return t.removeRows(e,{at:n}),!0}return!1}function F(e,t){B(e,t)||L(e,t)}function W(e,t){const o=Array.from(new w(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(o.every((({cellHeight:e})=>1===e)))return t.lastRow;const n=o[0].cellHeight-1;return t.lastRow+n}function N(e,t){const o=Array.from(new w(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(o.every((({cellWidth:e})=>1===e)))return t.lastColumn;const n=o[0].cellWidth-1;return t.lastColumn+n}class O extends e.Command{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=e.document,o=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],n=this.value,i=this.direction;e.change((e=>{const t="right"==i||"down"==i,r=t?o:n,l=t?n:o,s=l.parent;!function(e,t,o){j(e)||(j(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end")));o.remove(e)}(l,r,e);const a=this.isHorizontal?"colspan":"rowspan",c=parseInt(o.getAttribute(a)||"1"),d=parseInt(n.getAttribute(a)||"1");e.setAttribute(a,c+d,r),e.setSelection(e.createRangeIn(r));const u=this.editor.plugins.get("TableUtils");F(s.findAncestor("table"),u)}))}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),o=t.getTableCellsContainingSelection(e.selection)[0];if(!o)return;const n=this.isHorizontal?function(e,t,o){const n=e.parent,i=n.parent,r="right"==t?e.nextSibling:e.previousSibling,l=(i.getAttribute("headingColumns")||0)>0;if(!r)return;const s="right"==t?e:r,a="right"==t?r:e,{column:c}=o.getCellLocation(s),{column:d}=o.getCellLocation(a),h=parseInt(s.getAttribute("colspan")||"1"),b=u(o,s),m=u(o,a);if(l&&b!=m)return;return c+h===d?r:void 0}(o,this.direction,t):function(e,t,o){const n=e.parent,i=n.parent,r=i.getChildIndex(n);if("down"==t&&r===o.getRows(i)-1||"up"==t&&0===r)return null;const l=parseInt(e.getAttribute("rowspan")||"1"),s=i.getAttribute("headingRows")||0,a="down"==t&&r+l===s,c="up"==t&&r===s;if(s&&(a||c))return null;const d=parseInt(e.getAttribute("rowspan")||"1"),u="down"==t?r+d:r,h=[...new w(i,{endRow:u})],b=h.find((t=>t.cell===e)),m=b.column,g=h.find((({row:e,cellHeight:o,column:n})=>n===m&&("down"==t?e===u:u===e+o)));return g&&g.cell?g.cell:null}(o,this.direction,t);if(!n)return;const i=this.isHorizontal?"rowspan":"colspan",r=parseInt(o.getAttribute(i)||"1");return parseInt(n.getAttribute(i)||"1")===r?n:void 0}}function j(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}class M extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),i=e.getRows(n)-1,r=e.getRowIndexes(t),l=0===r.first&&r.last===i;this.isEnabled=!l}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),i=o[0],r=i.findAncestor("table"),l=t.getCellLocation(i).column;e.change((e=>{const o=n.last-n.first+1;t.removeRows(r,{at:n.first,rows:o});const i=function(e,t,o,n){const i=e.getChild(Math.min(t,n-1));let r=i.getChild(0),l=0;for(const e of i.getChildren()){if(l>o)return r;r=e,l+=parseInt(e.getAttribute("colspan")||"1")}return r}(r,n.first,l,t.getRows(r));e.setSelection(e.createPositionAt(i,0))}))}}class D extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),i=e.getColumns(n),{first:r,last:l}=e.getColumnIndexes(t);this.isEnabled=l-re.cell===t)).column,last:i.find((e=>e.cell===o)).column},l=function(e,t,o,n){const i=parseInt(o.getAttribute("colspan")||"1");return i>1?o:t.previousSibling||o.nextSibling?o.nextSibling||t.previousSibling:n.first?e.reverse().find((({column:e})=>ee>n.last)).cell}(i,t,o,r);this.editor.model.change((t=>{const o=r.last-r.first+1;e.removeColumns(n,{at:r.first,columns:o}),t.setSelection(t.createPositionAt(l,0))}))}}class H extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o.length>0;this.isEnabled=n,this.value=n&&o.every((e=>this._isInHeading(e,e.parent.parent)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),i=n[0].findAncestor("table"),{first:r,last:l}=t.getRowIndexes(n),s=this.value?r:l+1,a=i.getAttribute("headingRows")||0;o.change((e=>{if(s){const t=R(i,s,s>a?a:0);for(const{cell:o}of t)I(o,s,e)}c("headingRows",s,i,e,0)}))}_isInHeading(e,t){const o=parseInt(t.getAttribute("headingRows")||"0");return!!o&&e.parent.index0;this.isEnabled=n,this.value=n&&o.every((e=>u(t,e)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),i=n[0].findAncestor("table"),{first:r,last:l}=t.getColumnIndexes(n),s=this.value?r:l+1;o.change((e=>{if(s){const t=P(i,s);for(const{cell:o,column:n}of t)E(o,n,s,e)}c("headingColumns",s,i,e,0)}))}}const $=5,K=2;function G(e,t){return 4e3/q(e,t)}function q(e,t){const o=J(e,"tbody",t)||J(e,"thead",t);return X(t.editing.view.domConverter.mapViewToDom(o))}function J(e,t,o){return[...[...o.editing.mapper.toViewElement(e).getChildren()].find((e=>e.is("element","table"))).getChildren()].find((e=>e.is("element",t)))}function X(e){const t=m.global.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseFloat(t.width)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth):parseFloat(t.width)}function Y(e){const t=Math.pow(10,K),o="number"==typeof e?e:parseFloat(e);return Math.round(o*t)/t}function Q(e){return e.map((e=>"number"==typeof e?e:parseFloat(e))).filter((e=>!Number.isNaN(e))).reduce(((e,t)=>e+t),0)}function Z(e){let t=function(e){const t=e.filter((e=>"auto"===e)).length;if(0===t)return e.map((e=>Y(e)));const o=Q(e),n=Math.max((100-o)/t,$);return e.map((e=>"auto"===e?n:e)).map((e=>Y(e)))}(e.map((e=>"auto"===e?e:parseFloat(e.replace("%","")))));const o=Q(t);return 100!==o&&(t=t.map((e=>Y(100*e/o))).map(((e,t,o)=>{if(!(t===o.length-1))return e;return Y(e+100-Q(o))}))),t.map((e=>e+"%"))}function ee(e){const t=m.global.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseInt(t.width):parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)+parseFloat(t.borderWidth)}function te(e,t,o,n){for(let i=0;ie.is("element","tableColumnGroup")))}function ne(e){const t=oe(e);return t?Array.from(t.getChildren()):[]}class ie extends e.Plugin{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,o=t.parent,n=o.getChildIndex(t),i=new w(o,{row:n});for(const{cell:t,row:o,column:n}of i)if(t===e)return{row:o,column:n}}createTable(e,t){const o=e.createElement("table"),n=t.rows||2,i=t.columns||2;return re(e,o,0,n,i),t.headingRows&&c("headingRows",Math.min(t.headingRows,n),o,e,0),t.headingColumns&&c("headingColumns",Math.min(t.headingColumns,i),o,e,0),o}insertRows(e,t={}){const o=this.editor.model,n=t.at||0,i=t.rows||1,r=void 0!==t.copyStructureFromAbove,l=t.copyStructureFromAbove?n-1:n,s=this.getRows(e),a=this.getColumns(e);if(n>s)throw new m.CKEditorError("tableutils-insertrows-insert-out-of-range",this,{options:t});o.change((t=>{const o=e.getAttribute("headingRows")||0;if(o>n&&c("headingRows",o+i,e,t,0),!r&&(0===n||n===s))return void re(t,e,n,i,a);const u=r?Math.max(n,l):n,h=new w(e,{endRow:u}),b=new Array(a).fill(1);for(const{row:e,column:o,cellHeight:s,cellWidth:a,cell:c}of h){const d=e+s-1,u=e<=l&&l<=d;e0&&d(t,i,n>1?{colspan:n}:void 0),e+=Math.abs(n)-1}}}))}insertColumns(e,t={}){const o=this.editor.model,n=t.at||0,i=t.columns||1;o.change((t=>{const o=e.getAttribute("headingColumns");ni-1)throw new m.CKEditorError("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});o.change((t=>{const o={first:r,last:l},{cellsToMove:n,cellsToTrim:i}=function(e,{first:t,last:o}){const n=new Map,i=[];for(const{row:r,column:l,cellHeight:s,cell:a}of new w(e,{endRow:o})){const e=r+s-1;if(r>=t&&r<=o&&e>o){const e=s-(o-r+1);n.set(l,{cell:a,rowspan:e})}if(r=t){let n;n=e>=o?o-t+1:e-t+1,i.push({cell:a,rowspan:s-n})}}return{cellsToMove:n,cellsToTrim:i}}(e,o);if(n.size){!function(e,t,o,n){const i=new w(e,{includeAllSlots:!0,row:t}),r=[...i],l=e.getChild(t);let s;for(const{column:e,cell:t,isAnchor:i}of r)if(o.has(e)){const{cell:t,rowspan:i}=o.get(e),r=s?n.createPositionAfter(s):n.createPositionAt(l,0);n.move(n.createRangeOn(t),r),c("rowspan",i,t,n),s=t}else i&&(s=t)}(e,l+1,n,t)}for(let o=l;o>=r;o--)t.remove(e.getChild(o));for(const{rowspan:e,cell:o}of i)c("rowspan",e,o,t);!function(e,{first:t,last:o},n){const i=e.getAttribute("headingRows")||0;if(t{!function(e,t,o){const n=e.getAttribute("headingColumns")||0;if(n&&t.first=n;i--){for(const{cell:o,column:n,cellWidth:r}of[...new w(e)])n<=i&&r>1&&n+r>i?c("colspan",r-1,o,t):n===i&&t.remove(o);if(o[i]){const e=0===i?o[1]:o[i-1],n=parseFloat(o[i].getAttribute("columnWidth")),r=parseFloat(e.getAttribute("columnWidth"));t.remove(o[i]),t.setAttribute("columnWidth",n+r+"%",e)}}L(e,this)||B(e,this)}))}splitCellVertically(e,t=2){const o=this.editor.model,n=e.parent.parent,i=parseInt(e.getAttribute("rowspan")||"1"),r=parseInt(e.getAttribute("colspan")||"1");o.change((o=>{if(r>1){const{newCellsSpan:n,updatedSpan:l}=se(r,t);c("colspan",l,e,o);const s={};n>1&&(s.colspan=n),i>1&&(s.rowspan=i);le(r>t?t-1:r-1,o,o.createPositionAfter(e),s)}if(rt===e)),d=s.filter((({cell:t,cellWidth:o,column:n})=>t!==e&&n===a||na));for(const{cell:e,cellWidth:t}of d)o.setAttribute("colspan",t+l,e);const u={};i>1&&(u.rowspan=i),le(l,o,o.createPositionAfter(e),u);const h=n.getAttribute("headingColumns")||0;h>a&&c("headingColumns",h+l,n,o)}}))}splitCellHorizontally(e,t=2){const o=this.editor.model,n=e.parent,i=n.parent,r=i.getChildIndex(n),l=parseInt(e.getAttribute("rowspan")||"1"),s=parseInt(e.getAttribute("colspan")||"1");o.change((o=>{if(l>1){const n=[...new w(i,{startRow:r,endRow:r+l-1,includeAllSlots:!0})],{newCellsSpan:a,updatedSpan:d}=se(l,t);c("rowspan",d,e,o);const{column:u}=n.find((({cell:t})=>t===e)),h={};a>1&&(h.rowspan=a),s>1&&(h.colspan=s);for(const e of n){const{column:t,row:n}=e;n>=r+d&&t===u&&(n+r+d)%a==0&&le(1,o,e.getPositionBefore(),h)}}if(lr){const e=i+n;o.setAttribute("rowspan",e,t)}const d={};s>1&&(d.colspan=s),re(o,i,r+1,n,1,d);const u=i.getAttribute("headingRows")||0;u>r&&c("headingRows",u+n,i,o)}}))}getColumns(e){return[...e.getChild(0).getChildren()].filter((e=>e.is("element","tableCell"))).reduce(((e,t)=>e+parseInt(t.getAttribute("colspan")||"1")),0)}getRows(e){return Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0)}createTableWalker(e,t={}){return new w(e,t)}getSelectedTableCells(e){const t=[];for(const o of this.sortRanges(e.getRanges())){const e=o.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){const t=[];for(const o of e.getRanges()){const e=o.start.findAncestor("tableCell");e&&t.push(e)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map((e=>e.parent.index));return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){const t=e[0].findAncestor("table"),o=[...new w(t)].filter((t=>e.includes(t.cell))).map((e=>e.column));return this._getFirstLastIndexesObject(o)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,o=new Set;let n=0;for(const i of e){const{row:e,column:r}=this.getCellLocation(i),l=parseInt(i.getAttribute("rowspan"))||1,s=parseInt(i.getAttribute("colspan"))||1;t.add(e),o.add(r),l>1&&t.add(e+l-1),s>1&&o.add(r+s-1),n+=l*s}const i=function(e,t){const o=Array.from(e.values()),n=Array.from(t.values()),i=Math.max(...o),r=Math.min(...o),l=Math.max(...n),s=Math.min(...n);return(i-r+1)*(l-s+1)}(t,o);return i==n}sortRanges(e){return Array.from(e).sort(ae)}_getFirstLastIndexesObject(e){const t=e.sort(((e,t)=>e-t));return{first:t[0],last:t[t.length-1]}}_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),o=this.getRowIndexes(e),n=parseInt(t.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(o,n))return!1;const i=this.getColumnIndexes(e),r=parseInt(t.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(i,r)}_areIndexesInSameSection({first:e,last:t},o){return e{const n=t.getSelectedTableCells(e.document.selection),i=n.shift(),{mergeWidth:r,mergeHeight:l}=function(e,t,o){let n=0,i=0;for(const e of t){const{row:t,column:r}=o.getCellLocation(e);n=he(e,r,n,"colspan"),i=he(e,t,i,"rowspan")}const{row:r,column:l}=o.getCellLocation(e),s=n-l,a=i-r;return{mergeWidth:s,mergeHeight:a}}(i,n,t);c("colspan",r,i,o),c("rowspan",l,i,o);for(const e of n)de(e,i,o);F(i.findAncestor("table"),t),o.setSelection(i,"in")}))}}function de(e,t,o){ue(e)||(ue(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end"))),o.remove(e)}function ue(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}function he(e,t,o,n){const i=parseInt(e.getAttribute(n)||"1");return Math.max(o,t+i)}class be extends e.Command{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),i=o[0].findAncestor("table"),r=[];for(let t=n.first;t<=n.last;t++)for(const o of i.getChild(t).getChildren())r.push(e.createRangeOn(o));e.change((e=>{e.setSelection(r)}))}}class me extends e.Command{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o[0],i=o.pop(),r=n.findAncestor("table"),l=e.getCellLocation(n),s=e.getCellLocation(i),a=Math.min(l.column,s.column),c=Math.max(l.column,s.column),d=[];for(const e of new w(r,{startColumn:a,endColumn:c}))d.push(t.createRangeOn(e.cell));t.change((e=>{e.setSelection(d)}))}}function ge(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.differ.getChanges();let n=!1;const i=new Set;for(const t of o){let o=null;"insert"==t.type&&"table"==t.name&&(o=t.position.nodeAfter),"insert"!=t.type&&"remove"!=t.type||"tableRow"!=t.name&&"tableCell"!=t.name||(o=t.position.findAncestor("table")),we(t)&&(o=t.range.start.findAncestor("table")),o&&!i.has(o)&&(n=pe(o,e)||n,n=fe(o,e)||n,i.add(o))}return n}(t,e)))}function pe(e,t){let o=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||"0"),o=Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0),n=[];for(const{row:i,cell:r,cellHeight:l}of new w(e)){if(l<2)continue;const e=ie){const t=e-i;n.push({cell:r,rowspan:t})}}return n}(e);if(n.length){o=!0;for(const e of n)c("rowspan",e.rowspan,e.cell,t,1)}return o}function fe(e,t){let o=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:o}of new w(e,{includeAllSlots:!0}))t[o]++;return t}(e),i=[];for(const[t,o]of n.entries())!o&&e.getChild(t).is("element","tableRow")&&i.push(t);if(i.length){o=!0;for(const o of i.reverse())t.remove(e.getChild(o)),n.splice(o,1)}const r=n.filter(((t,o)=>e.getChild(o).is("element","tableRow"))),l=r[0];if(!r.every((e=>e===l))){const n=r.reduce(((e,t)=>t>e?t:e),0);for(const[i,l]of r.entries()){const r=n-l;if(r){for(let o=0;ofunction(e,t){const o=t.document.differ.getChanges();let n=!1;for(const t of o)"insert"==t.type&&"table"==t.name&&(n=ke(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=ve(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=Ce(t.position.nodeAfter,e)||n),"remove"!=t.type&&"insert"!=t.type||!ye(t)||(n=Ce(t.position.parent,e)||n);return n}(t,e)))}function ke(e,t){let o=!1;for(const n of e.getChildren())n.is("element","tableRow")&&(o=ve(n,t)||o);return o}function ve(e,t){let o=!1;for(const n of e.getChildren())o=Ce(n,t)||o;return o}function Ce(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const o=Array.from(e.getChildren()).filter((e=>e.is("$text")));for(const e of o)t.wrap(t.createRangeOn(e),"paragraph");return!!o.length}function ye(e){return!!e.position.parent.is("element","tableCell")&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function Ae(e,t){if(!e.is("element","paragraph"))return!1;const o=t.toViewElement(e);return!!o&&y(e)!==o.is("element","span")}var Te=o(591),xe=o.n(Te),Se=o(817),Ve={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Se.A,Ve);Se.A.locals;class Re extends e.Plugin{static get pluginName(){return"TableEditing"}static get requires(){return[ie]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,t=e.model,o=t.schema,n=e.conversion,i=e.plugins.get(ie);o.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),o.register("tableRow",{allowIn:"table",isLimit:!0}),o.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),n.for("upcast").add((e=>{e.on("element:figure",((e,t,o)=>{if(!o.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(t.viewItem,{name:!0,classes:"table"});const i=o.convertItem(n,t.modelCursor),r=(0,m.first)(i.modelRange.getItems());r?(o.convertChildren(t.viewItem,o.writer.createPositionAt(r,"end")),o.updateConversionResult(r,t)):o.consumable.revert(t.viewItem,{name:!0,classes:"table"})}))})),n.for("upcast").add(g()),n.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:k(i,{asWidget:!0,additionalSlots:this._additionalSlots})}),n.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:k(i,{additionalSlots:this._additionalSlots})}),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add((e=>{e.on("element:tr",((e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()}),{priority:"high"})})),n.for("downcast").elementToElement({model:"tableRow",view:(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add(p("td")),n.for("upcast").add(p("th")),n.for("editingDowncast").elementToElement({model:"tableCell",view:v({asWidget:!0})}),n.for("dataDowncast").elementToElement({model:"tableCell",view:v()}),n.for("editingDowncast").elementToElement({model:"paragraph",view:C({asWidget:!0}),converterPriority:"high"}),n.for("dataDowncast").elementToElement({model:"paragraph",view:C(),converterPriority:"high"}),n.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),n.for("upcast").attributeToAttribute({model:{key:"colspan",value:Ie("colspan")},view:"colspan"}),n.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("upcast").attributeToAttribute({model:{key:"rowspan",value:Ie("rowspan")},view:"rowspan"}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new A(e)),e.commands.add("insertTableRowAbove",new T(e,{order:"above"})),e.commands.add("insertTableRowBelow",new T(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new x(e,{order:"left"})),e.commands.add("insertTableColumnRight",new x(e,{order:"right"})),e.commands.add("removeTableRow",new M(e)),e.commands.add("removeTableColumn",new D(e)),e.commands.add("splitTableCellVertically",new S(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new S(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new ce(e)),e.commands.add("mergeTableCellRight",new O(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new O(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new O(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new O(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new U(e)),e.commands.add("setTableRowHeader",new H(e)),e.commands.add("selectTableRow",new be(e)),e.commands.add("selectTableColumn",new me(e)),ge(t),_e(t),this.listenTo(t.document,"change:data",(()=>{!function(e,t){const o=e.document.differ;for(const e of o.getChanges()){let o,n=!1;if("attribute"==e.type){const t=e.range.start.nodeAfter;if(!t||!t.is("element","table"))continue;if("headingRows"!=e.attributeKey&&"headingColumns"!=e.attributeKey)continue;o=t,n="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(o=e.position.findAncestor("table"),n="tableRow"==e.name);if(!o)continue;const i=o.getAttribute("headingRows")||0,r=o.getAttribute("headingColumns")||0,l=new w(o);for(const e of l){const o=e.rowAe(e,t.mapper)));for(const e of o)t.reconvertItem(e)}}(t,e.editing)}))}registerAdditionalSlot(e){this._additionalSlots.push(e)}}function Ie(e){return t=>{const o=parseInt(t.getAttribute(e));return Number.isNaN(o)||o<=0?null:o}}var Pe=o(311),Ee=o(712),ze={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Ee.A,ze);Ee.A.locals;class Be extends Pe.View{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new m.KeystrokeHandler,this.focusTracker=new m.FocusTracker,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",((e,t)=>`${t} × ${e}`)),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:t.to("label")}]}],on:{mousedown:t.to((e=>{e.preventDefault()})),click:t.to((()=>{this.fire("execute")}))}}),this.on("boxover",((e,t)=>{const{row:o,column:n}=t.target.dataset;this.items.get(10*(parseInt(o,10)-1)+(parseInt(n,10)-1)).focus()})),this.focusTracker.on("change:focusedElement",((e,t,o)=>{if(!o)return;const{row:n,column:i}=o.dataset;this.set({rows:parseInt(n),columns:parseInt(i)})})),this.on("change:columns",(()=>this._highlightGridBoxes())),this.on("change:rows",(()=>this._highlightGridBoxes()))}render(){super.render(),(0,Pe.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}reset(){this.set({rows:1,columns:1})}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map(((o,n)=>{const i=Math.floor(n/10){const i=t.commands.get("insertTable"),r=(0,Pe.createDropdown)(n);let l;return r.bind("isEnabled").to(i),r.buttonView.set({icon:e.icons.table,label:o("Insert table"),tooltip:!0}),r.on("change:isOpen",(()=>{l||(l=new Be(n),r.panelView.children.add(l),l.delegate("execute").to(r),r.on("execute",(()=>{t.execute("insertTable",{rows:l.rows,columns:l.columns}),t.editing.view.focus()})))})),r})),t.ui.componentFactory.add("menuBar:insertTable",(n=>{const i=t.commands.get("insertTable"),r=new Pe.MenuBarMenuView(n),l=new Be(n);return l.delegate("execute").to(r),r.on("change:isOpen",((e,t,o)=>{o||l.reset()})),l.on("execute",(()=>{t.execute("insertTable",{rows:l.rows,columns:l.columns}),t.editing.view.focus()})),r.buttonView.set({label:o("Table"),icon:e.icons.table}),r.panelView.children.add(l),r.bind("isEnabled").to(i),r})),t.ui.componentFactory.add("tableColumn",(e=>{const t=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:o("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:n?"insertTableColumnLeft":"insertTableColumnRight",label:o("Insert column left")}},{type:"button",model:{commandName:n?"insertTableColumnRight":"insertTableColumnLeft",label:o("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:o("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:o("Select column")}}];return this._prepareDropdown(o("Column"),'',t,e)})),t.ui.componentFactory.add("tableRow",(e=>{const t=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:o("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:o("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:o("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:o("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:o("Select row")}}];return this._prepareDropdown(o("Row"),'',t,e)})),t.ui.componentFactory.add("mergeTableCells",(e=>{const t=[{type:"button",model:{commandName:"mergeTableCellUp",label:o("Merge cell up")}},{type:"button",model:{commandName:n?"mergeTableCellRight":"mergeTableCellLeft",label:o("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:o("Merge cell down")}},{type:"button",model:{commandName:n?"mergeTableCellLeft":"mergeTableCellRight",label:o("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:o("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:o("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(o("Merge cells"),'',t,e)}))}_prepareDropdown(e,t,o,n){const i=this.editor,r=(0,Pe.createDropdown)(n),l=this._fillDropdownWithListOptions(r,o);return r.buttonView.set({label:e,icon:t,tooltip:!0}),r.bind("isEnabled").toMany(l,"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(r,"execute",(e=>{i.execute(e.source.commandName),e.source instanceof Pe.SwitchButtonView||i.editing.view.focus()})),r}_prepareMergeSplitButtonDropdown(e,t,o,n){const i=this.editor,r=(0,Pe.createDropdown)(n,Pe.SplitButtonView),l="mergeTableCells",s=i.commands.get(l),a=this._fillDropdownWithListOptions(r,o);return r.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),r.bind("isEnabled").toMany([s,...a],"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(r.buttonView,"execute",(()=>{i.execute(l),i.editing.view.focus()})),this.listenTo(r,"execute",(e=>{i.execute(e.source.commandName),i.editing.view.focus()})),r}_fillDropdownWithListOptions(e,t){const o=this.editor,n=[],i=new m.Collection;for(const e of t)Fe(e,o,n,i);return(0,Pe.addListToDropdown)(e,i),n}}function Fe(e,t,o,n){if("button"===e.type||"switchbutton"===e.type){const n=e.model=new Pe.ViewModel(e.model),{commandName:i,bindIsOn:r}=e.model,l=t.commands.get(i);o.push(l),n.set({commandName:i}),n.bind("isEnabled").to(l),r&&n.bind("isOn").to(l,"value"),n.set({withText:!0})}n.add(e)}var We=o(719),Ne={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(We.A,Ne);We.A.locals;class Oe extends e.Plugin{static get pluginName(){return"TableSelection"}static get requires(){return[ie,ie]}init(){const e=this.editor,t=e.model,o=e.editing.view;this.listenTo(t,"deleteContent",((e,t)=>this._handleDeleteContent(e,t)),{priority:"high"}),this.listenTo(o.document,"insertText",((e,t)=>this._handleInsertTextEvent(e,t)),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(ie),t=this.editor.model.document.selection,o=e.getSelectedTableCells(t);return 0==o.length?null:o}getSelectionAsFragment(){const e=this.editor.plugins.get(ie),t=this.getSelectedTableCells();return t?this.editor.model.change((o=>{const n=o.createDocumentFragment(),{first:i,last:r}=e.getColumnIndexes(t),{first:l,last:s}=e.getRowIndexes(t),a=t[0].findAncestor("table");let c=s,d=r;if(e.isSelectionRectangular(t)){const e={firstColumn:i,lastColumn:r,firstRow:l,lastRow:s};c=W(a,e),d=N(a,e)}const u=V(a,{startRow:l,startColumn:i,endRow:c,endColumn:d},o);return o.insert(u,n,0),n})):null}setCellSelection(e,t){const o=this._getCellsToSelect(e,t);this.editor.model.change((e=>{e.setSelection(o.cells.map((t=>e.createRangeOn(t))),{backward:o.backward})}))}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=this.editor.model.document.selection,t=(0,m.first)(e.getRanges()).getContainedElement();return t&&t.is("element","tableCell")?t:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add((e=>e.on("selection",((e,o,n)=>{const i=n.writer;!function(e){for(const o of t)e.removeClass("ck-editor__editable_selected",o);t.clear()}(i);const r=this.getSelectedTableCells();if(!r)return;for(const e of r){const o=n.mapper.toViewElement(e);i.addClass("ck-editor__editable_selected",o),t.add(o)}const l=n.mapper.toViewElement(r[r.length-1]);i.setSelection(l,0)}),{priority:"lowest"})))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",(()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change((o=>{const n=o.createPositionAt(t[0],0),i=e.model.schema.getNearestSelectionRange(n);o.setSelection(i)}))}}))}_handleDeleteContent(e,t){const o=this.editor.plugins.get(ie),n=t[0],i=t[1],r=this.editor.model,l=!i||"backward"==i.direction,s=o.getSelectedTableCells(n);s.length&&(e.stop(),r.change((e=>{const t=s[l?s.length-1:0];r.change((e=>{for(const t of s)r.deleteContent(e.createSelection(t,"in"))}));const o=r.schema.getNearestSelectionRange(e.createPositionAt(t,0));n.is("documentSelection")?e.setSelection(o):n.setTo(o)})))}_handleInsertTextEvent(e,t){const o=this.editor,n=this.getSelectedTableCells();if(!n)return;const i=o.editing.view,r=o.editing.mapper,l=n.map((e=>i.createRangeOn(r.toViewElement(e))));t.selection=i.createSelection(l)}_getCellsToSelect(e,t){const o=this.editor.plugins.get("TableUtils"),n=o.getCellLocation(e),i=o.getCellLocation(t),r=Math.min(n.row,i.row),l=Math.max(n.row,i.row),s=Math.min(n.column,i.column),a=Math.max(n.column,i.column),c=new Array(l-r+1).fill(null).map((()=>[])),d={startRow:r,endRow:l,startColumn:s,endColumn:a};for(const{row:t,cell:o}of new w(e.findAncestor("table"),d))c[t-r].push(o);const u=i.rowe.reverse())),{cells:c.flat(),backward:u||h}}}var je=o(331);class Me extends e.Plugin{static get pluginName(){return"TableClipboard"}static get requires(){return[je.ClipboardMarkersUtils,je.ClipboardPipeline,Oe,ie]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",((e,t)=>this._onCopyCut(e,t))),this.listenTo(t,"cut",((e,t)=>this._onCopyCut(e,t))),this.listenTo(e.model,"insertContent",((e,[t,o])=>this._onInsertContent(e,t,o)),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const o=this.editor.editing.view,n=this.editor.plugins.get(Oe),i=this.editor.plugins.get(je.ClipboardMarkersUtils);n.getSelectedTableCells()&&("cut"!=e.name||this.editor.model.canEditAt(this.editor.model.document.selection))&&(t.preventDefault(),e.stop(),this.editor.model.enqueueChange({isUndoable:"cut"===e.name},(()=>{const r=i._copySelectedFragmentWithMarkers(e.name,this.editor.model.document.selection,(()=>n.getSelectionAsFragment()));o.document.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:this.editor.data.toView(r),method:e.name})})))}_onInsertContent(e,t,o){if(o&&!o.is("documentSelection"))return;const n=this.editor.model,i=this.editor.plugins.get(ie),r=this.editor.plugins.get(je.ClipboardMarkersUtils),l=this.getTableIfOnlyTableInContent(t,n);if(!l)return;const s=i.getSelectionAffectedTableCells(n.document.selection);s.length?(e.stop(),t.is("documentFragment")?r._pasteMarkersIntoTransformedElement(t.markers,(e=>this._replaceSelectedCells(l,s,e))):this.editor.model.change((e=>{this._replaceSelectedCells(l,s,e)}))):F(l,i)}_replaceSelectedCells(e,t,o){const n=this.editor.plugins.get(ie),i={width:n.getColumns(e),height:n.getRows(e)},r=function(e,t,o,n){const i=e[0].findAncestor("table"),r=n.getColumnIndexes(e),l=n.getRowIndexes(e),s={firstColumn:r.first,lastColumn:r.last,firstRow:l.first,lastRow:l.last},a=1===e.length;a&&(s.lastRow+=t.height-1,s.lastColumn+=t.width-1,function(e,t,o,n){const i=n.getColumns(e),r=n.getRows(e);o>i&&n.insertColumns(e,{at:i,columns:o-i});t>r&&n.insertRows(e,{at:r,rows:t-r})}(i,s.lastRow+1,s.lastColumn+1,n));a||!n.isSelectionRectangular(e)?function(e,t,o){const{firstRow:n,lastRow:i,firstColumn:r,lastColumn:l}=t,s={first:n,last:i},a={first:r,last:l};He(e,r,s,o),He(e,l+1,s,o),De(e,n,a,o),De(e,i+1,a,o,n)}(i,s,o):(s.lastRow=W(i,s),s.lastColumn=N(i,s));return s}(t,i,o,n),l=r.lastRow-r.firstRow+1,s=r.lastColumn-r.firstColumn+1;e=V(e,{startRow:0,startColumn:0,endRow:Math.min(l,i.height)-1,endColumn:Math.min(s,i.width)-1},o);const a=t[0].findAncestor("table"),c=this._replaceSelectedCellsWithPasted(e,i,a,r,o);if(this.editor.plugins.get("TableSelection").isEnabled){const e=n.sortRanges(c.map((e=>o.createRangeOn(e))));o.setSelection(e)}else o.setSelection(c[0],0);return a}_replaceSelectedCellsWithPasted(e,t,o,n,i){const{width:r,height:l}=t,s=function(e,t,o){const n=new Array(o).fill(null).map((()=>new Array(t).fill(null)));for(const{column:t,row:o,cell:i}of new w(e))n[o][t]=i;return n}(e,r,l),a=[...new w(o,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],c=[];let d;for(const e of a){const{row:t,column:o}=e;o===n.firstColumn&&(d=e.getPositionBefore());const a=t-n.firstRow,u=o-n.firstColumn,h=s[a%l][u%r],b=h?i.cloneElement(h):null,m=this._replaceTableSlotCell(e,b,d,i);m&&(z(m,t,o,n.lastRow,n.lastColumn,i),c.push(m),d=i.createPositionAfter(m))}const u=parseInt(o.getAttribute("headingRows")||"0"),h=parseInt(o.getAttribute("headingColumns")||"0"),b=n.firstRowUe(e,t,o))).map((({cell:e})=>I(e,t,n)))}function He(e,t,o,n){if(t<1)return;return P(e,t).filter((({row:e,cellHeight:t})=>Ue(e,t,o))).map((({cell:e,column:o})=>E(e,o,t,n)))}function Ue(e,t,o){const n=e+t-1,{first:i,last:r}=o;return e>=i&&e<=r||e=i}class $e extends e.Plugin{static get pluginName(){return"TableKeyboard"}static get requires(){return[Oe,ie]}init(){const e=this.editor,t=e.editing.view.document,o=e.t;this.listenTo(t,"arrowKey",((...e)=>this._onArrowKey(...e)),{context:"table"}),this.listenTo(t,"tab",((...e)=>this._handleTabOnSelectedTable(...e)),{context:"figure"}),this.listenTo(t,"tab",((...e)=>this._handleTab(...e)),{context:["th","td"]}),e.accessibility.addKeystrokeInfoGroup({id:"table",label:o("Keystrokes that can be used in a table cell"),keystrokes:[{label:o("Move the selection to the next cell"),keystroke:"Tab"},{label:o("Move the selection to the previous cell"),keystroke:"Shift+Tab"},{label:o("Insert a new table row (when in the last cell of a table)"),keystroke:"Tab"},{label:o("Navigate through the table"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]}]})}_handleTabOnSelectedTable(e,t){const o=this.editor,n=o.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t.preventDefault(),t.stopPropagation(),e.stop(),o.model.change((e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))})))}_handleTab(e,t){const o=this.editor,n=this.editor.plugins.get(ie),i=this.editor.plugins.get("TableSelection"),r=o.model.document.selection,l=!t.shiftKey;let s=n.getTableCellsContainingSelection(r)[0];if(s||(s=i.getFocusCell()),!s)return;t.preventDefault(),t.stopPropagation(),e.stop();const a=s.parent,c=a.parent,d=c.getChildIndex(a),u=a.getChildIndex(s),h=0===u;if(!l&&h&&0===d)return void o.model.change((e=>{e.setSelection(e.createRangeOn(c))}));const b=u===a.childCount-1,m=d===n.getRows(c)-1;if(l&&m&&b&&(o.execute("insertTableRowBelow"),d===n.getRows(c)-1))return void o.model.change((e=>{e.setSelection(e.createRangeOn(c))}));let g;if(l&&b){const e=c.getChild(d+1);g=e.getChild(0)}else if(!l&&h){const e=c.getChild(d-1);g=e.getChild(e.childCount-1)}else g=a.getChild(u+(l?1:-1));o.model.change((e=>{e.setSelection(e.createRangeIn(g))}))}_onArrowKey(e,t){const o=this.editor,n=t.keyCode,i=(0,m.getLocalizedArrowKeyCodeDirection)(n,o.locale.contentLanguageDirection);this._handleArrowKeys(i,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const o=this.editor.plugins.get(ie),n=this.editor.plugins.get("TableSelection"),i=this.editor.model,r=i.document.selection,l=["right","down"].includes(e),s=o.getSelectedTableCells(r);if(s.length){let o;return o=t?n.getFocusCell():l?s[s.length-1]:s[0],this._navigateFromCellInDirection(o,e,t),!0}const a=r.focus.findAncestor("tableCell");if(!a)return!1;if(!r.isCollapsed)if(t){if(r.isBackward==l&&!r.containsEntireContent(a))return!1}else{const e=r.getSelectedElement();if(!e||!i.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(r,a,l)&&(this._navigateFromCellInDirection(a,e,t),!0)}_isSelectionAtCellEdge(e,t,o){const n=this.editor.model,i=this.editor.model.schema,r=o?e.getLastPosition():e.getFirstPosition();if(!i.getLimitElement(r).is("element","tableCell")){return n.createPositionAt(t,o?"end":0).isTouching(r)}const l=n.createSelection(r);return n.modifySelection(l,{direction:o?"forward":"backward"}),r.isEqual(l.focus)}_navigateFromCellInDirection(e,t,o=!1){const n=this.editor.model,i=e.findAncestor("table"),r=[...new w(i,{includeAllSlots:!0})],{row:l,column:s}=r[r.length-1],a=r.find((({cell:t})=>t==e));let{row:c,column:d}=a;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=a.cellWidth;break;case"down":c+=a.cellHeight}if(c<0||c>l||d<0&&c<=0||d>s&&c>=l)return void n.change((e=>{e.setSelection(e.createRangeOn(i))}));d<0?(d=o?0:s,c--):d>s&&(d=o?s:0,c++);const u=r.find((e=>e.row==c&&e.column==d)).cell,h=["right","down"].includes(t),b=this.editor.plugins.get("TableSelection");if(o&&b.isEnabled){const t=b.getAnchorCell()||e;b.setCellSelection(t,u)}else{const e=n.createPositionAt(u,h?0:"end");n.change((t=>{t.setSelection(e)}))}}}var Ke=o(783);class Ge extends Ke.DomEventObserver{constructor(){super(...arguments),this.domEventType=["mousemove","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class qe extends e.Plugin{static get pluginName(){return"TableMouse"}static get requires(){return[Oe,ie]}init(){this.editor.editing.view.addObserver(Ge),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(ie);let o=!1;const n=e.plugins.get(Oe);this.listenTo(e.editing.view.document,"mousedown",((i,r)=>{const l=e.model.document.selection;if(!this.isEnabled||!n.isEnabled)return;if(!r.domEvent.shiftKey)return;const s=n.getAnchorCell()||t.getTableCellsContainingSelection(l)[0];if(!s)return;const a=this._getModelTableCellFromDomEvent(r);a&&Je(s,a)&&(o=!0,n.setCellSelection(s,a),r.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{o=!1})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{o&&e.stop()}),{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,o,n=!1,i=!1;const r=e.plugins.get(Oe);this.listenTo(e.editing.view.document,"mousedown",((e,o)=>{this.isEnabled&&r.isEnabled&&(o.domEvent.shiftKey||o.domEvent.ctrlKey||o.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(o)))})),this.listenTo(e.editing.view.document,"mousemove",((e,l)=>{if(!l.domEvent.buttons)return;if(!t)return;const s=this._getModelTableCellFromDomEvent(l);s&&Je(t,s)&&(o=s,n||o==t||(n=!0)),n&&(i=!0,r.setCellSelection(t,o),l.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{n=!1,i=!1,t=null,o=null})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{i&&e.stop()}),{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,o=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(o).parent.findAncestor("tableCell",{includeSelf:!0})}}function Je(e,t){return e.parent.parent==t.parent.parent}var Xe=o(25),Ye={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Xe.A,Ye);Xe.A.locals;class Qe extends e.Plugin{static get requires(){return[Re,Le,Oe,qe,$e,Me,t.Widget]}static get pluginName(){return"Table"}}class Ze extends e.Plugin{static get pluginName(){return"PlainTableOutput"}static get requires(){return[Qe]}init(){const e=this.editor;e.conversion.for("dataDowncast").elementToStructure({model:"table",view:et,converterPriority:"high"}),e.plugins.has("TableCaption")&&e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>{if("table"===e.parent.name)return t.createContainerElement("caption")},converterPriority:"high"}),e.plugins.has("TableProperties")&&function(e){const t={"border-width":"tableBorderWidth","border-color":"tableBorderColor","border-style":"tableBorderStyle","background-color":"tableBackgroundColor"};for(const[o,n]of Object.entries(t))e.conversion.for("dataDowncast").add((e=>e.on(`attribute:${n}:table`,((e,t,n)=>{const{item:i,attributeNewValue:r}=t,{mapper:l,writer:s}=n;if(!n.consumable.consume(i,e.name))return;const a=l.toViewElement(i);r?s.setStyle(o,r,a):s.removeStyle(o,a)}),{priority:"high"})))}(e)}}function et(e,{writer:t}){const o=e.getAttribute("headingRows")||0,n=t.createSlot((e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=o)),r=t.createSlot((e=>!e.is("element","tableRow"))),l=t.createContainerElement("thead",null,n),s=t.createContainerElement("tbody",null,i),a=[];return o&&a.push(l),othis._setInputValue(o)))}render(){super.render(),[this.inputView,this.dropdownView.buttonView].forEach((e=>{this.focusTracker.add(e.element),this._focusables.add(e)})),this.keystrokes.listenTo(this.element)}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,t=e.t,o=this.bindTemplate,n=this._createColorSelector(e),i=(0,Pe.createDropdown)(e),r=new Pe.View;return r.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:o.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",o.if("value","ck-hidden",(e=>""!=e))]}}]}),i.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),i.buttonView.children.add(r),i.buttonView.label=t("Color picker"),i.buttonView.tooltip=!0,i.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",i.panelView.children.add(n),i.bind("isEnabled").to(this,"isReadOnly",(e=>!e)),i.on("change:isOpen",((e,t,o)=>{o&&(n.updateSelectedColors(),n.showColorGridsFragment())})),i}_createInputTextView(){const e=this.locale,t=new Pe.InputTextView(e);return t.extendTemplate({on:{blur:t.bindTemplate.to("blur")}}),t.value=this.value,t.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(t),t.on("input",(()=>{const e=t.element.value,o=this.options.colorDefinitions.find((t=>e===t.label));this._stillTyping=!0,this.value=o&&o.color||e})),t.on("blur",(()=>{this._stillTyping=!1,this._setInputValue(t.element.value)})),t.delegate("input").to(this),t}_createColorSelector(e){const t=e.t,o=this.options.defaultColorValue||"",n=t(o?"Restore default":"Remove color"),i=new Pe.ColorSelectorView(e,{colors:this.options.colorDefinitions,columns:this.options.columns,removeButtonLabel:n,colorPickerLabel:t("Color picker"),colorPickerViewConfig:!1!==this.options.colorPickerConfig&&{...this.options.colorPickerConfig,hideInput:!0}});i.appendUI(),i.on("execute",((e,t)=>{"colorPickerSaveButton"!==t.source?(this.value=t.value||o,this.fire("input"),"colorPicker"!==t.source&&(this.dropdownView.isOpen=!1)):this.dropdownView.isOpen=!1}));let r=this.value;return i.on("colorPicker:cancel",(()=>{this.value=r,this.fire("input"),this.dropdownView.isOpen=!1})),i.colorGridsFragmentView.colorPickerButtonView.on("execute",(()=>{r=this.value})),i.bind("selectedColor").to(this,"value"),i}_setInputValue(e){if(!this._stillTyping){const t=ct(e),o=this.options.colorDefinitions.find((e=>t===ct(e.color)));this.inputView.value=o?o.label:e||""}}}function ct(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const dt=e=>""===e;function ut(e){return{none:e("None"),solid:e("Solid"),dotted:e("Dotted"),dashed:e("Dashed"),double:e("Double"),groove:e("Groove"),ridge:e("Ridge"),inset:e("Inset"),outset:e("Outset")}}function ht(e){return e('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function bt(e){return e('The value is invalid. Try "10px" or "2em" or simply "2".')}function mt(e){return e=e.trim().toLowerCase(),dt(e)||(0,Ke.isColor)(e)}function gt(e){return e=e.trim(),dt(e)||vt(e)||(0,Ke.isLength)(e)||(0,Ke.isPercentage)(e)}function pt(e){return e=e.trim(),dt(e)||vt(e)||(0,Ke.isLength)(e)}function ft(e,t){const o=new m.Collection,n=ut(e.t);for(const i in n){const r={type:"button",model:new Pe.ViewModel({_borderStyleValue:i,label:n[i],role:"menuitemradio",withText:!0})};"none"===i?r.model.bind("isOn").to(e,"borderStyle",(e=>"none"===t?!e:e===i)):r.model.bind("isOn").to(e,"borderStyle",(e=>e===i)),o.add(r)}return o}function wt(e){const{view:t,icons:o,toolbar:n,labels:i,propertyName:r,nameToValue:l,defaultValue:s}=e;for(const e in i){const a=new Pe.ButtonView(t.locale);a.set({label:i[e],icon:o[e],tooltip:i[e]});const c=l?l(e):e;a.bind("isOn").to(t,r,(e=>{let t=e;return""===e&&s&&(t=s),c===t})),a.on("execute",(()=>{t[r]=c})),n.items.add(a)}}const _t=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function kt(e){return(t,o,n)=>{const i=new at(t.locale,{colorDefinitions:(r=e.colorConfig,r.map((e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}})))),columns:e.columns,defaultColorValue:e.defaultColorValue,colorPickerConfig:e.colorPickerConfig});var r;return i.inputView.set({id:o,ariaDescribedById:n}),i.bind("isReadOnly").to(t,"isEnabled",(e=>!e)),i.bind("hasError").to(t,"errorText",(e=>!!e)),i.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused").to(i),i}}function vt(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}var Ct=o(839),yt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Ct.A,yt);Ct.A.locals;class At extends Pe.View{constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",o.to("class")],role:o.to("_role"),"aria-labelledby":o.to("_ariaLabelledBy")},children:this.children})}}var Tt=o(67),xt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Tt.A,xt);Tt.A.locals;var St=o(911),Vt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(St.A,Vt);St.A.locals;var Rt=o(266),It={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Rt.A,It);Rt.A.locals;class Pt extends Pe.View{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:i,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:l,backgroundInput:s}=this._createBackgroundFields(),{widthInput:a,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{horizontalAlignmentToolbar:h,verticalAlignmentToolbar:b,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new m.FocusTracker,this.keystrokes=new m.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=i,this.backgroundInput=s,this.paddingInput=this._createPaddingField(),this.widthInput=a,this.heightInput=d,this.horizontalAlignmentToolbar=h,this.verticalAlignmentToolbar=b;const{saveButtonView:p,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=p,this.cancelButtonView=f,this._focusables=new Pe.ViewCollection,this._focusCycler=new Pe.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Pe.FormHeaderView(e,{label:this.t("Cell properties")})),this.children.add(new At(e,{labelView:r,children:[r,o,i,n],class:"ck-table-form__border-row"})),this.children.add(new At(e,{labelView:l,children:[l,s],class:"ck-table-form__background-row"})),this.children.add(new At(e,{children:[new At(e,{labelView:u,children:[u,a,c,d],class:"ck-table-form__dimensions-row"}),new At(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new At(e,{labelView:g,children:[g,h,b],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new At(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,Pe.submitHandler)({view:this}),[this.borderColorInput,this.backgroundInput].forEach((e=>{e.fieldView.focusCycler.on("forwardCycle",(e=>{this._focusCycler.focusNext(),e.stop()})),e.fieldView.focusCycler.on("backwardCycle",(e=>{this._focusCycler.focusPrevious(),e.stop()}))})),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=kt({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,i=this.t,r=i("Style"),l=new Pe.LabelView(n);l.text=i("Border");const s=ut(i),a=new Pe.LabeledFieldView(n,Pe.createLabeledDropdown);a.set({label:r,class:"ck-table-form__border-style"}),a.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),a.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>s[e||"none"])),a.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),a.bind("isEmpty").to(this,"borderStyle",(e=>!e)),(0,Pe.addListToDropdown)(a.fieldView,ft(this,t.style),{role:"menu",ariaLabel:r});const c=new Pe.LabeledFieldView(n,Pe.createLabeledInputText);c.set({label:i("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",Et),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new Pe.LabeledFieldView(n,o);return d.set({label:i("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",Et),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,o,n,i)=>{Et(n)||(this.borderColor="",this.borderWidth=""),Et(i)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:l,borderStyleDropdown:a,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new Pe.LabelView(e);o.text=t("Background");const n=kt({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),i=new Pe.LabeledFieldView(e,n);return i.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new Pe.LabelView(e);o.text=t("Dimensions");const n=new Pe.LabeledFieldView(e,Pe.createLabeledInputText);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const i=new Pe.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new Pe.LabeledFieldView(e,Pe.createLabeledInputText);return r.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",(()=>{this.height=r.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:i,heightInput:r}}_createPaddingField(){const e=this.locale,t=this.t,o=new Pe.LabeledFieldView(e,Pe.createLabeledInputText);return o.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),o.fieldView.bind("value").to(this,"padding"),o.fieldView.on("input",(()=>{this.padding=o.fieldView.element.value})),o}_createAlignmentFields(){const t=this.locale,o=this.t,n=new Pe.LabelView(t),i={left:e.icons.alignLeft,center:e.icons.alignCenter,right:e.icons.alignRight,justify:e.icons.alignJustify,top:e.icons.alignTop,middle:e.icons.alignMiddle,bottom:e.icons.alignBottom};n.text=o("Table cell text alignment");const r=new Pe.ToolbarView(t),l="rtl"===t.contentLanguageDirection;r.set({isCompact:!0,ariaLabel:o("Horizontal text alignment toolbar")}),wt({view:this,icons:i,toolbar:r,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(l){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const s=new Pe.ToolbarView(t);return s.set({isCompact:!0,ariaLabel:o("Vertical text alignment toolbar")}),wt({view:this,icons:i,toolbar:s,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:r,verticalAlignmentToolbar:s,alignmentLabel:n}}_createActionButtons(){const t=this.locale,o=this.t,n=new Pe.ButtonView(t),i=new Pe.ButtonView(t),r=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return n.set({label:o("Save"),icon:e.icons.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(r,"errorText",((...e)=>e.every((e=>!e)))),i.set({label:o("Cancel"),icon:e.icons.cancel,class:"ck-button-cancel",withText:!0}),i.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:i}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,o=t("Align cell text to the left"),n=t("Align cell text to the center"),i=t("Align cell text to the right"),r=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:i,center:n,left:o,justify:r}:{left:o,center:n,right:i,justify:r}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function Et(e){return"none"!==e}const zt=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const Bt="object"==typeof global&&global&&global.Object===Object&&global;var Lt="object"==typeof self&&self&&self.Object===Object&&self;const Ft=Bt||Lt||Function("return this")();const Wt=function(){return Ft.Date.now()};var Nt=/\s/;const Ot=function(e){for(var t=e.length;t--&&Nt.test(e.charAt(t)););return t};var jt=/^\s+/;const Mt=function(e){return e?e.slice(0,Ot(e)+1).replace(jt,""):e};const Dt=Ft.Symbol;var Ht=Object.prototype,Ut=Ht.hasOwnProperty,$t=Ht.toString,Kt=Dt?Dt.toStringTag:void 0;const Gt=function(e){var t=Ut.call(e,Kt),o=e[Kt];try{e[Kt]=void 0;var n=!0}catch(e){}var i=$t.call(e);return n&&(t?e[Kt]=o:delete e[Kt]),i};var qt=Object.prototype.toString;const Jt=function(e){return qt.call(e)};var Xt=Dt?Dt.toStringTag:void 0;const Yt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Xt&&Xt in Object(e)?Gt(e):Jt(e)};const Qt=function(e){return null!=e&&"object"==typeof e};const Zt=function(e){return"symbol"==typeof e||Qt(e)&&"[object Symbol]"==Yt(e)};var eo=/^[-+]0x[0-9a-f]+$/i,to=/^0b[01]+$/i,oo=/^0o[0-7]+$/i,no=parseInt;const io=function(e){if("number"==typeof e)return e;if(Zt(e))return NaN;if(zt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=zt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Mt(e);var o=to.test(e);return o||oo.test(e)?no(e.slice(2),o?2:8):eo.test(e)?NaN:+e};var ro=Math.max,lo=Math.min;const so=function(e,t,o){var n,i,r,l,s,a,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var o=n,r=i;return n=i=void 0,c=t,l=e.apply(r,o)}function m(e){var o=e-a;return void 0===a||o>=t||o<0||u&&e-c>=r}function g(){var e=Wt();if(m(e))return p(e);s=setTimeout(g,function(e){var o=t-(e-a);return u?lo(o,r-(e-c)):o}(e))}function p(e){return s=void 0,h&&n?b(e):(n=i=void 0,l)}function f(){var e=Wt(),o=m(e);if(n=arguments,i=this,a=e,o){if(void 0===s)return function(e){return c=e,s=setTimeout(g,t),d?b(e):l}(a);if(u)return clearTimeout(s),s=setTimeout(g,t),b(a)}return void 0===s&&(s=setTimeout(g,t)),l}return t=io(t)||0,zt(o)&&(d=!!o.leading,r=(u="maxWait"in o)?ro(io(o.maxWait)||0,t):r,h="trailing"in o?!!o.trailing:h),f.cancel=function(){void 0!==s&&clearTimeout(s),c=0,n=a=i=s=void 0},f.flush=function(){return void 0===s?l:p(Wt())},f},ao=(()=>[Pe.BalloonPanelView.defaultPositions.northArrowSouth,Pe.BalloonPanelView.defaultPositions.northArrowSouthWest,Pe.BalloonPanelView.defaultPositions.northArrowSouthEast,Pe.BalloonPanelView.defaultPositions.southArrowNorth,Pe.BalloonPanelView.defaultPositions.southArrowNorthWest,Pe.BalloonPanelView.defaultPositions.southArrowNorthEast,Pe.BalloonPanelView.defaultPositions.viewportStickyNorth])();function co(e,t){const o=e.plugins.get("ContextualBalloon"),n=e.editing.view.document.selection;let i;"cell"===t?nt(n)&&(i=ho(e)):tt(n)&&(i=uo(e)),i&&o.updatePosition(i)}function uo(e){const t=b(e.model.document.selection),o=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.mapViewToDom(o),positions:ao}}function ho(e){const t=e.editing.mapper,o=e.editing.view.domConverter,n=e.model.document.selection;if(n.rangeCount>1)return{target:()=>function(e,t){const o=t.editing.mapper,n=t.editing.view.domConverter,i=Array.from(e).map((e=>{const t=bo(e.start),i=o.toViewElement(t);return new m.Rect(n.mapViewToDom(i))}));return m.Rect.getBoundingRect(i)}(n.getRanges(),e),positions:ao};const i=bo(n.getFirstPosition()),r=t.toViewElement(i);return{target:o.mapViewToDom(r),positions:ao}}function bo(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}function mo(e){if(!e||!zt(e))return e;const{top:t,right:o,bottom:n,left:i}=e;return t==o&&o==n&&n==i?t:void 0}function go(e,t){const o=parseFloat(e);return Number.isNaN(o)||String(o)!==String(e)?e:`${o}${t}`}function po(e,t={}){const o={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...e};return t.includeAlignmentProperty&&!o.alignment&&(o.alignment="center"),t.includePaddingProperty&&!o.padding&&(o.padding=""),t.includeVerticalAlignmentProperty&&!o.verticalAlignment&&(o.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!o.horizontalAlignment&&(o.horizontalAlignment=t.isRightToLeftContent?"right":"left"),o}const fo={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class wo extends e.Plugin{static get requires(){return[Pe.ContextualBalloon]}static get pluginName(){return"TableCellPropertiesUI"}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:_t,backgroundColors:_t})}init(){const e=this.editor,t=e.t;this._defaultTableCellProperties=po(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(Pe.ContextualBalloon),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",(o=>{const n=new Pe.ButtonView(o);n.set({label:t("Cell properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const i=Object.values(fo).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableCellProperties"),o=(0,Pe.normalizeColorOptions)(t.borderColors),n=(0,Pe.getLocalizedColorOptions)(e.locale,o),i=(0,Pe.normalizeColorOptions)(t.backgroundColors),r=(0,Pe.getLocalizedColorOptions)(e.locale,i),l=!1!==t.colorPicker,s=new Pt(e.locale,{borderColors:n,backgroundColors:r,defaultTableCellProperties:this._defaultTableCellProperties,colorPickerConfig:!!l&&(t.colorPicker||{})}),a=e.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),(0,Pe.clickOutsideHandler)({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=ht(a),d=bt(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableCellBorderColor",errorText:c,validator:mt})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableCellBorderWidth",errorText:d,validator:pt})),s.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:s.paddingInput,commandName:"tableCellPadding",errorText:d,validator:gt})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableCellWidth",errorText:d,validator:gt})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableCellHeight",errorText:d,validator:gt})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableCellBackgroundColor",errorText:c,validator:mt})),s.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),s.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(fo).map((([t,o])=>{const n=this._defaultTableCellProperties[t]||"";return[t,e.get(o).value||n]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:ho(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;nt(e.editing.view.document.selection)?this._isViewVisible&&co(e,"cell"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:i}=e,r=so((()=>{o.errorText=i}),500);return(e,i,l)=>{r.cancel(),this._isReady&&(n(l)?(this.editor.execute(t,{value:l,batch:this._undoStepBatch}),o.errorText=null):r())}}}class _o extends e.Command{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=this.editor,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(e={}){const{value:t,batch:o}=e,n=this.editor.model,i=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(n.document.selection),r=this._getValueToSet(t);n.enqueueChange(o,(e=>{r?i.forEach((t=>e.setAttribute(this.attributeName,r,t))):i.forEach((t=>e.removeAttribute(this.attributeName,t)))}))}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every((e=>this._getAttribute(e)===t))?t:void 0}}class ko extends _o{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=go(e,"px"))!==this._defaultValue)return e}}class vo extends e.Plugin{static get pluginName(){return"TableCellWidthEditing"}static get requires(){return[Re]}init(){const e=this.editor,t=po(e.config.get("table.tableCellProperties.defaultProperties"));h(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:t.width}),e.commands.add("tableCellWidth",new ko(e,t.width))}}class Co extends _o{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=go(e,"px");if(t!==this._defaultValue)return t}}class yo extends _o{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){const t=go(e,"px");if(t!==this._defaultValue)return t}}class Ao extends _o{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}class To extends _o{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class xo extends _o{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class So extends _o{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Vo extends _o{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Ro extends _o{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=go(e,"px");if(t!==this._defaultValue)return t}}const Io=/^(top|middle|bottom)$/,Po=/^(left|center|right|justify)$/;class Eo extends e.Plugin{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[Re,vo]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const n=po(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules(Ke.addBorderRules),function(e,t,o){const n={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};e.extend("tableCell",{allowAttributes:Object.values(n)}),r(t,"td",n,o),r(t,"th",n,o),l(t,{modelElement:"tableCell",modelAttribute:n.style,styleName:"border-style"}),l(t,{modelElement:"tableCell",modelAttribute:n.color,styleName:"border-color"}),l(t,{modelElement:"tableCell",modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableCellBorderStyle",new So(e,n.borderStyle)),e.commands.add("tableCellBorderColor",new Vo(e,n.borderColor)),e.commands.add("tableCellBorderWidth",new Ro(e,n.borderWidth)),h(t,o,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableCellHeight",new yo(e,n.height)),e.data.addStyleProcessorRules(Ke.addPaddingRules),h(t,o,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:n.padding}),e.commands.add("tableCellPadding",new Co(e,n.padding)),e.data.addStyleProcessorRules(Ke.addBackgroundRules),h(t,o,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableCellBackgroundColor",new Ao(e,n.backgroundColor)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:e=>({key:"style",value:{"text-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":Po}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getStyle("text-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:Po}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new xo(e,n.horizontalAlignment)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:e=>({key:"style",value:{"vertical-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":Io}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getStyle("vertical-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:Io}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getAttribute("valign");return t===o?null:t}}})}(t,o,n.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new To(e,n.verticalAlignment))}}class zo extends e.Plugin{static get pluginName(){return"TableCellProperties"}static get requires(){return[Eo,wo]}}class Bo extends e.Command{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=b(this.editor.model.document.selection);this.isEnabled=!!e,this.value=this._getValue(e)}execute(e={}){const t=this.editor.model,o=t.document.selection,{value:n,batch:i}=e,r=b(o),l=this._getValueToSet(n);t.enqueueChange(i,(e=>{l?e.setAttribute(this.attributeName,l,r):e.removeAttribute(this.attributeName,r)}))}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}}class Lo extends Bo{constructor(e,t){super(e,"tableBackgroundColor",t)}}class Fo extends Bo{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Wo extends Bo{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class No extends Bo{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=mo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=go(e,"px");if(t!==this._defaultValue)return t}}class Oo extends Bo{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=go(e,"px"))!==this._defaultValue)return e}}class jo extends Bo{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){if((e=go(e,"px"))!==this._defaultValue)return e}}class Mo extends Bo{constructor(e,t){super(e,"tableAlignment",t)}}const Do=/^(left|center|right)$/,Ho=/^(left|none|right)$/;class Uo extends e.Plugin{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[Re]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const n=po(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});e.data.addStyleProcessorRules(Ke.addBorderRules),function(e,t,o){const n={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};e.extend("table",{allowAttributes:Object.values(n)}),r(t,"table",n,o),s(t,{modelAttribute:n.color,styleName:"border-color"}),s(t,{modelAttribute:n.style,styleName:"border-style"}),s(t,{modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableBorderColor",new Fo(e,n.borderColor)),e.commands.add("tableBorderStyle",new Wo(e,n.borderStyle)),e.commands.add("tableBorderWidth",new No(e,n.borderWidth)),function(e,t,o){e.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:e=>({key:"style",value:{float:"center"===e?"none":e}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:Ho}},model:{key:"tableAlignment",value:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t===o?null:t}}}).attributeToAttribute({view:{attributes:{align:Do}},model:{name:"table",key:"tableAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.alignment),e.commands.add("tableAlignment",new Mo(e,n.alignment)),$o(t,o,{modelAttribute:"tableWidth",styleName:"width",defaultValue:n.width}),e.commands.add("tableWidth",new Oo(e,n.width)),$o(t,o,{modelAttribute:"tableHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableHeight",new jo(e,n.height)),e.data.addStyleProcessorRules(Ke.addBackgroundRules),function(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),i(t,{viewElement:"table",...o}),s(t,o)}(t,o,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableBackgroundColor",new Lo(e,n.backgroundColor))}}function $o(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),i(t,{viewElement:/^(table|figure)$/,shouldUpcast:e=>!("table"==e.name&&"figure"==e.parent.name),...o}),l(t,{modelElement:"table",...o})}var Ko=o(218),Go={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Ko.A,Go);Ko.A.locals;class qo extends Pe.View{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:i,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:l,backgroundInput:s}=this._createBackgroundFields(),{widthInput:a,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{alignmentToolbar:h,alignmentLabel:b}=this._createAlignmentFields();this.focusTracker=new m.FocusTracker,this.keystrokes=new m.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=i,this.backgroundInput=s,this.widthInput=a,this.heightInput=d,this.alignmentToolbar=h;const{saveButtonView:g,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=g,this.cancelButtonView=p,this._focusables=new Pe.ViewCollection,this._focusCycler=new Pe.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Pe.FormHeaderView(e,{label:this.t("Table properties")})),this.children.add(new At(e,{labelView:r,children:[r,o,i,n],class:"ck-table-form__border-row"})),this.children.add(new At(e,{labelView:l,children:[l,s],class:"ck-table-form__background-row"})),this.children.add(new At(e,{children:[new At(e,{labelView:u,children:[u,a,c,d],class:"ck-table-form__dimensions-row"}),new At(e,{labelView:b,children:[b,h],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new At(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,Pe.submitHandler)({view:this}),[this.borderColorInput,this.backgroundInput].forEach((e=>{e.fieldView.focusCycler.on("forwardCycle",(e=>{this._focusCycler.focusNext(),e.stop()})),e.fieldView.focusCycler.on("backwardCycle",(e=>{this._focusCycler.focusPrevious(),e.stop()}))})),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=kt({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,i=this.t,r=i("Style"),l=new Pe.LabelView(n);l.text=i("Border");const s=ut(i),a=new Pe.LabeledFieldView(n,Pe.createLabeledDropdown);a.set({label:r,class:"ck-table-form__border-style"}),a.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),a.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>s[e||"none"])),a.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),a.bind("isEmpty").to(this,"borderStyle",(e=>!e)),(0,Pe.addListToDropdown)(a.fieldView,ft(this,t.style),{role:"menu",ariaLabel:r});const c=new Pe.LabeledFieldView(n,Pe.createLabeledInputText);c.set({label:i("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",Jo),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new Pe.LabeledFieldView(n,o);return d.set({label:i("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",Jo),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,o,n,i)=>{Jo(n)||(this.borderColor="",this.borderWidth=""),Jo(i)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:l,borderStyleDropdown:a,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new Pe.LabelView(e);o.text=t("Background");const n=kt({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),i=new Pe.LabeledFieldView(e,n);return i.set({label:t("Color"),class:"ck-table-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new Pe.LabelView(e);o.text=t("Dimensions");const n=new Pe.LabeledFieldView(e,Pe.createLabeledInputText);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const i=new Pe.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new Pe.LabeledFieldView(e,Pe.createLabeledInputText);return r.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",(()=>{this.height=r.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:i,heightInput:r}}_createAlignmentFields(){const t=this.locale,o=this.t,n=new Pe.LabelView(t);n.text=o("Alignment");const i=new Pe.ToolbarView(t);return i.set({isCompact:!0,ariaLabel:o("Table alignment toolbar")}),wt({view:this,icons:{left:e.icons.objectLeft,center:e.icons.objectCenter,right:e.icons.objectRight},toolbar:i,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:n,alignmentToolbar:i}}_createActionButtons(){const t=this.locale,o=this.t,n=new Pe.ButtonView(t),i=new Pe.ButtonView(t),r=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return n.set({label:o("Save"),icon:e.icons.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(r,"errorText",((...e)=>e.every((e=>!e)))),i.set({label:o("Cancel"),icon:e.icons.cancel,class:"ck-button-cancel",withText:!0}),i.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:i}}get _alignmentLabels(){const e=this.locale,t=this.t,o=t("Align table to the left"),n=t("Center table"),i=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:i,center:n,left:o}:{left:o,center:n,right:i}}}function Jo(e){return"none"!==e}const Xo={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class Yo extends e.Plugin{static get requires(){return[Pe.ContextualBalloon]}static get pluginName(){return"TablePropertiesUI"}constructor(e){super(e),this.view=null,e.config.define("table.tableProperties",{borderColors:_t,backgroundColors:_t})}init(){const e=this.editor,t=e.t;this._defaultTableProperties=po(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(Pe.ContextualBalloon),e.ui.componentFactory.add("tableProperties",(o=>{const n=new Pe.ButtonView(o);n.set({label:t("Table properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const i=Object.values(Xo).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableProperties"),o=(0,Pe.normalizeColorOptions)(t.borderColors),n=(0,Pe.getLocalizedColorOptions)(e.locale,o),i=(0,Pe.normalizeColorOptions)(t.backgroundColors),r=(0,Pe.getLocalizedColorOptions)(e.locale,i),l=!1!==t.colorPicker,s=new qo(e.locale,{borderColors:n,backgroundColors:r,defaultTableProperties:this._defaultTableProperties,colorPickerConfig:!!l&&(t.colorPicker||{})}),a=e.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),(0,Pe.clickOutsideHandler)({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=ht(a),d=bt(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableBorderColor",errorText:c,validator:mt})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableBorderWidth",errorText:d,validator:pt})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableBackgroundColor",errorText:c,validator:mt})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableWidth",errorText:d,validator:gt})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableHeight",errorText:d,validator:gt})),s.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(Xo).map((([t,o])=>{const n=t,i=this._defaultTableProperties[n]||"";return[n,e.get(o).value||i]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:uo(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;tt(e.editing.view.document.selection)?this._isViewVisible&&co(e,"table"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:i}=e,r=so((()=>{o.errorText=i}),500);return(e,i,l)=>{r.cancel(),this._isReady&&(n(l)?(this.editor.execute(t,{value:l,batch:this._undoStepBatch}),o.errorText=null):r())}}}class Qo extends e.Plugin{static get pluginName(){return"TableProperties"}static get requires(){return[Uo,Yo]}}function Zo(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.differ.getChanges();let n=!1;for(const t of o){if("insert"!=t.type)continue;const o=t.position.parent;if(o.is("element","table")||"table"==t.name){const i="table"==t.name?t.position.nodeAfter:o,r=Array.from(i.getChildren()).filter((e=>e.is("element","caption"))),l=r.shift();if(!l)continue;for(const t of r)e.move(e.createRangeIn(t),l,"end"),e.remove(t);l.nextSibling&&(e.move(e.createRangeOn(l),i,"end"),n=!0),n=!!r.length||n}}return n}(t,e)))}function en(e){return!!e&&e.is("element","table")}function tn(e){for(const t of e.getChildren())if(t.is("element","caption"))return t;return null}function on(e){const t=e.parent;return"figcaption"==e.name&&t&&t.is("element","figure")&&t.hasClass("table")||"caption"==e.name&&t&&t.is("element","table")?{name:!0}:null}class nn extends e.Command{refresh(){const e=b(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?this.value=!!tn(e):this.value=!1}execute({focusCaptionOnShow:e=!1}={}){this.editor.model.change((t=>{this.value?this._hideTableCaption(t):this._showTableCaption(t,e)}))}_showTableCaption(e,t){const o=this.editor.model,n=b(o.document.selection),i=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(n)||e.createElement("caption");o.insertContent(i,n,"end"),t&&e.setSelection(i,"in")}_hideTableCaption(e){const t=this.editor.model,o=b(t.document.selection),n=this.editor.plugins.get("TableCaptionEditing"),i=tn(o);n._saveCaption(o,i),t.deleteContent(e.createSelection(i,"on"))}}class rn extends e.Plugin{static get pluginName(){return"TableCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,o=e.model.schema,n=e.editing.view,i=e.t;o.isRegistered("caption")?o.extend("caption",{allowIn:"table"}):o.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new nn(this.editor)),e.conversion.for("upcast").elementToElement({view:on,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>en(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:o})=>{if(!en(e.parent))return null;const r=o.createEditableElement("figcaption");return o.setCustomProperty("tableCaption",!0,r),r.placeholder=i("Enter table caption"),(0,Ke.enablePlaceholder)({view:n,element:r,keepOnFocus:!0}),(0,t.toWidgetEditable)(r,o)}}),Zo(e.model)}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Ke.Element.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}class ln extends e.Plugin{static get pluginName(){return"TableCaptionUI"}init(){const t=this.editor,o=t.editing.view,n=t.t;t.ui.componentFactory.add("toggleTableCaption",(i=>{const r=t.commands.get("toggleTableCaption"),l=new Pe.ButtonView(i);return l.set({icon:e.icons.caption,tooltip:!0,isToggleable:!0}),l.bind("isOn","isEnabled").to(r,"value","isEnabled"),l.bind("label").to(r,"value",(e=>n(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(l,"execute",(()=>{if(t.execute("toggleTableCaption",{focusCaptionOnShow:!0}),r.value){const e=function(e){const t=b(e);return t?tn(t):null}(t.model.document.selection),n=t.editing.mapper.toViewElement(e);if(!n)return;o.scrollToTheSelection(),o.change((e=>{e.addClass("table__caption_highlighted",n)}))}t.editing.view.focus()})),l}))}}var sn=o(175),an={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(sn.A,an);sn.A.locals;class cn extends e.Plugin{static get pluginName(){return"TableCaption"}static get requires(){return[rn,ln]}}const dn=function(){this.__data__=[],this.size=0};const un=function(e,t){return e===t||e!=e&&t!=t};const hn=function(e,t){for(var o=e.length;o--;)if(un(e[o][0],t))return o;return-1};var bn=Array.prototype.splice;const mn=function(e){var t=this.__data__,o=hn(t,e);return!(o<0)&&(o==t.length-1?t.pop():bn.call(t,o,1),--this.size,!0)};const gn=function(e){var t=this.__data__,o=hn(t,e);return o<0?void 0:t[o][1]};const pn=function(e){return hn(this.__data__,e)>-1};const fn=function(e,t){var o=this.__data__,n=hn(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this};function wn(e){var t=-1,o=null==e?0:e.length;for(this.clear();++ts))return!1;var c=r.get(e),d=r.get(t);if(c&&d)return c==t&&d==e;var u=-1,h=!0,b=2&o?new hi:void 0;for(r.set(e,t),r.set(t,e);++u-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991};var Ui={};Ui["[object Float32Array]"]=Ui["[object Float64Array]"]=Ui["[object Int8Array]"]=Ui["[object Int16Array]"]=Ui["[object Int32Array]"]=Ui["[object Uint8Array]"]=Ui["[object Uint8ClampedArray]"]=Ui["[object Uint16Array]"]=Ui["[object Uint32Array]"]=!0,Ui["[object Arguments]"]=Ui["[object Array]"]=Ui["[object ArrayBuffer]"]=Ui["[object Boolean]"]=Ui["[object DataView]"]=Ui["[object Date]"]=Ui["[object Error]"]=Ui["[object Function]"]=Ui["[object Map]"]=Ui["[object Number]"]=Ui["[object Object]"]=Ui["[object RegExp]"]=Ui["[object Set]"]=Ui["[object String]"]=Ui["[object WeakMap]"]=!1;const $i=function(e){return Qt(e)&&Hi(e.length)&&!!Ui[Yt(e)]};const Ki=function(e){return function(t){return e(t)}};var Gi="object"==typeof exports&&exports&&!exports.nodeType&&exports,qi=Gi&&"object"==typeof module&&module&&!module.nodeType&&module,Ji=qi&&qi.exports===Gi&&Bt.process,Xi=function(){try{var e=qi&&qi.require&&qi.require("util").types;return e||Ji&&Ji.binding&&Ji.binding("util")}catch(e){}}();var Yi=Xi&&Xi.isTypedArray;const Qi=Yi?Ki(Yi):$i;var Zi=Object.prototype.hasOwnProperty;const er=function(e,t){var o=yi(e),n=!o&&Li(e),i=!o&&!n&&ji(e),r=!o&&!n&&!i&&Qi(e),l=o||n||i||r,s=l?Ii(e.length,String):[],a=s.length;for(var c in e)!t&&!Zi.call(e,c)||l&&("length"==c||i&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Di(c,a))||s.push(c);return s};var tr=Object.prototype;const or=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||tr)};const nr=function(e,t){return function(o){return e(t(o))}}(Object.keys,Object);var ir=Object.prototype.hasOwnProperty;const rr=function(e){if(!or(e))return nr(e);var t=[];for(var o in Object(e))ir.call(e,o)&&"constructor"!=o&&t.push(o);return t};const lr=function(e){return null!=e&&Hi(e.length)&&!An(e)};const sr=function(e){return lr(e)?er(e):rr(e)};const ar=function(e){return Ai(e,sr,Ri)};var cr=Object.prototype.hasOwnProperty;const dr=function(e,t,o,n,i,r){var l=1&o,s=ar(e),a=s.length;if(a!=ar(t).length&&!l)return!1;for(var c=a;c--;){var d=s[c];if(!(l?d in t:cr.call(t,d)))return!1}var u=r.get(e),h=r.get(t);if(u&&h)return u==t&&h==e;var b=!0;r.set(e,t),r.set(t,e);for(var m=l;++c{r?e.setAttribute("tableWidth",r,n):e.removeAttribute("tableWidth",n);const t=o.get("TableColumnResizeEditing").getColumnGroupElement(n);if(!i&&!t)return;if(!i)return e.remove(t);const l=Z(i);if(t)Array.from(t.getChildren()).forEach(((t,o)=>e.setAttribute("columnWidth",l[o],t)));else{const t=e.createElement("tableColumnGroup");l.forEach((o=>e.appendElement("tableColumn",{columnWidth:o},t))),e.append(t,n)}}))}}function Fr(e){return t=>t.on("element:colgroup",((t,o,n)=>{const i=o.modelCursor.findAncestor("table"),r=oe(i);if(!r)return;const l=ne(r),s=e.getColumns(i);let a=(c=r,d=n.writer,ne(c).reduce(((e,t)=>{const o=t.getAttribute("columnWidth"),n=t.getAttribute("colSpan");if(!n)return e.push(o),e;for(let t=0;ta[t]||"auto")),(a.length!=l.length||a.includes("auto"))&&te(l,r,Z(a),n.writer)}),{priority:"low"})}class Wr extends e.Plugin{static get requires(){return[Re,ie]}static get pluginName(){return"TableColumnResizeEditing"}constructor(e){super(e),this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=new((0,m.DomEmitterMixin)()),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",((t,o,n)=>{const i=n?"removeClass":"addClass";e.editing.view.change((t=>{for(const o of e.editing.view.document.roots)t[i]("ck-column-resize_disabled",e.editing.view.document.getRoot(o.rootName))}))}))}init(){this._extendSchema(),this._registerPostFixer(),this._registerConverters(),this._registerResizingListeners(),this._registerResizerInserter();const e=this.editor,t=e.plugins.get("TableColumnResize");e.plugins.get("TableEditing").registerAdditionalSlot({filter:e=>e.is("element","tableColumnGroup"),positionOffset:0});const o=new Lr(e);e.commands.add("resizeTableWidth",o),e.commands.add("resizeColumnWidths",o),this.bind("_isResizingAllowed").to(e,"isReadOnly",t,"isEnabled",o,"isEnabled",((e,t,o)=>!e&&t&&o))}destroy(){this._domEmitter.stopListening(),super.destroy()}getColumnGroupElement(e){return oe(e)}getTableColumnElements(e){return ne(e)}getTableColumnsWidths(e){return function(e){return ne(e).map((e=>e.getAttribute("columnWidth")))}(e)}_extendSchema(){this.editor.model.schema.extend("table",{allowAttributes:["tableWidth"]}),this.editor.model.schema.register("tableColumnGroup",{allowIn:"table",isLimit:!0}),this.editor.model.schema.register("tableColumn",{allowIn:"tableColumnGroup",allowAttributes:["columnWidth","colSpan"],isLimit:!0})}_registerPostFixer(){const e=this.editor.model;function t(e,t,o){const n=o._tableUtilsPlugin.getColumns(t);if(0===n-e.length)return e;const i=e.map((e=>Number(e.replace("%","")))),r=function(e,t){const o=new Set;for(const n of e.getChanges())if("insert"==n.type&&n.position.nodeAfter&&"tableCell"==n.position.nodeAfter.name&&n.position.nodeAfter.getAncestors().includes(t))o.add(n.position.nodeAfter);else if("remove"==n.type){const e=n.position.nodeBefore||n.position.nodeAfter;"tableCell"==e.name&&e.getAncestors().includes(t)&&o.add(e)}return o}(o.editor.model.document.differ,t);for(const e of r){const r=n-i.length;if(0===r)continue;const s=r>0,a=o._tableUtilsPlugin.getCellLocation(e).column;if(s){const e=G(t,o.editor),n=(l=e,Array(r).fill(l));i.splice(a,0,...n)}else{const e=i.splice(a,Math.abs(r));i[a]+=Q(e)}}var l;return i.map((e=>e+"%"))}e.document.registerPostFixer((o=>{let n=!1;for(const i of function(e){const t=new Set;for(const o of e.document.differ.getChanges()){let n=null;switch(o.type){case"insert":n=["table","tableRow","tableCell"].includes(o.name)?o.position:null;break;case"remove":n=["tableRow","tableCell"].includes(o.name)?o.position:null;break;case"attribute":o.range.start.nodeAfter&&(n=["table","tableRow","tableCell"].includes(o.range.start.nodeAfter.name)?o.range.start:null)}if(!n)continue;const i=n.nodeAfter&&n.nodeAfter.is("element","table")?n.nodeAfter:n.findAncestor("table");for(const o of e.createRangeOn(i).getItems())o.is("element","table")&&oe(o)&&t.add(o)}return t}(e)){const e=this.getColumnGroupElement(i),r=this.getTableColumnElements(e),l=this.getTableColumnsWidths(e);let s=Z(l);s=t(s,i,this),zr(l,s)||(te(r,e,s,o),n=!0)}return n}))}_registerConverters(){const e=this.editor.conversion;e.for("upcast").attributeToAttribute({view:{name:"figure",key:"style",value:{width:/[\s\S]+/}},model:{name:"table",key:"tableWidth",value:e=>e.getStyle("width")}}),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableWidth"},view:e=>({name:"figure",key:"style",value:{width:e}})}),e.elementToElement({model:"tableColumnGroup",view:"colgroup"}),e.elementToElement({model:"tableColumn",view:"col"}),e.for("downcast").add((e=>e.on("insert:table",((e,t,o)=>{const n=o.writer,i=t.item,r=o.mapper.toViewElement(i),l=r.is("element","table")?r:Array.from(r.getChildren()).find((e=>e.is("element","table")));oe(i)?n.addClass("ck-table-resized",l):n.removeClass("ck-table-resized",l)}),{priority:"low"}))),e.for("upcast").add(Fr(this._tableUtilsPlugin)),e.for("upcast").attributeToAttribute({view:{name:"col",styles:{width:/.*/}},model:{key:"columnWidth",value:e=>{const t=e.getStyle("width");return t&&(t.endsWith("%")||t.endsWith("pt"))?t:"auto"}}}),e.for("upcast").attributeToAttribute({view:{name:"col",key:"span"},model:"colSpan"}),e.for("downcast").attributeToAttribute({model:{name:"tableColumn",key:"columnWidth"},view:e=>({key:"style",value:{width:e}})})}_registerResizingListeners(){const e=this.editor.editing.view;e.addObserver(Ge),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),this._domEmitter.listenTo(m.global.window.document,"mousemove",Br(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo(m.global.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_onMouseDownHandler(e,t){const o=t.target;if(!o.hasClass("ck-table-column-resizer"))return;if(!this._isResizingAllowed)return;const n=this.editor,i=n.editing.mapper.toModelElement(o.findAncestor("figure"));if(!n.model.canEditAt(i))return;t.preventDefault(),e.stop();const r=function(e,t,o){const n=Array(t.getColumns(e)),i=new w(e);for(const e of i){const t=o.editing.mapper.toViewElement(e.cell),i=ee(o.editing.view.domConverter.mapViewToDom(t));(!n[e.column]||ie.is("element","colgroup")))||s.change((e=>{!function(e,t,o){const n=e.createContainerElement("colgroup");for(let o=0;ofunction(e,t,o){const n=o.widths.viewFigureWidth/o.widths.viewFigureParentWidth;e.addClass("ck-table-resized",t),e.addClass("ck-table-column-resizer__active",o.elements.viewResizer),e.setStyle("width",`${Y(100*n)}%`,t.findAncestor("figure"))}(e,l,this._resizingData)))}_onMouseMoveHandler(e,t){if(!this._isResizingActive)return;if(!this._isResizingAllowed)return void this._onMouseUpHandler();const{columnPosition:o,flags:{isRightEdge:n,isTableCentered:i,isLtrContent:r},elements:{viewFigure:l,viewLeftColumn:s,viewRightColumn:a},widths:{viewFigureParentWidth:c,tableWidth:d,leftColumnWidth:u,rightColumnWidth:h}}=this._resizingData,b=40-u,m=n?c-d:h-40,g=(r?1:-1)*(n&&i?2:1),p=(f=(t.clientX-o)*g,w=Math.min(b,0),_=Math.max(m,0),Y(f<=w?w:f>=_?_:f));var f,w,_;0!==p&&this.editor.editing.view.change((e=>{const t=Y(100*(u+p)/d);if(e.setStyle("width",`${t}%`,s),n){const t=Y(100*(d+p)/c);e.setStyle("width",`${t}%`,l)}else{const t=Y(100*(h-p)/d);e.setStyle("width",`${t}%`,a)}}))}_onMouseUpHandler(){if(!this._isResizingActive)return;const{viewResizer:e,modelTable:t,viewFigure:o,viewColgroup:n}=this._resizingData.elements,i=this.editor,r=i.editing.view,l=this.getColumnGroupElement(t),s=Array.from(n.getChildren()).filter((e=>e.is("view:element"))),a=l?this.getTableColumnsWidths(l):null,c=s.map((e=>e.getStyle("width"))),d=!zr(a,c),u=t.getAttribute("tableWidth"),h=o.getStyle("width"),b=u!==h;(d||b)&&(this._isResizingAllowed?i.execute("resizeTableWidth",{table:t,tableWidth:`${Y(h)}%`,columnWidths:c}):r.change((e=>{if(a)for(const t of s)e.setStyle("width",a.shift(),t);else e.remove(n);b&&(u?e.setStyle("width",u,o):e.removeStyle("width",o)),a||u||e.removeClass("ck-table-resized",[...o.getChildren()].find((e=>"table"===e.name)))}))),r.change((t=>{t.removeClass("ck-table-column-resizer__active",e)})),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,t){const o=this.editor,n=e.domEvent.clientX,i=e.target,r=i.findAncestor("td")||i.findAncestor("th"),l=o.editing.mapper.toModelElement(r),s=l.findAncestor("table"),a=function(e,t){const o=t.getCellLocation(e).column;return{leftEdge:o,rightEdge:o+(e.getAttribute("colspan")||1)-1}}(l,this._tableUtilsPlugin).rightEdge,c=a===this._tableUtilsPlugin.getColumns(s)-1,d=!s.hasAttribute("tableAlignment"),u="rtl"!==o.locale.contentLanguageDirection,h=r.findAncestor("table"),b=h.findAncestor("figure"),m=[...h.getChildren()].find((e=>e.is("element","colgroup"))),g=m.getChild(a),p=c?void 0:m.getChild(a+1);return{columnPosition:n,flags:{isRightEdge:c,isTableCentered:d,isLtrContent:u},elements:{viewResizer:i,modelTable:s,viewFigure:b,viewColgroup:m,viewLeftColumn:g,viewRightColumn:p},widths:{viewFigureParentWidth:X(o.editing.view.domConverter.mapViewToDom(b.parent)),viewFigureWidth:X(o.editing.view.domConverter.mapViewToDom(b)),tableWidth:q(s,o),leftColumnWidth:t[a],rightColumnWidth:c?void 0:t[a+1]}}}_registerResizerInserter(){this.editor.conversion.for("editingDowncast").add((e=>{e.on("insert:tableCell",((e,t,o)=>{const n=t.item,i=o.mapper.toViewElement(n),r=o.writer;r.insert(r.createPositionAt(i,"end"),r.createUIElement("div",{class:"ck-table-column-resizer"}))}),{priority:"lowest"})}))}}var Nr=o(363),Or={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};xe()(Nr.A,Or);Nr.A.locals;class jr extends e.Plugin{static get requires(){return[Wr,vo]}static get pluginName(){return"TableColumnResize"}}})(),(window.CKEditor5=window.CKEditor5||{}).table=n})(); \ No newline at end of file diff --git a/core/core.libraries.yml b/core/core.libraries.yml index a422013f4cd..88aa25dc50e 100644 --- a/core/core.libraries.yml +++ b/core/core.libraries.yml @@ -19,10 +19,10 @@ internal.backbone: ckeditor5: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: # This file is not aggregated to force the creation of a new aggregate file @@ -36,10 +36,10 @@ ckeditor5: ckeditor5.editorClassic: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/editor-classic/editor-classic.js: { minified: true } @@ -48,10 +48,10 @@ ckeditor5.editorClassic: ckeditor5.editorDecoupled: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/editor-decoupled/editor-decoupled.js: { minified: true } @@ -74,10 +74,10 @@ ckeditor5.essentials: ckeditor5.heading: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/heading/heading.js: { minified: true } @@ -87,10 +87,10 @@ ckeditor5.heading: ckeditor5.basic: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/basic-styles/basic-styles.js: { minified: true } @@ -100,10 +100,10 @@ ckeditor5.basic: ckeditor5.specialCharacters: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/special-characters/special-characters.js: { minified: true } @@ -113,10 +113,10 @@ ckeditor5.specialCharacters: ckeditor5.blockquote: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/block-quote/block-quote.js: { minified: true } @@ -126,10 +126,10 @@ ckeditor5.blockquote: ckeditor5.image: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/image/image.js: { minified: true } @@ -139,10 +139,10 @@ ckeditor5.image: ckeditor5.link: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/link/link.js: { minified: true } @@ -152,10 +152,10 @@ ckeditor5.link: ckeditor5.list: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/list/list.js: { minified: true } @@ -165,10 +165,10 @@ ckeditor5.list: ckeditor5.horizontalLine: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/horizontal-line/horizontal-line.js: { minified: true } @@ -178,10 +178,10 @@ ckeditor5.horizontalLine: ckeditor5.htmlSupport: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/html-support/html-support.js: { minified: true } @@ -191,10 +191,10 @@ ckeditor5.htmlSupport: ckeditor5.alignment: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/alignment/alignment.js: { minified: true } @@ -204,10 +204,10 @@ ckeditor5.alignment: ckeditor5.removeFormat: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/remove-format/remove-format.js: { minified: true } @@ -217,10 +217,10 @@ ckeditor5.removeFormat: ckeditor5.pasteFromOffice: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/paste-from-office/paste-from-office.js: { minified: true } @@ -229,10 +229,10 @@ ckeditor5.pasteFromOffice: ckeditor5.indent: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/indent/indent.js: { minified: true } @@ -242,10 +242,10 @@ ckeditor5.indent: ckeditor5.sourceEditing: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/source-editing/source-editing.js: { minified: true } @@ -255,10 +255,10 @@ ckeditor5.sourceEditing: ckeditor5.table: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/table/table.js: { minified: true } @@ -268,10 +268,10 @@ ckeditor5.table: ckeditor5.language: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/language/language.js: { minified: true } @@ -281,10 +281,10 @@ ckeditor5.language: ckeditor5.codeBlock: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/code-block/code-block.js: { minified: true } @@ -294,7 +294,7 @@ ckeditor5.codeBlock: ckeditor5.showBlocks: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v37.1.0/LICENSE.md @@ -306,10 +306,10 @@ ckeditor5.showBlocks: ckeditor5.style: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/style/style.js: { minified: true } @@ -328,10 +328,10 @@ ckeditor5.translations: ckeditor5.autoformat: remote: https://github.com/ckeditor/ckeditor5 - version: "42.0.0" + version: "42.0.2" license: name: GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.0/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v42.0.2/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/autoformat/autoformat.js: { minified: true } diff --git a/core/package.json b/core/package.json index 33e7ebf10ac..5566a4f8f25 100644 --- a/core/package.json +++ b/core/package.json @@ -33,34 +33,34 @@ "watch:ckeditor5-dev": "yarn watch:ckeditor5 --mode=development" }, "devDependencies": { - "@ckeditor/ckeditor5-alignment": "~42.0.0", - "@ckeditor/ckeditor5-autoformat": "~42.0.0", - "@ckeditor/ckeditor5-basic-styles": "~42.0.0", - "@ckeditor/ckeditor5-block-quote": "~42.0.0", - "@ckeditor/ckeditor5-code-block": "~42.0.0", - "@ckeditor/ckeditor5-editor-classic": "~42.0.0", - "@ckeditor/ckeditor5-editor-decoupled": "~42.0.0", - "@ckeditor/ckeditor5-essentials": "~42.0.0", - "@ckeditor/ckeditor5-heading": "~42.0.0", - "@ckeditor/ckeditor5-horizontal-line": "~42.0.0", - "@ckeditor/ckeditor5-html-support": "~42.0.0", - "@ckeditor/ckeditor5-image": "~42.0.0", - "@ckeditor/ckeditor5-indent": "~42.0.0", - "@ckeditor/ckeditor5-language": "~42.0.0", - "@ckeditor/ckeditor5-link": "~42.0.0", - "@ckeditor/ckeditor5-list": "~42.0.0", - "@ckeditor/ckeditor5-paste-from-office": "~42.0.0", - "@ckeditor/ckeditor5-remove-format": "~42.0.0", - "@ckeditor/ckeditor5-show-blocks": "~42.0.0", - "@ckeditor/ckeditor5-source-editing": "~42.0.0", - "@ckeditor/ckeditor5-special-characters": "~42.0.0", - "@ckeditor/ckeditor5-style": "~42.0.0", - "@ckeditor/ckeditor5-table": "~42.0.0", + "@ckeditor/ckeditor5-alignment": "~42.0.2", + "@ckeditor/ckeditor5-autoformat": "~42.0.2", + "@ckeditor/ckeditor5-basic-styles": "~42.0.2", + "@ckeditor/ckeditor5-block-quote": "~42.0.2", + "@ckeditor/ckeditor5-code-block": "~42.0.2", + "@ckeditor/ckeditor5-editor-classic": "~42.0.2", + "@ckeditor/ckeditor5-editor-decoupled": "~42.0.2", + "@ckeditor/ckeditor5-essentials": "~42.0.2", + "@ckeditor/ckeditor5-heading": "~42.0.2", + "@ckeditor/ckeditor5-horizontal-line": "~42.0.2", + "@ckeditor/ckeditor5-html-support": "~42.0.2", + "@ckeditor/ckeditor5-image": "~42.0.2", + "@ckeditor/ckeditor5-indent": "~42.0.2", + "@ckeditor/ckeditor5-language": "~42.0.2", + "@ckeditor/ckeditor5-link": "~42.0.2", + "@ckeditor/ckeditor5-list": "~42.0.2", + "@ckeditor/ckeditor5-paste-from-office": "~42.0.2", + "@ckeditor/ckeditor5-remove-format": "~42.0.2", + "@ckeditor/ckeditor5-show-blocks": "~42.0.2", + "@ckeditor/ckeditor5-source-editing": "~42.0.2", + "@ckeditor/ckeditor5-special-characters": "~42.0.2", + "@ckeditor/ckeditor5-style": "~42.0.2", + "@ckeditor/ckeditor5-table": "~42.0.2", "@drupal/once": "^1.0.1", "@floating-ui/dom": "^1.6.7", "backbone": "^1.6.0", "chokidar": "^3.6.0", - "ckeditor5": "~42.0.0", + "ckeditor5": "~42.0.2", "cspell": "^8.10.4", "dotenv": "^16.4.5", "dotenv-safe": "^9.1.0", diff --git a/core/yarn.lock b/core/yarn.lock index cd325a706ee..75a0a17f734 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -40,575 +40,743 @@ __metadata: languageName: node linkType: hard -"@ckeditor/ckeditor5-adapter-ckfinder@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-adapter-ckfinder@npm:42.0.0" +"@ckeditor/ckeditor5-adapter-ckfinder@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-adapter-ckfinder@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/c1dc9c39a7f1f2f31a928513abc6269aa382f6e0d0575316168e81f87313b15cb0d041bd6c9ad1a9088ed889b50afd9a3afd999d4d3a7aa4dbb83a8dd1410444 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-upload": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/92b1623365519ba8ae501562fba7d3969c333f2d10f83f7ba5c99cfdff4f19f323918c4e3627a6542afc025d51640689bbad7aef01a9fb9986301d3366c2bc96 languageName: node linkType: hard -"@ckeditor/ckeditor5-alignment@npm:42.0.0, @ckeditor/ckeditor5-alignment@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-alignment@npm:42.0.0" +"@ckeditor/ckeditor5-alignment@npm:42.0.2, @ckeditor/ckeditor5-alignment@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-alignment@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/8396268b60511b3ba47617c07e9b33728185228e74819264461e8b1edb63951558e272efc203ff06529203eda31c2a1800ed19a818e12cc7d74f7a6d6e374583 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/5f679d43b16b049c5fbf6e8dbbdc7601ab6d132e845e23f111ebd22f5df63381d22f324e1aaaa0fb370deb1a07374ba25b439924cd0f3fa4ca76938bc4c643f3 languageName: node linkType: hard -"@ckeditor/ckeditor5-autoformat@npm:42.0.0, @ckeditor/ckeditor5-autoformat@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-autoformat@npm:42.0.0" +"@ckeditor/ckeditor5-autoformat@npm:42.0.2, @ckeditor/ckeditor5-autoformat@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-autoformat@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/2f9bfb30a7ffaecea8b568e1aca0e3c57450ed7bf0a31f9285156f4051f66740e78756a7adec0083043dd99a4368741ba402af9fb3e70c31c7ffb787ea2fd762 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/af67645511ff595be30cbb64b2d8ab90201890353827236f1b9a7c7aadf858ddf19fc4ace559f78d8168b726d811e1fe30fcf72bb20ffd581fa69b9087af2c2e languageName: node linkType: hard -"@ckeditor/ckeditor5-autosave@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-autosave@npm:42.0.0" +"@ckeditor/ckeditor5-autosave@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-autosave@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/2e0b280280f0a67f06145b32b425396e3698b49fc7325c6e76a3b53359cbcc2e22180c55c06bc56185427d49d0ff374f41aee37d6e3629db7ebaaa084577df64 + checksum: 10c0/8e1afc80150fe43ce98d87f2e831b292028923aa6f613d21f64cebc1a7b81b13b376f5ed6d8e7717a589809740e5f5e88de8c02f6604bd45cca13a395a6560df languageName: node linkType: hard -"@ckeditor/ckeditor5-basic-styles@npm:42.0.0, @ckeditor/ckeditor5-basic-styles@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-basic-styles@npm:42.0.0" +"@ckeditor/ckeditor5-basic-styles@npm:42.0.2, @ckeditor/ckeditor5-basic-styles@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-basic-styles@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/f5f826f1edeca57d969fb94326aca6567cd2addc094a90f8771789bdc1363025077e957815968ce13ea3ce30388c1506e62dad07500936e80491e8cd9ff3c086 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/7c0af0efb6e18a44b5094618de04495d2d35b4c0bd70de1b5d3c8c10ec1710eecf30808c19b3c7f88a54f5ac869f31e8906394da68ae5bb07364221fcecae077 languageName: node linkType: hard -"@ckeditor/ckeditor5-block-quote@npm:42.0.0, @ckeditor/ckeditor5-block-quote@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-block-quote@npm:42.0.0" +"@ckeditor/ckeditor5-block-quote@npm:42.0.2, @ckeditor/ckeditor5-block-quote@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-block-quote@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/2693360d2dd923817e406f32e37f153f76dc2f861f3613dadbcc26853cbc0c05cd879c62e928cce5171eb4743881463824414940c44efe51e897c11325157596 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-enter": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/47d7d62fca2b68e25384e3985fda55d2f44126ffbf73b18393c343b7d20c2d9f657b200136cf37eb310b6c69713985fc33dee93d5aef0182e7891dc7fc9359d1 languageName: node linkType: hard -"@ckeditor/ckeditor5-ckbox@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-ckbox@npm:42.0.0" +"@ckeditor/ckeditor5-ckbox@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-ckbox@npm:42.0.2" dependencies: + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-upload": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" blurhash: "npm:2.0.5" - ckeditor5: "npm:42.0.0" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/9a9f5e8e9eb1523a6eaf1bbe05090b0ea0248232847ec0fb1693ec78996df213934d9bccaa848ee6187d492fd86cc91ce017e85ece3b1d0aec6a5d974b42a7f8 + checksum: 10c0/5c89374078ee9ff88dce5e27a9d4760690fcaeb64e728fd37fef09da8499031dac42729130988aa226e81f1d25eb9f2e4653c9a82a8a8547f609e59be9de9b30 languageName: node linkType: hard -"@ckeditor/ckeditor5-ckfinder@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-ckfinder@npm:42.0.0" +"@ckeditor/ckeditor5-ckfinder@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-ckfinder@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/e28371daceb7d8c111de15278d53b7a66aafdb1956f10f11cbae20ffe0b339de8637816ffb569537e34166fc86e72a67bc4b30998f508e5dd0619958d5f9f45c + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/5f0e33df3c47a9a659f4876563c1c85bc914132a1827a5a7df436399135e192714cbab8793954ea468e6d4f6f06c22614f0e5abd37dd82ad9e420d33d5878d35 languageName: node linkType: hard -"@ckeditor/ckeditor5-clipboard@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-clipboard@npm:42.0.0" +"@ckeditor/ckeditor5-clipboard@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-clipboard@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-core": "npm:42.0.0" - "@ckeditor/ckeditor5-engine": "npm:42.0.0" - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - "@ckeditor/ckeditor5-utils": "npm:42.0.0" - "@ckeditor/ckeditor5-widget": "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + "@ckeditor/ckeditor5-widget": "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/5d2c2706afd115a1279e0981602a753c195108b934009aece7987d9fac0a36b00ebfe2e68fdfc404dbdf82751d1838386a82105480c0c9c39236fe5e4d227ae1 + checksum: 10c0/3bbea17805619067eb31b840b9f4185c5820a101519a6f604ec9a991e32b2e35afa3b0a8336be959efc4a624de4f2f7e088d4cece1f56c7551d79feea92d1799 languageName: node linkType: hard -"@ckeditor/ckeditor5-cloud-services@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-cloud-services@npm:42.0.0" +"@ckeditor/ckeditor5-cloud-services@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-cloud-services@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/a50deba49524213bd2b36e33f94308509c509a4c250302df759dda4932f74301f34714543b0762e2ee8297bcbac6f7273df3b31a36f08a3df631cfe6cca794ce + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/6da76ef8a1c7d33ff759bc193fd937fe7f7a61a0ef8c2d4a32d5850447bfd1bb0f3c6c7d9958cf167d5d5d810ed7bad7f9e452b4f406e9ddf75b4158cf53d1e7 languageName: node linkType: hard -"@ckeditor/ckeditor5-code-block@npm:42.0.0, @ckeditor/ckeditor5-code-block@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-code-block@npm:42.0.0" +"@ckeditor/ckeditor5-code-block@npm:42.0.2, @ckeditor/ckeditor5-code-block@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-code-block@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-enter": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/cf3b6de53f8300ee6d00f22f26b0cf83d5126f9d5cfaeaa7ace069471e67be06d77f2a5bfa617c4a9c8e1995888013c50785bb7f2ede5e0debebdbd4b3b43e1e + checksum: 10c0/266725710a9f03f317f90f96e4c8950a0141f1e5cc8bbb9ee37440852f7f4da0228b4dd469ca0fa5fe07d992e09582f7980da533b7c4cbdb29737b26f2dd3809 languageName: node linkType: hard -"@ckeditor/ckeditor5-core@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-core@npm:42.0.0" +"@ckeditor/ckeditor5-core@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-core@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-engine": "npm:42.0.0" - "@ckeditor/ckeditor5-utils": "npm:42.0.0" - "@ckeditor/ckeditor5-watchdog": "npm:42.0.0" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + "@ckeditor/ckeditor5-watchdog": "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/aa14f45cebf1cacb616d48319541e460e3569dac9b4be1e51883fb4c55d22f771813fdc20010d72b3d2b111901ddf56c9991cee2268edeab7f83792f7d2868bc + checksum: 10c0/e704b8a8c4b8a290dcc4d2d4b0cecc10cd14761942595b4ca7ecc42a561e593f3b4e07a8e2ff6c8920ced6ae2cb6952bcfaf51c59aa391755037b465b2a75c7f languageName: node linkType: hard -"@ckeditor/ckeditor5-easy-image@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-easy-image@npm:42.0.0" +"@ckeditor/ckeditor5-easy-image@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-easy-image@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/09ad4f9602a9c56dc04454c375a477effcec830950dea40499d5c17353582f49e09a1746ca2e355e316a160846f259d6f2658b8f942219cb3e0a802ade1c8b78 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-upload": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/db6a4bf5ac39690e4bbc41dadf2e353746e0710d239e71db38613f482acfcf905986341d7f249baabf6af13ef4c6b49447173ed5f13675f23e14d031a9cb4c01 languageName: node linkType: hard -"@ckeditor/ckeditor5-editor-balloon@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-editor-balloon@npm:42.0.0" +"@ckeditor/ckeditor5-editor-balloon@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-editor-balloon@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/0034b266e107a76d6a66fa85905de75f64d34853896508d76aa8382a0faae2b92392055892703ce8340ee6cde1f6c754053cdd79c2f17615bca93abe83760e86 + checksum: 10c0/67b56e4378009127f1a1c151da1f93a0aea668b1eef086d6ce741dfce7c97a23f354604dc3bb1d9b581c98be050baf36347a2819f0f4b2408457ad2197c936b6 languageName: node linkType: hard -"@ckeditor/ckeditor5-editor-classic@npm:42.0.0, @ckeditor/ckeditor5-editor-classic@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-editor-classic@npm:42.0.0" +"@ckeditor/ckeditor5-editor-classic@npm:42.0.2, @ckeditor/ckeditor5-editor-classic@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-editor-classic@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/0e109758a82068b5c153104d3618649e742bd78aa05186748cc8be8c8e6346e0c57ac9f6313531572c23127beed7e1bfdbfbb744444e90be859ea52679c19b0d + checksum: 10c0/502092f651504724c73cf03cc001660fef662938238f3caa62e6ba5386d53d9d37da50b3d07df94bc418afb39a11630e08f83b6872eb6917c210975043278462 languageName: node linkType: hard -"@ckeditor/ckeditor5-editor-decoupled@npm:42.0.0, @ckeditor/ckeditor5-editor-decoupled@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-editor-decoupled@npm:42.0.0" +"@ckeditor/ckeditor5-editor-decoupled@npm:42.0.2, @ckeditor/ckeditor5-editor-decoupled@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-editor-decoupled@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/087c9f383e5f56b554c75faa0813b12dfad97cf85f403570f40e6d777a7e171af11d8b82b59cc3d475044f70259b5290732be45fc76ae6d935142d3124806945 + checksum: 10c0/341d2dc14796ba02c6d3a6a3cbb6ec02fcc5c02f7d47eccb580169b4d9e7a8fd277735db04695a63b2e7b7c9b93dd1d93e675d8f4b82f6a9be986a100aaed788 languageName: node linkType: hard -"@ckeditor/ckeditor5-editor-inline@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-editor-inline@npm:42.0.0" +"@ckeditor/ckeditor5-editor-inline@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-editor-inline@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/f0c5478f17bdc33ba09f2b8f3f0c0c84b72535297c36d3eb4a9dcb992905034355779215db3406b9417bc4b33fbbac1d1ac53cb3dcff31939b7f23ff4586d6ec + checksum: 10c0/be131dbf9b166673ea7d2a55325aa6efd4df42f5f8d9efcd781965ed1a8a94221f024d1f5fa0c8eeaf0403c66009557181929620e3b32150d75ff5e62559ab9b languageName: node linkType: hard -"@ckeditor/ckeditor5-editor-multi-root@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-editor-multi-root@npm:42.0.0" +"@ckeditor/ckeditor5-editor-multi-root@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-editor-multi-root@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/294f14412f2714b27f410cb74e54b69acf6b2230a2a13436ffb6aa570bd279268ceb72e66ef52c040a7be1dfa85a0188954c026e70bc3023264ad1ffcc3ee6a1 + checksum: 10c0/6c66e5aab86668fd92cfb8cea20ad39160b22e647da253e57aa8eb26b1aac26b5bc9bf9230cd89696f6f8bfad5df879c08f03ecabb7e56c91aa34e60dd5a0c7c languageName: node linkType: hard -"@ckeditor/ckeditor5-engine@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-engine@npm:42.0.0" +"@ckeditor/ckeditor5-engine@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-engine@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-utils": "npm:42.0.0" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/cef11cc95bcbd72dd8f45f995120190cbc809599dcc09b5dce111d9ae7eaaa01d6457caa815162c6d09b7ed5d6719502e8d85a41a0dabffccf526fe36be66a4f + checksum: 10c0/035d6bcf581c92ef660bb3ac176c6807968384626a9523e244564b98507d635771ccaa17d3a3514639c06e57a92f3e3415e6c81c0ae5acbbe4e6b5208422608f languageName: node linkType: hard -"@ckeditor/ckeditor5-enter@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-enter@npm:42.0.0" +"@ckeditor/ckeditor5-enter@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-enter@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-core": "npm:42.0.0" - "@ckeditor/ckeditor5-engine": "npm:42.0.0" - "@ckeditor/ckeditor5-utils": "npm:42.0.0" - checksum: 10c0/d34960645ee48c8d712d6fed5bb4908c03ad99d9e8d131dc27e923204424c5f139a245a0500950558e424189d7f315597ef547a2b9c14816e62cd5d8f1b20a2c + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + checksum: 10c0/3616efe1f4143af314272a7b3337c98331b102ab8485a4b69928fdb722ee04f2f2c8267f15d39222cfd634eda85a456dcac4386ac8d03fd0b7ea14c89b46dde7 languageName: node linkType: hard -"@ckeditor/ckeditor5-essentials@npm:42.0.0, @ckeditor/ckeditor5-essentials@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-essentials@npm:42.0.0" +"@ckeditor/ckeditor5-essentials@npm:42.0.2, @ckeditor/ckeditor5-essentials@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-essentials@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/6a3de433f5636dfdfeb963ba41ade7f9e1e33285d925496ecc7de88a93be0d25a3437b1c233abd9d19eb0e577739eab87880afe794d29c0e93feb005a244e4ae + "@ckeditor/ckeditor5-clipboard": "npm:42.0.2" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-enter": "npm:42.0.2" + "@ckeditor/ckeditor5-select-all": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-undo": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/5f22a5a4cda6d962a9f69f7da64c0a5848903ca9dfe937325a5c0b6634c446988c1d31711f3325d500af9ec21d9e9846a75f3ebdfd4978c57c73dd69455666c1 languageName: node linkType: hard -"@ckeditor/ckeditor5-find-and-replace@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-find-and-replace@npm:42.0.0" +"@ckeditor/ckeditor5-find-and-replace@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-find-and-replace@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/078b795d9f2d1630c3949c15586df0f55294e0933b5ce92b5404def380e71935f27ccf34321d7ce8847ea415a8e86cb1a959ee076939c80aa86794c22d45c0cb + checksum: 10c0/d8dc6b8e05d3f1b75069d5c805bc2719da4f34dc2e8fe166e518c2a736fb55ce5c6146cbb9b42de833cd0ddcb8bd1629263263a87fb234d70d57f628df2e36c9 languageName: node linkType: hard -"@ckeditor/ckeditor5-font@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-font@npm:42.0.0" +"@ckeditor/ckeditor5-font@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-font@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/e5d918f37e0e2d6c7999e7714a2802b69c78f9b04940e55db218d6a16b66d2e1edf9e2c481ecdc7877cab45380267cb980d931c62dd8068b3c93298cabd126e9 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/a69c96f5034a74ed01bd92b8d5eba04e935e1eded64d99c2b408d5f6d6bdb707d2ccfecce9db11450c7b70c4f3948c1720854f9d097543202246e72625ec6400 languageName: node linkType: hard -"@ckeditor/ckeditor5-heading@npm:42.0.0, @ckeditor/ckeditor5-heading@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-heading@npm:42.0.0" +"@ckeditor/ckeditor5-heading@npm:42.0.2, @ckeditor/ckeditor5-heading@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-heading@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/6db946b0d7cc5f4cd3754484e7edd81454a0d8a4f36c63b225e710c5854770a57c062a39714d487c46728b2b4a2554393ce9cc5264574b24e6b081b476c74845 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-paragraph": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/74de97d9d2a7baca03c787f0d1dffa1d32beda782133f0645812133fac4bd75cdffa4a404dad7385c404fd564843b7d88ab75f782f2d233865ec652d6778e153 languageName: node linkType: hard -"@ckeditor/ckeditor5-highlight@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-highlight@npm:42.0.0" +"@ckeditor/ckeditor5-highlight@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-highlight@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/cc95b3c6bae1d5871ac71dbd3a979e30586af95ea8df9ce9b1ea6757485761a3dbe626a239f6a649af5b0734d1bfca82a6969539e71e97605a7c5cf6e6b3567a + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/dcd6d6621bad61903338cdb0a61e9e77c3a97f4349c0a01b862f7f1ed80d44a9e8136a9a37f31ab235dcda8d6f75be81157932663198b2cffceb3c3400866355 languageName: node linkType: hard -"@ckeditor/ckeditor5-horizontal-line@npm:42.0.0, @ckeditor/ckeditor5-horizontal-line@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-horizontal-line@npm:42.0.0" +"@ckeditor/ckeditor5-horizontal-line@npm:42.0.2, @ckeditor/ckeditor5-horizontal-line@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-horizontal-line@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/d4ae0e4fa07c335bcbe43553dfba3d5af5af4046a95819c1c2a38789f8132a7c11d09ee1277bbe18d19fe4c4f898eeaecfb49614edc05c0f01fac45e380023fb + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-widget": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/afca9eb4800ab57c86deb4d43e3577b84a9d1ad87122d69de6328b392f60dc72d2698b19c0d06b9ef1f9d3a9457012f2f6ed3c1039773911cb6797e39394580d languageName: node linkType: hard -"@ckeditor/ckeditor5-html-embed@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-html-embed@npm:42.0.0" +"@ckeditor/ckeditor5-html-embed@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-html-embed@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/6b571d56edd2b790da89dd6755aaa2f64fca61761aaa8f76c8c03974b8f55ede20487c7df6865a0b23eb7dd7e0cec36f2ba5ae3c847cd107237344b70ab784f3 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + "@ckeditor/ckeditor5-widget": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/4ec48bc8d7669a7299b84c2077d6ca62d45284998c4714761dd9b57ccc202c09defb0b934ac8d7a74be018aa6236daa6d008cfbc427723e32f83c6da7a949bf3 languageName: node linkType: hard -"@ckeditor/ckeditor5-html-support@npm:42.0.0, @ckeditor/ckeditor5-html-support@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-html-support@npm:42.0.0" +"@ckeditor/ckeditor5-html-support@npm:42.0.2, @ckeditor/ckeditor5-html-support@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-html-support@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-enter": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + "@ckeditor/ckeditor5-widget": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/33c73a7cf30c94d62e1ba457c1f4f512a22c4c43440ecf997be5c8ba8c34ddc9811a66221b827eb3621bbd2837badecf7f94dc544c377086bfdfdd225e68fa91 + checksum: 10c0/8d0d5a9c31ab07582268c824996f14f6db6f55bb1926c5169907f0c071c2aa033f8fb315b45c4a38170052d5aae750e4e170eb3b69211ee66f03a3440ff115d6 languageName: node linkType: hard -"@ckeditor/ckeditor5-image@npm:42.0.0, @ckeditor/ckeditor5-image@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-image@npm:42.0.0" +"@ckeditor/ckeditor5-image@npm:42.0.2, @ckeditor/ckeditor5-image@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-image@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-clipboard": "npm:42.0.2" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-undo": "npm:42.0.2" + "@ckeditor/ckeditor5-upload": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + "@ckeditor/ckeditor5-widget": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/f58e70124844c39f6c9375698c7ae7bbb0617c3c9d276d3dde21fddf1e813df558908a0e0fdef59f48f6df4b7b32dac3b57ee513141ec152ff9b8a732450381d + checksum: 10c0/5351f6626fe5362465e39ed6eec920c0fc61a1e2ad8450680ee9fd1211d65e4459af4d59495bbbd1e43ad3d3bf48782339d778aa27fd52e079b1a05158a4144b languageName: node linkType: hard -"@ckeditor/ckeditor5-indent@npm:42.0.0, @ckeditor/ckeditor5-indent@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-indent@npm:42.0.0" +"@ckeditor/ckeditor5-indent@npm:42.0.2, @ckeditor/ckeditor5-indent@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-indent@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/a535104ce5880205d4f365aa5aeca3dc45295263673614bcf2c04b9c1ea51eb836f5dd865c5e977ba9984140c02f1b9ff7968362eb638434e54944e14ef7dc8d + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/4c2661ab3e51c02a40fbb453f3d9efb6d582ec1e64ab99d49200665c5aaad1b78b74e46c3bf83fb61c280c56830f828a35ba01a48a4ea8256f60bd267c912baa languageName: node linkType: hard -"@ckeditor/ckeditor5-language@npm:42.0.0, @ckeditor/ckeditor5-language@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-language@npm:42.0.0" +"@ckeditor/ckeditor5-language@npm:42.0.2, @ckeditor/ckeditor5-language@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-language@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/a8c2285e290c4e8ed5a45299244bda89fedea662133f4dd507effa88312755357f087bddfe332cdbdb3e2e63925da2a0797e7817ce5877e76fb3ff0d43160607 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/74ba9e4cfa3d9c7ebea828810cb4480717a05b8aaf89c78a3659aaaec2e266d1726ed24933efc1f3dc44a24436d677115a6975f052aeba88ed74be0158ba8bf9 languageName: node linkType: hard -"@ckeditor/ckeditor5-link@npm:42.0.0, @ckeditor/ckeditor5-link@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-link@npm:42.0.0" +"@ckeditor/ckeditor5-link@npm:42.0.2, @ckeditor/ckeditor5-link@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-link@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-clipboard": "npm:42.0.2" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + "@ckeditor/ckeditor5-widget": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/7c4bf3618e97eabcd41ab47d8918c6315a7bfb83e25752773e7072aaf2583026486cb8fa15a2953c97c59d7e41cfdd9737b9840f7568a71a4334cb51d63a166c + checksum: 10c0/8b6e3b3ef338034579af6b0fa98e536c4ea31f805a6ee38d18c71a71ab06e5c9ceca4cffe143c1138503eeb0eb87a32acd5e758d58501aa4a4d18042cb1abe33 languageName: node linkType: hard -"@ckeditor/ckeditor5-list@npm:42.0.0, @ckeditor/ckeditor5-list@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-list@npm:42.0.0" +"@ckeditor/ckeditor5-list@npm:42.0.2, @ckeditor/ckeditor5-list@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-list@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/7841aa9fce11f2882c87e04c4f5db1a86e1407f9419212023a4139188290573e813ee8addd9b50c3cf711b6e8b72f91d77fc7958663baa63823e8d493c9d2e54 + "@ckeditor/ckeditor5-clipboard": "npm:42.0.2" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-enter": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/5944663e86c762cdf3e9da187be6cf3dcfe3223119496ba5d5582a48a1fcc4e477771935aacdd8bf6899d0f1c8dd6d9b0d19552eb93d139725a0621cc142855c languageName: node linkType: hard -"@ckeditor/ckeditor5-markdown-gfm@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-markdown-gfm@npm:42.0.0" +"@ckeditor/ckeditor5-markdown-gfm@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-markdown-gfm@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-clipboard": "npm:42.0.2" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + ckeditor5: "npm:42.0.2" marked: "npm:4.0.12" turndown: "npm:7.2.0" turndown-plugin-gfm: "npm:1.0.2" - checksum: 10c0/1ad07ecaf7034eeb9947c1c7a88fc8812b4ba0dd761224d6661a9355fbadb945515878052e6668fe8c99a1a677a199bed49cc4dd240bd4b3523d7f29844b2862 + checksum: 10c0/e5990f11a2bb5ef11581e344cb5704514ce10aba42e1a0a31af3591d41601bde9336fdf578f630717645427ed1ecf418f360fd5d7334c7783fe38c3e9d7f6389 languageName: node linkType: hard -"@ckeditor/ckeditor5-media-embed@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-media-embed@npm:42.0.0" +"@ckeditor/ckeditor5-media-embed@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-media-embed@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - ckeditor5: "npm:42.0.0" - checksum: 10c0/9ef0fa93da348b01930432b7ee81f4c2252c472b64892b988fc5a9cef6c68d6acd15a900263cfb908e95fc42072b4b8417725fe18666ec34482d36bfd2b2b1f8 + "@ckeditor/ckeditor5-clipboard": "npm:42.0.2" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-undo": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + "@ckeditor/ckeditor5-widget": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/b4a96c197dceb517f1a45acd0e77920d11e6f330e48dca127dce05129f3912330c753259d6e6b8c6cb1c700facfdc14e6edaef4933d793f77dc379c58b39f10e languageName: node linkType: hard -"@ckeditor/ckeditor5-mention@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-mention@npm:42.0.0" +"@ckeditor/ckeditor5-mention@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-mention@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/fa3929463ec2258f5e3dae4125e385db3e561f068316f111a88c820823fa73d16a35425b5eb8f06130cb3145dcaa89725bd504f47edd7878de176a572fdc4b35 + checksum: 10c0/e4c6e3bcd096d288553ea2c3afd5a1f206f0be3e8850223908642b6dec27b9a3fc316ab3529b6280d91701a011d2e3d07b1238b525219bdca9d768936c29acc2 languageName: node linkType: hard -"@ckeditor/ckeditor5-minimap@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-minimap@npm:42.0.0" +"@ckeditor/ckeditor5-minimap@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-minimap@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/9766408bda6c27147af78dad3d2fea60d64c939a0100e2a633c8fa1a6d6957bfc54ea1dd18eef709ec08896d4788345b9150a695e014b41886bfca2a65305f81 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/41fd44a02aeb24120b9a3db0b5b6ec670bb00a6fa9911ef1233b3385b95b90f664de5ad8747ae6b84affe7d9e636c810a305c7c3a02ef68cd9c72644da3254d3 languageName: node linkType: hard -"@ckeditor/ckeditor5-page-break@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-page-break@npm:42.0.0" +"@ckeditor/ckeditor5-page-break@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-page-break@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/9de4bfab68974a9beec22541ab5d18b613d1dc8bc0e5437ae3a83b4522456ce8cdd7193e95511821e92a663eb8a96a561af8078e97c9027bf3538c7a39aefc58 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-widget": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/e2be07890e34a699230a97ad6d6fe61274b2561188c31699e4e6961093ebe93b9c2c3b13db157e97fbbf3ab9215c62ecc92c615613402cc6f1590e1bc2eb6b73 languageName: node linkType: hard -"@ckeditor/ckeditor5-paragraph@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-paragraph@npm:42.0.0" +"@ckeditor/ckeditor5-paragraph@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-paragraph@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-core": "npm:42.0.0" - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - "@ckeditor/ckeditor5-utils": "npm:42.0.0" - checksum: 10c0/d76c55e6b88278384c6e869da5b16ed616f535611e3c3af72611150f2be272ec163a818af9eae56978a4f0a692e2abdb32e45f85d6e6002c0cb1d536dcb59d15 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + checksum: 10c0/2d8c08690b9e4e1ff222d6f64dfa78f94903d37119b3fd2f8ae5c8e87c8e578c79be4e0c576a5765b2c31172a91cb1950cd24ea8256acb10226879416b7b112a languageName: node linkType: hard -"@ckeditor/ckeditor5-paste-from-office@npm:42.0.0, @ckeditor/ckeditor5-paste-from-office@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-paste-from-office@npm:42.0.0" +"@ckeditor/ckeditor5-paste-from-office@npm:42.0.2, @ckeditor/ckeditor5-paste-from-office@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-paste-from-office@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/f5b4f01f1a36e7dc091347633a6059019abdcd1388036d56a35a4cb202f5ba26a95078061253a68ee494dbf4d5d0ab9f1270062c24e1b959c5ed7375ddb55160 + "@ckeditor/ckeditor5-clipboard": "npm:42.0.2" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/dde3774a1d40c39962617142bdf0c2fa62089e8c877c5b508e8dc96bb93272ec292400ecdfbbeaae09d03447cf9ce7434fe2b0d5be9f454910fa7639270490f8 languageName: node linkType: hard -"@ckeditor/ckeditor5-remove-format@npm:42.0.0, @ckeditor/ckeditor5-remove-format@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-remove-format@npm:42.0.0" +"@ckeditor/ckeditor5-remove-format@npm:42.0.2, @ckeditor/ckeditor5-remove-format@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-remove-format@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/d92bc412d169c3c4f71bac0854a30b04ccd3291602bcaea02e83dcbac3575c06ea3ad56528031b0cc887d87c10d1cbc8dcdd4baec9bc220f052a247fcfa36a63 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/f9a347a3c245dd1ca1d51ae9e97af52a2a401fcdd026383f7a0a2638f21da498ebde95905ed53bf5805476eab40fa6af423f85b0b3df79d9f3b8e3f4535a327c languageName: node linkType: hard -"@ckeditor/ckeditor5-restricted-editing@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-restricted-editing@npm:42.0.0" +"@ckeditor/ckeditor5-restricted-editing@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-restricted-editing@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/f2a9f3534014720a1e024eeaf729ab19837c2cfeefba8dfb4a397fe61c5f7926415976d7e53673f4639ca1032c7ae1bea4921cc069a1ab5db0a1a296df239c66 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/7cd823eb1be174d29db5c16d93e3a4c25b6f3c92322a673d12d82d50f6178adba0d8d7b7f00cd4211456ed2e233beb577f5e9edc89daa1ed3fd84c1049952991 languageName: node linkType: hard -"@ckeditor/ckeditor5-select-all@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-select-all@npm:42.0.0" +"@ckeditor/ckeditor5-select-all@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-select-all@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-core": "npm:42.0.0" - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - "@ckeditor/ckeditor5-utils": "npm:42.0.0" - checksum: 10c0/a734463e86f263600b8086e664872b5648cc7c7879966731b3609824fce36bf7ed5a177785f17a0cb6e1f0539c0d10b7ed193240f814854bfd3a4fdcc45d6144 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + checksum: 10c0/7c75199d5b8841482b1ee2e84ac84b4509f60ae735a0e9a934ed3eef6ba3248f77bbaa80699f6e5a8e37b3982dd81c7782cb667739d949419240c5f04f52cc95 languageName: node linkType: hard -"@ckeditor/ckeditor5-show-blocks@npm:42.0.0, @ckeditor/ckeditor5-show-blocks@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-show-blocks@npm:42.0.0" +"@ckeditor/ckeditor5-show-blocks@npm:42.0.2, @ckeditor/ckeditor5-show-blocks@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-show-blocks@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - ckeditor5: "npm:42.0.0" - checksum: 10c0/bce05eb16dbb8d3830bc37f8762c4490f625c92294ea3402593f58d82254b7b90d96a8ea18f7df01b66dfd591d187dd2936b7b5b9569a9719e17dbd27d7b5c41 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/26c739bda80b11317a294d3206937a936b7603981c32d57fa4792182fd8b26c259cfad17c9dfeab33098d2e126a800643cc00c5adb1e4221f43a7d237b0fc0c0 languageName: node linkType: hard -"@ckeditor/ckeditor5-source-editing@npm:42.0.0, @ckeditor/ckeditor5-source-editing@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-source-editing@npm:42.0.0" +"@ckeditor/ckeditor5-source-editing@npm:42.0.2, @ckeditor/ckeditor5-source-editing@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-source-editing@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-theme-lark": "npm:42.0.0" - ckeditor5: "npm:42.0.0" - checksum: 10c0/871c428e97cbc50e80bbfd799896daaaee622002657403c41cd6bf217e67f068da5f6a203a07a08ac2baa690cc6bd8535a068b899bb3d9199296c920b7c17ebd + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-theme-lark": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/a92691962bcd5e262234f346783fee178d4f5f0e585fcbfc13fa49159d9666a3b4c19b107e1e91e9bcaa343797894a5bb86e6048eae018985c74aaceb7b69542 languageName: node linkType: hard -"@ckeditor/ckeditor5-special-characters@npm:42.0.0, @ckeditor/ckeditor5-special-characters@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-special-characters@npm:42.0.0" +"@ckeditor/ckeditor5-special-characters@npm:42.0.2, @ckeditor/ckeditor5-special-characters@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-special-characters@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" - checksum: 10c0/d86da58a3c058eaadc95643ba607d13262f4a47d4db1c73eda517c66d1ac978fc41ec2b5cb0a72c6aaec4be722478cd92f7bb6d82798e58d8efdadfd10e81dc2 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" + checksum: 10c0/5d1a70a457dddbd25d2e55aea2b8d3e489baf119e0b2f5ba8797b991fc440d8619d9a6c8259ec93311eebf412e4a9b1c23167b181cafeb6ec4c93f0acd473aee languageName: node linkType: hard -"@ckeditor/ckeditor5-style@npm:42.0.0, @ckeditor/ckeditor5-style@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-style@npm:42.0.0" +"@ckeditor/ckeditor5-style@npm:42.0.2, @ckeditor/ckeditor5-style@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-style@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/7bfb75bf8ea78ae8ec8fd06d71c6cf7cbd82886dc4024b7272950634b3a35f15debc4bc211996e919922a077895ebb478f9beb39a014e365a9c65dffe60668e9 + checksum: 10c0/ae45379ececcce53d6f7d12ffecc2b6d07c07bd9a3293fd2c54ee7274c5c6e1366f4ceb53a2aa48336affdb52f3a6af0dad4360e73e25f0228b39b3606296b71 languageName: node linkType: hard -"@ckeditor/ckeditor5-table@npm:42.0.0, @ckeditor/ckeditor5-table@npm:~42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-table@npm:42.0.0" +"@ckeditor/ckeditor5-table@npm:42.0.2, @ckeditor/ckeditor5-table@npm:~42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-table@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-clipboard": "npm:42.0.2" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + "@ckeditor/ckeditor5-widget": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/3d7761ada1e211dbba325037a18af2f81a055330a814e392c0c96717475e4c2af13b955ad3888d9ff5a1182d18e87a6fd76800c1fe11a0df92e20ff19586892e + checksum: 10c0/8ce51427894b774598706523d617398826d8bb22738fc5b2309a92dd35aefa91f1ddcc47371446d9f2b826de02bba9705ddb97f8b16e4f56d9057cf4c519875e languageName: node linkType: hard -"@ckeditor/ckeditor5-theme-lark@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-theme-lark@npm:42.0.0" +"@ckeditor/ckeditor5-theme-lark@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-theme-lark@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - checksum: 10c0/ebf4916554eb9430dbfdf1891f3cd22dbf065f3de1a533d22ccbe0a7471ad023ba4ac561987101ffdf153d9463df1d7f76d7d9d96e30871e3e5f14135c33eab3 + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + checksum: 10c0/c20317a37cc4904dd24b7e2736eb0a0ebfd83cba56f4467b269ae7d0fde4698c73cd6571622087ecedfd867bdca81da3c1871a5c9237fec132679c70958dc72f languageName: node linkType: hard -"@ckeditor/ckeditor5-typing@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-typing@npm:42.0.0" +"@ckeditor/ckeditor5-typing@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-typing@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-core": "npm:42.0.0" - "@ckeditor/ckeditor5-engine": "npm:42.0.0" - "@ckeditor/ckeditor5-utils": "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/6e10e9177ad3e74137bec323fb58c139f3a37bc1d4f2448f9d209a95c2b7842eaac49fd1036cebc1af6ec53e14c581c2fd7dfa69f40f7df5ccd1067dfd77fc9f + checksum: 10c0/991022f28b25f45db62446e308e0a8e0a1e926d2a27c3927789092b44dedd38b14919245ee70bf039e4e5de0d7bd8a3ed207f779ba70ee96603a2b23126f9eaf languageName: node linkType: hard -"@ckeditor/ckeditor5-ui@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-ui@npm:42.0.0" +"@ckeditor/ckeditor5-ui@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-ui@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-core": "npm:42.0.0" - "@ckeditor/ckeditor5-utils": "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" color-convert: "npm:2.0.1" color-parse: "npm:1.4.2" lodash-es: "npm:4.17.21" vanilla-colorful: "npm:0.7.2" - checksum: 10c0/62c8d9c446230c268bc6441a6c51d3fc3aa605907b585161f7c54e7d0f7da410f52df38414178d4d9dc659ffcaba810a62f2ddd282143e4112c33fe783646f7a + checksum: 10c0/64a256658cd674140a5ce07fcf1afc281a816f0ea677cc52a0e79507615013a1cd75009c491c422f4312f85de1e7070214eb45f985ae8a51d5c20936b07bd2d8 languageName: node linkType: hard -"@ckeditor/ckeditor5-undo@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-undo@npm:42.0.0" +"@ckeditor/ckeditor5-undo@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-undo@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-core": "npm:42.0.0" - "@ckeditor/ckeditor5-engine": "npm:42.0.0" - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - checksum: 10c0/6fb6130e7641369e81046d20f40ba17edfa26bba6c1788dde9c35f93504ee78409233530d7563610e6a6a44e37e57206864a04af3230d7ae805576832f42227d + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + checksum: 10c0/10d5cfe549f43296c5179081ec9c43ce535a90eaba3aa69d9da3387cd10a37cc66f508302b9de453d25ded4b7d903788634bad007f9a876c813ef4c90045493c languageName: node linkType: hard -"@ckeditor/ckeditor5-upload@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-upload@npm:42.0.0" +"@ckeditor/ckeditor5-upload@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-upload@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-core": "npm:42.0.0" - "@ckeditor/ckeditor5-utils": "npm:42.0.0" - checksum: 10c0/f1f355ef2d650a71a3aeea66f6ed09e81223cd0bb66ce111af9b1bf07dca34a26e0174eb32eccbf55b0254f195bfcb362c67a81c5354bc94b9830679f3b4f9b0 + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + checksum: 10c0/705bff0b64eb36b7b2a8eb617bb0359ae3ef46df2bf7336c5c2a9e3801dfc80b2740fce5e9840f9515e3c5fd31ba911535d52398333224486f38df8ab523268d languageName: node linkType: hard -"@ckeditor/ckeditor5-utils@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-utils@npm:42.0.0" +"@ckeditor/ckeditor5-utils@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-utils@npm:42.0.2" dependencies: lodash-es: "npm:4.17.21" - checksum: 10c0/aa50823e27ce17b6a47f272b40d6bad629fc88124d1f62b9a3b986d18c6cb56a1c3483dabcc9b1ce7fa5b7fcf01e616e26cce4122d0624b12efa5b63929c0206 + checksum: 10c0/5c13fe2d53fe27b43acc29486add44a8588bbc82c2adb58f1b3f1ab19cadbebc80013550912c2192a0e4e98873fb2cd60dcbcb680777062290315c098809cc35 languageName: node linkType: hard -"@ckeditor/ckeditor5-watchdog@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-watchdog@npm:42.0.0" +"@ckeditor/ckeditor5-watchdog@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-watchdog@npm:42.0.2" dependencies: lodash-es: "npm:4.17.21" - checksum: 10c0/de8da9d82957a2edae12be6ee5fa0797f7f2b5e5a320bf295f3893a9f3fe35f5a0e18e243a46b1405d1e83a2e7b34c418b669946568b5341455fd343fcb1c600 + checksum: 10c0/09cf1679895e474ebda74efdfe2fcd995256833111f84dd9e74150c979779d37433f19f354a3024ceb954aeadaeea12842368e785629bb14c2e65a2dec6b45de languageName: node linkType: hard -"@ckeditor/ckeditor5-widget@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-widget@npm:42.0.0" +"@ckeditor/ckeditor5-widget@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-widget@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-core": "npm:42.0.0" - "@ckeditor/ckeditor5-engine": "npm:42.0.0" - "@ckeditor/ckeditor5-enter": "npm:42.0.0" - "@ckeditor/ckeditor5-typing": "npm:42.0.0" - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - "@ckeditor/ckeditor5-utils": "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-enter": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/6e272dd5f0dddb721f32f19d8af0909080cc951f7ea94a7dc34ee471e66cab7f20ac35a684cc2b3a1a13791a4b00766df3395bd29f5f6b2186d2e5a7b84ba659 + checksum: 10c0/6cb4a2f3737eba72ffbe814078e6ce67c825e43ca8d079208b0e51d6c4e413677cff4603a331e97fba75b5c286f8cee70445001e50cfe8a766f8efdd5605faf1 languageName: node linkType: hard -"@ckeditor/ckeditor5-word-count@npm:42.0.0": - version: 42.0.0 - resolution: "@ckeditor/ckeditor5-word-count@npm:42.0.0" +"@ckeditor/ckeditor5-word-count@npm:42.0.2": + version: 42.0.2 + resolution: "@ckeditor/ckeditor5-word-count@npm:42.0.2" dependencies: - ckeditor5: "npm:42.0.0" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + ckeditor5: "npm:42.0.2" lodash-es: "npm:4.17.21" - checksum: 10c0/eb8099038dac8c59c8b706f8dbacfa3e0d1c0b2982c7e1ae2b585971c9e783430a050360c1d29fd0caf8bc82bab99554e44e68ab46f1810d2b2e19e6d710f17f + checksum: 10c0/6eb8db06e44830a02d72244606c8b3ea0c2eeaf49eaafd6259389c7a954a06ed275d31fc41d585309a00dca2d52573511c0a21ef9462bc8fef4721790ed1fb29 languageName: node linkType: hard @@ -2146,34 +2314,34 @@ __metadata: version: 0.0.0-use.local resolution: "Drupal@workspace:." dependencies: - "@ckeditor/ckeditor5-alignment": "npm:~42.0.0" - "@ckeditor/ckeditor5-autoformat": "npm:~42.0.0" - "@ckeditor/ckeditor5-basic-styles": "npm:~42.0.0" - "@ckeditor/ckeditor5-block-quote": "npm:~42.0.0" - "@ckeditor/ckeditor5-code-block": "npm:~42.0.0" - "@ckeditor/ckeditor5-editor-classic": "npm:~42.0.0" - "@ckeditor/ckeditor5-editor-decoupled": "npm:~42.0.0" - "@ckeditor/ckeditor5-essentials": "npm:~42.0.0" - "@ckeditor/ckeditor5-heading": "npm:~42.0.0" - "@ckeditor/ckeditor5-horizontal-line": "npm:~42.0.0" - "@ckeditor/ckeditor5-html-support": "npm:~42.0.0" - "@ckeditor/ckeditor5-image": "npm:~42.0.0" - "@ckeditor/ckeditor5-indent": "npm:~42.0.0" - "@ckeditor/ckeditor5-language": "npm:~42.0.0" - "@ckeditor/ckeditor5-link": "npm:~42.0.0" - "@ckeditor/ckeditor5-list": "npm:~42.0.0" - "@ckeditor/ckeditor5-paste-from-office": "npm:~42.0.0" - "@ckeditor/ckeditor5-remove-format": "npm:~42.0.0" - "@ckeditor/ckeditor5-show-blocks": "npm:~42.0.0" - "@ckeditor/ckeditor5-source-editing": "npm:~42.0.0" - "@ckeditor/ckeditor5-special-characters": "npm:~42.0.0" - "@ckeditor/ckeditor5-style": "npm:~42.0.0" - "@ckeditor/ckeditor5-table": "npm:~42.0.0" + "@ckeditor/ckeditor5-alignment": "npm:~42.0.2" + "@ckeditor/ckeditor5-autoformat": "npm:~42.0.2" + "@ckeditor/ckeditor5-basic-styles": "npm:~42.0.2" + "@ckeditor/ckeditor5-block-quote": "npm:~42.0.2" + "@ckeditor/ckeditor5-code-block": "npm:~42.0.2" + "@ckeditor/ckeditor5-editor-classic": "npm:~42.0.2" + "@ckeditor/ckeditor5-editor-decoupled": "npm:~42.0.2" + "@ckeditor/ckeditor5-essentials": "npm:~42.0.2" + "@ckeditor/ckeditor5-heading": "npm:~42.0.2" + "@ckeditor/ckeditor5-horizontal-line": "npm:~42.0.2" + "@ckeditor/ckeditor5-html-support": "npm:~42.0.2" + "@ckeditor/ckeditor5-image": "npm:~42.0.2" + "@ckeditor/ckeditor5-indent": "npm:~42.0.2" + "@ckeditor/ckeditor5-language": "npm:~42.0.2" + "@ckeditor/ckeditor5-link": "npm:~42.0.2" + "@ckeditor/ckeditor5-list": "npm:~42.0.2" + "@ckeditor/ckeditor5-paste-from-office": "npm:~42.0.2" + "@ckeditor/ckeditor5-remove-format": "npm:~42.0.2" + "@ckeditor/ckeditor5-show-blocks": "npm:~42.0.2" + "@ckeditor/ckeditor5-source-editing": "npm:~42.0.2" + "@ckeditor/ckeditor5-special-characters": "npm:~42.0.2" + "@ckeditor/ckeditor5-style": "npm:~42.0.2" + "@ckeditor/ckeditor5-table": "npm:~42.0.2" "@drupal/once": "npm:^1.0.1" "@floating-ui/dom": "npm:^1.6.7" backbone: "npm:^1.6.0" chokidar: "npm:^3.6.0" - ckeditor5: "npm:~42.0.0" + ckeditor5: "npm:~42.0.2" cspell: "npm:^8.10.4" dotenv: "npm:^16.4.5" dotenv-safe: "npm:^9.1.0" @@ -2911,68 +3079,68 @@ __metadata: languageName: node linkType: hard -"ckeditor5@npm:42.0.0, ckeditor5@npm:~42.0.0": - version: 42.0.0 - resolution: "ckeditor5@npm:42.0.0" +"ckeditor5@npm:42.0.2, ckeditor5@npm:~42.0.2": + version: 42.0.2 + resolution: "ckeditor5@npm:42.0.2" dependencies: - "@ckeditor/ckeditor5-adapter-ckfinder": "npm:42.0.0" - "@ckeditor/ckeditor5-alignment": "npm:42.0.0" - "@ckeditor/ckeditor5-autoformat": "npm:42.0.0" - "@ckeditor/ckeditor5-autosave": "npm:42.0.0" - "@ckeditor/ckeditor5-basic-styles": "npm:42.0.0" - "@ckeditor/ckeditor5-block-quote": "npm:42.0.0" - "@ckeditor/ckeditor5-ckbox": "npm:42.0.0" - "@ckeditor/ckeditor5-ckfinder": "npm:42.0.0" - "@ckeditor/ckeditor5-clipboard": "npm:42.0.0" - "@ckeditor/ckeditor5-cloud-services": "npm:42.0.0" - "@ckeditor/ckeditor5-code-block": "npm:42.0.0" - "@ckeditor/ckeditor5-core": "npm:42.0.0" - "@ckeditor/ckeditor5-easy-image": "npm:42.0.0" - "@ckeditor/ckeditor5-editor-balloon": "npm:42.0.0" - "@ckeditor/ckeditor5-editor-classic": "npm:42.0.0" - "@ckeditor/ckeditor5-editor-decoupled": "npm:42.0.0" - "@ckeditor/ckeditor5-editor-inline": "npm:42.0.0" - "@ckeditor/ckeditor5-editor-multi-root": "npm:42.0.0" - "@ckeditor/ckeditor5-engine": "npm:42.0.0" - "@ckeditor/ckeditor5-enter": "npm:42.0.0" - "@ckeditor/ckeditor5-essentials": "npm:42.0.0" - "@ckeditor/ckeditor5-find-and-replace": "npm:42.0.0" - "@ckeditor/ckeditor5-font": "npm:42.0.0" - "@ckeditor/ckeditor5-heading": "npm:42.0.0" - "@ckeditor/ckeditor5-highlight": "npm:42.0.0" - "@ckeditor/ckeditor5-horizontal-line": "npm:42.0.0" - "@ckeditor/ckeditor5-html-embed": "npm:42.0.0" - "@ckeditor/ckeditor5-html-support": "npm:42.0.0" - "@ckeditor/ckeditor5-image": "npm:42.0.0" - "@ckeditor/ckeditor5-indent": "npm:42.0.0" - "@ckeditor/ckeditor5-language": "npm:42.0.0" - "@ckeditor/ckeditor5-link": "npm:42.0.0" - "@ckeditor/ckeditor5-list": "npm:42.0.0" - "@ckeditor/ckeditor5-markdown-gfm": "npm:42.0.0" - "@ckeditor/ckeditor5-media-embed": "npm:42.0.0" - "@ckeditor/ckeditor5-mention": "npm:42.0.0" - "@ckeditor/ckeditor5-minimap": "npm:42.0.0" - "@ckeditor/ckeditor5-page-break": "npm:42.0.0" - "@ckeditor/ckeditor5-paragraph": "npm:42.0.0" - "@ckeditor/ckeditor5-paste-from-office": "npm:42.0.0" - "@ckeditor/ckeditor5-remove-format": "npm:42.0.0" - "@ckeditor/ckeditor5-restricted-editing": "npm:42.0.0" - "@ckeditor/ckeditor5-select-all": "npm:42.0.0" - "@ckeditor/ckeditor5-show-blocks": "npm:42.0.0" - "@ckeditor/ckeditor5-source-editing": "npm:42.0.0" - "@ckeditor/ckeditor5-special-characters": "npm:42.0.0" - "@ckeditor/ckeditor5-style": "npm:42.0.0" - "@ckeditor/ckeditor5-table": "npm:42.0.0" - "@ckeditor/ckeditor5-theme-lark": "npm:42.0.0" - "@ckeditor/ckeditor5-typing": "npm:42.0.0" - "@ckeditor/ckeditor5-ui": "npm:42.0.0" - "@ckeditor/ckeditor5-undo": "npm:42.0.0" - "@ckeditor/ckeditor5-upload": "npm:42.0.0" - "@ckeditor/ckeditor5-utils": "npm:42.0.0" - "@ckeditor/ckeditor5-watchdog": "npm:42.0.0" - "@ckeditor/ckeditor5-widget": "npm:42.0.0" - "@ckeditor/ckeditor5-word-count": "npm:42.0.0" - checksum: 10c0/f58368a7b8cf8c7c791d2e150d981e937fb5b8c8b03d0a4b3cda98a728643971dfbfdf025168f4bddcad5ad279a75b90acdc58b9328c45d3b78213290b565d7a + "@ckeditor/ckeditor5-adapter-ckfinder": "npm:42.0.2" + "@ckeditor/ckeditor5-alignment": "npm:42.0.2" + "@ckeditor/ckeditor5-autoformat": "npm:42.0.2" + "@ckeditor/ckeditor5-autosave": "npm:42.0.2" + "@ckeditor/ckeditor5-basic-styles": "npm:42.0.2" + "@ckeditor/ckeditor5-block-quote": "npm:42.0.2" + "@ckeditor/ckeditor5-ckbox": "npm:42.0.2" + "@ckeditor/ckeditor5-ckfinder": "npm:42.0.2" + "@ckeditor/ckeditor5-clipboard": "npm:42.0.2" + "@ckeditor/ckeditor5-cloud-services": "npm:42.0.2" + "@ckeditor/ckeditor5-code-block": "npm:42.0.2" + "@ckeditor/ckeditor5-core": "npm:42.0.2" + "@ckeditor/ckeditor5-easy-image": "npm:42.0.2" + "@ckeditor/ckeditor5-editor-balloon": "npm:42.0.2" + "@ckeditor/ckeditor5-editor-classic": "npm:42.0.2" + "@ckeditor/ckeditor5-editor-decoupled": "npm:42.0.2" + "@ckeditor/ckeditor5-editor-inline": "npm:42.0.2" + "@ckeditor/ckeditor5-editor-multi-root": "npm:42.0.2" + "@ckeditor/ckeditor5-engine": "npm:42.0.2" + "@ckeditor/ckeditor5-enter": "npm:42.0.2" + "@ckeditor/ckeditor5-essentials": "npm:42.0.2" + "@ckeditor/ckeditor5-find-and-replace": "npm:42.0.2" + "@ckeditor/ckeditor5-font": "npm:42.0.2" + "@ckeditor/ckeditor5-heading": "npm:42.0.2" + "@ckeditor/ckeditor5-highlight": "npm:42.0.2" + "@ckeditor/ckeditor5-horizontal-line": "npm:42.0.2" + "@ckeditor/ckeditor5-html-embed": "npm:42.0.2" + "@ckeditor/ckeditor5-html-support": "npm:42.0.2" + "@ckeditor/ckeditor5-image": "npm:42.0.2" + "@ckeditor/ckeditor5-indent": "npm:42.0.2" + "@ckeditor/ckeditor5-language": "npm:42.0.2" + "@ckeditor/ckeditor5-link": "npm:42.0.2" + "@ckeditor/ckeditor5-list": "npm:42.0.2" + "@ckeditor/ckeditor5-markdown-gfm": "npm:42.0.2" + "@ckeditor/ckeditor5-media-embed": "npm:42.0.2" + "@ckeditor/ckeditor5-mention": "npm:42.0.2" + "@ckeditor/ckeditor5-minimap": "npm:42.0.2" + "@ckeditor/ckeditor5-page-break": "npm:42.0.2" + "@ckeditor/ckeditor5-paragraph": "npm:42.0.2" + "@ckeditor/ckeditor5-paste-from-office": "npm:42.0.2" + "@ckeditor/ckeditor5-remove-format": "npm:42.0.2" + "@ckeditor/ckeditor5-restricted-editing": "npm:42.0.2" + "@ckeditor/ckeditor5-select-all": "npm:42.0.2" + "@ckeditor/ckeditor5-show-blocks": "npm:42.0.2" + "@ckeditor/ckeditor5-source-editing": "npm:42.0.2" + "@ckeditor/ckeditor5-special-characters": "npm:42.0.2" + "@ckeditor/ckeditor5-style": "npm:42.0.2" + "@ckeditor/ckeditor5-table": "npm:42.0.2" + "@ckeditor/ckeditor5-theme-lark": "npm:42.0.2" + "@ckeditor/ckeditor5-typing": "npm:42.0.2" + "@ckeditor/ckeditor5-ui": "npm:42.0.2" + "@ckeditor/ckeditor5-undo": "npm:42.0.2" + "@ckeditor/ckeditor5-upload": "npm:42.0.2" + "@ckeditor/ckeditor5-utils": "npm:42.0.2" + "@ckeditor/ckeditor5-watchdog": "npm:42.0.2" + "@ckeditor/ckeditor5-widget": "npm:42.0.2" + "@ckeditor/ckeditor5-word-count": "npm:42.0.2" + checksum: 10c0/94825de6af639819d77447ebb42bf5890aeab0a768a02440f794f0c6af341ec74702637ddf43d2324d3ade91a7d12ec6ba1307ad5729968d9521733210588899 languageName: node linkType: hard