@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251019.0 → 0.0.0-nightly-20251020.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-footnotes-list-widget-label-background-color:#757575;--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-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:1.9em 0 1.5em;padding-inline-start:3em;position:relative}.ck-content .footnotes:before{border-top:1px solid var(--ck-content-footnotes-list-separator-color);content:"";left:0;position:absolute;top:-1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes:before{left:auto;right:0}.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 .footnote>a{pointer-events:none}.ck.ck-editor__editable .footnotes-wrapper{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes-wrapper:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-list-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-wrapper[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-wrapper>.footnotes{margin-bottom:.65em;margin-top:1em}',""]);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:()=>J,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>St,FootnotesPropertiesEditing:()=>dt,FootnotesPropertiesUI:()=>It,FootnotesStartCommand:()=>lt,FootnotesStyleCommand:()=>it,FootnotesTracker:()=>d,FootnotesUI:()=>H,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);const r=c;function a(){const t=["1987443mGKNwE","96768GWXPSd","nodeAfter","elementName","add","_model","from","3695CEveea","_elementName","reset","delete","attributes","_getElementKey","5LiXiwq","15ChFttD","2229115AJOybm","insert","2227074ZnXqsW","type","slice","length","name","$text","position","13511575xYfwTY","remove","$graveyard","rootName","248fVjuRh","getElementKey","flat","get","root","push","createRangeOn","10NrhGRk","getChanges","_trackedElements","getItems","901296ucPNfX","element","set","has","values","clear"];return(a=function(){return t})()}function c(t,e){const n=a();return(c=function(t,e){return n[t-=432]})(t,e)}!function(t){const e=c,n=t();for(;;)try{if(309646===parseInt(e(460))/1*(-parseInt(e(436))/2)+-parseInt(e(467))/3*(-parseInt(e(454))/4)+parseInt(e(466))/5*(-parseInt(e(470))/6)+-parseInt(e(468))/7+-parseInt(e(447))/8+parseInt(e(453))/9+-parseInt(e(443))/10*(-parseInt(e(432))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(a);class l{[r(458)];[r(461)];[r(465)];[r(445)]=new Map;constructor(t,e){const n=r;this[n(458)]=t,this[n(461)]=e[n(456)],this[n(465)]=e[n(437)]}[r(462)](){const t=r;this[t(445)][t(452)]()}[r(444)](t){const e=r,n=new Set,o=new Map;for(const i of t){if(e(469)===i[e(471)]&&e(475)!==i[e(474)]&&i[e(476)][e(455)]){const t=this[e(458)][e(442)](i[e(476)][e(455)]);for(const n of t[e(446)]()){if(!n.is(e(448),this[e(461)]))continue;const t=this[e(465)](n);o[e(450)](t)||o[e(449)](t,[]),o[e(439)](t)[e(441)](n)}}if(e(433)===i[e(471)]&&i[e(474)]===this[e(461)]){const t=this[e(465)]({getAttribute:t=>i[e(464)][e(439)](t)});n[e(457)](t)}}for(const[t,o]of this[e(445)])e(434)===o[e(440)][e(435)]&&n[e(457)](t);for(const t of n)this[e(445)][e(463)](t);for(const[t,n]of o)this[e(445)][e(449)](t,n[n[e(473)]-1]);const i=new Set;for(const[t,s]of o)n[e(450)](t)&&(i[e(457)](s[0]),s[e(473)]>1?o[e(449)](t,s[e(472)](1)):o[e(463)](t),n[e(463)](t));return{removed:Array[e(459)](n),inserted:Array[e(459)](o[e(451)]())[e(438)](),moved:Array[e(459)](i)}}}function u(){const t=["set","has","reset","13012mNoIBF","_footnotesDefinitions","move","filter","differ","_sortFootnoteDefinitions","isOfficialPlugin","isEqual","map","document","add","push","definition","registerPostFixer","_ensureFootnotesReferencesHaveProperOrder","createRangeIn","654600tNHQsz","588rUSEFY","getChanges","$graveyard","getRootNames","144aLSHUM","reference","model","splice","_footnoteFormatter","min","createRangeOn","_footnotes","159ADvvFD","footnoteDefinition","FootnotesTracker","_footnoteRefsTracker","footnoteInlineContent","pluginName","enqueueChange","350077qTmrdc","footnotes.multiBlock","after","editor","createPositionAt","getChildren","createPositionBefore","end","rootName","childCount","footnoteCounter","72807NPPGoq","setAttribute","getFootnotesFormatter","change:data","indexOf","low","from","remove","isPremiumPlugin","before","_handleFootnoteDefinitionsChanges","18mPCItM","createElement","73348Szimwn","parent","append","_handleFootnotesDefinitionsObjectChanges","length","footnotesDefinitions","getFootnotes","getFootnote","_handleFootnotesDefinitionsObjectSync","_insertEmptyFootnotesDefinitionsContainer","listenTo","some","footnoteId","unshift","24puAGun","_ensureFootnotesDefinitionsContainerExists","_updateFootnoteRefCounter","config","findIndex","_handleInsertedFootnoteReference","953815PwlAzJ","10JpijQX","setFootnoteFormatter","_updateFootnotesCounters","root","compareWith","_footnoteDefsTracker","155510pSevtr","footnoteRef","_footnoteDefsContainerTracker","112IdstGq","_handleRemoveFootnoteReferenceById","high","paragraph","_handleFootnoteReferencesChanges","singleton","find","get","init","insert","_handleMovedFootnoteReference","getAttribute","getFootnotesDefinitionsObjectElement"];return(u=function(){return t})()}const f=h;!function(t){const e=h,n=t();for(;;)try{if(411555===-parseInt(e(448))/1*(parseInt(e(442))/2)+-parseInt(e(390))/3*(parseInt(e(361))/4)+parseInt(e(441))/5*(parseInt(e(435))/6)+-parseInt(e(408))/7*(-parseInt(e(382))/8)+-parseInt(e(419))/9*(parseInt(e(377))/10)+-parseInt(e(421))/11*(-parseInt(e(378))/12)+-parseInt(e(397))/13*(-parseInt(e(451))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(u);class d extends t.Plugin{[f(389)]=[];[f(362)]=null;[f(386)]=null;[f(450)];[f(393)];[f(447)];static get[f(395)](){return f(392)}static get[f(367)](){return!0}static get[f(416)](){return!0}constructor(t){const e=f;super(t),this[e(450)]=new l(this[e(400)][e(384)],{elementName:e(426),getElementKey:()=>e(350)}),this[e(393)]=new l(this[e(400)][e(384)],{elementName:e(449),getElementKey:t=>t[e(356)](e(433))}),this[e(447)]=new l(this[e(400)][e(384)],{elementName:e(391),getElementKey:t=>t[e(356)](e(433))})}[f(353)](){const t=f,{editor:e}=this,{model:n,data:o}=e;n[t(370)][t(374)](e=>{const o=t,i=n[o(370)][o(365)][o(379)]();let s=!1;return this[o(424)](e,i)&&(s=!0),this[o(418)](e,i)&&(s=!0),this[o(349)](e,i)&&(s=!0),this[o(375)](e)&&(s=!0),this[o(429)](e)&&(s=!0),this[o(366)](e)&&(s=!0),s}),this[t(431)](n[t(370)],t(411),()=>{const e=t;n[e(396)]({isUndoable:!1},t=>{this[e(436)](t)})},{priority:t(413)}),this[t(431)](o,t(358),()=>{const e=t;this[e(389)]=[],this[e(450)][e(360)](),this[e(393)][e(360)](),this[e(447)][e(360)]()},{priority:t(453)})}[f(357)](){return this[f(362)]}[f(428)](t){const e=f;return this[e(389)][e(351)](e=>e.id===t)||null}[f(427)](){const t=f;return Array[t(414)](this[t(389)])}[f(410)](){return this[f(386)]}[f(443)](t){this[f(386)]=t}[f(444)](t,e=0){const n=f;let o=!1;for(let i=e;i<this[n(389)][n(425)];i++)this[n(437)](t,i)&&(o=!0);return o}[f(430)](t,e){const n=f,o=t[n(420)](n(426),{});return t[n(423)](o,e),this[n(362)]=o,o}[f(436)](t){const e=f;if(!this[e(389)][e(425)]||this[e(362)])return;const n=this[e(389)][0][e(383)][e(445)],o=this[e(430)](t,n);for(const n of this[e(389)])n[e(373)][e(422)]||t[e(354)](n[e(373)],o,e(404));this[e(444)](t)}[f(424)](t,e){const n=f;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(450)][n(379)](e);if(r[n(425)]&&(this[n(362)]=r[0]),i[n(425)])if(i[n(425)]>1||this[n(362)]&&i[n(432)](t=>t!==this[n(362)])){const e=t[n(420)](n(426),{}),s=[];this[n(362)]&&s[n(372)](this[n(362)]),s[n(372)](...i),t[n(354)](e,s[0],n(417));for(const o of s)t[n(363)](t[n(376)](o),t[n(401)](e,n(404))),t[n(415)](o);this[n(362)]=e,this[n(444)](t),o=!0}else this[n(362)]=i[0];if(s[n(425)]&&n(380)===this[n(362)]?.[n(445)][n(405)]){for(const e of this[n(389)])t[n(415)](e[n(383)]),o=!0;this[n(389)]=[],this[n(362)]=null}return o}[f(418)](t,e){const n=f;let o=!1;const i=this[n(400)][n(438)][n(352)](n(398)),{inserted:s,moved:r}=this[n(447)][n(379)](e);for(const e of[...r,...s]){const s=e[n(356)](n(433)),r=this[n(428)](s);r&&(r[n(373)]=e),p(t,i,e)&&(o=!0)}return o}[f(349)](t,e){const n=f;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(393)][n(379)](e);for(const e of i)this[n(452)](t,e)&&(o=!0);for(const e of s)this[n(440)](t,e)&&(o=!0);for(const e of r)this[n(355)](t,e)&&(o=!0);return o}[f(429)](t){const e=f;if(!this[e(362)])return!1;let n=!1;if(this[e(362)][e(406)]!==this[e(389)][e(425)]){const o=[];for(const t of this[e(362)][e(402)]()){const i=t[e(356)](e(433));this[e(428)](i)||(o[e(434)](t),n=!0)}for(const n of o)t[e(415)](n)}const o=new Set,i=[];for(const t of this[e(362)][e(402)]()){const s=t[e(356)](e(433));o[e(359)](s)?(i[e(434)](t),n=!0):o[e(371)](s)}for(const n of i)t[e(415)](n);return this[e(362)][e(406)]||(t[e(415)](this[e(362)]),this[e(362)]=null,n=!0),n}[f(440)](t,e){const n=f;if(this[n(389)][n(351)](t=>t[n(383)]===e))return!1;let o=!1;const i=e[n(356)](n(433)),s=this[n(428)](i);s&&(t[n(415)](s[n(383)]),this[n(389)]=this[n(389)][n(364)](t=>t.id!==i),o=!0);let r=this[n(362)]?function(t,e){const o=n;for(const n of t[o(402)]())if(n[o(356)](o(433))===e)return n;return null}(this[n(362)],i):null;r||(r=t[n(420)](n(391),{footnoteId:i}),this[n(362)]&&(t[n(354)](r,this[n(362)],n(404)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(400)][n(384)],this[n(389)],e);return this[n(389)][n(385)](c,0,a),this[n(444)](t,c)&&(o=!0),o}[f(452)](t,e){const n=f,o=this[n(389)][n(439)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(389)][o];return n(380)!==s[n(373)][n(445)][n(405)]&&(t[n(415)](s[n(373)]),i=!0),this[n(389)][n(385)](o,1),this[n(444)](t,o)&&(i=!0),i}[f(355)](t,e){const n=f,o=e[n(356)](n(433)),i=this[n(389)][n(439)](t=>t.id===o),s=this[n(389)][i];let r=!1;s[n(383)]=e,this[n(389)][n(385)](i,1);const a=m(this[n(400)][n(384)],this[n(389)],e);return this[n(389)][n(385)](a,0,s),this[n(444)](t,Math[n(387)](i,a))&&(r=!0),r}[f(437)](t,e){const n=f;if(!this[n(362)])return!1;const o=this[n(389)][e];let i;return i=this[n(386)]?this[n(386)]({footnote:o,container:this[n(362)],digits:String(this[n(389)][n(425)])[n(425)],value:e+1}):String(e+1),o[n(383)][n(356)](n(407))!=i&&(t[n(409)](n(407),i,o[n(383)]),!0)}[f(366)](t){const e=f;if(!this[e(362)]||this[e(389)][e(425)]<2)return!1;if(function(t,n){const o=e;if(t[o(425)]!==n[o(425)])return!1;for(let e=0;e<t[o(425)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(389)][e(369)](t=>t.id),Array[e(414)](this[e(362)][e(402)]())[e(369)](t=>t[e(356)](e(433)))))return!1;let n=!1;for(let o=0;o<this[e(389)][e(425)];o++){const i=this[e(389)][o],s=t[e(403)](i[e(373)]),r=t[e(401)](this[e(362)],o);s[e(368)](r)||(t[e(363)](t[e(388)](i[e(373)]),r),n=!0)}return n}[f(375)](t){const e=f;if(!this[e(389)][e(425)])return!1;const{model:n}=this[e(400)];let o=!1;for(let i=0;i<this[e(389)][e(425)]-1;i++){const s=this[e(389)][i],r=this[e(389)][i+1],a=n[e(403)](s[e(383)]),c=n[e(403)](r[e(383)]);e(399)===a[e(446)](c)&&(this[e(355)](t,s[e(383)]),i=-1,o=!0)}return o}}function p(t,e,n){const o=f;if(n[o(406)])return!1;const i=o(e?454:394);return t[o(354)](t[o(420)](i),n),!0}function h(t,e){const n=u();return(h=function(t,e){return n[t-=349]})(t,e)}function m(t,e,n){const o=f;if(0===e[o(425)])return 0;const i=t[o(403)](n);for(let n=0;n<e[o(425)];n++){const s=e[n],r=t[o(403)](s[o(383)]);if(o(417)===i[o(446)](r))return n}const s=n[o(445)];let r=-1;for(let t=e[o(425)]-1;t>=0;t--)if(e[t][o(383)][o(445)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(370)][o(381)](),c=a[o(412)](s[o(405)]),l=a[c+1];if(l)for(let t=0;t<e[o(425)];t++)if(e[t][o(383)][o(445)][o(405)]===l)return t;return e[o(425)]}function g(){const t=["_moveSelectionToFootnoteDefinition","74VDsVBP","insert-footnote-command-executed-with-invalid-id","change","editor","execute","document","footnoteId","insertObject","FootnotesEditing","end","176056oOkvHH","length","selection","10NXAtai","checkChild","getFirstRange","20005TERwFD","get","378960ZiDfYK","2023884yivceV","6579564xPsqUY","footnoteRef","isObject","isEnabled","test","createElement","model","plugins","refresh","string","3892746PYXNLt","7WjjOkG","isBlock","3902589LZjEyI","_getPositionToInsertFootnote","getItems"];return(g=function(){return t})()}const w=y;function y(t,e){const n=g();return(y=function(t,e){return n[t-=214]})(t,e)}!function(t){const e=y,n=t();for(;;)try{if(660614===parseInt(e(234))/1*(-parseInt(e(218))/2)+parseInt(e(248))/3+-parseInt(e(237))/4+-parseInt(e(236))/5+parseInt(e(238))/6+parseInt(e(249))/7*(parseInt(e(228))/8)+parseInt(e(214))/9*(-parseInt(e(231))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(g);class b extends t.Command{[w(246)](){const t=w,e=this[t(221)][t(244)][t(223)][t(230)],n=this[t(215)](e);this[t(241)]=!!n}[w(222)](t){const e=w,{editor:n}=this,{model:o}=n,{selection:s}=o[e(223)],r=this[e(215)](s);if(!r)return;const a=n[e(245)][e(235)](e(226)),c=t?.[e(224)]??(0,i.uid)();!function(t){const n=e;return n(247)==typeof t&&t[n(229)]>0&&!/\s/[n(242)](t)&&!/^\d/[n(242)](t)}(c)?(0,i.logWarning)(e(219)):(o[e(220)](t=>{const n=e,i=t[n(243)](n(239),{footnoteId:c});o[n(225)](i,r,null)}),a[e(217)](c))}[w(215)](t){const e=w,{model:n}=this[e(221)],{schema:o}=n,i=t[e(233)]();for(const t of i[e(216)]())if(o[e(250)](t)||o[e(240)](t))return null;const s=i[e(227)];return o[e(232)](s,e(239))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}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:1760832e3;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(d).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(d).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})=>S(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)(S(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:"ol",classes:["footnotes"]},model:"footnotesDefinitions",converterPriority:"high"}),o.for("dataDowncast").elementToElement({model:"footnotesDefinitions",view:{name:"ol",classes:["footnotes"]}}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=o.createContainerElement("div",{class:"footnotes-wrapper","data-footnotes-list-label":n("Footnotes")},o.createContainerElement("ol",{class:"footnotes"},o.createSlot())),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"))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})=>E(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>E(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+Alt+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Alt+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","sup")||!i.hasClass("footnote"))&&s.getSelectedElement()===i},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e,o=n.getChild(0).getAttribute("href");this._moveSelectionToFootnoteDefinition(o.slice(1)),t.stop(),e.preventDefault()},{priority:"high",context:t=>t.is("element","sup")&&t.hasClass("footnote")&&n}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n.is("element","a"))return;let o=n.getAttribute("href");if(!o?.startsWith("#"))return;o=o.slice(1);let i=!1;(o.startsWith("ref-")&&this._moveSelectionToFootnoteReference(o.slice(4))||this._moveSelectionToFootnoteDefinition(o))&&(i=!0),i&&(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 S(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{id:"ref-"+n,href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function E(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 x=n(331);const P=A;function A(t,e){const n=_();return(A=function(t,e){return n[t-=124]})(t,e)}function _(){const t=["18517QawWeg","get","end","root","from","element","stringify","3813087QRxtJz","9727776YAkbvc","12fHTnfW","editing","setAttribute","51650SZisXE","footnoteRef","definition","toData","reduce","getAttribute","requires","editor","3487OQdSal","contentInsertion","6600350UTfZEd","htmlProcessor","getFootnote","outputTransformation","drop","content","_handleCopyFootnotesDefinitions","append","method","parse","toModel","4RQvbfH","entries","FootnotesClipboard","footnotesDefinitions","init","find","getData","12084633EzGbDM","footnoteId","_insertEmptyFootnotesDefinitionsContainer","change","getFootnotes","footnoteDefinition","remove","createRangeIn","sourceEditorId","_handlePasteFootnotesDefinitions","add","dataTransfer","pluginName","_defineClipboardIntegration","clipboardInput","toView","getFootnotesDefinitionsObjectElement","createElement","data","length","isPremiumPlugin","insert","2362598McsAkm","getFirstRange","selection","document","listenTo","setData","application/ckeditor5-footnotes","push","create","12dCPSCS","isOfficialPlugin"];return(_=function(){return t})()}!function(t){const e=A,n=t();for(;;)try{if(675369===-parseInt(e(188))/1*(parseInt(e(186))/2)+-parseInt(e(195))/3*(-parseInt(e(148))/4)+-parseInt(e(137))/5+-parseInt(e(124))/6*(parseInt(e(177))/7)+parseInt(e(196))/8+-parseInt(e(155))/9+-parseInt(e(127))/10*(-parseInt(e(135))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(_);class D extends t.Plugin{static get[P(167)](){return P(150)}static get[P(133)](){return[v,x.ClipboardPipeline]}static get[P(187)](){return!0}static get[P(175)](){return!0}[P(152)](){this[P(168)]()}[P(168)](){const t=P;this[t(143)](),this[t(164)]()}[P(143)](){const t=P,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(189)](x.ClipboardPipeline),s=n[t(189)](d);this[t(181)](i,t(140),(n,i)=>{const r=t,a=function(t,e){const n=A,o=new Set;for(const{item:i}of t[n(162)](e))i.is(n(193),n(128))&&o[n(165)](i[n(132)](n(156)));return Array[n(192)](o)}(o,i[r(142)]);if(!a[r(174)])return;const c=s[r(159)](),l=a[r(131)]((t,n)=>{const o=r,i=c[o(153)](t=>t.id===n);if(i){const n=e[o(173)][o(170)](i[o(129)],{isClipboardPipeline:!0}),s=e[o(173)][o(138)][o(130)](n);t[i.id]=s}return t},Object[r(185)](null));i[r(166)][r(182)](r(183),JSON[r(194)](l))})}[P(164)](){const t=P,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(125)],r=o[t(189)](x.ClipboardPipeline),a=o[t(189)](d);let c=null;this[t(181)](s[t(180)],t(169),(e,n)=>{const o=t,i=n[o(166)][o(154)](o(183));c=i?JSON[o(146)](i):null}),this[t(181)](r,t(136),(o,s)=>{const r=t;if(!c)return;const l=s[r(163)]===this[r(134)].id;l&&r(141)===s[r(145)]||n[r(158)](t=>{const o=r;!function(t,e){const n=A,o=[];for(const{item:i}of t[n(162)](e))i.is(n(193),n(151))&&o[n(184)](i);for(const e of o)t[n(161)](e)}(t,s[o(142)]);let u=a[o(171)]();if(!u){const e=n[o(180)][o(179)][o(178)]()[o(191)];u=a[o(157)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(185)](null);for(const{item:o}of t[s(162)](e))if(o.is(s(193),s(128))){const e=o[s(132)](s(156));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(126)](s(156),r[e],o)}return r}(t,s[o(142)],t=>!l||null!==a[o(139)](t));for(const[n,i]of Object[o(149)](c)){const s=f[n]||n,r=t[o(172)](o(160),{footnoteId:s}),a=e[o(173)][o(138)][o(170)](i),c=e[o(173)][o(147)](a,r);t[o(144)](c,r),t[o(176)](r,u,o(190))}c=null})})}}var L=n(311),T=n(355),V=n(450),N=n.n(V),O=n(774),R=n.n(O),K=n(265),M=n.n(K),j=n(410),B=n.n(j),z=n(238),U=n.n(z),W=n(14),q={attributes:{"data-cke":!0}};q.setAttributes=B(),q.insert=M().bind(null,"head"),q.domAPI=R(),q.insertStyleElement=U();N()(W.A,q);W.A&&W.A.locals&&W.A.locals;class H 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",G(t,L.ButtonView)),e.add("menuBar:insertFootnote",G(t,L.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 G(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof L.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:T.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}var Y=Z;function X(){var t=["isOfficialPlugin","3465784VMBuEJ","4809512EhSCHi","isPremiumPlugin","5EAvaOI","1100610pvazRI","pluginName","4608504CSNytd","924yqCkVx","Footnotes","32315ppJGPF","462802NHvnhq","requires","2745837mbIKUc"];return(X=function(){return t})()}function Z(t,e){var n=X();return(Z=function(t,e){return n[t-=299]})(t,e)}!function(t){for(var e=Z,n=t();;)try{if(845591===-parseInt(e(310))/1*(parseInt(e(303))/2)+-parseInt(e(305))/3+-parseInt(e(300))/4*(-parseInt(e(302))/5)+-parseInt(e(311))/6+parseInt(e(307))/7+parseInt(e(308))/8+parseInt(e(299))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(X);class J extends t.Plugin{static get[Y(312)](){return Y(301)}static get[Y(304)](){return[v,D,H]}static get[Y(306)](){return!0}static get[Y(309)](){return!0}}const Q=$;function $(t,e){const n=et();return($=function(t,e){return n[t-=260]})(t,e)}!function(t){const e=$,n=t();for(;;)try{if(309717===parseInt(e(261))/1*(parseInt(e(272))/2)+-parseInt(e(270))/3+-parseInt(e(269))/4+parseInt(e(266))/5*(-parseInt(e(263))/6)+parseInt(e(265))/7+-parseInt(e(267))/8*(-parseInt(e(276))/9)+parseInt(e(260))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(et);const tt=[Q(271),Q(275),Q(268),Q(264),Q(274),Q(273),Q(262),Q(277)];function et(){const t=["lower-alpha","decimal-leading-zero","9pEyuQs","upper-roman","12190660DUjOQp","27264vZKqrd","lower-roman","408840xPbtSG","upper-latin","943173hBqtFB","40uqhlFA","2217304gMwiSN","lower-latin","1805372qLipAq","1383324MibXbV","decimal","10YxZoub","upper-alpha"];return(et=function(){return t})()}const nt=ot;function ot(t,e){const n=st();return(ot=function(t,e){return n[t-=291]})(t,e)}!function(t){const e=ot,n=t();for(;;)try{if(472793===parseInt(e(300))/1+parseInt(e(311))/2*(-parseInt(e(308))/3)+-parseInt(e(302))/4+parseInt(e(307))/5+-parseInt(e(292))/6+parseInt(e(297))/7+-parseInt(e(294))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(st);class it extends t.Command{[nt(312)](){const t=nt,{editor:e}=this,n=e[t(310)][t(295)](d)[t(306)]();this[t(291)]=!!n,this[t(299)]=n?.[t(296)](t(304))??null}[nt(293)]({value:t}){const e=nt,{editor:n}=this,o=n[e(310)][e(295)](d),i=o[e(306)]();i&&tt[e(301)](t)&&n[e(303)][e(305)](n=>{const s=e;n[s(298)](s(304),t,i),o[s(309)](n)})}}function st(){const t=["113012vLswCr","refresh","isEnabled","2982234sXQsSg","execute","2782920pNtDeG","get","getAttribute","5623716GTMhWL","setAttribute","value","505950kJUhBa","includes","38344RBtEEG","model","footnotesListStyle","change","getFootnotesDefinitionsObjectElement","937315SZfUTa","9zFilcr","_updateFootnotesCounters","plugins"];return(st=function(){return t})()}const rt=ct;function at(){const t=["568350cfCAgs","458xGzrSd","get","getFootnotesDefinitionsObjectElement","35qDIcCJ","footnotesListStart","1009779crTlfW","5977008fammPf","187WFtnuj","refresh","execute","5389713SkjuaA","model","change","getAttribute","isInteger","setAttribute","490938bhksYV","value","_updateFootnotesCounters","4118yoQItM","plugins","isEnabled","1040390GnPIDH","4KahVyt"];return(at=function(){return t})()}function ct(t,e){const n=at();return(ct=function(t,e){return n[t-=235]})(t,e)}!function(t){const e=ct,n=t();for(;;)try{if(577294===-parseInt(e(242))/1*(parseInt(e(248))/2)+-parseInt(e(253))/3*(-parseInt(e(246))/4)+parseInt(e(251))/5*(-parseInt(e(247))/6)+-parseInt(e(239))/7+parseInt(e(254))/8+-parseInt(e(258))/9+parseInt(e(245))/10*(parseInt(e(255))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(at);class lt extends t.Command{[rt(256)](){const t=rt,{editor:e}=this,n=e[t(243)][t(249)](d)[t(250)]();this[t(244)]=!!n,this[t(240)]=n?.[t(236)](t(252))??null}[rt(257)]({value:t}){const e=rt,{editor:n}=this,o=n[e(243)][e(249)](d),i=o[e(250)]();i&&Number[e(237)](t)&&n[e(259)][e(235)](n=>{const s=e;n[s(238)](s(252),t,i),o[s(241)](n)})}}function ut(){const t=["document","insert","plugins","mapper","2590GxlbMr","upper-roman","differ","12HLBBwo","_defineFormatter","position","attribute:footnotesListStyle:footnotesDefinitions","setStyle","footnotesStart","_updateFootnotesCounters","parseInt","toViewElement","dataDowncast","for","editingDowncast","6039055dOWnfc","getAttribute","footnotes.footnotesProperties.defaultStartIndex","name","init","decimal","isNaN","list-style-type","12768VLwfJx","consume","setAttribute","getChildren","lower-alpha","style","extend","footnotesListStyle","529014KRhsFL","5481KjAnNP","removeAttribute","getChanges","FootnotesPropertiesEditing","removeStyle","registerPostFixer","requires","checkAttribute","getItems","getStyle","7877628zDTTwL","writer","footnotesListStart","_definePostfixer","footnotesStyle","modelRange","consumable","toUpperCase","element:ol","_getDefaultStartIndex","upper-latin","config","start","1rIzYfb","lower-roman","nodeAfter","$text","add","element","attributeToAttribute","isPremiumPlugin","from","floor","50726RLYZQG","_formatFootnoteListValue","_defineSchema","isOfficialPlugin","lower-latin","upcast","decimal-leading-zero","define","toLowerCase","footnotes.footnotesProperties.defaultListStyle","max","footnotesDefinitions","_defineConverters","editor","item","upper-alpha","commands","low","hasAttribute","attributeNewValue","type","setFootnoteFormatter","2525866IbNCfp","padStart","pluginName","10tIkUYr","attribute:footnotesListStart:footnotesDefinitions","get","_getDefaultListStyle","6SCogpp","createRangeOn","3034865bUnkzF","8YVtFwS","fromCharCode","find","model"];return(ut=function(){return t})()}const ft=gt;!function(t){const e=gt,n=t();for(;;)try{if(969989===-parseInt(e(317))/1*(-parseInt(e(349))/2)+parseInt(e(293))/3*(-parseInt(e(359))/4)+-parseInt(e(358))/5*(-parseInt(e(356))/6)+parseInt(e(294))/7*(-parseInt(e(285))/8)+-parseInt(e(304))/9*(-parseInt(e(352))/10)+-parseInt(e(277))/11*(-parseInt(e(370))/12)+parseInt(e(327))/13*(-parseInt(e(367))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ut);class dt extends t.Plugin{static get[ft(351)](){return ft(297)}static get[ft(300)](){return[v,d]}static get[ft(330)](){return!0}static get[ft(324)](){return!0}[ft(281)](){const t=ft,{editor:e}=this;e[t(315)][t(334)](t(336),t(282)),e[t(315)][t(334)](t(279),1),e[t(343)][t(321)](t(308),new it(e)),e[t(343)][t(321)](t(375),new lt(e)),this[t(329)](),this[t(339)](),this[t(371)](),this[t(307)]()}[ft(329)](){const t=ft,{editor:e}=this,{schema:n}=e[t(362)];n[t(291)](t(338),{allowAttributes:[t(292),t(306)]})}[ft(339)](){const t=ft,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(380)](t(332))[t(323)]({view:{name:"ol",styles:{"list-style-type":/.+/}},model:{key:t(292),value:e=>e[t(303)](t(284))}}),n[t(380)](t(332))[t(323)]({view:{name:"ol",attributes:{start:/.+/}},model:{key:t(306),value:e=>{const n=t,o=e[n(278)](n(316)),i=Number[n(377)](o,10);return Number[n(283)](i)?null:i}}}),n[t(380)](t(332))[t(323)]({view:{name:"ol",attributes:{type:/.+/}},model:{key:t(292),value:e=>({1:t(282),a:t(289),A:t(342),i:t(318),I:t(368)}[e[t(278)](t(347))])}}),n[t(380)](t(332))[t(321)](e=>{const n=t;e.on(n(312),(t,e,o)=>{const s=n,r=e[s(309)]?.[s(316)][s(319)];r?.is(s(322),s(338))&&(!r[s(345)](s(292))&&i[s(301)](r,s(292))&&o[s(305)][s(287)](s(292),s(282),r),!r[s(345)](s(306))&&i[s(301)](r,s(306))&&o[s(305)][s(287)](s(306),1,r))},{priority:n(344)})}),n[t(380)](t(379))[t(323)]({model:{name:t(338),key:t(306)},view:e=>1===e?null:{key:t(316),value:String(e)}}),n[t(380)](t(379))[t(323)]({model:{name:t(338),key:t(292)},view:e=>t(282)===e?null:{key:t(290),value:{"list-style-type":e}}}),n[t(380)](t(381))[t(321)](e=>{const n=t;e.on(n(353),(t,e,o)=>{const i=n;if(!o[i(310)][i(286)](e[i(341)],t[i(280)]))return;const s=pt(e[i(341)],o[i(366)]);null===e[i(346)]||void 0===e[i(346)]||1===e[i(346)]?o[i(305)][i(295)](i(316),s):o[i(305)][i(287)](i(316),String(e[i(346)]),s)}),e.on(n(373),(t,e,o)=>{const i=n;if(!o[i(310)][i(286)](e[i(341)],t[i(280)]))return;const s=pt(e[i(341)],o[i(366)]);e[i(346)]&&i(282)!==e[i(346)]?o[i(305)][i(374)](i(284),e[i(346)],s):o[i(305)][i(298)](i(284),s)})})}[ft(307)](){const t=ft,{editor:e}=this,{model:n}=e,o=e[t(365)][t(354)](d),i=this[t(355)](),s=this[t(313)]();n[t(363)][t(299)](e=>{const r=t,a=n[r(363)][r(369)][r(296)]();let c=!1;for(const t of a){if(r(364)!==t[r(347)]||r(320)===t[r(280)])continue;const o=n[r(357)](t[r(372)][r(319)]);for(const t of o[r(302)]())t.is(r(322),r(338))&&(t[r(345)](r(306))||(e[r(287)](r(306),s,t),c=!0),t[r(345)](r(292))||(e[r(287)](r(292),i,t),c=!0))}return c&&o[r(376)](e),c})}[ft(371)](){const t=ft,{editor:e}=this;e[t(365)][t(354)](d)[t(348)](e=>this[t(328)](e))}[ft(355)](){const t=ft;return this[t(340)][t(315)][t(354)](t(336))}[ft(313)](){const t=ft;return this[t(340)][t(315)][t(354)](t(279))}[ft(328)]({container:t,value:e,digits:n}){const o=ft,i=t[o(278)](o(292)),s=t[o(278)](o(306)),r=Math[o(326)](e)+(s-1);switch(i){case o(282):default:return String(r);case o(333):return function(t,e){const n=o;return String(t)[n(350)](e,"0")}(r,Math[o(337)](2,n));case o(289):case o(331):return ht(r,!1);case o(342):case o(314):return ht(r,!0);case o(318):return wt(r,!1);case o(368):return wt(r,!0)}}}function pt(t,e){const n=ft,o=e[n(378)](t);return Array[n(325)](o[n(288)]())[n(361)](t=>t.is(n(322),"ol"))}function ht(t,e){const n=ft;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(360)](97+t)+o,i=Math[n(326)]((i-1)/26)}return e?o[n(311)]():o}const mt=[{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 gt(t,e){const n=ut();return(gt=function(t,e){return n[t-=277]})(t,e)}function wt(t,e){const n=ft;let o="",i=t;for(const{value:t,numeral:e}of mt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(335)]()}class yt extends L.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new L.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:n}){super(t),this.focusCycler=new L.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,L.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 L.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 L.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 L.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 L.LabeledFieldView(this.locale,L.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,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("Footnotes start index must be greater than 0.")}),e}}var bt=n(945),vt={attributes:{"data-cke":!0}};vt.setAttributes=B(),vt.insert=M().bind(null,"head"),vt.domAPI=R(),vt.insertStyleElement=U();N()(bt.A,vt);bt.A&&bt.A.locals&&bt.A.locals;class It extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[L.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,L.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:T.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:T.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:T.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:T.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:T.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:T.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:T.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 L.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 yt(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}=L.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 kt(t,e){var n=Ct();return(kt=function(t,e){return n[t-=173]})(t,e)}function Ct(){var t=["403251xryoUk","10877657hBJATP","isPremiumPlugin","20chXESF","isOfficialPlugin","28036107iDyifQ","890oddnZc","requires","388692ufWaNg","pluginName","6012foJZtg","11344kLxivr","FootnotesProperties","685nYzcOk","44MfwwOb","2185670kpFrfS"];return(Ct=function(){return t})()}var Ft=kt;!function(t){for(var e=kt,n=t();;)try{if(894357===-parseInt(e(180))/1*(parseInt(e(173))/2)+-parseInt(e(183))/3*(parseInt(e(181))/4)+parseInt(e(186))/5*(-parseInt(e(175))/6)+parseInt(e(184))/7+parseInt(e(178))/8*(-parseInt(e(177))/9)+-parseInt(e(182))/10+parseInt(e(188))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ct);class St extends t.Plugin{static get[Ft(176)](){return Ft(179)}static get[Ft(174)](){return[dt,It]}static get[Ft(187)](){return!0}static get[Ft(185)](){return!0}}function Et(){var t=["24912ECsOCS","868310edOazP","440SwlkUR","981756pUnYkf","10505929qjGfIK","6AtvRxw","2KayYnH","4035990YmCMaz","4213296bcZQZL","6529240Nqsygr","708ZOykDT"];return(Et=function(){return t})()}function xt(t,e){var n=Et();return(xt=function(t,e){return n[t-=199]})(t,e)}!function(t){for(var e=xt,n=t();;)try{if(956272===parseInt(e(205))/1*(parseInt(e(208))/2)+-parseInt(e(202))/3*(-parseInt(e(201))/4)+-parseInt(e(209))/5+parseInt(e(207))/6*(parseInt(e(206))/7)+parseInt(e(200))/8+parseInt(e(199))/9+parseInt(e(203))/10*(-parseInt(e(204))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Et)})(),(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-footnotes-list-widget-label-background-color:#757575;--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-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:1.9em 0 1.5em;padding-inline-start:3em;position:relative}.ck-content .footnotes:before{border-top:1px solid var(--ck-content-footnotes-list-separator-color);content:"";left:0;position:absolute;top:-1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes:before{left:auto;right:0}.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 .footnote>a{pointer-events:none}.ck.ck-editor__editable .footnotes-wrapper{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes-wrapper:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-list-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-wrapper[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-wrapper>.footnotes{margin-bottom:.65em;margin-top:1em}',""]);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:()=>J,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>St,FootnotesPropertiesEditing:()=>dt,FootnotesPropertiesUI:()=>It,FootnotesStartCommand:()=>lt,FootnotesStyleCommand:()=>it,FootnotesTracker:()=>d,FootnotesUI:()=>H,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);const r=c;function a(){const t=["1987443mGKNwE","96768GWXPSd","nodeAfter","elementName","add","_model","from","3695CEveea","_elementName","reset","delete","attributes","_getElementKey","5LiXiwq","15ChFttD","2229115AJOybm","insert","2227074ZnXqsW","type","slice","length","name","$text","position","13511575xYfwTY","remove","$graveyard","rootName","248fVjuRh","getElementKey","flat","get","root","push","createRangeOn","10NrhGRk","getChanges","_trackedElements","getItems","901296ucPNfX","element","set","has","values","clear"];return(a=function(){return t})()}function c(t,e){const n=a();return(c=function(t,e){return n[t-=432]})(t,e)}!function(t){const e=c,n=t();for(;;)try{if(309646===parseInt(e(460))/1*(-parseInt(e(436))/2)+-parseInt(e(467))/3*(-parseInt(e(454))/4)+parseInt(e(466))/5*(-parseInt(e(470))/6)+-parseInt(e(468))/7+-parseInt(e(447))/8+parseInt(e(453))/9+-parseInt(e(443))/10*(-parseInt(e(432))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(a);class l{[r(458)];[r(461)];[r(465)];[r(445)]=new Map;constructor(t,e){const n=r;this[n(458)]=t,this[n(461)]=e[n(456)],this[n(465)]=e[n(437)]}[r(462)](){const t=r;this[t(445)][t(452)]()}[r(444)](t){const e=r,n=new Set,o=new Map;for(const i of t){if(e(469)===i[e(471)]&&e(475)!==i[e(474)]&&i[e(476)][e(455)]){const t=this[e(458)][e(442)](i[e(476)][e(455)]);for(const n of t[e(446)]()){if(!n.is(e(448),this[e(461)]))continue;const t=this[e(465)](n);o[e(450)](t)||o[e(449)](t,[]),o[e(439)](t)[e(441)](n)}}if(e(433)===i[e(471)]&&i[e(474)]===this[e(461)]){const t=this[e(465)]({getAttribute:t=>i[e(464)][e(439)](t)});n[e(457)](t)}}for(const[t,o]of this[e(445)])e(434)===o[e(440)][e(435)]&&n[e(457)](t);for(const t of n)this[e(445)][e(463)](t);for(const[t,n]of o)this[e(445)][e(449)](t,n[n[e(473)]-1]);const i=new Set;for(const[t,s]of o)n[e(450)](t)&&(i[e(457)](s[0]),s[e(473)]>1?o[e(449)](t,s[e(472)](1)):o[e(463)](t),n[e(463)](t));return{removed:Array[e(459)](n),inserted:Array[e(459)](o[e(451)]())[e(438)](),moved:Array[e(459)](i)}}}function u(){const t=["set","has","reset","13012mNoIBF","_footnotesDefinitions","move","filter","differ","_sortFootnoteDefinitions","isOfficialPlugin","isEqual","map","document","add","push","definition","registerPostFixer","_ensureFootnotesReferencesHaveProperOrder","createRangeIn","654600tNHQsz","588rUSEFY","getChanges","$graveyard","getRootNames","144aLSHUM","reference","model","splice","_footnoteFormatter","min","createRangeOn","_footnotes","159ADvvFD","footnoteDefinition","FootnotesTracker","_footnoteRefsTracker","footnoteInlineContent","pluginName","enqueueChange","350077qTmrdc","footnotes.multiBlock","after","editor","createPositionAt","getChildren","createPositionBefore","end","rootName","childCount","footnoteCounter","72807NPPGoq","setAttribute","getFootnotesFormatter","change:data","indexOf","low","from","remove","isPremiumPlugin","before","_handleFootnoteDefinitionsChanges","18mPCItM","createElement","73348Szimwn","parent","append","_handleFootnotesDefinitionsObjectChanges","length","footnotesDefinitions","getFootnotes","getFootnote","_handleFootnotesDefinitionsObjectSync","_insertEmptyFootnotesDefinitionsContainer","listenTo","some","footnoteId","unshift","24puAGun","_ensureFootnotesDefinitionsContainerExists","_updateFootnoteRefCounter","config","findIndex","_handleInsertedFootnoteReference","953815PwlAzJ","10JpijQX","setFootnoteFormatter","_updateFootnotesCounters","root","compareWith","_footnoteDefsTracker","155510pSevtr","footnoteRef","_footnoteDefsContainerTracker","112IdstGq","_handleRemoveFootnoteReferenceById","high","paragraph","_handleFootnoteReferencesChanges","singleton","find","get","init","insert","_handleMovedFootnoteReference","getAttribute","getFootnotesDefinitionsObjectElement"];return(u=function(){return t})()}const f=h;!function(t){const e=h,n=t();for(;;)try{if(411555===-parseInt(e(448))/1*(parseInt(e(442))/2)+-parseInt(e(390))/3*(parseInt(e(361))/4)+parseInt(e(441))/5*(parseInt(e(435))/6)+-parseInt(e(408))/7*(-parseInt(e(382))/8)+-parseInt(e(419))/9*(parseInt(e(377))/10)+-parseInt(e(421))/11*(-parseInt(e(378))/12)+-parseInt(e(397))/13*(-parseInt(e(451))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(u);class d extends t.Plugin{[f(389)]=[];[f(362)]=null;[f(386)]=null;[f(450)];[f(393)];[f(447)];static get[f(395)](){return f(392)}static get[f(367)](){return!0}static get[f(416)](){return!0}constructor(t){const e=f;super(t),this[e(450)]=new l(this[e(400)][e(384)],{elementName:e(426),getElementKey:()=>e(350)}),this[e(393)]=new l(this[e(400)][e(384)],{elementName:e(449),getElementKey:t=>t[e(356)](e(433))}),this[e(447)]=new l(this[e(400)][e(384)],{elementName:e(391),getElementKey:t=>t[e(356)](e(433))})}[f(353)](){const t=f,{editor:e}=this,{model:n,data:o}=e;n[t(370)][t(374)](e=>{const o=t,i=n[o(370)][o(365)][o(379)]();let s=!1;return this[o(424)](e,i)&&(s=!0),this[o(418)](e,i)&&(s=!0),this[o(349)](e,i)&&(s=!0),this[o(375)](e)&&(s=!0),this[o(429)](e)&&(s=!0),this[o(366)](e)&&(s=!0),s}),this[t(431)](n[t(370)],t(411),()=>{const e=t;n[e(396)]({isUndoable:!1},t=>{this[e(436)](t)})},{priority:t(413)}),this[t(431)](o,t(358),()=>{const e=t;this[e(389)]=[],this[e(450)][e(360)](),this[e(393)][e(360)](),this[e(447)][e(360)]()},{priority:t(453)})}[f(357)](){return this[f(362)]}[f(428)](t){const e=f;return this[e(389)][e(351)](e=>e.id===t)||null}[f(427)](){const t=f;return Array[t(414)](this[t(389)])}[f(410)](){return this[f(386)]}[f(443)](t){this[f(386)]=t}[f(444)](t,e=0){const n=f;let o=!1;for(let i=e;i<this[n(389)][n(425)];i++)this[n(437)](t,i)&&(o=!0);return o}[f(430)](t,e){const n=f,o=t[n(420)](n(426),{});return t[n(423)](o,e),this[n(362)]=o,o}[f(436)](t){const e=f;if(!this[e(389)][e(425)]||this[e(362)])return;const n=this[e(389)][0][e(383)][e(445)],o=this[e(430)](t,n);for(const n of this[e(389)])n[e(373)][e(422)]||t[e(354)](n[e(373)],o,e(404));this[e(444)](t)}[f(424)](t,e){const n=f;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(450)][n(379)](e);if(r[n(425)]&&(this[n(362)]=r[0]),i[n(425)])if(i[n(425)]>1||this[n(362)]&&i[n(432)](t=>t!==this[n(362)])){const e=t[n(420)](n(426),{}),s=[];this[n(362)]&&s[n(372)](this[n(362)]),s[n(372)](...i),t[n(354)](e,s[0],n(417));for(const o of s)t[n(363)](t[n(376)](o),t[n(401)](e,n(404))),t[n(415)](o);this[n(362)]=e,this[n(444)](t),o=!0}else this[n(362)]=i[0];if(s[n(425)]&&n(380)===this[n(362)]?.[n(445)][n(405)]){for(const e of this[n(389)])t[n(415)](e[n(383)]),o=!0;this[n(389)]=[],this[n(362)]=null}return o}[f(418)](t,e){const n=f;let o=!1;const i=this[n(400)][n(438)][n(352)](n(398)),{inserted:s,moved:r}=this[n(447)][n(379)](e);for(const e of[...r,...s]){const s=e[n(356)](n(433)),r=this[n(428)](s);r&&(r[n(373)]=e),p(t,i,e)&&(o=!0)}return o}[f(349)](t,e){const n=f;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(393)][n(379)](e);for(const e of i)this[n(452)](t,e)&&(o=!0);for(const e of s)this[n(440)](t,e)&&(o=!0);for(const e of r)this[n(355)](t,e)&&(o=!0);return o}[f(429)](t){const e=f;if(!this[e(362)])return!1;let n=!1;if(this[e(362)][e(406)]!==this[e(389)][e(425)]){const o=[];for(const t of this[e(362)][e(402)]()){const i=t[e(356)](e(433));this[e(428)](i)||(o[e(434)](t),n=!0)}for(const n of o)t[e(415)](n)}const o=new Set,i=[];for(const t of this[e(362)][e(402)]()){const s=t[e(356)](e(433));o[e(359)](s)?(i[e(434)](t),n=!0):o[e(371)](s)}for(const n of i)t[e(415)](n);return this[e(362)][e(406)]||(t[e(415)](this[e(362)]),this[e(362)]=null,n=!0),n}[f(440)](t,e){const n=f;if(this[n(389)][n(351)](t=>t[n(383)]===e))return!1;let o=!1;const i=e[n(356)](n(433)),s=this[n(428)](i);s&&(t[n(415)](s[n(383)]),this[n(389)]=this[n(389)][n(364)](t=>t.id!==i),o=!0);let r=this[n(362)]?function(t,e){const o=n;for(const n of t[o(402)]())if(n[o(356)](o(433))===e)return n;return null}(this[n(362)],i):null;r||(r=t[n(420)](n(391),{footnoteId:i}),this[n(362)]&&(t[n(354)](r,this[n(362)],n(404)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(400)][n(384)],this[n(389)],e);return this[n(389)][n(385)](c,0,a),this[n(444)](t,c)&&(o=!0),o}[f(452)](t,e){const n=f,o=this[n(389)][n(439)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(389)][o];return n(380)!==s[n(373)][n(445)][n(405)]&&(t[n(415)](s[n(373)]),i=!0),this[n(389)][n(385)](o,1),this[n(444)](t,o)&&(i=!0),i}[f(355)](t,e){const n=f,o=e[n(356)](n(433)),i=this[n(389)][n(439)](t=>t.id===o),s=this[n(389)][i];let r=!1;s[n(383)]=e,this[n(389)][n(385)](i,1);const a=m(this[n(400)][n(384)],this[n(389)],e);return this[n(389)][n(385)](a,0,s),this[n(444)](t,Math[n(387)](i,a))&&(r=!0),r}[f(437)](t,e){const n=f;if(!this[n(362)])return!1;const o=this[n(389)][e];let i;return i=this[n(386)]?this[n(386)]({footnote:o,container:this[n(362)],digits:String(this[n(389)][n(425)])[n(425)],value:e+1}):String(e+1),o[n(383)][n(356)](n(407))!=i&&(t[n(409)](n(407),i,o[n(383)]),!0)}[f(366)](t){const e=f;if(!this[e(362)]||this[e(389)][e(425)]<2)return!1;if(function(t,n){const o=e;if(t[o(425)]!==n[o(425)])return!1;for(let e=0;e<t[o(425)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(389)][e(369)](t=>t.id),Array[e(414)](this[e(362)][e(402)]())[e(369)](t=>t[e(356)](e(433)))))return!1;let n=!1;for(let o=0;o<this[e(389)][e(425)];o++){const i=this[e(389)][o],s=t[e(403)](i[e(373)]),r=t[e(401)](this[e(362)],o);s[e(368)](r)||(t[e(363)](t[e(388)](i[e(373)]),r),n=!0)}return n}[f(375)](t){const e=f;if(!this[e(389)][e(425)])return!1;const{model:n}=this[e(400)];let o=!1;for(let i=0;i<this[e(389)][e(425)]-1;i++){const s=this[e(389)][i],r=this[e(389)][i+1],a=n[e(403)](s[e(383)]),c=n[e(403)](r[e(383)]);e(399)===a[e(446)](c)&&(this[e(355)](t,s[e(383)]),i=-1,o=!0)}return o}}function p(t,e,n){const o=f;if(n[o(406)])return!1;const i=o(e?454:394);return t[o(354)](t[o(420)](i),n),!0}function h(t,e){const n=u();return(h=function(t,e){return n[t-=349]})(t,e)}function m(t,e,n){const o=f;if(0===e[o(425)])return 0;const i=t[o(403)](n);for(let n=0;n<e[o(425)];n++){const s=e[n],r=t[o(403)](s[o(383)]);if(o(417)===i[o(446)](r))return n}const s=n[o(445)];let r=-1;for(let t=e[o(425)]-1;t>=0;t--)if(e[t][o(383)][o(445)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(370)][o(381)](),c=a[o(412)](s[o(405)]),l=a[c+1];if(l)for(let t=0;t<e[o(425)];t++)if(e[t][o(383)][o(445)][o(405)]===l)return t;return e[o(425)]}function g(){const t=["_moveSelectionToFootnoteDefinition","74VDsVBP","insert-footnote-command-executed-with-invalid-id","change","editor","execute","document","footnoteId","insertObject","FootnotesEditing","end","176056oOkvHH","length","selection","10NXAtai","checkChild","getFirstRange","20005TERwFD","get","378960ZiDfYK","2023884yivceV","6579564xPsqUY","footnoteRef","isObject","isEnabled","test","createElement","model","plugins","refresh","string","3892746PYXNLt","7WjjOkG","isBlock","3902589LZjEyI","_getPositionToInsertFootnote","getItems"];return(g=function(){return t})()}const w=y;function y(t,e){const n=g();return(y=function(t,e){return n[t-=214]})(t,e)}!function(t){const e=y,n=t();for(;;)try{if(660614===parseInt(e(234))/1*(-parseInt(e(218))/2)+parseInt(e(248))/3+-parseInt(e(237))/4+-parseInt(e(236))/5+parseInt(e(238))/6+parseInt(e(249))/7*(parseInt(e(228))/8)+parseInt(e(214))/9*(-parseInt(e(231))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(g);class b extends t.Command{[w(246)](){const t=w,e=this[t(221)][t(244)][t(223)][t(230)],n=this[t(215)](e);this[t(241)]=!!n}[w(222)](t){const e=w,{editor:n}=this,{model:o}=n,{selection:s}=o[e(223)],r=this[e(215)](s);if(!r)return;const a=n[e(245)][e(235)](e(226)),c=t?.[e(224)]??(0,i.uid)();!function(t){const n=e;return n(247)==typeof t&&t[n(229)]>0&&!/\s/[n(242)](t)&&!/^\d/[n(242)](t)}(c)?(0,i.logWarning)(e(219)):(o[e(220)](t=>{const n=e,i=t[n(243)](n(239),{footnoteId:c});o[n(225)](i,r,null)}),a[e(217)](c))}[w(215)](t){const e=w,{model:n}=this[e(221)],{schema:o}=n,i=t[e(233)]();for(const t of i[e(216)]())if(o[e(250)](t)||o[e(240)](t))return null;const s=i[e(227)];return o[e(232)](s,e(239))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}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:1760918400;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(d).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(d).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})=>S(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)(S(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:"ol",classes:["footnotes"]},model:"footnotesDefinitions",converterPriority:"high"}),o.for("dataDowncast").elementToElement({model:"footnotesDefinitions",view:{name:"ol",classes:["footnotes"]}}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=o.createContainerElement("div",{class:"footnotes-wrapper","data-footnotes-list-label":n("Footnotes")},o.createContainerElement("ol",{class:"footnotes"},o.createSlot())),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"))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})=>E(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>E(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+Alt+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Alt+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","sup")||!i.hasClass("footnote"))&&s.getSelectedElement()===i},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e,o=n.getChild(0).getAttribute("href");this._moveSelectionToFootnoteDefinition(o.slice(1)),t.stop(),e.preventDefault()},{priority:"high",context:t=>t.is("element","sup")&&t.hasClass("footnote")&&n}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n.is("element","a"))return;let o=n.getAttribute("href");if(!o?.startsWith("#"))return;o=o.slice(1);let i=!1;(o.startsWith("ref-")&&this._moveSelectionToFootnoteReference(o.slice(4))||this._moveSelectionToFootnoteDefinition(o))&&(i=!0),i&&(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 S(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{id:"ref-"+n,href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function E(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 x=n(331);const P=A;function A(t,e){const n=_();return(A=function(t,e){return n[t-=124]})(t,e)}function _(){const t=["18517QawWeg","get","end","root","from","element","stringify","3813087QRxtJz","9727776YAkbvc","12fHTnfW","editing","setAttribute","51650SZisXE","footnoteRef","definition","toData","reduce","getAttribute","requires","editor","3487OQdSal","contentInsertion","6600350UTfZEd","htmlProcessor","getFootnote","outputTransformation","drop","content","_handleCopyFootnotesDefinitions","append","method","parse","toModel","4RQvbfH","entries","FootnotesClipboard","footnotesDefinitions","init","find","getData","12084633EzGbDM","footnoteId","_insertEmptyFootnotesDefinitionsContainer","change","getFootnotes","footnoteDefinition","remove","createRangeIn","sourceEditorId","_handlePasteFootnotesDefinitions","add","dataTransfer","pluginName","_defineClipboardIntegration","clipboardInput","toView","getFootnotesDefinitionsObjectElement","createElement","data","length","isPremiumPlugin","insert","2362598McsAkm","getFirstRange","selection","document","listenTo","setData","application/ckeditor5-footnotes","push","create","12dCPSCS","isOfficialPlugin"];return(_=function(){return t})()}!function(t){const e=A,n=t();for(;;)try{if(675369===-parseInt(e(188))/1*(parseInt(e(186))/2)+-parseInt(e(195))/3*(-parseInt(e(148))/4)+-parseInt(e(137))/5+-parseInt(e(124))/6*(parseInt(e(177))/7)+parseInt(e(196))/8+-parseInt(e(155))/9+-parseInt(e(127))/10*(-parseInt(e(135))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(_);class D extends t.Plugin{static get[P(167)](){return P(150)}static get[P(133)](){return[v,x.ClipboardPipeline]}static get[P(187)](){return!0}static get[P(175)](){return!0}[P(152)](){this[P(168)]()}[P(168)](){const t=P;this[t(143)](),this[t(164)]()}[P(143)](){const t=P,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(189)](x.ClipboardPipeline),s=n[t(189)](d);this[t(181)](i,t(140),(n,i)=>{const r=t,a=function(t,e){const n=A,o=new Set;for(const{item:i}of t[n(162)](e))i.is(n(193),n(128))&&o[n(165)](i[n(132)](n(156)));return Array[n(192)](o)}(o,i[r(142)]);if(!a[r(174)])return;const c=s[r(159)](),l=a[r(131)]((t,n)=>{const o=r,i=c[o(153)](t=>t.id===n);if(i){const n=e[o(173)][o(170)](i[o(129)],{isClipboardPipeline:!0}),s=e[o(173)][o(138)][o(130)](n);t[i.id]=s}return t},Object[r(185)](null));i[r(166)][r(182)](r(183),JSON[r(194)](l))})}[P(164)](){const t=P,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(125)],r=o[t(189)](x.ClipboardPipeline),a=o[t(189)](d);let c=null;this[t(181)](s[t(180)],t(169),(e,n)=>{const o=t,i=n[o(166)][o(154)](o(183));c=i?JSON[o(146)](i):null}),this[t(181)](r,t(136),(o,s)=>{const r=t;if(!c)return;const l=s[r(163)]===this[r(134)].id;l&&r(141)===s[r(145)]||n[r(158)](t=>{const o=r;!function(t,e){const n=A,o=[];for(const{item:i}of t[n(162)](e))i.is(n(193),n(151))&&o[n(184)](i);for(const e of o)t[n(161)](e)}(t,s[o(142)]);let u=a[o(171)]();if(!u){const e=n[o(180)][o(179)][o(178)]()[o(191)];u=a[o(157)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(185)](null);for(const{item:o}of t[s(162)](e))if(o.is(s(193),s(128))){const e=o[s(132)](s(156));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(126)](s(156),r[e],o)}return r}(t,s[o(142)],t=>!l||null!==a[o(139)](t));for(const[n,i]of Object[o(149)](c)){const s=f[n]||n,r=t[o(172)](o(160),{footnoteId:s}),a=e[o(173)][o(138)][o(170)](i),c=e[o(173)][o(147)](a,r);t[o(144)](c,r),t[o(176)](r,u,o(190))}c=null})})}}var L=n(311),T=n(355),V=n(450),N=n.n(V),O=n(774),R=n.n(O),K=n(265),M=n.n(K),j=n(410),B=n.n(j),z=n(238),U=n.n(z),W=n(14),q={attributes:{"data-cke":!0}};q.setAttributes=B(),q.insert=M().bind(null,"head"),q.domAPI=R(),q.insertStyleElement=U();N()(W.A,q);W.A&&W.A.locals&&W.A.locals;class H 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",G(t,L.ButtonView)),e.add("menuBar:insertFootnote",G(t,L.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 G(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof L.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:T.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}var Y=Z;function X(){var t=["isOfficialPlugin","3465784VMBuEJ","4809512EhSCHi","isPremiumPlugin","5EAvaOI","1100610pvazRI","pluginName","4608504CSNytd","924yqCkVx","Footnotes","32315ppJGPF","462802NHvnhq","requires","2745837mbIKUc"];return(X=function(){return t})()}function Z(t,e){var n=X();return(Z=function(t,e){return n[t-=299]})(t,e)}!function(t){for(var e=Z,n=t();;)try{if(845591===-parseInt(e(310))/1*(parseInt(e(303))/2)+-parseInt(e(305))/3+-parseInt(e(300))/4*(-parseInt(e(302))/5)+-parseInt(e(311))/6+parseInt(e(307))/7+parseInt(e(308))/8+parseInt(e(299))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(X);class J extends t.Plugin{static get[Y(312)](){return Y(301)}static get[Y(304)](){return[v,D,H]}static get[Y(306)](){return!0}static get[Y(309)](){return!0}}const Q=$;function $(t,e){const n=et();return($=function(t,e){return n[t-=260]})(t,e)}!function(t){const e=$,n=t();for(;;)try{if(309717===parseInt(e(261))/1*(parseInt(e(272))/2)+-parseInt(e(270))/3+-parseInt(e(269))/4+parseInt(e(266))/5*(-parseInt(e(263))/6)+parseInt(e(265))/7+-parseInt(e(267))/8*(-parseInt(e(276))/9)+parseInt(e(260))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(et);const tt=[Q(271),Q(275),Q(268),Q(264),Q(274),Q(273),Q(262),Q(277)];function et(){const t=["lower-alpha","decimal-leading-zero","9pEyuQs","upper-roman","12190660DUjOQp","27264vZKqrd","lower-roman","408840xPbtSG","upper-latin","943173hBqtFB","40uqhlFA","2217304gMwiSN","lower-latin","1805372qLipAq","1383324MibXbV","decimal","10YxZoub","upper-alpha"];return(et=function(){return t})()}const nt=ot;function ot(t,e){const n=st();return(ot=function(t,e){return n[t-=291]})(t,e)}!function(t){const e=ot,n=t();for(;;)try{if(472793===parseInt(e(300))/1+parseInt(e(311))/2*(-parseInt(e(308))/3)+-parseInt(e(302))/4+parseInt(e(307))/5+-parseInt(e(292))/6+parseInt(e(297))/7+-parseInt(e(294))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(st);class it extends t.Command{[nt(312)](){const t=nt,{editor:e}=this,n=e[t(310)][t(295)](d)[t(306)]();this[t(291)]=!!n,this[t(299)]=n?.[t(296)](t(304))??null}[nt(293)]({value:t}){const e=nt,{editor:n}=this,o=n[e(310)][e(295)](d),i=o[e(306)]();i&&tt[e(301)](t)&&n[e(303)][e(305)](n=>{const s=e;n[s(298)](s(304),t,i),o[s(309)](n)})}}function st(){const t=["113012vLswCr","refresh","isEnabled","2982234sXQsSg","execute","2782920pNtDeG","get","getAttribute","5623716GTMhWL","setAttribute","value","505950kJUhBa","includes","38344RBtEEG","model","footnotesListStyle","change","getFootnotesDefinitionsObjectElement","937315SZfUTa","9zFilcr","_updateFootnotesCounters","plugins"];return(st=function(){return t})()}const rt=ct;function at(){const t=["568350cfCAgs","458xGzrSd","get","getFootnotesDefinitionsObjectElement","35qDIcCJ","footnotesListStart","1009779crTlfW","5977008fammPf","187WFtnuj","refresh","execute","5389713SkjuaA","model","change","getAttribute","isInteger","setAttribute","490938bhksYV","value","_updateFootnotesCounters","4118yoQItM","plugins","isEnabled","1040390GnPIDH","4KahVyt"];return(at=function(){return t})()}function ct(t,e){const n=at();return(ct=function(t,e){return n[t-=235]})(t,e)}!function(t){const e=ct,n=t();for(;;)try{if(577294===-parseInt(e(242))/1*(parseInt(e(248))/2)+-parseInt(e(253))/3*(-parseInt(e(246))/4)+parseInt(e(251))/5*(-parseInt(e(247))/6)+-parseInt(e(239))/7+parseInt(e(254))/8+-parseInt(e(258))/9+parseInt(e(245))/10*(parseInt(e(255))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(at);class lt extends t.Command{[rt(256)](){const t=rt,{editor:e}=this,n=e[t(243)][t(249)](d)[t(250)]();this[t(244)]=!!n,this[t(240)]=n?.[t(236)](t(252))??null}[rt(257)]({value:t}){const e=rt,{editor:n}=this,o=n[e(243)][e(249)](d),i=o[e(250)]();i&&Number[e(237)](t)&&n[e(259)][e(235)](n=>{const s=e;n[s(238)](s(252),t,i),o[s(241)](n)})}}function ut(){const t=["document","insert","plugins","mapper","2590GxlbMr","upper-roman","differ","12HLBBwo","_defineFormatter","position","attribute:footnotesListStyle:footnotesDefinitions","setStyle","footnotesStart","_updateFootnotesCounters","parseInt","toViewElement","dataDowncast","for","editingDowncast","6039055dOWnfc","getAttribute","footnotes.footnotesProperties.defaultStartIndex","name","init","decimal","isNaN","list-style-type","12768VLwfJx","consume","setAttribute","getChildren","lower-alpha","style","extend","footnotesListStyle","529014KRhsFL","5481KjAnNP","removeAttribute","getChanges","FootnotesPropertiesEditing","removeStyle","registerPostFixer","requires","checkAttribute","getItems","getStyle","7877628zDTTwL","writer","footnotesListStart","_definePostfixer","footnotesStyle","modelRange","consumable","toUpperCase","element:ol","_getDefaultStartIndex","upper-latin","config","start","1rIzYfb","lower-roman","nodeAfter","$text","add","element","attributeToAttribute","isPremiumPlugin","from","floor","50726RLYZQG","_formatFootnoteListValue","_defineSchema","isOfficialPlugin","lower-latin","upcast","decimal-leading-zero","define","toLowerCase","footnotes.footnotesProperties.defaultListStyle","max","footnotesDefinitions","_defineConverters","editor","item","upper-alpha","commands","low","hasAttribute","attributeNewValue","type","setFootnoteFormatter","2525866IbNCfp","padStart","pluginName","10tIkUYr","attribute:footnotesListStart:footnotesDefinitions","get","_getDefaultListStyle","6SCogpp","createRangeOn","3034865bUnkzF","8YVtFwS","fromCharCode","find","model"];return(ut=function(){return t})()}const ft=gt;!function(t){const e=gt,n=t();for(;;)try{if(969989===-parseInt(e(317))/1*(-parseInt(e(349))/2)+parseInt(e(293))/3*(-parseInt(e(359))/4)+-parseInt(e(358))/5*(-parseInt(e(356))/6)+parseInt(e(294))/7*(-parseInt(e(285))/8)+-parseInt(e(304))/9*(-parseInt(e(352))/10)+-parseInt(e(277))/11*(-parseInt(e(370))/12)+parseInt(e(327))/13*(-parseInt(e(367))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ut);class dt extends t.Plugin{static get[ft(351)](){return ft(297)}static get[ft(300)](){return[v,d]}static get[ft(330)](){return!0}static get[ft(324)](){return!0}[ft(281)](){const t=ft,{editor:e}=this;e[t(315)][t(334)](t(336),t(282)),e[t(315)][t(334)](t(279),1),e[t(343)][t(321)](t(308),new it(e)),e[t(343)][t(321)](t(375),new lt(e)),this[t(329)](),this[t(339)](),this[t(371)](),this[t(307)]()}[ft(329)](){const t=ft,{editor:e}=this,{schema:n}=e[t(362)];n[t(291)](t(338),{allowAttributes:[t(292),t(306)]})}[ft(339)](){const t=ft,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(380)](t(332))[t(323)]({view:{name:"ol",styles:{"list-style-type":/.+/}},model:{key:t(292),value:e=>e[t(303)](t(284))}}),n[t(380)](t(332))[t(323)]({view:{name:"ol",attributes:{start:/.+/}},model:{key:t(306),value:e=>{const n=t,o=e[n(278)](n(316)),i=Number[n(377)](o,10);return Number[n(283)](i)?null:i}}}),n[t(380)](t(332))[t(323)]({view:{name:"ol",attributes:{type:/.+/}},model:{key:t(292),value:e=>({1:t(282),a:t(289),A:t(342),i:t(318),I:t(368)}[e[t(278)](t(347))])}}),n[t(380)](t(332))[t(321)](e=>{const n=t;e.on(n(312),(t,e,o)=>{const s=n,r=e[s(309)]?.[s(316)][s(319)];r?.is(s(322),s(338))&&(!r[s(345)](s(292))&&i[s(301)](r,s(292))&&o[s(305)][s(287)](s(292),s(282),r),!r[s(345)](s(306))&&i[s(301)](r,s(306))&&o[s(305)][s(287)](s(306),1,r))},{priority:n(344)})}),n[t(380)](t(379))[t(323)]({model:{name:t(338),key:t(306)},view:e=>1===e?null:{key:t(316),value:String(e)}}),n[t(380)](t(379))[t(323)]({model:{name:t(338),key:t(292)},view:e=>t(282)===e?null:{key:t(290),value:{"list-style-type":e}}}),n[t(380)](t(381))[t(321)](e=>{const n=t;e.on(n(353),(t,e,o)=>{const i=n;if(!o[i(310)][i(286)](e[i(341)],t[i(280)]))return;const s=pt(e[i(341)],o[i(366)]);null===e[i(346)]||void 0===e[i(346)]||1===e[i(346)]?o[i(305)][i(295)](i(316),s):o[i(305)][i(287)](i(316),String(e[i(346)]),s)}),e.on(n(373),(t,e,o)=>{const i=n;if(!o[i(310)][i(286)](e[i(341)],t[i(280)]))return;const s=pt(e[i(341)],o[i(366)]);e[i(346)]&&i(282)!==e[i(346)]?o[i(305)][i(374)](i(284),e[i(346)],s):o[i(305)][i(298)](i(284),s)})})}[ft(307)](){const t=ft,{editor:e}=this,{model:n}=e,o=e[t(365)][t(354)](d),i=this[t(355)](),s=this[t(313)]();n[t(363)][t(299)](e=>{const r=t,a=n[r(363)][r(369)][r(296)]();let c=!1;for(const t of a){if(r(364)!==t[r(347)]||r(320)===t[r(280)])continue;const o=n[r(357)](t[r(372)][r(319)]);for(const t of o[r(302)]())t.is(r(322),r(338))&&(t[r(345)](r(306))||(e[r(287)](r(306),s,t),c=!0),t[r(345)](r(292))||(e[r(287)](r(292),i,t),c=!0))}return c&&o[r(376)](e),c})}[ft(371)](){const t=ft,{editor:e}=this;e[t(365)][t(354)](d)[t(348)](e=>this[t(328)](e))}[ft(355)](){const t=ft;return this[t(340)][t(315)][t(354)](t(336))}[ft(313)](){const t=ft;return this[t(340)][t(315)][t(354)](t(279))}[ft(328)]({container:t,value:e,digits:n}){const o=ft,i=t[o(278)](o(292)),s=t[o(278)](o(306)),r=Math[o(326)](e)+(s-1);switch(i){case o(282):default:return String(r);case o(333):return function(t,e){const n=o;return String(t)[n(350)](e,"0")}(r,Math[o(337)](2,n));case o(289):case o(331):return ht(r,!1);case o(342):case o(314):return ht(r,!0);case o(318):return wt(r,!1);case o(368):return wt(r,!0)}}}function pt(t,e){const n=ft,o=e[n(378)](t);return Array[n(325)](o[n(288)]())[n(361)](t=>t.is(n(322),"ol"))}function ht(t,e){const n=ft;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(360)](97+t)+o,i=Math[n(326)]((i-1)/26)}return e?o[n(311)]():o}const mt=[{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 gt(t,e){const n=ut();return(gt=function(t,e){return n[t-=277]})(t,e)}function wt(t,e){const n=ft;let o="",i=t;for(const{value:t,numeral:e}of mt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(335)]()}class yt extends L.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new L.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:n}){super(t),this.focusCycler=new L.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,L.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 L.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 L.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 L.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 L.LabeledFieldView(this.locale,L.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,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("Footnotes start index must be greater than 0.")}),e}}var bt=n(945),vt={attributes:{"data-cke":!0}};vt.setAttributes=B(),vt.insert=M().bind(null,"head"),vt.domAPI=R(),vt.insertStyleElement=U();N()(bt.A,vt);bt.A&&bt.A.locals&&bt.A.locals;class It extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[L.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,L.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:T.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:T.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:T.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:T.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:T.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:T.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:T.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 L.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 yt(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}=L.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 kt(t,e){var n=Ct();return(kt=function(t,e){return n[t-=173]})(t,e)}function Ct(){var t=["403251xryoUk","10877657hBJATP","isPremiumPlugin","20chXESF","isOfficialPlugin","28036107iDyifQ","890oddnZc","requires","388692ufWaNg","pluginName","6012foJZtg","11344kLxivr","FootnotesProperties","685nYzcOk","44MfwwOb","2185670kpFrfS"];return(Ct=function(){return t})()}var Ft=kt;!function(t){for(var e=kt,n=t();;)try{if(894357===-parseInt(e(180))/1*(parseInt(e(173))/2)+-parseInt(e(183))/3*(parseInt(e(181))/4)+parseInt(e(186))/5*(-parseInt(e(175))/6)+parseInt(e(184))/7+parseInt(e(178))/8*(-parseInt(e(177))/9)+-parseInt(e(182))/10+parseInt(e(188))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ct);class St extends t.Plugin{static get[Ft(176)](){return Ft(179)}static get[Ft(174)](){return[dt,It]}static get[Ft(187)](){return!0}static get[Ft(185)](){return!0}}function Et(){var t=["24912ECsOCS","868310edOazP","440SwlkUR","981756pUnYkf","10505929qjGfIK","6AtvRxw","2KayYnH","4035990YmCMaz","4213296bcZQZL","6529240Nqsygr","708ZOykDT"];return(Et=function(){return t})()}function xt(t,e){var n=Et();return(xt=function(t,e){return n[t-=199]})(t,e)}!function(t){for(var e=xt,n=t();;)try{if(956272===parseInt(e(205))/1*(parseInt(e(208))/2)+-parseInt(e(202))/3*(-parseInt(e(201))/4)+-parseInt(e(209))/5+parseInt(e(207))/6*(parseInt(e(206))/7)+parseInt(e(200))/8+parseInt(e(199))/9+parseInt(e(203))/10*(-parseInt(e(204))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Et)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x381f4b,Command as _0x180100}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x27240f,isWidget as _0x1862ca,toWidgetEditable as _0x147785,WidgetToolbarRepository as _0x289e52}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x204d37,logWarning as _0x204d57,FocusTracker as it,KeystrokeHandler as et,global as ot}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0xfde7da,ClickObserver as _0x46b2f1}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x1b023c}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x528eb8,ButtonView as _0x37c695,View as _0xf9108b,ViewCollection as _0x44558e,FocusCycler as _0x1e2e91,addKeyboardHandlingForGrid as _0x34cdf8,CollapsibleView as _0x4a1638,LabeledFieldView as tt,createLabeledInputNumber as st,ContextualBalloon as _0x45a7bd,BalloonPanelView as _0x33377f,createDropdown as _0x4519ce}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x5eae8f,IconListStyleDecimal as _0x437365,IconListStyleDecimalLeadingZero as _0x4025d5,IconListStyleLowerRoman as _0x50417e,IconListStyleUpperRoman as _0x18d6e3,IconListStyleLowerLatin as _0x2868d1,IconListStyleUpperLatin as _0x317054}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x273550,_0x299146){this['_model']=_0x273550,this['_elementName']=_0x299146['elementName'],this['_getElementKey']=_0x299146['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x3476ac){const _0x16a989=new Set(),_0x431d27=new Map();for(const _0x305f64 of _0x3476ac){if('insert'===_0x305f64['type']&&'$text'!==_0x305f64['name']&&_0x305f64['position']['nodeAfter']){const _0x572a05=this['_model']['createRangeOn'](_0x305f64['position']['nodeAfter']);for(const _0x839f8 of _0x572a05['getItems']()){if(!_0x839f8['is']('element',this['_elementName']))continue;const _0x32b38c=this['_getElementKey'](_0x839f8);_0x431d27['has'](_0x32b38c)||_0x431d27['set'](_0x32b38c,[]),_0x431d27['get'](_0x32b38c)['push'](_0x839f8);}}if('remove'===_0x305f64['type']&&_0x305f64['name']===this['_elementName']){const _0x2ad0da=this['_getElementKey']({'getAttribute':_0x180417=>_0x305f64['attributes']['get'](_0x180417)});_0x16a989['add'](_0x2ad0da);}}for(const [_0x1eb524,_0x2fd420]of this['_trackedElements'])'$graveyard'===_0x2fd420['root']['rootName']&&_0x16a989['add'](_0x1eb524);for(const _0x30ff8a of _0x16a989)this['_trackedElements']['delete'](_0x30ff8a);for(const [_0x63c77d,_0xd01e6e]of _0x431d27)this['_trackedElements']['set'](_0x63c77d,_0xd01e6e[_0xd01e6e['length']-0x1]);const _0x29167d=new Set();for(const [_0xf44454,_0x5c1d63]of _0x431d27)_0x16a989['has'](_0xf44454)&&(_0x29167d['add'](_0x5c1d63[0x0]),_0x5c1d63['length']>0x1?_0x431d27['set'](_0xf44454,_0x5c1d63['slice'](0x1)):_0x431d27['delete'](_0xf44454),_0x16a989['delete'](_0xf44454));return{'removed':Array['from'](_0x16a989),'inserted':Array['from'](_0x431d27['values']())['flat'](),'moved':Array['from'](_0x29167d)};}}class c extends _0x381f4b{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24b10b){super(_0x24b10b),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x8ae00d=>_0x8ae00d['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x3cd929=>_0x3cd929['getAttribute']('footnoteId')});}['init'](){const {editor:_0x30af4e}=this,{model:_0x3e3bb5,data:_0x4d2f27}=_0x30af4e;_0x3e3bb5['document']['registerPostFixer'](_0x5d50b3=>{const _0x46f2a6=_0x3e3bb5['document']['differ']['getChanges']();let _0x430ae2=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x5d50b3,_0x46f2a6)&&(_0x430ae2=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x5d50b3,_0x46f2a6)&&(_0x430ae2=!0x0),this['_handleFootnoteReferencesChanges'](_0x5d50b3,_0x46f2a6)&&(_0x430ae2=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x5d50b3)&&(_0x430ae2=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x5d50b3)&&(_0x430ae2=!0x0),this['_sortFootnoteDefinitions'](_0x5d50b3)&&(_0x430ae2=!0x0),_0x430ae2;}),this['listenTo'](_0x3e3bb5['document'],'change:data',()=>{_0x3e3bb5['enqueueChange']({'isUndoable':!0x1},_0x347295=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x347295);});},{'priority':'low'}),this['listenTo'](_0x4d2f27,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x3d76cd){return this['_footnotes']['find'](_0x133353=>_0x133353['id']===_0x3d76cd)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x33b4fd){this['_footnoteFormatter']=_0x33b4fd;}['_updateFootnotesCounters'](_0x2931f9,_0x1cd4da=0x0){let _0x4ca9a4=!0x1;for(let _0x4ad934=_0x1cd4da;_0x4ad934<this['_footnotes']['length'];_0x4ad934++)this['_updateFootnoteRefCounter'](_0x2931f9,_0x4ad934)&&(_0x4ca9a4=!0x0);return _0x4ca9a4;}['_insertEmptyFootnotesDefinitionsContainer'](_0x45ad99,_0x2f04c6){const _0x49ebe6=_0x45ad99['createElement']('footnotesDefinitions',{});return _0x45ad99['append'](_0x49ebe6,_0x2f04c6),this['_footnotesDefinitions']=_0x49ebe6,_0x49ebe6;}['_ensureFootnotesDefinitionsContainerExists'](_0xbcb258){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x254fbe=this['_footnotes'][0x0]['reference']['root'],_0x51d4cf=this['_insertEmptyFootnotesDefinitionsContainer'](_0xbcb258,_0x254fbe);for(const _0x1b7530 of this['_footnotes'])_0x1b7530['definition']['parent']||_0xbcb258['insert'](_0x1b7530['definition'],_0x51d4cf,'end');this['_updateFootnotesCounters'](_0xbcb258);}['_handleFootnotesDefinitionsObjectChanges'](_0x5ec8ce,_0x5ee677){let _0x5d439a=!0x1;const {inserted:_0x357ae1,removed:_0x3a1fec,moved:_0x261565}=this['_footnoteDefsContainerTracker']['getChanges'](_0x5ee677);if(_0x261565['length']&&(this['_footnotesDefinitions']=_0x261565[0x0]),_0x357ae1['length']){if(_0x357ae1['length']>0x1||this['_footnotesDefinitions']&&_0x357ae1['some'](_0x403b90=>_0x403b90!==this['_footnotesDefinitions'])){const _0x35f044=_0x5ec8ce['createElement']('footnotesDefinitions',{}),_0x1944d0=[];this['_footnotesDefinitions']&&_0x1944d0['push'](this['_footnotesDefinitions']),_0x1944d0['push'](..._0x357ae1),_0x5ec8ce['insert'](_0x35f044,_0x1944d0[0x0],'before');for(const _0x3156de of _0x1944d0)_0x5ec8ce['move'](_0x5ec8ce['createRangeIn'](_0x3156de),_0x5ec8ce['createPositionAt'](_0x35f044,'end')),_0x5ec8ce['remove'](_0x3156de);this['_footnotesDefinitions']=_0x35f044,this['_updateFootnotesCounters'](_0x5ec8ce),_0x5d439a=!0x0;}else this['_footnotesDefinitions']=_0x357ae1[0x0];}if(_0x3a1fec['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x2e6678 of this['_footnotes'])_0x5ec8ce['remove'](_0x2e6678['reference']),_0x5d439a=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x5d439a;}['_handleFootnoteDefinitionsChanges'](_0x2933c7,_0x2530f7){let _0x14d73b=!0x1;const _0x3db977=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x131b23,moved:_0x2068f1}=this['_footnoteDefsTracker']['getChanges'](_0x2530f7);for(const _0x4f0fa5 of[..._0x2068f1,..._0x131b23]){const _0x4cfe9c=_0x4f0fa5['getAttribute']('footnoteId'),_0x2a2359=this['getFootnote'](_0x4cfe9c);_0x2a2359&&(_0x2a2359['definition']=_0x4f0fa5),_(_0x2933c7,_0x3db977,_0x4f0fa5)&&(_0x14d73b=!0x0);}return _0x14d73b;}['_handleFootnoteReferencesChanges'](_0x3dbcb6,_0x48306f){let _0x3598d1=!0x1;const {removed:_0x596f91,inserted:_0x275423,moved:_0xf8a934}=this['_footnoteRefsTracker']['getChanges'](_0x48306f);for(const _0x273cc9 of _0x596f91)this['_handleRemoveFootnoteReferenceById'](_0x3dbcb6,_0x273cc9)&&(_0x3598d1=!0x0);for(const _0x14322f of _0x275423)this['_handleInsertedFootnoteReference'](_0x3dbcb6,_0x14322f)&&(_0x3598d1=!0x0);for(const _0x293ca9 of _0xf8a934)this['_handleMovedFootnoteReference'](_0x3dbcb6,_0x293ca9)&&(_0x3598d1=!0x0);return _0x3598d1;}['_handleFootnotesDefinitionsObjectSync'](_0x34ce57){if(!this['_footnotesDefinitions'])return!0x1;let _0xd1f0bb=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x5c3a05=[];for(const _0x352516 of this['_footnotesDefinitions']['getChildren']()){const _0x5656e1=_0x352516['getAttribute']('footnoteId');this['getFootnote'](_0x5656e1)||(_0x5c3a05['unshift'](_0x352516),_0xd1f0bb=!0x0);}for(const _0x35853 of _0x5c3a05)_0x34ce57['remove'](_0x35853);}const _0x4136f2=new Set(),_0x5b36db=[];for(const _0x476fe4 of this['_footnotesDefinitions']['getChildren']()){const _0x22719f=_0x476fe4['getAttribute']('footnoteId');_0x4136f2['has'](_0x22719f)?(_0x5b36db['unshift'](_0x476fe4),_0xd1f0bb=!0x0):_0x4136f2['add'](_0x22719f);}for(const _0x2c4074 of _0x5b36db)_0x34ce57['remove'](_0x2c4074);return this['_footnotesDefinitions']['childCount']||(_0x34ce57['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0xd1f0bb=!0x0),_0xd1f0bb;}['_handleInsertedFootnoteReference'](_0x5adb15,_0x2a3461){if(this['_footnotes']['find'](_0x31a338=>_0x31a338['reference']===_0x2a3461))return!0x1;let _0x805f35=!0x1;const _0x3f065d=_0x2a3461['getAttribute']('footnoteId'),_0x26231a=this['getFootnote'](_0x3f065d);_0x26231a&&(_0x5adb15['remove'](_0x26231a['reference']),this['_footnotes']=this['_footnotes']['filter'](_0x1e3911=>_0x1e3911['id']!==_0x3f065d),_0x805f35=!0x0);let _0x4524d6=this['_footnotesDefinitions']?function(_0x5dffdc,_0x4013ca){for(const _0x536319 of _0x5dffdc['getChildren']())if(_0x536319['getAttribute']('footnoteId')===_0x4013ca)return _0x536319;return null;}(this['_footnotesDefinitions'],_0x3f065d):null;_0x4524d6||(_0x4524d6=_0x5adb15['createElement']('footnoteDefinition',{'footnoteId':_0x3f065d}),this['_footnotesDefinitions']&&(_0x5adb15['insert'](_0x4524d6,this['_footnotesDefinitions'],'end'),_0x805f35=!0x0));const _0xeb5adc={'id':_0x3f065d,'reference':_0x2a3461,'definition':_0x4524d6},_0x34b50a=I(this['editor']['model'],this['_footnotes'],_0x2a3461);return this['_footnotes']['splice'](_0x34b50a,0x0,_0xeb5adc),this['_updateFootnotesCounters'](_0x5adb15,_0x34b50a)&&(_0x805f35=!0x0),_0x805f35;}['_handleRemoveFootnoteReferenceById'](_0x214935,_0x82a8bd){const _0x1758da=this['_footnotes']['findIndex'](_0x5696ef=>_0x5696ef['id']===_0x82a8bd);if(-0x1===_0x1758da)return!0x1;let _0x5b7dd2=!0x1;const _0x2f2a37=this['_footnotes'][_0x1758da];return'$graveyard'!==_0x2f2a37['definition']['root']['rootName']&&(_0x214935['remove'](_0x2f2a37['definition']),_0x5b7dd2=!0x0),this['_footnotes']['splice'](_0x1758da,0x1),this['_updateFootnotesCounters'](_0x214935,_0x1758da)&&(_0x5b7dd2=!0x0),_0x5b7dd2;}['_handleMovedFootnoteReference'](_0x1d0e71,_0x3dd93){const _0x2a74bc=_0x3dd93['getAttribute']('footnoteId'),_0x322501=this['_footnotes']['findIndex'](_0x1d55cb=>_0x1d55cb['id']===_0x2a74bc),_0x2ad0cd=this['_footnotes'][_0x322501];let _0x3a8a47=!0x1;_0x2ad0cd['reference']=_0x3dd93,this['_footnotes']['splice'](_0x322501,0x1);const _0x3bf2f5=I(this['editor']['model'],this['_footnotes'],_0x3dd93);return this['_footnotes']['splice'](_0x3bf2f5,0x0,_0x2ad0cd),this['_updateFootnotesCounters'](_0x1d0e71,Math['min'](_0x322501,_0x3bf2f5))&&(_0x3a8a47=!0x0),_0x3a8a47;}['_updateFootnoteRefCounter'](_0x2e4e66,_0x1c1783){if(!this['_footnotesDefinitions'])return!0x1;const _0x40c2f5=this['_footnotes'][_0x1c1783];let _0x191326;return _0x191326=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x40c2f5,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x1c1783+0x1}):String(_0x1c1783+0x1),_0x40c2f5['reference']['getAttribute']('footnoteCounter')!=_0x191326&&(_0x2e4e66['setAttribute']('footnoteCounter',_0x191326,_0x40c2f5['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x4c7028){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x5925d1,_0x969c2e){if(_0x5925d1['length']!==_0x969c2e['length'])return!0x1;for(let _0x2e930c=0x0;_0x2e930c<_0x5925d1['length'];_0x2e930c++)if(_0x5925d1[_0x2e930c]!==_0x969c2e[_0x2e930c])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x12ead1=>_0x12ead1['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x5058c1=>_0x5058c1['getAttribute']('footnoteId'))))return!0x1;let _0x1f465d=!0x1;for(let _0x3b2302=0x0;_0x3b2302<this['_footnotes']['length'];_0x3b2302++){const _0xd2eac3=this['_footnotes'][_0x3b2302],_0xa3aa2a=_0x4c7028['createPositionBefore'](_0xd2eac3['definition']),_0xbe9c6b=_0x4c7028['createPositionAt'](this['_footnotesDefinitions'],_0x3b2302);_0xa3aa2a['isEqual'](_0xbe9c6b)||(_0x4c7028['move'](_0x4c7028['createRangeOn'](_0xd2eac3['definition']),_0xbe9c6b),_0x1f465d=!0x0);}return _0x1f465d;}['_ensureFootnotesReferencesHaveProperOrder'](_0x1b4685){if(!this['_footnotes']['length'])return!0x1;const {model:_0x1fe1ef}=this['editor'];let _0x2ce830=!0x1;for(let _0x1ca628=0x0;_0x1ca628<this['_footnotes']['length']-0x1;_0x1ca628++){const _0x9bc768=this['_footnotes'][_0x1ca628],_0x500a11=this['_footnotes'][_0x1ca628+0x1],_0x3a0432=_0x1fe1ef['createPositionBefore'](_0x9bc768['reference']),_0x3228d9=_0x1fe1ef['createPositionBefore'](_0x500a11['reference']);'after'===_0x3a0432['compareWith'](_0x3228d9)&&(this['_handleMovedFootnoteReference'](_0x1b4685,_0x9bc768['reference']),_0x1ca628=-0x1,_0x2ce830=!0x0);}return _0x2ce830;}}function _(_0x53cde2,_0x19f3c4,_0x3ed0ea){if(_0x3ed0ea['childCount'])return!0x1;const _0x45b5bb=_0x19f3c4?'paragraph':'footnoteInlineContent';return _0x53cde2['insert'](_0x53cde2['createElement'](_0x45b5bb),_0x3ed0ea),!0x0;}function I(_0x23094f,_0x302c5f,_0x2f7d03){if(0x0===_0x302c5f['length'])return 0x0;const _0x1462e3=_0x23094f['createPositionBefore'](_0x2f7d03);for(let _0x4791b0=0x0;_0x4791b0<_0x302c5f['length'];_0x4791b0++){const _0x42449c=_0x302c5f[_0x4791b0],_0x343d12=_0x23094f['createPositionBefore'](_0x42449c['reference']);if('before'===_0x1462e3['compareWith'](_0x343d12))return _0x4791b0;}const _0x28ea0f=_0x2f7d03['root'];let _0x5ddd22=-0x1;for(let _0x85d504=_0x302c5f['length']-0x1;_0x85d504>=0x0;_0x85d504--)if(_0x302c5f[_0x85d504]['reference']['root']===_0x28ea0f){_0x5ddd22=_0x85d504;break;}if(-0x1!==_0x5ddd22)return _0x5ddd22+0x1;const _0x2515f0=_0x23094f['document']['getRootNames'](),_0x4dd0fe=_0x2515f0['indexOf'](_0x28ea0f['rootName']),_0x2ad486=_0x2515f0[_0x4dd0fe+0x1];if(_0x2ad486){for(let _0x1625ab=0x0;_0x1625ab<_0x302c5f['length'];_0x1625ab++)if(_0x302c5f[_0x1625ab]['reference']['root']['rootName']===_0x2ad486)return _0x1625ab;}return _0x302c5f['length'];}class w extends _0x180100{['refresh'](){const _0x57e23c=this['editor']['model']['document']['selection'],_0x20e1b7=this['_getPositionToInsertFootnote'](_0x57e23c);this['isEnabled']=!!_0x20e1b7;}['execute'](_0x585b41){const {editor:_0x357515}=this,{model:_0xa7f8d1}=_0x357515,{selection:_0x5f4c8f}=_0xa7f8d1['document'],_0x4c51b8=this['_getPositionToInsertFootnote'](_0x5f4c8f);if(!_0x4c51b8)return;const _0x540bc3=_0x357515['plugins']['get']('FootnotesEditing'),_0x5317de=_0x585b41?.['footnoteId']??_0x204d37();!function(_0x8c3fda){return'string'==typeof _0x8c3fda&&_0x8c3fda['length']>0x0&&!/\s/['test'](_0x8c3fda)&&!/^\d/['test'](_0x8c3fda);}(_0x5317de)?_0x204d57('insert-footnote-command-executed-with-invalid-id'):(_0xa7f8d1['change'](_0x4e027c=>{const _0x38655d=_0x4e027c['createElement']('footnoteRef',{'footnoteId':_0x5317de});_0xa7f8d1['insertObject'](_0x38655d,_0x4c51b8,null);}),_0x540bc3['_moveSelectionToFootnoteDefinition'](_0x5317de));}['_getPositionToInsertFootnote'](_0x1f5287){const {model:_0x1b4bcf}=this['editor'],{schema:_0x47eb01}=_0x1b4bcf,_0x3fb384=_0x1f5287['getFirstRange']();for(const _0xedf323 of _0x3fb384['getItems']())if(_0x47eb01['isBlock'](_0xedf323)||_0x47eb01['isObject'](_0xedf323))return null;const _0x31e5e0=_0x3fb384['end'];return _0x47eb01['checkChild'](_0x31e5e0,'footnoteRef')?_0x31e5e0:null;}}class r extends _0x381f4b{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5e0871}=this;_0x5e0871['config']['define']('footnotes.multiBlock',!0x0),_0x5e0871['commands']['add']('insertFootnote',new w(_0x5e0871)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x26852b){const _0x4e49f=_0x140651([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x32c943=0x47a28506,_0x3d4c15=0x47a5f3a6^_0x32c943,_0x5afed0=window[_0x140651([0x44,0x61,0x74,0x65])][_0x140651([0x6e,0x6f,0x77])](),_0x17d5fe=_0x26852b[_0x140651([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x11bb98=new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a509f=>{_0x17d5fe[_0x140651([0x6f,0x6e,0x63,0x65])](_0x140651([0x72,0x65,0x61,0x64,0x79]),_0x2a509f);}),_0x442dea={[_0x140651([0x6b,0x74,0x79])]:_0x140651([0x45,0x43]),[_0x140651([0x75,0x73,0x65])]:_0x140651([0x73,0x69,0x67]),[_0x140651([0x63,0x72,0x76])]:_0x140651([0x50,0x2d,0x32,0x35,0x36]),[_0x140651([0x78])]:_0x140651([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x140651([0x79])]:_0x140651([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x140651([0x61,0x6c,0x67])]:_0x140651([0x45,0x53,0x32,0x35,0x36])},_0x45b716=_0x17d5fe[_0x140651([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x140651([0x67,0x65,0x74])](_0x140651([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x526d60(){let _0x114924,_0x3433c9=null,_0x4f1b87=null;try{if(_0x45b716==_0x140651([0x47,0x50,0x4c]))return _0x140651([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x114924=_0x2f0106(),!_0x114924)return _0x140651([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x114924[_0x140651([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4f1b87=_0x13594c(_0x114924[_0x140651([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x114924[_0x140651([0x6a,0x74,0x69])])),await _0x234449()?_0x49af2f()?_0x26e1f1()?_0x140651([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1709cb()?(_0x114924[_0x140651([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x140651([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3433c9=_0x18110d(_0x140651([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x114924[_0x140651([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x140651([0x74,0x72,0x69,0x61,0x6c])&&(_0x3433c9=_0x18110d(_0x140651([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x281e0f()):_0x140651([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x140651([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x140651([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x140651([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x26e1f1(){const _0x9f5b49=[_0x140651([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x140651([0x74,0x72,0x69,0x61,0x6c])][_0x140651([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x114924[_0x140651([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5afed0/0x3e8:0xe10*_0x3d4c15;return _0x114924[_0x140651([0x65,0x78,0x70])]<_0x9f5b49;}function _0x49af2f(){const _0x167ade=_0x114924[_0x140651([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x167ade&&(!!_0x167ade[_0x140651([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x140651([0x2a]))||!!_0x167ade[_0x140651([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x140651([0x46,0x4f,0x4f])));}function _0x1709cb(){const _0x29fcef=_0x114924[_0x140651([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x29fcef||0x0==_0x29fcef[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xfe6bb}=new URL(window[_0x140651([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x29fcef[_0x140651([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xfe6bb))return!0x0;const _0xe32e5=_0xfe6bb[_0x140651([0x73,0x70,0x6c,0x69,0x74])](_0x140651([0x2e]));return _0x29fcef[_0x140651([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x23c0e9=>_0x23c0e9[_0x140651([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x140651([0x2a])))[_0x140651([0x6d,0x61,0x70])](_0x4bca3f=>_0x4bca3f[_0x140651([0x73,0x70,0x6c,0x69,0x74])](_0x140651([0x2e])))[_0x140651([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1d8e21=>_0x1d8e21[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xe32e5[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x140651([0x6d,0x61,0x70])](_0x36347c=>Array(_0xe32e5[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x36347c[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x140651([0x66,0x69,0x6c,0x6c])](_0x36347c[0x0]===_0x140651([0x2a])?_0x140651([0x2a]):'')[_0x140651([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x36347c))[_0x140651([0x73,0x6f,0x6d,0x65])](_0x6b1410=>_0xe32e5[_0x140651([0x65,0x76,0x65,0x72,0x79])]((_0x133180,_0x5cb714)=>_0x6b1410[_0x5cb714]===_0x133180||_0x6b1410[_0x5cb714]===_0x140651([0x2a])));}function _0x281e0f(){return _0x3433c9&&_0x4f1b87?new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x29d8aa,_0x1ddcf8)=>{_0x3433c9[_0x140651([0x74,0x68,0x65,0x6e])](_0x29d8aa,_0x1ddcf8),_0x4f1b87[_0x140651([0x74,0x68,0x65,0x6e])](_0x1d4eed=>{_0x1d4eed!=_0x140651([0x56,0x61,0x6c,0x69,0x64])&&_0x29d8aa(_0x1d4eed);},_0x1ddcf8);}):_0x3433c9||_0x4f1b87||_0x140651([0x56,0x61,0x6c,0x69,0x64]);}}function _0x13594c(_0x1e10b6,_0x670c1f){return new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x841ff7=>{if(_0xc1ac87())return _0x841ff7(_0x140651([0x56,0x61,0x6c,0x69,0x64]));_0x3afb51(),_0x17d5fe[_0x140651([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x140651([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5de218=!0x1;const _0x48ae32=_0x204d37();function _0x117769(_0x348991){return!!_0x348991&&(typeof _0x348991===_0x140651([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x348991===_0x140651([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x348991[_0x140651([0x74,0x68,0x65,0x6e])]===_0x140651([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x348991[_0x140651([0x63,0x61,0x74,0x63,0x68])]===_0x140651([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xbda430(_0x2e197e){_0x3c0903(_0x2e197e)[_0x140651([0x74,0x68,0x65,0x6e])](_0x2570cc=>{if(!_0x2570cc||_0x2570cc[_0x140651([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x140651([0x6f,0x6b]))return _0x140651([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5b236b(_0x5564d8(_0x48ae32+_0x670c1f))!=_0x2570cc[_0x140651([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x140651([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x140651([0x56,0x61,0x6c,0x69,0x64]);})[_0x140651([0x74,0x68,0x65,0x6e])](_0xbc2799=>(_0x6a652b(),_0xbc2799),()=>{const _0x74ea0f=_0x22bd44();return null==_0x74ea0f?(_0x6a652b(),_0x140651([0x56,0x61,0x6c,0x69,0x64])):_0x140651(_0x5afed0-_0x74ea0f>(0x63ae0106^_0x32c943)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x140651([0x74,0x68,0x65,0x6e])](_0x841ff7)[_0x140651([0x63,0x61,0x74,0x63,0x68])](()=>{_0x841ff7(_0x140651([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xef4b33=0x47946b86^_0x32c943;function _0x6a652b(){const _0x1e3ed7=_0x140651([0x6c,0x6c,0x63,0x74,0x2d])+_0x5b236b(_0x5564d8(_0x1e10b6)),_0x3c98c2=_0x1216a8(_0x5b236b(window[_0x140651([0x4d,0x61,0x74,0x68])][_0x140651([0x63,0x65,0x69,0x6c])](_0x5afed0/_0xef4b33)));window[_0x140651([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x140651([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1e3ed7,_0x3c98c2);}function _0x22bd44(){const _0x465ede=_0x140651([0x6c,0x6c,0x63,0x74,0x2d])+_0x5b236b(_0x5564d8(_0x1e10b6)),_0x4152d5=window[_0x140651([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x140651([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x465ede);return _0x4152d5?window[_0x140651([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1216a8(_0x4152d5),0x10)*_0xef4b33:null;}function _0x3c0903(_0x1e58fd){return new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x329a12,_0x5257e2)=>{_0x1e58fd[_0x140651([0x74,0x68,0x65,0x6e])](_0x329a12,_0x5257e2),window[_0x140651([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5257e2,0x47a351c6^_0x32c943);});}}_0x17d5fe[_0x140651([0x6f,0x6e])](_0x140651([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x500086,_0x3b0a33)=>{if(_0x3b0a33[0x0]!=_0x1e10b6)return _0x841ff7(_0x140651([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3b0a33[0x1]={..._0x3b0a33[0x1],[_0x140651([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x48ae32};},{[_0x140651([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x140651([0x68,0x69,0x67,0x68])}),_0x17d5fe[_0x140651([0x6f,0x6e])](_0x140651([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x342cfa=>{_0x117769(_0x342cfa[_0x140651([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5de218=!0x0,_0xbda430(_0x342cfa[_0x140651([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x140651([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x140651([0x6c,0x6f,0x77])}),_0x11bb98[_0x140651([0x74,0x68,0x65,0x6e])](()=>{_0x5de218||_0x841ff7(_0x140651([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xc1ac87(){return _0x17d5fe[_0x140651([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x140651([0x76,0x69,0x65,0x77])][_0x140651([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x140651([0x61,0x75,0x74,0x6f]);}function _0x3afb51(){_0x17d5fe[_0x140651([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x140651([0x76,0x69,0x65,0x77])][_0x140651([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x140651([0x61,0x75,0x74,0x6f]);}}function _0x18110d(_0x1a638d){const _0x12dac5=[new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b36e9=>setTimeout(_0x4b36e9,0x47abbbca^_0x32c943)),_0x11bb98[_0x140651([0x74,0x68,0x65,0x6e])](()=>new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54d85f=>{let _0x8c1b2e=0x0;_0x17d5fe[_0x140651([0x6d,0x6f,0x64,0x65,0x6c])][_0x140651([0x6f,0x6e])](_0x140651([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4a9122,_0x244fe3)=>{_0x244fe3[0x0][_0x140651([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x8c1b2e++,_0x8c1b2e==(0x47a284fe^_0x32c943)&&(_0x54d85f(),_0x4a9122[_0x140651([0x6f,0x66,0x66])]());});}))];return window[_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x140651([0x72,0x61,0x63,0x65])](_0x12dac5)[_0x140651([0x74,0x68,0x65,0x6e])](()=>_0x1a638d);}async function _0x3cc0a0(){await _0x11bb98,_0x17d5fe[_0x140651([0x6d,0x6f,0x64,0x65,0x6c])][_0x140651([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xf5988b,_0x17d5fe[_0x140651([0x6d,0x6f,0x64,0x65,0x6c])][_0x140651([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xf5988b,_0x17d5fe[_0x140651([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x140651([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xa51ae3(_0x4c1e59){const _0x44a148=_0x3bac5f();_0x17d5fe[_0x44a148]=_0x140651([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4c1e59,_0x4c1e59!=_0x140651([0x56,0x61,0x6c,0x69,0x64])&&_0x3cc0a0();}function _0x3bac5f(){const _0xb9bc74=window[_0x140651([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x140651([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x140651([0x6e,0x6f,0x77])]())[_0x140651([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x140651([0x2e]),'');let _0x4dd3b7=_0x140651([0x75]);for(let _0x364ade=0x0;_0x364ade<_0xb9bc74[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x364ade+=0x2){let _0x37ce20=window[_0x140651([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb9bc74[_0x140651([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x364ade,_0x364ade+0x2));_0x37ce20>=_0x4e49f[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x37ce20-=_0x4e49f[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4dd3b7+=_0x4e49f[_0x37ce20];}return _0x4dd3b7;}function _0x2f0106(){const _0x3548d2=_0x45b716[_0x140651([0x73,0x70,0x6c,0x69,0x74])](_0x140651([0x2e]));if(0x3!=_0x3548d2[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x427b7b(_0x3548d2[0x1]);function _0x427b7b(_0x24935f){const _0x1cfb76=_0x55c5df(_0x24935f);return _0x1cfb76&&_0x4cbfbb()?_0x1cfb76:null;function _0x4cbfbb(){const _0x3b049b=_0x1cfb76[_0x140651([0x6a,0x74,0x69])],_0x460026=window[_0x140651([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b049b[_0x140651([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b049b[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x543261={..._0x1cfb76,[_0x140651([0x6a,0x74,0x69])]:_0x3b049b[_0x140651([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3b049b[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x543261[_0x140651([0x76,0x63])],_0x5564d8(_0x543261)==_0x460026;}}}async function _0x234449(){let _0x1e9c99=!0x0;try{const _0x40db4b=_0x45b716[_0x140651([0x73,0x70,0x6c,0x69,0x74])](_0x140651([0x2e])),[_0x1454aa,_0xdea782,_0x1f886d]=_0x40db4b;return _0x4e5cb3(_0x1454aa),await _0x3d3993(_0x1454aa,_0xdea782,_0x1f886d),_0x1e9c99;}catch{return!0x1;}function _0x4e5cb3(_0x5de5bc){const _0x31d953=_0x55c5df(_0x5de5bc);_0x31d953&&_0x31d953[_0x140651([0x61,0x6c,0x67])]==_0x140651([0x45,0x53,0x32,0x35,0x36])||(_0x1e9c99=!0x1);}async function _0x3d3993(_0x4bf868,_0x219a39,_0x564ab5){const _0x17edc6=window[_0x140651([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x140651([0x66,0x72,0x6f,0x6d])](_0x27dff3(_0x564ab5),_0x1d7ec3=>_0x1d7ec3[_0x140651([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3d26fe=new window[(_0x140651([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x140651([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4bf868+_0x140651([0x2e])+_0x219a39),_0x5162d1=window[_0x140651([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x140651([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5162d1)return;const _0x110baf=await _0x5162d1[_0x140651([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x140651([0x6a,0x77,0x6b]),_0x442dea,{[_0x140651([0x6e,0x61,0x6d,0x65])]:_0x140651([0x45,0x43,0x44,0x53,0x41]),[_0x140651([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x140651([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x140651([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5162d1[_0x140651([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x140651([0x6e,0x61,0x6d,0x65])]:_0x140651([0x45,0x43,0x44,0x53,0x41]),[_0x140651([0x68,0x61,0x73,0x68])]:{[_0x140651([0x6e,0x61,0x6d,0x65])]:_0x140651([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x110baf,_0x17edc6,_0x3d26fe)||(_0x1e9c99=!0x1);}}function _0x55c5df(_0x585a42){return _0x585a42[_0x140651([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x140651([0x65,0x79]))?JSON[_0x140651([0x70,0x61,0x72,0x73,0x65])](_0x27dff3(_0x585a42)):null;}function _0x27dff3(_0x27b6bf){return window[_0x140651([0x61,0x74,0x6f,0x62])](_0x27b6bf[_0x140651([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x140651([0x2b]))[_0x140651([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x140651([0x2f])));}function _0x5564d8(_0x31d41d){let _0x517218=0x1505;function _0x29a876(_0x46d70f){for(let _0x2be509=0x0;_0x2be509<_0x46d70f[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2be509++){const _0x4f2798=_0x46d70f[_0x140651([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2be509);_0x517218=(_0x517218<<0x5)+_0x517218+_0x4f2798,_0x517218&=_0x517218;}}function _0x30c197(_0x474b9a){Array[_0x140651([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x474b9a)?_0x474b9a[_0x140651([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x30c197):_0x474b9a&&typeof _0x474b9a==_0x140651([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x140651([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x474b9a)[_0x140651([0x73,0x6f,0x72,0x74])]()[_0x140651([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x12b1cd,_0x45416e])=>{_0x29a876(_0x12b1cd),_0x30c197(_0x45416e);}):_0x29a876(window[_0x140651([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x474b9a));}return _0x30c197(_0x31d41d),_0x517218>>>0x0;}function _0x5b236b(_0x4b460c){return _0x4b460c[_0x140651([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x140651([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x140651([0x30]));}function _0x1216a8(_0x506fee){return _0x506fee[_0x140651([0x73,0x70,0x6c,0x69,0x74])]('')[_0x140651([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x140651([0x6a,0x6f,0x69,0x6e])]('');}function _0xf5988b(){}function _0x140651(_0xbdbc4e){return _0xbdbc4e['map'](_0x41160f=>String['fromCharCode'](_0x41160f))['join']('');}_0xa51ae3(await _0x526d60());}(this);}['_moveSelectionToFootnoteDefinition'](_0x2c2af4){const {plugins:_0x53f59a,editing:_0x51278b,model:_0x4629f6}=this['editor'],_0x46425d=_0x53f59a['get'](c)['getFootnote'](_0x2c2af4);return!!_0x46425d&&(_0x4629f6['change'](_0x96d3a9=>{_0x96d3a9['setSelection'](_0x96d3a9['createPositionAt'](_0x46425d['definition'],'end'));}),_0x51278b['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x2e2731){const {plugins:_0x15442d,editing:_0x48991c,model:_0x37b381}=this['editor'],_0x4be2f3=_0x15442d['get'](c)['getFootnote'](_0x2e2731);return!!_0x4be2f3&&(_0x37b381['change'](_0x472718=>{_0x472718['setSelection'](_0x4be2f3['reference'],'on');}),_0x48991c['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x2cd47f}=this['editor']['model'],_0x3ee39f=this['editor']['config']['get']('footnotes.multiBlock');_0x2cd47f['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x2cd47f['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x2cd47f['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x3ee39f?_0x2cd47f['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x2cd47f['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x2cd47f['addChildCheck'](_0x49985a=>{for(const _0x5b429f of _0x49985a)if('footnoteDefinition'===_0x5b429f['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x218de3}=this,{conversion:_0x306c9d,editing:_0x4a4aa2}=_0x218de3,{t:t}=_0x218de3['locale'];_0x306c9d['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x5bb3f0,{writer:_0x44fd98,consumable:_0x2b894d})=>{const _0x33bbe2=_0x5bb3f0['getChild'](0x0);if(!_0x33bbe2||!_0x33bbe2['is']('element','a'))return null;const _0x3ecd38=_0x33bbe2['getAttribute']('href')||'';if(!_0x3ecd38['startsWith']('#'))return null;const _0x4fcd31=_0x3ecd38['replace'](/^#/,'');if(!_0x4fcd31)return null;_0x2b894d['consume'](_0x33bbe2,{'name':!0x0,'attributes':['href']});for(const {item:_0x236bc9}of _0x4a4aa2['view']['createRangeIn'](_0x33bbe2))_0x236bc9['is']('$textProxy')?_0x2b894d['consume'](_0x236bc9['textNode'],{'name':!0x0}):_0x236bc9['is']('element')&&_0x2b894d['consume'](_0x236bc9,{'name':!0x0});return _0x44fd98['createElement']('footnoteRef',{'footnoteId':_0x4fcd31});}}),_0x306c9d['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x22c175,{writer:_0x520ccb})=>g(_0x22c175,_0x520ccb)}),_0x306c9d['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x3540a9,{writer:_0x1ea946})=>{const _0x4bf39f=_0x3540a9['getAttribute']('footnoteCounter');return _0x27240f(g(_0x3540a9,_0x1ea946),_0x1ea946,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x4bf39f)});}});}['_defineDefinitionsConverters'](){const {editor:_0x131bee}=this,{t:t}=_0x131bee['locale'],{conversion:_0x101098}=_0x131bee;_0x101098['for']('upcast')['elementToElement']({'view':{'name':'ol','classes':['footnotes']},'model':'footnotesDefinitions','converterPriority':'high'}),_0x101098['for']('dataDowncast')['elementToElement']({'model':'footnotesDefinitions','view':{'name':'ol','classes':['footnotes']}}),_0x101098['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x212785,{writer:_0x4ec8c0})=>{const _0x41fa99=_0x4ec8c0['createContainerElement']('div',{'class':'footnotes-wrapper','data-footnotes-list-label':t('Footnotes')},_0x4ec8c0['createContainerElement']('ol',{'class':'footnotes'},_0x4ec8c0['createSlot']())),_0x13208f=_0x27240f(_0x41fa99,_0x4ec8c0,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x4ec8c0['setCustomProperty']('footnotesDefinitions',!0x0,_0x13208f),_0x13208f;}});}['_defineDefinitionConverters'](){const {editor:_0x341ef6}=this,{conversion:_0x4fbd8e,locale:_0x4579f0}=_0x341ef6,_0x487a62=_0x341ef6['config']['get']('footnotes.multiBlock');_0x4fbd8e['for']('upcast')['add'](_0x4ad634=>{_0x4ad634['on']('element:li',(_0x25e5a9,_0x4f991b,_0x43c047)=>{const _0x2fddec=_0x4f991b['viewItem'];if(!_0x2fddec['hasClass']('footnote-definition')||!_0x2fddec['getAttribute']('id'))return;const _0x46a427=_0x2fddec['parent'];if(!_0x46a427['is']('element','ol')||!_0x46a427['hasClass']('footnotes'))return;if(!_0x43c047['consumable']['test'](_0x2fddec,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0xa27550=_0x43c047['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x2fddec['getAttribute']('id')});if(!_0x43c047['safeInsert'](_0xa27550,_0x4f991b['modelCursor']))return;_0x43c047['consumable']['consume'](_0x2fddec,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x3c8ab7=Array['from'](_0x2fddec['getChildren']())['find'](_0x3ce77b=>_0x3ce77b['is']('element')&&_0x3ce77b['hasClass']('footnote-content'));for(const _0x18aab2 of _0x2fddec['getChildren']())_0x18aab2['is']('element')&&(_0x43c047['consumable']['consume'](_0x18aab2,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x43c047['consumable']['consume'](_0x18aab2,{'name':!0x0,'classes':'footnote-content'}));if(_0x3c8ab7){if(_0x487a62)_0x43c047['convertChildren'](_0x3c8ab7,_0xa27550);else{const _0x26da5c=_0x43c047['writer']['createElement']('footnoteInlineContent');_0x43c047['writer']['insert'](_0x26da5c,_0xa27550),_0x43c047['convertChildren'](_0x3c8ab7,_0x26da5c);}}_0x43c047['updateConversionResult'](_0xa27550,_0x4f991b);});}),_0x4fbd8e['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x4cc0ce,{writer:_0x44f9e9})=>D(_0x4cc0ce,_0x44f9e9,_0x4579f0,{'dataPipeline':!0x0})}),_0x4fbd8e['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x24bb85,{writer:_0x18a13f})=>D(_0x24bb85,_0x18a13f,_0x4579f0)});}['_defineBogusParagraphConverters'](){const {editor:_0x130499}=this,{conversion:_0x316ec1}=_0x130499;_0x130499['config']['get']('footnotes.multiBlock')?(_0x316ec1['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x316ec1['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x130499['model']['document'],'change:data',()=>{!function(_0xcc81a7,_0x3dca53){const _0x4e2708=_0xcc81a7['document']['differ'],_0x25b7d6=new Set();for(const _0x1a2159 of _0x4e2708['getChanges']()){const _0x96d283='attribute'==_0x1a2159['type']?_0x1a2159['range']['start']['parent']:_0x1a2159['position']['parent'];_0x96d283['is']('element','footnoteDefinition')&&_0x25b7d6['add'](_0x96d283);}for(const _0x29697f of _0x25b7d6['values']()){const _0x3ab395=Array['from'](_0x29697f['getChildren']())['filter'](_0x340875=>p(_0x340875,_0x3dca53['mapper']));for(const _0x13e0d1 of _0x3ab395)_0x3dca53['reconvertItem'](_0x13e0d1);}}(_0x130499['model'],_0x130499['editing']);})):(_0x316ec1['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x316ec1['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x3656c1,{writer:_0x510c2d})=>{const _0x1e3601=_0x510c2d['createContainerElement']('span');return _0x510c2d['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x1e3601),_0x1e3601;}}));}['_defineKeyboardHandlers'](){const {editor:_0x467cf6}=this,{editing:_0x8deffc,t:t}=_0x467cf6,_0x209562=_0x467cf6['model']['document']['selection'];_0x467cf6['keystrokes']['set']('CTRL+Alt+D','insertFootnote'),_0x467cf6['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+D'}]}),this['listenTo'](_0x8deffc['view']['document'],'enter',(_0x468042,_0x2d4c81)=>{const _0x1b2e81=function(_0x336053){const _0x1d3f4b=_0x336053['getSelectedElement']();if(_0x1d3f4b?.['is']('element','footnoteRef'))return _0x1d3f4b;return null;}(_0x209562);if(_0x1b2e81){const _0x90db00=_0x1b2e81['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x90db00),_0x2d4c81['preventDefault'](),_0x468042['stop']();}},{'context':_0x1862ca});}['_defineClickHandlers'](){const {editor:_0x573600}=this,{editing:_0x3531ae}=_0x573600;_0x573600['editing']['view']['addObserver'](_0xfde7da),_0x573600['editing']['view']['addObserver'](_0x46b2f1);let _0x431166=!0x1;this['listenTo'](_0x3531ae['view']['document'],'pointerdown',(_0x376653,_0x1a90e4)=>{const {target:_0x4d8727}=_0x1a90e4,_0x3af5e4=_0x3531ae['view']['document']['selection'];_0x431166=!(!_0x4d8727['is']('element','sup')||!_0x4d8727['hasClass']('footnote'))&&_0x3af5e4['getSelectedElement']()===_0x4d8727;},{'priority':'high'}),this['listenTo'](_0x3531ae['view']['document'],'click',(_0x47da20,_0x12e886)=>{const {target:_0x526a86}=_0x12e886,_0x13cb13=_0x526a86['getChild'](0x0)['getAttribute']('href');this['_moveSelectionToFootnoteDefinition'](_0x13cb13['slice'](0x1)),_0x47da20['stop'](),_0x12e886['preventDefault']();},{'priority':'high','context':_0x567216=>_0x567216['is']('element','sup')&&_0x567216['hasClass']('footnote')&&_0x431166}),this['listenTo'](_0x3531ae['view']['document'],'click',(_0x5ade61,_0x42901c)=>{const {target:_0x1d9f5e}=_0x42901c;if(!_0x1d9f5e['is']('element','a'))return;let _0x423338=_0x1d9f5e['getAttribute']('href');if(!_0x423338?.['startsWith']('#'))return;_0x423338=_0x423338['slice'](0x1);let _0x44a131=!0x1;(_0x423338['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x423338['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x423338))&&(_0x44a131=!0x0),_0x44a131&&(_0x42901c['preventDefault'](),_0x5ade61['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x173450}={}){return(_0x16f6d5,{writer:_0x3bdc48})=>{if(!h(_0x16f6d5))return null;if(!_0x173450)return _0x3bdc48['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x4fefc4=_0x3bdc48['createContainerElement']('p');return _0x3bdc48['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x4fefc4),_0x4fefc4;};}function h(_0x42e06e){const {parent:_0x4a6be3}=_0x42e06e;if(!_0x4a6be3?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x4a6be3['childCount'])return!0x1;for(const _0x5b3ccf of _0x42e06e['getAttributeKeys']())if(!_0x5b3ccf['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x5b3ccf)return!0x1;return!0x0;}function p(_0x3f8928,_0x1442eb){if(!_0x3f8928['is']('element','paragraph'))return!0x1;const _0xdb5df3=_0x1442eb['toViewElement'](_0x3f8928);return!!_0xdb5df3&&h(_0x3f8928)!==_0xdb5df3['is']('element','span');}function $(_0x118e23){return _0x1862ca(_0x118e23)&&_0x118e23['is']('containerElement')&&!!_0x118e23['getCustomProperty']('footnotesDefinitions');}function g(_0x120a0d,_0x339330){const _0x167a1e=_0x120a0d['getAttribute']('footnoteId'),_0x33fdd2=_0x120a0d['getAttribute']('footnoteCounter'),_0x3c246a=_0x339330['createUIElement']('a',{'id':'ref-'+_0x167a1e,'href':'#'+_0x167a1e},function(_0x325031){const _0x118821=this['toDomElement'](_0x325031);return _0x118821['textContent']=_0x33fdd2,_0x118821;}),_0x105f70=_0x339330['createContainerElement']('sup',{'class':'footnote'},[_0x3c246a]);return _0x105f70['getFillerOffset']=()=>null,_0x105f70;}function D(_0x285332,_0x4d811a,_0x36ad24,{dataPipeline:_0x125281}={}){const {t:t}=_0x36ad24,_0x5acc80=_0x285332['getAttribute']('footnoteId'),_0xb2418f=_0x4d811a['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x5acc80},function(_0xb8ea21){const _0x3d7a3d=this['toDomElement'](_0xb8ea21);return _0x3d7a3d['innerText']='^',_0x3d7a3d;}),_0x2e4115=_0x125281?_0x4d811a['createContainerElement']('div',{'class':'footnote-content'}):_0x147785(_0x4d811a['createEditableElement']('div',{'class':'footnote-content'}),_0x4d811a,{'label':t('Footnote\x20content.')});return _0x4d811a['insert'](_0x4d811a['createPositionAt'](_0x2e4115,0x0),_0x4d811a['createSlot']()),_0x4d811a['createContainerElement']('li',{'class':'footnote-definition','id':_0x5acc80},[_0xb2418f,_0x2e4115]);}class e extends _0x381f4b{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x1b023c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x24cb3e}=this,{plugins:_0x23946e,model:_0x445522}=_0x24cb3e,_0x5e972c=_0x23946e['get'](_0x1b023c),_0x3d035a=_0x23946e['get'](c);this['listenTo'](_0x5e972c,'outputTransformation',(_0x3915dc,_0x2167f7)=>{const _0x463b56=function(_0x496f94,_0xd4624c){const _0x4bb135=new Set();for(const {item:_0x5382c0}of _0x496f94['createRangeIn'](_0xd4624c))_0x5382c0['is']('element','footnoteRef')&&_0x4bb135['add'](_0x5382c0['getAttribute']('footnoteId'));return Array['from'](_0x4bb135);}(_0x445522,_0x2167f7['content']);if(!_0x463b56['length'])return;const _0x5191c3=_0x3d035a['getFootnotes'](),_0x40ba64=_0x463b56['reduce']((_0x1bcf0a,_0x148fef)=>{const _0xdfad00=_0x5191c3['find'](_0x26af7c=>_0x26af7c['id']===_0x148fef);if(_0xdfad00){const _0x34e7ef=_0x24cb3e['data']['toView'](_0xdfad00['definition'],{'isClipboardPipeline':!0x0}),_0x15bada=_0x24cb3e['data']['htmlProcessor']['toData'](_0x34e7ef);_0x1bcf0a[_0xdfad00['id']]=_0x15bada;}return _0x1bcf0a;},Object['create'](null));_0x2167f7['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x40ba64));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x557f8e}=this,{model:_0x20fcc2,plugins:_0xe29be7}=_0x557f8e,{view:_0x5b2c79}=_0x557f8e['editing'],_0x3f64ae=_0xe29be7['get'](_0x1b023c),_0x361536=_0xe29be7['get'](c);let _0x2f3ca2=null;this['listenTo'](_0x5b2c79['document'],'clipboardInput',(_0x120da6,_0x2eef27)=>{const _0x3e2687=_0x2eef27['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x2f3ca2=_0x3e2687?JSON['parse'](_0x3e2687):null;}),this['listenTo'](_0x3f64ae,'contentInsertion',(_0x4f910c,_0x17b2e6)=>{if(!_0x2f3ca2)return;const _0x33bff7=_0x17b2e6['sourceEditorId']===this['editor']['id'];_0x33bff7&&'drop'===_0x17b2e6['method']||_0x20fcc2['change'](_0x497503=>{!function(_0x4a9b0c,_0x5aa800){const _0x3e73c6=[];for(const {item:_0x28f695}of _0x4a9b0c['createRangeIn'](_0x5aa800))_0x28f695['is']('element','footnotesDefinitions')&&_0x3e73c6['push'](_0x28f695);for(const _0x38cff1 of _0x3e73c6)_0x4a9b0c['remove'](_0x38cff1);}(_0x497503,_0x17b2e6['content']);let _0xab393f=_0x361536['getFootnotesDefinitionsObjectElement']();if(!_0xab393f){const _0x563acb=_0x20fcc2['document']['selection']['getFirstRange']()['root'];_0xab393f=_0x361536['_insertEmptyFootnotesDefinitionsContainer'](_0x497503,_0x563acb);}const _0x1a3b7c=function(_0x3e21c2,_0x11c8ec,_0x37b071){const _0x4008e9=Object['create'](null);for(const {item:_0x3bdfa0}of _0x3e21c2['createRangeIn'](_0x11c8ec))if(_0x3bdfa0['is']('element','footnoteRef')){const _0x70f8fd=_0x3bdfa0['getAttribute']('footnoteId');if(!_0x37b071(_0x70f8fd))continue;_0x4008e9[_0x70f8fd]||(_0x4008e9[_0x70f8fd]=_0x204d37()),_0x3e21c2['setAttribute']('footnoteId',_0x4008e9[_0x70f8fd],_0x3bdfa0);}return _0x4008e9;}(_0x497503,_0x17b2e6['content'],_0x1f9bef=>!_0x33bff7||null!==_0x361536['getFootnote'](_0x1f9bef));for(const [_0xe65ede,_0x390f01]of Object['entries'](_0x2f3ca2)){const _0x378bd3=_0x1a3b7c[_0xe65ede]||_0xe65ede,_0x51a8c3=_0x497503['createElement']('footnoteDefinition',{'footnoteId':_0x378bd3}),_0x535776=_0x557f8e['data']['htmlProcessor']['toView'](_0x390f01),_0xc05956=_0x557f8e['data']['toModel'](_0x535776,_0x51a8c3);_0x497503['append'](_0xc05956,_0x51a8c3),_0x497503['insert'](_0x51a8c3,_0xab393f,'end');}_0x2f3ca2=null;});});}}class i extends _0x381f4b{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x360b9c}=this,{componentFactory:_0x4b9634}=_0x360b9c['ui'];_0x4b9634['add']('insertFootnote',v(_0x360b9c,_0x37c695)),_0x4b9634['add']('menuBar:insertFootnote',v(_0x360b9c,_0x528eb8)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x43dc08=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x466685;for(const _0x561057 in _0x43dc08){const _0x23922c=_0x561057,_0x28c4bb=_0x43dc08[_0x23922c];if('footnotesLicenseKeyValid'==_0x28c4bb||'footnotesLicenseKeyInvalid'==_0x28c4bb||'footnotesLicenseKeyExpired'==_0x28c4bb||'footnotesLicenseKeyDomainLimit'==_0x28c4bb||'footnotesLicenseKeyNotAllowed'==_0x28c4bb||'footnotesLicenseKeyEvaluationLimit'==_0x28c4bb||'footnotesLicenseKeyTrialLimit'==_0x28c4bb||'footnotesLicenseKeyUsageLimit'==_0x28c4bb){delete _0x43dc08[_0x23922c],_0x466685=_0x28c4bb,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x466685&&_0x43dc08['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x466685&&_0x43dc08['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x466685&&_0x43dc08['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x466685&&_0x43dc08['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x466685&&_0x43dc08['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0x466685&&_0x43dc08['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0x466685&&_0x43dc08['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function v(_0x2e7a28,_0x3da6a7){const _0x103567=_0x2e7a28['commands']['get']('insertFootnote');return _0x3e03ff=>{const {t:t}=_0x3e03ff,_0x2f86c2=new _0x3da6a7(_0x3e03ff),_0x51c7f5=_0x2f86c2 instanceof _0x528eb8;return _0x2f86c2['bind']('isEnabled')['to'](_0x103567,'isEnabled'),_0x2f86c2['set']({'label':t(_0x51c7f5?'Footnote':'Insert\x20footnote'),'icon':_0x5eae8f,'tooltip':!0x0}),_0x2f86c2['on']('execute',()=>{_0x103567['execute'](),_0x2e7a28['editing']['view']['focus']();}),_0x2f86c2;};}class nt extends _0x381f4b{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const H=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x180100{['refresh'](){const {editor:_0x7a70dd}=this,_0x10c7d5=_0x7a70dd['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x10c7d5,this['value']=_0x10c7d5?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x522e2a}){const {editor:_0x475392}=this,_0x14c79c=_0x475392['plugins']['get'](c),_0x1988ba=_0x14c79c['getFootnotesDefinitionsObjectElement']();_0x1988ba&&H['includes'](_0x522e2a)&&_0x475392['model']['change'](_0xea9f25=>{_0xea9f25['setAttribute']('footnotesListStyle',_0x522e2a,_0x1988ba),_0x14c79c['_updateFootnotesCounters'](_0xea9f25);});}}class b extends _0x180100{['refresh'](){const {editor:_0x2d9bfd}=this,_0x3d168c=_0x2d9bfd['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x3d168c,this['value']=_0x3d168c?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x173c18}){const {editor:_0x3b24e5}=this,_0x7a54dc=_0x3b24e5['plugins']['get'](c),_0x348c18=_0x7a54dc['getFootnotesDefinitionsObjectElement']();_0x348c18&&Number['isInteger'](_0x173c18)&&_0x3b24e5['model']['change'](_0x4d41e6=>{_0x4d41e6['setAttribute']('footnotesListStart',_0x173c18,_0x348c18),_0x7a54dc['_updateFootnotesCounters'](_0x4d41e6);});}}class P extends _0x381f4b{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2b1a7b}=this;_0x2b1a7b['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x2b1a7b['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x2b1a7b['commands']['add']('footnotesStyle',new S(_0x2b1a7b)),_0x2b1a7b['commands']['add']('footnotesStart',new b(_0x2b1a7b)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x247fc4}=this,{schema:_0x14efe6}=_0x247fc4['model'];_0x14efe6['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x276169}=this,{conversion:_0x2da6b8,model:_0x43819c}=_0x276169,{schema:_0x1c235b}=_0x43819c;_0x2da6b8['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','styles':{'list-style-type':/.+/}},'model':{'key':'footnotesListStyle','value':_0x222e66=>_0x222e66['getStyle']('list-style-type')}}),_0x2da6b8['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','attributes':{'start':/.+/}},'model':{'key':'footnotesListStart','value':_0x957ff3=>{const _0x54a850=_0x957ff3['getAttribute']('start'),_0x292109=Number['parseInt'](_0x54a850,0xa);return Number['isNaN'](_0x292109)?null:_0x292109;}}}),_0x2da6b8['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','attributes':{'type':/.+/}},'model':{'key':'footnotesListStyle','value':_0x5d683f=>({0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x5d683f['getAttribute']('type')])}}),_0x2da6b8['for']('upcast')['add'](_0x4ac867=>{_0x4ac867['on']('element:ol',(_0x553006,_0x72b0d8,_0x6044bd)=>{const _0x303d8c=_0x72b0d8['modelRange']?.['start']['nodeAfter'];_0x303d8c?.['is']('element','footnotesDefinitions')&&(!_0x303d8c['hasAttribute']('footnotesListStyle')&&_0x1c235b['checkAttribute'](_0x303d8c,'footnotesListStyle')&&_0x6044bd['writer']['setAttribute']('footnotesListStyle','decimal',_0x303d8c),!_0x303d8c['hasAttribute']('footnotesListStart')&&_0x1c235b['checkAttribute'](_0x303d8c,'footnotesListStart')&&_0x6044bd['writer']['setAttribute']('footnotesListStart',0x1,_0x303d8c));},{'priority':'low'});}),_0x2da6b8['for']('dataDowncast')['attributeToAttribute']({'model':{'name':'footnotesDefinitions','key':'footnotesListStart'},'view':_0x2f4944=>0x1===_0x2f4944?null:{'key':'start','value':String(_0x2f4944)}}),_0x2da6b8['for']('dataDowncast')['attributeToAttribute']({'model':{'name':'footnotesDefinitions','key':'footnotesListStyle'},'view':_0x766e2=>'decimal'===_0x766e2?null:{'key':'style','value':{'list-style-type':_0x766e2}}}),_0x2da6b8['for']('editingDowncast')['add'](_0x5d89f9=>{_0x5d89f9['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x35eda7,_0x59fc56,_0x54713b)=>{if(!_0x54713b['consumable']['consume'](_0x59fc56['item'],_0x35eda7['name']))return;const _0x19b941=C(_0x59fc56['item'],_0x54713b['mapper']);null===_0x59fc56['attributeNewValue']||void 0x0===_0x59fc56['attributeNewValue']||0x1===_0x59fc56['attributeNewValue']?_0x54713b['writer']['removeAttribute']('start',_0x19b941):_0x54713b['writer']['setAttribute']('start',String(_0x59fc56['attributeNewValue']),_0x19b941);}),_0x5d89f9['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x58a02c,_0x47f1e7,_0x511465)=>{if(!_0x511465['consumable']['consume'](_0x47f1e7['item'],_0x58a02c['name']))return;const _0xec5414=C(_0x47f1e7['item'],_0x511465['mapper']);_0x47f1e7['attributeNewValue']&&'decimal'!==_0x47f1e7['attributeNewValue']?_0x511465['writer']['setStyle']('list-style-type',_0x47f1e7['attributeNewValue'],_0xec5414):_0x511465['writer']['removeStyle']('list-style-type',_0xec5414);});});}['_definePostfixer'](){const {editor:_0x27b5e9}=this,{model:_0x399b05}=_0x27b5e9,_0x5e4775=_0x27b5e9['plugins']['get'](c),_0x2b45bd=this['_getDefaultListStyle'](),_0x20e70e=this['_getDefaultStartIndex']();_0x399b05['document']['registerPostFixer'](_0x431aa6=>{const _0x25476f=_0x399b05['document']['differ']['getChanges']();let _0x202f6f=!0x1;for(const _0x4ef49f of _0x25476f){if('insert'!==_0x4ef49f['type']||'$text'===_0x4ef49f['name'])continue;const _0x56ffd8=_0x399b05['createRangeOn'](_0x4ef49f['position']['nodeAfter']);for(const _0x2e57cd of _0x56ffd8['getItems']())_0x2e57cd['is']('element','footnotesDefinitions')&&(_0x2e57cd['hasAttribute']('footnotesListStart')||(_0x431aa6['setAttribute']('footnotesListStart',_0x20e70e,_0x2e57cd),_0x202f6f=!0x0),_0x2e57cd['hasAttribute']('footnotesListStyle')||(_0x431aa6['setAttribute']('footnotesListStyle',_0x2b45bd,_0x2e57cd),_0x202f6f=!0x0));}return _0x202f6f&&_0x5e4775['_updateFootnotesCounters'](_0x431aa6),_0x202f6f;});}['_defineFormatter'](){const {editor:_0x1946e1}=this;_0x1946e1['plugins']['get'](c)['setFootnoteFormatter'](_0x5d1d26=>this['_formatFootnoteListValue'](_0x5d1d26));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x4c95b8,value:_0x5c895f,digits:_0x3079c4}){const _0x48332f=_0x4c95b8['getAttribute']('footnotesListStyle'),_0x15a798=_0x4c95b8['getAttribute']('footnotesListStart'),_0x368d08=Math['floor'](_0x5c895f)+(_0x15a798-0x1);switch(_0x48332f){case'decimal':default:return String(_0x368d08);case'decimal-leading-zero':return function(_0x9b0b00,_0x8f64c0){return String(_0x9b0b00)['padStart'](_0x8f64c0,'0');}(_0x368d08,Math['max'](0x2,_0x3079c4));case'lower-alpha':case'lower-latin':return M(_0x368d08,!0x1);case'upper-alpha':case'upper-latin':return M(_0x368d08,!0x0);case'lower-roman':return A(_0x368d08,!0x1);case'upper-roman':return A(_0x368d08,!0x0);}}}function C(_0x159a5a,_0x8d62fa){const _0x4e14e8=_0x8d62fa['toViewElement'](_0x159a5a);return Array['from'](_0x4e14e8['getChildren']())['find'](_0x2ef5a5=>_0x2ef5a5['is']('element','ol'));}function M(_0x461b4e,_0x2e9a33){let _0x267e4='',_0x58c182=_0x461b4e;for(;_0x58c182>0x0;){const _0x385dca=(_0x58c182-0x1)%0x1a;_0x267e4=String['fromCharCode'](0x61+_0x385dca)+_0x267e4,_0x58c182=Math['floor']((_0x58c182-0x1)/0x1a);}return _0x2e9a33?_0x267e4['toUpperCase']():_0x267e4;}const X=[{'value':0x3e8,'numeral':'M'},{'value':0x384,'numeral':'CM'},{'value':0x1f4,'numeral':'D'},{'value':0x190,'numeral':'CD'},{'value':0x64,'numeral':'C'},{'value':0x5a,'numeral':'XC'},{'value':0x32,'numeral':'L'},{'value':0x28,'numeral':'XL'},{'value':0xa,'numeral':'X'},{'value':0x9,'numeral':'IX'},{'value':0x5,'numeral':'V'},{'value':0x4,'numeral':'IV'},{'value':0x1,'numeral':'I'}];function A(_0x3e126d,_0x491b2a){let _0x56ce57='',_0xdbdb19=_0x3e126d;for(const {value:_0x6c606f,numeral:_0x3082f8}of X)for(;_0xdbdb19>=_0x6c606f;)_0x56ce57+=_0x3082f8,_0xdbdb19-=_0x6c606f;return _0x491b2a?_0x56ce57:_0x56ce57['toLowerCase']();}class R extends _0xf9108b{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new it();['keystrokes']=new et();['focusables']=new _0x44558e();['focusCycler'];constructor(_0x5b23a1,{styleButtonViews:_0x32830f,styleGridAriaLabel:_0x229dff}){super(_0x5b23a1),(this['focusCycler']=new _0x1e2e91({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x32830f,_0x229dff),[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 _0x254d95 of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x254d95['element']);_0x34cdf8({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>ot['window']['getComputedStyle'](this['stylesView']['element'])['getPropertyValue']('grid-template-columns')['split']('\x20')['length'],'uiLanguageDirection':this['locale']&&this['locale']['uiLanguageDirection']});}if(this['startIndexFieldView']){this['focusables']['add'](this['startIndexFieldView']),this['focusTracker']['add'](this['startIndexFieldView']['element']);const _0x29b79f=_0x472027=>_0x472027['stopPropagation']();this['keystrokes']['set']('arrowright',_0x29b79f),this['keystrokes']['set']('arrowleft',_0x29b79f),this['keystrokes']['set']('arrowup',_0x29b79f),this['keystrokes']['set']('arrowdown',_0x29b79f);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x409997,_0x45dc02){const _0x19800a=new _0xf9108b(this['locale']);return _0x19800a['children']=_0x19800a['createCollection'](),_0x19800a['children']['addMany'](_0x409997),_0x19800a['setTemplate']({'tag':'div','attributes':{'aria-label':_0x45dc02,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x19800a['children']}),_0x19800a['children']['delegate']('execute')['to'](this),_0x19800a['focus']=function(){for(const _0x8e7a10 of this['children'])if(_0x8e7a10 instanceof _0x37c695&&_0x8e7a10['isOn'])return void _0x8e7a10['focus']();this['children']['first']['focus']();},_0x19800a['focusTracker']=new it(),_0x19800a['keystrokes']=new et(),_0x19800a['render'](),_0x19800a['keystrokes']['listenTo'](_0x19800a['element']),this['children']['add'](_0x19800a),_0x19800a;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x4132a3=this['_createStartIndexPropertyView'](),_0x3dcaa6=[_0x4132a3],_0x1b689d=new _0x4a1638(this['locale'],_0x3dcaa6);return _0x1b689d['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x1b689d['buttonView']['bind']('isEnabled')['toMany'](_0x3dcaa6,'isEnabled',(..._0x245c1b)=>_0x245c1b['some'](_0x207a10=>_0x207a10)),_0x1b689d['buttonView']['on']('change:isEnabled',(_0x114625,_0x351e41,_0x4e9166)=>{_0x4e9166||(_0x1b689d['isCollapsed']=!0x0);}),this['children']['add'](_0x1b689d),[_0x4132a3,_0x1b689d];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x27fedd=new tt(this['locale'],st);return _0x27fedd['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x27fedd['fieldView']['set']({'min':0x0,'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x27fedd['fieldView']['on']('input',()=>{const _0x8bab73=_0x27fedd['fieldView']['element'],_0x18db03=_0x8bab73['valueAsNumber'];Number['isNaN'](_0x18db03)?_0x27fedd['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x8bab73['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x18db03}):_0x27fedd['errorText']=t('Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.');}),_0x27fedd;}}class j extends _0x381f4b{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x45a7bd,_0x289e52];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2b9db4}=this,{componentFactory:_0x3bf2e2}=_0x2b9db4['ui'];_0x2b9db4['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x3bf2e2['add']('footnotesStyle',function(_0x4521c5){return _0x3587b2=>{const {t:t}=_0x3587b2,_0x4f1e71=_0x4521c5['commands']['get']('footnotesStyle'),_0x227459=_0x4519ce(_0x3587b2),{buttonView:_0x5971d1}=_0x227459;return _0x227459['class']='ck-footnotes-styles-dropdown',_0x227459['bind']('isEnabled')['to'](_0x4f1e71,'isEnabled'),_0x5971d1['set']({'label':t('Footnotes\x20style'),'icon':_0x5eae8f,'tooltip':!0x0}),_0x227459['once']('change:isOpen',()=>{const _0x149a72=function({editor:_0x5c07ee,dropdownView:_0x417393}){const {t:t}=_0x5c07ee['locale'],_0x5786dd=t('Footnotes\x20definitions\x20styles'),_0x7ee6a8=function(_0x485c48){const t=_0x485c48['locale']['t'],_0x5a28e7=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x437365},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x4025d5},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x50417e},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x18d6e3},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x2868d1},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x317054}];return _0x5a28e7['map'](function(_0x196249){const _0x2122e2=_0x196249['locale'];return({label:_0x5391fd,icon:_0x2d9274,tooltip:_0x237731,style:_0x4115c2})=>{const _0xf21f7b=_0x196249['commands']['get']('footnotesStyle'),_0x55b9ff=new _0x37c695(_0x2122e2);return _0x55b9ff['set']({'label':_0x5391fd,'icon':_0x2d9274,'tooltip':_0x237731}),_0x55b9ff['bind']('isOn')['to'](_0xf21f7b,'value',_0xf8a515=>_0xf8a515===_0x4115c2),_0x55b9ff['bind']('isEnabled')['to'](_0xf21f7b,'isEnabled'),_0x55b9ff['on']('execute',()=>{_0x196249['execute']('footnotesStyle',{'value':_0x4115c2}),_0x196249['editing']['view']['focus']();}),_0x55b9ff;};}(_0x485c48));}(_0x5c07ee),_0x324460=new R(_0x5c07ee['locale'],{'styleGridAriaLabel':_0x5786dd,'styleButtonViews':_0x7ee6a8});return _0x324460['delegate']('execute')['to'](_0x417393),_0x324460['on']('footnotesListStart',(_0xbe3f1e,_0x5e4e5e)=>{_0x5c07ee['execute']('footnotesStart',{'value':_0x5e4e5e['startIndex']});}),_0x324460;}({'editor':_0x4521c5,'dropdownView':_0x227459});_0x227459['panelView']['children']['add'](_0x149a72);}),_0x227459;};}(_0x2b9db4));}['afterInit'](){const {editor:_0x215b26}=this,{t:t}=_0x215b26['locale'],_0x3f0c31=_0x215b26['plugins']['get'](_0x289e52),{defaultPositions:_0x46ee3b}=_0x33377f;_0x3f0c31['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x215b26['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x11475f=>{let _0x4edd98=_0x11475f['getFirstPosition']()?.['parent'];return _0x4edd98?.['is']('$text')&&(_0x4edd98=_0x4edd98['parent']),_0x4edd98?.['is']('element')?_0x4edd98['findAncestor']($):null;},'positions':[_0x46ee3b['southArrowNorth'],_0x46ee3b['southArrowNorthMiddleWest'],_0x46ee3b['southArrowNorthMiddleEast'],_0x46ee3b['southArrowNorthWest'],_0x46ee3b['southArrowNorthEast'],_0x46ee3b['northArrowSouth'],_0x46ee3b['northArrowSouthMiddleWest'],_0x46ee3b['northArrowSouthMiddleEast'],_0x46ee3b['northArrowSouthWest'],_0x46ee3b['northArrowSouthEast'],_0x46ee3b['viewportStickyNorth']]});}}class rt extends _0x381f4b{static get['pluginName'](){return'FootnotesProperties';}static get['requires'](){return[P,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{nt as Footnotes,e as FootnotesClipboard,r as FootnotesEditing,rt as FootnotesProperties,P as FootnotesPropertiesEditing,j as FootnotesPropertiesUI,b as FootnotesStartCommand,S as FootnotesStyleCommand,c as FootnotesTracker,i as FootnotesUI,w as InsertFootnoteCommand};
23
+ import{Plugin as _0x3b1d24,Command as _0x5ec066}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x1d66b3,isWidget as _0x1113c0,toWidgetEditable as _0x8c9828,WidgetToolbarRepository as _0x444b8c}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x6b1447,logWarning as _0x10f02e,FocusTracker as it,KeystrokeHandler as et,global as ot}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x3cc568,ClickObserver as _0x33e78b}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x17c25a}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x129572,ButtonView as _0x5e1e56,View as _0x580895,ViewCollection as _0x478af2,FocusCycler as _0x41b0ac,addKeyboardHandlingForGrid as _0xb34a6c,CollapsibleView as _0x39e2d5,LabeledFieldView as tt,createLabeledInputNumber as st,ContextualBalloon as _0x329863,BalloonPanelView as _0x4b9f6e,createDropdown as _0x3cb9af}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x1db063,IconListStyleDecimal as _0x582374,IconListStyleDecimalLeadingZero as _0x438342,IconListStyleLowerRoman as _0x457797,IconListStyleUpperRoman as _0x2a3e63,IconListStyleLowerLatin as _0x54eae9,IconListStyleUpperLatin as _0x1d593e}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x2a039c,_0x1e290f){this['_model']=_0x2a039c,this['_elementName']=_0x1e290f['elementName'],this['_getElementKey']=_0x1e290f['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x5a4fb0){const _0x1ef1c8=new Set(),_0x1cc73b=new Map();for(const _0x112b81 of _0x5a4fb0){if('insert'===_0x112b81['type']&&'$text'!==_0x112b81['name']&&_0x112b81['position']['nodeAfter']){const _0x27ffe7=this['_model']['createRangeOn'](_0x112b81['position']['nodeAfter']);for(const _0x21b537 of _0x27ffe7['getItems']()){if(!_0x21b537['is']('element',this['_elementName']))continue;const _0xc765c8=this['_getElementKey'](_0x21b537);_0x1cc73b['has'](_0xc765c8)||_0x1cc73b['set'](_0xc765c8,[]),_0x1cc73b['get'](_0xc765c8)['push'](_0x21b537);}}if('remove'===_0x112b81['type']&&_0x112b81['name']===this['_elementName']){const _0x1e4e09=this['_getElementKey']({'getAttribute':_0x541a6c=>_0x112b81['attributes']['get'](_0x541a6c)});_0x1ef1c8['add'](_0x1e4e09);}}for(const [_0x164be2,_0xd359cd]of this['_trackedElements'])'$graveyard'===_0xd359cd['root']['rootName']&&_0x1ef1c8['add'](_0x164be2);for(const _0x51e1d1 of _0x1ef1c8)this['_trackedElements']['delete'](_0x51e1d1);for(const [_0x1d0516,_0x4355be]of _0x1cc73b)this['_trackedElements']['set'](_0x1d0516,_0x4355be[_0x4355be['length']-0x1]);const _0x5be70e=new Set();for(const [_0x58db2e,_0x191947]of _0x1cc73b)_0x1ef1c8['has'](_0x58db2e)&&(_0x5be70e['add'](_0x191947[0x0]),_0x191947['length']>0x1?_0x1cc73b['set'](_0x58db2e,_0x191947['slice'](0x1)):_0x1cc73b['delete'](_0x58db2e),_0x1ef1c8['delete'](_0x58db2e));return{'removed':Array['from'](_0x1ef1c8),'inserted':Array['from'](_0x1cc73b['values']())['flat'](),'moved':Array['from'](_0x5be70e)};}}class c extends _0x3b1d24{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2a1708){super(_0x2a1708),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x3f915f=>_0x3f915f['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x2888c4=>_0x2888c4['getAttribute']('footnoteId')});}['init'](){const {editor:_0x2e9679}=this,{model:_0x152cce,data:_0xc95d32}=_0x2e9679;_0x152cce['document']['registerPostFixer'](_0x138677=>{const _0xf077c0=_0x152cce['document']['differ']['getChanges']();let _0x1b4c27=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x138677,_0xf077c0)&&(_0x1b4c27=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x138677,_0xf077c0)&&(_0x1b4c27=!0x0),this['_handleFootnoteReferencesChanges'](_0x138677,_0xf077c0)&&(_0x1b4c27=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x138677)&&(_0x1b4c27=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x138677)&&(_0x1b4c27=!0x0),this['_sortFootnoteDefinitions'](_0x138677)&&(_0x1b4c27=!0x0),_0x1b4c27;}),this['listenTo'](_0x152cce['document'],'change:data',()=>{_0x152cce['enqueueChange']({'isUndoable':!0x1},_0x7d808b=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x7d808b);});},{'priority':'low'}),this['listenTo'](_0xc95d32,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x3b31b0){return this['_footnotes']['find'](_0x864c1d=>_0x864c1d['id']===_0x3b31b0)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x28c9bd){this['_footnoteFormatter']=_0x28c9bd;}['_updateFootnotesCounters'](_0x2bac0b,_0x596cd3=0x0){let _0x449513=!0x1;for(let _0x48ee98=_0x596cd3;_0x48ee98<this['_footnotes']['length'];_0x48ee98++)this['_updateFootnoteRefCounter'](_0x2bac0b,_0x48ee98)&&(_0x449513=!0x0);return _0x449513;}['_insertEmptyFootnotesDefinitionsContainer'](_0xbb21af,_0x359087){const _0x1d6716=_0xbb21af['createElement']('footnotesDefinitions',{});return _0xbb21af['append'](_0x1d6716,_0x359087),this['_footnotesDefinitions']=_0x1d6716,_0x1d6716;}['_ensureFootnotesDefinitionsContainerExists'](_0x5af931){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x3887f0=this['_footnotes'][0x0]['reference']['root'],_0x46ab73=this['_insertEmptyFootnotesDefinitionsContainer'](_0x5af931,_0x3887f0);for(const _0x4bacb9 of this['_footnotes'])_0x4bacb9['definition']['parent']||_0x5af931['insert'](_0x4bacb9['definition'],_0x46ab73,'end');this['_updateFootnotesCounters'](_0x5af931);}['_handleFootnotesDefinitionsObjectChanges'](_0x1c6448,_0x571e7f){let _0x3c3415=!0x1;const {inserted:_0x421ae6,removed:_0x4ec099,moved:_0x30ce54}=this['_footnoteDefsContainerTracker']['getChanges'](_0x571e7f);if(_0x30ce54['length']&&(this['_footnotesDefinitions']=_0x30ce54[0x0]),_0x421ae6['length']){if(_0x421ae6['length']>0x1||this['_footnotesDefinitions']&&_0x421ae6['some'](_0x463918=>_0x463918!==this['_footnotesDefinitions'])){const _0x1ce2ed=_0x1c6448['createElement']('footnotesDefinitions',{}),_0x29efc7=[];this['_footnotesDefinitions']&&_0x29efc7['push'](this['_footnotesDefinitions']),_0x29efc7['push'](..._0x421ae6),_0x1c6448['insert'](_0x1ce2ed,_0x29efc7[0x0],'before');for(const _0x59661a of _0x29efc7)_0x1c6448['move'](_0x1c6448['createRangeIn'](_0x59661a),_0x1c6448['createPositionAt'](_0x1ce2ed,'end')),_0x1c6448['remove'](_0x59661a);this['_footnotesDefinitions']=_0x1ce2ed,this['_updateFootnotesCounters'](_0x1c6448),_0x3c3415=!0x0;}else this['_footnotesDefinitions']=_0x421ae6[0x0];}if(_0x4ec099['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x1eb752 of this['_footnotes'])_0x1c6448['remove'](_0x1eb752['reference']),_0x3c3415=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x3c3415;}['_handleFootnoteDefinitionsChanges'](_0x2e3a13,_0x53f399){let _0x5225f8=!0x1;const _0xc0f73c=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x374713,moved:_0x640c8a}=this['_footnoteDefsTracker']['getChanges'](_0x53f399);for(const _0x3a9d25 of[..._0x640c8a,..._0x374713]){const _0x221495=_0x3a9d25['getAttribute']('footnoteId'),_0x33514e=this['getFootnote'](_0x221495);_0x33514e&&(_0x33514e['definition']=_0x3a9d25),_(_0x2e3a13,_0xc0f73c,_0x3a9d25)&&(_0x5225f8=!0x0);}return _0x5225f8;}['_handleFootnoteReferencesChanges'](_0x54f91b,_0x7fd158){let _0x3f16c5=!0x1;const {removed:_0x159ea3,inserted:_0x417b92,moved:_0x2855d1}=this['_footnoteRefsTracker']['getChanges'](_0x7fd158);for(const _0x141334 of _0x159ea3)this['_handleRemoveFootnoteReferenceById'](_0x54f91b,_0x141334)&&(_0x3f16c5=!0x0);for(const _0x1d8148 of _0x417b92)this['_handleInsertedFootnoteReference'](_0x54f91b,_0x1d8148)&&(_0x3f16c5=!0x0);for(const _0x32c329 of _0x2855d1)this['_handleMovedFootnoteReference'](_0x54f91b,_0x32c329)&&(_0x3f16c5=!0x0);return _0x3f16c5;}['_handleFootnotesDefinitionsObjectSync'](_0x413f1d){if(!this['_footnotesDefinitions'])return!0x1;let _0x2d5d10=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x4c3b58=[];for(const _0x229b67 of this['_footnotesDefinitions']['getChildren']()){const _0x33257f=_0x229b67['getAttribute']('footnoteId');this['getFootnote'](_0x33257f)||(_0x4c3b58['unshift'](_0x229b67),_0x2d5d10=!0x0);}for(const _0x4ca9dd of _0x4c3b58)_0x413f1d['remove'](_0x4ca9dd);}const _0x48e159=new Set(),_0x3457ca=[];for(const _0x412483 of this['_footnotesDefinitions']['getChildren']()){const _0x585f1a=_0x412483['getAttribute']('footnoteId');_0x48e159['has'](_0x585f1a)?(_0x3457ca['unshift'](_0x412483),_0x2d5d10=!0x0):_0x48e159['add'](_0x585f1a);}for(const _0x218ace of _0x3457ca)_0x413f1d['remove'](_0x218ace);return this['_footnotesDefinitions']['childCount']||(_0x413f1d['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x2d5d10=!0x0),_0x2d5d10;}['_handleInsertedFootnoteReference'](_0x3541e6,_0x4acb5e){if(this['_footnotes']['find'](_0x3c9909=>_0x3c9909['reference']===_0x4acb5e))return!0x1;let _0x2557b8=!0x1;const _0x581a44=_0x4acb5e['getAttribute']('footnoteId'),_0x1aed62=this['getFootnote'](_0x581a44);_0x1aed62&&(_0x3541e6['remove'](_0x1aed62['reference']),this['_footnotes']=this['_footnotes']['filter'](_0x3ea496=>_0x3ea496['id']!==_0x581a44),_0x2557b8=!0x0);let _0x491a35=this['_footnotesDefinitions']?function(_0xbf2ca3,_0xf3520a){for(const _0x573980 of _0xbf2ca3['getChildren']())if(_0x573980['getAttribute']('footnoteId')===_0xf3520a)return _0x573980;return null;}(this['_footnotesDefinitions'],_0x581a44):null;_0x491a35||(_0x491a35=_0x3541e6['createElement']('footnoteDefinition',{'footnoteId':_0x581a44}),this['_footnotesDefinitions']&&(_0x3541e6['insert'](_0x491a35,this['_footnotesDefinitions'],'end'),_0x2557b8=!0x0));const _0x4b8ab4={'id':_0x581a44,'reference':_0x4acb5e,'definition':_0x491a35},_0x55f27e=I(this['editor']['model'],this['_footnotes'],_0x4acb5e);return this['_footnotes']['splice'](_0x55f27e,0x0,_0x4b8ab4),this['_updateFootnotesCounters'](_0x3541e6,_0x55f27e)&&(_0x2557b8=!0x0),_0x2557b8;}['_handleRemoveFootnoteReferenceById'](_0x4ee149,_0x356ae3){const _0x5f5b71=this['_footnotes']['findIndex'](_0x138ca6=>_0x138ca6['id']===_0x356ae3);if(-0x1===_0x5f5b71)return!0x1;let _0x39c1c8=!0x1;const _0x48e32c=this['_footnotes'][_0x5f5b71];return'$graveyard'!==_0x48e32c['definition']['root']['rootName']&&(_0x4ee149['remove'](_0x48e32c['definition']),_0x39c1c8=!0x0),this['_footnotes']['splice'](_0x5f5b71,0x1),this['_updateFootnotesCounters'](_0x4ee149,_0x5f5b71)&&(_0x39c1c8=!0x0),_0x39c1c8;}['_handleMovedFootnoteReference'](_0x4091f1,_0x4d23b3){const _0x221067=_0x4d23b3['getAttribute']('footnoteId'),_0x995e2=this['_footnotes']['findIndex'](_0x33c77e=>_0x33c77e['id']===_0x221067),_0x104399=this['_footnotes'][_0x995e2];let _0x15fd8e=!0x1;_0x104399['reference']=_0x4d23b3,this['_footnotes']['splice'](_0x995e2,0x1);const _0x263b49=I(this['editor']['model'],this['_footnotes'],_0x4d23b3);return this['_footnotes']['splice'](_0x263b49,0x0,_0x104399),this['_updateFootnotesCounters'](_0x4091f1,Math['min'](_0x995e2,_0x263b49))&&(_0x15fd8e=!0x0),_0x15fd8e;}['_updateFootnoteRefCounter'](_0x2243e2,_0x351934){if(!this['_footnotesDefinitions'])return!0x1;const _0x4d43d6=this['_footnotes'][_0x351934];let _0x223e0;return _0x223e0=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x4d43d6,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x351934+0x1}):String(_0x351934+0x1),_0x4d43d6['reference']['getAttribute']('footnoteCounter')!=_0x223e0&&(_0x2243e2['setAttribute']('footnoteCounter',_0x223e0,_0x4d43d6['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x2bea26){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x3e2c56,_0x2ced7c){if(_0x3e2c56['length']!==_0x2ced7c['length'])return!0x1;for(let _0x3da06e=0x0;_0x3da06e<_0x3e2c56['length'];_0x3da06e++)if(_0x3e2c56[_0x3da06e]!==_0x2ced7c[_0x3da06e])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x12efbd=>_0x12efbd['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x18cd05=>_0x18cd05['getAttribute']('footnoteId'))))return!0x1;let _0x22e791=!0x1;for(let _0xf53270=0x0;_0xf53270<this['_footnotes']['length'];_0xf53270++){const _0x363c82=this['_footnotes'][_0xf53270],_0xcfa40c=_0x2bea26['createPositionBefore'](_0x363c82['definition']),_0x4b77b9=_0x2bea26['createPositionAt'](this['_footnotesDefinitions'],_0xf53270);_0xcfa40c['isEqual'](_0x4b77b9)||(_0x2bea26['move'](_0x2bea26['createRangeOn'](_0x363c82['definition']),_0x4b77b9),_0x22e791=!0x0);}return _0x22e791;}['_ensureFootnotesReferencesHaveProperOrder'](_0x5ec881){if(!this['_footnotes']['length'])return!0x1;const {model:_0x43a09f}=this['editor'];let _0x5c9ff5=!0x1;for(let _0x4f03bc=0x0;_0x4f03bc<this['_footnotes']['length']-0x1;_0x4f03bc++){const _0x539902=this['_footnotes'][_0x4f03bc],_0x513f75=this['_footnotes'][_0x4f03bc+0x1],_0x51c3c4=_0x43a09f['createPositionBefore'](_0x539902['reference']),_0x1f81ea=_0x43a09f['createPositionBefore'](_0x513f75['reference']);'after'===_0x51c3c4['compareWith'](_0x1f81ea)&&(this['_handleMovedFootnoteReference'](_0x5ec881,_0x539902['reference']),_0x4f03bc=-0x1,_0x5c9ff5=!0x0);}return _0x5c9ff5;}}function _(_0xf6f987,_0x3bd8cc,_0x1550cc){if(_0x1550cc['childCount'])return!0x1;const _0x5777b8=_0x3bd8cc?'paragraph':'footnoteInlineContent';return _0xf6f987['insert'](_0xf6f987['createElement'](_0x5777b8),_0x1550cc),!0x0;}function I(_0x3f88ea,_0x158f0e,_0x463119){if(0x0===_0x158f0e['length'])return 0x0;const _0x3f88af=_0x3f88ea['createPositionBefore'](_0x463119);for(let _0x313c8b=0x0;_0x313c8b<_0x158f0e['length'];_0x313c8b++){const _0x57c6de=_0x158f0e[_0x313c8b],_0x398c01=_0x3f88ea['createPositionBefore'](_0x57c6de['reference']);if('before'===_0x3f88af['compareWith'](_0x398c01))return _0x313c8b;}const _0x96a3e3=_0x463119['root'];let _0x410a5a=-0x1;for(let _0x23f129=_0x158f0e['length']-0x1;_0x23f129>=0x0;_0x23f129--)if(_0x158f0e[_0x23f129]['reference']['root']===_0x96a3e3){_0x410a5a=_0x23f129;break;}if(-0x1!==_0x410a5a)return _0x410a5a+0x1;const _0x55d60b=_0x3f88ea['document']['getRootNames'](),_0x41e30f=_0x55d60b['indexOf'](_0x96a3e3['rootName']),_0x2df8d3=_0x55d60b[_0x41e30f+0x1];if(_0x2df8d3){for(let _0x20d27f=0x0;_0x20d27f<_0x158f0e['length'];_0x20d27f++)if(_0x158f0e[_0x20d27f]['reference']['root']['rootName']===_0x2df8d3)return _0x20d27f;}return _0x158f0e['length'];}class w extends _0x5ec066{['refresh'](){const _0x59ac9d=this['editor']['model']['document']['selection'],_0xae4ec6=this['_getPositionToInsertFootnote'](_0x59ac9d);this['isEnabled']=!!_0xae4ec6;}['execute'](_0x450180){const {editor:_0x25ced2}=this,{model:_0x12e376}=_0x25ced2,{selection:_0x2a9167}=_0x12e376['document'],_0x532298=this['_getPositionToInsertFootnote'](_0x2a9167);if(!_0x532298)return;const _0x4d56f9=_0x25ced2['plugins']['get']('FootnotesEditing'),_0x328c63=_0x450180?.['footnoteId']??_0x6b1447();!function(_0x4d1ee6){return'string'==typeof _0x4d1ee6&&_0x4d1ee6['length']>0x0&&!/\s/['test'](_0x4d1ee6)&&!/^\d/['test'](_0x4d1ee6);}(_0x328c63)?_0x10f02e('insert-footnote-command-executed-with-invalid-id'):(_0x12e376['change'](_0x4a398a=>{const _0x339264=_0x4a398a['createElement']('footnoteRef',{'footnoteId':_0x328c63});_0x12e376['insertObject'](_0x339264,_0x532298,null);}),_0x4d56f9['_moveSelectionToFootnoteDefinition'](_0x328c63));}['_getPositionToInsertFootnote'](_0x2f40e1){const {model:_0x8aeb62}=this['editor'],{schema:_0x1c2d2a}=_0x8aeb62,_0x40a171=_0x2f40e1['getFirstRange']();for(const _0x521e76 of _0x40a171['getItems']())if(_0x1c2d2a['isBlock'](_0x521e76)||_0x1c2d2a['isObject'](_0x521e76))return null;const _0x2143fe=_0x40a171['end'];return _0x1c2d2a['checkChild'](_0x2143fe,'footnoteRef')?_0x2143fe:null;}}class r extends _0x3b1d24{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x8046b5}=this;_0x8046b5['config']['define']('footnotes.multiBlock',!0x0),_0x8046b5['commands']['add']('insertFootnote',new w(_0x8046b5)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x258afb){const _0x19043c=_0x141011([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x53cc88=0x47a28506,_0x419a81=0x47a5f3be^_0x53cc88,_0x4a0c00=window[_0x141011([0x44,0x61,0x74,0x65])][_0x141011([0x6e,0x6f,0x77])](),_0x288a62=_0x258afb[_0x141011([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x580a94=new window[(_0x141011([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x44ebe2=>{_0x288a62[_0x141011([0x6f,0x6e,0x63,0x65])](_0x141011([0x72,0x65,0x61,0x64,0x79]),_0x44ebe2);}),_0xddd535={[_0x141011([0x6b,0x74,0x79])]:_0x141011([0x45,0x43]),[_0x141011([0x75,0x73,0x65])]:_0x141011([0x73,0x69,0x67]),[_0x141011([0x63,0x72,0x76])]:_0x141011([0x50,0x2d,0x32,0x35,0x36]),[_0x141011([0x78])]:_0x141011([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x141011([0x79])]:_0x141011([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x141011([0x61,0x6c,0x67])]:_0x141011([0x45,0x53,0x32,0x35,0x36])},_0x4fb84a=_0x288a62[_0x141011([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x141011([0x67,0x65,0x74])](_0x141011([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5766db(){let _0x16c75e,_0x226893=null,_0x521698=null;try{if(_0x4fb84a==_0x141011([0x47,0x50,0x4c]))return _0x141011([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x16c75e=_0x2013e4(),!_0x16c75e)return _0x141011([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x16c75e[_0x141011([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x521698=_0x2f01c8(_0x16c75e[_0x141011([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x16c75e[_0x141011([0x6a,0x74,0x69])])),await _0x26b125()?_0x3eadd0()?_0x1a6c89()?_0x141011([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x31da5d()?(_0x16c75e[_0x141011([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x141011([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x226893=_0x1a8958(_0x141011([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x16c75e[_0x141011([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x141011([0x74,0x72,0x69,0x61,0x6c])&&(_0x226893=_0x1a8958(_0x141011([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x36dbe8()):_0x141011([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x141011([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x141011([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x141011([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1a6c89(){const _0x154249=[_0x141011([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x141011([0x74,0x72,0x69,0x61,0x6c])][_0x141011([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16c75e[_0x141011([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4a0c00/0x3e8:0xe10*_0x419a81;return _0x16c75e[_0x141011([0x65,0x78,0x70])]<_0x154249;}function _0x3eadd0(){const _0x285ba2=_0x16c75e[_0x141011([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x285ba2&&(!!_0x285ba2[_0x141011([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x141011([0x2a]))||!!_0x285ba2[_0x141011([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x141011([0x46,0x4f,0x4f])));}function _0x31da5d(){const _0x3a042b=_0x16c75e[_0x141011([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3a042b||0x0==_0x3a042b[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1b938a}=new URL(window[_0x141011([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3a042b[_0x141011([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1b938a))return!0x0;const _0x4c26a5=_0x1b938a[_0x141011([0x73,0x70,0x6c,0x69,0x74])](_0x141011([0x2e]));return _0x3a042b[_0x141011([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x36180b=>_0x36180b[_0x141011([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x141011([0x2a])))[_0x141011([0x6d,0x61,0x70])](_0x519575=>_0x519575[_0x141011([0x73,0x70,0x6c,0x69,0x74])](_0x141011([0x2e])))[_0x141011([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x29e7cc=>_0x29e7cc[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4c26a5[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x141011([0x6d,0x61,0x70])](_0x22d427=>Array(_0x4c26a5[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x22d427[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x141011([0x66,0x69,0x6c,0x6c])](_0x22d427[0x0]===_0x141011([0x2a])?_0x141011([0x2a]):'')[_0x141011([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x22d427))[_0x141011([0x73,0x6f,0x6d,0x65])](_0x485252=>_0x4c26a5[_0x141011([0x65,0x76,0x65,0x72,0x79])]((_0x17853b,_0x5a1b9a)=>_0x485252[_0x5a1b9a]===_0x17853b||_0x485252[_0x5a1b9a]===_0x141011([0x2a])));}function _0x36dbe8(){return _0x226893&&_0x521698?new window[(_0x141011([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5428bc,_0x173d07)=>{_0x226893[_0x141011([0x74,0x68,0x65,0x6e])](_0x5428bc,_0x173d07),_0x521698[_0x141011([0x74,0x68,0x65,0x6e])](_0x221496=>{_0x221496!=_0x141011([0x56,0x61,0x6c,0x69,0x64])&&_0x5428bc(_0x221496);},_0x173d07);}):_0x226893||_0x521698||_0x141011([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2f01c8(_0x22ce1f,_0x3e0d03){return new window[(_0x141011([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58cf35=>{if(_0x5d3907())return _0x58cf35(_0x141011([0x56,0x61,0x6c,0x69,0x64]));_0x45b891(),_0x288a62[_0x141011([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x141011([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xbe3060=!0x1;const _0x3dc497=_0x6b1447();function _0x114351(_0x1f49a4){return!!_0x1f49a4&&(typeof _0x1f49a4===_0x141011([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1f49a4===_0x141011([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1f49a4[_0x141011([0x74,0x68,0x65,0x6e])]===_0x141011([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1f49a4[_0x141011([0x63,0x61,0x74,0x63,0x68])]===_0x141011([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x32a226(_0x393602){_0x1279bb(_0x393602)[_0x141011([0x74,0x68,0x65,0x6e])](_0x104ccf=>{if(!_0x104ccf||_0x104ccf[_0x141011([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x141011([0x6f,0x6b]))return _0x141011([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x294247(_0x22651a(_0x3dc497+_0x3e0d03))!=_0x104ccf[_0x141011([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x141011([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x141011([0x56,0x61,0x6c,0x69,0x64]);})[_0x141011([0x74,0x68,0x65,0x6e])](_0x1a28fc=>(_0x9741cc(),_0x1a28fc),()=>{const _0x3123b7=_0x1324be();return null==_0x3123b7?(_0x9741cc(),_0x141011([0x56,0x61,0x6c,0x69,0x64])):_0x141011(_0x4a0c00-_0x3123b7>(0x63ae0106^_0x53cc88)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x141011([0x74,0x68,0x65,0x6e])](_0x58cf35)[_0x141011([0x63,0x61,0x74,0x63,0x68])](()=>{_0x58cf35(_0x141011([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5bb356=0x47946b86^_0x53cc88;function _0x9741cc(){const _0xd2de81=_0x141011([0x6c,0x6c,0x63,0x74,0x2d])+_0x294247(_0x22651a(_0x22ce1f)),_0x176805=_0x26bccf(_0x294247(window[_0x141011([0x4d,0x61,0x74,0x68])][_0x141011([0x63,0x65,0x69,0x6c])](_0x4a0c00/_0x5bb356)));window[_0x141011([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x141011([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd2de81,_0x176805);}function _0x1324be(){const _0x2038c9=_0x141011([0x6c,0x6c,0x63,0x74,0x2d])+_0x294247(_0x22651a(_0x22ce1f)),_0x5d3e8f=window[_0x141011([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x141011([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2038c9);return _0x5d3e8f?window[_0x141011([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x26bccf(_0x5d3e8f),0x10)*_0x5bb356:null;}function _0x1279bb(_0xa55c27){return new window[(_0x141011([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1a69b7,_0x3f240e)=>{_0xa55c27[_0x141011([0x74,0x68,0x65,0x6e])](_0x1a69b7,_0x3f240e),window[_0x141011([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3f240e,0x47a351c6^_0x53cc88);});}}_0x288a62[_0x141011([0x6f,0x6e])](_0x141011([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2201a8,_0x7dabae)=>{if(_0x7dabae[0x0]!=_0x22ce1f)return _0x58cf35(_0x141011([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x7dabae[0x1]={..._0x7dabae[0x1],[_0x141011([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3dc497};},{[_0x141011([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x141011([0x68,0x69,0x67,0x68])}),_0x288a62[_0x141011([0x6f,0x6e])](_0x141011([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2601e1=>{_0x114351(_0x2601e1[_0x141011([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xbe3060=!0x0,_0x32a226(_0x2601e1[_0x141011([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x141011([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x141011([0x6c,0x6f,0x77])}),_0x580a94[_0x141011([0x74,0x68,0x65,0x6e])](()=>{_0xbe3060||_0x58cf35(_0x141011([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5d3907(){return _0x288a62[_0x141011([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x141011([0x76,0x69,0x65,0x77])][_0x141011([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x141011([0x61,0x75,0x74,0x6f]);}function _0x45b891(){_0x288a62[_0x141011([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x141011([0x76,0x69,0x65,0x77])][_0x141011([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x141011([0x61,0x75,0x74,0x6f]);}}function _0x1a8958(_0x15435c){const _0x2fdff8=[new window[(_0x141011([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54d2b1=>setTimeout(_0x54d2b1,0x47abbbca^_0x53cc88)),_0x580a94[_0x141011([0x74,0x68,0x65,0x6e])](()=>new window[(_0x141011([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c75cb=>{let _0x5df31b=0x0;_0x288a62[_0x141011([0x6d,0x6f,0x64,0x65,0x6c])][_0x141011([0x6f,0x6e])](_0x141011([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x388cb3,_0x48636b)=>{_0x48636b[0x0][_0x141011([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5df31b++,_0x5df31b==(0x47a284fe^_0x53cc88)&&(_0x2c75cb(),_0x388cb3[_0x141011([0x6f,0x66,0x66])]());});}))];return window[_0x141011([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x141011([0x72,0x61,0x63,0x65])](_0x2fdff8)[_0x141011([0x74,0x68,0x65,0x6e])](()=>_0x15435c);}async function _0x4dded8(){await _0x580a94,_0x288a62[_0x141011([0x6d,0x6f,0x64,0x65,0x6c])][_0x141011([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x27274b,_0x288a62[_0x141011([0x6d,0x6f,0x64,0x65,0x6c])][_0x141011([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x27274b,_0x288a62[_0x141011([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x141011([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x26d597(_0x4b2da3){const _0x4061b3=_0x547736();_0x288a62[_0x4061b3]=_0x141011([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4b2da3,_0x4b2da3!=_0x141011([0x56,0x61,0x6c,0x69,0x64])&&_0x4dded8();}function _0x547736(){const _0x4ccb42=window[_0x141011([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x141011([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x141011([0x6e,0x6f,0x77])]())[_0x141011([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x141011([0x2e]),'');let _0x3ac2e9=_0x141011([0x75]);for(let _0x2f351a=0x0;_0x2f351a<_0x4ccb42[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2f351a+=0x2){let _0x4670a3=window[_0x141011([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4ccb42[_0x141011([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2f351a,_0x2f351a+0x2));_0x4670a3>=_0x19043c[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4670a3-=_0x19043c[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3ac2e9+=_0x19043c[_0x4670a3];}return _0x3ac2e9;}function _0x2013e4(){const _0xc60926=_0x4fb84a[_0x141011([0x73,0x70,0x6c,0x69,0x74])](_0x141011([0x2e]));if(0x3!=_0xc60926[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x54bcb3(_0xc60926[0x1]);function _0x54bcb3(_0x5b7ae2){const _0xd623aa=_0x46936b(_0x5b7ae2);return _0xd623aa&&_0x45c19d()?_0xd623aa:null;function _0x45c19d(){const _0x13027b=_0xd623aa[_0x141011([0x6a,0x74,0x69])],_0x267cd8=window[_0x141011([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x13027b[_0x141011([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x13027b[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x8b2795={..._0xd623aa,[_0x141011([0x6a,0x74,0x69])]:_0x13027b[_0x141011([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x13027b[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x8b2795[_0x141011([0x76,0x63])],_0x22651a(_0x8b2795)==_0x267cd8;}}}async function _0x26b125(){let _0x41b73c=!0x0;try{const _0x56aa1e=_0x4fb84a[_0x141011([0x73,0x70,0x6c,0x69,0x74])](_0x141011([0x2e])),[_0x5074d2,_0x27a946,_0x8068bf]=_0x56aa1e;return _0x315cb5(_0x5074d2),await _0x541740(_0x5074d2,_0x27a946,_0x8068bf),_0x41b73c;}catch{return!0x1;}function _0x315cb5(_0xbef381){const _0x532958=_0x46936b(_0xbef381);_0x532958&&_0x532958[_0x141011([0x61,0x6c,0x67])]==_0x141011([0x45,0x53,0x32,0x35,0x36])||(_0x41b73c=!0x1);}async function _0x541740(_0x2ba222,_0x27bf04,_0x40ce26){const _0x2a665a=window[_0x141011([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x141011([0x66,0x72,0x6f,0x6d])](_0x5ce628(_0x40ce26),_0x11ade6=>_0x11ade6[_0x141011([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x345449=new window[(_0x141011([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x141011([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2ba222+_0x141011([0x2e])+_0x27bf04),_0x2bafa2=window[_0x141011([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x141011([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2bafa2)return;const _0xbbbda=await _0x2bafa2[_0x141011([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x141011([0x6a,0x77,0x6b]),_0xddd535,{[_0x141011([0x6e,0x61,0x6d,0x65])]:_0x141011([0x45,0x43,0x44,0x53,0x41]),[_0x141011([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x141011([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x141011([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2bafa2[_0x141011([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x141011([0x6e,0x61,0x6d,0x65])]:_0x141011([0x45,0x43,0x44,0x53,0x41]),[_0x141011([0x68,0x61,0x73,0x68])]:{[_0x141011([0x6e,0x61,0x6d,0x65])]:_0x141011([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xbbbda,_0x2a665a,_0x345449)||(_0x41b73c=!0x1);}}function _0x46936b(_0x26038d){return _0x26038d[_0x141011([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x141011([0x65,0x79]))?JSON[_0x141011([0x70,0x61,0x72,0x73,0x65])](_0x5ce628(_0x26038d)):null;}function _0x5ce628(_0x21918c){return window[_0x141011([0x61,0x74,0x6f,0x62])](_0x21918c[_0x141011([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x141011([0x2b]))[_0x141011([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x141011([0x2f])));}function _0x22651a(_0x9c2c41){let _0x502427=0x1505;function _0x6633e1(_0x3519f5){for(let _0x38ba1c=0x0;_0x38ba1c<_0x3519f5[_0x141011([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x38ba1c++){const _0x1a6101=_0x3519f5[_0x141011([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x38ba1c);_0x502427=(_0x502427<<0x5)+_0x502427+_0x1a6101,_0x502427&=_0x502427;}}function _0x36233b(_0x5ad77e){Array[_0x141011([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5ad77e)?_0x5ad77e[_0x141011([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x36233b):_0x5ad77e&&typeof _0x5ad77e==_0x141011([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x141011([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5ad77e)[_0x141011([0x73,0x6f,0x72,0x74])]()[_0x141011([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x28cdc5,_0x2bc95e])=>{_0x6633e1(_0x28cdc5),_0x36233b(_0x2bc95e);}):_0x6633e1(window[_0x141011([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5ad77e));}return _0x36233b(_0x9c2c41),_0x502427>>>0x0;}function _0x294247(_0x51a27b){return _0x51a27b[_0x141011([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x141011([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x141011([0x30]));}function _0x26bccf(_0x5375bb){return _0x5375bb[_0x141011([0x73,0x70,0x6c,0x69,0x74])]('')[_0x141011([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x141011([0x6a,0x6f,0x69,0x6e])]('');}function _0x27274b(){}function _0x141011(_0x3c21d7){return _0x3c21d7['map'](_0x14fa97=>String['fromCharCode'](_0x14fa97))['join']('');}_0x26d597(await _0x5766db());}(this);}['_moveSelectionToFootnoteDefinition'](_0x33ea6e){const {plugins:_0x8e669a,editing:_0x5d5f24,model:_0x5cacd8}=this['editor'],_0x2a7d00=_0x8e669a['get'](c)['getFootnote'](_0x33ea6e);return!!_0x2a7d00&&(_0x5cacd8['change'](_0x5cfc21=>{_0x5cfc21['setSelection'](_0x5cfc21['createPositionAt'](_0x2a7d00['definition'],'end'));}),_0x5d5f24['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x4280a6){const {plugins:_0x56a91b,editing:_0x1969ca,model:_0x46f38c}=this['editor'],_0x3c5468=_0x56a91b['get'](c)['getFootnote'](_0x4280a6);return!!_0x3c5468&&(_0x46f38c['change'](_0x5ce831=>{_0x5ce831['setSelection'](_0x3c5468['reference'],'on');}),_0x1969ca['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x333016}=this['editor']['model'],_0x507262=this['editor']['config']['get']('footnotes.multiBlock');_0x333016['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x333016['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x333016['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x507262?_0x333016['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x333016['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x333016['addChildCheck'](_0x561141=>{for(const _0x378f15 of _0x561141)if('footnoteDefinition'===_0x378f15['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x3bc842}=this,{conversion:_0x119e57,editing:_0xbd428f}=_0x3bc842,{t:t}=_0x3bc842['locale'];_0x119e57['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x1c2b3a,{writer:_0x543653,consumable:_0x32f4cb})=>{const _0x1b603f=_0x1c2b3a['getChild'](0x0);if(!_0x1b603f||!_0x1b603f['is']('element','a'))return null;const _0x2cf122=_0x1b603f['getAttribute']('href')||'';if(!_0x2cf122['startsWith']('#'))return null;const _0x44ee78=_0x2cf122['replace'](/^#/,'');if(!_0x44ee78)return null;_0x32f4cb['consume'](_0x1b603f,{'name':!0x0,'attributes':['href']});for(const {item:_0x5d3f7c}of _0xbd428f['view']['createRangeIn'](_0x1b603f))_0x5d3f7c['is']('$textProxy')?_0x32f4cb['consume'](_0x5d3f7c['textNode'],{'name':!0x0}):_0x5d3f7c['is']('element')&&_0x32f4cb['consume'](_0x5d3f7c,{'name':!0x0});return _0x543653['createElement']('footnoteRef',{'footnoteId':_0x44ee78});}}),_0x119e57['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x35cd71,{writer:_0xf2a617})=>g(_0x35cd71,_0xf2a617)}),_0x119e57['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x3e094f,{writer:_0xc6a8ef})=>{const _0x4123f9=_0x3e094f['getAttribute']('footnoteCounter');return _0x1d66b3(g(_0x3e094f,_0xc6a8ef),_0xc6a8ef,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x4123f9)});}});}['_defineDefinitionsConverters'](){const {editor:_0x4ceae3}=this,{t:t}=_0x4ceae3['locale'],{conversion:_0x2cff0b}=_0x4ceae3;_0x2cff0b['for']('upcast')['elementToElement']({'view':{'name':'ol','classes':['footnotes']},'model':'footnotesDefinitions','converterPriority':'high'}),_0x2cff0b['for']('dataDowncast')['elementToElement']({'model':'footnotesDefinitions','view':{'name':'ol','classes':['footnotes']}}),_0x2cff0b['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x2f0554,{writer:_0x270242})=>{const _0x2cdb90=_0x270242['createContainerElement']('div',{'class':'footnotes-wrapper','data-footnotes-list-label':t('Footnotes')},_0x270242['createContainerElement']('ol',{'class':'footnotes'},_0x270242['createSlot']())),_0x20f912=_0x1d66b3(_0x2cdb90,_0x270242,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x270242['setCustomProperty']('footnotesDefinitions',!0x0,_0x20f912),_0x20f912;}});}['_defineDefinitionConverters'](){const {editor:_0x202e51}=this,{conversion:_0x18bbe2,locale:_0x4dfa7b}=_0x202e51,_0x3676fb=_0x202e51['config']['get']('footnotes.multiBlock');_0x18bbe2['for']('upcast')['add'](_0xd2221b=>{_0xd2221b['on']('element:li',(_0x3f2ce0,_0x4110ae,_0x226d02)=>{const _0x9bacf0=_0x4110ae['viewItem'];if(!_0x9bacf0['hasClass']('footnote-definition')||!_0x9bacf0['getAttribute']('id'))return;const _0x525c1f=_0x9bacf0['parent'];if(!_0x525c1f['is']('element','ol')||!_0x525c1f['hasClass']('footnotes'))return;if(!_0x226d02['consumable']['test'](_0x9bacf0,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x197891=_0x226d02['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x9bacf0['getAttribute']('id')});if(!_0x226d02['safeInsert'](_0x197891,_0x4110ae['modelCursor']))return;_0x226d02['consumable']['consume'](_0x9bacf0,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x2ab64b=Array['from'](_0x9bacf0['getChildren']())['find'](_0x2355b9=>_0x2355b9['is']('element')&&_0x2355b9['hasClass']('footnote-content'));for(const _0x46491a of _0x9bacf0['getChildren']())_0x46491a['is']('element')&&(_0x226d02['consumable']['consume'](_0x46491a,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x226d02['consumable']['consume'](_0x46491a,{'name':!0x0,'classes':'footnote-content'}));if(_0x2ab64b){if(_0x3676fb)_0x226d02['convertChildren'](_0x2ab64b,_0x197891);else{const _0x27c3e8=_0x226d02['writer']['createElement']('footnoteInlineContent');_0x226d02['writer']['insert'](_0x27c3e8,_0x197891),_0x226d02['convertChildren'](_0x2ab64b,_0x27c3e8);}}_0x226d02['updateConversionResult'](_0x197891,_0x4110ae);});}),_0x18bbe2['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x6435fa,{writer:_0x1316f7})=>D(_0x6435fa,_0x1316f7,_0x4dfa7b,{'dataPipeline':!0x0})}),_0x18bbe2['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x1b12bc,{writer:_0x4eb3cf})=>D(_0x1b12bc,_0x4eb3cf,_0x4dfa7b)});}['_defineBogusParagraphConverters'](){const {editor:_0x17338b}=this,{conversion:_0xbf0f3d}=_0x17338b;_0x17338b['config']['get']('footnotes.multiBlock')?(_0xbf0f3d['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0xbf0f3d['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x17338b['model']['document'],'change:data',()=>{!function(_0x3282db,_0x49a78a){const _0x237f81=_0x3282db['document']['differ'],_0x4fa7cc=new Set();for(const _0x1de33d of _0x237f81['getChanges']()){const _0x2f9517='attribute'==_0x1de33d['type']?_0x1de33d['range']['start']['parent']:_0x1de33d['position']['parent'];_0x2f9517['is']('element','footnoteDefinition')&&_0x4fa7cc['add'](_0x2f9517);}for(const _0x3301a2 of _0x4fa7cc['values']()){const _0x167a46=Array['from'](_0x3301a2['getChildren']())['filter'](_0x5de2a1=>p(_0x5de2a1,_0x49a78a['mapper']));for(const _0x195558 of _0x167a46)_0x49a78a['reconvertItem'](_0x195558);}}(_0x17338b['model'],_0x17338b['editing']);})):(_0xbf0f3d['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0xbf0f3d['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x13c3ea,{writer:_0x5e5329})=>{const _0x37bf1e=_0x5e5329['createContainerElement']('span');return _0x5e5329['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x37bf1e),_0x37bf1e;}}));}['_defineKeyboardHandlers'](){const {editor:_0x43332e}=this,{editing:_0x545c46,t:t}=_0x43332e,_0x40d986=_0x43332e['model']['document']['selection'];_0x43332e['keystrokes']['set']('CTRL+Alt+D','insertFootnote'),_0x43332e['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+D'}]}),this['listenTo'](_0x545c46['view']['document'],'enter',(_0x22ac27,_0x1f076f)=>{const _0x56d7a9=function(_0x56342e){const _0xbb7f21=_0x56342e['getSelectedElement']();if(_0xbb7f21?.['is']('element','footnoteRef'))return _0xbb7f21;return null;}(_0x40d986);if(_0x56d7a9){const _0x5a6cce=_0x56d7a9['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x5a6cce),_0x1f076f['preventDefault'](),_0x22ac27['stop']();}},{'context':_0x1113c0});}['_defineClickHandlers'](){const {editor:_0x23008d}=this,{editing:_0x311de7}=_0x23008d;_0x23008d['editing']['view']['addObserver'](_0x3cc568),_0x23008d['editing']['view']['addObserver'](_0x33e78b);let _0x4a4684=!0x1;this['listenTo'](_0x311de7['view']['document'],'pointerdown',(_0x369921,_0x12392b)=>{const {target:_0x5e1153}=_0x12392b,_0x2d9bd2=_0x311de7['view']['document']['selection'];_0x4a4684=!(!_0x5e1153['is']('element','sup')||!_0x5e1153['hasClass']('footnote'))&&_0x2d9bd2['getSelectedElement']()===_0x5e1153;},{'priority':'high'}),this['listenTo'](_0x311de7['view']['document'],'click',(_0x4af857,_0x4c9662)=>{const {target:_0x191101}=_0x4c9662,_0x5a6ff4=_0x191101['getChild'](0x0)['getAttribute']('href');this['_moveSelectionToFootnoteDefinition'](_0x5a6ff4['slice'](0x1)),_0x4af857['stop'](),_0x4c9662['preventDefault']();},{'priority':'high','context':_0x6c14=>_0x6c14['is']('element','sup')&&_0x6c14['hasClass']('footnote')&&_0x4a4684}),this['listenTo'](_0x311de7['view']['document'],'click',(_0x189b63,_0x5cc6a2)=>{const {target:_0x3a38be}=_0x5cc6a2;if(!_0x3a38be['is']('element','a'))return;let _0x472940=_0x3a38be['getAttribute']('href');if(!_0x472940?.['startsWith']('#'))return;_0x472940=_0x472940['slice'](0x1);let _0x526e2b=!0x1;(_0x472940['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x472940['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x472940))&&(_0x526e2b=!0x0),_0x526e2b&&(_0x5cc6a2['preventDefault'](),_0x189b63['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x490f19}={}){return(_0x5d78b3,{writer:_0x136b58})=>{if(!h(_0x5d78b3))return null;if(!_0x490f19)return _0x136b58['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x403a6a=_0x136b58['createContainerElement']('p');return _0x136b58['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x403a6a),_0x403a6a;};}function h(_0x591833){const {parent:_0x5f02fe}=_0x591833;if(!_0x5f02fe?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x5f02fe['childCount'])return!0x1;for(const _0x2d3d72 of _0x591833['getAttributeKeys']())if(!_0x2d3d72['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x2d3d72)return!0x1;return!0x0;}function p(_0x342a5e,_0x3b89b7){if(!_0x342a5e['is']('element','paragraph'))return!0x1;const _0xe4026b=_0x3b89b7['toViewElement'](_0x342a5e);return!!_0xe4026b&&h(_0x342a5e)!==_0xe4026b['is']('element','span');}function $(_0x2011c5){return _0x1113c0(_0x2011c5)&&_0x2011c5['is']('containerElement')&&!!_0x2011c5['getCustomProperty']('footnotesDefinitions');}function g(_0x35883b,_0x18b1e0){const _0x41443=_0x35883b['getAttribute']('footnoteId'),_0x3109e5=_0x35883b['getAttribute']('footnoteCounter'),_0x15b32e=_0x18b1e0['createUIElement']('a',{'id':'ref-'+_0x41443,'href':'#'+_0x41443},function(_0x430a55){const _0x33abad=this['toDomElement'](_0x430a55);return _0x33abad['textContent']=_0x3109e5,_0x33abad;}),_0x1d241e=_0x18b1e0['createContainerElement']('sup',{'class':'footnote'},[_0x15b32e]);return _0x1d241e['getFillerOffset']=()=>null,_0x1d241e;}function D(_0x57fa81,_0x504254,_0x4d4bc1,{dataPipeline:_0x4a6002}={}){const {t:t}=_0x4d4bc1,_0x38ae6b=_0x57fa81['getAttribute']('footnoteId'),_0x13d7f3=_0x504254['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x38ae6b},function(_0x1f9a8c){const _0x5adaad=this['toDomElement'](_0x1f9a8c);return _0x5adaad['innerText']='^',_0x5adaad;}),_0x23904c=_0x4a6002?_0x504254['createContainerElement']('div',{'class':'footnote-content'}):_0x8c9828(_0x504254['createEditableElement']('div',{'class':'footnote-content'}),_0x504254,{'label':t('Footnote\x20content.')});return _0x504254['insert'](_0x504254['createPositionAt'](_0x23904c,0x0),_0x504254['createSlot']()),_0x504254['createContainerElement']('li',{'class':'footnote-definition','id':_0x38ae6b},[_0x13d7f3,_0x23904c]);}class e extends _0x3b1d24{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x17c25a];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x18a8ad}=this,{plugins:_0x5203f9,model:_0x3a7f7c}=_0x18a8ad,_0x2bf9c3=_0x5203f9['get'](_0x17c25a),_0x49b375=_0x5203f9['get'](c);this['listenTo'](_0x2bf9c3,'outputTransformation',(_0x46f570,_0x5c32d9)=>{const _0x45b361=function(_0x23bf88,_0x4521ee){const _0x9ccbe7=new Set();for(const {item:_0x349062}of _0x23bf88['createRangeIn'](_0x4521ee))_0x349062['is']('element','footnoteRef')&&_0x9ccbe7['add'](_0x349062['getAttribute']('footnoteId'));return Array['from'](_0x9ccbe7);}(_0x3a7f7c,_0x5c32d9['content']);if(!_0x45b361['length'])return;const _0xc6b74a=_0x49b375['getFootnotes'](),_0x59552d=_0x45b361['reduce']((_0x4bdbd8,_0x2be6d0)=>{const _0x331529=_0xc6b74a['find'](_0xae2dd0=>_0xae2dd0['id']===_0x2be6d0);if(_0x331529){const _0x28e6f8=_0x18a8ad['data']['toView'](_0x331529['definition'],{'isClipboardPipeline':!0x0}),_0x1ea02f=_0x18a8ad['data']['htmlProcessor']['toData'](_0x28e6f8);_0x4bdbd8[_0x331529['id']]=_0x1ea02f;}return _0x4bdbd8;},Object['create'](null));_0x5c32d9['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x59552d));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0xe973ae}=this,{model:_0x24c51b,plugins:_0x4ec452}=_0xe973ae,{view:_0x42ddc9}=_0xe973ae['editing'],_0x4e2647=_0x4ec452['get'](_0x17c25a),_0x1482d6=_0x4ec452['get'](c);let _0x324a01=null;this['listenTo'](_0x42ddc9['document'],'clipboardInput',(_0x12f0a4,_0x57677b)=>{const _0x2af544=_0x57677b['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x324a01=_0x2af544?JSON['parse'](_0x2af544):null;}),this['listenTo'](_0x4e2647,'contentInsertion',(_0x1d7156,_0x1ceead)=>{if(!_0x324a01)return;const _0x1bfa01=_0x1ceead['sourceEditorId']===this['editor']['id'];_0x1bfa01&&'drop'===_0x1ceead['method']||_0x24c51b['change'](_0x5cb514=>{!function(_0x1e7926,_0x53bc7b){const _0x353301=[];for(const {item:_0x46d4af}of _0x1e7926['createRangeIn'](_0x53bc7b))_0x46d4af['is']('element','footnotesDefinitions')&&_0x353301['push'](_0x46d4af);for(const _0x3512cd of _0x353301)_0x1e7926['remove'](_0x3512cd);}(_0x5cb514,_0x1ceead['content']);let _0xa1b664=_0x1482d6['getFootnotesDefinitionsObjectElement']();if(!_0xa1b664){const _0x1c82ba=_0x24c51b['document']['selection']['getFirstRange']()['root'];_0xa1b664=_0x1482d6['_insertEmptyFootnotesDefinitionsContainer'](_0x5cb514,_0x1c82ba);}const _0x1861ee=function(_0x1aa087,_0x2e919f,_0x291937){const _0x2ba7e9=Object['create'](null);for(const {item:_0x284abb}of _0x1aa087['createRangeIn'](_0x2e919f))if(_0x284abb['is']('element','footnoteRef')){const _0x1e645f=_0x284abb['getAttribute']('footnoteId');if(!_0x291937(_0x1e645f))continue;_0x2ba7e9[_0x1e645f]||(_0x2ba7e9[_0x1e645f]=_0x6b1447()),_0x1aa087['setAttribute']('footnoteId',_0x2ba7e9[_0x1e645f],_0x284abb);}return _0x2ba7e9;}(_0x5cb514,_0x1ceead['content'],_0x508ef7=>!_0x1bfa01||null!==_0x1482d6['getFootnote'](_0x508ef7));for(const [_0x37ad27,_0x23b917]of Object['entries'](_0x324a01)){const _0x205659=_0x1861ee[_0x37ad27]||_0x37ad27,_0x568d52=_0x5cb514['createElement']('footnoteDefinition',{'footnoteId':_0x205659}),_0x4f9ad6=_0xe973ae['data']['htmlProcessor']['toView'](_0x23b917),_0x56b054=_0xe973ae['data']['toModel'](_0x4f9ad6,_0x568d52);_0x5cb514['append'](_0x56b054,_0x568d52),_0x5cb514['insert'](_0x568d52,_0xa1b664,'end');}_0x324a01=null;});});}}class i extends _0x3b1d24{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3269ee}=this,{componentFactory:_0x3b0d1f}=_0x3269ee['ui'];_0x3b0d1f['add']('insertFootnote',v(_0x3269ee,_0x5e1e56)),_0x3b0d1f['add']('menuBar:insertFootnote',v(_0x3269ee,_0x129572)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x250031=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x53e515;for(const _0x50c2c7 in _0x250031){const _0x5c0b95=_0x50c2c7,_0x123b36=_0x250031[_0x5c0b95];if('footnotesLicenseKeyValid'==_0x123b36||'footnotesLicenseKeyInvalid'==_0x123b36||'footnotesLicenseKeyExpired'==_0x123b36||'footnotesLicenseKeyDomainLimit'==_0x123b36||'footnotesLicenseKeyNotAllowed'==_0x123b36||'footnotesLicenseKeyEvaluationLimit'==_0x123b36||'footnotesLicenseKeyTrialLimit'==_0x123b36||'footnotesLicenseKeyUsageLimit'==_0x123b36){delete _0x250031[_0x5c0b95],_0x53e515=_0x123b36,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x53e515&&_0x250031['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x53e515&&_0x250031['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x53e515&&_0x250031['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x53e515&&_0x250031['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x53e515&&_0x250031['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0x53e515&&_0x250031['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0x53e515&&_0x250031['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function v(_0x5fd6ba,_0xe42e10){const _0x32ca4c=_0x5fd6ba['commands']['get']('insertFootnote');return _0x318b05=>{const {t:t}=_0x318b05,_0xbe739a=new _0xe42e10(_0x318b05),_0x1bf6a4=_0xbe739a instanceof _0x129572;return _0xbe739a['bind']('isEnabled')['to'](_0x32ca4c,'isEnabled'),_0xbe739a['set']({'label':t(_0x1bf6a4?'Footnote':'Insert\x20footnote'),'icon':_0x1db063,'tooltip':!0x0}),_0xbe739a['on']('execute',()=>{_0x32ca4c['execute'](),_0x5fd6ba['editing']['view']['focus']();}),_0xbe739a;};}class nt extends _0x3b1d24{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const H=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x5ec066{['refresh'](){const {editor:_0x52ad1f}=this,_0x4a6afc=_0x52ad1f['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x4a6afc,this['value']=_0x4a6afc?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0xfb491c}){const {editor:_0xa0f304}=this,_0x13cf50=_0xa0f304['plugins']['get'](c),_0x12efa3=_0x13cf50['getFootnotesDefinitionsObjectElement']();_0x12efa3&&H['includes'](_0xfb491c)&&_0xa0f304['model']['change'](_0x41aedc=>{_0x41aedc['setAttribute']('footnotesListStyle',_0xfb491c,_0x12efa3),_0x13cf50['_updateFootnotesCounters'](_0x41aedc);});}}class b extends _0x5ec066{['refresh'](){const {editor:_0x26bed2}=this,_0x4e0ce6=_0x26bed2['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x4e0ce6,this['value']=_0x4e0ce6?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x2a66c0}){const {editor:_0x43f27e}=this,_0x48dde8=_0x43f27e['plugins']['get'](c),_0x49f0e6=_0x48dde8['getFootnotesDefinitionsObjectElement']();_0x49f0e6&&Number['isInteger'](_0x2a66c0)&&_0x43f27e['model']['change'](_0x2295e7=>{_0x2295e7['setAttribute']('footnotesListStart',_0x2a66c0,_0x49f0e6),_0x48dde8['_updateFootnotesCounters'](_0x2295e7);});}}class P extends _0x3b1d24{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x79d91b}=this;_0x79d91b['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x79d91b['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x79d91b['commands']['add']('footnotesStyle',new S(_0x79d91b)),_0x79d91b['commands']['add']('footnotesStart',new b(_0x79d91b)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x5a3117}=this,{schema:_0x577f1f}=_0x5a3117['model'];_0x577f1f['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x121a3d}=this,{conversion:_0x22e81,model:_0x23437f}=_0x121a3d,{schema:_0x565902}=_0x23437f;_0x22e81['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','styles':{'list-style-type':/.+/}},'model':{'key':'footnotesListStyle','value':_0x108243=>_0x108243['getStyle']('list-style-type')}}),_0x22e81['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','attributes':{'start':/.+/}},'model':{'key':'footnotesListStart','value':_0x434620=>{const _0x210242=_0x434620['getAttribute']('start'),_0x253b27=Number['parseInt'](_0x210242,0xa);return Number['isNaN'](_0x253b27)?null:_0x253b27;}}}),_0x22e81['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','attributes':{'type':/.+/}},'model':{'key':'footnotesListStyle','value':_0xcfa84a=>({0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0xcfa84a['getAttribute']('type')])}}),_0x22e81['for']('upcast')['add'](_0x5c69a1=>{_0x5c69a1['on']('element:ol',(_0x55eb9,_0x217379,_0x3dd3f1)=>{const _0x5740c6=_0x217379['modelRange']?.['start']['nodeAfter'];_0x5740c6?.['is']('element','footnotesDefinitions')&&(!_0x5740c6['hasAttribute']('footnotesListStyle')&&_0x565902['checkAttribute'](_0x5740c6,'footnotesListStyle')&&_0x3dd3f1['writer']['setAttribute']('footnotesListStyle','decimal',_0x5740c6),!_0x5740c6['hasAttribute']('footnotesListStart')&&_0x565902['checkAttribute'](_0x5740c6,'footnotesListStart')&&_0x3dd3f1['writer']['setAttribute']('footnotesListStart',0x1,_0x5740c6));},{'priority':'low'});}),_0x22e81['for']('dataDowncast')['attributeToAttribute']({'model':{'name':'footnotesDefinitions','key':'footnotesListStart'},'view':_0x6a8854=>0x1===_0x6a8854?null:{'key':'start','value':String(_0x6a8854)}}),_0x22e81['for']('dataDowncast')['attributeToAttribute']({'model':{'name':'footnotesDefinitions','key':'footnotesListStyle'},'view':_0x529be2=>'decimal'===_0x529be2?null:{'key':'style','value':{'list-style-type':_0x529be2}}}),_0x22e81['for']('editingDowncast')['add'](_0xd37a1a=>{_0xd37a1a['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x7606d1,_0x5f4d15,_0xaa98f6)=>{if(!_0xaa98f6['consumable']['consume'](_0x5f4d15['item'],_0x7606d1['name']))return;const _0x54d29e=C(_0x5f4d15['item'],_0xaa98f6['mapper']);null===_0x5f4d15['attributeNewValue']||void 0x0===_0x5f4d15['attributeNewValue']||0x1===_0x5f4d15['attributeNewValue']?_0xaa98f6['writer']['removeAttribute']('start',_0x54d29e):_0xaa98f6['writer']['setAttribute']('start',String(_0x5f4d15['attributeNewValue']),_0x54d29e);}),_0xd37a1a['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x3c9c60,_0x2c5377,_0x2a3b3c)=>{if(!_0x2a3b3c['consumable']['consume'](_0x2c5377['item'],_0x3c9c60['name']))return;const _0x2ac6ba=C(_0x2c5377['item'],_0x2a3b3c['mapper']);_0x2c5377['attributeNewValue']&&'decimal'!==_0x2c5377['attributeNewValue']?_0x2a3b3c['writer']['setStyle']('list-style-type',_0x2c5377['attributeNewValue'],_0x2ac6ba):_0x2a3b3c['writer']['removeStyle']('list-style-type',_0x2ac6ba);});});}['_definePostfixer'](){const {editor:_0x39e0d8}=this,{model:_0x49a295}=_0x39e0d8,_0x3825aa=_0x39e0d8['plugins']['get'](c),_0x5c5469=this['_getDefaultListStyle'](),_0xb41c84=this['_getDefaultStartIndex']();_0x49a295['document']['registerPostFixer'](_0x429885=>{const _0x2411f5=_0x49a295['document']['differ']['getChanges']();let _0x14b231=!0x1;for(const _0x337977 of _0x2411f5){if('insert'!==_0x337977['type']||'$text'===_0x337977['name'])continue;const _0x1a0dfb=_0x49a295['createRangeOn'](_0x337977['position']['nodeAfter']);for(const _0x126ca4 of _0x1a0dfb['getItems']())_0x126ca4['is']('element','footnotesDefinitions')&&(_0x126ca4['hasAttribute']('footnotesListStart')||(_0x429885['setAttribute']('footnotesListStart',_0xb41c84,_0x126ca4),_0x14b231=!0x0),_0x126ca4['hasAttribute']('footnotesListStyle')||(_0x429885['setAttribute']('footnotesListStyle',_0x5c5469,_0x126ca4),_0x14b231=!0x0));}return _0x14b231&&_0x3825aa['_updateFootnotesCounters'](_0x429885),_0x14b231;});}['_defineFormatter'](){const {editor:_0x1a5409}=this;_0x1a5409['plugins']['get'](c)['setFootnoteFormatter'](_0x1bdda7=>this['_formatFootnoteListValue'](_0x1bdda7));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x324d15,value:_0x3ff46e,digits:_0x2f8cdf}){const _0xda0130=_0x324d15['getAttribute']('footnotesListStyle'),_0x12909b=_0x324d15['getAttribute']('footnotesListStart'),_0x78b5b3=Math['floor'](_0x3ff46e)+(_0x12909b-0x1);switch(_0xda0130){case'decimal':default:return String(_0x78b5b3);case'decimal-leading-zero':return function(_0x470f33,_0x1dd500){return String(_0x470f33)['padStart'](_0x1dd500,'0');}(_0x78b5b3,Math['max'](0x2,_0x2f8cdf));case'lower-alpha':case'lower-latin':return M(_0x78b5b3,!0x1);case'upper-alpha':case'upper-latin':return M(_0x78b5b3,!0x0);case'lower-roman':return A(_0x78b5b3,!0x1);case'upper-roman':return A(_0x78b5b3,!0x0);}}}function C(_0x4cff85,_0x4b36ca){const _0x34640f=_0x4b36ca['toViewElement'](_0x4cff85);return Array['from'](_0x34640f['getChildren']())['find'](_0x140c75=>_0x140c75['is']('element','ol'));}function M(_0x532586,_0xa8dede){let _0x171e42='',_0xa3d31d=_0x532586;for(;_0xa3d31d>0x0;){const _0x31f04e=(_0xa3d31d-0x1)%0x1a;_0x171e42=String['fromCharCode'](0x61+_0x31f04e)+_0x171e42,_0xa3d31d=Math['floor']((_0xa3d31d-0x1)/0x1a);}return _0xa8dede?_0x171e42['toUpperCase']():_0x171e42;}const X=[{'value':0x3e8,'numeral':'M'},{'value':0x384,'numeral':'CM'},{'value':0x1f4,'numeral':'D'},{'value':0x190,'numeral':'CD'},{'value':0x64,'numeral':'C'},{'value':0x5a,'numeral':'XC'},{'value':0x32,'numeral':'L'},{'value':0x28,'numeral':'XL'},{'value':0xa,'numeral':'X'},{'value':0x9,'numeral':'IX'},{'value':0x5,'numeral':'V'},{'value':0x4,'numeral':'IV'},{'value':0x1,'numeral':'I'}];function A(_0x19af5a,_0x22a864){let _0x3a2a59='',_0x37b101=_0x19af5a;for(const {value:_0x3f90e4,numeral:_0x14a52b}of X)for(;_0x37b101>=_0x3f90e4;)_0x3a2a59+=_0x14a52b,_0x37b101-=_0x3f90e4;return _0x22a864?_0x3a2a59:_0x3a2a59['toLowerCase']();}class R extends _0x580895{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new it();['keystrokes']=new et();['focusables']=new _0x478af2();['focusCycler'];constructor(_0x5cdb60,{styleButtonViews:_0x4c7c33,styleGridAriaLabel:_0x2e7118}){super(_0x5cdb60),(this['focusCycler']=new _0x41b0ac({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x4c7c33,_0x2e7118),[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 _0x14e13b of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x14e13b['element']);_0xb34a6c({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>ot['window']['getComputedStyle'](this['stylesView']['element'])['getPropertyValue']('grid-template-columns')['split']('\x20')['length'],'uiLanguageDirection':this['locale']&&this['locale']['uiLanguageDirection']});}if(this['startIndexFieldView']){this['focusables']['add'](this['startIndexFieldView']),this['focusTracker']['add'](this['startIndexFieldView']['element']);const _0x7e610f=_0xa3c101=>_0xa3c101['stopPropagation']();this['keystrokes']['set']('arrowright',_0x7e610f),this['keystrokes']['set']('arrowleft',_0x7e610f),this['keystrokes']['set']('arrowup',_0x7e610f),this['keystrokes']['set']('arrowdown',_0x7e610f);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x4bb8d4,_0xd4f4f){const _0x506426=new _0x580895(this['locale']);return _0x506426['children']=_0x506426['createCollection'](),_0x506426['children']['addMany'](_0x4bb8d4),_0x506426['setTemplate']({'tag':'div','attributes':{'aria-label':_0xd4f4f,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x506426['children']}),_0x506426['children']['delegate']('execute')['to'](this),_0x506426['focus']=function(){for(const _0x4cc7bc of this['children'])if(_0x4cc7bc instanceof _0x5e1e56&&_0x4cc7bc['isOn'])return void _0x4cc7bc['focus']();this['children']['first']['focus']();},_0x506426['focusTracker']=new it(),_0x506426['keystrokes']=new et(),_0x506426['render'](),_0x506426['keystrokes']['listenTo'](_0x506426['element']),this['children']['add'](_0x506426),_0x506426;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x5120f2=this['_createStartIndexPropertyView'](),_0x4b0f2c=[_0x5120f2],_0x3ed56a=new _0x39e2d5(this['locale'],_0x4b0f2c);return _0x3ed56a['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x3ed56a['buttonView']['bind']('isEnabled')['toMany'](_0x4b0f2c,'isEnabled',(..._0x149cd4)=>_0x149cd4['some'](_0x567a8c=>_0x567a8c)),_0x3ed56a['buttonView']['on']('change:isEnabled',(_0x1d074d,_0x52a744,_0x35f3af)=>{_0x35f3af||(_0x3ed56a['isCollapsed']=!0x0);}),this['children']['add'](_0x3ed56a),[_0x5120f2,_0x3ed56a];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x39c093=new tt(this['locale'],st);return _0x39c093['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x39c093['fieldView']['set']({'min':0x0,'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x39c093['fieldView']['on']('input',()=>{const _0x103149=_0x39c093['fieldView']['element'],_0x5c8799=_0x103149['valueAsNumber'];Number['isNaN'](_0x5c8799)?_0x39c093['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x103149['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x5c8799}):_0x39c093['errorText']=t('Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.');}),_0x39c093;}}class j extends _0x3b1d24{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x329863,_0x444b8c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4ee719}=this,{componentFactory:_0x51d771}=_0x4ee719['ui'];_0x4ee719['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x51d771['add']('footnotesStyle',function(_0x1fd623){return _0x6ab311=>{const {t:t}=_0x6ab311,_0x48af51=_0x1fd623['commands']['get']('footnotesStyle'),_0x5a0eff=_0x3cb9af(_0x6ab311),{buttonView:_0x52b6c8}=_0x5a0eff;return _0x5a0eff['class']='ck-footnotes-styles-dropdown',_0x5a0eff['bind']('isEnabled')['to'](_0x48af51,'isEnabled'),_0x52b6c8['set']({'label':t('Footnotes\x20style'),'icon':_0x1db063,'tooltip':!0x0}),_0x5a0eff['once']('change:isOpen',()=>{const _0x13f2bc=function({editor:_0x3dda48,dropdownView:_0x2de6cb}){const {t:t}=_0x3dda48['locale'],_0x300715=t('Footnotes\x20definitions\x20styles'),_0x227257=function(_0x58c84c){const t=_0x58c84c['locale']['t'],_0x141ce4=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x582374},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x438342},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x457797},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x2a3e63},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x54eae9},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x1d593e}];return _0x141ce4['map'](function(_0x253913){const _0x4e1a21=_0x253913['locale'];return({label:_0x1f1880,icon:_0x18120b,tooltip:_0x94fa80,style:_0x2dfc59})=>{const _0x348a4e=_0x253913['commands']['get']('footnotesStyle'),_0x3336bf=new _0x5e1e56(_0x4e1a21);return _0x3336bf['set']({'label':_0x1f1880,'icon':_0x18120b,'tooltip':_0x94fa80}),_0x3336bf['bind']('isOn')['to'](_0x348a4e,'value',_0xe244b8=>_0xe244b8===_0x2dfc59),_0x3336bf['bind']('isEnabled')['to'](_0x348a4e,'isEnabled'),_0x3336bf['on']('execute',()=>{_0x253913['execute']('footnotesStyle',{'value':_0x2dfc59}),_0x253913['editing']['view']['focus']();}),_0x3336bf;};}(_0x58c84c));}(_0x3dda48),_0x3d7592=new R(_0x3dda48['locale'],{'styleGridAriaLabel':_0x300715,'styleButtonViews':_0x227257});return _0x3d7592['delegate']('execute')['to'](_0x2de6cb),_0x3d7592['on']('footnotesListStart',(_0x378fb6,_0x45f401)=>{_0x3dda48['execute']('footnotesStart',{'value':_0x45f401['startIndex']});}),_0x3d7592;}({'editor':_0x1fd623,'dropdownView':_0x5a0eff});_0x5a0eff['panelView']['children']['add'](_0x13f2bc);}),_0x5a0eff;};}(_0x4ee719));}['afterInit'](){const {editor:_0x33b85a}=this,{t:t}=_0x33b85a['locale'],_0x67517a=_0x33b85a['plugins']['get'](_0x444b8c),{defaultPositions:_0x469132}=_0x4b9f6e;_0x67517a['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x33b85a['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x92041f=>{let _0x4714dd=_0x92041f['getFirstPosition']()?.['parent'];return _0x4714dd?.['is']('$text')&&(_0x4714dd=_0x4714dd['parent']),_0x4714dd?.['is']('element')?_0x4714dd['findAncestor']($):null;},'positions':[_0x469132['southArrowNorth'],_0x469132['southArrowNorthMiddleWest'],_0x469132['southArrowNorthMiddleEast'],_0x469132['southArrowNorthWest'],_0x469132['southArrowNorthEast'],_0x469132['northArrowSouth'],_0x469132['northArrowSouthMiddleWest'],_0x469132['northArrowSouthMiddleEast'],_0x469132['northArrowSouthWest'],_0x469132['northArrowSouthEast'],_0x469132['viewportStickyNorth']]});}}class rt extends _0x3b1d24{static get['pluginName'](){return'FootnotesProperties';}static get['requires'](){return[P,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{nt as Footnotes,e as FootnotesClipboard,r as FootnotesEditing,rt as FootnotesProperties,P as FootnotesPropertiesEditing,j as FootnotesPropertiesUI,b as FootnotesStartCommand,S as FootnotesStyleCommand,c as FootnotesTracker,i as FootnotesUI,w as InsertFootnoteCommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-footnotes",
3
- "version": "0.0.0-nightly-20251019.0",
3
+ "version": "0.0.0-nightly-20251020.0",
4
4
  "description": "The footnotes feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -23,14 +23,14 @@
23
23
  "type": "module",
24
24
  "main": "src/index.js",
25
25
  "dependencies": {
26
- "@ckeditor/ckeditor5-core": "0.0.0-nightly-20251019.0",
27
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251019.0",
28
- "@ckeditor/ckeditor5-engine": "0.0.0-nightly-20251019.0",
29
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251019.0",
30
- "@ckeditor/ckeditor5-widget": "0.0.0-nightly-20251019.0",
31
- "@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-20251019.0",
32
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251019.0",
33
- "ckeditor5": "0.0.0-nightly-20251019.0"
26
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-20251020.0",
27
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251020.0",
28
+ "@ckeditor/ckeditor5-engine": "0.0.0-nightly-20251020.0",
29
+ "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251020.0",
30
+ "@ckeditor/ckeditor5-widget": "0.0.0-nightly-20251020.0",
31
+ "@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-20251020.0",
32
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251020.0",
33
+ "ckeditor5": "0.0.0-nightly-20251020.0"
34
34
  },
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "author": "CKSource (http://cksource.com/)",
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x48d054}from'ckeditor5/src/core.js';import{isWidget as _0x357b00,toWidget as _0x2aaafe,toWidgetEditable as _0x57cba4}from'ckeditor5/src/widget.js';import{uid as _0x32b6ff}from'ckeditor5/src/utils.js';import{PointerObserver as _0x996e0f,ClickObserver as _0x20d56d}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x166390}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x48c789}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x48d054{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x166390];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xe7f06c}=this;_0xe7f06c['config']['define']('footnotes.multiBlock',!0x0),_0xe7f06c['commands']['add']('insertFootnote',new _0x48c789(_0xe7f06c)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x4ecb53){const _0x4bf249=_0x211696([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x58b20f=0x47a28506,_0x5efa2f=0x47a5f3a6^_0x58b20f,_0x2218b9=window[_0x211696([0x44,0x61,0x74,0x65])][_0x211696([0x6e,0x6f,0x77])](),_0x534163=_0x4ecb53[_0x211696([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x177f27=new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35c86b=>{_0x534163[_0x211696([0x6f,0x6e,0x63,0x65])](_0x211696([0x72,0x65,0x61,0x64,0x79]),_0x35c86b);}),_0x206217={[_0x211696([0x6b,0x74,0x79])]:_0x211696([0x45,0x43]),[_0x211696([0x75,0x73,0x65])]:_0x211696([0x73,0x69,0x67]),[_0x211696([0x63,0x72,0x76])]:_0x211696([0x50,0x2d,0x32,0x35,0x36]),[_0x211696([0x78])]:_0x211696([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x211696([0x79])]:_0x211696([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x211696([0x61,0x6c,0x67])]:_0x211696([0x45,0x53,0x32,0x35,0x36])},_0xd98db1=_0x534163[_0x211696([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x211696([0x67,0x65,0x74])](_0x211696([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4b5a8e(){let _0x1b43d2,_0x363a3c=null,_0x5a4b5c=null;try{if(_0xd98db1==_0x211696([0x47,0x50,0x4c]))return _0x211696([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1b43d2=_0x347359(),!_0x1b43d2)return _0x211696([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1b43d2[_0x211696([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5a4b5c=_0x30057a(_0x1b43d2[_0x211696([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1b43d2[_0x211696([0x6a,0x74,0x69])])),await _0x50a46a()?_0x5ca973()?_0x5c44d7()?_0x211696([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x347cc3()?(_0x1b43d2[_0x211696([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x211696([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x363a3c=_0x189c90(_0x211696([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1b43d2[_0x211696([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x211696([0x74,0x72,0x69,0x61,0x6c])&&(_0x363a3c=_0x189c90(_0x211696([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2bea5d()):_0x211696([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x211696([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x211696([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x211696([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5c44d7(){const _0x1f2885=[_0x211696([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x211696([0x74,0x72,0x69,0x61,0x6c])][_0x211696([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1b43d2[_0x211696([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2218b9/0x3e8:0xe10*_0x5efa2f;return _0x1b43d2[_0x211696([0x65,0x78,0x70])]<_0x1f2885;}function _0x5ca973(){const _0x36d2d0=_0x1b43d2[_0x211696([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x36d2d0&&(!!_0x36d2d0[_0x211696([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x211696([0x2a]))||!!_0x36d2d0[_0x211696([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x211696([0x46,0x4f,0x4f])));}function _0x347cc3(){const _0x58b432=_0x1b43d2[_0x211696([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x58b432||0x0==_0x58b432[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x432cb6}=new URL(window[_0x211696([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x58b432[_0x211696([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x432cb6))return!0x0;const _0x6ff667=_0x432cb6[_0x211696([0x73,0x70,0x6c,0x69,0x74])](_0x211696([0x2e]));return _0x58b432[_0x211696([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xfe8549=>_0xfe8549[_0x211696([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x211696([0x2a])))[_0x211696([0x6d,0x61,0x70])](_0x4c3936=>_0x4c3936[_0x211696([0x73,0x70,0x6c,0x69,0x74])](_0x211696([0x2e])))[_0x211696([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x26a1b2=>_0x26a1b2[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x6ff667[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x211696([0x6d,0x61,0x70])](_0x2e06a7=>Array(_0x6ff667[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2e06a7[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x211696([0x66,0x69,0x6c,0x6c])](_0x2e06a7[0x0]===_0x211696([0x2a])?_0x211696([0x2a]):'')[_0x211696([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2e06a7))[_0x211696([0x73,0x6f,0x6d,0x65])](_0x45483c=>_0x6ff667[_0x211696([0x65,0x76,0x65,0x72,0x79])]((_0x19f4fc,_0x1c262e)=>_0x45483c[_0x1c262e]===_0x19f4fc||_0x45483c[_0x1c262e]===_0x211696([0x2a])));}function _0x2bea5d(){return _0x363a3c&&_0x5a4b5c?new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x533837,_0x46939e)=>{_0x363a3c[_0x211696([0x74,0x68,0x65,0x6e])](_0x533837,_0x46939e),_0x5a4b5c[_0x211696([0x74,0x68,0x65,0x6e])](_0x179c5f=>{_0x179c5f!=_0x211696([0x56,0x61,0x6c,0x69,0x64])&&_0x533837(_0x179c5f);},_0x46939e);}):_0x363a3c||_0x5a4b5c||_0x211696([0x56,0x61,0x6c,0x69,0x64]);}}function _0x30057a(_0x2cd7d7,_0xde3dc8){return new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x47c5d5=>{if(_0x52c30f())return _0x47c5d5(_0x211696([0x56,0x61,0x6c,0x69,0x64]));_0x39fa00(),_0x534163[_0x211696([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x211696([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5accc7=!0x1;const _0x383c94=_0x32b6ff();function _0x57cc90(_0x2af93e){return!!_0x2af93e&&(typeof _0x2af93e===_0x211696([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2af93e===_0x211696([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2af93e[_0x211696([0x74,0x68,0x65,0x6e])]===_0x211696([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2af93e[_0x211696([0x63,0x61,0x74,0x63,0x68])]===_0x211696([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xdb7394(_0x1806ec){_0x11d872(_0x1806ec)[_0x211696([0x74,0x68,0x65,0x6e])](_0x181452=>{if(!_0x181452||_0x181452[_0x211696([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x211696([0x6f,0x6b]))return _0x211696([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3a366c(_0x484216(_0x383c94+_0xde3dc8))!=_0x181452[_0x211696([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x211696([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x211696([0x56,0x61,0x6c,0x69,0x64]);})[_0x211696([0x74,0x68,0x65,0x6e])](_0x5e2700=>(_0x36e1ed(),_0x5e2700),()=>{const _0x7eb808=_0xe9ab0a();return null==_0x7eb808?(_0x36e1ed(),_0x211696([0x56,0x61,0x6c,0x69,0x64])):_0x211696(_0x2218b9-_0x7eb808>(0x63ae0106^_0x58b20f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x211696([0x74,0x68,0x65,0x6e])](_0x47c5d5)[_0x211696([0x63,0x61,0x74,0x63,0x68])](()=>{_0x47c5d5(_0x211696([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2ac4ed=0x47946b86^_0x58b20f;function _0x36e1ed(){const _0x5f2f61=_0x211696([0x6c,0x6c,0x63,0x74,0x2d])+_0x3a366c(_0x484216(_0x2cd7d7)),_0x49afbe=_0x4e6433(_0x3a366c(window[_0x211696([0x4d,0x61,0x74,0x68])][_0x211696([0x63,0x65,0x69,0x6c])](_0x2218b9/_0x2ac4ed)));window[_0x211696([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x211696([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5f2f61,_0x49afbe);}function _0xe9ab0a(){const _0x597a95=_0x211696([0x6c,0x6c,0x63,0x74,0x2d])+_0x3a366c(_0x484216(_0x2cd7d7)),_0x2aaa06=window[_0x211696([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x211696([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x597a95);return _0x2aaa06?window[_0x211696([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e6433(_0x2aaa06),0x10)*_0x2ac4ed:null;}function _0x11d872(_0x527c18){return new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x23be5e,_0x14133a)=>{_0x527c18[_0x211696([0x74,0x68,0x65,0x6e])](_0x23be5e,_0x14133a),window[_0x211696([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x14133a,0x47a351c6^_0x58b20f);});}}_0x534163[_0x211696([0x6f,0x6e])](_0x211696([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4031cb,_0x1db5f3)=>{if(_0x1db5f3[0x0]!=_0x2cd7d7)return _0x47c5d5(_0x211696([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1db5f3[0x1]={..._0x1db5f3[0x1],[_0x211696([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x383c94};},{[_0x211696([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x211696([0x68,0x69,0x67,0x68])}),_0x534163[_0x211696([0x6f,0x6e])](_0x211696([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3ff24d=>{_0x57cc90(_0x3ff24d[_0x211696([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5accc7=!0x0,_0xdb7394(_0x3ff24d[_0x211696([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x211696([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x211696([0x6c,0x6f,0x77])}),_0x177f27[_0x211696([0x74,0x68,0x65,0x6e])](()=>{_0x5accc7||_0x47c5d5(_0x211696([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52c30f(){return _0x534163[_0x211696([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x211696([0x76,0x69,0x65,0x77])][_0x211696([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x211696([0x61,0x75,0x74,0x6f]);}function _0x39fa00(){_0x534163[_0x211696([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x211696([0x76,0x69,0x65,0x77])][_0x211696([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x211696([0x61,0x75,0x74,0x6f]);}}function _0x189c90(_0x3ab4c0){const _0x2b1083=[new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x177865=>setTimeout(_0x177865,0x47abbbca^_0x58b20f)),_0x177f27[_0x211696([0x74,0x68,0x65,0x6e])](()=>new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f85ff=>{let _0x36f68c=0x0;_0x534163[_0x211696([0x6d,0x6f,0x64,0x65,0x6c])][_0x211696([0x6f,0x6e])](_0x211696([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2a24c0,_0x4d10a6)=>{_0x4d10a6[0x0][_0x211696([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x36f68c++,_0x36f68c==(0x47a284fe^_0x58b20f)&&(_0x2f85ff(),_0x2a24c0[_0x211696([0x6f,0x66,0x66])]());});}))];return window[_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x211696([0x72,0x61,0x63,0x65])](_0x2b1083)[_0x211696([0x74,0x68,0x65,0x6e])](()=>_0x3ab4c0);}async function _0x382df1(){await _0x177f27,_0x534163[_0x211696([0x6d,0x6f,0x64,0x65,0x6c])][_0x211696([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x28fb3b,_0x534163[_0x211696([0x6d,0x6f,0x64,0x65,0x6c])][_0x211696([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x28fb3b,_0x534163[_0x211696([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x211696([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2c1500(_0x3172ba){const _0x2ae814=_0x454c4b();_0x534163[_0x2ae814]=_0x211696([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3172ba,_0x3172ba!=_0x211696([0x56,0x61,0x6c,0x69,0x64])&&_0x382df1();}function _0x454c4b(){const _0x165f77=window[_0x211696([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x211696([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x211696([0x6e,0x6f,0x77])]())[_0x211696([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x211696([0x2e]),'');let _0x1a90bc=_0x211696([0x75]);for(let _0x10eae3=0x0;_0x10eae3<_0x165f77[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x10eae3+=0x2){let _0x208b7f=window[_0x211696([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x165f77[_0x211696([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x10eae3,_0x10eae3+0x2));_0x208b7f>=_0x4bf249[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x208b7f-=_0x4bf249[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1a90bc+=_0x4bf249[_0x208b7f];}return _0x1a90bc;}function _0x347359(){const _0x30835d=_0xd98db1[_0x211696([0x73,0x70,0x6c,0x69,0x74])](_0x211696([0x2e]));if(0x3!=_0x30835d[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x400c29(_0x30835d[0x1]);function _0x400c29(_0x4c2a83){const _0xc2d9ae=_0x2435fc(_0x4c2a83);return _0xc2d9ae&&_0x256ee8()?_0xc2d9ae:null;function _0x256ee8(){const _0x186a9c=_0xc2d9ae[_0x211696([0x6a,0x74,0x69])],_0x49ee1e=window[_0x211696([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x186a9c[_0x211696([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x186a9c[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x27ac1e={..._0xc2d9ae,[_0x211696([0x6a,0x74,0x69])]:_0x186a9c[_0x211696([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x186a9c[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x27ac1e[_0x211696([0x76,0x63])],_0x484216(_0x27ac1e)==_0x49ee1e;}}}async function _0x50a46a(){let _0x52385b=!0x0;try{const _0x432b9d=_0xd98db1[_0x211696([0x73,0x70,0x6c,0x69,0x74])](_0x211696([0x2e])),[_0x3c5687,_0x5be801,_0x2124ed]=_0x432b9d;return _0x4bd18a(_0x3c5687),await _0xfaa92d(_0x3c5687,_0x5be801,_0x2124ed),_0x52385b;}catch{return!0x1;}function _0x4bd18a(_0x14f35a){const _0x8c0299=_0x2435fc(_0x14f35a);_0x8c0299&&_0x8c0299[_0x211696([0x61,0x6c,0x67])]==_0x211696([0x45,0x53,0x32,0x35,0x36])||(_0x52385b=!0x1);}async function _0xfaa92d(_0x15cf23,_0x3606d3,_0x5caa0a){const _0x48a711=window[_0x211696([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x211696([0x66,0x72,0x6f,0x6d])](_0x1d6870(_0x5caa0a),_0xbc2ce8=>_0xbc2ce8[_0x211696([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1f1d24=new window[(_0x211696([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x211696([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x15cf23+_0x211696([0x2e])+_0x3606d3),_0x4f44d7=window[_0x211696([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x211696([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4f44d7)return;const _0x217429=await _0x4f44d7[_0x211696([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x211696([0x6a,0x77,0x6b]),_0x206217,{[_0x211696([0x6e,0x61,0x6d,0x65])]:_0x211696([0x45,0x43,0x44,0x53,0x41]),[_0x211696([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x211696([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x211696([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4f44d7[_0x211696([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x211696([0x6e,0x61,0x6d,0x65])]:_0x211696([0x45,0x43,0x44,0x53,0x41]),[_0x211696([0x68,0x61,0x73,0x68])]:{[_0x211696([0x6e,0x61,0x6d,0x65])]:_0x211696([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x217429,_0x48a711,_0x1f1d24)||(_0x52385b=!0x1);}}function _0x2435fc(_0x286e67){return _0x286e67[_0x211696([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x211696([0x65,0x79]))?JSON[_0x211696([0x70,0x61,0x72,0x73,0x65])](_0x1d6870(_0x286e67)):null;}function _0x1d6870(_0x4feb56){return window[_0x211696([0x61,0x74,0x6f,0x62])](_0x4feb56[_0x211696([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x211696([0x2b]))[_0x211696([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x211696([0x2f])));}function _0x484216(_0x2c9e46){let _0x414fa5=0x1505;function _0x4ff1a7(_0x1736e5){for(let _0x25f727=0x0;_0x25f727<_0x1736e5[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x25f727++){const _0x463879=_0x1736e5[_0x211696([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x25f727);_0x414fa5=(_0x414fa5<<0x5)+_0x414fa5+_0x463879,_0x414fa5&=_0x414fa5;}}function _0x250790(_0x33816b){Array[_0x211696([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x33816b)?_0x33816b[_0x211696([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x250790):_0x33816b&&typeof _0x33816b==_0x211696([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x211696([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x33816b)[_0x211696([0x73,0x6f,0x72,0x74])]()[_0x211696([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xc57b5a,_0xea83aa])=>{_0x4ff1a7(_0xc57b5a),_0x250790(_0xea83aa);}):_0x4ff1a7(window[_0x211696([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x33816b));}return _0x250790(_0x2c9e46),_0x414fa5>>>0x0;}function _0x3a366c(_0x16cdca){return _0x16cdca[_0x211696([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x211696([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x211696([0x30]));}function _0x4e6433(_0x4c28ab){return _0x4c28ab[_0x211696([0x73,0x70,0x6c,0x69,0x74])]('')[_0x211696([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x211696([0x6a,0x6f,0x69,0x6e])]('');}function _0x28fb3b(){}function _0x211696(_0x15356a){return _0x15356a['map'](_0x397cdb=>String['fromCharCode'](_0x397cdb))['join']('');}_0x2c1500(await _0x4b5a8e());}(this);}['_moveSelectionToFootnoteDefinition'](_0x4ae52b){const {plugins:_0x1703cd,editing:_0x376a1e,model:_0x4daca6}=this['editor'],_0x16f34e=_0x1703cd['get'](_0x166390)['getFootnote'](_0x4ae52b);return!!_0x16f34e&&(_0x4daca6['change'](_0x1045fb=>{_0x1045fb['setSelection'](_0x1045fb['createPositionAt'](_0x16f34e['definition'],'end'));}),_0x376a1e['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x149e90){const {plugins:_0x28dbd9,editing:_0x1af294,model:_0x344453}=this['editor'],_0x598e65=_0x28dbd9['get'](_0x166390)['getFootnote'](_0x149e90);return!!_0x598e65&&(_0x344453['change'](_0x444513=>{_0x444513['setSelection'](_0x598e65['reference'],'on');}),_0x1af294['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x2990f5}=this['editor']['model'],_0x584c2c=this['editor']['config']['get']('footnotes.multiBlock');_0x2990f5['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x2990f5['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x2990f5['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x584c2c?_0x2990f5['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x2990f5['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x2990f5['addChildCheck'](_0x28ea72=>{for(const _0x47d4f8 of _0x28ea72)if('footnoteDefinition'===_0x47d4f8['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x39e6f7}=this,{conversion:_0x87e598,editing:_0x336374}=_0x39e6f7,{t:t}=_0x39e6f7['locale'];_0x87e598['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x327689,{writer:_0x588130,consumable:_0x3d3067})=>{const _0x15a7d5=_0x327689['getChild'](0x0);if(!_0x15a7d5||!_0x15a7d5['is']('element','a'))return null;const _0x4659bc=_0x15a7d5['getAttribute']('href')||'';if(!_0x4659bc['startsWith']('#'))return null;const _0x47cb22=_0x4659bc['replace'](/^#/,'');if(!_0x47cb22)return null;_0x3d3067['consume'](_0x15a7d5,{'name':!0x0,'attributes':['href']});for(const {item:_0xb06e2f}of _0x336374['view']['createRangeIn'](_0x15a7d5))_0xb06e2f['is']('$textProxy')?_0x3d3067['consume'](_0xb06e2f['textNode'],{'name':!0x0}):_0xb06e2f['is']('element')&&_0x3d3067['consume'](_0xb06e2f,{'name':!0x0});return _0x588130['createElement']('footnoteRef',{'footnoteId':_0x47cb22});}}),_0x87e598['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x5980f0,{writer:_0x381aa5})=>g(_0x5980f0,_0x381aa5)}),_0x87e598['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x391e18,{writer:_0x3f2d6d})=>{const _0x50309d=_0x391e18['getAttribute']('footnoteCounter');return _0x2aaafe(g(_0x391e18,_0x3f2d6d),_0x3f2d6d,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x50309d)});}});}['_defineDefinitionsConverters'](){const {editor:_0x17d5cb}=this,{t:t}=_0x17d5cb['locale'],{conversion:_0x2c8a4c}=_0x17d5cb;_0x2c8a4c['for']('upcast')['elementToElement']({'view':{'name':'ol','classes':['footnotes']},'model':'footnotesDefinitions','converterPriority':'high'}),_0x2c8a4c['for']('dataDowncast')['elementToElement']({'model':'footnotesDefinitions','view':{'name':'ol','classes':['footnotes']}}),_0x2c8a4c['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x19429f,{writer:_0x46388b})=>{const _0x44701a=_0x46388b['createContainerElement']('div',{'class':'footnotes-wrapper','data-footnotes-list-label':t('Footnotes')},_0x46388b['createContainerElement']('ol',{'class':'footnotes'},_0x46388b['createSlot']())),_0x4eae6a=_0x2aaafe(_0x44701a,_0x46388b,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x46388b['setCustomProperty']('footnotesDefinitions',!0x0,_0x4eae6a),_0x4eae6a;}});}['_defineDefinitionConverters'](){const {editor:_0x31b212}=this,{conversion:_0x3a7421,locale:_0x36e75f}=_0x31b212,_0x5f228d=_0x31b212['config']['get']('footnotes.multiBlock');_0x3a7421['for']('upcast')['add'](_0x57379f=>{_0x57379f['on']('element:li',(_0x509309,_0x468b1f,_0xe5c634)=>{const _0x52e148=_0x468b1f['viewItem'];if(!_0x52e148['hasClass']('footnote-definition')||!_0x52e148['getAttribute']('id'))return;const _0xcce716=_0x52e148['parent'];if(!_0xcce716['is']('element','ol')||!_0xcce716['hasClass']('footnotes'))return;if(!_0xe5c634['consumable']['test'](_0x52e148,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x44d668=_0xe5c634['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x52e148['getAttribute']('id')});if(!_0xe5c634['safeInsert'](_0x44d668,_0x468b1f['modelCursor']))return;_0xe5c634['consumable']['consume'](_0x52e148,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x5c1673=Array['from'](_0x52e148['getChildren']())['find'](_0x2eafc2=>_0x2eafc2['is']('element')&&_0x2eafc2['hasClass']('footnote-content'));for(const _0x26cfcc of _0x52e148['getChildren']())_0x26cfcc['is']('element')&&(_0xe5c634['consumable']['consume'](_0x26cfcc,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0xe5c634['consumable']['consume'](_0x26cfcc,{'name':!0x0,'classes':'footnote-content'}));if(_0x5c1673){if(_0x5f228d)_0xe5c634['convertChildren'](_0x5c1673,_0x44d668);else{const _0x443837=_0xe5c634['writer']['createElement']('footnoteInlineContent');_0xe5c634['writer']['insert'](_0x443837,_0x44d668),_0xe5c634['convertChildren'](_0x5c1673,_0x443837);}}_0xe5c634['updateConversionResult'](_0x44d668,_0x468b1f);});}),_0x3a7421['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x4acaaf,{writer:_0x2e325})=>D(_0x4acaaf,_0x2e325,_0x36e75f,{'dataPipeline':!0x0})}),_0x3a7421['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x1f0ff0,{writer:_0x20b2c7})=>D(_0x1f0ff0,_0x20b2c7,_0x36e75f)});}['_defineBogusParagraphConverters'](){const {editor:_0x16fc47}=this,{conversion:_0x5f0a0e}=_0x16fc47;_0x16fc47['config']['get']('footnotes.multiBlock')?(_0x5f0a0e['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x5f0a0e['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x16fc47['model']['document'],'change:data',()=>{!function(_0x28c2a2,_0x13a159){const _0x2bc1a6=_0x28c2a2['document']['differ'],_0xb1029a=new Set();for(const _0x5d605f of _0x2bc1a6['getChanges']()){const _0x19a20b='attribute'==_0x5d605f['type']?_0x5d605f['range']['start']['parent']:_0x5d605f['position']['parent'];_0x19a20b['is']('element','footnoteDefinition')&&_0xb1029a['add'](_0x19a20b);}for(const _0x468e26 of _0xb1029a['values']()){const _0x4e08f0=Array['from'](_0x468e26['getChildren']())['filter'](_0x400db8=>p(_0x400db8,_0x13a159['mapper']));for(const _0x52ccab of _0x4e08f0)_0x13a159['reconvertItem'](_0x52ccab);}}(_0x16fc47['model'],_0x16fc47['editing']);})):(_0x5f0a0e['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x5f0a0e['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x442f30,{writer:_0x412b65})=>{const _0x2cb456=_0x412b65['createContainerElement']('span');return _0x412b65['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x2cb456),_0x2cb456;}}));}['_defineKeyboardHandlers'](){const {editor:_0x5884fb}=this,{editing:_0x3be764,t:t}=_0x5884fb,_0x3c3f77=_0x5884fb['model']['document']['selection'];_0x5884fb['keystrokes']['set']('CTRL+Alt+D','insertFootnote'),_0x5884fb['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+D'}]}),this['listenTo'](_0x3be764['view']['document'],'enter',(_0x48081c,_0x2a97df)=>{const _0x7e691d=function(_0x1471c6){const _0x2db472=_0x1471c6['getSelectedElement']();if(_0x2db472?.['is']('element','footnoteRef'))return _0x2db472;return null;}(_0x3c3f77);if(_0x7e691d){const _0xb81df2=_0x7e691d['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0xb81df2),_0x2a97df['preventDefault'](),_0x48081c['stop']();}},{'context':_0x357b00});}['_defineClickHandlers'](){const {editor:_0x4ebe57}=this,{editing:_0x644d6e}=_0x4ebe57;_0x4ebe57['editing']['view']['addObserver'](_0x996e0f),_0x4ebe57['editing']['view']['addObserver'](_0x20d56d);let _0x980b6c=!0x1;this['listenTo'](_0x644d6e['view']['document'],'pointerdown',(_0x46ab22,_0x53f2c8)=>{const {target:_0x35d57a}=_0x53f2c8,_0x13f770=_0x644d6e['view']['document']['selection'];_0x980b6c=!(!_0x35d57a['is']('element','sup')||!_0x35d57a['hasClass']('footnote'))&&_0x13f770['getSelectedElement']()===_0x35d57a;},{'priority':'high'}),this['listenTo'](_0x644d6e['view']['document'],'click',(_0x49a212,_0x54262a)=>{const {target:_0xc319b}=_0x54262a,_0x14f8af=_0xc319b['getChild'](0x0)['getAttribute']('href');this['_moveSelectionToFootnoteDefinition'](_0x14f8af['slice'](0x1)),_0x49a212['stop'](),_0x54262a['preventDefault']();},{'priority':'high','context':_0x38641f=>_0x38641f['is']('element','sup')&&_0x38641f['hasClass']('footnote')&&_0x980b6c}),this['listenTo'](_0x644d6e['view']['document'],'click',(_0x2444a4,_0x25892e)=>{const {target:_0x249083}=_0x25892e;if(!_0x249083['is']('element','a'))return;let _0x142269=_0x249083['getAttribute']('href');if(!_0x142269?.['startsWith']('#'))return;_0x142269=_0x142269['slice'](0x1);let _0x5d242c=!0x1;(_0x142269['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x142269['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x142269))&&(_0x5d242c=!0x0),_0x5d242c&&(_0x25892e['preventDefault'](),_0x2444a4['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x220547}={}){return(_0x47e0ae,{writer:_0x8d40c7})=>{if(!h(_0x47e0ae))return null;if(!_0x220547)return _0x8d40c7['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x3bcf89=_0x8d40c7['createContainerElement']('p');return _0x8d40c7['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x3bcf89),_0x3bcf89;};}function h(_0x133619){const {parent:_0x3fd6e9}=_0x133619;if(!_0x3fd6e9?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x3fd6e9['childCount'])return!0x1;for(const _0x581b0d of _0x133619['getAttributeKeys']())if(!_0x581b0d['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x581b0d)return!0x1;return!0x0;}function p(_0x539292,_0x1c2ae0){if(!_0x539292['is']('element','paragraph'))return!0x1;const _0x5e8410=_0x1c2ae0['toViewElement'](_0x539292);return!!_0x5e8410&&h(_0x539292)!==_0x5e8410['is']('element','span');}export function isFootnotesDefinitionsWidget(_0x1ab180){return _0x357b00(_0x1ab180)&&_0x1ab180['is']('containerElement')&&!!_0x1ab180['getCustomProperty']('footnotesDefinitions');}function g(_0x3a03c0,_0x248975){const _0xb7bea1=_0x3a03c0['getAttribute']('footnoteId'),_0x2e5094=_0x3a03c0['getAttribute']('footnoteCounter'),_0xec23fb=_0x248975['createUIElement']('a',{'id':'ref-'+_0xb7bea1,'href':'#'+_0xb7bea1},function(_0x2c6d87){const _0x40987=this['toDomElement'](_0x2c6d87);return _0x40987['textContent']=_0x2e5094,_0x40987;}),_0x2e75c6=_0x248975['createContainerElement']('sup',{'class':'footnote'},[_0xec23fb]);return _0x2e75c6['getFillerOffset']=()=>null,_0x2e75c6;}function D(_0x54a590,_0x2782c5,_0x3b4bd5,{dataPipeline:_0x2efe11}={}){const {t:t}=_0x3b4bd5,_0x5b7232=_0x54a590['getAttribute']('footnoteId'),_0x15041d=_0x2782c5['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x5b7232},function(_0x10edcc){const _0x338b6b=this['toDomElement'](_0x10edcc);return _0x338b6b['innerText']='^',_0x338b6b;}),_0x27146a=_0x2efe11?_0x2782c5['createContainerElement']('div',{'class':'footnote-content'}):_0x57cba4(_0x2782c5['createEditableElement']('div',{'class':'footnote-content'}),_0x2782c5,{'label':t('Footnote\x20content.')});return _0x2782c5['insert'](_0x2782c5['createPositionAt'](_0x27146a,0x0),_0x2782c5['createSlot']()),_0x2782c5['createContainerElement']('li',{'class':'footnote-definition','id':_0x5b7232},[_0x15041d,_0x27146a]);}
23
+ import{Plugin as _0x59aaa5}from'ckeditor5/src/core.js';import{isWidget as _0x364f45,toWidget as _0x271a21,toWidgetEditable as _0x104408}from'ckeditor5/src/widget.js';import{uid as _0x1e783d}from'ckeditor5/src/utils.js';import{PointerObserver as _0x1eceeb,ClickObserver as _0x413085}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x2d2bb3}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x2caadf}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x59aaa5{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x2d2bb3];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xd34207}=this;_0xd34207['config']['define']('footnotes.multiBlock',!0x0),_0xd34207['commands']['add']('insertFootnote',new _0x2caadf(_0xd34207)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x361928){const _0x3b6388=_0x38dc76([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x147711=0x47a28506,_0x402fbc=0x47a5f3be^_0x147711,_0x450c0c=window[_0x38dc76([0x44,0x61,0x74,0x65])][_0x38dc76([0x6e,0x6f,0x77])](),_0x1317c6=_0x361928[_0x38dc76([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2dd583=new window[(_0x38dc76([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xfabb79=>{_0x1317c6[_0x38dc76([0x6f,0x6e,0x63,0x65])](_0x38dc76([0x72,0x65,0x61,0x64,0x79]),_0xfabb79);}),_0x3e3e1a={[_0x38dc76([0x6b,0x74,0x79])]:_0x38dc76([0x45,0x43]),[_0x38dc76([0x75,0x73,0x65])]:_0x38dc76([0x73,0x69,0x67]),[_0x38dc76([0x63,0x72,0x76])]:_0x38dc76([0x50,0x2d,0x32,0x35,0x36]),[_0x38dc76([0x78])]:_0x38dc76([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x38dc76([0x79])]:_0x38dc76([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x38dc76([0x61,0x6c,0x67])]:_0x38dc76([0x45,0x53,0x32,0x35,0x36])},_0x315b27=_0x1317c6[_0x38dc76([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x38dc76([0x67,0x65,0x74])](_0x38dc76([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x613b1e(){let _0x42d6f7,_0x3381b8=null,_0x1ff7bf=null;try{if(_0x315b27==_0x38dc76([0x47,0x50,0x4c]))return _0x38dc76([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x42d6f7=_0x43c47d(),!_0x42d6f7)return _0x38dc76([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x42d6f7[_0x38dc76([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1ff7bf=_0x253237(_0x42d6f7[_0x38dc76([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x42d6f7[_0x38dc76([0x6a,0x74,0x69])])),await _0x2d96a5()?_0x4e9edf()?_0x300f10()?_0x38dc76([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x150e77()?(_0x42d6f7[_0x38dc76([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x38dc76([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3381b8=_0xac624e(_0x38dc76([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x42d6f7[_0x38dc76([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x38dc76([0x74,0x72,0x69,0x61,0x6c])&&(_0x3381b8=_0xac624e(_0x38dc76([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x25ef99()):_0x38dc76([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x38dc76([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x38dc76([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x38dc76([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x300f10(){const _0x58ffac=[_0x38dc76([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x38dc76([0x74,0x72,0x69,0x61,0x6c])][_0x38dc76([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d6f7[_0x38dc76([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x450c0c/0x3e8:0xe10*_0x402fbc;return _0x42d6f7[_0x38dc76([0x65,0x78,0x70])]<_0x58ffac;}function _0x4e9edf(){const _0x57a17f=_0x42d6f7[_0x38dc76([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x57a17f&&(!!_0x57a17f[_0x38dc76([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38dc76([0x2a]))||!!_0x57a17f[_0x38dc76([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38dc76([0x46,0x4f,0x4f])));}function _0x150e77(){const _0x52e2d2=_0x42d6f7[_0x38dc76([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x52e2d2||0x0==_0x52e2d2[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x398561}=new URL(window[_0x38dc76([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x52e2d2[_0x38dc76([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x398561))return!0x0;const _0x2c2222=_0x398561[_0x38dc76([0x73,0x70,0x6c,0x69,0x74])](_0x38dc76([0x2e]));return _0x52e2d2[_0x38dc76([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x287b09=>_0x287b09[_0x38dc76([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38dc76([0x2a])))[_0x38dc76([0x6d,0x61,0x70])](_0x2e76e3=>_0x2e76e3[_0x38dc76([0x73,0x70,0x6c,0x69,0x74])](_0x38dc76([0x2e])))[_0x38dc76([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x37abba=>_0x37abba[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2c2222[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x38dc76([0x6d,0x61,0x70])](_0x1576c7=>Array(_0x2c2222[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1576c7[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x38dc76([0x66,0x69,0x6c,0x6c])](_0x1576c7[0x0]===_0x38dc76([0x2a])?_0x38dc76([0x2a]):'')[_0x38dc76([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1576c7))[_0x38dc76([0x73,0x6f,0x6d,0x65])](_0xb70a66=>_0x2c2222[_0x38dc76([0x65,0x76,0x65,0x72,0x79])]((_0x1ddfa1,_0x38af1a)=>_0xb70a66[_0x38af1a]===_0x1ddfa1||_0xb70a66[_0x38af1a]===_0x38dc76([0x2a])));}function _0x25ef99(){return _0x3381b8&&_0x1ff7bf?new window[(_0x38dc76([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1c788a,_0x353b3d)=>{_0x3381b8[_0x38dc76([0x74,0x68,0x65,0x6e])](_0x1c788a,_0x353b3d),_0x1ff7bf[_0x38dc76([0x74,0x68,0x65,0x6e])](_0x53cba1=>{_0x53cba1!=_0x38dc76([0x56,0x61,0x6c,0x69,0x64])&&_0x1c788a(_0x53cba1);},_0x353b3d);}):_0x3381b8||_0x1ff7bf||_0x38dc76([0x56,0x61,0x6c,0x69,0x64]);}}function _0x253237(_0x476a73,_0x6dda76){return new window[(_0x38dc76([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2fbefe=>{if(_0x4c257c())return _0x2fbefe(_0x38dc76([0x56,0x61,0x6c,0x69,0x64]));_0x42a124(),_0x1317c6[_0x38dc76([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x38dc76([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xefed58=!0x1;const _0x482bd9=_0x1e783d();function _0x2d3d00(_0x123fdf){return!!_0x123fdf&&(typeof _0x123fdf===_0x38dc76([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x123fdf===_0x38dc76([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x123fdf[_0x38dc76([0x74,0x68,0x65,0x6e])]===_0x38dc76([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x123fdf[_0x38dc76([0x63,0x61,0x74,0x63,0x68])]===_0x38dc76([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x49cb69(_0x5bf9e2){_0x340652(_0x5bf9e2)[_0x38dc76([0x74,0x68,0x65,0x6e])](_0x15ebe9=>{if(!_0x15ebe9||_0x15ebe9[_0x38dc76([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x38dc76([0x6f,0x6b]))return _0x38dc76([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4ec381(_0x154aa5(_0x482bd9+_0x6dda76))!=_0x15ebe9[_0x38dc76([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x38dc76([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x38dc76([0x56,0x61,0x6c,0x69,0x64]);})[_0x38dc76([0x74,0x68,0x65,0x6e])](_0x151fca=>(_0x4945d0(),_0x151fca),()=>{const _0x1f4aaa=_0x41e97f();return null==_0x1f4aaa?(_0x4945d0(),_0x38dc76([0x56,0x61,0x6c,0x69,0x64])):_0x38dc76(_0x450c0c-_0x1f4aaa>(0x63ae0106^_0x147711)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x38dc76([0x74,0x68,0x65,0x6e])](_0x2fbefe)[_0x38dc76([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2fbefe(_0x38dc76([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x500b97=0x47946b86^_0x147711;function _0x4945d0(){const _0x2c2e50=_0x38dc76([0x6c,0x6c,0x63,0x74,0x2d])+_0x4ec381(_0x154aa5(_0x476a73)),_0x33932d=_0x1de745(_0x4ec381(window[_0x38dc76([0x4d,0x61,0x74,0x68])][_0x38dc76([0x63,0x65,0x69,0x6c])](_0x450c0c/_0x500b97)));window[_0x38dc76([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x38dc76([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c2e50,_0x33932d);}function _0x41e97f(){const _0x467f3d=_0x38dc76([0x6c,0x6c,0x63,0x74,0x2d])+_0x4ec381(_0x154aa5(_0x476a73)),_0x1551b7=window[_0x38dc76([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x38dc76([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x467f3d);return _0x1551b7?window[_0x38dc76([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1de745(_0x1551b7),0x10)*_0x500b97:null;}function _0x340652(_0x2d7a54){return new window[(_0x38dc76([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x535192,_0x2c78b5)=>{_0x2d7a54[_0x38dc76([0x74,0x68,0x65,0x6e])](_0x535192,_0x2c78b5),window[_0x38dc76([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2c78b5,0x47a351c6^_0x147711);});}}_0x1317c6[_0x38dc76([0x6f,0x6e])](_0x38dc76([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4103f7,_0x23ccbd)=>{if(_0x23ccbd[0x0]!=_0x476a73)return _0x2fbefe(_0x38dc76([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x23ccbd[0x1]={..._0x23ccbd[0x1],[_0x38dc76([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x482bd9};},{[_0x38dc76([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x38dc76([0x68,0x69,0x67,0x68])}),_0x1317c6[_0x38dc76([0x6f,0x6e])](_0x38dc76([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4ca248=>{_0x2d3d00(_0x4ca248[_0x38dc76([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xefed58=!0x0,_0x49cb69(_0x4ca248[_0x38dc76([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x38dc76([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x38dc76([0x6c,0x6f,0x77])}),_0x2dd583[_0x38dc76([0x74,0x68,0x65,0x6e])](()=>{_0xefed58||_0x2fbefe(_0x38dc76([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4c257c(){return _0x1317c6[_0x38dc76([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x38dc76([0x76,0x69,0x65,0x77])][_0x38dc76([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x38dc76([0x61,0x75,0x74,0x6f]);}function _0x42a124(){_0x1317c6[_0x38dc76([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x38dc76([0x76,0x69,0x65,0x77])][_0x38dc76([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x38dc76([0x61,0x75,0x74,0x6f]);}}function _0xac624e(_0x5ae6c1){const _0x37b1de=[new window[(_0x38dc76([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25b6a2=>setTimeout(_0x25b6a2,0x47abbbca^_0x147711)),_0x2dd583[_0x38dc76([0x74,0x68,0x65,0x6e])](()=>new window[(_0x38dc76([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16d0b4=>{let _0x1a3625=0x0;_0x1317c6[_0x38dc76([0x6d,0x6f,0x64,0x65,0x6c])][_0x38dc76([0x6f,0x6e])](_0x38dc76([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x54a6c8,_0xbbb8fa)=>{_0xbbb8fa[0x0][_0x38dc76([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1a3625++,_0x1a3625==(0x47a284fe^_0x147711)&&(_0x16d0b4(),_0x54a6c8[_0x38dc76([0x6f,0x66,0x66])]());});}))];return window[_0x38dc76([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x38dc76([0x72,0x61,0x63,0x65])](_0x37b1de)[_0x38dc76([0x74,0x68,0x65,0x6e])](()=>_0x5ae6c1);}async function _0x3c0e0e(){await _0x2dd583,_0x1317c6[_0x38dc76([0x6d,0x6f,0x64,0x65,0x6c])][_0x38dc76([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x311b94,_0x1317c6[_0x38dc76([0x6d,0x6f,0x64,0x65,0x6c])][_0x38dc76([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x311b94,_0x1317c6[_0x38dc76([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x38dc76([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x410ac9(_0x51653e){const _0x26f810=_0x562bf4();_0x1317c6[_0x26f810]=_0x38dc76([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x51653e,_0x51653e!=_0x38dc76([0x56,0x61,0x6c,0x69,0x64])&&_0x3c0e0e();}function _0x562bf4(){const _0x1b6fd5=window[_0x38dc76([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x38dc76([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x38dc76([0x6e,0x6f,0x77])]())[_0x38dc76([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x38dc76([0x2e]),'');let _0x45f4e0=_0x38dc76([0x75]);for(let _0x3ccef3=0x0;_0x3ccef3<_0x1b6fd5[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3ccef3+=0x2){let _0x52c53d=window[_0x38dc76([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b6fd5[_0x38dc76([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3ccef3,_0x3ccef3+0x2));_0x52c53d>=_0x3b6388[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x52c53d-=_0x3b6388[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x45f4e0+=_0x3b6388[_0x52c53d];}return _0x45f4e0;}function _0x43c47d(){const _0xe856de=_0x315b27[_0x38dc76([0x73,0x70,0x6c,0x69,0x74])](_0x38dc76([0x2e]));if(0x3!=_0xe856de[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2db4d2(_0xe856de[0x1]);function _0x2db4d2(_0x181206){const _0x12f17a=_0x40f600(_0x181206);return _0x12f17a&&_0x31db93()?_0x12f17a:null;function _0x31db93(){const _0x13b13a=_0x12f17a[_0x38dc76([0x6a,0x74,0x69])],_0x9cef7b=window[_0x38dc76([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x13b13a[_0x38dc76([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x13b13a[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4eb96e={..._0x12f17a,[_0x38dc76([0x6a,0x74,0x69])]:_0x13b13a[_0x38dc76([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x13b13a[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4eb96e[_0x38dc76([0x76,0x63])],_0x154aa5(_0x4eb96e)==_0x9cef7b;}}}async function _0x2d96a5(){let _0x554114=!0x0;try{const _0x29d45f=_0x315b27[_0x38dc76([0x73,0x70,0x6c,0x69,0x74])](_0x38dc76([0x2e])),[_0x259ac6,_0x53b5b0,_0x555897]=_0x29d45f;return _0x67b3b6(_0x259ac6),await _0x1d78cb(_0x259ac6,_0x53b5b0,_0x555897),_0x554114;}catch{return!0x1;}function _0x67b3b6(_0x587c80){const _0x16c99f=_0x40f600(_0x587c80);_0x16c99f&&_0x16c99f[_0x38dc76([0x61,0x6c,0x67])]==_0x38dc76([0x45,0x53,0x32,0x35,0x36])||(_0x554114=!0x1);}async function _0x1d78cb(_0x1e7345,_0x1153a2,_0x252fb7){const _0x1c7013=window[_0x38dc76([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x38dc76([0x66,0x72,0x6f,0x6d])](_0x254114(_0x252fb7),_0x48b06b=>_0x48b06b[_0x38dc76([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5cce3b=new window[(_0x38dc76([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x38dc76([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1e7345+_0x38dc76([0x2e])+_0x1153a2),_0x4265fa=window[_0x38dc76([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x38dc76([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4265fa)return;const _0x22308a=await _0x4265fa[_0x38dc76([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x38dc76([0x6a,0x77,0x6b]),_0x3e3e1a,{[_0x38dc76([0x6e,0x61,0x6d,0x65])]:_0x38dc76([0x45,0x43,0x44,0x53,0x41]),[_0x38dc76([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x38dc76([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x38dc76([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4265fa[_0x38dc76([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x38dc76([0x6e,0x61,0x6d,0x65])]:_0x38dc76([0x45,0x43,0x44,0x53,0x41]),[_0x38dc76([0x68,0x61,0x73,0x68])]:{[_0x38dc76([0x6e,0x61,0x6d,0x65])]:_0x38dc76([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x22308a,_0x1c7013,_0x5cce3b)||(_0x554114=!0x1);}}function _0x40f600(_0x5e6510){return _0x5e6510[_0x38dc76([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x38dc76([0x65,0x79]))?JSON[_0x38dc76([0x70,0x61,0x72,0x73,0x65])](_0x254114(_0x5e6510)):null;}function _0x254114(_0x27859f){return window[_0x38dc76([0x61,0x74,0x6f,0x62])](_0x27859f[_0x38dc76([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x38dc76([0x2b]))[_0x38dc76([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x38dc76([0x2f])));}function _0x154aa5(_0x5f4aec){let _0x509765=0x1505;function _0x1e33ae(_0xff5d3){for(let _0x511003=0x0;_0x511003<_0xff5d3[_0x38dc76([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x511003++){const _0x6895bb=_0xff5d3[_0x38dc76([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x511003);_0x509765=(_0x509765<<0x5)+_0x509765+_0x6895bb,_0x509765&=_0x509765;}}function _0x2712fa(_0x20d98c){Array[_0x38dc76([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x20d98c)?_0x20d98c[_0x38dc76([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2712fa):_0x20d98c&&typeof _0x20d98c==_0x38dc76([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x38dc76([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x20d98c)[_0x38dc76([0x73,0x6f,0x72,0x74])]()[_0x38dc76([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xb5a77,_0x2d5bed])=>{_0x1e33ae(_0xb5a77),_0x2712fa(_0x2d5bed);}):_0x1e33ae(window[_0x38dc76([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x20d98c));}return _0x2712fa(_0x5f4aec),_0x509765>>>0x0;}function _0x4ec381(_0x2f1b06){return _0x2f1b06[_0x38dc76([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x38dc76([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x38dc76([0x30]));}function _0x1de745(_0x2399e2){return _0x2399e2[_0x38dc76([0x73,0x70,0x6c,0x69,0x74])]('')[_0x38dc76([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x38dc76([0x6a,0x6f,0x69,0x6e])]('');}function _0x311b94(){}function _0x38dc76(_0x2375eb){return _0x2375eb['map'](_0x3a79a6=>String['fromCharCode'](_0x3a79a6))['join']('');}_0x410ac9(await _0x613b1e());}(this);}['_moveSelectionToFootnoteDefinition'](_0x224bb0){const {plugins:_0x3df9ee,editing:_0xc1a8d5,model:_0x18fecb}=this['editor'],_0x1773c9=_0x3df9ee['get'](_0x2d2bb3)['getFootnote'](_0x224bb0);return!!_0x1773c9&&(_0x18fecb['change'](_0x2d7fef=>{_0x2d7fef['setSelection'](_0x2d7fef['createPositionAt'](_0x1773c9['definition'],'end'));}),_0xc1a8d5['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x316eff){const {plugins:_0x51f1bd,editing:_0x87af92,model:_0x4727d4}=this['editor'],_0x6d7659=_0x51f1bd['get'](_0x2d2bb3)['getFootnote'](_0x316eff);return!!_0x6d7659&&(_0x4727d4['change'](_0x57ac76=>{_0x57ac76['setSelection'](_0x6d7659['reference'],'on');}),_0x87af92['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x3de017}=this['editor']['model'],_0x357e33=this['editor']['config']['get']('footnotes.multiBlock');_0x3de017['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x3de017['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x3de017['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x357e33?_0x3de017['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x3de017['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x3de017['addChildCheck'](_0x26fe5f=>{for(const _0x48d00b of _0x26fe5f)if('footnoteDefinition'===_0x48d00b['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x25fbd}=this,{conversion:_0x378414,editing:_0x77181e}=_0x25fbd,{t:t}=_0x25fbd['locale'];_0x378414['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x4bd872,{writer:_0x4c0f8f,consumable:_0x3b874b})=>{const _0x23062c=_0x4bd872['getChild'](0x0);if(!_0x23062c||!_0x23062c['is']('element','a'))return null;const _0x3a6c94=_0x23062c['getAttribute']('href')||'';if(!_0x3a6c94['startsWith']('#'))return null;const _0x672803=_0x3a6c94['replace'](/^#/,'');if(!_0x672803)return null;_0x3b874b['consume'](_0x23062c,{'name':!0x0,'attributes':['href']});for(const {item:_0x5cdd17}of _0x77181e['view']['createRangeIn'](_0x23062c))_0x5cdd17['is']('$textProxy')?_0x3b874b['consume'](_0x5cdd17['textNode'],{'name':!0x0}):_0x5cdd17['is']('element')&&_0x3b874b['consume'](_0x5cdd17,{'name':!0x0});return _0x4c0f8f['createElement']('footnoteRef',{'footnoteId':_0x672803});}}),_0x378414['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x3e9289,{writer:_0x46d905})=>g(_0x3e9289,_0x46d905)}),_0x378414['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x388237,{writer:_0x2b124f})=>{const _0x161d5c=_0x388237['getAttribute']('footnoteCounter');return _0x271a21(g(_0x388237,_0x2b124f),_0x2b124f,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x161d5c)});}});}['_defineDefinitionsConverters'](){const {editor:_0x18e79b}=this,{t:t}=_0x18e79b['locale'],{conversion:_0x51a46c}=_0x18e79b;_0x51a46c['for']('upcast')['elementToElement']({'view':{'name':'ol','classes':['footnotes']},'model':'footnotesDefinitions','converterPriority':'high'}),_0x51a46c['for']('dataDowncast')['elementToElement']({'model':'footnotesDefinitions','view':{'name':'ol','classes':['footnotes']}}),_0x51a46c['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x2755c4,{writer:_0x529c60})=>{const _0x1656f9=_0x529c60['createContainerElement']('div',{'class':'footnotes-wrapper','data-footnotes-list-label':t('Footnotes')},_0x529c60['createContainerElement']('ol',{'class':'footnotes'},_0x529c60['createSlot']())),_0x1e171c=_0x271a21(_0x1656f9,_0x529c60,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x529c60['setCustomProperty']('footnotesDefinitions',!0x0,_0x1e171c),_0x1e171c;}});}['_defineDefinitionConverters'](){const {editor:_0x2a28d1}=this,{conversion:_0x4d54d5,locale:_0x103e99}=_0x2a28d1,_0x1a75be=_0x2a28d1['config']['get']('footnotes.multiBlock');_0x4d54d5['for']('upcast')['add'](_0x36f524=>{_0x36f524['on']('element:li',(_0xf3fec7,_0x4078fc,_0x398a08)=>{const _0x2ff01a=_0x4078fc['viewItem'];if(!_0x2ff01a['hasClass']('footnote-definition')||!_0x2ff01a['getAttribute']('id'))return;const _0x1a90c5=_0x2ff01a['parent'];if(!_0x1a90c5['is']('element','ol')||!_0x1a90c5['hasClass']('footnotes'))return;if(!_0x398a08['consumable']['test'](_0x2ff01a,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x199d00=_0x398a08['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x2ff01a['getAttribute']('id')});if(!_0x398a08['safeInsert'](_0x199d00,_0x4078fc['modelCursor']))return;_0x398a08['consumable']['consume'](_0x2ff01a,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x3a6bdb=Array['from'](_0x2ff01a['getChildren']())['find'](_0x1170af=>_0x1170af['is']('element')&&_0x1170af['hasClass']('footnote-content'));for(const _0x4b7b19 of _0x2ff01a['getChildren']())_0x4b7b19['is']('element')&&(_0x398a08['consumable']['consume'](_0x4b7b19,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x398a08['consumable']['consume'](_0x4b7b19,{'name':!0x0,'classes':'footnote-content'}));if(_0x3a6bdb){if(_0x1a75be)_0x398a08['convertChildren'](_0x3a6bdb,_0x199d00);else{const _0x39bc6d=_0x398a08['writer']['createElement']('footnoteInlineContent');_0x398a08['writer']['insert'](_0x39bc6d,_0x199d00),_0x398a08['convertChildren'](_0x3a6bdb,_0x39bc6d);}}_0x398a08['updateConversionResult'](_0x199d00,_0x4078fc);});}),_0x4d54d5['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x4956b2,{writer:_0x54a3a5})=>D(_0x4956b2,_0x54a3a5,_0x103e99,{'dataPipeline':!0x0})}),_0x4d54d5['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x580b72,{writer:_0x36013f})=>D(_0x580b72,_0x36013f,_0x103e99)});}['_defineBogusParagraphConverters'](){const {editor:_0x21bda6}=this,{conversion:_0x5b79b7}=_0x21bda6;_0x21bda6['config']['get']('footnotes.multiBlock')?(_0x5b79b7['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x5b79b7['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x21bda6['model']['document'],'change:data',()=>{!function(_0x169ee3,_0x4994e1){const _0x824178=_0x169ee3['document']['differ'],_0x2da68e=new Set();for(const _0xec4895 of _0x824178['getChanges']()){const _0x1bf229='attribute'==_0xec4895['type']?_0xec4895['range']['start']['parent']:_0xec4895['position']['parent'];_0x1bf229['is']('element','footnoteDefinition')&&_0x2da68e['add'](_0x1bf229);}for(const _0x401377 of _0x2da68e['values']()){const _0x530c08=Array['from'](_0x401377['getChildren']())['filter'](_0x49da12=>p(_0x49da12,_0x4994e1['mapper']));for(const _0x233785 of _0x530c08)_0x4994e1['reconvertItem'](_0x233785);}}(_0x21bda6['model'],_0x21bda6['editing']);})):(_0x5b79b7['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x5b79b7['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x5d76f5,{writer:_0x3c5da8})=>{const _0x1a2f32=_0x3c5da8['createContainerElement']('span');return _0x3c5da8['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x1a2f32),_0x1a2f32;}}));}['_defineKeyboardHandlers'](){const {editor:_0x290ab3}=this,{editing:_0x5518b1,t:t}=_0x290ab3,_0x24412e=_0x290ab3['model']['document']['selection'];_0x290ab3['keystrokes']['set']('CTRL+Alt+D','insertFootnote'),_0x290ab3['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+D'}]}),this['listenTo'](_0x5518b1['view']['document'],'enter',(_0x339fb6,_0x1c61af)=>{const _0xb36089=function(_0x489802){const _0x596b23=_0x489802['getSelectedElement']();if(_0x596b23?.['is']('element','footnoteRef'))return _0x596b23;return null;}(_0x24412e);if(_0xb36089){const _0x3159e8=_0xb36089['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x3159e8),_0x1c61af['preventDefault'](),_0x339fb6['stop']();}},{'context':_0x364f45});}['_defineClickHandlers'](){const {editor:_0x1c628f}=this,{editing:_0x1d214f}=_0x1c628f;_0x1c628f['editing']['view']['addObserver'](_0x1eceeb),_0x1c628f['editing']['view']['addObserver'](_0x413085);let _0x1f70f8=!0x1;this['listenTo'](_0x1d214f['view']['document'],'pointerdown',(_0x2b2a8f,_0x225ab1)=>{const {target:_0x3f4e91}=_0x225ab1,_0x567de0=_0x1d214f['view']['document']['selection'];_0x1f70f8=!(!_0x3f4e91['is']('element','sup')||!_0x3f4e91['hasClass']('footnote'))&&_0x567de0['getSelectedElement']()===_0x3f4e91;},{'priority':'high'}),this['listenTo'](_0x1d214f['view']['document'],'click',(_0x2101cc,_0x3f0076)=>{const {target:_0x8bd8a3}=_0x3f0076,_0x7fced6=_0x8bd8a3['getChild'](0x0)['getAttribute']('href');this['_moveSelectionToFootnoteDefinition'](_0x7fced6['slice'](0x1)),_0x2101cc['stop'](),_0x3f0076['preventDefault']();},{'priority':'high','context':_0x33a359=>_0x33a359['is']('element','sup')&&_0x33a359['hasClass']('footnote')&&_0x1f70f8}),this['listenTo'](_0x1d214f['view']['document'],'click',(_0x39f144,_0x2ce7e8)=>{const {target:_0x234fcf}=_0x2ce7e8;if(!_0x234fcf['is']('element','a'))return;let _0x1104aa=_0x234fcf['getAttribute']('href');if(!_0x1104aa?.['startsWith']('#'))return;_0x1104aa=_0x1104aa['slice'](0x1);let _0x7cd35a=!0x1;(_0x1104aa['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x1104aa['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x1104aa))&&(_0x7cd35a=!0x0),_0x7cd35a&&(_0x2ce7e8['preventDefault'](),_0x39f144['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x5eb943}={}){return(_0x4dfa06,{writer:_0x20c8ad})=>{if(!h(_0x4dfa06))return null;if(!_0x5eb943)return _0x20c8ad['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x2c8858=_0x20c8ad['createContainerElement']('p');return _0x20c8ad['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x2c8858),_0x2c8858;};}function h(_0x133e81){const {parent:_0x7d3d97}=_0x133e81;if(!_0x7d3d97?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x7d3d97['childCount'])return!0x1;for(const _0x3a02a1 of _0x133e81['getAttributeKeys']())if(!_0x3a02a1['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x3a02a1)return!0x1;return!0x0;}function p(_0x230ef9,_0x5bf04a){if(!_0x230ef9['is']('element','paragraph'))return!0x1;const _0x20d6f2=_0x5bf04a['toViewElement'](_0x230ef9);return!!_0x20d6f2&&h(_0x230ef9)!==_0x20d6f2['is']('element','span');}export function isFootnotesDefinitionsWidget(_0x23eb2f){return _0x364f45(_0x23eb2f)&&_0x23eb2f['is']('containerElement')&&!!_0x23eb2f['getCustomProperty']('footnotesDefinitions');}function g(_0x15d707,_0x1d98ce){const _0x5ef047=_0x15d707['getAttribute']('footnoteId'),_0x2e8b0f=_0x15d707['getAttribute']('footnoteCounter'),_0x192e32=_0x1d98ce['createUIElement']('a',{'id':'ref-'+_0x5ef047,'href':'#'+_0x5ef047},function(_0x1467fe){const _0x640ecb=this['toDomElement'](_0x1467fe);return _0x640ecb['textContent']=_0x2e8b0f,_0x640ecb;}),_0x41e6d9=_0x1d98ce['createContainerElement']('sup',{'class':'footnote'},[_0x192e32]);return _0x41e6d9['getFillerOffset']=()=>null,_0x41e6d9;}function D(_0x380faf,_0x1a41d5,_0x2df8c8,{dataPipeline:_0x399ffb}={}){const {t:t}=_0x2df8c8,_0x5320e5=_0x380faf['getAttribute']('footnoteId'),_0x45832e=_0x1a41d5['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x5320e5},function(_0x3a3600){const _0x492d30=this['toDomElement'](_0x3a3600);return _0x492d30['innerText']='^',_0x492d30;}),_0x472bce=_0x399ffb?_0x1a41d5['createContainerElement']('div',{'class':'footnote-content'}):_0x104408(_0x1a41d5['createEditableElement']('div',{'class':'footnote-content'}),_0x1a41d5,{'label':t('Footnote\x20content.')});return _0x1a41d5['insert'](_0x1a41d5['createPositionAt'](_0x472bce,0x0),_0x1a41d5['createSlot']()),_0x1a41d5['createContainerElement']('li',{'class':'footnote-definition','id':_0x5320e5},[_0x45832e,_0x472bce]);}