@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251029.0 → 0.0.0-nightly-20251030.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.
- package/build/footnotes.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +9 -9
- package/src/footnotesediting.js +1 -1
package/build/footnotes.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
|
-
*/(()=>{var t={14:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content .footnote-content ul{list-style-type:disc}.ck-content .footnote-content ul ul{list-style-type:circle}.ck-content .footnote-content ul ul ul,.ck-content .footnote-content ul ul ul ul{list-style-type:square}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},331:(t,e,n)=>{t.exports=n(237)("./src/clipboard.js")},355:(t,e,n)=>{t.exports=n(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=o.base?c[0]+o.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=n(f),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var p=i(h,o);o.byIndex=a,e.splice(a,0,{identifier:f,updater:p,references:1})}r.push(f)}return r}function i(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=o(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=n(s[r]);e[a].references--}for(var c=o(t,i),l=0;l<s.length;l++){var u=n(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function o(t,e,o,i){var s;if(o)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,n=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(n,e,!1,t)},remove:function(t){o(n,e,!0,t)}}}},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},901:(t,e,n)=>{t.exports=n(237)("./src/widget.js")},945:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Footnotes:()=>$,FootnotesClipboard:()=>T,FootnotesEditing:()=>v,FootnotesProperties:()=>xt,FootnotesPropertiesEditing:()=>ht,FootnotesPropertiesUI:()=>kt,FootnotesStartCommand:()=>ut,FootnotesStyleCommand:()=>rt,FootnotesTracker:()=>h,FootnotesUI:()=>q,InsertFootnoteCommand:()=>y});var t=n(782),e=n(901),i=n(584),s=n(783);function r(t,e){const n=a();return(r=function(t,e){return n[t-=394]})(t,e)}function a(){const t=["elementName","237095WkrMhk","_trackedElements","20EhaJFa","_getElementKey","reset","408KuCnhI","values","rootName","getItems","remove","createRangeOn","type","insert","_model","element","name","from","211444kaeEsW","clear","position","get","10554710SuWLeT","_elementName","flat","$text","slice","getChanges","29786460llRUYe","$graveyard","15auiESh","69202ILhsnc","set","add","18pLOwZv","nodeAfter","attributes","length","328002pUXgsK","root","getElementKey","has","delete","4897600rMZLTE","push"];return(a=function(){return t})()}const c=r;!function(t){const e=r,n=t();for(;;)try{if(662534===parseInt(e(409))/1+-parseInt(e(434))/2*(parseInt(e(401))/3)+-parseInt(e(419))/4*(parseInt(e(417))/5)+-parseInt(e(422))/6*(-parseInt(e(402))/7)+parseInt(e(414))/8*(-parseInt(e(405))/9)+-parseInt(e(438))/10+parseInt(e(399))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(a);class l{[c(430)];[c(394)];[c(420)];[c(418)]=new Map;constructor(t,e){const n=c;this[n(430)]=t,this[n(394)]=e[n(416)],this[n(420)]=e[n(411)]}[c(421)](){const t=c;this[t(418)][t(435)]()}[c(398)](t){const e=c,n=new Set,o=new Map;for(const i of t){if(e(429)===i[e(428)]&&e(396)!==i[e(432)]&&i[e(436)][e(406)]){const t=this[e(430)][e(427)](i[e(436)][e(406)]);for(const n of t[e(425)]()){if(!n.is(e(431),this[e(394)]))continue;const t=this[e(420)](n);o[e(412)](t)||o[e(403)](t,[]),o[e(437)](t)[e(415)](n)}}if(e(426)===i[e(428)]&&i[e(432)]===this[e(394)]){const t=this[e(420)]({getAttribute:t=>i[e(407)][e(437)](t)});n[e(404)](t)}}for(const[t,o]of this[e(418)])e(400)===o[e(410)][e(424)]&&n[e(404)](t);for(const t of n)this[e(418)][e(413)](t);for(const[t,n]of o)this[e(418)][e(403)](t,n[n[e(408)]-1]);const i=new Set;for(const[t,s]of o)n[e(412)](t)&&(i[e(404)](s[0]),s[e(408)]>1?o[e(403)](t,s[e(397)](1)):o[e(413)](t),n[e(413)](t));return{removed:Array[e(433)](n),inserted:Array[e(433)](o[e(423)]())[e(395)](),moved:Array[e(433)](i)}}}const u=d;function f(){const t=["_footnotes","footnoteId","$graveyard","_footnoteRefsTracker","createRangeIn","min","push","createElement","234iqUkOn","get","listenTo","_footnoteDefsContainerTracker","_insertEmptyFootnotesDefinitionsContainer","_ensureFootnotesReferencesHaveProperOrder","_handleMovedFootnoteReference","300480WssQWH","FootnotesTracker","180weXaEz","change:data","high","after","_handleFootnoteReferencesChanges","_ensureFootnotesDefinitionsContainerExists","_handleInsertedFootnoteReference","9UhdHPY","setAttribute","add","getChanges","1064geMKxt","getChildren","some","editor","_updateFootnotesCounters","singleton","differ","append","end","init","createPositionBefore","reference","parent","_footnotesDefinitions","definition","footnoteRef","getFootnotesDefinitionsObjectElement","childCount","getFootnotesFormatter","isOfficialPlugin","footnoteDefinition","map","440FXKqto","splice","indexOf","115601TxYBic","move","getFootnotes","pluginName","22297XYizjc","compareWith","createRangeOn","unshift","getFootnote","_footnoteFormatter","enqueueChange","paragraph","_sortFootnoteDefinitions","setFootnoteFormatter","isPremiumPlugin","from","footnoteCounter","has","1073110mgkLUF","_handleFootnotesDefinitionsObjectChanges","config","find","_handleFootnoteDefinitionsChanges","document","createPositionAt","_updateFootnoteRefCounter","_handleFootnotesDefinitionsObjectSync","set","getRootNames","819231RQNhmS","isEqual","rootName","findIndex","root","footnoteInlineContent","registerPostFixer","length","19334yaxvvx","before","model","insert","_handleRemoveFootnoteReferenceById","reset","footnotes.multiBlock","low","remove","getAttribute","_footnoteDefsTracker","2PNTqeV","footnotesDefinitions"];return(f=function(){return t})()}function d(t,e){const n=f();return(d=function(t,e){return n[t-=412]})(t,e)}!function(t){const e=d,n=t();for(;;)try{if(202440===parseInt(e(513))/1*(-parseInt(e(458))/2)+parseInt(e(439))/3+parseInt(e(488))/4*(-parseInt(e(510))/5)+parseInt(e(468))/6*(parseInt(e(447))/7)+parseInt(e(475))/8+parseInt(e(484))/9*(-parseInt(e(428))/10)+-parseInt(e(414))/11*(-parseInt(e(477))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(f);class h extends t.Plugin{[u(460)]=[];[u(501)]=null;[u(419)]=null;[u(471)];[u(463)];[u(457)];static get[u(413)](){return u(476)}static get[u(507)](){return!0}static get[u(424)](){return!0}constructor(t){const e=u;super(t),this[e(471)]=new l(this[e(491)][e(449)],{elementName:e(459),getElementKey:()=>e(493)}),this[e(463)]=new l(this[e(491)][e(449)],{elementName:e(503),getElementKey:t=>t[e(456)](e(461))}),this[e(457)]=new l(this[e(491)][e(449)],{elementName:e(508),getElementKey:t=>t[e(456)](e(461))})}[u(497)](){const t=u,{editor:e}=this,{model:n,data:o}=e;n[t(433)][t(445)](e=>{const o=t,i=n[o(433)][o(494)][o(487)]();let s=!1;return this[o(429)](e,i)&&(s=!0),this[o(432)](e,i)&&(s=!0),this[o(481)](e,i)&&(s=!0),this[o(473)](e)&&(s=!0),this[o(436)](e)&&(s=!0),this[o(422)](e)&&(s=!0),s}),this[t(470)](n[t(433)],t(478),()=>{const e=t;n[e(420)]({isUndoable:!1},t=>{this[e(482)](t)})},{priority:t(454)}),this[t(470)](o,t(437),()=>{const e=t;this[e(460)]=[],this[e(471)][e(452)](),this[e(463)][e(452)](),this[e(457)][e(452)]()},{priority:t(479)})}[u(504)](){return this[u(501)]}[u(418)](t){const e=u;return this[e(460)][e(431)](e=>e.id===t)||null}[u(412)](){const t=u;return Array[t(425)](this[t(460)])}[u(506)](){return this[u(419)]}[u(423)](t){this[u(419)]=t}[u(492)](t,e=0){const n=u;let o=!1;for(let i=e;i<this[n(460)][n(446)];i++)this[n(435)](t,i)&&(o=!0);return o}[u(472)](t,e){const n=u,o=t[n(467)](n(459),{});return t[n(495)](o,e),this[n(501)]=o,o}[u(482)](t){const e=u;if(!this[e(460)][e(446)]||this[e(501)])return;const n=this[e(460)][0][e(499)][e(443)],o=this[e(472)](t,n);for(const n of this[e(460)])n[e(502)][e(500)]||t[e(450)](n[e(502)],o,e(496));this[e(492)](t)}[u(429)](t,e){const n=u;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(471)][n(487)](e);if(r[n(446)]&&(this[n(501)]=r[0]),i[n(446)])if(i[n(446)]>1||this[n(501)]&&i[n(490)](t=>t!==this[n(501)])){const e=t[n(467)](n(459),{}),s=[];this[n(501)]&&s[n(466)](this[n(501)]),s[n(466)](...i),t[n(450)](e,s[0],n(448));for(const o of s)t[n(514)](t[n(464)](o),t[n(434)](e,n(496))),t[n(455)](o);this[n(501)]=e,this[n(492)](t),o=!0}else this[n(501)]=i[0];if(s[n(446)]&&n(462)===this[n(501)]?.[n(443)][n(441)]){for(const e of this[n(460)])t[n(455)](e[n(499)]),o=!0;this[n(460)]=[],this[n(501)]=null}return o}[u(432)](t,e){const n=u;let o=!1;const i=this[n(491)][n(430)][n(469)](n(453)),{inserted:s,moved:r}=this[n(457)][n(487)](e);for(const e of[...r,...s]){const s=e[n(456)](n(461)),r=this[n(418)](s);r&&(r[n(502)]=e),p(t,i,e)&&(o=!0)}return o}[u(481)](t,e){const n=u;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(463)][n(487)](e);for(const e of i)this[n(451)](t,e)&&(o=!0);for(const e of s)this[n(483)](t,e)&&(o=!0);for(const e of r)this[n(474)](t,e)&&(o=!0);return o}[u(436)](t){const e=u;if(!this[e(501)])return!1;let n=!1;if(this[e(501)][e(505)]!==this[e(460)][e(446)]){const o=[];for(const t of this[e(501)][e(489)]()){const i=t[e(456)](e(461));this[e(418)](i)||(o[e(417)](t),n=!0)}for(const n of o)t[e(455)](n)}const o=new Set,i=[];for(const t of this[e(501)][e(489)]()){const s=t[e(456)](e(461));o[e(427)](s)?(i[e(417)](t),n=!0):o[e(486)](s)}for(const n of i)t[e(455)](n);return this[e(501)][e(505)]||(t[e(455)](this[e(501)]),this[e(501)]=null,n=!0),n}[u(483)](t,e){const n=u;if(this[n(460)][n(431)](t=>t[n(499)]===e))return!1;let o=!1;const i=e[n(456)](n(461)),s=this[n(460)][n(442)](t=>t.id===i);-1!==s&&(t[n(455)](this[n(460)][s][n(499)]),this[n(460)][n(511)](s,1),o=!0);let r=this[n(501)]?function(t,e){const o=n;for(const n of t[o(489)]())if(n[o(456)](o(461))===e)return n;return null}(this[n(501)],i):null;r||(r=t[n(467)](n(508),{footnoteId:i}),this[n(501)]&&(t[n(450)](r,this[n(501)],n(496)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(491)][n(449)],this[n(460)],e);this[n(460)][n(511)](c,0,a);let l=c;return-1!==s&&(l=Math[n(465)](c,s)),this[n(492)](t,l)&&(o=!0),o}[u(451)](t,e){const n=u,o=this[n(460)][n(442)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(460)][o];return n(462)!==s[n(502)][n(443)][n(441)]&&(t[n(455)](s[n(502)]),i=!0),this[n(460)][n(511)](o,1),this[n(492)](t,o)&&(i=!0),i}[u(474)](t,e){const n=u,o=e[n(456)](n(461)),i=this[n(460)][n(442)](t=>t.id===o),s=this[n(460)][i];let r=!1;s[n(499)]=e,this[n(460)][n(511)](i,1);const a=m(this[n(491)][n(449)],this[n(460)],e);return this[n(460)][n(511)](a,0,s),this[n(492)](t,Math[n(465)](i,a))&&(r=!0),r}[u(435)](t,e){const n=u;if(!this[n(501)])return!1;const o=this[n(460)][e];let i;return i=this[n(419)]?this[n(419)]({footnote:o,container:this[n(501)],digits:String(this[n(460)][n(446)])[n(446)],value:e+1}):String(e+1),o[n(499)][n(456)](n(426))!=i&&(t[n(485)](n(426),i,o[n(499)]),!0)}[u(422)](t){const e=u;if(!this[e(501)]||this[e(460)][e(446)]<2)return!1;if(function(t,n){const o=e;if(t[o(446)]!==n[o(446)])return!1;for(let e=0;e<t[o(446)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(460)][e(509)](t=>t.id),Array[e(425)](this[e(501)][e(489)]())[e(509)](t=>t[e(456)](e(461)))))return!1;let n=!1;for(let o=0;o<this[e(460)][e(446)];o++){const i=this[e(460)][o],s=t[e(498)](i[e(502)]),r=t[e(434)](this[e(501)],o);s[e(440)](r)||(t[e(514)](t[e(416)](i[e(502)]),r),n=!0)}return n}[u(473)](t){const e=u;if(!this[e(460)][e(446)])return!1;const{model:n}=this[e(491)];let o=!1;for(let i=0;i<this[e(460)][e(446)]-1;i++){const s=this[e(460)][i],r=this[e(460)][i+1],a=n[e(498)](s[e(499)]),c=n[e(498)](r[e(499)]);e(480)===a[e(415)](c)&&(this[e(474)](t,s[e(499)]),i=-1,o=!0)}return o}}function p(t,e,n){const o=u;if(n[o(505)])return!1;const i=o(e?421:444);return t[o(450)](t[o(467)](i),n),!0}function m(t,e,n){const o=u;if(0===e[o(446)])return 0;const i=t[o(498)](n);for(let n=0;n<e[o(446)];n++){const s=e[n],r=t[o(498)](s[o(499)]);if(o(448)===i[o(415)](r))return n}const s=n[o(443)];let r=-1;for(let t=e[o(446)]-1;t>=0;t--)if(e[t][o(499)][o(443)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(433)][o(438)](),c=a[o(512)](s[o(441)]),l=a[c+1];if(l)for(let t=0;t<e[o(446)];t++)if(e[t][o(499)][o(443)][o(441)]===l)return t;return e[o(446)]}const g=w;function w(t,e){const n=b();return(w=function(t,e){return n[t-=179]})(t,e)}!function(t){const e=w,n=t();for(;;)try{if(401407===parseInt(e(202))/1*(-parseInt(e(215))/2)+-parseInt(e(184))/3*(-parseInt(e(194))/4)+parseInt(e(196))/5+-parseInt(e(198))/6+-parseInt(e(201))/7+-parseInt(e(183))/8*(-parseInt(e(181))/9)+parseInt(e(199))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(b);class y extends t.Command{[g(212)](){const t=g,e=this[t(195)][t(189)][t(211)][t(188)],n=this[t(193)](e);this[t(180)]=!!n}[g(213)](t){const e=g,{editor:n}=this,{model:o}=n,{selection:s}=o[e(211)],r=this[e(193)](s);if(!r)return;const a=n[e(185)][e(182)](e(200)),c=t?.[e(187)]??(0,i.uid)();!function(t){const n=e;return n(197)==typeof t&&t[n(190)]>0&&!/\s/[n(206)](t)&&!/^\d/[n(206)](t)}(c)?(0,i.logWarning)(e(192)):(o[e(205)](t=>{const n=e,i=t[n(191)](n(209),{footnoteId:c});o[n(179)](i,r,null)}),a[e(214)](c))}[g(193)](t){const e=g,{model:n}=this[e(195)],{schema:o}=n,i=t[e(210)]();for(const t of i[e(186)]())if(o[e(203)](t)||o[e(204)](t))return null;const s=i[e(208)];return o[e(207)](s,e(209))?s:null}}function b(){const t=["insertObject","isEnabled","7127451wftWRA","get","8bLYgyp","405327QfgQCH","plugins","getItems","footnoteId","selection","model","length","createElement","insert-footnote-command-executed-with-invalid-id","_getPositionToInsertFootnote","8oGtnpZ","editor","1015305LPtVJu","string","89766WrQwYv","170000bMoioc","FootnotesEditing","719649UJfRqM","1wglhbJ","isBlock","isObject","change","test","checkChild","end","footnoteRef","getFirstRange","document","refresh","execute","_moveSelectionToFootnoteDefinition","1526086FiNAOs"];return(b=function(){return t})()}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[h]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new y(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),n=window[m([68,97,116,101])][m([110,111,119])](),o=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{o[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=o[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;o[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,o)=>{o[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),n[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function n(t){for(let n=0;n<t[m([108,101,110,103,116,104])];n++){const o=t[m([99,104,97,114,67,111,100,101,65,116])](n);e=(e<<5)+e+o,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,o])=>{n(e),t(o)}):n(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function h(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function p(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const n=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let n=m([117]);for(let o=0;o<t[m([108,101,110,103,116,104])];o+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),n+=e[i]}return n}();o[n]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,o[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=p,o[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,o[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&n()?e:null;function n(){const t=e[m([106,116,105])],n=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),o={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete o[m([118,99])],f(o)==n}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),o[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function p(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(o){a(o)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(n-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),o=h(d(window[m([77,97,116,104])][m([99,101,105,108])](n/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,o)}function r(){const e=m([108,108,99,116,45])+d(f(t)),n=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return n?window[m([112,97,114,115,101,73,110,116])](h(n),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,n)=>{t[m([116,104,101,110])](e,n),window[m([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,n)=>{if(n[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{p(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const o=a[m([115,112,108,105,116])](m([46])),[i,s,r]=o;return e(i),await n(i,s,r),t}catch{return!1}function e(e){const n=l(e);n&&n[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function n(e,n,o){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(o),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+n),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1761696e3;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:n}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](n))return!0;const o=n[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=o[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(o[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>o[m([101,118,101,114,121])]((e,n)=>t[n]===e||t[n]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&p?new(window[m([80,114,111,109,105,115,101])])((t,n)=>{e[m([116,104,101,110])](t,n),p[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},n)}):e||p||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(h).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),n.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(h).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(i.reference,"on")}),n.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:n,editing:o}=t,{t:i}=t.locale;n.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:n})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;n.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of o.view.createRangeIn(i))t.is("$textProxy")?n.consume(t.textNode,{name:!0}):t.is("element")&&n.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),n.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>x(t,e)}),n.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:n})=>{const o=t.getAttribute("footnoteCounter");return(0,e.toWidget)(x(t,n),n,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",o)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:n}=t.locale,{conversion:o}=t;o.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),o.for("upcast").add(t=>{t.on("element:ol",(t,e,n)=>{const o=e.viewItem;if(!o.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!n.consumable.consume(o,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,n)=>{const o=e.viewItem;o.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&n.consumable.consume(o,{name:!0,classes:"footnotes-divider"})})}),o.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>E(e)}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=E(o,{"data-footnotes-list-label":n("Footnotes")}),s=(0,e.toWidget)(i,o,{hasSelectionHandle:!0,label:n("Footnotes")});return o.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:n}=t,o=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,n)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes-list"))return;if(!n.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=n.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!n.safeInsert(r,e.modelCursor))return;n.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(n.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),n.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(o)n.convertChildren(a,r);else{const t=n.writer.createElement("footnoteInlineContent");n.writer.insert(t,r),n.convertChildren(a,t)}n.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of n)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const n=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:n,t:o}=t,i=t.model.document.selection;t.keystrokes.set("CTRL+Shift+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Shift+D"}]}),this.listenTo(n.view.document,"enter",(t,e)=>{const n=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(n){const o=n.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(o),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let n=!1;this.listenTo(e.view.document,"pointerdown",(t,o)=>{const{target:i}=o,s=e.view.document.selection;n=!!(i.is("element","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:o}=e;if(!o.is("element","a"))return;if(o.parent?.is("element","sup")&&o.parent.hasClass("footnote")&&!n)return void e.preventDefault();let i=o.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:n})=>{if(!k(e))return null;if(!t)return n.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const o=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const n=e.toViewElement(t);return!!n&&k(t)!==n.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function E(t,e={}){const n=t.createEmptyElement("hr",{class:"footnotes-divider"}),o=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[n,o])}function x(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{id:"ref-"+n,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function P(t,n,o,{dataPipeline:i}={}){const{t:s}=o,r=t.getAttribute("footnoteId"),a=n.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?n.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(n.createEditableElement("div",{class:"footnote-content"}),n,{label:s("Footnote content.")});return n.insert(n.createPositionAt(c,0),n.createSlot()),n.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var S=n(331);const _=L;function L(t,e){const n=D();return(L=function(t,e){return n[t-=249]})(t,e)}function D(){const t=["_handleCopyFootnotesDefinitions","add","contentInsertion","clipboardInput","root","140vWaMQX","parse","2207303gSgdxz","517317cVYgpz","_insertEmptyFootnotesDefinitionsContainer","toModel","setAttribute","getFirstRange","sourceEditorId","8RsMrfk","getFootnotes","getData","toData","from","remove","editing","outputTransformation","append","footnotesDefinitions","selection","78wYddrg","isOfficialPlugin","isPremiumPlugin","init","316030QGFhbS","createElement","349281nVkJgu","entries","3447540bEvREZ","content","toView","length","document","create","2VMtrtV","application/ckeditor5-footnotes","listenTo","dataTransfer","change","drop","setData","htmlProcessor","1022592isBupt","push","element","stringify","requires","footnoteId","end","method","pluginName","editor","_defineClipboardIntegration","definition","_handlePasteFootnotesDefinitions","FootnotesClipboard","getFootnotesDefinitionsObjectElement","getAttribute","data","insert","createRangeIn","reduce","footnoteDefinition","find","171705xeJJkD","footnoteRef","getFootnote","get"];return(D=function(){return t})()}!function(t){const e=L,n=t();for(;;)try{if(229070===-parseInt(e(290))/1+parseInt(e(298))/2*(parseInt(e(267))/3)+parseInt(e(306))/4+parseInt(e(255))/5*(parseInt(e(284))/6)+parseInt(e(266))/7*(-parseInt(e(273))/8)+-parseInt(e(292))/9+parseInt(e(264))/10*(parseInt(e(288))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(D);class T extends t.Plugin{static get[_(314)](){return _(319)}static get[_(310)](){return[v,S.ClipboardPipeline]}static get[_(285)](){return!0}static get[_(286)](){return!0}[_(287)](){this[_(316)]()}[_(316)](){const t=_;this[t(259)](),this[t(318)]()}[_(259)](){const t=_,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(258)](S.ClipboardPipeline),s=n[t(258)](h);this[t(300)](i,t(280),(n,i)=>{const r=t,a=function(t,e){const n=L,o=new Set;for(const{item:i}of t[n(251)](e))i.is(n(308),n(256))&&o[n(260)](i[n(321)](n(311)));return Array[n(277)](o)}(o,i[r(293)]);if(!a[r(295)])return;const c=s[r(274)](),l=a[r(252)]((t,n)=>{const o=r,i=c[o(254)](t=>t.id===n);if(i){const n=e[o(249)][o(294)](i[o(317)],{isClipboardPipeline:!0}),s=e[o(249)][o(305)][o(276)](n);t[i.id]=s}return t},Object[r(297)](null));i[r(301)][r(304)](r(299),JSON[r(309)](l))})}[_(318)](){const t=_,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(279)],r=o[t(258)](S.ClipboardPipeline),a=o[t(258)](h);let c=null;this[t(300)](s[t(296)],t(262),(e,n)=>{const o=t,i=n[o(301)][o(275)](o(299));c=i?JSON[o(265)](i):null}),this[t(300)](r,t(261),(o,s)=>{const r=t;if(!c)return;const l=s[r(272)]===this[r(315)].id;l&&r(303)===s[r(313)]||n[r(302)](t=>{const o=r;!function(t,e){const n=L,o=[];for(const{item:i}of t[n(251)](e))i.is(n(308),n(282))&&o[n(307)](i);for(const e of o)t[n(278)](e)}(t,s[o(293)]);let u=a[o(320)]();if(!u){const e=n[o(296)][o(283)][o(271)]()[o(263)];u=a[o(268)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(297)](null);for(const{item:o}of t[s(251)](e))if(o.is(s(308),s(256))){const e=o[s(321)](s(311));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(270)](s(311),r[e],o)}return r}(t,s[o(293)],t=>!l||null!==a[o(257)](t));for(const[n,i]of Object[o(291)](c)){const s=f[n]||n,r=t[o(289)](o(253),{footnoteId:s}),a=e[o(249)][o(305)][o(294)](i),c=e[o(249)][o(269)](a,r);t[o(281)](c,r),t[o(250)](r,u,o(312))}c=null})})}}var A=n(311),V=n(355),R=n(450),O=n.n(R),N=n(774),K=n.n(N),M=n(265),j=n.n(M),B=n(410),U=n.n(B),W=n(238),z=n.n(W),H=n(14),J={attributes:{"data-cke":!0}};J.setAttributes=U(),J.insert=j().bind(null,"head"),J.domAPI=K(),J.insertStyleElement=z();O()(H.A,J);H.A&&H.A.locals&&H.A.locals;class q extends t.Plugin{licenseKey;_licenseKeyCheckInterval;static get pluginName(){return"FootnotesUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;e.add("insertFootnote",X(t,A.ButtonView)),e.add("menuBar:insertFootnote",X(t,A.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const n=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in n){const o=e,i=n[o];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete n[o],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&n._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&n._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&n._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&n._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&n._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&n._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&n._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function X(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof A.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:V.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}function Y(t,e){var n=Q();return(Y=function(t,e){return n[t-=265]})(t,e)}function Q(){var t=["4223272rUjVtL","7ZnXpTS","160746RKKvLX","requires","isPremiumPlugin","5xcFLcm","Footnotes","793408LtgLYg","2228148EGqeJt","9745zvRjrs","isOfficialPlugin","115924CcpOwP","305658KmIfHW","pluginName"];return(Q=function(){return t})()}var Z=Y;!function(t){for(var e=Y,n=t();;)try{if(264956===-parseInt(e(270))/1+-parseInt(e(268))/2+-parseInt(e(273))/3+-parseInt(e(272))/4*(parseInt(e(266))/5)+parseInt(e(277))/6+-parseInt(e(276))/7*(-parseInt(e(275))/8)+parseInt(e(269))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Q);class $ extends t.Plugin{static get[Z(274)](){return Z(267)}static get[Z(278)](){return[v,T,q]}static get[Z(271)](){return!0}static get[Z(265)](){return!0}}const G=et;function tt(){const t=["1890DTSZXq","decimal-leading-zero","1738530nzKKxQ","2MLlHNl","upper-alpha","14hOofTj","1416177OxCeZb","lower-alpha","lower-roman","lower-latin","upper-roman","1860NJkYPU","11099EktUzf","364440NqIxnR","1072038XJLNec","84127MjhOne","decimal","1320ExzTTU","upper-latin"];return(tt=function(){return t})()}function et(t,e){const n=tt();return(et=function(t,e){return n[t-=445]})(t,e)}!function(t){const e=et,n=t();for(;;)try{if(215669===-parseInt(e(455))/1*(-parseInt(e(462))/2)+parseInt(e(454))/3+parseInt(e(457))/4*(parseInt(e(459))/5)+-parseInt(e(461))/6+-parseInt(e(445))/7*(parseInt(e(453))/8)+-parseInt(e(446))/9+parseInt(e(451))/10*(parseInt(e(452))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(tt);const nt=[G(456),G(460),G(449),G(458),G(447),G(463),G(448),G(450)],ot=st;function it(){const t=["170fhmQvn","146498JsoVOi","2431bneZRo","8820TkdIOG","50tJhWsK","footnotesListStyle","166YcbRwb","getFootnotesDefinitionsObjectElement","change","value","includes","refresh","189VPmqUj","1049951vVBOYD","setAttribute","2377992SpYQKL","36rrsyml","34664ccoguF","61200OXqDzp","isEnabled","_updateFootnotesCounters","model","execute","getAttribute","get","plugins"];return(it=function(){return t})()}function st(t,e){const n=it();return(st=function(t,e){return n[t-=314]})(t,e)}!function(t){const e=st,n=t();for(;;)try{if(101874===parseInt(e(338))/1*(parseInt(e(316))/2)+parseInt(e(326))/3*(-parseInt(e(327))/4)+-parseInt(e(336))/5*(-parseInt(e(339))/6)+-parseInt(e(323))/7+parseInt(e(328))/8*(-parseInt(e(322))/9)+-parseInt(e(314))/10*(-parseInt(e(337))/11)+parseInt(e(325))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(it);class rt extends t.Command{[ot(321)](){const t=ot,{editor:e}=this,n=e[t(335)][t(334)](h)[t(317)]();this[t(329)]=!!n,this[t(319)]=n?.[t(333)](t(315))??null}[ot(332)]({value:t}){const e=ot,{editor:n}=this,o=n[e(335)][e(334)](h),i=o[e(317)]();i&&nt[e(320)](t)&&n[e(331)][e(318)](n=>{const s=e;n[s(324)](s(315),t,i),o[s(330)](n)})}}const at=lt;function ct(){const t=["setAttribute","isInteger","footnotesListStart","value","execute","4461126EvQIoH","refresh","7752549IMxlDm","1005426mRJlRN","change","plugins","8HilRab","_updateFootnotesCounters","model","3909292CmOPJf","3vSDjRC","getFootnotesDefinitionsObjectElement","isEnabled","4632588gETeZN","501848ctejXG","get","2515700EvjOEi","getAttribute"];return(ct=function(){return t})()}function lt(t,e){const n=ct();return(lt=function(t,e){return n[t-=204]})(t,e)}!function(t){const e=lt,n=t();for(;;)try{if(631421===parseInt(e(211))/1+parseInt(e(222))/2+parseInt(e(218))/3*(-parseInt(e(217))/4)+parseInt(e(224))/5+-parseInt(e(208))/6+parseInt(e(210))/7+parseInt(e(214))/8*(-parseInt(e(221))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ct);class ut extends t.Command{[at(209)](){const t=at,{editor:e}=this,n=e[t(213)][t(223)](h)[t(219)]();this[t(220)]=!!n,this[t(206)]=n?.[t(225)](t(205))??null}[at(207)]({value:t}){const e=at,{editor:n}=this,o=n[e(213)][e(223)](h),i=o[e(219)]();i&&Number[e(204)](t)&&n[e(216)][e(212)](n=>{const s=e;n[s(226)](s(205),t,i),o[s(215)](n)})}}const ft=wt;function dt(){const t=["11651553KfoQma","attribute:footnotesListStart:footnotesDefinitions","hasClass","footnotesListStyle","add","6895365iiURTP","from","document","init","floor","footnotes.footnotesProperties.defaultListStyle","item","differ","createRangeOn","getChanges","removeStyle","_updateFootnotesCounters","decimal-leading-zero","decimal","writer","pluginName","_getDefaultListStyle","parseInt","3070152LgReQK","_defineFormatter","footnotesDefinitions","footnotes.footnotesProperties.defaultStartIndex","upcast","709026XDnVJO","type","footnotesStart","setAttribute","nodeAfter","insert","max","schema","consume","toUpperCase","find","getItems","commands","4576420BoHZcb","footnotes-list","_getDefaultStartIndex","2LvPBTq","isNaN","lower-latin","for","plugins","toViewElement","lower-alpha","getChildren","editor","name","$text","_formatFootnoteListValue","define","config","setStyle","_definePostfixer","position","hasAttribute","list-style-type","footnotesListStart","lower-roman","_defineSchema","_defineConverters","upper-roman","mapper","getStyle","checkAttribute","4501fwEoyF","isOfficialPlugin","element:ol","upper-latin","parent","padStart","11292rjFVzP","3Ofaayj","viewItem","26651060TzEIPU","toLowerCase","downcast","FootnotesPropertiesEditing","getAttribute","removeAttribute","requires","registerPostFixer","setFootnoteFormatter","start","isPremiumPlugin","attribute:footnotesListStyle:footnotesDefinitions","model","consumable","get","footnotesStyle","upper-alpha","extend","fromCharCode","element","modelCursor"];return(dt=function(){return t})()}!function(t){const e=wt,n=t();for(;;)try{if(720588===-parseInt(e(465))/1*(-parseInt(e(449))/2)+-parseInt(e(499))/3*(parseInt(e(462))/4)+parseInt(e(527))/5+parseInt(e(498))/6*(-parseInt(e(492))/7)+-parseInt(e(444))/8+-parseInt(e(522))/9+parseInt(e(501))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(dt);class ht extends t.Plugin{static get[ft(441)](){return ft(504)}static get[ft(507)](){return[v,h]}static get[ft(493)](){return!0}static get[ft(511)](){return!0}[ft(429)](){const t=ft,{editor:e}=this;e[t(478)][t(477)](t(431),t(439)),e[t(478)][t(477)](t(447),1),e[t(461)][t(526)](t(516),new rt(e)),e[t(461)][t(526)](t(451),new ut(e)),this[t(486)](),this[t(487)](),this[t(445)](),this[t(480)]()}[ft(486)](){const t=ft,{editor:e}=this,{schema:n}=e[t(513)];n[t(518)](t(446),{allowAttributes:[t(525),t(484)]})}[ft(487)](){const t=ft,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(468)](t(448))[t(526)](e=>{const n=t;e.on(n(494),(t,e,o)=>{const s=n,r=e[s(500)],a=e[s(521)]?.[s(496)];r[s(524)](s(463))&&a?.is(s(520),s(446))&&(function(t,e,n,o){const i=s;if(!o[i(491)](e,i(484)))return;let r=1;const a=n[i(514)][i(457)](t,{attributes:i(510)});if(a){const e=Number[i(443)](t[i(505)](i(510)),10);Number[i(466)](e)||(r=e)}!a&&e[i(482)](i(484))||n[i(440)][i(452)](i(484),r,e)}(r,a,o,i),function(t,e,n,o){const i=s;if(!o[i(491)](e,i(525)))return;let r=i(439),a=!1;if(n[i(514)][i(457)](t,{attributes:i(450)})){const e={1:i(439),a:i(471),A:i(517),i:i(485),I:i(488)}[t[i(505)](i(450))];e&&(r=e),a=!0}n[i(514)][i(457)](t,{styles:i(483)})&&(r=t[i(490)](i(483)),a=!0),!a&&e[i(482)](i(525))||n[i(440)][i(452)](i(525),r,e)}(r,a,o,i))})}),n[t(468)](t(503))[t(526)](e=>{const n=t;e.on(n(523),(t,e,o)=>{const i=n;if(!o[i(514)][i(457)](e[i(432)],t[i(474)]))return;const s=pt(e[i(432)],o[i(489)]),{attributeNewValue:r}=e;null==r||1===r?o[i(440)][i(506)](i(510),s):o[i(440)][i(452)](i(510),String(r),s)}),e.on(n(512),(t,e,o)=>{const i=n;if(!o[i(514)][i(457)](e[i(432)],t[i(474)]))return;const s=pt(e[i(432)],o[i(489)]),{attributeNewValue:r}=e;r&&i(439)!==r?o[i(440)][i(479)](i(483),r,s):o[i(440)][i(436)](i(483),s)})})}[ft(480)](){const t=ft,{editor:e}=this,{model:n}=e,o=e[t(469)][t(515)](h),i=this[t(442)](),s=this[t(464)]();n[t(428)][t(508)](e=>{const r=t,a=n[r(428)][r(433)][r(435)]();let c=!1;for(const t of a){if(r(454)!==t[r(450)]||r(475)===t[r(474)])continue;const o=n[r(434)](t[r(481)][r(453)]);for(const t of o[r(460)]())t.is(r(520),r(446))&&(!t[r(482)](r(484))&&n[r(456)][r(491)](t,r(484))&&(e[r(452)](r(484),s,t),c=!0),!t[r(482)](r(525))&&n[r(456)][r(491)](t,r(525))&&(e[r(452)](r(525),i,t),c=!0))}return c&&o[r(437)](e),c})}[ft(445)](){const t=ft,{editor:e}=this;e[t(469)][t(515)](h)[t(509)](e=>this[t(476)](e))}[ft(442)](){const t=ft;return this[t(473)][t(478)][t(515)](t(431))}[ft(464)](){const t=ft;return this[t(473)][t(478)][t(515)](t(447))}[ft(476)]({container:t,value:e,digits:n}){const o=ft,i=t[o(505)](o(525)),s=t[o(505)](o(484)),r=Math[o(430)](e)+(s??1)-1;switch(i){case o(438):return function(t,e){const n=o;return String(t)[n(497)](e,"0")}(r,Math[o(455)](2,n));case o(471):case o(467):return mt(r,!1);case o(517):case o(495):return mt(r,!0);case o(485):return yt(r,!1);case o(488):return yt(r,!0);default:return String(r)}}}function pt(t,e){const n=ft,o=e[n(470)](t);return Array[n(427)](o[n(472)]())[n(459)](t=>t.is(n(520),"ol")&&t[n(524)](n(463)))}function mt(t,e){const n=ft;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(519)](97+t)+o,i=Math[n(430)]((i-1)/26)}return e?o[n(458)]():o}const gt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function wt(t,e){const n=dt();return(wt=function(t,e){return n[t-=427]})(t,e)}function yt(t,e){const n=ft;let o="",i=t;for(const{value:t,numeral:e}of gt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(502)]()}class bt extends A.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new A.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:n}){super(t),this.focusCycler=new A.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,n),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,A.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const n=new A.View(this.locale);return n.children=n.createCollection(),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){for(const t of this.children)if(t instanceof A.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},n.focusTracker=new i.FocusTracker,n.keystrokes=new i.KeystrokeHandler,n.render(),n.keystrokes.listenTo(n.element),this.children.add(n),n}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),n=[e],o=new A.CollapsibleView(this.locale,n);return o.set({label:t("Footnotes properties"),isCollapsed:!0}),o.buttonView.bind("isEnabled").toMany(n,"isEnabled",(...t)=>t.some(t=>t)),o.buttonView.on("change:isEnabled",(t,e,n)=>{n||(o.isCollapsed=!0)}),this.children.add(o),[e,o]}_createStartIndexPropertyView(){const{t}=this.locale,e=new A.LabeledFieldView(this.locale,A.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)?e.errorText=t("Invalid footnotes start index value."):n.checkValidity()?this.fire("footnotesListStart",{startIndex:o}):e.errorText=t(o<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var vt=n(945),It={attributes:{"data-cke":!0}};It.setAttributes=U(),It.insert=j().bind(null,"head"),It.domAPI=K(),It.insertStyleElement=z();O()(vt.A,It);vt.A&&vt.A.locals&&vt.A.locals;class kt extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[A.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var n;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(n=t,t=>{const{t:e}=t,o=n.commands.get("footnotesStyle"),i=(0,A.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(o,"isEnabled"),s.set({label:e("Footnotes style"),icon:V.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:n}=t.locale,o=n("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:V.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:V.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:V.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:V.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:V.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:V.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:n,icon:o,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new A.ButtonView(e);return a.set({label:n,icon:o,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new bt(t.locale,{styleGridAriaLabel:o,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,n)=>{t.execute("footnotesStart",{value:n.startIndex})}),s}({editor:n,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:n}=t.locale,o=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=A.BalloonPanelView;o.register("footnotesDefinitions",{ariaLabel:n("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}function Ct(){var t=["1670978HPGuLs","4273445RkCMWf","requires","400337YBwvFV","2731127hlnBTq","isPremiumPlugin","isOfficialPlugin","pluginName","6172812maJEKC","11709224lRJxDS","542208CEAKgP","8WAaJSi","FootnotesProperties"];return(Ct=function(){return t})()}var Ft=Et;function Et(t,e){var n=Ct();return(Et=function(t,e){return n[t-=414]})(t,e)}!function(t){for(var e=Et,n=t();;)try{if(805347===-parseInt(e(417))/1+-parseInt(e(414))/2+-parseInt(e(424))/3*(-parseInt(e(425))/4)+parseInt(e(415))/5+-parseInt(e(422))/6+parseInt(e(418))/7+parseInt(e(423))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ct);class xt extends t.Plugin{static get[Ft(421)](){return Ft(426)}static get[Ft(416)](){return[ht,kt]}static get[Ft(420)](){return!0}static get[Ft(419)](){return!0}}function Pt(){var t=["5353686NRXYkG","2257320wwricK","6399953lLsymu","1023170wTjYFP","1287676gwswyx","433496uswulw","5UEoVfZ","3nJULTb","1063008bQlWzd"];return(Pt=function(){return t})()}function St(t,e){var n=Pt();return(St=function(t,e){return n[t-=177]})(t,e)}!function(t){for(var e=St,n=t();;)try{if(614436===-parseInt(e(183))/1+parseInt(e(181))/2*(parseInt(e(185))/3)+parseInt(e(182))/4+parseInt(e(184))/5*(parseInt(e(177))/6)+parseInt(e(180))/7+-parseInt(e(179))/8+-parseInt(e(178))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Pt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
|
|
4
|
+
*/(()=>{var t={14:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content .footnote-content ul{list-style-type:disc}.ck-content .footnote-content ul ul{list-style-type:circle}.ck-content .footnote-content ul ul ul,.ck-content .footnote-content ul ul ul ul{list-style-type:square}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},331:(t,e,n)=>{t.exports=n(237)("./src/clipboard.js")},355:(t,e,n)=>{t.exports=n(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=o.base?c[0]+o.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=n(f),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var p=i(h,o);o.byIndex=a,e.splice(a,0,{identifier:f,updater:p,references:1})}r.push(f)}return r}function i(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=o(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=n(s[r]);e[a].references--}for(var c=o(t,i),l=0;l<s.length;l++){var u=n(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function o(t,e,o,i){var s;if(o)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,n=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(n,e,!1,t)},remove:function(t){o(n,e,!0,t)}}}},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},901:(t,e,n)=>{t.exports=n(237)("./src/widget.js")},945:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Footnotes:()=>$,FootnotesClipboard:()=>T,FootnotesEditing:()=>v,FootnotesProperties:()=>xt,FootnotesPropertiesEditing:()=>ht,FootnotesPropertiesUI:()=>kt,FootnotesStartCommand:()=>ut,FootnotesStyleCommand:()=>rt,FootnotesTracker:()=>h,FootnotesUI:()=>q,InsertFootnoteCommand:()=>y});var t=n(782),e=n(901),i=n(584),s=n(783);function r(t,e){const n=a();return(r=function(t,e){return n[t-=394]})(t,e)}function a(){const t=["elementName","237095WkrMhk","_trackedElements","20EhaJFa","_getElementKey","reset","408KuCnhI","values","rootName","getItems","remove","createRangeOn","type","insert","_model","element","name","from","211444kaeEsW","clear","position","get","10554710SuWLeT","_elementName","flat","$text","slice","getChanges","29786460llRUYe","$graveyard","15auiESh","69202ILhsnc","set","add","18pLOwZv","nodeAfter","attributes","length","328002pUXgsK","root","getElementKey","has","delete","4897600rMZLTE","push"];return(a=function(){return t})()}const c=r;!function(t){const e=r,n=t();for(;;)try{if(662534===parseInt(e(409))/1+-parseInt(e(434))/2*(parseInt(e(401))/3)+-parseInt(e(419))/4*(parseInt(e(417))/5)+-parseInt(e(422))/6*(-parseInt(e(402))/7)+parseInt(e(414))/8*(-parseInt(e(405))/9)+-parseInt(e(438))/10+parseInt(e(399))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(a);class l{[c(430)];[c(394)];[c(420)];[c(418)]=new Map;constructor(t,e){const n=c;this[n(430)]=t,this[n(394)]=e[n(416)],this[n(420)]=e[n(411)]}[c(421)](){const t=c;this[t(418)][t(435)]()}[c(398)](t){const e=c,n=new Set,o=new Map;for(const i of t){if(e(429)===i[e(428)]&&e(396)!==i[e(432)]&&i[e(436)][e(406)]){const t=this[e(430)][e(427)](i[e(436)][e(406)]);for(const n of t[e(425)]()){if(!n.is(e(431),this[e(394)]))continue;const t=this[e(420)](n);o[e(412)](t)||o[e(403)](t,[]),o[e(437)](t)[e(415)](n)}}if(e(426)===i[e(428)]&&i[e(432)]===this[e(394)]){const t=this[e(420)]({getAttribute:t=>i[e(407)][e(437)](t)});n[e(404)](t)}}for(const[t,o]of this[e(418)])e(400)===o[e(410)][e(424)]&&n[e(404)](t);for(const t of n)this[e(418)][e(413)](t);for(const[t,n]of o)this[e(418)][e(403)](t,n[n[e(408)]-1]);const i=new Set;for(const[t,s]of o)n[e(412)](t)&&(i[e(404)](s[0]),s[e(408)]>1?o[e(403)](t,s[e(397)](1)):o[e(413)](t),n[e(413)](t));return{removed:Array[e(433)](n),inserted:Array[e(433)](o[e(423)]())[e(395)](),moved:Array[e(433)](i)}}}const u=d;function f(){const t=["_footnotes","footnoteId","$graveyard","_footnoteRefsTracker","createRangeIn","min","push","createElement","234iqUkOn","get","listenTo","_footnoteDefsContainerTracker","_insertEmptyFootnotesDefinitionsContainer","_ensureFootnotesReferencesHaveProperOrder","_handleMovedFootnoteReference","300480WssQWH","FootnotesTracker","180weXaEz","change:data","high","after","_handleFootnoteReferencesChanges","_ensureFootnotesDefinitionsContainerExists","_handleInsertedFootnoteReference","9UhdHPY","setAttribute","add","getChanges","1064geMKxt","getChildren","some","editor","_updateFootnotesCounters","singleton","differ","append","end","init","createPositionBefore","reference","parent","_footnotesDefinitions","definition","footnoteRef","getFootnotesDefinitionsObjectElement","childCount","getFootnotesFormatter","isOfficialPlugin","footnoteDefinition","map","440FXKqto","splice","indexOf","115601TxYBic","move","getFootnotes","pluginName","22297XYizjc","compareWith","createRangeOn","unshift","getFootnote","_footnoteFormatter","enqueueChange","paragraph","_sortFootnoteDefinitions","setFootnoteFormatter","isPremiumPlugin","from","footnoteCounter","has","1073110mgkLUF","_handleFootnotesDefinitionsObjectChanges","config","find","_handleFootnoteDefinitionsChanges","document","createPositionAt","_updateFootnoteRefCounter","_handleFootnotesDefinitionsObjectSync","set","getRootNames","819231RQNhmS","isEqual","rootName","findIndex","root","footnoteInlineContent","registerPostFixer","length","19334yaxvvx","before","model","insert","_handleRemoveFootnoteReferenceById","reset","footnotes.multiBlock","low","remove","getAttribute","_footnoteDefsTracker","2PNTqeV","footnotesDefinitions"];return(f=function(){return t})()}function d(t,e){const n=f();return(d=function(t,e){return n[t-=412]})(t,e)}!function(t){const e=d,n=t();for(;;)try{if(202440===parseInt(e(513))/1*(-parseInt(e(458))/2)+parseInt(e(439))/3+parseInt(e(488))/4*(-parseInt(e(510))/5)+parseInt(e(468))/6*(parseInt(e(447))/7)+parseInt(e(475))/8+parseInt(e(484))/9*(-parseInt(e(428))/10)+-parseInt(e(414))/11*(-parseInt(e(477))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(f);class h extends t.Plugin{[u(460)]=[];[u(501)]=null;[u(419)]=null;[u(471)];[u(463)];[u(457)];static get[u(413)](){return u(476)}static get[u(507)](){return!0}static get[u(424)](){return!0}constructor(t){const e=u;super(t),this[e(471)]=new l(this[e(491)][e(449)],{elementName:e(459),getElementKey:()=>e(493)}),this[e(463)]=new l(this[e(491)][e(449)],{elementName:e(503),getElementKey:t=>t[e(456)](e(461))}),this[e(457)]=new l(this[e(491)][e(449)],{elementName:e(508),getElementKey:t=>t[e(456)](e(461))})}[u(497)](){const t=u,{editor:e}=this,{model:n,data:o}=e;n[t(433)][t(445)](e=>{const o=t,i=n[o(433)][o(494)][o(487)]();let s=!1;return this[o(429)](e,i)&&(s=!0),this[o(432)](e,i)&&(s=!0),this[o(481)](e,i)&&(s=!0),this[o(473)](e)&&(s=!0),this[o(436)](e)&&(s=!0),this[o(422)](e)&&(s=!0),s}),this[t(470)](n[t(433)],t(478),()=>{const e=t;n[e(420)]({isUndoable:!1},t=>{this[e(482)](t)})},{priority:t(454)}),this[t(470)](o,t(437),()=>{const e=t;this[e(460)]=[],this[e(471)][e(452)](),this[e(463)][e(452)](),this[e(457)][e(452)]()},{priority:t(479)})}[u(504)](){return this[u(501)]}[u(418)](t){const e=u;return this[e(460)][e(431)](e=>e.id===t)||null}[u(412)](){const t=u;return Array[t(425)](this[t(460)])}[u(506)](){return this[u(419)]}[u(423)](t){this[u(419)]=t}[u(492)](t,e=0){const n=u;let o=!1;for(let i=e;i<this[n(460)][n(446)];i++)this[n(435)](t,i)&&(o=!0);return o}[u(472)](t,e){const n=u,o=t[n(467)](n(459),{});return t[n(495)](o,e),this[n(501)]=o,o}[u(482)](t){const e=u;if(!this[e(460)][e(446)]||this[e(501)])return;const n=this[e(460)][0][e(499)][e(443)],o=this[e(472)](t,n);for(const n of this[e(460)])n[e(502)][e(500)]||t[e(450)](n[e(502)],o,e(496));this[e(492)](t)}[u(429)](t,e){const n=u;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(471)][n(487)](e);if(r[n(446)]&&(this[n(501)]=r[0]),i[n(446)])if(i[n(446)]>1||this[n(501)]&&i[n(490)](t=>t!==this[n(501)])){const e=t[n(467)](n(459),{}),s=[];this[n(501)]&&s[n(466)](this[n(501)]),s[n(466)](...i),t[n(450)](e,s[0],n(448));for(const o of s)t[n(514)](t[n(464)](o),t[n(434)](e,n(496))),t[n(455)](o);this[n(501)]=e,this[n(492)](t),o=!0}else this[n(501)]=i[0];if(s[n(446)]&&n(462)===this[n(501)]?.[n(443)][n(441)]){for(const e of this[n(460)])t[n(455)](e[n(499)]),o=!0;this[n(460)]=[],this[n(501)]=null}return o}[u(432)](t,e){const n=u;let o=!1;const i=this[n(491)][n(430)][n(469)](n(453)),{inserted:s,moved:r}=this[n(457)][n(487)](e);for(const e of[...r,...s]){const s=e[n(456)](n(461)),r=this[n(418)](s);r&&(r[n(502)]=e),p(t,i,e)&&(o=!0)}return o}[u(481)](t,e){const n=u;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(463)][n(487)](e);for(const e of i)this[n(451)](t,e)&&(o=!0);for(const e of s)this[n(483)](t,e)&&(o=!0);for(const e of r)this[n(474)](t,e)&&(o=!0);return o}[u(436)](t){const e=u;if(!this[e(501)])return!1;let n=!1;if(this[e(501)][e(505)]!==this[e(460)][e(446)]){const o=[];for(const t of this[e(501)][e(489)]()){const i=t[e(456)](e(461));this[e(418)](i)||(o[e(417)](t),n=!0)}for(const n of o)t[e(455)](n)}const o=new Set,i=[];for(const t of this[e(501)][e(489)]()){const s=t[e(456)](e(461));o[e(427)](s)?(i[e(417)](t),n=!0):o[e(486)](s)}for(const n of i)t[e(455)](n);return this[e(501)][e(505)]||(t[e(455)](this[e(501)]),this[e(501)]=null,n=!0),n}[u(483)](t,e){const n=u;if(this[n(460)][n(431)](t=>t[n(499)]===e))return!1;let o=!1;const i=e[n(456)](n(461)),s=this[n(460)][n(442)](t=>t.id===i);-1!==s&&(t[n(455)](this[n(460)][s][n(499)]),this[n(460)][n(511)](s,1),o=!0);let r=this[n(501)]?function(t,e){const o=n;for(const n of t[o(489)]())if(n[o(456)](o(461))===e)return n;return null}(this[n(501)],i):null;r||(r=t[n(467)](n(508),{footnoteId:i}),this[n(501)]&&(t[n(450)](r,this[n(501)],n(496)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(491)][n(449)],this[n(460)],e);this[n(460)][n(511)](c,0,a);let l=c;return-1!==s&&(l=Math[n(465)](c,s)),this[n(492)](t,l)&&(o=!0),o}[u(451)](t,e){const n=u,o=this[n(460)][n(442)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(460)][o];return n(462)!==s[n(502)][n(443)][n(441)]&&(t[n(455)](s[n(502)]),i=!0),this[n(460)][n(511)](o,1),this[n(492)](t,o)&&(i=!0),i}[u(474)](t,e){const n=u,o=e[n(456)](n(461)),i=this[n(460)][n(442)](t=>t.id===o),s=this[n(460)][i];let r=!1;s[n(499)]=e,this[n(460)][n(511)](i,1);const a=m(this[n(491)][n(449)],this[n(460)],e);return this[n(460)][n(511)](a,0,s),this[n(492)](t,Math[n(465)](i,a))&&(r=!0),r}[u(435)](t,e){const n=u;if(!this[n(501)])return!1;const o=this[n(460)][e];let i;return i=this[n(419)]?this[n(419)]({footnote:o,container:this[n(501)],digits:String(this[n(460)][n(446)])[n(446)],value:e+1}):String(e+1),o[n(499)][n(456)](n(426))!=i&&(t[n(485)](n(426),i,o[n(499)]),!0)}[u(422)](t){const e=u;if(!this[e(501)]||this[e(460)][e(446)]<2)return!1;if(function(t,n){const o=e;if(t[o(446)]!==n[o(446)])return!1;for(let e=0;e<t[o(446)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(460)][e(509)](t=>t.id),Array[e(425)](this[e(501)][e(489)]())[e(509)](t=>t[e(456)](e(461)))))return!1;let n=!1;for(let o=0;o<this[e(460)][e(446)];o++){const i=this[e(460)][o],s=t[e(498)](i[e(502)]),r=t[e(434)](this[e(501)],o);s[e(440)](r)||(t[e(514)](t[e(416)](i[e(502)]),r),n=!0)}return n}[u(473)](t){const e=u;if(!this[e(460)][e(446)])return!1;const{model:n}=this[e(491)];let o=!1;for(let i=0;i<this[e(460)][e(446)]-1;i++){const s=this[e(460)][i],r=this[e(460)][i+1],a=n[e(498)](s[e(499)]),c=n[e(498)](r[e(499)]);e(480)===a[e(415)](c)&&(this[e(474)](t,s[e(499)]),i=-1,o=!0)}return o}}function p(t,e,n){const o=u;if(n[o(505)])return!1;const i=o(e?421:444);return t[o(450)](t[o(467)](i),n),!0}function m(t,e,n){const o=u;if(0===e[o(446)])return 0;const i=t[o(498)](n);for(let n=0;n<e[o(446)];n++){const s=e[n],r=t[o(498)](s[o(499)]);if(o(448)===i[o(415)](r))return n}const s=n[o(443)];let r=-1;for(let t=e[o(446)]-1;t>=0;t--)if(e[t][o(499)][o(443)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(433)][o(438)](),c=a[o(512)](s[o(441)]),l=a[c+1];if(l)for(let t=0;t<e[o(446)];t++)if(e[t][o(499)][o(443)][o(441)]===l)return t;return e[o(446)]}const g=w;function w(t,e){const n=b();return(w=function(t,e){return n[t-=179]})(t,e)}!function(t){const e=w,n=t();for(;;)try{if(401407===parseInt(e(202))/1*(-parseInt(e(215))/2)+-parseInt(e(184))/3*(-parseInt(e(194))/4)+parseInt(e(196))/5+-parseInt(e(198))/6+-parseInt(e(201))/7+-parseInt(e(183))/8*(-parseInt(e(181))/9)+parseInt(e(199))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(b);class y extends t.Command{[g(212)](){const t=g,e=this[t(195)][t(189)][t(211)][t(188)],n=this[t(193)](e);this[t(180)]=!!n}[g(213)](t){const e=g,{editor:n}=this,{model:o}=n,{selection:s}=o[e(211)],r=this[e(193)](s);if(!r)return;const a=n[e(185)][e(182)](e(200)),c=t?.[e(187)]??(0,i.uid)();!function(t){const n=e;return n(197)==typeof t&&t[n(190)]>0&&!/\s/[n(206)](t)&&!/^\d/[n(206)](t)}(c)?(0,i.logWarning)(e(192)):(o[e(205)](t=>{const n=e,i=t[n(191)](n(209),{footnoteId:c});o[n(179)](i,r,null)}),a[e(214)](c))}[g(193)](t){const e=g,{model:n}=this[e(195)],{schema:o}=n,i=t[e(210)]();for(const t of i[e(186)]())if(o[e(203)](t)||o[e(204)](t))return null;const s=i[e(208)];return o[e(207)](s,e(209))?s:null}}function b(){const t=["insertObject","isEnabled","7127451wftWRA","get","8bLYgyp","405327QfgQCH","plugins","getItems","footnoteId","selection","model","length","createElement","insert-footnote-command-executed-with-invalid-id","_getPositionToInsertFootnote","8oGtnpZ","editor","1015305LPtVJu","string","89766WrQwYv","170000bMoioc","FootnotesEditing","719649UJfRqM","1wglhbJ","isBlock","isObject","change","test","checkChild","end","footnoteRef","getFirstRange","document","refresh","execute","_moveSelectionToFootnoteDefinition","1526086FiNAOs"];return(b=function(){return t})()}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[h]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new y(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),n=window[m([68,97,116,101])][m([110,111,119])](),o=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{o[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=o[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;o[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,o)=>{o[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),n[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function n(t){for(let n=0;n<t[m([108,101,110,103,116,104])];n++){const o=t[m([99,104,97,114,67,111,100,101,65,116])](n);e=(e<<5)+e+o,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,o])=>{n(e),t(o)}):n(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function h(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function p(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const n=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let n=m([117]);for(let o=0;o<t[m([108,101,110,103,116,104])];o+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),n+=e[i]}return n}();o[n]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,o[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=p,o[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,o[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&n()?e:null;function n(){const t=e[m([106,116,105])],n=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),o={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete o[m([118,99])],f(o)==n}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),o[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function p(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(o){a(o)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(n-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),o=h(d(window[m([77,97,116,104])][m([99,101,105,108])](n/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,o)}function r(){const e=m([108,108,99,116,45])+d(f(t)),n=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return n?window[m([112,97,114,115,101,73,110,116])](h(n),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,n)=>{t[m([116,104,101,110])](e,n),window[m([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,n)=>{if(n[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{p(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const o=a[m([115,112,108,105,116])](m([46])),[i,s,r]=o;return e(i),await n(i,s,r),t}catch{return!1}function e(e){const n=l(e);n&&n[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function n(e,n,o){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(o),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+n),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1761782400;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:n}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](n))return!0;const o=n[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=o[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(o[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>o[m([101,118,101,114,121])]((e,n)=>t[n]===e||t[n]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&p?new(window[m([80,114,111,109,105,115,101])])((t,n)=>{e[m([116,104,101,110])](t,n),p[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},n)}):e||p||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(h).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),n.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(h).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(i.reference,"on")}),n.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:n,editing:o}=t,{t:i}=t.locale;n.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:n})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;n.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of o.view.createRangeIn(i))t.is("$textProxy")?n.consume(t.textNode,{name:!0}):t.is("element")&&n.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),n.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>x(t,e)}),n.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:n})=>{const o=t.getAttribute("footnoteCounter");return(0,e.toWidget)(x(t,n),n,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",o)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:n}=t.locale,{conversion:o}=t;o.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),o.for("upcast").add(t=>{t.on("element:ol",(t,e,n)=>{const o=e.viewItem;if(!o.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!n.consumable.consume(o,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,n)=>{const o=e.viewItem;o.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&n.consumable.consume(o,{name:!0,classes:"footnotes-divider"})})}),o.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>E(e)}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=E(o,{"data-footnotes-list-label":n("Footnotes")}),s=(0,e.toWidget)(i,o,{hasSelectionHandle:!0,label:n("Footnotes")});return o.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:n}=t,o=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,n)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes-list"))return;if(!n.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=n.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!n.safeInsert(r,e.modelCursor))return;n.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(n.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),n.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(o)n.convertChildren(a,r);else{const t=n.writer.createElement("footnoteInlineContent");n.writer.insert(t,r),n.convertChildren(a,t)}n.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of n)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const n=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:n,t:o}=t,i=t.model.document.selection;t.keystrokes.set("CTRL+Shift+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Shift+D"}]}),this.listenTo(n.view.document,"enter",(t,e)=>{const n=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(n){const o=n.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(o),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let n=!1;this.listenTo(e.view.document,"pointerdown",(t,o)=>{const{target:i}=o,s=e.view.document.selection;n=!!(i.is("element","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:o}=e;if(!o.is("element","a"))return;if(o.parent?.is("element","sup")&&o.parent.hasClass("footnote")&&!n)return void e.preventDefault();let i=o.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:n})=>{if(!k(e))return null;if(!t)return n.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const o=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const n=e.toViewElement(t);return!!n&&k(t)!==n.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function E(t,e={}){const n=t.createEmptyElement("hr",{class:"footnotes-divider"}),o=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[n,o])}function x(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{id:"ref-"+n,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function P(t,n,o,{dataPipeline:i}={}){const{t:s}=o,r=t.getAttribute("footnoteId"),a=n.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?n.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(n.createEditableElement("div",{class:"footnote-content"}),n,{label:s("Footnote content.")});return n.insert(n.createPositionAt(c,0),n.createSlot()),n.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var S=n(331);const _=L;function L(t,e){const n=D();return(L=function(t,e){return n[t-=249]})(t,e)}function D(){const t=["_handleCopyFootnotesDefinitions","add","contentInsertion","clipboardInput","root","140vWaMQX","parse","2207303gSgdxz","517317cVYgpz","_insertEmptyFootnotesDefinitionsContainer","toModel","setAttribute","getFirstRange","sourceEditorId","8RsMrfk","getFootnotes","getData","toData","from","remove","editing","outputTransformation","append","footnotesDefinitions","selection","78wYddrg","isOfficialPlugin","isPremiumPlugin","init","316030QGFhbS","createElement","349281nVkJgu","entries","3447540bEvREZ","content","toView","length","document","create","2VMtrtV","application/ckeditor5-footnotes","listenTo","dataTransfer","change","drop","setData","htmlProcessor","1022592isBupt","push","element","stringify","requires","footnoteId","end","method","pluginName","editor","_defineClipboardIntegration","definition","_handlePasteFootnotesDefinitions","FootnotesClipboard","getFootnotesDefinitionsObjectElement","getAttribute","data","insert","createRangeIn","reduce","footnoteDefinition","find","171705xeJJkD","footnoteRef","getFootnote","get"];return(D=function(){return t})()}!function(t){const e=L,n=t();for(;;)try{if(229070===-parseInt(e(290))/1+parseInt(e(298))/2*(parseInt(e(267))/3)+parseInt(e(306))/4+parseInt(e(255))/5*(parseInt(e(284))/6)+parseInt(e(266))/7*(-parseInt(e(273))/8)+-parseInt(e(292))/9+parseInt(e(264))/10*(parseInt(e(288))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(D);class T extends t.Plugin{static get[_(314)](){return _(319)}static get[_(310)](){return[v,S.ClipboardPipeline]}static get[_(285)](){return!0}static get[_(286)](){return!0}[_(287)](){this[_(316)]()}[_(316)](){const t=_;this[t(259)](),this[t(318)]()}[_(259)](){const t=_,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(258)](S.ClipboardPipeline),s=n[t(258)](h);this[t(300)](i,t(280),(n,i)=>{const r=t,a=function(t,e){const n=L,o=new Set;for(const{item:i}of t[n(251)](e))i.is(n(308),n(256))&&o[n(260)](i[n(321)](n(311)));return Array[n(277)](o)}(o,i[r(293)]);if(!a[r(295)])return;const c=s[r(274)](),l=a[r(252)]((t,n)=>{const o=r,i=c[o(254)](t=>t.id===n);if(i){const n=e[o(249)][o(294)](i[o(317)],{isClipboardPipeline:!0}),s=e[o(249)][o(305)][o(276)](n);t[i.id]=s}return t},Object[r(297)](null));i[r(301)][r(304)](r(299),JSON[r(309)](l))})}[_(318)](){const t=_,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(279)],r=o[t(258)](S.ClipboardPipeline),a=o[t(258)](h);let c=null;this[t(300)](s[t(296)],t(262),(e,n)=>{const o=t,i=n[o(301)][o(275)](o(299));c=i?JSON[o(265)](i):null}),this[t(300)](r,t(261),(o,s)=>{const r=t;if(!c)return;const l=s[r(272)]===this[r(315)].id;l&&r(303)===s[r(313)]||n[r(302)](t=>{const o=r;!function(t,e){const n=L,o=[];for(const{item:i}of t[n(251)](e))i.is(n(308),n(282))&&o[n(307)](i);for(const e of o)t[n(278)](e)}(t,s[o(293)]);let u=a[o(320)]();if(!u){const e=n[o(296)][o(283)][o(271)]()[o(263)];u=a[o(268)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(297)](null);for(const{item:o}of t[s(251)](e))if(o.is(s(308),s(256))){const e=o[s(321)](s(311));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(270)](s(311),r[e],o)}return r}(t,s[o(293)],t=>!l||null!==a[o(257)](t));for(const[n,i]of Object[o(291)](c)){const s=f[n]||n,r=t[o(289)](o(253),{footnoteId:s}),a=e[o(249)][o(305)][o(294)](i),c=e[o(249)][o(269)](a,r);t[o(281)](c,r),t[o(250)](r,u,o(312))}c=null})})}}var A=n(311),V=n(355),R=n(450),O=n.n(R),N=n(774),K=n.n(N),M=n(265),j=n.n(M),B=n(410),U=n.n(B),W=n(238),z=n.n(W),H=n(14),J={attributes:{"data-cke":!0}};J.setAttributes=U(),J.insert=j().bind(null,"head"),J.domAPI=K(),J.insertStyleElement=z();O()(H.A,J);H.A&&H.A.locals&&H.A.locals;class q extends t.Plugin{licenseKey;_licenseKeyCheckInterval;static get pluginName(){return"FootnotesUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;e.add("insertFootnote",X(t,A.ButtonView)),e.add("menuBar:insertFootnote",X(t,A.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const n=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in n){const o=e,i=n[o];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete n[o],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&n._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&n._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&n._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&n._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&n._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&n._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&n._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function X(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof A.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:V.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}function Y(t,e){var n=Q();return(Y=function(t,e){return n[t-=265]})(t,e)}function Q(){var t=["4223272rUjVtL","7ZnXpTS","160746RKKvLX","requires","isPremiumPlugin","5xcFLcm","Footnotes","793408LtgLYg","2228148EGqeJt","9745zvRjrs","isOfficialPlugin","115924CcpOwP","305658KmIfHW","pluginName"];return(Q=function(){return t})()}var Z=Y;!function(t){for(var e=Y,n=t();;)try{if(264956===-parseInt(e(270))/1+-parseInt(e(268))/2+-parseInt(e(273))/3+-parseInt(e(272))/4*(parseInt(e(266))/5)+parseInt(e(277))/6+-parseInt(e(276))/7*(-parseInt(e(275))/8)+parseInt(e(269))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Q);class $ extends t.Plugin{static get[Z(274)](){return Z(267)}static get[Z(278)](){return[v,T,q]}static get[Z(271)](){return!0}static get[Z(265)](){return!0}}const G=et;function tt(){const t=["1890DTSZXq","decimal-leading-zero","1738530nzKKxQ","2MLlHNl","upper-alpha","14hOofTj","1416177OxCeZb","lower-alpha","lower-roman","lower-latin","upper-roman","1860NJkYPU","11099EktUzf","364440NqIxnR","1072038XJLNec","84127MjhOne","decimal","1320ExzTTU","upper-latin"];return(tt=function(){return t})()}function et(t,e){const n=tt();return(et=function(t,e){return n[t-=445]})(t,e)}!function(t){const e=et,n=t();for(;;)try{if(215669===-parseInt(e(455))/1*(-parseInt(e(462))/2)+parseInt(e(454))/3+parseInt(e(457))/4*(parseInt(e(459))/5)+-parseInt(e(461))/6+-parseInt(e(445))/7*(parseInt(e(453))/8)+-parseInt(e(446))/9+parseInt(e(451))/10*(parseInt(e(452))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(tt);const nt=[G(456),G(460),G(449),G(458),G(447),G(463),G(448),G(450)],ot=st;function it(){const t=["170fhmQvn","146498JsoVOi","2431bneZRo","8820TkdIOG","50tJhWsK","footnotesListStyle","166YcbRwb","getFootnotesDefinitionsObjectElement","change","value","includes","refresh","189VPmqUj","1049951vVBOYD","setAttribute","2377992SpYQKL","36rrsyml","34664ccoguF","61200OXqDzp","isEnabled","_updateFootnotesCounters","model","execute","getAttribute","get","plugins"];return(it=function(){return t})()}function st(t,e){const n=it();return(st=function(t,e){return n[t-=314]})(t,e)}!function(t){const e=st,n=t();for(;;)try{if(101874===parseInt(e(338))/1*(parseInt(e(316))/2)+parseInt(e(326))/3*(-parseInt(e(327))/4)+-parseInt(e(336))/5*(-parseInt(e(339))/6)+-parseInt(e(323))/7+parseInt(e(328))/8*(-parseInt(e(322))/9)+-parseInt(e(314))/10*(-parseInt(e(337))/11)+parseInt(e(325))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(it);class rt extends t.Command{[ot(321)](){const t=ot,{editor:e}=this,n=e[t(335)][t(334)](h)[t(317)]();this[t(329)]=!!n,this[t(319)]=n?.[t(333)](t(315))??null}[ot(332)]({value:t}){const e=ot,{editor:n}=this,o=n[e(335)][e(334)](h),i=o[e(317)]();i&&nt[e(320)](t)&&n[e(331)][e(318)](n=>{const s=e;n[s(324)](s(315),t,i),o[s(330)](n)})}}const at=lt;function ct(){const t=["setAttribute","isInteger","footnotesListStart","value","execute","4461126EvQIoH","refresh","7752549IMxlDm","1005426mRJlRN","change","plugins","8HilRab","_updateFootnotesCounters","model","3909292CmOPJf","3vSDjRC","getFootnotesDefinitionsObjectElement","isEnabled","4632588gETeZN","501848ctejXG","get","2515700EvjOEi","getAttribute"];return(ct=function(){return t})()}function lt(t,e){const n=ct();return(lt=function(t,e){return n[t-=204]})(t,e)}!function(t){const e=lt,n=t();for(;;)try{if(631421===parseInt(e(211))/1+parseInt(e(222))/2+parseInt(e(218))/3*(-parseInt(e(217))/4)+parseInt(e(224))/5+-parseInt(e(208))/6+parseInt(e(210))/7+parseInt(e(214))/8*(-parseInt(e(221))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ct);class ut extends t.Command{[at(209)](){const t=at,{editor:e}=this,n=e[t(213)][t(223)](h)[t(219)]();this[t(220)]=!!n,this[t(206)]=n?.[t(225)](t(205))??null}[at(207)]({value:t}){const e=at,{editor:n}=this,o=n[e(213)][e(223)](h),i=o[e(219)]();i&&Number[e(204)](t)&&n[e(216)][e(212)](n=>{const s=e;n[s(226)](s(205),t,i),o[s(215)](n)})}}const ft=wt;function dt(){const t=["11651553KfoQma","attribute:footnotesListStart:footnotesDefinitions","hasClass","footnotesListStyle","add","6895365iiURTP","from","document","init","floor","footnotes.footnotesProperties.defaultListStyle","item","differ","createRangeOn","getChanges","removeStyle","_updateFootnotesCounters","decimal-leading-zero","decimal","writer","pluginName","_getDefaultListStyle","parseInt","3070152LgReQK","_defineFormatter","footnotesDefinitions","footnotes.footnotesProperties.defaultStartIndex","upcast","709026XDnVJO","type","footnotesStart","setAttribute","nodeAfter","insert","max","schema","consume","toUpperCase","find","getItems","commands","4576420BoHZcb","footnotes-list","_getDefaultStartIndex","2LvPBTq","isNaN","lower-latin","for","plugins","toViewElement","lower-alpha","getChildren","editor","name","$text","_formatFootnoteListValue","define","config","setStyle","_definePostfixer","position","hasAttribute","list-style-type","footnotesListStart","lower-roman","_defineSchema","_defineConverters","upper-roman","mapper","getStyle","checkAttribute","4501fwEoyF","isOfficialPlugin","element:ol","upper-latin","parent","padStart","11292rjFVzP","3Ofaayj","viewItem","26651060TzEIPU","toLowerCase","downcast","FootnotesPropertiesEditing","getAttribute","removeAttribute","requires","registerPostFixer","setFootnoteFormatter","start","isPremiumPlugin","attribute:footnotesListStyle:footnotesDefinitions","model","consumable","get","footnotesStyle","upper-alpha","extend","fromCharCode","element","modelCursor"];return(dt=function(){return t})()}!function(t){const e=wt,n=t();for(;;)try{if(720588===-parseInt(e(465))/1*(-parseInt(e(449))/2)+-parseInt(e(499))/3*(parseInt(e(462))/4)+parseInt(e(527))/5+parseInt(e(498))/6*(-parseInt(e(492))/7)+-parseInt(e(444))/8+-parseInt(e(522))/9+parseInt(e(501))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(dt);class ht extends t.Plugin{static get[ft(441)](){return ft(504)}static get[ft(507)](){return[v,h]}static get[ft(493)](){return!0}static get[ft(511)](){return!0}[ft(429)](){const t=ft,{editor:e}=this;e[t(478)][t(477)](t(431),t(439)),e[t(478)][t(477)](t(447),1),e[t(461)][t(526)](t(516),new rt(e)),e[t(461)][t(526)](t(451),new ut(e)),this[t(486)](),this[t(487)](),this[t(445)](),this[t(480)]()}[ft(486)](){const t=ft,{editor:e}=this,{schema:n}=e[t(513)];n[t(518)](t(446),{allowAttributes:[t(525),t(484)]})}[ft(487)](){const t=ft,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(468)](t(448))[t(526)](e=>{const n=t;e.on(n(494),(t,e,o)=>{const s=n,r=e[s(500)],a=e[s(521)]?.[s(496)];r[s(524)](s(463))&&a?.is(s(520),s(446))&&(function(t,e,n,o){const i=s;if(!o[i(491)](e,i(484)))return;let r=1;const a=n[i(514)][i(457)](t,{attributes:i(510)});if(a){const e=Number[i(443)](t[i(505)](i(510)),10);Number[i(466)](e)||(r=e)}!a&&e[i(482)](i(484))||n[i(440)][i(452)](i(484),r,e)}(r,a,o,i),function(t,e,n,o){const i=s;if(!o[i(491)](e,i(525)))return;let r=i(439),a=!1;if(n[i(514)][i(457)](t,{attributes:i(450)})){const e={1:i(439),a:i(471),A:i(517),i:i(485),I:i(488)}[t[i(505)](i(450))];e&&(r=e),a=!0}n[i(514)][i(457)](t,{styles:i(483)})&&(r=t[i(490)](i(483)),a=!0),!a&&e[i(482)](i(525))||n[i(440)][i(452)](i(525),r,e)}(r,a,o,i))})}),n[t(468)](t(503))[t(526)](e=>{const n=t;e.on(n(523),(t,e,o)=>{const i=n;if(!o[i(514)][i(457)](e[i(432)],t[i(474)]))return;const s=pt(e[i(432)],o[i(489)]),{attributeNewValue:r}=e;null==r||1===r?o[i(440)][i(506)](i(510),s):o[i(440)][i(452)](i(510),String(r),s)}),e.on(n(512),(t,e,o)=>{const i=n;if(!o[i(514)][i(457)](e[i(432)],t[i(474)]))return;const s=pt(e[i(432)],o[i(489)]),{attributeNewValue:r}=e;r&&i(439)!==r?o[i(440)][i(479)](i(483),r,s):o[i(440)][i(436)](i(483),s)})})}[ft(480)](){const t=ft,{editor:e}=this,{model:n}=e,o=e[t(469)][t(515)](h),i=this[t(442)](),s=this[t(464)]();n[t(428)][t(508)](e=>{const r=t,a=n[r(428)][r(433)][r(435)]();let c=!1;for(const t of a){if(r(454)!==t[r(450)]||r(475)===t[r(474)])continue;const o=n[r(434)](t[r(481)][r(453)]);for(const t of o[r(460)]())t.is(r(520),r(446))&&(!t[r(482)](r(484))&&n[r(456)][r(491)](t,r(484))&&(e[r(452)](r(484),s,t),c=!0),!t[r(482)](r(525))&&n[r(456)][r(491)](t,r(525))&&(e[r(452)](r(525),i,t),c=!0))}return c&&o[r(437)](e),c})}[ft(445)](){const t=ft,{editor:e}=this;e[t(469)][t(515)](h)[t(509)](e=>this[t(476)](e))}[ft(442)](){const t=ft;return this[t(473)][t(478)][t(515)](t(431))}[ft(464)](){const t=ft;return this[t(473)][t(478)][t(515)](t(447))}[ft(476)]({container:t,value:e,digits:n}){const o=ft,i=t[o(505)](o(525)),s=t[o(505)](o(484)),r=Math[o(430)](e)+(s??1)-1;switch(i){case o(438):return function(t,e){const n=o;return String(t)[n(497)](e,"0")}(r,Math[o(455)](2,n));case o(471):case o(467):return mt(r,!1);case o(517):case o(495):return mt(r,!0);case o(485):return yt(r,!1);case o(488):return yt(r,!0);default:return String(r)}}}function pt(t,e){const n=ft,o=e[n(470)](t);return Array[n(427)](o[n(472)]())[n(459)](t=>t.is(n(520),"ol")&&t[n(524)](n(463)))}function mt(t,e){const n=ft;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(519)](97+t)+o,i=Math[n(430)]((i-1)/26)}return e?o[n(458)]():o}const gt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function wt(t,e){const n=dt();return(wt=function(t,e){return n[t-=427]})(t,e)}function yt(t,e){const n=ft;let o="",i=t;for(const{value:t,numeral:e}of gt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(502)]()}class bt extends A.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new A.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:n}){super(t),this.focusCycler=new A.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,n),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,A.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const n=new A.View(this.locale);return n.children=n.createCollection(),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){for(const t of this.children)if(t instanceof A.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},n.focusTracker=new i.FocusTracker,n.keystrokes=new i.KeystrokeHandler,n.render(),n.keystrokes.listenTo(n.element),this.children.add(n),n}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),n=[e],o=new A.CollapsibleView(this.locale,n);return o.set({label:t("Footnotes properties"),isCollapsed:!0}),o.buttonView.bind("isEnabled").toMany(n,"isEnabled",(...t)=>t.some(t=>t)),o.buttonView.on("change:isEnabled",(t,e,n)=>{n||(o.isCollapsed=!0)}),this.children.add(o),[e,o]}_createStartIndexPropertyView(){const{t}=this.locale,e=new A.LabeledFieldView(this.locale,A.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)?e.errorText=t("Invalid footnotes start index value."):n.checkValidity()?this.fire("footnotesListStart",{startIndex:o}):e.errorText=t(o<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var vt=n(945),It={attributes:{"data-cke":!0}};It.setAttributes=U(),It.insert=j().bind(null,"head"),It.domAPI=K(),It.insertStyleElement=z();O()(vt.A,It);vt.A&&vt.A.locals&&vt.A.locals;class kt extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[A.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var n;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(n=t,t=>{const{t:e}=t,o=n.commands.get("footnotesStyle"),i=(0,A.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(o,"isEnabled"),s.set({label:e("Footnotes style"),icon:V.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:n}=t.locale,o=n("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:V.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:V.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:V.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:V.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:V.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:V.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:n,icon:o,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new A.ButtonView(e);return a.set({label:n,icon:o,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new bt(t.locale,{styleGridAriaLabel:o,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,n)=>{t.execute("footnotesStart",{value:n.startIndex})}),s}({editor:n,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:n}=t.locale,o=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=A.BalloonPanelView;o.register("footnotesDefinitions",{ariaLabel:n("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}function Ct(){var t=["1670978HPGuLs","4273445RkCMWf","requires","400337YBwvFV","2731127hlnBTq","isPremiumPlugin","isOfficialPlugin","pluginName","6172812maJEKC","11709224lRJxDS","542208CEAKgP","8WAaJSi","FootnotesProperties"];return(Ct=function(){return t})()}var Ft=Et;function Et(t,e){var n=Ct();return(Et=function(t,e){return n[t-=414]})(t,e)}!function(t){for(var e=Et,n=t();;)try{if(805347===-parseInt(e(417))/1+-parseInt(e(414))/2+-parseInt(e(424))/3*(-parseInt(e(425))/4)+parseInt(e(415))/5+-parseInt(e(422))/6+parseInt(e(418))/7+parseInt(e(423))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ct);class xt extends t.Plugin{static get[Ft(421)](){return Ft(426)}static get[Ft(416)](){return[ht,kt]}static get[Ft(420)](){return!0}static get[Ft(419)](){return!0}}function Pt(){var t=["5353686NRXYkG","2257320wwricK","6399953lLsymu","1023170wTjYFP","1287676gwswyx","433496uswulw","5UEoVfZ","3nJULTb","1063008bQlWzd"];return(Pt=function(){return t})()}function St(t,e){var n=Pt();return(St=function(t,e){return n[t-=177]})(t,e)}!function(t){for(var e=St,n=t();;)try{if(614436===-parseInt(e(183))/1+parseInt(e(181))/2*(parseInt(e(185))/3)+parseInt(e(182))/4+parseInt(e(184))/5*(parseInt(e(177))/6)+parseInt(e(180))/7+-parseInt(e(179))/8+-parseInt(e(178))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Pt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x444ecb,Command as _0x1c23a5}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x46f5d8,isWidget as _0x1d4b8b,toWidgetEditable as _0x1c971a,WidgetToolbarRepository as _0x25541c}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x144b00,logWarning as _0x177a28,FocusTracker as et,KeystrokeHandler as ot,global as rt}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x2ad005,ClickObserver as _0x27612b}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x1e9339}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x27c539,ButtonView as _0x352d48,View as _0x41d8a0,ViewCollection as _0x41e1e2,FocusCycler as _0x5b8a07,addKeyboardHandlingForGrid as _0x1e9083,CollapsibleView as tt,LabeledFieldView as st,createLabeledInputNumber as it,ContextualBalloon as _0x45a521,BalloonPanelView as _0x13092d,createDropdown as _0x3b703a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x1ed261,IconListStyleDecimal as _0x4066d3,IconListStyleDecimalLeadingZero as _0x528aa6,IconListStyleLowerRoman as _0x36fe45,IconListStyleUpperRoman as _0x2d1513,IconListStyleLowerLatin as _0x29c5b5,IconListStyleUpperLatin as _0xde6fb3}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x5a5511,_0x4e218b){this['_model']=_0x5a5511,this['_elementName']=_0x4e218b['elementName'],this['_getElementKey']=_0x4e218b['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x5dbee4){const _0x54cfd5=new Set(),_0x192965=new Map();for(const _0x58026d of _0x5dbee4){if('insert'===_0x58026d['type']&&'$text'!==_0x58026d['name']&&_0x58026d['position']['nodeAfter']){const _0x7dfc0e=this['_model']['createRangeOn'](_0x58026d['position']['nodeAfter']);for(const _0xdb1125 of _0x7dfc0e['getItems']()){if(!_0xdb1125['is']('element',this['_elementName']))continue;const _0x34cee0=this['_getElementKey'](_0xdb1125);_0x192965['has'](_0x34cee0)||_0x192965['set'](_0x34cee0,[]),_0x192965['get'](_0x34cee0)['push'](_0xdb1125);}}if('remove'===_0x58026d['type']&&_0x58026d['name']===this['_elementName']){const _0x2a2b6e=this['_getElementKey']({'getAttribute':_0x2b991d=>_0x58026d['attributes']['get'](_0x2b991d)});_0x54cfd5['add'](_0x2a2b6e);}}for(const [_0x7a138e,_0x4090a2]of this['_trackedElements'])'$graveyard'===_0x4090a2['root']['rootName']&&_0x54cfd5['add'](_0x7a138e);for(const _0x4182d1 of _0x54cfd5)this['_trackedElements']['delete'](_0x4182d1);for(const [_0x50264e,_0x5a0c89]of _0x192965)this['_trackedElements']['set'](_0x50264e,_0x5a0c89[_0x5a0c89['length']-0x1]);const _0x3d6c40=new Set();for(const [_0x5aece9,_0x473aac]of _0x192965)_0x54cfd5['has'](_0x5aece9)&&(_0x3d6c40['add'](_0x473aac[0x0]),_0x473aac['length']>0x1?_0x192965['set'](_0x5aece9,_0x473aac['slice'](0x1)):_0x192965['delete'](_0x5aece9),_0x54cfd5['delete'](_0x5aece9));return{'removed':Array['from'](_0x54cfd5),'inserted':Array['from'](_0x192965['values']())['flat'](),'moved':Array['from'](_0x3d6c40)};}}class c extends _0x444ecb{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x368a9b){super(_0x368a9b),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x3b5a46=>_0x3b5a46['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x56894b=>_0x56894b['getAttribute']('footnoteId')});}['init'](){const {editor:_0x193b3d}=this,{model:_0x5a852c,data:_0x1c1e33}=_0x193b3d;_0x5a852c['document']['registerPostFixer'](_0x4418d1=>{const _0x52c696=_0x5a852c['document']['differ']['getChanges']();let _0x2ecdd0=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x4418d1,_0x52c696)&&(_0x2ecdd0=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x4418d1,_0x52c696)&&(_0x2ecdd0=!0x0),this['_handleFootnoteReferencesChanges'](_0x4418d1,_0x52c696)&&(_0x2ecdd0=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x4418d1)&&(_0x2ecdd0=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x4418d1)&&(_0x2ecdd0=!0x0),this['_sortFootnoteDefinitions'](_0x4418d1)&&(_0x2ecdd0=!0x0),_0x2ecdd0;}),this['listenTo'](_0x5a852c['document'],'change:data',()=>{_0x5a852c['enqueueChange']({'isUndoable':!0x1},_0x6628b8=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x6628b8);});},{'priority':'low'}),this['listenTo'](_0x1c1e33,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x20d27a){return this['_footnotes']['find'](_0x48b37f=>_0x48b37f['id']===_0x20d27a)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x358a36){this['_footnoteFormatter']=_0x358a36;}['_updateFootnotesCounters'](_0x4a3202,_0x125315=0x0){let _0x8c27d8=!0x1;for(let _0x74cc46=_0x125315;_0x74cc46<this['_footnotes']['length'];_0x74cc46++)this['_updateFootnoteRefCounter'](_0x4a3202,_0x74cc46)&&(_0x8c27d8=!0x0);return _0x8c27d8;}['_insertEmptyFootnotesDefinitionsContainer'](_0x291878,_0x5222e0){const _0x33415d=_0x291878['createElement']('footnotesDefinitions',{});return _0x291878['append'](_0x33415d,_0x5222e0),this['_footnotesDefinitions']=_0x33415d,_0x33415d;}['_ensureFootnotesDefinitionsContainerExists'](_0x4c4531){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x587785=this['_footnotes'][0x0]['reference']['root'],_0xb96867=this['_insertEmptyFootnotesDefinitionsContainer'](_0x4c4531,_0x587785);for(const _0x4f3232 of this['_footnotes'])_0x4f3232['definition']['parent']||_0x4c4531['insert'](_0x4f3232['definition'],_0xb96867,'end');this['_updateFootnotesCounters'](_0x4c4531);}['_handleFootnotesDefinitionsObjectChanges'](_0x3d526c,_0xe7d5f6){let _0x248a4d=!0x1;const {inserted:_0x1e099c,removed:_0x5242ca,moved:_0x151454}=this['_footnoteDefsContainerTracker']['getChanges'](_0xe7d5f6);if(_0x151454['length']&&(this['_footnotesDefinitions']=_0x151454[0x0]),_0x1e099c['length']){if(_0x1e099c['length']>0x1||this['_footnotesDefinitions']&&_0x1e099c['some'](_0x1dfe34=>_0x1dfe34!==this['_footnotesDefinitions'])){const _0x1de993=_0x3d526c['createElement']('footnotesDefinitions',{}),_0x350e6e=[];this['_footnotesDefinitions']&&_0x350e6e['push'](this['_footnotesDefinitions']),_0x350e6e['push'](..._0x1e099c),_0x3d526c['insert'](_0x1de993,_0x350e6e[0x0],'before');for(const _0x3a8623 of _0x350e6e)_0x3d526c['move'](_0x3d526c['createRangeIn'](_0x3a8623),_0x3d526c['createPositionAt'](_0x1de993,'end')),_0x3d526c['remove'](_0x3a8623);this['_footnotesDefinitions']=_0x1de993,this['_updateFootnotesCounters'](_0x3d526c),_0x248a4d=!0x0;}else this['_footnotesDefinitions']=_0x1e099c[0x0];}if(_0x5242ca['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x38229b of this['_footnotes'])_0x3d526c['remove'](_0x38229b['reference']),_0x248a4d=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x248a4d;}['_handleFootnoteDefinitionsChanges'](_0x5df44f,_0x557f30){let _0x2826d4=!0x1;const _0x16b89c=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x556c2f,moved:_0x25f3c1}=this['_footnoteDefsTracker']['getChanges'](_0x557f30);for(const _0x21287c of[..._0x25f3c1,..._0x556c2f]){const _0x59f99a=_0x21287c['getAttribute']('footnoteId'),_0x2ce4c4=this['getFootnote'](_0x59f99a);_0x2ce4c4&&(_0x2ce4c4['definition']=_0x21287c),_(_0x5df44f,_0x16b89c,_0x21287c)&&(_0x2826d4=!0x0);}return _0x2826d4;}['_handleFootnoteReferencesChanges'](_0x2a810b,_0x286546){let _0x26ab49=!0x1;const {removed:_0x51f1df,inserted:_0x3a0397,moved:_0x53d270}=this['_footnoteRefsTracker']['getChanges'](_0x286546);for(const _0x24e4b5 of _0x51f1df)this['_handleRemoveFootnoteReferenceById'](_0x2a810b,_0x24e4b5)&&(_0x26ab49=!0x0);for(const _0x34cafc of _0x3a0397)this['_handleInsertedFootnoteReference'](_0x2a810b,_0x34cafc)&&(_0x26ab49=!0x0);for(const _0x3a248e of _0x53d270)this['_handleMovedFootnoteReference'](_0x2a810b,_0x3a248e)&&(_0x26ab49=!0x0);return _0x26ab49;}['_handleFootnotesDefinitionsObjectSync'](_0xfcfc0e){if(!this['_footnotesDefinitions'])return!0x1;let _0x3e2dd8=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x3225ca=[];for(const _0x2f4ba4 of this['_footnotesDefinitions']['getChildren']()){const _0x38d014=_0x2f4ba4['getAttribute']('footnoteId');this['getFootnote'](_0x38d014)||(_0x3225ca['unshift'](_0x2f4ba4),_0x3e2dd8=!0x0);}for(const _0x40c30e of _0x3225ca)_0xfcfc0e['remove'](_0x40c30e);}const _0x5de5ec=new Set(),_0x2174c0=[];for(const _0x27856c of this['_footnotesDefinitions']['getChildren']()){const _0x2b3d67=_0x27856c['getAttribute']('footnoteId');_0x5de5ec['has'](_0x2b3d67)?(_0x2174c0['unshift'](_0x27856c),_0x3e2dd8=!0x0):_0x5de5ec['add'](_0x2b3d67);}for(const _0x407d1f of _0x2174c0)_0xfcfc0e['remove'](_0x407d1f);return this['_footnotesDefinitions']['childCount']||(_0xfcfc0e['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x3e2dd8=!0x0),_0x3e2dd8;}['_handleInsertedFootnoteReference'](_0x2b14c4,_0x4cb94a){if(this['_footnotes']['find'](_0x304fba=>_0x304fba['reference']===_0x4cb94a))return!0x1;let _0xa35e77=!0x1;const _0x25dac0=_0x4cb94a['getAttribute']('footnoteId'),_0x30f4f3=this['_footnotes']['findIndex'](_0x3908b0=>_0x3908b0['id']===_0x25dac0);-0x1!==_0x30f4f3&&(_0x2b14c4['remove'](this['_footnotes'][_0x30f4f3]['reference']),this['_footnotes']['splice'](_0x30f4f3,0x1),_0xa35e77=!0x0);let _0x5b56eb=this['_footnotesDefinitions']?function(_0x31fb28,_0x1fea3c){for(const _0x3a080e of _0x31fb28['getChildren']())if(_0x3a080e['getAttribute']('footnoteId')===_0x1fea3c)return _0x3a080e;return null;}(this['_footnotesDefinitions'],_0x25dac0):null;_0x5b56eb||(_0x5b56eb=_0x2b14c4['createElement']('footnoteDefinition',{'footnoteId':_0x25dac0}),this['_footnotesDefinitions']&&(_0x2b14c4['insert'](_0x5b56eb,this['_footnotesDefinitions'],'end'),_0xa35e77=!0x0));const _0x28d299={'id':_0x25dac0,'reference':_0x4cb94a,'definition':_0x5b56eb},_0x138c74=I(this['editor']['model'],this['_footnotes'],_0x4cb94a);this['_footnotes']['splice'](_0x138c74,0x0,_0x28d299);let _0x408be3=_0x138c74;return-0x1!==_0x30f4f3&&(_0x408be3=Math['min'](_0x138c74,_0x30f4f3)),this['_updateFootnotesCounters'](_0x2b14c4,_0x408be3)&&(_0xa35e77=!0x0),_0xa35e77;}['_handleRemoveFootnoteReferenceById'](_0xcc9724,_0x33200e){const _0x39a2a9=this['_footnotes']['findIndex'](_0x58797d=>_0x58797d['id']===_0x33200e);if(-0x1===_0x39a2a9)return!0x1;let _0x25e7f0=!0x1;const _0x397ffd=this['_footnotes'][_0x39a2a9];return'$graveyard'!==_0x397ffd['definition']['root']['rootName']&&(_0xcc9724['remove'](_0x397ffd['definition']),_0x25e7f0=!0x0),this['_footnotes']['splice'](_0x39a2a9,0x1),this['_updateFootnotesCounters'](_0xcc9724,_0x39a2a9)&&(_0x25e7f0=!0x0),_0x25e7f0;}['_handleMovedFootnoteReference'](_0x30aba6,_0x5a0b87){const _0xf7c063=_0x5a0b87['getAttribute']('footnoteId'),_0x821b7c=this['_footnotes']['findIndex'](_0x1be221=>_0x1be221['id']===_0xf7c063),_0x1c6d3d=this['_footnotes'][_0x821b7c];let _0xed33f3=!0x1;_0x1c6d3d['reference']=_0x5a0b87,this['_footnotes']['splice'](_0x821b7c,0x1);const _0xd8f42b=I(this['editor']['model'],this['_footnotes'],_0x5a0b87);return this['_footnotes']['splice'](_0xd8f42b,0x0,_0x1c6d3d),this['_updateFootnotesCounters'](_0x30aba6,Math['min'](_0x821b7c,_0xd8f42b))&&(_0xed33f3=!0x0),_0xed33f3;}['_updateFootnoteRefCounter'](_0x2c6fe3,_0x44f882){if(!this['_footnotesDefinitions'])return!0x1;const _0x5a07a3=this['_footnotes'][_0x44f882];let _0x230c31;return _0x230c31=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x5a07a3,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x44f882+0x1}):String(_0x44f882+0x1),_0x5a07a3['reference']['getAttribute']('footnoteCounter')!=_0x230c31&&(_0x2c6fe3['setAttribute']('footnoteCounter',_0x230c31,_0x5a07a3['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x3ea45c){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x8ae8af,_0x21ee13){if(_0x8ae8af['length']!==_0x21ee13['length'])return!0x1;for(let _0x25882f=0x0;_0x25882f<_0x8ae8af['length'];_0x25882f++)if(_0x8ae8af[_0x25882f]!==_0x21ee13[_0x25882f])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x37cef8=>_0x37cef8['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x441d01=>_0x441d01['getAttribute']('footnoteId'))))return!0x1;let _0x3a5085=!0x1;for(let _0x333e3b=0x0;_0x333e3b<this['_footnotes']['length'];_0x333e3b++){const _0x169644=this['_footnotes'][_0x333e3b],_0x3627b2=_0x3ea45c['createPositionBefore'](_0x169644['definition']),_0x2df2c9=_0x3ea45c['createPositionAt'](this['_footnotesDefinitions'],_0x333e3b);_0x3627b2['isEqual'](_0x2df2c9)||(_0x3ea45c['move'](_0x3ea45c['createRangeOn'](_0x169644['definition']),_0x2df2c9),_0x3a5085=!0x0);}return _0x3a5085;}['_ensureFootnotesReferencesHaveProperOrder'](_0x4bef04){if(!this['_footnotes']['length'])return!0x1;const {model:_0xc24b0b}=this['editor'];let _0x5f3495=!0x1;for(let _0x5a58b3=0x0;_0x5a58b3<this['_footnotes']['length']-0x1;_0x5a58b3++){const _0x525749=this['_footnotes'][_0x5a58b3],_0xecdfa3=this['_footnotes'][_0x5a58b3+0x1],_0x595112=_0xc24b0b['createPositionBefore'](_0x525749['reference']),_0x290403=_0xc24b0b['createPositionBefore'](_0xecdfa3['reference']);'after'===_0x595112['compareWith'](_0x290403)&&(this['_handleMovedFootnoteReference'](_0x4bef04,_0x525749['reference']),_0x5a58b3=-0x1,_0x5f3495=!0x0);}return _0x5f3495;}}function _(_0x3c27bb,_0x381fb5,_0x1945b7){if(_0x1945b7['childCount'])return!0x1;const _0x26d0f4=_0x381fb5?'paragraph':'footnoteInlineContent';return _0x3c27bb['insert'](_0x3c27bb['createElement'](_0x26d0f4),_0x1945b7),!0x0;}function I(_0x4510ff,_0x376282,_0x11060b){if(0x0===_0x376282['length'])return 0x0;const _0x4c04cd=_0x4510ff['createPositionBefore'](_0x11060b);for(let _0x20d7f1=0x0;_0x20d7f1<_0x376282['length'];_0x20d7f1++){const _0x3e235c=_0x376282[_0x20d7f1],_0x2efa2b=_0x4510ff['createPositionBefore'](_0x3e235c['reference']);if('before'===_0x4c04cd['compareWith'](_0x2efa2b))return _0x20d7f1;}const _0x440047=_0x11060b['root'];let _0x979cb4=-0x1;for(let _0x5b6027=_0x376282['length']-0x1;_0x5b6027>=0x0;_0x5b6027--)if(_0x376282[_0x5b6027]['reference']['root']===_0x440047){_0x979cb4=_0x5b6027;break;}if(-0x1!==_0x979cb4)return _0x979cb4+0x1;const _0x1d6e10=_0x4510ff['document']['getRootNames'](),_0x404f57=_0x1d6e10['indexOf'](_0x440047['rootName']),_0x233475=_0x1d6e10[_0x404f57+0x1];if(_0x233475){for(let _0x543b36=0x0;_0x543b36<_0x376282['length'];_0x543b36++)if(_0x376282[_0x543b36]['reference']['root']['rootName']===_0x233475)return _0x543b36;}return _0x376282['length'];}class w extends _0x1c23a5{['refresh'](){const _0x52d852=this['editor']['model']['document']['selection'],_0x53fb33=this['_getPositionToInsertFootnote'](_0x52d852);this['isEnabled']=!!_0x53fb33;}['execute'](_0x531b9b){const {editor:_0xe252ca}=this,{model:_0x3d6b07}=_0xe252ca,{selection:_0x498e8f}=_0x3d6b07['document'],_0x2914b3=this['_getPositionToInsertFootnote'](_0x498e8f);if(!_0x2914b3)return;const _0x4db96e=_0xe252ca['plugins']['get']('FootnotesEditing'),_0x447e01=_0x531b9b?.['footnoteId']??_0x144b00();!function(_0x66ece8){return'string'==typeof _0x66ece8&&_0x66ece8['length']>0x0&&!/\s/['test'](_0x66ece8)&&!/^\d/['test'](_0x66ece8);}(_0x447e01)?_0x177a28('insert-footnote-command-executed-with-invalid-id'):(_0x3d6b07['change'](_0x4ec57f=>{const _0x45ee4c=_0x4ec57f['createElement']('footnoteRef',{'footnoteId':_0x447e01});_0x3d6b07['insertObject'](_0x45ee4c,_0x2914b3,null);}),_0x4db96e['_moveSelectionToFootnoteDefinition'](_0x447e01));}['_getPositionToInsertFootnote'](_0x13e623){const {model:_0x451eb1}=this['editor'],{schema:_0x58e039}=_0x451eb1,_0x263620=_0x13e623['getFirstRange']();for(const _0x31afc7 of _0x263620['getItems']())if(_0x58e039['isBlock'](_0x31afc7)||_0x58e039['isObject'](_0x31afc7))return null;const _0x4b64fa=_0x263620['end'];return _0x58e039['checkChild'](_0x4b64fa,'footnoteRef')?_0x4b64fa:null;}}class r extends _0x444ecb{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1c58ba}=this;_0x1c58ba['config']['define']('footnotes.multiBlock',!0x0),_0x1c58ba['commands']['add']('insertFootnote',new w(_0x1c58ba)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x1ba4d1){const _0x113eb3=_0x18a67f([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]),_0x5306e9=0x47a28506,_0x384740=0x47a5f296^_0x5306e9,_0x402c55=window[_0x18a67f([0x44,0x61,0x74,0x65])][_0x18a67f([0x6e,0x6f,0x77])](),_0x1fb57e=_0x1ba4d1[_0x18a67f([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xa51114=new window[(_0x18a67f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1eacbd=>{_0x1fb57e[_0x18a67f([0x6f,0x6e,0x63,0x65])](_0x18a67f([0x72,0x65,0x61,0x64,0x79]),_0x1eacbd);}),_0x42424a={[_0x18a67f([0x6b,0x74,0x79])]:_0x18a67f([0x45,0x43]),[_0x18a67f([0x75,0x73,0x65])]:_0x18a67f([0x73,0x69,0x67]),[_0x18a67f([0x63,0x72,0x76])]:_0x18a67f([0x50,0x2d,0x32,0x35,0x36]),[_0x18a67f([0x78])]:_0x18a67f([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]),[_0x18a67f([0x79])]:_0x18a67f([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]),[_0x18a67f([0x61,0x6c,0x67])]:_0x18a67f([0x45,0x53,0x32,0x35,0x36])},_0x857404=_0x1fb57e[_0x18a67f([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x18a67f([0x67,0x65,0x74])](_0x18a67f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4a3e03(){let _0x15dce1,_0x148098=null,_0x44420e=null;try{if(_0x857404==_0x18a67f([0x47,0x50,0x4c]))return _0x18a67f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x15dce1=_0x2eeec5(),!_0x15dce1)return _0x18a67f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x15dce1[_0x18a67f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x44420e=_0x413251(_0x15dce1[_0x18a67f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x15dce1[_0x18a67f([0x6a,0x74,0x69])])),await _0x3f9764()?_0x5cf6d6()?_0x39f659()?_0x18a67f([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3cc39f()?(_0x15dce1[_0x18a67f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18a67f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x148098=_0x5e90d0(_0x18a67f([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x15dce1[_0x18a67f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18a67f([0x74,0x72,0x69,0x61,0x6c])&&(_0x148098=_0x5e90d0(_0x18a67f([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x50ac3a()):_0x18a67f([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x18a67f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x18a67f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x18a67f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x39f659(){const _0x5d15f1=[_0x18a67f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x18a67f([0x74,0x72,0x69,0x61,0x6c])][_0x18a67f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15dce1[_0x18a67f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x402c55/0x3e8:0xe10*_0x384740;return _0x15dce1[_0x18a67f([0x65,0x78,0x70])]<_0x5d15f1;}function _0x5cf6d6(){const _0x18604d=_0x15dce1[_0x18a67f([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x18604d&&(!!_0x18604d[_0x18a67f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a67f([0x2a]))||!!_0x18604d[_0x18a67f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a67f([0x46,0x4f,0x4f])));}function _0x3cc39f(){const _0x156e5=_0x15dce1[_0x18a67f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x156e5||0x0==_0x156e5[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5186dc}=new URL(window[_0x18a67f([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x156e5[_0x18a67f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5186dc))return!0x0;const _0x1a5ad7=_0x5186dc[_0x18a67f([0x73,0x70,0x6c,0x69,0x74])](_0x18a67f([0x2e]));return _0x156e5[_0x18a67f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x52a6d2=>_0x52a6d2[_0x18a67f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a67f([0x2a])))[_0x18a67f([0x6d,0x61,0x70])](_0x78f43d=>_0x78f43d[_0x18a67f([0x73,0x70,0x6c,0x69,0x74])](_0x18a67f([0x2e])))[_0x18a67f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x516e30=>_0x516e30[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1a5ad7[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x18a67f([0x6d,0x61,0x70])](_0x1d8ca5=>Array(_0x1a5ad7[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1d8ca5[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x18a67f([0x66,0x69,0x6c,0x6c])](_0x1d8ca5[0x0]===_0x18a67f([0x2a])?_0x18a67f([0x2a]):'')[_0x18a67f([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1d8ca5))[_0x18a67f([0x73,0x6f,0x6d,0x65])](_0x5e6c34=>_0x1a5ad7[_0x18a67f([0x65,0x76,0x65,0x72,0x79])]((_0xc649a6,_0xb9c2b0)=>_0x5e6c34[_0xb9c2b0]===_0xc649a6||_0x5e6c34[_0xb9c2b0]===_0x18a67f([0x2a])));}function _0x50ac3a(){return _0x148098&&_0x44420e?new window[(_0x18a67f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5e5387,_0x2b3f81)=>{_0x148098[_0x18a67f([0x74,0x68,0x65,0x6e])](_0x5e5387,_0x2b3f81),_0x44420e[_0x18a67f([0x74,0x68,0x65,0x6e])](_0x470ca7=>{_0x470ca7!=_0x18a67f([0x56,0x61,0x6c,0x69,0x64])&&_0x5e5387(_0x470ca7);},_0x2b3f81);}):_0x148098||_0x44420e||_0x18a67f([0x56,0x61,0x6c,0x69,0x64]);}}function _0x413251(_0x322a78,_0x4a2877){return new window[(_0x18a67f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1041ad=>{if(_0x375444())return _0x1041ad(_0x18a67f([0x56,0x61,0x6c,0x69,0x64]));_0x5206b3(),_0x1fb57e[_0x18a67f([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x18a67f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xbb270c=!0x1;const _0x58634a=_0x144b00();function _0x3b5686(_0x25175a){return!!_0x25175a&&(typeof _0x25175a===_0x18a67f([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x25175a===_0x18a67f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x25175a[_0x18a67f([0x74,0x68,0x65,0x6e])]===_0x18a67f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x25175a[_0x18a67f([0x63,0x61,0x74,0x63,0x68])]===_0x18a67f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x158031(_0x8418e9){_0x254fb9(_0x8418e9)[_0x18a67f([0x74,0x68,0x65,0x6e])](_0x418b2c=>{if(!_0x418b2c||_0x418b2c[_0x18a67f([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x18a67f([0x6f,0x6b]))return _0x18a67f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x101567(_0x4ab550(_0x58634a+_0x4a2877))!=_0x418b2c[_0x18a67f([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x18a67f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x18a67f([0x56,0x61,0x6c,0x69,0x64]);})[_0x18a67f([0x74,0x68,0x65,0x6e])](_0x21fb5e=>(_0x2bffe1(),_0x21fb5e),()=>{const _0x171027=_0x447829();return null==_0x171027?(_0x2bffe1(),_0x18a67f([0x56,0x61,0x6c,0x69,0x64])):_0x18a67f(_0x402c55-_0x171027>(0x63ae0106^_0x5306e9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x18a67f([0x74,0x68,0x65,0x6e])](_0x1041ad)[_0x18a67f([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1041ad(_0x18a67f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x30ec3c=0x47946b86^_0x5306e9;function _0x2bffe1(){const _0x5a3c9d=_0x18a67f([0x6c,0x6c,0x63,0x74,0x2d])+_0x101567(_0x4ab550(_0x322a78)),_0x538d9b=_0x12de32(_0x101567(window[_0x18a67f([0x4d,0x61,0x74,0x68])][_0x18a67f([0x63,0x65,0x69,0x6c])](_0x402c55/_0x30ec3c)));window[_0x18a67f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18a67f([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5a3c9d,_0x538d9b);}function _0x447829(){const _0x3404c4=_0x18a67f([0x6c,0x6c,0x63,0x74,0x2d])+_0x101567(_0x4ab550(_0x322a78)),_0x4070a9=window[_0x18a67f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18a67f([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3404c4);return _0x4070a9?window[_0x18a67f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x12de32(_0x4070a9),0x10)*_0x30ec3c:null;}function _0x254fb9(_0x24b1e8){return new window[(_0x18a67f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x116d58,_0x1c2680)=>{_0x24b1e8[_0x18a67f([0x74,0x68,0x65,0x6e])](_0x116d58,_0x1c2680),window[_0x18a67f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1c2680,0x47a351c6^_0x5306e9);});}}_0x1fb57e[_0x18a67f([0x6f,0x6e])](_0x18a67f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x25416c,_0x152eba)=>{if(_0x152eba[0x0]!=_0x322a78)return _0x1041ad(_0x18a67f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x152eba[0x1]={..._0x152eba[0x1],[_0x18a67f([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x58634a};},{[_0x18a67f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18a67f([0x68,0x69,0x67,0x68])}),_0x1fb57e[_0x18a67f([0x6f,0x6e])](_0x18a67f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x40cb57=>{_0x3b5686(_0x40cb57[_0x18a67f([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xbb270c=!0x0,_0x158031(_0x40cb57[_0x18a67f([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x18a67f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18a67f([0x6c,0x6f,0x77])}),_0xa51114[_0x18a67f([0x74,0x68,0x65,0x6e])](()=>{_0xbb270c||_0x1041ad(_0x18a67f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x375444(){return _0x1fb57e[_0x18a67f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18a67f([0x76,0x69,0x65,0x77])][_0x18a67f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x18a67f([0x61,0x75,0x74,0x6f]);}function _0x5206b3(){_0x1fb57e[_0x18a67f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18a67f([0x76,0x69,0x65,0x77])][_0x18a67f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x18a67f([0x61,0x75,0x74,0x6f]);}}function _0x5e90d0(_0x33213a){const _0x344106=[new window[(_0x18a67f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3fa7d3=>setTimeout(_0x3fa7d3,0x47abbbca^_0x5306e9)),_0xa51114[_0x18a67f([0x74,0x68,0x65,0x6e])](()=>new window[(_0x18a67f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1be6e4=>{let _0x5673c6=0x0;_0x1fb57e[_0x18a67f([0x6d,0x6f,0x64,0x65,0x6c])][_0x18a67f([0x6f,0x6e])](_0x18a67f([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x507d62,_0x5b3799)=>{_0x5b3799[0x0][_0x18a67f([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5673c6++,_0x5673c6==(0x47a284fe^_0x5306e9)&&(_0x1be6e4(),_0x507d62[_0x18a67f([0x6f,0x66,0x66])]());});}))];return window[_0x18a67f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x18a67f([0x72,0x61,0x63,0x65])](_0x344106)[_0x18a67f([0x74,0x68,0x65,0x6e])](()=>_0x33213a);}async function _0x66940d(){await _0xa51114,_0x1fb57e[_0x18a67f([0x6d,0x6f,0x64,0x65,0x6c])][_0x18a67f([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xf7e66e,_0x1fb57e[_0x18a67f([0x6d,0x6f,0x64,0x65,0x6c])][_0x18a67f([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xf7e66e,_0x1fb57e[_0x18a67f([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x18a67f([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x32e22e(_0x96fbd2){const _0x3dc6f8=_0x58c8b7();_0x1fb57e[_0x3dc6f8]=_0x18a67f([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x96fbd2,_0x96fbd2!=_0x18a67f([0x56,0x61,0x6c,0x69,0x64])&&_0x66940d();}function _0x58c8b7(){const _0x7bbc22=window[_0x18a67f([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x18a67f([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x18a67f([0x6e,0x6f,0x77])]())[_0x18a67f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x18a67f([0x2e]),'');let _0x2d2e75=_0x18a67f([0x75]);for(let _0x3f9e9d=0x0;_0x3f9e9d<_0x7bbc22[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3f9e9d+=0x2){let _0x31b98c=window[_0x18a67f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x7bbc22[_0x18a67f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3f9e9d,_0x3f9e9d+0x2));_0x31b98c>=_0x113eb3[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x31b98c-=_0x113eb3[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2d2e75+=_0x113eb3[_0x31b98c];}return _0x2d2e75;}function _0x2eeec5(){const _0x105b67=_0x857404[_0x18a67f([0x73,0x70,0x6c,0x69,0x74])](_0x18a67f([0x2e]));if(0x3!=_0x105b67[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3bbc01(_0x105b67[0x1]);function _0x3bbc01(_0x356fe2){const _0x346046=_0x1210c3(_0x356fe2);return _0x346046&&_0x5888fe()?_0x346046:null;function _0x5888fe(){const _0x253c34=_0x346046[_0x18a67f([0x6a,0x74,0x69])],_0x1d09a7=window[_0x18a67f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x253c34[_0x18a67f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x253c34[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x15a67f={..._0x346046,[_0x18a67f([0x6a,0x74,0x69])]:_0x253c34[_0x18a67f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x253c34[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x15a67f[_0x18a67f([0x76,0x63])],_0x4ab550(_0x15a67f)==_0x1d09a7;}}}async function _0x3f9764(){let _0x5c899a=!0x0;try{const _0xf8f11d=_0x857404[_0x18a67f([0x73,0x70,0x6c,0x69,0x74])](_0x18a67f([0x2e])),[_0x21d7fa,_0x51cf35,_0x5823d9]=_0xf8f11d;return _0x1f56fd(_0x21d7fa),await _0x1fc1c9(_0x21d7fa,_0x51cf35,_0x5823d9),_0x5c899a;}catch{return!0x1;}function _0x1f56fd(_0x1be125){const _0x33f02c=_0x1210c3(_0x1be125);_0x33f02c&&_0x33f02c[_0x18a67f([0x61,0x6c,0x67])]==_0x18a67f([0x45,0x53,0x32,0x35,0x36])||(_0x5c899a=!0x1);}async function _0x1fc1c9(_0x97212b,_0x1628e9,_0x525816){const _0x43a4d1=window[_0x18a67f([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x18a67f([0x66,0x72,0x6f,0x6d])](_0xff0fc0(_0x525816),_0x29aae3=>_0x29aae3[_0x18a67f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4b9284=new window[(_0x18a67f([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x18a67f([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x97212b+_0x18a67f([0x2e])+_0x1628e9),_0x29a93d=window[_0x18a67f([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x18a67f([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x29a93d)return;const _0x12c0b2=await _0x29a93d[_0x18a67f([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x18a67f([0x6a,0x77,0x6b]),_0x42424a,{[_0x18a67f([0x6e,0x61,0x6d,0x65])]:_0x18a67f([0x45,0x43,0x44,0x53,0x41]),[_0x18a67f([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x18a67f([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x18a67f([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x29a93d[_0x18a67f([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x18a67f([0x6e,0x61,0x6d,0x65])]:_0x18a67f([0x45,0x43,0x44,0x53,0x41]),[_0x18a67f([0x68,0x61,0x73,0x68])]:{[_0x18a67f([0x6e,0x61,0x6d,0x65])]:_0x18a67f([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x12c0b2,_0x43a4d1,_0x4b9284)||(_0x5c899a=!0x1);}}function _0x1210c3(_0x46864a){return _0x46864a[_0x18a67f([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x18a67f([0x65,0x79]))?JSON[_0x18a67f([0x70,0x61,0x72,0x73,0x65])](_0xff0fc0(_0x46864a)):null;}function _0xff0fc0(_0x23f5aa){return window[_0x18a67f([0x61,0x74,0x6f,0x62])](_0x23f5aa[_0x18a67f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x18a67f([0x2b]))[_0x18a67f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x18a67f([0x2f])));}function _0x4ab550(_0x1e41e7){let _0x38ae7e=0x1505;function _0x76f401(_0x2d2c4a){for(let _0x55cd39=0x0;_0x55cd39<_0x2d2c4a[_0x18a67f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x55cd39++){const _0x5c4c36=_0x2d2c4a[_0x18a67f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x55cd39);_0x38ae7e=(_0x38ae7e<<0x5)+_0x38ae7e+_0x5c4c36,_0x38ae7e&=_0x38ae7e;}}function _0x446644(_0x322d7e){Array[_0x18a67f([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x322d7e)?_0x322d7e[_0x18a67f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x446644):_0x322d7e&&typeof _0x322d7e==_0x18a67f([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x18a67f([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x322d7e)[_0x18a67f([0x73,0x6f,0x72,0x74])]()[_0x18a67f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5ae86c,_0x3fdf76])=>{_0x76f401(_0x5ae86c),_0x446644(_0x3fdf76);}):_0x76f401(window[_0x18a67f([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x322d7e));}return _0x446644(_0x1e41e7),_0x38ae7e>>>0x0;}function _0x101567(_0x5b4665){return _0x5b4665[_0x18a67f([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x18a67f([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x18a67f([0x30]));}function _0x12de32(_0x48bc41){return _0x48bc41[_0x18a67f([0x73,0x70,0x6c,0x69,0x74])]('')[_0x18a67f([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x18a67f([0x6a,0x6f,0x69,0x6e])]('');}function _0xf7e66e(){}function _0x18a67f(_0x582300){return _0x582300['map'](_0x521caf=>String['fromCharCode'](_0x521caf))['join']('');}_0x32e22e(await _0x4a3e03());}(this);}['_moveSelectionToFootnoteDefinition'](_0x4e7c02){const {plugins:_0x4c25ab,editing:_0x4d3c76,model:_0x4aa5c7}=this['editor'],_0x2ede3e=_0x4c25ab['get'](c)['getFootnote'](_0x4e7c02);return!!_0x2ede3e&&(_0x4aa5c7['change'](_0x2fcb9e=>{_0x2fcb9e['setSelection'](_0x2fcb9e['createPositionAt'](_0x2ede3e['definition'],'end'));}),_0x4d3c76['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x4be436){const {plugins:_0x583b28,editing:_0x44039e,model:_0x551016}=this['editor'],_0x1dcbcf=_0x583b28['get'](c)['getFootnote'](_0x4be436);return!!_0x1dcbcf&&(_0x551016['change'](_0x9fcb6d=>{_0x9fcb6d['setSelection'](_0x1dcbcf['reference'],'on');}),_0x44039e['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x56f5ac}=this['editor']['model'],_0x28fba3=this['editor']['config']['get']('footnotes.multiBlock');_0x56f5ac['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x56f5ac['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x56f5ac['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x28fba3?_0x56f5ac['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x56f5ac['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x56f5ac['addChildCheck'](_0x4eb9c9=>{for(const _0x14e7ac of _0x4eb9c9)if('footnoteDefinition'===_0x14e7ac['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x55ef4e}=this,{conversion:_0x4c1e1d,editing:_0xd45f93}=_0x55ef4e,{t:t}=_0x55ef4e['locale'];_0x4c1e1d['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x376d18,{writer:_0x184d4d,consumable:_0x2722fd})=>{const _0x599c9b=_0x376d18['getChild'](0x0);if(!_0x599c9b||!_0x599c9b['is']('element','a'))return null;const _0x1a0806=_0x599c9b['getAttribute']('href')||'';if(!_0x1a0806['startsWith']('#'))return null;const _0x4dda31=_0x1a0806['replace'](/^#/,'');if(!_0x4dda31)return null;_0x2722fd['consume'](_0x599c9b,{'name':!0x0,'attributes':['href']});for(const {item:_0x320bd9}of _0xd45f93['view']['createRangeIn'](_0x599c9b))_0x320bd9['is']('$textProxy')?_0x2722fd['consume'](_0x320bd9['textNode'],{'name':!0x0}):_0x320bd9['is']('element')&&_0x2722fd['consume'](_0x320bd9,{'name':!0x0});return _0x184d4d['createElement']('footnoteRef',{'footnoteId':_0x4dda31});}}),_0x4c1e1d['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x4c2729,{writer:_0x5c595e})=>D(_0x4c2729,_0x5c595e)}),_0x4c1e1d['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x383811,{writer:_0x56ae54})=>{const _0x41c03f=_0x383811['getAttribute']('footnoteCounter');return _0x46f5d8(D(_0x383811,_0x56ae54),_0x56ae54,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x41c03f)});}});}['_defineDefinitionsConverters'](){const {editor:_0x31d619}=this,{t:t}=_0x31d619['locale'],{conversion:_0x3fd5c3}=_0x31d619;_0x3fd5c3['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x3fd5c3['for']('upcast')['add'](_0x3ad72d=>{_0x3ad72d['on']('element:ol',(_0x45bfca,_0x2c78e0,_0x50f825)=>{const _0x1de3a4=_0x2c78e0['viewItem'];if(!_0x1de3a4['hasClass']('footnotes-list')||!_0x2c78e0['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x50f825['consumable']['consume'](_0x1de3a4,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x14a754,modelCursor:_0x42f151}=_0x50f825['convertChildren'](_0x2c78e0['viewItem'],_0x2c78e0['modelCursor']);_0x2c78e0['modelRange']=_0x14a754,_0x2c78e0['modelCursor']=_0x42f151;}),_0x3ad72d['on']('element:hr',(_0x566d9e,_0x187a34,_0x29278e)=>{const _0x96f257=_0x187a34['viewItem'];_0x96f257['hasClass']('footnotes-divider')&&_0x187a34['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x29278e['consumable']['consume'](_0x96f257,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x3fd5c3['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x5ce0d3,{writer:_0x5f3976})=>g(_0x5f3976)}),_0x3fd5c3['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x332216,{writer:_0x23baf9})=>{const _0x56bb7a=g(_0x23baf9,{'data-footnotes-list-label':t('Footnotes')}),_0x254afe=_0x46f5d8(_0x56bb7a,_0x23baf9,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x23baf9['setCustomProperty']('footnotesDefinitions',!0x0,_0x254afe),_0x254afe;}});}['_defineDefinitionConverters'](){const {editor:_0x4f51da}=this,{conversion:_0x46f665,locale:_0x4edccf}=_0x4f51da,_0x43cd05=_0x4f51da['config']['get']('footnotes.multiBlock');_0x46f665['for']('upcast')['add'](_0x58ae69=>{_0x58ae69['on']('element:li',(_0x7753eb,_0x47361d,_0x4e52a7)=>{const _0x54ef45=_0x47361d['viewItem'];if(!_0x54ef45['hasClass']('footnote-definition')||!_0x54ef45['getAttribute']('id'))return;const _0x56ef14=_0x54ef45['parent'];if(!_0x56ef14['is']('element','ol')||!_0x56ef14['hasClass']('footnotes-list'))return;if(!_0x4e52a7['consumable']['test'](_0x54ef45,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0xfcc46b=_0x4e52a7['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x54ef45['getAttribute']('id')});if(!_0x4e52a7['safeInsert'](_0xfcc46b,_0x47361d['modelCursor']))return;_0x4e52a7['consumable']['consume'](_0x54ef45,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x1de8b5=Array['from'](_0x54ef45['getChildren']())['find'](_0xc5ce23=>_0xc5ce23['is']('element')&&_0xc5ce23['hasClass']('footnote-content'));for(const _0x475ca1 of _0x54ef45['getChildren']())_0x475ca1['is']('element')&&(_0x4e52a7['consumable']['consume'](_0x475ca1,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x4e52a7['consumable']['consume'](_0x475ca1,{'name':!0x0,'classes':'footnote-content'}));if(_0x1de8b5){if(_0x43cd05)_0x4e52a7['convertChildren'](_0x1de8b5,_0xfcc46b);else{const _0x2c83ba=_0x4e52a7['writer']['createElement']('footnoteInlineContent');_0x4e52a7['writer']['insert'](_0x2c83ba,_0xfcc46b),_0x4e52a7['convertChildren'](_0x1de8b5,_0x2c83ba);}}_0x4e52a7['updateConversionResult'](_0xfcc46b,_0x47361d);});}),_0x46f665['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x4b385c,{writer:_0x21a489})=>v(_0x4b385c,_0x21a489,_0x4edccf,{'dataPipeline':!0x0})}),_0x46f665['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0xb9c2ab,{writer:_0x3cc36b})=>v(_0xb9c2ab,_0x3cc36b,_0x4edccf)});}['_defineBogusParagraphConverters'](){const {editor:_0x1ba0e1}=this,{conversion:_0x1de225}=_0x1ba0e1;_0x1ba0e1['config']['get']('footnotes.multiBlock')?(_0x1de225['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x1de225['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x1ba0e1['model']['document'],'change:data',()=>{!function(_0x2e987d,_0x43e165){const _0x43a513=_0x2e987d['document']['differ'],_0x3f0a2c=new Set();for(const _0x5be4b6 of _0x43a513['getChanges']()){const _0x44683a='attribute'==_0x5be4b6['type']?_0x5be4b6['range']['start']['parent']:_0x5be4b6['position']['parent'];_0x44683a['is']('element','footnoteDefinition')&&_0x3f0a2c['add'](_0x44683a);}for(const _0x1b7033 of _0x3f0a2c['values']()){const _0x553dd9=Array['from'](_0x1b7033['getChildren']())['filter'](_0x49cdf5=>p(_0x49cdf5,_0x43e165['mapper']));for(const _0x4c4225 of _0x553dd9)_0x43e165['reconvertItem'](_0x4c4225);}}(_0x1ba0e1['model'],_0x1ba0e1['editing']);})):(_0x1de225['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x1de225['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x1fd271,{writer:_0x205e95})=>{const _0x17f5a6=_0x205e95['createContainerElement']('span');return _0x205e95['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x17f5a6),_0x17f5a6;}}));}['_defineKeyboardHandlers'](){const {editor:_0x47d8ea}=this,{editing:_0x1d2eb4,t:t}=_0x47d8ea,_0x35edea=_0x47d8ea['model']['document']['selection'];_0x47d8ea['keystrokes']['set']('CTRL+Shift+D','insertFootnote'),_0x47d8ea['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Shift+D'}]}),this['listenTo'](_0x1d2eb4['view']['document'],'enter',(_0xa08900,_0xb45954)=>{const _0x9a99eb=function(_0x47cbf4){const _0x5ad4bd=_0x47cbf4['getSelectedElement']();if(_0x5ad4bd?.['is']('element','footnoteRef'))return _0x5ad4bd;return null;}(_0x35edea);if(_0x9a99eb){const _0x64787d=_0x9a99eb['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x64787d),_0xb45954['preventDefault'](),_0xa08900['stop']();}},{'context':_0x1d4b8b});}['_defineClickHandlers'](){const {editor:_0x45f9eb}=this,{editing:_0x2450aa}=_0x45f9eb;_0x45f9eb['editing']['view']['addObserver'](_0x2ad005),_0x45f9eb['editing']['view']['addObserver'](_0x27612b);let _0x468ad3=!0x1;this['listenTo'](_0x2450aa['view']['document'],'pointerdown',(_0x3dc254,_0x23f5a6)=>{const {target:_0x3939d7}=_0x23f5a6,_0x34c562=_0x2450aa['view']['document']['selection'];_0x468ad3=!!(_0x3939d7['is']('element','a')&&_0x3939d7['parent']?.['is']('element','sup')&&_0x3939d7['parent']['hasClass']('footnote'))&&_0x34c562['getSelectedElement']()===_0x3939d7['parent'];},{'priority':'high'}),this['listenTo'](_0x2450aa['view']['document'],'click',(_0x21ae45,_0x509202)=>{const {target:_0x5b3f28}=_0x509202;if(!_0x5b3f28['is']('element','a'))return;if(_0x5b3f28['parent']?.['is']('element','sup')&&_0x5b3f28['parent']['hasClass']('footnote')&&!_0x468ad3)return void _0x509202['preventDefault']();let _0x242b39=_0x5b3f28['getAttribute']('href');if(!_0x242b39?.['startsWith']('#'))return;_0x242b39=_0x242b39['slice'](0x1);let _0x588a92=!0x1;(_0x242b39['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x242b39['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x242b39))&&(_0x588a92=!0x0),_0x588a92&&(_0x509202['preventDefault'](),_0x21ae45['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x2480ff}={}){return(_0x397ef6,{writer:_0x334be7})=>{if(!h(_0x397ef6))return null;if(!_0x2480ff)return _0x334be7['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0xadf2b5=_0x334be7['createContainerElement']('p');return _0x334be7['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0xadf2b5),_0xadf2b5;};}function h(_0x418c22){const {parent:_0x3b2cd6}=_0x418c22;if(!_0x3b2cd6?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x3b2cd6['childCount'])return!0x1;for(const _0x204de7 of _0x418c22['getAttributeKeys']())if(!_0x204de7['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x204de7)return!0x1;return!0x0;}function p(_0x4de935,_0x33b306){if(!_0x4de935['is']('element','paragraph'))return!0x1;const _0x16cb88=_0x33b306['toViewElement'](_0x4de935);return!!_0x16cb88&&h(_0x4de935)!==_0x16cb88['is']('element','span');}function J(_0x446dc2){return _0x1d4b8b(_0x446dc2)&&_0x446dc2['is']('containerElement')&&!!_0x446dc2['getCustomProperty']('footnotesDefinitions');}function g(_0x955615,_0xa439f1={}){const _0x344306=_0x955615['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x85ac38=_0x955615['createContainerElement']('ol',{'class':'footnotes-list'},_0x955615['createSlot']());return _0x955615['createContainerElement']('div',{'class':'footnotes',..._0xa439f1},[_0x344306,_0x85ac38]);}function D(_0x133c13,_0x1017b1){const _0x2cf8e0=_0x133c13['getAttribute']('footnoteId'),_0x401f5f=_0x133c13['getAttribute']('footnoteCounter'),_0x39e5f9=_0x1017b1['createUIElement']('a',{'href':'#'+_0x2cf8e0},function(_0xb8f0d9){const _0x21d91c=this['toDomElement'](_0xb8f0d9);return _0x21d91c['textContent']=_0x401f5f,_0x21d91c;}),_0xdc89ae=_0x1017b1['createContainerElement']('sup',{'id':'ref-'+_0x2cf8e0,'class':'footnote'},[_0x39e5f9]);return _0xdc89ae['getFillerOffset']=()=>null,_0xdc89ae;}function v(_0x4e8cb6,_0x4a9847,_0x2b3c69,{dataPipeline:_0x3e6028}={}){const {t:t}=_0x2b3c69,_0x4465c8=_0x4e8cb6['getAttribute']('footnoteId'),_0x4d48ab=_0x4a9847['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x4465c8},function(_0x409bed){const _0x37585d=this['toDomElement'](_0x409bed);return _0x37585d['innerText']='^',_0x37585d;}),_0x15fdac=_0x3e6028?_0x4a9847['createContainerElement']('div',{'class':'footnote-content'}):_0x1c971a(_0x4a9847['createEditableElement']('div',{'class':'footnote-content'}),_0x4a9847,{'label':t('Footnote\x20content.')});return _0x4a9847['insert'](_0x4a9847['createPositionAt'](_0x15fdac,0x0),_0x4a9847['createSlot']()),_0x4a9847['createContainerElement']('li',{'class':'footnote-definition','id':_0x4465c8},[_0x4d48ab,_0x15fdac]);}class e extends _0x444ecb{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x1e9339];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x16faa8}=this,{plugins:_0x538898,model:_0x60f52d}=_0x16faa8,_0x4ecf54=_0x538898['get'](_0x1e9339),_0x1044a2=_0x538898['get'](c);this['listenTo'](_0x4ecf54,'outputTransformation',(_0x459e10,_0x365582)=>{const _0x435c2e=function(_0x31e032,_0x47a3bb){const _0x3c7bd9=new Set();for(const {item:_0x260ca2}of _0x31e032['createRangeIn'](_0x47a3bb))_0x260ca2['is']('element','footnoteRef')&&_0x3c7bd9['add'](_0x260ca2['getAttribute']('footnoteId'));return Array['from'](_0x3c7bd9);}(_0x60f52d,_0x365582['content']);if(!_0x435c2e['length'])return;const _0x16ef34=_0x1044a2['getFootnotes'](),_0x181dc7=_0x435c2e['reduce']((_0x213066,_0x1e91dd)=>{const _0xb260c1=_0x16ef34['find'](_0x26e90f=>_0x26e90f['id']===_0x1e91dd);if(_0xb260c1){const _0x2c0ab3=_0x16faa8['data']['toView'](_0xb260c1['definition'],{'isClipboardPipeline':!0x0}),_0x4dff07=_0x16faa8['data']['htmlProcessor']['toData'](_0x2c0ab3);_0x213066[_0xb260c1['id']]=_0x4dff07;}return _0x213066;},Object['create'](null));_0x365582['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x181dc7));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x290a3d}=this,{model:_0x11284c,plugins:_0x1c686e}=_0x290a3d,{view:_0xdab112}=_0x290a3d['editing'],_0x43937f=_0x1c686e['get'](_0x1e9339),_0x1b16a1=_0x1c686e['get'](c);let _0x3534a8=null;this['listenTo'](_0xdab112['document'],'clipboardInput',(_0x2d27ca,_0x33f197)=>{const _0x26dc5d=_0x33f197['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x3534a8=_0x26dc5d?JSON['parse'](_0x26dc5d):null;}),this['listenTo'](_0x43937f,'contentInsertion',(_0x2e66ac,_0x3ea4c8)=>{if(!_0x3534a8)return;const _0x1e701d=_0x3ea4c8['sourceEditorId']===this['editor']['id'];_0x1e701d&&'drop'===_0x3ea4c8['method']||_0x11284c['change'](_0x5538f8=>{!function(_0x4acb2c,_0x41807e){const _0x1a4bdf=[];for(const {item:_0xfe4ff1}of _0x4acb2c['createRangeIn'](_0x41807e))_0xfe4ff1['is']('element','footnotesDefinitions')&&_0x1a4bdf['push'](_0xfe4ff1);for(const _0x141ad3 of _0x1a4bdf)_0x4acb2c['remove'](_0x141ad3);}(_0x5538f8,_0x3ea4c8['content']);let _0x384f98=_0x1b16a1['getFootnotesDefinitionsObjectElement']();if(!_0x384f98){const _0x57b76b=_0x11284c['document']['selection']['getFirstRange']()['root'];_0x384f98=_0x1b16a1['_insertEmptyFootnotesDefinitionsContainer'](_0x5538f8,_0x57b76b);}const _0x5c0b93=function(_0x2fe4fd,_0x47d0fc,_0x47da7b){const _0x1d5830=Object['create'](null);for(const {item:_0xccd716}of _0x2fe4fd['createRangeIn'](_0x47d0fc))if(_0xccd716['is']('element','footnoteRef')){const _0x5ea8d3=_0xccd716['getAttribute']('footnoteId');if(!_0x47da7b(_0x5ea8d3))continue;_0x1d5830[_0x5ea8d3]||(_0x1d5830[_0x5ea8d3]=_0x144b00()),_0x2fe4fd['setAttribute']('footnoteId',_0x1d5830[_0x5ea8d3],_0xccd716);}return _0x1d5830;}(_0x5538f8,_0x3ea4c8['content'],_0x4a1cf2=>!_0x1e701d||null!==_0x1b16a1['getFootnote'](_0x4a1cf2));for(const [_0x1ae70a,_0x28a1d3]of Object['entries'](_0x3534a8)){const _0x2bb861=_0x5c0b93[_0x1ae70a]||_0x1ae70a,_0x593f7e=_0x5538f8['createElement']('footnoteDefinition',{'footnoteId':_0x2bb861}),_0x32d413=_0x290a3d['data']['htmlProcessor']['toView'](_0x28a1d3),_0x4e3ce8=_0x290a3d['data']['toModel'](_0x32d413,_0x593f7e);_0x5538f8['append'](_0x4e3ce8,_0x593f7e),_0x5538f8['insert'](_0x593f7e,_0x384f98,'end');}_0x3534a8=null;});});}}class i extends _0x444ecb{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x460434}=this,{componentFactory:_0x560e9b}=_0x460434['ui'];_0x560e9b['add']('insertFootnote',x(_0x460434,_0x352d48)),_0x560e9b['add']('menuBar:insertFootnote',x(_0x460434,_0x27c539)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x49d140=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1d7085;for(const _0x174377 in _0x49d140){const _0xc33909=_0x174377,_0x53e9e1=_0x49d140[_0xc33909];if('footnotesLicenseKeyValid'==_0x53e9e1||'footnotesLicenseKeyInvalid'==_0x53e9e1||'footnotesLicenseKeyExpired'==_0x53e9e1||'footnotesLicenseKeyDomainLimit'==_0x53e9e1||'footnotesLicenseKeyNotAllowed'==_0x53e9e1||'footnotesLicenseKeyEvaluationLimit'==_0x53e9e1||'footnotesLicenseKeyTrialLimit'==_0x53e9e1||'footnotesLicenseKeyUsageLimit'==_0x53e9e1){delete _0x49d140[_0xc33909],_0x1d7085=_0x53e9e1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x1d7085&&_0x49d140['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x1d7085&&_0x49d140['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x1d7085&&_0x49d140['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x1d7085&&_0x49d140['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x1d7085&&_0x49d140['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0x1d7085&&_0x49d140['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0x1d7085&&_0x49d140['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function x(_0x422452,_0x4f96a9){const _0x5f5639=_0x422452['commands']['get']('insertFootnote');return _0x48a014=>{const {t:t}=_0x48a014,_0x17d4f9=new _0x4f96a9(_0x48a014),_0x5f4ea7=_0x17d4f9 instanceof _0x27c539;return _0x17d4f9['bind']('isEnabled')['to'](_0x5f5639,'isEnabled'),_0x17d4f9['set']({'label':t(_0x5f4ea7?'Footnote':'Insert\x20footnote'),'icon':_0x1ed261,'tooltip':!0x0}),_0x17d4f9['on']('execute',()=>{_0x5f5639['execute'](),_0x422452['editing']['view']['focus']();}),_0x17d4f9;};}class nt extends _0x444ecb{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const Q=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x1c23a5{['refresh'](){const {editor:_0x192435}=this,_0x66cc56=_0x192435['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x66cc56,this['value']=_0x66cc56?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x266a47}){const {editor:_0x26c73d}=this,_0x1f4ed7=_0x26c73d['plugins']['get'](c),_0x50a0e6=_0x1f4ed7['getFootnotesDefinitionsObjectElement']();_0x50a0e6&&Q['includes'](_0x266a47)&&_0x26c73d['model']['change'](_0x218ed0=>{_0x218ed0['setAttribute']('footnotesListStyle',_0x266a47,_0x50a0e6),_0x1f4ed7['_updateFootnotesCounters'](_0x218ed0);});}}class b extends _0x1c23a5{['refresh'](){const {editor:_0xf1310e}=this,_0x3e0a64=_0xf1310e['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x3e0a64,this['value']=_0x3e0a64?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x1cfd7d}){const {editor:_0x4d7948}=this,_0x647767=_0x4d7948['plugins']['get'](c),_0x390bd7=_0x647767['getFootnotesDefinitionsObjectElement']();_0x390bd7&&Number['isInteger'](_0x1cfd7d)&&_0x4d7948['model']['change'](_0x170a78=>{_0x170a78['setAttribute']('footnotesListStart',_0x1cfd7d,_0x390bd7),_0x647767['_updateFootnotesCounters'](_0x170a78);});}}class P extends _0x444ecb{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x7aaf7}=this;_0x7aaf7['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x7aaf7['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x7aaf7['commands']['add']('footnotesStyle',new S(_0x7aaf7)),_0x7aaf7['commands']['add']('footnotesStart',new b(_0x7aaf7)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x268e5d}=this,{schema:_0x5b23ee}=_0x268e5d['model'];_0x5b23ee['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0xe1c451}=this,{conversion:_0x158dde,model:_0x352530}=_0xe1c451,{schema:_0x3da76e}=_0x352530;_0x158dde['for']('upcast')['add'](_0x3d2afa=>{_0x3d2afa['on']('element:ol',(_0x35dfa6,_0x40e7c8,_0x15b6a4)=>{const _0x24cdec=_0x40e7c8['viewItem'],_0x20894c=_0x40e7c8['modelCursor']?.['parent'];_0x24cdec['hasClass']('footnotes-list')&&_0x20894c?.['is']('element','footnotesDefinitions')&&(function(_0x48e0df,_0x126d45,_0x49525e,_0xcd8b90){if(!_0xcd8b90['checkAttribute'](_0x126d45,'footnotesListStart'))return;let _0x5a5dd7=0x1;const _0x15c508=_0x49525e['consumable']['consume'](_0x48e0df,{'attributes':'start'});if(_0x15c508){const _0x93eafd=Number['parseInt'](_0x48e0df['getAttribute']('start'),0xa);Number['isNaN'](_0x93eafd)||(_0x5a5dd7=_0x93eafd);}!_0x15c508&&_0x126d45['hasAttribute']('footnotesListStart')||_0x49525e['writer']['setAttribute']('footnotesListStart',_0x5a5dd7,_0x126d45);}(_0x24cdec,_0x20894c,_0x15b6a4,_0x3da76e),function(_0x26c9dd,_0x4c0e0b,_0xc3c80c,_0x44a2e0){if(!_0x44a2e0['checkAttribute'](_0x4c0e0b,'footnotesListStyle'))return;let _0x5d1a48='decimal',_0xa3fc92=!0x1;if(_0xc3c80c['consumable']['consume'](_0x26c9dd,{'attributes':'type'})){const _0x177ed2={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x26c9dd['getAttribute']('type')];_0x177ed2&&(_0x5d1a48=_0x177ed2),_0xa3fc92=!0x0;}_0xc3c80c['consumable']['consume'](_0x26c9dd,{'styles':'list-style-type'})&&(_0x5d1a48=_0x26c9dd['getStyle']('list-style-type'),_0xa3fc92=!0x0),!_0xa3fc92&&_0x4c0e0b['hasAttribute']('footnotesListStyle')||_0xc3c80c['writer']['setAttribute']('footnotesListStyle',_0x5d1a48,_0x4c0e0b);}(_0x24cdec,_0x20894c,_0x15b6a4,_0x3da76e));});}),_0x158dde['for']('downcast')['add'](_0x25295f=>{_0x25295f['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x446ddf,_0x13aee2,_0x5b875d)=>{if(!_0x5b875d['consumable']['consume'](_0x13aee2['item'],_0x446ddf['name']))return;const _0x46f318=C(_0x13aee2['item'],_0x5b875d['mapper']),{attributeNewValue:_0x38732e}=_0x13aee2;null==_0x38732e||0x1===_0x38732e?_0x5b875d['writer']['removeAttribute']('start',_0x46f318):_0x5b875d['writer']['setAttribute']('start',String(_0x38732e),_0x46f318);}),_0x25295f['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x1e631e,_0x520a57,_0x1f97eb)=>{if(!_0x1f97eb['consumable']['consume'](_0x520a57['item'],_0x1e631e['name']))return;const _0x598bb0=C(_0x520a57['item'],_0x1f97eb['mapper']),{attributeNewValue:_0xf7a1a5}=_0x520a57;_0xf7a1a5&&'decimal'!==_0xf7a1a5?_0x1f97eb['writer']['setStyle']('list-style-type',_0xf7a1a5,_0x598bb0):_0x1f97eb['writer']['removeStyle']('list-style-type',_0x598bb0);});});}['_definePostfixer'](){const {editor:_0x4880c1}=this,{model:_0x14cced}=_0x4880c1,_0x373a0c=_0x4880c1['plugins']['get'](c),_0x584772=this['_getDefaultListStyle'](),_0x331019=this['_getDefaultStartIndex']();_0x14cced['document']['registerPostFixer'](_0x201237=>{const _0xc6f95f=_0x14cced['document']['differ']['getChanges']();let _0x49028b=!0x1;for(const _0x2753a0 of _0xc6f95f){if('insert'!==_0x2753a0['type']||'$text'===_0x2753a0['name'])continue;const _0x2368f0=_0x14cced['createRangeOn'](_0x2753a0['position']['nodeAfter']);for(const _0x128174 of _0x2368f0['getItems']())_0x128174['is']('element','footnotesDefinitions')&&(!_0x128174['hasAttribute']('footnotesListStart')&&_0x14cced['schema']['checkAttribute'](_0x128174,'footnotesListStart')&&(_0x201237['setAttribute']('footnotesListStart',_0x331019,_0x128174),_0x49028b=!0x0),!_0x128174['hasAttribute']('footnotesListStyle')&&_0x14cced['schema']['checkAttribute'](_0x128174,'footnotesListStyle')&&(_0x201237['setAttribute']('footnotesListStyle',_0x584772,_0x128174),_0x49028b=!0x0));}return _0x49028b&&_0x373a0c['_updateFootnotesCounters'](_0x201237),_0x49028b;});}['_defineFormatter'](){const {editor:_0xd66bfd}=this;_0xd66bfd['plugins']['get'](c)['setFootnoteFormatter'](_0x1daa65=>this['_formatFootnoteListValue'](_0x1daa65));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x2454a2,value:_0xd98382,digits:_0x27ec80}){const _0x1462ce=_0x2454a2['getAttribute']('footnotesListStyle'),_0xda46df=_0x2454a2['getAttribute']('footnotesListStart'),_0x1c41dc=Math['floor'](_0xd98382)+(_0xda46df??0x1)-0x1;switch(_0x1462ce){case'decimal-leading-zero':return function(_0x40a395,_0xa52450){return String(_0x40a395)['padStart'](_0xa52450,'0');}(_0x1c41dc,Math['max'](0x2,_0x27ec80));case'lower-alpha':case'lower-latin':return M(_0x1c41dc,!0x1);case'upper-alpha':case'upper-latin':return M(_0x1c41dc,!0x0);case'lower-roman':return V(_0x1c41dc,!0x1);case'upper-roman':return V(_0x1c41dc,!0x0);default:return String(_0x1c41dc);}}}function C(_0x36ce77,_0x16d9ac){const _0x81b4dd=_0x16d9ac['toViewElement'](_0x36ce77);return Array['from'](_0x81b4dd['getChildren']())['find'](_0x47bc48=>_0x47bc48['is']('element','ol')&&_0x47bc48['hasClass']('footnotes-list'));}function M(_0x56be0d,_0x544a5a){let _0x1770b3='',_0x5a005b=_0x56be0d;for(;_0x5a005b>0x0;){const _0x5cdf42=(_0x5a005b-0x1)%0x1a;_0x1770b3=String['fromCharCode'](0x61+_0x5cdf42)+_0x1770b3,_0x5a005b=Math['floor']((_0x5a005b-0x1)/0x1a);}return _0x544a5a?_0x1770b3['toUpperCase']():_0x1770b3;}const N=[{'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 V(_0x18706f,_0x4b7135){let _0x1b5a36='',_0x4eefbc=_0x18706f;for(const {value:_0x40ce48,numeral:_0x5d22cc}of N)for(;_0x4eefbc>=_0x40ce48;)_0x1b5a36+=_0x5d22cc,_0x4eefbc-=_0x40ce48;return _0x4b7135?_0x1b5a36:_0x1b5a36['toLowerCase']();}class H extends _0x41d8a0{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new et();['keystrokes']=new ot();['focusables']=new _0x41e1e2();['focusCycler'];constructor(_0x5cc56e,{styleButtonViews:_0x4399a7,styleGridAriaLabel:_0x3aacab}){super(_0x5cc56e),(this['focusCycler']=new _0x5b8a07({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x4399a7,_0x3aacab),[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 _0x239e4d of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x239e4d['element']);_0x1e9083({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>rt['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 _0x1dfb9f=_0x537e3b=>_0x537e3b['stopPropagation']();this['keystrokes']['set']('arrowright',_0x1dfb9f),this['keystrokes']['set']('arrowleft',_0x1dfb9f),this['keystrokes']['set']('arrowup',_0x1dfb9f),this['keystrokes']['set']('arrowdown',_0x1dfb9f);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x3adf2e,_0x5338f8){const _0x5b110c=new _0x41d8a0(this['locale']);return _0x5b110c['children']=_0x5b110c['createCollection'](),_0x5b110c['children']['addMany'](_0x3adf2e),_0x5b110c['setTemplate']({'tag':'div','attributes':{'aria-label':_0x5338f8,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x5b110c['children']}),_0x5b110c['children']['delegate']('execute')['to'](this),_0x5b110c['focus']=function(){for(const _0x5a16d7 of this['children'])if(_0x5a16d7 instanceof _0x352d48&&_0x5a16d7['isOn'])return void _0x5a16d7['focus']();this['children']['first']['focus']();},_0x5b110c['focusTracker']=new et(),_0x5b110c['keystrokes']=new ot(),_0x5b110c['render'](),_0x5b110c['keystrokes']['listenTo'](_0x5b110c['element']),this['children']['add'](_0x5b110c),_0x5b110c;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0xa30dff=this['_createStartIndexPropertyView'](),_0x193290=[_0xa30dff],_0x490238=new tt(this['locale'],_0x193290);return _0x490238['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x490238['buttonView']['bind']('isEnabled')['toMany'](_0x193290,'isEnabled',(..._0x3efde9)=>_0x3efde9['some'](_0x54cfe5=>_0x54cfe5)),_0x490238['buttonView']['on']('change:isEnabled',(_0x4aaea4,_0x5d4cc6,_0x233930)=>{_0x233930||(_0x490238['isCollapsed']=!0x0);}),this['children']['add'](_0x490238),[_0xa30dff,_0x490238];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x5b504c=new st(this['locale'],it);return _0x5b504c['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x5b504c['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x5b504c['fieldView']['on']('input',()=>{const _0x7fd9e7=_0x5b504c['fieldView']['element'],_0x4fae96=_0x7fd9e7['valueAsNumber'];Number['isNaN'](_0x4fae96)?_0x5b504c['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x7fd9e7['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x4fae96}):_0x5b504c['errorText']=t(_0x4fae96<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0x5b504c;}}class j extends _0x444ecb{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x45a521,_0x25541c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5dea11}=this,{componentFactory:_0x2cd5c4}=_0x5dea11['ui'];_0x5dea11['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x2cd5c4['add']('footnotesStyle',function(_0x3286b7){return _0x28d9e4=>{const {t:t}=_0x28d9e4,_0x1eb477=_0x3286b7['commands']['get']('footnotesStyle'),_0x3cf23a=_0x3b703a(_0x28d9e4),{buttonView:_0x11f861}=_0x3cf23a;return _0x3cf23a['class']='ck-footnotes-styles-dropdown',_0x3cf23a['bind']('isEnabled')['to'](_0x1eb477,'isEnabled'),_0x11f861['set']({'label':t('Footnotes\x20style'),'icon':_0x1ed261,'tooltip':!0x0}),_0x3cf23a['once']('change:isOpen',()=>{const _0x48b469=function({editor:_0x2ca8ac,dropdownView:_0x598e8e}){const {t:t}=_0x2ca8ac['locale'],_0x4fb1a9=t('Footnotes\x20definitions\x20styles'),_0x3e4c97=function(_0x348f98){const t=_0x348f98['locale']['t'],_0x5e9fae=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x4066d3},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x528aa6},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x36fe45},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x2d1513},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x29c5b5},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0xde6fb3}];return _0x5e9fae['map'](function(_0x442141){const _0x243904=_0x442141['locale'];return({label:_0x4f32de,icon:_0x111800,tooltip:_0xa7edf6,style:_0x1d865e})=>{const _0x2964d8=_0x442141['commands']['get']('footnotesStyle'),_0x5842b3=new _0x352d48(_0x243904);return _0x5842b3['set']({'label':_0x4f32de,'icon':_0x111800,'tooltip':_0xa7edf6}),_0x5842b3['bind']('isOn')['to'](_0x2964d8,'value',_0x50e495=>_0x50e495===_0x1d865e),_0x5842b3['bind']('isEnabled')['to'](_0x2964d8,'isEnabled'),_0x5842b3['on']('execute',()=>{_0x442141['execute']('footnotesStyle',{'value':_0x1d865e}),_0x442141['editing']['view']['focus']();}),_0x5842b3;};}(_0x348f98));}(_0x2ca8ac),_0x95d723=new H(_0x2ca8ac['locale'],{'styleGridAriaLabel':_0x4fb1a9,'styleButtonViews':_0x3e4c97});return _0x95d723['delegate']('execute')['to'](_0x598e8e),_0x95d723['on']('footnotesListStart',(_0x3e809a,_0x41528f)=>{_0x2ca8ac['execute']('footnotesStart',{'value':_0x41528f['startIndex']});}),_0x95d723;}({'editor':_0x3286b7,'dropdownView':_0x3cf23a});_0x3cf23a['panelView']['children']['add'](_0x48b469);}),_0x3cf23a;};}(_0x5dea11));}['afterInit'](){const {editor:_0x29be2d}=this,{t:t}=_0x29be2d['locale'],_0x48d987=_0x29be2d['plugins']['get'](_0x25541c),{defaultPositions:_0x53a4de}=_0x13092d;_0x48d987['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x29be2d['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x555c5e=>{let _0x45a96a=_0x555c5e['getFirstPosition']()?.['parent'];return _0x45a96a?.['is']('$text')&&(_0x45a96a=_0x45a96a['parent']),_0x45a96a?.['is']('element')?_0x45a96a['findAncestor'](J):null;},'positions':[_0x53a4de['southArrowNorth'],_0x53a4de['southArrowNorthMiddleWest'],_0x53a4de['southArrowNorthMiddleEast'],_0x53a4de['southArrowNorthWest'],_0x53a4de['southArrowNorthEast'],_0x53a4de['northArrowSouth'],_0x53a4de['northArrowSouthMiddleWest'],_0x53a4de['northArrowSouthMiddleEast'],_0x53a4de['northArrowSouthWest'],_0x53a4de['northArrowSouthEast'],_0x53a4de['viewportStickyNorth']]});}}class lt extends _0x444ecb{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,lt 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 _0x5a4266,Command as _0x43caa9}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x4c01dd,isWidget as _0x154edf,toWidgetEditable as _0x498796,WidgetToolbarRepository as _0x6c205}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x4ead23,logWarning as _0x5b511c,FocusTracker as et,KeystrokeHandler as ot,global as rt}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x275c97,ClickObserver as _0x1889c7}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0xb323c9}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x51d454,ButtonView as _0x253836,View as _0xf5b978,ViewCollection as _0x2b99b2,FocusCycler as _0x3cadfa,addKeyboardHandlingForGrid as _0x1023bc,CollapsibleView as tt,LabeledFieldView as st,createLabeledInputNumber as it,ContextualBalloon as _0x3e82de,BalloonPanelView as _0x3db375,createDropdown as _0x3a1861}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x4503ac,IconListStyleDecimal as _0x2df69b,IconListStyleDecimalLeadingZero as _0x4459ae,IconListStyleLowerRoman as _0x965475,IconListStyleUpperRoman as _0x29a9a7,IconListStyleLowerLatin as _0x1129b8,IconListStyleUpperLatin as _0x17a7e5}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x583047,_0x5071fd){this['_model']=_0x583047,this['_elementName']=_0x5071fd['elementName'],this['_getElementKey']=_0x5071fd['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x384f12){const _0x12f91e=new Set(),_0x1334c1=new Map();for(const _0x959851 of _0x384f12){if('insert'===_0x959851['type']&&'$text'!==_0x959851['name']&&_0x959851['position']['nodeAfter']){const _0x3d36ce=this['_model']['createRangeOn'](_0x959851['position']['nodeAfter']);for(const _0x206337 of _0x3d36ce['getItems']()){if(!_0x206337['is']('element',this['_elementName']))continue;const _0x28b58c=this['_getElementKey'](_0x206337);_0x1334c1['has'](_0x28b58c)||_0x1334c1['set'](_0x28b58c,[]),_0x1334c1['get'](_0x28b58c)['push'](_0x206337);}}if('remove'===_0x959851['type']&&_0x959851['name']===this['_elementName']){const _0x1f52c0=this['_getElementKey']({'getAttribute':_0x3149df=>_0x959851['attributes']['get'](_0x3149df)});_0x12f91e['add'](_0x1f52c0);}}for(const [_0x40439d,_0x3ac8fe]of this['_trackedElements'])'$graveyard'===_0x3ac8fe['root']['rootName']&&_0x12f91e['add'](_0x40439d);for(const _0x421eca of _0x12f91e)this['_trackedElements']['delete'](_0x421eca);for(const [_0x4606a7,_0x3d7316]of _0x1334c1)this['_trackedElements']['set'](_0x4606a7,_0x3d7316[_0x3d7316['length']-0x1]);const _0x22d473=new Set();for(const [_0x31e956,_0x42bcc0]of _0x1334c1)_0x12f91e['has'](_0x31e956)&&(_0x22d473['add'](_0x42bcc0[0x0]),_0x42bcc0['length']>0x1?_0x1334c1['set'](_0x31e956,_0x42bcc0['slice'](0x1)):_0x1334c1['delete'](_0x31e956),_0x12f91e['delete'](_0x31e956));return{'removed':Array['from'](_0x12f91e),'inserted':Array['from'](_0x1334c1['values']())['flat'](),'moved':Array['from'](_0x22d473)};}}class c extends _0x5a4266{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x43db6d){super(_0x43db6d),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x53b5af=>_0x53b5af['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x332028=>_0x332028['getAttribute']('footnoteId')});}['init'](){const {editor:_0x421cea}=this,{model:_0x570cf6,data:_0x1fe483}=_0x421cea;_0x570cf6['document']['registerPostFixer'](_0x27cb21=>{const _0xd41c6e=_0x570cf6['document']['differ']['getChanges']();let _0x14914a=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x27cb21,_0xd41c6e)&&(_0x14914a=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x27cb21,_0xd41c6e)&&(_0x14914a=!0x0),this['_handleFootnoteReferencesChanges'](_0x27cb21,_0xd41c6e)&&(_0x14914a=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x27cb21)&&(_0x14914a=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x27cb21)&&(_0x14914a=!0x0),this['_sortFootnoteDefinitions'](_0x27cb21)&&(_0x14914a=!0x0),_0x14914a;}),this['listenTo'](_0x570cf6['document'],'change:data',()=>{_0x570cf6['enqueueChange']({'isUndoable':!0x1},_0x540538=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x540538);});},{'priority':'low'}),this['listenTo'](_0x1fe483,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x280c30){return this['_footnotes']['find'](_0x4bf09a=>_0x4bf09a['id']===_0x280c30)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x1392a6){this['_footnoteFormatter']=_0x1392a6;}['_updateFootnotesCounters'](_0x26d816,_0xbc8339=0x0){let _0x4f4764=!0x1;for(let _0x543a42=_0xbc8339;_0x543a42<this['_footnotes']['length'];_0x543a42++)this['_updateFootnoteRefCounter'](_0x26d816,_0x543a42)&&(_0x4f4764=!0x0);return _0x4f4764;}['_insertEmptyFootnotesDefinitionsContainer'](_0x31dcce,_0x47a009){const _0xc3c872=_0x31dcce['createElement']('footnotesDefinitions',{});return _0x31dcce['append'](_0xc3c872,_0x47a009),this['_footnotesDefinitions']=_0xc3c872,_0xc3c872;}['_ensureFootnotesDefinitionsContainerExists'](_0x409431){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x111beb=this['_footnotes'][0x0]['reference']['root'],_0x1e37df=this['_insertEmptyFootnotesDefinitionsContainer'](_0x409431,_0x111beb);for(const _0x300b5a of this['_footnotes'])_0x300b5a['definition']['parent']||_0x409431['insert'](_0x300b5a['definition'],_0x1e37df,'end');this['_updateFootnotesCounters'](_0x409431);}['_handleFootnotesDefinitionsObjectChanges'](_0x296274,_0x4e3708){let _0x39ee3e=!0x1;const {inserted:_0x283150,removed:_0x1d478,moved:_0x70c9a5}=this['_footnoteDefsContainerTracker']['getChanges'](_0x4e3708);if(_0x70c9a5['length']&&(this['_footnotesDefinitions']=_0x70c9a5[0x0]),_0x283150['length']){if(_0x283150['length']>0x1||this['_footnotesDefinitions']&&_0x283150['some'](_0x35f943=>_0x35f943!==this['_footnotesDefinitions'])){const _0x2a1b75=_0x296274['createElement']('footnotesDefinitions',{}),_0x27f453=[];this['_footnotesDefinitions']&&_0x27f453['push'](this['_footnotesDefinitions']),_0x27f453['push'](..._0x283150),_0x296274['insert'](_0x2a1b75,_0x27f453[0x0],'before');for(const _0x4a9132 of _0x27f453)_0x296274['move'](_0x296274['createRangeIn'](_0x4a9132),_0x296274['createPositionAt'](_0x2a1b75,'end')),_0x296274['remove'](_0x4a9132);this['_footnotesDefinitions']=_0x2a1b75,this['_updateFootnotesCounters'](_0x296274),_0x39ee3e=!0x0;}else this['_footnotesDefinitions']=_0x283150[0x0];}if(_0x1d478['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x58f5a5 of this['_footnotes'])_0x296274['remove'](_0x58f5a5['reference']),_0x39ee3e=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x39ee3e;}['_handleFootnoteDefinitionsChanges'](_0x49a29e,_0x2628d5){let _0x364897=!0x1;const _0x4be354=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x6c5dc,moved:_0x58102d}=this['_footnoteDefsTracker']['getChanges'](_0x2628d5);for(const _0x196de5 of[..._0x58102d,..._0x6c5dc]){const _0x4576e3=_0x196de5['getAttribute']('footnoteId'),_0x17632a=this['getFootnote'](_0x4576e3);_0x17632a&&(_0x17632a['definition']=_0x196de5),_(_0x49a29e,_0x4be354,_0x196de5)&&(_0x364897=!0x0);}return _0x364897;}['_handleFootnoteReferencesChanges'](_0x24cd79,_0x55a0b5){let _0x2ea682=!0x1;const {removed:_0x367679,inserted:_0x44e81d,moved:_0x19db34}=this['_footnoteRefsTracker']['getChanges'](_0x55a0b5);for(const _0x557db2 of _0x367679)this['_handleRemoveFootnoteReferenceById'](_0x24cd79,_0x557db2)&&(_0x2ea682=!0x0);for(const _0x5a32d4 of _0x44e81d)this['_handleInsertedFootnoteReference'](_0x24cd79,_0x5a32d4)&&(_0x2ea682=!0x0);for(const _0x111e3c of _0x19db34)this['_handleMovedFootnoteReference'](_0x24cd79,_0x111e3c)&&(_0x2ea682=!0x0);return _0x2ea682;}['_handleFootnotesDefinitionsObjectSync'](_0x2358c6){if(!this['_footnotesDefinitions'])return!0x1;let _0x4e9dfd=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x317001=[];for(const _0x1a364 of this['_footnotesDefinitions']['getChildren']()){const _0x37dfc7=_0x1a364['getAttribute']('footnoteId');this['getFootnote'](_0x37dfc7)||(_0x317001['unshift'](_0x1a364),_0x4e9dfd=!0x0);}for(const _0x57e7a6 of _0x317001)_0x2358c6['remove'](_0x57e7a6);}const _0x3abd59=new Set(),_0x12128a=[];for(const _0x1aaa72 of this['_footnotesDefinitions']['getChildren']()){const _0x3c519c=_0x1aaa72['getAttribute']('footnoteId');_0x3abd59['has'](_0x3c519c)?(_0x12128a['unshift'](_0x1aaa72),_0x4e9dfd=!0x0):_0x3abd59['add'](_0x3c519c);}for(const _0x29df84 of _0x12128a)_0x2358c6['remove'](_0x29df84);return this['_footnotesDefinitions']['childCount']||(_0x2358c6['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x4e9dfd=!0x0),_0x4e9dfd;}['_handleInsertedFootnoteReference'](_0x407c4c,_0x4a7fc9){if(this['_footnotes']['find'](_0x65d1d4=>_0x65d1d4['reference']===_0x4a7fc9))return!0x1;let _0x419581=!0x1;const _0x430180=_0x4a7fc9['getAttribute']('footnoteId'),_0x1a9c77=this['_footnotes']['findIndex'](_0x56cc74=>_0x56cc74['id']===_0x430180);-0x1!==_0x1a9c77&&(_0x407c4c['remove'](this['_footnotes'][_0x1a9c77]['reference']),this['_footnotes']['splice'](_0x1a9c77,0x1),_0x419581=!0x0);let _0x11bf7c=this['_footnotesDefinitions']?function(_0x501b6f,_0x3a3a53){for(const _0x494cf1 of _0x501b6f['getChildren']())if(_0x494cf1['getAttribute']('footnoteId')===_0x3a3a53)return _0x494cf1;return null;}(this['_footnotesDefinitions'],_0x430180):null;_0x11bf7c||(_0x11bf7c=_0x407c4c['createElement']('footnoteDefinition',{'footnoteId':_0x430180}),this['_footnotesDefinitions']&&(_0x407c4c['insert'](_0x11bf7c,this['_footnotesDefinitions'],'end'),_0x419581=!0x0));const _0x5eda4c={'id':_0x430180,'reference':_0x4a7fc9,'definition':_0x11bf7c},_0x1e04ee=I(this['editor']['model'],this['_footnotes'],_0x4a7fc9);this['_footnotes']['splice'](_0x1e04ee,0x0,_0x5eda4c);let _0x567344=_0x1e04ee;return-0x1!==_0x1a9c77&&(_0x567344=Math['min'](_0x1e04ee,_0x1a9c77)),this['_updateFootnotesCounters'](_0x407c4c,_0x567344)&&(_0x419581=!0x0),_0x419581;}['_handleRemoveFootnoteReferenceById'](_0x3dbe7e,_0x5be729){const _0x2b5be2=this['_footnotes']['findIndex'](_0x4abbff=>_0x4abbff['id']===_0x5be729);if(-0x1===_0x2b5be2)return!0x1;let _0x4019dc=!0x1;const _0x45f854=this['_footnotes'][_0x2b5be2];return'$graveyard'!==_0x45f854['definition']['root']['rootName']&&(_0x3dbe7e['remove'](_0x45f854['definition']),_0x4019dc=!0x0),this['_footnotes']['splice'](_0x2b5be2,0x1),this['_updateFootnotesCounters'](_0x3dbe7e,_0x2b5be2)&&(_0x4019dc=!0x0),_0x4019dc;}['_handleMovedFootnoteReference'](_0xba7843,_0x37e6de){const _0x5024c1=_0x37e6de['getAttribute']('footnoteId'),_0x1189a0=this['_footnotes']['findIndex'](_0x490e92=>_0x490e92['id']===_0x5024c1),_0x907193=this['_footnotes'][_0x1189a0];let _0x32cb8e=!0x1;_0x907193['reference']=_0x37e6de,this['_footnotes']['splice'](_0x1189a0,0x1);const _0xbf40a1=I(this['editor']['model'],this['_footnotes'],_0x37e6de);return this['_footnotes']['splice'](_0xbf40a1,0x0,_0x907193),this['_updateFootnotesCounters'](_0xba7843,Math['min'](_0x1189a0,_0xbf40a1))&&(_0x32cb8e=!0x0),_0x32cb8e;}['_updateFootnoteRefCounter'](_0x84996,_0xa29573){if(!this['_footnotesDefinitions'])return!0x1;const _0x21c948=this['_footnotes'][_0xa29573];let _0x445819;return _0x445819=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x21c948,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0xa29573+0x1}):String(_0xa29573+0x1),_0x21c948['reference']['getAttribute']('footnoteCounter')!=_0x445819&&(_0x84996['setAttribute']('footnoteCounter',_0x445819,_0x21c948['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x1e19c2){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x398f4e,_0x10757f){if(_0x398f4e['length']!==_0x10757f['length'])return!0x1;for(let _0x41e041=0x0;_0x41e041<_0x398f4e['length'];_0x41e041++)if(_0x398f4e[_0x41e041]!==_0x10757f[_0x41e041])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x1fb7a1=>_0x1fb7a1['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x226103=>_0x226103['getAttribute']('footnoteId'))))return!0x1;let _0x161284=!0x1;for(let _0x32db35=0x0;_0x32db35<this['_footnotes']['length'];_0x32db35++){const _0x461616=this['_footnotes'][_0x32db35],_0x51a270=_0x1e19c2['createPositionBefore'](_0x461616['definition']),_0x3f4741=_0x1e19c2['createPositionAt'](this['_footnotesDefinitions'],_0x32db35);_0x51a270['isEqual'](_0x3f4741)||(_0x1e19c2['move'](_0x1e19c2['createRangeOn'](_0x461616['definition']),_0x3f4741),_0x161284=!0x0);}return _0x161284;}['_ensureFootnotesReferencesHaveProperOrder'](_0x25ea3e){if(!this['_footnotes']['length'])return!0x1;const {model:_0x5ee0e0}=this['editor'];let _0x5d6d74=!0x1;for(let _0xa98194=0x0;_0xa98194<this['_footnotes']['length']-0x1;_0xa98194++){const _0x465769=this['_footnotes'][_0xa98194],_0x561ebb=this['_footnotes'][_0xa98194+0x1],_0x4e9709=_0x5ee0e0['createPositionBefore'](_0x465769['reference']),_0x1a4880=_0x5ee0e0['createPositionBefore'](_0x561ebb['reference']);'after'===_0x4e9709['compareWith'](_0x1a4880)&&(this['_handleMovedFootnoteReference'](_0x25ea3e,_0x465769['reference']),_0xa98194=-0x1,_0x5d6d74=!0x0);}return _0x5d6d74;}}function _(_0x38f8ea,_0x2c66e9,_0x976790){if(_0x976790['childCount'])return!0x1;const _0x3b7a13=_0x2c66e9?'paragraph':'footnoteInlineContent';return _0x38f8ea['insert'](_0x38f8ea['createElement'](_0x3b7a13),_0x976790),!0x0;}function I(_0x2f8fb9,_0x38cf82,_0x3225b9){if(0x0===_0x38cf82['length'])return 0x0;const _0x314a2c=_0x2f8fb9['createPositionBefore'](_0x3225b9);for(let _0x150806=0x0;_0x150806<_0x38cf82['length'];_0x150806++){const _0x33732a=_0x38cf82[_0x150806],_0x11b178=_0x2f8fb9['createPositionBefore'](_0x33732a['reference']);if('before'===_0x314a2c['compareWith'](_0x11b178))return _0x150806;}const _0x5fcff9=_0x3225b9['root'];let _0x327f86=-0x1;for(let _0x4d5ac8=_0x38cf82['length']-0x1;_0x4d5ac8>=0x0;_0x4d5ac8--)if(_0x38cf82[_0x4d5ac8]['reference']['root']===_0x5fcff9){_0x327f86=_0x4d5ac8;break;}if(-0x1!==_0x327f86)return _0x327f86+0x1;const _0x2ff127=_0x2f8fb9['document']['getRootNames'](),_0x34e0ba=_0x2ff127['indexOf'](_0x5fcff9['rootName']),_0x1c5ab4=_0x2ff127[_0x34e0ba+0x1];if(_0x1c5ab4){for(let _0x32bf6b=0x0;_0x32bf6b<_0x38cf82['length'];_0x32bf6b++)if(_0x38cf82[_0x32bf6b]['reference']['root']['rootName']===_0x1c5ab4)return _0x32bf6b;}return _0x38cf82['length'];}class w extends _0x43caa9{['refresh'](){const _0x5531ea=this['editor']['model']['document']['selection'],_0x473000=this['_getPositionToInsertFootnote'](_0x5531ea);this['isEnabled']=!!_0x473000;}['execute'](_0x4e288d){const {editor:_0x4f7aa8}=this,{model:_0x3e347d}=_0x4f7aa8,{selection:_0x2517c0}=_0x3e347d['document'],_0x29770b=this['_getPositionToInsertFootnote'](_0x2517c0);if(!_0x29770b)return;const _0x25b582=_0x4f7aa8['plugins']['get']('FootnotesEditing'),_0x176244=_0x4e288d?.['footnoteId']??_0x4ead23();!function(_0x48c2f1){return'string'==typeof _0x48c2f1&&_0x48c2f1['length']>0x0&&!/\s/['test'](_0x48c2f1)&&!/^\d/['test'](_0x48c2f1);}(_0x176244)?_0x5b511c('insert-footnote-command-executed-with-invalid-id'):(_0x3e347d['change'](_0x40b072=>{const _0x332a34=_0x40b072['createElement']('footnoteRef',{'footnoteId':_0x176244});_0x3e347d['insertObject'](_0x332a34,_0x29770b,null);}),_0x25b582['_moveSelectionToFootnoteDefinition'](_0x176244));}['_getPositionToInsertFootnote'](_0xaadb40){const {model:_0x384443}=this['editor'],{schema:_0x470dd8}=_0x384443,_0x497f0f=_0xaadb40['getFirstRange']();for(const _0x2964d2 of _0x497f0f['getItems']())if(_0x470dd8['isBlock'](_0x2964d2)||_0x470dd8['isObject'](_0x2964d2))return null;const _0x3b2e4a=_0x497f0f['end'];return _0x470dd8['checkChild'](_0x3b2e4a,'footnoteRef')?_0x3b2e4a:null;}}class r extends _0x5a4266{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x844cbd}=this;_0x844cbd['config']['define']('footnotes.multiBlock',!0x0),_0x844cbd['commands']['add']('insertFootnote',new w(_0x844cbd)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x3d8c88){const _0x255fe2=_0x4f8f81([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]),_0x395930=0x47a28506,_0x3e007c=0x47a5f2ae^_0x395930,_0x167e35=window[_0x4f8f81([0x44,0x61,0x74,0x65])][_0x4f8f81([0x6e,0x6f,0x77])](),_0x544b11=_0x3d8c88[_0x4f8f81([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x155572=new window[(_0x4f8f81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ebd89=>{_0x544b11[_0x4f8f81([0x6f,0x6e,0x63,0x65])](_0x4f8f81([0x72,0x65,0x61,0x64,0x79]),_0x2ebd89);}),_0x1916d3={[_0x4f8f81([0x6b,0x74,0x79])]:_0x4f8f81([0x45,0x43]),[_0x4f8f81([0x75,0x73,0x65])]:_0x4f8f81([0x73,0x69,0x67]),[_0x4f8f81([0x63,0x72,0x76])]:_0x4f8f81([0x50,0x2d,0x32,0x35,0x36]),[_0x4f8f81([0x78])]:_0x4f8f81([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]),[_0x4f8f81([0x79])]:_0x4f8f81([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]),[_0x4f8f81([0x61,0x6c,0x67])]:_0x4f8f81([0x45,0x53,0x32,0x35,0x36])},_0x54ae50=_0x544b11[_0x4f8f81([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4f8f81([0x67,0x65,0x74])](_0x4f8f81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x58af49(){let _0x34d09b,_0x451043=null,_0x561618=null;try{if(_0x54ae50==_0x4f8f81([0x47,0x50,0x4c]))return _0x4f8f81([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x34d09b=_0x5df630(),!_0x34d09b)return _0x4f8f81([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x34d09b[_0x4f8f81([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x561618=_0x12d823(_0x34d09b[_0x4f8f81([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x34d09b[_0x4f8f81([0x6a,0x74,0x69])])),await _0x9a6f20()?_0x261661()?_0x52c624()?_0x4f8f81([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x19c2e0()?(_0x34d09b[_0x4f8f81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f8f81([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x451043=_0x4230de(_0x4f8f81([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x34d09b[_0x4f8f81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f8f81([0x74,0x72,0x69,0x61,0x6c])&&(_0x451043=_0x4230de(_0x4f8f81([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x355041()):_0x4f8f81([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4f8f81([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4f8f81([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4f8f81([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x52c624(){const _0x2046d4=[_0x4f8f81([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4f8f81([0x74,0x72,0x69,0x61,0x6c])][_0x4f8f81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x34d09b[_0x4f8f81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x167e35/0x3e8:0xe10*_0x3e007c;return _0x34d09b[_0x4f8f81([0x65,0x78,0x70])]<_0x2046d4;}function _0x261661(){const _0x35d30a=_0x34d09b[_0x4f8f81([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x35d30a&&(!!_0x35d30a[_0x4f8f81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f8f81([0x2a]))||!!_0x35d30a[_0x4f8f81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f8f81([0x46,0x4f,0x4f])));}function _0x19c2e0(){const _0x4ed57e=_0x34d09b[_0x4f8f81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4ed57e||0x0==_0x4ed57e[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x52d890}=new URL(window[_0x4f8f81([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4ed57e[_0x4f8f81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52d890))return!0x0;const _0x5c923b=_0x52d890[_0x4f8f81([0x73,0x70,0x6c,0x69,0x74])](_0x4f8f81([0x2e]));return _0x4ed57e[_0x4f8f81([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x37caa1=>_0x37caa1[_0x4f8f81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f8f81([0x2a])))[_0x4f8f81([0x6d,0x61,0x70])](_0x32e236=>_0x32e236[_0x4f8f81([0x73,0x70,0x6c,0x69,0x74])](_0x4f8f81([0x2e])))[_0x4f8f81([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x39f680=>_0x39f680[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5c923b[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f8f81([0x6d,0x61,0x70])](_0x1b7e43=>Array(_0x5c923b[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1b7e43[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f8f81([0x66,0x69,0x6c,0x6c])](_0x1b7e43[0x0]===_0x4f8f81([0x2a])?_0x4f8f81([0x2a]):'')[_0x4f8f81([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1b7e43))[_0x4f8f81([0x73,0x6f,0x6d,0x65])](_0x351936=>_0x5c923b[_0x4f8f81([0x65,0x76,0x65,0x72,0x79])]((_0x471274,_0xcfb331)=>_0x351936[_0xcfb331]===_0x471274||_0x351936[_0xcfb331]===_0x4f8f81([0x2a])));}function _0x355041(){return _0x451043&&_0x561618?new window[(_0x4f8f81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x159624,_0x500c92)=>{_0x451043[_0x4f8f81([0x74,0x68,0x65,0x6e])](_0x159624,_0x500c92),_0x561618[_0x4f8f81([0x74,0x68,0x65,0x6e])](_0x50d844=>{_0x50d844!=_0x4f8f81([0x56,0x61,0x6c,0x69,0x64])&&_0x159624(_0x50d844);},_0x500c92);}):_0x451043||_0x561618||_0x4f8f81([0x56,0x61,0x6c,0x69,0x64]);}}function _0x12d823(_0x142c26,_0x134f50){return new window[(_0x4f8f81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2b9c4c=>{if(_0x3e2e45())return _0x2b9c4c(_0x4f8f81([0x56,0x61,0x6c,0x69,0x64]));_0x3495f9(),_0x544b11[_0x4f8f81([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4f8f81([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x483b9e=!0x1;const _0x224d81=_0x4ead23();function _0xb44d4c(_0x41d4a5){return!!_0x41d4a5&&(typeof _0x41d4a5===_0x4f8f81([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x41d4a5===_0x4f8f81([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x41d4a5[_0x4f8f81([0x74,0x68,0x65,0x6e])]===_0x4f8f81([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x41d4a5[_0x4f8f81([0x63,0x61,0x74,0x63,0x68])]===_0x4f8f81([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4b4e30(_0x5701e8){_0x2dc2ad(_0x5701e8)[_0x4f8f81([0x74,0x68,0x65,0x6e])](_0x2c081e=>{if(!_0x2c081e||_0x2c081e[_0x4f8f81([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4f8f81([0x6f,0x6b]))return _0x4f8f81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x10dba5(_0x5902a9(_0x224d81+_0x134f50))!=_0x2c081e[_0x4f8f81([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4f8f81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4f8f81([0x56,0x61,0x6c,0x69,0x64]);})[_0x4f8f81([0x74,0x68,0x65,0x6e])](_0x264207=>(_0x29b00e(),_0x264207),()=>{const _0xa490c9=_0x1311fd();return null==_0xa490c9?(_0x29b00e(),_0x4f8f81([0x56,0x61,0x6c,0x69,0x64])):_0x4f8f81(_0x167e35-_0xa490c9>(0x63ae0106^_0x395930)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4f8f81([0x74,0x68,0x65,0x6e])](_0x2b9c4c)[_0x4f8f81([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2b9c4c(_0x4f8f81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x55e0f8=0x47946b86^_0x395930;function _0x29b00e(){const _0x58121e=_0x4f8f81([0x6c,0x6c,0x63,0x74,0x2d])+_0x10dba5(_0x5902a9(_0x142c26)),_0x548aa1=_0x4874d6(_0x10dba5(window[_0x4f8f81([0x4d,0x61,0x74,0x68])][_0x4f8f81([0x63,0x65,0x69,0x6c])](_0x167e35/_0x55e0f8)));window[_0x4f8f81([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f8f81([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x58121e,_0x548aa1);}function _0x1311fd(){const _0xd75436=_0x4f8f81([0x6c,0x6c,0x63,0x74,0x2d])+_0x10dba5(_0x5902a9(_0x142c26)),_0x58a014=window[_0x4f8f81([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f8f81([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd75436);return _0x58a014?window[_0x4f8f81([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4874d6(_0x58a014),0x10)*_0x55e0f8:null;}function _0x2dc2ad(_0x5ddf4d){return new window[(_0x4f8f81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x46daac,_0x26d494)=>{_0x5ddf4d[_0x4f8f81([0x74,0x68,0x65,0x6e])](_0x46daac,_0x26d494),window[_0x4f8f81([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x26d494,0x47a351c6^_0x395930);});}}_0x544b11[_0x4f8f81([0x6f,0x6e])](_0x4f8f81([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2438eb,_0x50a165)=>{if(_0x50a165[0x0]!=_0x142c26)return _0x2b9c4c(_0x4f8f81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x50a165[0x1]={..._0x50a165[0x1],[_0x4f8f81([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x224d81};},{[_0x4f8f81([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f8f81([0x68,0x69,0x67,0x68])}),_0x544b11[_0x4f8f81([0x6f,0x6e])](_0x4f8f81([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4c6d3a=>{_0xb44d4c(_0x4c6d3a[_0x4f8f81([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x483b9e=!0x0,_0x4b4e30(_0x4c6d3a[_0x4f8f81([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4f8f81([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f8f81([0x6c,0x6f,0x77])}),_0x155572[_0x4f8f81([0x74,0x68,0x65,0x6e])](()=>{_0x483b9e||_0x2b9c4c(_0x4f8f81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3e2e45(){return _0x544b11[_0x4f8f81([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f8f81([0x76,0x69,0x65,0x77])][_0x4f8f81([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4f8f81([0x61,0x75,0x74,0x6f]);}function _0x3495f9(){_0x544b11[_0x4f8f81([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f8f81([0x76,0x69,0x65,0x77])][_0x4f8f81([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f8f81([0x61,0x75,0x74,0x6f]);}}function _0x4230de(_0x2f5860){const _0x41c5bb=[new window[(_0x4f8f81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x32c930=>setTimeout(_0x32c930,0x47abbbca^_0x395930)),_0x155572[_0x4f8f81([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4f8f81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c255c=>{let _0x150878=0x0;_0x544b11[_0x4f8f81([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f8f81([0x6f,0x6e])](_0x4f8f81([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x54877a,_0xaee65)=>{_0xaee65[0x0][_0x4f8f81([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x150878++,_0x150878==(0x47a284fe^_0x395930)&&(_0x4c255c(),_0x54877a[_0x4f8f81([0x6f,0x66,0x66])]());});}))];return window[_0x4f8f81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f8f81([0x72,0x61,0x63,0x65])](_0x41c5bb)[_0x4f8f81([0x74,0x68,0x65,0x6e])](()=>_0x2f5860);}async function _0x406cc2(){await _0x155572,_0x544b11[_0x4f8f81([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f8f81([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x43caa6,_0x544b11[_0x4f8f81([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f8f81([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x43caa6,_0x544b11[_0x4f8f81([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4f8f81([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3ae5e5(_0x3912d9){const _0x3cd52c=_0x358630();_0x544b11[_0x3cd52c]=_0x4f8f81([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3912d9,_0x3912d9!=_0x4f8f81([0x56,0x61,0x6c,0x69,0x64])&&_0x406cc2();}function _0x358630(){const _0x494979=window[_0x4f8f81([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4f8f81([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4f8f81([0x6e,0x6f,0x77])]())[_0x4f8f81([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4f8f81([0x2e]),'');let _0x23e994=_0x4f8f81([0x75]);for(let _0x1be876=0x0;_0x1be876<_0x494979[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1be876+=0x2){let _0x284240=window[_0x4f8f81([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x494979[_0x4f8f81([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1be876,_0x1be876+0x2));_0x284240>=_0x255fe2[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x284240-=_0x255fe2[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x23e994+=_0x255fe2[_0x284240];}return _0x23e994;}function _0x5df630(){const _0xd56ce1=_0x54ae50[_0x4f8f81([0x73,0x70,0x6c,0x69,0x74])](_0x4f8f81([0x2e]));if(0x3!=_0xd56ce1[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4512bc(_0xd56ce1[0x1]);function _0x4512bc(_0x4ffc2c){const _0x5240c7=_0x52b393(_0x4ffc2c);return _0x5240c7&&_0x1729a9()?_0x5240c7:null;function _0x1729a9(){const _0x5d1b97=_0x5240c7[_0x4f8f81([0x6a,0x74,0x69])],_0x420258=window[_0x4f8f81([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d1b97[_0x4f8f81([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5d1b97[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1984d2={..._0x5240c7,[_0x4f8f81([0x6a,0x74,0x69])]:_0x5d1b97[_0x4f8f81([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5d1b97[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1984d2[_0x4f8f81([0x76,0x63])],_0x5902a9(_0x1984d2)==_0x420258;}}}async function _0x9a6f20(){let _0x3558ed=!0x0;try{const _0x91f9f5=_0x54ae50[_0x4f8f81([0x73,0x70,0x6c,0x69,0x74])](_0x4f8f81([0x2e])),[_0x1967b5,_0x55ce5f,_0xeadef4]=_0x91f9f5;return _0x2d7a42(_0x1967b5),await _0xc6f76c(_0x1967b5,_0x55ce5f,_0xeadef4),_0x3558ed;}catch{return!0x1;}function _0x2d7a42(_0x304986){const _0x4f1334=_0x52b393(_0x304986);_0x4f1334&&_0x4f1334[_0x4f8f81([0x61,0x6c,0x67])]==_0x4f8f81([0x45,0x53,0x32,0x35,0x36])||(_0x3558ed=!0x1);}async function _0xc6f76c(_0x546a4c,_0x31b46f,_0x325e16){const _0x5db4ca=window[_0x4f8f81([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4f8f81([0x66,0x72,0x6f,0x6d])](_0x309ad2(_0x325e16),_0x3ab479=>_0x3ab479[_0x4f8f81([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4b14c4=new window[(_0x4f8f81([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4f8f81([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x546a4c+_0x4f8f81([0x2e])+_0x31b46f),_0x416a36=window[_0x4f8f81([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4f8f81([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x416a36)return;const _0x1d381f=await _0x416a36[_0x4f8f81([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4f8f81([0x6a,0x77,0x6b]),_0x1916d3,{[_0x4f8f81([0x6e,0x61,0x6d,0x65])]:_0x4f8f81([0x45,0x43,0x44,0x53,0x41]),[_0x4f8f81([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4f8f81([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4f8f81([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x416a36[_0x4f8f81([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4f8f81([0x6e,0x61,0x6d,0x65])]:_0x4f8f81([0x45,0x43,0x44,0x53,0x41]),[_0x4f8f81([0x68,0x61,0x73,0x68])]:{[_0x4f8f81([0x6e,0x61,0x6d,0x65])]:_0x4f8f81([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1d381f,_0x5db4ca,_0x4b14c4)||(_0x3558ed=!0x1);}}function _0x52b393(_0x296c04){return _0x296c04[_0x4f8f81([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4f8f81([0x65,0x79]))?JSON[_0x4f8f81([0x70,0x61,0x72,0x73,0x65])](_0x309ad2(_0x296c04)):null;}function _0x309ad2(_0x29deaf){return window[_0x4f8f81([0x61,0x74,0x6f,0x62])](_0x29deaf[_0x4f8f81([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4f8f81([0x2b]))[_0x4f8f81([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4f8f81([0x2f])));}function _0x5902a9(_0x51ad07){let _0x1f3656=0x1505;function _0x403a5a(_0x2de061){for(let _0x29141b=0x0;_0x29141b<_0x2de061[_0x4f8f81([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x29141b++){const _0x37c94f=_0x2de061[_0x4f8f81([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x29141b);_0x1f3656=(_0x1f3656<<0x5)+_0x1f3656+_0x37c94f,_0x1f3656&=_0x1f3656;}}function _0x4154ba(_0x4aa60d){Array[_0x4f8f81([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4aa60d)?_0x4aa60d[_0x4f8f81([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4154ba):_0x4aa60d&&typeof _0x4aa60d==_0x4f8f81([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4f8f81([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4aa60d)[_0x4f8f81([0x73,0x6f,0x72,0x74])]()[_0x4f8f81([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4e0004,_0xaedc52])=>{_0x403a5a(_0x4e0004),_0x4154ba(_0xaedc52);}):_0x403a5a(window[_0x4f8f81([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4aa60d));}return _0x4154ba(_0x51ad07),_0x1f3656>>>0x0;}function _0x10dba5(_0x12a2ed){return _0x12a2ed[_0x4f8f81([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4f8f81([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4f8f81([0x30]));}function _0x4874d6(_0x41a4b5){return _0x41a4b5[_0x4f8f81([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4f8f81([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4f8f81([0x6a,0x6f,0x69,0x6e])]('');}function _0x43caa6(){}function _0x4f8f81(_0x229d76){return _0x229d76['map'](_0x5def67=>String['fromCharCode'](_0x5def67))['join']('');}_0x3ae5e5(await _0x58af49());}(this);}['_moveSelectionToFootnoteDefinition'](_0x457a64){const {plugins:_0x296a05,editing:_0x4bd66c,model:_0xa776cb}=this['editor'],_0x4732da=_0x296a05['get'](c)['getFootnote'](_0x457a64);return!!_0x4732da&&(_0xa776cb['change'](_0x2405bc=>{_0x2405bc['setSelection'](_0x2405bc['createPositionAt'](_0x4732da['definition'],'end'));}),_0x4bd66c['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x5ad4e5){const {plugins:_0x4ff7bf,editing:_0x121a2b,model:_0x1eb7ac}=this['editor'],_0x19d56e=_0x4ff7bf['get'](c)['getFootnote'](_0x5ad4e5);return!!_0x19d56e&&(_0x1eb7ac['change'](_0x18d34a=>{_0x18d34a['setSelection'](_0x19d56e['reference'],'on');}),_0x121a2b['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x4af477}=this['editor']['model'],_0x24415f=this['editor']['config']['get']('footnotes.multiBlock');_0x4af477['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x4af477['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x4af477['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x24415f?_0x4af477['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x4af477['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x4af477['addChildCheck'](_0x4fcc73=>{for(const _0x14cd45 of _0x4fcc73)if('footnoteDefinition'===_0x14cd45['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x2617d5}=this,{conversion:_0x1a8f5c,editing:_0x5c492f}=_0x2617d5,{t:t}=_0x2617d5['locale'];_0x1a8f5c['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x2ff8ad,{writer:_0x4ca86b,consumable:_0xa7a7c1})=>{const _0x38882=_0x2ff8ad['getChild'](0x0);if(!_0x38882||!_0x38882['is']('element','a'))return null;const _0x1746ec=_0x38882['getAttribute']('href')||'';if(!_0x1746ec['startsWith']('#'))return null;const _0x182086=_0x1746ec['replace'](/^#/,'');if(!_0x182086)return null;_0xa7a7c1['consume'](_0x38882,{'name':!0x0,'attributes':['href']});for(const {item:_0x47c374}of _0x5c492f['view']['createRangeIn'](_0x38882))_0x47c374['is']('$textProxy')?_0xa7a7c1['consume'](_0x47c374['textNode'],{'name':!0x0}):_0x47c374['is']('element')&&_0xa7a7c1['consume'](_0x47c374,{'name':!0x0});return _0x4ca86b['createElement']('footnoteRef',{'footnoteId':_0x182086});}}),_0x1a8f5c['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x1d3a45,{writer:_0x4edbca})=>D(_0x1d3a45,_0x4edbca)}),_0x1a8f5c['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x4313fe,{writer:_0x1687a7})=>{const _0x5232a9=_0x4313fe['getAttribute']('footnoteCounter');return _0x4c01dd(D(_0x4313fe,_0x1687a7),_0x1687a7,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x5232a9)});}});}['_defineDefinitionsConverters'](){const {editor:_0x3935f8}=this,{t:t}=_0x3935f8['locale'],{conversion:_0x43f52d}=_0x3935f8;_0x43f52d['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x43f52d['for']('upcast')['add'](_0x3cf396=>{_0x3cf396['on']('element:ol',(_0x2704a6,_0x405350,_0x4bd88a)=>{const _0x6a01df=_0x405350['viewItem'];if(!_0x6a01df['hasClass']('footnotes-list')||!_0x405350['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x4bd88a['consumable']['consume'](_0x6a01df,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x47b41f,modelCursor:_0x482d85}=_0x4bd88a['convertChildren'](_0x405350['viewItem'],_0x405350['modelCursor']);_0x405350['modelRange']=_0x47b41f,_0x405350['modelCursor']=_0x482d85;}),_0x3cf396['on']('element:hr',(_0xfffe22,_0x45a5f9,_0x23c7b0)=>{const _0x1541bc=_0x45a5f9['viewItem'];_0x1541bc['hasClass']('footnotes-divider')&&_0x45a5f9['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x23c7b0['consumable']['consume'](_0x1541bc,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x43f52d['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x267c6d,{writer:_0x1c849d})=>g(_0x1c849d)}),_0x43f52d['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x4a9aa0,{writer:_0x4c68e8})=>{const _0xf84daf=g(_0x4c68e8,{'data-footnotes-list-label':t('Footnotes')}),_0x2a73cb=_0x4c01dd(_0xf84daf,_0x4c68e8,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x4c68e8['setCustomProperty']('footnotesDefinitions',!0x0,_0x2a73cb),_0x2a73cb;}});}['_defineDefinitionConverters'](){const {editor:_0x3b5b25}=this,{conversion:_0x3701e1,locale:_0x4ec979}=_0x3b5b25,_0x4c1c14=_0x3b5b25['config']['get']('footnotes.multiBlock');_0x3701e1['for']('upcast')['add'](_0x43e993=>{_0x43e993['on']('element:li',(_0x668a25,_0x2b0ea5,_0x388fe4)=>{const _0x4b81d2=_0x2b0ea5['viewItem'];if(!_0x4b81d2['hasClass']('footnote-definition')||!_0x4b81d2['getAttribute']('id'))return;const _0x3e3a5d=_0x4b81d2['parent'];if(!_0x3e3a5d['is']('element','ol')||!_0x3e3a5d['hasClass']('footnotes-list'))return;if(!_0x388fe4['consumable']['test'](_0x4b81d2,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x4d529e=_0x388fe4['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x4b81d2['getAttribute']('id')});if(!_0x388fe4['safeInsert'](_0x4d529e,_0x2b0ea5['modelCursor']))return;_0x388fe4['consumable']['consume'](_0x4b81d2,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x529209=Array['from'](_0x4b81d2['getChildren']())['find'](_0x5af7b3=>_0x5af7b3['is']('element')&&_0x5af7b3['hasClass']('footnote-content'));for(const _0xd22740 of _0x4b81d2['getChildren']())_0xd22740['is']('element')&&(_0x388fe4['consumable']['consume'](_0xd22740,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x388fe4['consumable']['consume'](_0xd22740,{'name':!0x0,'classes':'footnote-content'}));if(_0x529209){if(_0x4c1c14)_0x388fe4['convertChildren'](_0x529209,_0x4d529e);else{const _0x9708a8=_0x388fe4['writer']['createElement']('footnoteInlineContent');_0x388fe4['writer']['insert'](_0x9708a8,_0x4d529e),_0x388fe4['convertChildren'](_0x529209,_0x9708a8);}}_0x388fe4['updateConversionResult'](_0x4d529e,_0x2b0ea5);});}),_0x3701e1['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x4e5c3c,{writer:_0x2a4365})=>v(_0x4e5c3c,_0x2a4365,_0x4ec979,{'dataPipeline':!0x0})}),_0x3701e1['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x24b49f,{writer:_0x321dd7})=>v(_0x24b49f,_0x321dd7,_0x4ec979)});}['_defineBogusParagraphConverters'](){const {editor:_0x4b6bb6}=this,{conversion:_0x527e2b}=_0x4b6bb6;_0x4b6bb6['config']['get']('footnotes.multiBlock')?(_0x527e2b['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x527e2b['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x4b6bb6['model']['document'],'change:data',()=>{!function(_0x302b33,_0x9a3699){const _0x152131=_0x302b33['document']['differ'],_0x52c45d=new Set();for(const _0x3f82f7 of _0x152131['getChanges']()){const _0x3a299b='attribute'==_0x3f82f7['type']?_0x3f82f7['range']['start']['parent']:_0x3f82f7['position']['parent'];_0x3a299b['is']('element','footnoteDefinition')&&_0x52c45d['add'](_0x3a299b);}for(const _0xbf1d0 of _0x52c45d['values']()){const _0x297d87=Array['from'](_0xbf1d0['getChildren']())['filter'](_0x52108e=>p(_0x52108e,_0x9a3699['mapper']));for(const _0x31fff7 of _0x297d87)_0x9a3699['reconvertItem'](_0x31fff7);}}(_0x4b6bb6['model'],_0x4b6bb6['editing']);})):(_0x527e2b['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x527e2b['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x318185,{writer:_0x340179})=>{const _0x181b4a=_0x340179['createContainerElement']('span');return _0x340179['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x181b4a),_0x181b4a;}}));}['_defineKeyboardHandlers'](){const {editor:_0x186587}=this,{editing:_0x267c2c,t:t}=_0x186587,_0x6c453a=_0x186587['model']['document']['selection'];_0x186587['keystrokes']['set']('CTRL+Shift+D','insertFootnote'),_0x186587['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Shift+D'}]}),this['listenTo'](_0x267c2c['view']['document'],'enter',(_0x3168ed,_0x23a0cd)=>{const _0x405c47=function(_0x55ed49){const _0x4bb96d=_0x55ed49['getSelectedElement']();if(_0x4bb96d?.['is']('element','footnoteRef'))return _0x4bb96d;return null;}(_0x6c453a);if(_0x405c47){const _0x2ae145=_0x405c47['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x2ae145),_0x23a0cd['preventDefault'](),_0x3168ed['stop']();}},{'context':_0x154edf});}['_defineClickHandlers'](){const {editor:_0x362cea}=this,{editing:_0x1b1264}=_0x362cea;_0x362cea['editing']['view']['addObserver'](_0x275c97),_0x362cea['editing']['view']['addObserver'](_0x1889c7);let _0x254def=!0x1;this['listenTo'](_0x1b1264['view']['document'],'pointerdown',(_0x51eadc,_0x51ec06)=>{const {target:_0x12edec}=_0x51ec06,_0x1ad8bf=_0x1b1264['view']['document']['selection'];_0x254def=!!(_0x12edec['is']('element','a')&&_0x12edec['parent']?.['is']('element','sup')&&_0x12edec['parent']['hasClass']('footnote'))&&_0x1ad8bf['getSelectedElement']()===_0x12edec['parent'];},{'priority':'high'}),this['listenTo'](_0x1b1264['view']['document'],'click',(_0x5bc067,_0x299c75)=>{const {target:_0x256e23}=_0x299c75;if(!_0x256e23['is']('element','a'))return;if(_0x256e23['parent']?.['is']('element','sup')&&_0x256e23['parent']['hasClass']('footnote')&&!_0x254def)return void _0x299c75['preventDefault']();let _0xcd855b=_0x256e23['getAttribute']('href');if(!_0xcd855b?.['startsWith']('#'))return;_0xcd855b=_0xcd855b['slice'](0x1);let _0x5a7bc0=!0x1;(_0xcd855b['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0xcd855b['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0xcd855b))&&(_0x5a7bc0=!0x0),_0x5a7bc0&&(_0x299c75['preventDefault'](),_0x5bc067['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x44e9e2}={}){return(_0x200222,{writer:_0x41bafc})=>{if(!h(_0x200222))return null;if(!_0x44e9e2)return _0x41bafc['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x85aad5=_0x41bafc['createContainerElement']('p');return _0x41bafc['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x85aad5),_0x85aad5;};}function h(_0x817c7d){const {parent:_0x3bfd94}=_0x817c7d;if(!_0x3bfd94?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x3bfd94['childCount'])return!0x1;for(const _0x56d904 of _0x817c7d['getAttributeKeys']())if(!_0x56d904['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x56d904)return!0x1;return!0x0;}function p(_0x4feeb3,_0x37efd3){if(!_0x4feeb3['is']('element','paragraph'))return!0x1;const _0x509424=_0x37efd3['toViewElement'](_0x4feeb3);return!!_0x509424&&h(_0x4feeb3)!==_0x509424['is']('element','span');}function J(_0x129ac2){return _0x154edf(_0x129ac2)&&_0x129ac2['is']('containerElement')&&!!_0x129ac2['getCustomProperty']('footnotesDefinitions');}function g(_0x5d4777,_0x12d803={}){const _0x1f37eb=_0x5d4777['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x5d2aae=_0x5d4777['createContainerElement']('ol',{'class':'footnotes-list'},_0x5d4777['createSlot']());return _0x5d4777['createContainerElement']('div',{'class':'footnotes',..._0x12d803},[_0x1f37eb,_0x5d2aae]);}function D(_0x181f15,_0x1be973){const _0x305ad8=_0x181f15['getAttribute']('footnoteId'),_0x3b2580=_0x181f15['getAttribute']('footnoteCounter'),_0x30a004=_0x1be973['createUIElement']('a',{'href':'#'+_0x305ad8},function(_0x2f291b){const _0x842d8a=this['toDomElement'](_0x2f291b);return _0x842d8a['textContent']=_0x3b2580,_0x842d8a;}),_0xb78eb0=_0x1be973['createContainerElement']('sup',{'id':'ref-'+_0x305ad8,'class':'footnote'},[_0x30a004]);return _0xb78eb0['getFillerOffset']=()=>null,_0xb78eb0;}function v(_0x445418,_0x506255,_0x339dce,{dataPipeline:_0x47884c}={}){const {t:t}=_0x339dce,_0x583cec=_0x445418['getAttribute']('footnoteId'),_0x47efed=_0x506255['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x583cec},function(_0x478670){const _0x5efc1f=this['toDomElement'](_0x478670);return _0x5efc1f['innerText']='^',_0x5efc1f;}),_0x39ae6f=_0x47884c?_0x506255['createContainerElement']('div',{'class':'footnote-content'}):_0x498796(_0x506255['createEditableElement']('div',{'class':'footnote-content'}),_0x506255,{'label':t('Footnote\x20content.')});return _0x506255['insert'](_0x506255['createPositionAt'](_0x39ae6f,0x0),_0x506255['createSlot']()),_0x506255['createContainerElement']('li',{'class':'footnote-definition','id':_0x583cec},[_0x47efed,_0x39ae6f]);}class e extends _0x5a4266{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0xb323c9];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x308427}=this,{plugins:_0x279bc4,model:_0x17f5f9}=_0x308427,_0x1f245f=_0x279bc4['get'](_0xb323c9),_0x380a42=_0x279bc4['get'](c);this['listenTo'](_0x1f245f,'outputTransformation',(_0x439a76,_0x3f55a6)=>{const _0x2ae5b6=function(_0x2f56ea,_0xb0ff2f){const _0x80d353=new Set();for(const {item:_0x2fa9ef}of _0x2f56ea['createRangeIn'](_0xb0ff2f))_0x2fa9ef['is']('element','footnoteRef')&&_0x80d353['add'](_0x2fa9ef['getAttribute']('footnoteId'));return Array['from'](_0x80d353);}(_0x17f5f9,_0x3f55a6['content']);if(!_0x2ae5b6['length'])return;const _0x22181e=_0x380a42['getFootnotes'](),_0x937530=_0x2ae5b6['reduce']((_0xbff18c,_0x36a8c9)=>{const _0x461811=_0x22181e['find'](_0x3d10f0=>_0x3d10f0['id']===_0x36a8c9);if(_0x461811){const _0x11d36c=_0x308427['data']['toView'](_0x461811['definition'],{'isClipboardPipeline':!0x0}),_0x30f2bc=_0x308427['data']['htmlProcessor']['toData'](_0x11d36c);_0xbff18c[_0x461811['id']]=_0x30f2bc;}return _0xbff18c;},Object['create'](null));_0x3f55a6['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x937530));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x631a3b}=this,{model:_0x326337,plugins:_0x24a9f2}=_0x631a3b,{view:_0x1fe5ea}=_0x631a3b['editing'],_0x2257a6=_0x24a9f2['get'](_0xb323c9),_0xe0e39=_0x24a9f2['get'](c);let _0x27dd13=null;this['listenTo'](_0x1fe5ea['document'],'clipboardInput',(_0x35fb32,_0x6a1c53)=>{const _0xf46570=_0x6a1c53['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x27dd13=_0xf46570?JSON['parse'](_0xf46570):null;}),this['listenTo'](_0x2257a6,'contentInsertion',(_0x493a67,_0x499e6f)=>{if(!_0x27dd13)return;const _0x12b7af=_0x499e6f['sourceEditorId']===this['editor']['id'];_0x12b7af&&'drop'===_0x499e6f['method']||_0x326337['change'](_0x1133ab=>{!function(_0x58bb68,_0x1fd36){const _0x1c7a89=[];for(const {item:_0x5f3fe1}of _0x58bb68['createRangeIn'](_0x1fd36))_0x5f3fe1['is']('element','footnotesDefinitions')&&_0x1c7a89['push'](_0x5f3fe1);for(const _0x169893 of _0x1c7a89)_0x58bb68['remove'](_0x169893);}(_0x1133ab,_0x499e6f['content']);let _0x48615a=_0xe0e39['getFootnotesDefinitionsObjectElement']();if(!_0x48615a){const _0x5ed593=_0x326337['document']['selection']['getFirstRange']()['root'];_0x48615a=_0xe0e39['_insertEmptyFootnotesDefinitionsContainer'](_0x1133ab,_0x5ed593);}const _0x511ad9=function(_0x578748,_0x6c970c,_0x127c78){const _0x47fc1e=Object['create'](null);for(const {item:_0x97b71a}of _0x578748['createRangeIn'](_0x6c970c))if(_0x97b71a['is']('element','footnoteRef')){const _0x2702d1=_0x97b71a['getAttribute']('footnoteId');if(!_0x127c78(_0x2702d1))continue;_0x47fc1e[_0x2702d1]||(_0x47fc1e[_0x2702d1]=_0x4ead23()),_0x578748['setAttribute']('footnoteId',_0x47fc1e[_0x2702d1],_0x97b71a);}return _0x47fc1e;}(_0x1133ab,_0x499e6f['content'],_0x20c335=>!_0x12b7af||null!==_0xe0e39['getFootnote'](_0x20c335));for(const [_0x1c1814,_0xe5b27d]of Object['entries'](_0x27dd13)){const _0x1e6b70=_0x511ad9[_0x1c1814]||_0x1c1814,_0xff5399=_0x1133ab['createElement']('footnoteDefinition',{'footnoteId':_0x1e6b70}),_0x586401=_0x631a3b['data']['htmlProcessor']['toView'](_0xe5b27d),_0x55fa20=_0x631a3b['data']['toModel'](_0x586401,_0xff5399);_0x1133ab['append'](_0x55fa20,_0xff5399),_0x1133ab['insert'](_0xff5399,_0x48615a,'end');}_0x27dd13=null;});});}}class i extends _0x5a4266{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xaae9b6}=this,{componentFactory:_0x4588cc}=_0xaae9b6['ui'];_0x4588cc['add']('insertFootnote',x(_0xaae9b6,_0x253836)),_0x4588cc['add']('menuBar:insertFootnote',x(_0xaae9b6,_0x51d454)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x214969=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2d4530;for(const _0x25445b in _0x214969){const _0x327471=_0x25445b,_0x3c8582=_0x214969[_0x327471];if('footnotesLicenseKeyValid'==_0x3c8582||'footnotesLicenseKeyInvalid'==_0x3c8582||'footnotesLicenseKeyExpired'==_0x3c8582||'footnotesLicenseKeyDomainLimit'==_0x3c8582||'footnotesLicenseKeyNotAllowed'==_0x3c8582||'footnotesLicenseKeyEvaluationLimit'==_0x3c8582||'footnotesLicenseKeyTrialLimit'==_0x3c8582||'footnotesLicenseKeyUsageLimit'==_0x3c8582){delete _0x214969[_0x327471],_0x2d4530=_0x3c8582,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x2d4530&&_0x214969['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x2d4530&&_0x214969['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x2d4530&&_0x214969['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x2d4530&&_0x214969['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x2d4530&&_0x214969['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0x2d4530&&_0x214969['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0x2d4530&&_0x214969['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function x(_0x31c85a,_0x61520e){const _0x4ef337=_0x31c85a['commands']['get']('insertFootnote');return _0xeed551=>{const {t:t}=_0xeed551,_0x48abe9=new _0x61520e(_0xeed551),_0x2cc0b9=_0x48abe9 instanceof _0x51d454;return _0x48abe9['bind']('isEnabled')['to'](_0x4ef337,'isEnabled'),_0x48abe9['set']({'label':t(_0x2cc0b9?'Footnote':'Insert\x20footnote'),'icon':_0x4503ac,'tooltip':!0x0}),_0x48abe9['on']('execute',()=>{_0x4ef337['execute'](),_0x31c85a['editing']['view']['focus']();}),_0x48abe9;};}class nt extends _0x5a4266{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const Q=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x43caa9{['refresh'](){const {editor:_0xb9867b}=this,_0x4645dd=_0xb9867b['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x4645dd,this['value']=_0x4645dd?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x149ffb}){const {editor:_0x19ed3c}=this,_0x4f1f1d=_0x19ed3c['plugins']['get'](c),_0x28eeee=_0x4f1f1d['getFootnotesDefinitionsObjectElement']();_0x28eeee&&Q['includes'](_0x149ffb)&&_0x19ed3c['model']['change'](_0x50cb6a=>{_0x50cb6a['setAttribute']('footnotesListStyle',_0x149ffb,_0x28eeee),_0x4f1f1d['_updateFootnotesCounters'](_0x50cb6a);});}}class b extends _0x43caa9{['refresh'](){const {editor:_0x180865}=this,_0x42e1a2=_0x180865['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x42e1a2,this['value']=_0x42e1a2?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x405d5e}){const {editor:_0x49cbc5}=this,_0x5559e0=_0x49cbc5['plugins']['get'](c),_0x4029b6=_0x5559e0['getFootnotesDefinitionsObjectElement']();_0x4029b6&&Number['isInteger'](_0x405d5e)&&_0x49cbc5['model']['change'](_0x51cf02=>{_0x51cf02['setAttribute']('footnotesListStart',_0x405d5e,_0x4029b6),_0x5559e0['_updateFootnotesCounters'](_0x51cf02);});}}class P extends _0x5a4266{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2ad16b}=this;_0x2ad16b['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x2ad16b['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x2ad16b['commands']['add']('footnotesStyle',new S(_0x2ad16b)),_0x2ad16b['commands']['add']('footnotesStart',new b(_0x2ad16b)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x252872}=this,{schema:_0x326d8c}=_0x252872['model'];_0x326d8c['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0xdeff10}=this,{conversion:_0x31afee,model:_0x64dd1f}=_0xdeff10,{schema:_0x4f1b81}=_0x64dd1f;_0x31afee['for']('upcast')['add'](_0x48fecb=>{_0x48fecb['on']('element:ol',(_0x4dca73,_0x1920b9,_0x34307c)=>{const _0xb0e015=_0x1920b9['viewItem'],_0x1e445a=_0x1920b9['modelCursor']?.['parent'];_0xb0e015['hasClass']('footnotes-list')&&_0x1e445a?.['is']('element','footnotesDefinitions')&&(function(_0x3d3bd2,_0x15af42,_0x4f082d,_0x145ccf){if(!_0x145ccf['checkAttribute'](_0x15af42,'footnotesListStart'))return;let _0x2faaed=0x1;const _0x161137=_0x4f082d['consumable']['consume'](_0x3d3bd2,{'attributes':'start'});if(_0x161137){const _0x1ab915=Number['parseInt'](_0x3d3bd2['getAttribute']('start'),0xa);Number['isNaN'](_0x1ab915)||(_0x2faaed=_0x1ab915);}!_0x161137&&_0x15af42['hasAttribute']('footnotesListStart')||_0x4f082d['writer']['setAttribute']('footnotesListStart',_0x2faaed,_0x15af42);}(_0xb0e015,_0x1e445a,_0x34307c,_0x4f1b81),function(_0x29d38f,_0x45dbd7,_0x590eef,_0x42e7a1){if(!_0x42e7a1['checkAttribute'](_0x45dbd7,'footnotesListStyle'))return;let _0x1b1074='decimal',_0x3a73ed=!0x1;if(_0x590eef['consumable']['consume'](_0x29d38f,{'attributes':'type'})){const _0x500c81={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x29d38f['getAttribute']('type')];_0x500c81&&(_0x1b1074=_0x500c81),_0x3a73ed=!0x0;}_0x590eef['consumable']['consume'](_0x29d38f,{'styles':'list-style-type'})&&(_0x1b1074=_0x29d38f['getStyle']('list-style-type'),_0x3a73ed=!0x0),!_0x3a73ed&&_0x45dbd7['hasAttribute']('footnotesListStyle')||_0x590eef['writer']['setAttribute']('footnotesListStyle',_0x1b1074,_0x45dbd7);}(_0xb0e015,_0x1e445a,_0x34307c,_0x4f1b81));});}),_0x31afee['for']('downcast')['add'](_0x39d9da=>{_0x39d9da['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x196c97,_0x5b67e7,_0x229f55)=>{if(!_0x229f55['consumable']['consume'](_0x5b67e7['item'],_0x196c97['name']))return;const _0x5825e8=C(_0x5b67e7['item'],_0x229f55['mapper']),{attributeNewValue:_0x5ec56e}=_0x5b67e7;null==_0x5ec56e||0x1===_0x5ec56e?_0x229f55['writer']['removeAttribute']('start',_0x5825e8):_0x229f55['writer']['setAttribute']('start',String(_0x5ec56e),_0x5825e8);}),_0x39d9da['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x36f335,_0x32d024,_0x1b2df7)=>{if(!_0x1b2df7['consumable']['consume'](_0x32d024['item'],_0x36f335['name']))return;const _0x35bd9f=C(_0x32d024['item'],_0x1b2df7['mapper']),{attributeNewValue:_0x51bbda}=_0x32d024;_0x51bbda&&'decimal'!==_0x51bbda?_0x1b2df7['writer']['setStyle']('list-style-type',_0x51bbda,_0x35bd9f):_0x1b2df7['writer']['removeStyle']('list-style-type',_0x35bd9f);});});}['_definePostfixer'](){const {editor:_0x2a4161}=this,{model:_0x397516}=_0x2a4161,_0x1100e5=_0x2a4161['plugins']['get'](c),_0x64da37=this['_getDefaultListStyle'](),_0x3982f1=this['_getDefaultStartIndex']();_0x397516['document']['registerPostFixer'](_0x1f9ff2=>{const _0x330ba5=_0x397516['document']['differ']['getChanges']();let _0x3338dd=!0x1;for(const _0xc3522e of _0x330ba5){if('insert'!==_0xc3522e['type']||'$text'===_0xc3522e['name'])continue;const _0x323549=_0x397516['createRangeOn'](_0xc3522e['position']['nodeAfter']);for(const _0x40fe44 of _0x323549['getItems']())_0x40fe44['is']('element','footnotesDefinitions')&&(!_0x40fe44['hasAttribute']('footnotesListStart')&&_0x397516['schema']['checkAttribute'](_0x40fe44,'footnotesListStart')&&(_0x1f9ff2['setAttribute']('footnotesListStart',_0x3982f1,_0x40fe44),_0x3338dd=!0x0),!_0x40fe44['hasAttribute']('footnotesListStyle')&&_0x397516['schema']['checkAttribute'](_0x40fe44,'footnotesListStyle')&&(_0x1f9ff2['setAttribute']('footnotesListStyle',_0x64da37,_0x40fe44),_0x3338dd=!0x0));}return _0x3338dd&&_0x1100e5['_updateFootnotesCounters'](_0x1f9ff2),_0x3338dd;});}['_defineFormatter'](){const {editor:_0x138274}=this;_0x138274['plugins']['get'](c)['setFootnoteFormatter'](_0x206004=>this['_formatFootnoteListValue'](_0x206004));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x5b9900,value:_0x1cc3b0,digits:_0x39daea}){const _0x4806d2=_0x5b9900['getAttribute']('footnotesListStyle'),_0x5b76b6=_0x5b9900['getAttribute']('footnotesListStart'),_0x4df2ef=Math['floor'](_0x1cc3b0)+(_0x5b76b6??0x1)-0x1;switch(_0x4806d2){case'decimal-leading-zero':return function(_0x59a911,_0x2240d5){return String(_0x59a911)['padStart'](_0x2240d5,'0');}(_0x4df2ef,Math['max'](0x2,_0x39daea));case'lower-alpha':case'lower-latin':return M(_0x4df2ef,!0x1);case'upper-alpha':case'upper-latin':return M(_0x4df2ef,!0x0);case'lower-roman':return V(_0x4df2ef,!0x1);case'upper-roman':return V(_0x4df2ef,!0x0);default:return String(_0x4df2ef);}}}function C(_0x5d03e4,_0x217c19){const _0x5d1cec=_0x217c19['toViewElement'](_0x5d03e4);return Array['from'](_0x5d1cec['getChildren']())['find'](_0x19b674=>_0x19b674['is']('element','ol')&&_0x19b674['hasClass']('footnotes-list'));}function M(_0x44f75d,_0xf661ae){let _0x19eb1e='',_0x1fe7c4=_0x44f75d;for(;_0x1fe7c4>0x0;){const _0x354cdd=(_0x1fe7c4-0x1)%0x1a;_0x19eb1e=String['fromCharCode'](0x61+_0x354cdd)+_0x19eb1e,_0x1fe7c4=Math['floor']((_0x1fe7c4-0x1)/0x1a);}return _0xf661ae?_0x19eb1e['toUpperCase']():_0x19eb1e;}const N=[{'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 V(_0x5f50ef,_0x5dafeb){let _0x21a55a='',_0x40bbe5=_0x5f50ef;for(const {value:_0x4aaf8d,numeral:_0x3b10d9}of N)for(;_0x40bbe5>=_0x4aaf8d;)_0x21a55a+=_0x3b10d9,_0x40bbe5-=_0x4aaf8d;return _0x5dafeb?_0x21a55a:_0x21a55a['toLowerCase']();}class H extends _0xf5b978{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new et();['keystrokes']=new ot();['focusables']=new _0x2b99b2();['focusCycler'];constructor(_0x7350a4,{styleButtonViews:_0x3c20f5,styleGridAriaLabel:_0x2b9ecf}){super(_0x7350a4),(this['focusCycler']=new _0x3cadfa({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x3c20f5,_0x2b9ecf),[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 _0x3fef38 of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x3fef38['element']);_0x1023bc({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>rt['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 _0x2f3cff=_0x205582=>_0x205582['stopPropagation']();this['keystrokes']['set']('arrowright',_0x2f3cff),this['keystrokes']['set']('arrowleft',_0x2f3cff),this['keystrokes']['set']('arrowup',_0x2f3cff),this['keystrokes']['set']('arrowdown',_0x2f3cff);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x5c68d8,_0x2272ba){const _0x1ca299=new _0xf5b978(this['locale']);return _0x1ca299['children']=_0x1ca299['createCollection'](),_0x1ca299['children']['addMany'](_0x5c68d8),_0x1ca299['setTemplate']({'tag':'div','attributes':{'aria-label':_0x2272ba,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x1ca299['children']}),_0x1ca299['children']['delegate']('execute')['to'](this),_0x1ca299['focus']=function(){for(const _0x2aa7d8 of this['children'])if(_0x2aa7d8 instanceof _0x253836&&_0x2aa7d8['isOn'])return void _0x2aa7d8['focus']();this['children']['first']['focus']();},_0x1ca299['focusTracker']=new et(),_0x1ca299['keystrokes']=new ot(),_0x1ca299['render'](),_0x1ca299['keystrokes']['listenTo'](_0x1ca299['element']),this['children']['add'](_0x1ca299),_0x1ca299;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x38f816=this['_createStartIndexPropertyView'](),_0x5a4b5c=[_0x38f816],_0x45592e=new tt(this['locale'],_0x5a4b5c);return _0x45592e['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x45592e['buttonView']['bind']('isEnabled')['toMany'](_0x5a4b5c,'isEnabled',(..._0xff0376)=>_0xff0376['some'](_0x159c69=>_0x159c69)),_0x45592e['buttonView']['on']('change:isEnabled',(_0x46b399,_0x15c0fb,_0x15d7b4)=>{_0x15d7b4||(_0x45592e['isCollapsed']=!0x0);}),this['children']['add'](_0x45592e),[_0x38f816,_0x45592e];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0xf7485c=new st(this['locale'],it);return _0xf7485c['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0xf7485c['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0xf7485c['fieldView']['on']('input',()=>{const _0x366eb7=_0xf7485c['fieldView']['element'],_0x192f4f=_0x366eb7['valueAsNumber'];Number['isNaN'](_0x192f4f)?_0xf7485c['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x366eb7['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x192f4f}):_0xf7485c['errorText']=t(_0x192f4f<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0xf7485c;}}class j extends _0x5a4266{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x3e82de,_0x6c205];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x12242a}=this,{componentFactory:_0x15d9d0}=_0x12242a['ui'];_0x12242a['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x15d9d0['add']('footnotesStyle',function(_0x523e88){return _0x2c91f9=>{const {t:t}=_0x2c91f9,_0x197528=_0x523e88['commands']['get']('footnotesStyle'),_0x352fa1=_0x3a1861(_0x2c91f9),{buttonView:_0x325d00}=_0x352fa1;return _0x352fa1['class']='ck-footnotes-styles-dropdown',_0x352fa1['bind']('isEnabled')['to'](_0x197528,'isEnabled'),_0x325d00['set']({'label':t('Footnotes\x20style'),'icon':_0x4503ac,'tooltip':!0x0}),_0x352fa1['once']('change:isOpen',()=>{const _0x1172aa=function({editor:_0x4f40c1,dropdownView:_0x2e3d64}){const {t:t}=_0x4f40c1['locale'],_0x551d2c=t('Footnotes\x20definitions\x20styles'),_0x127a3b=function(_0x5460f9){const t=_0x5460f9['locale']['t'],_0x1a26a2=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x2df69b},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x4459ae},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x965475},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x29a9a7},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x1129b8},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x17a7e5}];return _0x1a26a2['map'](function(_0x4c2da8){const _0x3367c6=_0x4c2da8['locale'];return({label:_0xc5fbee,icon:_0x34b849,tooltip:_0x389ed1,style:_0x45dea7})=>{const _0x32a066=_0x4c2da8['commands']['get']('footnotesStyle'),_0x23b556=new _0x253836(_0x3367c6);return _0x23b556['set']({'label':_0xc5fbee,'icon':_0x34b849,'tooltip':_0x389ed1}),_0x23b556['bind']('isOn')['to'](_0x32a066,'value',_0x1c70a0=>_0x1c70a0===_0x45dea7),_0x23b556['bind']('isEnabled')['to'](_0x32a066,'isEnabled'),_0x23b556['on']('execute',()=>{_0x4c2da8['execute']('footnotesStyle',{'value':_0x45dea7}),_0x4c2da8['editing']['view']['focus']();}),_0x23b556;};}(_0x5460f9));}(_0x4f40c1),_0x5503d3=new H(_0x4f40c1['locale'],{'styleGridAriaLabel':_0x551d2c,'styleButtonViews':_0x127a3b});return _0x5503d3['delegate']('execute')['to'](_0x2e3d64),_0x5503d3['on']('footnotesListStart',(_0xe835b4,_0x3583ed)=>{_0x4f40c1['execute']('footnotesStart',{'value':_0x3583ed['startIndex']});}),_0x5503d3;}({'editor':_0x523e88,'dropdownView':_0x352fa1});_0x352fa1['panelView']['children']['add'](_0x1172aa);}),_0x352fa1;};}(_0x12242a));}['afterInit'](){const {editor:_0x482610}=this,{t:t}=_0x482610['locale'],_0x48dd99=_0x482610['plugins']['get'](_0x6c205),{defaultPositions:_0x317860}=_0x3db375;_0x48dd99['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x482610['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x31d9e5=>{let _0x46f021=_0x31d9e5['getFirstPosition']()?.['parent'];return _0x46f021?.['is']('$text')&&(_0x46f021=_0x46f021['parent']),_0x46f021?.['is']('element')?_0x46f021['findAncestor'](J):null;},'positions':[_0x317860['southArrowNorth'],_0x317860['southArrowNorthMiddleWest'],_0x317860['southArrowNorthMiddleEast'],_0x317860['southArrowNorthWest'],_0x317860['southArrowNorthEast'],_0x317860['northArrowSouth'],_0x317860['northArrowSouthMiddleWest'],_0x317860['northArrowSouthMiddleEast'],_0x317860['northArrowSouthWest'],_0x317860['northArrowSouthEast'],_0x317860['viewportStickyNorth']]});}}class lt extends _0x5a4266{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,lt 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-
|
|
3
|
+
"version": "0.0.0-nightly-20251030.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-
|
|
27
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
28
|
-
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-
|
|
29
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
30
|
-
"@ckeditor/ckeditor5-widget": "0.0.0-nightly-
|
|
31
|
-
"@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20251030.0",
|
|
27
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251030.0",
|
|
28
|
+
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-20251030.0",
|
|
29
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251030.0",
|
|
30
|
+
"@ckeditor/ckeditor5-widget": "0.0.0-nightly-20251030.0",
|
|
31
|
+
"@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-20251030.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251030.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20251030.0"
|
|
34
34
|
},
|
|
35
35
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
36
36
|
"author": "CKSource (http://cksource.com/)",
|
package/src/footnotesediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x15d83e}from'ckeditor5/src/core.js';import{isWidget as _0xc7766d,toWidget as _0x5ca5e4,toWidgetEditable as _0x4477f0}from'ckeditor5/src/widget.js';import{uid as _0x1ed32b}from'ckeditor5/src/utils.js';import{PointerObserver as _0x1331f7,ClickObserver as _0x1e09de}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x42d64a}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x5eb103}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x15d83e{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x42d64a];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x927ab3}=this;_0x927ab3['config']['define']('footnotes.multiBlock',!0x0),_0x927ab3['commands']['add']('insertFootnote',new _0x5eb103(_0x927ab3)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x2c8471){const _0x10ebf9=_0x389833([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]),_0x18e0ed=0x47a28506,_0x1af94e=0x47a5f296^_0x18e0ed,_0x2827fb=window[_0x389833([0x44,0x61,0x74,0x65])][_0x389833([0x6e,0x6f,0x77])](),_0x1e7697=_0x2c8471[_0x389833([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3dbbb4=new window[(_0x389833([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3890db=>{_0x1e7697[_0x389833([0x6f,0x6e,0x63,0x65])](_0x389833([0x72,0x65,0x61,0x64,0x79]),_0x3890db);}),_0x17018c={[_0x389833([0x6b,0x74,0x79])]:_0x389833([0x45,0x43]),[_0x389833([0x75,0x73,0x65])]:_0x389833([0x73,0x69,0x67]),[_0x389833([0x63,0x72,0x76])]:_0x389833([0x50,0x2d,0x32,0x35,0x36]),[_0x389833([0x78])]:_0x389833([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]),[_0x389833([0x79])]:_0x389833([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]),[_0x389833([0x61,0x6c,0x67])]:_0x389833([0x45,0x53,0x32,0x35,0x36])},_0x192725=_0x1e7697[_0x389833([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x389833([0x67,0x65,0x74])](_0x389833([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x559b50(){let _0x57e260,_0x1ac128=null,_0x45fcaa=null;try{if(_0x192725==_0x389833([0x47,0x50,0x4c]))return _0x389833([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x57e260=_0x3e25f8(),!_0x57e260)return _0x389833([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x57e260[_0x389833([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x45fcaa=_0x189173(_0x57e260[_0x389833([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x57e260[_0x389833([0x6a,0x74,0x69])])),await _0x1d8432()?_0x4e1b06()?_0x45c20f()?_0x389833([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x364be9()?(_0x57e260[_0x389833([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x389833([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1ac128=_0x2da700(_0x389833([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x57e260[_0x389833([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x389833([0x74,0x72,0x69,0x61,0x6c])&&(_0x1ac128=_0x2da700(_0x389833([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1ffc7a()):_0x389833([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x389833([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x389833([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x389833([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x45c20f(){const _0x260e62=[_0x389833([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x389833([0x74,0x72,0x69,0x61,0x6c])][_0x389833([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x57e260[_0x389833([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2827fb/0x3e8:0xe10*_0x1af94e;return _0x57e260[_0x389833([0x65,0x78,0x70])]<_0x260e62;}function _0x4e1b06(){const _0x520015=_0x57e260[_0x389833([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x520015&&(!!_0x520015[_0x389833([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x389833([0x2a]))||!!_0x520015[_0x389833([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x389833([0x46,0x4f,0x4f])));}function _0x364be9(){const _0x3a7976=_0x57e260[_0x389833([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3a7976||0x0==_0x3a7976[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5c50f4}=new URL(window[_0x389833([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3a7976[_0x389833([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c50f4))return!0x0;const _0x452469=_0x5c50f4[_0x389833([0x73,0x70,0x6c,0x69,0x74])](_0x389833([0x2e]));return _0x3a7976[_0x389833([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5d3831=>_0x5d3831[_0x389833([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x389833([0x2a])))[_0x389833([0x6d,0x61,0x70])](_0x10d01b=>_0x10d01b[_0x389833([0x73,0x70,0x6c,0x69,0x74])](_0x389833([0x2e])))[_0x389833([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3925a9=>_0x3925a9[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x452469[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x389833([0x6d,0x61,0x70])](_0x3619d1=>Array(_0x452469[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3619d1[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x389833([0x66,0x69,0x6c,0x6c])](_0x3619d1[0x0]===_0x389833([0x2a])?_0x389833([0x2a]):'')[_0x389833([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3619d1))[_0x389833([0x73,0x6f,0x6d,0x65])](_0x34fcdc=>_0x452469[_0x389833([0x65,0x76,0x65,0x72,0x79])]((_0x507f17,_0x41fff6)=>_0x34fcdc[_0x41fff6]===_0x507f17||_0x34fcdc[_0x41fff6]===_0x389833([0x2a])));}function _0x1ffc7a(){return _0x1ac128&&_0x45fcaa?new window[(_0x389833([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x264f5b,_0x184d30)=>{_0x1ac128[_0x389833([0x74,0x68,0x65,0x6e])](_0x264f5b,_0x184d30),_0x45fcaa[_0x389833([0x74,0x68,0x65,0x6e])](_0x5168ca=>{_0x5168ca!=_0x389833([0x56,0x61,0x6c,0x69,0x64])&&_0x264f5b(_0x5168ca);},_0x184d30);}):_0x1ac128||_0x45fcaa||_0x389833([0x56,0x61,0x6c,0x69,0x64]);}}function _0x189173(_0x37b88e,_0x31c199){return new window[(_0x389833([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x369a5b=>{if(_0x4b7c90())return _0x369a5b(_0x389833([0x56,0x61,0x6c,0x69,0x64]));_0x4fea90(),_0x1e7697[_0x389833([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x389833([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1a80ea=!0x1;const _0x275da4=_0x1ed32b();function _0x5cb0c1(_0x155850){return!!_0x155850&&(typeof _0x155850===_0x389833([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x155850===_0x389833([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x155850[_0x389833([0x74,0x68,0x65,0x6e])]===_0x389833([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x155850[_0x389833([0x63,0x61,0x74,0x63,0x68])]===_0x389833([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x6c5be(_0x16086f){_0xf49348(_0x16086f)[_0x389833([0x74,0x68,0x65,0x6e])](_0x4826d7=>{if(!_0x4826d7||_0x4826d7[_0x389833([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x389833([0x6f,0x6b]))return _0x389833([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x24def6(_0x11b3c3(_0x275da4+_0x31c199))!=_0x4826d7[_0x389833([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x389833([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x389833([0x56,0x61,0x6c,0x69,0x64]);})[_0x389833([0x74,0x68,0x65,0x6e])](_0x45202c=>(_0x2e16db(),_0x45202c),()=>{const _0x5904b9=_0x55bd4f();return null==_0x5904b9?(_0x2e16db(),_0x389833([0x56,0x61,0x6c,0x69,0x64])):_0x389833(_0x2827fb-_0x5904b9>(0x63ae0106^_0x18e0ed)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x389833([0x74,0x68,0x65,0x6e])](_0x369a5b)[_0x389833([0x63,0x61,0x74,0x63,0x68])](()=>{_0x369a5b(_0x389833([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5ace38=0x47946b86^_0x18e0ed;function _0x2e16db(){const _0x2b885b=_0x389833([0x6c,0x6c,0x63,0x74,0x2d])+_0x24def6(_0x11b3c3(_0x37b88e)),_0x2e6437=_0x41f692(_0x24def6(window[_0x389833([0x4d,0x61,0x74,0x68])][_0x389833([0x63,0x65,0x69,0x6c])](_0x2827fb/_0x5ace38)));window[_0x389833([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x389833([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2b885b,_0x2e6437);}function _0x55bd4f(){const _0x507936=_0x389833([0x6c,0x6c,0x63,0x74,0x2d])+_0x24def6(_0x11b3c3(_0x37b88e)),_0x22ccab=window[_0x389833([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x389833([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x507936);return _0x22ccab?window[_0x389833([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x41f692(_0x22ccab),0x10)*_0x5ace38:null;}function _0xf49348(_0x22f0b7){return new window[(_0x389833([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3bb8ce,_0x4136be)=>{_0x22f0b7[_0x389833([0x74,0x68,0x65,0x6e])](_0x3bb8ce,_0x4136be),window[_0x389833([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4136be,0x47a351c6^_0x18e0ed);});}}_0x1e7697[_0x389833([0x6f,0x6e])](_0x389833([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x218f33,_0x61ff41)=>{if(_0x61ff41[0x0]!=_0x37b88e)return _0x369a5b(_0x389833([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x61ff41[0x1]={..._0x61ff41[0x1],[_0x389833([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x275da4};},{[_0x389833([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x389833([0x68,0x69,0x67,0x68])}),_0x1e7697[_0x389833([0x6f,0x6e])](_0x389833([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5ec649=>{_0x5cb0c1(_0x5ec649[_0x389833([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1a80ea=!0x0,_0x6c5be(_0x5ec649[_0x389833([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x389833([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x389833([0x6c,0x6f,0x77])}),_0x3dbbb4[_0x389833([0x74,0x68,0x65,0x6e])](()=>{_0x1a80ea||_0x369a5b(_0x389833([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4b7c90(){return _0x1e7697[_0x389833([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x389833([0x76,0x69,0x65,0x77])][_0x389833([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x389833([0x61,0x75,0x74,0x6f]);}function _0x4fea90(){_0x1e7697[_0x389833([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x389833([0x76,0x69,0x65,0x77])][_0x389833([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x389833([0x61,0x75,0x74,0x6f]);}}function _0x2da700(_0x4c4a77){const _0x5df9c7=[new window[(_0x389833([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x37d058=>setTimeout(_0x37d058,0x47abbbca^_0x18e0ed)),_0x3dbbb4[_0x389833([0x74,0x68,0x65,0x6e])](()=>new window[(_0x389833([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x122361=>{let _0x34b1f1=0x0;_0x1e7697[_0x389833([0x6d,0x6f,0x64,0x65,0x6c])][_0x389833([0x6f,0x6e])](_0x389833([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3c9c95,_0x4b9e67)=>{_0x4b9e67[0x0][_0x389833([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x34b1f1++,_0x34b1f1==(0x47a284fe^_0x18e0ed)&&(_0x122361(),_0x3c9c95[_0x389833([0x6f,0x66,0x66])]());});}))];return window[_0x389833([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x389833([0x72,0x61,0x63,0x65])](_0x5df9c7)[_0x389833([0x74,0x68,0x65,0x6e])](()=>_0x4c4a77);}async function _0x5afebb(){await _0x3dbbb4,_0x1e7697[_0x389833([0x6d,0x6f,0x64,0x65,0x6c])][_0x389833([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5269da,_0x1e7697[_0x389833([0x6d,0x6f,0x64,0x65,0x6c])][_0x389833([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5269da,_0x1e7697[_0x389833([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x389833([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4851ae(_0x5b9533){const _0x2934aa=_0x464e29();_0x1e7697[_0x2934aa]=_0x389833([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5b9533,_0x5b9533!=_0x389833([0x56,0x61,0x6c,0x69,0x64])&&_0x5afebb();}function _0x464e29(){const _0x19ab34=window[_0x389833([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x389833([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x389833([0x6e,0x6f,0x77])]())[_0x389833([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x389833([0x2e]),'');let _0x1fc11a=_0x389833([0x75]);for(let _0x1a7697=0x0;_0x1a7697<_0x19ab34[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1a7697+=0x2){let _0x292464=window[_0x389833([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x19ab34[_0x389833([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1a7697,_0x1a7697+0x2));_0x292464>=_0x10ebf9[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x292464-=_0x10ebf9[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1fc11a+=_0x10ebf9[_0x292464];}return _0x1fc11a;}function _0x3e25f8(){const _0x476285=_0x192725[_0x389833([0x73,0x70,0x6c,0x69,0x74])](_0x389833([0x2e]));if(0x3!=_0x476285[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4f8cc4(_0x476285[0x1]);function _0x4f8cc4(_0x3089e9){const _0x228df5=_0x3d1122(_0x3089e9);return _0x228df5&&_0xb52f88()?_0x228df5:null;function _0xb52f88(){const _0xabe053=_0x228df5[_0x389833([0x6a,0x74,0x69])],_0x55f859=window[_0x389833([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xabe053[_0x389833([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xabe053[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x38b81c={..._0x228df5,[_0x389833([0x6a,0x74,0x69])]:_0xabe053[_0x389833([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xabe053[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x38b81c[_0x389833([0x76,0x63])],_0x11b3c3(_0x38b81c)==_0x55f859;}}}async function _0x1d8432(){let _0x1f3c66=!0x0;try{const _0x4cc4a8=_0x192725[_0x389833([0x73,0x70,0x6c,0x69,0x74])](_0x389833([0x2e])),[_0x3457eb,_0x1923ca,_0xa3b24a]=_0x4cc4a8;return _0x77e204(_0x3457eb),await _0x110928(_0x3457eb,_0x1923ca,_0xa3b24a),_0x1f3c66;}catch{return!0x1;}function _0x77e204(_0x2b47cc){const _0x45d587=_0x3d1122(_0x2b47cc);_0x45d587&&_0x45d587[_0x389833([0x61,0x6c,0x67])]==_0x389833([0x45,0x53,0x32,0x35,0x36])||(_0x1f3c66=!0x1);}async function _0x110928(_0x282d58,_0x567845,_0x4ffb98){const _0x539851=window[_0x389833([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x389833([0x66,0x72,0x6f,0x6d])](_0x14daef(_0x4ffb98),_0x31d60f=>_0x31d60f[_0x389833([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4189b2=new window[(_0x389833([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x389833([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x282d58+_0x389833([0x2e])+_0x567845),_0x457fb1=window[_0x389833([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x389833([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x457fb1)return;const _0x3ca86e=await _0x457fb1[_0x389833([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x389833([0x6a,0x77,0x6b]),_0x17018c,{[_0x389833([0x6e,0x61,0x6d,0x65])]:_0x389833([0x45,0x43,0x44,0x53,0x41]),[_0x389833([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x389833([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x389833([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x457fb1[_0x389833([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x389833([0x6e,0x61,0x6d,0x65])]:_0x389833([0x45,0x43,0x44,0x53,0x41]),[_0x389833([0x68,0x61,0x73,0x68])]:{[_0x389833([0x6e,0x61,0x6d,0x65])]:_0x389833([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3ca86e,_0x539851,_0x4189b2)||(_0x1f3c66=!0x1);}}function _0x3d1122(_0x31d5c2){return _0x31d5c2[_0x389833([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x389833([0x65,0x79]))?JSON[_0x389833([0x70,0x61,0x72,0x73,0x65])](_0x14daef(_0x31d5c2)):null;}function _0x14daef(_0x3c9686){return window[_0x389833([0x61,0x74,0x6f,0x62])](_0x3c9686[_0x389833([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x389833([0x2b]))[_0x389833([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x389833([0x2f])));}function _0x11b3c3(_0x2534e1){let _0x52f18d=0x1505;function _0x282156(_0x1e3de0){for(let _0x1d3019=0x0;_0x1d3019<_0x1e3de0[_0x389833([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1d3019++){const _0x2a5a5b=_0x1e3de0[_0x389833([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1d3019);_0x52f18d=(_0x52f18d<<0x5)+_0x52f18d+_0x2a5a5b,_0x52f18d&=_0x52f18d;}}function _0x5c222e(_0x2b38d1){Array[_0x389833([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2b38d1)?_0x2b38d1[_0x389833([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5c222e):_0x2b38d1&&typeof _0x2b38d1==_0x389833([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x389833([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2b38d1)[_0x389833([0x73,0x6f,0x72,0x74])]()[_0x389833([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5d440d,_0x50b17b])=>{_0x282156(_0x5d440d),_0x5c222e(_0x50b17b);}):_0x282156(window[_0x389833([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2b38d1));}return _0x5c222e(_0x2534e1),_0x52f18d>>>0x0;}function _0x24def6(_0x48ddee){return _0x48ddee[_0x389833([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x389833([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x389833([0x30]));}function _0x41f692(_0x4e7c93){return _0x4e7c93[_0x389833([0x73,0x70,0x6c,0x69,0x74])]('')[_0x389833([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x389833([0x6a,0x6f,0x69,0x6e])]('');}function _0x5269da(){}function _0x389833(_0x177a6a){return _0x177a6a['map'](_0x31f93d=>String['fromCharCode'](_0x31f93d))['join']('');}_0x4851ae(await _0x559b50());}(this);}['_moveSelectionToFootnoteDefinition'](_0x5cd077){const {plugins:_0x55b928,editing:_0x52407f,model:_0xa7af51}=this['editor'],_0x396d32=_0x55b928['get'](_0x42d64a)['getFootnote'](_0x5cd077);return!!_0x396d32&&(_0xa7af51['change'](_0x2364df=>{_0x2364df['setSelection'](_0x2364df['createPositionAt'](_0x396d32['definition'],'end'));}),_0x52407f['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x1c83bb){const {plugins:_0x5affdb,editing:_0x46a88b,model:_0x50235b}=this['editor'],_0x192070=_0x5affdb['get'](_0x42d64a)['getFootnote'](_0x1c83bb);return!!_0x192070&&(_0x50235b['change'](_0x18b6ba=>{_0x18b6ba['setSelection'](_0x192070['reference'],'on');}),_0x46a88b['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x47d564}=this['editor']['model'],_0x5a7b90=this['editor']['config']['get']('footnotes.multiBlock');_0x47d564['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x47d564['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x47d564['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x5a7b90?_0x47d564['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x47d564['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x47d564['addChildCheck'](_0x48bd0f=>{for(const _0x275df6 of _0x48bd0f)if('footnoteDefinition'===_0x275df6['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x23c043}=this,{conversion:_0x4aac3f,editing:_0x5a400c}=_0x23c043,{t:t}=_0x23c043['locale'];_0x4aac3f['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x37935e,{writer:_0x4d9e95,consumable:_0xd5d962})=>{const _0x12a32f=_0x37935e['getChild'](0x0);if(!_0x12a32f||!_0x12a32f['is']('element','a'))return null;const _0x451f58=_0x12a32f['getAttribute']('href')||'';if(!_0x451f58['startsWith']('#'))return null;const _0xc67cfa=_0x451f58['replace'](/^#/,'');if(!_0xc67cfa)return null;_0xd5d962['consume'](_0x12a32f,{'name':!0x0,'attributes':['href']});for(const {item:_0x3bb418}of _0x5a400c['view']['createRangeIn'](_0x12a32f))_0x3bb418['is']('$textProxy')?_0xd5d962['consume'](_0x3bb418['textNode'],{'name':!0x0}):_0x3bb418['is']('element')&&_0xd5d962['consume'](_0x3bb418,{'name':!0x0});return _0x4d9e95['createElement']('footnoteRef',{'footnoteId':_0xc67cfa});}}),_0x4aac3f['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x37bdc9,{writer:_0x3d2ed5})=>D(_0x37bdc9,_0x3d2ed5)}),_0x4aac3f['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x3284ec,{writer:_0x477c46})=>{const _0x297471=_0x3284ec['getAttribute']('footnoteCounter');return _0x5ca5e4(D(_0x3284ec,_0x477c46),_0x477c46,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x297471)});}});}['_defineDefinitionsConverters'](){const {editor:_0x571654}=this,{t:t}=_0x571654['locale'],{conversion:_0x1d4f36}=_0x571654;_0x1d4f36['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x1d4f36['for']('upcast')['add'](_0x21cea5=>{_0x21cea5['on']('element:ol',(_0x2250a4,_0x4dc4f1,_0x3b7805)=>{const _0x3f6c8e=_0x4dc4f1['viewItem'];if(!_0x3f6c8e['hasClass']('footnotes-list')||!_0x4dc4f1['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x3b7805['consumable']['consume'](_0x3f6c8e,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x36a311,modelCursor:_0xf2f5e6}=_0x3b7805['convertChildren'](_0x4dc4f1['viewItem'],_0x4dc4f1['modelCursor']);_0x4dc4f1['modelRange']=_0x36a311,_0x4dc4f1['modelCursor']=_0xf2f5e6;}),_0x21cea5['on']('element:hr',(_0x1151d0,_0x417eab,_0x5f2277)=>{const _0x4b07a0=_0x417eab['viewItem'];_0x4b07a0['hasClass']('footnotes-divider')&&_0x417eab['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x5f2277['consumable']['consume'](_0x4b07a0,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x1d4f36['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x2d8cfa,{writer:_0x378de0})=>g(_0x378de0)}),_0x1d4f36['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x516785,{writer:_0x480d2a})=>{const _0x52e08d=g(_0x480d2a,{'data-footnotes-list-label':t('Footnotes')}),_0x6071af=_0x5ca5e4(_0x52e08d,_0x480d2a,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x480d2a['setCustomProperty']('footnotesDefinitions',!0x0,_0x6071af),_0x6071af;}});}['_defineDefinitionConverters'](){const {editor:_0x965780}=this,{conversion:_0x1be541,locale:_0x3238a3}=_0x965780,_0x3c69cc=_0x965780['config']['get']('footnotes.multiBlock');_0x1be541['for']('upcast')['add'](_0x4f1bdf=>{_0x4f1bdf['on']('element:li',(_0x2ea0a5,_0x44ec41,_0x13783b)=>{const _0x9d808d=_0x44ec41['viewItem'];if(!_0x9d808d['hasClass']('footnote-definition')||!_0x9d808d['getAttribute']('id'))return;const _0x29f543=_0x9d808d['parent'];if(!_0x29f543['is']('element','ol')||!_0x29f543['hasClass']('footnotes-list'))return;if(!_0x13783b['consumable']['test'](_0x9d808d,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x34f7ed=_0x13783b['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x9d808d['getAttribute']('id')});if(!_0x13783b['safeInsert'](_0x34f7ed,_0x44ec41['modelCursor']))return;_0x13783b['consumable']['consume'](_0x9d808d,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x17a670=Array['from'](_0x9d808d['getChildren']())['find'](_0x49536c=>_0x49536c['is']('element')&&_0x49536c['hasClass']('footnote-content'));for(const _0x2e7ed5 of _0x9d808d['getChildren']())_0x2e7ed5['is']('element')&&(_0x13783b['consumable']['consume'](_0x2e7ed5,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x13783b['consumable']['consume'](_0x2e7ed5,{'name':!0x0,'classes':'footnote-content'}));if(_0x17a670){if(_0x3c69cc)_0x13783b['convertChildren'](_0x17a670,_0x34f7ed);else{const _0x15b2ef=_0x13783b['writer']['createElement']('footnoteInlineContent');_0x13783b['writer']['insert'](_0x15b2ef,_0x34f7ed),_0x13783b['convertChildren'](_0x17a670,_0x15b2ef);}}_0x13783b['updateConversionResult'](_0x34f7ed,_0x44ec41);});}),_0x1be541['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x57b68f,{writer:_0x56012f})=>v(_0x57b68f,_0x56012f,_0x3238a3,{'dataPipeline':!0x0})}),_0x1be541['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x310cb4,{writer:_0x38f30f})=>v(_0x310cb4,_0x38f30f,_0x3238a3)});}['_defineBogusParagraphConverters'](){const {editor:_0x5bfee8}=this,{conversion:_0x1247e9}=_0x5bfee8;_0x5bfee8['config']['get']('footnotes.multiBlock')?(_0x1247e9['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x1247e9['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x5bfee8['model']['document'],'change:data',()=>{!function(_0x5c14a0,_0x35c0f7){const _0x340bde=_0x5c14a0['document']['differ'],_0x5645a9=new Set();for(const _0x1fbaf5 of _0x340bde['getChanges']()){const _0x52f1a5='attribute'==_0x1fbaf5['type']?_0x1fbaf5['range']['start']['parent']:_0x1fbaf5['position']['parent'];_0x52f1a5['is']('element','footnoteDefinition')&&_0x5645a9['add'](_0x52f1a5);}for(const _0x273782 of _0x5645a9['values']()){const _0x2f6d4b=Array['from'](_0x273782['getChildren']())['filter'](_0x4f700c=>p(_0x4f700c,_0x35c0f7['mapper']));for(const _0x2d9820 of _0x2f6d4b)_0x35c0f7['reconvertItem'](_0x2d9820);}}(_0x5bfee8['model'],_0x5bfee8['editing']);})):(_0x1247e9['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x1247e9['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x207be0,{writer:_0x136f62})=>{const _0x167c01=_0x136f62['createContainerElement']('span');return _0x136f62['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x167c01),_0x167c01;}}));}['_defineKeyboardHandlers'](){const {editor:_0x43f87a}=this,{editing:_0x38ea28,t:t}=_0x43f87a,_0x12345f=_0x43f87a['model']['document']['selection'];_0x43f87a['keystrokes']['set']('CTRL+Shift+D','insertFootnote'),_0x43f87a['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Shift+D'}]}),this['listenTo'](_0x38ea28['view']['document'],'enter',(_0x48732a,_0x5ad9e8)=>{const _0x2e726d=function(_0x545ae8){const _0x4a0ea4=_0x545ae8['getSelectedElement']();if(_0x4a0ea4?.['is']('element','footnoteRef'))return _0x4a0ea4;return null;}(_0x12345f);if(_0x2e726d){const _0x5882e6=_0x2e726d['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x5882e6),_0x5ad9e8['preventDefault'](),_0x48732a['stop']();}},{'context':_0xc7766d});}['_defineClickHandlers'](){const {editor:_0x45f3b8}=this,{editing:_0x3716f3}=_0x45f3b8;_0x45f3b8['editing']['view']['addObserver'](_0x1331f7),_0x45f3b8['editing']['view']['addObserver'](_0x1e09de);let _0x1ae95f=!0x1;this['listenTo'](_0x3716f3['view']['document'],'pointerdown',(_0x111467,_0x543dca)=>{const {target:_0x5ed8de}=_0x543dca,_0xca0b5e=_0x3716f3['view']['document']['selection'];_0x1ae95f=!!(_0x5ed8de['is']('element','a')&&_0x5ed8de['parent']?.['is']('element','sup')&&_0x5ed8de['parent']['hasClass']('footnote'))&&_0xca0b5e['getSelectedElement']()===_0x5ed8de['parent'];},{'priority':'high'}),this['listenTo'](_0x3716f3['view']['document'],'click',(_0x52eb98,_0x88a4e5)=>{const {target:_0x11a687}=_0x88a4e5;if(!_0x11a687['is']('element','a'))return;if(_0x11a687['parent']?.['is']('element','sup')&&_0x11a687['parent']['hasClass']('footnote')&&!_0x1ae95f)return void _0x88a4e5['preventDefault']();let _0x2d2e6e=_0x11a687['getAttribute']('href');if(!_0x2d2e6e?.['startsWith']('#'))return;_0x2d2e6e=_0x2d2e6e['slice'](0x1);let _0x2c3662=!0x1;(_0x2d2e6e['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x2d2e6e['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x2d2e6e))&&(_0x2c3662=!0x0),_0x2c3662&&(_0x88a4e5['preventDefault'](),_0x52eb98['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0xaf0e7b}={}){return(_0x2b67a0,{writer:_0x2b91ce})=>{if(!h(_0x2b67a0))return null;if(!_0xaf0e7b)return _0x2b91ce['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x4547bd=_0x2b91ce['createContainerElement']('p');return _0x2b91ce['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x4547bd),_0x4547bd;};}function h(_0x77db1d){const {parent:_0x3d28e2}=_0x77db1d;if(!_0x3d28e2?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x3d28e2['childCount'])return!0x1;for(const _0x583949 of _0x77db1d['getAttributeKeys']())if(!_0x583949['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x583949)return!0x1;return!0x0;}function p(_0x2bb19d,_0x4f0692){if(!_0x2bb19d['is']('element','paragraph'))return!0x1;const _0x5a7d83=_0x4f0692['toViewElement'](_0x2bb19d);return!!_0x5a7d83&&h(_0x2bb19d)!==_0x5a7d83['is']('element','span');}export function isFootnotesDefinitionsWidget(_0x4e0bfa){return _0xc7766d(_0x4e0bfa)&&_0x4e0bfa['is']('containerElement')&&!!_0x4e0bfa['getCustomProperty']('footnotesDefinitions');}function g(_0x4f0d5c,_0x242efb={}){const _0x4df2bf=_0x4f0d5c['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x20ed2c=_0x4f0d5c['createContainerElement']('ol',{'class':'footnotes-list'},_0x4f0d5c['createSlot']());return _0x4f0d5c['createContainerElement']('div',{'class':'footnotes',..._0x242efb},[_0x4df2bf,_0x20ed2c]);}function D(_0x585f83,_0x2e6f3e){const _0x5a1637=_0x585f83['getAttribute']('footnoteId'),_0x56b847=_0x585f83['getAttribute']('footnoteCounter'),_0x367d04=_0x2e6f3e['createUIElement']('a',{'href':'#'+_0x5a1637},function(_0x10f11b){const _0x1d7520=this['toDomElement'](_0x10f11b);return _0x1d7520['textContent']=_0x56b847,_0x1d7520;}),_0x6060d=_0x2e6f3e['createContainerElement']('sup',{'id':'ref-'+_0x5a1637,'class':'footnote'},[_0x367d04]);return _0x6060d['getFillerOffset']=()=>null,_0x6060d;}function v(_0x53d7ae,_0x7d0c2b,_0x3a8bea,{dataPipeline:_0xac2a75}={}){const {t:t}=_0x3a8bea,_0x41d556=_0x53d7ae['getAttribute']('footnoteId'),_0x1a7d3c=_0x7d0c2b['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x41d556},function(_0x210f9c){const _0x334384=this['toDomElement'](_0x210f9c);return _0x334384['innerText']='^',_0x334384;}),_0x5e8325=_0xac2a75?_0x7d0c2b['createContainerElement']('div',{'class':'footnote-content'}):_0x4477f0(_0x7d0c2b['createEditableElement']('div',{'class':'footnote-content'}),_0x7d0c2b,{'label':t('Footnote\x20content.')});return _0x7d0c2b['insert'](_0x7d0c2b['createPositionAt'](_0x5e8325,0x0),_0x7d0c2b['createSlot']()),_0x7d0c2b['createContainerElement']('li',{'class':'footnote-definition','id':_0x41d556},[_0x1a7d3c,_0x5e8325]);}
|
|
23
|
+
import{Plugin as _0x49144f}from'ckeditor5/src/core.js';import{isWidget as _0x3fc890,toWidget as _0x447858,toWidgetEditable as _0xda159d}from'ckeditor5/src/widget.js';import{uid as _0x6cf6cd}from'ckeditor5/src/utils.js';import{PointerObserver as _0x31acea,ClickObserver as _0x30c75b}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x54b58e}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x47ac3d}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x49144f{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x54b58e];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x52d757}=this;_0x52d757['config']['define']('footnotes.multiBlock',!0x0),_0x52d757['commands']['add']('insertFootnote',new _0x47ac3d(_0x52d757)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0xe5b472){const _0x4780bf=_0x651592([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]),_0x3f60c0=0x47a28506,_0x3f0296=0x47a5f2ae^_0x3f60c0,_0xc344fe=window[_0x651592([0x44,0x61,0x74,0x65])][_0x651592([0x6e,0x6f,0x77])](),_0x362529=_0xe5b472[_0x651592([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x522e66=new window[(_0x651592([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36fe57=>{_0x362529[_0x651592([0x6f,0x6e,0x63,0x65])](_0x651592([0x72,0x65,0x61,0x64,0x79]),_0x36fe57);}),_0xb2e39={[_0x651592([0x6b,0x74,0x79])]:_0x651592([0x45,0x43]),[_0x651592([0x75,0x73,0x65])]:_0x651592([0x73,0x69,0x67]),[_0x651592([0x63,0x72,0x76])]:_0x651592([0x50,0x2d,0x32,0x35,0x36]),[_0x651592([0x78])]:_0x651592([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]),[_0x651592([0x79])]:_0x651592([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]),[_0x651592([0x61,0x6c,0x67])]:_0x651592([0x45,0x53,0x32,0x35,0x36])},_0x1eb046=_0x362529[_0x651592([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x651592([0x67,0x65,0x74])](_0x651592([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x26302e(){let _0x32e485,_0x19f61c=null,_0x20b3af=null;try{if(_0x1eb046==_0x651592([0x47,0x50,0x4c]))return _0x651592([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x32e485=_0x40da75(),!_0x32e485)return _0x651592([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x32e485[_0x651592([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x20b3af=_0x582462(_0x32e485[_0x651592([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x32e485[_0x651592([0x6a,0x74,0x69])])),await _0x2018f4()?_0x110f9c()?_0x2e2cd6()?_0x651592([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x9a641()?(_0x32e485[_0x651592([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x651592([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x19f61c=_0x4d1257(_0x651592([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x32e485[_0x651592([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x651592([0x74,0x72,0x69,0x61,0x6c])&&(_0x19f61c=_0x4d1257(_0x651592([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x308ab0()):_0x651592([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x651592([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x651592([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x651592([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2e2cd6(){const _0x48d7cd=[_0x651592([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x651592([0x74,0x72,0x69,0x61,0x6c])][_0x651592([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32e485[_0x651592([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xc344fe/0x3e8:0xe10*_0x3f0296;return _0x32e485[_0x651592([0x65,0x78,0x70])]<_0x48d7cd;}function _0x110f9c(){const _0x3669bb=_0x32e485[_0x651592([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3669bb&&(!!_0x3669bb[_0x651592([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x651592([0x2a]))||!!_0x3669bb[_0x651592([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x651592([0x46,0x4f,0x4f])));}function _0x9a641(){const _0x2ed22d=_0x32e485[_0x651592([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2ed22d||0x0==_0x2ed22d[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x26df9d}=new URL(window[_0x651592([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2ed22d[_0x651592([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26df9d))return!0x0;const _0x56f427=_0x26df9d[_0x651592([0x73,0x70,0x6c,0x69,0x74])](_0x651592([0x2e]));return _0x2ed22d[_0x651592([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x527df9=>_0x527df9[_0x651592([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x651592([0x2a])))[_0x651592([0x6d,0x61,0x70])](_0x26d273=>_0x26d273[_0x651592([0x73,0x70,0x6c,0x69,0x74])](_0x651592([0x2e])))[_0x651592([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf13ead=>_0xf13ead[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x56f427[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x651592([0x6d,0x61,0x70])](_0x5c5b53=>Array(_0x56f427[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5c5b53[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x651592([0x66,0x69,0x6c,0x6c])](_0x5c5b53[0x0]===_0x651592([0x2a])?_0x651592([0x2a]):'')[_0x651592([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5c5b53))[_0x651592([0x73,0x6f,0x6d,0x65])](_0x1bd62a=>_0x56f427[_0x651592([0x65,0x76,0x65,0x72,0x79])]((_0xb9705c,_0x3b524e)=>_0x1bd62a[_0x3b524e]===_0xb9705c||_0x1bd62a[_0x3b524e]===_0x651592([0x2a])));}function _0x308ab0(){return _0x19f61c&&_0x20b3af?new window[(_0x651592([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x583b12,_0x4c573f)=>{_0x19f61c[_0x651592([0x74,0x68,0x65,0x6e])](_0x583b12,_0x4c573f),_0x20b3af[_0x651592([0x74,0x68,0x65,0x6e])](_0x14f6f5=>{_0x14f6f5!=_0x651592([0x56,0x61,0x6c,0x69,0x64])&&_0x583b12(_0x14f6f5);},_0x4c573f);}):_0x19f61c||_0x20b3af||_0x651592([0x56,0x61,0x6c,0x69,0x64]);}}function _0x582462(_0x2e9f7d,_0x2ea032){return new window[(_0x651592([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xbe3a43=>{if(_0x5c24c8())return _0xbe3a43(_0x651592([0x56,0x61,0x6c,0x69,0x64]));_0x3e5dc1(),_0x362529[_0x651592([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x651592([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x51aa06=!0x1;const _0x860f9b=_0x6cf6cd();function _0x2dc729(_0x1ea8ef){return!!_0x1ea8ef&&(typeof _0x1ea8ef===_0x651592([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1ea8ef===_0x651592([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1ea8ef[_0x651592([0x74,0x68,0x65,0x6e])]===_0x651592([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1ea8ef[_0x651592([0x63,0x61,0x74,0x63,0x68])]===_0x651592([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x44b685(_0x37fae6){_0x5b330c(_0x37fae6)[_0x651592([0x74,0x68,0x65,0x6e])](_0x14a454=>{if(!_0x14a454||_0x14a454[_0x651592([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x651592([0x6f,0x6b]))return _0x651592([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x6b26f4(_0x41a112(_0x860f9b+_0x2ea032))!=_0x14a454[_0x651592([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x651592([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x651592([0x56,0x61,0x6c,0x69,0x64]);})[_0x651592([0x74,0x68,0x65,0x6e])](_0x5a06c5=>(_0x430149(),_0x5a06c5),()=>{const _0x352ed8=_0x4e3b6b();return null==_0x352ed8?(_0x430149(),_0x651592([0x56,0x61,0x6c,0x69,0x64])):_0x651592(_0xc344fe-_0x352ed8>(0x63ae0106^_0x3f60c0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x651592([0x74,0x68,0x65,0x6e])](_0xbe3a43)[_0x651592([0x63,0x61,0x74,0x63,0x68])](()=>{_0xbe3a43(_0x651592([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x359d3a=0x47946b86^_0x3f60c0;function _0x430149(){const _0x207592=_0x651592([0x6c,0x6c,0x63,0x74,0x2d])+_0x6b26f4(_0x41a112(_0x2e9f7d)),_0xb5bb64=_0x4da66a(_0x6b26f4(window[_0x651592([0x4d,0x61,0x74,0x68])][_0x651592([0x63,0x65,0x69,0x6c])](_0xc344fe/_0x359d3a)));window[_0x651592([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x651592([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x207592,_0xb5bb64);}function _0x4e3b6b(){const _0x48c57b=_0x651592([0x6c,0x6c,0x63,0x74,0x2d])+_0x6b26f4(_0x41a112(_0x2e9f7d)),_0xa893dc=window[_0x651592([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x651592([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x48c57b);return _0xa893dc?window[_0x651592([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4da66a(_0xa893dc),0x10)*_0x359d3a:null;}function _0x5b330c(_0x529aee){return new window[(_0x651592([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5d3d2a,_0x5edc15)=>{_0x529aee[_0x651592([0x74,0x68,0x65,0x6e])](_0x5d3d2a,_0x5edc15),window[_0x651592([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5edc15,0x47a351c6^_0x3f60c0);});}}_0x362529[_0x651592([0x6f,0x6e])](_0x651592([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5b715e,_0x52096c)=>{if(_0x52096c[0x0]!=_0x2e9f7d)return _0xbe3a43(_0x651592([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x52096c[0x1]={..._0x52096c[0x1],[_0x651592([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x860f9b};},{[_0x651592([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x651592([0x68,0x69,0x67,0x68])}),_0x362529[_0x651592([0x6f,0x6e])](_0x651592([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4fad21=>{_0x2dc729(_0x4fad21[_0x651592([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x51aa06=!0x0,_0x44b685(_0x4fad21[_0x651592([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x651592([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x651592([0x6c,0x6f,0x77])}),_0x522e66[_0x651592([0x74,0x68,0x65,0x6e])](()=>{_0x51aa06||_0xbe3a43(_0x651592([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5c24c8(){return _0x362529[_0x651592([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x651592([0x76,0x69,0x65,0x77])][_0x651592([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x651592([0x61,0x75,0x74,0x6f]);}function _0x3e5dc1(){_0x362529[_0x651592([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x651592([0x76,0x69,0x65,0x77])][_0x651592([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x651592([0x61,0x75,0x74,0x6f]);}}function _0x4d1257(_0x2c4dad){const _0x4d84c0=[new window[(_0x651592([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d568b=>setTimeout(_0x4d568b,0x47abbbca^_0x3f60c0)),_0x522e66[_0x651592([0x74,0x68,0x65,0x6e])](()=>new window[(_0x651592([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x44b310=>{let _0xbba5e4=0x0;_0x362529[_0x651592([0x6d,0x6f,0x64,0x65,0x6c])][_0x651592([0x6f,0x6e])](_0x651592([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x409ebf,_0x421468)=>{_0x421468[0x0][_0x651592([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xbba5e4++,_0xbba5e4==(0x47a284fe^_0x3f60c0)&&(_0x44b310(),_0x409ebf[_0x651592([0x6f,0x66,0x66])]());});}))];return window[_0x651592([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x651592([0x72,0x61,0x63,0x65])](_0x4d84c0)[_0x651592([0x74,0x68,0x65,0x6e])](()=>_0x2c4dad);}async function _0x3eeb6c(){await _0x522e66,_0x362529[_0x651592([0x6d,0x6f,0x64,0x65,0x6c])][_0x651592([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3aa87a,_0x362529[_0x651592([0x6d,0x6f,0x64,0x65,0x6c])][_0x651592([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3aa87a,_0x362529[_0x651592([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x651592([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2f39dc(_0x11c028){const _0x39b13f=_0x39ef85();_0x362529[_0x39b13f]=_0x651592([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x11c028,_0x11c028!=_0x651592([0x56,0x61,0x6c,0x69,0x64])&&_0x3eeb6c();}function _0x39ef85(){const _0x202f4c=window[_0x651592([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x651592([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x651592([0x6e,0x6f,0x77])]())[_0x651592([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x651592([0x2e]),'');let _0x2ee044=_0x651592([0x75]);for(let _0x290fc4=0x0;_0x290fc4<_0x202f4c[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x290fc4+=0x2){let _0x2063c4=window[_0x651592([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x202f4c[_0x651592([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x290fc4,_0x290fc4+0x2));_0x2063c4>=_0x4780bf[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2063c4-=_0x4780bf[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2ee044+=_0x4780bf[_0x2063c4];}return _0x2ee044;}function _0x40da75(){const _0x20b008=_0x1eb046[_0x651592([0x73,0x70,0x6c,0x69,0x74])](_0x651592([0x2e]));if(0x3!=_0x20b008[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1a50c5(_0x20b008[0x1]);function _0x1a50c5(_0x5dce1c){const _0x56a67d=_0x106f4b(_0x5dce1c);return _0x56a67d&&_0xad78b8()?_0x56a67d:null;function _0xad78b8(){const _0x125150=_0x56a67d[_0x651592([0x6a,0x74,0x69])],_0x336b61=window[_0x651592([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x125150[_0x651592([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x125150[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x18a687={..._0x56a67d,[_0x651592([0x6a,0x74,0x69])]:_0x125150[_0x651592([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x125150[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x18a687[_0x651592([0x76,0x63])],_0x41a112(_0x18a687)==_0x336b61;}}}async function _0x2018f4(){let _0x1af940=!0x0;try{const _0x5abae5=_0x1eb046[_0x651592([0x73,0x70,0x6c,0x69,0x74])](_0x651592([0x2e])),[_0x39815a,_0x5a2c42,_0x4a4996]=_0x5abae5;return _0x347cbf(_0x39815a),await _0x429a68(_0x39815a,_0x5a2c42,_0x4a4996),_0x1af940;}catch{return!0x1;}function _0x347cbf(_0x4a94c5){const _0x58dab1=_0x106f4b(_0x4a94c5);_0x58dab1&&_0x58dab1[_0x651592([0x61,0x6c,0x67])]==_0x651592([0x45,0x53,0x32,0x35,0x36])||(_0x1af940=!0x1);}async function _0x429a68(_0x374b13,_0x4b4e27,_0x30d64b){const _0x20c333=window[_0x651592([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x651592([0x66,0x72,0x6f,0x6d])](_0x136dab(_0x30d64b),_0xf9131a=>_0xf9131a[_0x651592([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x22182a=new window[(_0x651592([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x651592([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x374b13+_0x651592([0x2e])+_0x4b4e27),_0xe890d=window[_0x651592([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x651592([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xe890d)return;const _0x47c81d=await _0xe890d[_0x651592([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x651592([0x6a,0x77,0x6b]),_0xb2e39,{[_0x651592([0x6e,0x61,0x6d,0x65])]:_0x651592([0x45,0x43,0x44,0x53,0x41]),[_0x651592([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x651592([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x651592([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xe890d[_0x651592([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x651592([0x6e,0x61,0x6d,0x65])]:_0x651592([0x45,0x43,0x44,0x53,0x41]),[_0x651592([0x68,0x61,0x73,0x68])]:{[_0x651592([0x6e,0x61,0x6d,0x65])]:_0x651592([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x47c81d,_0x20c333,_0x22182a)||(_0x1af940=!0x1);}}function _0x106f4b(_0x270e91){return _0x270e91[_0x651592([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x651592([0x65,0x79]))?JSON[_0x651592([0x70,0x61,0x72,0x73,0x65])](_0x136dab(_0x270e91)):null;}function _0x136dab(_0x5ea403){return window[_0x651592([0x61,0x74,0x6f,0x62])](_0x5ea403[_0x651592([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x651592([0x2b]))[_0x651592([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x651592([0x2f])));}function _0x41a112(_0x10be6d){let _0x411d5d=0x1505;function _0x37dd8d(_0x383e63){for(let _0x205a10=0x0;_0x205a10<_0x383e63[_0x651592([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x205a10++){const _0x1b322f=_0x383e63[_0x651592([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x205a10);_0x411d5d=(_0x411d5d<<0x5)+_0x411d5d+_0x1b322f,_0x411d5d&=_0x411d5d;}}function _0x2a29c0(_0x2ba35e){Array[_0x651592([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2ba35e)?_0x2ba35e[_0x651592([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2a29c0):_0x2ba35e&&typeof _0x2ba35e==_0x651592([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x651592([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2ba35e)[_0x651592([0x73,0x6f,0x72,0x74])]()[_0x651592([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x45153a,_0x3a5e92])=>{_0x37dd8d(_0x45153a),_0x2a29c0(_0x3a5e92);}):_0x37dd8d(window[_0x651592([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2ba35e));}return _0x2a29c0(_0x10be6d),_0x411d5d>>>0x0;}function _0x6b26f4(_0x2eec12){return _0x2eec12[_0x651592([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x651592([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x651592([0x30]));}function _0x4da66a(_0x1e8870){return _0x1e8870[_0x651592([0x73,0x70,0x6c,0x69,0x74])]('')[_0x651592([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x651592([0x6a,0x6f,0x69,0x6e])]('');}function _0x3aa87a(){}function _0x651592(_0x19b6c1){return _0x19b6c1['map'](_0x5830b9=>String['fromCharCode'](_0x5830b9))['join']('');}_0x2f39dc(await _0x26302e());}(this);}['_moveSelectionToFootnoteDefinition'](_0x1fb3d1){const {plugins:_0x95a511,editing:_0x572d47,model:_0x2742dc}=this['editor'],_0x24279c=_0x95a511['get'](_0x54b58e)['getFootnote'](_0x1fb3d1);return!!_0x24279c&&(_0x2742dc['change'](_0x2afcc3=>{_0x2afcc3['setSelection'](_0x2afcc3['createPositionAt'](_0x24279c['definition'],'end'));}),_0x572d47['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x1dc78d){const {plugins:_0x309183,editing:_0x681a24,model:_0x3e592f}=this['editor'],_0x158cdb=_0x309183['get'](_0x54b58e)['getFootnote'](_0x1dc78d);return!!_0x158cdb&&(_0x3e592f['change'](_0x25c59b=>{_0x25c59b['setSelection'](_0x158cdb['reference'],'on');}),_0x681a24['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x59ec30}=this['editor']['model'],_0x9a4dd8=this['editor']['config']['get']('footnotes.multiBlock');_0x59ec30['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x59ec30['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x59ec30['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x9a4dd8?_0x59ec30['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x59ec30['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x59ec30['addChildCheck'](_0x4d8e1b=>{for(const _0x155bee of _0x4d8e1b)if('footnoteDefinition'===_0x155bee['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x58aa7f}=this,{conversion:_0x54ede0,editing:_0x2a2575}=_0x58aa7f,{t:t}=_0x58aa7f['locale'];_0x54ede0['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x4bc079,{writer:_0xb2010d,consumable:_0x442fee})=>{const _0x31bc04=_0x4bc079['getChild'](0x0);if(!_0x31bc04||!_0x31bc04['is']('element','a'))return null;const _0x36eefa=_0x31bc04['getAttribute']('href')||'';if(!_0x36eefa['startsWith']('#'))return null;const _0x1d1f04=_0x36eefa['replace'](/^#/,'');if(!_0x1d1f04)return null;_0x442fee['consume'](_0x31bc04,{'name':!0x0,'attributes':['href']});for(const {item:_0x587bdc}of _0x2a2575['view']['createRangeIn'](_0x31bc04))_0x587bdc['is']('$textProxy')?_0x442fee['consume'](_0x587bdc['textNode'],{'name':!0x0}):_0x587bdc['is']('element')&&_0x442fee['consume'](_0x587bdc,{'name':!0x0});return _0xb2010d['createElement']('footnoteRef',{'footnoteId':_0x1d1f04});}}),_0x54ede0['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x582290,{writer:_0x25cfcd})=>D(_0x582290,_0x25cfcd)}),_0x54ede0['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x2e8677,{writer:_0x205dcd})=>{const _0x2eeb4d=_0x2e8677['getAttribute']('footnoteCounter');return _0x447858(D(_0x2e8677,_0x205dcd),_0x205dcd,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x2eeb4d)});}});}['_defineDefinitionsConverters'](){const {editor:_0x400079}=this,{t:t}=_0x400079['locale'],{conversion:_0x5641bd}=_0x400079;_0x5641bd['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x5641bd['for']('upcast')['add'](_0x1f0eec=>{_0x1f0eec['on']('element:ol',(_0x6bfa2a,_0x20a772,_0x527725)=>{const _0x1f6928=_0x20a772['viewItem'];if(!_0x1f6928['hasClass']('footnotes-list')||!_0x20a772['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x527725['consumable']['consume'](_0x1f6928,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x6e9ae7,modelCursor:_0x2fdd01}=_0x527725['convertChildren'](_0x20a772['viewItem'],_0x20a772['modelCursor']);_0x20a772['modelRange']=_0x6e9ae7,_0x20a772['modelCursor']=_0x2fdd01;}),_0x1f0eec['on']('element:hr',(_0x58120b,_0x427136,_0x3443fc)=>{const _0x77cd81=_0x427136['viewItem'];_0x77cd81['hasClass']('footnotes-divider')&&_0x427136['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x3443fc['consumable']['consume'](_0x77cd81,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x5641bd['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x659a6,{writer:_0x24c7a6})=>g(_0x24c7a6)}),_0x5641bd['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x28b09b,{writer:_0x54d4bd})=>{const _0x5ea57f=g(_0x54d4bd,{'data-footnotes-list-label':t('Footnotes')}),_0x48f793=_0x447858(_0x5ea57f,_0x54d4bd,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x54d4bd['setCustomProperty']('footnotesDefinitions',!0x0,_0x48f793),_0x48f793;}});}['_defineDefinitionConverters'](){const {editor:_0x34c716}=this,{conversion:_0x5a28d1,locale:_0x4da150}=_0x34c716,_0x156717=_0x34c716['config']['get']('footnotes.multiBlock');_0x5a28d1['for']('upcast')['add'](_0x202966=>{_0x202966['on']('element:li',(_0x34cafc,_0x3d9db6,_0x3948ae)=>{const _0x4dce67=_0x3d9db6['viewItem'];if(!_0x4dce67['hasClass']('footnote-definition')||!_0x4dce67['getAttribute']('id'))return;const _0x635404=_0x4dce67['parent'];if(!_0x635404['is']('element','ol')||!_0x635404['hasClass']('footnotes-list'))return;if(!_0x3948ae['consumable']['test'](_0x4dce67,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x4decdc=_0x3948ae['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x4dce67['getAttribute']('id')});if(!_0x3948ae['safeInsert'](_0x4decdc,_0x3d9db6['modelCursor']))return;_0x3948ae['consumable']['consume'](_0x4dce67,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x3422cd=Array['from'](_0x4dce67['getChildren']())['find'](_0x43231a=>_0x43231a['is']('element')&&_0x43231a['hasClass']('footnote-content'));for(const _0x3d5368 of _0x4dce67['getChildren']())_0x3d5368['is']('element')&&(_0x3948ae['consumable']['consume'](_0x3d5368,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x3948ae['consumable']['consume'](_0x3d5368,{'name':!0x0,'classes':'footnote-content'}));if(_0x3422cd){if(_0x156717)_0x3948ae['convertChildren'](_0x3422cd,_0x4decdc);else{const _0x366500=_0x3948ae['writer']['createElement']('footnoteInlineContent');_0x3948ae['writer']['insert'](_0x366500,_0x4decdc),_0x3948ae['convertChildren'](_0x3422cd,_0x366500);}}_0x3948ae['updateConversionResult'](_0x4decdc,_0x3d9db6);});}),_0x5a28d1['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x480d15,{writer:_0x4b178d})=>v(_0x480d15,_0x4b178d,_0x4da150,{'dataPipeline':!0x0})}),_0x5a28d1['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x561e40,{writer:_0x19f613})=>v(_0x561e40,_0x19f613,_0x4da150)});}['_defineBogusParagraphConverters'](){const {editor:_0x5c20f5}=this,{conversion:_0x2ba6c7}=_0x5c20f5;_0x5c20f5['config']['get']('footnotes.multiBlock')?(_0x2ba6c7['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x2ba6c7['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x5c20f5['model']['document'],'change:data',()=>{!function(_0x1c152d,_0x466080){const _0x337e35=_0x1c152d['document']['differ'],_0x1fa920=new Set();for(const _0x4e0b32 of _0x337e35['getChanges']()){const _0x1e65dc='attribute'==_0x4e0b32['type']?_0x4e0b32['range']['start']['parent']:_0x4e0b32['position']['parent'];_0x1e65dc['is']('element','footnoteDefinition')&&_0x1fa920['add'](_0x1e65dc);}for(const _0x10ab4a of _0x1fa920['values']()){const _0x51bff6=Array['from'](_0x10ab4a['getChildren']())['filter'](_0x2c1528=>p(_0x2c1528,_0x466080['mapper']));for(const _0xe73831 of _0x51bff6)_0x466080['reconvertItem'](_0xe73831);}}(_0x5c20f5['model'],_0x5c20f5['editing']);})):(_0x2ba6c7['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x2ba6c7['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0xc0d7d9,{writer:_0x1bedf5})=>{const _0x36a7a2=_0x1bedf5['createContainerElement']('span');return _0x1bedf5['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x36a7a2),_0x36a7a2;}}));}['_defineKeyboardHandlers'](){const {editor:_0x2600fe}=this,{editing:_0x59bc32,t:t}=_0x2600fe,_0x4be8e0=_0x2600fe['model']['document']['selection'];_0x2600fe['keystrokes']['set']('CTRL+Shift+D','insertFootnote'),_0x2600fe['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Shift+D'}]}),this['listenTo'](_0x59bc32['view']['document'],'enter',(_0x112eac,_0x4239aa)=>{const _0x3bed5a=function(_0x53c912){const _0xa376eb=_0x53c912['getSelectedElement']();if(_0xa376eb?.['is']('element','footnoteRef'))return _0xa376eb;return null;}(_0x4be8e0);if(_0x3bed5a){const _0x18ab40=_0x3bed5a['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x18ab40),_0x4239aa['preventDefault'](),_0x112eac['stop']();}},{'context':_0x3fc890});}['_defineClickHandlers'](){const {editor:_0x64fa59}=this,{editing:_0x2d4c21}=_0x64fa59;_0x64fa59['editing']['view']['addObserver'](_0x31acea),_0x64fa59['editing']['view']['addObserver'](_0x30c75b);let _0x9c7498=!0x1;this['listenTo'](_0x2d4c21['view']['document'],'pointerdown',(_0x4f7d95,_0x15cc65)=>{const {target:_0x4bb68f}=_0x15cc65,_0x14b520=_0x2d4c21['view']['document']['selection'];_0x9c7498=!!(_0x4bb68f['is']('element','a')&&_0x4bb68f['parent']?.['is']('element','sup')&&_0x4bb68f['parent']['hasClass']('footnote'))&&_0x14b520['getSelectedElement']()===_0x4bb68f['parent'];},{'priority':'high'}),this['listenTo'](_0x2d4c21['view']['document'],'click',(_0x7b5506,_0x353c8c)=>{const {target:_0x43b35b}=_0x353c8c;if(!_0x43b35b['is']('element','a'))return;if(_0x43b35b['parent']?.['is']('element','sup')&&_0x43b35b['parent']['hasClass']('footnote')&&!_0x9c7498)return void _0x353c8c['preventDefault']();let _0x2367bf=_0x43b35b['getAttribute']('href');if(!_0x2367bf?.['startsWith']('#'))return;_0x2367bf=_0x2367bf['slice'](0x1);let _0x36f7e3=!0x1;(_0x2367bf['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x2367bf['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x2367bf))&&(_0x36f7e3=!0x0),_0x36f7e3&&(_0x353c8c['preventDefault'](),_0x7b5506['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x21a44f}={}){return(_0x5da225,{writer:_0x59381f})=>{if(!h(_0x5da225))return null;if(!_0x21a44f)return _0x59381f['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x1e986c=_0x59381f['createContainerElement']('p');return _0x59381f['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x1e986c),_0x1e986c;};}function h(_0x20f9f4){const {parent:_0x178173}=_0x20f9f4;if(!_0x178173?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x178173['childCount'])return!0x1;for(const _0x6babb4 of _0x20f9f4['getAttributeKeys']())if(!_0x6babb4['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x6babb4)return!0x1;return!0x0;}function p(_0x4500b6,_0x22d712){if(!_0x4500b6['is']('element','paragraph'))return!0x1;const _0x4f8327=_0x22d712['toViewElement'](_0x4500b6);return!!_0x4f8327&&h(_0x4500b6)!==_0x4f8327['is']('element','span');}export function isFootnotesDefinitionsWidget(_0x444bcc){return _0x3fc890(_0x444bcc)&&_0x444bcc['is']('containerElement')&&!!_0x444bcc['getCustomProperty']('footnotesDefinitions');}function g(_0x467390,_0x294f8a={}){const _0x5a6c50=_0x467390['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x3a2026=_0x467390['createContainerElement']('ol',{'class':'footnotes-list'},_0x467390['createSlot']());return _0x467390['createContainerElement']('div',{'class':'footnotes',..._0x294f8a},[_0x5a6c50,_0x3a2026]);}function D(_0x301f2e,_0x2f2054){const _0x32cd48=_0x301f2e['getAttribute']('footnoteId'),_0x2babff=_0x301f2e['getAttribute']('footnoteCounter'),_0x5eea55=_0x2f2054['createUIElement']('a',{'href':'#'+_0x32cd48},function(_0xf0726f){const _0x1a66ee=this['toDomElement'](_0xf0726f);return _0x1a66ee['textContent']=_0x2babff,_0x1a66ee;}),_0x31fafc=_0x2f2054['createContainerElement']('sup',{'id':'ref-'+_0x32cd48,'class':'footnote'},[_0x5eea55]);return _0x31fafc['getFillerOffset']=()=>null,_0x31fafc;}function v(_0x14f747,_0xf41386,_0x339b31,{dataPipeline:_0x2c8718}={}){const {t:t}=_0x339b31,_0x2d04fd=_0x14f747['getAttribute']('footnoteId'),_0x91e89=_0xf41386['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x2d04fd},function(_0x438998){const _0x27e55c=this['toDomElement'](_0x438998);return _0x27e55c['innerText']='^',_0x27e55c;}),_0x32517e=_0x2c8718?_0xf41386['createContainerElement']('div',{'class':'footnote-content'}):_0xda159d(_0xf41386['createEditableElement']('div',{'class':'footnote-content'}),_0xf41386,{'label':t('Footnote\x20content.')});return _0xf41386['insert'](_0xf41386['createPositionAt'](_0x32517e,0x0),_0xf41386['createSlot']()),_0xf41386['createContainerElement']('li',{'class':'footnote-definition','id':_0x2d04fd},[_0x91e89,_0x32517e]);}
|