@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251018.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:1760745600;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 _0x5dd69c,Command as _0x1159f6}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x40f775,isWidget as _0x52dc53,toWidgetEditable as _0x572824,WidgetToolbarRepository as _0x121d00}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x4970a6,logWarning as _0x1e6eca,FocusTracker as it,KeystrokeHandler as et,global as ot}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x2a6255,ClickObserver as _0x1281d6}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x4a149c}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x158f1a,ButtonView as _0x4f7301,View as _0x5e6fbf,ViewCollection as _0x5f3227,FocusCycler as _0x2f996f,addKeyboardHandlingForGrid as _0x1fa4bf,CollapsibleView as _0x42bd83,LabeledFieldView as tt,createLabeledInputNumber as st,ContextualBalloon as _0x369595,BalloonPanelView as _0x52e42a,createDropdown as _0x24d4ee}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x242f94,IconListStyleDecimal as _0x3b2851,IconListStyleDecimalLeadingZero as _0x1c38c6,IconListStyleLowerRoman as _0x5a7599,IconListStyleUpperRoman as _0x3a4c8d,IconListStyleLowerLatin as _0x24244e,IconListStyleUpperLatin as _0xea279a}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x3a1239,_0x1b532a){this['_model']=_0x3a1239,this['_elementName']=_0x1b532a['elementName'],this['_getElementKey']=_0x1b532a['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x2411b2){const _0x772747=new Set(),_0x337039=new Map();for(const _0x1107d0 of _0x2411b2){if('insert'===_0x1107d0['type']&&'$text'!==_0x1107d0['name']&&_0x1107d0['position']['nodeAfter']){const _0x519c70=this['_model']['createRangeOn'](_0x1107d0['position']['nodeAfter']);for(const _0x3dee1b of _0x519c70['getItems']()){if(!_0x3dee1b['is']('element',this['_elementName']))continue;const _0x4f37a0=this['_getElementKey'](_0x3dee1b);_0x337039['has'](_0x4f37a0)||_0x337039['set'](_0x4f37a0,[]),_0x337039['get'](_0x4f37a0)['push'](_0x3dee1b);}}if('remove'===_0x1107d0['type']&&_0x1107d0['name']===this['_elementName']){const _0x828b3c=this['_getElementKey']({'getAttribute':_0x478862=>_0x1107d0['attributes']['get'](_0x478862)});_0x772747['add'](_0x828b3c);}}for(const [_0x5b45cd,_0x114cd3]of this['_trackedElements'])'$graveyard'===_0x114cd3['root']['rootName']&&_0x772747['add'](_0x5b45cd);for(const _0x307d3c of _0x772747)this['_trackedElements']['delete'](_0x307d3c);for(const [_0x2ec62c,_0x1c087f]of _0x337039)this['_trackedElements']['set'](_0x2ec62c,_0x1c087f[_0x1c087f['length']-0x1]);const _0x3c2276=new Set();for(const [_0x59a229,_0x3c87ce]of _0x337039)_0x772747['has'](_0x59a229)&&(_0x3c2276['add'](_0x3c87ce[0x0]),_0x3c87ce['length']>0x1?_0x337039['set'](_0x59a229,_0x3c87ce['slice'](0x1)):_0x337039['delete'](_0x59a229),_0x772747['delete'](_0x59a229));return{'removed':Array['from'](_0x772747),'inserted':Array['from'](_0x337039['values']())['flat'](),'moved':Array['from'](_0x3c2276)};}}class c extends _0x5dd69c{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e6721){super(_0x1e6721),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x341fe4=>_0x341fe4['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x3edd74=>_0x3edd74['getAttribute']('footnoteId')});}['init'](){const {editor:_0x2e1e3d}=this,{model:_0x3e7087,data:_0x2a00ff}=_0x2e1e3d;_0x3e7087['document']['registerPostFixer'](_0x411c6b=>{const _0xa333ec=_0x3e7087['document']['differ']['getChanges']();let _0x1fc7c9=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x411c6b,_0xa333ec)&&(_0x1fc7c9=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x411c6b,_0xa333ec)&&(_0x1fc7c9=!0x0),this['_handleFootnoteReferencesChanges'](_0x411c6b,_0xa333ec)&&(_0x1fc7c9=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x411c6b)&&(_0x1fc7c9=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x411c6b)&&(_0x1fc7c9=!0x0),this['_sortFootnoteDefinitions'](_0x411c6b)&&(_0x1fc7c9=!0x0),_0x1fc7c9;}),this['listenTo'](_0x3e7087['document'],'change:data',()=>{_0x3e7087['enqueueChange']({'isUndoable':!0x1},_0x466111=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x466111);});},{'priority':'low'}),this['listenTo'](_0x2a00ff,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x5b901e){return this['_footnotes']['find'](_0x36a185=>_0x36a185['id']===_0x5b901e)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x50d837){this['_footnoteFormatter']=_0x50d837;}['_updateFootnotesCounters'](_0x45370d,_0x2ba7be=0x0){let _0x307b52=!0x1;for(let _0x5398d3=_0x2ba7be;_0x5398d3<this['_footnotes']['length'];_0x5398d3++)this['_updateFootnoteRefCounter'](_0x45370d,_0x5398d3)&&(_0x307b52=!0x0);return _0x307b52;}['_insertEmptyFootnotesDefinitionsContainer'](_0x4d88e0,_0x37e658){const _0x512700=_0x4d88e0['createElement']('footnotesDefinitions',{});return _0x4d88e0['append'](_0x512700,_0x37e658),this['_footnotesDefinitions']=_0x512700,_0x512700;}['_ensureFootnotesDefinitionsContainerExists'](_0x16bf6b){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x52f853=this['_footnotes'][0x0]['reference']['root'],_0x533886=this['_insertEmptyFootnotesDefinitionsContainer'](_0x16bf6b,_0x52f853);for(const _0x42c7eb of this['_footnotes'])_0x42c7eb['definition']['parent']||_0x16bf6b['insert'](_0x42c7eb['definition'],_0x533886,'end');this['_updateFootnotesCounters'](_0x16bf6b);}['_handleFootnotesDefinitionsObjectChanges'](_0x2b71a1,_0x365ae1){let _0x31e693=!0x1;const {inserted:_0x3887f3,removed:_0x2b15d4,moved:_0x2db8ae}=this['_footnoteDefsContainerTracker']['getChanges'](_0x365ae1);if(_0x2db8ae['length']&&(this['_footnotesDefinitions']=_0x2db8ae[0x0]),_0x3887f3['length']){if(_0x3887f3['length']>0x1||this['_footnotesDefinitions']&&_0x3887f3['some'](_0x1741b5=>_0x1741b5!==this['_footnotesDefinitions'])){const _0x4f6fa1=_0x2b71a1['createElement']('footnotesDefinitions',{}),_0x15cbba=[];this['_footnotesDefinitions']&&_0x15cbba['push'](this['_footnotesDefinitions']),_0x15cbba['push'](..._0x3887f3),_0x2b71a1['insert'](_0x4f6fa1,_0x15cbba[0x0],'before');for(const _0x44b47b of _0x15cbba)_0x2b71a1['move'](_0x2b71a1['createRangeIn'](_0x44b47b),_0x2b71a1['createPositionAt'](_0x4f6fa1,'end')),_0x2b71a1['remove'](_0x44b47b);this['_footnotesDefinitions']=_0x4f6fa1,this['_updateFootnotesCounters'](_0x2b71a1),_0x31e693=!0x0;}else this['_footnotesDefinitions']=_0x3887f3[0x0];}if(_0x2b15d4['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x54ccec of this['_footnotes'])_0x2b71a1['remove'](_0x54ccec['reference']),_0x31e693=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x31e693;}['_handleFootnoteDefinitionsChanges'](_0x1d4207,_0x5d6f91){let _0x3c1bf0=!0x1;const _0x26cf5d=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x3358f3,moved:_0x347082}=this['_footnoteDefsTracker']['getChanges'](_0x5d6f91);for(const _0x26e578 of[..._0x347082,..._0x3358f3]){const _0x446f49=_0x26e578['getAttribute']('footnoteId'),_0x4cfea7=this['getFootnote'](_0x446f49);_0x4cfea7&&(_0x4cfea7['definition']=_0x26e578),_(_0x1d4207,_0x26cf5d,_0x26e578)&&(_0x3c1bf0=!0x0);}return _0x3c1bf0;}['_handleFootnoteReferencesChanges'](_0x13adbe,_0x3263fb){let _0x1a6184=!0x1;const {removed:_0x5112d6,inserted:_0x4354c6,moved:_0x4e9e28}=this['_footnoteRefsTracker']['getChanges'](_0x3263fb);for(const _0xb3b1c6 of _0x5112d6)this['_handleRemoveFootnoteReferenceById'](_0x13adbe,_0xb3b1c6)&&(_0x1a6184=!0x0);for(const _0x22a4ac of _0x4354c6)this['_handleInsertedFootnoteReference'](_0x13adbe,_0x22a4ac)&&(_0x1a6184=!0x0);for(const _0x447afa of _0x4e9e28)this['_handleMovedFootnoteReference'](_0x13adbe,_0x447afa)&&(_0x1a6184=!0x0);return _0x1a6184;}['_handleFootnotesDefinitionsObjectSync'](_0x57383c){if(!this['_footnotesDefinitions'])return!0x1;let _0x5aca30=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x472b00=[];for(const _0x326772 of this['_footnotesDefinitions']['getChildren']()){const _0x5caf24=_0x326772['getAttribute']('footnoteId');this['getFootnote'](_0x5caf24)||(_0x472b00['unshift'](_0x326772),_0x5aca30=!0x0);}for(const _0x3bbb07 of _0x472b00)_0x57383c['remove'](_0x3bbb07);}const _0x175184=new Set(),_0x3af0d8=[];for(const _0x324538 of this['_footnotesDefinitions']['getChildren']()){const _0x1a4516=_0x324538['getAttribute']('footnoteId');_0x175184['has'](_0x1a4516)?(_0x3af0d8['unshift'](_0x324538),_0x5aca30=!0x0):_0x175184['add'](_0x1a4516);}for(const _0x20511c of _0x3af0d8)_0x57383c['remove'](_0x20511c);return this['_footnotesDefinitions']['childCount']||(_0x57383c['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x5aca30=!0x0),_0x5aca30;}['_handleInsertedFootnoteReference'](_0x2edc4a,_0x2a2d07){if(this['_footnotes']['find'](_0x500451=>_0x500451['reference']===_0x2a2d07))return!0x1;let _0x5db57f=!0x1;const _0x3f9bb9=_0x2a2d07['getAttribute']('footnoteId'),_0x10d37a=this['getFootnote'](_0x3f9bb9);_0x10d37a&&(_0x2edc4a['remove'](_0x10d37a['reference']),this['_footnotes']=this['_footnotes']['filter'](_0xa79de7=>_0xa79de7['id']!==_0x3f9bb9),_0x5db57f=!0x0);let _0x13f67c=this['_footnotesDefinitions']?function(_0x26172,_0x2cfec6){for(const _0x338796 of _0x26172['getChildren']())if(_0x338796['getAttribute']('footnoteId')===_0x2cfec6)return _0x338796;return null;}(this['_footnotesDefinitions'],_0x3f9bb9):null;_0x13f67c||(_0x13f67c=_0x2edc4a['createElement']('footnoteDefinition',{'footnoteId':_0x3f9bb9}),this['_footnotesDefinitions']&&(_0x2edc4a['insert'](_0x13f67c,this['_footnotesDefinitions'],'end'),_0x5db57f=!0x0));const _0x1f4449={'id':_0x3f9bb9,'reference':_0x2a2d07,'definition':_0x13f67c},_0x38afa0=I(this['editor']['model'],this['_footnotes'],_0x2a2d07);return this['_footnotes']['splice'](_0x38afa0,0x0,_0x1f4449),this['_updateFootnotesCounters'](_0x2edc4a,_0x38afa0)&&(_0x5db57f=!0x0),_0x5db57f;}['_handleRemoveFootnoteReferenceById'](_0x24220e,_0x39d742){const _0xf795ca=this['_footnotes']['findIndex'](_0x240164=>_0x240164['id']===_0x39d742);if(-0x1===_0xf795ca)return!0x1;let _0x203c9f=!0x1;const _0x33af72=this['_footnotes'][_0xf795ca];return'$graveyard'!==_0x33af72['definition']['root']['rootName']&&(_0x24220e['remove'](_0x33af72['definition']),_0x203c9f=!0x0),this['_footnotes']['splice'](_0xf795ca,0x1),this['_updateFootnotesCounters'](_0x24220e,_0xf795ca)&&(_0x203c9f=!0x0),_0x203c9f;}['_handleMovedFootnoteReference'](_0x437fd8,_0x302d69){const _0x50c63e=_0x302d69['getAttribute']('footnoteId'),_0x46c628=this['_footnotes']['findIndex'](_0x521d87=>_0x521d87['id']===_0x50c63e),_0x3819a6=this['_footnotes'][_0x46c628];let _0x5c1e6b=!0x1;_0x3819a6['reference']=_0x302d69,this['_footnotes']['splice'](_0x46c628,0x1);const _0xa02581=I(this['editor']['model'],this['_footnotes'],_0x302d69);return this['_footnotes']['splice'](_0xa02581,0x0,_0x3819a6),this['_updateFootnotesCounters'](_0x437fd8,Math['min'](_0x46c628,_0xa02581))&&(_0x5c1e6b=!0x0),_0x5c1e6b;}['_updateFootnoteRefCounter'](_0x2efc37,_0x43644d){if(!this['_footnotesDefinitions'])return!0x1;const _0x3b403c=this['_footnotes'][_0x43644d];let _0x5769fa;return _0x5769fa=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x3b403c,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x43644d+0x1}):String(_0x43644d+0x1),_0x3b403c['reference']['getAttribute']('footnoteCounter')!=_0x5769fa&&(_0x2efc37['setAttribute']('footnoteCounter',_0x5769fa,_0x3b403c['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x3139ae){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x5f1865,_0x5e9fa3){if(_0x5f1865['length']!==_0x5e9fa3['length'])return!0x1;for(let _0x543ca9=0x0;_0x543ca9<_0x5f1865['length'];_0x543ca9++)if(_0x5f1865[_0x543ca9]!==_0x5e9fa3[_0x543ca9])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x2ee20b=>_0x2ee20b['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x229fe8=>_0x229fe8['getAttribute']('footnoteId'))))return!0x1;let _0x346228=!0x1;for(let _0x34e6dd=0x0;_0x34e6dd<this['_footnotes']['length'];_0x34e6dd++){const _0x5517e8=this['_footnotes'][_0x34e6dd],_0x37fbde=_0x3139ae['createPositionBefore'](_0x5517e8['definition']),_0x50eab9=_0x3139ae['createPositionAt'](this['_footnotesDefinitions'],_0x34e6dd);_0x37fbde['isEqual'](_0x50eab9)||(_0x3139ae['move'](_0x3139ae['createRangeOn'](_0x5517e8['definition']),_0x50eab9),_0x346228=!0x0);}return _0x346228;}['_ensureFootnotesReferencesHaveProperOrder'](_0x3e8dc9){if(!this['_footnotes']['length'])return!0x1;const {model:_0x328188}=this['editor'];let _0x42dde2=!0x1;for(let _0x2f41ec=0x0;_0x2f41ec<this['_footnotes']['length']-0x1;_0x2f41ec++){const _0x536793=this['_footnotes'][_0x2f41ec],_0x33e4fb=this['_footnotes'][_0x2f41ec+0x1],_0x23afb4=_0x328188['createPositionBefore'](_0x536793['reference']),_0x486545=_0x328188['createPositionBefore'](_0x33e4fb['reference']);'after'===_0x23afb4['compareWith'](_0x486545)&&(this['_handleMovedFootnoteReference'](_0x3e8dc9,_0x536793['reference']),_0x2f41ec=-0x1,_0x42dde2=!0x0);}return _0x42dde2;}}function _(_0x32109e,_0x199d9b,_0x35cfcc){if(_0x35cfcc['childCount'])return!0x1;const _0x60cf7d=_0x199d9b?'paragraph':'footnoteInlineContent';return _0x32109e['insert'](_0x32109e['createElement'](_0x60cf7d),_0x35cfcc),!0x0;}function I(_0x424142,_0x325097,_0x13e8fb){if(0x0===_0x325097['length'])return 0x0;const _0x235574=_0x424142['createPositionBefore'](_0x13e8fb);for(let _0x33296a=0x0;_0x33296a<_0x325097['length'];_0x33296a++){const _0x30c93b=_0x325097[_0x33296a],_0xe14fc3=_0x424142['createPositionBefore'](_0x30c93b['reference']);if('before'===_0x235574['compareWith'](_0xe14fc3))return _0x33296a;}const _0x34c6be=_0x13e8fb['root'];let _0x2c60e2=-0x1;for(let _0x4b0474=_0x325097['length']-0x1;_0x4b0474>=0x0;_0x4b0474--)if(_0x325097[_0x4b0474]['reference']['root']===_0x34c6be){_0x2c60e2=_0x4b0474;break;}if(-0x1!==_0x2c60e2)return _0x2c60e2+0x1;const _0x53b6eb=_0x424142['document']['getRootNames'](),_0x463b3b=_0x53b6eb['indexOf'](_0x34c6be['rootName']),_0x225ca2=_0x53b6eb[_0x463b3b+0x1];if(_0x225ca2){for(let _0x13ca81=0x0;_0x13ca81<_0x325097['length'];_0x13ca81++)if(_0x325097[_0x13ca81]['reference']['root']['rootName']===_0x225ca2)return _0x13ca81;}return _0x325097['length'];}class w extends _0x1159f6{['refresh'](){const _0x35076c=this['editor']['model']['document']['selection'],_0x263ce7=this['_getPositionToInsertFootnote'](_0x35076c);this['isEnabled']=!!_0x263ce7;}['execute'](_0x349e13){const {editor:_0x509dc0}=this,{model:_0x330fff}=_0x509dc0,{selection:_0x3d2377}=_0x330fff['document'],_0x4f8461=this['_getPositionToInsertFootnote'](_0x3d2377);if(!_0x4f8461)return;const _0x2225d9=_0x509dc0['plugins']['get']('FootnotesEditing'),_0x5e746a=_0x349e13?.['footnoteId']??_0x4970a6();!function(_0x58cd4b){return'string'==typeof _0x58cd4b&&_0x58cd4b['length']>0x0&&!/\s/['test'](_0x58cd4b)&&!/^\d/['test'](_0x58cd4b);}(_0x5e746a)?_0x1e6eca('insert-footnote-command-executed-with-invalid-id'):(_0x330fff['change'](_0x52c082=>{const _0x59c2d0=_0x52c082['createElement']('footnoteRef',{'footnoteId':_0x5e746a});_0x330fff['insertObject'](_0x59c2d0,_0x4f8461,null);}),_0x2225d9['_moveSelectionToFootnoteDefinition'](_0x5e746a));}['_getPositionToInsertFootnote'](_0x1d4f5a){const {model:_0x1466d5}=this['editor'],{schema:_0x1979f2}=_0x1466d5,_0x5414dd=_0x1d4f5a['getFirstRange']();for(const _0x4bd8d5 of _0x5414dd['getItems']())if(_0x1979f2['isBlock'](_0x4bd8d5)||_0x1979f2['isObject'](_0x4bd8d5))return null;const _0x496475=_0x5414dd['end'];return _0x1979f2['checkChild'](_0x496475,'footnoteRef')?_0x496475:null;}}class r extends _0x5dd69c{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3429bb}=this;_0x3429bb['config']['define']('footnotes.multiBlock',!0x0),_0x3429bb['commands']['add']('insertFootnote',new w(_0x3429bb)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x1b990f){const _0x3ee658=_0x3b77d3([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]),_0x320d07=0x47a28506,_0x56af79=0x47a5f38e^_0x320d07,_0x5957ed=window[_0x3b77d3([0x44,0x61,0x74,0x65])][_0x3b77d3([0x6e,0x6f,0x77])](),_0x394f9c=_0x1b990f[_0x3b77d3([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5cdc49=new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3af1c8=>{_0x394f9c[_0x3b77d3([0x6f,0x6e,0x63,0x65])](_0x3b77d3([0x72,0x65,0x61,0x64,0x79]),_0x3af1c8);}),_0xe57aa0={[_0x3b77d3([0x6b,0x74,0x79])]:_0x3b77d3([0x45,0x43]),[_0x3b77d3([0x75,0x73,0x65])]:_0x3b77d3([0x73,0x69,0x67]),[_0x3b77d3([0x63,0x72,0x76])]:_0x3b77d3([0x50,0x2d,0x32,0x35,0x36]),[_0x3b77d3([0x78])]:_0x3b77d3([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]),[_0x3b77d3([0x79])]:_0x3b77d3([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]),[_0x3b77d3([0x61,0x6c,0x67])]:_0x3b77d3([0x45,0x53,0x32,0x35,0x36])},_0x560cfa=_0x394f9c[_0x3b77d3([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3b77d3([0x67,0x65,0x74])](_0x3b77d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x124b9d(){let _0x427bdd,_0xd38889=null,_0x136054=null;try{if(_0x560cfa==_0x3b77d3([0x47,0x50,0x4c]))return _0x3b77d3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x427bdd=_0xb2c900(),!_0x427bdd)return _0x3b77d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x427bdd[_0x3b77d3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x136054=_0x37afb6(_0x427bdd[_0x3b77d3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x427bdd[_0x3b77d3([0x6a,0x74,0x69])])),await _0x50ef4a()?_0x3edc36()?_0x41de56()?_0x3b77d3([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5177fb()?(_0x427bdd[_0x3b77d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3b77d3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xd38889=_0x1c864f(_0x3b77d3([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x427bdd[_0x3b77d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3b77d3([0x74,0x72,0x69,0x61,0x6c])&&(_0xd38889=_0x1c864f(_0x3b77d3([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x32596d()):_0x3b77d3([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3b77d3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3b77d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3b77d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x41de56(){const _0x4c0fde=[_0x3b77d3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3b77d3([0x74,0x72,0x69,0x61,0x6c])][_0x3b77d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x427bdd[_0x3b77d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5957ed/0x3e8:0xe10*_0x56af79;return _0x427bdd[_0x3b77d3([0x65,0x78,0x70])]<_0x4c0fde;}function _0x3edc36(){const _0xcee349=_0x427bdd[_0x3b77d3([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xcee349&&(!!_0xcee349[_0x3b77d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b77d3([0x2a]))||!!_0xcee349[_0x3b77d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b77d3([0x46,0x4f,0x4f])));}function _0x5177fb(){const _0x5b686c=_0x427bdd[_0x3b77d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5b686c||0x0==_0x5b686c[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x60138}=new URL(window[_0x3b77d3([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5b686c[_0x3b77d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x60138))return!0x0;const _0x409d35=_0x60138[_0x3b77d3([0x73,0x70,0x6c,0x69,0x74])](_0x3b77d3([0x2e]));return _0x5b686c[_0x3b77d3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x248590=>_0x248590[_0x3b77d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b77d3([0x2a])))[_0x3b77d3([0x6d,0x61,0x70])](_0x23124b=>_0x23124b[_0x3b77d3([0x73,0x70,0x6c,0x69,0x74])](_0x3b77d3([0x2e])))[_0x3b77d3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x199410=>_0x199410[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x409d35[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3b77d3([0x6d,0x61,0x70])](_0x30a255=>Array(_0x409d35[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x30a255[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3b77d3([0x66,0x69,0x6c,0x6c])](_0x30a255[0x0]===_0x3b77d3([0x2a])?_0x3b77d3([0x2a]):'')[_0x3b77d3([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x30a255))[_0x3b77d3([0x73,0x6f,0x6d,0x65])](_0x34b70f=>_0x409d35[_0x3b77d3([0x65,0x76,0x65,0x72,0x79])]((_0x4fee5f,_0x594364)=>_0x34b70f[_0x594364]===_0x4fee5f||_0x34b70f[_0x594364]===_0x3b77d3([0x2a])));}function _0x32596d(){return _0xd38889&&_0x136054?new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3f84c0,_0x44d3bf)=>{_0xd38889[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x3f84c0,_0x44d3bf),_0x136054[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x4e22a0=>{_0x4e22a0!=_0x3b77d3([0x56,0x61,0x6c,0x69,0x64])&&_0x3f84c0(_0x4e22a0);},_0x44d3bf);}):_0xd38889||_0x136054||_0x3b77d3([0x56,0x61,0x6c,0x69,0x64]);}}function _0x37afb6(_0x613638,_0x30d9c1){return new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f23ac=>{if(_0x490f6a())return _0x1f23ac(_0x3b77d3([0x56,0x61,0x6c,0x69,0x64]));_0x3fdc64(),_0x394f9c[_0x3b77d3([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3b77d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5812c0=!0x1;const _0x46ff18=_0x4970a6();function _0x22986d(_0x484ee8){return!!_0x484ee8&&(typeof _0x484ee8===_0x3b77d3([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x484ee8===_0x3b77d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x484ee8[_0x3b77d3([0x74,0x68,0x65,0x6e])]===_0x3b77d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x484ee8[_0x3b77d3([0x63,0x61,0x74,0x63,0x68])]===_0x3b77d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2be838(_0x4fe467){_0x5aac8f(_0x4fe467)[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x28f98f=>{if(!_0x28f98f||_0x28f98f[_0x3b77d3([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3b77d3([0x6f,0x6b]))return _0x3b77d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x49839a(_0x42e8ef(_0x46ff18+_0x30d9c1))!=_0x28f98f[_0x3b77d3([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3b77d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3b77d3([0x56,0x61,0x6c,0x69,0x64]);})[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x586cc3=>(_0x531d8e(),_0x586cc3),()=>{const _0x3aba40=_0x5a41fe();return null==_0x3aba40?(_0x531d8e(),_0x3b77d3([0x56,0x61,0x6c,0x69,0x64])):_0x3b77d3(_0x5957ed-_0x3aba40>(0x63ae0106^_0x320d07)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x1f23ac)[_0x3b77d3([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1f23ac(_0x3b77d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4971bd=0x47946b86^_0x320d07;function _0x531d8e(){const _0x4d8651=_0x3b77d3([0x6c,0x6c,0x63,0x74,0x2d])+_0x49839a(_0x42e8ef(_0x613638)),_0x9c86c=_0x339002(_0x49839a(window[_0x3b77d3([0x4d,0x61,0x74,0x68])][_0x3b77d3([0x63,0x65,0x69,0x6c])](_0x5957ed/_0x4971bd)));window[_0x3b77d3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3b77d3([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4d8651,_0x9c86c);}function _0x5a41fe(){const _0x3ef361=_0x3b77d3([0x6c,0x6c,0x63,0x74,0x2d])+_0x49839a(_0x42e8ef(_0x613638)),_0x26ca08=window[_0x3b77d3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3b77d3([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3ef361);return _0x26ca08?window[_0x3b77d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x339002(_0x26ca08),0x10)*_0x4971bd:null;}function _0x5aac8f(_0x14fda8){return new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x529835,_0x308cdc)=>{_0x14fda8[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x529835,_0x308cdc),window[_0x3b77d3([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x308cdc,0x47a351c6^_0x320d07);});}}_0x394f9c[_0x3b77d3([0x6f,0x6e])](_0x3b77d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x12ab07,_0x543605)=>{if(_0x543605[0x0]!=_0x613638)return _0x1f23ac(_0x3b77d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x543605[0x1]={..._0x543605[0x1],[_0x3b77d3([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x46ff18};},{[_0x3b77d3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3b77d3([0x68,0x69,0x67,0x68])}),_0x394f9c[_0x3b77d3([0x6f,0x6e])](_0x3b77d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xa29537=>{_0x22986d(_0xa29537[_0x3b77d3([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5812c0=!0x0,_0x2be838(_0xa29537[_0x3b77d3([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3b77d3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3b77d3([0x6c,0x6f,0x77])}),_0x5cdc49[_0x3b77d3([0x74,0x68,0x65,0x6e])](()=>{_0x5812c0||_0x1f23ac(_0x3b77d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x490f6a(){return _0x394f9c[_0x3b77d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3b77d3([0x76,0x69,0x65,0x77])][_0x3b77d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3b77d3([0x61,0x75,0x74,0x6f]);}function _0x3fdc64(){_0x394f9c[_0x3b77d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3b77d3([0x76,0x69,0x65,0x77])][_0x3b77d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3b77d3([0x61,0x75,0x74,0x6f]);}}function _0x1c864f(_0x484431){const _0x1a6dbd=[new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f8628=>setTimeout(_0x1f8628,0x47abbbca^_0x320d07)),_0x5cdc49[_0x3b77d3([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x203bc2=>{let _0x48aa3c=0x0;_0x394f9c[_0x3b77d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b77d3([0x6f,0x6e])](_0x3b77d3([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x366190,_0xdfe060)=>{_0xdfe060[0x0][_0x3b77d3([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x48aa3c++,_0x48aa3c==(0x47a284fe^_0x320d07)&&(_0x203bc2(),_0x366190[_0x3b77d3([0x6f,0x66,0x66])]());});}))];return window[_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3b77d3([0x72,0x61,0x63,0x65])](_0x1a6dbd)[_0x3b77d3([0x74,0x68,0x65,0x6e])](()=>_0x484431);}async function _0x35ca88(){await _0x5cdc49,_0x394f9c[_0x3b77d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b77d3([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x33442f,_0x394f9c[_0x3b77d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b77d3([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x33442f,_0x394f9c[_0x3b77d3([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3b77d3([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x54a2f2(_0x27e71d){const _0x41ef8e=_0x550c82();_0x394f9c[_0x41ef8e]=_0x3b77d3([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x27e71d,_0x27e71d!=_0x3b77d3([0x56,0x61,0x6c,0x69,0x64])&&_0x35ca88();}function _0x550c82(){const _0x26964c=window[_0x3b77d3([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3b77d3([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3b77d3([0x6e,0x6f,0x77])]())[_0x3b77d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3b77d3([0x2e]),'');let _0x1e736b=_0x3b77d3([0x75]);for(let _0x7e229c=0x0;_0x7e229c<_0x26964c[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x7e229c+=0x2){let _0x3af8b2=window[_0x3b77d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x26964c[_0x3b77d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x7e229c,_0x7e229c+0x2));_0x3af8b2>=_0x3ee658[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3af8b2-=_0x3ee658[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1e736b+=_0x3ee658[_0x3af8b2];}return _0x1e736b;}function _0xb2c900(){const _0x59c77e=_0x560cfa[_0x3b77d3([0x73,0x70,0x6c,0x69,0x74])](_0x3b77d3([0x2e]));if(0x3!=_0x59c77e[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x588894(_0x59c77e[0x1]);function _0x588894(_0x2c4ed7){const _0x35da02=_0x268de8(_0x2c4ed7);return _0x35da02&&_0x274506()?_0x35da02:null;function _0x274506(){const _0x1b592f=_0x35da02[_0x3b77d3([0x6a,0x74,0x69])],_0x456418=window[_0x3b77d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b592f[_0x3b77d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b592f[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3ea2de={..._0x35da02,[_0x3b77d3([0x6a,0x74,0x69])]:_0x1b592f[_0x3b77d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b592f[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3ea2de[_0x3b77d3([0x76,0x63])],_0x42e8ef(_0x3ea2de)==_0x456418;}}}async function _0x50ef4a(){let _0x4b817d=!0x0;try{const _0x1aea57=_0x560cfa[_0x3b77d3([0x73,0x70,0x6c,0x69,0x74])](_0x3b77d3([0x2e])),[_0x27cc74,_0x1adcb2,_0x13be5f]=_0x1aea57;return _0x36c59f(_0x27cc74),await _0xc5c921(_0x27cc74,_0x1adcb2,_0x13be5f),_0x4b817d;}catch{return!0x1;}function _0x36c59f(_0x3475fb){const _0x323153=_0x268de8(_0x3475fb);_0x323153&&_0x323153[_0x3b77d3([0x61,0x6c,0x67])]==_0x3b77d3([0x45,0x53,0x32,0x35,0x36])||(_0x4b817d=!0x1);}async function _0xc5c921(_0x460e77,_0x37be36,_0x50a28f){const _0x555e8f=window[_0x3b77d3([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3b77d3([0x66,0x72,0x6f,0x6d])](_0x5b949b(_0x50a28f),_0x15529c=>_0x15529c[_0x3b77d3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1e9552=new window[(_0x3b77d3([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3b77d3([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x460e77+_0x3b77d3([0x2e])+_0x37be36),_0x4e7ac4=window[_0x3b77d3([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3b77d3([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4e7ac4)return;const _0x21a45e=await _0x4e7ac4[_0x3b77d3([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3b77d3([0x6a,0x77,0x6b]),_0xe57aa0,{[_0x3b77d3([0x6e,0x61,0x6d,0x65])]:_0x3b77d3([0x45,0x43,0x44,0x53,0x41]),[_0x3b77d3([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3b77d3([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3b77d3([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4e7ac4[_0x3b77d3([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3b77d3([0x6e,0x61,0x6d,0x65])]:_0x3b77d3([0x45,0x43,0x44,0x53,0x41]),[_0x3b77d3([0x68,0x61,0x73,0x68])]:{[_0x3b77d3([0x6e,0x61,0x6d,0x65])]:_0x3b77d3([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x21a45e,_0x555e8f,_0x1e9552)||(_0x4b817d=!0x1);}}function _0x268de8(_0x1c15f2){return _0x1c15f2[_0x3b77d3([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3b77d3([0x65,0x79]))?JSON[_0x3b77d3([0x70,0x61,0x72,0x73,0x65])](_0x5b949b(_0x1c15f2)):null;}function _0x5b949b(_0x5e5208){return window[_0x3b77d3([0x61,0x74,0x6f,0x62])](_0x5e5208[_0x3b77d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3b77d3([0x2b]))[_0x3b77d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3b77d3([0x2f])));}function _0x42e8ef(_0x16c03d){let _0x4abcd7=0x1505;function _0x12fb88(_0x30562b){for(let _0x467a57=0x0;_0x467a57<_0x30562b[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x467a57++){const _0x1c823b=_0x30562b[_0x3b77d3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x467a57);_0x4abcd7=(_0x4abcd7<<0x5)+_0x4abcd7+_0x1c823b,_0x4abcd7&=_0x4abcd7;}}function _0x2e3baf(_0x391e4){Array[_0x3b77d3([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x391e4)?_0x391e4[_0x3b77d3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2e3baf):_0x391e4&&typeof _0x391e4==_0x3b77d3([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3b77d3([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x391e4)[_0x3b77d3([0x73,0x6f,0x72,0x74])]()[_0x3b77d3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x35eeb3,_0x265751])=>{_0x12fb88(_0x35eeb3),_0x2e3baf(_0x265751);}):_0x12fb88(window[_0x3b77d3([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x391e4));}return _0x2e3baf(_0x16c03d),_0x4abcd7>>>0x0;}function _0x49839a(_0x2f822f){return _0x2f822f[_0x3b77d3([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3b77d3([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3b77d3([0x30]));}function _0x339002(_0x1ad9d5){return _0x1ad9d5[_0x3b77d3([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3b77d3([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3b77d3([0x6a,0x6f,0x69,0x6e])]('');}function _0x33442f(){}function _0x3b77d3(_0x29a2b7){return _0x29a2b7['map'](_0x2184d6=>String['fromCharCode'](_0x2184d6))['join']('');}_0x54a2f2(await _0x124b9d());}(this);}['_moveSelectionToFootnoteDefinition'](_0x1e7d21){const {plugins:_0x3d7933,editing:_0x1fd6f2,model:_0x5edf97}=this['editor'],_0x5f1ce6=_0x3d7933['get'](c)['getFootnote'](_0x1e7d21);return!!_0x5f1ce6&&(_0x5edf97['change'](_0x155927=>{_0x155927['setSelection'](_0x155927['createPositionAt'](_0x5f1ce6['definition'],'end'));}),_0x1fd6f2['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x2b56f8){const {plugins:_0x2f98f9,editing:_0x449b38,model:_0x482596}=this['editor'],_0x1ac10c=_0x2f98f9['get'](c)['getFootnote'](_0x2b56f8);return!!_0x1ac10c&&(_0x482596['change'](_0x2a6def=>{_0x2a6def['setSelection'](_0x1ac10c['reference'],'on');}),_0x449b38['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x35806f}=this['editor']['model'],_0x216a1f=this['editor']['config']['get']('footnotes.multiBlock');_0x35806f['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x35806f['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x35806f['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x216a1f?_0x35806f['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x35806f['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x35806f['addChildCheck'](_0x3fb35c=>{for(const _0x22d744 of _0x3fb35c)if('footnoteDefinition'===_0x22d744['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0xc4e71f}=this,{conversion:_0x521f3b,editing:_0x62c321}=_0xc4e71f,{t:t}=_0xc4e71f['locale'];_0x521f3b['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x4e0a1b,{writer:_0x10ed0b,consumable:_0x1ae4c1})=>{const _0x46326c=_0x4e0a1b['getChild'](0x0);if(!_0x46326c||!_0x46326c['is']('element','a'))return null;const _0x4c6136=_0x46326c['getAttribute']('href')||'';if(!_0x4c6136['startsWith']('#'))return null;const _0x232016=_0x4c6136['replace'](/^#/,'');if(!_0x232016)return null;_0x1ae4c1['consume'](_0x46326c,{'name':!0x0,'attributes':['href']});for(const {item:_0x466b86}of _0x62c321['view']['createRangeIn'](_0x46326c))_0x466b86['is']('$textProxy')?_0x1ae4c1['consume'](_0x466b86['textNode'],{'name':!0x0}):_0x466b86['is']('element')&&_0x1ae4c1['consume'](_0x466b86,{'name':!0x0});return _0x10ed0b['createElement']('footnoteRef',{'footnoteId':_0x232016});}}),_0x521f3b['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x4bb2e1,{writer:_0x4751c3})=>g(_0x4bb2e1,_0x4751c3)}),_0x521f3b['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x1ccb90,{writer:_0x441e99})=>{const _0x2bb081=_0x1ccb90['getAttribute']('footnoteCounter');return _0x40f775(g(_0x1ccb90,_0x441e99),_0x441e99,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x2bb081)});}});}['_defineDefinitionsConverters'](){const {editor:_0x343df9}=this,{t:t}=_0x343df9['locale'],{conversion:_0x40c633}=_0x343df9;_0x40c633['for']('upcast')['elementToElement']({'view':{'name':'ol','classes':['footnotes']},'model':'footnotesDefinitions','converterPriority':'high'}),_0x40c633['for']('dataDowncast')['elementToElement']({'model':'footnotesDefinitions','view':{'name':'ol','classes':['footnotes']}}),_0x40c633['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x5091e1,{writer:_0x3871c0})=>{const _0x22a840=_0x3871c0['createContainerElement']('div',{'class':'footnotes-wrapper','data-footnotes-list-label':t('Footnotes')},_0x3871c0['createContainerElement']('ol',{'class':'footnotes'},_0x3871c0['createSlot']())),_0x29fe6e=_0x40f775(_0x22a840,_0x3871c0,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x3871c0['setCustomProperty']('footnotesDefinitions',!0x0,_0x29fe6e),_0x29fe6e;}});}['_defineDefinitionConverters'](){const {editor:_0x565a36}=this,{conversion:_0x1f4bad,locale:_0x16ed73}=_0x565a36,_0xc92afa=_0x565a36['config']['get']('footnotes.multiBlock');_0x1f4bad['for']('upcast')['add'](_0xdac6d4=>{_0xdac6d4['on']('element:li',(_0x3f390b,_0x492795,_0x30043f)=>{const _0x497af3=_0x492795['viewItem'];if(!_0x497af3['hasClass']('footnote-definition')||!_0x497af3['getAttribute']('id'))return;const _0x85017c=_0x497af3['parent'];if(!_0x85017c['is']('element','ol')||!_0x85017c['hasClass']('footnotes'))return;if(!_0x30043f['consumable']['test'](_0x497af3,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x1cb78d=_0x30043f['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x497af3['getAttribute']('id')});if(!_0x30043f['safeInsert'](_0x1cb78d,_0x492795['modelCursor']))return;_0x30043f['consumable']['consume'](_0x497af3,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x1d6a3a=Array['from'](_0x497af3['getChildren']())['find'](_0x434867=>_0x434867['is']('element')&&_0x434867['hasClass']('footnote-content'));for(const _0x12d6dc of _0x497af3['getChildren']())_0x12d6dc['is']('element')&&(_0x30043f['consumable']['consume'](_0x12d6dc,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x30043f['consumable']['consume'](_0x12d6dc,{'name':!0x0,'classes':'footnote-content'}));if(_0x1d6a3a){if(_0xc92afa)_0x30043f['convertChildren'](_0x1d6a3a,_0x1cb78d);else{const _0x21ebff=_0x30043f['writer']['createElement']('footnoteInlineContent');_0x30043f['writer']['insert'](_0x21ebff,_0x1cb78d),_0x30043f['convertChildren'](_0x1d6a3a,_0x21ebff);}}_0x30043f['updateConversionResult'](_0x1cb78d,_0x492795);});}),_0x1f4bad['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x186323,{writer:_0x4d4b84})=>D(_0x186323,_0x4d4b84,_0x16ed73,{'dataPipeline':!0x0})}),_0x1f4bad['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x5cdbb3,{writer:_0x2f5182})=>D(_0x5cdbb3,_0x2f5182,_0x16ed73)});}['_defineBogusParagraphConverters'](){const {editor:_0x57caf1}=this,{conversion:_0xc86b5}=_0x57caf1;_0x57caf1['config']['get']('footnotes.multiBlock')?(_0xc86b5['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0xc86b5['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x57caf1['model']['document'],'change:data',()=>{!function(_0x5f10af,_0x3591d1){const _0x1cbb58=_0x5f10af['document']['differ'],_0x13b1f3=new Set();for(const _0x731f61 of _0x1cbb58['getChanges']()){const _0x1f8153='attribute'==_0x731f61['type']?_0x731f61['range']['start']['parent']:_0x731f61['position']['parent'];_0x1f8153['is']('element','footnoteDefinition')&&_0x13b1f3['add'](_0x1f8153);}for(const _0x5567ad of _0x13b1f3['values']()){const _0x22e450=Array['from'](_0x5567ad['getChildren']())['filter'](_0x423db2=>p(_0x423db2,_0x3591d1['mapper']));for(const _0xec3bf8 of _0x22e450)_0x3591d1['reconvertItem'](_0xec3bf8);}}(_0x57caf1['model'],_0x57caf1['editing']);})):(_0xc86b5['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0xc86b5['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0xd6c268,{writer:_0x1a4bb6})=>{const _0x477e52=_0x1a4bb6['createContainerElement']('span');return _0x1a4bb6['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x477e52),_0x477e52;}}));}['_defineKeyboardHandlers'](){const {editor:_0x2b07ec}=this,{editing:_0x4f9f7e,t:t}=_0x2b07ec,_0x13a922=_0x2b07ec['model']['document']['selection'];_0x2b07ec['keystrokes']['set']('CTRL+Alt+D','insertFootnote'),_0x2b07ec['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+D'}]}),this['listenTo'](_0x4f9f7e['view']['document'],'enter',(_0xae0bc4,_0x3c58b7)=>{const _0x484479=function(_0x358f8f){const _0x1f2f3b=_0x358f8f['getSelectedElement']();if(_0x1f2f3b?.['is']('element','footnoteRef'))return _0x1f2f3b;return null;}(_0x13a922);if(_0x484479){const _0x40a166=_0x484479['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x40a166),_0x3c58b7['preventDefault'](),_0xae0bc4['stop']();}},{'context':_0x52dc53});}['_defineClickHandlers'](){const {editor:_0x4cc08d}=this,{editing:_0x1221b5}=_0x4cc08d;_0x4cc08d['editing']['view']['addObserver'](_0x2a6255),_0x4cc08d['editing']['view']['addObserver'](_0x1281d6);let _0x95ca96=!0x1;this['listenTo'](_0x1221b5['view']['document'],'pointerdown',(_0x3cba23,_0x51ce39)=>{const {target:_0x227cfd}=_0x51ce39,_0x578a7b=_0x1221b5['view']['document']['selection'];_0x95ca96=!(!_0x227cfd['is']('element','sup')||!_0x227cfd['hasClass']('footnote'))&&_0x578a7b['getSelectedElement']()===_0x227cfd;},{'priority':'high'}),this['listenTo'](_0x1221b5['view']['document'],'click',(_0x6c1f42,_0x432358)=>{const {target:_0x5e4142}=_0x432358,_0x1c562b=_0x5e4142['getChild'](0x0)['getAttribute']('href');this['_moveSelectionToFootnoteDefinition'](_0x1c562b['slice'](0x1)),_0x6c1f42['stop'](),_0x432358['preventDefault']();},{'priority':'high','context':_0x39664f=>_0x39664f['is']('element','sup')&&_0x39664f['hasClass']('footnote')&&_0x95ca96}),this['listenTo'](_0x1221b5['view']['document'],'click',(_0x16808d,_0x57c8c0)=>{const {target:_0x448b52}=_0x57c8c0;if(!_0x448b52['is']('element','a'))return;let _0x4f055c=_0x448b52['getAttribute']('href');if(!_0x4f055c?.['startsWith']('#'))return;_0x4f055c=_0x4f055c['slice'](0x1);let _0x397cb9=!0x1;(_0x4f055c['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x4f055c['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x4f055c))&&(_0x397cb9=!0x0),_0x397cb9&&(_0x57c8c0['preventDefault'](),_0x16808d['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x330540}={}){return(_0x11228d,{writer:_0x22ec16})=>{if(!h(_0x11228d))return null;if(!_0x330540)return _0x22ec16['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x538c9e=_0x22ec16['createContainerElement']('p');return _0x22ec16['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x538c9e),_0x538c9e;};}function h(_0x3566ec){const {parent:_0x8c6d1b}=_0x3566ec;if(!_0x8c6d1b?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x8c6d1b['childCount'])return!0x1;for(const _0x18a5b1 of _0x3566ec['getAttributeKeys']())if(!_0x18a5b1['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x18a5b1)return!0x1;return!0x0;}function p(_0xcea4bb,_0x492c43){if(!_0xcea4bb['is']('element','paragraph'))return!0x1;const _0x3e7f3d=_0x492c43['toViewElement'](_0xcea4bb);return!!_0x3e7f3d&&h(_0xcea4bb)!==_0x3e7f3d['is']('element','span');}function $(_0x465131){return _0x52dc53(_0x465131)&&_0x465131['is']('containerElement')&&!!_0x465131['getCustomProperty']('footnotesDefinitions');}function g(_0x3ade0e,_0x47a967){const _0x27a31a=_0x3ade0e['getAttribute']('footnoteId'),_0x40a06b=_0x3ade0e['getAttribute']('footnoteCounter'),_0x385a8c=_0x47a967['createUIElement']('a',{'id':'ref-'+_0x27a31a,'href':'#'+_0x27a31a},function(_0x3e8bae){const _0x3999a8=this['toDomElement'](_0x3e8bae);return _0x3999a8['textContent']=_0x40a06b,_0x3999a8;}),_0x2c6370=_0x47a967['createContainerElement']('sup',{'class':'footnote'},[_0x385a8c]);return _0x2c6370['getFillerOffset']=()=>null,_0x2c6370;}function D(_0x609399,_0x381d43,_0x3074b8,{dataPipeline:_0x8b6620}={}){const {t:t}=_0x3074b8,_0x4b0be1=_0x609399['getAttribute']('footnoteId'),_0x41dd09=_0x381d43['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x4b0be1},function(_0x1d2169){const _0x19358b=this['toDomElement'](_0x1d2169);return _0x19358b['innerText']='^',_0x19358b;}),_0x2e65d7=_0x8b6620?_0x381d43['createContainerElement']('div',{'class':'footnote-content'}):_0x572824(_0x381d43['createEditableElement']('div',{'class':'footnote-content'}),_0x381d43,{'label':t('Footnote\x20content.')});return _0x381d43['insert'](_0x381d43['createPositionAt'](_0x2e65d7,0x0),_0x381d43['createSlot']()),_0x381d43['createContainerElement']('li',{'class':'footnote-definition','id':_0x4b0be1},[_0x41dd09,_0x2e65d7]);}class e extends _0x5dd69c{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x4a149c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x160a07}=this,{plugins:_0x1afe0f,model:_0x4840d0}=_0x160a07,_0x896e77=_0x1afe0f['get'](_0x4a149c),_0x2fffc2=_0x1afe0f['get'](c);this['listenTo'](_0x896e77,'outputTransformation',(_0x59671c,_0x9db8b5)=>{const _0x1214fc=function(_0x2efc52,_0x56c515){const _0x5abc06=new Set();for(const {item:_0x5f2be3}of _0x2efc52['createRangeIn'](_0x56c515))_0x5f2be3['is']('element','footnoteRef')&&_0x5abc06['add'](_0x5f2be3['getAttribute']('footnoteId'));return Array['from'](_0x5abc06);}(_0x4840d0,_0x9db8b5['content']);if(!_0x1214fc['length'])return;const _0x17282e=_0x2fffc2['getFootnotes'](),_0x2d748b=_0x1214fc['reduce']((_0xb3efcd,_0x5ab030)=>{const _0x475649=_0x17282e['find'](_0x14dd8b=>_0x14dd8b['id']===_0x5ab030);if(_0x475649){const _0x42f576=_0x160a07['data']['toView'](_0x475649['definition'],{'isClipboardPipeline':!0x0}),_0x15ccb1=_0x160a07['data']['htmlProcessor']['toData'](_0x42f576);_0xb3efcd[_0x475649['id']]=_0x15ccb1;}return _0xb3efcd;},Object['create'](null));_0x9db8b5['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x2d748b));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x361a13}=this,{model:_0x581dc1,plugins:_0x4fb8bf}=_0x361a13,{view:_0x9c40b7}=_0x361a13['editing'],_0x407f71=_0x4fb8bf['get'](_0x4a149c),_0x329647=_0x4fb8bf['get'](c);let _0x3f33c5=null;this['listenTo'](_0x9c40b7['document'],'clipboardInput',(_0x420281,_0x2189c0)=>{const _0x177a86=_0x2189c0['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x3f33c5=_0x177a86?JSON['parse'](_0x177a86):null;}),this['listenTo'](_0x407f71,'contentInsertion',(_0x362055,_0x4e27e6)=>{if(!_0x3f33c5)return;const _0x249326=_0x4e27e6['sourceEditorId']===this['editor']['id'];_0x249326&&'drop'===_0x4e27e6['method']||_0x581dc1['change'](_0x5d1700=>{!function(_0x3d9686,_0x240de2){const _0x1ec094=[];for(const {item:_0x5df087}of _0x3d9686['createRangeIn'](_0x240de2))_0x5df087['is']('element','footnotesDefinitions')&&_0x1ec094['push'](_0x5df087);for(const _0x3470e3 of _0x1ec094)_0x3d9686['remove'](_0x3470e3);}(_0x5d1700,_0x4e27e6['content']);let _0x3e05e2=_0x329647['getFootnotesDefinitionsObjectElement']();if(!_0x3e05e2){const _0x5aa677=_0x581dc1['document']['selection']['getFirstRange']()['root'];_0x3e05e2=_0x329647['_insertEmptyFootnotesDefinitionsContainer'](_0x5d1700,_0x5aa677);}const _0x116d2c=function(_0x2b9396,_0x3ca94d,_0x13039a){const _0x2412fa=Object['create'](null);for(const {item:_0x225a40}of _0x2b9396['createRangeIn'](_0x3ca94d))if(_0x225a40['is']('element','footnoteRef')){const _0x3fa70c=_0x225a40['getAttribute']('footnoteId');if(!_0x13039a(_0x3fa70c))continue;_0x2412fa[_0x3fa70c]||(_0x2412fa[_0x3fa70c]=_0x4970a6()),_0x2b9396['setAttribute']('footnoteId',_0x2412fa[_0x3fa70c],_0x225a40);}return _0x2412fa;}(_0x5d1700,_0x4e27e6['content'],_0x451a45=>!_0x249326||null!==_0x329647['getFootnote'](_0x451a45));for(const [_0x58e0ac,_0x435a43]of Object['entries'](_0x3f33c5)){const _0x1bea9d=_0x116d2c[_0x58e0ac]||_0x58e0ac,_0x42650b=_0x5d1700['createElement']('footnoteDefinition',{'footnoteId':_0x1bea9d}),_0x55f744=_0x361a13['data']['htmlProcessor']['toView'](_0x435a43),_0x528f11=_0x361a13['data']['toModel'](_0x55f744,_0x42650b);_0x5d1700['append'](_0x528f11,_0x42650b),_0x5d1700['insert'](_0x42650b,_0x3e05e2,'end');}_0x3f33c5=null;});});}}class i extends _0x5dd69c{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x340fa0}=this,{componentFactory:_0x5501c7}=_0x340fa0['ui'];_0x5501c7['add']('insertFootnote',v(_0x340fa0,_0x4f7301)),_0x5501c7['add']('menuBar:insertFootnote',v(_0x340fa0,_0x158f1a)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5c8c85=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1e026a;for(const _0x4ca5ee in _0x5c8c85){const _0xdc7262=_0x4ca5ee,_0x2406fe=_0x5c8c85[_0xdc7262];if('footnotesLicenseKeyValid'==_0x2406fe||'footnotesLicenseKeyInvalid'==_0x2406fe||'footnotesLicenseKeyExpired'==_0x2406fe||'footnotesLicenseKeyDomainLimit'==_0x2406fe||'footnotesLicenseKeyNotAllowed'==_0x2406fe||'footnotesLicenseKeyEvaluationLimit'==_0x2406fe||'footnotesLicenseKeyTrialLimit'==_0x2406fe||'footnotesLicenseKeyUsageLimit'==_0x2406fe){delete _0x5c8c85[_0xdc7262],_0x1e026a=_0x2406fe,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x1e026a&&_0x5c8c85['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x1e026a&&_0x5c8c85['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x1e026a&&_0x5c8c85['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x1e026a&&_0x5c8c85['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x1e026a&&_0x5c8c85['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0x1e026a&&_0x5c8c85['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0x1e026a&&_0x5c8c85['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function v(_0x558197,_0x394707){const _0x110aeb=_0x558197['commands']['get']('insertFootnote');return _0x525f69=>{const {t:t}=_0x525f69,_0x17425a=new _0x394707(_0x525f69),_0x1585fd=_0x17425a instanceof _0x158f1a;return _0x17425a['bind']('isEnabled')['to'](_0x110aeb,'isEnabled'),_0x17425a['set']({'label':t(_0x1585fd?'Footnote':'Insert\x20footnote'),'icon':_0x242f94,'tooltip':!0x0}),_0x17425a['on']('execute',()=>{_0x110aeb['execute'](),_0x558197['editing']['view']['focus']();}),_0x17425a;};}class nt extends _0x5dd69c{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 _0x1159f6{['refresh'](){const {editor:_0x6a0cc4}=this,_0x1dbacf=_0x6a0cc4['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x1dbacf,this['value']=_0x1dbacf?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0xad0757}){const {editor:_0x5db59e}=this,_0x2828ed=_0x5db59e['plugins']['get'](c),_0x539b39=_0x2828ed['getFootnotesDefinitionsObjectElement']();_0x539b39&&H['includes'](_0xad0757)&&_0x5db59e['model']['change'](_0x5538cc=>{_0x5538cc['setAttribute']('footnotesListStyle',_0xad0757,_0x539b39),_0x2828ed['_updateFootnotesCounters'](_0x5538cc);});}}class b extends _0x1159f6{['refresh'](){const {editor:_0x6b87c3}=this,_0x398c00=_0x6b87c3['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x398c00,this['value']=_0x398c00?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x5e5f64}){const {editor:_0x6c207f}=this,_0x74c008=_0x6c207f['plugins']['get'](c),_0x31ee3a=_0x74c008['getFootnotesDefinitionsObjectElement']();_0x31ee3a&&Number['isInteger'](_0x5e5f64)&&_0x6c207f['model']['change'](_0xbd91d6=>{_0xbd91d6['setAttribute']('footnotesListStart',_0x5e5f64,_0x31ee3a),_0x74c008['_updateFootnotesCounters'](_0xbd91d6);});}}class P extends _0x5dd69c{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x58a9a5}=this;_0x58a9a5['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x58a9a5['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x58a9a5['commands']['add']('footnotesStyle',new S(_0x58a9a5)),_0x58a9a5['commands']['add']('footnotesStart',new b(_0x58a9a5)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x4f50e8}=this,{schema:_0x5053d1}=_0x4f50e8['model'];_0x5053d1['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x33ef2f}=this,{conversion:_0x58d0e4,model:_0x4b2b64}=_0x33ef2f,{schema:_0x3c3932}=_0x4b2b64;_0x58d0e4['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','styles':{'list-style-type':/.+/}},'model':{'key':'footnotesListStyle','value':_0x4544de=>_0x4544de['getStyle']('list-style-type')}}),_0x58d0e4['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','attributes':{'start':/.+/}},'model':{'key':'footnotesListStart','value':_0x4487c3=>{const _0x24ff2f=_0x4487c3['getAttribute']('start'),_0x18d8bb=Number['parseInt'](_0x24ff2f,0xa);return Number['isNaN'](_0x18d8bb)?null:_0x18d8bb;}}}),_0x58d0e4['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','attributes':{'type':/.+/}},'model':{'key':'footnotesListStyle','value':_0x2db104=>({0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x2db104['getAttribute']('type')])}}),_0x58d0e4['for']('upcast')['add'](_0x56a495=>{_0x56a495['on']('element:ol',(_0x4b2cfb,_0x4a160e,_0xe42836)=>{const _0x5aae1f=_0x4a160e['modelRange']?.['start']['nodeAfter'];_0x5aae1f?.['is']('element','footnotesDefinitions')&&(!_0x5aae1f['hasAttribute']('footnotesListStyle')&&_0x3c3932['checkAttribute'](_0x5aae1f,'footnotesListStyle')&&_0xe42836['writer']['setAttribute']('footnotesListStyle','decimal',_0x5aae1f),!_0x5aae1f['hasAttribute']('footnotesListStart')&&_0x3c3932['checkAttribute'](_0x5aae1f,'footnotesListStart')&&_0xe42836['writer']['setAttribute']('footnotesListStart',0x1,_0x5aae1f));},{'priority':'low'});}),_0x58d0e4['for']('dataDowncast')['attributeToAttribute']({'model':{'name':'footnotesDefinitions','key':'footnotesListStart'},'view':_0x1e5d45=>0x1===_0x1e5d45?null:{'key':'start','value':String(_0x1e5d45)}}),_0x58d0e4['for']('dataDowncast')['attributeToAttribute']({'model':{'name':'footnotesDefinitions','key':'footnotesListStyle'},'view':_0x269b70=>'decimal'===_0x269b70?null:{'key':'style','value':{'list-style-type':_0x269b70}}}),_0x58d0e4['for']('editingDowncast')['add'](_0x2ac58c=>{_0x2ac58c['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x4509e7,_0x1cb216,_0x18c5a2)=>{if(!_0x18c5a2['consumable']['consume'](_0x1cb216['item'],_0x4509e7['name']))return;const _0x2764e9=C(_0x1cb216['item'],_0x18c5a2['mapper']);null===_0x1cb216['attributeNewValue']||void 0x0===_0x1cb216['attributeNewValue']||0x1===_0x1cb216['attributeNewValue']?_0x18c5a2['writer']['removeAttribute']('start',_0x2764e9):_0x18c5a2['writer']['setAttribute']('start',String(_0x1cb216['attributeNewValue']),_0x2764e9);}),_0x2ac58c['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x113af1,_0x536998,_0x602cad)=>{if(!_0x602cad['consumable']['consume'](_0x536998['item'],_0x113af1['name']))return;const _0x1becd=C(_0x536998['item'],_0x602cad['mapper']);_0x536998['attributeNewValue']&&'decimal'!==_0x536998['attributeNewValue']?_0x602cad['writer']['setStyle']('list-style-type',_0x536998['attributeNewValue'],_0x1becd):_0x602cad['writer']['removeStyle']('list-style-type',_0x1becd);});});}['_definePostfixer'](){const {editor:_0x284ac8}=this,{model:_0x509440}=_0x284ac8,_0x559420=_0x284ac8['plugins']['get'](c),_0x1717eb=this['_getDefaultListStyle'](),_0x355afa=this['_getDefaultStartIndex']();_0x509440['document']['registerPostFixer'](_0x4dc25b=>{const _0x5ba952=_0x509440['document']['differ']['getChanges']();let _0x39aa85=!0x1;for(const _0x1f9a7b of _0x5ba952){if('insert'!==_0x1f9a7b['type']||'$text'===_0x1f9a7b['name'])continue;const _0x5e0bd4=_0x509440['createRangeOn'](_0x1f9a7b['position']['nodeAfter']);for(const _0x2cd77d of _0x5e0bd4['getItems']())_0x2cd77d['is']('element','footnotesDefinitions')&&(_0x2cd77d['hasAttribute']('footnotesListStart')||(_0x4dc25b['setAttribute']('footnotesListStart',_0x355afa,_0x2cd77d),_0x39aa85=!0x0),_0x2cd77d['hasAttribute']('footnotesListStyle')||(_0x4dc25b['setAttribute']('footnotesListStyle',_0x1717eb,_0x2cd77d),_0x39aa85=!0x0));}return _0x39aa85&&_0x559420['_updateFootnotesCounters'](_0x4dc25b),_0x39aa85;});}['_defineFormatter'](){const {editor:_0x57afcc}=this;_0x57afcc['plugins']['get'](c)['setFootnoteFormatter'](_0x3e37c5=>this['_formatFootnoteListValue'](_0x3e37c5));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0xe7b06d,value:_0x4b79c4,digits:_0x5504da}){const _0x1c1ecc=_0xe7b06d['getAttribute']('footnotesListStyle'),_0x3b7c52=_0xe7b06d['getAttribute']('footnotesListStart'),_0x126291=Math['floor'](_0x4b79c4)+(_0x3b7c52-0x1);switch(_0x1c1ecc){case'decimal':default:return String(_0x126291);case'decimal-leading-zero':return function(_0x303028,_0x3ca1f2){return String(_0x303028)['padStart'](_0x3ca1f2,'0');}(_0x126291,Math['max'](0x2,_0x5504da));case'lower-alpha':case'lower-latin':return M(_0x126291,!0x1);case'upper-alpha':case'upper-latin':return M(_0x126291,!0x0);case'lower-roman':return A(_0x126291,!0x1);case'upper-roman':return A(_0x126291,!0x0);}}}function C(_0x36f5bb,_0x1eb065){const _0x45ab59=_0x1eb065['toViewElement'](_0x36f5bb);return Array['from'](_0x45ab59['getChildren']())['find'](_0x136538=>_0x136538['is']('element','ol'));}function M(_0x75ee88,_0x5d9b22){let _0x4fbb6a='',_0x5eb709=_0x75ee88;for(;_0x5eb709>0x0;){const _0x5d2517=(_0x5eb709-0x1)%0x1a;_0x4fbb6a=String['fromCharCode'](0x61+_0x5d2517)+_0x4fbb6a,_0x5eb709=Math['floor']((_0x5eb709-0x1)/0x1a);}return _0x5d9b22?_0x4fbb6a['toUpperCase']():_0x4fbb6a;}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(_0x4291a0,_0x32667e){let _0x5df6e7='',_0x4e18a0=_0x4291a0;for(const {value:_0x3798bb,numeral:_0xfe0b32}of X)for(;_0x4e18a0>=_0x3798bb;)_0x5df6e7+=_0xfe0b32,_0x4e18a0-=_0x3798bb;return _0x32667e?_0x5df6e7:_0x5df6e7['toLowerCase']();}class R extends _0x5e6fbf{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new it();['keystrokes']=new et();['focusables']=new _0x5f3227();['focusCycler'];constructor(_0x42bffa,{styleButtonViews:_0x25211e,styleGridAriaLabel:_0xc48cf}){super(_0x42bffa),(this['focusCycler']=new _0x2f996f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x25211e,_0xc48cf),[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 _0x41e7db of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x41e7db['element']);_0x1fa4bf({'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 _0x203f0d=_0x2a7789=>_0x2a7789['stopPropagation']();this['keystrokes']['set']('arrowright',_0x203f0d),this['keystrokes']['set']('arrowleft',_0x203f0d),this['keystrokes']['set']('arrowup',_0x203f0d),this['keystrokes']['set']('arrowdown',_0x203f0d);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x1f0a87,_0x4e224f){const _0xf82f43=new _0x5e6fbf(this['locale']);return _0xf82f43['children']=_0xf82f43['createCollection'](),_0xf82f43['children']['addMany'](_0x1f0a87),_0xf82f43['setTemplate']({'tag':'div','attributes':{'aria-label':_0x4e224f,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0xf82f43['children']}),_0xf82f43['children']['delegate']('execute')['to'](this),_0xf82f43['focus']=function(){for(const _0x28bf65 of this['children'])if(_0x28bf65 instanceof _0x4f7301&&_0x28bf65['isOn'])return void _0x28bf65['focus']();this['children']['first']['focus']();},_0xf82f43['focusTracker']=new it(),_0xf82f43['keystrokes']=new et(),_0xf82f43['render'](),_0xf82f43['keystrokes']['listenTo'](_0xf82f43['element']),this['children']['add'](_0xf82f43),_0xf82f43;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x1dfe1b=this['_createStartIndexPropertyView'](),_0x51740a=[_0x1dfe1b],_0x33d16b=new _0x42bd83(this['locale'],_0x51740a);return _0x33d16b['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x33d16b['buttonView']['bind']('isEnabled')['toMany'](_0x51740a,'isEnabled',(..._0x54f1a3)=>_0x54f1a3['some'](_0x4613e6=>_0x4613e6)),_0x33d16b['buttonView']['on']('change:isEnabled',(_0x353370,_0x30aa72,_0x29d1dc)=>{_0x29d1dc||(_0x33d16b['isCollapsed']=!0x0);}),this['children']['add'](_0x33d16b),[_0x1dfe1b,_0x33d16b];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x2bdb04=new tt(this['locale'],st);return _0x2bdb04['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x2bdb04['fieldView']['set']({'min':0x0,'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x2bdb04['fieldView']['on']('input',()=>{const _0x4e2bb5=_0x2bdb04['fieldView']['element'],_0x30a203=_0x4e2bb5['valueAsNumber'];Number['isNaN'](_0x30a203)?_0x2bdb04['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x4e2bb5['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x30a203}):_0x2bdb04['errorText']=t('Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.');}),_0x2bdb04;}}class j extends _0x5dd69c{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x369595,_0x121d00];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x359290}=this,{componentFactory:_0x418fe0}=_0x359290['ui'];_0x359290['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x418fe0['add']('footnotesStyle',function(_0x44a70f){return _0x2bc56a=>{const {t:t}=_0x2bc56a,_0x3a3e72=_0x44a70f['commands']['get']('footnotesStyle'),_0x3407a1=_0x24d4ee(_0x2bc56a),{buttonView:_0x4d960b}=_0x3407a1;return _0x3407a1['class']='ck-footnotes-styles-dropdown',_0x3407a1['bind']('isEnabled')['to'](_0x3a3e72,'isEnabled'),_0x4d960b['set']({'label':t('Footnotes\x20style'),'icon':_0x242f94,'tooltip':!0x0}),_0x3407a1['once']('change:isOpen',()=>{const _0x1c303f=function({editor:_0x25c163,dropdownView:_0x5ab7fe}){const {t:t}=_0x25c163['locale'],_0x2845e4=t('Footnotes\x20definitions\x20styles'),_0x5e84e4=function(_0x10d6d9){const t=_0x10d6d9['locale']['t'],_0x1d9c6b=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x3b2851},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x1c38c6},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x5a7599},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x3a4c8d},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x24244e},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0xea279a}];return _0x1d9c6b['map'](function(_0x5c67be){const _0x12d941=_0x5c67be['locale'];return({label:_0x1f07b5,icon:_0x3b9284,tooltip:_0x1bab11,style:_0x502cab})=>{const _0x513c52=_0x5c67be['commands']['get']('footnotesStyle'),_0x149b68=new _0x4f7301(_0x12d941);return _0x149b68['set']({'label':_0x1f07b5,'icon':_0x3b9284,'tooltip':_0x1bab11}),_0x149b68['bind']('isOn')['to'](_0x513c52,'value',_0x314536=>_0x314536===_0x502cab),_0x149b68['bind']('isEnabled')['to'](_0x513c52,'isEnabled'),_0x149b68['on']('execute',()=>{_0x5c67be['execute']('footnotesStyle',{'value':_0x502cab}),_0x5c67be['editing']['view']['focus']();}),_0x149b68;};}(_0x10d6d9));}(_0x25c163),_0x408193=new R(_0x25c163['locale'],{'styleGridAriaLabel':_0x2845e4,'styleButtonViews':_0x5e84e4});return _0x408193['delegate']('execute')['to'](_0x5ab7fe),_0x408193['on']('footnotesListStart',(_0x3a0800,_0x527aea)=>{_0x25c163['execute']('footnotesStart',{'value':_0x527aea['startIndex']});}),_0x408193;}({'editor':_0x44a70f,'dropdownView':_0x3407a1});_0x3407a1['panelView']['children']['add'](_0x1c303f);}),_0x3407a1;};}(_0x359290));}['afterInit'](){const {editor:_0x247058}=this,{t:t}=_0x247058['locale'],_0x4f853=_0x247058['plugins']['get'](_0x121d00),{defaultPositions:_0x16a8f8}=_0x52e42a;_0x4f853['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x247058['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0xa121a3=>{let _0x1c1221=_0xa121a3['getFirstPosition']()?.['parent'];return _0x1c1221?.['is']('$text')&&(_0x1c1221=_0x1c1221['parent']),_0x1c1221?.['is']('element')?_0x1c1221['findAncestor']($):null;},'positions':[_0x16a8f8['southArrowNorth'],_0x16a8f8['southArrowNorthMiddleWest'],_0x16a8f8['southArrowNorthMiddleEast'],_0x16a8f8['southArrowNorthWest'],_0x16a8f8['southArrowNorthEast'],_0x16a8f8['northArrowSouth'],_0x16a8f8['northArrowSouthMiddleWest'],_0x16a8f8['northArrowSouthMiddleEast'],_0x16a8f8['northArrowSouthWest'],_0x16a8f8['northArrowSouthEast'],_0x16a8f8['viewportStickyNorth']]});}}class rt extends _0x5dd69c{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-20251018.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-20251018.0",
27
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251018.0",
28
- "@ckeditor/ckeditor5-engine": "0.0.0-nightly-20251018.0",
29
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251018.0",
30
- "@ckeditor/ckeditor5-widget": "0.0.0-nightly-20251018.0",
31
- "@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-20251018.0",
32
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251018.0",
33
- "ckeditor5": "0.0.0-nightly-20251018.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 _0x3dc058}from'ckeditor5/src/core.js';import{isWidget as _0x11ce06,toWidget as _0x30bfde,toWidgetEditable as _0x56c70c}from'ckeditor5/src/widget.js';import{uid as _0x5641bb}from'ckeditor5/src/utils.js';import{PointerObserver as _0x42e9ab,ClickObserver as _0x45980d}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x477d67}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x21aa01}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x3dc058{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x477d67];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x23a404}=this;_0x23a404['config']['define']('footnotes.multiBlock',!0x0),_0x23a404['commands']['add']('insertFootnote',new _0x21aa01(_0x23a404)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x1f5409){const _0x5744a9=_0x102ca8([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]),_0x38f853=0x47a28506,_0x3640c4=0x47a5f38e^_0x38f853,_0x40d640=window[_0x102ca8([0x44,0x61,0x74,0x65])][_0x102ca8([0x6e,0x6f,0x77])](),_0x1f45e6=_0x1f5409[_0x102ca8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2141fc=new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xa0546b=>{_0x1f45e6[_0x102ca8([0x6f,0x6e,0x63,0x65])](_0x102ca8([0x72,0x65,0x61,0x64,0x79]),_0xa0546b);}),_0x1168ac={[_0x102ca8([0x6b,0x74,0x79])]:_0x102ca8([0x45,0x43]),[_0x102ca8([0x75,0x73,0x65])]:_0x102ca8([0x73,0x69,0x67]),[_0x102ca8([0x63,0x72,0x76])]:_0x102ca8([0x50,0x2d,0x32,0x35,0x36]),[_0x102ca8([0x78])]:_0x102ca8([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]),[_0x102ca8([0x79])]:_0x102ca8([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]),[_0x102ca8([0x61,0x6c,0x67])]:_0x102ca8([0x45,0x53,0x32,0x35,0x36])},_0x5e7f2c=_0x1f45e6[_0x102ca8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x102ca8([0x67,0x65,0x74])](_0x102ca8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4b2afb(){let _0x3da731,_0x244baa=null,_0x34ad67=null;try{if(_0x5e7f2c==_0x102ca8([0x47,0x50,0x4c]))return _0x102ca8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3da731=_0x426024(),!_0x3da731)return _0x102ca8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3da731[_0x102ca8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x34ad67=_0x208e5f(_0x3da731[_0x102ca8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3da731[_0x102ca8([0x6a,0x74,0x69])])),await _0x163b34()?_0x448bab()?_0x10a718()?_0x102ca8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x406de8()?(_0x3da731[_0x102ca8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x102ca8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x244baa=_0x5ef342(_0x102ca8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3da731[_0x102ca8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x102ca8([0x74,0x72,0x69,0x61,0x6c])&&(_0x244baa=_0x5ef342(_0x102ca8([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x335071()):_0x102ca8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x102ca8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x102ca8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x102ca8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x10a718(){const _0x37dc39=[_0x102ca8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x102ca8([0x74,0x72,0x69,0x61,0x6c])][_0x102ca8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3da731[_0x102ca8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x40d640/0x3e8:0xe10*_0x3640c4;return _0x3da731[_0x102ca8([0x65,0x78,0x70])]<_0x37dc39;}function _0x448bab(){const _0x504142=_0x3da731[_0x102ca8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x504142&&(!!_0x504142[_0x102ca8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x102ca8([0x2a]))||!!_0x504142[_0x102ca8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x102ca8([0x46,0x4f,0x4f])));}function _0x406de8(){const _0x272153=_0x3da731[_0x102ca8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x272153||0x0==_0x272153[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2cc994}=new URL(window[_0x102ca8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x272153[_0x102ca8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cc994))return!0x0;const _0x2cfd33=_0x2cc994[_0x102ca8([0x73,0x70,0x6c,0x69,0x74])](_0x102ca8([0x2e]));return _0x272153[_0x102ca8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x32348c=>_0x32348c[_0x102ca8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x102ca8([0x2a])))[_0x102ca8([0x6d,0x61,0x70])](_0x27d575=>_0x27d575[_0x102ca8([0x73,0x70,0x6c,0x69,0x74])](_0x102ca8([0x2e])))[_0x102ca8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xee86fd=>_0xee86fd[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2cfd33[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x102ca8([0x6d,0x61,0x70])](_0xf85efd=>Array(_0x2cfd33[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xf85efd[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x102ca8([0x66,0x69,0x6c,0x6c])](_0xf85efd[0x0]===_0x102ca8([0x2a])?_0x102ca8([0x2a]):'')[_0x102ca8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xf85efd))[_0x102ca8([0x73,0x6f,0x6d,0x65])](_0x11c192=>_0x2cfd33[_0x102ca8([0x65,0x76,0x65,0x72,0x79])]((_0x5abed7,_0x249d26)=>_0x11c192[_0x249d26]===_0x5abed7||_0x11c192[_0x249d26]===_0x102ca8([0x2a])));}function _0x335071(){return _0x244baa&&_0x34ad67?new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x55162e,_0xd7e9ea)=>{_0x244baa[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x55162e,_0xd7e9ea),_0x34ad67[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x3e099c=>{_0x3e099c!=_0x102ca8([0x56,0x61,0x6c,0x69,0x64])&&_0x55162e(_0x3e099c);},_0xd7e9ea);}):_0x244baa||_0x34ad67||_0x102ca8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x208e5f(_0x2afd9e,_0x456240){return new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x44251c=>{if(_0x1574eb())return _0x44251c(_0x102ca8([0x56,0x61,0x6c,0x69,0x64]));_0x15ba0e(),_0x1f45e6[_0x102ca8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x102ca8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1aa3c0=!0x1;const _0xdc49f2=_0x5641bb();function _0x35ce7b(_0x3e8342){return!!_0x3e8342&&(typeof _0x3e8342===_0x102ca8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3e8342===_0x102ca8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3e8342[_0x102ca8([0x74,0x68,0x65,0x6e])]===_0x102ca8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3e8342[_0x102ca8([0x63,0x61,0x74,0x63,0x68])]===_0x102ca8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4b42b5(_0x5c4d23){_0x448233(_0x5c4d23)[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x39a82b=>{if(!_0x39a82b||_0x39a82b[_0x102ca8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x102ca8([0x6f,0x6b]))return _0x102ca8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x170d5c(_0x2c1e56(_0xdc49f2+_0x456240))!=_0x39a82b[_0x102ca8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x102ca8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x102ca8([0x56,0x61,0x6c,0x69,0x64]);})[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x394b43=>(_0x42d4f1(),_0x394b43),()=>{const _0x2b547e=_0x36e290();return null==_0x2b547e?(_0x42d4f1(),_0x102ca8([0x56,0x61,0x6c,0x69,0x64])):_0x102ca8(_0x40d640-_0x2b547e>(0x63ae0106^_0x38f853)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x44251c)[_0x102ca8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x44251c(_0x102ca8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x13f58e=0x47946b86^_0x38f853;function _0x42d4f1(){const _0x3f32c9=_0x102ca8([0x6c,0x6c,0x63,0x74,0x2d])+_0x170d5c(_0x2c1e56(_0x2afd9e)),_0x466ca=_0x534d41(_0x170d5c(window[_0x102ca8([0x4d,0x61,0x74,0x68])][_0x102ca8([0x63,0x65,0x69,0x6c])](_0x40d640/_0x13f58e)));window[_0x102ca8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x102ca8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f32c9,_0x466ca);}function _0x36e290(){const _0x2eb3ab=_0x102ca8([0x6c,0x6c,0x63,0x74,0x2d])+_0x170d5c(_0x2c1e56(_0x2afd9e)),_0x2185e3=window[_0x102ca8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x102ca8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2eb3ab);return _0x2185e3?window[_0x102ca8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x534d41(_0x2185e3),0x10)*_0x13f58e:null;}function _0x448233(_0x3d8f70){return new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x430f68,_0x3f8fca)=>{_0x3d8f70[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x430f68,_0x3f8fca),window[_0x102ca8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3f8fca,0x47a351c6^_0x38f853);});}}_0x1f45e6[_0x102ca8([0x6f,0x6e])](_0x102ca8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x54ddfe,_0x2a370f)=>{if(_0x2a370f[0x0]!=_0x2afd9e)return _0x44251c(_0x102ca8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2a370f[0x1]={..._0x2a370f[0x1],[_0x102ca8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xdc49f2};},{[_0x102ca8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x102ca8([0x68,0x69,0x67,0x68])}),_0x1f45e6[_0x102ca8([0x6f,0x6e])](_0x102ca8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4c58f4=>{_0x35ce7b(_0x4c58f4[_0x102ca8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1aa3c0=!0x0,_0x4b42b5(_0x4c58f4[_0x102ca8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x102ca8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x102ca8([0x6c,0x6f,0x77])}),_0x2141fc[_0x102ca8([0x74,0x68,0x65,0x6e])](()=>{_0x1aa3c0||_0x44251c(_0x102ca8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1574eb(){return _0x1f45e6[_0x102ca8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x102ca8([0x76,0x69,0x65,0x77])][_0x102ca8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x102ca8([0x61,0x75,0x74,0x6f]);}function _0x15ba0e(){_0x1f45e6[_0x102ca8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x102ca8([0x76,0x69,0x65,0x77])][_0x102ca8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x102ca8([0x61,0x75,0x74,0x6f]);}}function _0x5ef342(_0x4e3a31){const _0x5526a1=[new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x491689=>setTimeout(_0x491689,0x47abbbca^_0x38f853)),_0x2141fc[_0x102ca8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2571b9=>{let _0x5eecb2=0x0;_0x1f45e6[_0x102ca8([0x6d,0x6f,0x64,0x65,0x6c])][_0x102ca8([0x6f,0x6e])](_0x102ca8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x20f73d,_0x489b74)=>{_0x489b74[0x0][_0x102ca8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5eecb2++,_0x5eecb2==(0x47a284fe^_0x38f853)&&(_0x2571b9(),_0x20f73d[_0x102ca8([0x6f,0x66,0x66])]());});}))];return window[_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x102ca8([0x72,0x61,0x63,0x65])](_0x5526a1)[_0x102ca8([0x74,0x68,0x65,0x6e])](()=>_0x4e3a31);}async function _0x22dcd4(){await _0x2141fc,_0x1f45e6[_0x102ca8([0x6d,0x6f,0x64,0x65,0x6c])][_0x102ca8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x249850,_0x1f45e6[_0x102ca8([0x6d,0x6f,0x64,0x65,0x6c])][_0x102ca8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x249850,_0x1f45e6[_0x102ca8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x102ca8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3f33b8(_0x2e530f){const _0x459bf3=_0x3cb49a();_0x1f45e6[_0x459bf3]=_0x102ca8([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2e530f,_0x2e530f!=_0x102ca8([0x56,0x61,0x6c,0x69,0x64])&&_0x22dcd4();}function _0x3cb49a(){const _0xedbf=window[_0x102ca8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x102ca8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x102ca8([0x6e,0x6f,0x77])]())[_0x102ca8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x102ca8([0x2e]),'');let _0xcce80=_0x102ca8([0x75]);for(let _0x109282=0x0;_0x109282<_0xedbf[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x109282+=0x2){let _0x2f2185=window[_0x102ca8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xedbf[_0x102ca8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x109282,_0x109282+0x2));_0x2f2185>=_0x5744a9[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2f2185-=_0x5744a9[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xcce80+=_0x5744a9[_0x2f2185];}return _0xcce80;}function _0x426024(){const _0x156f78=_0x5e7f2c[_0x102ca8([0x73,0x70,0x6c,0x69,0x74])](_0x102ca8([0x2e]));if(0x3!=_0x156f78[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x302cbb(_0x156f78[0x1]);function _0x302cbb(_0x1afba5){const _0x2e692a=_0x28c232(_0x1afba5);return _0x2e692a&&_0x102ba3()?_0x2e692a:null;function _0x102ba3(){const _0x53a7c9=_0x2e692a[_0x102ca8([0x6a,0x74,0x69])],_0x6123e=window[_0x102ca8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x53a7c9[_0x102ca8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x53a7c9[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x287517={..._0x2e692a,[_0x102ca8([0x6a,0x74,0x69])]:_0x53a7c9[_0x102ca8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x53a7c9[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x287517[_0x102ca8([0x76,0x63])],_0x2c1e56(_0x287517)==_0x6123e;}}}async function _0x163b34(){let _0x3d0546=!0x0;try{const _0x3130fe=_0x5e7f2c[_0x102ca8([0x73,0x70,0x6c,0x69,0x74])](_0x102ca8([0x2e])),[_0x31eb1b,_0x248bd8,_0x5b1405]=_0x3130fe;return _0x52b901(_0x31eb1b),await _0x2a993d(_0x31eb1b,_0x248bd8,_0x5b1405),_0x3d0546;}catch{return!0x1;}function _0x52b901(_0x258d23){const _0x4d6272=_0x28c232(_0x258d23);_0x4d6272&&_0x4d6272[_0x102ca8([0x61,0x6c,0x67])]==_0x102ca8([0x45,0x53,0x32,0x35,0x36])||(_0x3d0546=!0x1);}async function _0x2a993d(_0x5a3ff0,_0x5455a3,_0xaeaeb4){const _0xc61209=window[_0x102ca8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x102ca8([0x66,0x72,0x6f,0x6d])](_0x3fe880(_0xaeaeb4),_0x4d70d=>_0x4d70d[_0x102ca8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3acc22=new window[(_0x102ca8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x102ca8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5a3ff0+_0x102ca8([0x2e])+_0x5455a3),_0x126d65=window[_0x102ca8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x102ca8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x126d65)return;const _0x3221cc=await _0x126d65[_0x102ca8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x102ca8([0x6a,0x77,0x6b]),_0x1168ac,{[_0x102ca8([0x6e,0x61,0x6d,0x65])]:_0x102ca8([0x45,0x43,0x44,0x53,0x41]),[_0x102ca8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x102ca8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x102ca8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x126d65[_0x102ca8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x102ca8([0x6e,0x61,0x6d,0x65])]:_0x102ca8([0x45,0x43,0x44,0x53,0x41]),[_0x102ca8([0x68,0x61,0x73,0x68])]:{[_0x102ca8([0x6e,0x61,0x6d,0x65])]:_0x102ca8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3221cc,_0xc61209,_0x3acc22)||(_0x3d0546=!0x1);}}function _0x28c232(_0x317a82){return _0x317a82[_0x102ca8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x102ca8([0x65,0x79]))?JSON[_0x102ca8([0x70,0x61,0x72,0x73,0x65])](_0x3fe880(_0x317a82)):null;}function _0x3fe880(_0x5ba3e8){return window[_0x102ca8([0x61,0x74,0x6f,0x62])](_0x5ba3e8[_0x102ca8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x102ca8([0x2b]))[_0x102ca8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x102ca8([0x2f])));}function _0x2c1e56(_0x401bfd){let _0x46ee63=0x1505;function _0x166d9d(_0x44da0c){for(let _0x98f55e=0x0;_0x98f55e<_0x44da0c[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x98f55e++){const _0x1a8fa7=_0x44da0c[_0x102ca8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x98f55e);_0x46ee63=(_0x46ee63<<0x5)+_0x46ee63+_0x1a8fa7,_0x46ee63&=_0x46ee63;}}function _0x315211(_0x75bd6e){Array[_0x102ca8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x75bd6e)?_0x75bd6e[_0x102ca8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x315211):_0x75bd6e&&typeof _0x75bd6e==_0x102ca8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x102ca8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x75bd6e)[_0x102ca8([0x73,0x6f,0x72,0x74])]()[_0x102ca8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3c34b4,_0x1a961f])=>{_0x166d9d(_0x3c34b4),_0x315211(_0x1a961f);}):_0x166d9d(window[_0x102ca8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x75bd6e));}return _0x315211(_0x401bfd),_0x46ee63>>>0x0;}function _0x170d5c(_0x38f2a4){return _0x38f2a4[_0x102ca8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x102ca8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x102ca8([0x30]));}function _0x534d41(_0x57a704){return _0x57a704[_0x102ca8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x102ca8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x102ca8([0x6a,0x6f,0x69,0x6e])]('');}function _0x249850(){}function _0x102ca8(_0x5da37f){return _0x5da37f['map'](_0x467037=>String['fromCharCode'](_0x467037))['join']('');}_0x3f33b8(await _0x4b2afb());}(this);}['_moveSelectionToFootnoteDefinition'](_0x5cc489){const {plugins:_0x3aaaad,editing:_0x29af3f,model:_0x2d25f1}=this['editor'],_0x55a69c=_0x3aaaad['get'](_0x477d67)['getFootnote'](_0x5cc489);return!!_0x55a69c&&(_0x2d25f1['change'](_0x291e4e=>{_0x291e4e['setSelection'](_0x291e4e['createPositionAt'](_0x55a69c['definition'],'end'));}),_0x29af3f['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x49c3d8){const {plugins:_0x4c3a12,editing:_0x35428b,model:_0x256a1d}=this['editor'],_0x5ca5b8=_0x4c3a12['get'](_0x477d67)['getFootnote'](_0x49c3d8);return!!_0x5ca5b8&&(_0x256a1d['change'](_0x315555=>{_0x315555['setSelection'](_0x5ca5b8['reference'],'on');}),_0x35428b['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x46a330}=this['editor']['model'],_0xcb0ab8=this['editor']['config']['get']('footnotes.multiBlock');_0x46a330['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x46a330['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x46a330['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0xcb0ab8?_0x46a330['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x46a330['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x46a330['addChildCheck'](_0x26cf0b=>{for(const _0x58dd74 of _0x26cf0b)if('footnoteDefinition'===_0x58dd74['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x2a719e}=this,{conversion:_0x1c16dd,editing:_0x8f1fe4}=_0x2a719e,{t:t}=_0x2a719e['locale'];_0x1c16dd['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x2902ec,{writer:_0x528211,consumable:_0x83fa1b})=>{const _0x42c0e1=_0x2902ec['getChild'](0x0);if(!_0x42c0e1||!_0x42c0e1['is']('element','a'))return null;const _0x2329ff=_0x42c0e1['getAttribute']('href')||'';if(!_0x2329ff['startsWith']('#'))return null;const _0xf703dd=_0x2329ff['replace'](/^#/,'');if(!_0xf703dd)return null;_0x83fa1b['consume'](_0x42c0e1,{'name':!0x0,'attributes':['href']});for(const {item:_0x4583da}of _0x8f1fe4['view']['createRangeIn'](_0x42c0e1))_0x4583da['is']('$textProxy')?_0x83fa1b['consume'](_0x4583da['textNode'],{'name':!0x0}):_0x4583da['is']('element')&&_0x83fa1b['consume'](_0x4583da,{'name':!0x0});return _0x528211['createElement']('footnoteRef',{'footnoteId':_0xf703dd});}}),_0x1c16dd['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x8a0e47,{writer:_0x353f7e})=>g(_0x8a0e47,_0x353f7e)}),_0x1c16dd['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0xe20da1,{writer:_0x109d8d})=>{const _0x1fa574=_0xe20da1['getAttribute']('footnoteCounter');return _0x30bfde(g(_0xe20da1,_0x109d8d),_0x109d8d,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x1fa574)});}});}['_defineDefinitionsConverters'](){const {editor:_0x3d1134}=this,{t:t}=_0x3d1134['locale'],{conversion:_0x5991bd}=_0x3d1134;_0x5991bd['for']('upcast')['elementToElement']({'view':{'name':'ol','classes':['footnotes']},'model':'footnotesDefinitions','converterPriority':'high'}),_0x5991bd['for']('dataDowncast')['elementToElement']({'model':'footnotesDefinitions','view':{'name':'ol','classes':['footnotes']}}),_0x5991bd['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x16e2e2,{writer:_0x5934de})=>{const _0x44bb8a=_0x5934de['createContainerElement']('div',{'class':'footnotes-wrapper','data-footnotes-list-label':t('Footnotes')},_0x5934de['createContainerElement']('ol',{'class':'footnotes'},_0x5934de['createSlot']())),_0x5c2401=_0x30bfde(_0x44bb8a,_0x5934de,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x5934de['setCustomProperty']('footnotesDefinitions',!0x0,_0x5c2401),_0x5c2401;}});}['_defineDefinitionConverters'](){const {editor:_0x53cd94}=this,{conversion:_0x383dbc,locale:_0x3b0606}=_0x53cd94,_0x34cf7c=_0x53cd94['config']['get']('footnotes.multiBlock');_0x383dbc['for']('upcast')['add'](_0x454516=>{_0x454516['on']('element:li',(_0x1532c6,_0x445f18,_0x3f3400)=>{const _0x2277ea=_0x445f18['viewItem'];if(!_0x2277ea['hasClass']('footnote-definition')||!_0x2277ea['getAttribute']('id'))return;const _0x2bda75=_0x2277ea['parent'];if(!_0x2bda75['is']('element','ol')||!_0x2bda75['hasClass']('footnotes'))return;if(!_0x3f3400['consumable']['test'](_0x2277ea,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x155873=_0x3f3400['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x2277ea['getAttribute']('id')});if(!_0x3f3400['safeInsert'](_0x155873,_0x445f18['modelCursor']))return;_0x3f3400['consumable']['consume'](_0x2277ea,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x4e42da=Array['from'](_0x2277ea['getChildren']())['find'](_0x39e8c3=>_0x39e8c3['is']('element')&&_0x39e8c3['hasClass']('footnote-content'));for(const _0x18fbcb of _0x2277ea['getChildren']())_0x18fbcb['is']('element')&&(_0x3f3400['consumable']['consume'](_0x18fbcb,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x3f3400['consumable']['consume'](_0x18fbcb,{'name':!0x0,'classes':'footnote-content'}));if(_0x4e42da){if(_0x34cf7c)_0x3f3400['convertChildren'](_0x4e42da,_0x155873);else{const _0x184015=_0x3f3400['writer']['createElement']('footnoteInlineContent');_0x3f3400['writer']['insert'](_0x184015,_0x155873),_0x3f3400['convertChildren'](_0x4e42da,_0x184015);}}_0x3f3400['updateConversionResult'](_0x155873,_0x445f18);});}),_0x383dbc['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x120925,{writer:_0xc36aa9})=>D(_0x120925,_0xc36aa9,_0x3b0606,{'dataPipeline':!0x0})}),_0x383dbc['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x37ad8e,{writer:_0x50f413})=>D(_0x37ad8e,_0x50f413,_0x3b0606)});}['_defineBogusParagraphConverters'](){const {editor:_0x2a9168}=this,{conversion:_0x4d23d0}=_0x2a9168;_0x2a9168['config']['get']('footnotes.multiBlock')?(_0x4d23d0['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x4d23d0['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x2a9168['model']['document'],'change:data',()=>{!function(_0x42b428,_0xeb939e){const _0x86b39d=_0x42b428['document']['differ'],_0x533cfb=new Set();for(const _0x3b3cb5 of _0x86b39d['getChanges']()){const _0x2c3b84='attribute'==_0x3b3cb5['type']?_0x3b3cb5['range']['start']['parent']:_0x3b3cb5['position']['parent'];_0x2c3b84['is']('element','footnoteDefinition')&&_0x533cfb['add'](_0x2c3b84);}for(const _0x1fa586 of _0x533cfb['values']()){const _0x1b5b5e=Array['from'](_0x1fa586['getChildren']())['filter'](_0x420d75=>p(_0x420d75,_0xeb939e['mapper']));for(const _0x2aefb4 of _0x1b5b5e)_0xeb939e['reconvertItem'](_0x2aefb4);}}(_0x2a9168['model'],_0x2a9168['editing']);})):(_0x4d23d0['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x4d23d0['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x164a50,{writer:_0x103a79})=>{const _0x5e4960=_0x103a79['createContainerElement']('span');return _0x103a79['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x5e4960),_0x5e4960;}}));}['_defineKeyboardHandlers'](){const {editor:_0x406bf1}=this,{editing:_0x5ba230,t:t}=_0x406bf1,_0x10c464=_0x406bf1['model']['document']['selection'];_0x406bf1['keystrokes']['set']('CTRL+Alt+D','insertFootnote'),_0x406bf1['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+D'}]}),this['listenTo'](_0x5ba230['view']['document'],'enter',(_0x460c02,_0x26a561)=>{const _0x29b99a=function(_0x301855){const _0x3b4c6d=_0x301855['getSelectedElement']();if(_0x3b4c6d?.['is']('element','footnoteRef'))return _0x3b4c6d;return null;}(_0x10c464);if(_0x29b99a){const _0x1afdcd=_0x29b99a['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x1afdcd),_0x26a561['preventDefault'](),_0x460c02['stop']();}},{'context':_0x11ce06});}['_defineClickHandlers'](){const {editor:_0x28e94b}=this,{editing:_0x2c61c8}=_0x28e94b;_0x28e94b['editing']['view']['addObserver'](_0x42e9ab),_0x28e94b['editing']['view']['addObserver'](_0x45980d);let _0x442e35=!0x1;this['listenTo'](_0x2c61c8['view']['document'],'pointerdown',(_0x2e8278,_0x47fe05)=>{const {target:_0xebad39}=_0x47fe05,_0x4152a7=_0x2c61c8['view']['document']['selection'];_0x442e35=!(!_0xebad39['is']('element','sup')||!_0xebad39['hasClass']('footnote'))&&_0x4152a7['getSelectedElement']()===_0xebad39;},{'priority':'high'}),this['listenTo'](_0x2c61c8['view']['document'],'click',(_0x302dcf,_0x3881c6)=>{const {target:_0x51e108}=_0x3881c6,_0x33e59c=_0x51e108['getChild'](0x0)['getAttribute']('href');this['_moveSelectionToFootnoteDefinition'](_0x33e59c['slice'](0x1)),_0x302dcf['stop'](),_0x3881c6['preventDefault']();},{'priority':'high','context':_0x32e7d2=>_0x32e7d2['is']('element','sup')&&_0x32e7d2['hasClass']('footnote')&&_0x442e35}),this['listenTo'](_0x2c61c8['view']['document'],'click',(_0xfd162a,_0x1ab241)=>{const {target:_0x129c71}=_0x1ab241;if(!_0x129c71['is']('element','a'))return;let _0x320789=_0x129c71['getAttribute']('href');if(!_0x320789?.['startsWith']('#'))return;_0x320789=_0x320789['slice'](0x1);let _0xc1da5a=!0x1;(_0x320789['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x320789['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x320789))&&(_0xc1da5a=!0x0),_0xc1da5a&&(_0x1ab241['preventDefault'](),_0xfd162a['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x594699}={}){return(_0xd81c50,{writer:_0x1f1f53})=>{if(!h(_0xd81c50))return null;if(!_0x594699)return _0x1f1f53['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x4dac84=_0x1f1f53['createContainerElement']('p');return _0x1f1f53['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x4dac84),_0x4dac84;};}function h(_0x12e747){const {parent:_0x25cf10}=_0x12e747;if(!_0x25cf10?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x25cf10['childCount'])return!0x1;for(const _0x5b5602 of _0x12e747['getAttributeKeys']())if(!_0x5b5602['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x5b5602)return!0x1;return!0x0;}function p(_0x3662a0,_0x4ed484){if(!_0x3662a0['is']('element','paragraph'))return!0x1;const _0x21deb7=_0x4ed484['toViewElement'](_0x3662a0);return!!_0x21deb7&&h(_0x3662a0)!==_0x21deb7['is']('element','span');}export function isFootnotesDefinitionsWidget(_0xbbbaf7){return _0x11ce06(_0xbbbaf7)&&_0xbbbaf7['is']('containerElement')&&!!_0xbbbaf7['getCustomProperty']('footnotesDefinitions');}function g(_0x5a6552,_0x33aeb2){const _0x432443=_0x5a6552['getAttribute']('footnoteId'),_0x440ad3=_0x5a6552['getAttribute']('footnoteCounter'),_0x313855=_0x33aeb2['createUIElement']('a',{'id':'ref-'+_0x432443,'href':'#'+_0x432443},function(_0x2832c5){const _0x4df48a=this['toDomElement'](_0x2832c5);return _0x4df48a['textContent']=_0x440ad3,_0x4df48a;}),_0x368c34=_0x33aeb2['createContainerElement']('sup',{'class':'footnote'},[_0x313855]);return _0x368c34['getFillerOffset']=()=>null,_0x368c34;}function D(_0x241729,_0x57fd03,_0x3485a3,{dataPipeline:_0x2f679b}={}){const {t:t}=_0x3485a3,_0xa04b7e=_0x241729['getAttribute']('footnoteId'),_0x323102=_0x57fd03['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0xa04b7e},function(_0x88b667){const _0x18f414=this['toDomElement'](_0x88b667);return _0x18f414['innerText']='^',_0x18f414;}),_0x5d07b9=_0x2f679b?_0x57fd03['createContainerElement']('div',{'class':'footnote-content'}):_0x56c70c(_0x57fd03['createEditableElement']('div',{'class':'footnote-content'}),_0x57fd03,{'label':t('Footnote\x20content.')});return _0x57fd03['insert'](_0x57fd03['createPositionAt'](_0x5d07b9,0x0),_0x57fd03['createSlot']()),_0x57fd03['createContainerElement']('li',{'class':'footnote-definition','id':_0xa04b7e},[_0x323102,_0x5d07b9]);}
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]);}