@ckeditor/ckeditor5-footnotes 47.5.0-alpha.8 → 47.5.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/commands/insertfootnotecommand.js +1 -1
- package/src/footnotesproperties/commands/footnotesstartcommand.js +1 -1
- package/src/footnotesproperties/commands/footnotesstylecommand.js +1 -1
- package/src/footnotesproperties/footnotespropertiesui.js +1 -1
- package/src/footnotesproperties/ui/footnotesdefinitionspropertiesview.js +1 -1
package/build/footnotes.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var t={102:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},237:t=>{"use strict";t.exports=CKEditor5.dll},291:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.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},297:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,i){var s;if(n)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=o(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++,o=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},331:(t,e,o)=>{t.exports=o(237)("./src/clipboard.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},728:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.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.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},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(t,o,n,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)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]);n&&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),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},901:(t,e,o)=>{t.exports=o(237)("./src/widget.js")},929:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=o(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,n);n.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var o=e.domAPI(e);o.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;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var s=n(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=o(s[r]);e[a].references--}for(var c=n(t,i),l=0;l<s.length;l++){var u=o(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Footnotes:()=>tt,FootnotesClipboard:()=>_,FootnotesEditing:()=>I,FootnotesProperties:()=>Tt,FootnotesPropertiesEditing:()=>mt,FootnotesPropertiesUI:()=>Ft,FootnotesStartCommand:()=>ft,FootnotesStyleCommand:()=>ct,FootnotesTracker:()=>p,FootnotesUI:()=>G,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);function r(t,e){const o=c();return(r=function(t,e){return o[t-=328]})(t,e)}const a=r;function c(){const t=["$graveyard","getItems","1133217EKDatj","length","6060780IgosgN","3XmApba","type","reset","74586ZWJhWd","add","insert","getElementKey","delete","653612qLgKpl","276268oGnKZp","15RAefZx","elementName","_model","45oohCQE","_elementName","nodeAfter","has","from","push","rootName","clear","_getElementKey","getChanges","22771524yMRZoq","1600072JJTgVq","$text","attributes","set","name","70ETZTiZ","root","flat","14ZiorMB","get","position","_trackedElements","element","values","slice","createRangeOn","remove"];return(c=function(){return t})()}!function(t){const e=r,o=t();for(;;)try{if(449254===parseInt(e(357))/1*(-parseInt(e(366))/2)+-parseInt(e(367))/3*(-parseInt(e(365))/4)+parseInt(e(370))/5*(parseInt(e(360))/6)+parseInt(e(343))/7*(parseInt(e(335))/8)+parseInt(e(354))/9*(parseInt(e(340))/10)+parseInt(e(356))/11+-parseInt(e(334))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(c);class l{[a(369)];[a(371)];[a(332)];[a(346)]=new Map;constructor(t,e){const o=a;this[o(369)]=t,this[o(371)]=e[o(368)],this[o(332)]=e[o(363)]}[a(359)](){const t=a;this[t(346)][t(331)]()}[a(333)](t){const e=a,o=new Set,n=new Map;for(const i of t){if(e(362)===i[e(358)]&&e(336)!==i[e(339)]&&i[e(345)][e(372)]){const t=this[e(369)][e(350)](i[e(345)][e(372)]);for(const o of t[e(353)]()){if(!o.is(e(347),this[e(371)]))continue;const t=this[e(332)](o);n[e(373)](t)||n[e(338)](t,[]),n[e(344)](t)[e(329)](o)}}if(e(351)===i[e(358)]&&i[e(339)]===this[e(371)]){const t=this[e(332)]({getAttribute:t=>i[e(337)][e(344)](t)});o[e(361)](t)}}for(const[t,n]of this[e(346)])e(352)===n[e(341)][e(330)]&&o[e(361)](t);for(const t of o)this[e(346)][e(364)](t);for(const[t,o]of n)this[e(346)][e(338)](t,o[o[e(355)]-1]);const i=new Set;for(const[t,s]of n)o[e(373)](t)&&(i[e(361)](s[0]),s[e(355)]>1?n[e(338)](t,s[e(349)](1)):n[e(364)](t),o[e(364)](t));return{removed:Array[e(328)](o),inserted:Array[e(328)](n[e(348)]())[e(342)](),moved:Array[e(328)](i)}}}const u=f;function f(t,e){const o=d();return(f=function(t,e){return o[t-=353]})(t,e)}function d(){const t=["before","18yPBtso","createPositionAt","setAttribute","setFootnoteFormatter","low","footnoteCounter","compareWith","createRangeIn","createRangeOn","pluginName","2191pVPfYX","init","_footnoteDefsContainerTracker","_footnotes","high","has","push","rootName","_insertEmptyFootnotesDefinitionsContainer","getFootnotesDefinitionsObjectElement","_handleInsertedFootnoteReference","length","editor","51352yqpoCW","_footnotesDefinitions","some","getFootnote","min","isOfficialPlugin","get","_ensureFootnotesDefinitionsContainerExists","getAttribute","_footnoteDefsTracker","set","footnoteDefinition","_handleFootnotesDefinitionsObjectSync","_handleMovedFootnoteReference","getFootnotes","config","find","insert","findIndex","model","_handleFootnoteReferencesChanges","createElement","map","getFootnotesFormatter","document","change:data","reset","$graveyard","316564cKccQD","isPremiumPlugin","_handleFootnoteDefinitionsChanges","footnoteRef","83235XzVvdv","getChildren","getChanges","singleton","_handleRemoveFootnoteReferenceById","differ","_updateFootnoteRefCounter","enqueueChange","add","move","FootnotesTracker","paragraph","_footnoteFormatter","root","619060GOusut","indexOf","reference","_sortFootnoteDefinitions","footnoteId","from","parent","footnotes.multiBlock","registerPostFixer","listenTo","_handleFootnotesDefinitionsObjectChanges","append","footnotesDefinitions","3479110EDqIJX","footnoteInlineContent","createPositionBefore","_footnoteRefsTracker","8984CKsgYR","18gnbhln","after","remove","childCount","splice","unshift","_updateFootnotesCounters","isEqual","end","912948eJxMQO","getRootNames","definition","_ensureFootnotesReferencesHaveProperOrder"];return(d=function(){return t})()}!function(t){const e=f,o=t();for(;;)try{if(192244===-parseInt(e(390))/1+parseInt(e(426))/2*(-parseInt(e(394))/3)+-parseInt(e(362))/4+-parseInt(e(408))/5+-parseInt(e(435))/6+parseInt(e(450))/7*(parseInt(e(425))/8)+-parseInt(e(440))/9*(-parseInt(e(421))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(d);class p extends t.Plugin{[u(453)]=[];[u(363)]=null;[u(406)]=null;[u(452)];[u(424)];[u(371)];static get[u(449)](){return u(404)}static get[u(367)](){return!0}static get[u(391)](){return!0}constructor(t){const e=u;super(t),this[e(452)]=new l(this[e(361)][e(381)],{elementName:e(420),getElementKey:()=>e(397)}),this[e(424)]=new l(this[e(361)][e(381)],{elementName:e(393),getElementKey:t=>t[e(370)](e(412))}),this[e(371)]=new l(this[e(361)][e(381)],{elementName:e(373),getElementKey:t=>t[e(370)](e(412))})}[u(451)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(386)][t(416)](e=>{const n=t,i=o[n(386)][n(399)][n(396)]();let s=!1;return this[n(418)](e,i)&&(s=!0),this[n(392)](e,i)&&(s=!0),this[n(382)](e,i)&&(s=!0),this[n(438)](e)&&(s=!0),this[n(374)](e)&&(s=!0),this[n(411)](e)&&(s=!0),s}),this[t(417)](o[t(386)],t(387),()=>{const e=t;o[e(401)]({isUndoable:!1},t=>{this[e(369)](t)})},{priority:t(444)}),this[t(417)](n,t(372),()=>{const e=t;this[e(453)]=[],this[e(452)][e(388)](),this[e(424)][e(388)](),this[e(371)][e(388)]()},{priority:t(353)})}[u(358)](){return this[u(363)]}[u(365)](t){const e=u;return this[e(453)][e(378)](e=>e.id===t)||null}[u(376)](){const t=u;return Array[t(413)](this[t(453)])}[u(385)](){return this[u(406)]}[u(443)](t){this[u(406)]=t}[u(432)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(453)][o(360)];i++)this[o(400)](t,i)&&(n=!0);return n}[u(357)](t,e){const o=u,n=t[o(383)](o(420),{});return t[o(419)](n,e),this[o(363)]=n,n}[u(369)](t){const e=u;if(!this[e(453)][e(360)]||this[e(363)])return;const o=this[e(453)][0][e(410)][e(407)],n=this[e(357)](t,o);for(const o of this[e(453)])o[e(437)][e(414)]||t[e(379)](o[e(437)],n,e(434));this[e(432)](t)}[u(418)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(452)][o(396)](e);if(r[o(360)]&&(this[o(363)]=r[0]),i[o(360)])if(i[o(360)]>1||this[o(363)]&&i[o(364)](t=>t!==this[o(363)])){const e=t[o(383)](o(420),{}),s=[];this[o(363)]&&s[o(355)](this[o(363)]),s[o(355)](...i),t[o(379)](e,s[0],o(439));for(const n of s)t[o(403)](t[o(447)](n),t[o(441)](e,o(434))),t[o(428)](n);this[o(363)]=e,this[o(432)](t),n=!0}else this[o(363)]=i[0];if(s[o(360)]&&o(389)===this[o(363)]?.[o(407)][o(356)]){for(const e of this[o(453)])t[o(428)](e[o(410)]),n=!0;this[o(453)]=[],this[o(363)]=null}return n}[u(392)](t,e){const o=u;let n=!1;const i=this[o(361)][o(377)][o(368)](o(415)),{inserted:s,moved:r}=this[o(371)][o(396)](e);for(const e of[...r,...s]){const s=e[o(370)](o(412)),r=this[o(365)](s);r&&(r[o(437)]=e),h(t,i,e)&&(n=!0)}return n}[u(382)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(424)][o(396)](e);for(const e of i)this[o(398)](t,e)&&(n=!0);for(const e of s)this[o(359)](t,e)&&(n=!0);for(const e of r)this[o(375)](t,e)&&(n=!0);return n}[u(374)](t){const e=u;if(!this[e(363)])return!1;let o=!1;if(this[e(363)][e(429)]!==this[e(453)][e(360)]){const n=[];for(const t of this[e(363)][e(395)]()){const i=t[e(370)](e(412));this[e(365)](i)||(n[e(431)](t),o=!0)}for(const o of n)t[e(428)](o)}const n=new Set,i=[];for(const t of this[e(363)][e(395)]()){const s=t[e(370)](e(412));n[e(354)](s)?(i[e(431)](t),o=!0):n[e(402)](s)}for(const o of i)t[e(428)](o);return this[e(363)][e(429)]||(t[e(428)](this[e(363)]),this[e(363)]=null,o=!0),o}[u(359)](t,e){const o=u;if(this[o(453)][o(378)](t=>t[o(410)]===e))return!1;let n=!1;const i=e[o(370)](o(412)),s=this[o(453)][o(380)](t=>t.id===i);-1!==s&&(t[o(428)](this[o(453)][s][o(410)]),this[o(453)][o(430)](s,1),n=!0);let r=this[o(363)]?function(t,e){const n=o;for(const o of t[n(395)]())if(o[n(370)](n(412))===e)return o;return null}(this[o(363)],i):null;r||(r=t[o(383)](o(373),{footnoteId:i}),this[o(363)]&&(t[o(379)](r,this[o(363)],o(434)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(361)][o(381)],this[o(453)],e);this[o(453)][o(430)](c,0,a);let l=c;return-1!==s&&(l=Math[o(366)](c,s)),this[o(432)](t,l)&&(n=!0),n}[u(398)](t,e){const o=u,n=this[o(453)][o(380)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(453)][n];return o(389)!==s[o(437)][o(407)][o(356)]&&(t[o(428)](s[o(437)]),i=!0),this[o(453)][o(430)](n,1),this[o(432)](t,n)&&(i=!0),i}[u(375)](t,e){const o=u,n=e[o(370)](o(412)),i=this[o(453)][o(380)](t=>t.id===n),s=this[o(453)][i];let r=!1;s[o(410)]=e,this[o(453)][o(430)](i,1);const a=m(this[o(361)][o(381)],this[o(453)],e);return this[o(453)][o(430)](a,0,s),this[o(432)](t,Math[o(366)](i,a))&&(r=!0),r}[u(400)](t,e){const o=u;if(!this[o(363)])return!1;const n=this[o(453)][e];let i;return i=this[o(406)]?this[o(406)]({footnote:n,container:this[o(363)],digits:String(this[o(453)][o(360)])[o(360)],value:e+1}):String(e+1),n[o(410)][o(370)](o(445))!=i&&(t[o(442)](o(445),i,n[o(410)]),!0)}[u(411)](t){const e=u;if(!this[e(363)]||this[e(453)][e(360)]<2)return!1;if(function(t,o){const n=e;if(t[n(360)]!==o[n(360)])return!1;for(let e=0;e<t[n(360)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(453)][e(384)](t=>t.id),Array[e(413)](this[e(363)][e(395)]())[e(384)](t=>t[e(370)](e(412)))))return!1;let o=!1;for(let n=0;n<this[e(453)][e(360)];n++){const i=this[e(453)][n],s=t[e(423)](i[e(437)]),r=t[e(441)](this[e(363)],n);s[e(433)](r)||(t[e(403)](t[e(448)](i[e(437)]),r),o=!0)}return o}[u(438)](t){const e=u;if(!this[e(453)][e(360)])return!1;const{model:o}=this[e(361)];let n=!1;for(let i=0;i<this[e(453)][e(360)]-1;i++){const s=this[e(453)][i],r=this[e(453)][i+1],a=o[e(423)](s[e(410)]),c=o[e(423)](r[e(410)]);e(427)===a[e(446)](c)&&(this[e(375)](t,s[e(410)]),i=-1,n=!0)}return n}}function h(t,e,o){const n=u;if(o[n(429)])return!1;const i=n(e?405:422);return t[n(379)](t[n(383)](i),o),!0}function m(t,e,o){const n=u;if(0===e[n(360)])return 0;const i=t[n(423)](o);for(let o=0;o<e[n(360)];o++){const s=e[o],r=t[n(423)](s[n(410)]);if(n(439)===i[n(446)](r))return o}const s=o[n(407)];let r=-1;for(let t=e[n(360)]-1;t>=0;t--)if(e[t][n(410)][n(407)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(386)][n(436)](),c=a[n(409)](s[n(356)]),l=a[c+1];if(l)for(let t=0;t<e[n(360)];t++)if(e[t][n(410)][n(407)][n(356)]===l)return t;return e[n(360)]}function g(){const t=["_moveSelectionToFootnoteDefinition","selection","model","end","isObject","483105sGhpBm","isBlock","5038mWCred","plugins","FootnotesEditing","insert-footnote-command-executed-with-invalid-id","change","7839NgUTsE","editor","footnoteRef","36tjtBHn","14720FtGAVP","test","createElement","4376VqEZVG","486703aibLNr","1150etIEtP","281928uPGRJp","getItems","checkChild","isEnabled","5739DdwRFv","_getPositionToInsertFootnote","string","5753214iDAEsP","footnoteId","get","refresh","execute","length","insertObject","getFirstRange","document"];return(g=function(){return t})()}const w=y;function y(t,e){const o=g();return(y=function(t,e){return o[t-=420]})(t,e)}!function(t){const e=y,o=t();for(;;)try{if(634529===parseInt(e(451))/1+parseInt(e(450))/2*(parseInt(e(455))/3)+parseInt(e(444))/4*(-parseInt(e(434))/5)+-parseInt(e(420))/6+-parseInt(e(449))/7+-parseInt(e(448))/8*(-parseInt(e(441))/9)+parseInt(e(445))/10*(parseInt(e(436))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(g);class b extends t.Command{[w(423)](){const t=w,e=this[t(442)][t(431)][t(428)][t(430)],o=this[t(456)](e);this[t(454)]=!!o}[w(424)](t){const e=w,{editor:o}=this,{model:n}=o,{selection:s}=n[e(428)],r=this[e(456)](s);if(!r)return;const a=o[e(437)][e(422)](e(438)),c=t?.[e(421)]??(0,i.uid)();!function(t){const o=e;return o(457)==typeof t&&t[o(425)]>0&&!/\s/[o(446)](t)&&!/^\d/[o(446)](t)}(c)?(0,i.logWarning)(e(439)):(n[e(440)](t=>{const o=e,i=t[o(447)](o(443),{footnoteId:c});n[o(426)](i,r,null)}),a[e(429)](c))}[w(456)](t){const e=w,{model:o}=this[e(442)],{schema:n}=o,i=t[e(427)]();for(const t of i[e(452)]())if(n[e(435)](t)||n[e(433)](t))return null;const s=i[e(432)];return n[e(453)](s,e(443))?s:null}}class I extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[p]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=h([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]),o=window[h([68,97,116,101])][h([110,111,119])](),n=t[h([101,100,105,116,111,114])],s=new(window[h([80,114,111,109,105,115,101])])(t=>{n[h([111,110,99,101])](h([114,101,97,100,121]),t)}),r={[h([107,116,121])]:h([69,67]),[h([117,115,101])]:h([115,105,103]),[h([99,114,118])]:h([80,45,50,53,54]),[h([120])]:h([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]),[h([121])]:h([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]),[h([97,108,103])]:h([69,83,50,53,54])},a=n[h([99,111,110,102,105,103])][h([103,101,116])](h([108,105,99,101,110,115,101,75,101,121]));function c(t){return t[h([115,116,97,114,116,115,87,105,116,104])](h([101,121]))?JSON[h([112,97,114,115,101])](l(t)):null}function l(t){return window[h([97,116,111,98])](t[h([114,101,112,108,97,99,101])](/-/g,h([43]))[h([114,101,112,108,97,99,101])](/_/g,h([47])))}function u(t){let e=5381;function o(t){for(let o=0;o<t[h([108,101,110,103,116,104])];o++){const n=t[h([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[h([105,115,65,114,114,97,121])](e)?e[h([102,111,114,69,97,99,104])](t):e&&typeof e==h([111,98,106,101,99,116])?Object[h([101,110,116,114,105,101,115])](e)[h([115,111,114,116])]()[h([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[h([83,116,114,105,110,103])](e))}(t),e>>>0}function f(t){return t[h([116,111,83,116,114,105,110,103])](16)[h([112,97,100,83,116,97,114,116])](8,h([48]))}function d(t){return t[h([115,112,108,105,116])]("")[h([114,101,118,101,114,115,101])]()[h([106,111,105,110])]("")}function p(){}function h(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[h([83,116,114,105,110,103])](window[h([112,101,114,102,111,114,109,97,110,99,101])][h([110,111,119])]())[h([114,101,112,108,97,99,101])](h([46]),"");let o=h([117]);for(let n=0;n<t[h([108,101,110,103,116,104])];n+=2){let i=window[h([112,97,114,115,101,73,110,116])](t[h([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[h([108,101,110,103,116,104])]&&(i-=e[h([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=h([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=h([86,97,108,105,100])&&async function(){await s,n[h([109,111,100,101,108])][h([99,104,97,110,103,101])]=p,n[h([109,111,100,101,108])][h([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,n[h([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](h([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==h([71,80,76])?h([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[h([115,112,108,105,116])](h([46]));return 3!=t[h([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=c(t);return e&&o()?e:null;function o(){const t=e[h([106,116,105])],o=window[h([112,97,114,115,101,73,110,116])](t[h([115,117,98,115,116,114,105,110,103])](t[h([108,101,110,103,116,104])]-8),16),n={...e,[h([106,116,105])]:t[h([115,117,98,115,116,114,105,110,103])](0,t[h([108,101,110,103,116,104])]-8)};return delete n[h([118,99])],u(n)==o}}}(),t?(t[h([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[h([80,114,111,109,105,115,101])])(c=>{if(r())return c(h([86,97,108,105,100]));a(),n[h([100,101,99,111,114,97,116,101])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const p=(0,i.uid)();function m(t){return!!t&&(typeof t===h([111,98,106,101,99,116])||typeof t===h([102,117,110,99,116,105,111,110]))&&typeof t[h([116,104,101,110])]===h([102,117,110,99,116,105,111,110])&&typeof t[h([99,97,116,99,104])]===h([102,117,110,99,116,105,111,110])}function g(n){a(n)[h([116,104,101,110])](t=>t&&t[h([115,116,97,116,117,115])]==h([111,107])?f(u(p+e))!=t[h([118,101,114,105,102,105,99,97,116,105,111,110])]?h([85,115,97,103,101,76,105,109,105,116]):h([86,97,108,105,100]):h([85,115,97,103,101,76,105,109,105,116]))[h([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),h([86,97,108,105,100])):h(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[h([116,104,101,110])](c)[h([99,97,116,99,104])](()=>{c(h([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=h([108,108,99,116,45])+f(u(t)),n=d(f(window[h([77,97,116,104])][h([99,101,105,108])](o/i)));window[h([108,111,99,97,108,83,116,111,114,97,103,101])][h([115,101,116,73,116,101,109])](e,n)}function r(){const e=h([108,108,99,116,45])+f(u(t)),o=window[h([108,111,99,97,108,83,116,111,114,97,103,101])][h([103,101,116,73,116,101,109])](e);return o?window[h([112,97,114,115,101,73,110,116])](d(o),16)*i:null}function a(t){return new(window[h([80,114,111,109,105,115,101])])((e,o)=>{t[h([116,104,101,110])](e,o),window[h([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[h([111,110])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,o)=>{if(o[0]!=t)return c(h([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[h([114,101,113,117,101,115,116,73,100])]:p}},{[h([112,114,105,111,114,105,116,121])]:h([104,105,103,104])}),n[h([111,110])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{m(t[h([114,101,116,117,114,110])])&&(l=!0,g(t[h([114,101,116,117,114,110])]))},{[h([112,114,105,111,114,105,116,121])]:h([108,111,119])}),s[h([116,104,101,110])](()=>{l||c(h([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[h([101,100,105,116,105,110,103])][h([118,105,101,119])][h([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==h([97,117,116,111])}function a(){n[h([101,100,105,116,105,110,103])][h([118,105,101,119])][h([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=h([97,117,116,111])}}(t[h([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[h([106,116,105])])),await async function(){let t=!0;try{const n=a[h([115,112,108,105,116])](h([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=c(e);o&&o[h([97,108,103])]==h([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[h([85,105,110,116,56,65,114,114,97,121])][h([102,114,111,109])](l(n),t=>t[h([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[h([84,101,120,116,69,110,99,111,100,101,114])]))[h([101,110,99,111,100,101])](e+h([46])+o),a=window[h([99,114,121,112,116,111])][h([115,117,98,116,108,101])];if(!a)return;const c=await a[h([105,109,112,111,114,116,75,101,121])](h([106,119,107]),r,{[h([110,97,109,101])]:h([69,67,68,83,65]),[h([110,97,109,101,100,67,117,114,118,101])]:h([80,45,50,53,54])},!1,[h([118,101,114,105,102,121])]);await a[h([118,101,114,105,102,121])]({[h([110,97,109,101])]:h([69,67,68,83,65]),[h([104,97,115,104])]:{[h([110,97,109,101])]:h([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[h([102,101,97,116,117,114,101,115])];return!(!e||!e[h([105,110,99,108,117,100,101,115])](h([42]))&&!e[h([105,110,99,108,117,100,101,115])](h([70,79,79])))}()?function(){const e=[h([101,118,97,108,117,97,116,105,111,110]),h([116,114,105,97,108])][h([105,110,99,108,117,100,101,115])](t[h([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1770768e3;return t[h([101,120,112])]<e}()?h([69,120,112,105,114,101,100]):function(){const e=t[h([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[h([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[h([108,111,99,97,116,105,111,110])].href);if(e[h([105,110,99,108,117,100,101,115])](o))return!0;const n=o[h([115,112,108,105,116])](h([46]));return e[h([102,105,108,116,101,114])](t=>t[h([105,110,99,108,117,100,101,115])](h([42])))[h([109,97,112])](t=>t[h([115,112,108,105,116])](h([46])))[h([102,105,108,116,101,114])](t=>t[h([108,101,110,103,116,104])]<=n[h([108,101,110,103,116,104])])[h([109,97,112])](t=>Array(n[h([108,101,110,103,116,104])]-t[h([108,101,110,103,116,104])])[h([102,105,108,108])](t[0]===h([42])?h([42]):"")[h([99,111,110,99,97,116])](t))[h([115,111,109,101])](t=>n[h([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===h([42])))}()?(t[h([108,105,99,101,110,115,101,84,121,112,101])]==h([101,118,97,108,117,97,116,105,111,110])&&(e=function(t){const e=[new(window[h([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[h([116,104,101,110])](()=>new(window[h([80,114,111,109,105,115,101])])(t=>{let e=0;n[h([109,111,100,101,108])][h([111,110])](h([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][h([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,1512==e&&(t(),o[h([111,102,102])]())})}))];return window[h([80,114,111,109,105,115,101])][h([114,97,99,101])](e)[h([116,104,101,110])](()=>t)}(h([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),await(e&&p?new(window[h([80,114,111,109,105,115,101])])((t,o)=>{e[h([116,104,101,110])](t,o),p[h([116,104,101,110])](e=>{e!=h([86,97,108,105,100])&&t(e)},o)}):e||p||h([86,97,108,105,100]))):h([68,111,109,97,105,110,76,105,109,105,116]):h([78,111,116,65,108,108,111,119,101,100]):h([73,110,118,97,108,105,100])):h([73,110,118,97,108,105,100]))}catch{return h([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(p).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),o.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(p).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(i.reference,"on")}),o.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:o,editing:n}=t,{t:i}=t.locale;o.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:o})=>{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;o.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of n.view.createRangeIn(i))t.is("$textProxy")?o.consume(t.textNode,{name:!0}):t.is("element")&&o.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),o.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>x(t,e)}),o.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:o})=>{const n=t.getAttribute("footnoteCounter");return(0,e.toWidget)(x(t,o),o,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",n)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:o}=t.locale,{conversion:n}=t;n.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),n.for("upcast").add(t=>{t.on("element:ol",(t,e,o)=>{const n=e.viewItem;if(!n.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!o.consumable.consume(n,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=o.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,o)=>{const n=e.viewItem;n.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&o.consumable.consume(n,{name:!0,classes:"footnotes-divider"})})}),n.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>E(e)}),n.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:n})=>{const i=E(n,{"data-footnotes-list-label":o("Footnotes")}),s=(0,e.toWidget)(i,n,{hasSelectionHandle:!0,label:o("Footnotes")});return n.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:o}=t,n=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,o)=>{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(!o.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=o.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!o.safeInsert(r,e.modelCursor))return;o.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")&&(o.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),o.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(n)o.convertChildren(a,r);else{const t=o.writer.createElement("footnoteInlineContent");o.writer.insert(t,r),o.convertChildren(a,t)}o.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>D(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>D(t,e,o)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:v(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:v({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const o=t.document.differ,n=new Set;for(const t of o.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&n.add(e)}for(const t of n.values()){const o=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of o)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:v()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const o=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:o,t:n}=t,i=t.model.document.selection;t.keystrokes.set("Ctrl+Alt+F","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert footnote"),keystroke:"Ctrl+Alt+F"}]}),this.listenTo(o.view.document,"enter",(t,e)=>{const o=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(o){const n=o.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(n),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 o=!1;this.listenTo(e.view.document,"pointerdown",(t,n)=>{const{target:i}=n,s=e.view.document.selection;o=!!(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:n}=e;if(!n?.is("element","a"))return;if(n.parent?.is("element","sup")&&n.parent.hasClass("footnote")&&!o)return void e.preventDefault();let i=n.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 v({dataPipeline:t}={}){return(e,{writer:o})=>{if(!k(e))return null;if(!t)return o.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const n=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}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 o=e.toViewElement(t);return!!o&&k(t)!==o.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function E(t,e={}){const o=t.createEmptyElement("hr",{class:"footnotes-divider"}),n=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[o,n])}function x(t,e){const o=t.getAttribute("footnoteId"),n=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+o},function(t){const e=this.toDomElement(t);return e.textContent=n,e}),s=e.createContainerElement("sup",{id:"ref-"+o,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function D(t,o,n,{dataPipeline:i}={}){const{t:s}=n,r=t.getAttribute("footnoteId"),a=o.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?o.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(o.createEditableElement("div",{class:"footnote-content"}),o,{label:s("Footnote content.")});return o.insert(o.createPositionAt(c,0),o.createSlot()),o.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var T=o(331);const P=A;function S(){const t=["isPremiumPlugin","footnoteRef","getFirstRange","_handleCopyFootnotesDefinitions","setData","requires","entries","init","append","5511176DIkNFA","createElement","8118061WsokfN","end","parse","remove","getFootnote","definition","keys","getRanges","application/ckeditor5-footnotes","2830530sVfoeO","setAttribute","getFootnotes","getSelectedBlocks","from","flatMap","getData","footnoteId","toView","footnotesDefinitions","219796LEyJmd","_defineClipboardIntegration","data","createRangeIn","config","hasAttribute","htmlProcessor","method","listenTo","includes","15ITSBiJ","find","242308hIklax","clipboardInput","dataTransfer","getFootnotesDefinitionsObjectElement","add","get","contentInsertion","change","selection","toData","document","root","cloneElement","getAttribute","element","27457056mpZnNq","sourceEditorId","pluginName","stringify","footnoteInlineContent","string","content","insert","drop","outputTransformation","footnoteDefinition","toModel","reduce","editor","_insertEmptyFootnotesDefinitionsContainer","editing","create","6KnSwtA","isOfficialPlugin","getChildren","push","FootnotesClipboard","length","331002uuWlnH","_handlePasteFootnotesDefinitions","footnotes.multiBlock"];return(S=function(){return t})()}function A(t,e){const o=S();return(A=function(t,e){return o[t-=135]})(t,e)}!function(t){const e=A,o=t();for(;;)try{if(633349===parseInt(e(140))/1+-parseInt(e(185))/2+-parseInt(e(163))/3+-parseInt(e(173))/4*(-parseInt(e(183))/5)+parseInt(e(217))/6*(-parseInt(e(154))/7)+-parseInt(e(152))/8+parseInt(e(200))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(S);class _ extends t.Plugin{static get[P(202)](){return P(138)}static get[P(148)](){return[I,T.ClipboardPipeline]}static get[P(135)](){return!0}static get[P(143)](){return!0}[P(150)](){this[P(174)]()}[P(174)](){const t=P;this[t(146)](),this[t(141)]()}[P(146)](){const t=P,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(190)](T.ClipboardPipeline),s=o[t(190)](p);this[t(181)](i,t(209),(o,i)=>{const r=t,a=V(n[r(176)](i[r(206)]));if(!a[r(139)])return;const c=s[r(165)](),l=a[r(212)]((t,o)=>{const n=r,i=c[n(184)](t=>t.id===o);if(i){const o=e[n(175)][n(171)](i[n(159)],{isClipboardPipeline:!0}),s=e[n(175)][n(179)][n(194)](o);t[i.id]=s}return t},Object[r(216)](null));i[r(187)][r(147)](r(162),JSON[r(203)](l))})}[P(141)](){const t=P,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(215)],r=n[t(190)](T.ClipboardPipeline),a=n[t(190)](p),c=e[t(177)][t(190)](t(142));let l=null;this[t(181)](s[t(195)],t(186),(e,o)=>{const n=t,i=o[n(187)][n(169)](n(162));l=i?JSON[n(156)](i):null}),this[t(181)](r,t(191),(n,s)=>{const r=t,u=s[r(201)]===this[r(213)].id;u&&r(208)===s[r(180)]||o[r(192)](t=>{const n=r;let f=a[n(188)]();const d=!!f&&Array[n(167)](o[n(195)][n(193)][n(166)]())[n(182)](f);if(!l&&function(t){const e=n;for(const{item:o}of t)if(o.is(e(199),e(144)))return!0;return!1}(o[n(176)](s[n(206)]))&&(l=function(t,e){const o=n,i=L(t,e);if(!i)return null;const s=Object[o(216)](null);for(const e of i[o(136)]())e.is(o(199),o(210))&&e[o(178)](o(170))&&(s[e[o(198)](o(170))]=t[o(197)](e,!0));return Object[o(160)](s)[o(139)]?s:null}(t,s[n(206)])),(f&&!d||!f&&!l)&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(176)](e))n.is(o(199),o(172))&&i[o(137)](n);for(const e of i)t[o(157)](e)}(t,s[n(206)]),!l)return;const{selection:p}=o[n(195)],h=p[n(145)]()[n(196)];f&&!d||(f=L(t,s[n(206)]),f||=a[n(214)](t,h));const m=Array[n(167)](p[n(161)]())[n(168)](V),g=function(t,e,o){const s=n,r=Object[s(216)](null);for(const{item:n}of t[s(176)](e))if(n.is(s(199),s(144))){const e=n[s(198)](s(170));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(164)](s(170),r[e],n)}return r}(t,s[n(206)],t=>{const e=n;return!u||!!a[e(158)](t)&&!m[e(182)](t)});for(const[o,i]of Object[n(149)](l)){const s=g[o]||o;let r;if(n(205)!=typeof i)r=i,s!==o&&t[n(164)](n(170),s,r);else{r=t[n(153)](n(210),{footnoteId:s});const o=e[n(175)][n(179)][n(171)](i);let a;if(c)a=e[n(175)][n(211)](o,r);else{a=t[n(153)](n(204));const i=e[n(175)][n(211)](o,a);t[n(207)](i,a)}t[n(151)](a,r)}t[n(207)](r,f,n(155))}l=null})})}}function L(t,e){const o=P;for(const{item:n}of t[o(176)](e))if(n.is(o(199),o(172)))return n;return null}function V(t){const e=P,o=new Set;for(const{item:n}of t)n.is(e(199),e(144))&&o[e(189)](n[e(198)](e(170)));return Array[e(167)](o)}var N=o(311),O=o(355),R=o(929),K=o.n(R),j=o(297),B=o.n(j),M=o(102),W=o.n(M),U=o(123),z=o.n(U),q=o(741),H=o.n(q),J=o(728),Z={attributes:{"data-cke":!0}};Z.setAttributes=z(),Z.insert=W().bind(null,"head"),Z.domAPI=B(),Z.insertStyleElement=H();K()(J.A,Z);J.A&&J.A.locals&&J.A.locals;class G 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,N.ButtonView)),e.add("menuBar:insertFootnote",X(t,N.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const o=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in o){const n=e,i=o[n];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete o[n],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&o._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&o._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&o._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&o._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&o._showLicenseError("evaluationLimit"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function X(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof N.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(o,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:O.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}function Q(){var t=["requires","isPremiumPlugin","11153376YFKkkN","1734930GsDuCN","4818205odQWiY","Footnotes","12VrDKJz","1328190FWpjKo","231582XLuUWy","11orxEER","16BTTCVJ","pluginName","7471770UhiFPA","36CNqHHu","14708XKreBp","103TvqHFS","isOfficialPlugin"];return(Q=function(){return t})()}var Y=$;function $(t,e){var o=Q();return($=function(t,e){return o[t-=499]})(t,e)}!function(t){for(var e=$,o=t();;)try{if(435886===parseInt(e(502))/1*(parseInt(e(501))/2)+-parseInt(e(512))/3*(-parseInt(e(500))/4)+-parseInt(e(511))/5*(parseInt(e(510))/6)+-parseInt(e(508))/7+-parseInt(e(514))/8*(-parseInt(e(507))/9)+-parseInt(e(499))/10*(-parseInt(e(513))/11)+-parseInt(e(506))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Q);class tt extends t.Plugin{static get[Y(515)](){return Y(509)}static get[Y(504)](){return[I,_,G]}static get[Y(503)](){return!0}static get[Y(505)](){return!0}}const et=nt;function ot(){const t=["360eigmEc","decimal","lower-roman","decimal-leading-zero","70yvtcYc","lower-alpha","360896UTuGhV","13497DHfTBq","33834IIaBhv","1197508QWlfiQ","1150930xRPTHH","upper-roman","upper-latin","lower-latin","2746tbpJpt","273NRKqiq","9uqujhM","294469lOJzDL","upper-alpha"];return(ot=function(){return t})()}function nt(t,e){const o=ot();return(nt=function(t,e){return o[t-=450]})(t,e)}!function(t){const e=nt,o=t();for(;;)try{if(155785===parseInt(e(461))/1+-parseInt(e(458))/2*(parseInt(e(459))/3)+-parseInt(e(453))/4+parseInt(e(454))/5+parseInt(e(452))/6*(parseInt(e(467))/7)+-parseInt(e(450))/8*(parseInt(e(460))/9)+parseInt(e(463))/10*(parseInt(e(451))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ot);const it=[et(464),et(466),et(457),et(456),et(468),et(462),et(465),et(455)],st=rt;function rt(t,e){const o=at();return(rt=function(t,e){return o[t-=383]})(t,e)}function at(){const t=["refresh","value","10wrxzDm","161FhUGtZ","58616ICUXtd","plugins","10808226SNcspk","8212167BBkTlK","getAttribute","24JHKqai","setAttribute","includes","6431880ENtkOD","930103XOzteq","isEnabled","execute","5SHWyHG","model","get","304576QEDuFr","3475812PloygZ","getFootnotesDefinitionsObjectElement","footnotesListStyle","_updateFootnotesCounters","change"];return(at=function(){return t})()}!function(t){const e=rt,o=t();for(;;)try{if(624926===parseInt(e(402))/1+-parseInt(e(383))/2*(-parseInt(e(398))/3)+-parseInt(e(384))/4*(parseInt(e(405))/5)+parseInt(e(401))/6+-parseInt(e(392))/7*(-parseInt(e(393))/8)+-parseInt(e(396))/9*(parseInt(e(391))/10)+-parseInt(e(395))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(at);class ct extends t.Command{[st(389)](){const t=st,{editor:e}=this,o=e[t(394)][t(407)](p)[t(385)]();this[t(403)]=!!o,this[t(390)]=o?.[t(397)](t(386))??null}[st(404)]({value:t}){const e=st,{editor:o}=this,n=o[e(394)][e(407)](p),i=n[e(385)]();i&&it[e(400)](t)&&o[e(406)][e(388)](o=>{const s=e;o[s(399)](s(386),t,i),n[s(387)](o)})}}const lt=ut;function ut(t,e){const o=dt();return(ut=function(t,e){return o[t-=246]})(t,e)}!function(t){const e=ut,o=t();for(;;)try{if(121803===parseInt(e(256))/1*(parseInt(e(253))/2)+-parseInt(e(260))/3+parseInt(e(247))/4*(-parseInt(e(271))/5)+-parseInt(e(254))/6*(-parseInt(e(248))/7)+-parseInt(e(259))/8*(parseInt(e(251))/9)+-parseInt(e(267))/10+-parseInt(e(263))/11*(-parseInt(e(255))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(dt);class ft extends t.Command{[lt(262)](){const t=lt,{editor:e}=this,o=e[t(252)][t(258)](p)[t(265)]();this[t(261)]=!!o,this[t(269)]=o?.[t(250)](t(257))??null}[lt(268)]({value:t}){const e=lt,{editor:o}=this,n=o[e(252)][e(258)](p),i=n[e(265)]();i&&Number[e(270)](t)&&o[e(249)][e(246)](o=>{const s=e;o[s(266)](s(257),t,i),n[s(264)](o)})}}function dt(){const t=["2QXNIOM","6iEowqY","48xqVrSl","145414xfjoRM","footnotesListStart","get","208BBgwkT","700839OmnVQM","isEnabled","refresh","990066OJeklg","_updateFootnotesCounters","getFootnotesDefinitionsObjectElement","setAttribute","2172800lFhGMs","execute","value","isInteger","681925cDcTtQ","change","4mvGtsB","1518139GNOfBK","model","getAttribute","4581YUUmbk","plugins"];return(dt=function(){return t})()}function pt(){const t=["downcast","328349WJgUnQ","createRangeOn","item","element:ol","toLowerCase","checkAttribute","parent","extend","upper-roman","insert","decimal","footnotesListStart","modelCursor","consumable","add","7550715tmEtXO","694337EwDKbi","plugins","lower-latin","8786050KrEgNA","getChanges","decimal-leading-zero","16xLfaDj","attribute:footnotesListStyle:footnotesDefinitions","upper-latin","96219ePunUi","footnotesStyle","schema","type","_updateFootnotesCounters","writer","attribute:footnotesListStart:footnotesDefinitions","from","get","upcast","footnotes.footnotesProperties.defaultListStyle","element","isPremiumPlugin","hasAttribute","toViewElement","_defineFormatter","footnotesDefinitions","document","fromCharCode","define","_getDefaultStartIndex","lower-roman","FootnotesPropertiesEditing","hasClass","footnotes-list","config","toUpperCase","getStyle","_defineSchema","removeStyle","36UbcIjc","setStyle","footnotesStart","1472206ErdZfI","for","parseInt","position","nodeAfter","max","$text","commands","setFootnoteFormatter","footnotesListStyle","_definePostfixer","81hVAYQt","differ","init","removeAttribute","lower-alpha","21992iYwIDl","floor","editor","registerPostFixer","start","getChildren","_defineConverters","setAttribute","getAttribute","viewItem","isOfficialPlugin","padStart","model","consume","footnotes.footnotesProperties.defaultStartIndex","requires","mapper","find","_getDefaultListStyle","upper-alpha","pluginName","isNaN","getItems","list-style-type","name","_formatFootnoteListValue"];return(pt=function(){return t})()}const ht=wt;!function(t){const e=wt,o=t();for(;;)try{if(882183===-parseInt(e(194))/1+-parseInt(e(252))/2+-parseInt(e(219))/3*(-parseInt(e(216))/4)+parseInt(e(209))/5+-parseInt(e(249))/6*(parseInt(e(210))/7)+parseInt(e(268))/8*(parseInt(e(263))/9)+parseInt(e(213))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(pt);class mt extends t.Plugin{static get[ht(187)](){return ht(241)}static get[ht(182)](){return[I,p]}static get[ht(177)](){return!0}static get[ht(231)](){return!0}[ht(265)](){const t=ht,{editor:e}=this;e[t(244)][t(238)](t(229),t(204)),e[t(244)][t(238)](t(181),1),e[t(259)][t(208)](t(220),new ct(e)),e[t(259)][t(208)](t(251),new ft(e)),this[t(247)](),this[t(274)](),this[t(234)](),this[t(262)]()}[ht(247)](){const t=ht,{editor:e}=this,{schema:o}=e[t(179)];o[t(201)](t(235),{allowAttributes:[t(261),t(205)]})}[ht(274)](){const t=ht,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(253)](t(228))[t(208)](e=>{const o=t;e.on(o(197),(t,e,n)=>{const s=o,r=e[s(176)],a=e[s(206)]?.[s(200)];r[s(242)](s(243))&&a?.is(s(230),s(235))&&(function(t,e,o,n){const i=s;if(!n[i(199)](e,i(205)))return;let r=1;const a=o[i(207)][i(180)](t,{attributes:i(272)});if(a){const e=Number[i(254)](t[i(175)](i(272)),10);Number[i(188)](e)||(r=e)}!a&&e[i(232)](i(205))||o[i(224)][i(275)](i(205),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(199)](e,i(261)))return;let r=i(204),a=!1;if(o[i(207)][i(180)](t,{attributes:i(222)})){const e={1:i(204),a:i(267),A:i(186),i:i(240),I:i(202)}[t[i(175)](i(222))];e&&(r=e),a=!0}o[i(207)][i(180)](t,{styles:i(190)})&&(r=function(t){const e=i;switch(t){case e(267):return e(212);case e(186):return e(218);default:return t}}(t[i(246)](i(190))),a=!0),!a&&e[i(232)](i(261))||o[i(224)][i(275)](i(261),r,e)}(r,a,n,i))})}),o[t(253)](t(193))[t(208)](e=>{const o=t;e.on(o(225),(t,e,n)=>{const i=o;if(!n[i(207)][i(180)](e[i(196)],t[i(191)]))return;const s=gt(e[i(196)],n[i(183)]),{attributeNewValue:r}=e;null==r||1===r?n[i(224)][i(266)](i(272),s):n[i(224)][i(275)](i(272),String(r),s)}),e.on(o(217),(t,e,n)=>{const i=o;if(!n[i(207)][i(180)](e[i(196)],t[i(191)]))return;const s=gt(e[i(196)],n[i(183)]),{attributeNewValue:r}=e;r&&i(204)!==r?n[i(224)][i(250)](i(190),r,s):n[i(224)][i(248)](i(190),s)})})}[ht(262)](){const t=ht,{editor:e}=this,{model:o}=e,n=e[t(211)][t(227)](p),i=this[t(185)](),s=this[t(239)]();o[t(236)][t(271)](e=>{const r=t,a=o[r(236)][r(264)][r(214)]();let c=!1;for(const t of a){if(r(203)!==t[r(222)]||r(258)===t[r(191)])continue;const n=o[r(195)](t[r(255)][r(256)]);for(const t of n[r(189)]())t.is(r(230),r(235))&&(!t[r(232)](r(205))&&o[r(221)][r(199)](t,r(205))&&(e[r(275)](r(205),s,t),c=!0),!t[r(232)](r(261))&&o[r(221)][r(199)](t,r(261))&&(e[r(275)](r(261),i,t),c=!0))}return c&&n[r(223)](e),c})}[ht(234)](){const t=ht,{editor:e}=this;e[t(211)][t(227)](p)[t(260)](e=>this[t(192)](e))}[ht(185)](){const t=ht;return this[t(270)][t(244)][t(227)](t(229))}[ht(239)](){const t=ht;return this[t(270)][t(244)][t(227)](t(181))}[ht(192)]({container:t,value:e,digits:o}){const n=ht,i=t[n(175)](n(261)),s=t[n(175)](n(205)),r=Math[n(269)](e)+(s??1)-1;switch(i){case n(215):return function(t,e){const o=n;return String(t)[o(178)](e,"0")}(r,Math[n(257)](2,o));case n(267):case n(212):return yt(r,!1);case n(186):case n(218):return yt(r,!0);case n(240):return It(r,!1);case n(202):return It(r,!0);default:return String(r)}}}function gt(t,e){const o=ht,n=e[o(233)](t);return Array[o(226)](n[o(273)]())[o(184)](t=>t.is(o(230),"ol")&&t[o(242)](o(243)))}function wt(t,e){const o=pt();return(wt=function(t,e){return o[t-=175]})(t,e)}function yt(t,e){const o=ht;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(237)](97+t)+n,i=Math[o(269)]((i-1)/26)}return e?n[o(245)]():n}const bt=[{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 It(t,e){const o=ht;let n="",i=t;for(const{value:t,numeral:e}of bt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(198)]()}class vt extends N.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new N.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new N.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,o),[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,N.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 o=new N.View(this.locale);return o.children=o.createCollection(),o.children.addMany(t),o.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:o.children}),o.children.delegate("execute").to(this),o.focus=function(){for(const t of this.children)if(t instanceof N.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},o.focusTracker=new i.FocusTracker,o.keystrokes=new i.KeystrokeHandler,o.render(),o.keystrokes.listenTo(o.element),this.children.add(o),o}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),o=[e],n=new N.CollapsibleView(this.locale,o);return n.set({label:t("Footnotes properties"),isCollapsed:!0}),n.buttonView.bind("isEnabled").toMany(o,"isEnabled",(...t)=>t.some(t=>t)),n.buttonView.on("change:isEnabled",(t,e,o)=>{o||(n.isCollapsed=!0)}),this.children.add(n),[e,n]}_createStartIndexPropertyView(){const{t}=this.locale,e=new N.LabeledFieldView(this.locale,N.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 o=e.fieldView.element,n=o.valueAsNumber;Number.isNaN(n)?e.errorText=t("Invalid footnotes start index value."):o.checkValidity()?this.fire("footnotesListStart",{startIndex:n}):e.errorText=t(n<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var kt=o(291),Ct={attributes:{"data-cke":!0}};Ct.setAttributes=z(),Ct.insert=W().bind(null,"head"),Ct.domAPI=B(),Ct.insertStyleElement=H();K()(kt.A,Ct);kt.A&&kt.A.locals&&kt.A.locals;class Ft extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[N.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var o;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(o=t,t=>{const{t:e}=t,n=o.commands.get("footnotesStyle"),i=(0,N.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(n,"isEnabled"),s.set({label:e("Footnotes style"),icon:O.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:o}=t.locale,n=o("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:O.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:O.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:O.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:O.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:O.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:O.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:o,icon:n,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new N.ButtonView(e);return a.set({label:o,icon:n,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 vt(t.locale,{styleGridAriaLabel:n,styleButtonViews:i}),r=t.commands.get("footnotesStart");return s.startIndexFieldView.bind("isEnabled").to(r),s.startIndexFieldView.fieldView.bind("value").to(r),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s.delegate("execute").to(e),s}({editor:o,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:o}=t.locale,n=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=N.BalloonPanelView;n.register("footnotesDefinitions",{ariaLabel:o("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}var Et=xt;function xt(t,e){var o=Dt();return(xt=function(t,e){return o[t-=223]})(t,e)}function Dt(){var t=["requires","10ctaqKr","27OLPIIL","isPremiumPlugin","5844rtyamc","33416lrrtZE","isOfficialPlugin","FootnotesProperties","916497AOpCbO","46640ZtRVjz","968vUTHwz","14ZkDtCn","5656zzVWvx","356275UJPEpa","107ffomMA","815196uBzbNR","pluginName"];return(Dt=function(){return t})()}!function(t){for(var e=xt,o=t();;)try{if(156822===parseInt(e(224))/1*(parseInt(e(239))/2)+parseInt(e(229))/3*(parseInt(e(232))/4)+parseInt(e(223))/5+-parseInt(e(225))/6+-parseInt(e(238))/7*(parseInt(e(236))/8)+parseInt(e(235))/9*(-parseInt(e(228))/10)+parseInt(e(237))/11*(-parseInt(e(231))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Dt);class Tt extends t.Plugin{static get[Et(226)](){return Et(234)}static get[Et(227)](){return[mt,Ft]}static get[Et(233)](){return!0}static get[Et(230)](){return!0}}function Pt(){var t=["5320458hHoWCr","18672488YeDpxf","1542578xHTLYs","4vBWqiR","2226088jWIsMD","4916555WybZzD","4195527cazEHV","5744665omWggA"];return(Pt=function(){return t})()}function St(t,e){var o=Pt();return(St=function(t,e){return o[t-=315]})(t,e)}!function(t){for(var e=St,o=t();;)try{if(827293===parseInt(e(319))/1+-parseInt(e(321))/2+parseInt(e(315))/3+parseInt(e(320))/4*(parseInt(e(316))/5)+parseInt(e(317))/6+-parseInt(e(322))/7+-parseInt(e(318))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Pt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
|
|
5
|
+
*/(()=>{var t={102:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},237:t=>{"use strict";t.exports=CKEditor5.dll},291:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.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},297:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,i){var s;if(n)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=o(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++,o=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},331:(t,e,o)=>{t.exports=o(237)("./src/clipboard.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},728:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.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.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},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(t,o,n,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)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]);n&&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),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},901:(t,e,o)=>{t.exports=o(237)("./src/widget.js")},929:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=o(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,n);n.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var o=e.domAPI(e);o.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;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var s=n(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=o(s[r]);e[a].references--}for(var c=n(t,i),l=0;l<s.length;l++){var u=o(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Footnotes:()=>tt,FootnotesClipboard:()=>_,FootnotesEditing:()=>v,FootnotesProperties:()=>Tt,FootnotesPropertiesEditing:()=>mt,FootnotesPropertiesUI:()=>Ft,FootnotesStartCommand:()=>dt,FootnotesStyleCommand:()=>ct,FootnotesTracker:()=>p,FootnotesUI:()=>Z,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);function r(t,e){const o=c();return(r=function(t,e){return o[t-=328]})(t,e)}const a=r;function c(){const t=["$graveyard","getItems","1133217EKDatj","length","6060780IgosgN","3XmApba","type","reset","74586ZWJhWd","add","insert","getElementKey","delete","653612qLgKpl","276268oGnKZp","15RAefZx","elementName","_model","45oohCQE","_elementName","nodeAfter","has","from","push","rootName","clear","_getElementKey","getChanges","22771524yMRZoq","1600072JJTgVq","$text","attributes","set","name","70ETZTiZ","root","flat","14ZiorMB","get","position","_trackedElements","element","values","slice","createRangeOn","remove"];return(c=function(){return t})()}!function(t){const e=r,o=t();for(;;)try{if(449254===parseInt(e(357))/1*(-parseInt(e(366))/2)+-parseInt(e(367))/3*(-parseInt(e(365))/4)+parseInt(e(370))/5*(parseInt(e(360))/6)+parseInt(e(343))/7*(parseInt(e(335))/8)+parseInt(e(354))/9*(parseInt(e(340))/10)+parseInt(e(356))/11+-parseInt(e(334))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(c);class l{[a(369)];[a(371)];[a(332)];[a(346)]=new Map;constructor(t,e){const o=a;this[o(369)]=t,this[o(371)]=e[o(368)],this[o(332)]=e[o(363)]}[a(359)](){const t=a;this[t(346)][t(331)]()}[a(333)](t){const e=a,o=new Set,n=new Map;for(const i of t){if(e(362)===i[e(358)]&&e(336)!==i[e(339)]&&i[e(345)][e(372)]){const t=this[e(369)][e(350)](i[e(345)][e(372)]);for(const o of t[e(353)]()){if(!o.is(e(347),this[e(371)]))continue;const t=this[e(332)](o);n[e(373)](t)||n[e(338)](t,[]),n[e(344)](t)[e(329)](o)}}if(e(351)===i[e(358)]&&i[e(339)]===this[e(371)]){const t=this[e(332)]({getAttribute:t=>i[e(337)][e(344)](t)});o[e(361)](t)}}for(const[t,n]of this[e(346)])e(352)===n[e(341)][e(330)]&&o[e(361)](t);for(const t of o)this[e(346)][e(364)](t);for(const[t,o]of n)this[e(346)][e(338)](t,o[o[e(355)]-1]);const i=new Set;for(const[t,s]of n)o[e(373)](t)&&(i[e(361)](s[0]),s[e(355)]>1?n[e(338)](t,s[e(349)](1)):n[e(364)](t),o[e(364)](t));return{removed:Array[e(328)](o),inserted:Array[e(328)](n[e(348)]())[e(342)](),moved:Array[e(328)](i)}}}const u=f;function f(t,e){const o=d();return(f=function(t,e){return o[t-=353]})(t,e)}function d(){const t=["before","18yPBtso","createPositionAt","setAttribute","setFootnoteFormatter","low","footnoteCounter","compareWith","createRangeIn","createRangeOn","pluginName","2191pVPfYX","init","_footnoteDefsContainerTracker","_footnotes","high","has","push","rootName","_insertEmptyFootnotesDefinitionsContainer","getFootnotesDefinitionsObjectElement","_handleInsertedFootnoteReference","length","editor","51352yqpoCW","_footnotesDefinitions","some","getFootnote","min","isOfficialPlugin","get","_ensureFootnotesDefinitionsContainerExists","getAttribute","_footnoteDefsTracker","set","footnoteDefinition","_handleFootnotesDefinitionsObjectSync","_handleMovedFootnoteReference","getFootnotes","config","find","insert","findIndex","model","_handleFootnoteReferencesChanges","createElement","map","getFootnotesFormatter","document","change:data","reset","$graveyard","316564cKccQD","isPremiumPlugin","_handleFootnoteDefinitionsChanges","footnoteRef","83235XzVvdv","getChildren","getChanges","singleton","_handleRemoveFootnoteReferenceById","differ","_updateFootnoteRefCounter","enqueueChange","add","move","FootnotesTracker","paragraph","_footnoteFormatter","root","619060GOusut","indexOf","reference","_sortFootnoteDefinitions","footnoteId","from","parent","footnotes.multiBlock","registerPostFixer","listenTo","_handleFootnotesDefinitionsObjectChanges","append","footnotesDefinitions","3479110EDqIJX","footnoteInlineContent","createPositionBefore","_footnoteRefsTracker","8984CKsgYR","18gnbhln","after","remove","childCount","splice","unshift","_updateFootnotesCounters","isEqual","end","912948eJxMQO","getRootNames","definition","_ensureFootnotesReferencesHaveProperOrder"];return(d=function(){return t})()}!function(t){const e=f,o=t();for(;;)try{if(192244===-parseInt(e(390))/1+parseInt(e(426))/2*(-parseInt(e(394))/3)+-parseInt(e(362))/4+-parseInt(e(408))/5+-parseInt(e(435))/6+parseInt(e(450))/7*(parseInt(e(425))/8)+-parseInt(e(440))/9*(-parseInt(e(421))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(d);class p extends t.Plugin{[u(453)]=[];[u(363)]=null;[u(406)]=null;[u(452)];[u(424)];[u(371)];static get[u(449)](){return u(404)}static get[u(367)](){return!0}static get[u(391)](){return!0}constructor(t){const e=u;super(t),this[e(452)]=new l(this[e(361)][e(381)],{elementName:e(420),getElementKey:()=>e(397)}),this[e(424)]=new l(this[e(361)][e(381)],{elementName:e(393),getElementKey:t=>t[e(370)](e(412))}),this[e(371)]=new l(this[e(361)][e(381)],{elementName:e(373),getElementKey:t=>t[e(370)](e(412))})}[u(451)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(386)][t(416)](e=>{const n=t,i=o[n(386)][n(399)][n(396)]();let s=!1;return this[n(418)](e,i)&&(s=!0),this[n(392)](e,i)&&(s=!0),this[n(382)](e,i)&&(s=!0),this[n(438)](e)&&(s=!0),this[n(374)](e)&&(s=!0),this[n(411)](e)&&(s=!0),s}),this[t(417)](o[t(386)],t(387),()=>{const e=t;o[e(401)]({isUndoable:!1},t=>{this[e(369)](t)})},{priority:t(444)}),this[t(417)](n,t(372),()=>{const e=t;this[e(453)]=[],this[e(452)][e(388)](),this[e(424)][e(388)](),this[e(371)][e(388)]()},{priority:t(353)})}[u(358)](){return this[u(363)]}[u(365)](t){const e=u;return this[e(453)][e(378)](e=>e.id===t)||null}[u(376)](){const t=u;return Array[t(413)](this[t(453)])}[u(385)](){return this[u(406)]}[u(443)](t){this[u(406)]=t}[u(432)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(453)][o(360)];i++)this[o(400)](t,i)&&(n=!0);return n}[u(357)](t,e){const o=u,n=t[o(383)](o(420),{});return t[o(419)](n,e),this[o(363)]=n,n}[u(369)](t){const e=u;if(!this[e(453)][e(360)]||this[e(363)])return;const o=this[e(453)][0][e(410)][e(407)],n=this[e(357)](t,o);for(const o of this[e(453)])o[e(437)][e(414)]||t[e(379)](o[e(437)],n,e(434));this[e(432)](t)}[u(418)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(452)][o(396)](e);if(r[o(360)]&&(this[o(363)]=r[0]),i[o(360)])if(i[o(360)]>1||this[o(363)]&&i[o(364)](t=>t!==this[o(363)])){const e=t[o(383)](o(420),{}),s=[];this[o(363)]&&s[o(355)](this[o(363)]),s[o(355)](...i),t[o(379)](e,s[0],o(439));for(const n of s)t[o(403)](t[o(447)](n),t[o(441)](e,o(434))),t[o(428)](n);this[o(363)]=e,this[o(432)](t),n=!0}else this[o(363)]=i[0];if(s[o(360)]&&o(389)===this[o(363)]?.[o(407)][o(356)]){for(const e of this[o(453)])t[o(428)](e[o(410)]),n=!0;this[o(453)]=[],this[o(363)]=null}return n}[u(392)](t,e){const o=u;let n=!1;const i=this[o(361)][o(377)][o(368)](o(415)),{inserted:s,moved:r}=this[o(371)][o(396)](e);for(const e of[...r,...s]){const s=e[o(370)](o(412)),r=this[o(365)](s);r&&(r[o(437)]=e),h(t,i,e)&&(n=!0)}return n}[u(382)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(424)][o(396)](e);for(const e of i)this[o(398)](t,e)&&(n=!0);for(const e of s)this[o(359)](t,e)&&(n=!0);for(const e of r)this[o(375)](t,e)&&(n=!0);return n}[u(374)](t){const e=u;if(!this[e(363)])return!1;let o=!1;if(this[e(363)][e(429)]!==this[e(453)][e(360)]){const n=[];for(const t of this[e(363)][e(395)]()){const i=t[e(370)](e(412));this[e(365)](i)||(n[e(431)](t),o=!0)}for(const o of n)t[e(428)](o)}const n=new Set,i=[];for(const t of this[e(363)][e(395)]()){const s=t[e(370)](e(412));n[e(354)](s)?(i[e(431)](t),o=!0):n[e(402)](s)}for(const o of i)t[e(428)](o);return this[e(363)][e(429)]||(t[e(428)](this[e(363)]),this[e(363)]=null,o=!0),o}[u(359)](t,e){const o=u;if(this[o(453)][o(378)](t=>t[o(410)]===e))return!1;let n=!1;const i=e[o(370)](o(412)),s=this[o(453)][o(380)](t=>t.id===i);-1!==s&&(t[o(428)](this[o(453)][s][o(410)]),this[o(453)][o(430)](s,1),n=!0);let r=this[o(363)]?function(t,e){const n=o;for(const o of t[n(395)]())if(o[n(370)](n(412))===e)return o;return null}(this[o(363)],i):null;r||(r=t[o(383)](o(373),{footnoteId:i}),this[o(363)]&&(t[o(379)](r,this[o(363)],o(434)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(361)][o(381)],this[o(453)],e);this[o(453)][o(430)](c,0,a);let l=c;return-1!==s&&(l=Math[o(366)](c,s)),this[o(432)](t,l)&&(n=!0),n}[u(398)](t,e){const o=u,n=this[o(453)][o(380)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(453)][n];return o(389)!==s[o(437)][o(407)][o(356)]&&(t[o(428)](s[o(437)]),i=!0),this[o(453)][o(430)](n,1),this[o(432)](t,n)&&(i=!0),i}[u(375)](t,e){const o=u,n=e[o(370)](o(412)),i=this[o(453)][o(380)](t=>t.id===n),s=this[o(453)][i];let r=!1;s[o(410)]=e,this[o(453)][o(430)](i,1);const a=m(this[o(361)][o(381)],this[o(453)],e);return this[o(453)][o(430)](a,0,s),this[o(432)](t,Math[o(366)](i,a))&&(r=!0),r}[u(400)](t,e){const o=u;if(!this[o(363)])return!1;const n=this[o(453)][e];let i;return i=this[o(406)]?this[o(406)]({footnote:n,container:this[o(363)],digits:String(this[o(453)][o(360)])[o(360)],value:e+1}):String(e+1),n[o(410)][o(370)](o(445))!=i&&(t[o(442)](o(445),i,n[o(410)]),!0)}[u(411)](t){const e=u;if(!this[e(363)]||this[e(453)][e(360)]<2)return!1;if(function(t,o){const n=e;if(t[n(360)]!==o[n(360)])return!1;for(let e=0;e<t[n(360)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(453)][e(384)](t=>t.id),Array[e(413)](this[e(363)][e(395)]())[e(384)](t=>t[e(370)](e(412)))))return!1;let o=!1;for(let n=0;n<this[e(453)][e(360)];n++){const i=this[e(453)][n],s=t[e(423)](i[e(437)]),r=t[e(441)](this[e(363)],n);s[e(433)](r)||(t[e(403)](t[e(448)](i[e(437)]),r),o=!0)}return o}[u(438)](t){const e=u;if(!this[e(453)][e(360)])return!1;const{model:o}=this[e(361)];let n=!1;for(let i=0;i<this[e(453)][e(360)]-1;i++){const s=this[e(453)][i],r=this[e(453)][i+1],a=o[e(423)](s[e(410)]),c=o[e(423)](r[e(410)]);e(427)===a[e(446)](c)&&(this[e(375)](t,s[e(410)]),i=-1,n=!0)}return n}}function h(t,e,o){const n=u;if(o[n(429)])return!1;const i=n(e?405:422);return t[n(379)](t[n(383)](i),o),!0}function m(t,e,o){const n=u;if(0===e[n(360)])return 0;const i=t[n(423)](o);for(let o=0;o<e[n(360)];o++){const s=e[o],r=t[n(423)](s[n(410)]);if(n(439)===i[n(446)](r))return o}const s=o[n(407)];let r=-1;for(let t=e[n(360)]-1;t>=0;t--)if(e[t][n(410)][n(407)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(386)][n(436)](),c=a[n(409)](s[n(356)]),l=a[c+1];if(l)for(let t=0;t<e[n(360)];t++)if(e[t][n(410)][n(407)][n(356)]===l)return t;return e[n(360)]}function g(t,e){const o=y();return(g=function(t,e){return o[t-=262]})(t,e)}const w=g;function y(){const t=["execute","document","model","getFirstRange","336782ATGMrB","length","end","40683vwVbij","1427028sAnujG","1467718qeDXdh","975915UXsWEG","_getPositionToInsertFootnote","selection","get","3970310dmtGUm","editor","FootnotesEditing","isBlock","3232LjrWFi","change","insertObject","1ziqoVb","checkChild","plugins","string","insert-footnote-command-executed-with-invalid-id","footnoteId","isObject","3681LnjxMH","isEnabled","92NjErkL","_moveSelectionToFootnoteDefinition","refresh","footnoteRef","createElement","getItems","test"];return(y=function(){return t})()}!function(t){const e=g,o=t();for(;;)try{if(166426===-parseInt(e(266))/1*(-parseInt(e(286))/2)+-parseInt(e(289))/3*(parseInt(e(275))/4)+parseInt(e(292))/5+-parseInt(e(290))/6+-parseInt(e(291))/7+parseInt(e(263))/8*(parseInt(e(273))/9)+parseInt(e(296))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(y);class b extends t.Command{[w(277)](){const t=w,e=this[t(297)][t(284)][t(283)][t(294)],o=this[t(293)](e);this[t(274)]=!!o}[w(282)](t){const e=w,{editor:o}=this,{model:n}=o,{selection:s}=n[e(283)],r=this[e(293)](s);if(!r)return;const a=o[e(268)][e(295)](e(298)),c=t?.[e(271)]??(0,i.uid)();!function(t){const o=e;return o(269)==typeof t&&t[o(287)]>0&&!/\s/[o(281)](t)&&!/^\d/[o(281)](t)}(c)?(0,i.logWarning)(e(270)):(n[e(264)](t=>{const o=e,i=t[o(279)](o(278),{footnoteId:c});n[o(265)](i,r,null)}),a[e(276)](c))}[w(293)](t){const e=w,{model:o}=this[e(297)],{schema:n}=o,i=t[e(285)]();for(const t of i[e(280)]())if(n[e(262)](t)||n[e(272)](t))return null;const s=i[e(288)];return n[e(267)](s,e(278))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[p]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=h([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]),o=window[h([68,97,116,101])][h([110,111,119])](),n=t[h([101,100,105,116,111,114])],s=new(window[h([80,114,111,109,105,115,101])])(t=>{n[h([111,110,99,101])](h([114,101,97,100,121]),t)}),r={[h([107,116,121])]:h([69,67]),[h([117,115,101])]:h([115,105,103]),[h([99,114,118])]:h([80,45,50,53,54]),[h([120])]:h([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]),[h([121])]:h([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]),[h([97,108,103])]:h([69,83,50,53,54])},a=n[h([99,111,110,102,105,103])][h([103,101,116])](h([108,105,99,101,110,115,101,75,101,121]));function c(t){return t[h([115,116,97,114,116,115,87,105,116,104])](h([101,121]))?JSON[h([112,97,114,115,101])](l(t)):null}function l(t){return window[h([97,116,111,98])](t[h([114,101,112,108,97,99,101])](/-/g,h([43]))[h([114,101,112,108,97,99,101])](/_/g,h([47])))}function u(t){let e=5381;function o(t){for(let o=0;o<t[h([108,101,110,103,116,104])];o++){const n=t[h([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[h([105,115,65,114,114,97,121])](e)?e[h([102,111,114,69,97,99,104])](t):e&&typeof e==h([111,98,106,101,99,116])?Object[h([101,110,116,114,105,101,115])](e)[h([115,111,114,116])]()[h([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[h([83,116,114,105,110,103])](e))}(t),e>>>0}function f(t){return t[h([116,111,83,116,114,105,110,103])](16)[h([112,97,100,83,116,97,114,116])](8,h([48]))}function d(t){return t[h([115,112,108,105,116])]("")[h([114,101,118,101,114,115,101])]()[h([106,111,105,110])]("")}function p(){}function h(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[h([83,116,114,105,110,103])](window[h([112,101,114,102,111,114,109,97,110,99,101])][h([110,111,119])]())[h([114,101,112,108,97,99,101])](h([46]),"");let o=h([117]);for(let n=0;n<t[h([108,101,110,103,116,104])];n+=2){let i=window[h([112,97,114,115,101,73,110,116])](t[h([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[h([108,101,110,103,116,104])]&&(i-=e[h([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=h([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=h([86,97,108,105,100])&&async function(){await s,n[h([109,111,100,101,108])][h([99,104,97,110,103,101])]=p,n[h([109,111,100,101,108])][h([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,n[h([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](h([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==h([71,80,76])?h([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[h([115,112,108,105,116])](h([46]));return 3!=t[h([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=c(t);return e&&o()?e:null;function o(){const t=e[h([106,116,105])],o=window[h([112,97,114,115,101,73,110,116])](t[h([115,117,98,115,116,114,105,110,103])](t[h([108,101,110,103,116,104])]-8),16),n={...e,[h([106,116,105])]:t[h([115,117,98,115,116,114,105,110,103])](0,t[h([108,101,110,103,116,104])]-8)};return delete n[h([118,99])],u(n)==o}}}(),t?(t[h([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[h([80,114,111,109,105,115,101])])(c=>{if(r())return c(h([86,97,108,105,100]));a(),n[h([100,101,99,111,114,97,116,101])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const p=(0,i.uid)();function m(t){return!!t&&(typeof t===h([111,98,106,101,99,116])||typeof t===h([102,117,110,99,116,105,111,110]))&&typeof t[h([116,104,101,110])]===h([102,117,110,99,116,105,111,110])&&typeof t[h([99,97,116,99,104])]===h([102,117,110,99,116,105,111,110])}function g(n){a(n)[h([116,104,101,110])](t=>t&&t[h([115,116,97,116,117,115])]==h([111,107])?f(u(p+e))!=t[h([118,101,114,105,102,105,99,97,116,105,111,110])]?h([85,115,97,103,101,76,105,109,105,116]):h([86,97,108,105,100]):h([85,115,97,103,101,76,105,109,105,116]))[h([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),h([86,97,108,105,100])):h(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[h([116,104,101,110])](c)[h([99,97,116,99,104])](()=>{c(h([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=h([108,108,99,116,45])+f(u(t)),n=d(f(window[h([77,97,116,104])][h([99,101,105,108])](o/i)));window[h([108,111,99,97,108,83,116,111,114,97,103,101])][h([115,101,116,73,116,101,109])](e,n)}function r(){const e=h([108,108,99,116,45])+f(u(t)),o=window[h([108,111,99,97,108,83,116,111,114,97,103,101])][h([103,101,116,73,116,101,109])](e);return o?window[h([112,97,114,115,101,73,110,116])](d(o),16)*i:null}function a(t){return new(window[h([80,114,111,109,105,115,101])])((e,o)=>{t[h([116,104,101,110])](e,o),window[h([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[h([111,110])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,o)=>{if(o[0]!=t)return c(h([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[h([114,101,113,117,101,115,116,73,100])]:p}},{[h([112,114,105,111,114,105,116,121])]:h([104,105,103,104])}),n[h([111,110])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{m(t[h([114,101,116,117,114,110])])&&(l=!0,g(t[h([114,101,116,117,114,110])]))},{[h([112,114,105,111,114,105,116,121])]:h([108,111,119])}),s[h([116,104,101,110])](()=>{l||c(h([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[h([101,100,105,116,105,110,103])][h([118,105,101,119])][h([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==h([97,117,116,111])}function a(){n[h([101,100,105,116,105,110,103])][h([118,105,101,119])][h([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=h([97,117,116,111])}}(t[h([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[h([106,116,105])])),await async function(){let t=!0;try{const n=a[h([115,112,108,105,116])](h([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=c(e);o&&o[h([97,108,103])]==h([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[h([85,105,110,116,56,65,114,114,97,121])][h([102,114,111,109])](l(n),t=>t[h([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[h([84,101,120,116,69,110,99,111,100,101,114])]))[h([101,110,99,111,100,101])](e+h([46])+o),a=window[h([99,114,121,112,116,111])][h([115,117,98,116,108,101])];if(!a)return;const c=await a[h([105,109,112,111,114,116,75,101,121])](h([106,119,107]),r,{[h([110,97,109,101])]:h([69,67,68,83,65]),[h([110,97,109,101,100,67,117,114,118,101])]:h([80,45,50,53,54])},!1,[h([118,101,114,105,102,121])]);await a[h([118,101,114,105,102,121])]({[h([110,97,109,101])]:h([69,67,68,83,65]),[h([104,97,115,104])]:{[h([110,97,109,101])]:h([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[h([102,101,97,116,117,114,101,115])];return!(!e||!e[h([105,110,99,108,117,100,101,115])](h([42]))&&!e[h([105,110,99,108,117,100,101,115])](h([70,79,79])))}()?function(){const e=[h([101,118,97,108,117,97,116,105,111,110]),h([116,114,105,97,108])][h([105,110,99,108,117,100,101,115])](t[h([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1770768e3;return t[h([101,120,112])]<e}()?h([69,120,112,105,114,101,100]):function(){const e=t[h([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[h([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[h([108,111,99,97,116,105,111,110])].href);if(e[h([105,110,99,108,117,100,101,115])](o))return!0;const n=o[h([115,112,108,105,116])](h([46]));return e[h([102,105,108,116,101,114])](t=>t[h([105,110,99,108,117,100,101,115])](h([42])))[h([109,97,112])](t=>t[h([115,112,108,105,116])](h([46])))[h([102,105,108,116,101,114])](t=>t[h([108,101,110,103,116,104])]<=n[h([108,101,110,103,116,104])])[h([109,97,112])](t=>Array(n[h([108,101,110,103,116,104])]-t[h([108,101,110,103,116,104])])[h([102,105,108,108])](t[0]===h([42])?h([42]):"")[h([99,111,110,99,97,116])](t))[h([115,111,109,101])](t=>n[h([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===h([42])))}()?(t[h([108,105,99,101,110,115,101,84,121,112,101])]==h([101,118,97,108,117,97,116,105,111,110])&&(e=function(t){const e=[new(window[h([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[h([116,104,101,110])](()=>new(window[h([80,114,111,109,105,115,101])])(t=>{let e=0;n[h([109,111,100,101,108])][h([111,110])](h([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][h([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,1512==e&&(t(),o[h([111,102,102])]())})}))];return window[h([80,114,111,109,105,115,101])][h([114,97,99,101])](e)[h([116,104,101,110])](()=>t)}(h([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),await(e&&p?new(window[h([80,114,111,109,105,115,101])])((t,o)=>{e[h([116,104,101,110])](t,o),p[h([116,104,101,110])](e=>{e!=h([86,97,108,105,100])&&t(e)},o)}):e||p||h([86,97,108,105,100]))):h([68,111,109,97,105,110,76,105,109,105,116]):h([78,111,116,65,108,108,111,119,101,100]):h([73,110,118,97,108,105,100])):h([73,110,118,97,108,105,100]))}catch{return h([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(p).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),o.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(p).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(i.reference,"on")}),o.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:o,editing:n}=t,{t:i}=t.locale;o.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:o})=>{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;o.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of n.view.createRangeIn(i))t.is("$textProxy")?o.consume(t.textNode,{name:!0}):t.is("element")&&o.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),o.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>x(t,e)}),o.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:o})=>{const n=t.getAttribute("footnoteCounter");return(0,e.toWidget)(x(t,o),o,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",n)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:o}=t.locale,{conversion:n}=t;n.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),n.for("upcast").add(t=>{t.on("element:ol",(t,e,o)=>{const n=e.viewItem;if(!n.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!o.consumable.consume(n,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=o.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,o)=>{const n=e.viewItem;n.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&o.consumable.consume(n,{name:!0,classes:"footnotes-divider"})})}),n.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>E(e)}),n.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:n})=>{const i=E(n,{"data-footnotes-list-label":o("Footnotes")}),s=(0,e.toWidget)(i,n,{hasSelectionHandle:!0,label:o("Footnotes")});return n.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:o}=t,n=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,o)=>{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(!o.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=o.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!o.safeInsert(r,e.modelCursor))return;o.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")&&(o.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),o.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(n)o.convertChildren(a,r);else{const t=o.writer.createElement("footnoteInlineContent");o.writer.insert(t,r),o.convertChildren(a,t)}o.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>A(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>A(t,e,o)})}_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 o=t.document.differ,n=new Set;for(const t of o.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&n.add(e)}for(const t of n.values()){const o=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of o)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 o=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:o,t:n}=t,i=t.model.document.selection;t.keystrokes.set("Ctrl+Alt+F","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert footnote"),keystroke:"Ctrl+Alt+F"}]}),this.listenTo(o.view.document,"enter",(t,e)=>{const o=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(o){const n=o.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(n),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 o=!1;this.listenTo(e.view.document,"pointerdown",(t,n)=>{const{target:i}=n,s=e.view.document.selection;o=!!(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:n}=e;if(!n?.is("element","a"))return;if(n.parent?.is("element","sup")&&n.parent.hasClass("footnote")&&!o)return void e.preventDefault();let i=n.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:o})=>{if(!k(e))return null;if(!t)return o.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const n=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}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 o=e.toViewElement(t);return!!o&&k(t)!==o.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function E(t,e={}){const o=t.createEmptyElement("hr",{class:"footnotes-divider"}),n=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[o,n])}function x(t,e){const o=t.getAttribute("footnoteId"),n=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+o},function(t){const e=this.toDomElement(t);return e.textContent=n,e}),s=e.createContainerElement("sup",{id:"ref-"+o,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function A(t,o,n,{dataPipeline:i}={}){const{t:s}=n,r=t.getAttribute("footnoteId"),a=o.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?o.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(o.createEditableElement("div",{class:"footnote-content"}),o,{label:s("Footnote content.")});return o.insert(o.createPositionAt(c,0),o.createSlot()),o.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var T=o(331);const D=S;function P(){const t=["isPremiumPlugin","footnoteRef","getFirstRange","_handleCopyFootnotesDefinitions","setData","requires","entries","init","append","5511176DIkNFA","createElement","8118061WsokfN","end","parse","remove","getFootnote","definition","keys","getRanges","application/ckeditor5-footnotes","2830530sVfoeO","setAttribute","getFootnotes","getSelectedBlocks","from","flatMap","getData","footnoteId","toView","footnotesDefinitions","219796LEyJmd","_defineClipboardIntegration","data","createRangeIn","config","hasAttribute","htmlProcessor","method","listenTo","includes","15ITSBiJ","find","242308hIklax","clipboardInput","dataTransfer","getFootnotesDefinitionsObjectElement","add","get","contentInsertion","change","selection","toData","document","root","cloneElement","getAttribute","element","27457056mpZnNq","sourceEditorId","pluginName","stringify","footnoteInlineContent","string","content","insert","drop","outputTransformation","footnoteDefinition","toModel","reduce","editor","_insertEmptyFootnotesDefinitionsContainer","editing","create","6KnSwtA","isOfficialPlugin","getChildren","push","FootnotesClipboard","length","331002uuWlnH","_handlePasteFootnotesDefinitions","footnotes.multiBlock"];return(P=function(){return t})()}function S(t,e){const o=P();return(S=function(t,e){return o[t-=135]})(t,e)}!function(t){const e=S,o=t();for(;;)try{if(633349===parseInt(e(140))/1+-parseInt(e(185))/2+-parseInt(e(163))/3+-parseInt(e(173))/4*(-parseInt(e(183))/5)+parseInt(e(217))/6*(-parseInt(e(154))/7)+-parseInt(e(152))/8+parseInt(e(200))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(P);class _ extends t.Plugin{static get[D(202)](){return D(138)}static get[D(148)](){return[v,T.ClipboardPipeline]}static get[D(135)](){return!0}static get[D(143)](){return!0}[D(150)](){this[D(174)]()}[D(174)](){const t=D;this[t(146)](),this[t(141)]()}[D(146)](){const t=D,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(190)](T.ClipboardPipeline),s=o[t(190)](p);this[t(181)](i,t(209),(o,i)=>{const r=t,a=V(n[r(176)](i[r(206)]));if(!a[r(139)])return;const c=s[r(165)](),l=a[r(212)]((t,o)=>{const n=r,i=c[n(184)](t=>t.id===o);if(i){const o=e[n(175)][n(171)](i[n(159)],{isClipboardPipeline:!0}),s=e[n(175)][n(179)][n(194)](o);t[i.id]=s}return t},Object[r(216)](null));i[r(187)][r(147)](r(162),JSON[r(203)](l))})}[D(141)](){const t=D,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(215)],r=n[t(190)](T.ClipboardPipeline),a=n[t(190)](p),c=e[t(177)][t(190)](t(142));let l=null;this[t(181)](s[t(195)],t(186),(e,o)=>{const n=t,i=o[n(187)][n(169)](n(162));l=i?JSON[n(156)](i):null}),this[t(181)](r,t(191),(n,s)=>{const r=t,u=s[r(201)]===this[r(213)].id;u&&r(208)===s[r(180)]||o[r(192)](t=>{const n=r;let f=a[n(188)]();const d=!!f&&Array[n(167)](o[n(195)][n(193)][n(166)]())[n(182)](f);if(!l&&function(t){const e=n;for(const{item:o}of t)if(o.is(e(199),e(144)))return!0;return!1}(o[n(176)](s[n(206)]))&&(l=function(t,e){const o=n,i=L(t,e);if(!i)return null;const s=Object[o(216)](null);for(const e of i[o(136)]())e.is(o(199),o(210))&&e[o(178)](o(170))&&(s[e[o(198)](o(170))]=t[o(197)](e,!0));return Object[o(160)](s)[o(139)]?s:null}(t,s[n(206)])),(f&&!d||!f&&!l)&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(176)](e))n.is(o(199),o(172))&&i[o(137)](n);for(const e of i)t[o(157)](e)}(t,s[n(206)]),!l)return;const{selection:p}=o[n(195)],h=p[n(145)]()[n(196)];f&&!d||(f=L(t,s[n(206)]),f||=a[n(214)](t,h));const m=Array[n(167)](p[n(161)]())[n(168)](V),g=function(t,e,o){const s=n,r=Object[s(216)](null);for(const{item:n}of t[s(176)](e))if(n.is(s(199),s(144))){const e=n[s(198)](s(170));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(164)](s(170),r[e],n)}return r}(t,s[n(206)],t=>{const e=n;return!u||!!a[e(158)](t)&&!m[e(182)](t)});for(const[o,i]of Object[n(149)](l)){const s=g[o]||o;let r;if(n(205)!=typeof i)r=i,s!==o&&t[n(164)](n(170),s,r);else{r=t[n(153)](n(210),{footnoteId:s});const o=e[n(175)][n(179)][n(171)](i);let a;if(c)a=e[n(175)][n(211)](o,r);else{a=t[n(153)](n(204));const i=e[n(175)][n(211)](o,a);t[n(207)](i,a)}t[n(151)](a,r)}t[n(207)](r,f,n(155))}l=null})})}}function L(t,e){const o=D;for(const{item:n}of t[o(176)](e))if(n.is(o(199),o(172)))return n;return null}function V(t){const e=D,o=new Set;for(const{item:n}of t)n.is(e(199),e(144))&&o[e(189)](n[e(198)](e(170)));return Array[e(167)](o)}var N=o(311),O=o(355),R=o(929),K=o.n(R),j=o(297),M=o.n(j),W=o(102),B=o.n(W),z=o(123),U=o.n(z),q=o(741),H=o.n(q),X=o(728),J={attributes:{"data-cke":!0}};J.setAttributes=U(),J.insert=B().bind(null,"head"),J.domAPI=M(),J.insertStyleElement=H();K()(X.A,J);X.A&&X.A.locals&&X.A.locals;class Z extends t.Plugin{licenseKey;_licenseKeyCheckInterval;static get pluginName(){return"FootnotesUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;e.add("insertFootnote",G(t,N.ButtonView)),e.add("menuBar:insertFootnote",G(t,N.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const o=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in o){const n=e,i=o[n];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete o[n],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&o._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&o._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&o._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&o._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&o._showLicenseError("evaluationLimit"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function G(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof N.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(o,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:O.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}function Y(){var t=["requires","isPremiumPlugin","11153376YFKkkN","1734930GsDuCN","4818205odQWiY","Footnotes","12VrDKJz","1328190FWpjKo","231582XLuUWy","11orxEER","16BTTCVJ","pluginName","7471770UhiFPA","36CNqHHu","14708XKreBp","103TvqHFS","isOfficialPlugin"];return(Y=function(){return t})()}var Q=$;function $(t,e){var o=Y();return($=function(t,e){return o[t-=499]})(t,e)}!function(t){for(var e=$,o=t();;)try{if(435886===parseInt(e(502))/1*(parseInt(e(501))/2)+-parseInt(e(512))/3*(-parseInt(e(500))/4)+-parseInt(e(511))/5*(parseInt(e(510))/6)+-parseInt(e(508))/7+-parseInt(e(514))/8*(-parseInt(e(507))/9)+-parseInt(e(499))/10*(-parseInt(e(513))/11)+-parseInt(e(506))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Y);class tt extends t.Plugin{static get[Q(515)](){return Q(509)}static get[Q(504)](){return[v,_,Z]}static get[Q(503)](){return!0}static get[Q(505)](){return!0}}const et=nt;function ot(){const t=["360eigmEc","decimal","lower-roman","decimal-leading-zero","70yvtcYc","lower-alpha","360896UTuGhV","13497DHfTBq","33834IIaBhv","1197508QWlfiQ","1150930xRPTHH","upper-roman","upper-latin","lower-latin","2746tbpJpt","273NRKqiq","9uqujhM","294469lOJzDL","upper-alpha"];return(ot=function(){return t})()}function nt(t,e){const o=ot();return(nt=function(t,e){return o[t-=450]})(t,e)}!function(t){const e=nt,o=t();for(;;)try{if(155785===parseInt(e(461))/1+-parseInt(e(458))/2*(parseInt(e(459))/3)+-parseInt(e(453))/4+parseInt(e(454))/5+parseInt(e(452))/6*(parseInt(e(467))/7)+-parseInt(e(450))/8*(parseInt(e(460))/9)+parseInt(e(463))/10*(parseInt(e(451))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ot);const it=[et(464),et(466),et(457),et(456),et(468),et(462),et(465),et(455)];function st(){const t=["includes","execute","4fVWfHM","6410547FdTEnU","plugins","17954XInNXQ","setAttribute","248dXXhwT","getFootnotesDefinitionsObjectElement","isEnabled","getAttribute","51087VGwkJo","1213653NtQcIj","footnotesListStyle","20687480WOxusu","model","_updateFootnotesCounters","refresh","88ujXUIA","7926840sdzxbb","get","9828555MFumoS","change","value"];return(st=function(){return t})()}const rt=at;function at(t,e){const o=st();return(at=function(t,e){return o[t-=488]})(t,e)}!function(t){const e=at,o=t();for(;;)try{if(997839===-parseInt(e(489))/1*(-parseInt(e(510))/2)+parseInt(e(495))/3*(parseInt(e(491))/4)+-parseInt(e(505))/5+parseInt(e(503))/6+parseInt(e(496))/7*(parseInt(e(502))/8)+parseInt(e(511))/9+-parseInt(e(498))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(st);class ct extends t.Command{[rt(501)](){const t=rt,{editor:e}=this,o=e[t(488)][t(504)](p)[t(492)]();this[t(493)]=!!o,this[t(507)]=o?.[t(494)](t(497))??null}[rt(509)]({value:t}){const e=rt,{editor:o}=this,n=o[e(488)][e(504)](p),i=n[e(492)]();i&&it[e(508)](t)&&o[e(499)][e(506)](o=>{const s=e;o[s(490)](s(497),t,i),n[s(500)](o)})}}const lt=ft;function ut(){const t=["1285800MUPWlc","646FXvnYY","7335180QBazaw","481tRknvC","50936qJIvag","change","366seXjDm","execute","get","footnotesListStart","getAttribute","getFootnotesDefinitionsObjectElement","50175Eqndbc","value","13XKpvcm","refresh","_updateFootnotesCounters","512AhNnjk","isEnabled","77jRzlyv","3411926WmeJKN","621YibfFP","setAttribute","plugins","4632eeRAHy","model","isInteger"];return(ut=function(){return t})()}function ft(t,e){const o=ut();return(ft=function(t,e){return o[t-=476]})(t,e)}!function(t){const e=ft,o=t();for(;;)try{if(498100===parseInt(e(482))/1*(-parseInt(e(480))/2)+-parseInt(e(476))/3*(parseInt(e(496))/4)+-parseInt(e(491))/5*(parseInt(e(485))/6)+-parseInt(e(499))/7+parseInt(e(483))/8*(parseInt(e(500))/9)+parseInt(e(479))/10*(parseInt(e(498))/11)+parseInt(e(481))/12*(parseInt(e(493))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ut);class dt extends t.Command{[lt(494)](){const t=lt,{editor:e}=this,o=e[t(502)][t(487)](p)[t(490)]();this[t(497)]=!!o,this[t(492)]=o?.[t(489)](t(488))??null}[lt(486)]({value:t}){const e=lt,{editor:o}=this,n=o[e(502)][e(487)](p),i=n[e(490)]();i&&Number[e(478)](t)&&o[e(477)][e(484)](o=>{const s=e;o[s(501)](s(488),t,i),n[s(495)](o)})}}function pt(){const t=["downcast","328349WJgUnQ","createRangeOn","item","element:ol","toLowerCase","checkAttribute","parent","extend","upper-roman","insert","decimal","footnotesListStart","modelCursor","consumable","add","7550715tmEtXO","694337EwDKbi","plugins","lower-latin","8786050KrEgNA","getChanges","decimal-leading-zero","16xLfaDj","attribute:footnotesListStyle:footnotesDefinitions","upper-latin","96219ePunUi","footnotesStyle","schema","type","_updateFootnotesCounters","writer","attribute:footnotesListStart:footnotesDefinitions","from","get","upcast","footnotes.footnotesProperties.defaultListStyle","element","isPremiumPlugin","hasAttribute","toViewElement","_defineFormatter","footnotesDefinitions","document","fromCharCode","define","_getDefaultStartIndex","lower-roman","FootnotesPropertiesEditing","hasClass","footnotes-list","config","toUpperCase","getStyle","_defineSchema","removeStyle","36UbcIjc","setStyle","footnotesStart","1472206ErdZfI","for","parseInt","position","nodeAfter","max","$text","commands","setFootnoteFormatter","footnotesListStyle","_definePostfixer","81hVAYQt","differ","init","removeAttribute","lower-alpha","21992iYwIDl","floor","editor","registerPostFixer","start","getChildren","_defineConverters","setAttribute","getAttribute","viewItem","isOfficialPlugin","padStart","model","consume","footnotes.footnotesProperties.defaultStartIndex","requires","mapper","find","_getDefaultListStyle","upper-alpha","pluginName","isNaN","getItems","list-style-type","name","_formatFootnoteListValue"];return(pt=function(){return t})()}const ht=wt;!function(t){const e=wt,o=t();for(;;)try{if(882183===-parseInt(e(194))/1+-parseInt(e(252))/2+-parseInt(e(219))/3*(-parseInt(e(216))/4)+parseInt(e(209))/5+-parseInt(e(249))/6*(parseInt(e(210))/7)+parseInt(e(268))/8*(parseInt(e(263))/9)+parseInt(e(213))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(pt);class mt extends t.Plugin{static get[ht(187)](){return ht(241)}static get[ht(182)](){return[v,p]}static get[ht(177)](){return!0}static get[ht(231)](){return!0}[ht(265)](){const t=ht,{editor:e}=this;e[t(244)][t(238)](t(229),t(204)),e[t(244)][t(238)](t(181),1),e[t(259)][t(208)](t(220),new ct(e)),e[t(259)][t(208)](t(251),new dt(e)),this[t(247)](),this[t(274)](),this[t(234)](),this[t(262)]()}[ht(247)](){const t=ht,{editor:e}=this,{schema:o}=e[t(179)];o[t(201)](t(235),{allowAttributes:[t(261),t(205)]})}[ht(274)](){const t=ht,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(253)](t(228))[t(208)](e=>{const o=t;e.on(o(197),(t,e,n)=>{const s=o,r=e[s(176)],a=e[s(206)]?.[s(200)];r[s(242)](s(243))&&a?.is(s(230),s(235))&&(function(t,e,o,n){const i=s;if(!n[i(199)](e,i(205)))return;let r=1;const a=o[i(207)][i(180)](t,{attributes:i(272)});if(a){const e=Number[i(254)](t[i(175)](i(272)),10);Number[i(188)](e)||(r=e)}!a&&e[i(232)](i(205))||o[i(224)][i(275)](i(205),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(199)](e,i(261)))return;let r=i(204),a=!1;if(o[i(207)][i(180)](t,{attributes:i(222)})){const e={1:i(204),a:i(267),A:i(186),i:i(240),I:i(202)}[t[i(175)](i(222))];e&&(r=e),a=!0}o[i(207)][i(180)](t,{styles:i(190)})&&(r=function(t){const e=i;switch(t){case e(267):return e(212);case e(186):return e(218);default:return t}}(t[i(246)](i(190))),a=!0),!a&&e[i(232)](i(261))||o[i(224)][i(275)](i(261),r,e)}(r,a,n,i))})}),o[t(253)](t(193))[t(208)](e=>{const o=t;e.on(o(225),(t,e,n)=>{const i=o;if(!n[i(207)][i(180)](e[i(196)],t[i(191)]))return;const s=gt(e[i(196)],n[i(183)]),{attributeNewValue:r}=e;null==r||1===r?n[i(224)][i(266)](i(272),s):n[i(224)][i(275)](i(272),String(r),s)}),e.on(o(217),(t,e,n)=>{const i=o;if(!n[i(207)][i(180)](e[i(196)],t[i(191)]))return;const s=gt(e[i(196)],n[i(183)]),{attributeNewValue:r}=e;r&&i(204)!==r?n[i(224)][i(250)](i(190),r,s):n[i(224)][i(248)](i(190),s)})})}[ht(262)](){const t=ht,{editor:e}=this,{model:o}=e,n=e[t(211)][t(227)](p),i=this[t(185)](),s=this[t(239)]();o[t(236)][t(271)](e=>{const r=t,a=o[r(236)][r(264)][r(214)]();let c=!1;for(const t of a){if(r(203)!==t[r(222)]||r(258)===t[r(191)])continue;const n=o[r(195)](t[r(255)][r(256)]);for(const t of n[r(189)]())t.is(r(230),r(235))&&(!t[r(232)](r(205))&&o[r(221)][r(199)](t,r(205))&&(e[r(275)](r(205),s,t),c=!0),!t[r(232)](r(261))&&o[r(221)][r(199)](t,r(261))&&(e[r(275)](r(261),i,t),c=!0))}return c&&n[r(223)](e),c})}[ht(234)](){const t=ht,{editor:e}=this;e[t(211)][t(227)](p)[t(260)](e=>this[t(192)](e))}[ht(185)](){const t=ht;return this[t(270)][t(244)][t(227)](t(229))}[ht(239)](){const t=ht;return this[t(270)][t(244)][t(227)](t(181))}[ht(192)]({container:t,value:e,digits:o}){const n=ht,i=t[n(175)](n(261)),s=t[n(175)](n(205)),r=Math[n(269)](e)+(s??1)-1;switch(i){case n(215):return function(t,e){const o=n;return String(t)[o(178)](e,"0")}(r,Math[n(257)](2,o));case n(267):case n(212):return yt(r,!1);case n(186):case n(218):return yt(r,!0);case n(240):return vt(r,!1);case n(202):return vt(r,!0);default:return String(r)}}}function gt(t,e){const o=ht,n=e[o(233)](t);return Array[o(226)](n[o(273)]())[o(184)](t=>t.is(o(230),"ol")&&t[o(242)](o(243)))}function wt(t,e){const o=pt();return(wt=function(t,e){return o[t-=175]})(t,e)}function yt(t,e){const o=ht;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(237)](97+t)+n,i=Math[o(269)]((i-1)/26)}return e?n[o(245)]():n}const bt=[{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 vt(t,e){const o=ht;let n="",i=t;for(const{value:t,numeral:e}of bt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(198)]()}class It extends N.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new N.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new N.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,o),[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,N.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 o=new N.View(this.locale);return o.children=o.createCollection(),o.children.addMany(t),o.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:o.children}),o.children.delegate("execute").to(this),o.focus=function(){for(const t of this.children)if(t instanceof N.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},o.focusTracker=new i.FocusTracker,o.keystrokes=new i.KeystrokeHandler,o.render(),o.keystrokes.listenTo(o.element),this.children.add(o),o}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),o=[e],n=new N.CollapsibleView(this.locale,o);return n.set({label:t("Footnotes properties"),isCollapsed:!0}),n.buttonView.bind("isEnabled").toMany(o,"isEnabled",(...t)=>t.some(t=>t)),n.buttonView.on("change:isEnabled",(t,e,o)=>{o||(n.isCollapsed=!0)}),this.children.add(n),[e,n]}_createStartIndexPropertyView(){const{t}=this.locale,e=new N.LabeledFieldView(this.locale,N.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 o=e.fieldView.element,n=o.valueAsNumber;Number.isNaN(n)?e.errorText=t("Invalid footnotes start index value."):o.checkValidity()?this.fire("footnotesListStart",{startIndex:n}):e.errorText=t(n<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var kt=o(291),Ct={attributes:{"data-cke":!0}};Ct.setAttributes=U(),Ct.insert=B().bind(null,"head"),Ct.domAPI=M(),Ct.insertStyleElement=H();K()(kt.A,Ct);kt.A&&kt.A.locals&&kt.A.locals;class Ft extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[N.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var o;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(o=t,t=>{const{t:e}=t,n=o.commands.get("footnotesStyle"),i=(0,N.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(n,"isEnabled"),s.set({label:e("Footnotes style"),icon:O.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:o}=t.locale,n=o("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:O.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:O.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:O.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:O.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:O.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:O.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:o,icon:n,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new N.ButtonView(e);return a.set({label:o,icon:n,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 It(t.locale,{styleGridAriaLabel:n,styleButtonViews:i}),r=t.commands.get("footnotesStart");return s.startIndexFieldView.bind("isEnabled").to(r),s.startIndexFieldView.fieldView.bind("value").to(r),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s.delegate("execute").to(e),s}({editor:o,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:o}=t.locale,n=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=N.BalloonPanelView;n.register("footnotesDefinitions",{ariaLabel:o("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}var Et=xt;function xt(t,e){var o=At();return(xt=function(t,e){return o[t-=223]})(t,e)}function At(){var t=["requires","10ctaqKr","27OLPIIL","isPremiumPlugin","5844rtyamc","33416lrrtZE","isOfficialPlugin","FootnotesProperties","916497AOpCbO","46640ZtRVjz","968vUTHwz","14ZkDtCn","5656zzVWvx","356275UJPEpa","107ffomMA","815196uBzbNR","pluginName"];return(At=function(){return t})()}!function(t){for(var e=xt,o=t();;)try{if(156822===parseInt(e(224))/1*(parseInt(e(239))/2)+parseInt(e(229))/3*(parseInt(e(232))/4)+parseInt(e(223))/5+-parseInt(e(225))/6+-parseInt(e(238))/7*(parseInt(e(236))/8)+parseInt(e(235))/9*(-parseInt(e(228))/10)+parseInt(e(237))/11*(-parseInt(e(231))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(At);class Tt extends t.Plugin{static get[Et(226)](){return Et(234)}static get[Et(227)](){return[mt,Ft]}static get[Et(233)](){return!0}static get[Et(230)](){return!0}}function Dt(){var t=["5320458hHoWCr","18672488YeDpxf","1542578xHTLYs","4vBWqiR","2226088jWIsMD","4916555WybZzD","4195527cazEHV","5744665omWggA"];return(Dt=function(){return t})()}function Pt(t,e){var o=Dt();return(Pt=function(t,e){return o[t-=315]})(t,e)}!function(t){for(var e=Pt,o=t();;)try{if(827293===parseInt(e(319))/1+-parseInt(e(321))/2+parseInt(e(315))/3+parseInt(e(320))/4*(parseInt(e(316))/5)+parseInt(e(317))/6+-parseInt(e(322))/7+-parseInt(e(318))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Dt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x3eb2b6,Command as _0x344bd1}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x192168,isWidget as _0x335e2d,toWidgetEditable as _0x4071db,WidgetToolbarRepository as _0x2198c7}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x21759c,logWarning as _0x11e2d4,FocusTracker as ot,KeystrokeHandler as rt,global as nt}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x4c3c27,ClickObserver as _0x35818a}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x3c5634}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x280159,ButtonView as _0x50a4fc,View as _0x541b03,ViewCollection as _0x474080,FocusCycler as _0xae8ef8,addKeyboardHandlingForGrid as tt,CollapsibleView as st,LabeledFieldView as it,createLabeledInputNumber as et,ContextualBalloon as _0x23b049,BalloonPanelView as _0x2930c1,createDropdown as _0x43fc65}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x28d033,IconListStyleDecimal as _0xd223d4,IconListStyleDecimalLeadingZero as _0xd57c0,IconListStyleLowerRoman as _0x38c7c0,IconListStyleUpperRoman as _0x5e7c7a,IconListStyleLowerLatin as _0x32c0f0,IconListStyleUpperLatin as _0x556717}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x1a7270,_0x3c093e){this['_model']=_0x1a7270,this['_elementName']=_0x3c093e['elementName'],this['_getElementKey']=_0x3c093e['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x3de86a){const _0x43743d=new Set(),_0x3cf0e9=new Map();for(const _0x5f5705 of _0x3de86a){if('insert'===_0x5f5705['type']&&'$text'!==_0x5f5705['name']&&_0x5f5705['position']['nodeAfter']){const _0x49982c=this['_model']['createRangeOn'](_0x5f5705['position']['nodeAfter']);for(const _0x44c6af of _0x49982c['getItems']()){if(!_0x44c6af['is']('element',this['_elementName']))continue;const _0xf8599a=this['_getElementKey'](_0x44c6af);_0x3cf0e9['has'](_0xf8599a)||_0x3cf0e9['set'](_0xf8599a,[]),_0x3cf0e9['get'](_0xf8599a)['push'](_0x44c6af);}}if('remove'===_0x5f5705['type']&&_0x5f5705['name']===this['_elementName']){const _0x5571a1=this['_getElementKey']({'getAttribute':_0x5d244b=>_0x5f5705['attributes']['get'](_0x5d244b)});_0x43743d['add'](_0x5571a1);}}for(const [_0x5ad58e,_0x2c71c1]of this['_trackedElements'])'$graveyard'===_0x2c71c1['root']['rootName']&&_0x43743d['add'](_0x5ad58e);for(const _0x2624fd of _0x43743d)this['_trackedElements']['delete'](_0x2624fd);for(const [_0x1cbc0c,_0x4b3056]of _0x3cf0e9)this['_trackedElements']['set'](_0x1cbc0c,_0x4b3056[_0x4b3056['length']-0x1]);const _0x3c5a75=new Set();for(const [_0x2b5799,_0x45d8c2]of _0x3cf0e9)_0x43743d['has'](_0x2b5799)&&(_0x3c5a75['add'](_0x45d8c2[0x0]),_0x45d8c2['length']>0x1?_0x3cf0e9['set'](_0x2b5799,_0x45d8c2['slice'](0x1)):_0x3cf0e9['delete'](_0x2b5799),_0x43743d['delete'](_0x2b5799));return{'removed':Array['from'](_0x43743d),'inserted':Array['from'](_0x3cf0e9['values']())['flat'](),'moved':Array['from'](_0x3c5a75)};}}class f extends _0x3eb2b6{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4153d7){super(_0x4153d7),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x2eebd7=>_0x2eebd7['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x5daf36=>_0x5daf36['getAttribute']('footnoteId')});}['init'](){const {editor:_0x41e53a}=this,{model:_0x508aac,data:_0x464a01}=_0x41e53a;_0x508aac['document']['registerPostFixer'](_0x315a2c=>{const _0x4f25cd=_0x508aac['document']['differ']['getChanges']();let _0x1c9243=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x315a2c,_0x4f25cd)&&(_0x1c9243=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x315a2c,_0x4f25cd)&&(_0x1c9243=!0x0),this['_handleFootnoteReferencesChanges'](_0x315a2c,_0x4f25cd)&&(_0x1c9243=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x315a2c)&&(_0x1c9243=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x315a2c)&&(_0x1c9243=!0x0),this['_sortFootnoteDefinitions'](_0x315a2c)&&(_0x1c9243=!0x0),_0x1c9243;}),this['listenTo'](_0x508aac['document'],'change:data',()=>{_0x508aac['enqueueChange']({'isUndoable':!0x1},_0x25e168=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x25e168);});},{'priority':'low'}),this['listenTo'](_0x464a01,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x4aae12){return this['_footnotes']['find'](_0x1547bc=>_0x1547bc['id']===_0x4aae12)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x46ca8e){this['_footnoteFormatter']=_0x46ca8e;}['_updateFootnotesCounters'](_0x337c4d,_0x185573=0x0){let _0x4f6dea=!0x1;for(let _0x1a506d=_0x185573;_0x1a506d<this['_footnotes']['length'];_0x1a506d++)this['_updateFootnoteRefCounter'](_0x337c4d,_0x1a506d)&&(_0x4f6dea=!0x0);return _0x4f6dea;}['_insertEmptyFootnotesDefinitionsContainer'](_0x3e504f,_0x40e4eb){const _0x41ec1f=_0x3e504f['createElement']('footnotesDefinitions',{});return _0x3e504f['append'](_0x41ec1f,_0x40e4eb),this['_footnotesDefinitions']=_0x41ec1f,_0x41ec1f;}['_ensureFootnotesDefinitionsContainerExists'](_0x45c190){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x211294=this['_footnotes'][0x0]['reference']['root'],_0x5cf6ff=this['_insertEmptyFootnotesDefinitionsContainer'](_0x45c190,_0x211294);for(const _0x2e1172 of this['_footnotes'])_0x2e1172['definition']['parent']||_0x45c190['insert'](_0x2e1172['definition'],_0x5cf6ff,'end');this['_updateFootnotesCounters'](_0x45c190);}['_handleFootnotesDefinitionsObjectChanges'](_0x1b6f50,_0x5ac88b){let _0x3382d2=!0x1;const {inserted:_0x4c8615,removed:_0x2ab972,moved:_0x5c6490}=this['_footnoteDefsContainerTracker']['getChanges'](_0x5ac88b);if(_0x5c6490['length']&&(this['_footnotesDefinitions']=_0x5c6490[0x0]),_0x4c8615['length']){if(_0x4c8615['length']>0x1||this['_footnotesDefinitions']&&_0x4c8615['some'](_0x1cbba5=>_0x1cbba5!==this['_footnotesDefinitions'])){const _0x1bca66=_0x1b6f50['createElement']('footnotesDefinitions',{}),_0x3a9a4a=[];this['_footnotesDefinitions']&&_0x3a9a4a['push'](this['_footnotesDefinitions']),_0x3a9a4a['push'](..._0x4c8615),_0x1b6f50['insert'](_0x1bca66,_0x3a9a4a[0x0],'before');for(const _0x5a4ad3 of _0x3a9a4a)_0x1b6f50['move'](_0x1b6f50['createRangeIn'](_0x5a4ad3),_0x1b6f50['createPositionAt'](_0x1bca66,'end')),_0x1b6f50['remove'](_0x5a4ad3);this['_footnotesDefinitions']=_0x1bca66,this['_updateFootnotesCounters'](_0x1b6f50),_0x3382d2=!0x0;}else this['_footnotesDefinitions']=_0x4c8615[0x0];}if(_0x2ab972['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x5a5c3d of this['_footnotes'])_0x1b6f50['remove'](_0x5a5c3d['reference']),_0x3382d2=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x3382d2;}['_handleFootnoteDefinitionsChanges'](_0x2789cb,_0x34d5c6){let _0x4c9b7b=!0x1;const _0x517058=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x1762a3,moved:_0x520ab3}=this['_footnoteDefsTracker']['getChanges'](_0x34d5c6);for(const _0x2668fc of[..._0x520ab3,..._0x1762a3]){const _0x4f0f38=_0x2668fc['getAttribute']('footnoteId'),_0x77a602=this['getFootnote'](_0x4f0f38);_0x77a602&&(_0x77a602['definition']=_0x2668fc),_(_0x2789cb,_0x517058,_0x2668fc)&&(_0x4c9b7b=!0x0);}return _0x4c9b7b;}['_handleFootnoteReferencesChanges'](_0xcae05b,_0x133c46){let _0x5d85a4=!0x1;const {removed:_0x61aa42,inserted:_0x404853,moved:_0x2a89ce}=this['_footnoteRefsTracker']['getChanges'](_0x133c46);for(const _0x5e136f of _0x61aa42)this['_handleRemoveFootnoteReferenceById'](_0xcae05b,_0x5e136f)&&(_0x5d85a4=!0x0);for(const _0x35aefd of _0x404853)this['_handleInsertedFootnoteReference'](_0xcae05b,_0x35aefd)&&(_0x5d85a4=!0x0);for(const _0x497f7e of _0x2a89ce)this['_handleMovedFootnoteReference'](_0xcae05b,_0x497f7e)&&(_0x5d85a4=!0x0);return _0x5d85a4;}['_handleFootnotesDefinitionsObjectSync'](_0x5a82a5){if(!this['_footnotesDefinitions'])return!0x1;let _0x1254d6=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x1336b2=[];for(const _0x34646f of this['_footnotesDefinitions']['getChildren']()){const _0x436c82=_0x34646f['getAttribute']('footnoteId');this['getFootnote'](_0x436c82)||(_0x1336b2['unshift'](_0x34646f),_0x1254d6=!0x0);}for(const _0xe8f631 of _0x1336b2)_0x5a82a5['remove'](_0xe8f631);}const _0x1b561c=new Set(),_0x3b7191=[];for(const _0x122933 of this['_footnotesDefinitions']['getChildren']()){const _0x42fb79=_0x122933['getAttribute']('footnoteId');_0x1b561c['has'](_0x42fb79)?(_0x3b7191['unshift'](_0x122933),_0x1254d6=!0x0):_0x1b561c['add'](_0x42fb79);}for(const _0x180575 of _0x3b7191)_0x5a82a5['remove'](_0x180575);return this['_footnotesDefinitions']['childCount']||(_0x5a82a5['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x1254d6=!0x0),_0x1254d6;}['_handleInsertedFootnoteReference'](_0x4c1ecd,_0x2b681f){if(this['_footnotes']['find'](_0x304501=>_0x304501['reference']===_0x2b681f))return!0x1;let _0x5de10f=!0x1;const _0x190d98=_0x2b681f['getAttribute']('footnoteId'),_0x1e7740=this['_footnotes']['findIndex'](_0x39838b=>_0x39838b['id']===_0x190d98);-0x1!==_0x1e7740&&(_0x4c1ecd['remove'](this['_footnotes'][_0x1e7740]['reference']),this['_footnotes']['splice'](_0x1e7740,0x1),_0x5de10f=!0x0);let _0x56855a=this['_footnotesDefinitions']?function(_0x1f8867,_0x4ca3e5){for(const _0x48ca80 of _0x1f8867['getChildren']())if(_0x48ca80['getAttribute']('footnoteId')===_0x4ca3e5)return _0x48ca80;return null;}(this['_footnotesDefinitions'],_0x190d98):null;_0x56855a||(_0x56855a=_0x4c1ecd['createElement']('footnoteDefinition',{'footnoteId':_0x190d98}),this['_footnotesDefinitions']&&(_0x4c1ecd['insert'](_0x56855a,this['_footnotesDefinitions'],'end'),_0x5de10f=!0x0));const _0x39a54a={'id':_0x190d98,'reference':_0x2b681f,'definition':_0x56855a},_0x4813c3=I(this['editor']['model'],this['_footnotes'],_0x2b681f);this['_footnotes']['splice'](_0x4813c3,0x0,_0x39a54a);let _0x391928=_0x4813c3;return-0x1!==_0x1e7740&&(_0x391928=Math['min'](_0x4813c3,_0x1e7740)),this['_updateFootnotesCounters'](_0x4c1ecd,_0x391928)&&(_0x5de10f=!0x0),_0x5de10f;}['_handleRemoveFootnoteReferenceById'](_0x489d94,_0x41e0db){const _0x1b7938=this['_footnotes']['findIndex'](_0x11cb1e=>_0x11cb1e['id']===_0x41e0db);if(-0x1===_0x1b7938)return!0x1;let _0x58daea=!0x1;const _0x16c4e1=this['_footnotes'][_0x1b7938];return'$graveyard'!==_0x16c4e1['definition']['root']['rootName']&&(_0x489d94['remove'](_0x16c4e1['definition']),_0x58daea=!0x0),this['_footnotes']['splice'](_0x1b7938,0x1),this['_updateFootnotesCounters'](_0x489d94,_0x1b7938)&&(_0x58daea=!0x0),_0x58daea;}['_handleMovedFootnoteReference'](_0x3192f8,_0x43efd8){const _0x45152f=_0x43efd8['getAttribute']('footnoteId'),_0x477e30=this['_footnotes']['findIndex'](_0x289474=>_0x289474['id']===_0x45152f),_0x32e574=this['_footnotes'][_0x477e30];let _0x169ccd=!0x1;_0x32e574['reference']=_0x43efd8,this['_footnotes']['splice'](_0x477e30,0x1);const _0x1566b9=I(this['editor']['model'],this['_footnotes'],_0x43efd8);return this['_footnotes']['splice'](_0x1566b9,0x0,_0x32e574),this['_updateFootnotesCounters'](_0x3192f8,Math['min'](_0x477e30,_0x1566b9))&&(_0x169ccd=!0x0),_0x169ccd;}['_updateFootnoteRefCounter'](_0x425c7b,_0x26ea25){if(!this['_footnotesDefinitions'])return!0x1;const _0x1033f2=this['_footnotes'][_0x26ea25];let _0x378ad8;return _0x378ad8=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x1033f2,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x26ea25+0x1}):String(_0x26ea25+0x1),_0x1033f2['reference']['getAttribute']('footnoteCounter')!=_0x378ad8&&(_0x425c7b['setAttribute']('footnoteCounter',_0x378ad8,_0x1033f2['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x2c3c46){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x1f68b6,_0x34cc41){if(_0x1f68b6['length']!==_0x34cc41['length'])return!0x1;for(let _0x3e2463=0x0;_0x3e2463<_0x1f68b6['length'];_0x3e2463++)if(_0x1f68b6[_0x3e2463]!==_0x34cc41[_0x3e2463])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x25dfae=>_0x25dfae['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x3b35ca=>_0x3b35ca['getAttribute']('footnoteId'))))return!0x1;let _0x114828=!0x1;for(let _0x2230c5=0x0;_0x2230c5<this['_footnotes']['length'];_0x2230c5++){const _0x4d3add=this['_footnotes'][_0x2230c5],_0x23b55d=_0x2c3c46['createPositionBefore'](_0x4d3add['definition']),_0x10e0b4=_0x2c3c46['createPositionAt'](this['_footnotesDefinitions'],_0x2230c5);_0x23b55d['isEqual'](_0x10e0b4)||(_0x2c3c46['move'](_0x2c3c46['createRangeOn'](_0x4d3add['definition']),_0x10e0b4),_0x114828=!0x0);}return _0x114828;}['_ensureFootnotesReferencesHaveProperOrder'](_0x1706be){if(!this['_footnotes']['length'])return!0x1;const {model:_0x15b2c6}=this['editor'];let _0x49ff70=!0x1;for(let _0x351632=0x0;_0x351632<this['_footnotes']['length']-0x1;_0x351632++){const _0x4e077e=this['_footnotes'][_0x351632],_0xc63548=this['_footnotes'][_0x351632+0x1],_0x1ab362=_0x15b2c6['createPositionBefore'](_0x4e077e['reference']),_0x26d3bc=_0x15b2c6['createPositionBefore'](_0xc63548['reference']);'after'===_0x1ab362['compareWith'](_0x26d3bc)&&(this['_handleMovedFootnoteReference'](_0x1706be,_0x4e077e['reference']),_0x351632=-0x1,_0x49ff70=!0x0);}return _0x49ff70;}}function _(_0x2ee7f0,_0x2e172e,_0x444db4){if(_0x444db4['childCount'])return!0x1;const _0x1f9a1b=_0x2e172e?'paragraph':'footnoteInlineContent';return _0x2ee7f0['insert'](_0x2ee7f0['createElement'](_0x1f9a1b),_0x444db4),!0x0;}function I(_0x3852ba,_0x539076,_0x383460){if(0x0===_0x539076['length'])return 0x0;const _0x4ed7a4=_0x3852ba['createPositionBefore'](_0x383460);for(let _0x3d8806=0x0;_0x3d8806<_0x539076['length'];_0x3d8806++){const _0x1496a3=_0x539076[_0x3d8806],_0x289f30=_0x3852ba['createPositionBefore'](_0x1496a3['reference']);if('before'===_0x4ed7a4['compareWith'](_0x289f30))return _0x3d8806;}const _0x9cdccc=_0x383460['root'];let _0x47b6ea=-0x1;for(let _0x4a0935=_0x539076['length']-0x1;_0x4a0935>=0x0;_0x4a0935--)if(_0x539076[_0x4a0935]['reference']['root']===_0x9cdccc){_0x47b6ea=_0x4a0935;break;}if(-0x1!==_0x47b6ea)return _0x47b6ea+0x1;const _0x286385=_0x3852ba['document']['getRootNames'](),_0x2ad7c1=_0x286385['indexOf'](_0x9cdccc['rootName']),_0x3115bb=_0x286385[_0x2ad7c1+0x1];if(_0x3115bb){for(let _0x2ebd87=0x0;_0x2ebd87<_0x539076['length'];_0x2ebd87++)if(_0x539076[_0x2ebd87]['reference']['root']['rootName']===_0x3115bb)return _0x2ebd87;}return _0x539076['length'];}class h extends _0x344bd1{['refresh'](){const _0x2df3a7=this['editor']['model']['document']['selection'],_0x49f174=this['_getPositionToInsertFootnote'](_0x2df3a7);this['isEnabled']=!!_0x49f174;}['execute'](_0x14002e){const {editor:_0x1e9202}=this,{model:_0x80b567}=_0x1e9202,{selection:_0x4df631}=_0x80b567['document'],_0x42d39f=this['_getPositionToInsertFootnote'](_0x4df631);if(!_0x42d39f)return;const _0x3870d8=_0x1e9202['plugins']['get']('FootnotesEditing'),_0x3d18cb=_0x14002e?.['footnoteId']??_0x21759c();!function(_0x1845fa){return'string'==typeof _0x1845fa&&_0x1845fa['length']>0x0&&!/\s/['test'](_0x1845fa)&&!/^\d/['test'](_0x1845fa);}(_0x3d18cb)?_0x11e2d4('insert-footnote-command-executed-with-invalid-id'):(_0x80b567['change'](_0xf50dc6=>{const _0x1bb81a=_0xf50dc6['createElement']('footnoteRef',{'footnoteId':_0x3d18cb});_0x80b567['insertObject'](_0x1bb81a,_0x42d39f,null);}),_0x3870d8['_moveSelectionToFootnoteDefinition'](_0x3d18cb));}['_getPositionToInsertFootnote'](_0x140852){const {model:_0x12277a}=this['editor'],{schema:_0x3cacc0}=_0x12277a,_0x33d9ed=_0x140852['getFirstRange']();for(const _0x1ce192 of _0x33d9ed['getItems']())if(_0x3cacc0['isBlock'](_0x1ce192)||_0x3cacc0['isObject'](_0x1ce192))return null;const _0x32a4e7=_0x33d9ed['end'];return _0x3cacc0['checkChild'](_0x32a4e7,'footnoteRef')?_0x32a4e7:null;}}class r extends _0x3eb2b6{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4dc57f}=this;_0x4dc57f['config']['define']('footnotes.multiBlock',!0x0),_0x4dc57f['commands']['add']('insertFootnote',new h(_0x4dc57f)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x22a6b9){const _0x3d114b=_0x238cb5([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]),_0xa806ec=0x47a28506,_0x544875=0x47a5046e^_0xa806ec,_0x31e9e9=window[_0x238cb5([0x44,0x61,0x74,0x65])][_0x238cb5([0x6e,0x6f,0x77])](),_0x50008f=_0x22a6b9[_0x238cb5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x212140=new window[(_0x238cb5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5b6484=>{_0x50008f[_0x238cb5([0x6f,0x6e,0x63,0x65])](_0x238cb5([0x72,0x65,0x61,0x64,0x79]),_0x5b6484);}),_0x3b1bfe={[_0x238cb5([0x6b,0x74,0x79])]:_0x238cb5([0x45,0x43]),[_0x238cb5([0x75,0x73,0x65])]:_0x238cb5([0x73,0x69,0x67]),[_0x238cb5([0x63,0x72,0x76])]:_0x238cb5([0x50,0x2d,0x32,0x35,0x36]),[_0x238cb5([0x78])]:_0x238cb5([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]),[_0x238cb5([0x79])]:_0x238cb5([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]),[_0x238cb5([0x61,0x6c,0x67])]:_0x238cb5([0x45,0x53,0x32,0x35,0x36])},_0x26adce=_0x50008f[_0x238cb5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x238cb5([0x67,0x65,0x74])](_0x238cb5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x58be84(){let _0x46cca4,_0x395c68=null,_0x300513=null;try{if(_0x26adce==_0x238cb5([0x47,0x50,0x4c]))return _0x238cb5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x46cca4=_0x2ddd69(),!_0x46cca4)return _0x238cb5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x46cca4[_0x238cb5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x300513=_0xfe3a38(_0x46cca4[_0x238cb5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x46cca4[_0x238cb5([0x6a,0x74,0x69])])),await _0x41920e()?_0x2ca113()?_0x267607()?_0x238cb5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x185b9a()?(_0x46cca4[_0x238cb5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x238cb5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x395c68=_0x37efda(_0x238cb5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x435b5c()):_0x238cb5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x238cb5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x238cb5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x238cb5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x267607(){const _0xd55c4e=[_0x238cb5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x238cb5([0x74,0x72,0x69,0x61,0x6c])][_0x238cb5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46cca4[_0x238cb5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x31e9e9/0x3e8:0xe10*_0x544875;return _0x46cca4[_0x238cb5([0x65,0x78,0x70])]<_0xd55c4e;}function _0x2ca113(){const _0x223856=_0x46cca4[_0x238cb5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x223856&&(!!_0x223856[_0x238cb5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x238cb5([0x2a]))||!!_0x223856[_0x238cb5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x238cb5([0x46,0x4f,0x4f])));}function _0x185b9a(){const _0x274b22=_0x46cca4[_0x238cb5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x274b22||0x0==_0x274b22[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x113439}=new URL(window[_0x238cb5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x274b22[_0x238cb5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x113439))return!0x0;const _0x27b3b4=_0x113439[_0x238cb5([0x73,0x70,0x6c,0x69,0x74])](_0x238cb5([0x2e]));return _0x274b22[_0x238cb5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1738e4=>_0x1738e4[_0x238cb5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x238cb5([0x2a])))[_0x238cb5([0x6d,0x61,0x70])](_0x4a398e=>_0x4a398e[_0x238cb5([0x73,0x70,0x6c,0x69,0x74])](_0x238cb5([0x2e])))[_0x238cb5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4c734b=>_0x4c734b[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x27b3b4[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x238cb5([0x6d,0x61,0x70])](_0x429390=>Array(_0x27b3b4[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x429390[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x238cb5([0x66,0x69,0x6c,0x6c])](_0x429390[0x0]===_0x238cb5([0x2a])?_0x238cb5([0x2a]):'')[_0x238cb5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x429390))[_0x238cb5([0x73,0x6f,0x6d,0x65])](_0x5bf6e2=>_0x27b3b4[_0x238cb5([0x65,0x76,0x65,0x72,0x79])]((_0x3f5e7f,_0xb2cf8b)=>_0x5bf6e2[_0xb2cf8b]===_0x3f5e7f||_0x5bf6e2[_0xb2cf8b]===_0x238cb5([0x2a])));}function _0x435b5c(){return _0x395c68&&_0x300513?new window[(_0x238cb5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x40d85c,_0x49cf24)=>{_0x395c68[_0x238cb5([0x74,0x68,0x65,0x6e])](_0x40d85c,_0x49cf24),_0x300513[_0x238cb5([0x74,0x68,0x65,0x6e])](_0x126b0a=>{_0x126b0a!=_0x238cb5([0x56,0x61,0x6c,0x69,0x64])&&_0x40d85c(_0x126b0a);},_0x49cf24);}):_0x395c68||_0x300513||_0x238cb5([0x56,0x61,0x6c,0x69,0x64]);}}function _0xfe3a38(_0x2ba5bc,_0x51ef9){return new window[(_0x238cb5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f3047=>{if(_0x4800a0())return _0x3f3047(_0x238cb5([0x56,0x61,0x6c,0x69,0x64]));_0x349e53(),_0x50008f[_0x238cb5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x238cb5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x26c39f=!0x1;const _0x281392=_0x21759c();function _0x689e45(_0x47d9e4){return!!_0x47d9e4&&(typeof _0x47d9e4===_0x238cb5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x47d9e4===_0x238cb5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x47d9e4[_0x238cb5([0x74,0x68,0x65,0x6e])]===_0x238cb5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x47d9e4[_0x238cb5([0x63,0x61,0x74,0x63,0x68])]===_0x238cb5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x6ab6d1(_0xfa66b5){_0x33180e(_0xfa66b5)[_0x238cb5([0x74,0x68,0x65,0x6e])](_0x36cbc1=>{if(!_0x36cbc1||_0x36cbc1[_0x238cb5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x238cb5([0x6f,0x6b]))return _0x238cb5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x50a5ba(_0x419647(_0x281392+_0x51ef9))!=_0x36cbc1[_0x238cb5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x238cb5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x238cb5([0x56,0x61,0x6c,0x69,0x64]);})[_0x238cb5([0x74,0x68,0x65,0x6e])](_0x1c2c9a=>(_0x145b08(),_0x1c2c9a),()=>{const _0x5e4637=_0x52a379();return null==_0x5e4637?(_0x145b08(),_0x238cb5([0x56,0x61,0x6c,0x69,0x64])):_0x238cb5(_0x31e9e9-_0x5e4637>(0x63ae0106^_0xa806ec)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x238cb5([0x74,0x68,0x65,0x6e])](_0x3f3047)[_0x238cb5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3f3047(_0x238cb5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x399377=0x47946b86^_0xa806ec;function _0x145b08(){const _0x24f5db=_0x238cb5([0x6c,0x6c,0x63,0x74,0x2d])+_0x50a5ba(_0x419647(_0x2ba5bc)),_0x240a93=_0x345f53(_0x50a5ba(window[_0x238cb5([0x4d,0x61,0x74,0x68])][_0x238cb5([0x63,0x65,0x69,0x6c])](_0x31e9e9/_0x399377)));window[_0x238cb5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x238cb5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x24f5db,_0x240a93);}function _0x52a379(){const _0x2102da=_0x238cb5([0x6c,0x6c,0x63,0x74,0x2d])+_0x50a5ba(_0x419647(_0x2ba5bc)),_0x28870b=window[_0x238cb5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x238cb5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2102da);return _0x28870b?window[_0x238cb5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x345f53(_0x28870b),0x10)*_0x399377:null;}function _0x33180e(_0x37b1f5){return new window[(_0x238cb5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5f573e,_0x2938a8)=>{_0x37b1f5[_0x238cb5([0x74,0x68,0x65,0x6e])](_0x5f573e,_0x2938a8),window[_0x238cb5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2938a8,0x47a351c6^_0xa806ec);});}}_0x50008f[_0x238cb5([0x6f,0x6e])](_0x238cb5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x40a4ec,_0x17d603)=>{if(_0x17d603[0x0]!=_0x2ba5bc)return _0x3f3047(_0x238cb5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x17d603[0x1]={..._0x17d603[0x1],[_0x238cb5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x281392};},{[_0x238cb5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x238cb5([0x68,0x69,0x67,0x68])}),_0x50008f[_0x238cb5([0x6f,0x6e])](_0x238cb5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x567f0c=>{_0x689e45(_0x567f0c[_0x238cb5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x26c39f=!0x0,_0x6ab6d1(_0x567f0c[_0x238cb5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x238cb5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x238cb5([0x6c,0x6f,0x77])}),_0x212140[_0x238cb5([0x74,0x68,0x65,0x6e])](()=>{_0x26c39f||_0x3f3047(_0x238cb5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4800a0(){return _0x50008f[_0x238cb5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x238cb5([0x76,0x69,0x65,0x77])][_0x238cb5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x238cb5([0x61,0x75,0x74,0x6f]);}function _0x349e53(){_0x50008f[_0x238cb5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x238cb5([0x76,0x69,0x65,0x77])][_0x238cb5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x238cb5([0x61,0x75,0x74,0x6f]);}}function _0x37efda(_0xaad68){const _0xc22488=[new window[(_0x238cb5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4eb890=>setTimeout(_0x4eb890,0x47abbbca^_0xa806ec)),_0x212140[_0x238cb5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x238cb5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x105cb8=>{let _0x439dbf=0x0;_0x50008f[_0x238cb5([0x6d,0x6f,0x64,0x65,0x6c])][_0x238cb5([0x6f,0x6e])](_0x238cb5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x59d77f,_0x4f996d)=>{_0x4f996d[0x0][_0x238cb5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x439dbf++,_0x439dbf==(0x47a280ee^_0xa806ec)&&(_0x105cb8(),_0x59d77f[_0x238cb5([0x6f,0x66,0x66])]());});}))];return window[_0x238cb5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x238cb5([0x72,0x61,0x63,0x65])](_0xc22488)[_0x238cb5([0x74,0x68,0x65,0x6e])](()=>_0xaad68);}async function _0x35f788(){await _0x212140,_0x50008f[_0x238cb5([0x6d,0x6f,0x64,0x65,0x6c])][_0x238cb5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3d2994,_0x50008f[_0x238cb5([0x6d,0x6f,0x64,0x65,0x6c])][_0x238cb5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3d2994,_0x50008f[_0x238cb5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x238cb5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xe88d15(_0x432f16){const _0x2b8b69=_0x5e3a4e();_0x50008f[_0x2b8b69]=_0x238cb5([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x432f16,_0x432f16!=_0x238cb5([0x56,0x61,0x6c,0x69,0x64])&&_0x35f788();}function _0x5e3a4e(){const _0x14ff0a=window[_0x238cb5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x238cb5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x238cb5([0x6e,0x6f,0x77])]())[_0x238cb5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x238cb5([0x2e]),'');let _0x26b5d=_0x238cb5([0x75]);for(let _0x51e928=0x0;_0x51e928<_0x14ff0a[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x51e928+=0x2){let _0x3b92f4=window[_0x238cb5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x14ff0a[_0x238cb5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x51e928,_0x51e928+0x2));_0x3b92f4>=_0x3d114b[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3b92f4-=_0x3d114b[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x26b5d+=_0x3d114b[_0x3b92f4];}return _0x26b5d;}function _0x2ddd69(){const _0x28dd19=_0x26adce[_0x238cb5([0x73,0x70,0x6c,0x69,0x74])](_0x238cb5([0x2e]));if(0x3!=_0x28dd19[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xd47fe8(_0x28dd19[0x1]);function _0xd47fe8(_0x27a362){const _0x14d5fb=_0x2684fd(_0x27a362);return _0x14d5fb&&_0x34abb4()?_0x14d5fb:null;function _0x34abb4(){const _0x997951=_0x14d5fb[_0x238cb5([0x6a,0x74,0x69])],_0x57e931=window[_0x238cb5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x997951[_0x238cb5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x997951[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x32a35d={..._0x14d5fb,[_0x238cb5([0x6a,0x74,0x69])]:_0x997951[_0x238cb5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x997951[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x32a35d[_0x238cb5([0x76,0x63])],_0x419647(_0x32a35d)==_0x57e931;}}}async function _0x41920e(){let _0x4030c0=!0x0;try{const _0x598062=_0x26adce[_0x238cb5([0x73,0x70,0x6c,0x69,0x74])](_0x238cb5([0x2e])),[_0x44bf3b,_0x568f44,_0x2bff20]=_0x598062;return _0x4615a7(_0x44bf3b),await _0x1a3f57(_0x44bf3b,_0x568f44,_0x2bff20),_0x4030c0;}catch{return!0x1;}function _0x4615a7(_0x52f5a3){const _0x585fa2=_0x2684fd(_0x52f5a3);_0x585fa2&&_0x585fa2[_0x238cb5([0x61,0x6c,0x67])]==_0x238cb5([0x45,0x53,0x32,0x35,0x36])||(_0x4030c0=!0x1);}async function _0x1a3f57(_0x5c3682,_0xcc7eb,_0xc456df){const _0x1a3cb1=window[_0x238cb5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x238cb5([0x66,0x72,0x6f,0x6d])](_0x3e78ca(_0xc456df),_0x449f10=>_0x449f10[_0x238cb5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3dcbf5=new window[(_0x238cb5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x238cb5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5c3682+_0x238cb5([0x2e])+_0xcc7eb),_0x491297=window[_0x238cb5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x238cb5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x491297)return;const _0x10e8e6=await _0x491297[_0x238cb5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x238cb5([0x6a,0x77,0x6b]),_0x3b1bfe,{[_0x238cb5([0x6e,0x61,0x6d,0x65])]:_0x238cb5([0x45,0x43,0x44,0x53,0x41]),[_0x238cb5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x238cb5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x238cb5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x491297[_0x238cb5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x238cb5([0x6e,0x61,0x6d,0x65])]:_0x238cb5([0x45,0x43,0x44,0x53,0x41]),[_0x238cb5([0x68,0x61,0x73,0x68])]:{[_0x238cb5([0x6e,0x61,0x6d,0x65])]:_0x238cb5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x10e8e6,_0x1a3cb1,_0x3dcbf5)||(_0x4030c0=!0x1);}}function _0x2684fd(_0x490977){return _0x490977[_0x238cb5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x238cb5([0x65,0x79]))?JSON[_0x238cb5([0x70,0x61,0x72,0x73,0x65])](_0x3e78ca(_0x490977)):null;}function _0x3e78ca(_0x277e21){return window[_0x238cb5([0x61,0x74,0x6f,0x62])](_0x277e21[_0x238cb5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x238cb5([0x2b]))[_0x238cb5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x238cb5([0x2f])));}function _0x419647(_0x26cdb6){let _0x594f82=0x1505;function _0xebc118(_0x35a9ed){for(let _0x2cb80b=0x0;_0x2cb80b<_0x35a9ed[_0x238cb5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2cb80b++){const _0x1608ff=_0x35a9ed[_0x238cb5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2cb80b);_0x594f82=(_0x594f82<<0x5)+_0x594f82+_0x1608ff,_0x594f82&=_0x594f82;}}function _0x1f61ca(_0x57cfac){Array[_0x238cb5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x57cfac)?_0x57cfac[_0x238cb5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1f61ca):_0x57cfac&&typeof _0x57cfac==_0x238cb5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x238cb5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x57cfac)[_0x238cb5([0x73,0x6f,0x72,0x74])]()[_0x238cb5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5e7ae8,_0x1b7998])=>{_0xebc118(_0x5e7ae8),_0x1f61ca(_0x1b7998);}):_0xebc118(window[_0x238cb5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x57cfac));}return _0x1f61ca(_0x26cdb6),_0x594f82>>>0x0;}function _0x50a5ba(_0x3eb4e8){return _0x3eb4e8[_0x238cb5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x238cb5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x238cb5([0x30]));}function _0x345f53(_0x1b126e){return _0x1b126e[_0x238cb5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x238cb5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x238cb5([0x6a,0x6f,0x69,0x6e])]('');}function _0x3d2994(){}function _0x238cb5(_0x2bc9c9){return _0x2bc9c9['map'](_0x2b2a59=>String['fromCharCode'](_0x2b2a59))['join']('');}_0xe88d15(await _0x58be84());}(this);}['_moveSelectionToFootnoteDefinition'](_0x590f36){const {plugins:_0x46f69a,editing:_0x1ce2f2,model:_0x20d733}=this['editor'],_0x5dab49=_0x46f69a['get'](f)['getFootnote'](_0x590f36);return!!_0x5dab49&&(_0x20d733['change'](_0x4be26e=>{_0x4be26e['setSelection'](_0x4be26e['createPositionAt'](_0x5dab49['definition'],'end'));}),_0x1ce2f2['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x3c56e7){const {plugins:_0x46269d,editing:_0x3da93b,model:_0x417c51}=this['editor'],_0x5ee697=_0x46269d['get'](f)['getFootnote'](_0x3c56e7);return!!_0x5ee697&&(_0x417c51['change'](_0x54c549=>{_0x54c549['setSelection'](_0x5ee697['reference'],'on');}),_0x3da93b['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x32bc3a}=this['editor']['model'],_0xf67cfc=this['editor']['config']['get']('footnotes.multiBlock');_0x32bc3a['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x32bc3a['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x32bc3a['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0xf67cfc?_0x32bc3a['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x32bc3a['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x32bc3a['addChildCheck'](_0x5cb883=>{for(const _0x3039c2 of _0x5cb883)if('footnoteDefinition'===_0x3039c2['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x342671}=this,{conversion:_0x55e395,editing:_0x2cc283}=_0x342671,{t:t}=_0x342671['locale'];_0x55e395['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x15ec98,{writer:_0x2206f7,consumable:_0x5c5d1d})=>{const _0x130969=_0x15ec98['getChild'](0x0);if(!_0x130969||!_0x130969['is']('element','a'))return null;const _0x4fcc53=_0x130969['getAttribute']('href')||'';if(!_0x4fcc53['startsWith']('#'))return null;const _0x4fd8e3=_0x4fcc53['replace'](/^#/,'');if(!_0x4fd8e3)return null;_0x5c5d1d['consume'](_0x130969,{'name':!0x0,'attributes':['href']});for(const {item:_0x40204b}of _0x2cc283['view']['createRangeIn'](_0x130969))_0x40204b['is']('$textProxy')?_0x5c5d1d['consume'](_0x40204b['textNode'],{'name':!0x0}):_0x40204b['is']('element')&&_0x5c5d1d['consume'](_0x40204b,{'name':!0x0});return _0x2206f7['createElement']('footnoteRef',{'footnoteId':_0x4fd8e3});}}),_0x55e395['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x3aa4ec,{writer:_0x4e2f36})=>b(_0x3aa4ec,_0x4e2f36)}),_0x55e395['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x1a0c9f,{writer:_0x5363cd})=>{const _0x47c6d9=_0x1a0c9f['getAttribute']('footnoteCounter');return _0x192168(b(_0x1a0c9f,_0x5363cd),_0x5363cd,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x47c6d9)});}});}['_defineDefinitionsConverters'](){const {editor:_0x12db08}=this,{t:t}=_0x12db08['locale'],{conversion:_0x12dae3}=_0x12db08;_0x12dae3['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x12dae3['for']('upcast')['add'](_0x1aeda1=>{_0x1aeda1['on']('element:ol',(_0x164a8e,_0x504bc3,_0x13bd54)=>{const _0x4fd32a=_0x504bc3['viewItem'];if(!_0x4fd32a['hasClass']('footnotes-list')||!_0x504bc3['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x13bd54['consumable']['consume'](_0x4fd32a,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x28baf9,modelCursor:_0x396ff0}=_0x13bd54['convertChildren'](_0x504bc3['viewItem'],_0x504bc3['modelCursor']);_0x504bc3['modelRange']=_0x28baf9,_0x504bc3['modelCursor']=_0x396ff0;}),_0x1aeda1['on']('element:hr',(_0x1becfb,_0x38521c,_0x1af66)=>{const _0x5386ed=_0x38521c['viewItem'];_0x5386ed['hasClass']('footnotes-divider')&&_0x38521c['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x1af66['consumable']['consume'](_0x5386ed,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x12dae3['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x3f0496,{writer:_0x57c45a})=>D(_0x57c45a)}),_0x12dae3['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x4e703d,{writer:_0x50c942})=>{const _0x531098=D(_0x50c942,{'data-footnotes-list-label':t('Footnotes')}),_0x1c1799=_0x192168(_0x531098,_0x50c942,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x50c942['setCustomProperty']('footnotesDefinitions',!0x0,_0x1c1799),_0x1c1799;}});}['_defineDefinitionConverters'](){const {editor:_0x1e0a85}=this,{conversion:_0x2bc9ce,locale:_0x12d572}=_0x1e0a85,_0x314a77=_0x1e0a85['config']['get']('footnotes.multiBlock');_0x2bc9ce['for']('upcast')['add'](_0x3ca726=>{_0x3ca726['on']('element:li',(_0x132dfd,_0x30b880,_0x38bfca)=>{const _0x214b65=_0x30b880['viewItem'];if(!_0x214b65['hasClass']('footnote-definition')||!_0x214b65['getAttribute']('id'))return;const _0x46f2c3=_0x214b65['parent'];if(!_0x46f2c3['is']('element','ol')||!_0x46f2c3['hasClass']('footnotes-list'))return;if(!_0x38bfca['consumable']['test'](_0x214b65,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x492f5f=_0x38bfca['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x214b65['getAttribute']('id')});if(!_0x38bfca['safeInsert'](_0x492f5f,_0x30b880['modelCursor']))return;_0x38bfca['consumable']['consume'](_0x214b65,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x537d86=Array['from'](_0x214b65['getChildren']())['find'](_0x478506=>_0x478506['is']('element')&&_0x478506['hasClass']('footnote-content'));for(const _0x273506 of _0x214b65['getChildren']())_0x273506['is']('element')&&(_0x38bfca['consumable']['consume'](_0x273506,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x38bfca['consumable']['consume'](_0x273506,{'name':!0x0,'classes':'footnote-content'}));if(_0x537d86){if(_0x314a77)_0x38bfca['convertChildren'](_0x537d86,_0x492f5f);else{const _0x33cbf2=_0x38bfca['writer']['createElement']('footnoteInlineContent');_0x38bfca['writer']['insert'](_0x33cbf2,_0x492f5f),_0x38bfca['convertChildren'](_0x537d86,_0x33cbf2);}}_0x38bfca['updateConversionResult'](_0x492f5f,_0x30b880);});}),_0x2bc9ce['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x20730a,{writer:_0x5872e8})=>y(_0x20730a,_0x5872e8,_0x12d572,{'dataPipeline':!0x0})}),_0x2bc9ce['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x2af7e8,{writer:_0x4e27d1})=>y(_0x2af7e8,_0x4e27d1,_0x12d572)});}['_defineBogusParagraphConverters'](){const {editor:_0xfb2bb5}=this,{conversion:_0x123a69}=_0xfb2bb5;_0xfb2bb5['config']['get']('footnotes.multiBlock')?(_0x123a69['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':p(),'converterPriority':'high'}),_0x123a69['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':p({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0xfb2bb5['model']['document'],'change:data',()=>{!function(_0x49279c,_0x59dd77){const _0x3d66ce=_0x49279c['document']['differ'],_0x163c57=new Set();for(const _0x279edd of _0x3d66ce['getChanges']()){const _0x9234a5='attribute'==_0x279edd['type']?_0x279edd['range']['start']['parent']:_0x279edd['position']['parent'];_0x9234a5['is']('element','footnoteDefinition')&&_0x163c57['add'](_0x9234a5);}for(const _0xea4208 of _0x163c57['values']()){const _0x524876=Array['from'](_0xea4208['getChildren']())['filter'](_0x4e32c5=>v(_0x4e32c5,_0x59dd77['mapper']));for(const _0xad4049 of _0x524876)_0x59dd77['reconvertItem'](_0xad4049);}}(_0xfb2bb5['model'],_0xfb2bb5['editing']);})):(_0x123a69['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':p()}),_0x123a69['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x130cd2,{writer:_0x139514})=>{const _0x45331d=_0x139514['createContainerElement']('span');return _0x139514['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x45331d),_0x45331d;}}));}['_defineKeyboardHandlers'](){const {editor:_0x535767}=this,{editing:_0x59411b,t:t}=_0x535767,_0x50729b=_0x535767['model']['document']['selection'];_0x535767['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0x535767['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0x59411b['view']['document'],'enter',(_0xe3186d,_0x3adeae)=>{const _0x53d653=function(_0x458065){const _0x1e541d=_0x458065['getSelectedElement']();if(_0x1e541d?.['is']('element','footnoteRef'))return _0x1e541d;return null;}(_0x50729b);if(_0x53d653){const _0x39757f=_0x53d653['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x39757f),_0x3adeae['preventDefault'](),_0xe3186d['stop']();}},{'context':_0x335e2d});}['_defineClickHandlers'](){const {editor:_0x505414}=this,{editing:_0x4f0c21}=_0x505414;_0x505414['editing']['view']['addObserver'](_0x4c3c27),_0x505414['editing']['view']['addObserver'](_0x35818a);let _0x52e672=!0x1;this['listenTo'](_0x4f0c21['view']['document'],'pointerdown',(_0x4b2404,_0x35a52e)=>{const {target:_0x7593e4}=_0x35a52e,_0xbbcca9=_0x4f0c21['view']['document']['selection'];_0x52e672=!!(_0x7593e4?.['is']('element','a')&&_0x7593e4['parent']?.['is']('element','sup')&&_0x7593e4['parent']['hasClass']('footnote'))&&_0xbbcca9['getSelectedElement']()===_0x7593e4['parent'];},{'priority':'high'}),this['listenTo'](_0x4f0c21['view']['document'],'click',(_0x5df015,_0x28e374)=>{const {target:_0x4f0e5d}=_0x28e374;if(!_0x4f0e5d?.['is']('element','a'))return;if(_0x4f0e5d['parent']?.['is']('element','sup')&&_0x4f0e5d['parent']['hasClass']('footnote')&&!_0x52e672)return void _0x28e374['preventDefault']();let _0x2fa9ee=_0x4f0e5d['getAttribute']('href');if(!_0x2fa9ee?.['startsWith']('#'))return;_0x2fa9ee=_0x2fa9ee['slice'](0x1);let _0x1234f3=!0x1;(_0x2fa9ee['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x2fa9ee['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x2fa9ee))&&(_0x1234f3=!0x0),_0x1234f3&&(_0x28e374['preventDefault'](),_0x5df015['stop']());},{'priority':'high','context':'$capture'});}}function p({dataPipeline:_0x5aa517}={}){return(_0x5d1c98,{writer:_0x10f8c5})=>{if(!g(_0x5d1c98))return null;if(!_0x5aa517)return _0x10f8c5['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x4295d5=_0x10f8c5['createContainerElement']('p');return _0x10f8c5['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x4295d5),_0x4295d5;};}function g(_0x56604d){const {parent:_0x2031c0}=_0x56604d;if(!_0x2031c0?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x2031c0['childCount'])return!0x1;for(const _0x443e3d of _0x56604d['getAttributeKeys']())if(!_0x443e3d['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x443e3d)return!0x1;return!0x0;}function v(_0x362b27,_0x13734f){if(!_0x362b27['is']('element','paragraph'))return!0x1;const _0x1fdec6=_0x13734f['toViewElement'](_0x362b27);return!!_0x1fdec6&&g(_0x362b27)!==_0x1fdec6['is']('element','span');}function H(_0x2ba2c9){return _0x335e2d(_0x2ba2c9)&&_0x2ba2c9['is']('containerElement')&&!!_0x2ba2c9['getCustomProperty']('footnotesDefinitions');}function D(_0x3436a5,_0x574702={}){const _0x5b89f6=_0x3436a5['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x4b6bae=_0x3436a5['createContainerElement']('ol',{'class':'footnotes-list'},_0x3436a5['createSlot']());return _0x3436a5['createContainerElement']('div',{'class':'footnotes',..._0x574702},[_0x5b89f6,_0x4b6bae]);}function b(_0x1a7ad8,_0x38a1fd){const _0x5cad72=_0x1a7ad8['getAttribute']('footnoteId'),_0x4c5797=_0x1a7ad8['getAttribute']('footnoteCounter'),_0x5c322e=_0x38a1fd['createUIElement']('a',{'href':'#'+_0x5cad72},function(_0x1ef237){const _0x507590=this['toDomElement'](_0x1ef237);return _0x507590['textContent']=_0x4c5797,_0x507590;}),_0x1e813c=_0x38a1fd['createContainerElement']('sup',{'id':'ref-'+_0x5cad72,'class':'footnote'},[_0x5c322e]);return _0x1e813c['getFillerOffset']=()=>null,_0x1e813c;}function y(_0x29578a,_0x2df7c0,_0x118ede,{dataPipeline:_0x137906}={}){const {t:t}=_0x118ede,_0x47df14=_0x29578a['getAttribute']('footnoteId'),_0x16f7da=_0x2df7c0['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x47df14},function(_0x1852b6){const _0x44cf40=this['toDomElement'](_0x1852b6);return _0x44cf40['innerText']='^',_0x44cf40;}),_0x47bfe9=_0x137906?_0x2df7c0['createContainerElement']('div',{'class':'footnote-content'}):_0x4071db(_0x2df7c0['createEditableElement']('div',{'class':'footnote-content'}),_0x2df7c0,{'label':t('Footnote\x20content.')});return _0x2df7c0['insert'](_0x2df7c0['createPositionAt'](_0x47bfe9,0x0),_0x2df7c0['createSlot']()),_0x2df7c0['createContainerElement']('li',{'class':'footnote-definition','id':_0x47df14},[_0x16f7da,_0x47bfe9]);}class e extends _0x3eb2b6{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x3c5634];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x32339d}=this,{plugins:_0x4b1a0e,model:_0x1400d7}=_0x32339d,_0x584bc1=_0x4b1a0e['get'](_0x3c5634),_0x264903=_0x4b1a0e['get'](f);this['listenTo'](_0x584bc1,'outputTransformation',(_0x22f4fd,_0x377edf)=>{const _0x3e53c5=l(_0x1400d7['createRangeIn'](_0x377edf['content']));if(!_0x3e53c5['length'])return;const _0x546f7c=_0x264903['getFootnotes'](),_0x547129=_0x3e53c5['reduce']((_0x250095,_0x253cd6)=>{const _0xc14966=_0x546f7c['find'](_0x4f6958=>_0x4f6958['id']===_0x253cd6);if(_0xc14966){const _0x20c228=_0x32339d['data']['toView'](_0xc14966['definition'],{'isClipboardPipeline':!0x0}),_0x41de0e=_0x32339d['data']['htmlProcessor']['toData'](_0x20c228);_0x250095[_0xc14966['id']]=_0x41de0e;}return _0x250095;},Object['create'](null));_0x377edf['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x547129));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x1923d2}=this,{model:_0x31d3ed,plugins:_0x5a7c00}=_0x1923d2,{view:_0x518814}=_0x1923d2['editing'],_0x307747=_0x5a7c00['get'](_0x3c5634),_0x1f885c=_0x5a7c00['get'](f),_0x94835f=_0x1923d2['config']['get']('footnotes.multiBlock');let _0x27d41f=null;this['listenTo'](_0x518814['document'],'clipboardInput',(_0x1b185c,_0x117ea4)=>{const _0xc59259=_0x117ea4['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x27d41f=_0xc59259?JSON['parse'](_0xc59259):null;}),this['listenTo'](_0x307747,'contentInsertion',(_0x12768a,_0x327519)=>{const _0x3ec52e=_0x327519['sourceEditorId']===this['editor']['id'];_0x3ec52e&&'drop'===_0x327519['method']||_0x31d3ed['change'](_0x59a0b5=>{let _0x3ce090=_0x1f885c['getFootnotesDefinitionsObjectElement']();const _0x47f4ac=!!_0x3ce090&&Array['from'](_0x31d3ed['document']['selection']['getSelectedBlocks']())['includes'](_0x3ce090);if(!_0x27d41f&&function(_0x162531){for(const {item:_0x2fee7b}of _0x162531)if(_0x2fee7b['is']('element','footnoteRef'))return!0x0;return!0x1;}(_0x31d3ed['createRangeIn'](_0x327519['content']))&&(_0x27d41f=function(_0x497df8,_0x23d3ff){const _0x19c941=c(_0x497df8,_0x23d3ff);if(!_0x19c941)return null;const _0x58a067=Object['create'](null);for(const _0x3ead48 of _0x19c941['getChildren']())_0x3ead48['is']('element','footnoteDefinition')&&_0x3ead48['hasAttribute']('footnoteId')&&(_0x58a067[_0x3ead48['getAttribute']('footnoteId')]=_0x497df8['cloneElement'](_0x3ead48,!0x0));return Object['keys'](_0x58a067)['length']?_0x58a067:null;}(_0x59a0b5,_0x327519['content'])),(_0x3ce090&&!_0x47f4ac||!_0x3ce090&&!_0x27d41f)&&function(_0x50adbb,_0x2e3073){const _0x44ea03=[];for(const {item:_0x46035d}of _0x50adbb['createRangeIn'](_0x2e3073))_0x46035d['is']('element','footnotesDefinitions')&&_0x44ea03['push'](_0x46035d);for(const _0xd0ef14 of _0x44ea03)_0x50adbb['remove'](_0xd0ef14);}(_0x59a0b5,_0x327519['content']),!_0x27d41f)return;const {selection:_0x22a4bf}=_0x31d3ed['document'],_0x44b57c=_0x22a4bf['getFirstRange']()['root'];_0x3ce090&&!_0x47f4ac||(_0x3ce090=c(_0x59a0b5,_0x327519['content']),_0x3ce090||=_0x1f885c['_insertEmptyFootnotesDefinitionsContainer'](_0x59a0b5,_0x44b57c));const _0x51cc53=Array['from'](_0x22a4bf['getRanges']())['flatMap'](l),_0x2fd487=function(_0x7d189e,_0x3bca62,_0x269b4b){const _0x355e4f=Object['create'](null);for(const {item:_0x3fbe6f}of _0x7d189e['createRangeIn'](_0x3bca62))if(_0x3fbe6f['is']('element','footnoteRef')){const _0x5547f1=_0x3fbe6f['getAttribute']('footnoteId');if(!_0x269b4b(_0x5547f1))continue;_0x355e4f[_0x5547f1]||(_0x355e4f[_0x5547f1]=_0x21759c()),_0x7d189e['setAttribute']('footnoteId',_0x355e4f[_0x5547f1],_0x3fbe6f);}return _0x355e4f;}(_0x59a0b5,_0x327519['content'],_0x1e4827=>{if(!_0x3ec52e)return!0x0;return!!_0x1f885c['getFootnote'](_0x1e4827)&&!_0x51cc53['includes'](_0x1e4827);});for(const [_0x537e76,_0x295680]of Object['entries'](_0x27d41f)){const _0x513527=_0x2fd487[_0x537e76]||_0x537e76;let _0x8078c3;if('string'!=typeof _0x295680)_0x8078c3=_0x295680,_0x513527!==_0x537e76&&_0x59a0b5['setAttribute']('footnoteId',_0x513527,_0x8078c3);else{_0x8078c3=_0x59a0b5['createElement']('footnoteDefinition',{'footnoteId':_0x513527});const _0x28b091=_0x1923d2['data']['htmlProcessor']['toView'](_0x295680);let _0x4fba93;if(_0x94835f)_0x4fba93=_0x1923d2['data']['toModel'](_0x28b091,_0x8078c3);else{_0x4fba93=_0x59a0b5['createElement']('footnoteInlineContent');const _0x58e81e=_0x1923d2['data']['toModel'](_0x28b091,_0x4fba93);_0x59a0b5['insert'](_0x58e81e,_0x4fba93);}_0x59a0b5['append'](_0x4fba93,_0x8078c3);}_0x59a0b5['insert'](_0x8078c3,_0x3ce090,'end');}_0x27d41f=null;});});}}function c(_0x3a9dde,_0x39dba1){for(const {item:_0x1c3ef7}of _0x3a9dde['createRangeIn'](_0x39dba1))if(_0x1c3ef7['is']('element','footnotesDefinitions'))return _0x1c3ef7;return null;}function l(_0x4932e5){const _0xb699f7=new Set();for(const {item:_0x97099}of _0x4932e5)_0x97099['is']('element','footnoteRef')&&_0xb699f7['add'](_0x97099['getAttribute']('footnoteId'));return Array['from'](_0xb699f7);}class i extends _0x3eb2b6{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x47892e}=this,{componentFactory:_0x2c3234}=_0x47892e['ui'];_0x2c3234['add']('insertFootnote',E(_0x47892e,_0x50a4fc)),_0x2c3234['add']('menuBar:insertFootnote',E(_0x47892e,_0x280159)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x324ed3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x37e275;for(const _0x5a1ba5 in _0x324ed3){const _0x16df25=_0x5a1ba5,_0x1ffc7c=_0x324ed3[_0x16df25];if('footnotesLicenseKeyValid'==_0x1ffc7c||'footnotesLicenseKeyInvalid'==_0x1ffc7c||'footnotesLicenseKeyExpired'==_0x1ffc7c||'footnotesLicenseKeyDomainLimit'==_0x1ffc7c||'footnotesLicenseKeyNotAllowed'==_0x1ffc7c||'footnotesLicenseKeyEvaluationLimit'==_0x1ffc7c||'footnotesLicenseKeyUsageLimit'==_0x1ffc7c){delete _0x324ed3[_0x16df25],_0x37e275=_0x1ffc7c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x37e275&&_0x324ed3['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x37e275&&_0x324ed3['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x37e275&&_0x324ed3['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x37e275&&_0x324ed3['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x37e275&&_0x324ed3['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyUsageLimit'==_0x37e275&&_0x324ed3['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function E(_0x16db63,_0x3e054b){const _0x2ef1e8=_0x16db63['commands']['get']('insertFootnote');return _0x191945=>{const {t:t}=_0x191945,_0x1123ba=new _0x3e054b(_0x191945),_0x1cbd04=_0x1123ba instanceof _0x280159;return _0x1123ba['bind']('isEnabled')['to'](_0x2ef1e8,'isEnabled'),_0x1123ba['set']({'label':t(_0x1cbd04?'Footnote':'Insert\x20footnote'),'icon':_0x28d033,'tooltip':!0x0}),_0x1123ba['on']('execute',()=>{_0x2ef1e8['execute'](),_0x16db63['editing']['view']['focus']();}),_0x1123ba;};}class lt extends _0x3eb2b6{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const ct=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x344bd1{['refresh'](){const {editor:_0x101ea3}=this,_0x3d25c1=_0x101ea3['plugins']['get'](f)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x3d25c1,this['value']=_0x3d25c1?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x33c838}){const {editor:_0x482eb7}=this,_0x418708=_0x482eb7['plugins']['get'](f),_0x1bb033=_0x418708['getFootnotesDefinitionsObjectElement']();_0x1bb033&&ct['includes'](_0x33c838)&&_0x482eb7['model']['change'](_0x9b70ef=>{_0x9b70ef['setAttribute']('footnotesListStyle',_0x33c838,_0x1bb033),_0x418708['_updateFootnotesCounters'](_0x9b70ef);});}}class C extends _0x344bd1{['refresh'](){const {editor:_0x202a1a}=this,_0x44eba3=_0x202a1a['plugins']['get'](f)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x44eba3,this['value']=_0x44eba3?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x2814a0}){const {editor:_0x380d5e}=this,_0x312db5=_0x380d5e['plugins']['get'](f),_0x21ee25=_0x312db5['getFootnotesDefinitionsObjectElement']();_0x21ee25&&Number['isInteger'](_0x2814a0)&&_0x380d5e['model']['change'](_0x515572=>{_0x515572['setAttribute']('footnotesListStart',_0x2814a0,_0x21ee25),_0x312db5['_updateFootnotesCounters'](_0x515572);});}}class P extends _0x3eb2b6{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x17c866}=this;_0x17c866['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x17c866['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x17c866['commands']['add']('footnotesStyle',new S(_0x17c866)),_0x17c866['commands']['add']('footnotesStart',new C(_0x17c866)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x3afdb9}=this,{schema:_0x19f242}=_0x3afdb9['model'];_0x19f242['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x562a11}=this,{conversion:_0x256235,model:_0x2c5d11}=_0x562a11,{schema:_0x481504}=_0x2c5d11;_0x256235['for']('upcast')['add'](_0x496ca4=>{_0x496ca4['on']('element:ol',(_0x8ae69,_0x4844df,_0x552c92)=>{const _0x5b336e=_0x4844df['viewItem'],_0xb13b59=_0x4844df['modelCursor']?.['parent'];_0x5b336e['hasClass']('footnotes-list')&&_0xb13b59?.['is']('element','footnotesDefinitions')&&(function(_0x4cb260,_0x10d6d4,_0x38cb4f,_0x4c1f93){if(!_0x4c1f93['checkAttribute'](_0x10d6d4,'footnotesListStart'))return;let _0x12ee28=0x1;const _0x41b06f=_0x38cb4f['consumable']['consume'](_0x4cb260,{'attributes':'start'});if(_0x41b06f){const _0x289949=Number['parseInt'](_0x4cb260['getAttribute']('start'),0xa);Number['isNaN'](_0x289949)||(_0x12ee28=_0x289949);}!_0x41b06f&&_0x10d6d4['hasAttribute']('footnotesListStart')||_0x38cb4f['writer']['setAttribute']('footnotesListStart',_0x12ee28,_0x10d6d4);}(_0x5b336e,_0xb13b59,_0x552c92,_0x481504),function(_0x5e5baa,_0x4d13f9,_0x536ea3,_0x178502){if(!_0x178502['checkAttribute'](_0x4d13f9,'footnotesListStyle'))return;let _0x11b689='decimal',_0x335860=!0x1;if(_0x536ea3['consumable']['consume'](_0x5e5baa,{'attributes':'type'})){const _0x20bb20={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x5e5baa['getAttribute']('type')];_0x20bb20&&(_0x11b689=_0x20bb20),_0x335860=!0x0;}_0x536ea3['consumable']['consume'](_0x5e5baa,{'styles':'list-style-type'})&&(_0x11b689=function(_0x4dc8ba){switch(_0x4dc8ba){case'lower-alpha':return'lower-latin';case'upper-alpha':return'upper-latin';default:return _0x4dc8ba;}}(_0x5e5baa['getStyle']('list-style-type')),_0x335860=!0x0),!_0x335860&&_0x4d13f9['hasAttribute']('footnotesListStyle')||_0x536ea3['writer']['setAttribute']('footnotesListStyle',_0x11b689,_0x4d13f9);}(_0x5b336e,_0xb13b59,_0x552c92,_0x481504));});}),_0x256235['for']('downcast')['add'](_0x3d2eee=>{_0x3d2eee['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x161901,_0x4d725d,_0x5a7d8d)=>{if(!_0x5a7d8d['consumable']['consume'](_0x4d725d['item'],_0x161901['name']))return;const _0x138a27=M(_0x4d725d['item'],_0x5a7d8d['mapper']),{attributeNewValue:_0x3542cf}=_0x4d725d;null==_0x3542cf||0x1===_0x3542cf?_0x5a7d8d['writer']['removeAttribute']('start',_0x138a27):_0x5a7d8d['writer']['setAttribute']('start',String(_0x3542cf),_0x138a27);}),_0x3d2eee['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x2b51ee,_0xc045de,_0x1f364e)=>{if(!_0x1f364e['consumable']['consume'](_0xc045de['item'],_0x2b51ee['name']))return;const _0x2c26b9=M(_0xc045de['item'],_0x1f364e['mapper']),{attributeNewValue:_0x120634}=_0xc045de;_0x120634&&'decimal'!==_0x120634?_0x1f364e['writer']['setStyle']('list-style-type',_0x120634,_0x2c26b9):_0x1f364e['writer']['removeStyle']('list-style-type',_0x2c26b9);});});}['_definePostfixer'](){const {editor:_0x9d6d8f}=this,{model:_0x193935}=_0x9d6d8f,_0xdc1b3b=_0x9d6d8f['plugins']['get'](f),_0x249b5d=this['_getDefaultListStyle'](),_0x5a2de4=this['_getDefaultStartIndex']();_0x193935['document']['registerPostFixer'](_0x4adbc4=>{const _0x341b57=_0x193935['document']['differ']['getChanges']();let _0x5f1555=!0x1;for(const _0x19b98e of _0x341b57){if('insert'!==_0x19b98e['type']||'$text'===_0x19b98e['name'])continue;const _0x458930=_0x193935['createRangeOn'](_0x19b98e['position']['nodeAfter']);for(const _0x5dedf4 of _0x458930['getItems']())_0x5dedf4['is']('element','footnotesDefinitions')&&(!_0x5dedf4['hasAttribute']('footnotesListStart')&&_0x193935['schema']['checkAttribute'](_0x5dedf4,'footnotesListStart')&&(_0x4adbc4['setAttribute']('footnotesListStart',_0x5a2de4,_0x5dedf4),_0x5f1555=!0x0),!_0x5dedf4['hasAttribute']('footnotesListStyle')&&_0x193935['schema']['checkAttribute'](_0x5dedf4,'footnotesListStyle')&&(_0x4adbc4['setAttribute']('footnotesListStyle',_0x249b5d,_0x5dedf4),_0x5f1555=!0x0));}return _0x5f1555&&_0xdc1b3b['_updateFootnotesCounters'](_0x4adbc4),_0x5f1555;});}['_defineFormatter'](){const {editor:_0x1e241a}=this;_0x1e241a['plugins']['get'](f)['setFootnoteFormatter'](_0x26fc57=>this['_formatFootnoteListValue'](_0x26fc57));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x347147,value:_0x689152,digits:_0x386c69}){const _0x2e5e22=_0x347147['getAttribute']('footnotesListStyle'),_0x56daac=_0x347147['getAttribute']('footnotesListStart'),_0x2eb827=Math['floor'](_0x689152)+(_0x56daac??0x1)-0x1;switch(_0x2e5e22){case'decimal-leading-zero':return function(_0x48492c,_0x550d19){return String(_0x48492c)['padStart'](_0x550d19,'0');}(_0x2eb827,Math['max'](0x2,_0x386c69));case'lower-alpha':case'lower-latin':return N(_0x2eb827,!0x1);case'upper-alpha':case'upper-latin':return N(_0x2eb827,!0x0);case'lower-roman':return X(_0x2eb827,!0x1);case'upper-roman':return X(_0x2eb827,!0x0);default:return String(_0x2eb827);}}}function M(_0x125e9e,_0x3b10b8){const _0xe99659=_0x3b10b8['toViewElement'](_0x125e9e);return Array['from'](_0xe99659['getChildren']())['find'](_0x7ad492=>_0x7ad492['is']('element','ol')&&_0x7ad492['hasClass']('footnotes-list'));}function N(_0xde8d00,_0x412930){let _0x261707='',_0x36e6f0=_0xde8d00;for(;_0x36e6f0>0x0;){const _0x5c6062=(_0x36e6f0-0x1)%0x1a;_0x261707=String['fromCharCode'](0x61+_0x5c6062)+_0x261707,_0x36e6f0=Math['floor']((_0x36e6f0-0x1)/0x1a);}return _0x412930?_0x261707['toUpperCase']():_0x261707;}const V=[{'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 X(_0x3c36f2,_0x149afc){let _0x5a03ff='',_0x2c7f45=_0x3c36f2;for(const {value:_0x1384b2,numeral:_0x566387}of V)for(;_0x2c7f45>=_0x1384b2;)_0x5a03ff+=_0x566387,_0x2c7f45-=_0x1384b2;return _0x149afc?_0x5a03ff:_0x5a03ff['toLowerCase']();}class $ extends _0x541b03{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new ot();['keystrokes']=new rt();['focusables']=new _0x474080();['focusCycler'];constructor(_0x3fde19,{styleButtonViews:_0x1cead1,styleGridAriaLabel:_0x538223}){super(_0x3fde19),(this['focusCycler']=new _0xae8ef8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x1cead1,_0x538223),[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 _0x5b396c of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x5b396c['element']);tt({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>nt['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 _0x22f047=_0x13d5ef=>_0x13d5ef['stopPropagation']();this['keystrokes']['set']('arrowright',_0x22f047),this['keystrokes']['set']('arrowleft',_0x22f047),this['keystrokes']['set']('arrowup',_0x22f047),this['keystrokes']['set']('arrowdown',_0x22f047);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x281df8,_0x3ec052){const _0x3ca972=new _0x541b03(this['locale']);return _0x3ca972['children']=_0x3ca972['createCollection'](),_0x3ca972['children']['addMany'](_0x281df8),_0x3ca972['setTemplate']({'tag':'div','attributes':{'aria-label':_0x3ec052,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x3ca972['children']}),_0x3ca972['children']['delegate']('execute')['to'](this),_0x3ca972['focus']=function(){for(const _0x4995e3 of this['children'])if(_0x4995e3 instanceof _0x50a4fc&&_0x4995e3['isOn'])return void _0x4995e3['focus']();this['children']['first']['focus']();},_0x3ca972['focusTracker']=new ot(),_0x3ca972['keystrokes']=new rt(),_0x3ca972['render'](),_0x3ca972['keystrokes']['listenTo'](_0x3ca972['element']),this['children']['add'](_0x3ca972),_0x3ca972;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x2bc438=this['_createStartIndexPropertyView'](),_0x4649d6=[_0x2bc438],_0x1b5da8=new st(this['locale'],_0x4649d6);return _0x1b5da8['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x1b5da8['buttonView']['bind']('isEnabled')['toMany'](_0x4649d6,'isEnabled',(..._0xb79e49)=>_0xb79e49['some'](_0x3de0bc=>_0x3de0bc)),_0x1b5da8['buttonView']['on']('change:isEnabled',(_0x71e5b3,_0x2d972c,_0x30851e)=>{_0x30851e||(_0x1b5da8['isCollapsed']=!0x0);}),this['children']['add'](_0x1b5da8),[_0x2bc438,_0x1b5da8];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0xd0805b=new it(this['locale'],et);return _0xd0805b['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0xd0805b['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0xd0805b['fieldView']['on']('input',()=>{const _0x53b8bc=_0xd0805b['fieldView']['element'],_0x54c750=_0x53b8bc['valueAsNumber'];Number['isNaN'](_0x54c750)?_0xd0805b['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x53b8bc['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x54c750}):_0xd0805b['errorText']=t(_0x54c750<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0xd0805b;}}class j extends _0x3eb2b6{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x23b049,_0x2198c7];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x496bfa}=this,{componentFactory:_0x3428fd}=_0x496bfa['ui'];_0x496bfa['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x3428fd['add']('footnotesStyle',function(_0x5c6ada){return _0xa30db2=>{const {t:t}=_0xa30db2,_0x42d682=_0x5c6ada['commands']['get']('footnotesStyle'),_0x22b5d5=_0x43fc65(_0xa30db2),{buttonView:_0x31721a}=_0x22b5d5;return _0x22b5d5['class']='ck-footnotes-styles-dropdown',_0x22b5d5['bind']('isEnabled')['to'](_0x42d682,'isEnabled'),_0x31721a['set']({'label':t('Footnotes\x20style'),'icon':_0x28d033,'tooltip':!0x0}),_0x22b5d5['once']('change:isOpen',()=>{const _0x5deacc=function({editor:_0x573d00,dropdownView:_0x24a4c4}){const {t:t}=_0x573d00['locale'],_0x4a1d4d=t('Footnotes\x20definitions\x20styles'),_0x4935b6=function(_0x185817){const t=_0x185817['locale']['t'],_0xcc4ded=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0xd223d4},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0xd57c0},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x38c7c0},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x5e7c7a},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x32c0f0},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x556717}];return _0xcc4ded['map'](function(_0x39730d){const _0x370c12=_0x39730d['locale'];return({label:_0x48ec5a,icon:_0x5aeffe,tooltip:_0x557cd3,style:_0x253364})=>{const _0xface38=_0x39730d['commands']['get']('footnotesStyle'),_0x4bbb60=new _0x50a4fc(_0x370c12);return _0x4bbb60['set']({'label':_0x48ec5a,'icon':_0x5aeffe,'tooltip':_0x557cd3}),_0x4bbb60['bind']('isOn')['to'](_0xface38,'value',_0x1ef729=>_0x1ef729===_0x253364),_0x4bbb60['bind']('isEnabled')['to'](_0xface38,'isEnabled'),_0x4bbb60['on']('execute',()=>{_0x39730d['execute']('footnotesStyle',{'value':_0x253364}),_0x39730d['editing']['view']['focus']();}),_0x4bbb60;};}(_0x185817));}(_0x573d00),_0x4d97af=new $(_0x573d00['locale'],{'styleGridAriaLabel':_0x4a1d4d,'styleButtonViews':_0x4935b6}),_0x5e8021=_0x573d00['commands']['get']('footnotesStart');return _0x4d97af['startIndexFieldView']['bind']('isEnabled')['to'](_0x5e8021),_0x4d97af['startIndexFieldView']['fieldView']['bind']('value')['to'](_0x5e8021),_0x4d97af['on']('footnotesListStart',(_0x378b71,_0x13bb10)=>{_0x573d00['execute']('footnotesStart',{'value':_0x13bb10['startIndex']});}),_0x4d97af['delegate']('execute')['to'](_0x24a4c4),_0x4d97af;}({'editor':_0x5c6ada,'dropdownView':_0x22b5d5});_0x22b5d5['panelView']['children']['add'](_0x5deacc);}),_0x22b5d5;};}(_0x496bfa));}['afterInit'](){const {editor:_0x29b614}=this,{t:t}=_0x29b614['locale'],_0x5eb8b3=_0x29b614['plugins']['get'](_0x2198c7),{defaultPositions:_0x1c5202}=_0x2930c1;_0x5eb8b3['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x29b614['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x550fd0=>{let _0x50c572=_0x550fd0['getFirstPosition']()?.['parent'];return _0x50c572?.['is']('$text')&&(_0x50c572=_0x50c572['parent']),_0x50c572?.['is']('element')?_0x50c572['findAncestor'](H):null;},'positions':[_0x1c5202['southArrowNorth'],_0x1c5202['southArrowNorthMiddleWest'],_0x1c5202['southArrowNorthMiddleEast'],_0x1c5202['southArrowNorthWest'],_0x1c5202['southArrowNorthEast'],_0x1c5202['northArrowSouth'],_0x1c5202['northArrowSouthMiddleWest'],_0x1c5202['northArrowSouthMiddleEast'],_0x1c5202['northArrowSouthWest'],_0x1c5202['northArrowSouthEast'],_0x1c5202['viewportStickyNorth']]});}}class ft extends _0x3eb2b6{static get['pluginName'](){return'FootnotesProperties';}static get['requires'](){return[P,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{lt as Footnotes,e as FootnotesClipboard,r as FootnotesEditing,ft as FootnotesProperties,P as FootnotesPropertiesEditing,j as FootnotesPropertiesUI,C as FootnotesStartCommand,S as FootnotesStyleCommand,f as FootnotesTracker,i as FootnotesUI,h as InsertFootnoteCommand};
|
|
23
|
+
import{Plugin as _0xae5732,Command as _0x5cd0a0}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x2ebadd,isWidget as _0x521fba,toWidgetEditable as _0x4e1011,WidgetToolbarRepository as _0x2ddc4e}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x2d21b2,logWarning as _0x29b645,FocusTracker as rt,KeystrokeHandler as nt,global as at}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x4fcbb1,ClickObserver as _0x515eea}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x26db3c}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x4c9c5c,ButtonView as _0x2c789d,View as _0x4d57b7,ViewCollection as _0x34c837,FocusCycler as tt,addKeyboardHandlingForGrid as st,CollapsibleView as it,LabeledFieldView as et,createLabeledInputNumber as ot,ContextualBalloon as _0x43a948,BalloonPanelView as _0x1e73bb,createDropdown as _0x188bd8}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x58d7dc,IconListStyleDecimal as _0x3b6cef,IconListStyleDecimalLeadingZero as _0x45b2ce,IconListStyleLowerRoman as _0x252eff,IconListStyleUpperRoman as _0x23435e,IconListStyleLowerLatin as _0x317e32,IconListStyleUpperLatin as _0x1ff7c8}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x3abb7c,_0x238b15){this['_model']=_0x3abb7c,this['_elementName']=_0x238b15['elementName'],this['_getElementKey']=_0x238b15['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x1474dc){const _0x383063=new Set(),_0x2cfb17=new Map();for(const _0x339e18 of _0x1474dc){if('insert'===_0x339e18['type']&&'$text'!==_0x339e18['name']&&_0x339e18['position']['nodeAfter']){const _0xccd4ce=this['_model']['createRangeOn'](_0x339e18['position']['nodeAfter']);for(const _0x4b0605 of _0xccd4ce['getItems']()){if(!_0x4b0605['is']('element',this['_elementName']))continue;const _0x375de4=this['_getElementKey'](_0x4b0605);_0x2cfb17['has'](_0x375de4)||_0x2cfb17['set'](_0x375de4,[]),_0x2cfb17['get'](_0x375de4)['push'](_0x4b0605);}}if('remove'===_0x339e18['type']&&_0x339e18['name']===this['_elementName']){const _0xc5035c=this['_getElementKey']({'getAttribute':_0x37bc3a=>_0x339e18['attributes']['get'](_0x37bc3a)});_0x383063['add'](_0xc5035c);}}for(const [_0x2050ea,_0x2001e1]of this['_trackedElements'])'$graveyard'===_0x2001e1['root']['rootName']&&_0x383063['add'](_0x2050ea);for(const _0x3460ba of _0x383063)this['_trackedElements']['delete'](_0x3460ba);for(const [_0x513032,_0x2f87e2]of _0x2cfb17)this['_trackedElements']['set'](_0x513032,_0x2f87e2[_0x2f87e2['length']-0x1]);const _0x227e76=new Set();for(const [_0x46cd38,_0x36a134]of _0x2cfb17)_0x383063['has'](_0x46cd38)&&(_0x227e76['add'](_0x36a134[0x0]),_0x36a134['length']>0x1?_0x2cfb17['set'](_0x46cd38,_0x36a134['slice'](0x1)):_0x2cfb17['delete'](_0x46cd38),_0x383063['delete'](_0x46cd38));return{'removed':Array['from'](_0x383063),'inserted':Array['from'](_0x2cfb17['values']())['flat'](),'moved':Array['from'](_0x227e76)};}}class f extends _0xae5732{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x44b476){super(_0x44b476),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x4b0310=>_0x4b0310['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x1101e3=>_0x1101e3['getAttribute']('footnoteId')});}['init'](){const {editor:_0x5dea37}=this,{model:_0x2cdcc9,data:_0x5541b6}=_0x5dea37;_0x2cdcc9['document']['registerPostFixer'](_0x163d22=>{const _0x58dbc4=_0x2cdcc9['document']['differ']['getChanges']();let _0x1fe70b=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x163d22,_0x58dbc4)&&(_0x1fe70b=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x163d22,_0x58dbc4)&&(_0x1fe70b=!0x0),this['_handleFootnoteReferencesChanges'](_0x163d22,_0x58dbc4)&&(_0x1fe70b=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x163d22)&&(_0x1fe70b=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x163d22)&&(_0x1fe70b=!0x0),this['_sortFootnoteDefinitions'](_0x163d22)&&(_0x1fe70b=!0x0),_0x1fe70b;}),this['listenTo'](_0x2cdcc9['document'],'change:data',()=>{_0x2cdcc9['enqueueChange']({'isUndoable':!0x1},_0x5560a9=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x5560a9);});},{'priority':'low'}),this['listenTo'](_0x5541b6,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x2cd269){return this['_footnotes']['find'](_0x5ee9ae=>_0x5ee9ae['id']===_0x2cd269)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x5f0bf3){this['_footnoteFormatter']=_0x5f0bf3;}['_updateFootnotesCounters'](_0x331c76,_0xf8f2d8=0x0){let _0x2c32fd=!0x1;for(let _0x1b8e55=_0xf8f2d8;_0x1b8e55<this['_footnotes']['length'];_0x1b8e55++)this['_updateFootnoteRefCounter'](_0x331c76,_0x1b8e55)&&(_0x2c32fd=!0x0);return _0x2c32fd;}['_insertEmptyFootnotesDefinitionsContainer'](_0x3e5f39,_0x4a5edc){const _0x3c6672=_0x3e5f39['createElement']('footnotesDefinitions',{});return _0x3e5f39['append'](_0x3c6672,_0x4a5edc),this['_footnotesDefinitions']=_0x3c6672,_0x3c6672;}['_ensureFootnotesDefinitionsContainerExists'](_0x111c4e){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x36e331=this['_footnotes'][0x0]['reference']['root'],_0x2aa1c1=this['_insertEmptyFootnotesDefinitionsContainer'](_0x111c4e,_0x36e331);for(const _0x8db537 of this['_footnotes'])_0x8db537['definition']['parent']||_0x111c4e['insert'](_0x8db537['definition'],_0x2aa1c1,'end');this['_updateFootnotesCounters'](_0x111c4e);}['_handleFootnotesDefinitionsObjectChanges'](_0x94f7ca,_0x2e7aa6){let _0x27b2b2=!0x1;const {inserted:_0x40ee6b,removed:_0x472457,moved:_0x35be31}=this['_footnoteDefsContainerTracker']['getChanges'](_0x2e7aa6);if(_0x35be31['length']&&(this['_footnotesDefinitions']=_0x35be31[0x0]),_0x40ee6b['length']){if(_0x40ee6b['length']>0x1||this['_footnotesDefinitions']&&_0x40ee6b['some'](_0x549093=>_0x549093!==this['_footnotesDefinitions'])){const _0x3b708a=_0x94f7ca['createElement']('footnotesDefinitions',{}),_0x1116fd=[];this['_footnotesDefinitions']&&_0x1116fd['push'](this['_footnotesDefinitions']),_0x1116fd['push'](..._0x40ee6b),_0x94f7ca['insert'](_0x3b708a,_0x1116fd[0x0],'before');for(const _0x57e8d4 of _0x1116fd)_0x94f7ca['move'](_0x94f7ca['createRangeIn'](_0x57e8d4),_0x94f7ca['createPositionAt'](_0x3b708a,'end')),_0x94f7ca['remove'](_0x57e8d4);this['_footnotesDefinitions']=_0x3b708a,this['_updateFootnotesCounters'](_0x94f7ca),_0x27b2b2=!0x0;}else this['_footnotesDefinitions']=_0x40ee6b[0x0];}if(_0x472457['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x368943 of this['_footnotes'])_0x94f7ca['remove'](_0x368943['reference']),_0x27b2b2=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x27b2b2;}['_handleFootnoteDefinitionsChanges'](_0x2fc62e,_0x49d9b5){let _0x459124=!0x1;const _0x30539e=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x3e4636,moved:_0x7b7f4a}=this['_footnoteDefsTracker']['getChanges'](_0x49d9b5);for(const _0x3d40b1 of[..._0x7b7f4a,..._0x3e4636]){const _0x1a84ee=_0x3d40b1['getAttribute']('footnoteId'),_0x2c23c6=this['getFootnote'](_0x1a84ee);_0x2c23c6&&(_0x2c23c6['definition']=_0x3d40b1),_(_0x2fc62e,_0x30539e,_0x3d40b1)&&(_0x459124=!0x0);}return _0x459124;}['_handleFootnoteReferencesChanges'](_0x2d6c92,_0x2b7c9f){let _0x1060e4=!0x1;const {removed:_0x56bcec,inserted:_0x4e78cd,moved:_0x17426e}=this['_footnoteRefsTracker']['getChanges'](_0x2b7c9f);for(const _0x5641eb of _0x56bcec)this['_handleRemoveFootnoteReferenceById'](_0x2d6c92,_0x5641eb)&&(_0x1060e4=!0x0);for(const _0x1d4a80 of _0x4e78cd)this['_handleInsertedFootnoteReference'](_0x2d6c92,_0x1d4a80)&&(_0x1060e4=!0x0);for(const _0x14dac3 of _0x17426e)this['_handleMovedFootnoteReference'](_0x2d6c92,_0x14dac3)&&(_0x1060e4=!0x0);return _0x1060e4;}['_handleFootnotesDefinitionsObjectSync'](_0x43b24c){if(!this['_footnotesDefinitions'])return!0x1;let _0x4ab1ef=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0xe0dee3=[];for(const _0x4e1cec of this['_footnotesDefinitions']['getChildren']()){const _0x212004=_0x4e1cec['getAttribute']('footnoteId');this['getFootnote'](_0x212004)||(_0xe0dee3['unshift'](_0x4e1cec),_0x4ab1ef=!0x0);}for(const _0x6ac432 of _0xe0dee3)_0x43b24c['remove'](_0x6ac432);}const _0x3ad447=new Set(),_0x1fcd18=[];for(const _0x2d4779 of this['_footnotesDefinitions']['getChildren']()){const _0x107f60=_0x2d4779['getAttribute']('footnoteId');_0x3ad447['has'](_0x107f60)?(_0x1fcd18['unshift'](_0x2d4779),_0x4ab1ef=!0x0):_0x3ad447['add'](_0x107f60);}for(const _0x4b9eae of _0x1fcd18)_0x43b24c['remove'](_0x4b9eae);return this['_footnotesDefinitions']['childCount']||(_0x43b24c['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x4ab1ef=!0x0),_0x4ab1ef;}['_handleInsertedFootnoteReference'](_0x238d6c,_0x1e3720){if(this['_footnotes']['find'](_0x301bb9=>_0x301bb9['reference']===_0x1e3720))return!0x1;let _0x2266b2=!0x1;const _0x192e44=_0x1e3720['getAttribute']('footnoteId'),_0x11743b=this['_footnotes']['findIndex'](_0x4d0c3a=>_0x4d0c3a['id']===_0x192e44);-0x1!==_0x11743b&&(_0x238d6c['remove'](this['_footnotes'][_0x11743b]['reference']),this['_footnotes']['splice'](_0x11743b,0x1),_0x2266b2=!0x0);let _0x51c927=this['_footnotesDefinitions']?function(_0x283174,_0xc1b6c9){for(const _0x5b32b5 of _0x283174['getChildren']())if(_0x5b32b5['getAttribute']('footnoteId')===_0xc1b6c9)return _0x5b32b5;return null;}(this['_footnotesDefinitions'],_0x192e44):null;_0x51c927||(_0x51c927=_0x238d6c['createElement']('footnoteDefinition',{'footnoteId':_0x192e44}),this['_footnotesDefinitions']&&(_0x238d6c['insert'](_0x51c927,this['_footnotesDefinitions'],'end'),_0x2266b2=!0x0));const _0x18cc53={'id':_0x192e44,'reference':_0x1e3720,'definition':_0x51c927},_0x417d8c=I(this['editor']['model'],this['_footnotes'],_0x1e3720);this['_footnotes']['splice'](_0x417d8c,0x0,_0x18cc53);let _0x9d3244=_0x417d8c;return-0x1!==_0x11743b&&(_0x9d3244=Math['min'](_0x417d8c,_0x11743b)),this['_updateFootnotesCounters'](_0x238d6c,_0x9d3244)&&(_0x2266b2=!0x0),_0x2266b2;}['_handleRemoveFootnoteReferenceById'](_0x1f97ba,_0x12dc2a){const _0x16794b=this['_footnotes']['findIndex'](_0x47f652=>_0x47f652['id']===_0x12dc2a);if(-0x1===_0x16794b)return!0x1;let _0xe6c772=!0x1;const _0x3ea59d=this['_footnotes'][_0x16794b];return'$graveyard'!==_0x3ea59d['definition']['root']['rootName']&&(_0x1f97ba['remove'](_0x3ea59d['definition']),_0xe6c772=!0x0),this['_footnotes']['splice'](_0x16794b,0x1),this['_updateFootnotesCounters'](_0x1f97ba,_0x16794b)&&(_0xe6c772=!0x0),_0xe6c772;}['_handleMovedFootnoteReference'](_0x332472,_0x29dca9){const _0x47d412=_0x29dca9['getAttribute']('footnoteId'),_0x27f83a=this['_footnotes']['findIndex'](_0x161c83=>_0x161c83['id']===_0x47d412),_0xb26dd2=this['_footnotes'][_0x27f83a];let _0x1df451=!0x1;_0xb26dd2['reference']=_0x29dca9,this['_footnotes']['splice'](_0x27f83a,0x1);const _0x42d85e=I(this['editor']['model'],this['_footnotes'],_0x29dca9);return this['_footnotes']['splice'](_0x42d85e,0x0,_0xb26dd2),this['_updateFootnotesCounters'](_0x332472,Math['min'](_0x27f83a,_0x42d85e))&&(_0x1df451=!0x0),_0x1df451;}['_updateFootnoteRefCounter'](_0xa8233e,_0x355ce7){if(!this['_footnotesDefinitions'])return!0x1;const _0x50776b=this['_footnotes'][_0x355ce7];let _0x215886;return _0x215886=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x50776b,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x355ce7+0x1}):String(_0x355ce7+0x1),_0x50776b['reference']['getAttribute']('footnoteCounter')!=_0x215886&&(_0xa8233e['setAttribute']('footnoteCounter',_0x215886,_0x50776b['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x4b76fe){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x3f42dc,_0x2ff43b){if(_0x3f42dc['length']!==_0x2ff43b['length'])return!0x1;for(let _0x33e2bc=0x0;_0x33e2bc<_0x3f42dc['length'];_0x33e2bc++)if(_0x3f42dc[_0x33e2bc]!==_0x2ff43b[_0x33e2bc])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x20444e=>_0x20444e['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x13ad2e=>_0x13ad2e['getAttribute']('footnoteId'))))return!0x1;let _0x3a2d9b=!0x1;for(let _0x416bef=0x0;_0x416bef<this['_footnotes']['length'];_0x416bef++){const _0x283842=this['_footnotes'][_0x416bef],_0x5c55bf=_0x4b76fe['createPositionBefore'](_0x283842['definition']),_0x2ab92e=_0x4b76fe['createPositionAt'](this['_footnotesDefinitions'],_0x416bef);_0x5c55bf['isEqual'](_0x2ab92e)||(_0x4b76fe['move'](_0x4b76fe['createRangeOn'](_0x283842['definition']),_0x2ab92e),_0x3a2d9b=!0x0);}return _0x3a2d9b;}['_ensureFootnotesReferencesHaveProperOrder'](_0x574d5d){if(!this['_footnotes']['length'])return!0x1;const {model:_0x55e273}=this['editor'];let _0x4a5b59=!0x1;for(let _0x4546a3=0x0;_0x4546a3<this['_footnotes']['length']-0x1;_0x4546a3++){const _0x4111b8=this['_footnotes'][_0x4546a3],_0x2fe61e=this['_footnotes'][_0x4546a3+0x1],_0x27f62d=_0x55e273['createPositionBefore'](_0x4111b8['reference']),_0x31190e=_0x55e273['createPositionBefore'](_0x2fe61e['reference']);'after'===_0x27f62d['compareWith'](_0x31190e)&&(this['_handleMovedFootnoteReference'](_0x574d5d,_0x4111b8['reference']),_0x4546a3=-0x1,_0x4a5b59=!0x0);}return _0x4a5b59;}}function _(_0x5c9969,_0x17a93f,_0x2408c0){if(_0x2408c0['childCount'])return!0x1;const _0xd32cfa=_0x17a93f?'paragraph':'footnoteInlineContent';return _0x5c9969['insert'](_0x5c9969['createElement'](_0xd32cfa),_0x2408c0),!0x0;}function I(_0xb5d3f3,_0x14a908,_0x4dc363){if(0x0===_0x14a908['length'])return 0x0;const _0x234073=_0xb5d3f3['createPositionBefore'](_0x4dc363);for(let _0x48a67a=0x0;_0x48a67a<_0x14a908['length'];_0x48a67a++){const _0x211995=_0x14a908[_0x48a67a],_0x40fc8d=_0xb5d3f3['createPositionBefore'](_0x211995['reference']);if('before'===_0x234073['compareWith'](_0x40fc8d))return _0x48a67a;}const _0x2ea116=_0x4dc363['root'];let _0x395197=-0x1;for(let _0x4fa6ee=_0x14a908['length']-0x1;_0x4fa6ee>=0x0;_0x4fa6ee--)if(_0x14a908[_0x4fa6ee]['reference']['root']===_0x2ea116){_0x395197=_0x4fa6ee;break;}if(-0x1!==_0x395197)return _0x395197+0x1;const _0x47f531=_0xb5d3f3['document']['getRootNames'](),_0x365d89=_0x47f531['indexOf'](_0x2ea116['rootName']),_0x401286=_0x47f531[_0x365d89+0x1];if(_0x401286){for(let _0x3cfa03=0x0;_0x3cfa03<_0x14a908['length'];_0x3cfa03++)if(_0x14a908[_0x3cfa03]['reference']['root']['rootName']===_0x401286)return _0x3cfa03;}return _0x14a908['length'];}class h extends _0x5cd0a0{['refresh'](){const _0x2dc024=this['editor']['model']['document']['selection'],_0x413363=this['_getPositionToInsertFootnote'](_0x2dc024);this['isEnabled']=!!_0x413363;}['execute'](_0x160e39){const {editor:_0x48265f}=this,{model:_0x335240}=_0x48265f,{selection:_0x27803d}=_0x335240['document'],_0x510597=this['_getPositionToInsertFootnote'](_0x27803d);if(!_0x510597)return;const _0x5aca4f=_0x48265f['plugins']['get']('FootnotesEditing'),_0x181269=_0x160e39?.['footnoteId']??_0x2d21b2();!function(_0x2385f7){return'string'==typeof _0x2385f7&&_0x2385f7['length']>0x0&&!/\s/['test'](_0x2385f7)&&!/^\d/['test'](_0x2385f7);}(_0x181269)?_0x29b645('insert-footnote-command-executed-with-invalid-id'):(_0x335240['change'](_0x299df4=>{const _0x3da85b=_0x299df4['createElement']('footnoteRef',{'footnoteId':_0x181269});_0x335240['insertObject'](_0x3da85b,_0x510597,null);}),_0x5aca4f['_moveSelectionToFootnoteDefinition'](_0x181269));}['_getPositionToInsertFootnote'](_0x54a1fd){const {model:_0x561c1a}=this['editor'],{schema:_0x4530d1}=_0x561c1a,_0x369fb3=_0x54a1fd['getFirstRange']();for(const _0x4eb9ad of _0x369fb3['getItems']())if(_0x4530d1['isBlock'](_0x4eb9ad)||_0x4530d1['isObject'](_0x4eb9ad))return null;const _0x57cf29=_0x369fb3['end'];return _0x4530d1['checkChild'](_0x57cf29,'footnoteRef')?_0x57cf29:null;}}class r extends _0xae5732{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4d9113}=this;_0x4d9113['config']['define']('footnotes.multiBlock',!0x0),_0x4d9113['commands']['add']('insertFootnote',new h(_0x4d9113)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0xc6feb0){const _0x12f065=_0x3cc1bb([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]),_0x5a42b5=0x47a28506,_0x349c03=0x47a5046e^_0x5a42b5,_0x106260=window[_0x3cc1bb([0x44,0x61,0x74,0x65])][_0x3cc1bb([0x6e,0x6f,0x77])](),_0x3dc3f7=_0xc6feb0[_0x3cc1bb([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xfcb1f6=new window[(_0x3cc1bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c73b0=>{_0x3dc3f7[_0x3cc1bb([0x6f,0x6e,0x63,0x65])](_0x3cc1bb([0x72,0x65,0x61,0x64,0x79]),_0x3c73b0);}),_0x5537eb={[_0x3cc1bb([0x6b,0x74,0x79])]:_0x3cc1bb([0x45,0x43]),[_0x3cc1bb([0x75,0x73,0x65])]:_0x3cc1bb([0x73,0x69,0x67]),[_0x3cc1bb([0x63,0x72,0x76])]:_0x3cc1bb([0x50,0x2d,0x32,0x35,0x36]),[_0x3cc1bb([0x78])]:_0x3cc1bb([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]),[_0x3cc1bb([0x79])]:_0x3cc1bb([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]),[_0x3cc1bb([0x61,0x6c,0x67])]:_0x3cc1bb([0x45,0x53,0x32,0x35,0x36])},_0x36223a=_0x3dc3f7[_0x3cc1bb([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3cc1bb([0x67,0x65,0x74])](_0x3cc1bb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x8db74b(){let _0x41f2aa,_0x5299cb=null,_0x12ff85=null;try{if(_0x36223a==_0x3cc1bb([0x47,0x50,0x4c]))return _0x3cc1bb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x41f2aa=_0x45e84e(),!_0x41f2aa)return _0x3cc1bb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x41f2aa[_0x3cc1bb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x12ff85=_0x1dba5a(_0x41f2aa[_0x3cc1bb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x41f2aa[_0x3cc1bb([0x6a,0x74,0x69])])),await _0x24cd63()?_0x1a5553()?_0x5b17b3()?_0x3cc1bb([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x192338()?(_0x41f2aa[_0x3cc1bb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3cc1bb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5299cb=_0x366335(_0x3cc1bb([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x57eeda()):_0x3cc1bb([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3cc1bb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3cc1bb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3cc1bb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5b17b3(){const _0x3968ec=[_0x3cc1bb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3cc1bb([0x74,0x72,0x69,0x61,0x6c])][_0x3cc1bb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41f2aa[_0x3cc1bb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x106260/0x3e8:0xe10*_0x349c03;return _0x41f2aa[_0x3cc1bb([0x65,0x78,0x70])]<_0x3968ec;}function _0x1a5553(){const _0x587b56=_0x41f2aa[_0x3cc1bb([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x587b56&&(!!_0x587b56[_0x3cc1bb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3cc1bb([0x2a]))||!!_0x587b56[_0x3cc1bb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3cc1bb([0x46,0x4f,0x4f])));}function _0x192338(){const _0x270790=_0x41f2aa[_0x3cc1bb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x270790||0x0==_0x270790[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x164ac6}=new URL(window[_0x3cc1bb([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x270790[_0x3cc1bb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x164ac6))return!0x0;const _0xb2f831=_0x164ac6[_0x3cc1bb([0x73,0x70,0x6c,0x69,0x74])](_0x3cc1bb([0x2e]));return _0x270790[_0x3cc1bb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x221737=>_0x221737[_0x3cc1bb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3cc1bb([0x2a])))[_0x3cc1bb([0x6d,0x61,0x70])](_0x2b06e2=>_0x2b06e2[_0x3cc1bb([0x73,0x70,0x6c,0x69,0x74])](_0x3cc1bb([0x2e])))[_0x3cc1bb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3ee4d4=>_0x3ee4d4[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xb2f831[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3cc1bb([0x6d,0x61,0x70])](_0x1a2323=>Array(_0xb2f831[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1a2323[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3cc1bb([0x66,0x69,0x6c,0x6c])](_0x1a2323[0x0]===_0x3cc1bb([0x2a])?_0x3cc1bb([0x2a]):'')[_0x3cc1bb([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1a2323))[_0x3cc1bb([0x73,0x6f,0x6d,0x65])](_0x247aad=>_0xb2f831[_0x3cc1bb([0x65,0x76,0x65,0x72,0x79])]((_0x3bf6dd,_0x17654c)=>_0x247aad[_0x17654c]===_0x3bf6dd||_0x247aad[_0x17654c]===_0x3cc1bb([0x2a])));}function _0x57eeda(){return _0x5299cb&&_0x12ff85?new window[(_0x3cc1bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5196ea,_0x4c95d5)=>{_0x5299cb[_0x3cc1bb([0x74,0x68,0x65,0x6e])](_0x5196ea,_0x4c95d5),_0x12ff85[_0x3cc1bb([0x74,0x68,0x65,0x6e])](_0x42df7a=>{_0x42df7a!=_0x3cc1bb([0x56,0x61,0x6c,0x69,0x64])&&_0x5196ea(_0x42df7a);},_0x4c95d5);}):_0x5299cb||_0x12ff85||_0x3cc1bb([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1dba5a(_0x5d5c52,_0x125246){return new window[(_0x3cc1bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e7ddc=>{if(_0x3472df())return _0x4e7ddc(_0x3cc1bb([0x56,0x61,0x6c,0x69,0x64]));_0x249c29(),_0x3dc3f7[_0x3cc1bb([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3cc1bb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x20326d=!0x1;const _0x27cb0b=_0x2d21b2();function _0x21995b(_0x49efd8){return!!_0x49efd8&&(typeof _0x49efd8===_0x3cc1bb([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x49efd8===_0x3cc1bb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x49efd8[_0x3cc1bb([0x74,0x68,0x65,0x6e])]===_0x3cc1bb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x49efd8[_0x3cc1bb([0x63,0x61,0x74,0x63,0x68])]===_0x3cc1bb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x353832(_0x19d031){_0x4fb877(_0x19d031)[_0x3cc1bb([0x74,0x68,0x65,0x6e])](_0x520e27=>{if(!_0x520e27||_0x520e27[_0x3cc1bb([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3cc1bb([0x6f,0x6b]))return _0x3cc1bb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x8a0a4f(_0x5089c7(_0x27cb0b+_0x125246))!=_0x520e27[_0x3cc1bb([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3cc1bb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3cc1bb([0x56,0x61,0x6c,0x69,0x64]);})[_0x3cc1bb([0x74,0x68,0x65,0x6e])](_0x322ac8=>(_0x2e1475(),_0x322ac8),()=>{const _0x5ed74e=_0x2fd160();return null==_0x5ed74e?(_0x2e1475(),_0x3cc1bb([0x56,0x61,0x6c,0x69,0x64])):_0x3cc1bb(_0x106260-_0x5ed74e>(0x63ae0106^_0x5a42b5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3cc1bb([0x74,0x68,0x65,0x6e])](_0x4e7ddc)[_0x3cc1bb([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4e7ddc(_0x3cc1bb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x23a6f0=0x47946b86^_0x5a42b5;function _0x2e1475(){const _0x4345ee=_0x3cc1bb([0x6c,0x6c,0x63,0x74,0x2d])+_0x8a0a4f(_0x5089c7(_0x5d5c52)),_0x5308fd=_0x1811ef(_0x8a0a4f(window[_0x3cc1bb([0x4d,0x61,0x74,0x68])][_0x3cc1bb([0x63,0x65,0x69,0x6c])](_0x106260/_0x23a6f0)));window[_0x3cc1bb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3cc1bb([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4345ee,_0x5308fd);}function _0x2fd160(){const _0x475818=_0x3cc1bb([0x6c,0x6c,0x63,0x74,0x2d])+_0x8a0a4f(_0x5089c7(_0x5d5c52)),_0x699e13=window[_0x3cc1bb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3cc1bb([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x475818);return _0x699e13?window[_0x3cc1bb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1811ef(_0x699e13),0x10)*_0x23a6f0:null;}function _0x4fb877(_0x366bdf){return new window[(_0x3cc1bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x47ec33,_0x849e10)=>{_0x366bdf[_0x3cc1bb([0x74,0x68,0x65,0x6e])](_0x47ec33,_0x849e10),window[_0x3cc1bb([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x849e10,0x47a351c6^_0x5a42b5);});}}_0x3dc3f7[_0x3cc1bb([0x6f,0x6e])](_0x3cc1bb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4ac17d,_0x1ba845)=>{if(_0x1ba845[0x0]!=_0x5d5c52)return _0x4e7ddc(_0x3cc1bb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1ba845[0x1]={..._0x1ba845[0x1],[_0x3cc1bb([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x27cb0b};},{[_0x3cc1bb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3cc1bb([0x68,0x69,0x67,0x68])}),_0x3dc3f7[_0x3cc1bb([0x6f,0x6e])](_0x3cc1bb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x188459=>{_0x21995b(_0x188459[_0x3cc1bb([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x20326d=!0x0,_0x353832(_0x188459[_0x3cc1bb([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3cc1bb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3cc1bb([0x6c,0x6f,0x77])}),_0xfcb1f6[_0x3cc1bb([0x74,0x68,0x65,0x6e])](()=>{_0x20326d||_0x4e7ddc(_0x3cc1bb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3472df(){return _0x3dc3f7[_0x3cc1bb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3cc1bb([0x76,0x69,0x65,0x77])][_0x3cc1bb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3cc1bb([0x61,0x75,0x74,0x6f]);}function _0x249c29(){_0x3dc3f7[_0x3cc1bb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3cc1bb([0x76,0x69,0x65,0x77])][_0x3cc1bb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3cc1bb([0x61,0x75,0x74,0x6f]);}}function _0x366335(_0x382ee0){const _0x3f18a1=[new window[(_0x3cc1bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x45ee63=>setTimeout(_0x45ee63,0x47abbbca^_0x5a42b5)),_0xfcb1f6[_0x3cc1bb([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3cc1bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x46f308=>{let _0x592815=0x0;_0x3dc3f7[_0x3cc1bb([0x6d,0x6f,0x64,0x65,0x6c])][_0x3cc1bb([0x6f,0x6e])](_0x3cc1bb([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1fabcb,_0x1d1a26)=>{_0x1d1a26[0x0][_0x3cc1bb([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x592815++,_0x592815==(0x47a280ee^_0x5a42b5)&&(_0x46f308(),_0x1fabcb[_0x3cc1bb([0x6f,0x66,0x66])]());});}))];return window[_0x3cc1bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3cc1bb([0x72,0x61,0x63,0x65])](_0x3f18a1)[_0x3cc1bb([0x74,0x68,0x65,0x6e])](()=>_0x382ee0);}async function _0x323f08(){await _0xfcb1f6,_0x3dc3f7[_0x3cc1bb([0x6d,0x6f,0x64,0x65,0x6c])][_0x3cc1bb([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x455ac8,_0x3dc3f7[_0x3cc1bb([0x6d,0x6f,0x64,0x65,0x6c])][_0x3cc1bb([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x455ac8,_0x3dc3f7[_0x3cc1bb([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3cc1bb([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x27b1dc(_0x58777f){const _0x3915c0=_0x2ffa1b();_0x3dc3f7[_0x3915c0]=_0x3cc1bb([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x58777f,_0x58777f!=_0x3cc1bb([0x56,0x61,0x6c,0x69,0x64])&&_0x323f08();}function _0x2ffa1b(){const _0x1e9032=window[_0x3cc1bb([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3cc1bb([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3cc1bb([0x6e,0x6f,0x77])]())[_0x3cc1bb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3cc1bb([0x2e]),'');let _0x4e136a=_0x3cc1bb([0x75]);for(let _0x597751=0x0;_0x597751<_0x1e9032[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x597751+=0x2){let _0x3960a1=window[_0x3cc1bb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1e9032[_0x3cc1bb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x597751,_0x597751+0x2));_0x3960a1>=_0x12f065[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3960a1-=_0x12f065[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4e136a+=_0x12f065[_0x3960a1];}return _0x4e136a;}function _0x45e84e(){const _0x276e79=_0x36223a[_0x3cc1bb([0x73,0x70,0x6c,0x69,0x74])](_0x3cc1bb([0x2e]));if(0x3!=_0x276e79[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x33eb9b(_0x276e79[0x1]);function _0x33eb9b(_0x31f08b){const _0x3f9316=_0x324bab(_0x31f08b);return _0x3f9316&&_0x4455ef()?_0x3f9316:null;function _0x4455ef(){const _0x543278=_0x3f9316[_0x3cc1bb([0x6a,0x74,0x69])],_0x2286c9=window[_0x3cc1bb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x543278[_0x3cc1bb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x543278[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x35ab4e={..._0x3f9316,[_0x3cc1bb([0x6a,0x74,0x69])]:_0x543278[_0x3cc1bb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x543278[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x35ab4e[_0x3cc1bb([0x76,0x63])],_0x5089c7(_0x35ab4e)==_0x2286c9;}}}async function _0x24cd63(){let _0x3a0882=!0x0;try{const _0x15d367=_0x36223a[_0x3cc1bb([0x73,0x70,0x6c,0x69,0x74])](_0x3cc1bb([0x2e])),[_0x370abc,_0x514bbe,_0x3dc73b]=_0x15d367;return _0x3159d4(_0x370abc),await _0xb33d53(_0x370abc,_0x514bbe,_0x3dc73b),_0x3a0882;}catch{return!0x1;}function _0x3159d4(_0x417cfb){const _0x134ad1=_0x324bab(_0x417cfb);_0x134ad1&&_0x134ad1[_0x3cc1bb([0x61,0x6c,0x67])]==_0x3cc1bb([0x45,0x53,0x32,0x35,0x36])||(_0x3a0882=!0x1);}async function _0xb33d53(_0x2f3d6b,_0x53bdaa,_0x3d6e75){const _0x484e54=window[_0x3cc1bb([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3cc1bb([0x66,0x72,0x6f,0x6d])](_0x5e8257(_0x3d6e75),_0x30d07d=>_0x30d07d[_0x3cc1bb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x47d448=new window[(_0x3cc1bb([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3cc1bb([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2f3d6b+_0x3cc1bb([0x2e])+_0x53bdaa),_0x147db5=window[_0x3cc1bb([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3cc1bb([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x147db5)return;const _0x569805=await _0x147db5[_0x3cc1bb([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3cc1bb([0x6a,0x77,0x6b]),_0x5537eb,{[_0x3cc1bb([0x6e,0x61,0x6d,0x65])]:_0x3cc1bb([0x45,0x43,0x44,0x53,0x41]),[_0x3cc1bb([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3cc1bb([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3cc1bb([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x147db5[_0x3cc1bb([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3cc1bb([0x6e,0x61,0x6d,0x65])]:_0x3cc1bb([0x45,0x43,0x44,0x53,0x41]),[_0x3cc1bb([0x68,0x61,0x73,0x68])]:{[_0x3cc1bb([0x6e,0x61,0x6d,0x65])]:_0x3cc1bb([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x569805,_0x484e54,_0x47d448)||(_0x3a0882=!0x1);}}function _0x324bab(_0xdf703){return _0xdf703[_0x3cc1bb([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3cc1bb([0x65,0x79]))?JSON[_0x3cc1bb([0x70,0x61,0x72,0x73,0x65])](_0x5e8257(_0xdf703)):null;}function _0x5e8257(_0x3486b6){return window[_0x3cc1bb([0x61,0x74,0x6f,0x62])](_0x3486b6[_0x3cc1bb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3cc1bb([0x2b]))[_0x3cc1bb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3cc1bb([0x2f])));}function _0x5089c7(_0x563887){let _0x464536=0x1505;function _0x57f1cb(_0x15cca1){for(let _0x1d64ca=0x0;_0x1d64ca<_0x15cca1[_0x3cc1bb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1d64ca++){const _0x41e35e=_0x15cca1[_0x3cc1bb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1d64ca);_0x464536=(_0x464536<<0x5)+_0x464536+_0x41e35e,_0x464536&=_0x464536;}}function _0x190ac9(_0x361bad){Array[_0x3cc1bb([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x361bad)?_0x361bad[_0x3cc1bb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x190ac9):_0x361bad&&typeof _0x361bad==_0x3cc1bb([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3cc1bb([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x361bad)[_0x3cc1bb([0x73,0x6f,0x72,0x74])]()[_0x3cc1bb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x9328e8,_0x142966])=>{_0x57f1cb(_0x9328e8),_0x190ac9(_0x142966);}):_0x57f1cb(window[_0x3cc1bb([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x361bad));}return _0x190ac9(_0x563887),_0x464536>>>0x0;}function _0x8a0a4f(_0x4cb4d1){return _0x4cb4d1[_0x3cc1bb([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3cc1bb([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3cc1bb([0x30]));}function _0x1811ef(_0x3f4078){return _0x3f4078[_0x3cc1bb([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3cc1bb([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3cc1bb([0x6a,0x6f,0x69,0x6e])]('');}function _0x455ac8(){}function _0x3cc1bb(_0x51cab3){return _0x51cab3['map'](_0x139663=>String['fromCharCode'](_0x139663))['join']('');}_0x27b1dc(await _0x8db74b());}(this);}['_moveSelectionToFootnoteDefinition'](_0x4b8501){const {plugins:_0x5daedf,editing:_0x476b4f,model:_0x47a99a}=this['editor'],_0x496c01=_0x5daedf['get'](f)['getFootnote'](_0x4b8501);return!!_0x496c01&&(_0x47a99a['change'](_0x37f416=>{_0x37f416['setSelection'](_0x37f416['createPositionAt'](_0x496c01['definition'],'end'));}),_0x476b4f['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0xba6aa5){const {plugins:_0x2f52c4,editing:_0x9fe79d,model:_0x5b5df7}=this['editor'],_0x561750=_0x2f52c4['get'](f)['getFootnote'](_0xba6aa5);return!!_0x561750&&(_0x5b5df7['change'](_0x373701=>{_0x373701['setSelection'](_0x561750['reference'],'on');}),_0x9fe79d['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x9be18e}=this['editor']['model'],_0x502b6b=this['editor']['config']['get']('footnotes.multiBlock');_0x9be18e['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x9be18e['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x9be18e['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x502b6b?_0x9be18e['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x9be18e['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x9be18e['addChildCheck'](_0x5e3f08=>{for(const _0x19a559 of _0x5e3f08)if('footnoteDefinition'===_0x19a559['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x42382a}=this,{conversion:_0x2855cb,editing:_0x47ce60}=_0x42382a,{t:t}=_0x42382a['locale'];_0x2855cb['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x2aa644,{writer:_0x258769,consumable:_0x3cb4f2})=>{const _0x41ec1e=_0x2aa644['getChild'](0x0);if(!_0x41ec1e||!_0x41ec1e['is']('element','a'))return null;const _0x2867a5=_0x41ec1e['getAttribute']('href')||'';if(!_0x2867a5['startsWith']('#'))return null;const _0x32ad9d=_0x2867a5['replace'](/^#/,'');if(!_0x32ad9d)return null;_0x3cb4f2['consume'](_0x41ec1e,{'name':!0x0,'attributes':['href']});for(const {item:_0x36a535}of _0x47ce60['view']['createRangeIn'](_0x41ec1e))_0x36a535['is']('$textProxy')?_0x3cb4f2['consume'](_0x36a535['textNode'],{'name':!0x0}):_0x36a535['is']('element')&&_0x3cb4f2['consume'](_0x36a535,{'name':!0x0});return _0x258769['createElement']('footnoteRef',{'footnoteId':_0x32ad9d});}}),_0x2855cb['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x2c21fe,{writer:_0xb24fbf})=>b(_0x2c21fe,_0xb24fbf)}),_0x2855cb['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x43127d,{writer:_0x23a6ac})=>{const _0xa8fda8=_0x43127d['getAttribute']('footnoteCounter');return _0x2ebadd(b(_0x43127d,_0x23a6ac),_0x23a6ac,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0xa8fda8)});}});}['_defineDefinitionsConverters'](){const {editor:_0x5a1ed4}=this,{t:t}=_0x5a1ed4['locale'],{conversion:_0x3a8ae3}=_0x5a1ed4;_0x3a8ae3['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x3a8ae3['for']('upcast')['add'](_0x4e99c7=>{_0x4e99c7['on']('element:ol',(_0x53da71,_0x4e3c79,_0x1bb9b1)=>{const _0x4b3dbb=_0x4e3c79['viewItem'];if(!_0x4b3dbb['hasClass']('footnotes-list')||!_0x4e3c79['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x1bb9b1['consumable']['consume'](_0x4b3dbb,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x37d616,modelCursor:_0x2d0664}=_0x1bb9b1['convertChildren'](_0x4e3c79['viewItem'],_0x4e3c79['modelCursor']);_0x4e3c79['modelRange']=_0x37d616,_0x4e3c79['modelCursor']=_0x2d0664;}),_0x4e99c7['on']('element:hr',(_0x4542a5,_0x3f3f64,_0x50883f)=>{const _0x137b1b=_0x3f3f64['viewItem'];_0x137b1b['hasClass']('footnotes-divider')&&_0x3f3f64['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x50883f['consumable']['consume'](_0x137b1b,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x3a8ae3['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0xab0cb0,{writer:_0x528292})=>D(_0x528292)}),_0x3a8ae3['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x511ebd,{writer:_0x11da47})=>{const _0x287a79=D(_0x11da47,{'data-footnotes-list-label':t('Footnotes')}),_0x1c90b=_0x2ebadd(_0x287a79,_0x11da47,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x11da47['setCustomProperty']('footnotesDefinitions',!0x0,_0x1c90b),_0x1c90b;}});}['_defineDefinitionConverters'](){const {editor:_0x4aede9}=this,{conversion:_0x13aafa,locale:_0x426a7a}=_0x4aede9,_0x520d1e=_0x4aede9['config']['get']('footnotes.multiBlock');_0x13aafa['for']('upcast')['add'](_0x2e6ff7=>{_0x2e6ff7['on']('element:li',(_0xf50343,_0x3ac376,_0x3ab053)=>{const _0x3949b1=_0x3ac376['viewItem'];if(!_0x3949b1['hasClass']('footnote-definition')||!_0x3949b1['getAttribute']('id'))return;const _0x2cb139=_0x3949b1['parent'];if(!_0x2cb139['is']('element','ol')||!_0x2cb139['hasClass']('footnotes-list'))return;if(!_0x3ab053['consumable']['test'](_0x3949b1,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x350473=_0x3ab053['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x3949b1['getAttribute']('id')});if(!_0x3ab053['safeInsert'](_0x350473,_0x3ac376['modelCursor']))return;_0x3ab053['consumable']['consume'](_0x3949b1,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x18cec7=Array['from'](_0x3949b1['getChildren']())['find'](_0x9d3b48=>_0x9d3b48['is']('element')&&_0x9d3b48['hasClass']('footnote-content'));for(const _0x38c2a1 of _0x3949b1['getChildren']())_0x38c2a1['is']('element')&&(_0x3ab053['consumable']['consume'](_0x38c2a1,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x3ab053['consumable']['consume'](_0x38c2a1,{'name':!0x0,'classes':'footnote-content'}));if(_0x18cec7){if(_0x520d1e)_0x3ab053['convertChildren'](_0x18cec7,_0x350473);else{const _0x4b3f77=_0x3ab053['writer']['createElement']('footnoteInlineContent');_0x3ab053['writer']['insert'](_0x4b3f77,_0x350473),_0x3ab053['convertChildren'](_0x18cec7,_0x4b3f77);}}_0x3ab053['updateConversionResult'](_0x350473,_0x3ac376);});}),_0x13aafa['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x211666,{writer:_0xfb107c})=>y(_0x211666,_0xfb107c,_0x426a7a,{'dataPipeline':!0x0})}),_0x13aafa['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x18dca3,{writer:_0x2219e0})=>y(_0x18dca3,_0x2219e0,_0x426a7a)});}['_defineBogusParagraphConverters'](){const {editor:_0x5d14e8}=this,{conversion:_0x49e1e0}=_0x5d14e8;_0x5d14e8['config']['get']('footnotes.multiBlock')?(_0x49e1e0['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':p(),'converterPriority':'high'}),_0x49e1e0['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':p({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x5d14e8['model']['document'],'change:data',()=>{!function(_0x473f0e,_0x2ced49){const _0x4c0a1a=_0x473f0e['document']['differ'],_0x2841cd=new Set();for(const _0xa9f37e of _0x4c0a1a['getChanges']()){const _0x321add='attribute'==_0xa9f37e['type']?_0xa9f37e['range']['start']['parent']:_0xa9f37e['position']['parent'];_0x321add['is']('element','footnoteDefinition')&&_0x2841cd['add'](_0x321add);}for(const _0x43da68 of _0x2841cd['values']()){const _0x257960=Array['from'](_0x43da68['getChildren']())['filter'](_0x540a0c=>v(_0x540a0c,_0x2ced49['mapper']));for(const _0x394e4a of _0x257960)_0x2ced49['reconvertItem'](_0x394e4a);}}(_0x5d14e8['model'],_0x5d14e8['editing']);})):(_0x49e1e0['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':p()}),_0x49e1e0['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x1ae4b7,{writer:_0x682dce})=>{const _0x2ebd92=_0x682dce['createContainerElement']('span');return _0x682dce['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x2ebd92),_0x2ebd92;}}));}['_defineKeyboardHandlers'](){const {editor:_0x2f121b}=this,{editing:_0xd0867d,t:t}=_0x2f121b,_0x302738=_0x2f121b['model']['document']['selection'];_0x2f121b['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0x2f121b['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0xd0867d['view']['document'],'enter',(_0x565713,_0x473ecb)=>{const _0x3bd2ec=function(_0x2b8376){const _0x91eb6e=_0x2b8376['getSelectedElement']();if(_0x91eb6e?.['is']('element','footnoteRef'))return _0x91eb6e;return null;}(_0x302738);if(_0x3bd2ec){const _0x148992=_0x3bd2ec['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x148992),_0x473ecb['preventDefault'](),_0x565713['stop']();}},{'context':_0x521fba});}['_defineClickHandlers'](){const {editor:_0x39a73a}=this,{editing:_0x34efdc}=_0x39a73a;_0x39a73a['editing']['view']['addObserver'](_0x4fcbb1),_0x39a73a['editing']['view']['addObserver'](_0x515eea);let _0x47d4b0=!0x1;this['listenTo'](_0x34efdc['view']['document'],'pointerdown',(_0x3a774a,_0x94b200)=>{const {target:_0x14ae4f}=_0x94b200,_0x3b9d59=_0x34efdc['view']['document']['selection'];_0x47d4b0=!!(_0x14ae4f?.['is']('element','a')&&_0x14ae4f['parent']?.['is']('element','sup')&&_0x14ae4f['parent']['hasClass']('footnote'))&&_0x3b9d59['getSelectedElement']()===_0x14ae4f['parent'];},{'priority':'high'}),this['listenTo'](_0x34efdc['view']['document'],'click',(_0x13c8a1,_0x5056c3)=>{const {target:_0x21dd57}=_0x5056c3;if(!_0x21dd57?.['is']('element','a'))return;if(_0x21dd57['parent']?.['is']('element','sup')&&_0x21dd57['parent']['hasClass']('footnote')&&!_0x47d4b0)return void _0x5056c3['preventDefault']();let _0x41973f=_0x21dd57['getAttribute']('href');if(!_0x41973f?.['startsWith']('#'))return;_0x41973f=_0x41973f['slice'](0x1);let _0x21139e=!0x1;(_0x41973f['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x41973f['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x41973f))&&(_0x21139e=!0x0),_0x21139e&&(_0x5056c3['preventDefault'](),_0x13c8a1['stop']());},{'priority':'high','context':'$capture'});}}function p({dataPipeline:_0x536364}={}){return(_0x17d5c1,{writer:_0x1b8fe9})=>{if(!g(_0x17d5c1))return null;if(!_0x536364)return _0x1b8fe9['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x4279c0=_0x1b8fe9['createContainerElement']('p');return _0x1b8fe9['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x4279c0),_0x4279c0;};}function g(_0x43fa28){const {parent:_0x1870ca}=_0x43fa28;if(!_0x1870ca?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x1870ca['childCount'])return!0x1;for(const _0x44a7e0 of _0x43fa28['getAttributeKeys']())if(!_0x44a7e0['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x44a7e0)return!0x1;return!0x0;}function v(_0x401efa,_0x13e72d){if(!_0x401efa['is']('element','paragraph'))return!0x1;const _0x219e76=_0x13e72d['toViewElement'](_0x401efa);return!!_0x219e76&&g(_0x401efa)!==_0x219e76['is']('element','span');}function Q(_0xf4c67f){return _0x521fba(_0xf4c67f)&&_0xf4c67f['is']('containerElement')&&!!_0xf4c67f['getCustomProperty']('footnotesDefinitions');}function D(_0x4ad6cf,_0xecb68e={}){const _0x5d0c01=_0x4ad6cf['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x44f473=_0x4ad6cf['createContainerElement']('ol',{'class':'footnotes-list'},_0x4ad6cf['createSlot']());return _0x4ad6cf['createContainerElement']('div',{'class':'footnotes',..._0xecb68e},[_0x5d0c01,_0x44f473]);}function b(_0x27297e,_0x4ad165){const _0x376c11=_0x27297e['getAttribute']('footnoteId'),_0x29c6f8=_0x27297e['getAttribute']('footnoteCounter'),_0x4106df=_0x4ad165['createUIElement']('a',{'href':'#'+_0x376c11},function(_0x132ab6){const _0x17ca05=this['toDomElement'](_0x132ab6);return _0x17ca05['textContent']=_0x29c6f8,_0x17ca05;}),_0x18e9dc=_0x4ad165['createContainerElement']('sup',{'id':'ref-'+_0x376c11,'class':'footnote'},[_0x4106df]);return _0x18e9dc['getFillerOffset']=()=>null,_0x18e9dc;}function y(_0x633ab2,_0x41b074,_0x11ba97,{dataPipeline:_0xfd75b8}={}){const {t:t}=_0x11ba97,_0x14ae1b=_0x633ab2['getAttribute']('footnoteId'),_0x5a7d1f=_0x41b074['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x14ae1b},function(_0x5bf2ed){const _0x22e0f2=this['toDomElement'](_0x5bf2ed);return _0x22e0f2['innerText']='^',_0x22e0f2;}),_0x2af36b=_0xfd75b8?_0x41b074['createContainerElement']('div',{'class':'footnote-content'}):_0x4e1011(_0x41b074['createEditableElement']('div',{'class':'footnote-content'}),_0x41b074,{'label':t('Footnote\x20content.')});return _0x41b074['insert'](_0x41b074['createPositionAt'](_0x2af36b,0x0),_0x41b074['createSlot']()),_0x41b074['createContainerElement']('li',{'class':'footnote-definition','id':_0x14ae1b},[_0x5a7d1f,_0x2af36b]);}class e extends _0xae5732{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x26db3c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x154a8d}=this,{plugins:_0x47b702,model:_0x309892}=_0x154a8d,_0x3dabde=_0x47b702['get'](_0x26db3c),_0xfcdd98=_0x47b702['get'](f);this['listenTo'](_0x3dabde,'outputTransformation',(_0x232118,_0xc7a8c6)=>{const _0x1003dd=l(_0x309892['createRangeIn'](_0xc7a8c6['content']));if(!_0x1003dd['length'])return;const _0x46bd88=_0xfcdd98['getFootnotes'](),_0x31fe19=_0x1003dd['reduce']((_0x4b4926,_0x4dbdf6)=>{const _0x6bbdac=_0x46bd88['find'](_0x3b6b3a=>_0x3b6b3a['id']===_0x4dbdf6);if(_0x6bbdac){const _0x5b84c1=_0x154a8d['data']['toView'](_0x6bbdac['definition'],{'isClipboardPipeline':!0x0}),_0x525738=_0x154a8d['data']['htmlProcessor']['toData'](_0x5b84c1);_0x4b4926[_0x6bbdac['id']]=_0x525738;}return _0x4b4926;},Object['create'](null));_0xc7a8c6['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x31fe19));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x49e5d5}=this,{model:_0x3b14f5,plugins:_0x1e88e4}=_0x49e5d5,{view:_0x1f9bf7}=_0x49e5d5['editing'],_0x1f3de9=_0x1e88e4['get'](_0x26db3c),_0x3c1908=_0x1e88e4['get'](f),_0x2ea31f=_0x49e5d5['config']['get']('footnotes.multiBlock');let _0x1443d2=null;this['listenTo'](_0x1f9bf7['document'],'clipboardInput',(_0x4b0eb8,_0x4b9c6e)=>{const _0x19e0b2=_0x4b9c6e['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x1443d2=_0x19e0b2?JSON['parse'](_0x19e0b2):null;}),this['listenTo'](_0x1f3de9,'contentInsertion',(_0x2426dd,_0x5917f5)=>{const _0x5ce816=_0x5917f5['sourceEditorId']===this['editor']['id'];_0x5ce816&&'drop'===_0x5917f5['method']||_0x3b14f5['change'](_0x17db8f=>{let _0x1cf48d=_0x3c1908['getFootnotesDefinitionsObjectElement']();const _0x3445eb=!!_0x1cf48d&&Array['from'](_0x3b14f5['document']['selection']['getSelectedBlocks']())['includes'](_0x1cf48d);if(!_0x1443d2&&function(_0x2c5d30){for(const {item:_0x303424}of _0x2c5d30)if(_0x303424['is']('element','footnoteRef'))return!0x0;return!0x1;}(_0x3b14f5['createRangeIn'](_0x5917f5['content']))&&(_0x1443d2=function(_0x51966c,_0x366b61){const _0x1536dd=c(_0x51966c,_0x366b61);if(!_0x1536dd)return null;const _0x59fb89=Object['create'](null);for(const _0x10eec5 of _0x1536dd['getChildren']())_0x10eec5['is']('element','footnoteDefinition')&&_0x10eec5['hasAttribute']('footnoteId')&&(_0x59fb89[_0x10eec5['getAttribute']('footnoteId')]=_0x51966c['cloneElement'](_0x10eec5,!0x0));return Object['keys'](_0x59fb89)['length']?_0x59fb89:null;}(_0x17db8f,_0x5917f5['content'])),(_0x1cf48d&&!_0x3445eb||!_0x1cf48d&&!_0x1443d2)&&function(_0x4150f7,_0x3d7033){const _0x369f9b=[];for(const {item:_0x4f9e03}of _0x4150f7['createRangeIn'](_0x3d7033))_0x4f9e03['is']('element','footnotesDefinitions')&&_0x369f9b['push'](_0x4f9e03);for(const _0x25786f of _0x369f9b)_0x4150f7['remove'](_0x25786f);}(_0x17db8f,_0x5917f5['content']),!_0x1443d2)return;const {selection:_0x526224}=_0x3b14f5['document'],_0x109b74=_0x526224['getFirstRange']()['root'];_0x1cf48d&&!_0x3445eb||(_0x1cf48d=c(_0x17db8f,_0x5917f5['content']),_0x1cf48d||=_0x3c1908['_insertEmptyFootnotesDefinitionsContainer'](_0x17db8f,_0x109b74));const _0x59bbad=Array['from'](_0x526224['getRanges']())['flatMap'](l),_0x5e7f1b=function(_0xe24b38,_0x569a7f,_0xad8d23){const _0x3e9639=Object['create'](null);for(const {item:_0x43253f}of _0xe24b38['createRangeIn'](_0x569a7f))if(_0x43253f['is']('element','footnoteRef')){const _0x2dbfb6=_0x43253f['getAttribute']('footnoteId');if(!_0xad8d23(_0x2dbfb6))continue;_0x3e9639[_0x2dbfb6]||(_0x3e9639[_0x2dbfb6]=_0x2d21b2()),_0xe24b38['setAttribute']('footnoteId',_0x3e9639[_0x2dbfb6],_0x43253f);}return _0x3e9639;}(_0x17db8f,_0x5917f5['content'],_0x396f8d=>{if(!_0x5ce816)return!0x0;return!!_0x3c1908['getFootnote'](_0x396f8d)&&!_0x59bbad['includes'](_0x396f8d);});for(const [_0x439b74,_0x133077]of Object['entries'](_0x1443d2)){const _0x58eefe=_0x5e7f1b[_0x439b74]||_0x439b74;let _0x210865;if('string'!=typeof _0x133077)_0x210865=_0x133077,_0x58eefe!==_0x439b74&&_0x17db8f['setAttribute']('footnoteId',_0x58eefe,_0x210865);else{_0x210865=_0x17db8f['createElement']('footnoteDefinition',{'footnoteId':_0x58eefe});const _0x2e19b6=_0x49e5d5['data']['htmlProcessor']['toView'](_0x133077);let _0x44a84b;if(_0x2ea31f)_0x44a84b=_0x49e5d5['data']['toModel'](_0x2e19b6,_0x210865);else{_0x44a84b=_0x17db8f['createElement']('footnoteInlineContent');const _0x1363a2=_0x49e5d5['data']['toModel'](_0x2e19b6,_0x44a84b);_0x17db8f['insert'](_0x1363a2,_0x44a84b);}_0x17db8f['append'](_0x44a84b,_0x210865);}_0x17db8f['insert'](_0x210865,_0x1cf48d,'end');}_0x1443d2=null;});});}}function c(_0x5446b7,_0x1bd941){for(const {item:_0x2c79ed}of _0x5446b7['createRangeIn'](_0x1bd941))if(_0x2c79ed['is']('element','footnotesDefinitions'))return _0x2c79ed;return null;}function l(_0x397d12){const _0x467b3a=new Set();for(const {item:_0x55c3b3}of _0x397d12)_0x55c3b3['is']('element','footnoteRef')&&_0x467b3a['add'](_0x55c3b3['getAttribute']('footnoteId'));return Array['from'](_0x467b3a);}class i extends _0xae5732{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xeb2864}=this,{componentFactory:_0x39dc79}=_0xeb2864['ui'];_0x39dc79['add']('insertFootnote',E(_0xeb2864,_0x2c789d)),_0x39dc79['add']('menuBar:insertFootnote',E(_0xeb2864,_0x4c9c5c)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1dfb6d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5c73fc;for(const _0x5566eb in _0x1dfb6d){const _0x124821=_0x5566eb,_0x5e950f=_0x1dfb6d[_0x124821];if('footnotesLicenseKeyValid'==_0x5e950f||'footnotesLicenseKeyInvalid'==_0x5e950f||'footnotesLicenseKeyExpired'==_0x5e950f||'footnotesLicenseKeyDomainLimit'==_0x5e950f||'footnotesLicenseKeyNotAllowed'==_0x5e950f||'footnotesLicenseKeyEvaluationLimit'==_0x5e950f||'footnotesLicenseKeyUsageLimit'==_0x5e950f){delete _0x1dfb6d[_0x124821],_0x5c73fc=_0x5e950f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x5c73fc&&_0x1dfb6d['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x5c73fc&&_0x1dfb6d['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x5c73fc&&_0x1dfb6d['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x5c73fc&&_0x1dfb6d['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x5c73fc&&_0x1dfb6d['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyUsageLimit'==_0x5c73fc&&_0x1dfb6d['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function E(_0x913e9b,_0x256f44){const _0x50b96e=_0x913e9b['commands']['get']('insertFootnote');return _0x5540ac=>{const {t:t}=_0x5540ac,_0x220ace=new _0x256f44(_0x5540ac),_0x4c4bf5=_0x220ace instanceof _0x4c9c5c;return _0x220ace['bind']('isEnabled')['to'](_0x50b96e,'isEnabled'),_0x220ace['set']({'label':t(_0x4c4bf5?'Footnote':'Insert\x20footnote'),'icon':_0x58d7dc,'tooltip':!0x0}),_0x220ace['on']('execute',()=>{_0x50b96e['execute'](),_0x913e9b['editing']['view']['focus']();}),_0x220ace;};}class lt extends _0xae5732{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const W=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x5cd0a0{['refresh'](){const {editor:_0x158013}=this,_0x137d35=_0x158013['plugins']['get'](f)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x137d35,this['value']=_0x137d35?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x1aa100}){const {editor:_0x405306}=this,_0x2bb27e=_0x405306['plugins']['get'](f),_0x578ecf=_0x2bb27e['getFootnotesDefinitionsObjectElement']();_0x578ecf&&W['includes'](_0x1aa100)&&_0x405306['model']['change'](_0x1b62ba=>{_0x1b62ba['setAttribute']('footnotesListStyle',_0x1aa100,_0x578ecf),_0x2bb27e['_updateFootnotesCounters'](_0x1b62ba);});}}class C extends _0x5cd0a0{['refresh'](){const {editor:_0x44fd0c}=this,_0x1f6e0b=_0x44fd0c['plugins']['get'](f)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x1f6e0b,this['value']=_0x1f6e0b?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x374348}){const {editor:_0x1f61dc}=this,_0x35ff9d=_0x1f61dc['plugins']['get'](f),_0x32845a=_0x35ff9d['getFootnotesDefinitionsObjectElement']();_0x32845a&&Number['isInteger'](_0x374348)&&_0x1f61dc['model']['change'](_0x132fcf=>{_0x132fcf['setAttribute']('footnotesListStart',_0x374348,_0x32845a),_0x35ff9d['_updateFootnotesCounters'](_0x132fcf);});}}class P extends _0xae5732{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1b6fe7}=this;_0x1b6fe7['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x1b6fe7['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x1b6fe7['commands']['add']('footnotesStyle',new S(_0x1b6fe7)),_0x1b6fe7['commands']['add']('footnotesStart',new C(_0x1b6fe7)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x249c54}=this,{schema:_0x3a22a1}=_0x249c54['model'];_0x3a22a1['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x44b596}=this,{conversion:_0x33fefb,model:_0xd7515f}=_0x44b596,{schema:_0x391776}=_0xd7515f;_0x33fefb['for']('upcast')['add'](_0x2acb87=>{_0x2acb87['on']('element:ol',(_0x55ee56,_0x5c29c5,_0x77f22)=>{const _0x134da0=_0x5c29c5['viewItem'],_0x57aa83=_0x5c29c5['modelCursor']?.['parent'];_0x134da0['hasClass']('footnotes-list')&&_0x57aa83?.['is']('element','footnotesDefinitions')&&(function(_0x4d783e,_0x3c5383,_0x539494,_0x428633){if(!_0x428633['checkAttribute'](_0x3c5383,'footnotesListStart'))return;let _0x261471=0x1;const _0x1576a5=_0x539494['consumable']['consume'](_0x4d783e,{'attributes':'start'});if(_0x1576a5){const _0xe7f47a=Number['parseInt'](_0x4d783e['getAttribute']('start'),0xa);Number['isNaN'](_0xe7f47a)||(_0x261471=_0xe7f47a);}!_0x1576a5&&_0x3c5383['hasAttribute']('footnotesListStart')||_0x539494['writer']['setAttribute']('footnotesListStart',_0x261471,_0x3c5383);}(_0x134da0,_0x57aa83,_0x77f22,_0x391776),function(_0x58c427,_0x5c57e7,_0x250259,_0x22b07f){if(!_0x22b07f['checkAttribute'](_0x5c57e7,'footnotesListStyle'))return;let _0xc708f0='decimal',_0x12e61c=!0x1;if(_0x250259['consumable']['consume'](_0x58c427,{'attributes':'type'})){const _0x4c71d9={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x58c427['getAttribute']('type')];_0x4c71d9&&(_0xc708f0=_0x4c71d9),_0x12e61c=!0x0;}_0x250259['consumable']['consume'](_0x58c427,{'styles':'list-style-type'})&&(_0xc708f0=function(_0x5e8d45){switch(_0x5e8d45){case'lower-alpha':return'lower-latin';case'upper-alpha':return'upper-latin';default:return _0x5e8d45;}}(_0x58c427['getStyle']('list-style-type')),_0x12e61c=!0x0),!_0x12e61c&&_0x5c57e7['hasAttribute']('footnotesListStyle')||_0x250259['writer']['setAttribute']('footnotesListStyle',_0xc708f0,_0x5c57e7);}(_0x134da0,_0x57aa83,_0x77f22,_0x391776));});}),_0x33fefb['for']('downcast')['add'](_0x357f22=>{_0x357f22['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x3c683a,_0x3b3b62,_0x4ebe12)=>{if(!_0x4ebe12['consumable']['consume'](_0x3b3b62['item'],_0x3c683a['name']))return;const _0x5df1ad=M(_0x3b3b62['item'],_0x4ebe12['mapper']),{attributeNewValue:_0x8a76cc}=_0x3b3b62;null==_0x8a76cc||0x1===_0x8a76cc?_0x4ebe12['writer']['removeAttribute']('start',_0x5df1ad):_0x4ebe12['writer']['setAttribute']('start',String(_0x8a76cc),_0x5df1ad);}),_0x357f22['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x10c31d,_0x10c9b3,_0x4c33bf)=>{if(!_0x4c33bf['consumable']['consume'](_0x10c9b3['item'],_0x10c31d['name']))return;const _0x786bed=M(_0x10c9b3['item'],_0x4c33bf['mapper']),{attributeNewValue:_0x83012c}=_0x10c9b3;_0x83012c&&'decimal'!==_0x83012c?_0x4c33bf['writer']['setStyle']('list-style-type',_0x83012c,_0x786bed):_0x4c33bf['writer']['removeStyle']('list-style-type',_0x786bed);});});}['_definePostfixer'](){const {editor:_0x1f5840}=this,{model:_0x306843}=_0x1f5840,_0xbbe8d8=_0x1f5840['plugins']['get'](f),_0x609844=this['_getDefaultListStyle'](),_0x2f3453=this['_getDefaultStartIndex']();_0x306843['document']['registerPostFixer'](_0x2126aa=>{const _0x210104=_0x306843['document']['differ']['getChanges']();let _0xc156ef=!0x1;for(const _0x366006 of _0x210104){if('insert'!==_0x366006['type']||'$text'===_0x366006['name'])continue;const _0x4d0e10=_0x306843['createRangeOn'](_0x366006['position']['nodeAfter']);for(const _0x1e9057 of _0x4d0e10['getItems']())_0x1e9057['is']('element','footnotesDefinitions')&&(!_0x1e9057['hasAttribute']('footnotesListStart')&&_0x306843['schema']['checkAttribute'](_0x1e9057,'footnotesListStart')&&(_0x2126aa['setAttribute']('footnotesListStart',_0x2f3453,_0x1e9057),_0xc156ef=!0x0),!_0x1e9057['hasAttribute']('footnotesListStyle')&&_0x306843['schema']['checkAttribute'](_0x1e9057,'footnotesListStyle')&&(_0x2126aa['setAttribute']('footnotesListStyle',_0x609844,_0x1e9057),_0xc156ef=!0x0));}return _0xc156ef&&_0xbbe8d8['_updateFootnotesCounters'](_0x2126aa),_0xc156ef;});}['_defineFormatter'](){const {editor:_0x3e071b}=this;_0x3e071b['plugins']['get'](f)['setFootnoteFormatter'](_0x5e3987=>this['_formatFootnoteListValue'](_0x5e3987));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x5d2d59,value:_0xa2b257,digits:_0x502c80}){const _0x42bad5=_0x5d2d59['getAttribute']('footnotesListStyle'),_0x1a7283=_0x5d2d59['getAttribute']('footnotesListStart'),_0x325311=Math['floor'](_0xa2b257)+(_0x1a7283??0x1)-0x1;switch(_0x42bad5){case'decimal-leading-zero':return function(_0x1a6c23,_0x190906){return String(_0x1a6c23)['padStart'](_0x190906,'0');}(_0x325311,Math['max'](0x2,_0x502c80));case'lower-alpha':case'lower-latin':return N(_0x325311,!0x1);case'upper-alpha':case'upper-latin':return N(_0x325311,!0x0);case'lower-roman':return X(_0x325311,!0x1);case'upper-roman':return X(_0x325311,!0x0);default:return String(_0x325311);}}}function M(_0x5b5548,_0x2361d2){const _0x3f8392=_0x2361d2['toViewElement'](_0x5b5548);return Array['from'](_0x3f8392['getChildren']())['find'](_0x28b692=>_0x28b692['is']('element','ol')&&_0x28b692['hasClass']('footnotes-list'));}function N(_0x34511a,_0x3fcc8){let _0x5e08bc='',_0x1e21e7=_0x34511a;for(;_0x1e21e7>0x0;){const _0x44abbc=(_0x1e21e7-0x1)%0x1a;_0x5e08bc=String['fromCharCode'](0x61+_0x44abbc)+_0x5e08bc,_0x1e21e7=Math['floor']((_0x1e21e7-0x1)/0x1a);}return _0x3fcc8?_0x5e08bc['toUpperCase']():_0x5e08bc;}const V=[{'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 X(_0x123510,_0x2439e1){let _0x23c1ae='',_0x5627e1=_0x123510;for(const {value:_0xd757d,numeral:_0x1eedfa}of V)for(;_0x5627e1>=_0xd757d;)_0x23c1ae+=_0x1eedfa,_0x5627e1-=_0xd757d;return _0x2439e1?_0x23c1ae:_0x23c1ae['toLowerCase']();}class J extends _0x4d57b7{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new rt();['keystrokes']=new nt();['focusables']=new _0x34c837();['focusCycler'];constructor(_0x3ad4db,{styleButtonViews:_0x376531,styleGridAriaLabel:_0x55d043}){super(_0x3ad4db),(this['focusCycler']=new tt({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x376531,_0x55d043),[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 _0x8c43c5 of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x8c43c5['element']);st({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>at['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 _0x39eb6b=_0x29a9bf=>_0x29a9bf['stopPropagation']();this['keystrokes']['set']('arrowright',_0x39eb6b),this['keystrokes']['set']('arrowleft',_0x39eb6b),this['keystrokes']['set']('arrowup',_0x39eb6b),this['keystrokes']['set']('arrowdown',_0x39eb6b);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x1f0abb,_0x577ff5){const _0x3aebe7=new _0x4d57b7(this['locale']);return _0x3aebe7['children']=_0x3aebe7['createCollection'](),_0x3aebe7['children']['addMany'](_0x1f0abb),_0x3aebe7['setTemplate']({'tag':'div','attributes':{'aria-label':_0x577ff5,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x3aebe7['children']}),_0x3aebe7['children']['delegate']('execute')['to'](this),_0x3aebe7['focus']=function(){for(const _0x57a0cd of this['children'])if(_0x57a0cd instanceof _0x2c789d&&_0x57a0cd['isOn'])return void _0x57a0cd['focus']();this['children']['first']['focus']();},_0x3aebe7['focusTracker']=new rt(),_0x3aebe7['keystrokes']=new nt(),_0x3aebe7['render'](),_0x3aebe7['keystrokes']['listenTo'](_0x3aebe7['element']),this['children']['add'](_0x3aebe7),_0x3aebe7;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x16f324=this['_createStartIndexPropertyView'](),_0x158c32=[_0x16f324],_0x222d63=new it(this['locale'],_0x158c32);return _0x222d63['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x222d63['buttonView']['bind']('isEnabled')['toMany'](_0x158c32,'isEnabled',(..._0x294ff7)=>_0x294ff7['some'](_0x3ce634=>_0x3ce634)),_0x222d63['buttonView']['on']('change:isEnabled',(_0x593e16,_0xd0a3c0,_0x368fe3)=>{_0x368fe3||(_0x222d63['isCollapsed']=!0x0);}),this['children']['add'](_0x222d63),[_0x16f324,_0x222d63];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x40a3ef=new et(this['locale'],ot);return _0x40a3ef['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x40a3ef['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x40a3ef['fieldView']['on']('input',()=>{const _0x35a7db=_0x40a3ef['fieldView']['element'],_0x5f11ed=_0x35a7db['valueAsNumber'];Number['isNaN'](_0x5f11ed)?_0x40a3ef['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x35a7db['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x5f11ed}):_0x40a3ef['errorText']=t(_0x5f11ed<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0x40a3ef;}}class j extends _0xae5732{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x43a948,_0x2ddc4e];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1dc6a4}=this,{componentFactory:_0x81c20a}=_0x1dc6a4['ui'];_0x1dc6a4['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x81c20a['add']('footnotesStyle',function(_0x1c1013){return _0x2bd1a6=>{const {t:t}=_0x2bd1a6,_0x244681=_0x1c1013['commands']['get']('footnotesStyle'),_0x13100e=_0x188bd8(_0x2bd1a6),{buttonView:_0x235c91}=_0x13100e;return _0x13100e['class']='ck-footnotes-styles-dropdown',_0x13100e['bind']('isEnabled')['to'](_0x244681,'isEnabled'),_0x235c91['set']({'label':t('Footnotes\x20style'),'icon':_0x58d7dc,'tooltip':!0x0}),_0x13100e['once']('change:isOpen',()=>{const _0x34c9fd=function({editor:_0x38eca0,dropdownView:_0x234808}){const {t:t}=_0x38eca0['locale'],_0x573098=t('Footnotes\x20definitions\x20styles'),_0x325f3b=function(_0x2d71c0){const t=_0x2d71c0['locale']['t'],_0x4c803d=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x3b6cef},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x45b2ce},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x252eff},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x23435e},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x317e32},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x1ff7c8}];return _0x4c803d['map'](function(_0x475817){const _0x5f3ba6=_0x475817['locale'];return({label:_0x1fc306,icon:_0x4d638f,tooltip:_0x5d421b,style:_0x4324fd})=>{const _0x135959=_0x475817['commands']['get']('footnotesStyle'),_0x5304ce=new _0x2c789d(_0x5f3ba6);return _0x5304ce['set']({'label':_0x1fc306,'icon':_0x4d638f,'tooltip':_0x5d421b}),_0x5304ce['bind']('isOn')['to'](_0x135959,'value',_0x3ec595=>_0x3ec595===_0x4324fd),_0x5304ce['bind']('isEnabled')['to'](_0x135959,'isEnabled'),_0x5304ce['on']('execute',()=>{_0x475817['execute']('footnotesStyle',{'value':_0x4324fd}),_0x475817['editing']['view']['focus']();}),_0x5304ce;};}(_0x2d71c0));}(_0x38eca0),_0x4983ac=new J(_0x38eca0['locale'],{'styleGridAriaLabel':_0x573098,'styleButtonViews':_0x325f3b}),_0x215967=_0x38eca0['commands']['get']('footnotesStart');return _0x4983ac['startIndexFieldView']['bind']('isEnabled')['to'](_0x215967),_0x4983ac['startIndexFieldView']['fieldView']['bind']('value')['to'](_0x215967),_0x4983ac['on']('footnotesListStart',(_0x201c3a,_0x29e079)=>{_0x38eca0['execute']('footnotesStart',{'value':_0x29e079['startIndex']});}),_0x4983ac['delegate']('execute')['to'](_0x234808),_0x4983ac;}({'editor':_0x1c1013,'dropdownView':_0x13100e});_0x13100e['panelView']['children']['add'](_0x34c9fd);}),_0x13100e;};}(_0x1dc6a4));}['afterInit'](){const {editor:_0x3c181e}=this,{t:t}=_0x3c181e['locale'],_0x38b414=_0x3c181e['plugins']['get'](_0x2ddc4e),{defaultPositions:_0x48ae73}=_0x1e73bb;_0x38b414['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x3c181e['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x2c7c36=>{let _0x6f7d8c=_0x2c7c36['getFirstPosition']()?.['parent'];return _0x6f7d8c?.['is']('$text')&&(_0x6f7d8c=_0x6f7d8c['parent']),_0x6f7d8c?.['is']('element')?_0x6f7d8c['findAncestor'](Q):null;},'positions':[_0x48ae73['southArrowNorth'],_0x48ae73['southArrowNorthMiddleWest'],_0x48ae73['southArrowNorthMiddleEast'],_0x48ae73['southArrowNorthWest'],_0x48ae73['southArrowNorthEast'],_0x48ae73['northArrowSouth'],_0x48ae73['northArrowSouthMiddleWest'],_0x48ae73['northArrowSouthMiddleEast'],_0x48ae73['northArrowSouthWest'],_0x48ae73['northArrowSouthEast'],_0x48ae73['viewportStickyNorth']]});}}class ft extends _0xae5732{static get['pluginName'](){return'FootnotesProperties';}static get['requires'](){return[P,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{lt as Footnotes,e as FootnotesClipboard,r as FootnotesEditing,ft as FootnotesProperties,P as FootnotesPropertiesEditing,j as FootnotesPropertiesUI,C as FootnotesStartCommand,S as FootnotesStyleCommand,f as FootnotesTracker,i as FootnotesUI,h as InsertFootnoteCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-footnotes",
|
|
3
|
-
"version": "47.5.0
|
|
3
|
+
"version": "47.5.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": "47.5.0
|
|
27
|
-
"@ckeditor/ckeditor5-ui": "47.5.0
|
|
28
|
-
"@ckeditor/ckeditor5-engine": "47.5.0
|
|
29
|
-
"@ckeditor/ckeditor5-icons": "47.5.0
|
|
30
|
-
"@ckeditor/ckeditor5-widget": "47.5.0
|
|
31
|
-
"@ckeditor/ckeditor5-clipboard": "47.5.0
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "47.5.0
|
|
33
|
-
"ckeditor5": "47.5.0
|
|
26
|
+
"@ckeditor/ckeditor5-core": "47.5.0",
|
|
27
|
+
"@ckeditor/ckeditor5-ui": "47.5.0",
|
|
28
|
+
"@ckeditor/ckeditor5-engine": "47.5.0",
|
|
29
|
+
"@ckeditor/ckeditor5-icons": "47.5.0",
|
|
30
|
+
"@ckeditor/ckeditor5-widget": "47.5.0",
|
|
31
|
+
"@ckeditor/ckeditor5-clipboard": "47.5.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "47.5.0",
|
|
33
|
+
"ckeditor5": "47.5.0"
|
|
34
34
|
},
|
|
35
35
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
36
36
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0xee22(_0x3d5823,_0x345a9c){const _0x49bb53=_0x49bb();return _0xee22=function(_0xee2208,_0x2c4a75){_0xee2208=_0xee2208-0x106;let _0x423bc6=_0x49bb53[_0xee2208];return _0x423bc6;},_0xee22(_0x3d5823,_0x345a9c);}const _0x282357=_0xee22;function _0x49bb(){const _0x5bb81d=['execute','document','model','getFirstRange','336782ATGMrB','length','end','40683vwVbij','1427028sAnujG','1467718qeDXdh','975915UXsWEG','_getPositionToInsertFootnote','selection','get','3970310dmtGUm','editor','FootnotesEditing','isBlock','3232LjrWFi','change','insertObject','1ziqoVb','checkChild','plugins','string','insert-footnote-command-executed-with-invalid-id','footnoteId','isObject','3681LnjxMH','isEnabled','92NjErkL','_moveSelectionToFootnoteDefinition','refresh','footnoteRef','createElement','getItems','test'];_0x49bb=function(){return _0x5bb81d;};return _0x49bb();}(function(_0x20fca5,_0x44c805){const _0x2b37a4=_0xee22,_0xb65331=_0x20fca5();while(!![]){try{const _0x192d5=-parseInt(_0x2b37a4(0x10a))/0x1*(-parseInt(_0x2b37a4(0x11e))/0x2)+-parseInt(_0x2b37a4(0x121))/0x3*(parseInt(_0x2b37a4(0x113))/0x4)+parseInt(_0x2b37a4(0x124))/0x5+-parseInt(_0x2b37a4(0x122))/0x6+-parseInt(_0x2b37a4(0x123))/0x7+parseInt(_0x2b37a4(0x107))/0x8*(parseInt(_0x2b37a4(0x111))/0x9)+parseInt(_0x2b37a4(0x128))/0xa;if(_0x192d5===_0x44c805)break;else _0xb65331['push'](_0xb65331['shift']());}catch(_0x32a373){_0xb65331['push'](_0xb65331['shift']());}}}(_0x49bb,0x28a1a));import{logWarning as _0x36d654,uid as _0x42c7fd}from'ckeditor5/src/utils.js';import{Command as _0x166738}from'ckeditor5/src/core.js';export class InsertFootnoteCommand extends _0x166738{[_0x282357(0x115)](){const _0x2eb4b2=_0x282357,_0x531e2a=this[_0x2eb4b2(0x129)][_0x2eb4b2(0x11c)][_0x2eb4b2(0x11b)][_0x2eb4b2(0x126)],_0x1d370e=this[_0x2eb4b2(0x125)](_0x531e2a);this[_0x2eb4b2(0x112)]=!!_0x1d370e;}[_0x282357(0x11a)](_0x40268e){const _0x411597=_0x282357,{editor:_0xd1d2f4}=this,{model:_0x494591}=_0xd1d2f4,{selection:_0x59552e}=_0x494591[_0x411597(0x11b)],_0x2ada72=this[_0x411597(0x125)](_0x59552e);if(!_0x2ada72)return;const _0x3c705e=_0xd1d2f4[_0x411597(0x10c)][_0x411597(0x127)](_0x411597(0x12a)),_0x31efce=_0x40268e?.[_0x411597(0x10f)]??_0x42c7fd();!function(_0x3eedc6){const _0x595116=_0x411597;return _0x595116(0x10d)==typeof _0x3eedc6&&_0x3eedc6[_0x595116(0x11f)]>0x0&&!/\s/[_0x595116(0x119)](_0x3eedc6)&&!/^\d/[_0x595116(0x119)](_0x3eedc6);}(_0x31efce)?_0x36d654(_0x411597(0x10e)):(_0x494591[_0x411597(0x108)](_0x4e871c=>{const _0x4dab7c=_0x411597,_0x29fc63=_0x4e871c[_0x4dab7c(0x117)](_0x4dab7c(0x116),{'footnoteId':_0x31efce});_0x494591[_0x4dab7c(0x109)](_0x29fc63,_0x2ada72,null);}),_0x3c705e[_0x411597(0x114)](_0x31efce));}[_0x282357(0x125)](_0x3eb195){const _0xdf566b=_0x282357,{model:_0x5a1dd4}=this[_0xdf566b(0x129)],{schema:_0x4331fd}=_0x5a1dd4,_0x5b025a=_0x3eb195[_0xdf566b(0x11d)]();for(const _0x162bdf of _0x5b025a[_0xdf566b(0x118)]())if(_0x4331fd[_0xdf566b(0x106)](_0x162bdf)||_0x4331fd[_0xdf566b(0x110)](_0x162bdf))return null;const _0x1e66af=_0x5b025a[_0xdf566b(0x120)];return _0x4331fd[_0xdf566b(0x10b)](_0x1e66af,_0xdf566b(0x116))?_0x1e66af:null;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x145dfe=_0x3e9e;(function(_0x5e3cd6,_0x2683e7){const _0x353425=_0x3e9e,_0x251589=_0x5e3cd6();while(!![]){try{const _0x11a030=parseInt(_0x353425(0x1e2))/0x1*(-parseInt(_0x353425(0x1e0))/0x2)+-parseInt(_0x353425(0x1dc))/0x3*(parseInt(_0x353425(0x1f0))/0x4)+-parseInt(_0x353425(0x1eb))/0x5*(parseInt(_0x353425(0x1e5))/0x6)+-parseInt(_0x353425(0x1f3))/0x7+parseInt(_0x353425(0x1e3))/0x8*(parseInt(_0x353425(0x1f4))/0x9)+parseInt(_0x353425(0x1df))/0xa*(parseInt(_0x353425(0x1f2))/0xb)+parseInt(_0x353425(0x1e1))/0xc*(parseInt(_0x353425(0x1ed))/0xd);if(_0x11a030===_0x2683e7)break;else _0x251589['push'](_0x251589['shift']());}catch(_0x407317){_0x251589['push'](_0x251589['shift']());}}}(_0x191d,0x799b4));import{Command as _0x2ae1f7}from'ckeditor5/src/core.js';function _0x191d(){const _0x4a5f00=['1285800MUPWlc','646FXvnYY','7335180QBazaw','481tRknvC','50936qJIvag','change','366seXjDm','execute','get','footnotesListStart','getAttribute','getFootnotesDefinitionsObjectElement','50175Eqndbc','value','13XKpvcm','refresh','_updateFootnotesCounters','512AhNnjk','isEnabled','77jRzlyv','3411926WmeJKN','621YibfFP','setAttribute','plugins','4632eeRAHy','model','isInteger'];_0x191d=function(){return _0x4a5f00;};return _0x191d();}import{FootnotesTracker as _0x114ab5}from'../../footnotestracker.js';function _0x3e9e(_0x1cfd50,_0x2a99cb){const _0x191d06=_0x191d();return _0x3e9e=function(_0x3e9e84,_0x5e6a9b){_0x3e9e84=_0x3e9e84-0x1dc;let _0x5f1a28=_0x191d06[_0x3e9e84];return _0x5f1a28;},_0x3e9e(_0x1cfd50,_0x2a99cb);}export class FootnotesStartCommand extends _0x2ae1f7{[_0x145dfe(0x1ee)](){const _0x1c6576=_0x145dfe,{editor:_0x29dd39}=this,_0x3bb2ce=_0x29dd39[_0x1c6576(0x1f6)][_0x1c6576(0x1e7)](_0x114ab5)[_0x1c6576(0x1ea)]();this[_0x1c6576(0x1f1)]=!!_0x3bb2ce,this[_0x1c6576(0x1ec)]=_0x3bb2ce?.[_0x1c6576(0x1e9)](_0x1c6576(0x1e8))??null;}[_0x145dfe(0x1e6)]({value:_0x3e7eec}){const _0x54039a=_0x145dfe,{editor:_0x299df5}=this,_0x265f31=_0x299df5[_0x54039a(0x1f6)][_0x54039a(0x1e7)](_0x114ab5),_0x24ba14=_0x265f31[_0x54039a(0x1ea)]();_0x24ba14&&Number[_0x54039a(0x1de)](_0x3e7eec)&&_0x299df5[_0x54039a(0x1dd)][_0x54039a(0x1e4)](_0x4bc4d7=>{const _0x1fb10a=_0x54039a;_0x4bc4d7[_0x1fb10a(0x1f5)](_0x1fb10a(0x1e8),_0x3e7eec,_0x24ba14),_0x265f31[_0x1fb10a(0x1ef)](_0x4bc4d7);});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x1789(){const _0xaaec0d=['includes','execute','4fVWfHM','6410547FdTEnU','plugins','17954XInNXQ','setAttribute','248dXXhwT','getFootnotesDefinitionsObjectElement','isEnabled','getAttribute','51087VGwkJo','1213653NtQcIj','footnotesListStyle','20687480WOxusu','model','_updateFootnotesCounters','refresh','88ujXUIA','7926840sdzxbb','get','9828555MFumoS','change','value'];_0x1789=function(){return _0xaaec0d;};return _0x1789();}const _0x4e0a71=_0x1e18;function _0x1e18(_0x3ac8d3,_0x125730){const _0x178927=_0x1789();return _0x1e18=function(_0x1e185c,_0x3b2cec){_0x1e185c=_0x1e185c-0x1e8;let _0x12fc63=_0x178927[_0x1e185c];return _0x12fc63;},_0x1e18(_0x3ac8d3,_0x125730);}(function(_0x1d6909,_0x156bfd){const _0x575824=_0x1e18,_0x148ae7=_0x1d6909();while(!![]){try{const _0x1c0de2=-parseInt(_0x575824(0x1e9))/0x1*(-parseInt(_0x575824(0x1fe))/0x2)+parseInt(_0x575824(0x1ef))/0x3*(parseInt(_0x575824(0x1eb))/0x4)+-parseInt(_0x575824(0x1f9))/0x5+parseInt(_0x575824(0x1f7))/0x6+parseInt(_0x575824(0x1f0))/0x7*(parseInt(_0x575824(0x1f6))/0x8)+parseInt(_0x575824(0x1ff))/0x9+-parseInt(_0x575824(0x1f2))/0xa;if(_0x1c0de2===_0x156bfd)break;else _0x148ae7['push'](_0x148ae7['shift']());}catch(_0x3b0b45){_0x148ae7['push'](_0x148ae7['shift']());}}}(_0x1789,0xf39cf));import{Command as _0x45708f}from'ckeditor5/src/core.js';import{FOOTNOTES_DEFINITIONS_STYLES as _0x3df2d3}from'../footnotespropertiesconfig.js';import{FootnotesTracker as _0x3bc5df}from'../../footnotestracker.js';export class FootnotesStyleCommand extends _0x45708f{[_0x4e0a71(0x1f5)](){const _0x5ead71=_0x4e0a71,{editor:_0x4c4b47}=this,_0x92f420=_0x4c4b47[_0x5ead71(0x1e8)][_0x5ead71(0x1f8)](_0x3bc5df)[_0x5ead71(0x1ec)]();this[_0x5ead71(0x1ed)]=!!_0x92f420,this[_0x5ead71(0x1fb)]=_0x92f420?.[_0x5ead71(0x1ee)](_0x5ead71(0x1f1))??null;}[_0x4e0a71(0x1fd)]({value:_0x45d69f}){const _0x16c0d5=_0x4e0a71,{editor:_0x16d108}=this,_0x460221=_0x16d108[_0x16c0d5(0x1e8)][_0x16c0d5(0x1f8)](_0x3bc5df),_0x5c88e5=_0x460221[_0x16c0d5(0x1ec)]();_0x5c88e5&&_0x3df2d3[_0x16c0d5(0x1fc)](_0x45d69f)&&_0x16d108[_0x16c0d5(0x1f3)][_0x16c0d5(0x1fa)](_0x27f5ee=>{const _0x28e527=_0x16c0d5;_0x27f5ee[_0x28e527(0x1ea)](_0x28e527(0x1f1),_0x45d69f,_0x5c88e5),_0x460221[_0x28e527(0x1f4)](_0x27f5ee);});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{BalloonPanelView as
|
|
23
|
+
import{BalloonPanelView as _0x2457af,ButtonView as _0x323fa2,ContextualBalloon as _0x3c547c,createDropdown as _0x4f7d28}from'ckeditor5/src/ui.js';import{WidgetToolbarRepository as _0xec59ec}from'ckeditor5/src/widget.js';import{Plugin as _0x45cd36}from'ckeditor5/src/core.js';import{IconFootnote as _0xcd4a5d,IconListStyleDecimal as _0x5d3553,IconListStyleDecimalLeadingZero as _0x3c59ea,IconListStyleLowerLatin as _0x2f152a,IconListStyleLowerRoman as _0x19d9c1,IconListStyleUpperLatin as _0x5af302,IconListStyleUpperRoman as _0x28b20a}from'ckeditor5/src/icons.js';import{FootnotesDefinitionsPropertiesView as _0x247722}from'./ui/footnotesdefinitionspropertiesview.js';import{isFootnotesDefinitionsWidget as _0x24ef24}from'../footnotesediting.js';import'../../theme/footnotesproperties.css';export class FootnotesPropertiesUI extends _0x45cd36{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x3c547c,_0xec59ec];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4507ac}=this,{componentFactory:_0x40aa05}=_0x4507ac['ui'];_0x4507ac['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x40aa05['add']('footnotesStyle',function(_0x2f2085){return _0x2bb981=>{const {t:t}=_0x2bb981,_0x8ad941=_0x2f2085['commands']['get']('footnotesStyle'),_0x4b92da=_0x4f7d28(_0x2bb981),{buttonView:_0x4cafe9}=_0x4b92da;return _0x4b92da['class']='ck-footnotes-styles-dropdown',_0x4b92da['bind']('isEnabled')['to'](_0x8ad941,'isEnabled'),_0x4cafe9['set']({'label':t('Footnotes\x20style'),'icon':_0xcd4a5d,'tooltip':!0x0}),_0x4b92da['once']('change:isOpen',()=>{const _0xc1519a=function({editor:_0x5c1e7a,dropdownView:_0x25016f}){const {t:t}=_0x5c1e7a['locale'],_0x54f8df=t('Footnotes\x20definitions\x20styles'),_0x19ea27=function(_0x4b71a2){const t=_0x4b71a2['locale']['t'],_0x2cfdd7=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x5d3553},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x3c59ea},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x19d9c1},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x28b20a},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x2f152a},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x5af302}];return _0x2cfdd7['map'](function(_0xfe1219){const _0x52a500=_0xfe1219['locale'];return({label:_0x55ad5b,icon:_0xfe36f,tooltip:_0x5a7681,style:_0x5c930d})=>{const _0x2b3e7b=_0xfe1219['commands']['get']('footnotesStyle'),_0x2e3110=new _0x323fa2(_0x52a500);return _0x2e3110['set']({'label':_0x55ad5b,'icon':_0xfe36f,'tooltip':_0x5a7681}),_0x2e3110['bind']('isOn')['to'](_0x2b3e7b,'value',_0x1da225=>_0x1da225===_0x5c930d),_0x2e3110['bind']('isEnabled')['to'](_0x2b3e7b,'isEnabled'),_0x2e3110['on']('execute',()=>{_0xfe1219['execute']('footnotesStyle',{'value':_0x5c930d}),_0xfe1219['editing']['view']['focus']();}),_0x2e3110;};}(_0x4b71a2));}(_0x5c1e7a),_0x444f17=new _0x247722(_0x5c1e7a['locale'],{'styleGridAriaLabel':_0x54f8df,'styleButtonViews':_0x19ea27}),_0x26b70d=_0x5c1e7a['commands']['get']('footnotesStart');return _0x444f17['startIndexFieldView']['bind']('isEnabled')['to'](_0x26b70d),_0x444f17['startIndexFieldView']['fieldView']['bind']('value')['to'](_0x26b70d),_0x444f17['on']('footnotesListStart',(_0x194a8,_0x5cbdc8)=>{_0x5c1e7a['execute']('footnotesStart',{'value':_0x5cbdc8['startIndex']});}),_0x444f17['delegate']('execute')['to'](_0x25016f),_0x444f17;}({'editor':_0x2f2085,'dropdownView':_0x4b92da});_0x4b92da['panelView']['children']['add'](_0xc1519a);}),_0x4b92da;};}(_0x4507ac));}['afterInit'](){const {editor:_0x43fd1f}=this,{t:t}=_0x43fd1f['locale'],_0x426c04=_0x43fd1f['plugins']['get'](_0xec59ec),{defaultPositions:_0x306e7b}=_0x2457af;_0x426c04['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x43fd1f['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x484bf8=>{let _0x3bb73a=_0x484bf8['getFirstPosition']()?.['parent'];return _0x3bb73a?.['is']('$text')&&(_0x3bb73a=_0x3bb73a['parent']),_0x3bb73a?.['is']('element')?_0x3bb73a['findAncestor'](_0x24ef24):null;},'positions':[_0x306e7b['southArrowNorth'],_0x306e7b['southArrowNorthMiddleWest'],_0x306e7b['southArrowNorthMiddleEast'],_0x306e7b['southArrowNorthWest'],_0x306e7b['southArrowNorthEast'],_0x306e7b['northArrowSouth'],_0x306e7b['northArrowSouthMiddleWest'],_0x306e7b['northArrowSouthMiddleEast'],_0x306e7b['northArrowSouthWest'],_0x306e7b['northArrowSouthEast'],_0x306e7b['viewportStickyNorth']]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ButtonView as
|
|
23
|
+
import{ButtonView as _0x1ff3a9,View as _0x569486,ViewCollection as _0x22a197,FocusCycler as tt,addKeyboardHandlingForGrid as st,CollapsibleView as it,LabeledFieldView as et,createLabeledInputNumber as ot}from'ckeditor5/src/ui.js';import{FocusTracker as rt,KeystrokeHandler as nt,global as at}from'ckeditor5/src/utils.js';export class FootnotesDefinitionsPropertiesView extends _0x569486{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new rt();['keystrokes']=new nt();['focusables']=new _0x22a197();['focusCycler'];constructor(_0x35dd14,{styleButtonViews:_0x5a12e6,styleGridAriaLabel:_0x5e5c92}){super(_0x35dd14),(this['focusCycler']=new tt({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x5a12e6,_0x5e5c92),[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 _0x4319a4 of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x4319a4['element']);st({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>at['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 _0x5cf07=_0x134097=>_0x134097['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5cf07),this['keystrokes']['set']('arrowleft',_0x5cf07),this['keystrokes']['set']('arrowup',_0x5cf07),this['keystrokes']['set']('arrowdown',_0x5cf07);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x2c119c,_0x4a8f2c){const _0x3210a5=new _0x569486(this['locale']);return _0x3210a5['children']=_0x3210a5['createCollection'](),_0x3210a5['children']['addMany'](_0x2c119c),_0x3210a5['setTemplate']({'tag':'div','attributes':{'aria-label':_0x4a8f2c,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x3210a5['children']}),_0x3210a5['children']['delegate']('execute')['to'](this),_0x3210a5['focus']=function(){for(const _0x4c9e20 of this['children'])if(_0x4c9e20 instanceof _0x1ff3a9&&_0x4c9e20['isOn'])return void _0x4c9e20['focus']();this['children']['first']['focus']();},_0x3210a5['focusTracker']=new rt(),_0x3210a5['keystrokes']=new nt(),_0x3210a5['render'](),_0x3210a5['keystrokes']['listenTo'](_0x3210a5['element']),this['children']['add'](_0x3210a5),_0x3210a5;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x4b56ca=this['_createStartIndexPropertyView'](),_0x141515=[_0x4b56ca],_0x3ed892=new it(this['locale'],_0x141515);return _0x3ed892['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x3ed892['buttonView']['bind']('isEnabled')['toMany'](_0x141515,'isEnabled',(..._0x3b739a)=>_0x3b739a['some'](_0x543a07=>_0x543a07)),_0x3ed892['buttonView']['on']('change:isEnabled',(_0xc5182e,_0x44eb8a,_0x120cc4)=>{_0x120cc4||(_0x3ed892['isCollapsed']=!0x0);}),this['children']['add'](_0x3ed892),[_0x4b56ca,_0x3ed892];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x1c3602=new et(this['locale'],ot);return _0x1c3602['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x1c3602['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x1c3602['fieldView']['on']('input',()=>{const _0x3440cc=_0x1c3602['fieldView']['element'],_0x4382f0=_0x3440cc['valueAsNumber'];Number['isNaN'](_0x4382f0)?_0x1c3602['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x3440cc['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x4382f0}):_0x1c3602['errorText']=t(_0x4382f0<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0x1c3602;}}
|