@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251030.0 → 0.0.0-nightly-20251031.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md.
4
- */(()=>{var t={14:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content .footnote-content ul{list-style-type:disc}.ck-content .footnote-content ul ul{list-style-type:circle}.ck-content .footnote-content ul ul ul,.ck-content .footnote-content ul ul ul ul{list-style-type:square}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},331:(t,e,n)=>{t.exports=n(237)("./src/clipboard.js")},355:(t,e,n)=>{t.exports=n(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=o.base?c[0]+o.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=n(f),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var p=i(h,o);o.byIndex=a,e.splice(a,0,{identifier:f,updater:p,references:1})}r.push(f)}return r}function i(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=o(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=n(s[r]);e[a].references--}for(var c=o(t,i),l=0;l<s.length;l++){var u=n(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function o(t,e,o,i){var s;if(o)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,n=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(n,e,!1,t)},remove:function(t){o(n,e,!0,t)}}}},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},901:(t,e,n)=>{t.exports=n(237)("./src/widget.js")},945:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Footnotes:()=>$,FootnotesClipboard:()=>T,FootnotesEditing:()=>v,FootnotesProperties:()=>xt,FootnotesPropertiesEditing:()=>ht,FootnotesPropertiesUI:()=>kt,FootnotesStartCommand:()=>ut,FootnotesStyleCommand:()=>rt,FootnotesTracker:()=>h,FootnotesUI:()=>q,InsertFootnoteCommand:()=>y});var t=n(782),e=n(901),i=n(584),s=n(783);function r(t,e){const n=a();return(r=function(t,e){return n[t-=394]})(t,e)}function a(){const t=["elementName","237095WkrMhk","_trackedElements","20EhaJFa","_getElementKey","reset","408KuCnhI","values","rootName","getItems","remove","createRangeOn","type","insert","_model","element","name","from","211444kaeEsW","clear","position","get","10554710SuWLeT","_elementName","flat","$text","slice","getChanges","29786460llRUYe","$graveyard","15auiESh","69202ILhsnc","set","add","18pLOwZv","nodeAfter","attributes","length","328002pUXgsK","root","getElementKey","has","delete","4897600rMZLTE","push"];return(a=function(){return t})()}const c=r;!function(t){const e=r,n=t();for(;;)try{if(662534===parseInt(e(409))/1+-parseInt(e(434))/2*(parseInt(e(401))/3)+-parseInt(e(419))/4*(parseInt(e(417))/5)+-parseInt(e(422))/6*(-parseInt(e(402))/7)+parseInt(e(414))/8*(-parseInt(e(405))/9)+-parseInt(e(438))/10+parseInt(e(399))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(a);class l{[c(430)];[c(394)];[c(420)];[c(418)]=new Map;constructor(t,e){const n=c;this[n(430)]=t,this[n(394)]=e[n(416)],this[n(420)]=e[n(411)]}[c(421)](){const t=c;this[t(418)][t(435)]()}[c(398)](t){const e=c,n=new Set,o=new Map;for(const i of t){if(e(429)===i[e(428)]&&e(396)!==i[e(432)]&&i[e(436)][e(406)]){const t=this[e(430)][e(427)](i[e(436)][e(406)]);for(const n of t[e(425)]()){if(!n.is(e(431),this[e(394)]))continue;const t=this[e(420)](n);o[e(412)](t)||o[e(403)](t,[]),o[e(437)](t)[e(415)](n)}}if(e(426)===i[e(428)]&&i[e(432)]===this[e(394)]){const t=this[e(420)]({getAttribute:t=>i[e(407)][e(437)](t)});n[e(404)](t)}}for(const[t,o]of this[e(418)])e(400)===o[e(410)][e(424)]&&n[e(404)](t);for(const t of n)this[e(418)][e(413)](t);for(const[t,n]of o)this[e(418)][e(403)](t,n[n[e(408)]-1]);const i=new Set;for(const[t,s]of o)n[e(412)](t)&&(i[e(404)](s[0]),s[e(408)]>1?o[e(403)](t,s[e(397)](1)):o[e(413)](t),n[e(413)](t));return{removed:Array[e(433)](n),inserted:Array[e(433)](o[e(423)]())[e(395)](),moved:Array[e(433)](i)}}}const u=d;function f(){const t=["_footnotes","footnoteId","$graveyard","_footnoteRefsTracker","createRangeIn","min","push","createElement","234iqUkOn","get","listenTo","_footnoteDefsContainerTracker","_insertEmptyFootnotesDefinitionsContainer","_ensureFootnotesReferencesHaveProperOrder","_handleMovedFootnoteReference","300480WssQWH","FootnotesTracker","180weXaEz","change:data","high","after","_handleFootnoteReferencesChanges","_ensureFootnotesDefinitionsContainerExists","_handleInsertedFootnoteReference","9UhdHPY","setAttribute","add","getChanges","1064geMKxt","getChildren","some","editor","_updateFootnotesCounters","singleton","differ","append","end","init","createPositionBefore","reference","parent","_footnotesDefinitions","definition","footnoteRef","getFootnotesDefinitionsObjectElement","childCount","getFootnotesFormatter","isOfficialPlugin","footnoteDefinition","map","440FXKqto","splice","indexOf","115601TxYBic","move","getFootnotes","pluginName","22297XYizjc","compareWith","createRangeOn","unshift","getFootnote","_footnoteFormatter","enqueueChange","paragraph","_sortFootnoteDefinitions","setFootnoteFormatter","isPremiumPlugin","from","footnoteCounter","has","1073110mgkLUF","_handleFootnotesDefinitionsObjectChanges","config","find","_handleFootnoteDefinitionsChanges","document","createPositionAt","_updateFootnoteRefCounter","_handleFootnotesDefinitionsObjectSync","set","getRootNames","819231RQNhmS","isEqual","rootName","findIndex","root","footnoteInlineContent","registerPostFixer","length","19334yaxvvx","before","model","insert","_handleRemoveFootnoteReferenceById","reset","footnotes.multiBlock","low","remove","getAttribute","_footnoteDefsTracker","2PNTqeV","footnotesDefinitions"];return(f=function(){return t})()}function d(t,e){const n=f();return(d=function(t,e){return n[t-=412]})(t,e)}!function(t){const e=d,n=t();for(;;)try{if(202440===parseInt(e(513))/1*(-parseInt(e(458))/2)+parseInt(e(439))/3+parseInt(e(488))/4*(-parseInt(e(510))/5)+parseInt(e(468))/6*(parseInt(e(447))/7)+parseInt(e(475))/8+parseInt(e(484))/9*(-parseInt(e(428))/10)+-parseInt(e(414))/11*(-parseInt(e(477))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(f);class h extends t.Plugin{[u(460)]=[];[u(501)]=null;[u(419)]=null;[u(471)];[u(463)];[u(457)];static get[u(413)](){return u(476)}static get[u(507)](){return!0}static get[u(424)](){return!0}constructor(t){const e=u;super(t),this[e(471)]=new l(this[e(491)][e(449)],{elementName:e(459),getElementKey:()=>e(493)}),this[e(463)]=new l(this[e(491)][e(449)],{elementName:e(503),getElementKey:t=>t[e(456)](e(461))}),this[e(457)]=new l(this[e(491)][e(449)],{elementName:e(508),getElementKey:t=>t[e(456)](e(461))})}[u(497)](){const t=u,{editor:e}=this,{model:n,data:o}=e;n[t(433)][t(445)](e=>{const o=t,i=n[o(433)][o(494)][o(487)]();let s=!1;return this[o(429)](e,i)&&(s=!0),this[o(432)](e,i)&&(s=!0),this[o(481)](e,i)&&(s=!0),this[o(473)](e)&&(s=!0),this[o(436)](e)&&(s=!0),this[o(422)](e)&&(s=!0),s}),this[t(470)](n[t(433)],t(478),()=>{const e=t;n[e(420)]({isUndoable:!1},t=>{this[e(482)](t)})},{priority:t(454)}),this[t(470)](o,t(437),()=>{const e=t;this[e(460)]=[],this[e(471)][e(452)](),this[e(463)][e(452)](),this[e(457)][e(452)]()},{priority:t(479)})}[u(504)](){return this[u(501)]}[u(418)](t){const e=u;return this[e(460)][e(431)](e=>e.id===t)||null}[u(412)](){const t=u;return Array[t(425)](this[t(460)])}[u(506)](){return this[u(419)]}[u(423)](t){this[u(419)]=t}[u(492)](t,e=0){const n=u;let o=!1;for(let i=e;i<this[n(460)][n(446)];i++)this[n(435)](t,i)&&(o=!0);return o}[u(472)](t,e){const n=u,o=t[n(467)](n(459),{});return t[n(495)](o,e),this[n(501)]=o,o}[u(482)](t){const e=u;if(!this[e(460)][e(446)]||this[e(501)])return;const n=this[e(460)][0][e(499)][e(443)],o=this[e(472)](t,n);for(const n of this[e(460)])n[e(502)][e(500)]||t[e(450)](n[e(502)],o,e(496));this[e(492)](t)}[u(429)](t,e){const n=u;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(471)][n(487)](e);if(r[n(446)]&&(this[n(501)]=r[0]),i[n(446)])if(i[n(446)]>1||this[n(501)]&&i[n(490)](t=>t!==this[n(501)])){const e=t[n(467)](n(459),{}),s=[];this[n(501)]&&s[n(466)](this[n(501)]),s[n(466)](...i),t[n(450)](e,s[0],n(448));for(const o of s)t[n(514)](t[n(464)](o),t[n(434)](e,n(496))),t[n(455)](o);this[n(501)]=e,this[n(492)](t),o=!0}else this[n(501)]=i[0];if(s[n(446)]&&n(462)===this[n(501)]?.[n(443)][n(441)]){for(const e of this[n(460)])t[n(455)](e[n(499)]),o=!0;this[n(460)]=[],this[n(501)]=null}return o}[u(432)](t,e){const n=u;let o=!1;const i=this[n(491)][n(430)][n(469)](n(453)),{inserted:s,moved:r}=this[n(457)][n(487)](e);for(const e of[...r,...s]){const s=e[n(456)](n(461)),r=this[n(418)](s);r&&(r[n(502)]=e),p(t,i,e)&&(o=!0)}return o}[u(481)](t,e){const n=u;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(463)][n(487)](e);for(const e of i)this[n(451)](t,e)&&(o=!0);for(const e of s)this[n(483)](t,e)&&(o=!0);for(const e of r)this[n(474)](t,e)&&(o=!0);return o}[u(436)](t){const e=u;if(!this[e(501)])return!1;let n=!1;if(this[e(501)][e(505)]!==this[e(460)][e(446)]){const o=[];for(const t of this[e(501)][e(489)]()){const i=t[e(456)](e(461));this[e(418)](i)||(o[e(417)](t),n=!0)}for(const n of o)t[e(455)](n)}const o=new Set,i=[];for(const t of this[e(501)][e(489)]()){const s=t[e(456)](e(461));o[e(427)](s)?(i[e(417)](t),n=!0):o[e(486)](s)}for(const n of i)t[e(455)](n);return this[e(501)][e(505)]||(t[e(455)](this[e(501)]),this[e(501)]=null,n=!0),n}[u(483)](t,e){const n=u;if(this[n(460)][n(431)](t=>t[n(499)]===e))return!1;let o=!1;const i=e[n(456)](n(461)),s=this[n(460)][n(442)](t=>t.id===i);-1!==s&&(t[n(455)](this[n(460)][s][n(499)]),this[n(460)][n(511)](s,1),o=!0);let r=this[n(501)]?function(t,e){const o=n;for(const n of t[o(489)]())if(n[o(456)](o(461))===e)return n;return null}(this[n(501)],i):null;r||(r=t[n(467)](n(508),{footnoteId:i}),this[n(501)]&&(t[n(450)](r,this[n(501)],n(496)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(491)][n(449)],this[n(460)],e);this[n(460)][n(511)](c,0,a);let l=c;return-1!==s&&(l=Math[n(465)](c,s)),this[n(492)](t,l)&&(o=!0),o}[u(451)](t,e){const n=u,o=this[n(460)][n(442)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(460)][o];return n(462)!==s[n(502)][n(443)][n(441)]&&(t[n(455)](s[n(502)]),i=!0),this[n(460)][n(511)](o,1),this[n(492)](t,o)&&(i=!0),i}[u(474)](t,e){const n=u,o=e[n(456)](n(461)),i=this[n(460)][n(442)](t=>t.id===o),s=this[n(460)][i];let r=!1;s[n(499)]=e,this[n(460)][n(511)](i,1);const a=m(this[n(491)][n(449)],this[n(460)],e);return this[n(460)][n(511)](a,0,s),this[n(492)](t,Math[n(465)](i,a))&&(r=!0),r}[u(435)](t,e){const n=u;if(!this[n(501)])return!1;const o=this[n(460)][e];let i;return i=this[n(419)]?this[n(419)]({footnote:o,container:this[n(501)],digits:String(this[n(460)][n(446)])[n(446)],value:e+1}):String(e+1),o[n(499)][n(456)](n(426))!=i&&(t[n(485)](n(426),i,o[n(499)]),!0)}[u(422)](t){const e=u;if(!this[e(501)]||this[e(460)][e(446)]<2)return!1;if(function(t,n){const o=e;if(t[o(446)]!==n[o(446)])return!1;for(let e=0;e<t[o(446)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(460)][e(509)](t=>t.id),Array[e(425)](this[e(501)][e(489)]())[e(509)](t=>t[e(456)](e(461)))))return!1;let n=!1;for(let o=0;o<this[e(460)][e(446)];o++){const i=this[e(460)][o],s=t[e(498)](i[e(502)]),r=t[e(434)](this[e(501)],o);s[e(440)](r)||(t[e(514)](t[e(416)](i[e(502)]),r),n=!0)}return n}[u(473)](t){const e=u;if(!this[e(460)][e(446)])return!1;const{model:n}=this[e(491)];let o=!1;for(let i=0;i<this[e(460)][e(446)]-1;i++){const s=this[e(460)][i],r=this[e(460)][i+1],a=n[e(498)](s[e(499)]),c=n[e(498)](r[e(499)]);e(480)===a[e(415)](c)&&(this[e(474)](t,s[e(499)]),i=-1,o=!0)}return o}}function p(t,e,n){const o=u;if(n[o(505)])return!1;const i=o(e?421:444);return t[o(450)](t[o(467)](i),n),!0}function m(t,e,n){const o=u;if(0===e[o(446)])return 0;const i=t[o(498)](n);for(let n=0;n<e[o(446)];n++){const s=e[n],r=t[o(498)](s[o(499)]);if(o(448)===i[o(415)](r))return n}const s=n[o(443)];let r=-1;for(let t=e[o(446)]-1;t>=0;t--)if(e[t][o(499)][o(443)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(433)][o(438)](),c=a[o(512)](s[o(441)]),l=a[c+1];if(l)for(let t=0;t<e[o(446)];t++)if(e[t][o(499)][o(443)][o(441)]===l)return t;return e[o(446)]}const g=w;function w(t,e){const n=b();return(w=function(t,e){return n[t-=179]})(t,e)}!function(t){const e=w,n=t();for(;;)try{if(401407===parseInt(e(202))/1*(-parseInt(e(215))/2)+-parseInt(e(184))/3*(-parseInt(e(194))/4)+parseInt(e(196))/5+-parseInt(e(198))/6+-parseInt(e(201))/7+-parseInt(e(183))/8*(-parseInt(e(181))/9)+parseInt(e(199))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(b);class y extends t.Command{[g(212)](){const t=g,e=this[t(195)][t(189)][t(211)][t(188)],n=this[t(193)](e);this[t(180)]=!!n}[g(213)](t){const e=g,{editor:n}=this,{model:o}=n,{selection:s}=o[e(211)],r=this[e(193)](s);if(!r)return;const a=n[e(185)][e(182)](e(200)),c=t?.[e(187)]??(0,i.uid)();!function(t){const n=e;return n(197)==typeof t&&t[n(190)]>0&&!/\s/[n(206)](t)&&!/^\d/[n(206)](t)}(c)?(0,i.logWarning)(e(192)):(o[e(205)](t=>{const n=e,i=t[n(191)](n(209),{footnoteId:c});o[n(179)](i,r,null)}),a[e(214)](c))}[g(193)](t){const e=g,{model:n}=this[e(195)],{schema:o}=n,i=t[e(210)]();for(const t of i[e(186)]())if(o[e(203)](t)||o[e(204)](t))return null;const s=i[e(208)];return o[e(207)](s,e(209))?s:null}}function b(){const t=["insertObject","isEnabled","7127451wftWRA","get","8bLYgyp","405327QfgQCH","plugins","getItems","footnoteId","selection","model","length","createElement","insert-footnote-command-executed-with-invalid-id","_getPositionToInsertFootnote","8oGtnpZ","editor","1015305LPtVJu","string","89766WrQwYv","170000bMoioc","FootnotesEditing","719649UJfRqM","1wglhbJ","isBlock","isObject","change","test","checkChild","end","footnoteRef","getFirstRange","document","refresh","execute","_moveSelectionToFootnoteDefinition","1526086FiNAOs"];return(b=function(){return t})()}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[h]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new y(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),n=window[m([68,97,116,101])][m([110,111,119])](),o=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{o[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=o[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;o[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,o)=>{o[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),n[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function n(t){for(let n=0;n<t[m([108,101,110,103,116,104])];n++){const o=t[m([99,104,97,114,67,111,100,101,65,116])](n);e=(e<<5)+e+o,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,o])=>{n(e),t(o)}):n(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function h(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function p(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const n=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let n=m([117]);for(let o=0;o<t[m([108,101,110,103,116,104])];o+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),n+=e[i]}return n}();o[n]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,o[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=p,o[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,o[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&n()?e:null;function n(){const t=e[m([106,116,105])],n=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),o={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete o[m([118,99])],f(o)==n}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),o[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function p(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(o){a(o)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(n-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),o=h(d(window[m([77,97,116,104])][m([99,101,105,108])](n/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,o)}function r(){const e=m([108,108,99,116,45])+d(f(t)),n=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return n?window[m([112,97,114,115,101,73,110,116])](h(n),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,n)=>{t[m([116,104,101,110])](e,n),window[m([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,n)=>{if(n[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{p(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const o=a[m([115,112,108,105,116])](m([46])),[i,s,r]=o;return e(i),await n(i,s,r),t}catch{return!1}function e(e){const n=l(e);n&&n[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function n(e,n,o){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(o),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+n),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1761782400;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:n}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](n))return!0;const o=n[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=o[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(o[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>o[m([101,118,101,114,121])]((e,n)=>t[n]===e||t[n]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&p?new(window[m([80,114,111,109,105,115,101])])((t,n)=>{e[m([116,104,101,110])](t,n),p[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},n)}):e||p||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(h).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),n.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(h).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(i.reference,"on")}),n.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:n,editing:o}=t,{t:i}=t.locale;n.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:n})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;n.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of o.view.createRangeIn(i))t.is("$textProxy")?n.consume(t.textNode,{name:!0}):t.is("element")&&n.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),n.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>x(t,e)}),n.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:n})=>{const o=t.getAttribute("footnoteCounter");return(0,e.toWidget)(x(t,n),n,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",o)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:n}=t.locale,{conversion:o}=t;o.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),o.for("upcast").add(t=>{t.on("element:ol",(t,e,n)=>{const o=e.viewItem;if(!o.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!n.consumable.consume(o,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,n)=>{const o=e.viewItem;o.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&n.consumable.consume(o,{name:!0,classes:"footnotes-divider"})})}),o.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>E(e)}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=E(o,{"data-footnotes-list-label":n("Footnotes")}),s=(0,e.toWidget)(i,o,{hasSelectionHandle:!0,label:n("Footnotes")});return o.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:n}=t,o=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,n)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes-list"))return;if(!n.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=n.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!n.safeInsert(r,e.modelCursor))return;n.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(n.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),n.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(o)n.convertChildren(a,r);else{const t=n.writer.createElement("footnoteInlineContent");n.writer.insert(t,r),n.convertChildren(a,t)}n.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of n)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const n=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:n,t:o}=t,i=t.model.document.selection;t.keystrokes.set("CTRL+Shift+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Shift+D"}]}),this.listenTo(n.view.document,"enter",(t,e)=>{const n=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(n){const o=n.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(o),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let n=!1;this.listenTo(e.view.document,"pointerdown",(t,o)=>{const{target:i}=o,s=e.view.document.selection;n=!!(i.is("element","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:o}=e;if(!o.is("element","a"))return;if(o.parent?.is("element","sup")&&o.parent.hasClass("footnote")&&!n)return void e.preventDefault();let i=o.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:n})=>{if(!k(e))return null;if(!t)return n.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const o=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const n=e.toViewElement(t);return!!n&&k(t)!==n.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function E(t,e={}){const n=t.createEmptyElement("hr",{class:"footnotes-divider"}),o=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[n,o])}function x(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{id:"ref-"+n,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function P(t,n,o,{dataPipeline:i}={}){const{t:s}=o,r=t.getAttribute("footnoteId"),a=n.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?n.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(n.createEditableElement("div",{class:"footnote-content"}),n,{label:s("Footnote content.")});return n.insert(n.createPositionAt(c,0),n.createSlot()),n.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var S=n(331);const _=L;function L(t,e){const n=D();return(L=function(t,e){return n[t-=249]})(t,e)}function D(){const t=["_handleCopyFootnotesDefinitions","add","contentInsertion","clipboardInput","root","140vWaMQX","parse","2207303gSgdxz","517317cVYgpz","_insertEmptyFootnotesDefinitionsContainer","toModel","setAttribute","getFirstRange","sourceEditorId","8RsMrfk","getFootnotes","getData","toData","from","remove","editing","outputTransformation","append","footnotesDefinitions","selection","78wYddrg","isOfficialPlugin","isPremiumPlugin","init","316030QGFhbS","createElement","349281nVkJgu","entries","3447540bEvREZ","content","toView","length","document","create","2VMtrtV","application/ckeditor5-footnotes","listenTo","dataTransfer","change","drop","setData","htmlProcessor","1022592isBupt","push","element","stringify","requires","footnoteId","end","method","pluginName","editor","_defineClipboardIntegration","definition","_handlePasteFootnotesDefinitions","FootnotesClipboard","getFootnotesDefinitionsObjectElement","getAttribute","data","insert","createRangeIn","reduce","footnoteDefinition","find","171705xeJJkD","footnoteRef","getFootnote","get"];return(D=function(){return t})()}!function(t){const e=L,n=t();for(;;)try{if(229070===-parseInt(e(290))/1+parseInt(e(298))/2*(parseInt(e(267))/3)+parseInt(e(306))/4+parseInt(e(255))/5*(parseInt(e(284))/6)+parseInt(e(266))/7*(-parseInt(e(273))/8)+-parseInt(e(292))/9+parseInt(e(264))/10*(parseInt(e(288))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(D);class T extends t.Plugin{static get[_(314)](){return _(319)}static get[_(310)](){return[v,S.ClipboardPipeline]}static get[_(285)](){return!0}static get[_(286)](){return!0}[_(287)](){this[_(316)]()}[_(316)](){const t=_;this[t(259)](),this[t(318)]()}[_(259)](){const t=_,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(258)](S.ClipboardPipeline),s=n[t(258)](h);this[t(300)](i,t(280),(n,i)=>{const r=t,a=function(t,e){const n=L,o=new Set;for(const{item:i}of t[n(251)](e))i.is(n(308),n(256))&&o[n(260)](i[n(321)](n(311)));return Array[n(277)](o)}(o,i[r(293)]);if(!a[r(295)])return;const c=s[r(274)](),l=a[r(252)]((t,n)=>{const o=r,i=c[o(254)](t=>t.id===n);if(i){const n=e[o(249)][o(294)](i[o(317)],{isClipboardPipeline:!0}),s=e[o(249)][o(305)][o(276)](n);t[i.id]=s}return t},Object[r(297)](null));i[r(301)][r(304)](r(299),JSON[r(309)](l))})}[_(318)](){const t=_,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(279)],r=o[t(258)](S.ClipboardPipeline),a=o[t(258)](h);let c=null;this[t(300)](s[t(296)],t(262),(e,n)=>{const o=t,i=n[o(301)][o(275)](o(299));c=i?JSON[o(265)](i):null}),this[t(300)](r,t(261),(o,s)=>{const r=t;if(!c)return;const l=s[r(272)]===this[r(315)].id;l&&r(303)===s[r(313)]||n[r(302)](t=>{const o=r;!function(t,e){const n=L,o=[];for(const{item:i}of t[n(251)](e))i.is(n(308),n(282))&&o[n(307)](i);for(const e of o)t[n(278)](e)}(t,s[o(293)]);let u=a[o(320)]();if(!u){const e=n[o(296)][o(283)][o(271)]()[o(263)];u=a[o(268)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(297)](null);for(const{item:o}of t[s(251)](e))if(o.is(s(308),s(256))){const e=o[s(321)](s(311));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(270)](s(311),r[e],o)}return r}(t,s[o(293)],t=>!l||null!==a[o(257)](t));for(const[n,i]of Object[o(291)](c)){const s=f[n]||n,r=t[o(289)](o(253),{footnoteId:s}),a=e[o(249)][o(305)][o(294)](i),c=e[o(249)][o(269)](a,r);t[o(281)](c,r),t[o(250)](r,u,o(312))}c=null})})}}var A=n(311),V=n(355),R=n(450),O=n.n(R),N=n(774),K=n.n(N),M=n(265),j=n.n(M),B=n(410),U=n.n(B),W=n(238),z=n.n(W),H=n(14),J={attributes:{"data-cke":!0}};J.setAttributes=U(),J.insert=j().bind(null,"head"),J.domAPI=K(),J.insertStyleElement=z();O()(H.A,J);H.A&&H.A.locals&&H.A.locals;class q extends t.Plugin{licenseKey;_licenseKeyCheckInterval;static get pluginName(){return"FootnotesUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;e.add("insertFootnote",X(t,A.ButtonView)),e.add("menuBar:insertFootnote",X(t,A.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const n=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in n){const o=e,i=n[o];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete n[o],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&n._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&n._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&n._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&n._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&n._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&n._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&n._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function X(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof A.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:V.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}function Y(t,e){var n=Q();return(Y=function(t,e){return n[t-=265]})(t,e)}function Q(){var t=["4223272rUjVtL","7ZnXpTS","160746RKKvLX","requires","isPremiumPlugin","5xcFLcm","Footnotes","793408LtgLYg","2228148EGqeJt","9745zvRjrs","isOfficialPlugin","115924CcpOwP","305658KmIfHW","pluginName"];return(Q=function(){return t})()}var Z=Y;!function(t){for(var e=Y,n=t();;)try{if(264956===-parseInt(e(270))/1+-parseInt(e(268))/2+-parseInt(e(273))/3+-parseInt(e(272))/4*(parseInt(e(266))/5)+parseInt(e(277))/6+-parseInt(e(276))/7*(-parseInt(e(275))/8)+parseInt(e(269))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Q);class $ extends t.Plugin{static get[Z(274)](){return Z(267)}static get[Z(278)](){return[v,T,q]}static get[Z(271)](){return!0}static get[Z(265)](){return!0}}const G=et;function tt(){const t=["1890DTSZXq","decimal-leading-zero","1738530nzKKxQ","2MLlHNl","upper-alpha","14hOofTj","1416177OxCeZb","lower-alpha","lower-roman","lower-latin","upper-roman","1860NJkYPU","11099EktUzf","364440NqIxnR","1072038XJLNec","84127MjhOne","decimal","1320ExzTTU","upper-latin"];return(tt=function(){return t})()}function et(t,e){const n=tt();return(et=function(t,e){return n[t-=445]})(t,e)}!function(t){const e=et,n=t();for(;;)try{if(215669===-parseInt(e(455))/1*(-parseInt(e(462))/2)+parseInt(e(454))/3+parseInt(e(457))/4*(parseInt(e(459))/5)+-parseInt(e(461))/6+-parseInt(e(445))/7*(parseInt(e(453))/8)+-parseInt(e(446))/9+parseInt(e(451))/10*(parseInt(e(452))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(tt);const nt=[G(456),G(460),G(449),G(458),G(447),G(463),G(448),G(450)],ot=st;function it(){const t=["170fhmQvn","146498JsoVOi","2431bneZRo","8820TkdIOG","50tJhWsK","footnotesListStyle","166YcbRwb","getFootnotesDefinitionsObjectElement","change","value","includes","refresh","189VPmqUj","1049951vVBOYD","setAttribute","2377992SpYQKL","36rrsyml","34664ccoguF","61200OXqDzp","isEnabled","_updateFootnotesCounters","model","execute","getAttribute","get","plugins"];return(it=function(){return t})()}function st(t,e){const n=it();return(st=function(t,e){return n[t-=314]})(t,e)}!function(t){const e=st,n=t();for(;;)try{if(101874===parseInt(e(338))/1*(parseInt(e(316))/2)+parseInt(e(326))/3*(-parseInt(e(327))/4)+-parseInt(e(336))/5*(-parseInt(e(339))/6)+-parseInt(e(323))/7+parseInt(e(328))/8*(-parseInt(e(322))/9)+-parseInt(e(314))/10*(-parseInt(e(337))/11)+parseInt(e(325))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(it);class rt extends t.Command{[ot(321)](){const t=ot,{editor:e}=this,n=e[t(335)][t(334)](h)[t(317)]();this[t(329)]=!!n,this[t(319)]=n?.[t(333)](t(315))??null}[ot(332)]({value:t}){const e=ot,{editor:n}=this,o=n[e(335)][e(334)](h),i=o[e(317)]();i&&nt[e(320)](t)&&n[e(331)][e(318)](n=>{const s=e;n[s(324)](s(315),t,i),o[s(330)](n)})}}const at=lt;function ct(){const t=["setAttribute","isInteger","footnotesListStart","value","execute","4461126EvQIoH","refresh","7752549IMxlDm","1005426mRJlRN","change","plugins","8HilRab","_updateFootnotesCounters","model","3909292CmOPJf","3vSDjRC","getFootnotesDefinitionsObjectElement","isEnabled","4632588gETeZN","501848ctejXG","get","2515700EvjOEi","getAttribute"];return(ct=function(){return t})()}function lt(t,e){const n=ct();return(lt=function(t,e){return n[t-=204]})(t,e)}!function(t){const e=lt,n=t();for(;;)try{if(631421===parseInt(e(211))/1+parseInt(e(222))/2+parseInt(e(218))/3*(-parseInt(e(217))/4)+parseInt(e(224))/5+-parseInt(e(208))/6+parseInt(e(210))/7+parseInt(e(214))/8*(-parseInt(e(221))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ct);class ut extends t.Command{[at(209)](){const t=at,{editor:e}=this,n=e[t(213)][t(223)](h)[t(219)]();this[t(220)]=!!n,this[t(206)]=n?.[t(225)](t(205))??null}[at(207)]({value:t}){const e=at,{editor:n}=this,o=n[e(213)][e(223)](h),i=o[e(219)]();i&&Number[e(204)](t)&&n[e(216)][e(212)](n=>{const s=e;n[s(226)](s(205),t,i),o[s(215)](n)})}}const ft=wt;function dt(){const t=["11651553KfoQma","attribute:footnotesListStart:footnotesDefinitions","hasClass","footnotesListStyle","add","6895365iiURTP","from","document","init","floor","footnotes.footnotesProperties.defaultListStyle","item","differ","createRangeOn","getChanges","removeStyle","_updateFootnotesCounters","decimal-leading-zero","decimal","writer","pluginName","_getDefaultListStyle","parseInt","3070152LgReQK","_defineFormatter","footnotesDefinitions","footnotes.footnotesProperties.defaultStartIndex","upcast","709026XDnVJO","type","footnotesStart","setAttribute","nodeAfter","insert","max","schema","consume","toUpperCase","find","getItems","commands","4576420BoHZcb","footnotes-list","_getDefaultStartIndex","2LvPBTq","isNaN","lower-latin","for","plugins","toViewElement","lower-alpha","getChildren","editor","name","$text","_formatFootnoteListValue","define","config","setStyle","_definePostfixer","position","hasAttribute","list-style-type","footnotesListStart","lower-roman","_defineSchema","_defineConverters","upper-roman","mapper","getStyle","checkAttribute","4501fwEoyF","isOfficialPlugin","element:ol","upper-latin","parent","padStart","11292rjFVzP","3Ofaayj","viewItem","26651060TzEIPU","toLowerCase","downcast","FootnotesPropertiesEditing","getAttribute","removeAttribute","requires","registerPostFixer","setFootnoteFormatter","start","isPremiumPlugin","attribute:footnotesListStyle:footnotesDefinitions","model","consumable","get","footnotesStyle","upper-alpha","extend","fromCharCode","element","modelCursor"];return(dt=function(){return t})()}!function(t){const e=wt,n=t();for(;;)try{if(720588===-parseInt(e(465))/1*(-parseInt(e(449))/2)+-parseInt(e(499))/3*(parseInt(e(462))/4)+parseInt(e(527))/5+parseInt(e(498))/6*(-parseInt(e(492))/7)+-parseInt(e(444))/8+-parseInt(e(522))/9+parseInt(e(501))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(dt);class ht extends t.Plugin{static get[ft(441)](){return ft(504)}static get[ft(507)](){return[v,h]}static get[ft(493)](){return!0}static get[ft(511)](){return!0}[ft(429)](){const t=ft,{editor:e}=this;e[t(478)][t(477)](t(431),t(439)),e[t(478)][t(477)](t(447),1),e[t(461)][t(526)](t(516),new rt(e)),e[t(461)][t(526)](t(451),new ut(e)),this[t(486)](),this[t(487)](),this[t(445)](),this[t(480)]()}[ft(486)](){const t=ft,{editor:e}=this,{schema:n}=e[t(513)];n[t(518)](t(446),{allowAttributes:[t(525),t(484)]})}[ft(487)](){const t=ft,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(468)](t(448))[t(526)](e=>{const n=t;e.on(n(494),(t,e,o)=>{const s=n,r=e[s(500)],a=e[s(521)]?.[s(496)];r[s(524)](s(463))&&a?.is(s(520),s(446))&&(function(t,e,n,o){const i=s;if(!o[i(491)](e,i(484)))return;let r=1;const a=n[i(514)][i(457)](t,{attributes:i(510)});if(a){const e=Number[i(443)](t[i(505)](i(510)),10);Number[i(466)](e)||(r=e)}!a&&e[i(482)](i(484))||n[i(440)][i(452)](i(484),r,e)}(r,a,o,i),function(t,e,n,o){const i=s;if(!o[i(491)](e,i(525)))return;let r=i(439),a=!1;if(n[i(514)][i(457)](t,{attributes:i(450)})){const e={1:i(439),a:i(471),A:i(517),i:i(485),I:i(488)}[t[i(505)](i(450))];e&&(r=e),a=!0}n[i(514)][i(457)](t,{styles:i(483)})&&(r=t[i(490)](i(483)),a=!0),!a&&e[i(482)](i(525))||n[i(440)][i(452)](i(525),r,e)}(r,a,o,i))})}),n[t(468)](t(503))[t(526)](e=>{const n=t;e.on(n(523),(t,e,o)=>{const i=n;if(!o[i(514)][i(457)](e[i(432)],t[i(474)]))return;const s=pt(e[i(432)],o[i(489)]),{attributeNewValue:r}=e;null==r||1===r?o[i(440)][i(506)](i(510),s):o[i(440)][i(452)](i(510),String(r),s)}),e.on(n(512),(t,e,o)=>{const i=n;if(!o[i(514)][i(457)](e[i(432)],t[i(474)]))return;const s=pt(e[i(432)],o[i(489)]),{attributeNewValue:r}=e;r&&i(439)!==r?o[i(440)][i(479)](i(483),r,s):o[i(440)][i(436)](i(483),s)})})}[ft(480)](){const t=ft,{editor:e}=this,{model:n}=e,o=e[t(469)][t(515)](h),i=this[t(442)](),s=this[t(464)]();n[t(428)][t(508)](e=>{const r=t,a=n[r(428)][r(433)][r(435)]();let c=!1;for(const t of a){if(r(454)!==t[r(450)]||r(475)===t[r(474)])continue;const o=n[r(434)](t[r(481)][r(453)]);for(const t of o[r(460)]())t.is(r(520),r(446))&&(!t[r(482)](r(484))&&n[r(456)][r(491)](t,r(484))&&(e[r(452)](r(484),s,t),c=!0),!t[r(482)](r(525))&&n[r(456)][r(491)](t,r(525))&&(e[r(452)](r(525),i,t),c=!0))}return c&&o[r(437)](e),c})}[ft(445)](){const t=ft,{editor:e}=this;e[t(469)][t(515)](h)[t(509)](e=>this[t(476)](e))}[ft(442)](){const t=ft;return this[t(473)][t(478)][t(515)](t(431))}[ft(464)](){const t=ft;return this[t(473)][t(478)][t(515)](t(447))}[ft(476)]({container:t,value:e,digits:n}){const o=ft,i=t[o(505)](o(525)),s=t[o(505)](o(484)),r=Math[o(430)](e)+(s??1)-1;switch(i){case o(438):return function(t,e){const n=o;return String(t)[n(497)](e,"0")}(r,Math[o(455)](2,n));case o(471):case o(467):return mt(r,!1);case o(517):case o(495):return mt(r,!0);case o(485):return yt(r,!1);case o(488):return yt(r,!0);default:return String(r)}}}function pt(t,e){const n=ft,o=e[n(470)](t);return Array[n(427)](o[n(472)]())[n(459)](t=>t.is(n(520),"ol")&&t[n(524)](n(463)))}function mt(t,e){const n=ft;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(519)](97+t)+o,i=Math[n(430)]((i-1)/26)}return e?o[n(458)]():o}const gt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function wt(t,e){const n=dt();return(wt=function(t,e){return n[t-=427]})(t,e)}function yt(t,e){const n=ft;let o="",i=t;for(const{value:t,numeral:e}of gt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(502)]()}class bt extends A.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new A.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:n}){super(t),this.focusCycler=new A.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,n),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,A.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const n=new A.View(this.locale);return n.children=n.createCollection(),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){for(const t of this.children)if(t instanceof A.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},n.focusTracker=new i.FocusTracker,n.keystrokes=new i.KeystrokeHandler,n.render(),n.keystrokes.listenTo(n.element),this.children.add(n),n}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),n=[e],o=new A.CollapsibleView(this.locale,n);return o.set({label:t("Footnotes properties"),isCollapsed:!0}),o.buttonView.bind("isEnabled").toMany(n,"isEnabled",(...t)=>t.some(t=>t)),o.buttonView.on("change:isEnabled",(t,e,n)=>{n||(o.isCollapsed=!0)}),this.children.add(o),[e,o]}_createStartIndexPropertyView(){const{t}=this.locale,e=new A.LabeledFieldView(this.locale,A.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)?e.errorText=t("Invalid footnotes start index value."):n.checkValidity()?this.fire("footnotesListStart",{startIndex:o}):e.errorText=t(o<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var vt=n(945),It={attributes:{"data-cke":!0}};It.setAttributes=U(),It.insert=j().bind(null,"head"),It.domAPI=K(),It.insertStyleElement=z();O()(vt.A,It);vt.A&&vt.A.locals&&vt.A.locals;class kt extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[A.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var n;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(n=t,t=>{const{t:e}=t,o=n.commands.get("footnotesStyle"),i=(0,A.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(o,"isEnabled"),s.set({label:e("Footnotes style"),icon:V.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:n}=t.locale,o=n("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:V.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:V.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:V.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:V.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:V.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:V.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:n,icon:o,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new A.ButtonView(e);return a.set({label:n,icon:o,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new bt(t.locale,{styleGridAriaLabel:o,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,n)=>{t.execute("footnotesStart",{value:n.startIndex})}),s}({editor:n,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:n}=t.locale,o=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=A.BalloonPanelView;o.register("footnotesDefinitions",{ariaLabel:n("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}function Ct(){var t=["1670978HPGuLs","4273445RkCMWf","requires","400337YBwvFV","2731127hlnBTq","isPremiumPlugin","isOfficialPlugin","pluginName","6172812maJEKC","11709224lRJxDS","542208CEAKgP","8WAaJSi","FootnotesProperties"];return(Ct=function(){return t})()}var Ft=Et;function Et(t,e){var n=Ct();return(Et=function(t,e){return n[t-=414]})(t,e)}!function(t){for(var e=Et,n=t();;)try{if(805347===-parseInt(e(417))/1+-parseInt(e(414))/2+-parseInt(e(424))/3*(-parseInt(e(425))/4)+parseInt(e(415))/5+-parseInt(e(422))/6+parseInt(e(418))/7+parseInt(e(423))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ct);class xt extends t.Plugin{static get[Ft(421)](){return Ft(426)}static get[Ft(416)](){return[ht,kt]}static get[Ft(420)](){return!0}static get[Ft(419)](){return!0}}function Pt(){var t=["5353686NRXYkG","2257320wwricK","6399953lLsymu","1023170wTjYFP","1287676gwswyx","433496uswulw","5UEoVfZ","3nJULTb","1063008bQlWzd"];return(Pt=function(){return t})()}function St(t,e){var n=Pt();return(St=function(t,e){return n[t-=177]})(t,e)}!function(t){for(var e=St,n=t();;)try{if(614436===-parseInt(e(183))/1+parseInt(e(181))/2*(parseInt(e(185))/3)+parseInt(e(182))/4+parseInt(e(184))/5*(parseInt(e(177))/6)+parseInt(e(180))/7+-parseInt(e(179))/8+-parseInt(e(178))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Pt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
4
+ */(()=>{var t={14:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content .footnote-content ul{list-style-type:disc}.ck-content .footnote-content ul ul{list-style-type:circle}.ck-content .footnote-content ul ul ul,.ck-content .footnote-content ul ul ul ul{list-style-type:square}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},331:(t,e,n)=>{t.exports=n(237)("./src/clipboard.js")},355:(t,e,n)=>{t.exports=n(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=o.base?c[0]+o.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=n(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,o);o.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=o(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=n(s[r]);e[a].references--}for(var c=o(t,i),l=0;l<s.length;l++){var u=n(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function o(t,e,o,i){var s;if(o)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,n=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(n,e,!1,t)},remove:function(t){o(n,e,!0,t)}}}},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},901:(t,e,n)=>{t.exports=n(237)("./src/widget.js")},945:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Footnotes:()=>Z,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>Et,FootnotesPropertiesEditing:()=>pt,FootnotesPropertiesUI:()=>kt,FootnotesStartCommand:()=>ut,FootnotesStyleCommand:()=>st,FootnotesTracker:()=>f,FootnotesUI:()=>q,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);function r(){const t=["getElementKey","getChanges","692643WJCgnE","$graveyard","from","getItems","7154376HJnAZV","_model","3591087YPkyTt","add","elementName","rootName","2309255JGTnhb","attributes","1388212AGsqWL","18TTTbIG","insert","$text","2CXpNqy","reset","values","clear","has","push","slice","type","_getElementKey","remove","_trackedElements","4129854DcpLll","3434120mKukkW","8RabSPP","root","delete","length","position","get","createRangeOn","set","element","nodeAfter","_elementName","flat","name"];return(r=function(){return t})()}function a(t,e){const n=r();return(a=function(t,e){return n[t-=357]})(t,e)}const c=a;!function(t){const e=a,n=t();for(;;)try{if(730622===-parseInt(e(363))/1+parseInt(e(379))/2*(parseInt(e(369))/3)+-parseInt(e(392))/4*(-parseInt(e(373))/5)+-parseInt(e(390))/6+parseInt(e(375))/7+-parseInt(e(367))/8+-parseInt(e(376))/9*(-parseInt(e(391))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(r);class l{[c(368)];[c(358)];[c(387)];[c(389)]=new Map;constructor(t,e){const n=c;this[n(368)]=t,this[n(358)]=e[n(371)],this[n(387)]=e[n(361)]}[c(380)](){const t=c;this[t(389)][t(382)]()}[c(362)](t){const e=c,n=new Set,o=new Map;for(const i of t){if(e(377)===i[e(386)]&&e(378)!==i[e(360)]&&i[e(396)][e(357)]){const t=this[e(368)][e(398)](i[e(396)][e(357)]);for(const n of t[e(366)]()){if(!n.is(e(400),this[e(358)]))continue;const t=this[e(387)](n);o[e(383)](t)||o[e(399)](t,[]),o[e(397)](t)[e(384)](n)}}if(e(388)===i[e(386)]&&i[e(360)]===this[e(358)]){const t=this[e(387)]({getAttribute:t=>i[e(374)][e(397)](t)});n[e(370)](t)}}for(const[t,o]of this[e(389)])e(364)===o[e(393)][e(372)]&&n[e(370)](t);for(const t of n)this[e(389)][e(394)](t);for(const[t,n]of o)this[e(389)][e(399)](t,n[n[e(395)]-1]);const i=new Set;for(const[t,s]of o)n[e(383)](t)&&(i[e(370)](s[0]),s[e(395)]>1?o[e(399)](t,s[e(385)](1)):o[e(394)](t),n[e(394)](t));return{removed:Array[e(365)](n),inserted:Array[e(365)](o[e(381)]())[e(359)](),moved:Array[e(365)](i)}}}const u=d;!function(t){const e=d,n=t();for(;;)try{if(194312===parseInt(e(192))/1+-parseInt(e(155))/2*(parseInt(e(182))/3)+-parseInt(e(173))/4*(parseInt(e(244))/5)+parseInt(e(236))/6*(parseInt(e(200))/7)+parseInt(e(193))/8*(parseInt(e(186))/9)+parseInt(e(156))/10*(-parseInt(e(157))/11)+-parseInt(e(163))/12*(-parseInt(e(215))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(p);class f extends t.Plugin{[u(202)]=[];[u(188)]=null;[u(203)]=null;[u(196)];[u(237)];[u(241)];static get[u(201)](){return u(213)}static get[u(161)](){return!0}static get[u(191)](){return!0}constructor(t){const e=u;super(t),this[e(196)]=new l(this[e(209)][e(190)],{elementName:e(175),getElementKey:()=>e(167)}),this[e(237)]=new l(this[e(209)][e(190)],{elementName:e(229),getElementKey:t=>t[e(214)](e(242))}),this[e(241)]=new l(this[e(209)][e(190)],{elementName:e(176),getElementKey:t=>t[e(214)](e(242))})}[u(224)](){const t=u,{editor:e}=this,{model:n,data:o}=e;n[t(185)][t(181)](e=>{const o=t,i=n[o(185)][o(243)][o(183)]();let s=!1;return this[o(147)](e,i)&&(s=!0),this[o(234)](e,i)&&(s=!0),this[o(223)](e,i)&&(s=!0),this[o(178)](e)&&(s=!0),this[o(144)](e)&&(s=!0),this[o(205)](e)&&(s=!0),s}),this[t(174)](n[t(185)],t(158),()=>{const e=t;n[e(227)]({isUndoable:!1},t=>{this[e(246)](t)})},{priority:t(159)}),this[t(174)](o,t(228),()=>{const e=t;this[e(202)]=[],this[e(196)][e(206)](),this[e(237)][e(206)](),this[e(241)][e(206)]()},{priority:t(189)})}[u(225)](){return this[u(188)]}[u(169)](t){const e=u;return this[e(202)][e(166)](e=>e.id===t)||null}[u(204)](){const t=u;return Array[t(195)](this[t(202)])}[u(247)](){return this[u(203)]}[u(146)](t){this[u(203)]=t}[u(207)](t,e=0){const n=u;let o=!1;for(let i=e;i<this[n(202)][n(154)];i++)this[n(198)](t,i)&&(o=!0);return o}[u(197)](t,e){const n=u,o=t[n(240)](n(175),{});return t[n(211)](o,e),this[n(188)]=o,o}[u(246)](t){const e=u;if(!this[e(202)][e(154)]||this[e(188)])return;const n=this[e(202)][0][e(152)][e(231)],o=this[e(197)](t,n);for(const n of this[e(202)])n[e(180)][e(150)]||t[e(216)](n[e(180)],o,e(184));this[e(207)](t)}[u(147)](t,e){const n=u;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(196)][n(183)](e);if(r[n(154)]&&(this[n(188)]=r[0]),i[n(154)])if(i[n(154)]>1||this[n(188)]&&i[n(210)](t=>t!==this[n(188)])){const e=t[n(240)](n(175),{}),s=[];this[n(188)]&&s[n(221)](this[n(188)]),s[n(221)](...i),t[n(216)](e,s[0],n(149));for(const o of s)t[n(177)](t[n(222)](o),t[n(245)](e,n(184))),t[n(217)](o);this[n(188)]=e,this[n(207)](t),o=!0}else this[n(188)]=i[0];if(s[n(154)]&&n(220)===this[n(188)]?.[n(231)][n(212)]){for(const e of this[n(202)])t[n(217)](e[n(152)]),o=!0;this[n(202)]=[],this[n(188)]=null}return o}[u(234)](t,e){const n=u;let o=!1;const i=this[n(209)][n(187)][n(153)](n(162)),{inserted:s,moved:r}=this[n(241)][n(183)](e);for(const e of[...r,...s]){const s=e[n(214)](n(242)),r=this[n(169)](s);r&&(r[n(180)]=e),h(t,i,e)&&(o=!0)}return o}[u(223)](t,e){const n=u;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(237)][n(183)](e);for(const e of i)this[n(239)](t,e)&&(o=!0);for(const e of s)this[n(168)](t,e)&&(o=!0);for(const e of r)this[n(238)](t,e)&&(o=!0);return o}[u(144)](t){const e=u;if(!this[e(188)])return!1;let n=!1;if(this[e(188)][e(148)]!==this[e(202)][e(154)]){const o=[];for(const t of this[e(188)][e(171)]()){const i=t[e(214)](e(242));this[e(169)](i)||(o[e(218)](t),n=!0)}for(const n of o)t[e(217)](n)}const o=new Set,i=[];for(const t of this[e(188)][e(171)]()){const s=t[e(214)](e(242));o[e(164)](s)?(i[e(218)](t),n=!0):o[e(219)](s)}for(const n of i)t[e(217)](n);return this[e(188)][e(148)]||(t[e(217)](this[e(188)]),this[e(188)]=null,n=!0),n}[u(168)](t,e){const n=u;if(this[n(202)][n(166)](t=>t[n(152)]===e))return!1;let o=!1;const i=e[n(214)](n(242)),s=this[n(202)][n(151)](t=>t.id===i);-1!==s&&(t[n(217)](this[n(202)][s][n(152)]),this[n(202)][n(145)](s,1),o=!0);let r=this[n(188)]?function(t,e){const o=n;for(const n of t[o(171)]())if(n[o(214)](o(242))===e)return n;return null}(this[n(188)],i):null;r||(r=t[n(240)](n(176),{footnoteId:i}),this[n(188)]&&(t[n(216)](r,this[n(188)],n(184)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(209)][n(190)],this[n(202)],e);this[n(202)][n(145)](c,0,a);let l=c;return-1!==s&&(l=Math[n(194)](c,s)),this[n(207)](t,l)&&(o=!0),o}[u(239)](t,e){const n=u,o=this[n(202)][n(151)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(202)][o];return n(220)!==s[n(180)][n(231)][n(212)]&&(t[n(217)](s[n(180)]),i=!0),this[n(202)][n(145)](o,1),this[n(207)](t,o)&&(i=!0),i}[u(238)](t,e){const n=u,o=e[n(214)](n(242)),i=this[n(202)][n(151)](t=>t.id===o),s=this[n(202)][i];let r=!1;s[n(152)]=e,this[n(202)][n(145)](i,1);const a=m(this[n(209)][n(190)],this[n(202)],e);return this[n(202)][n(145)](a,0,s),this[n(207)](t,Math[n(194)](i,a))&&(r=!0),r}[u(198)](t,e){const n=u;if(!this[n(188)])return!1;const o=this[n(202)][e];let i;return i=this[n(203)]?this[n(203)]({footnote:o,container:this[n(188)],digits:String(this[n(202)][n(154)])[n(154)],value:e+1}):String(e+1),o[n(152)][n(214)](n(232))!=i&&(t[n(170)](n(232),i,o[n(152)]),!0)}[u(205)](t){const e=u;if(!this[e(188)]||this[e(202)][e(154)]<2)return!1;if(function(t,n){const o=e;if(t[o(154)]!==n[o(154)])return!1;for(let e=0;e<t[o(154)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(202)][e(160)](t=>t.id),Array[e(195)](this[e(188)][e(171)]())[e(160)](t=>t[e(214)](e(242)))))return!1;let n=!1;for(let o=0;o<this[e(202)][e(154)];o++){const i=this[e(202)][o],s=t[e(235)](i[e(180)]),r=t[e(245)](this[e(188)],o);s[e(165)](r)||(t[e(177)](t[e(233)](i[e(180)]),r),n=!0)}return n}[u(178)](t){const e=u;if(!this[e(202)][e(154)])return!1;const{model:n}=this[e(209)];let o=!1;for(let i=0;i<this[e(202)][e(154)]-1;i++){const s=this[e(202)][i],r=this[e(202)][i+1],a=n[e(235)](s[e(152)]),c=n[e(235)](r[e(152)]);e(226)===a[e(179)](c)&&(this[e(238)](t,s[e(152)]),i=-1,o=!0)}return o}}function d(t,e){const n=p();return(d=function(t,e){return n[t-=144]})(t,e)}function p(){const t=["createPositionBefore","33240tSMOMG","_footnoteRefsTracker","_handleMovedFootnoteReference","_handleRemoveFootnoteReferenceById","createElement","_footnoteDefsTracker","footnoteId","differ","353315jHoZAg","createPositionAt","_ensureFootnotesDefinitionsContainerExists","getFootnotesFormatter","_handleFootnotesDefinitionsObjectSync","splice","setFootnoteFormatter","_handleFootnotesDefinitionsObjectChanges","childCount","before","parent","findIndex","reference","get","length","214NiugWL","10BOeymQ","1722655OliCjf","change:data","low","map","isOfficialPlugin","footnotes.multiBlock","59808thasXU","has","isEqual","find","singleton","_handleInsertedFootnoteReference","getFootnote","setAttribute","getChildren","paragraph","8rbBgCB","listenTo","footnotesDefinitions","footnoteDefinition","move","_ensureFootnotesReferencesHaveProperOrder","compareWith","definition","registerPostFixer","10239rWWfYd","getChanges","end","document","27wlWhUE","config","_footnotesDefinitions","high","model","isPremiumPlugin","198461kkPUGk","126904aJwWne","min","from","_footnoteDefsContainerTracker","_insertEmptyFootnotesDefinitionsContainer","_updateFootnoteRefCounter","footnoteInlineContent","42lYYmRF","pluginName","_footnotes","_footnoteFormatter","getFootnotes","_sortFootnoteDefinitions","reset","_updateFootnotesCounters","getRootNames","editor","some","append","rootName","FootnotesTracker","getAttribute","1508xuCHey","insert","remove","unshift","add","$graveyard","push","createRangeIn","_handleFootnoteReferencesChanges","init","getFootnotesDefinitionsObjectElement","after","enqueueChange","set","footnoteRef","indexOf","root","footnoteCounter","createRangeOn","_handleFootnoteDefinitionsChanges"];return(p=function(){return t})()}function h(t,e,n){const o=u;if(n[o(148)])return!1;const i=o(e?172:199);return t[o(216)](t[o(240)](i),n),!0}function m(t,e,n){const o=u;if(0===e[o(154)])return 0;const i=t[o(235)](n);for(let n=0;n<e[o(154)];n++){const s=e[n],r=t[o(235)](s[o(152)]);if(o(149)===i[o(179)](r))return n}const s=n[o(231)];let r=-1;for(let t=e[o(154)]-1;t>=0;t--)if(e[t][o(152)][o(231)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(185)][o(208)](),c=a[o(230)](s[o(212)]),l=a[c+1];if(l)for(let t=0;t<e[o(154)];t++)if(e[t][o(152)][o(231)][o(212)]===l)return t;return e[o(154)]}const g=y;function w(){const t=["model","length","293652Nmeenp","get","insert-footnote-command-executed-with-invalid-id","string","editor","document","7lfhyzL","_getPositionToInsertFootnote","isObject","execute","getFirstRange","getItems","selection","checkChild","end","19920wPfupR","isEnabled","_moveSelectionToFootnoteDefinition","1134ymvITt","1106700YGUslL","75376lKtZrR","plugins","test","refresh","12KhhpbN","change","59397sUDaiC","FootnotesEditing","1882952wauUit","footnoteId","footnoteRef","isBlock","insertObject","76438JgQjLA","createElement"];return(w=function(){return t})()}function y(t,e){const n=w();return(y=function(t,e){return n[t-=356]})(t,e)}!function(t){const e=y,n=t();for(;;)try{if(126821===parseInt(e(364))/1+-parseInt(e(392))/2*(parseInt(e(357))/3)+-parseInt(e(388))/4+parseInt(e(387))/5+-parseInt(e(368))/6+-parseInt(e(374))/7*(parseInt(e(359))/8)+parseInt(e(386))/9*(parseInt(e(383))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(w);class b extends t.Command{[g(391)](){const t=g,e=this[t(372)][t(366)][t(373)][t(380)],n=this[t(375)](e);this[t(384)]=!!n}[g(377)](t){const e=g,{editor:n}=this,{model:o}=n,{selection:s}=o[e(373)],r=this[e(375)](s);if(!r)return;const a=n[e(389)][e(369)](e(358)),c=t?.[e(360)]??(0,i.uid)();!function(t){const n=e;return n(371)==typeof t&&t[n(367)]>0&&!/\s/[n(390)](t)&&!/^\d/[n(390)](t)}(c)?(0,i.logWarning)(e(370)):(o[e(356)](t=>{const n=e,i=t[n(365)](n(361),{footnoteId:c});o[n(363)](i,r,null)}),a[e(385)](c))}[g(375)](t){const e=g,{model:n}=this[e(372)],{schema:o}=n,i=t[e(378)]();for(const t of i[e(379)]())if(o[e(362)](t)||o[e(376)](t))return null;const s=i[e(382)];return o[e(381)](s,e(361))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[f]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),n=window[m([68,97,116,101])][m([110,111,119])](),o=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{o[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=o[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;o[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,o)=>{o[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),n[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function n(t){for(let n=0;n<t[m([108,101,110,103,116,104])];n++){const o=t[m([99,104,97,114,67,111,100,101,65,116])](n);e=(e<<5)+e+o,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,o])=>{n(e),t(o)}):n(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function p(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function h(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const n=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let n=m([117]);for(let o=0;o<t[m([108,101,110,103,116,104])];o+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),n+=e[i]}return n}();o[n]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,o[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=h,o[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=h,o[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,h=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&n()?e:null;function n(){const t=e[m([106,116,105])],n=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),o={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete o[m([118,99])],f(o)==n}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(h=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),o[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function h(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(o){a(o)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(n-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),o=p(d(window[m([77,97,116,104])][m([99,101,105,108])](n/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,o)}function r(){const e=m([108,108,99,116,45])+d(f(t)),n=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return n?window[m([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,n)=>{t[m([116,104,101,110])](e,n),window[m([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,n)=>{if(n[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{h(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const o=a[m([115,112,108,105,116])](m([46])),[i,s,r]=o;return e(i),await n(i,s,r),t}catch{return!1}function e(e){const n=l(e);n&&n[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function n(e,n,o){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(o),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+n),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1761868800;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:n}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](n))return!0;const o=n[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=o[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(o[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>o[m([101,118,101,114,121])]((e,n)=>t[n]===e||t[n]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&h?new(window[m([80,114,111,109,105,115,101])])((t,n)=>{e[m([116,104,101,110])](t,n),h[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},n)}):e||h||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(f).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),n.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(f).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(i.reference,"on")}),n.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:n,editing:o}=t,{t:i}=t.locale;n.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:n})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;n.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of o.view.createRangeIn(i))t.is("$textProxy")?n.consume(t.textNode,{name:!0}):t.is("element")&&n.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),n.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>E(t,e)}),n.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:n})=>{const o=t.getAttribute("footnoteCounter");return(0,e.toWidget)(E(t,n),n,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",o)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:n}=t.locale,{conversion:o}=t;o.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),o.for("upcast").add(t=>{t.on("element:ol",(t,e,n)=>{const o=e.viewItem;if(!o.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!n.consumable.consume(o,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,n)=>{const o=e.viewItem;o.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&n.consumable.consume(o,{name:!0,classes:"footnotes-divider"})})}),o.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>x(e)}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=x(o,{"data-footnotes-list-label":n("Footnotes")}),s=(0,e.toWidget)(i,o,{hasSelectionHandle:!0,label:n("Footnotes")});return o.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:n}=t,o=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,n)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes-list"))return;if(!n.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=n.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!n.safeInsert(r,e.modelCursor))return;n.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(n.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),n.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(o)n.convertChildren(a,r);else{const t=n.writer.createElement("footnoteInlineContent");n.writer.insert(t,r),n.convertChildren(a,t)}n.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of n)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const n=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:n,t:o}=t,i=t.model.document.selection;t.keystrokes.set("CTRL+Shift+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Shift+D"}]}),this.listenTo(n.view.document,"enter",(t,e)=>{const n=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(n){const o=n.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(o),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let n=!1;this.listenTo(e.view.document,"pointerdown",(t,o)=>{const{target:i}=o,s=e.view.document.selection;n=!!(i.is("element","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:o}=e;if(!o.is("element","a"))return;if(o.parent?.is("element","sup")&&o.parent.hasClass("footnote")&&!n)return void e.preventDefault();let i=o.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:n})=>{if(!k(e))return null;if(!t)return n.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const o=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const n=e.toViewElement(t);return!!n&&k(t)!==n.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function x(t,e={}){const n=t.createEmptyElement("hr",{class:"footnotes-divider"}),o=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[n,o])}function E(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{id:"ref-"+n,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function P(t,n,o,{dataPipeline:i}={}){const{t:s}=o,r=t.getAttribute("footnoteId"),a=n.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?n.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(n.createEditableElement("div",{class:"footnote-content"}),n,{label:s("Footnote content.")});return n.insert(n.createPositionAt(c,0),n.createSlot()),n.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var S=n(331);function L(){const t=["footnoteRef","change","application/ckeditor5-footnotes","init","250YPraqM","add","pluginName","toModel","dataTransfer","definition","getFootnote","create","setAttribute","_insertEmptyFootnotesDefinitionsContainer","method","_defineClipboardIntegration","selection","reduce","push","getFootnotesDefinitionsObjectElement","177133RbLFBy","toView","insert","entries","541509IeKKyu","drop","1788708GElHLs","getData","find","content","setData","append","7QXIGJe","isOfficialPlugin","footnoteDefinition","sourceEditorId","from","createElement","isPremiumPlugin","footnoteId","18ZFpxkE","getAttribute","toData","2lzvIsp","htmlProcessor","footnotesDefinitions","outputTransformation","root","createRangeIn","length","getFootnotes","get","parse","stringify","element","clipboardInput","remove","document","_handleCopyFootnotesDefinitions","editing","data","editor","end","3180528pKhVDC","contentInsertion","getFirstRange","FootnotesClipboard","5sGLTqu","1308780MmnkBY","1135388vvRbay","requires","_handlePasteFootnotesDefinitions","listenTo","17490648GMgCou"];return(L=function(){return t})()}const _=A;function A(t,e){const n=L();return(A=function(t,e){return n[t-=352]})(t,e)}!function(t){const e=A,n=t();for(;;)try{if(707097===parseInt(e(395))/1*(parseInt(e(414))/2)+-parseInt(e(397))/3+-parseInt(e(366))/4*(-parseInt(e(364))/5)+-parseInt(e(365))/6*(-parseInt(e(403))/7)+parseInt(e(360))/8*(-parseInt(e(411))/9)+-parseInt(e(375))/10*(parseInt(e(391))/11)+parseInt(e(370))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(L);class D extends t.Plugin{static get[_(377)](){return _(363)}static get[_(367)](){return[v,S.ClipboardPipeline]}static get[_(404)](){return!0}static get[_(409)](){return!0}[_(374)](){this[_(386)]()}[_(386)](){const t=_;this[t(355)](),this[t(368)]()}[_(355)](){const t=_,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(422)](S.ClipboardPipeline),s=n[t(422)](f);this[t(369)](i,t(417),(n,i)=>{const r=t,a=function(t,e){const n=A,o=new Set;for(const{item:i}of t[n(419)](e))i.is(n(425),n(371))&&o[n(376)](i[n(412)](n(410)));return Array[n(407)](o)}(o,i[r(400)]);if(!a[r(420)])return;const c=s[r(421)](),l=a[r(388)]((t,n)=>{const o=r,i=c[o(399)](t=>t.id===n);if(i){const n=e[o(357)][o(392)](i[o(380)],{isClipboardPipeline:!0}),s=e[o(357)][o(415)][o(413)](n);t[i.id]=s}return t},Object[r(382)](null));i[r(379)][r(401)](r(373),JSON[r(424)](l))})}[_(368)](){const t=_,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(356)],r=o[t(422)](S.ClipboardPipeline),a=o[t(422)](f);let c=null;this[t(369)](s[t(354)],t(352),(e,n)=>{const o=t,i=n[o(379)][o(398)](o(373));c=i?JSON[o(423)](i):null}),this[t(369)](r,t(361),(o,s)=>{const r=t;if(!c)return;const l=s[r(406)]===this[r(358)].id;l&&r(396)===s[r(385)]||n[r(372)](t=>{const o=r;!function(t,e){const n=A,o=[];for(const{item:i}of t[n(419)](e))i.is(n(425),n(416))&&o[n(389)](i);for(const e of o)t[n(353)](e)}(t,s[o(400)]);let u=a[o(390)]();if(!u){const e=n[o(354)][o(387)][o(362)]()[o(418)];u=a[o(384)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(382)](null);for(const{item:o}of t[s(419)](e))if(o.is(s(425),s(371))){const e=o[s(412)](s(410));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(383)](s(410),r[e],o)}return r}(t,s[o(400)],t=>!l||null!==a[o(381)](t));for(const[n,i]of Object[o(394)](c)){const s=f[n]||n,r=t[o(408)](o(405),{footnoteId:s}),a=e[o(357)][o(415)][o(392)](i),c=e[o(357)][o(378)](a,r);t[o(402)](c,r),t[o(393)](r,u,o(359))}c=null})})}}var T=n(311),V=n(355),O=n(450),N=n.n(O),R=n(774),K=n.n(R),M=n(265),j=n.n(M),B=n(410),W=n.n(B),H=n(238),U=n.n(H),z=n(14),G={attributes:{"data-cke":!0}};G.setAttributes=W(),G.insert=j().bind(null,"head"),G.domAPI=K(),G.insertStyleElement=U();N()(z.A,G);z.A&&z.A.locals&&z.A.locals;class q extends t.Plugin{licenseKey;_licenseKeyCheckInterval;static get pluginName(){return"FootnotesUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;e.add("insertFootnote",J(t,T.ButtonView)),e.add("menuBar:insertFootnote",J(t,T.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const n=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in n){const o=e,i=n[o];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete n[o],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&n._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&n._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&n._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&n._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&n._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&n._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&n._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function J(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof T.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:V.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}function X(){var t=["66100980Bzjsap","194IWhyjQ","1240670fvjPmo","15178FXocBZ","isOfficialPlugin","pluginName","isPremiumPlugin","8qrgUMO","16596738WZYvGZ","16FTgFDa","2179608ektjCy","1335900EfBXfL","4795098ypJpqB","Footnotes","requires"];return(X=function(){return t})()}var Y=Q;function Q(t,e){var n=X();return(Q=function(t,e){return n[t-=384]})(t,e)}!function(t){for(var e=Q,n=t();;)try{if(923568===parseInt(e(394))/1*(-parseInt(e(396))/2)+-parseInt(e(388))/3+parseInt(e(385))/4*(-parseInt(e(395))/5)+parseInt(e(389))/6+parseInt(e(390))/7*(-parseInt(e(387))/8)+-parseInt(e(386))/9+parseInt(e(393))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(X);class Z extends t.Plugin{static get[Y(398)](){return Y(391)}static get[Y(392)](){return[v,D,q]}static get[Y(397)](){return!0}static get[Y(384)](){return!0}}const $=tt;function tt(t,e){const n=nt();return(tt=function(t,e){return n[t-=312]})(t,e)}!function(t){const e=tt,n=t();for(;;)try{if(905200===parseInt(e(314))/1*(-parseInt(e(316))/2)+-parseInt(e(320))/3*(-parseInt(e(327))/4)+parseInt(e(313))/5+-parseInt(e(326))/6*(-parseInt(e(328))/7)+parseInt(e(323))/8+-parseInt(e(329))/9+-parseInt(e(312))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(nt);const et=[$(324),$(322),$(317),$(315),$(325),$(321),$(319),$(318)];function nt(){const t=["47812900OSYHGh","8963865JGRJoK","1BBfiMu","upper-latin","563924JfNyNl","lower-latin","upper-roman","lower-roman","123NhNyOa","upper-alpha","decimal-leading-zero","12208232ONvRnW","decimal","lower-alpha","3972AXRhae","122756fzBFJK","14777kACtLJ","54729jQRLuX"];return(nt=function(){return t})()}function ot(t,e){const n=rt();return(ot=function(t,e){return n[t-=103]})(t,e)}const it=ot;!function(t){const e=ot,n=t();for(;;)try{if(338038===-parseInt(e(112))/1*(-parseInt(e(120))/2)+parseInt(e(124))/3*(parseInt(e(116))/4)+parseInt(e(117))/5+-parseInt(e(108))/6*(parseInt(e(110))/7)+parseInt(e(107))/8*(parseInt(e(104))/9)+parseInt(e(127))/10*(parseInt(e(114))/11)+parseInt(e(113))/12*(-parseInt(e(111))/13))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(rt);class st extends t.Command{[it(115)](){const t=it,{editor:e}=this,n=e[t(128)][t(103)](f)[t(119)]();this[t(129)]=!!n,this[t(106)]=n?.[t(121)](t(109))??null}[it(125)]({value:t}){const e=it,{editor:n}=this,o=n[e(128)][e(103)](f),i=o[e(119)]();i&&et[e(105)](t)&&n[e(126)][e(123)](n=>{const s=e;n[s(118)](s(109),t,i),o[s(122)](n)})}}function rt(){const t=["setAttribute","getFootnotesDefinitionsObjectElement","1762zrTWxb","getAttribute","_updateFootnotesCounters","change","3LrysiA","execute","model","80AIJCtp","plugins","isEnabled","get","9inFGLB","includes","value","2101352hxKkGk","48666gRhubM","footnotesListStyle","483uwWDhL","5306717mAxXLU","181zCtGpq","24ZyOvLy","547492jwxlDq","refresh","2286784sHXgvZ","1610565kCVGdu"];return(rt=function(){return t})()}const at=lt;function ct(){const t=["997232OPIQwJ","model","refresh","value","execute","isInteger","setAttribute","9123kVUDjB","8370187QDuCGI","plugins","2733564dpFPxh","change","getFootnotesDefinitionsObjectElement","2186822ezPzYG","isEnabled","_updateFootnotesCounters","30FeiMzu","6sCtjil","getAttribute","footnotesListStart","20856LOPMIP","25UgJMMC","190068imFpwz","576dskTHt","get"];return(ct=function(){return t})()}function lt(t,e){const n=ct();return(lt=function(t,e){return n[t-=100]})(t,e)}!function(t){const e=lt,n=t();for(;;)try{if(748855===parseInt(e(111))/1+parseInt(e(104))/2+parseInt(e(114))/3+parseInt(e(101))/4*(-parseInt(e(100))/5)+-parseInt(e(121))/6*(parseInt(e(112))/7)+-parseInt(e(124))/8*(-parseInt(e(102))/9)+-parseInt(e(120))/10*(-parseInt(e(117))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ct);class ut extends t.Command{[at(106)](){const t=at,{editor:e}=this,n=e[t(113)][t(103)](f)[t(116)]();this[t(118)]=!!n,this[t(107)]=n?.[t(122)](t(123))??null}[at(108)]({value:t}){const e=at,{editor:n}=this,o=n[e(113)][e(103)](f),i=o[e(116)]();i&&Number[e(109)](t)&&n[e(105)][e(115)](n=>{const s=e;n[s(110)](s(123),t,i),o[s(119)](n)})}}function ft(t,e){const n=yt();return(ft=function(t,e){return n[t-=107]})(t,e)}const dt=ft;!function(t){const e=ft,n=t();for(;;)try{if(988352===parseInt(e(130))/1*(-parseInt(e(207))/2)+parseInt(e(182))/3+-parseInt(e(189))/4+parseInt(e(194))/5*(-parseInt(e(164))/6)+parseInt(e(204))/7+parseInt(e(153))/8*(parseInt(e(198))/9)+parseInt(e(183))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(yt);class pt extends t.Plugin{static get[dt(126)](){return dt(150)}static get[dt(172)](){return[v,f]}static get[dt(166)](){return!0}static get[dt(114)](){return!0}[dt(157)](){const t=dt,{editor:e}=this;e[t(169)][t(127)](t(196),t(136)),e[t(169)][t(127)](t(132),1),e[t(167)][t(181)](t(191),new st(e)),e[t(167)][t(181)](t(162),new ut(e)),this[t(158)](),this[t(145)](),this[t(177)](),this[t(175)]()}[dt(158)](){const t=dt,{editor:e}=this,{schema:n}=e[t(174)];n[t(193)](t(188),{allowAttributes:[t(197),t(165)]})}[dt(145)](){const t=dt,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(163)](t(179))[t(181)](e=>{const n=t;e.on(n(141),(t,e,o)=>{const s=n,r=e[s(187)],a=e[s(168)]?.[s(178)];r[s(116)](s(121))&&a?.is(s(195),s(188))&&(function(t,e,n,o){const i=s;if(!o[i(115)](e,i(165)))return;let r=1;const a=n[i(122)][i(152)](t,{attributes:i(201)});if(a){const e=Number[i(111)](t[i(200)](i(201)),10);Number[i(203)](e)||(r=e)}!a&&e[i(147)](i(165))||n[i(112)][i(173)](i(165),r,e)}(r,a,o,i),function(t,e,n,o){const i=s;if(!o[i(115)](e,i(197)))return;let r=i(136),a=!1;if(n[i(122)][i(152)](t,{attributes:i(113)})){const e={1:i(136),a:i(154),A:i(160),i:i(176),I:i(148)}[t[i(200)](i(113))];e&&(r=e),a=!0}n[i(122)][i(152)](t,{styles:i(119)})&&(r=t[i(159)](i(119)),a=!0),!a&&e[i(147)](i(197))||n[i(112)][i(173)](i(197),r,e)}(r,a,o,i))})}),n[t(163)](t(144))[t(181)](e=>{const n=t;e.on(n(133),(t,e,o)=>{const i=n;if(!o[i(122)][i(152)](e[i(124)],t[i(120)]))return;const s=ht(e[i(124)],o[i(170)]),{attributeNewValue:r}=e;null==r||1===r?o[i(112)][i(131)](i(201),s):o[i(112)][i(173)](i(201),String(r),s)}),e.on(n(206),(t,e,o)=>{const i=n;if(!o[i(122)][i(152)](e[i(124)],t[i(120)]))return;const s=ht(e[i(124)],o[i(170)]),{attributeNewValue:r}=e;r&&i(136)!==r?o[i(112)][i(143)](i(119),r,s):o[i(112)][i(125)](i(119),s)})})}[dt(175)](){const t=dt,{editor:e}=this,{model:n}=e,o=e[t(134)][t(156)](f),i=this[t(140)](),s=this[t(139)]();n[t(184)][t(205)](e=>{const r=t,a=n[r(184)][r(107)][r(129)]();let c=!1;for(const t of a){if(r(151)!==t[r(113)]||r(146)===t[r(120)])continue;const o=n[r(180)](t[r(155)][r(142)]);for(const t of o[r(128)]())t.is(r(195),r(188))&&(!t[r(147)](r(165))&&n[r(138)][r(115)](t,r(165))&&(e[r(173)](r(165),s,t),c=!0),!t[r(147)](r(197))&&n[r(138)][r(115)](t,r(197))&&(e[r(173)](r(197),i,t),c=!0))}return c&&o[r(161)](e),c})}[dt(177)](){const t=dt,{editor:e}=this;e[t(134)][t(156)](f)[t(118)](e=>this[t(199)](e))}[dt(140)](){const t=dt;return this[t(108)][t(169)][t(156)](t(196))}[dt(139)](){const t=dt;return this[t(108)][t(169)][t(156)](t(132))}[dt(199)]({container:t,value:e,digits:n}){const o=dt,i=t[o(200)](o(197)),s=t[o(200)](o(165)),r=Math[o(117)](e)+(s??1)-1;switch(i){case o(110):return function(t,e){const n=o;return String(t)[n(137)](e,"0")}(r,Math[o(186)](2,n));case o(154):case o(109):return mt(r,!1);case o(160):case o(192):return mt(r,!0);case o(176):return wt(r,!1);case o(148):return wt(r,!0);default:return String(r)}}}function ht(t,e){const n=dt,o=e[n(135)](t);return Array[n(149)](o[n(190)]())[n(202)](t=>t.is(n(195),"ol")&&t[n(116)](n(121)))}function mt(t,e){const n=dt;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(185)](97+t)+o,i=Math[n(117)]((i-1)/26)}return e?o[n(171)]():o}const gt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function wt(t,e){const n=dt;let o="",i=t;for(const{value:t,numeral:e}of gt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(123)]()}function yt(){const t=["_updateFootnotesCounters","footnotesStart","for","2966982eGorjt","footnotesListStart","isOfficialPlugin","commands","modelCursor","config","mapper","toUpperCase","requires","setAttribute","model","_definePostfixer","lower-roman","_defineFormatter","parent","upcast","createRangeOn","add","1101243qMLkOc","9845080NXcPgd","document","fromCharCode","max","viewItem","footnotesDefinitions","249632kSJIct","getChildren","footnotesStyle","upper-latin","extend","10quEYBW","element","footnotes.footnotesProperties.defaultListStyle","footnotesListStyle","9UaYfGM","_formatFootnoteListValue","getAttribute","start","find","isNaN","7643706yAeQSo","registerPostFixer","attribute:footnotesListStyle:footnotesDefinitions","3234vmpvoH","differ","editor","lower-latin","decimal-leading-zero","parseInt","writer","type","isPremiumPlugin","checkAttribute","hasClass","floor","setFootnoteFormatter","list-style-type","name","footnotes-list","consumable","toLowerCase","item","removeStyle","pluginName","define","getItems","getChanges","917ErqQcF","removeAttribute","footnotes.footnotesProperties.defaultStartIndex","attribute:footnotesListStart:footnotesDefinitions","plugins","toViewElement","decimal","padStart","schema","_getDefaultStartIndex","_getDefaultListStyle","element:ol","nodeAfter","setStyle","downcast","_defineConverters","$text","hasAttribute","upper-roman","from","FootnotesPropertiesEditing","insert","consume","8631968GLikEL","lower-alpha","position","get","init","_defineSchema","getStyle","upper-alpha"];return(yt=function(){return t})()}class bt extends T.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new T.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:n}){super(t),this.focusCycler=new T.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,n),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,T.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const n=new T.View(this.locale);return n.children=n.createCollection(),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){for(const t of this.children)if(t instanceof T.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},n.focusTracker=new i.FocusTracker,n.keystrokes=new i.KeystrokeHandler,n.render(),n.keystrokes.listenTo(n.element),this.children.add(n),n}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),n=[e],o=new T.CollapsibleView(this.locale,n);return o.set({label:t("Footnotes properties"),isCollapsed:!0}),o.buttonView.bind("isEnabled").toMany(n,"isEnabled",(...t)=>t.some(t=>t)),o.buttonView.on("change:isEnabled",(t,e,n)=>{n||(o.isCollapsed=!0)}),this.children.add(o),[e,o]}_createStartIndexPropertyView(){const{t}=this.locale,e=new T.LabeledFieldView(this.locale,T.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)?e.errorText=t("Invalid footnotes start index value."):n.checkValidity()?this.fire("footnotesListStart",{startIndex:o}):e.errorText=t(o<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var vt=n(945),It={attributes:{"data-cke":!0}};It.setAttributes=W(),It.insert=j().bind(null,"head"),It.domAPI=K(),It.insertStyleElement=U();N()(vt.A,It);vt.A&&vt.A.locals&&vt.A.locals;class kt extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[T.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var n;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(n=t,t=>{const{t:e}=t,o=n.commands.get("footnotesStyle"),i=(0,T.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(o,"isEnabled"),s.set({label:e("Footnotes style"),icon:V.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:n}=t.locale,o=n("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:V.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:V.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:V.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:V.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:V.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:V.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:n,icon:o,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new T.ButtonView(e);return a.set({label:n,icon:o,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new bt(t.locale,{styleGridAriaLabel:o,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,n)=>{t.execute("footnotesStart",{value:n.startIndex})}),s}({editor:n,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:n}=t.locale,o=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=T.BalloonPanelView;o.register("footnotesDefinitions",{ariaLabel:n("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}var Ct=xt;function Ft(){var t=["11382160fQJjVk","1576280ATzsgW","85qcJZAZ","5062748efImma","3HaOTsO","9987502QqLyPD","pluginName","FootnotesProperties","isOfficialPlugin","requires","1152FFwlji","98244eokYBy","isPremiumPlugin","80176JVSBXk","23162ROramW"];return(Ft=function(){return t})()}function xt(t,e){var n=Ft();return(xt=function(t,e){return n[t-=150]})(t,e)}!function(t){for(var e=xt,n=t();;)try{if(804385===parseInt(e(163))/1+parseInt(e(150))/2+-parseInt(e(153))/3*(-parseInt(e(152))/4)+parseInt(e(151))/5*(-parseInt(e(160))/6)+parseInt(e(154))/7+-parseInt(e(162))/8*(parseInt(e(159))/9)+-parseInt(e(164))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ft);class Et extends t.Plugin{static get[Ct(155)](){return Ct(156)}static get[Ct(158)](){return[pt,kt]}static get[Ct(157)](){return!0}static get[Ct(161)](){return!0}}function Pt(){var t=["390590uJMbHN","1143498VWcrDb","817267yTspHo","6767109uTILeX","7voykNY","2976135EkSEQk","4763364TwTtlW","10678200wHHoaB","108QXYgXR"];return(Pt=function(){return t})()}function St(t,e){var n=Pt();return(St=function(t,e){return n[t-=365]})(t,e)}!function(t){for(var e=St,n=t();;)try{if(869972===parseInt(e(372))/1+-parseInt(e(371))/2+parseInt(e(366))/3+-parseInt(e(367))/4+-parseInt(e(370))/5*(-parseInt(e(369))/6)+parseInt(e(365))/7*(-parseInt(e(368))/8)+parseInt(e(373))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Pt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();