ckeditor5
Version:
A set of ready-to-use rich text editors created with a powerful framework. Made with real-time collaborative editing in mind.
5 lines • 1.6 MB
JavaScript
/**
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
function e(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(i){if("default"!==i&&!(i in e)){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}}))})),Object.freeze(e)}let t;try{t={window:window,document:document}}catch(e){t={window:{},document:{}}}var i=t;function n(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}const s=n(),o={isMac:r(s),isWindows:a(s),isGecko:l(s),isSafari:c(s),isiOS:d(s),isAndroid:h(s),isBlink:u(s),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:m()}};function r(e){return e.indexOf("macintosh")>-1}function a(e){return e.indexOf("windows")>-1}function l(e){return!!e.match(/gecko\/\d+/)}function c(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}function d(e){return!!e.match(/iphone|ipad/i)||r(e)&&navigator.maxTouchPoints>0}function h(e){return e.indexOf("android")>-1}function u(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}function m(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}function g(e,t,i,n){i=i||function(e,t){return e===t};const s=Array.isArray(e)?e:Array.prototype.slice.call(e),o=Array.isArray(t)?t:Array.prototype.slice.call(t),r=function(e,t,i){const n=f(e,t,i);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const s=p(e,n),o=p(t,n),r=f(s,o,i),a=e.length-r,l=t.length-r;return{firstIndex:n,lastIndexOld:a,lastIndexNew:l}}(s,o,i),a=n?function(e,t){const{firstIndex:i,lastIndexOld:n,lastIndexNew:s}=e;if(-1===i)return Array(t).fill("equal");let o=[];i>0&&(o=o.concat(Array(i).fill("equal")));s-i>0&&(o=o.concat(Array(s-i).fill("insert")));n-i>0&&(o=o.concat(Array(n-i).fill("delete")));s<t&&(o=o.concat(Array(t-s).fill("equal")));return o}(r,o.length):function(e,t){const i=[],{firstIndex:n,lastIndexOld:s,lastIndexNew:o}=t;o-n>0&&i.push({index:n,type:"insert",values:e.slice(n,o)});s-n>0&&i.push({index:n+(o-n),type:"delete",howMany:s-n});return i}(o,r);return a}function f(e,t,i){for(let n=0;n<Math.max(e.length,t.length);n++)if(void 0===e[n]||void 0===t[n]||!i(e[n],t[n]))return n;return-1}function p(e,t){return e.slice(t).reverse()}function b(e,t,i){i=i||function(e,t){return e===t};const n=e.length,s=t.length;if(n>200||s>200||n+s>300)return b.fastDiff(e,t,i,!0);let o,r;if(s<n){const i=e;e=t,t=i,o="delete",r="insert"}else o="insert",r="delete";const a=e.length,l=t.length,c=l-a,d={},h={};function u(n){const s=(void 0!==h[n-1]?h[n-1]:-1)+1,c=void 0!==h[n+1]?h[n+1]:-1,u=s>c?-1:1;d[n+u]&&(d[n]=d[n+u].slice(0)),d[n]||(d[n]=[]),d[n].push(s>c?o:r);let m=Math.max(s,c),g=m-n;for(;g<a&&m<l&&i(e[g],t[m]);)g++,m++,d[n].push("equal");return m}let m,g=0;do{for(m=-g;m<c;m++)h[m]=u(m);for(m=c+g;m>c;m--)h[m]=u(m);h[c]=u(c),g++}while(h[c]!==l);return d[c].slice(1)}function w(e,t){const i=[];let n=0,s=null;return e.forEach((e=>{"equal"==e?(o(),n++):"insert"==e?(s&&"insert"==s.type?s.values.push(t[n]):(o(),s={type:"insert",index:n,values:[t[n]]}),n++):s&&"delete"==s.type?s.howMany++:(o(),s={type:"delete",index:n,howMany:1})})),o(),i;function o(){s&&(i.push(s),s=null)}}function _(e,...t){t.forEach((t=>{const i=Object.getOwnPropertyNames(t),n=Object.getOwnPropertySymbols(t);i.concat(n).forEach((i=>{if(i in e.prototype)return;if("function"==typeof t&&("length"==i||"name"==i||"prototype"==i))return;const n=Object.getOwnPropertyDescriptor(t,i);n.enumerable=!1,Object.defineProperty(e.prototype,i,n)}))}))}b.fastDiff=g;class v{source;name;path;stop;off;return;constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=function e(){e.called=!0},this.off=function e(){e.called=!0}}}const y=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function k(){const[e,t,i,n]=crypto.getRandomValues(new Uint32Array(4));return"e"+y[255&e]+y[e>>8&255]+y[e>>16&255]+y[e>>24&255]+y[255&t]+y[t>>8&255]+y[t>>16&255]+y[t>>24&255]+y[255&i]+y[i>>8&255]+y[i>>16&255]+y[i>>24&255]+y[255&n]+y[n>>8&255]+y[n>>16&255]+y[n>>24&255]}const C={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function x(e,t){const i=C.get(t.priority);let n=0,s=e.length;for(;n<s;){const t=n+s>>1;C.get(e[t].priority)<i?s=t:n=t+1}e.splice(n,0,t)}class A extends Error{context;data;constructor(e,t,i){super(function(e,t){const i=new WeakSet,n=(e,t)=>{if("object"==typeof t&&null!==t){if(i.has(t))return`[object ${t.constructor.name}]`;i.add(t)}return t},s=t?` ${JSON.stringify(t,n)}`:"",o=P(e);return e+s+o}(e,i)),this.name="CKEditorError",this.context=t,this.data=i}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const i=new A(e.message,t);throw i.stack=e.stack,i}}function E(e,t){console.warn(...S(e,t))}function T(e,t){console.error(...S(e,t))}function P(e){return`\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-${e}`}function S(e,t){const i=P(e);return t?[e,t,i]:[e,i]}const I="45.1.0",V=new Date(2025,4,14);if(globalThis.CKEDITOR_VERSION)throw new A("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=I;const R=Symbol("listeningTo"),O=Symbol("emitterId"),B=Symbol("delegations"),M=L(Object);function L(e){if(!e)return M;return class extends e{on(e,t,i){this.listenTo(this,e,t,i)}once(e,t,i){let n=!1;this.listenTo(this,e,((e,...i)=>{n||(n=!0,e.off(),t.call(this,e,...i))}),i)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,i,n={}){let s,o;this[R]||(this[R]={});const r=this[R];N(e)||F(e);const a=N(e);(s=r[a])||(s=r[a]={emitter:e,callbacks:{}}),(o=s.callbacks[t])||(o=s.callbacks[t]=[]),o.push(i),function(e,t,i,n,s){t._addEventListener?t._addEventListener(i,n,s):e._addEventListener.call(t,i,n,s)}(this,e,t,i,n)}stopListening(e,t,i){const n=this[R];let s=e&&N(e);const o=n&&s?n[s]:void 0,r=o&&t?o.callbacks[t]:void 0;if(!(!n||e&&!o||t&&!r))if(i){$(this,e,t,i);-1!==r.indexOf(i)&&(1===r.length?delete o.callbacks[t]:$(this,e,t,i))}else if(r){for(;i=r.pop();)$(this,e,t,i);delete o.callbacks[t]}else if(o){for(t in o.callbacks)this.stopListening(e,t);delete n[s]}else{for(s in n)this.stopListening(n[s].emitter);delete this[R]}}fire(e,...t){try{const i=e instanceof v?e:new v(this,e),n=i.name;let s=function(e,t){if(!e._events)return null;let i=t;do{const t=e._events[i];if(t&&t.callbacks&&t.callbacks.length)return t.callbacks;const n=i.lastIndexOf(":");i=n>-1?i.substring(0,n):""}while(i);return null}(this,n);if(i.path.push(this),s){s=s.slice();for(let e=0;e<s.length;e++){const o=s[e].callback;if(o.call(this,i,...t),i.off.called&&(delete i.off.called,this._removeEventListener(n,o)),i.stop.called)break}}const o=this[B];if(o){const e=o.get(n),s=o.get("*");e&&H(e,i,t),s&&H(s,i,t)}return i.return}catch(e){A.rethrowUnexpectedError(e,this)}}delegate(...e){return{to:(t,i)=>{this[B]||(this[B]=new Map),e.forEach((e=>{const n=this[B].get(e);n?n.set(t,i):this[B].set(e,new Map([[t,i]]))}))}}}stopDelegating(e,t){if(this[B])if(e)if(t){const i=this[B].get(e);i&&i.delete(t)}else this[B].delete(e);else this[B].clear()}_addEventListener(e,t,i){!function(e,t){const i=D(e);if(i[t])return;let n=t,s=null;const o=[];for(;""!==n&&!i[n];)i[n]={callbacks:[],childEvents:[]},o.push(i[n]),s&&i[n].childEvents.push(s),s=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const e of o)e.callbacks=i[n].callbacks.slice();i[n].childEvents.push(s)}}(this,e);const n=z(this,e),s={callback:t,priority:C.get(i.priority)};for(const e of n)x(e,s)}_removeEventListener(e,t){const i=z(this,e);for(const e of i)for(let i=0;i<e.length;i++)e[i].callback==t&&(e.splice(i,1),i--)}}}function F(e,t){e[O]||(e[O]=t||k())}function N(e){return e[O]}function D(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function z(e,t){const i=D(e)[t];if(!i)return[];let n=[i.callbacks];for(let t=0;t<i.childEvents.length;t++){const s=z(e,i.childEvents[t]);n=n.concat(s)}return n}function H(e,t,i){for(let[n,s]of e){s?"function"==typeof s&&(s=s(t.name)):s=t.name;const e=new v(t.source,s);e.path=[...t.path],n.fire(e,...i)}}function $(e,t,i,n){t._removeEventListener?t._removeEventListener(i,n):e._removeEventListener.call(t,i,n)}function U(e){return e}function W(){}function j(e){return null==e||"object"!=typeof e&&"function"!=typeof e}function q(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Z(e){if(j(e))return e;if(Array.isArray(e)||q(e)||e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e),i=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new i(e);if(e instanceof RegExp){const t=new i(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new i(e.buffer.slice(0));if(e instanceof Error){const t=new i(e.message);return t.stack=e.stack,t.name=e.name,t.cause=e.cause,t}if("undefined"!=typeof File&&e instanceof File){return new i([e],e.name,{type:e.type,lastModified:e.lastModified})}if("object"==typeof e){const i=Object.create(t);return Object.assign(i,e)}return e}function G(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function K(e){return"object"==typeof e&&null!==e}function J(e){return Object.getOwnPropertySymbols(e).filter((t=>Object.prototype.propertyIsEnumerable.call(e,t)))}function Q(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{L[e]=M.prototype[e]}));const Y="[object RegExp]",X="[object String]",ee="[object Number]",te="[object Boolean]",ie="[object Arguments]",ne="[object Symbol]",se="[object Date]",oe="[object Map]",re="[object Set]",ae="[object Array]",le="[object ArrayBuffer]",ce="[object Object]",de="[object DataView]",he="[object Uint8Array]",ue="[object Uint8ClampedArray]",me="[object Uint16Array]",ge="[object Uint32Array]",fe="[object Int8Array]",pe="[object Int16Array]",be="[object Int32Array]",we="[object Float32Array]",_e="[object Float64Array]";function ve(e,t,i,n=new Map,s=void 0){const o=s?.(e,t,i,n);if(null!=o)return o;if(j(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const t=new Array(e.length);n.set(e,t);for(let o=0;o<e.length;o++)t[o]=ve(e[o],o,i,n,s);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;n.set(e,t);for(const[o,r]of e)t.set(o,ve(r,o,i,n,s));return t}if(e instanceof Set){const t=new Set;n.set(e,t);for(const o of e)t.add(ve(o,void 0,i,n,s));return t}if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return e.subarray();if(q(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);n.set(e,t);for(let o=0;o<e.length;o++)t[o]=ve(e[o],o,i,n,s);return t}if(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,t),ye(t,e,i,n,s),t}if("undefined"!=typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return n.set(e,t),ye(t,e,i,n,s),t}if(e instanceof Blob){const t=new Blob([e],{type:e.type});return n.set(e,t),ye(t,e,i,n,s),t}if(e instanceof Error){const t=new e.constructor;return n.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,ye(t,e,i,n,s),t}if("object"==typeof e&&function(e){switch(Q(e)){case ie:case ae:case le:case de:case te:case se:case we:case _e:case fe:case pe:case be:case oe:case ee:case ce:case Y:case re:case X:case ne:case he:case ue:case me:case ge:return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return n.set(e,t),ye(t,e,i,n,s),t}return e}function ye(e,t,i=e,n,s){const o=[...Object.keys(t),...J(t)];for(let r=0;r<o.length;r++){const a=o[r],l=Object.getOwnPropertyDescriptor(e,a);(null==l||l.writable)&&(e[a]=ve(t[a],a,i,n,s))}}function ke(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Ce(e,t,i){return xe(e,t,void 0,void 0,void 0,void 0,i)}function xe(e,t,i,n,s,o,r){const a=r(e,t,i,n,s,o);if(void 0!==a)return a;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return e===t;case"number":return e===t||Object.is(e,t);case"object":return Ae(e,t,o,r)}return Ae(e,t,o,r)}function Ae(e,t,i,n){if(Object.is(e,t))return!0;let s=Q(e),o=Q(t);if(s===ie&&(s=ce),o===ie&&(o=ce),s!==o)return!1;switch(s){case X:return e.toString()===t.toString();case ee:return ke(e.valueOf(),t.valueOf());case te:case se:case ne:return Object.is(e.valueOf(),t.valueOf());case Y:return e.source===t.source&&e.flags===t.flags;case"[object Function]":return e===t}const r=(i=i??new Map).get(e),a=i.get(t);if(null!=r&&null!=a)return r===t;i.set(e,t),i.set(t,e);try{switch(s){case oe:if(e.size!==t.size)return!1;for(const[s,o]of e.entries())if(!t.has(s)||!xe(o,t.get(s),s,e,t,i,n))return!1;return!0;case re:{if(e.size!==t.size)return!1;const s=Array.from(e.values()),o=Array.from(t.values());for(let r=0;r<s.length;r++){const a=s[r],l=o.findIndex((s=>xe(a,s,void 0,e,t,i,n)));if(-1===l)return!1;o.splice(l,1)}return!0}case ae:case he:case ue:case me:case ge:case"[object BigUint64Array]":case fe:case pe:case be:case"[object BigInt64Array]":case we:case _e:if("undefined"!=typeof Buffer&&Buffer.isBuffer(e)!==Buffer.isBuffer(t))return!1;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(!xe(e[s],t[s],s,e,t,i,n))return!1;return!0;case le:return e.byteLength===t.byteLength&&Ae(new Uint8Array(e),new Uint8Array(t),i,n);case de:return e.byteLength===t.byteLength&&e.byteOffset===t.byteOffset&&Ae(new Uint8Array(e),new Uint8Array(t),i,n);case"[object Error]":return e.name===t.name&&e.message===t.message;case ce:{if(!(Ae(e.constructor,t.constructor,i,n)||G(e)&&G(t)))return!1;const s=[...Object.keys(e),...J(e)],o=[...Object.keys(t),...J(t)];if(s.length!==o.length)return!1;for(let o=0;o<s.length;o++){const r=s[o],a=e[r];if(!Object.hasOwn(t,r))return!1;if(!xe(a,t[r],r,e,t,i,n))return!1}return!0}default:return!1}}finally{i.delete(e),i.delete(t)}}function Ee(e,t){return Ce(e,t,W)}function Te(e){return"function"==typeof e}const Pe=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function Se(e){return null!=e&&"function"!=typeof e&&function(e){return Number.isSafeInteger(e)&&e>=0}(e.length)}function Ie(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function Ve(e){return Object.is(e,-0)?"-0":e.toString()}function Re(e){const t=[],i=e.length;if(0===i)return t;let n=0,s="",o="",r=!1;for(46===e.charCodeAt(0)&&(t.push(""),n++);n<i;){const a=e[n];o?"\\"===a&&n+1<i?(n++,s+=e[n]):a===o?o="":s+=a:r?'"'===a||"'"===a?o=a:"]"===a?(r=!1,t.push(s),s=""):s+=a:"["===a?(r=!0,s&&(t.push(s),s="")):"."===a?s&&(t.push(s),s=""):s+=a,n++}return s&&t.push(s),t}function Oe(e,t,i){if(null==e)return i;switch(typeof t){case"string":{const n=e[t];return void 0===n?Ie(t)?Oe(e,Re(t),i):i:n}case"number":case"symbol":{"number"==typeof t&&(t=Ve(t));const n=e[t];return void 0===n?i:n}default:{if(Array.isArray(t))return function(e,t,i){if(0===t.length)return i;let n=e;for(let e=0;e<t.length;e++){if(null==n)return i;n=n[t[e]]}if(void 0===n)return i;return n}(e,t,i);const n=e[t=Object.is(t?.valueOf(),-0)?"-0":String(t)];return void 0===n?i:n}}}function Be(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function Me(e,t){return function(e,t){return ve(e,void 0,e,new Map,t)}(e,((i,n,s,o)=>{const r=t?.(i,n,s,o);if(null!=r)return r;if("object"==typeof e)switch(Object.prototype.toString.call(e)){case ee:case X:case te:{const t=new e.constructor(e?.valueOf());return ye(t,e),t}case ie:{const t={};return ye(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}))}function Le(e){return Me(e)}const Fe=/^(?:0|[1-9]\d*)$/;function Ne(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return Fe.test(e)}}function De(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===Q(e)}function ze(e){return function(e){return"symbol"==typeof e||e instanceof Symbol}(e)?NaN:Number(e)}function He(e){const t=function(e){if(!e)return 0===e?e:0;if((e=ze(e))===1/0||e===-1/0)return(e<0?-1:1)*Number.MAX_VALUE;return e==e?e:0}(e),i=t%1;return i?t-i:t}function $e(e){return"string"==typeof e||e instanceof String}function Ue(e,t,i){const n=Array.isArray(t)?t:"string"==typeof t?Re(t):[t];let s=e;for(let e=0;e<n.length-1;e++){const t=n[e],i=n[e+1];null==s[t]&&(s[t]=Ne(i)?[]:{}),s=s[t]}return s[n[n.length-1]]=i,e}function We(e,t,{signal:i,edges:n}={}){let s,o=null;const r=null!=n&&n.includes("leading"),a=null==n||n.includes("trailing"),l=()=>{null!==o&&(e.apply(s,o),s=void 0,o=null)};let c=null;const d=()=>{null!=c&&clearTimeout(c),c=setTimeout((()=>{c=null,a&&l(),u()}),t)},h=()=>{null!==c&&(clearTimeout(c),c=null)},u=()=>{h(),s=void 0,o=null},m=function(...e){if(i?.aborted)return;s=this,o=e;const t=null==c;d(),r&&t&&l()};return m.schedule=d,m.cancel=u,m.flush=()=>{h(),l()},i?.addEventListener("abort",u,{once:!0}),m}function je(e,t=0,i={}){"object"!=typeof i&&(i={});const{signal:n,leading:s=!1,trailing:o=!0,maxWait:r}=i,a=Array(2);let l;s&&(a[0]="leading"),o&&(a[1]="trailing");let c=null;const d=We((function(...t){l=e.apply(this,t),c=null}),t,{signal:n,edges:a}),h=function(...t){if(null!=r)if(null===c)c=Date.now();else if(Date.now()-c>=r)return l=e.apply(this,t),c=Date.now(),d.cancel(),d.schedule(),l;return d.apply(this,t),l};return h.cancel=d.cancel,h.flush=()=>(d.flush(),l),h}function qe(e,t=0,i={}){"object"!=typeof i&&(i={});const{leading:n=!0,trailing:s=!0,signal:o}=i;return je(e,t,{leading:n,trailing:s,signal:o,maxWait:t})}function Ze(e){if(null==e)return"";if(Array.isArray(e))return e.map(Ze).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function Ge(e){return q(e)}function Ke(e){if(null==e)return[];switch(typeof e){case"object":case"function":return Se(e)?function(e){const t=function(e,t){if((e=He(e))<1||!Number.isSafeInteger(e))return[];const i=new Array(e);for(let n=0;n<e;n++)i[n]="function"==typeof t?t(n):n;return i}(e.length,(e=>`${e}`)),i=new Set(t);(function(e){return"undefined"!=typeof Buffer&&Buffer.isBuffer(e)})(e)&&(i.add("offset"),i.add("parent"));Ge(e)&&(i.add("buffer"),i.add("byteLength"),i.add("byteOffset"));return[...t,...Je(e).filter((e=>!i.has(e)))]}(e):function(e){const t=e?.constructor;return e===("function"==typeof t?t.prototype:Object.prototype)}(e)?function(e){const t=Je(e);return t.filter((e=>"constructor"!==e))}(e):Je(e);default:return Je(Object(e))}}function Je(e){const t=[];for(const i in e)t.push(i);return t}function Qe(e,...t){for(let i=0;i<t.length;i++)Ye(e,t[i]);return e}function Ye(e,t){const i=Ke(t);for(let n=0;n<i.length;n++){const s=i[n];ke(e[s],t[s])||(e[s]=t[s])}}function Xe(e,t){const i={},n=Object.keys(e);for(let s=0;s<n.length;s++){const o=n[s],r=e[o];i[o]=t(r,o,e)}return i}function et(e,t){switch(typeof(t=t??U)){case"string":case"symbol":case"number":case"object":return Xe(e,(i=t,function(e){return Oe(e,i)}));case"function":return Xe(e,t)}var i}function tt(e){if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const t=e[Symbol.toStringTag];if(null==t)return!1;return!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function it(e,...t){const i=t.slice(0,-1),n=t[t.length-1];let s=e;for(let e=0;e<i.length;e++){s=nt(s,i[e],n,new Map)}return s}function nt(e,t,i,n){if(j(e)&&(e=Object(e)),null==t||"object"!=typeof t)return e;if(n.has(t))return Z(n.get(t));if(n.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}const s=[...Object.keys(t),...J(t)];for(let o=0;o<s.length;o++){const r=s[o];let a=t[r],l=e[r];if(De(a)&&(a={...a}),De(l)&&(l={...l}),"undefined"!=typeof Buffer&&Buffer.isBuffer(a)&&(a=Le(a)),Array.isArray(a))if("object"==typeof l&&null!=l){const e=[],t=Reflect.ownKeys(l);for(let i=0;i<t.length;i++){const n=t[i];e[n]=l[n]}l=e}else l=[];const c=i(l,a,r,e,t,n);null!=c?e[r]=c:Array.isArray(a)||K(l)&&K(a)?e[r]=nt(l,a,i,n):null==l&&tt(a)?e[r]=nt({},a,i,n):null==l&&Ge(a)?e[r]=Le(a):void 0!==l&&void 0===a||(e[r]=a)}return e}function st(e,...t){return it(e,...t,W)}function ot(e,t){if(null==e)return!0;switch(typeof t){case"symbol":case"number":case"object":if(Array.isArray(t))return rt(e,t);if("number"==typeof t?t=Ve(t):"object"==typeof t&&(t=Object.is(t?.valueOf(),-0)?"-0":String(t)),void 0===e?.[t])return!0;try{return delete e[t],!0}catch{return!1}case"string":if(void 0===e?.[t]&&Ie(t))return rt(e,Re(t));try{return delete e[t],!0}catch{return!1}}}function rt(e,t){const i=Oe(e,t.slice(0,-1),e),n=t[t.length-1];if(void 0===i?.[n])return!0;try{return delete i[n],!0}catch{return!1}}function at(e){return K(e)&&1===e.nodeType&&!tt(e)}function lt(e,t){if(!Number.isInteger(e)||e<0)throw new Error("n must be a non-negative integer.");let i=0;return(...n)=>{if(++i>=e)return t(...n)}}function ct(e,t,i=W){return"function"!=typeof i&&(i=W),Ce(e,t,((...n)=>{const s=i(...n);return void 0!==s?Boolean(s):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?ct(Array.from(e),Array.from(t),lt(2,i)):void 0}))}const dt={"&":"&","<":"<",">":">",'"':""","'":"'"};function ht(e){return Ze(e).replace(/[&<>"']/g,(e=>dt[e]))}function ut(e){return function(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}(Ze(e))}function mt(e){const t=function(e){return Array.from(e.match(Pe)??[])}(function(e){return"string"!=typeof e&&(e=Ze(e)),e.replace(/['\u2019]/g,"")}(e).trim());let i="";for(let e=0;e<t.length;e++){const n=t[e];i&&(i+=" "),n===n.toUpperCase()?i+=n:i+=n[0].toUpperCase()+n.slice(1).toLowerCase()}return i}const gt=Symbol("observableProperties"),ft=Symbol("boundObservables"),pt=Symbol("boundProperties"),bt=Symbol("decoratedMethods"),wt=Symbol("decoratedOriginal"),_t=vt(L());function vt(e){if(!e)return _t;return class extends e{set(e,t){if(Be(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);yt(this);const i=this[gt];if(e in this&&!i.has(e))throw new A("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>i.get(e),set(t){const n=i.get(e);let s=this.fire(`set:${e}`,e,t,n);void 0===s&&(s=t),n===s&&i.has(e)||(i.set(e,s),this.fire(`change:${e}`,e,s,n))}}),this[e]=t}bind(...e){if(!e.length||!xt(e))throw new A("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new A("observable-bind-duplicate-properties",this);yt(this);const t=this[pt];e.forEach((e=>{if(t.has(e))throw new A("observable-bind-rebind",this)}));const i=new Map;return e.forEach((e=>{const n={property:e,to:[]};t.set(e,n),i.set(e,n)})),{to:kt,toMany:Ct,_observable:this,_bindProperties:e,_to:[],_bindings:i}}unbind(...e){if(!this[gt])return;const t=this[pt],i=this[ft];if(e.length){if(!xt(e))throw new A("observable-unbind-wrong-properties",this);e.forEach((e=>{const n=t.get(e);n&&(n.to.forEach((([e,t])=>{const s=i.get(e),o=s[t];o.delete(n),o.size||delete s[t],Object.keys(s).length||(i.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else i.forEach(((e,t)=>{this.stopListening(t,"change")})),i.clear(),t.clear()}decorate(e){yt(this);const t=this[e];if(!t)throw new A("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,i)=>{e.return=t.apply(this,i)})),this[e]=function(...t){return this.fire(e,t)},this[e][wt]=t,this[bt]||(this[bt]=[]),this[bt].push(e)}stopListening(e,t,i){if(!e&&this[bt]){for(const e of this[bt])this[e]=this[e][wt];delete this[bt]}super.stopListening(e,t,i)}[gt];[bt];[pt];[ft]}}function yt(e){e[gt]||(Object.defineProperty(e,gt,{value:new Map}),Object.defineProperty(e,ft,{value:new Map}),Object.defineProperty(e,pt,{value:new Map}))}function kt(...e){const t=function(...e){if(!e.length)throw new A("observable-bind-to-parse-error",null);const t={to:[]};let i;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)i.properties.push(e);else{if("object"!=typeof e)throw new A("observable-bind-to-parse-error",null);i={observable:e,properties:[]},t.to.push(i)}})),t}(...e),i=Array.from(this._bindings.keys()),n=i.length;if(!t.callback&&t.to.length>1)throw new A("observable-bind-to-no-callback",this);if(n>1&&t.callback)throw new A("observable-bind-to-extra-callback",this);var s;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==n)throw new A("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(i[0]).callback=t.callback),s=this._observable,this._to.forEach((e=>{const t=s[ft];let i;t.get(e.observable)||s.listenTo(e.observable,"change",((n,o)=>{i=t.get(e.observable)[o],i&&i.forEach((e=>{At(s,e.property)}))}))})),function(e){let t;e._bindings.forEach(((i,n)=>{e._to.forEach((s=>{t=s.properties[i.callback?0:e._bindProperties.indexOf(n)],i.to.push([s.observable,t]),function(e,t,i,n){const s=e[ft],o=s.get(i),r=o||{};r[n]||(r[n]=new Set);r[n].add(t),o||s.set(i,r)}(e._observable,i,s.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{At(this._observable,e)}))}function Ct(e,t,i){if(this._bindings.size>1)throw new A("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const i=e.map((e=>[e,t]));return Array.prototype.concat.apply([],i)}(e,t),i)}function xt(e){return e.every((e=>"string"==typeof e))}function At(e,t){const i=e[pt].get(t);let n;i.callback?n=i.callback.apply(e,i.to.map((e=>e[0][e[1]]))):(n=i.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{vt[e]=_t.prototype[e]}));class Et{_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 Tt(e){let t=new AbortController;function i(...i){return t.abort(),t=new AbortController,e(t.signal,...i)}return i.abort=()=>t.abort(),i}function Pt(e){let t=0;for(const i of e)t++;return t}function St(e,t){const i=Math.min(e.length,t.length);for(let n=0;n<i;n++)if(e[n]!=t[n])return n;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}function It(e){return!(!e||!e[Symbol.iterator])}function Vt(e,t,i={},n=[]){const s=i&&i.xmlns,o=s?e.createElementNS(s,t):e.createElement(t);for(const e in i)o.setAttribute(e,i[e]);!$e(n)&&It(n)||(n=[n]);for(let t of n)$e(t)&&(t=e.createTextNode(t)),o.appendChild(t);return o}class Rt{_config;constructor(e,t){this._config=Object.create(null),t&&this.define(Ot(t)),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,t,i,n=!1){if(tt(t))return void this._setObjectToTarget(e,t,n);const s=t.split(".");t=s.pop();for(const t of s)tt(e[t])||(e[t]=Object.create(null)),e=e[t];if(tt(i))return tt(e[t])||(e[t]=Object.create(null)),e=e[t],void this._setObjectToTarget(e,i,n);n&&void 0!==e[t]||(e[t]=i)}_getFromSource(e,t){const i=t.split(".");t=i.pop();for(const t of i){if(!tt(e[t])){e=null;break}e=e[t]}return e?Ot(e[t]):void 0}_setObjectToTarget(e,t,i){Object.keys(t).forEach((n=>{this._setToTarget(e,n,t[n],i)}))}}function Ot(e){return Me(e,Bt)}function Bt(e){return at(e)||"function"==typeof e?e:void 0}function Mt(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 Lt(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const Ft=Nt(L());function Nt(e){if(!e)return Ft;return class extends e{listenTo(e,t,n,s={}){if(Mt(e)||Lt(e)||e instanceof i.window.EventTarget){const i={capture:!!s.useCapture,passive:!!s.usePassive},o=this._getProxyEmitter(e,i)||new Dt(e,i);this.listenTo(o,t,n,s)}else super.listenTo(e,t,n,s)}stopListening(e,t,n){if(Mt(e)||Lt(e)||e instanceof i.window.EventTarget){const i=this._getAllProxyEmitters(e);for(const e of i)this.stopListening(e,t,n)}else super.stopListening(e,t,n)}_getProxyEmitter(e,t){return function(e,t){const i=e[R];return i&&i[t]?i[t].emitter:null}(this,zt(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=>{Nt[e]=Ft.prototype[e]}));class Dt extends(L()){_domNode;_options;constructor(e,t){super(),F(this,zt(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,i){this.attach(e),L().prototype._addEventListener.call(this,e,t,i)}_removeEventListener(e,t){L().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 zt(e,t){let i=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=k())}(e);for(const e of Object.keys(t).sort())t[e]&&(i+="-"+e);return i}function Ht(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 $t(e){const t=[];let i=e;for(;i&&i.nodeType!=Node.DOCUMENT_NODE;)t.unshift(i),i=i.parentNode;return t}function Ut(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function Wt(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 jt(e){if(!e.target)return null;const t=e.target.ownerDocument,i=e.clientX,n=e.clientY;let s=null;return t.caretRangeFromPoint&&t.caretRangeFromPoint(i,n)?s=t.caretRangeFromPoint(i,n):e.rangeParent&&(s=t.createRange(),s.setStart(e.rangeParent,e.rangeOffset),s.collapse(!0)),s}function qt(e){return"[object Text]"==Object.prototype.toString.call(e)}function Zt(e){return"[object Range]"==Object.prototype.toString.apply(e)}function Gt(e){return e&&e.parentNode?e.offsetParent===i.document.body?null:e.offsetParent:null}const Kt=["top","right","bottom","left","width","height"];class Jt{top;right;bottom;left;width;height;_source;constructor(e){const t=Zt(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),Xt(e)||t)if(t){const t=Jt.getDomRangeRects(e);Qt(this,Jt.getBoundingRect(t))}else Qt(this,e.getBoundingClientRect());else if(Lt(e)){const{innerWidth:t,innerHeight:i}=e;Qt(this,{top:0,right:t,bottom:i,left:0,width:t,height:i})}else Qt(this,e)}clone(){return new Jt(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 Jt(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(Yt(e))return t;let i,n=e,s=e.parentNode||e.commonAncestorContainer;for(;s&&!Yt(s);){const e="visible"===((o=s)instanceof HTMLElement?o.ownerDocument.defaultView.getComputedStyle(o).overflow:"visible");n instanceof HTMLElement&&"absolute"===ei(n)&&(i=n);const r=ei(s);if(e||i&&("relative"===r&&e||"relative"!==r)){n=s,s=s.parentNode;continue}const a=new Jt(s),l=t.getIntersection(a);if(!l)return null;l.getArea()<t.getArea()&&(t=l),n=s,s=s.parentNode}var o;return t}isEqual(e){for(const t of Kt)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!(!t||!t.isEqual(e))}toAbsoluteRect(){const{scrollX:e,scrollY:t}=i.window,n=this.clone().moveBy(e,t);if(Xt(n._source)){const e=Gt(n._source);e&&function(e,t){const i=new Jt(t),n=Wt(t);let s=0,o=0;s-=i.left,o-=i.top,s+=t.scrollLeft,o+=t.scrollTop,s-=n.left,o-=n.top,e.moveBy(s,o)}(n,e)}return n}excludeScrollbarsAndBorders(){const e=this._source;let t,i,n;if(Lt(e))t=e.innerWidth-e.document.documentElement.clientWidth,i=e.innerHeight-e.document.documentElement.clientHeight,n=e.getComputedStyle(e.document.documentElement).direction;else{const s=Wt(e);t=e.offsetWidth-e.clientWidth-s.left-s.right,i=e.offsetHeight-e.clientHeight-s.top-s.bottom,n=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=s.left,this.top+=s.top,this.right-=s.right,this.bottom-=s.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=t,"ltr"===n?this.right-=t:this.left+=t,this.height-=i,this.bottom-=i,this}static getDomRangeRects(e){const t=[],i=Array.from(e.getClientRects());if(i.length)for(const e of i)t.push(new Jt(e));else{let i=e.startContainer;qt(i)&&(i=i.parentNode);const n=new Jt(i.getBoundingClientRect());n.right=n.left,n.width=0,t.push(n)}return t}static getBoundingRect(e){const t={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let i=0;for(const n of e)i++,t.left=Math.min(t.left,n.left),t.top=Math.min(t.top,n.top),t.right=Math.max(t.right,n.right),t.bottom=Math.max(t.bottom,n.bottom);return 0==i?null:(t.width=t.right-t.left,t.height=t.bottom-t.top,new Jt(t))}}function Qt(e,t){for(const i of Kt)e[i]=t[i]}function Yt(e){return!!Xt(e)&&e===e.ownerDocument.body}function Xt(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"function"==typeof e.getBoundingClientRect}function ei(e){return e instanceof HTMLElement?e.ownerDocument.defaultView.getComputedStyle(e).position:"static"}class ti{_element;_callback;static _observerInstance=null;static _elementCallbacks=null;constructor(e,t){ti._observerInstance||ti._createObserver(),this._element=e,this._callback=t,ti._addElementCallback(e,t),ti._observerInstance.observe(e)}get element(){return this._element}destroy(){ti._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){ti._elementCallbacks||(ti._elementCallbacks=new Map);let i=ti._elementCallbacks.get(e);i||(i=new Set,ti._elementCallbacks.set(e,i)),i.add(t)}static _deleteElementCallback(e,t){const i=ti._getElementCallbacks(e);i&&(i.delete(t),i.size||(ti._elementCallbacks.delete(e),ti._observerInstance.unobserve(e))),ti._elementCallbacks&&!ti._elementCallbacks.size&&(ti._observerInstance=null,ti._elementCallbacks=null)}static _getElementCallbacks(e){return ti._elementCallbacks?ti._elementCallbacks.get(e):null}static _createObserver(){ti._observerInstance=new i.window.ResizeObserver((e=>{for(const t of e){const e=ti._getElementCallbacks(t.target);if(e)for(const i of e)i(t)}}))}}function ii(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function ni(e){return t=>t+e}function si(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function oi(e,t,i){e.insertBefore(i,e.childNodes[t]||null)}function ri(e){return e&&e.nodeType===Node.COMMENT_NODE}function ai(e){try{i.document.createAttribute(e)}catch(e){return!1}return!0}function li(e){return!!e&&(qt(e)?li(e.parentElement):!!e.getClientRects&&!!e.getClientRects().length)}function ci({element:e,target:t,positions:n,limiter:s,fitInViewport:o,viewportOffsetConfig:r}){Te(t)&&(t=t()),Te(s)&&(s=s());const a=Gt(e),l=function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new Jt(i.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(r),c=new Jt(e),d=di(t,l);let h;if(!d||!l.getIntersection(d))return null;const u={targetRect:d,elementRect:c,positionedElementAncestor:a,viewportRect:l};if(s||o){if(s){const e=di(s,l);e&&(u.limiterRect=e)}h=function(e,t){const{elementRect:i}=t,n=i.getArea(),s=e.map((e=>new hi(e,t))).filter((e=>!!e.name));let o=0,r=null;for(const e of s){const{limiterIntersectionArea:t,viewportIntersectionArea:i}=e;if(t===n)return e;const s=i**2+t**2;s>o&&(o=s,r=e)}return r}(n,u)}else h=new hi(n[0],u);return h}function di(e,t){const i=new Jt(e).getVisible();return i?i.getIntersection(t):null}class hi{name;config;_positioningFunctionCoordinates;_options;_cachedRect;_cachedAbsoluteRect;constructor(e,t){const i=e(t.targetRect,t.elementRect,t.viewportRect,t.limiterRect);if(!i)return;const{left:n,top:s,name:o,config:r}=i;this.name=o,this.config=r,this._positioningFunctionCoordinates={left:n,top:s},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 ui(e){const t=e.parentNode;t&&t.removeChild(e)}function mi(){const e=i.window.visualViewport;if(!e||!o.isiOS&&!o.isSafari)return{left:0,top:0};return{left:Math.max(Math.round(e.offsetLeft),0),top:Math.max(Math.round(e.offsetTop),0)}}function gi({target:e,viewportOffset:t=0,ancestorOffset:i=0,alignToTop:n,forceScroll:s}){const o=ki(e);let r=o,a=null;for(t=function(e){if("number"==typeof e)return{top:e,bottom:e,left:e,right:e};return e}(t);r;){let l;l=Ci(r==o?e:a),bi({parent:l,getRect:()=>xi(e,r),alignToTop:n,ancestorOffset:i,forceScroll:s});let c=xi(e,r);const d=xi(l,r);if(c.height>d.height){const e=c.getIntersection(d);e&&(c=e)}if(pi({window:r,rect:c,viewportOffset:t,alignToTop:n,forceScroll:s}),r.parent!=r){if(a=r.frameElement,r=r.parent,!a)return}else r=null}}function fi(e,t,i){bi({parent:Ci(e),getRect:()=>new Jt(e),ancestorOffset:t,limiterElement:i})}function pi({window:e,rect:t,alignToTop:i,forceScroll:n,viewportOffset:s}){const o=t.clone().moveBy(0,s.bottom),r=t.clone().moveBy(0,-s.top),a=new Jt(e).excludeScrollbarsAndBorders(),l=i&&n,c=[r,o].every((e=>a.contains(e)));let{scrollX:d,scrollY:h}=e;const u=d,m=h;l?h-=a.top-t.top+s.top:c||(_i(r,a)?h-=a.top-t.top+s.top:wi(o,a)&&(h+=i?t.top-a.top-s.top:t.bottom-a.bottom+s.bottom)),c||(vi(t,a)?d-=a.left-t.left+s.left:yi(t,a)&&(d+=t.right-a.right+s.right)),d==u&&h===m||e.scrollTo(d,h)}function bi({parent:e,getRect:t,alignToTop:i,forceScroll:n,ancestorOffset:s=0,limiterElement:o}){const r=ki(e),a=i&&n;let l,c,d;const h=o||r.document.body;for(;e!=h;)c=t(),l=new Jt(e).excludeScrollbarsAndBorders(),d=l.contains(c),a?e.scrollTop-=l.top-c.top+s:d||(_i(c,l)?e.scrollTop-=l.top-c.top+s:wi(c,l)&&(e.scrollTop+=i?c.top-l.top-s:c.bottom-l.bottom+s)),d||(vi(c,l)?e.scrollLeft-=l.left-c.left+s:yi(c,l)&&(e.scrollLeft+=c.right-l.right+s)),e=e.parentNode}function wi(e,t){return e.bottom>t.bottom}function _i(e,t){return e.top<t.top}function vi(e,t){return e.left<t.left}function yi(e,t){return e.right>t.right}function ki(e){return Zt(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Ci(e){if(Zt(e)){let t=e.commonAncestorContainer;return qt(t)&&(t=t.parentNode),t}return e.parentNode}function xi(e,t){const i=ki(e),n=new Jt(e);if(i===t)return n;{let e=i;for(;e!=t;){const t=e.frameElement,i=new Jt(t).excludeScrollbarsAndBorders();n.moveBy(i.left,i.top),e=e.parent}}return n}const Ai={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},Ei={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},Ti={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},Pi=Li(),Si=Object.fromEntries(Object.entries(Pi).map((([e,t])=>{let i;return i=t in Ti?Ti[t]:e.charAt(0).toUpperCase()+e.slice(1),[t,i]})));function Ii(e){let t;if("string"==typeof e){if(t=Pi[e.toLowerCase()],!t)throw new A("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?Pi.alt:0)+(e.ctrlKey?Pi.ctrl:0)+(e.shiftKey?Pi.shift:0)+(e.metaKey?Pi.cmd:0);return t}function Vi(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 Ii(e.slice(0,-1));const t=Ii(e);return(o.isMac||o.isiOS)&&t==Pi.ctrl?Pi.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function Ri(e,t){let i=Vi(e);const n=t?"Mac"===t:o.isMac||o.isiOS;return Object.entries(n?Ai:Ei).reduce(((e,[t,n])=>(0!=(i&Pi[t])&&(i&=~Pi[t],e+=n),e)),"")+(i?Si[i]:"")}function Oi(e){return e==Pi.arrowright||e==Pi.arrowleft||e==Pi.arrowup||e==Pi.arrowdown}function Bi(e,t){const i="ltr"===t;switch(e){case Pi.arrowleft:return i?"left":"right";case Pi.arrowright:return i?"right":"left";case Pi.arrowup:return"up";case Pi.arrowdown:return"down"}}function Mi(e,t){const i=Bi(e,t);return"down"===i||"right"===i}function Li(){const e={pageup:33,pagedown:34,end:35,home:36,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 Fi=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig","ur","urd"];function Ni(e){return Fi.includes(e)?"rtl":"ltr"}function Di(e){return Array.isArray(e)?e:[e]}function zi(e,t,n){i.window.CKEDITOR_TRANSLATIONS[e]||(i.window.CKEDITOR_TRANSLATIONS[e]={});const s=i.window.CKEDITOR_TRANSLATIONS[e];s.dictionary=s.dictionary||{},s.getPluralForm=n||s.getPluralForm,Object.assign(s.dictionary,t)}function Hi(e,t,n=1,s){if("number"!=typeof n)throw new A("translation-service-quantity-not-a-number",null,{quantity:n});const o=s||i.window.CKEDITOR_TRANSLATIONS,r=function(e){return Object.keys(e).length}(o);1===r&&(e=Object.keys(o)[0]);const a=t.id||t.string;if(0===r||!function(e,t,i){return!!i[e]&&!!i[e].dictionary[t]}(e,a,o))return 1!==n?t.plural:t.string;const l=o[e].dictionary,c=o[e].getPluralForm||(e=>1===e?0:1),d=l[a];if("string"==typeof d)return d;return d[Number(c(n))]}i.window.CKEDITOR_TRANSLATIONS||(i.window.CKEDITOR_TRANSLATIONS={});class $i{uiLanguage;uiLanguageDirection;contentLanguage;contentLanguageDirection;t;translations;constructor({uiLanguage:e="en",contentLanguage:t,translations:i}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=Ni(this.uiLanguage),this.contentLanguageDirection=Ni(this.contentLanguage),this.translations=function(e){return Array.isArray(e)?e.reduce(((e,t)=>st(e,t))):e}(i),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=Di(t),"string"==typeof e&&(e={string:e});const i=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,i)=>i<t.length?t[i]:e))}(Hi(this.uiLanguage,e,i,this.translations),t)}}class Ui extends(L()){_items;_itemMap;_idProperty;_bindToCollection;_bindToExternalToInternalMap;_bindToInternalToExternalMap;_skippedIndexesFromExternal;constructor(e={},t={}){super();const i=It(e);if(i||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],i)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new A("collection-add-item-invalid-index",this);let i=0;for(const n of e){const e=this._getItemIdBeforeAdding(n),s=t+i;this._items.splice(s,0,n),this._itemMap.set(e,n),this.fire("add",n,s),i++}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 A("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,i]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:i}),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 A("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,i=(i,n,s)=>{const o=t._bindToCollection==this,r=t._bindToInternalToExternalMap.get(n);if(o&&r)this._bindToExternalToInternalMap.set(n,r),this._bindToInternalToExternalMap.set(r,n);else{const i=e(n);if(!i)return void this._skippedIndexesFromExternal.push(s);let o=s;for(const e of this._skippedIndexesFromExternal)s>e&&o--;for(const e of t._skippedIndexesFromExternal)o>=e&&o++;this._bindToExternalToInternalMap.set(n,i),this._bindToInternalToExternalMap.set(i,n),this.add(i,o);for(let e=0;e<t._skippedIndexesFromExternal.length;e++)o<=t._skippedIndexesFromExternal[e]&&t._skippedIndexesFromExternal[e]++}};for(const e of t)i(0,e,t.getIndex(e));this.listenTo(t,"add",i),this.listenTo(t,"remove",((e,t,i)=>{const n=this._bindToExternalToInternalMap.get(t);n&&this.remove(n),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(i<t&&e.push(t-1),i>t&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let i;if(t in e){if(i=e[t],"string"!=typeof i)throw new A("collection-add-invalid-id",this);if(this.get(i))throw new A("collection-add-item-already-exists",this)}else e[t]=i=k();return i}_remove(e){let t,i,n,s=!1;const o=this._idProperty;if("string"==typeof e?(i=e,n=this._itemMap.get(i),s=!n,n&&(t=this._items.indexOf(n))):"number"==typeof e?(t=e,n=this._items[t],s=!n,n&&(i=n[o])):(n=e,i=n[o],t=this._items.indexOf(n),s=-1==t||!this._itemMap.get(i)),s)throw new A("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(i);const r=this._bindToInternalToExternalMap.get(n);return this._bindToInternalToExternalMap.delete(n),this._bindToExternalToInternalMap.delete(r),this.fire("remove",n,t),[n,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function Wi(e){const t=e.next();return t.done?null:t.value}class ji extends(Nt(vt())){_elements=new Set;_externalViews=new Set;_blurTimeout=null;constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null)}get elements(){return Array.from(this._elements.values())}get externalViews(){return Array.from(this._externalViews.values())}add(e){if(Zi(e))this._addElement(e);else if(qi(e))this._addView(e);else{if(!e.element)throw new A("focustracker-add-view-missing-element",{focusTracker:this,view:e});this._addElement(e.element)}}remove(e){Zi(e)?this._removeElement(e):qi(e)?this._removeView(e):this._removeElement(e.element)}_addElement(e){if(this._elements.has(e))throw new A("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>{const t=this.externalViews.find((t=>function(e,t){if(Gi(e,t))return!0;return!!t.focusTra