@ckeditor/ckeditor5-footnotes 47.2.0-alpha.3 → 47.2.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/footnotes.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +9 -9
- package/src/footnotesediting.js +1 -1
package/build/footnotes.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var t={14:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),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},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,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)}},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")},374: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}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},450: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),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var p=i(h,n);n.byIndex=a,e.splice(a,0,{identifier:f,updater:p,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}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},774: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)}}}},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")},945:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),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}},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:()=>Q,FootnotesClipboard:()=>_,FootnotesEditing:()=>v,FootnotesProperties:()=>Pt,FootnotesPropertiesEditing:()=>mt,FootnotesPropertiesUI:()=>Ct,FootnotesStartCommand:()=>ft,FootnotesStyleCommand:()=>at,FootnotesTracker:()=>h,FootnotesUI:()=>Y,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);function r(){const t=["delete","createRangeOn","push","_model","clear","flat","2374920Duyiku","attributes","add","_getElementKey","nodeAfter","getChanges","1748817sStsfU","element","$graveyard","rootName","1Mxrevv","slice","9yeIroA","reset","type","from","position","set","getElementKey","710902bCyzqc","17305BtTzFL","values","_elementName","626260uvRIhI","4089127azncwM","4ZmCrYE","13090jtrVcx","$text","getItems","_trackedElements","name","insert","length","6JyQxjG","remove","has","4044eoVAtZ","root","elementName","get"];return(r=function(){return t})()}function a(t,e){const o=r();return(a=function(t,e){return o[t-=271]})(t,e)}const c=a;!function(t){const e=a,o=t();for(;;)try{if(318595===parseInt(e(305))/1*(parseInt(e(314))/2)+-parseInt(e(301))/3+parseInt(e(274))/4*(parseInt(e(315))/5)+-parseInt(e(282))/6*(-parseInt(e(273))/7)+-parseInt(e(295))/8*(-parseInt(e(307))/9)+parseInt(e(272))/10+parseInt(e(275))/11*(-parseInt(e(285))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(r);class l{[c(292)];[c(271)];[c(298)];[c(278)]=new Map;constructor(t,e){const o=c;this[o(292)]=t,this[o(271)]=e[o(287)],this[o(298)]=e[o(313)]}[c(308)](){const t=c;this[t(278)][t(293)]()}[c(300)](t){const e=c,o=new Set,n=new Map;for(const i of t){if(e(280)===i[e(309)]&&e(276)!==i[e(279)]&&i[e(311)][e(299)]){const t=this[e(292)][e(290)](i[e(311)][e(299)]);for(const o of t[e(277)]()){if(!o.is(e(302),this[e(271)]))continue;const t=this[e(298)](o);n[e(284)](t)||n[e(312)](t,[]),n[e(288)](t)[e(291)](o)}}if(e(283)===i[e(309)]&&i[e(279)]===this[e(271)]){const t=this[e(298)]({getAttribute:t=>i[e(296)][e(288)](t)});o[e(297)](t)}}for(const[t,n]of this[e(278)])e(303)===n[e(286)][e(304)]&&o[e(297)](t);for(const t of o)this[e(278)][e(289)](t);for(const[t,o]of n)this[e(278)][e(312)](t,o[o[e(281)]-1]);const i=new Set;for(const[t,s]of n)o[e(284)](t)&&(i[e(297)](s[0]),s[e(281)]>1?n[e(312)](t,s[e(306)](1)):n[e(289)](t),o[e(289)](t));return{removed:Array[e(310)](o),inserted:Array[e(310)](n[e(316)]())[e(294)](),moved:Array[e(310)](i)}}}const u=d;function f(){const t=["init","setFootnoteFormatter","remove","22YhaBOF","getFootnotesDefinitionsObjectElement","createElement","_ensureFootnotesReferencesHaveProperOrder","_updateFootnoteRefCounter","_sortFootnoteDefinitions","min","createRangeOn","_footnoteDefsContainerTracker","add","getChildren","indexOf","registerPostFixer","_handleFootnoteDefinitionsChanges","77xMDuhs","compareWith","enqueueChange","6502528HNVEFl","differ","rootName","from","_updateFootnotesCounters","move","footnoteCounter","footnoteId","_handleFootnotesDefinitionsObjectSync","high","$graveyard","low","footnotesDefinitions","pluginName","isOfficialPlugin","has","append","map","_handleFootnotesDefinitionsObjectChanges","childCount","_ensureFootnotesDefinitionsContainerExists","editor","footnoteRef","find","getAttribute","footnoteInlineContent","splice","definition","paragraph","parent","_handleMovedFootnoteReference","getChanges","unshift","listenTo","isPremiumPlugin","getFootnotesFormatter","length","singleton","setAttribute","model","_footnoteRefsTracker","99icGCil","_footnotes","FootnotesTracker","change:data","168495DMtoXo","_footnotesDefinitions","reset","_footnoteDefsTracker","isEqual","config","some","reference","document","push","_handleRemoveFootnoteReferenceById","4CtxCza","insert","getRootNames","createRangeIn","footnotes.multiBlock","197148VPUSYD","end","root","_footnoteFormatter","after","_handleFootnoteReferencesChanges","671170anbjdx","footnoteDefinition","1496265uvPwyt","findIndex","12221979VFBuNQ","createPositionAt","_handleInsertedFootnoteReference","before","set","getFootnote","get","_insertEmptyFootnotesDefinitionsContainer","createPositionBefore","getFootnotes","497230DeiNMB"];return(f=function(){return t})()}function d(t,e){const o=f();return(d=function(t,e){return o[t-=345]})(t,e)}!function(t){const e=d,o=t();for(;;)try{if(496454===-parseInt(e(387))/1+-parseInt(e(391))/2*(-parseInt(e(351))/3)+parseInt(e(362))/4*(-parseInt(e(375))/5)+-parseInt(e(367))/6*(parseInt(e(405))/7)+-parseInt(e(408))/8+-parseInt(e(347))/9*(-parseInt(e(373))/10)+parseInt(e(377))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(f);class h extends t.Plugin{[u(348)]=[];[u(352)]=null;[u(370)]=null;[u(399)];[u(346)];[u(354)];static get[u(421)](){return u(349)}static get[u(422)](){return!0}static get[u(442)](){return!0}constructor(t){const e=u;super(t),this[e(399)]=new l(this[e(429)][e(345)],{elementName:e(420),getElementKey:()=>e(445)}),this[e(346)]=new l(this[e(429)][e(345)],{elementName:e(430),getElementKey:t=>t[e(432)](e(415))}),this[e(354)]=new l(this[e(429)][e(345)],{elementName:e(374),getElementKey:t=>t[e(432)](e(415))})}[u(388)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(359)][t(403)](e=>{const n=t,i=o[n(359)][n(409)][n(439)]();let s=!1;return this[n(426)](e,i)&&(s=!0),this[n(404)](e,i)&&(s=!0),this[n(372)](e,i)&&(s=!0),this[n(394)](e)&&(s=!0),this[n(416)](e)&&(s=!0),this[n(396)](e)&&(s=!0),s}),this[t(441)](o[t(359)],t(350),()=>{const e=t;o[e(407)]({isUndoable:!1},t=>{this[e(428)](t)})},{priority:t(419)}),this[t(441)](n,t(381),()=>{const e=t;this[e(348)]=[],this[e(399)][e(353)](),this[e(346)][e(353)](),this[e(354)][e(353)]()},{priority:t(417)})}[u(392)](){return this[u(352)]}[u(382)](t){const e=u;return this[e(348)][e(431)](e=>e.id===t)||null}[u(386)](){const t=u;return Array[t(411)](this[t(348)])}[u(443)](){return this[u(370)]}[u(389)](t){this[u(370)]=t}[u(412)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(348)][o(444)];i++)this[o(395)](t,i)&&(n=!0);return n}[u(384)](t,e){const o=u,n=t[o(393)](o(420),{});return t[o(424)](n,e),this[o(352)]=n,n}[u(428)](t){const e=u;if(!this[e(348)][e(444)]||this[e(352)])return;const o=this[e(348)][0][e(358)][e(369)],n=this[e(384)](t,o);for(const o of this[e(348)])o[e(435)][e(437)]||t[e(363)](o[e(435)],n,e(368));this[e(412)](t)}[u(426)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(399)][o(439)](e);if(r[o(444)]&&(this[o(352)]=r[0]),i[o(444)])if(i[o(444)]>1||this[o(352)]&&i[o(357)](t=>t!==this[o(352)])){const e=t[o(393)](o(420),{}),s=[];this[o(352)]&&s[o(360)](this[o(352)]),s[o(360)](...i),t[o(363)](e,s[0],o(380));for(const n of s)t[o(413)](t[o(365)](n),t[o(378)](e,o(368))),t[o(390)](n);this[o(352)]=e,this[o(412)](t),n=!0}else this[o(352)]=i[0];if(s[o(444)]&&o(418)===this[o(352)]?.[o(369)][o(410)]){for(const e of this[o(348)])t[o(390)](e[o(358)]),n=!0;this[o(348)]=[],this[o(352)]=null}return n}[u(404)](t,e){const o=u;let n=!1;const i=this[o(429)][o(356)][o(383)](o(366)),{inserted:s,moved:r}=this[o(354)][o(439)](e);for(const e of[...r,...s]){const s=e[o(432)](o(415)),r=this[o(382)](s);r&&(r[o(435)]=e),p(t,i,e)&&(n=!0)}return n}[u(372)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(346)][o(439)](e);for(const e of i)this[o(361)](t,e)&&(n=!0);for(const e of s)this[o(379)](t,e)&&(n=!0);for(const e of r)this[o(438)](t,e)&&(n=!0);return n}[u(416)](t){const e=u;if(!this[e(352)])return!1;let o=!1;if(this[e(352)][e(427)]!==this[e(348)][e(444)]){const n=[];for(const t of this[e(352)][e(401)]()){const i=t[e(432)](e(415));this[e(382)](i)||(n[e(440)](t),o=!0)}for(const o of n)t[e(390)](o)}const n=new Set,i=[];for(const t of this[e(352)][e(401)]()){const s=t[e(432)](e(415));n[e(423)](s)?(i[e(440)](t),o=!0):n[e(400)](s)}for(const o of i)t[e(390)](o);return this[e(352)][e(427)]||(t[e(390)](this[e(352)]),this[e(352)]=null,o=!0),o}[u(379)](t,e){const o=u;if(this[o(348)][o(431)](t=>t[o(358)]===e))return!1;let n=!1;const i=e[o(432)](o(415)),s=this[o(348)][o(376)](t=>t.id===i);-1!==s&&(t[o(390)](this[o(348)][s][o(358)]),this[o(348)][o(434)](s,1),n=!0);let r=this[o(352)]?function(t,e){const n=o;for(const o of t[n(401)]())if(o[n(432)](n(415))===e)return o;return null}(this[o(352)],i):null;r||(r=t[o(393)](o(374),{footnoteId:i}),this[o(352)]&&(t[o(363)](r,this[o(352)],o(368)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(429)][o(345)],this[o(348)],e);this[o(348)][o(434)](c,0,a);let l=c;return-1!==s&&(l=Math[o(397)](c,s)),this[o(412)](t,l)&&(n=!0),n}[u(361)](t,e){const o=u,n=this[o(348)][o(376)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(348)][n];return o(418)!==s[o(435)][o(369)][o(410)]&&(t[o(390)](s[o(435)]),i=!0),this[o(348)][o(434)](n,1),this[o(412)](t,n)&&(i=!0),i}[u(438)](t,e){const o=u,n=e[o(432)](o(415)),i=this[o(348)][o(376)](t=>t.id===n),s=this[o(348)][i];let r=!1;s[o(358)]=e,this[o(348)][o(434)](i,1);const a=m(this[o(429)][o(345)],this[o(348)],e);return this[o(348)][o(434)](a,0,s),this[o(412)](t,Math[o(397)](i,a))&&(r=!0),r}[u(395)](t,e){const o=u;if(!this[o(352)])return!1;const n=this[o(348)][e];let i;return i=this[o(370)]?this[o(370)]({footnote:n,container:this[o(352)],digits:String(this[o(348)][o(444)])[o(444)],value:e+1}):String(e+1),n[o(358)][o(432)](o(414))!=i&&(t[o(446)](o(414),i,n[o(358)]),!0)}[u(396)](t){const e=u;if(!this[e(352)]||this[e(348)][e(444)]<2)return!1;if(function(t,o){const n=e;if(t[n(444)]!==o[n(444)])return!1;for(let e=0;e<t[n(444)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(348)][e(425)](t=>t.id),Array[e(411)](this[e(352)][e(401)]())[e(425)](t=>t[e(432)](e(415)))))return!1;let o=!1;for(let n=0;n<this[e(348)][e(444)];n++){const i=this[e(348)][n],s=t[e(385)](i[e(435)]),r=t[e(378)](this[e(352)],n);s[e(355)](r)||(t[e(413)](t[e(398)](i[e(435)]),r),o=!0)}return o}[u(394)](t){const e=u;if(!this[e(348)][e(444)])return!1;const{model:o}=this[e(429)];let n=!1;for(let i=0;i<this[e(348)][e(444)]-1;i++){const s=this[e(348)][i],r=this[e(348)][i+1],a=o[e(385)](s[e(358)]),c=o[e(385)](r[e(358)]);e(371)===a[e(406)](c)&&(this[e(438)](t,s[e(358)]),i=-1,n=!0)}return n}}function p(t,e,o){const n=u;if(o[n(427)])return!1;const i=n(e?436:433);return t[n(363)](t[n(393)](i),o),!0}function m(t,e,o){const n=u;if(0===e[n(444)])return 0;const i=t[n(385)](o);for(let o=0;o<e[n(444)];o++){const s=e[o],r=t[n(385)](s[n(358)]);if(n(380)===i[n(406)](r))return o}const s=o[n(369)];let r=-1;for(let t=e[n(444)]-1;t>=0;t--)if(e[t][n(358)][n(369)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(359)][n(364)](),c=a[n(402)](s[n(410)]),l=a[c+1];if(l)for(let t=0;t<e[n(444)];t++)if(e[t][n(358)][n(369)][n(410)]===l)return t;return e[n(444)]}function g(t,e){const o=w();return(g=function(t,e){return o[t-=140]})(t,e)}function w(){const t=["test","16bkVhUG","451OIidXu","50810LaseaJ","insertObject","insert-footnote-command-executed-with-invalid-id","getItems","editor","FootnotesEditing","createElement","model","29604IAsMlY","refresh","isObject","6805771phhZJO","_moveSelectionToFootnoteDefinition","_getPositionToInsertFootnote","isEnabled","getFirstRange","825064NUxdDG","checkChild","get","isBlock","document","765AUhpmG","selection","string","footnoteId","change","88126SihQha","990296hlKUlJ","plugins","execute","footnoteRef","3mhluII","end","length","10611441yUerUa"];return(w=function(){return t})()}const y=g;!function(t){const e=g,o=t();for(;;)try{if(715930===parseInt(e(150))/1*(parseInt(e(160))/2)+-parseInt(e(155))/3*(-parseInt(e(151))/4)+parseInt(e(145))/5*(-parseInt(e(170))/6)+-parseInt(e(173))/7+parseInt(e(140))/8+parseInt(e(158))/9+-parseInt(e(162))/10*(-parseInt(e(161))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(w);class b extends t.Command{[y(171)](){const t=y,e=this[t(166)][t(169)][t(144)][t(146)],o=this[t(175)](e);this[t(176)]=!!o}[y(153)](t){const e=y,{editor:o}=this,{model:n}=o,{selection:s}=n[e(144)],r=this[e(175)](s);if(!r)return;const a=o[e(152)][e(142)](e(167)),c=t?.[e(148)]??(0,i.uid)();!function(t){const o=e;return o(147)==typeof t&&t[o(157)]>0&&!/\s/[o(159)](t)&&!/^\d/[o(159)](t)}(c)?(0,i.logWarning)(e(164)):(n[e(149)](t=>{const o=e,i=t[o(168)](o(154),{footnoteId:c});n[o(163)](i,r,null)}),a[e(174)](c))}[y(175)](t){const e=y,{model:o}=this[e(166)],{schema:n}=o,i=t[e(177)]();for(const t of i[e(165)]())if(n[e(143)](t)||n[e(172)](t))return null;const s=i[e(156)];return n[e(141)](s,e(154))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[h]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),o=window[m([68,97,116,101])][m([110,111,119])](),n=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{n[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=n[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;n[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),o[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function o(t){for(let o=0;o<t[m([108,101,110,103,116,104])];o++){const n=t[m([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function h(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function p(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let o=m([117]);for(let n=0;n<t[m([108,101,110,103,116,104])];n+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,n[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=p,n[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,n[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&o()?e:null;function o(){const t=e[m([106,116,105])],o=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),n={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete n[m([118,99])],f(n)==o}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),n[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function p(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(n){a(n)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),n=h(d(window[m([77,97,116,104])][m([99,101,105,108])](o/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,n)}function r(){const e=m([108,108,99,116,45])+d(f(t)),o=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return o?window[m([112,97,114,115,101,73,110,116])](h(o),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,o)=>{t[m([116,104,101,110])](e,o),window[m([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[m([111,110])](m([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(m([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{p(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const n=a[m([115,112,108,105,116])](m([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=l(e);o&&o[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(n),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+o),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1761955200;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](o))return!0;const n=o[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=n[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(n[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>n[m([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&p?new(window[m([80,114,111,109,105,115,101])])((t,o)=>{e[m([116,104,101,110])](t,o),p[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},o)}):e||p||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(h).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(h).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})=>E(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)(E(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})=>x(e)}),n.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:n})=>{const i=x(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})=>P(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(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 x(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 E(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 P(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 A=o(331);const S=D;function D(t,e){const o=T();return(D=function(t,e){return o[t-=177]})(t,e)}!function(t){const e=D,o=t();for(;;)try{if(992938===-parseInt(e(242))/1*(parseInt(e(202))/2)+parseInt(e(201))/3+parseInt(e(249))/4*(-parseInt(e(184))/5)+parseInt(e(197))/6+parseInt(e(183))/7*(parseInt(e(222))/8)+-parseInt(e(186))/9+parseInt(e(236))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(T);class _ extends t.Plugin{static get[S(190)](){return S(233)}static get[S(216)](){return[v,A.ClipboardPipeline]}static get[S(226)](){return!0}static get[S(187)](){return!0}[S(243)](){this[S(185)]()}[S(185)](){const t=S;this[t(228)](),this[t(215)]()}[S(228)](){const t=S,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(207)](A.ClipboardPipeline),s=o[t(207)](h);this[t(244)](i,t(199),(o,i)=>{const r=t,a=L(n[r(245)](i[r(225)]));if(!a[r(178)])return;const c=s[r(237)](),l=a[r(232)]((t,o)=>{const n=r,i=c[n(194)](t=>t.id===o);if(i){const o=e[n(240)][n(177)](i[n(218)],{isClipboardPipeline:!0}),s=e[n(240)][n(219)][n(230)](o);t[i.id]=s}return t},Object[r(189)](null));i[r(204)][r(231)](r(224),JSON[r(210)](l))})}[S(215)](){const t=S,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(213)],r=n[t(207)](A.ClipboardPipeline),a=n[t(207)](h);let c=null;this[t(244)](s[t(200)],t(206),(e,o)=>{const n=t,i=o[n(204)][n(188)](n(224));c=i?JSON[n(221)](i):null}),this[t(244)](r,t(235),(n,s)=>{const r=t,l=s[r(203)]===this[r(252)].id;l&&r(247)===s[r(251)]||o[r(211)](t=>{const n=r;let u=a[n(229)]();const f=!!u&&Array[n(182)](o[n(200)][n(234)][n(196)]())[n(227)](u);if(u&&!f&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(245)](e))n.is(o(214),o(217))&&i[o(192)](n);for(const e of i)t[o(246)](e)}(t,s[n(225)]),!c)return;const{selection:d}=o[n(200)],h=d[n(208)]()[n(241)];u&&!f||(u=function(t,e){const o=n;for(const{item:n}of t[o(245)](e))if(n.is(o(214),o(217)))return n;return null}(t,s[n(225)]),u||=a[n(179)](t,h));const p=Array[n(182)](d[n(239)]())[n(181)](L),m=function(t,e,o){const s=n,r=Object[s(189)](null);for(const{item:n}of t[s(245)](e))if(n.is(s(214),s(212))){const e=n[s(193)](s(250));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(238)](s(250),r[e],n)}return r}(t,s[n(225)],t=>{const e=n;return!l||!!a[e(180)](t)&&!p[e(227)](t)});for(const[o,i]of Object[n(220)](c)){const s=m[o]||o,r=t[n(191)](n(248),{footnoteId:s}),a=e[n(240)][n(219)][n(177)](i),c=e[n(240)][n(195)](a,r);t[n(209)](c,r),t[n(205)](r,u,n(198))}c=null})})}}function T(){const t=["content","isOfficialPlugin","includes","_handleCopyFootnotesDefinitions","getFootnotesDefinitionsObjectElement","toData","setData","reduce","FootnotesClipboard","selection","contentInsertion","3776420ulreOb","getFootnotes","setAttribute","getRanges","data","root","38pmcUrB","init","listenTo","createRangeIn","remove","drop","footnoteDefinition","39868tXkAlG","footnoteId","method","editor","toView","length","_insertEmptyFootnotesDefinitionsContainer","getFootnote","flatMap","from","28ytGqvc","810dVmwRw","_defineClipboardIntegration","10633671eugvYa","isPremiumPlugin","getData","create","pluginName","createElement","push","getAttribute","find","toModel","getSelectedBlocks","4610718joUHUP","end","outputTransformation","document","5490270ODXmEl","16018AgNQaM","sourceEditorId","dataTransfer","insert","clipboardInput","get","getFirstRange","append","stringify","change","footnoteRef","editing","element","_handlePasteFootnotesDefinitions","requires","footnotesDefinitions","definition","htmlProcessor","entries","parse","2234536wALjiV","add","application/ckeditor5-footnotes"];return(T=function(){return t})()}function L(t){const e=S,o=new Set;for(const{item:n}of t)n.is(e(214),e(212))&&o[e(223)](n[e(193)](e(250)));return Array[e(182)](o)}var V=o(311),O=o(355),N=o(450),R=o.n(N),K=o(774),M=o.n(K),j=o(265),U=o.n(j),B=o(410),z=o.n(B),W=o(238),H=o.n(W),J=o(14),X={attributes:{"data-cke":!0}};X.setAttributes=z(),X.insert=U().bind(null,"head"),X.domAPI=M(),X.insertStyleElement=H();R()(J.A,X);J.A&&J.A.locals&&J.A.locals;class Y 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,V.ButtonView)),e.add("menuBar:insertFootnote",G(t,V.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||"footnotesLicenseKeyTrialLimit"==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"),"footnotesLicenseKeyTrialLimit"==t&&o._showLicenseError("trialLimit"),"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 V.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}}var q=Z;function $(){var t=["478872BfnnoU","85mleAln","4126jYjiKn","742516DJXODU","5048GKbzsg","pluginName","2077075lAuzFx","1629184IEmfSH","84pxdpfB","isOfficialPlugin","requires","34674BwYbet","Footnotes","isPremiumPlugin"];return($=function(){return t})()}function Z(t,e){var o=$();return(Z=function(t,e){return o[t-=444]})(t,e)}!function(t){for(var e=Z,o=t();;)try{if(204133===-parseInt(e(457))/1+-parseInt(e(445))/2*(-parseInt(e(449))/3)+parseInt(e(444))/4+parseInt(e(456))/5*(parseInt(e(452))/6)+-parseInt(e(447))/7+parseInt(e(448))/8+-parseInt(e(455))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}($);class Q extends t.Plugin{static get[q(446)](){return q(453)}static get[q(451)](){return[v,_,Y]}static get[q(450)](){return!0}static get[q(454)](){return!0}}const tt=et;function et(t,e){const o=nt();return(et=function(t,e){return o[t-=171]})(t,e)}!function(t){const e=et,o=t();for(;;)try{if(211557===parseInt(e(187))/1*(-parseInt(e(184))/2)+-parseInt(e(172))/3*(-parseInt(e(173))/4)+parseInt(e(186))/5+parseInt(e(174))/6+parseInt(e(181))/7+parseInt(e(171))/8+-parseInt(e(178))/9*(parseInt(e(185))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(nt);const ot=[tt(177),tt(183),tt(179),tt(188),tt(176),tt(175),tt(182),tt(180)];function nt(){const t=["459292uPZcFr","1341732wKKIHr","upper-alpha","lower-alpha","decimal","9iUHuvX","lower-latin","upper-roman","2552795muEnCU","lower-roman","decimal-leading-zero","46kjWVUv","5849930rZOGih","1231810sLRVet","8980ogXYRZ","upper-latin","428784bdpNER","3UyMHIw"];return(nt=function(){return t})()}function it(){const t=["54pHptne","setAttribute","get","plugins","8265702otOdOc","getFootnotesDefinitionsObjectElement","execute","22909678XjzQAX","getAttribute","value","model","_updateFootnotesCounters","127356bQeJov","6695367vFWojD","9789qyezJu","1114368TiPWJp","refresh","1330177xXUQAT","isEnabled","footnotesListStyle","10LoKZUh","105OJQJxi","586yiHMrN","change","includes"];return(it=function(){return t})()}function st(t,e){const o=it();return(st=function(t,e){return o[t-=345]})(t,e)}const rt=st;!function(t){const e=st,o=t();for(;;)try{if(879721===-parseInt(e(351))/1+parseInt(e(356))/2*(-parseInt(e(348))/3)+-parseInt(e(346))/4*(-parseInt(e(355))/5)+-parseInt(e(363))/6+parseInt(e(347))/7+-parseInt(e(349))/8*(-parseInt(e(359))/9)+parseInt(e(354))/10*(parseInt(e(366))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(it);class at extends t.Command{[rt(350)](){const t=rt,{editor:e}=this,o=e[t(362)][t(361)](h)[t(364)]();this[t(352)]=!!o,this[t(368)]=o?.[t(367)](t(353))??null}[rt(365)]({value:t}){const e=rt,{editor:o}=this,n=o[e(362)][e(361)](h),i=n[e(364)]();i&&ot[e(358)](t)&&o[e(369)][e(357)](o=>{const s=e;o[s(360)](s(353),t,i),n[s(345)](o)})}}function ct(t,e){const o=lt();return(ct=function(t,e){return o[t-=193]})(t,e)}function lt(){const t=["6811469aOaPEI","362968YyqEgb","_updateFootnotesCounters","refresh","66TzYPsv","176804FzhABW","model","12969ipVPMX","footnotesListStart","1006853zBiBvc","4869210wmVoog","2dlXYNe","54xwmBWY","change","isInteger","get","plugins","getFootnotesDefinitionsObjectElement","6JpcYPj","39192zdymUm","execute","7229380fzaiEg","value","getAttribute","setAttribute","isEnabled"];return(lt=function(){return t})()}const ut=ct;!function(t){const e=ct,o=t();for(;;)try{if(942972===-parseInt(e(199))/1*(-parseInt(e(201))/2)+parseInt(e(194))/3*(-parseInt(e(195))/4)+-parseInt(e(200))/5+-parseInt(e(208))/6*(parseInt(e(216))/7)+-parseInt(e(217))/8*(parseInt(e(202))/9)+-parseInt(e(211))/10+parseInt(e(197))/11*(parseInt(e(209))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(lt);class ft extends t.Command{[ut(193)](){const t=ut,{editor:e}=this,o=e[t(206)][t(205)](h)[t(207)]();this[t(215)]=!!o,this[t(212)]=o?.[t(213)](t(198))??null}[ut(210)]({value:t}){const e=ut,{editor:o}=this,n=o[e(206)][e(205)](h),i=n[e(207)]();i&&Number[e(204)](t)&&o[e(196)][e(203)](o=>{const s=e;o[s(214)](s(198),t,i),n[s(218)](o)})}}const dt=pt;function ht(){const t=["document","padStart","plugins","964028YBIUEh","_defineFormatter","modelCursor","getItems","139982GMaAhz","decimal","floor","model","consumable","element","list-style-type","config","mapper","footnotes-list","_defineSchema","footnotesListStyle","_getDefaultListStyle","isNaN","8904CVtPUB","item","setAttribute","getChanges","972333jeMmlJ","attribute:footnotesListStyle:footnotesDefinitions","isOfficialPlugin","max","decimal-leading-zero","_getDefaultStartIndex","503208nPPPKx","hasClass","upper-latin","attribute:footnotesListStart:footnotesDefinitions","_definePostfixer","checkAttribute","init","writer","setStyle","getAttribute","isPremiumPlugin","upper-alpha","lower-alpha","hasAttribute","$text","_updateFootnotesCounters","lower-latin","for","name","requires","1246KNKWtK","_formatFootnoteListValue","differ","upper-roman","element:ol","downcast","footnotesDefinitions","pluginName","738180URPCyb","createRangeOn","removeStyle","define","registerPostFixer","toUpperCase","extend","toLowerCase","parseInt","setFootnoteFormatter","lower-roman","consume","add","footnotesStart","schema","commands","footnotesStyle","fromCharCode","start","toViewElement","editor","footnotes.footnotesProperties.defaultStartIndex","footnotesListStart","nodeAfter","from","2434095kuvFsm","type","_defineConverters","getStyle","get","find","upcast","removeAttribute","viewItem","parent","footnotes.footnotesProperties.defaultListStyle","position","insert","getChildren","FootnotesPropertiesEditing"];return(ht=function(){return t})()}function pt(t,e){const o=ht();return(pt=function(t,e){return o[t-=192]})(t,e)}!function(t){const e=pt,o=t();for(;;)try{if(266202===parseInt(e(249))/1+parseInt(e(202))/2+-parseInt(e(267))/3+parseInt(e(245))/4+-parseInt(e(227))/5+-parseInt(e(263))/6*(-parseInt(e(194))/7)+parseInt(e(273))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ht);class mt extends t.Plugin{static get[dt(201)](){return dt(241)}static get[dt(193)](){return[v,h]}static get[dt(269)](){return!0}static get[dt(283)](){return!0}[dt(279)](){const t=dt,{editor:e}=this;e[t(256)][t(205)](t(237),t(250)),e[t(256)][t(205)](t(223),1),e[t(217)][t(214)](t(218),new at(e)),e[t(217)][t(214)](t(215),new ft(e)),this[t(259)](),this[t(229)](),this[t(246)](),this[t(277)]()}[dt(259)](){const t=dt,{editor:e}=this,{schema:o}=e[t(252)];o[t(208)](t(200),{allowAttributes:[t(260),t(224)]})}[dt(229)](){const t=dt,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(290)](t(233))[t(214)](e=>{const o=t;e.on(o(198),(t,e,n)=>{const s=o,r=e[s(235)],a=e[s(247)]?.[s(236)];r[s(274)](s(258))&&a?.is(s(254),s(200))&&(function(t,e,o,n){const i=s;if(!n[i(278)](e,i(224)))return;let r=1;const a=o[i(253)][i(213)](t,{attributes:i(220)});if(a){const e=Number[i(210)](t[i(282)](i(220)),10);Number[i(262)](e)||(r=e)}!a&&e[i(286)](i(224))||o[i(280)][i(265)](i(224),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(278)](e,i(260)))return;let r=i(250),a=!1;if(o[i(253)][i(213)](t,{attributes:i(228)})){const e={1:i(250),a:i(285),A:i(284),i:i(212),I:i(197)}[t[i(282)](i(228))];e&&(r=e),a=!0}o[i(253)][i(213)](t,{styles:i(255)})&&(r=t[i(230)](i(255)),a=!0),!a&&e[i(286)](i(260))||o[i(280)][i(265)](i(260),r,e)}(r,a,n,i))})}),o[t(290)](t(199))[t(214)](e=>{const o=t;e.on(o(276),(t,e,n)=>{const i=o;if(!n[i(253)][i(213)](e[i(264)],t[i(192)]))return;const s=gt(e[i(264)],n[i(257)]),{attributeNewValue:r}=e;null==r||1===r?n[i(280)][i(234)](i(220),s):n[i(280)][i(265)](i(220),String(r),s)}),e.on(o(268),(t,e,n)=>{const i=o;if(!n[i(253)][i(213)](e[i(264)],t[i(192)]))return;const s=gt(e[i(264)],n[i(257)]),{attributeNewValue:r}=e;r&&i(250)!==r?n[i(280)][i(281)](i(255),r,s):n[i(280)][i(204)](i(255),s)})})}[dt(277)](){const t=dt,{editor:e}=this,{model:o}=e,n=e[t(244)][t(231)](h),i=this[t(261)](),s=this[t(272)]();o[t(242)][t(206)](e=>{const r=t,a=o[r(242)][r(196)][r(266)]();let c=!1;for(const t of a){if(r(239)!==t[r(228)]||r(287)===t[r(192)])continue;const n=o[r(203)](t[r(238)][r(225)]);for(const t of n[r(248)]())t.is(r(254),r(200))&&(!t[r(286)](r(224))&&o[r(216)][r(278)](t,r(224))&&(e[r(265)](r(224),s,t),c=!0),!t[r(286)](r(260))&&o[r(216)][r(278)](t,r(260))&&(e[r(265)](r(260),i,t),c=!0))}return c&&n[r(288)](e),c})}[dt(246)](){const t=dt,{editor:e}=this;e[t(244)][t(231)](h)[t(211)](e=>this[t(195)](e))}[dt(261)](){const t=dt;return this[t(222)][t(256)][t(231)](t(237))}[dt(272)](){const t=dt;return this[t(222)][t(256)][t(231)](t(223))}[dt(195)]({container:t,value:e,digits:o}){const n=dt,i=t[n(282)](n(260)),s=t[n(282)](n(224)),r=Math[n(251)](e)+(s??1)-1;switch(i){case n(271):return function(t,e){const o=n;return String(t)[o(243)](e,"0")}(r,Math[n(270)](2,o));case n(285):case n(289):return wt(r,!1);case n(284):case n(275):return wt(r,!0);case n(212):return bt(r,!1);case n(197):return bt(r,!0);default:return String(r)}}}function gt(t,e){const o=dt,n=e[o(221)](t);return Array[o(226)](n[o(240)]())[o(232)](t=>t.is(o(254),"ol")&&t[o(274)](o(258)))}function wt(t,e){const o=dt;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(219)](97+t)+n,i=Math[o(251)]((i-1)/26)}return e?n[o(207)]():n}const yt=[{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 bt(t,e){const o=dt;let n="",i=t;for(const{value:t,numeral:e}of yt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(209)]()}class vt extends V.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new V.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new V.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,V.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 V.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 V.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 V.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 V.LabeledFieldView(this.locale,V.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 It=o(945),kt={attributes:{"data-cke":!0}};kt.setAttributes=z(),kt.insert=U().bind(null,"head"),kt.domAPI=M(),kt.insertStyleElement=H();R()(It.A,kt);It.A&&It.A.locals&&It.A.locals;class Ct extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[V.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,V.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 V.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});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),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}=V.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 Ft=Et;function xt(){var t=["4505501xAcBpy","pluginName","FootnotesProperties","isPremiumPlugin","24oGvWaV","5249flDJwG","14907hbiGkJ","13610PUkrYh","9559uUnxCv","78pJRscy","isOfficialPlugin","requires","806570NIgJWC","658RJxSzc","4705212lkCnTd","232TXmssO","5368653epPuMj","24hlMBUb"];return(xt=function(){return t})()}function Et(t,e){var o=xt();return(Et=function(t,e){return o[t-=436]})(t,e)}!function(t){for(var e=Et,o=t();;)try{if(942712===parseInt(e(445))/1*(-parseInt(e(453))/2)+parseInt(e(446))/3*(-parseInt(e(437))/4)+parseInt(e(452))/5*(-parseInt(e(439))/6)+parseInt(e(440))/7+parseInt(e(444))/8*(parseInt(e(438))/9)+parseInt(e(447))/10*(-parseInt(e(448))/11)+-parseInt(e(436))/12*(-parseInt(e(449))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(xt);class Pt extends t.Plugin{static get[Ft(441)](){return Ft(442)}static get[Ft(451)](){return[mt,Ct]}static get[Ft(450)](){return!0}static get[Ft(443)](){return!0}}function At(t,e){var o=St();return(At=function(t,e){return o[t-=336]})(t,e)}function St(){var t=["120086DkZXYI","5910FDsdWN","595MbMSCW","10944LWVUkf","2890890prFnOh","316312FHKLqq","985197UDaYVd","1889928jYvPri","450EQjCMZ","9ErvRHS"];return(St=function(){return t})()}!function(t){for(var e=At,o=t();;)try{if(201855===parseInt(e(345))/1+-parseInt(e(340))/2+parseInt(e(336))/3+-parseInt(e(343))/4*(parseInt(e(338))/5)+parseInt(e(341))/6*(-parseInt(e(342))/7)+parseInt(e(337))/8*(parseInt(e(339))/9)+-parseInt(e(344))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(St)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
|
|
5
|
+
*/(()=>{var t={14:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),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},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,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)}},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")},374: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}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},450: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),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var p=i(h,n);n.byIndex=a,e.splice(a,0,{identifier:f,updater:p,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}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},774: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)}}}},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")},945:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),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}},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:()=>Q,FootnotesClipboard:()=>_,FootnotesEditing:()=>v,FootnotesProperties:()=>Pt,FootnotesPropertiesEditing:()=>mt,FootnotesPropertiesUI:()=>Ct,FootnotesStartCommand:()=>ft,FootnotesStyleCommand:()=>at,FootnotesTracker:()=>h,FootnotesUI:()=>Y,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);function r(){const t=["delete","createRangeOn","push","_model","clear","flat","2374920Duyiku","attributes","add","_getElementKey","nodeAfter","getChanges","1748817sStsfU","element","$graveyard","rootName","1Mxrevv","slice","9yeIroA","reset","type","from","position","set","getElementKey","710902bCyzqc","17305BtTzFL","values","_elementName","626260uvRIhI","4089127azncwM","4ZmCrYE","13090jtrVcx","$text","getItems","_trackedElements","name","insert","length","6JyQxjG","remove","has","4044eoVAtZ","root","elementName","get"];return(r=function(){return t})()}function a(t,e){const o=r();return(a=function(t,e){return o[t-=271]})(t,e)}const c=a;!function(t){const e=a,o=t();for(;;)try{if(318595===parseInt(e(305))/1*(parseInt(e(314))/2)+-parseInt(e(301))/3+parseInt(e(274))/4*(parseInt(e(315))/5)+-parseInt(e(282))/6*(-parseInt(e(273))/7)+-parseInt(e(295))/8*(-parseInt(e(307))/9)+parseInt(e(272))/10+parseInt(e(275))/11*(-parseInt(e(285))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(r);class l{[c(292)];[c(271)];[c(298)];[c(278)]=new Map;constructor(t,e){const o=c;this[o(292)]=t,this[o(271)]=e[o(287)],this[o(298)]=e[o(313)]}[c(308)](){const t=c;this[t(278)][t(293)]()}[c(300)](t){const e=c,o=new Set,n=new Map;for(const i of t){if(e(280)===i[e(309)]&&e(276)!==i[e(279)]&&i[e(311)][e(299)]){const t=this[e(292)][e(290)](i[e(311)][e(299)]);for(const o of t[e(277)]()){if(!o.is(e(302),this[e(271)]))continue;const t=this[e(298)](o);n[e(284)](t)||n[e(312)](t,[]),n[e(288)](t)[e(291)](o)}}if(e(283)===i[e(309)]&&i[e(279)]===this[e(271)]){const t=this[e(298)]({getAttribute:t=>i[e(296)][e(288)](t)});o[e(297)](t)}}for(const[t,n]of this[e(278)])e(303)===n[e(286)][e(304)]&&o[e(297)](t);for(const t of o)this[e(278)][e(289)](t);for(const[t,o]of n)this[e(278)][e(312)](t,o[o[e(281)]-1]);const i=new Set;for(const[t,s]of n)o[e(284)](t)&&(i[e(297)](s[0]),s[e(281)]>1?n[e(312)](t,s[e(306)](1)):n[e(289)](t),o[e(289)](t));return{removed:Array[e(310)](o),inserted:Array[e(310)](n[e(316)]())[e(294)](),moved:Array[e(310)](i)}}}const u=d;function f(){const t=["init","setFootnoteFormatter","remove","22YhaBOF","getFootnotesDefinitionsObjectElement","createElement","_ensureFootnotesReferencesHaveProperOrder","_updateFootnoteRefCounter","_sortFootnoteDefinitions","min","createRangeOn","_footnoteDefsContainerTracker","add","getChildren","indexOf","registerPostFixer","_handleFootnoteDefinitionsChanges","77xMDuhs","compareWith","enqueueChange","6502528HNVEFl","differ","rootName","from","_updateFootnotesCounters","move","footnoteCounter","footnoteId","_handleFootnotesDefinitionsObjectSync","high","$graveyard","low","footnotesDefinitions","pluginName","isOfficialPlugin","has","append","map","_handleFootnotesDefinitionsObjectChanges","childCount","_ensureFootnotesDefinitionsContainerExists","editor","footnoteRef","find","getAttribute","footnoteInlineContent","splice","definition","paragraph","parent","_handleMovedFootnoteReference","getChanges","unshift","listenTo","isPremiumPlugin","getFootnotesFormatter","length","singleton","setAttribute","model","_footnoteRefsTracker","99icGCil","_footnotes","FootnotesTracker","change:data","168495DMtoXo","_footnotesDefinitions","reset","_footnoteDefsTracker","isEqual","config","some","reference","document","push","_handleRemoveFootnoteReferenceById","4CtxCza","insert","getRootNames","createRangeIn","footnotes.multiBlock","197148VPUSYD","end","root","_footnoteFormatter","after","_handleFootnoteReferencesChanges","671170anbjdx","footnoteDefinition","1496265uvPwyt","findIndex","12221979VFBuNQ","createPositionAt","_handleInsertedFootnoteReference","before","set","getFootnote","get","_insertEmptyFootnotesDefinitionsContainer","createPositionBefore","getFootnotes","497230DeiNMB"];return(f=function(){return t})()}function d(t,e){const o=f();return(d=function(t,e){return o[t-=345]})(t,e)}!function(t){const e=d,o=t();for(;;)try{if(496454===-parseInt(e(387))/1+-parseInt(e(391))/2*(-parseInt(e(351))/3)+parseInt(e(362))/4*(-parseInt(e(375))/5)+-parseInt(e(367))/6*(parseInt(e(405))/7)+-parseInt(e(408))/8+-parseInt(e(347))/9*(-parseInt(e(373))/10)+parseInt(e(377))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(f);class h extends t.Plugin{[u(348)]=[];[u(352)]=null;[u(370)]=null;[u(399)];[u(346)];[u(354)];static get[u(421)](){return u(349)}static get[u(422)](){return!0}static get[u(442)](){return!0}constructor(t){const e=u;super(t),this[e(399)]=new l(this[e(429)][e(345)],{elementName:e(420),getElementKey:()=>e(445)}),this[e(346)]=new l(this[e(429)][e(345)],{elementName:e(430),getElementKey:t=>t[e(432)](e(415))}),this[e(354)]=new l(this[e(429)][e(345)],{elementName:e(374),getElementKey:t=>t[e(432)](e(415))})}[u(388)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(359)][t(403)](e=>{const n=t,i=o[n(359)][n(409)][n(439)]();let s=!1;return this[n(426)](e,i)&&(s=!0),this[n(404)](e,i)&&(s=!0),this[n(372)](e,i)&&(s=!0),this[n(394)](e)&&(s=!0),this[n(416)](e)&&(s=!0),this[n(396)](e)&&(s=!0),s}),this[t(441)](o[t(359)],t(350),()=>{const e=t;o[e(407)]({isUndoable:!1},t=>{this[e(428)](t)})},{priority:t(419)}),this[t(441)](n,t(381),()=>{const e=t;this[e(348)]=[],this[e(399)][e(353)](),this[e(346)][e(353)](),this[e(354)][e(353)]()},{priority:t(417)})}[u(392)](){return this[u(352)]}[u(382)](t){const e=u;return this[e(348)][e(431)](e=>e.id===t)||null}[u(386)](){const t=u;return Array[t(411)](this[t(348)])}[u(443)](){return this[u(370)]}[u(389)](t){this[u(370)]=t}[u(412)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(348)][o(444)];i++)this[o(395)](t,i)&&(n=!0);return n}[u(384)](t,e){const o=u,n=t[o(393)](o(420),{});return t[o(424)](n,e),this[o(352)]=n,n}[u(428)](t){const e=u;if(!this[e(348)][e(444)]||this[e(352)])return;const o=this[e(348)][0][e(358)][e(369)],n=this[e(384)](t,o);for(const o of this[e(348)])o[e(435)][e(437)]||t[e(363)](o[e(435)],n,e(368));this[e(412)](t)}[u(426)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(399)][o(439)](e);if(r[o(444)]&&(this[o(352)]=r[0]),i[o(444)])if(i[o(444)]>1||this[o(352)]&&i[o(357)](t=>t!==this[o(352)])){const e=t[o(393)](o(420),{}),s=[];this[o(352)]&&s[o(360)](this[o(352)]),s[o(360)](...i),t[o(363)](e,s[0],o(380));for(const n of s)t[o(413)](t[o(365)](n),t[o(378)](e,o(368))),t[o(390)](n);this[o(352)]=e,this[o(412)](t),n=!0}else this[o(352)]=i[0];if(s[o(444)]&&o(418)===this[o(352)]?.[o(369)][o(410)]){for(const e of this[o(348)])t[o(390)](e[o(358)]),n=!0;this[o(348)]=[],this[o(352)]=null}return n}[u(404)](t,e){const o=u;let n=!1;const i=this[o(429)][o(356)][o(383)](o(366)),{inserted:s,moved:r}=this[o(354)][o(439)](e);for(const e of[...r,...s]){const s=e[o(432)](o(415)),r=this[o(382)](s);r&&(r[o(435)]=e),p(t,i,e)&&(n=!0)}return n}[u(372)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(346)][o(439)](e);for(const e of i)this[o(361)](t,e)&&(n=!0);for(const e of s)this[o(379)](t,e)&&(n=!0);for(const e of r)this[o(438)](t,e)&&(n=!0);return n}[u(416)](t){const e=u;if(!this[e(352)])return!1;let o=!1;if(this[e(352)][e(427)]!==this[e(348)][e(444)]){const n=[];for(const t of this[e(352)][e(401)]()){const i=t[e(432)](e(415));this[e(382)](i)||(n[e(440)](t),o=!0)}for(const o of n)t[e(390)](o)}const n=new Set,i=[];for(const t of this[e(352)][e(401)]()){const s=t[e(432)](e(415));n[e(423)](s)?(i[e(440)](t),o=!0):n[e(400)](s)}for(const o of i)t[e(390)](o);return this[e(352)][e(427)]||(t[e(390)](this[e(352)]),this[e(352)]=null,o=!0),o}[u(379)](t,e){const o=u;if(this[o(348)][o(431)](t=>t[o(358)]===e))return!1;let n=!1;const i=e[o(432)](o(415)),s=this[o(348)][o(376)](t=>t.id===i);-1!==s&&(t[o(390)](this[o(348)][s][o(358)]),this[o(348)][o(434)](s,1),n=!0);let r=this[o(352)]?function(t,e){const n=o;for(const o of t[n(401)]())if(o[n(432)](n(415))===e)return o;return null}(this[o(352)],i):null;r||(r=t[o(393)](o(374),{footnoteId:i}),this[o(352)]&&(t[o(363)](r,this[o(352)],o(368)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(429)][o(345)],this[o(348)],e);this[o(348)][o(434)](c,0,a);let l=c;return-1!==s&&(l=Math[o(397)](c,s)),this[o(412)](t,l)&&(n=!0),n}[u(361)](t,e){const o=u,n=this[o(348)][o(376)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(348)][n];return o(418)!==s[o(435)][o(369)][o(410)]&&(t[o(390)](s[o(435)]),i=!0),this[o(348)][o(434)](n,1),this[o(412)](t,n)&&(i=!0),i}[u(438)](t,e){const o=u,n=e[o(432)](o(415)),i=this[o(348)][o(376)](t=>t.id===n),s=this[o(348)][i];let r=!1;s[o(358)]=e,this[o(348)][o(434)](i,1);const a=m(this[o(429)][o(345)],this[o(348)],e);return this[o(348)][o(434)](a,0,s),this[o(412)](t,Math[o(397)](i,a))&&(r=!0),r}[u(395)](t,e){const o=u;if(!this[o(352)])return!1;const n=this[o(348)][e];let i;return i=this[o(370)]?this[o(370)]({footnote:n,container:this[o(352)],digits:String(this[o(348)][o(444)])[o(444)],value:e+1}):String(e+1),n[o(358)][o(432)](o(414))!=i&&(t[o(446)](o(414),i,n[o(358)]),!0)}[u(396)](t){const e=u;if(!this[e(352)]||this[e(348)][e(444)]<2)return!1;if(function(t,o){const n=e;if(t[n(444)]!==o[n(444)])return!1;for(let e=0;e<t[n(444)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(348)][e(425)](t=>t.id),Array[e(411)](this[e(352)][e(401)]())[e(425)](t=>t[e(432)](e(415)))))return!1;let o=!1;for(let n=0;n<this[e(348)][e(444)];n++){const i=this[e(348)][n],s=t[e(385)](i[e(435)]),r=t[e(378)](this[e(352)],n);s[e(355)](r)||(t[e(413)](t[e(398)](i[e(435)]),r),o=!0)}return o}[u(394)](t){const e=u;if(!this[e(348)][e(444)])return!1;const{model:o}=this[e(429)];let n=!1;for(let i=0;i<this[e(348)][e(444)]-1;i++){const s=this[e(348)][i],r=this[e(348)][i+1],a=o[e(385)](s[e(358)]),c=o[e(385)](r[e(358)]);e(371)===a[e(406)](c)&&(this[e(438)](t,s[e(358)]),i=-1,n=!0)}return n}}function p(t,e,o){const n=u;if(o[n(427)])return!1;const i=n(e?436:433);return t[n(363)](t[n(393)](i),o),!0}function m(t,e,o){const n=u;if(0===e[n(444)])return 0;const i=t[n(385)](o);for(let o=0;o<e[n(444)];o++){const s=e[o],r=t[n(385)](s[n(358)]);if(n(380)===i[n(406)](r))return o}const s=o[n(369)];let r=-1;for(let t=e[n(444)]-1;t>=0;t--)if(e[t][n(358)][n(369)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(359)][n(364)](),c=a[n(402)](s[n(410)]),l=a[c+1];if(l)for(let t=0;t<e[n(444)];t++)if(e[t][n(358)][n(369)][n(410)]===l)return t;return e[n(444)]}function g(t,e){const o=w();return(g=function(t,e){return o[t-=140]})(t,e)}function w(){const t=["test","16bkVhUG","451OIidXu","50810LaseaJ","insertObject","insert-footnote-command-executed-with-invalid-id","getItems","editor","FootnotesEditing","createElement","model","29604IAsMlY","refresh","isObject","6805771phhZJO","_moveSelectionToFootnoteDefinition","_getPositionToInsertFootnote","isEnabled","getFirstRange","825064NUxdDG","checkChild","get","isBlock","document","765AUhpmG","selection","string","footnoteId","change","88126SihQha","990296hlKUlJ","plugins","execute","footnoteRef","3mhluII","end","length","10611441yUerUa"];return(w=function(){return t})()}const y=g;!function(t){const e=g,o=t();for(;;)try{if(715930===parseInt(e(150))/1*(parseInt(e(160))/2)+-parseInt(e(155))/3*(-parseInt(e(151))/4)+parseInt(e(145))/5*(-parseInt(e(170))/6)+-parseInt(e(173))/7+parseInt(e(140))/8+parseInt(e(158))/9+-parseInt(e(162))/10*(-parseInt(e(161))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(w);class b extends t.Command{[y(171)](){const t=y,e=this[t(166)][t(169)][t(144)][t(146)],o=this[t(175)](e);this[t(176)]=!!o}[y(153)](t){const e=y,{editor:o}=this,{model:n}=o,{selection:s}=n[e(144)],r=this[e(175)](s);if(!r)return;const a=o[e(152)][e(142)](e(167)),c=t?.[e(148)]??(0,i.uid)();!function(t){const o=e;return o(147)==typeof t&&t[o(157)]>0&&!/\s/[o(159)](t)&&!/^\d/[o(159)](t)}(c)?(0,i.logWarning)(e(164)):(n[e(149)](t=>{const o=e,i=t[o(168)](o(154),{footnoteId:c});n[o(163)](i,r,null)}),a[e(174)](c))}[y(175)](t){const e=y,{model:o}=this[e(166)],{schema:n}=o,i=t[e(177)]();for(const t of i[e(165)]())if(n[e(143)](t)||n[e(172)](t))return null;const s=i[e(156)];return n[e(141)](s,e(154))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[h]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),o=window[m([68,97,116,101])][m([110,111,119])](),n=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{n[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=n[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;n[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),o[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function o(t){for(let o=0;o<t[m([108,101,110,103,116,104])];o++){const n=t[m([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function h(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function p(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let o=m([117]);for(let n=0;n<t[m([108,101,110,103,116,104])];n+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,n[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=p,n[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,n[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&o()?e:null;function o(){const t=e[m([106,116,105])],o=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),n={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete n[m([118,99])],f(n)==o}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),n[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function p(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(n){a(n)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),n=h(d(window[m([77,97,116,104])][m([99,101,105,108])](o/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,n)}function r(){const e=m([108,108,99,116,45])+d(f(t)),o=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return o?window[m([112,97,114,115,101,73,110,116])](h(o),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,o)=>{t[m([116,104,101,110])](e,o),window[m([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[m([111,110])](m([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(m([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{p(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const n=a[m([115,112,108,105,116])](m([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=l(e);o&&o[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(n),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+o),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1762041600;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](o))return!0;const n=o[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=n[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(n[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>n[m([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&p?new(window[m([80,114,111,109,105,115,101])])((t,o)=>{e[m([116,104,101,110])](t,o),p[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},o)}):e||p||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(h).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(h).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})=>E(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)(E(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})=>x(e)}),n.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:n})=>{const i=x(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})=>P(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(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 x(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 E(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 P(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 A=o(331);const S=D;function D(t,e){const o=T();return(D=function(t,e){return o[t-=177]})(t,e)}!function(t){const e=D,o=t();for(;;)try{if(992938===-parseInt(e(242))/1*(parseInt(e(202))/2)+parseInt(e(201))/3+parseInt(e(249))/4*(-parseInt(e(184))/5)+parseInt(e(197))/6+parseInt(e(183))/7*(parseInt(e(222))/8)+-parseInt(e(186))/9+parseInt(e(236))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(T);class _ extends t.Plugin{static get[S(190)](){return S(233)}static get[S(216)](){return[v,A.ClipboardPipeline]}static get[S(226)](){return!0}static get[S(187)](){return!0}[S(243)](){this[S(185)]()}[S(185)](){const t=S;this[t(228)](),this[t(215)]()}[S(228)](){const t=S,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(207)](A.ClipboardPipeline),s=o[t(207)](h);this[t(244)](i,t(199),(o,i)=>{const r=t,a=L(n[r(245)](i[r(225)]));if(!a[r(178)])return;const c=s[r(237)](),l=a[r(232)]((t,o)=>{const n=r,i=c[n(194)](t=>t.id===o);if(i){const o=e[n(240)][n(177)](i[n(218)],{isClipboardPipeline:!0}),s=e[n(240)][n(219)][n(230)](o);t[i.id]=s}return t},Object[r(189)](null));i[r(204)][r(231)](r(224),JSON[r(210)](l))})}[S(215)](){const t=S,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(213)],r=n[t(207)](A.ClipboardPipeline),a=n[t(207)](h);let c=null;this[t(244)](s[t(200)],t(206),(e,o)=>{const n=t,i=o[n(204)][n(188)](n(224));c=i?JSON[n(221)](i):null}),this[t(244)](r,t(235),(n,s)=>{const r=t,l=s[r(203)]===this[r(252)].id;l&&r(247)===s[r(251)]||o[r(211)](t=>{const n=r;let u=a[n(229)]();const f=!!u&&Array[n(182)](o[n(200)][n(234)][n(196)]())[n(227)](u);if(u&&!f&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(245)](e))n.is(o(214),o(217))&&i[o(192)](n);for(const e of i)t[o(246)](e)}(t,s[n(225)]),!c)return;const{selection:d}=o[n(200)],h=d[n(208)]()[n(241)];u&&!f||(u=function(t,e){const o=n;for(const{item:n}of t[o(245)](e))if(n.is(o(214),o(217)))return n;return null}(t,s[n(225)]),u||=a[n(179)](t,h));const p=Array[n(182)](d[n(239)]())[n(181)](L),m=function(t,e,o){const s=n,r=Object[s(189)](null);for(const{item:n}of t[s(245)](e))if(n.is(s(214),s(212))){const e=n[s(193)](s(250));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(238)](s(250),r[e],n)}return r}(t,s[n(225)],t=>{const e=n;return!l||!!a[e(180)](t)&&!p[e(227)](t)});for(const[o,i]of Object[n(220)](c)){const s=m[o]||o,r=t[n(191)](n(248),{footnoteId:s}),a=e[n(240)][n(219)][n(177)](i),c=e[n(240)][n(195)](a,r);t[n(209)](c,r),t[n(205)](r,u,n(198))}c=null})})}}function T(){const t=["content","isOfficialPlugin","includes","_handleCopyFootnotesDefinitions","getFootnotesDefinitionsObjectElement","toData","setData","reduce","FootnotesClipboard","selection","contentInsertion","3776420ulreOb","getFootnotes","setAttribute","getRanges","data","root","38pmcUrB","init","listenTo","createRangeIn","remove","drop","footnoteDefinition","39868tXkAlG","footnoteId","method","editor","toView","length","_insertEmptyFootnotesDefinitionsContainer","getFootnote","flatMap","from","28ytGqvc","810dVmwRw","_defineClipboardIntegration","10633671eugvYa","isPremiumPlugin","getData","create","pluginName","createElement","push","getAttribute","find","toModel","getSelectedBlocks","4610718joUHUP","end","outputTransformation","document","5490270ODXmEl","16018AgNQaM","sourceEditorId","dataTransfer","insert","clipboardInput","get","getFirstRange","append","stringify","change","footnoteRef","editing","element","_handlePasteFootnotesDefinitions","requires","footnotesDefinitions","definition","htmlProcessor","entries","parse","2234536wALjiV","add","application/ckeditor5-footnotes"];return(T=function(){return t})()}function L(t){const e=S,o=new Set;for(const{item:n}of t)n.is(e(214),e(212))&&o[e(223)](n[e(193)](e(250)));return Array[e(182)](o)}var V=o(311),O=o(355),N=o(450),R=o.n(N),K=o(774),M=o.n(K),j=o(265),U=o.n(j),B=o(410),z=o.n(B),W=o(238),H=o.n(W),J=o(14),X={attributes:{"data-cke":!0}};X.setAttributes=z(),X.insert=U().bind(null,"head"),X.domAPI=M(),X.insertStyleElement=H();R()(J.A,X);J.A&&J.A.locals&&J.A.locals;class Y 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,V.ButtonView)),e.add("menuBar:insertFootnote",G(t,V.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||"footnotesLicenseKeyTrialLimit"==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"),"footnotesLicenseKeyTrialLimit"==t&&o._showLicenseError("trialLimit"),"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 V.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}}var q=Z;function $(){var t=["478872BfnnoU","85mleAln","4126jYjiKn","742516DJXODU","5048GKbzsg","pluginName","2077075lAuzFx","1629184IEmfSH","84pxdpfB","isOfficialPlugin","requires","34674BwYbet","Footnotes","isPremiumPlugin"];return($=function(){return t})()}function Z(t,e){var o=$();return(Z=function(t,e){return o[t-=444]})(t,e)}!function(t){for(var e=Z,o=t();;)try{if(204133===-parseInt(e(457))/1+-parseInt(e(445))/2*(-parseInt(e(449))/3)+parseInt(e(444))/4+parseInt(e(456))/5*(parseInt(e(452))/6)+-parseInt(e(447))/7+parseInt(e(448))/8+-parseInt(e(455))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}($);class Q extends t.Plugin{static get[q(446)](){return q(453)}static get[q(451)](){return[v,_,Y]}static get[q(450)](){return!0}static get[q(454)](){return!0}}const tt=et;function et(t,e){const o=nt();return(et=function(t,e){return o[t-=171]})(t,e)}!function(t){const e=et,o=t();for(;;)try{if(211557===parseInt(e(187))/1*(-parseInt(e(184))/2)+-parseInt(e(172))/3*(-parseInt(e(173))/4)+parseInt(e(186))/5+parseInt(e(174))/6+parseInt(e(181))/7+parseInt(e(171))/8+-parseInt(e(178))/9*(parseInt(e(185))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(nt);const ot=[tt(177),tt(183),tt(179),tt(188),tt(176),tt(175),tt(182),tt(180)];function nt(){const t=["459292uPZcFr","1341732wKKIHr","upper-alpha","lower-alpha","decimal","9iUHuvX","lower-latin","upper-roman","2552795muEnCU","lower-roman","decimal-leading-zero","46kjWVUv","5849930rZOGih","1231810sLRVet","8980ogXYRZ","upper-latin","428784bdpNER","3UyMHIw"];return(nt=function(){return t})()}function it(){const t=["54pHptne","setAttribute","get","plugins","8265702otOdOc","getFootnotesDefinitionsObjectElement","execute","22909678XjzQAX","getAttribute","value","model","_updateFootnotesCounters","127356bQeJov","6695367vFWojD","9789qyezJu","1114368TiPWJp","refresh","1330177xXUQAT","isEnabled","footnotesListStyle","10LoKZUh","105OJQJxi","586yiHMrN","change","includes"];return(it=function(){return t})()}function st(t,e){const o=it();return(st=function(t,e){return o[t-=345]})(t,e)}const rt=st;!function(t){const e=st,o=t();for(;;)try{if(879721===-parseInt(e(351))/1+parseInt(e(356))/2*(-parseInt(e(348))/3)+-parseInt(e(346))/4*(-parseInt(e(355))/5)+-parseInt(e(363))/6+parseInt(e(347))/7+-parseInt(e(349))/8*(-parseInt(e(359))/9)+parseInt(e(354))/10*(parseInt(e(366))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(it);class at extends t.Command{[rt(350)](){const t=rt,{editor:e}=this,o=e[t(362)][t(361)](h)[t(364)]();this[t(352)]=!!o,this[t(368)]=o?.[t(367)](t(353))??null}[rt(365)]({value:t}){const e=rt,{editor:o}=this,n=o[e(362)][e(361)](h),i=n[e(364)]();i&&ot[e(358)](t)&&o[e(369)][e(357)](o=>{const s=e;o[s(360)](s(353),t,i),n[s(345)](o)})}}function ct(t,e){const o=lt();return(ct=function(t,e){return o[t-=193]})(t,e)}function lt(){const t=["6811469aOaPEI","362968YyqEgb","_updateFootnotesCounters","refresh","66TzYPsv","176804FzhABW","model","12969ipVPMX","footnotesListStart","1006853zBiBvc","4869210wmVoog","2dlXYNe","54xwmBWY","change","isInteger","get","plugins","getFootnotesDefinitionsObjectElement","6JpcYPj","39192zdymUm","execute","7229380fzaiEg","value","getAttribute","setAttribute","isEnabled"];return(lt=function(){return t})()}const ut=ct;!function(t){const e=ct,o=t();for(;;)try{if(942972===-parseInt(e(199))/1*(-parseInt(e(201))/2)+parseInt(e(194))/3*(-parseInt(e(195))/4)+-parseInt(e(200))/5+-parseInt(e(208))/6*(parseInt(e(216))/7)+-parseInt(e(217))/8*(parseInt(e(202))/9)+-parseInt(e(211))/10+parseInt(e(197))/11*(parseInt(e(209))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(lt);class ft extends t.Command{[ut(193)](){const t=ut,{editor:e}=this,o=e[t(206)][t(205)](h)[t(207)]();this[t(215)]=!!o,this[t(212)]=o?.[t(213)](t(198))??null}[ut(210)]({value:t}){const e=ut,{editor:o}=this,n=o[e(206)][e(205)](h),i=n[e(207)]();i&&Number[e(204)](t)&&o[e(196)][e(203)](o=>{const s=e;o[s(214)](s(198),t,i),n[s(218)](o)})}}const dt=pt;function ht(){const t=["document","padStart","plugins","964028YBIUEh","_defineFormatter","modelCursor","getItems","139982GMaAhz","decimal","floor","model","consumable","element","list-style-type","config","mapper","footnotes-list","_defineSchema","footnotesListStyle","_getDefaultListStyle","isNaN","8904CVtPUB","item","setAttribute","getChanges","972333jeMmlJ","attribute:footnotesListStyle:footnotesDefinitions","isOfficialPlugin","max","decimal-leading-zero","_getDefaultStartIndex","503208nPPPKx","hasClass","upper-latin","attribute:footnotesListStart:footnotesDefinitions","_definePostfixer","checkAttribute","init","writer","setStyle","getAttribute","isPremiumPlugin","upper-alpha","lower-alpha","hasAttribute","$text","_updateFootnotesCounters","lower-latin","for","name","requires","1246KNKWtK","_formatFootnoteListValue","differ","upper-roman","element:ol","downcast","footnotesDefinitions","pluginName","738180URPCyb","createRangeOn","removeStyle","define","registerPostFixer","toUpperCase","extend","toLowerCase","parseInt","setFootnoteFormatter","lower-roman","consume","add","footnotesStart","schema","commands","footnotesStyle","fromCharCode","start","toViewElement","editor","footnotes.footnotesProperties.defaultStartIndex","footnotesListStart","nodeAfter","from","2434095kuvFsm","type","_defineConverters","getStyle","get","find","upcast","removeAttribute","viewItem","parent","footnotes.footnotesProperties.defaultListStyle","position","insert","getChildren","FootnotesPropertiesEditing"];return(ht=function(){return t})()}function pt(t,e){const o=ht();return(pt=function(t,e){return o[t-=192]})(t,e)}!function(t){const e=pt,o=t();for(;;)try{if(266202===parseInt(e(249))/1+parseInt(e(202))/2+-parseInt(e(267))/3+parseInt(e(245))/4+-parseInt(e(227))/5+-parseInt(e(263))/6*(-parseInt(e(194))/7)+parseInt(e(273))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ht);class mt extends t.Plugin{static get[dt(201)](){return dt(241)}static get[dt(193)](){return[v,h]}static get[dt(269)](){return!0}static get[dt(283)](){return!0}[dt(279)](){const t=dt,{editor:e}=this;e[t(256)][t(205)](t(237),t(250)),e[t(256)][t(205)](t(223),1),e[t(217)][t(214)](t(218),new at(e)),e[t(217)][t(214)](t(215),new ft(e)),this[t(259)](),this[t(229)](),this[t(246)](),this[t(277)]()}[dt(259)](){const t=dt,{editor:e}=this,{schema:o}=e[t(252)];o[t(208)](t(200),{allowAttributes:[t(260),t(224)]})}[dt(229)](){const t=dt,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(290)](t(233))[t(214)](e=>{const o=t;e.on(o(198),(t,e,n)=>{const s=o,r=e[s(235)],a=e[s(247)]?.[s(236)];r[s(274)](s(258))&&a?.is(s(254),s(200))&&(function(t,e,o,n){const i=s;if(!n[i(278)](e,i(224)))return;let r=1;const a=o[i(253)][i(213)](t,{attributes:i(220)});if(a){const e=Number[i(210)](t[i(282)](i(220)),10);Number[i(262)](e)||(r=e)}!a&&e[i(286)](i(224))||o[i(280)][i(265)](i(224),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(278)](e,i(260)))return;let r=i(250),a=!1;if(o[i(253)][i(213)](t,{attributes:i(228)})){const e={1:i(250),a:i(285),A:i(284),i:i(212),I:i(197)}[t[i(282)](i(228))];e&&(r=e),a=!0}o[i(253)][i(213)](t,{styles:i(255)})&&(r=t[i(230)](i(255)),a=!0),!a&&e[i(286)](i(260))||o[i(280)][i(265)](i(260),r,e)}(r,a,n,i))})}),o[t(290)](t(199))[t(214)](e=>{const o=t;e.on(o(276),(t,e,n)=>{const i=o;if(!n[i(253)][i(213)](e[i(264)],t[i(192)]))return;const s=gt(e[i(264)],n[i(257)]),{attributeNewValue:r}=e;null==r||1===r?n[i(280)][i(234)](i(220),s):n[i(280)][i(265)](i(220),String(r),s)}),e.on(o(268),(t,e,n)=>{const i=o;if(!n[i(253)][i(213)](e[i(264)],t[i(192)]))return;const s=gt(e[i(264)],n[i(257)]),{attributeNewValue:r}=e;r&&i(250)!==r?n[i(280)][i(281)](i(255),r,s):n[i(280)][i(204)](i(255),s)})})}[dt(277)](){const t=dt,{editor:e}=this,{model:o}=e,n=e[t(244)][t(231)](h),i=this[t(261)](),s=this[t(272)]();o[t(242)][t(206)](e=>{const r=t,a=o[r(242)][r(196)][r(266)]();let c=!1;for(const t of a){if(r(239)!==t[r(228)]||r(287)===t[r(192)])continue;const n=o[r(203)](t[r(238)][r(225)]);for(const t of n[r(248)]())t.is(r(254),r(200))&&(!t[r(286)](r(224))&&o[r(216)][r(278)](t,r(224))&&(e[r(265)](r(224),s,t),c=!0),!t[r(286)](r(260))&&o[r(216)][r(278)](t,r(260))&&(e[r(265)](r(260),i,t),c=!0))}return c&&n[r(288)](e),c})}[dt(246)](){const t=dt,{editor:e}=this;e[t(244)][t(231)](h)[t(211)](e=>this[t(195)](e))}[dt(261)](){const t=dt;return this[t(222)][t(256)][t(231)](t(237))}[dt(272)](){const t=dt;return this[t(222)][t(256)][t(231)](t(223))}[dt(195)]({container:t,value:e,digits:o}){const n=dt,i=t[n(282)](n(260)),s=t[n(282)](n(224)),r=Math[n(251)](e)+(s??1)-1;switch(i){case n(271):return function(t,e){const o=n;return String(t)[o(243)](e,"0")}(r,Math[n(270)](2,o));case n(285):case n(289):return wt(r,!1);case n(284):case n(275):return wt(r,!0);case n(212):return bt(r,!1);case n(197):return bt(r,!0);default:return String(r)}}}function gt(t,e){const o=dt,n=e[o(221)](t);return Array[o(226)](n[o(240)]())[o(232)](t=>t.is(o(254),"ol")&&t[o(274)](o(258)))}function wt(t,e){const o=dt;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(219)](97+t)+n,i=Math[o(251)]((i-1)/26)}return e?n[o(207)]():n}const yt=[{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 bt(t,e){const o=dt;let n="",i=t;for(const{value:t,numeral:e}of yt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(209)]()}class vt extends V.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new V.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new V.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,V.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 V.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 V.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 V.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 V.LabeledFieldView(this.locale,V.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 It=o(945),kt={attributes:{"data-cke":!0}};kt.setAttributes=z(),kt.insert=U().bind(null,"head"),kt.domAPI=M(),kt.insertStyleElement=H();R()(It.A,kt);It.A&&It.A.locals&&It.A.locals;class Ct extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[V.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,V.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 V.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});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),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}=V.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 Ft=Et;function xt(){var t=["4505501xAcBpy","pluginName","FootnotesProperties","isPremiumPlugin","24oGvWaV","5249flDJwG","14907hbiGkJ","13610PUkrYh","9559uUnxCv","78pJRscy","isOfficialPlugin","requires","806570NIgJWC","658RJxSzc","4705212lkCnTd","232TXmssO","5368653epPuMj","24hlMBUb"];return(xt=function(){return t})()}function Et(t,e){var o=xt();return(Et=function(t,e){return o[t-=436]})(t,e)}!function(t){for(var e=Et,o=t();;)try{if(942712===parseInt(e(445))/1*(-parseInt(e(453))/2)+parseInt(e(446))/3*(-parseInt(e(437))/4)+parseInt(e(452))/5*(-parseInt(e(439))/6)+parseInt(e(440))/7+parseInt(e(444))/8*(parseInt(e(438))/9)+parseInt(e(447))/10*(-parseInt(e(448))/11)+-parseInt(e(436))/12*(-parseInt(e(449))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(xt);class Pt extends t.Plugin{static get[Ft(441)](){return Ft(442)}static get[Ft(451)](){return[mt,Ct]}static get[Ft(450)](){return!0}static get[Ft(443)](){return!0}}function At(t,e){var o=St();return(At=function(t,e){return o[t-=336]})(t,e)}function St(){var t=["120086DkZXYI","5910FDsdWN","595MbMSCW","10944LWVUkf","2890890prFnOh","316312FHKLqq","985197UDaYVd","1889928jYvPri","450EQjCMZ","9ErvRHS"];return(St=function(){return t})()}!function(t){for(var e=At,o=t();;)try{if(201855===parseInt(e(345))/1+-parseInt(e(340))/2+parseInt(e(336))/3+-parseInt(e(343))/4*(parseInt(e(338))/5)+parseInt(e(341))/6*(-parseInt(e(342))/7)+parseInt(e(337))/8*(parseInt(e(339))/9)+-parseInt(e(344))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(St)})(),(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 _0x56a762,Command as _0x38f340}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x5146b1,isWidget as _0x5eb282,toWidgetEditable as _0x4e9961,WidgetToolbarRepository as _0x4f9f42}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0xf15334,logWarning as _0x54d84b,FocusTracker as ot,KeystrokeHandler as rt,global as nt}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x4f0f0b,ClickObserver as _0x52d689}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x5e5846}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x40f8a5,ButtonView as _0x35adf5,View as _0x1f29a4,ViewCollection as _0x497dc,FocusCycler as _0x3ace6d,addKeyboardHandlingForGrid as tt,CollapsibleView as st,LabeledFieldView as it,createLabeledInputNumber as et,ContextualBalloon as _0x30e4c4,BalloonPanelView as _0xa53207,createDropdown as _0x49d87f}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x4985ca,IconListStyleDecimal as _0x504c91,IconListStyleDecimalLeadingZero as _0x22f7ed,IconListStyleLowerRoman as _0x3b396a,IconListStyleUpperRoman as _0x48cf64,IconListStyleLowerLatin as _0x5efb33,IconListStyleUpperLatin as _0xe36eb3}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x1d7dd7,_0x511b90){this['_model']=_0x1d7dd7,this['_elementName']=_0x511b90['elementName'],this['_getElementKey']=_0x511b90['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0xe4a65a){const _0x2d841d=new Set(),_0x83daf3=new Map();for(const _0x50089e of _0xe4a65a){if('insert'===_0x50089e['type']&&'$text'!==_0x50089e['name']&&_0x50089e['position']['nodeAfter']){const _0x81d637=this['_model']['createRangeOn'](_0x50089e['position']['nodeAfter']);for(const _0x8bbded of _0x81d637['getItems']()){if(!_0x8bbded['is']('element',this['_elementName']))continue;const _0x969947=this['_getElementKey'](_0x8bbded);_0x83daf3['has'](_0x969947)||_0x83daf3['set'](_0x969947,[]),_0x83daf3['get'](_0x969947)['push'](_0x8bbded);}}if('remove'===_0x50089e['type']&&_0x50089e['name']===this['_elementName']){const _0x5999a1=this['_getElementKey']({'getAttribute':_0x268049=>_0x50089e['attributes']['get'](_0x268049)});_0x2d841d['add'](_0x5999a1);}}for(const [_0x389de2,_0x5b74f0]of this['_trackedElements'])'$graveyard'===_0x5b74f0['root']['rootName']&&_0x2d841d['add'](_0x389de2);for(const _0x124751 of _0x2d841d)this['_trackedElements']['delete'](_0x124751);for(const [_0xa9fa2b,_0x5a9c2d]of _0x83daf3)this['_trackedElements']['set'](_0xa9fa2b,_0x5a9c2d[_0x5a9c2d['length']-0x1]);const _0x57f768=new Set();for(const [_0x33faee,_0x40fdfe]of _0x83daf3)_0x2d841d['has'](_0x33faee)&&(_0x57f768['add'](_0x40fdfe[0x0]),_0x40fdfe['length']>0x1?_0x83daf3['set'](_0x33faee,_0x40fdfe['slice'](0x1)):_0x83daf3['delete'](_0x33faee),_0x2d841d['delete'](_0x33faee));return{'removed':Array['from'](_0x2d841d),'inserted':Array['from'](_0x83daf3['values']())['flat'](),'moved':Array['from'](_0x57f768)};}}class c extends _0x56a762{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ed30e){super(_0x4ed30e),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x30706c=>_0x30706c['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x174bd6=>_0x174bd6['getAttribute']('footnoteId')});}['init'](){const {editor:_0x220b91}=this,{model:_0x3ed425,data:_0x4f2abe}=_0x220b91;_0x3ed425['document']['registerPostFixer'](_0x36138f=>{const _0x52440a=_0x3ed425['document']['differ']['getChanges']();let _0x112d79=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x36138f,_0x52440a)&&(_0x112d79=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x36138f,_0x52440a)&&(_0x112d79=!0x0),this['_handleFootnoteReferencesChanges'](_0x36138f,_0x52440a)&&(_0x112d79=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x36138f)&&(_0x112d79=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x36138f)&&(_0x112d79=!0x0),this['_sortFootnoteDefinitions'](_0x36138f)&&(_0x112d79=!0x0),_0x112d79;}),this['listenTo'](_0x3ed425['document'],'change:data',()=>{_0x3ed425['enqueueChange']({'isUndoable':!0x1},_0x4bf76e=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x4bf76e);});},{'priority':'low'}),this['listenTo'](_0x4f2abe,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x52ebac){return this['_footnotes']['find'](_0xe978f2=>_0xe978f2['id']===_0x52ebac)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x35bc6e){this['_footnoteFormatter']=_0x35bc6e;}['_updateFootnotesCounters'](_0x3cd7ee,_0x5c8e1e=0x0){let _0x3b0d6a=!0x1;for(let _0x192d0b=_0x5c8e1e;_0x192d0b<this['_footnotes']['length'];_0x192d0b++)this['_updateFootnoteRefCounter'](_0x3cd7ee,_0x192d0b)&&(_0x3b0d6a=!0x0);return _0x3b0d6a;}['_insertEmptyFootnotesDefinitionsContainer'](_0x4f720e,_0x46e983){const _0x4638e3=_0x4f720e['createElement']('footnotesDefinitions',{});return _0x4f720e['append'](_0x4638e3,_0x46e983),this['_footnotesDefinitions']=_0x4638e3,_0x4638e3;}['_ensureFootnotesDefinitionsContainerExists'](_0x21291f){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x169fd4=this['_footnotes'][0x0]['reference']['root'],_0x42f0d9=this['_insertEmptyFootnotesDefinitionsContainer'](_0x21291f,_0x169fd4);for(const _0x489442 of this['_footnotes'])_0x489442['definition']['parent']||_0x21291f['insert'](_0x489442['definition'],_0x42f0d9,'end');this['_updateFootnotesCounters'](_0x21291f);}['_handleFootnotesDefinitionsObjectChanges'](_0x3c217b,_0x37bed8){let _0x5d0866=!0x1;const {inserted:_0x4df4ac,removed:_0x117181,moved:_0x1a89fe}=this['_footnoteDefsContainerTracker']['getChanges'](_0x37bed8);if(_0x1a89fe['length']&&(this['_footnotesDefinitions']=_0x1a89fe[0x0]),_0x4df4ac['length']){if(_0x4df4ac['length']>0x1||this['_footnotesDefinitions']&&_0x4df4ac['some'](_0xe2a28a=>_0xe2a28a!==this['_footnotesDefinitions'])){const _0x2b95cc=_0x3c217b['createElement']('footnotesDefinitions',{}),_0x32d9cc=[];this['_footnotesDefinitions']&&_0x32d9cc['push'](this['_footnotesDefinitions']),_0x32d9cc['push'](..._0x4df4ac),_0x3c217b['insert'](_0x2b95cc,_0x32d9cc[0x0],'before');for(const _0x4a5733 of _0x32d9cc)_0x3c217b['move'](_0x3c217b['createRangeIn'](_0x4a5733),_0x3c217b['createPositionAt'](_0x2b95cc,'end')),_0x3c217b['remove'](_0x4a5733);this['_footnotesDefinitions']=_0x2b95cc,this['_updateFootnotesCounters'](_0x3c217b),_0x5d0866=!0x0;}else this['_footnotesDefinitions']=_0x4df4ac[0x0];}if(_0x117181['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x35e7df of this['_footnotes'])_0x3c217b['remove'](_0x35e7df['reference']),_0x5d0866=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x5d0866;}['_handleFootnoteDefinitionsChanges'](_0x28f87e,_0x25dc04){let _0x1ac492=!0x1;const _0xab187=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x54a4ec,moved:_0x4188a5}=this['_footnoteDefsTracker']['getChanges'](_0x25dc04);for(const _0x185056 of[..._0x4188a5,..._0x54a4ec]){const _0x132fe2=_0x185056['getAttribute']('footnoteId'),_0x19a8f1=this['getFootnote'](_0x132fe2);_0x19a8f1&&(_0x19a8f1['definition']=_0x185056),_(_0x28f87e,_0xab187,_0x185056)&&(_0x1ac492=!0x0);}return _0x1ac492;}['_handleFootnoteReferencesChanges'](_0x5f1d1e,_0x49bcd4){let _0x43b4f9=!0x1;const {removed:_0x59da72,inserted:_0x304739,moved:_0x5d4720}=this['_footnoteRefsTracker']['getChanges'](_0x49bcd4);for(const _0x294bd1 of _0x59da72)this['_handleRemoveFootnoteReferenceById'](_0x5f1d1e,_0x294bd1)&&(_0x43b4f9=!0x0);for(const _0x40f2d8 of _0x304739)this['_handleInsertedFootnoteReference'](_0x5f1d1e,_0x40f2d8)&&(_0x43b4f9=!0x0);for(const _0x31a96c of _0x5d4720)this['_handleMovedFootnoteReference'](_0x5f1d1e,_0x31a96c)&&(_0x43b4f9=!0x0);return _0x43b4f9;}['_handleFootnotesDefinitionsObjectSync'](_0x59b8a1){if(!this['_footnotesDefinitions'])return!0x1;let _0x1188f5=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x38271b=[];for(const _0x22a1ee of this['_footnotesDefinitions']['getChildren']()){const _0x11f564=_0x22a1ee['getAttribute']('footnoteId');this['getFootnote'](_0x11f564)||(_0x38271b['unshift'](_0x22a1ee),_0x1188f5=!0x0);}for(const _0x77c3f2 of _0x38271b)_0x59b8a1['remove'](_0x77c3f2);}const _0x26a615=new Set(),_0x512aec=[];for(const _0x493f17 of this['_footnotesDefinitions']['getChildren']()){const _0x3a34ae=_0x493f17['getAttribute']('footnoteId');_0x26a615['has'](_0x3a34ae)?(_0x512aec['unshift'](_0x493f17),_0x1188f5=!0x0):_0x26a615['add'](_0x3a34ae);}for(const _0x4c33e8 of _0x512aec)_0x59b8a1['remove'](_0x4c33e8);return this['_footnotesDefinitions']['childCount']||(_0x59b8a1['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x1188f5=!0x0),_0x1188f5;}['_handleInsertedFootnoteReference'](_0x2486d9,_0x511551){if(this['_footnotes']['find'](_0x5bb741=>_0x5bb741['reference']===_0x511551))return!0x1;let _0x5e3aa8=!0x1;const _0x3344f3=_0x511551['getAttribute']('footnoteId'),_0x414d8c=this['_footnotes']['findIndex'](_0x5d1200=>_0x5d1200['id']===_0x3344f3);-0x1!==_0x414d8c&&(_0x2486d9['remove'](this['_footnotes'][_0x414d8c]['reference']),this['_footnotes']['splice'](_0x414d8c,0x1),_0x5e3aa8=!0x0);let _0xacf78e=this['_footnotesDefinitions']?function(_0x6783ea,_0x15a654){for(const _0x1ad667 of _0x6783ea['getChildren']())if(_0x1ad667['getAttribute']('footnoteId')===_0x15a654)return _0x1ad667;return null;}(this['_footnotesDefinitions'],_0x3344f3):null;_0xacf78e||(_0xacf78e=_0x2486d9['createElement']('footnoteDefinition',{'footnoteId':_0x3344f3}),this['_footnotesDefinitions']&&(_0x2486d9['insert'](_0xacf78e,this['_footnotesDefinitions'],'end'),_0x5e3aa8=!0x0));const _0x26a0d5={'id':_0x3344f3,'reference':_0x511551,'definition':_0xacf78e},_0x5dab27=I(this['editor']['model'],this['_footnotes'],_0x511551);this['_footnotes']['splice'](_0x5dab27,0x0,_0x26a0d5);let _0x5adff8=_0x5dab27;return-0x1!==_0x414d8c&&(_0x5adff8=Math['min'](_0x5dab27,_0x414d8c)),this['_updateFootnotesCounters'](_0x2486d9,_0x5adff8)&&(_0x5e3aa8=!0x0),_0x5e3aa8;}['_handleRemoveFootnoteReferenceById'](_0x5450f6,_0x236594){const _0x1a18fa=this['_footnotes']['findIndex'](_0x1e3984=>_0x1e3984['id']===_0x236594);if(-0x1===_0x1a18fa)return!0x1;let _0x355a2c=!0x1;const _0x11093a=this['_footnotes'][_0x1a18fa];return'$graveyard'!==_0x11093a['definition']['root']['rootName']&&(_0x5450f6['remove'](_0x11093a['definition']),_0x355a2c=!0x0),this['_footnotes']['splice'](_0x1a18fa,0x1),this['_updateFootnotesCounters'](_0x5450f6,_0x1a18fa)&&(_0x355a2c=!0x0),_0x355a2c;}['_handleMovedFootnoteReference'](_0xbb8283,_0x1567dd){const _0x56a3e8=_0x1567dd['getAttribute']('footnoteId'),_0x17386e=this['_footnotes']['findIndex'](_0x6800e8=>_0x6800e8['id']===_0x56a3e8),_0xe63cc5=this['_footnotes'][_0x17386e];let _0x36fc9b=!0x1;_0xe63cc5['reference']=_0x1567dd,this['_footnotes']['splice'](_0x17386e,0x1);const _0x5bc1f4=I(this['editor']['model'],this['_footnotes'],_0x1567dd);return this['_footnotes']['splice'](_0x5bc1f4,0x0,_0xe63cc5),this['_updateFootnotesCounters'](_0xbb8283,Math['min'](_0x17386e,_0x5bc1f4))&&(_0x36fc9b=!0x0),_0x36fc9b;}['_updateFootnoteRefCounter'](_0x51a673,_0x224752){if(!this['_footnotesDefinitions'])return!0x1;const _0x6b9980=this['_footnotes'][_0x224752];let _0x4850f0;return _0x4850f0=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x6b9980,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x224752+0x1}):String(_0x224752+0x1),_0x6b9980['reference']['getAttribute']('footnoteCounter')!=_0x4850f0&&(_0x51a673['setAttribute']('footnoteCounter',_0x4850f0,_0x6b9980['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x1ffd00){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x3abadb,_0x5ea10e){if(_0x3abadb['length']!==_0x5ea10e['length'])return!0x1;for(let _0x4f2df9=0x0;_0x4f2df9<_0x3abadb['length'];_0x4f2df9++)if(_0x3abadb[_0x4f2df9]!==_0x5ea10e[_0x4f2df9])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x4c1a2f=>_0x4c1a2f['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x366d55=>_0x366d55['getAttribute']('footnoteId'))))return!0x1;let _0x4a2340=!0x1;for(let _0x4779b2=0x0;_0x4779b2<this['_footnotes']['length'];_0x4779b2++){const _0x255327=this['_footnotes'][_0x4779b2],_0x36cd23=_0x1ffd00['createPositionBefore'](_0x255327['definition']),_0x253858=_0x1ffd00['createPositionAt'](this['_footnotesDefinitions'],_0x4779b2);_0x36cd23['isEqual'](_0x253858)||(_0x1ffd00['move'](_0x1ffd00['createRangeOn'](_0x255327['definition']),_0x253858),_0x4a2340=!0x0);}return _0x4a2340;}['_ensureFootnotesReferencesHaveProperOrder'](_0x1b6199){if(!this['_footnotes']['length'])return!0x1;const {model:_0x373ab6}=this['editor'];let _0x175cd6=!0x1;for(let _0x599252=0x0;_0x599252<this['_footnotes']['length']-0x1;_0x599252++){const _0x5c25cd=this['_footnotes'][_0x599252],_0x29e767=this['_footnotes'][_0x599252+0x1],_0x1de4fe=_0x373ab6['createPositionBefore'](_0x5c25cd['reference']),_0x55cb10=_0x373ab6['createPositionBefore'](_0x29e767['reference']);'after'===_0x1de4fe['compareWith'](_0x55cb10)&&(this['_handleMovedFootnoteReference'](_0x1b6199,_0x5c25cd['reference']),_0x599252=-0x1,_0x175cd6=!0x0);}return _0x175cd6;}}function _(_0x53a2e3,_0x16a442,_0x177b19){if(_0x177b19['childCount'])return!0x1;const _0x445a27=_0x16a442?'paragraph':'footnoteInlineContent';return _0x53a2e3['insert'](_0x53a2e3['createElement'](_0x445a27),_0x177b19),!0x0;}function I(_0xe58a58,_0x355785,_0x48adb9){if(0x0===_0x355785['length'])return 0x0;const _0x3b4d79=_0xe58a58['createPositionBefore'](_0x48adb9);for(let _0x2e342f=0x0;_0x2e342f<_0x355785['length'];_0x2e342f++){const _0x553eda=_0x355785[_0x2e342f],_0x3096fd=_0xe58a58['createPositionBefore'](_0x553eda['reference']);if('before'===_0x3b4d79['compareWith'](_0x3096fd))return _0x2e342f;}const _0x3c57c4=_0x48adb9['root'];let _0x515270=-0x1;for(let _0x5617f7=_0x355785['length']-0x1;_0x5617f7>=0x0;_0x5617f7--)if(_0x355785[_0x5617f7]['reference']['root']===_0x3c57c4){_0x515270=_0x5617f7;break;}if(-0x1!==_0x515270)return _0x515270+0x1;const _0x5caeda=_0xe58a58['document']['getRootNames'](),_0x34281c=_0x5caeda['indexOf'](_0x3c57c4['rootName']),_0x2d5d3d=_0x5caeda[_0x34281c+0x1];if(_0x2d5d3d){for(let _0x358f53=0x0;_0x358f53<_0x355785['length'];_0x358f53++)if(_0x355785[_0x358f53]['reference']['root']['rootName']===_0x2d5d3d)return _0x358f53;}return _0x355785['length'];}class m extends _0x38f340{['refresh'](){const _0x3bcba9=this['editor']['model']['document']['selection'],_0x4da242=this['_getPositionToInsertFootnote'](_0x3bcba9);this['isEnabled']=!!_0x4da242;}['execute'](_0x5e58f5){const {editor:_0x1c43a5}=this,{model:_0x3da633}=_0x1c43a5,{selection:_0x11f046}=_0x3da633['document'],_0x423afb=this['_getPositionToInsertFootnote'](_0x11f046);if(!_0x423afb)return;const _0x24cc41=_0x1c43a5['plugins']['get']('FootnotesEditing'),_0x166101=_0x5e58f5?.['footnoteId']??_0xf15334();!function(_0x4185d6){return'string'==typeof _0x4185d6&&_0x4185d6['length']>0x0&&!/\s/['test'](_0x4185d6)&&!/^\d/['test'](_0x4185d6);}(_0x166101)?_0x54d84b('insert-footnote-command-executed-with-invalid-id'):(_0x3da633['change'](_0x4a6939=>{const _0xb38211=_0x4a6939['createElement']('footnoteRef',{'footnoteId':_0x166101});_0x3da633['insertObject'](_0xb38211,_0x423afb,null);}),_0x24cc41['_moveSelectionToFootnoteDefinition'](_0x166101));}['_getPositionToInsertFootnote'](_0x23f667){const {model:_0x47318d}=this['editor'],{schema:_0x3fcf36}=_0x47318d,_0x1f6824=_0x23f667['getFirstRange']();for(const _0x1ddf32 of _0x1f6824['getItems']())if(_0x3fcf36['isBlock'](_0x1ddf32)||_0x3fcf36['isObject'](_0x1ddf32))return null;const _0x223e80=_0x1f6824['end'];return _0x3fcf36['checkChild'](_0x223e80,'footnoteRef')?_0x223e80:null;}}class r extends _0x56a762{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x200b42}=this;_0x200b42['config']['define']('footnotes.multiBlock',!0x0),_0x200b42['commands']['add']('insertFootnote',new m(_0x200b42)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x5c07db){const _0x3c7b3b=_0x52b546([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]),_0x26d189=0x47a28506,_0x2d2d74=0x47a5f2de^_0x26d189,_0x2c6032=window[_0x52b546([0x44,0x61,0x74,0x65])][_0x52b546([0x6e,0x6f,0x77])](),_0x4f62f1=_0x5c07db[_0x52b546([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3efe33=new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ac399=>{_0x4f62f1[_0x52b546([0x6f,0x6e,0x63,0x65])](_0x52b546([0x72,0x65,0x61,0x64,0x79]),_0x2ac399);}),_0x5b624b={[_0x52b546([0x6b,0x74,0x79])]:_0x52b546([0x45,0x43]),[_0x52b546([0x75,0x73,0x65])]:_0x52b546([0x73,0x69,0x67]),[_0x52b546([0x63,0x72,0x76])]:_0x52b546([0x50,0x2d,0x32,0x35,0x36]),[_0x52b546([0x78])]:_0x52b546([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]),[_0x52b546([0x79])]:_0x52b546([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]),[_0x52b546([0x61,0x6c,0x67])]:_0x52b546([0x45,0x53,0x32,0x35,0x36])},_0x153a4d=_0x4f62f1[_0x52b546([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x52b546([0x67,0x65,0x74])](_0x52b546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1b5ad5(){let _0x7c3b8,_0x1980cc=null,_0x29b078=null;try{if(_0x153a4d==_0x52b546([0x47,0x50,0x4c]))return _0x52b546([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x7c3b8=_0x482716(),!_0x7c3b8)return _0x52b546([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x7c3b8[_0x52b546([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x29b078=_0x34d404(_0x7c3b8[_0x52b546([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x7c3b8[_0x52b546([0x6a,0x74,0x69])])),await _0x2da2c8()?_0x2700df()?_0x2e2895()?_0x52b546([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x225d92()?(_0x7c3b8[_0x52b546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52b546([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1980cc=_0x470f4c(_0x52b546([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x7c3b8[_0x52b546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52b546([0x74,0x72,0x69,0x61,0x6c])&&(_0x1980cc=_0x470f4c(_0x52b546([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x38dda9()):_0x52b546([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x52b546([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x52b546([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x52b546([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2e2895(){const _0x46ac74=[_0x52b546([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x52b546([0x74,0x72,0x69,0x61,0x6c])][_0x52b546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7c3b8[_0x52b546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2c6032/0x3e8:0xe10*_0x2d2d74;return _0x7c3b8[_0x52b546([0x65,0x78,0x70])]<_0x46ac74;}function _0x2700df(){const _0x386d14=_0x7c3b8[_0x52b546([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x386d14&&(!!_0x386d14[_0x52b546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52b546([0x2a]))||!!_0x386d14[_0x52b546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52b546([0x46,0x4f,0x4f])));}function _0x225d92(){const _0x19a3a0=_0x7c3b8[_0x52b546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x19a3a0||0x0==_0x19a3a0[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x561e65}=new URL(window[_0x52b546([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x19a3a0[_0x52b546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x561e65))return!0x0;const _0x252011=_0x561e65[_0x52b546([0x73,0x70,0x6c,0x69,0x74])](_0x52b546([0x2e]));return _0x19a3a0[_0x52b546([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x308a6c=>_0x308a6c[_0x52b546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52b546([0x2a])))[_0x52b546([0x6d,0x61,0x70])](_0x2e2cfd=>_0x2e2cfd[_0x52b546([0x73,0x70,0x6c,0x69,0x74])](_0x52b546([0x2e])))[_0x52b546([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x316592=>_0x316592[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x252011[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x52b546([0x6d,0x61,0x70])](_0x5a9fcb=>Array(_0x252011[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5a9fcb[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x52b546([0x66,0x69,0x6c,0x6c])](_0x5a9fcb[0x0]===_0x52b546([0x2a])?_0x52b546([0x2a]):'')[_0x52b546([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5a9fcb))[_0x52b546([0x73,0x6f,0x6d,0x65])](_0x5385bb=>_0x252011[_0x52b546([0x65,0x76,0x65,0x72,0x79])]((_0x447438,_0x29c0ac)=>_0x5385bb[_0x29c0ac]===_0x447438||_0x5385bb[_0x29c0ac]===_0x52b546([0x2a])));}function _0x38dda9(){return _0x1980cc&&_0x29b078?new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1f9aad,_0x229515)=>{_0x1980cc[_0x52b546([0x74,0x68,0x65,0x6e])](_0x1f9aad,_0x229515),_0x29b078[_0x52b546([0x74,0x68,0x65,0x6e])](_0x4bf5ae=>{_0x4bf5ae!=_0x52b546([0x56,0x61,0x6c,0x69,0x64])&&_0x1f9aad(_0x4bf5ae);},_0x229515);}):_0x1980cc||_0x29b078||_0x52b546([0x56,0x61,0x6c,0x69,0x64]);}}function _0x34d404(_0x54acde,_0x2ec77e){return new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x282da0=>{if(_0x2af8c8())return _0x282da0(_0x52b546([0x56,0x61,0x6c,0x69,0x64]));_0x226341(),_0x4f62f1[_0x52b546([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x52b546([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x19636b=!0x1;const _0x224540=_0xf15334();function _0x5075c9(_0x2a4fc2){return!!_0x2a4fc2&&(typeof _0x2a4fc2===_0x52b546([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2a4fc2===_0x52b546([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2a4fc2[_0x52b546([0x74,0x68,0x65,0x6e])]===_0x52b546([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2a4fc2[_0x52b546([0x63,0x61,0x74,0x63,0x68])]===_0x52b546([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x52a19f(_0xacd30){_0xc0f77b(_0xacd30)[_0x52b546([0x74,0x68,0x65,0x6e])](_0x9a1d25=>{if(!_0x9a1d25||_0x9a1d25[_0x52b546([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x52b546([0x6f,0x6b]))return _0x52b546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5d6ba3(_0x470e38(_0x224540+_0x2ec77e))!=_0x9a1d25[_0x52b546([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x52b546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x52b546([0x56,0x61,0x6c,0x69,0x64]);})[_0x52b546([0x74,0x68,0x65,0x6e])](_0x3cd196=>(_0x4f68fd(),_0x3cd196),()=>{const _0x470a48=_0x49a606();return null==_0x470a48?(_0x4f68fd(),_0x52b546([0x56,0x61,0x6c,0x69,0x64])):_0x52b546(_0x2c6032-_0x470a48>(0x63ae0106^_0x26d189)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x52b546([0x74,0x68,0x65,0x6e])](_0x282da0)[_0x52b546([0x63,0x61,0x74,0x63,0x68])](()=>{_0x282da0(_0x52b546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x33adce=0x47946b86^_0x26d189;function _0x4f68fd(){const _0x36a8bf=_0x52b546([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d6ba3(_0x470e38(_0x54acde)),_0x20feb8=_0x165829(_0x5d6ba3(window[_0x52b546([0x4d,0x61,0x74,0x68])][_0x52b546([0x63,0x65,0x69,0x6c])](_0x2c6032/_0x33adce)));window[_0x52b546([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52b546([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x36a8bf,_0x20feb8);}function _0x49a606(){const _0x30be26=_0x52b546([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d6ba3(_0x470e38(_0x54acde)),_0x59d0f9=window[_0x52b546([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52b546([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30be26);return _0x59d0f9?window[_0x52b546([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x165829(_0x59d0f9),0x10)*_0x33adce:null;}function _0xc0f77b(_0x1fa97a){return new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x170a0e,_0x944e6a)=>{_0x1fa97a[_0x52b546([0x74,0x68,0x65,0x6e])](_0x170a0e,_0x944e6a),window[_0x52b546([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x944e6a,0x47a351c6^_0x26d189);});}}_0x4f62f1[_0x52b546([0x6f,0x6e])](_0x52b546([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4d6863,_0x2c8b03)=>{if(_0x2c8b03[0x0]!=_0x54acde)return _0x282da0(_0x52b546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2c8b03[0x1]={..._0x2c8b03[0x1],[_0x52b546([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x224540};},{[_0x52b546([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52b546([0x68,0x69,0x67,0x68])}),_0x4f62f1[_0x52b546([0x6f,0x6e])](_0x52b546([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x9b2a2f=>{_0x5075c9(_0x9b2a2f[_0x52b546([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x19636b=!0x0,_0x52a19f(_0x9b2a2f[_0x52b546([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x52b546([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52b546([0x6c,0x6f,0x77])}),_0x3efe33[_0x52b546([0x74,0x68,0x65,0x6e])](()=>{_0x19636b||_0x282da0(_0x52b546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2af8c8(){return _0x4f62f1[_0x52b546([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52b546([0x76,0x69,0x65,0x77])][_0x52b546([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x52b546([0x61,0x75,0x74,0x6f]);}function _0x226341(){_0x4f62f1[_0x52b546([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52b546([0x76,0x69,0x65,0x77])][_0x52b546([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x52b546([0x61,0x75,0x74,0x6f]);}}function _0x470f4c(_0x33b8a8){const _0x253cfc=[new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3af25e=>setTimeout(_0x3af25e,0x47abbbca^_0x26d189)),_0x3efe33[_0x52b546([0x74,0x68,0x65,0x6e])](()=>new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3369eb=>{let _0x166ea1=0x0;_0x4f62f1[_0x52b546([0x6d,0x6f,0x64,0x65,0x6c])][_0x52b546([0x6f,0x6e])](_0x52b546([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4e624b,_0x4f7570)=>{_0x4f7570[0x0][_0x52b546([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x166ea1++,_0x166ea1==(0x47a284fe^_0x26d189)&&(_0x3369eb(),_0x4e624b[_0x52b546([0x6f,0x66,0x66])]());});}))];return window[_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x52b546([0x72,0x61,0x63,0x65])](_0x253cfc)[_0x52b546([0x74,0x68,0x65,0x6e])](()=>_0x33b8a8);}async function _0x49b39a(){await _0x3efe33,_0x4f62f1[_0x52b546([0x6d,0x6f,0x64,0x65,0x6c])][_0x52b546([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x18d321,_0x4f62f1[_0x52b546([0x6d,0x6f,0x64,0x65,0x6c])][_0x52b546([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x18d321,_0x4f62f1[_0x52b546([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x52b546([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1a9778(_0x5db7c2){const _0x225b75=_0x17c742();_0x4f62f1[_0x225b75]=_0x52b546([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5db7c2,_0x5db7c2!=_0x52b546([0x56,0x61,0x6c,0x69,0x64])&&_0x49b39a();}function _0x17c742(){const _0x4ffdfd=window[_0x52b546([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x52b546([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x52b546([0x6e,0x6f,0x77])]())[_0x52b546([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x52b546([0x2e]),'');let _0x2dab41=_0x52b546([0x75]);for(let _0x41ebcf=0x0;_0x41ebcf<_0x4ffdfd[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x41ebcf+=0x2){let _0x551055=window[_0x52b546([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4ffdfd[_0x52b546([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x41ebcf,_0x41ebcf+0x2));_0x551055>=_0x3c7b3b[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x551055-=_0x3c7b3b[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2dab41+=_0x3c7b3b[_0x551055];}return _0x2dab41;}function _0x482716(){const _0xe44605=_0x153a4d[_0x52b546([0x73,0x70,0x6c,0x69,0x74])](_0x52b546([0x2e]));if(0x3!=_0xe44605[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3051e9(_0xe44605[0x1]);function _0x3051e9(_0x479442){const _0x127f84=_0x5db59d(_0x479442);return _0x127f84&&_0x32c3da()?_0x127f84:null;function _0x32c3da(){const _0x5512c7=_0x127f84[_0x52b546([0x6a,0x74,0x69])],_0x32494e=window[_0x52b546([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5512c7[_0x52b546([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5512c7[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x520363={..._0x127f84,[_0x52b546([0x6a,0x74,0x69])]:_0x5512c7[_0x52b546([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5512c7[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x520363[_0x52b546([0x76,0x63])],_0x470e38(_0x520363)==_0x32494e;}}}async function _0x2da2c8(){let _0x1f62f5=!0x0;try{const _0x146df4=_0x153a4d[_0x52b546([0x73,0x70,0x6c,0x69,0x74])](_0x52b546([0x2e])),[_0x39e2ad,_0x381cdd,_0x19dc5d]=_0x146df4;return _0xa4f7(_0x39e2ad),await _0xc9768a(_0x39e2ad,_0x381cdd,_0x19dc5d),_0x1f62f5;}catch{return!0x1;}function _0xa4f7(_0x29fca3){const _0x219e7d=_0x5db59d(_0x29fca3);_0x219e7d&&_0x219e7d[_0x52b546([0x61,0x6c,0x67])]==_0x52b546([0x45,0x53,0x32,0x35,0x36])||(_0x1f62f5=!0x1);}async function _0xc9768a(_0x5c8f62,_0x243ad5,_0x3e0ec4){const _0x24f0d5=window[_0x52b546([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x52b546([0x66,0x72,0x6f,0x6d])](_0xc8b10b(_0x3e0ec4),_0x5a2427=>_0x5a2427[_0x52b546([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x522532=new window[(_0x52b546([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x52b546([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5c8f62+_0x52b546([0x2e])+_0x243ad5),_0xa8a21d=window[_0x52b546([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x52b546([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xa8a21d)return;const _0x4667b6=await _0xa8a21d[_0x52b546([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x52b546([0x6a,0x77,0x6b]),_0x5b624b,{[_0x52b546([0x6e,0x61,0x6d,0x65])]:_0x52b546([0x45,0x43,0x44,0x53,0x41]),[_0x52b546([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x52b546([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x52b546([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xa8a21d[_0x52b546([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x52b546([0x6e,0x61,0x6d,0x65])]:_0x52b546([0x45,0x43,0x44,0x53,0x41]),[_0x52b546([0x68,0x61,0x73,0x68])]:{[_0x52b546([0x6e,0x61,0x6d,0x65])]:_0x52b546([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4667b6,_0x24f0d5,_0x522532)||(_0x1f62f5=!0x1);}}function _0x5db59d(_0x5d6489){return _0x5d6489[_0x52b546([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x52b546([0x65,0x79]))?JSON[_0x52b546([0x70,0x61,0x72,0x73,0x65])](_0xc8b10b(_0x5d6489)):null;}function _0xc8b10b(_0x223640){return window[_0x52b546([0x61,0x74,0x6f,0x62])](_0x223640[_0x52b546([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x52b546([0x2b]))[_0x52b546([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x52b546([0x2f])));}function _0x470e38(_0x2acb3f){let _0x2547b6=0x1505;function _0x1cae76(_0x54e87c){for(let _0x170497=0x0;_0x170497<_0x54e87c[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x170497++){const _0x512849=_0x54e87c[_0x52b546([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x170497);_0x2547b6=(_0x2547b6<<0x5)+_0x2547b6+_0x512849,_0x2547b6&=_0x2547b6;}}function _0x93d434(_0x172ccb){Array[_0x52b546([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x172ccb)?_0x172ccb[_0x52b546([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x93d434):_0x172ccb&&typeof _0x172ccb==_0x52b546([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x52b546([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x172ccb)[_0x52b546([0x73,0x6f,0x72,0x74])]()[_0x52b546([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x304a93,_0x1284ed])=>{_0x1cae76(_0x304a93),_0x93d434(_0x1284ed);}):_0x1cae76(window[_0x52b546([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x172ccb));}return _0x93d434(_0x2acb3f),_0x2547b6>>>0x0;}function _0x5d6ba3(_0x4bb5d3){return _0x4bb5d3[_0x52b546([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x52b546([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x52b546([0x30]));}function _0x165829(_0x24cd17){return _0x24cd17[_0x52b546([0x73,0x70,0x6c,0x69,0x74])]('')[_0x52b546([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x52b546([0x6a,0x6f,0x69,0x6e])]('');}function _0x18d321(){}function _0x52b546(_0x216244){return _0x216244['map'](_0x556c78=>String['fromCharCode'](_0x556c78))['join']('');}_0x1a9778(await _0x1b5ad5());}(this);}['_moveSelectionToFootnoteDefinition'](_0x236b1b){const {plugins:_0x2141dc,editing:_0x207ad7,model:_0x26bf0a}=this['editor'],_0x1118fb=_0x2141dc['get'](c)['getFootnote'](_0x236b1b);return!!_0x1118fb&&(_0x26bf0a['change'](_0x34deb2=>{_0x34deb2['setSelection'](_0x34deb2['createPositionAt'](_0x1118fb['definition'],'end'));}),_0x207ad7['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0xa39d0d){const {plugins:_0x33cf9c,editing:_0x535ad6,model:_0x2a9d81}=this['editor'],_0x488fac=_0x33cf9c['get'](c)['getFootnote'](_0xa39d0d);return!!_0x488fac&&(_0x2a9d81['change'](_0x50ed84=>{_0x50ed84['setSelection'](_0x488fac['reference'],'on');}),_0x535ad6['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x3feab5}=this['editor']['model'],_0x44a2b9=this['editor']['config']['get']('footnotes.multiBlock');_0x3feab5['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x3feab5['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x3feab5['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x44a2b9?_0x3feab5['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x3feab5['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x3feab5['addChildCheck'](_0x12ec79=>{for(const _0x4d6cc0 of _0x12ec79)if('footnoteDefinition'===_0x4d6cc0['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0xba472f}=this,{conversion:_0x433a83,editing:_0x1c5caf}=_0xba472f,{t:t}=_0xba472f['locale'];_0x433a83['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x3a25b6,{writer:_0x11c49c,consumable:_0x642966})=>{const _0x1ec8c1=_0x3a25b6['getChild'](0x0);if(!_0x1ec8c1||!_0x1ec8c1['is']('element','a'))return null;const _0x3d6caa=_0x1ec8c1['getAttribute']('href')||'';if(!_0x3d6caa['startsWith']('#'))return null;const _0x292577=_0x3d6caa['replace'](/^#/,'');if(!_0x292577)return null;_0x642966['consume'](_0x1ec8c1,{'name':!0x0,'attributes':['href']});for(const {item:_0x5d714e}of _0x1c5caf['view']['createRangeIn'](_0x1ec8c1))_0x5d714e['is']('$textProxy')?_0x642966['consume'](_0x5d714e['textNode'],{'name':!0x0}):_0x5d714e['is']('element')&&_0x642966['consume'](_0x5d714e,{'name':!0x0});return _0x11c49c['createElement']('footnoteRef',{'footnoteId':_0x292577});}}),_0x433a83['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x850f10,{writer:_0x4f0fb1})=>D(_0x850f10,_0x4f0fb1)}),_0x433a83['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x2b52a8,{writer:_0x373cc4})=>{const _0x32df26=_0x2b52a8['getAttribute']('footnoteCounter');return _0x5146b1(D(_0x2b52a8,_0x373cc4),_0x373cc4,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x32df26)});}});}['_defineDefinitionsConverters'](){const {editor:_0x4768be}=this,{t:t}=_0x4768be['locale'],{conversion:_0x331deb}=_0x4768be;_0x331deb['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x331deb['for']('upcast')['add'](_0x4ffa0e=>{_0x4ffa0e['on']('element:ol',(_0x5e013b,_0x4a08ea,_0x5832ca)=>{const _0x5d9aed=_0x4a08ea['viewItem'];if(!_0x5d9aed['hasClass']('footnotes-list')||!_0x4a08ea['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x5832ca['consumable']['consume'](_0x5d9aed,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x33bc7b,modelCursor:_0x1d326d}=_0x5832ca['convertChildren'](_0x4a08ea['viewItem'],_0x4a08ea['modelCursor']);_0x4a08ea['modelRange']=_0x33bc7b,_0x4a08ea['modelCursor']=_0x1d326d;}),_0x4ffa0e['on']('element:hr',(_0x44493f,_0x125c23,_0x540f29)=>{const _0x484cc5=_0x125c23['viewItem'];_0x484cc5['hasClass']('footnotes-divider')&&_0x125c23['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x540f29['consumable']['consume'](_0x484cc5,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x331deb['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x186e5c,{writer:_0x13fab7})=>v(_0x13fab7)}),_0x331deb['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x24ac02,{writer:_0x21153a})=>{const _0x479c48=v(_0x21153a,{'data-footnotes-list-label':t('Footnotes')}),_0x3f8934=_0x5146b1(_0x479c48,_0x21153a,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x21153a['setCustomProperty']('footnotesDefinitions',!0x0,_0x3f8934),_0x3f8934;}});}['_defineDefinitionConverters'](){const {editor:_0x49a7f9}=this,{conversion:_0x34b6fa,locale:_0x6589ad}=_0x49a7f9,_0x2914db=_0x49a7f9['config']['get']('footnotes.multiBlock');_0x34b6fa['for']('upcast')['add'](_0x4a09c4=>{_0x4a09c4['on']('element:li',(_0x42606a,_0x410f3c,_0x5b8493)=>{const _0x15cabb=_0x410f3c['viewItem'];if(!_0x15cabb['hasClass']('footnote-definition')||!_0x15cabb['getAttribute']('id'))return;const _0x49c95f=_0x15cabb['parent'];if(!_0x49c95f['is']('element','ol')||!_0x49c95f['hasClass']('footnotes-list'))return;if(!_0x5b8493['consumable']['test'](_0x15cabb,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x31f926=_0x5b8493['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x15cabb['getAttribute']('id')});if(!_0x5b8493['safeInsert'](_0x31f926,_0x410f3c['modelCursor']))return;_0x5b8493['consumable']['consume'](_0x15cabb,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x482f96=Array['from'](_0x15cabb['getChildren']())['find'](_0x308a48=>_0x308a48['is']('element')&&_0x308a48['hasClass']('footnote-content'));for(const _0x94a91e of _0x15cabb['getChildren']())_0x94a91e['is']('element')&&(_0x5b8493['consumable']['consume'](_0x94a91e,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x5b8493['consumable']['consume'](_0x94a91e,{'name':!0x0,'classes':'footnote-content'}));if(_0x482f96){if(_0x2914db)_0x5b8493['convertChildren'](_0x482f96,_0x31f926);else{const _0x5e134a=_0x5b8493['writer']['createElement']('footnoteInlineContent');_0x5b8493['writer']['insert'](_0x5e134a,_0x31f926),_0x5b8493['convertChildren'](_0x482f96,_0x5e134a);}}_0x5b8493['updateConversionResult'](_0x31f926,_0x410f3c);});}),_0x34b6fa['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x5429e9,{writer:_0x1adc00})=>b(_0x5429e9,_0x1adc00,_0x6589ad,{'dataPipeline':!0x0})}),_0x34b6fa['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x2c3476,{writer:_0x587ce7})=>b(_0x2c3476,_0x587ce7,_0x6589ad)});}['_defineBogusParagraphConverters'](){const {editor:_0x396f29}=this,{conversion:_0x5663a8}=_0x396f29;_0x396f29['config']['get']('footnotes.multiBlock')?(_0x5663a8['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':h(),'converterPriority':'high'}),_0x5663a8['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':h({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x396f29['model']['document'],'change:data',()=>{!function(_0x53b415,_0x55411e){const _0x36a8a4=_0x53b415['document']['differ'],_0x206aff=new Set();for(const _0x4df5c9 of _0x36a8a4['getChanges']()){const _0x4d1b17='attribute'==_0x4df5c9['type']?_0x4df5c9['range']['start']['parent']:_0x4df5c9['position']['parent'];_0x4d1b17['is']('element','footnoteDefinition')&&_0x206aff['add'](_0x4d1b17);}for(const _0x450ba3 of _0x206aff['values']()){const _0x17db26=Array['from'](_0x450ba3['getChildren']())['filter'](_0x12e661=>g(_0x12e661,_0x55411e['mapper']));for(const _0x270728 of _0x17db26)_0x55411e['reconvertItem'](_0x270728);}}(_0x396f29['model'],_0x396f29['editing']);})):(_0x5663a8['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':h()}),_0x5663a8['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x4fa8e0,{writer:_0x300558})=>{const _0x5b3a1a=_0x300558['createContainerElement']('span');return _0x300558['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x5b3a1a),_0x5b3a1a;}}));}['_defineKeyboardHandlers'](){const {editor:_0x64e386}=this,{editing:_0x5216fd,t:t}=_0x64e386,_0x427267=_0x64e386['model']['document']['selection'];_0x64e386['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0x64e386['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0x5216fd['view']['document'],'enter',(_0x44e625,_0x143992)=>{const _0x2caacf=function(_0x41089e){const _0x257925=_0x41089e['getSelectedElement']();if(_0x257925?.['is']('element','footnoteRef'))return _0x257925;return null;}(_0x427267);if(_0x2caacf){const _0x1bcab5=_0x2caacf['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x1bcab5),_0x143992['preventDefault'](),_0x44e625['stop']();}},{'context':_0x5eb282});}['_defineClickHandlers'](){const {editor:_0x4ac713}=this,{editing:_0x27d39c}=_0x4ac713;_0x4ac713['editing']['view']['addObserver'](_0x4f0f0b),_0x4ac713['editing']['view']['addObserver'](_0x52d689);let _0x63e20b=!0x1;this['listenTo'](_0x27d39c['view']['document'],'pointerdown',(_0x3b0903,_0xea3868)=>{const {target:_0x5e851c}=_0xea3868,_0x3797a4=_0x27d39c['view']['document']['selection'];_0x63e20b=!!(_0x5e851c?.['is']('element','a')&&_0x5e851c['parent']?.['is']('element','sup')&&_0x5e851c['parent']['hasClass']('footnote'))&&_0x3797a4['getSelectedElement']()===_0x5e851c['parent'];},{'priority':'high'}),this['listenTo'](_0x27d39c['view']['document'],'click',(_0x4efdb1,_0x43fde7)=>{const {target:_0x1320ca}=_0x43fde7;if(!_0x1320ca?.['is']('element','a'))return;if(_0x1320ca['parent']?.['is']('element','sup')&&_0x1320ca['parent']['hasClass']('footnote')&&!_0x63e20b)return void _0x43fde7['preventDefault']();let _0x705e80=_0x1320ca['getAttribute']('href');if(!_0x705e80?.['startsWith']('#'))return;_0x705e80=_0x705e80['slice'](0x1);let _0x1775ce=!0x1;(_0x705e80['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x705e80['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x705e80))&&(_0x1775ce=!0x0),_0x1775ce&&(_0x43fde7['preventDefault'](),_0x4efdb1['stop']());},{'priority':'high','context':'$capture'});}}function h({dataPipeline:_0x238f95}={}){return(_0x496c01,{writer:_0x2929fb})=>{if(!p(_0x496c01))return null;if(!_0x238f95)return _0x2929fb['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x398be9=_0x2929fb['createContainerElement']('p');return _0x2929fb['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x398be9),_0x398be9;};}function p(_0x383f39){const {parent:_0x50119d}=_0x383f39;if(!_0x50119d?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x50119d['childCount'])return!0x1;for(const _0x35bad9 of _0x383f39['getAttributeKeys']())if(!_0x35bad9['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x35bad9)return!0x1;return!0x0;}function g(_0x3025ba,_0x5a7de9){if(!_0x3025ba['is']('element','paragraph'))return!0x1;const _0x407c0a=_0x5a7de9['toViewElement'](_0x3025ba);return!!_0x407c0a&&p(_0x3025ba)!==_0x407c0a['is']('element','span');}function J(_0x545bbf){return _0x5eb282(_0x545bbf)&&_0x545bbf['is']('containerElement')&&!!_0x545bbf['getCustomProperty']('footnotesDefinitions');}function v(_0x16077e,_0x516bb4={}){const _0x44cb9d=_0x16077e['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x44c56d=_0x16077e['createContainerElement']('ol',{'class':'footnotes-list'},_0x16077e['createSlot']());return _0x16077e['createContainerElement']('div',{'class':'footnotes',..._0x516bb4},[_0x44cb9d,_0x44c56d]);}function D(_0x40e6af,_0x4b7521){const _0x4dce87=_0x40e6af['getAttribute']('footnoteId'),_0xe18edb=_0x40e6af['getAttribute']('footnoteCounter'),_0x379b3c=_0x4b7521['createUIElement']('a',{'href':'#'+_0x4dce87},function(_0x3e4815){const _0x302c12=this['toDomElement'](_0x3e4815);return _0x302c12['textContent']=_0xe18edb,_0x302c12;}),_0x411cbe=_0x4b7521['createContainerElement']('sup',{'id':'ref-'+_0x4dce87,'class':'footnote'},[_0x379b3c]);return _0x411cbe['getFillerOffset']=()=>null,_0x411cbe;}function b(_0x4a35ae,_0x359242,_0x53337b,{dataPipeline:_0xc3735f}={}){const {t:t}=_0x53337b,_0x45d3d6=_0x4a35ae['getAttribute']('footnoteId'),_0x2f748a=_0x359242['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x45d3d6},function(_0x55fdff){const _0x238629=this['toDomElement'](_0x55fdff);return _0x238629['innerText']='^',_0x238629;}),_0x7af18c=_0xc3735f?_0x359242['createContainerElement']('div',{'class':'footnote-content'}):_0x4e9961(_0x359242['createEditableElement']('div',{'class':'footnote-content'}),_0x359242,{'label':t('Footnote\x20content.')});return _0x359242['insert'](_0x359242['createPositionAt'](_0x7af18c,0x0),_0x359242['createSlot']()),_0x359242['createContainerElement']('li',{'class':'footnote-definition','id':_0x45d3d6},[_0x2f748a,_0x7af18c]);}class e extends _0x56a762{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x5e5846];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x2e4b7c}=this,{plugins:_0x3fd431,model:_0x9aff68}=_0x2e4b7c,_0x4c2590=_0x3fd431['get'](_0x5e5846),_0x4b3888=_0x3fd431['get'](c);this['listenTo'](_0x4c2590,'outputTransformation',(_0x57ed36,_0x388922)=>{const _0x40387f=f(_0x9aff68['createRangeIn'](_0x388922['content']));if(!_0x40387f['length'])return;const _0x2a0e5b=_0x4b3888['getFootnotes'](),_0x5a8925=_0x40387f['reduce']((_0x54b1d2,_0x5131fa)=>{const _0x3dd5a4=_0x2a0e5b['find'](_0x5f5d97=>_0x5f5d97['id']===_0x5131fa);if(_0x3dd5a4){const _0x33a326=_0x2e4b7c['data']['toView'](_0x3dd5a4['definition'],{'isClipboardPipeline':!0x0}),_0x2e28b4=_0x2e4b7c['data']['htmlProcessor']['toData'](_0x33a326);_0x54b1d2[_0x3dd5a4['id']]=_0x2e28b4;}return _0x54b1d2;},Object['create'](null));_0x388922['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x5a8925));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x1f27d9}=this,{model:_0x5b3c2e,plugins:_0x1e8156}=_0x1f27d9,{view:_0x1d2e1b}=_0x1f27d9['editing'],_0x322718=_0x1e8156['get'](_0x5e5846),_0x1dbae3=_0x1e8156['get'](c);let _0x37eab6=null;this['listenTo'](_0x1d2e1b['document'],'clipboardInput',(_0x13669b,_0x1585ec)=>{const _0x20583a=_0x1585ec['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x37eab6=_0x20583a?JSON['parse'](_0x20583a):null;}),this['listenTo'](_0x322718,'contentInsertion',(_0x4c1c81,_0x3c1756)=>{const _0x4c06d9=_0x3c1756['sourceEditorId']===this['editor']['id'];_0x4c06d9&&'drop'===_0x3c1756['method']||_0x5b3c2e['change'](_0x1976d1=>{let _0x4ab337=_0x1dbae3['getFootnotesDefinitionsObjectElement']();const _0x3d44f4=!!_0x4ab337&&Array['from'](_0x5b3c2e['document']['selection']['getSelectedBlocks']())['includes'](_0x4ab337);if(_0x4ab337&&!_0x3d44f4&&function(_0x3e193e,_0x15c945){const _0x2a6e2c=[];for(const {item:_0x10d5c4}of _0x3e193e['createRangeIn'](_0x15c945))_0x10d5c4['is']('element','footnotesDefinitions')&&_0x2a6e2c['push'](_0x10d5c4);for(const _0x43d0ec of _0x2a6e2c)_0x3e193e['remove'](_0x43d0ec);}(_0x1976d1,_0x3c1756['content']),!_0x37eab6)return;const {selection:_0x2fa83a}=_0x5b3c2e['document'],_0x5ce5b8=_0x2fa83a['getFirstRange']()['root'];_0x4ab337&&!_0x3d44f4||(_0x4ab337=function(_0x45675a,_0x4d4ed9){for(const {item:_0x417690}of _0x45675a['createRangeIn'](_0x4d4ed9))if(_0x417690['is']('element','footnotesDefinitions'))return _0x417690;return null;}(_0x1976d1,_0x3c1756['content']),_0x4ab337||=_0x1dbae3['_insertEmptyFootnotesDefinitionsContainer'](_0x1976d1,_0x5ce5b8));const _0x5c8db0=Array['from'](_0x2fa83a['getRanges']())['flatMap'](f),_0x59c2f8=function(_0x31e62a,_0x1156cf,_0x4db79d){const _0xf3b518=Object['create'](null);for(const {item:_0x31b84f}of _0x31e62a['createRangeIn'](_0x1156cf))if(_0x31b84f['is']('element','footnoteRef')){const _0x29e7e6=_0x31b84f['getAttribute']('footnoteId');if(!_0x4db79d(_0x29e7e6))continue;_0xf3b518[_0x29e7e6]||(_0xf3b518[_0x29e7e6]=_0xf15334()),_0x31e62a['setAttribute']('footnoteId',_0xf3b518[_0x29e7e6],_0x31b84f);}return _0xf3b518;}(_0x1976d1,_0x3c1756['content'],_0x3bdfa1=>{if(!_0x4c06d9)return!0x0;return!!_0x1dbae3['getFootnote'](_0x3bdfa1)&&!_0x5c8db0['includes'](_0x3bdfa1);});for(const [_0x54faee,_0x24387d]of Object['entries'](_0x37eab6)){const _0xf3edae=_0x59c2f8[_0x54faee]||_0x54faee,_0x21b5f1=_0x1976d1['createElement']('footnoteDefinition',{'footnoteId':_0xf3edae}),_0x55d722=_0x1f27d9['data']['htmlProcessor']['toView'](_0x24387d),_0x2e7b83=_0x1f27d9['data']['toModel'](_0x55d722,_0x21b5f1);_0x1976d1['append'](_0x2e7b83,_0x21b5f1),_0x1976d1['insert'](_0x21b5f1,_0x4ab337,'end');}_0x37eab6=null;});});}}function f(_0x3a70ec){const _0x253429=new Set();for(const {item:_0xe51152}of _0x3a70ec)_0xe51152['is']('element','footnoteRef')&&_0x253429['add'](_0xe51152['getAttribute']('footnoteId'));return Array['from'](_0x253429);}class i extends _0x56a762{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2bf228}=this,{componentFactory:_0x22863a}=_0x2bf228['ui'];_0x22863a['add']('insertFootnote',x(_0x2bf228,_0x35adf5)),_0x22863a['add']('menuBar:insertFootnote',x(_0x2bf228,_0x40f8a5)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x580cce=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xc3a8d2;for(const _0x23b4d9 in _0x580cce){const _0x22d340=_0x23b4d9,_0x2d2562=_0x580cce[_0x22d340];if('footnotesLicenseKeyValid'==_0x2d2562||'footnotesLicenseKeyInvalid'==_0x2d2562||'footnotesLicenseKeyExpired'==_0x2d2562||'footnotesLicenseKeyDomainLimit'==_0x2d2562||'footnotesLicenseKeyNotAllowed'==_0x2d2562||'footnotesLicenseKeyEvaluationLimit'==_0x2d2562||'footnotesLicenseKeyTrialLimit'==_0x2d2562||'footnotesLicenseKeyUsageLimit'==_0x2d2562){delete _0x580cce[_0x22d340],_0xc3a8d2=_0x2d2562,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0xc3a8d2&&_0x580cce['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0xc3a8d2&&_0x580cce['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0xc3a8d2&&_0x580cce['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0xc3a8d2&&_0x580cce['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0xc3a8d2&&_0x580cce['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0xc3a8d2&&_0x580cce['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0xc3a8d2&&_0x580cce['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function x(_0x51e01b,_0x11ce53){const _0x16dfe7=_0x51e01b['commands']['get']('insertFootnote');return _0x191678=>{const {t:t}=_0x191678,_0x7464ae=new _0x11ce53(_0x191678),_0x9a36f0=_0x7464ae instanceof _0x40f8a5;return _0x7464ae['bind']('isEnabled')['to'](_0x16dfe7,'isEnabled'),_0x7464ae['set']({'label':t(_0x9a36f0?'Footnote':'Insert\x20footnote'),'icon':_0x4985ca,'tooltip':!0x0}),_0x7464ae['on']('execute',()=>{_0x16dfe7['execute'](),_0x51e01b['editing']['view']['focus']();}),_0x7464ae;};}class lt extends _0x56a762{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const Q=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x38f340{['refresh'](){const {editor:_0x32f39e}=this,_0x4ab7c9=_0x32f39e['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x4ab7c9,this['value']=_0x4ab7c9?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0xaa589d}){const {editor:_0x183ae8}=this,_0xaf94a2=_0x183ae8['plugins']['get'](c),_0x13ede3=_0xaf94a2['getFootnotesDefinitionsObjectElement']();_0x13ede3&&Q['includes'](_0xaa589d)&&_0x183ae8['model']['change'](_0x5242eb=>{_0x5242eb['setAttribute']('footnotesListStyle',_0xaa589d,_0x13ede3),_0xaf94a2['_updateFootnotesCounters'](_0x5242eb);});}}class C extends _0x38f340{['refresh'](){const {editor:_0xc21867}=this,_0x4c64fc=_0xc21867['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x4c64fc,this['value']=_0x4c64fc?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x4e399b}){const {editor:_0x3b99cd}=this,_0xe2c582=_0x3b99cd['plugins']['get'](c),_0x24ff79=_0xe2c582['getFootnotesDefinitionsObjectElement']();_0x24ff79&&Number['isInteger'](_0x4e399b)&&_0x3b99cd['model']['change'](_0x7c61ae=>{_0x7c61ae['setAttribute']('footnotesListStart',_0x4e399b,_0x24ff79),_0xe2c582['_updateFootnotesCounters'](_0x7c61ae);});}}class P extends _0x56a762{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1beea7}=this;_0x1beea7['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x1beea7['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x1beea7['commands']['add']('footnotesStyle',new S(_0x1beea7)),_0x1beea7['commands']['add']('footnotesStart',new C(_0x1beea7)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x28a1ed}=this,{schema:_0x2c81cd}=_0x28a1ed['model'];_0x2c81cd['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x278def}=this,{conversion:_0x169ff4,model:_0x43d784}=_0x278def,{schema:_0x47a0ce}=_0x43d784;_0x169ff4['for']('upcast')['add'](_0x869bdf=>{_0x869bdf['on']('element:ol',(_0x103784,_0x3c087a,_0xc1d041)=>{const _0xe10bd4=_0x3c087a['viewItem'],_0x17ecd9=_0x3c087a['modelCursor']?.['parent'];_0xe10bd4['hasClass']('footnotes-list')&&_0x17ecd9?.['is']('element','footnotesDefinitions')&&(function(_0x26e364,_0x4e1b7e,_0x405ffe,_0x46c4a9){if(!_0x46c4a9['checkAttribute'](_0x4e1b7e,'footnotesListStart'))return;let _0x311bd6=0x1;const _0x662a8d=_0x405ffe['consumable']['consume'](_0x26e364,{'attributes':'start'});if(_0x662a8d){const _0x3e2480=Number['parseInt'](_0x26e364['getAttribute']('start'),0xa);Number['isNaN'](_0x3e2480)||(_0x311bd6=_0x3e2480);}!_0x662a8d&&_0x4e1b7e['hasAttribute']('footnotesListStart')||_0x405ffe['writer']['setAttribute']('footnotesListStart',_0x311bd6,_0x4e1b7e);}(_0xe10bd4,_0x17ecd9,_0xc1d041,_0x47a0ce),function(_0x2f2dcf,_0x8cec10,_0x1bff81,_0x44bfb1){if(!_0x44bfb1['checkAttribute'](_0x8cec10,'footnotesListStyle'))return;let _0x26fc4f='decimal',_0x205ccb=!0x1;if(_0x1bff81['consumable']['consume'](_0x2f2dcf,{'attributes':'type'})){const _0x4c31cd={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x2f2dcf['getAttribute']('type')];_0x4c31cd&&(_0x26fc4f=_0x4c31cd),_0x205ccb=!0x0;}_0x1bff81['consumable']['consume'](_0x2f2dcf,{'styles':'list-style-type'})&&(_0x26fc4f=_0x2f2dcf['getStyle']('list-style-type'),_0x205ccb=!0x0),!_0x205ccb&&_0x8cec10['hasAttribute']('footnotesListStyle')||_0x1bff81['writer']['setAttribute']('footnotesListStyle',_0x26fc4f,_0x8cec10);}(_0xe10bd4,_0x17ecd9,_0xc1d041,_0x47a0ce));});}),_0x169ff4['for']('downcast')['add'](_0x17d1e5=>{_0x17d1e5['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x5e9ba3,_0xc2c24c,_0x5455f5)=>{if(!_0x5455f5['consumable']['consume'](_0xc2c24c['item'],_0x5e9ba3['name']))return;const _0x1aab70=M(_0xc2c24c['item'],_0x5455f5['mapper']),{attributeNewValue:_0x540ff2}=_0xc2c24c;null==_0x540ff2||0x1===_0x540ff2?_0x5455f5['writer']['removeAttribute']('start',_0x1aab70):_0x5455f5['writer']['setAttribute']('start',String(_0x540ff2),_0x1aab70);}),_0x17d1e5['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x3aef3d,_0x517d69,_0x13059d)=>{if(!_0x13059d['consumable']['consume'](_0x517d69['item'],_0x3aef3d['name']))return;const _0x2b8b49=M(_0x517d69['item'],_0x13059d['mapper']),{attributeNewValue:_0x5093e5}=_0x517d69;_0x5093e5&&'decimal'!==_0x5093e5?_0x13059d['writer']['setStyle']('list-style-type',_0x5093e5,_0x2b8b49):_0x13059d['writer']['removeStyle']('list-style-type',_0x2b8b49);});});}['_definePostfixer'](){const {editor:_0x918f79}=this,{model:_0x1921ea}=_0x918f79,_0x1907db=_0x918f79['plugins']['get'](c),_0x3549cc=this['_getDefaultListStyle'](),_0x3a2c33=this['_getDefaultStartIndex']();_0x1921ea['document']['registerPostFixer'](_0x3af1ec=>{const _0x52ba4c=_0x1921ea['document']['differ']['getChanges']();let _0x2ec13d=!0x1;for(const _0x3b7639 of _0x52ba4c){if('insert'!==_0x3b7639['type']||'$text'===_0x3b7639['name'])continue;const _0x2b8561=_0x1921ea['createRangeOn'](_0x3b7639['position']['nodeAfter']);for(const _0x55cfe4 of _0x2b8561['getItems']())_0x55cfe4['is']('element','footnotesDefinitions')&&(!_0x55cfe4['hasAttribute']('footnotesListStart')&&_0x1921ea['schema']['checkAttribute'](_0x55cfe4,'footnotesListStart')&&(_0x3af1ec['setAttribute']('footnotesListStart',_0x3a2c33,_0x55cfe4),_0x2ec13d=!0x0),!_0x55cfe4['hasAttribute']('footnotesListStyle')&&_0x1921ea['schema']['checkAttribute'](_0x55cfe4,'footnotesListStyle')&&(_0x3af1ec['setAttribute']('footnotesListStyle',_0x3549cc,_0x55cfe4),_0x2ec13d=!0x0));}return _0x2ec13d&&_0x1907db['_updateFootnotesCounters'](_0x3af1ec),_0x2ec13d;});}['_defineFormatter'](){const {editor:_0x618bb8}=this;_0x618bb8['plugins']['get'](c)['setFootnoteFormatter'](_0x26f77e=>this['_formatFootnoteListValue'](_0x26f77e));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x41005a,value:_0x3a633a,digits:_0x2cece0}){const _0x66416c=_0x41005a['getAttribute']('footnotesListStyle'),_0x4e7394=_0x41005a['getAttribute']('footnotesListStart'),_0x303d06=Math['floor'](_0x3a633a)+(_0x4e7394??0x1)-0x1;switch(_0x66416c){case'decimal-leading-zero':return function(_0x4720ad,_0xfe4e2b){return String(_0x4720ad)['padStart'](_0xfe4e2b,'0');}(_0x303d06,Math['max'](0x2,_0x2cece0));case'lower-alpha':case'lower-latin':return N(_0x303d06,!0x1);case'upper-alpha':case'upper-latin':return N(_0x303d06,!0x0);case'lower-roman':return X(_0x303d06,!0x1);case'upper-roman':return X(_0x303d06,!0x0);default:return String(_0x303d06);}}}function M(_0x153fa9,_0x51cacd){const _0x20db70=_0x51cacd['toViewElement'](_0x153fa9);return Array['from'](_0x20db70['getChildren']())['find'](_0x4a0a4f=>_0x4a0a4f['is']('element','ol')&&_0x4a0a4f['hasClass']('footnotes-list'));}function N(_0x475031,_0x38041c){let _0x2e8197='',_0x2a61c1=_0x475031;for(;_0x2a61c1>0x0;){const _0x40887a=(_0x2a61c1-0x1)%0x1a;_0x2e8197=String['fromCharCode'](0x61+_0x40887a)+_0x2e8197,_0x2a61c1=Math['floor']((_0x2a61c1-0x1)/0x1a);}return _0x38041c?_0x2e8197['toUpperCase']():_0x2e8197;}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(_0x2d10e6,_0x5834ef){let _0x29d22b='',_0x3f19a4=_0x2d10e6;for(const {value:_0x57a0ef,numeral:_0x42f407}of V)for(;_0x3f19a4>=_0x57a0ef;)_0x29d22b+=_0x42f407,_0x3f19a4-=_0x57a0ef;return _0x5834ef?_0x29d22b:_0x29d22b['toLowerCase']();}class H extends _0x1f29a4{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new ot();['keystrokes']=new rt();['focusables']=new _0x497dc();['focusCycler'];constructor(_0x52c070,{styleButtonViews:_0x36dde7,styleGridAriaLabel:_0x1cb196}){super(_0x52c070),(this['focusCycler']=new _0x3ace6d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x36dde7,_0x1cb196),[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 _0x5dbc09 of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x5dbc09['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 _0x5f03ea=_0x3d0875=>_0x3d0875['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5f03ea),this['keystrokes']['set']('arrowleft',_0x5f03ea),this['keystrokes']['set']('arrowup',_0x5f03ea),this['keystrokes']['set']('arrowdown',_0x5f03ea);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x431c49,_0x285fa2){const _0x30392d=new _0x1f29a4(this['locale']);return _0x30392d['children']=_0x30392d['createCollection'](),_0x30392d['children']['addMany'](_0x431c49),_0x30392d['setTemplate']({'tag':'div','attributes':{'aria-label':_0x285fa2,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x30392d['children']}),_0x30392d['children']['delegate']('execute')['to'](this),_0x30392d['focus']=function(){for(const _0x5de662 of this['children'])if(_0x5de662 instanceof _0x35adf5&&_0x5de662['isOn'])return void _0x5de662['focus']();this['children']['first']['focus']();},_0x30392d['focusTracker']=new ot(),_0x30392d['keystrokes']=new rt(),_0x30392d['render'](),_0x30392d['keystrokes']['listenTo'](_0x30392d['element']),this['children']['add'](_0x30392d),_0x30392d;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x51da7d=this['_createStartIndexPropertyView'](),_0x5093cc=[_0x51da7d],_0x406d0d=new st(this['locale'],_0x5093cc);return _0x406d0d['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x406d0d['buttonView']['bind']('isEnabled')['toMany'](_0x5093cc,'isEnabled',(..._0x931ec8)=>_0x931ec8['some'](_0x1937b1=>_0x1937b1)),_0x406d0d['buttonView']['on']('change:isEnabled',(_0xe319c7,_0x1b17c0,_0x38f845)=>{_0x38f845||(_0x406d0d['isCollapsed']=!0x0);}),this['children']['add'](_0x406d0d),[_0x51da7d,_0x406d0d];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x115cad=new it(this['locale'],et);return _0x115cad['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x115cad['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x115cad['fieldView']['on']('input',()=>{const _0x297a07=_0x115cad['fieldView']['element'],_0x6c35d6=_0x297a07['valueAsNumber'];Number['isNaN'](_0x6c35d6)?_0x115cad['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x297a07['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x6c35d6}):_0x115cad['errorText']=t(_0x6c35d6<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0x115cad;}}class j extends _0x56a762{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x30e4c4,_0x4f9f42];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4e7d72}=this,{componentFactory:_0x26d242}=_0x4e7d72['ui'];_0x4e7d72['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x26d242['add']('footnotesStyle',function(_0x25d168){return _0x5a3e0d=>{const {t:t}=_0x5a3e0d,_0x1a2650=_0x25d168['commands']['get']('footnotesStyle'),_0x47c8de=_0x49d87f(_0x5a3e0d),{buttonView:_0x2faee6}=_0x47c8de;return _0x47c8de['class']='ck-footnotes-styles-dropdown',_0x47c8de['bind']('isEnabled')['to'](_0x1a2650,'isEnabled'),_0x2faee6['set']({'label':t('Footnotes\x20style'),'icon':_0x4985ca,'tooltip':!0x0}),_0x47c8de['once']('change:isOpen',()=>{const _0x213e09=function({editor:_0x2e11ca,dropdownView:_0x1e3f1e}){const {t:t}=_0x2e11ca['locale'],_0xdcf102=t('Footnotes\x20definitions\x20styles'),_0x3661c1=function(_0xd59ced){const t=_0xd59ced['locale']['t'],_0x134b4d=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x504c91},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x22f7ed},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x3b396a},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x48cf64},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x5efb33},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0xe36eb3}];return _0x134b4d['map'](function(_0x4eec5a){const _0x43294c=_0x4eec5a['locale'];return({label:_0x163012,icon:_0x587623,tooltip:_0x1eb9b7,style:_0x218a2b})=>{const _0x13a84a=_0x4eec5a['commands']['get']('footnotesStyle'),_0x87f95b=new _0x35adf5(_0x43294c);return _0x87f95b['set']({'label':_0x163012,'icon':_0x587623,'tooltip':_0x1eb9b7}),_0x87f95b['bind']('isOn')['to'](_0x13a84a,'value',_0x4b8080=>_0x4b8080===_0x218a2b),_0x87f95b['bind']('isEnabled')['to'](_0x13a84a,'isEnabled'),_0x87f95b['on']('execute',()=>{_0x4eec5a['execute']('footnotesStyle',{'value':_0x218a2b}),_0x4eec5a['editing']['view']['focus']();}),_0x87f95b;};}(_0xd59ced));}(_0x2e11ca),_0x1784a5=new H(_0x2e11ca['locale'],{'styleGridAriaLabel':_0xdcf102,'styleButtonViews':_0x3661c1});return _0x1784a5['delegate']('execute')['to'](_0x1e3f1e),_0x1784a5['on']('footnotesListStart',(_0x2a3fd1,_0x25eb28)=>{_0x2e11ca['execute']('footnotesStart',{'value':_0x25eb28['startIndex']});}),_0x1784a5;}({'editor':_0x25d168,'dropdownView':_0x47c8de});_0x47c8de['panelView']['children']['add'](_0x213e09);}),_0x47c8de;};}(_0x4e7d72));}['afterInit'](){const {editor:_0x20312c}=this,{t:t}=_0x20312c['locale'],_0x194c8e=_0x20312c['plugins']['get'](_0x4f9f42),{defaultPositions:_0x597f21}=_0xa53207;_0x194c8e['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x20312c['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x5b21a7=>{let _0x2f7fbc=_0x5b21a7['getFirstPosition']()?.['parent'];return _0x2f7fbc?.['is']('$text')&&(_0x2f7fbc=_0x2f7fbc['parent']),_0x2f7fbc?.['is']('element')?_0x2f7fbc['findAncestor'](J):null;},'positions':[_0x597f21['southArrowNorth'],_0x597f21['southArrowNorthMiddleWest'],_0x597f21['southArrowNorthMiddleEast'],_0x597f21['southArrowNorthWest'],_0x597f21['southArrowNorthEast'],_0x597f21['northArrowSouth'],_0x597f21['northArrowSouthMiddleWest'],_0x597f21['northArrowSouthMiddleEast'],_0x597f21['northArrowSouthWest'],_0x597f21['northArrowSouthEast'],_0x597f21['viewportStickyNorth']]});}}class ft extends _0x56a762{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,c as FootnotesTracker,i as FootnotesUI,m as InsertFootnoteCommand};
|
|
23
|
+
import{Plugin as _0x443da6,Command as _0x17915a}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x9a8430,isWidget as _0x1a371d,toWidgetEditable as _0x199481,WidgetToolbarRepository as _0x2f9051}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x42f69e,logWarning as _0x4a715e,FocusTracker as ot,KeystrokeHandler as rt,global as nt}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x4ac34b,ClickObserver as _0x224778}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x154cbd}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x34737a,ButtonView as _0x11e055,View as _0x3a588d,ViewCollection as _0x14d98d,FocusCycler as _0x1cda25,addKeyboardHandlingForGrid as tt,CollapsibleView as st,LabeledFieldView as it,createLabeledInputNumber as et,ContextualBalloon as _0x4325bd,BalloonPanelView as _0xd8228c,createDropdown as _0x5c3277}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x5ecb83,IconListStyleDecimal as _0x303f0b,IconListStyleDecimalLeadingZero as _0x4d0348,IconListStyleLowerRoman as _0x4d6aac,IconListStyleUpperRoman as _0x20b737,IconListStyleLowerLatin as _0x855632,IconListStyleUpperLatin as _0x227d9e}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x42933e,_0x3255f7){this['_model']=_0x42933e,this['_elementName']=_0x3255f7['elementName'],this['_getElementKey']=_0x3255f7['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x298662){const _0x14e96f=new Set(),_0x585cd0=new Map();for(const _0x51f631 of _0x298662){if('insert'===_0x51f631['type']&&'$text'!==_0x51f631['name']&&_0x51f631['position']['nodeAfter']){const _0x5c0140=this['_model']['createRangeOn'](_0x51f631['position']['nodeAfter']);for(const _0x449f3b of _0x5c0140['getItems']()){if(!_0x449f3b['is']('element',this['_elementName']))continue;const _0xf5241b=this['_getElementKey'](_0x449f3b);_0x585cd0['has'](_0xf5241b)||_0x585cd0['set'](_0xf5241b,[]),_0x585cd0['get'](_0xf5241b)['push'](_0x449f3b);}}if('remove'===_0x51f631['type']&&_0x51f631['name']===this['_elementName']){const _0x1d5da8=this['_getElementKey']({'getAttribute':_0x26f172=>_0x51f631['attributes']['get'](_0x26f172)});_0x14e96f['add'](_0x1d5da8);}}for(const [_0xc7c42f,_0x264b4d]of this['_trackedElements'])'$graveyard'===_0x264b4d['root']['rootName']&&_0x14e96f['add'](_0xc7c42f);for(const _0x222ced of _0x14e96f)this['_trackedElements']['delete'](_0x222ced);for(const [_0x4eb121,_0x144f5c]of _0x585cd0)this['_trackedElements']['set'](_0x4eb121,_0x144f5c[_0x144f5c['length']-0x1]);const _0x3e799d=new Set();for(const [_0x26871b,_0x3daecb]of _0x585cd0)_0x14e96f['has'](_0x26871b)&&(_0x3e799d['add'](_0x3daecb[0x0]),_0x3daecb['length']>0x1?_0x585cd0['set'](_0x26871b,_0x3daecb['slice'](0x1)):_0x585cd0['delete'](_0x26871b),_0x14e96f['delete'](_0x26871b));return{'removed':Array['from'](_0x14e96f),'inserted':Array['from'](_0x585cd0['values']())['flat'](),'moved':Array['from'](_0x3e799d)};}}class c extends _0x443da6{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47d813){super(_0x47d813),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x55cb53=>_0x55cb53['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x1ff140=>_0x1ff140['getAttribute']('footnoteId')});}['init'](){const {editor:_0x10c623}=this,{model:_0x3644fe,data:_0x4c92f2}=_0x10c623;_0x3644fe['document']['registerPostFixer'](_0x544101=>{const _0x39a185=_0x3644fe['document']['differ']['getChanges']();let _0x3dad15=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x544101,_0x39a185)&&(_0x3dad15=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x544101,_0x39a185)&&(_0x3dad15=!0x0),this['_handleFootnoteReferencesChanges'](_0x544101,_0x39a185)&&(_0x3dad15=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x544101)&&(_0x3dad15=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x544101)&&(_0x3dad15=!0x0),this['_sortFootnoteDefinitions'](_0x544101)&&(_0x3dad15=!0x0),_0x3dad15;}),this['listenTo'](_0x3644fe['document'],'change:data',()=>{_0x3644fe['enqueueChange']({'isUndoable':!0x1},_0x171463=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x171463);});},{'priority':'low'}),this['listenTo'](_0x4c92f2,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x44b792){return this['_footnotes']['find'](_0x338aba=>_0x338aba['id']===_0x44b792)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x35897f){this['_footnoteFormatter']=_0x35897f;}['_updateFootnotesCounters'](_0x1e72d4,_0x2a8221=0x0){let _0x1d7a77=!0x1;for(let _0x5e878d=_0x2a8221;_0x5e878d<this['_footnotes']['length'];_0x5e878d++)this['_updateFootnoteRefCounter'](_0x1e72d4,_0x5e878d)&&(_0x1d7a77=!0x0);return _0x1d7a77;}['_insertEmptyFootnotesDefinitionsContainer'](_0x5ed58f,_0x84931f){const _0x15733e=_0x5ed58f['createElement']('footnotesDefinitions',{});return _0x5ed58f['append'](_0x15733e,_0x84931f),this['_footnotesDefinitions']=_0x15733e,_0x15733e;}['_ensureFootnotesDefinitionsContainerExists'](_0x455a30){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x2f6188=this['_footnotes'][0x0]['reference']['root'],_0x53a010=this['_insertEmptyFootnotesDefinitionsContainer'](_0x455a30,_0x2f6188);for(const _0xfa904f of this['_footnotes'])_0xfa904f['definition']['parent']||_0x455a30['insert'](_0xfa904f['definition'],_0x53a010,'end');this['_updateFootnotesCounters'](_0x455a30);}['_handleFootnotesDefinitionsObjectChanges'](_0x111c1f,_0x3aa13a){let _0x37905f=!0x1;const {inserted:_0x4ebb2d,removed:_0x34988b,moved:_0x3a12b0}=this['_footnoteDefsContainerTracker']['getChanges'](_0x3aa13a);if(_0x3a12b0['length']&&(this['_footnotesDefinitions']=_0x3a12b0[0x0]),_0x4ebb2d['length']){if(_0x4ebb2d['length']>0x1||this['_footnotesDefinitions']&&_0x4ebb2d['some'](_0x5699de=>_0x5699de!==this['_footnotesDefinitions'])){const _0x549fd2=_0x111c1f['createElement']('footnotesDefinitions',{}),_0x4be26f=[];this['_footnotesDefinitions']&&_0x4be26f['push'](this['_footnotesDefinitions']),_0x4be26f['push'](..._0x4ebb2d),_0x111c1f['insert'](_0x549fd2,_0x4be26f[0x0],'before');for(const _0x3299dd of _0x4be26f)_0x111c1f['move'](_0x111c1f['createRangeIn'](_0x3299dd),_0x111c1f['createPositionAt'](_0x549fd2,'end')),_0x111c1f['remove'](_0x3299dd);this['_footnotesDefinitions']=_0x549fd2,this['_updateFootnotesCounters'](_0x111c1f),_0x37905f=!0x0;}else this['_footnotesDefinitions']=_0x4ebb2d[0x0];}if(_0x34988b['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x5421c0 of this['_footnotes'])_0x111c1f['remove'](_0x5421c0['reference']),_0x37905f=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x37905f;}['_handleFootnoteDefinitionsChanges'](_0x84d08b,_0x2faa83){let _0x4136d6=!0x1;const _0x23226b=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x1ed9bb,moved:_0x59bd80}=this['_footnoteDefsTracker']['getChanges'](_0x2faa83);for(const _0x358b05 of[..._0x59bd80,..._0x1ed9bb]){const _0x178c60=_0x358b05['getAttribute']('footnoteId'),_0xc4e8ce=this['getFootnote'](_0x178c60);_0xc4e8ce&&(_0xc4e8ce['definition']=_0x358b05),_(_0x84d08b,_0x23226b,_0x358b05)&&(_0x4136d6=!0x0);}return _0x4136d6;}['_handleFootnoteReferencesChanges'](_0x418ae0,_0x3739d6){let _0xbae766=!0x1;const {removed:_0xcc1752,inserted:_0x2cfbfe,moved:_0x285134}=this['_footnoteRefsTracker']['getChanges'](_0x3739d6);for(const _0x35c9fb of _0xcc1752)this['_handleRemoveFootnoteReferenceById'](_0x418ae0,_0x35c9fb)&&(_0xbae766=!0x0);for(const _0x442858 of _0x2cfbfe)this['_handleInsertedFootnoteReference'](_0x418ae0,_0x442858)&&(_0xbae766=!0x0);for(const _0x2de16e of _0x285134)this['_handleMovedFootnoteReference'](_0x418ae0,_0x2de16e)&&(_0xbae766=!0x0);return _0xbae766;}['_handleFootnotesDefinitionsObjectSync'](_0x40acc6){if(!this['_footnotesDefinitions'])return!0x1;let _0x351e29=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x2855d2=[];for(const _0x175b95 of this['_footnotesDefinitions']['getChildren']()){const _0x49034b=_0x175b95['getAttribute']('footnoteId');this['getFootnote'](_0x49034b)||(_0x2855d2['unshift'](_0x175b95),_0x351e29=!0x0);}for(const _0x232604 of _0x2855d2)_0x40acc6['remove'](_0x232604);}const _0xb95fc8=new Set(),_0x359077=[];for(const _0x1180f6 of this['_footnotesDefinitions']['getChildren']()){const _0x742686=_0x1180f6['getAttribute']('footnoteId');_0xb95fc8['has'](_0x742686)?(_0x359077['unshift'](_0x1180f6),_0x351e29=!0x0):_0xb95fc8['add'](_0x742686);}for(const _0x140418 of _0x359077)_0x40acc6['remove'](_0x140418);return this['_footnotesDefinitions']['childCount']||(_0x40acc6['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x351e29=!0x0),_0x351e29;}['_handleInsertedFootnoteReference'](_0x3add67,_0x35faee){if(this['_footnotes']['find'](_0x25d2a3=>_0x25d2a3['reference']===_0x35faee))return!0x1;let _0x21218e=!0x1;const _0x2820d9=_0x35faee['getAttribute']('footnoteId'),_0x506c3f=this['_footnotes']['findIndex'](_0x4b33ac=>_0x4b33ac['id']===_0x2820d9);-0x1!==_0x506c3f&&(_0x3add67['remove'](this['_footnotes'][_0x506c3f]['reference']),this['_footnotes']['splice'](_0x506c3f,0x1),_0x21218e=!0x0);let _0x1ee316=this['_footnotesDefinitions']?function(_0x52c81b,_0x20679a){for(const _0x1c535b of _0x52c81b['getChildren']())if(_0x1c535b['getAttribute']('footnoteId')===_0x20679a)return _0x1c535b;return null;}(this['_footnotesDefinitions'],_0x2820d9):null;_0x1ee316||(_0x1ee316=_0x3add67['createElement']('footnoteDefinition',{'footnoteId':_0x2820d9}),this['_footnotesDefinitions']&&(_0x3add67['insert'](_0x1ee316,this['_footnotesDefinitions'],'end'),_0x21218e=!0x0));const _0x44e3c1={'id':_0x2820d9,'reference':_0x35faee,'definition':_0x1ee316},_0x5c4cf5=I(this['editor']['model'],this['_footnotes'],_0x35faee);this['_footnotes']['splice'](_0x5c4cf5,0x0,_0x44e3c1);let _0x51d204=_0x5c4cf5;return-0x1!==_0x506c3f&&(_0x51d204=Math['min'](_0x5c4cf5,_0x506c3f)),this['_updateFootnotesCounters'](_0x3add67,_0x51d204)&&(_0x21218e=!0x0),_0x21218e;}['_handleRemoveFootnoteReferenceById'](_0x1e1eef,_0x4bff87){const _0x5f5769=this['_footnotes']['findIndex'](_0x58289d=>_0x58289d['id']===_0x4bff87);if(-0x1===_0x5f5769)return!0x1;let _0x28fb4b=!0x1;const _0x4abdc1=this['_footnotes'][_0x5f5769];return'$graveyard'!==_0x4abdc1['definition']['root']['rootName']&&(_0x1e1eef['remove'](_0x4abdc1['definition']),_0x28fb4b=!0x0),this['_footnotes']['splice'](_0x5f5769,0x1),this['_updateFootnotesCounters'](_0x1e1eef,_0x5f5769)&&(_0x28fb4b=!0x0),_0x28fb4b;}['_handleMovedFootnoteReference'](_0x24ebaf,_0x467563){const _0x29252b=_0x467563['getAttribute']('footnoteId'),_0x4cccc3=this['_footnotes']['findIndex'](_0x298132=>_0x298132['id']===_0x29252b),_0x54a9ef=this['_footnotes'][_0x4cccc3];let _0x2aa06b=!0x1;_0x54a9ef['reference']=_0x467563,this['_footnotes']['splice'](_0x4cccc3,0x1);const _0x4ab9b9=I(this['editor']['model'],this['_footnotes'],_0x467563);return this['_footnotes']['splice'](_0x4ab9b9,0x0,_0x54a9ef),this['_updateFootnotesCounters'](_0x24ebaf,Math['min'](_0x4cccc3,_0x4ab9b9))&&(_0x2aa06b=!0x0),_0x2aa06b;}['_updateFootnoteRefCounter'](_0x18f1e4,_0x42876d){if(!this['_footnotesDefinitions'])return!0x1;const _0x335fba=this['_footnotes'][_0x42876d];let _0x3b34d3;return _0x3b34d3=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x335fba,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x42876d+0x1}):String(_0x42876d+0x1),_0x335fba['reference']['getAttribute']('footnoteCounter')!=_0x3b34d3&&(_0x18f1e4['setAttribute']('footnoteCounter',_0x3b34d3,_0x335fba['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x2f5e99){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x180060,_0x3b6340){if(_0x180060['length']!==_0x3b6340['length'])return!0x1;for(let _0xfd7c9a=0x0;_0xfd7c9a<_0x180060['length'];_0xfd7c9a++)if(_0x180060[_0xfd7c9a]!==_0x3b6340[_0xfd7c9a])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x147440=>_0x147440['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x18a8c0=>_0x18a8c0['getAttribute']('footnoteId'))))return!0x1;let _0x4c5465=!0x1;for(let _0x24f21d=0x0;_0x24f21d<this['_footnotes']['length'];_0x24f21d++){const _0x17c093=this['_footnotes'][_0x24f21d],_0x37bf3d=_0x2f5e99['createPositionBefore'](_0x17c093['definition']),_0x3758ca=_0x2f5e99['createPositionAt'](this['_footnotesDefinitions'],_0x24f21d);_0x37bf3d['isEqual'](_0x3758ca)||(_0x2f5e99['move'](_0x2f5e99['createRangeOn'](_0x17c093['definition']),_0x3758ca),_0x4c5465=!0x0);}return _0x4c5465;}['_ensureFootnotesReferencesHaveProperOrder'](_0x2f4892){if(!this['_footnotes']['length'])return!0x1;const {model:_0x1db1d4}=this['editor'];let _0x10ed75=!0x1;for(let _0x2de438=0x0;_0x2de438<this['_footnotes']['length']-0x1;_0x2de438++){const _0x31acbd=this['_footnotes'][_0x2de438],_0x48ce11=this['_footnotes'][_0x2de438+0x1],_0x584c7d=_0x1db1d4['createPositionBefore'](_0x31acbd['reference']),_0x4a68b0=_0x1db1d4['createPositionBefore'](_0x48ce11['reference']);'after'===_0x584c7d['compareWith'](_0x4a68b0)&&(this['_handleMovedFootnoteReference'](_0x2f4892,_0x31acbd['reference']),_0x2de438=-0x1,_0x10ed75=!0x0);}return _0x10ed75;}}function _(_0x144567,_0x5a9823,_0x175ab0){if(_0x175ab0['childCount'])return!0x1;const _0x2155ab=_0x5a9823?'paragraph':'footnoteInlineContent';return _0x144567['insert'](_0x144567['createElement'](_0x2155ab),_0x175ab0),!0x0;}function I(_0xd07b22,_0x53c594,_0x3cb535){if(0x0===_0x53c594['length'])return 0x0;const _0x3c5caa=_0xd07b22['createPositionBefore'](_0x3cb535);for(let _0x4c3993=0x0;_0x4c3993<_0x53c594['length'];_0x4c3993++){const _0x497233=_0x53c594[_0x4c3993],_0x5aa1a5=_0xd07b22['createPositionBefore'](_0x497233['reference']);if('before'===_0x3c5caa['compareWith'](_0x5aa1a5))return _0x4c3993;}const _0x5cd17b=_0x3cb535['root'];let _0x202892=-0x1;for(let _0x1ea82e=_0x53c594['length']-0x1;_0x1ea82e>=0x0;_0x1ea82e--)if(_0x53c594[_0x1ea82e]['reference']['root']===_0x5cd17b){_0x202892=_0x1ea82e;break;}if(-0x1!==_0x202892)return _0x202892+0x1;const _0x1eb78d=_0xd07b22['document']['getRootNames'](),_0x5d5ef2=_0x1eb78d['indexOf'](_0x5cd17b['rootName']),_0x157f2f=_0x1eb78d[_0x5d5ef2+0x1];if(_0x157f2f){for(let _0x8b976d=0x0;_0x8b976d<_0x53c594['length'];_0x8b976d++)if(_0x53c594[_0x8b976d]['reference']['root']['rootName']===_0x157f2f)return _0x8b976d;}return _0x53c594['length'];}class m extends _0x17915a{['refresh'](){const _0xe90f30=this['editor']['model']['document']['selection'],_0x228d8f=this['_getPositionToInsertFootnote'](_0xe90f30);this['isEnabled']=!!_0x228d8f;}['execute'](_0x2cec43){const {editor:_0x5b19f5}=this,{model:_0x1b05c1}=_0x5b19f5,{selection:_0x2d9de1}=_0x1b05c1['document'],_0x13d286=this['_getPositionToInsertFootnote'](_0x2d9de1);if(!_0x13d286)return;const _0x4eb554=_0x5b19f5['plugins']['get']('FootnotesEditing'),_0x4bc6a1=_0x2cec43?.['footnoteId']??_0x42f69e();!function(_0x188856){return'string'==typeof _0x188856&&_0x188856['length']>0x0&&!/\s/['test'](_0x188856)&&!/^\d/['test'](_0x188856);}(_0x4bc6a1)?_0x4a715e('insert-footnote-command-executed-with-invalid-id'):(_0x1b05c1['change'](_0x59eb31=>{const _0xf7db71=_0x59eb31['createElement']('footnoteRef',{'footnoteId':_0x4bc6a1});_0x1b05c1['insertObject'](_0xf7db71,_0x13d286,null);}),_0x4eb554['_moveSelectionToFootnoteDefinition'](_0x4bc6a1));}['_getPositionToInsertFootnote'](_0x1f1ed0){const {model:_0x3248a2}=this['editor'],{schema:_0x15230a}=_0x3248a2,_0x14577d=_0x1f1ed0['getFirstRange']();for(const _0x179213 of _0x14577d['getItems']())if(_0x15230a['isBlock'](_0x179213)||_0x15230a['isObject'](_0x179213))return null;const _0x1529db=_0x14577d['end'];return _0x15230a['checkChild'](_0x1529db,'footnoteRef')?_0x1529db:null;}}class r extends _0x443da6{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3dc543}=this;_0x3dc543['config']['define']('footnotes.multiBlock',!0x0),_0x3dc543['commands']['add']('insertFootnote',new m(_0x3dc543)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x18248c){const _0xa894f4=_0x196052([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]),_0x47d899=0x47a28506,_0x568039=0x47a5f2f6^_0x47d899,_0x231507=window[_0x196052([0x44,0x61,0x74,0x65])][_0x196052([0x6e,0x6f,0x77])](),_0x3ba9f6=_0x18248c[_0x196052([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2a4462=new window[(_0x196052([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x310e07=>{_0x3ba9f6[_0x196052([0x6f,0x6e,0x63,0x65])](_0x196052([0x72,0x65,0x61,0x64,0x79]),_0x310e07);}),_0x2e7ecc={[_0x196052([0x6b,0x74,0x79])]:_0x196052([0x45,0x43]),[_0x196052([0x75,0x73,0x65])]:_0x196052([0x73,0x69,0x67]),[_0x196052([0x63,0x72,0x76])]:_0x196052([0x50,0x2d,0x32,0x35,0x36]),[_0x196052([0x78])]:_0x196052([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]),[_0x196052([0x79])]:_0x196052([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]),[_0x196052([0x61,0x6c,0x67])]:_0x196052([0x45,0x53,0x32,0x35,0x36])},_0x331146=_0x3ba9f6[_0x196052([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x196052([0x67,0x65,0x74])](_0x196052([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x377311(){let _0x59e83b,_0x3f56b1=null,_0x38836b=null;try{if(_0x331146==_0x196052([0x47,0x50,0x4c]))return _0x196052([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x59e83b=_0x4a1199(),!_0x59e83b)return _0x196052([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x59e83b[_0x196052([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x38836b=_0x33bfff(_0x59e83b[_0x196052([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x59e83b[_0x196052([0x6a,0x74,0x69])])),await _0x2e52db()?_0x59053b()?_0x774d4c()?_0x196052([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1e6132()?(_0x59e83b[_0x196052([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x196052([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3f56b1=_0x339fec(_0x196052([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x59e83b[_0x196052([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x196052([0x74,0x72,0x69,0x61,0x6c])&&(_0x3f56b1=_0x339fec(_0x196052([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x438a2c()):_0x196052([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x196052([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x196052([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x196052([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x774d4c(){const _0x599f07=[_0x196052([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x196052([0x74,0x72,0x69,0x61,0x6c])][_0x196052([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59e83b[_0x196052([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x231507/0x3e8:0xe10*_0x568039;return _0x59e83b[_0x196052([0x65,0x78,0x70])]<_0x599f07;}function _0x59053b(){const _0x33e405=_0x59e83b[_0x196052([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x33e405&&(!!_0x33e405[_0x196052([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x196052([0x2a]))||!!_0x33e405[_0x196052([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x196052([0x46,0x4f,0x4f])));}function _0x1e6132(){const _0x7b608f=_0x59e83b[_0x196052([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x7b608f||0x0==_0x7b608f[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5c9aff}=new URL(window[_0x196052([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x7b608f[_0x196052([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c9aff))return!0x0;const _0x565e65=_0x5c9aff[_0x196052([0x73,0x70,0x6c,0x69,0x74])](_0x196052([0x2e]));return _0x7b608f[_0x196052([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3aab55=>_0x3aab55[_0x196052([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x196052([0x2a])))[_0x196052([0x6d,0x61,0x70])](_0x9f384a=>_0x9f384a[_0x196052([0x73,0x70,0x6c,0x69,0x74])](_0x196052([0x2e])))[_0x196052([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x516dc7=>_0x516dc7[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x565e65[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x196052([0x6d,0x61,0x70])](_0x5121b1=>Array(_0x565e65[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5121b1[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x196052([0x66,0x69,0x6c,0x6c])](_0x5121b1[0x0]===_0x196052([0x2a])?_0x196052([0x2a]):'')[_0x196052([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5121b1))[_0x196052([0x73,0x6f,0x6d,0x65])](_0x1c6061=>_0x565e65[_0x196052([0x65,0x76,0x65,0x72,0x79])]((_0x33b74b,_0x7ac8de)=>_0x1c6061[_0x7ac8de]===_0x33b74b||_0x1c6061[_0x7ac8de]===_0x196052([0x2a])));}function _0x438a2c(){return _0x3f56b1&&_0x38836b?new window[(_0x196052([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x543e9c,_0x3743ea)=>{_0x3f56b1[_0x196052([0x74,0x68,0x65,0x6e])](_0x543e9c,_0x3743ea),_0x38836b[_0x196052([0x74,0x68,0x65,0x6e])](_0x5c2b36=>{_0x5c2b36!=_0x196052([0x56,0x61,0x6c,0x69,0x64])&&_0x543e9c(_0x5c2b36);},_0x3743ea);}):_0x3f56b1||_0x38836b||_0x196052([0x56,0x61,0x6c,0x69,0x64]);}}function _0x33bfff(_0x5d4488,_0x111410){return new window[(_0x196052([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x65bc82=>{if(_0x22435f())return _0x65bc82(_0x196052([0x56,0x61,0x6c,0x69,0x64]));_0x4799c4(),_0x3ba9f6[_0x196052([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x196052([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xee7471=!0x1;const _0x49a06f=_0x42f69e();function _0x49b033(_0x103fdb){return!!_0x103fdb&&(typeof _0x103fdb===_0x196052([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x103fdb===_0x196052([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x103fdb[_0x196052([0x74,0x68,0x65,0x6e])]===_0x196052([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x103fdb[_0x196052([0x63,0x61,0x74,0x63,0x68])]===_0x196052([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2610de(_0x210339){_0x14d6b9(_0x210339)[_0x196052([0x74,0x68,0x65,0x6e])](_0x1120d4=>{if(!_0x1120d4||_0x1120d4[_0x196052([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x196052([0x6f,0x6b]))return _0x196052([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2120fc(_0x7fa0bb(_0x49a06f+_0x111410))!=_0x1120d4[_0x196052([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x196052([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x196052([0x56,0x61,0x6c,0x69,0x64]);})[_0x196052([0x74,0x68,0x65,0x6e])](_0x1f033b=>(_0x188ee6(),_0x1f033b),()=>{const _0x369177=_0x9faa0e();return null==_0x369177?(_0x188ee6(),_0x196052([0x56,0x61,0x6c,0x69,0x64])):_0x196052(_0x231507-_0x369177>(0x63ae0106^_0x47d899)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x196052([0x74,0x68,0x65,0x6e])](_0x65bc82)[_0x196052([0x63,0x61,0x74,0x63,0x68])](()=>{_0x65bc82(_0x196052([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x48a172=0x47946b86^_0x47d899;function _0x188ee6(){const _0x35bbe7=_0x196052([0x6c,0x6c,0x63,0x74,0x2d])+_0x2120fc(_0x7fa0bb(_0x5d4488)),_0x4d8be2=_0x260451(_0x2120fc(window[_0x196052([0x4d,0x61,0x74,0x68])][_0x196052([0x63,0x65,0x69,0x6c])](_0x231507/_0x48a172)));window[_0x196052([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x196052([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35bbe7,_0x4d8be2);}function _0x9faa0e(){const _0x2d4e75=_0x196052([0x6c,0x6c,0x63,0x74,0x2d])+_0x2120fc(_0x7fa0bb(_0x5d4488)),_0x452a21=window[_0x196052([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x196052([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2d4e75);return _0x452a21?window[_0x196052([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x260451(_0x452a21),0x10)*_0x48a172:null;}function _0x14d6b9(_0x593542){return new window[(_0x196052([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x51e6cd,_0x24f997)=>{_0x593542[_0x196052([0x74,0x68,0x65,0x6e])](_0x51e6cd,_0x24f997),window[_0x196052([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x24f997,0x47a351c6^_0x47d899);});}}_0x3ba9f6[_0x196052([0x6f,0x6e])](_0x196052([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3508ed,_0x554cd1)=>{if(_0x554cd1[0x0]!=_0x5d4488)return _0x65bc82(_0x196052([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x554cd1[0x1]={..._0x554cd1[0x1],[_0x196052([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x49a06f};},{[_0x196052([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x196052([0x68,0x69,0x67,0x68])}),_0x3ba9f6[_0x196052([0x6f,0x6e])](_0x196052([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x55e994=>{_0x49b033(_0x55e994[_0x196052([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xee7471=!0x0,_0x2610de(_0x55e994[_0x196052([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x196052([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x196052([0x6c,0x6f,0x77])}),_0x2a4462[_0x196052([0x74,0x68,0x65,0x6e])](()=>{_0xee7471||_0x65bc82(_0x196052([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x22435f(){return _0x3ba9f6[_0x196052([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x196052([0x76,0x69,0x65,0x77])][_0x196052([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x196052([0x61,0x75,0x74,0x6f]);}function _0x4799c4(){_0x3ba9f6[_0x196052([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x196052([0x76,0x69,0x65,0x77])][_0x196052([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x196052([0x61,0x75,0x74,0x6f]);}}function _0x339fec(_0x428e5f){const _0x2e6b54=[new window[(_0x196052([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55745c=>setTimeout(_0x55745c,0x47abbbca^_0x47d899)),_0x2a4462[_0x196052([0x74,0x68,0x65,0x6e])](()=>new window[(_0x196052([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a5032=>{let _0x2ea0a9=0x0;_0x3ba9f6[_0x196052([0x6d,0x6f,0x64,0x65,0x6c])][_0x196052([0x6f,0x6e])](_0x196052([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x50dfe5,_0x258c03)=>{_0x258c03[0x0][_0x196052([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2ea0a9++,_0x2ea0a9==(0x47a284fe^_0x47d899)&&(_0x2a5032(),_0x50dfe5[_0x196052([0x6f,0x66,0x66])]());});}))];return window[_0x196052([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x196052([0x72,0x61,0x63,0x65])](_0x2e6b54)[_0x196052([0x74,0x68,0x65,0x6e])](()=>_0x428e5f);}async function _0x2251ec(){await _0x2a4462,_0x3ba9f6[_0x196052([0x6d,0x6f,0x64,0x65,0x6c])][_0x196052([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2645b2,_0x3ba9f6[_0x196052([0x6d,0x6f,0x64,0x65,0x6c])][_0x196052([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2645b2,_0x3ba9f6[_0x196052([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x196052([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xd181b8(_0x4d8ea9){const _0x40069a=_0x31d03a();_0x3ba9f6[_0x40069a]=_0x196052([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4d8ea9,_0x4d8ea9!=_0x196052([0x56,0x61,0x6c,0x69,0x64])&&_0x2251ec();}function _0x31d03a(){const _0x1c4c75=window[_0x196052([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x196052([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x196052([0x6e,0x6f,0x77])]())[_0x196052([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x196052([0x2e]),'');let _0x23f556=_0x196052([0x75]);for(let _0x5ed8f4=0x0;_0x5ed8f4<_0x1c4c75[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5ed8f4+=0x2){let _0x3faa27=window[_0x196052([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1c4c75[_0x196052([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5ed8f4,_0x5ed8f4+0x2));_0x3faa27>=_0xa894f4[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3faa27-=_0xa894f4[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x23f556+=_0xa894f4[_0x3faa27];}return _0x23f556;}function _0x4a1199(){const _0x3994b1=_0x331146[_0x196052([0x73,0x70,0x6c,0x69,0x74])](_0x196052([0x2e]));if(0x3!=_0x3994b1[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xda765c(_0x3994b1[0x1]);function _0xda765c(_0xbdb6d4){const _0x1203cb=_0x474c14(_0xbdb6d4);return _0x1203cb&&_0x2e0822()?_0x1203cb:null;function _0x2e0822(){const _0x49e0cf=_0x1203cb[_0x196052([0x6a,0x74,0x69])],_0x2878fa=window[_0x196052([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x49e0cf[_0x196052([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x49e0cf[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x52f443={..._0x1203cb,[_0x196052([0x6a,0x74,0x69])]:_0x49e0cf[_0x196052([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x49e0cf[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x52f443[_0x196052([0x76,0x63])],_0x7fa0bb(_0x52f443)==_0x2878fa;}}}async function _0x2e52db(){let _0x3c057f=!0x0;try{const _0x26fe22=_0x331146[_0x196052([0x73,0x70,0x6c,0x69,0x74])](_0x196052([0x2e])),[_0x41800b,_0x5e9137,_0x37650f]=_0x26fe22;return _0xa8b471(_0x41800b),await _0xab0502(_0x41800b,_0x5e9137,_0x37650f),_0x3c057f;}catch{return!0x1;}function _0xa8b471(_0x17d424){const _0x4264c1=_0x474c14(_0x17d424);_0x4264c1&&_0x4264c1[_0x196052([0x61,0x6c,0x67])]==_0x196052([0x45,0x53,0x32,0x35,0x36])||(_0x3c057f=!0x1);}async function _0xab0502(_0x17ce1a,_0x52673f,_0x2f99cf){const _0x33639d=window[_0x196052([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x196052([0x66,0x72,0x6f,0x6d])](_0x37e847(_0x2f99cf),_0x30075e=>_0x30075e[_0x196052([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1017a3=new window[(_0x196052([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x196052([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x17ce1a+_0x196052([0x2e])+_0x52673f),_0x15b386=window[_0x196052([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x196052([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x15b386)return;const _0x23602a=await _0x15b386[_0x196052([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x196052([0x6a,0x77,0x6b]),_0x2e7ecc,{[_0x196052([0x6e,0x61,0x6d,0x65])]:_0x196052([0x45,0x43,0x44,0x53,0x41]),[_0x196052([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x196052([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x196052([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x15b386[_0x196052([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x196052([0x6e,0x61,0x6d,0x65])]:_0x196052([0x45,0x43,0x44,0x53,0x41]),[_0x196052([0x68,0x61,0x73,0x68])]:{[_0x196052([0x6e,0x61,0x6d,0x65])]:_0x196052([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x23602a,_0x33639d,_0x1017a3)||(_0x3c057f=!0x1);}}function _0x474c14(_0x353127){return _0x353127[_0x196052([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x196052([0x65,0x79]))?JSON[_0x196052([0x70,0x61,0x72,0x73,0x65])](_0x37e847(_0x353127)):null;}function _0x37e847(_0x4ec0d9){return window[_0x196052([0x61,0x74,0x6f,0x62])](_0x4ec0d9[_0x196052([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x196052([0x2b]))[_0x196052([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x196052([0x2f])));}function _0x7fa0bb(_0x383a34){let _0x49cbe5=0x1505;function _0x1179be(_0x4f454d){for(let _0x21f34b=0x0;_0x21f34b<_0x4f454d[_0x196052([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x21f34b++){const _0x5c48c0=_0x4f454d[_0x196052([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x21f34b);_0x49cbe5=(_0x49cbe5<<0x5)+_0x49cbe5+_0x5c48c0,_0x49cbe5&=_0x49cbe5;}}function _0x3f0b92(_0x55851a){Array[_0x196052([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x55851a)?_0x55851a[_0x196052([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3f0b92):_0x55851a&&typeof _0x55851a==_0x196052([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x196052([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x55851a)[_0x196052([0x73,0x6f,0x72,0x74])]()[_0x196052([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xbc6793,_0x1a47fa])=>{_0x1179be(_0xbc6793),_0x3f0b92(_0x1a47fa);}):_0x1179be(window[_0x196052([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x55851a));}return _0x3f0b92(_0x383a34),_0x49cbe5>>>0x0;}function _0x2120fc(_0x42961d){return _0x42961d[_0x196052([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x196052([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x196052([0x30]));}function _0x260451(_0x3b3928){return _0x3b3928[_0x196052([0x73,0x70,0x6c,0x69,0x74])]('')[_0x196052([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x196052([0x6a,0x6f,0x69,0x6e])]('');}function _0x2645b2(){}function _0x196052(_0x499024){return _0x499024['map'](_0x5534ca=>String['fromCharCode'](_0x5534ca))['join']('');}_0xd181b8(await _0x377311());}(this);}['_moveSelectionToFootnoteDefinition'](_0x25c4d5){const {plugins:_0x457297,editing:_0x2db2df,model:_0x156cf}=this['editor'],_0x29cf6d=_0x457297['get'](c)['getFootnote'](_0x25c4d5);return!!_0x29cf6d&&(_0x156cf['change'](_0x404b18=>{_0x404b18['setSelection'](_0x404b18['createPositionAt'](_0x29cf6d['definition'],'end'));}),_0x2db2df['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x219d74){const {plugins:_0x6be278,editing:_0x33db75,model:_0x55bc52}=this['editor'],_0x135297=_0x6be278['get'](c)['getFootnote'](_0x219d74);return!!_0x135297&&(_0x55bc52['change'](_0x3b2f76=>{_0x3b2f76['setSelection'](_0x135297['reference'],'on');}),_0x33db75['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x45d143}=this['editor']['model'],_0x1a2116=this['editor']['config']['get']('footnotes.multiBlock');_0x45d143['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x45d143['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x45d143['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x1a2116?_0x45d143['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x45d143['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x45d143['addChildCheck'](_0x5a711a=>{for(const _0x582ff9 of _0x5a711a)if('footnoteDefinition'===_0x582ff9['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x785a05}=this,{conversion:_0x3939ca,editing:_0x1fc7ee}=_0x785a05,{t:t}=_0x785a05['locale'];_0x3939ca['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x35d6ef,{writer:_0x52beb4,consumable:_0x32ea7d})=>{const _0x1a7c85=_0x35d6ef['getChild'](0x0);if(!_0x1a7c85||!_0x1a7c85['is']('element','a'))return null;const _0x6f9df5=_0x1a7c85['getAttribute']('href')||'';if(!_0x6f9df5['startsWith']('#'))return null;const _0x2a8565=_0x6f9df5['replace'](/^#/,'');if(!_0x2a8565)return null;_0x32ea7d['consume'](_0x1a7c85,{'name':!0x0,'attributes':['href']});for(const {item:_0x288f0c}of _0x1fc7ee['view']['createRangeIn'](_0x1a7c85))_0x288f0c['is']('$textProxy')?_0x32ea7d['consume'](_0x288f0c['textNode'],{'name':!0x0}):_0x288f0c['is']('element')&&_0x32ea7d['consume'](_0x288f0c,{'name':!0x0});return _0x52beb4['createElement']('footnoteRef',{'footnoteId':_0x2a8565});}}),_0x3939ca['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x17f090,{writer:_0x4dacfb})=>D(_0x17f090,_0x4dacfb)}),_0x3939ca['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x102c2e,{writer:_0x46998e})=>{const _0x30ba27=_0x102c2e['getAttribute']('footnoteCounter');return _0x9a8430(D(_0x102c2e,_0x46998e),_0x46998e,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x30ba27)});}});}['_defineDefinitionsConverters'](){const {editor:_0x3c2d93}=this,{t:t}=_0x3c2d93['locale'],{conversion:_0x1ac56b}=_0x3c2d93;_0x1ac56b['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x1ac56b['for']('upcast')['add'](_0x274289=>{_0x274289['on']('element:ol',(_0x340e3f,_0x3db5fe,_0x3fae8d)=>{const _0x1d28f3=_0x3db5fe['viewItem'];if(!_0x1d28f3['hasClass']('footnotes-list')||!_0x3db5fe['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x3fae8d['consumable']['consume'](_0x1d28f3,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x449ab6,modelCursor:_0xb4c18b}=_0x3fae8d['convertChildren'](_0x3db5fe['viewItem'],_0x3db5fe['modelCursor']);_0x3db5fe['modelRange']=_0x449ab6,_0x3db5fe['modelCursor']=_0xb4c18b;}),_0x274289['on']('element:hr',(_0x3d6155,_0x5832d7,_0x2b2f69)=>{const _0x548c54=_0x5832d7['viewItem'];_0x548c54['hasClass']('footnotes-divider')&&_0x5832d7['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x2b2f69['consumable']['consume'](_0x548c54,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x1ac56b['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x32aeea,{writer:_0xb8cc60})=>v(_0xb8cc60)}),_0x1ac56b['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x391d10,{writer:_0x3d2609})=>{const _0x397b5e=v(_0x3d2609,{'data-footnotes-list-label':t('Footnotes')}),_0x36d913=_0x9a8430(_0x397b5e,_0x3d2609,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x3d2609['setCustomProperty']('footnotesDefinitions',!0x0,_0x36d913),_0x36d913;}});}['_defineDefinitionConverters'](){const {editor:_0x3deb1a}=this,{conversion:_0x2511c4,locale:_0x4d72e8}=_0x3deb1a,_0x28d9a8=_0x3deb1a['config']['get']('footnotes.multiBlock');_0x2511c4['for']('upcast')['add'](_0x2d4ffb=>{_0x2d4ffb['on']('element:li',(_0x5c04af,_0x1abf18,_0x1124df)=>{const _0x124724=_0x1abf18['viewItem'];if(!_0x124724['hasClass']('footnote-definition')||!_0x124724['getAttribute']('id'))return;const _0x2688b7=_0x124724['parent'];if(!_0x2688b7['is']('element','ol')||!_0x2688b7['hasClass']('footnotes-list'))return;if(!_0x1124df['consumable']['test'](_0x124724,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0xe7fc07=_0x1124df['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x124724['getAttribute']('id')});if(!_0x1124df['safeInsert'](_0xe7fc07,_0x1abf18['modelCursor']))return;_0x1124df['consumable']['consume'](_0x124724,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x35fc44=Array['from'](_0x124724['getChildren']())['find'](_0x402e02=>_0x402e02['is']('element')&&_0x402e02['hasClass']('footnote-content'));for(const _0x52f9f0 of _0x124724['getChildren']())_0x52f9f0['is']('element')&&(_0x1124df['consumable']['consume'](_0x52f9f0,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x1124df['consumable']['consume'](_0x52f9f0,{'name':!0x0,'classes':'footnote-content'}));if(_0x35fc44){if(_0x28d9a8)_0x1124df['convertChildren'](_0x35fc44,_0xe7fc07);else{const _0x1de48a=_0x1124df['writer']['createElement']('footnoteInlineContent');_0x1124df['writer']['insert'](_0x1de48a,_0xe7fc07),_0x1124df['convertChildren'](_0x35fc44,_0x1de48a);}}_0x1124df['updateConversionResult'](_0xe7fc07,_0x1abf18);});}),_0x2511c4['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x47f512,{writer:_0x3e73e9})=>b(_0x47f512,_0x3e73e9,_0x4d72e8,{'dataPipeline':!0x0})}),_0x2511c4['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x1255d4,{writer:_0x23fe93})=>b(_0x1255d4,_0x23fe93,_0x4d72e8)});}['_defineBogusParagraphConverters'](){const {editor:_0x5698f7}=this,{conversion:_0x357e19}=_0x5698f7;_0x5698f7['config']['get']('footnotes.multiBlock')?(_0x357e19['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':h(),'converterPriority':'high'}),_0x357e19['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':h({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x5698f7['model']['document'],'change:data',()=>{!function(_0x4d076b,_0x4d9b19){const _0x20411d=_0x4d076b['document']['differ'],_0x1d832a=new Set();for(const _0x560fef of _0x20411d['getChanges']()){const _0x228b54='attribute'==_0x560fef['type']?_0x560fef['range']['start']['parent']:_0x560fef['position']['parent'];_0x228b54['is']('element','footnoteDefinition')&&_0x1d832a['add'](_0x228b54);}for(const _0x33544f of _0x1d832a['values']()){const _0xf18c0f=Array['from'](_0x33544f['getChildren']())['filter'](_0x520881=>g(_0x520881,_0x4d9b19['mapper']));for(const _0x4b06c3 of _0xf18c0f)_0x4d9b19['reconvertItem'](_0x4b06c3);}}(_0x5698f7['model'],_0x5698f7['editing']);})):(_0x357e19['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':h()}),_0x357e19['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x1a2cc9,{writer:_0x2130b5})=>{const _0xa2f355=_0x2130b5['createContainerElement']('span');return _0x2130b5['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0xa2f355),_0xa2f355;}}));}['_defineKeyboardHandlers'](){const {editor:_0x40dcc6}=this,{editing:_0x282086,t:t}=_0x40dcc6,_0x1ff6b5=_0x40dcc6['model']['document']['selection'];_0x40dcc6['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0x40dcc6['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0x282086['view']['document'],'enter',(_0x16c508,_0x3a0b26)=>{const _0x1415fe=function(_0x17d945){const _0x67e802=_0x17d945['getSelectedElement']();if(_0x67e802?.['is']('element','footnoteRef'))return _0x67e802;return null;}(_0x1ff6b5);if(_0x1415fe){const _0x4e2376=_0x1415fe['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x4e2376),_0x3a0b26['preventDefault'](),_0x16c508['stop']();}},{'context':_0x1a371d});}['_defineClickHandlers'](){const {editor:_0x3472fa}=this,{editing:_0x1d5d43}=_0x3472fa;_0x3472fa['editing']['view']['addObserver'](_0x4ac34b),_0x3472fa['editing']['view']['addObserver'](_0x224778);let _0x3d9e61=!0x1;this['listenTo'](_0x1d5d43['view']['document'],'pointerdown',(_0x373139,_0x2ba159)=>{const {target:_0x14c258}=_0x2ba159,_0x76b0e7=_0x1d5d43['view']['document']['selection'];_0x3d9e61=!!(_0x14c258?.['is']('element','a')&&_0x14c258['parent']?.['is']('element','sup')&&_0x14c258['parent']['hasClass']('footnote'))&&_0x76b0e7['getSelectedElement']()===_0x14c258['parent'];},{'priority':'high'}),this['listenTo'](_0x1d5d43['view']['document'],'click',(_0x2ee4,_0x51b253)=>{const {target:_0x4879ae}=_0x51b253;if(!_0x4879ae?.['is']('element','a'))return;if(_0x4879ae['parent']?.['is']('element','sup')&&_0x4879ae['parent']['hasClass']('footnote')&&!_0x3d9e61)return void _0x51b253['preventDefault']();let _0x7fb642=_0x4879ae['getAttribute']('href');if(!_0x7fb642?.['startsWith']('#'))return;_0x7fb642=_0x7fb642['slice'](0x1);let _0x550b47=!0x1;(_0x7fb642['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x7fb642['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x7fb642))&&(_0x550b47=!0x0),_0x550b47&&(_0x51b253['preventDefault'](),_0x2ee4['stop']());},{'priority':'high','context':'$capture'});}}function h({dataPipeline:_0x331801}={}){return(_0x324ae7,{writer:_0x620ce6})=>{if(!p(_0x324ae7))return null;if(!_0x331801)return _0x620ce6['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x595b51=_0x620ce6['createContainerElement']('p');return _0x620ce6['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x595b51),_0x595b51;};}function p(_0x2f19a0){const {parent:_0x27d242}=_0x2f19a0;if(!_0x27d242?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x27d242['childCount'])return!0x1;for(const _0x463827 of _0x2f19a0['getAttributeKeys']())if(!_0x463827['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x463827)return!0x1;return!0x0;}function g(_0x491fd2,_0x7557fe){if(!_0x491fd2['is']('element','paragraph'))return!0x1;const _0x443762=_0x7557fe['toViewElement'](_0x491fd2);return!!_0x443762&&p(_0x491fd2)!==_0x443762['is']('element','span');}function J(_0x2d068f){return _0x1a371d(_0x2d068f)&&_0x2d068f['is']('containerElement')&&!!_0x2d068f['getCustomProperty']('footnotesDefinitions');}function v(_0xdaa6ed,_0x3cb2c0={}){const _0x5de77a=_0xdaa6ed['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x687002=_0xdaa6ed['createContainerElement']('ol',{'class':'footnotes-list'},_0xdaa6ed['createSlot']());return _0xdaa6ed['createContainerElement']('div',{'class':'footnotes',..._0x3cb2c0},[_0x5de77a,_0x687002]);}function D(_0x181ed5,_0x44c660){const _0x17d7f7=_0x181ed5['getAttribute']('footnoteId'),_0x22bb80=_0x181ed5['getAttribute']('footnoteCounter'),_0x3af3c4=_0x44c660['createUIElement']('a',{'href':'#'+_0x17d7f7},function(_0x38c81a){const _0x5675ea=this['toDomElement'](_0x38c81a);return _0x5675ea['textContent']=_0x22bb80,_0x5675ea;}),_0x5e5bfe=_0x44c660['createContainerElement']('sup',{'id':'ref-'+_0x17d7f7,'class':'footnote'},[_0x3af3c4]);return _0x5e5bfe['getFillerOffset']=()=>null,_0x5e5bfe;}function b(_0x197117,_0x13707a,_0x595460,{dataPipeline:_0x11e8b4}={}){const {t:t}=_0x595460,_0x3d64b5=_0x197117['getAttribute']('footnoteId'),_0x55da6c=_0x13707a['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x3d64b5},function(_0x160442){const _0x234eb9=this['toDomElement'](_0x160442);return _0x234eb9['innerText']='^',_0x234eb9;}),_0x4f7d02=_0x11e8b4?_0x13707a['createContainerElement']('div',{'class':'footnote-content'}):_0x199481(_0x13707a['createEditableElement']('div',{'class':'footnote-content'}),_0x13707a,{'label':t('Footnote\x20content.')});return _0x13707a['insert'](_0x13707a['createPositionAt'](_0x4f7d02,0x0),_0x13707a['createSlot']()),_0x13707a['createContainerElement']('li',{'class':'footnote-definition','id':_0x3d64b5},[_0x55da6c,_0x4f7d02]);}class e extends _0x443da6{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x154cbd];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x5e142a}=this,{plugins:_0x9b4bbd,model:_0x37de24}=_0x5e142a,_0x57a87b=_0x9b4bbd['get'](_0x154cbd),_0x48f5b2=_0x9b4bbd['get'](c);this['listenTo'](_0x57a87b,'outputTransformation',(_0x18566b,_0x88890c)=>{const _0x21454d=f(_0x37de24['createRangeIn'](_0x88890c['content']));if(!_0x21454d['length'])return;const _0x40d83b=_0x48f5b2['getFootnotes'](),_0x453d63=_0x21454d['reduce']((_0x76d8,_0x4d633d)=>{const _0x26fbfa=_0x40d83b['find'](_0x724298=>_0x724298['id']===_0x4d633d);if(_0x26fbfa){const _0x939f65=_0x5e142a['data']['toView'](_0x26fbfa['definition'],{'isClipboardPipeline':!0x0}),_0x270a70=_0x5e142a['data']['htmlProcessor']['toData'](_0x939f65);_0x76d8[_0x26fbfa['id']]=_0x270a70;}return _0x76d8;},Object['create'](null));_0x88890c['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x453d63));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x1de17c}=this,{model:_0x23aee3,plugins:_0x3f8eb4}=_0x1de17c,{view:_0x21ce48}=_0x1de17c['editing'],_0x371033=_0x3f8eb4['get'](_0x154cbd),_0x26279b=_0x3f8eb4['get'](c);let _0x24eb62=null;this['listenTo'](_0x21ce48['document'],'clipboardInput',(_0x5c01bd,_0x63a46e)=>{const _0x564768=_0x63a46e['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x24eb62=_0x564768?JSON['parse'](_0x564768):null;}),this['listenTo'](_0x371033,'contentInsertion',(_0x39a0da,_0xf94f0a)=>{const _0x361e4c=_0xf94f0a['sourceEditorId']===this['editor']['id'];_0x361e4c&&'drop'===_0xf94f0a['method']||_0x23aee3['change'](_0x172109=>{let _0x26d06e=_0x26279b['getFootnotesDefinitionsObjectElement']();const _0x70b212=!!_0x26d06e&&Array['from'](_0x23aee3['document']['selection']['getSelectedBlocks']())['includes'](_0x26d06e);if(_0x26d06e&&!_0x70b212&&function(_0x353f73,_0x291e17){const _0xd570af=[];for(const {item:_0x538528}of _0x353f73['createRangeIn'](_0x291e17))_0x538528['is']('element','footnotesDefinitions')&&_0xd570af['push'](_0x538528);for(const _0x37ba57 of _0xd570af)_0x353f73['remove'](_0x37ba57);}(_0x172109,_0xf94f0a['content']),!_0x24eb62)return;const {selection:_0x38b9de}=_0x23aee3['document'],_0x4cde43=_0x38b9de['getFirstRange']()['root'];_0x26d06e&&!_0x70b212||(_0x26d06e=function(_0x149811,_0x2358d5){for(const {item:_0x35bf69}of _0x149811['createRangeIn'](_0x2358d5))if(_0x35bf69['is']('element','footnotesDefinitions'))return _0x35bf69;return null;}(_0x172109,_0xf94f0a['content']),_0x26d06e||=_0x26279b['_insertEmptyFootnotesDefinitionsContainer'](_0x172109,_0x4cde43));const _0x36adc2=Array['from'](_0x38b9de['getRanges']())['flatMap'](f),_0x42101e=function(_0x194b57,_0x4a6487,_0x1f7bbd){const _0x147e73=Object['create'](null);for(const {item:_0x318e48}of _0x194b57['createRangeIn'](_0x4a6487))if(_0x318e48['is']('element','footnoteRef')){const _0xee045a=_0x318e48['getAttribute']('footnoteId');if(!_0x1f7bbd(_0xee045a))continue;_0x147e73[_0xee045a]||(_0x147e73[_0xee045a]=_0x42f69e()),_0x194b57['setAttribute']('footnoteId',_0x147e73[_0xee045a],_0x318e48);}return _0x147e73;}(_0x172109,_0xf94f0a['content'],_0x2f285e=>{if(!_0x361e4c)return!0x0;return!!_0x26279b['getFootnote'](_0x2f285e)&&!_0x36adc2['includes'](_0x2f285e);});for(const [_0x245ea4,_0xa273a]of Object['entries'](_0x24eb62)){const _0x3dd305=_0x42101e[_0x245ea4]||_0x245ea4,_0x37263a=_0x172109['createElement']('footnoteDefinition',{'footnoteId':_0x3dd305}),_0x4002e7=_0x1de17c['data']['htmlProcessor']['toView'](_0xa273a),_0x30a42b=_0x1de17c['data']['toModel'](_0x4002e7,_0x37263a);_0x172109['append'](_0x30a42b,_0x37263a),_0x172109['insert'](_0x37263a,_0x26d06e,'end');}_0x24eb62=null;});});}}function f(_0x2a9295){const _0x11a21b=new Set();for(const {item:_0x1deff8}of _0x2a9295)_0x1deff8['is']('element','footnoteRef')&&_0x11a21b['add'](_0x1deff8['getAttribute']('footnoteId'));return Array['from'](_0x11a21b);}class i extends _0x443da6{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1451cc}=this,{componentFactory:_0x47aa97}=_0x1451cc['ui'];_0x47aa97['add']('insertFootnote',x(_0x1451cc,_0x11e055)),_0x47aa97['add']('menuBar:insertFootnote',x(_0x1451cc,_0x34737a)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x6defa9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x454b25;for(const _0x4cf579 in _0x6defa9){const _0x276340=_0x4cf579,_0x2a64ae=_0x6defa9[_0x276340];if('footnotesLicenseKeyValid'==_0x2a64ae||'footnotesLicenseKeyInvalid'==_0x2a64ae||'footnotesLicenseKeyExpired'==_0x2a64ae||'footnotesLicenseKeyDomainLimit'==_0x2a64ae||'footnotesLicenseKeyNotAllowed'==_0x2a64ae||'footnotesLicenseKeyEvaluationLimit'==_0x2a64ae||'footnotesLicenseKeyTrialLimit'==_0x2a64ae||'footnotesLicenseKeyUsageLimit'==_0x2a64ae){delete _0x6defa9[_0x276340],_0x454b25=_0x2a64ae,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x454b25&&_0x6defa9['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x454b25&&_0x6defa9['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x454b25&&_0x6defa9['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x454b25&&_0x6defa9['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x454b25&&_0x6defa9['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0x454b25&&_0x6defa9['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0x454b25&&_0x6defa9['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function x(_0x555591,_0x3ed3e5){const _0x3c4f7f=_0x555591['commands']['get']('insertFootnote');return _0xa3e662=>{const {t:t}=_0xa3e662,_0xc29846=new _0x3ed3e5(_0xa3e662),_0x56a24e=_0xc29846 instanceof _0x34737a;return _0xc29846['bind']('isEnabled')['to'](_0x3c4f7f,'isEnabled'),_0xc29846['set']({'label':t(_0x56a24e?'Footnote':'Insert\x20footnote'),'icon':_0x5ecb83,'tooltip':!0x0}),_0xc29846['on']('execute',()=>{_0x3c4f7f['execute'](),_0x555591['editing']['view']['focus']();}),_0xc29846;};}class lt extends _0x443da6{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const Q=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x17915a{['refresh'](){const {editor:_0x409b98}=this,_0x63118b=_0x409b98['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x63118b,this['value']=_0x63118b?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x415256}){const {editor:_0x210aed}=this,_0x371ed3=_0x210aed['plugins']['get'](c),_0x409d80=_0x371ed3['getFootnotesDefinitionsObjectElement']();_0x409d80&&Q['includes'](_0x415256)&&_0x210aed['model']['change'](_0x3b1e02=>{_0x3b1e02['setAttribute']('footnotesListStyle',_0x415256,_0x409d80),_0x371ed3['_updateFootnotesCounters'](_0x3b1e02);});}}class C extends _0x17915a{['refresh'](){const {editor:_0x24e25f}=this,_0x5216e1=_0x24e25f['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x5216e1,this['value']=_0x5216e1?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0xd45045}){const {editor:_0x20f3ed}=this,_0x46dcfb=_0x20f3ed['plugins']['get'](c),_0x170f21=_0x46dcfb['getFootnotesDefinitionsObjectElement']();_0x170f21&&Number['isInteger'](_0xd45045)&&_0x20f3ed['model']['change'](_0x503736=>{_0x503736['setAttribute']('footnotesListStart',_0xd45045,_0x170f21),_0x46dcfb['_updateFootnotesCounters'](_0x503736);});}}class P extends _0x443da6{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x17774c}=this;_0x17774c['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x17774c['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x17774c['commands']['add']('footnotesStyle',new S(_0x17774c)),_0x17774c['commands']['add']('footnotesStart',new C(_0x17774c)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x17dcaa}=this,{schema:_0x5ac410}=_0x17dcaa['model'];_0x5ac410['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x39ab99}=this,{conversion:_0x3cac8e,model:_0xf8b9e5}=_0x39ab99,{schema:_0x125bf3}=_0xf8b9e5;_0x3cac8e['for']('upcast')['add'](_0x9a8365=>{_0x9a8365['on']('element:ol',(_0x2eb026,_0x2575f6,_0x5a474e)=>{const _0x2d43c2=_0x2575f6['viewItem'],_0xf085dd=_0x2575f6['modelCursor']?.['parent'];_0x2d43c2['hasClass']('footnotes-list')&&_0xf085dd?.['is']('element','footnotesDefinitions')&&(function(_0x55e41e,_0x25a3b1,_0x413e08,_0x3f59d0){if(!_0x3f59d0['checkAttribute'](_0x25a3b1,'footnotesListStart'))return;let _0x50b6fb=0x1;const _0x77f70f=_0x413e08['consumable']['consume'](_0x55e41e,{'attributes':'start'});if(_0x77f70f){const _0x1227ad=Number['parseInt'](_0x55e41e['getAttribute']('start'),0xa);Number['isNaN'](_0x1227ad)||(_0x50b6fb=_0x1227ad);}!_0x77f70f&&_0x25a3b1['hasAttribute']('footnotesListStart')||_0x413e08['writer']['setAttribute']('footnotesListStart',_0x50b6fb,_0x25a3b1);}(_0x2d43c2,_0xf085dd,_0x5a474e,_0x125bf3),function(_0x2f3c92,_0xfa081d,_0x584a0e,_0x17e93c){if(!_0x17e93c['checkAttribute'](_0xfa081d,'footnotesListStyle'))return;let _0x5756ac='decimal',_0x9946fb=!0x1;if(_0x584a0e['consumable']['consume'](_0x2f3c92,{'attributes':'type'})){const _0x47bc95={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x2f3c92['getAttribute']('type')];_0x47bc95&&(_0x5756ac=_0x47bc95),_0x9946fb=!0x0;}_0x584a0e['consumable']['consume'](_0x2f3c92,{'styles':'list-style-type'})&&(_0x5756ac=_0x2f3c92['getStyle']('list-style-type'),_0x9946fb=!0x0),!_0x9946fb&&_0xfa081d['hasAttribute']('footnotesListStyle')||_0x584a0e['writer']['setAttribute']('footnotesListStyle',_0x5756ac,_0xfa081d);}(_0x2d43c2,_0xf085dd,_0x5a474e,_0x125bf3));});}),_0x3cac8e['for']('downcast')['add'](_0x1a340d=>{_0x1a340d['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x259f95,_0x3b8f72,_0x5db066)=>{if(!_0x5db066['consumable']['consume'](_0x3b8f72['item'],_0x259f95['name']))return;const _0xc2827e=M(_0x3b8f72['item'],_0x5db066['mapper']),{attributeNewValue:_0x450fdd}=_0x3b8f72;null==_0x450fdd||0x1===_0x450fdd?_0x5db066['writer']['removeAttribute']('start',_0xc2827e):_0x5db066['writer']['setAttribute']('start',String(_0x450fdd),_0xc2827e);}),_0x1a340d['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x565e71,_0x3225c3,_0x56fc7b)=>{if(!_0x56fc7b['consumable']['consume'](_0x3225c3['item'],_0x565e71['name']))return;const _0x4075ce=M(_0x3225c3['item'],_0x56fc7b['mapper']),{attributeNewValue:_0x4d1ae6}=_0x3225c3;_0x4d1ae6&&'decimal'!==_0x4d1ae6?_0x56fc7b['writer']['setStyle']('list-style-type',_0x4d1ae6,_0x4075ce):_0x56fc7b['writer']['removeStyle']('list-style-type',_0x4075ce);});});}['_definePostfixer'](){const {editor:_0x3d13c9}=this,{model:_0x3c513b}=_0x3d13c9,_0x2e3045=_0x3d13c9['plugins']['get'](c),_0x12523e=this['_getDefaultListStyle'](),_0x1b017f=this['_getDefaultStartIndex']();_0x3c513b['document']['registerPostFixer'](_0x44a385=>{const _0x19f475=_0x3c513b['document']['differ']['getChanges']();let _0x296672=!0x1;for(const _0x86fbf6 of _0x19f475){if('insert'!==_0x86fbf6['type']||'$text'===_0x86fbf6['name'])continue;const _0x3671e2=_0x3c513b['createRangeOn'](_0x86fbf6['position']['nodeAfter']);for(const _0x5a383b of _0x3671e2['getItems']())_0x5a383b['is']('element','footnotesDefinitions')&&(!_0x5a383b['hasAttribute']('footnotesListStart')&&_0x3c513b['schema']['checkAttribute'](_0x5a383b,'footnotesListStart')&&(_0x44a385['setAttribute']('footnotesListStart',_0x1b017f,_0x5a383b),_0x296672=!0x0),!_0x5a383b['hasAttribute']('footnotesListStyle')&&_0x3c513b['schema']['checkAttribute'](_0x5a383b,'footnotesListStyle')&&(_0x44a385['setAttribute']('footnotesListStyle',_0x12523e,_0x5a383b),_0x296672=!0x0));}return _0x296672&&_0x2e3045['_updateFootnotesCounters'](_0x44a385),_0x296672;});}['_defineFormatter'](){const {editor:_0x412260}=this;_0x412260['plugins']['get'](c)['setFootnoteFormatter'](_0x42d2b2=>this['_formatFootnoteListValue'](_0x42d2b2));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x35b91b,value:_0x28ae2f,digits:_0x33a588}){const _0x513c24=_0x35b91b['getAttribute']('footnotesListStyle'),_0x398ab2=_0x35b91b['getAttribute']('footnotesListStart'),_0x16ee87=Math['floor'](_0x28ae2f)+(_0x398ab2??0x1)-0x1;switch(_0x513c24){case'decimal-leading-zero':return function(_0x1fe65d,_0x5230d1){return String(_0x1fe65d)['padStart'](_0x5230d1,'0');}(_0x16ee87,Math['max'](0x2,_0x33a588));case'lower-alpha':case'lower-latin':return N(_0x16ee87,!0x1);case'upper-alpha':case'upper-latin':return N(_0x16ee87,!0x0);case'lower-roman':return X(_0x16ee87,!0x1);case'upper-roman':return X(_0x16ee87,!0x0);default:return String(_0x16ee87);}}}function M(_0x1069c6,_0x23294a){const _0x1e4475=_0x23294a['toViewElement'](_0x1069c6);return Array['from'](_0x1e4475['getChildren']())['find'](_0x544ea4=>_0x544ea4['is']('element','ol')&&_0x544ea4['hasClass']('footnotes-list'));}function N(_0x1f209d,_0x5b8da6){let _0x36212d='',_0x1f63d1=_0x1f209d;for(;_0x1f63d1>0x0;){const _0x2c21f2=(_0x1f63d1-0x1)%0x1a;_0x36212d=String['fromCharCode'](0x61+_0x2c21f2)+_0x36212d,_0x1f63d1=Math['floor']((_0x1f63d1-0x1)/0x1a);}return _0x5b8da6?_0x36212d['toUpperCase']():_0x36212d;}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(_0x362e0c,_0x10a370){let _0x4075eb='',_0xd8366e=_0x362e0c;for(const {value:_0x3bbbe1,numeral:_0x294c65}of V)for(;_0xd8366e>=_0x3bbbe1;)_0x4075eb+=_0x294c65,_0xd8366e-=_0x3bbbe1;return _0x10a370?_0x4075eb:_0x4075eb['toLowerCase']();}class H extends _0x3a588d{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new ot();['keystrokes']=new rt();['focusables']=new _0x14d98d();['focusCycler'];constructor(_0x1427ab,{styleButtonViews:_0x35ee9a,styleGridAriaLabel:_0x285ffa}){super(_0x1427ab),(this['focusCycler']=new _0x1cda25({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x35ee9a,_0x285ffa),[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 _0x1609f0 of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x1609f0['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 _0x183e4f=_0x455fcd=>_0x455fcd['stopPropagation']();this['keystrokes']['set']('arrowright',_0x183e4f),this['keystrokes']['set']('arrowleft',_0x183e4f),this['keystrokes']['set']('arrowup',_0x183e4f),this['keystrokes']['set']('arrowdown',_0x183e4f);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x2a6907,_0x33478a){const _0x56f205=new _0x3a588d(this['locale']);return _0x56f205['children']=_0x56f205['createCollection'](),_0x56f205['children']['addMany'](_0x2a6907),_0x56f205['setTemplate']({'tag':'div','attributes':{'aria-label':_0x33478a,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x56f205['children']}),_0x56f205['children']['delegate']('execute')['to'](this),_0x56f205['focus']=function(){for(const _0x10c876 of this['children'])if(_0x10c876 instanceof _0x11e055&&_0x10c876['isOn'])return void _0x10c876['focus']();this['children']['first']['focus']();},_0x56f205['focusTracker']=new ot(),_0x56f205['keystrokes']=new rt(),_0x56f205['render'](),_0x56f205['keystrokes']['listenTo'](_0x56f205['element']),this['children']['add'](_0x56f205),_0x56f205;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x20d469=this['_createStartIndexPropertyView'](),_0x3128c4=[_0x20d469],_0x2e3fc2=new st(this['locale'],_0x3128c4);return _0x2e3fc2['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x2e3fc2['buttonView']['bind']('isEnabled')['toMany'](_0x3128c4,'isEnabled',(..._0x32be8e)=>_0x32be8e['some'](_0x482bf7=>_0x482bf7)),_0x2e3fc2['buttonView']['on']('change:isEnabled',(_0x51b9e3,_0x5f3f68,_0x1bd3a6)=>{_0x1bd3a6||(_0x2e3fc2['isCollapsed']=!0x0);}),this['children']['add'](_0x2e3fc2),[_0x20d469,_0x2e3fc2];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x1fe2b0=new it(this['locale'],et);return _0x1fe2b0['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x1fe2b0['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x1fe2b0['fieldView']['on']('input',()=>{const _0x3c1457=_0x1fe2b0['fieldView']['element'],_0x432978=_0x3c1457['valueAsNumber'];Number['isNaN'](_0x432978)?_0x1fe2b0['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x3c1457['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x432978}):_0x1fe2b0['errorText']=t(_0x432978<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0x1fe2b0;}}class j extends _0x443da6{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x4325bd,_0x2f9051];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xe05bb4}=this,{componentFactory:_0x3986c8}=_0xe05bb4['ui'];_0xe05bb4['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x3986c8['add']('footnotesStyle',function(_0xd9a9b2){return _0x38c822=>{const {t:t}=_0x38c822,_0x2fd5ed=_0xd9a9b2['commands']['get']('footnotesStyle'),_0x37765c=_0x5c3277(_0x38c822),{buttonView:_0x2acf1e}=_0x37765c;return _0x37765c['class']='ck-footnotes-styles-dropdown',_0x37765c['bind']('isEnabled')['to'](_0x2fd5ed,'isEnabled'),_0x2acf1e['set']({'label':t('Footnotes\x20style'),'icon':_0x5ecb83,'tooltip':!0x0}),_0x37765c['once']('change:isOpen',()=>{const _0x152dd0=function({editor:_0x43439b,dropdownView:_0x4a94d9}){const {t:t}=_0x43439b['locale'],_0x385f5f=t('Footnotes\x20definitions\x20styles'),_0x549f74=function(_0x3c5aa0){const t=_0x3c5aa0['locale']['t'],_0x3fb5df=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x303f0b},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x4d0348},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x4d6aac},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x20b737},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x855632},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x227d9e}];return _0x3fb5df['map'](function(_0xdb0bf8){const _0x10be8c=_0xdb0bf8['locale'];return({label:_0x4ede1a,icon:_0x48b9bb,tooltip:_0x1c2782,style:_0x58fd52})=>{const _0x3d0416=_0xdb0bf8['commands']['get']('footnotesStyle'),_0xe05e26=new _0x11e055(_0x10be8c);return _0xe05e26['set']({'label':_0x4ede1a,'icon':_0x48b9bb,'tooltip':_0x1c2782}),_0xe05e26['bind']('isOn')['to'](_0x3d0416,'value',_0x222007=>_0x222007===_0x58fd52),_0xe05e26['bind']('isEnabled')['to'](_0x3d0416,'isEnabled'),_0xe05e26['on']('execute',()=>{_0xdb0bf8['execute']('footnotesStyle',{'value':_0x58fd52}),_0xdb0bf8['editing']['view']['focus']();}),_0xe05e26;};}(_0x3c5aa0));}(_0x43439b),_0x58fd2a=new H(_0x43439b['locale'],{'styleGridAriaLabel':_0x385f5f,'styleButtonViews':_0x549f74});return _0x58fd2a['delegate']('execute')['to'](_0x4a94d9),_0x58fd2a['on']('footnotesListStart',(_0x374b85,_0x125875)=>{_0x43439b['execute']('footnotesStart',{'value':_0x125875['startIndex']});}),_0x58fd2a;}({'editor':_0xd9a9b2,'dropdownView':_0x37765c});_0x37765c['panelView']['children']['add'](_0x152dd0);}),_0x37765c;};}(_0xe05bb4));}['afterInit'](){const {editor:_0x1db01e}=this,{t:t}=_0x1db01e['locale'],_0x426469=_0x1db01e['plugins']['get'](_0x2f9051),{defaultPositions:_0x79d75e}=_0xd8228c;_0x426469['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x1db01e['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x287927=>{let _0x570150=_0x287927['getFirstPosition']()?.['parent'];return _0x570150?.['is']('$text')&&(_0x570150=_0x570150['parent']),_0x570150?.['is']('element')?_0x570150['findAncestor'](J):null;},'positions':[_0x79d75e['southArrowNorth'],_0x79d75e['southArrowNorthMiddleWest'],_0x79d75e['southArrowNorthMiddleEast'],_0x79d75e['southArrowNorthWest'],_0x79d75e['southArrowNorthEast'],_0x79d75e['northArrowSouth'],_0x79d75e['northArrowSouthMiddleWest'],_0x79d75e['northArrowSouthMiddleEast'],_0x79d75e['northArrowSouthWest'],_0x79d75e['northArrowSouthEast'],_0x79d75e['viewportStickyNorth']]});}}class ft extends _0x443da6{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,c as FootnotesTracker,i as FootnotesUI,m as InsertFootnoteCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-footnotes",
|
|
3
|
-
"version": "47.2.0-alpha.
|
|
3
|
+
"version": "47.2.0-alpha.4",
|
|
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.2.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-ui": "47.2.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-engine": "47.2.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-icons": "47.2.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-widget": "47.2.0-alpha.
|
|
31
|
-
"@ckeditor/ckeditor5-clipboard": "47.2.0-alpha.
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "47.2.0-alpha.
|
|
33
|
-
"ckeditor5": "47.2.0-alpha.
|
|
26
|
+
"@ckeditor/ckeditor5-core": "47.2.0-alpha.4",
|
|
27
|
+
"@ckeditor/ckeditor5-ui": "47.2.0-alpha.4",
|
|
28
|
+
"@ckeditor/ckeditor5-engine": "47.2.0-alpha.4",
|
|
29
|
+
"@ckeditor/ckeditor5-icons": "47.2.0-alpha.4",
|
|
30
|
+
"@ckeditor/ckeditor5-widget": "47.2.0-alpha.4",
|
|
31
|
+
"@ckeditor/ckeditor5-clipboard": "47.2.0-alpha.4",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "47.2.0-alpha.4",
|
|
33
|
+
"ckeditor5": "47.2.0-alpha.4"
|
|
34
34
|
},
|
|
35
35
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
36
36
|
"author": "CKSource (http://cksource.com/)",
|
package/src/footnotesediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x4ce6db}from'ckeditor5/src/core.js';import{isWidget as _0x34233c,toWidget as _0x122ab5,toWidgetEditable as _0x20bc47}from'ckeditor5/src/widget.js';import{uid as _0x37b42b}from'ckeditor5/src/utils.js';import{PointerObserver as _0x31f6aa,ClickObserver as _0x2800aa}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x1d30f2}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x37ffc9}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x4ce6db{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x1d30f2];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5f0efd}=this;_0x5f0efd['config']['define']('footnotes.multiBlock',!0x0),_0x5f0efd['commands']['add']('insertFootnote',new _0x37ffc9(_0x5f0efd)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x21ec02){const _0x4ecf05=_0x37fbc4([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]),_0x3a6fb8=0x47a28506,_0x22f279=0x47a5f2de^_0x3a6fb8,_0xcafe52=window[_0x37fbc4([0x44,0x61,0x74,0x65])][_0x37fbc4([0x6e,0x6f,0x77])](),_0x5d16f1=_0x21ec02[_0x37fbc4([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x455157=new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x523d68=>{_0x5d16f1[_0x37fbc4([0x6f,0x6e,0x63,0x65])](_0x37fbc4([0x72,0x65,0x61,0x64,0x79]),_0x523d68);}),_0xf441b2={[_0x37fbc4([0x6b,0x74,0x79])]:_0x37fbc4([0x45,0x43]),[_0x37fbc4([0x75,0x73,0x65])]:_0x37fbc4([0x73,0x69,0x67]),[_0x37fbc4([0x63,0x72,0x76])]:_0x37fbc4([0x50,0x2d,0x32,0x35,0x36]),[_0x37fbc4([0x78])]:_0x37fbc4([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]),[_0x37fbc4([0x79])]:_0x37fbc4([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]),[_0x37fbc4([0x61,0x6c,0x67])]:_0x37fbc4([0x45,0x53,0x32,0x35,0x36])},_0x5a2323=_0x5d16f1[_0x37fbc4([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x37fbc4([0x67,0x65,0x74])](_0x37fbc4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5494a1(){let _0x22d418,_0x57424d=null,_0x2ba7e6=null;try{if(_0x5a2323==_0x37fbc4([0x47,0x50,0x4c]))return _0x37fbc4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x22d418=_0x1fe955(),!_0x22d418)return _0x37fbc4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x22d418[_0x37fbc4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2ba7e6=_0x1248b6(_0x22d418[_0x37fbc4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x22d418[_0x37fbc4([0x6a,0x74,0x69])])),await _0x5c5c11()?_0x485695()?_0x347b1b()?_0x37fbc4([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x526dc9()?(_0x22d418[_0x37fbc4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x37fbc4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x57424d=_0xf696af(_0x37fbc4([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x22d418[_0x37fbc4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x37fbc4([0x74,0x72,0x69,0x61,0x6c])&&(_0x57424d=_0xf696af(_0x37fbc4([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x336536()):_0x37fbc4([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x37fbc4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x37fbc4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x37fbc4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x347b1b(){const _0x10edae=[_0x37fbc4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x37fbc4([0x74,0x72,0x69,0x61,0x6c])][_0x37fbc4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22d418[_0x37fbc4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xcafe52/0x3e8:0xe10*_0x22f279;return _0x22d418[_0x37fbc4([0x65,0x78,0x70])]<_0x10edae;}function _0x485695(){const _0x897789=_0x22d418[_0x37fbc4([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x897789&&(!!_0x897789[_0x37fbc4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37fbc4([0x2a]))||!!_0x897789[_0x37fbc4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37fbc4([0x46,0x4f,0x4f])));}function _0x526dc9(){const _0x25ced6=_0x22d418[_0x37fbc4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x25ced6||0x0==_0x25ced6[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x431ecb}=new URL(window[_0x37fbc4([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x25ced6[_0x37fbc4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x431ecb))return!0x0;const _0x5b3440=_0x431ecb[_0x37fbc4([0x73,0x70,0x6c,0x69,0x74])](_0x37fbc4([0x2e]));return _0x25ced6[_0x37fbc4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x51f5dd=>_0x51f5dd[_0x37fbc4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37fbc4([0x2a])))[_0x37fbc4([0x6d,0x61,0x70])](_0x14996b=>_0x14996b[_0x37fbc4([0x73,0x70,0x6c,0x69,0x74])](_0x37fbc4([0x2e])))[_0x37fbc4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1bc735=>_0x1bc735[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5b3440[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x37fbc4([0x6d,0x61,0x70])](_0x50f6fe=>Array(_0x5b3440[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x50f6fe[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x37fbc4([0x66,0x69,0x6c,0x6c])](_0x50f6fe[0x0]===_0x37fbc4([0x2a])?_0x37fbc4([0x2a]):'')[_0x37fbc4([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x50f6fe))[_0x37fbc4([0x73,0x6f,0x6d,0x65])](_0x2ae578=>_0x5b3440[_0x37fbc4([0x65,0x76,0x65,0x72,0x79])]((_0x27839f,_0x3886f0)=>_0x2ae578[_0x3886f0]===_0x27839f||_0x2ae578[_0x3886f0]===_0x37fbc4([0x2a])));}function _0x336536(){return _0x57424d&&_0x2ba7e6?new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5654b3,_0x293cdf)=>{_0x57424d[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x5654b3,_0x293cdf),_0x2ba7e6[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x3a1608=>{_0x3a1608!=_0x37fbc4([0x56,0x61,0x6c,0x69,0x64])&&_0x5654b3(_0x3a1608);},_0x293cdf);}):_0x57424d||_0x2ba7e6||_0x37fbc4([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1248b6(_0x5f56f9,_0x1e0800){return new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x410dd0=>{if(_0x34d8c7())return _0x410dd0(_0x37fbc4([0x56,0x61,0x6c,0x69,0x64]));_0x57d0e6(),_0x5d16f1[_0x37fbc4([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x37fbc4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3c910c=!0x1;const _0x27f3db=_0x37b42b();function _0x3a6ce7(_0x1cec22){return!!_0x1cec22&&(typeof _0x1cec22===_0x37fbc4([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1cec22===_0x37fbc4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1cec22[_0x37fbc4([0x74,0x68,0x65,0x6e])]===_0x37fbc4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1cec22[_0x37fbc4([0x63,0x61,0x74,0x63,0x68])]===_0x37fbc4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x13781f(_0x2b2f31){_0x50f043(_0x2b2f31)[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x235c2e=>{if(!_0x235c2e||_0x235c2e[_0x37fbc4([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x37fbc4([0x6f,0x6b]))return _0x37fbc4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x30d3d7(_0x2b1182(_0x27f3db+_0x1e0800))!=_0x235c2e[_0x37fbc4([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x37fbc4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x37fbc4([0x56,0x61,0x6c,0x69,0x64]);})[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x3d3c38=>(_0xe58cbf(),_0x3d3c38),()=>{const _0x2dd30f=_0x530e70();return null==_0x2dd30f?(_0xe58cbf(),_0x37fbc4([0x56,0x61,0x6c,0x69,0x64])):_0x37fbc4(_0xcafe52-_0x2dd30f>(0x63ae0106^_0x3a6fb8)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x410dd0)[_0x37fbc4([0x63,0x61,0x74,0x63,0x68])](()=>{_0x410dd0(_0x37fbc4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1d1f07=0x47946b86^_0x3a6fb8;function _0xe58cbf(){const _0x340614=_0x37fbc4([0x6c,0x6c,0x63,0x74,0x2d])+_0x30d3d7(_0x2b1182(_0x5f56f9)),_0x4894a4=_0x146c72(_0x30d3d7(window[_0x37fbc4([0x4d,0x61,0x74,0x68])][_0x37fbc4([0x63,0x65,0x69,0x6c])](_0xcafe52/_0x1d1f07)));window[_0x37fbc4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37fbc4([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x340614,_0x4894a4);}function _0x530e70(){const _0x3d363d=_0x37fbc4([0x6c,0x6c,0x63,0x74,0x2d])+_0x30d3d7(_0x2b1182(_0x5f56f9)),_0x5280aa=window[_0x37fbc4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37fbc4([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3d363d);return _0x5280aa?window[_0x37fbc4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x146c72(_0x5280aa),0x10)*_0x1d1f07:null;}function _0x50f043(_0x297e44){return new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x7fdc4d,_0x127979)=>{_0x297e44[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x7fdc4d,_0x127979),window[_0x37fbc4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x127979,0x47a351c6^_0x3a6fb8);});}}_0x5d16f1[_0x37fbc4([0x6f,0x6e])](_0x37fbc4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2ad1c9,_0x47a0e1)=>{if(_0x47a0e1[0x0]!=_0x5f56f9)return _0x410dd0(_0x37fbc4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x47a0e1[0x1]={..._0x47a0e1[0x1],[_0x37fbc4([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x27f3db};},{[_0x37fbc4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37fbc4([0x68,0x69,0x67,0x68])}),_0x5d16f1[_0x37fbc4([0x6f,0x6e])](_0x37fbc4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x402d95=>{_0x3a6ce7(_0x402d95[_0x37fbc4([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3c910c=!0x0,_0x13781f(_0x402d95[_0x37fbc4([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x37fbc4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37fbc4([0x6c,0x6f,0x77])}),_0x455157[_0x37fbc4([0x74,0x68,0x65,0x6e])](()=>{_0x3c910c||_0x410dd0(_0x37fbc4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x34d8c7(){return _0x5d16f1[_0x37fbc4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37fbc4([0x76,0x69,0x65,0x77])][_0x37fbc4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x37fbc4([0x61,0x75,0x74,0x6f]);}function _0x57d0e6(){_0x5d16f1[_0x37fbc4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37fbc4([0x76,0x69,0x65,0x77])][_0x37fbc4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x37fbc4([0x61,0x75,0x74,0x6f]);}}function _0xf696af(_0xe4be0d){const _0x35654c=[new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f48b0=>setTimeout(_0x2f48b0,0x47abbbca^_0x3a6fb8)),_0x455157[_0x37fbc4([0x74,0x68,0x65,0x6e])](()=>new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ab7a1=>{let _0x205436=0x0;_0x5d16f1[_0x37fbc4([0x6d,0x6f,0x64,0x65,0x6c])][_0x37fbc4([0x6f,0x6e])](_0x37fbc4([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4e7103,_0x5d2a66)=>{_0x5d2a66[0x0][_0x37fbc4([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x205436++,_0x205436==(0x47a284fe^_0x3a6fb8)&&(_0x2ab7a1(),_0x4e7103[_0x37fbc4([0x6f,0x66,0x66])]());});}))];return window[_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x37fbc4([0x72,0x61,0x63,0x65])](_0x35654c)[_0x37fbc4([0x74,0x68,0x65,0x6e])](()=>_0xe4be0d);}async function _0x536275(){await _0x455157,_0x5d16f1[_0x37fbc4([0x6d,0x6f,0x64,0x65,0x6c])][_0x37fbc4([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xc52a2c,_0x5d16f1[_0x37fbc4([0x6d,0x6f,0x64,0x65,0x6c])][_0x37fbc4([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xc52a2c,_0x5d16f1[_0x37fbc4([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x37fbc4([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x49a36d(_0x4a30ac){const _0xa1d406=_0xdc3639();_0x5d16f1[_0xa1d406]=_0x37fbc4([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4a30ac,_0x4a30ac!=_0x37fbc4([0x56,0x61,0x6c,0x69,0x64])&&_0x536275();}function _0xdc3639(){const _0x1480d0=window[_0x37fbc4([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x37fbc4([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x37fbc4([0x6e,0x6f,0x77])]())[_0x37fbc4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x37fbc4([0x2e]),'');let _0x386778=_0x37fbc4([0x75]);for(let _0x6f719d=0x0;_0x6f719d<_0x1480d0[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x6f719d+=0x2){let _0x43443b=window[_0x37fbc4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1480d0[_0x37fbc4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x6f719d,_0x6f719d+0x2));_0x43443b>=_0x4ecf05[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x43443b-=_0x4ecf05[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x386778+=_0x4ecf05[_0x43443b];}return _0x386778;}function _0x1fe955(){const _0x45ca83=_0x5a2323[_0x37fbc4([0x73,0x70,0x6c,0x69,0x74])](_0x37fbc4([0x2e]));if(0x3!=_0x45ca83[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x27dda3(_0x45ca83[0x1]);function _0x27dda3(_0x2f458c){const _0x58d308=_0x174f62(_0x2f458c);return _0x58d308&&_0x17474d()?_0x58d308:null;function _0x17474d(){const _0x5dfaa8=_0x58d308[_0x37fbc4([0x6a,0x74,0x69])],_0x15ba6a=window[_0x37fbc4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5dfaa8[_0x37fbc4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5dfaa8[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x246630={..._0x58d308,[_0x37fbc4([0x6a,0x74,0x69])]:_0x5dfaa8[_0x37fbc4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5dfaa8[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x246630[_0x37fbc4([0x76,0x63])],_0x2b1182(_0x246630)==_0x15ba6a;}}}async function _0x5c5c11(){let _0x2de36a=!0x0;try{const _0x578c34=_0x5a2323[_0x37fbc4([0x73,0x70,0x6c,0x69,0x74])](_0x37fbc4([0x2e])),[_0x3b58d5,_0x4a72ce,_0x41fb6b]=_0x578c34;return _0xf7994d(_0x3b58d5),await _0x47a7a5(_0x3b58d5,_0x4a72ce,_0x41fb6b),_0x2de36a;}catch{return!0x1;}function _0xf7994d(_0x41c938){const _0x4ffe8c=_0x174f62(_0x41c938);_0x4ffe8c&&_0x4ffe8c[_0x37fbc4([0x61,0x6c,0x67])]==_0x37fbc4([0x45,0x53,0x32,0x35,0x36])||(_0x2de36a=!0x1);}async function _0x47a7a5(_0x3b0f0a,_0x434eb1,_0x33ff9f){const _0x9a1385=window[_0x37fbc4([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x37fbc4([0x66,0x72,0x6f,0x6d])](_0x3144e0(_0x33ff9f),_0x2dace8=>_0x2dace8[_0x37fbc4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x586d17=new window[(_0x37fbc4([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x37fbc4([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3b0f0a+_0x37fbc4([0x2e])+_0x434eb1),_0x426663=window[_0x37fbc4([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x37fbc4([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x426663)return;const _0x46164d=await _0x426663[_0x37fbc4([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x37fbc4([0x6a,0x77,0x6b]),_0xf441b2,{[_0x37fbc4([0x6e,0x61,0x6d,0x65])]:_0x37fbc4([0x45,0x43,0x44,0x53,0x41]),[_0x37fbc4([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x37fbc4([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x37fbc4([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x426663[_0x37fbc4([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x37fbc4([0x6e,0x61,0x6d,0x65])]:_0x37fbc4([0x45,0x43,0x44,0x53,0x41]),[_0x37fbc4([0x68,0x61,0x73,0x68])]:{[_0x37fbc4([0x6e,0x61,0x6d,0x65])]:_0x37fbc4([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x46164d,_0x9a1385,_0x586d17)||(_0x2de36a=!0x1);}}function _0x174f62(_0x17349a){return _0x17349a[_0x37fbc4([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x37fbc4([0x65,0x79]))?JSON[_0x37fbc4([0x70,0x61,0x72,0x73,0x65])](_0x3144e0(_0x17349a)):null;}function _0x3144e0(_0x4bee2c){return window[_0x37fbc4([0x61,0x74,0x6f,0x62])](_0x4bee2c[_0x37fbc4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x37fbc4([0x2b]))[_0x37fbc4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x37fbc4([0x2f])));}function _0x2b1182(_0x31a668){let _0x29b8be=0x1505;function _0x33b44f(_0x5eaf98){for(let _0x3d9fdc=0x0;_0x3d9fdc<_0x5eaf98[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d9fdc++){const _0x16f60a=_0x5eaf98[_0x37fbc4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3d9fdc);_0x29b8be=(_0x29b8be<<0x5)+_0x29b8be+_0x16f60a,_0x29b8be&=_0x29b8be;}}function _0x5461a1(_0x2ee729){Array[_0x37fbc4([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2ee729)?_0x2ee729[_0x37fbc4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5461a1):_0x2ee729&&typeof _0x2ee729==_0x37fbc4([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x37fbc4([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2ee729)[_0x37fbc4([0x73,0x6f,0x72,0x74])]()[_0x37fbc4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x200aa0,_0xebf15])=>{_0x33b44f(_0x200aa0),_0x5461a1(_0xebf15);}):_0x33b44f(window[_0x37fbc4([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2ee729));}return _0x5461a1(_0x31a668),_0x29b8be>>>0x0;}function _0x30d3d7(_0x552075){return _0x552075[_0x37fbc4([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x37fbc4([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x37fbc4([0x30]));}function _0x146c72(_0x50690f){return _0x50690f[_0x37fbc4([0x73,0x70,0x6c,0x69,0x74])]('')[_0x37fbc4([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x37fbc4([0x6a,0x6f,0x69,0x6e])]('');}function _0xc52a2c(){}function _0x37fbc4(_0x41b1f8){return _0x41b1f8['map'](_0xbf4668=>String['fromCharCode'](_0xbf4668))['join']('');}_0x49a36d(await _0x5494a1());}(this);}['_moveSelectionToFootnoteDefinition'](_0x9eb8e5){const {plugins:_0x4be320,editing:_0x3cfdff,model:_0x49a5e1}=this['editor'],_0x485dbd=_0x4be320['get'](_0x1d30f2)['getFootnote'](_0x9eb8e5);return!!_0x485dbd&&(_0x49a5e1['change'](_0x2b40df=>{_0x2b40df['setSelection'](_0x2b40df['createPositionAt'](_0x485dbd['definition'],'end'));}),_0x3cfdff['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x29eca5){const {plugins:_0x338d94,editing:_0x3e3f5d,model:_0x524505}=this['editor'],_0xc08cf5=_0x338d94['get'](_0x1d30f2)['getFootnote'](_0x29eca5);return!!_0xc08cf5&&(_0x524505['change'](_0x493a4e=>{_0x493a4e['setSelection'](_0xc08cf5['reference'],'on');}),_0x3e3f5d['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0xf37a71}=this['editor']['model'],_0x42a634=this['editor']['config']['get']('footnotes.multiBlock');_0xf37a71['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0xf37a71['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0xf37a71['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x42a634?_0xf37a71['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0xf37a71['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0xf37a71['addChildCheck'](_0x1fe0bd=>{for(const _0x258c35 of _0x1fe0bd)if('footnoteDefinition'===_0x258c35['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x619f39}=this,{conversion:_0x57339a,editing:_0x48f1ad}=_0x619f39,{t:t}=_0x619f39['locale'];_0x57339a['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x37ea26,{writer:_0x6b95bd,consumable:_0x51d698})=>{const _0x103122=_0x37ea26['getChild'](0x0);if(!_0x103122||!_0x103122['is']('element','a'))return null;const _0x160114=_0x103122['getAttribute']('href')||'';if(!_0x160114['startsWith']('#'))return null;const _0x2f9212=_0x160114['replace'](/^#/,'');if(!_0x2f9212)return null;_0x51d698['consume'](_0x103122,{'name':!0x0,'attributes':['href']});for(const {item:_0x57df9e}of _0x48f1ad['view']['createRangeIn'](_0x103122))_0x57df9e['is']('$textProxy')?_0x51d698['consume'](_0x57df9e['textNode'],{'name':!0x0}):_0x57df9e['is']('element')&&_0x51d698['consume'](_0x57df9e,{'name':!0x0});return _0x6b95bd['createElement']('footnoteRef',{'footnoteId':_0x2f9212});}}),_0x57339a['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x123a46,{writer:_0x561675})=>D(_0x123a46,_0x561675)}),_0x57339a['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x482e07,{writer:_0x108ee9})=>{const _0x2800f8=_0x482e07['getAttribute']('footnoteCounter');return _0x122ab5(D(_0x482e07,_0x108ee9),_0x108ee9,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x2800f8)});}});}['_defineDefinitionsConverters'](){const {editor:_0x2a98d5}=this,{t:t}=_0x2a98d5['locale'],{conversion:_0x2c68ce}=_0x2a98d5;_0x2c68ce['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x2c68ce['for']('upcast')['add'](_0x289b29=>{_0x289b29['on']('element:ol',(_0xa02021,_0x5cfb4f,_0x32814c)=>{const _0x28967d=_0x5cfb4f['viewItem'];if(!_0x28967d['hasClass']('footnotes-list')||!_0x5cfb4f['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x32814c['consumable']['consume'](_0x28967d,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x2962d0,modelCursor:_0xf9a73c}=_0x32814c['convertChildren'](_0x5cfb4f['viewItem'],_0x5cfb4f['modelCursor']);_0x5cfb4f['modelRange']=_0x2962d0,_0x5cfb4f['modelCursor']=_0xf9a73c;}),_0x289b29['on']('element:hr',(_0x4c9f42,_0x1c0379,_0x1d3719)=>{const _0x1b1ce6=_0x1c0379['viewItem'];_0x1b1ce6['hasClass']('footnotes-divider')&&_0x1c0379['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x1d3719['consumable']['consume'](_0x1b1ce6,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x2c68ce['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x5c7afc,{writer:_0xfe254e})=>v(_0xfe254e)}),_0x2c68ce['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x20ee95,{writer:_0x444245})=>{const _0x3260db=v(_0x444245,{'data-footnotes-list-label':t('Footnotes')}),_0x52a07b=_0x122ab5(_0x3260db,_0x444245,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x444245['setCustomProperty']('footnotesDefinitions',!0x0,_0x52a07b),_0x52a07b;}});}['_defineDefinitionConverters'](){const {editor:_0x4de27b}=this,{conversion:_0x1fcdd0,locale:_0x307730}=_0x4de27b,_0xa22ca8=_0x4de27b['config']['get']('footnotes.multiBlock');_0x1fcdd0['for']('upcast')['add'](_0x4d99bb=>{_0x4d99bb['on']('element:li',(_0x2389c8,_0x55594f,_0x284d3f)=>{const _0x25d423=_0x55594f['viewItem'];if(!_0x25d423['hasClass']('footnote-definition')||!_0x25d423['getAttribute']('id'))return;const _0x2e06ab=_0x25d423['parent'];if(!_0x2e06ab['is']('element','ol')||!_0x2e06ab['hasClass']('footnotes-list'))return;if(!_0x284d3f['consumable']['test'](_0x25d423,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x284c57=_0x284d3f['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x25d423['getAttribute']('id')});if(!_0x284d3f['safeInsert'](_0x284c57,_0x55594f['modelCursor']))return;_0x284d3f['consumable']['consume'](_0x25d423,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x1feb7c=Array['from'](_0x25d423['getChildren']())['find'](_0x37a0f0=>_0x37a0f0['is']('element')&&_0x37a0f0['hasClass']('footnote-content'));for(const _0x278d0d of _0x25d423['getChildren']())_0x278d0d['is']('element')&&(_0x284d3f['consumable']['consume'](_0x278d0d,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x284d3f['consumable']['consume'](_0x278d0d,{'name':!0x0,'classes':'footnote-content'}));if(_0x1feb7c){if(_0xa22ca8)_0x284d3f['convertChildren'](_0x1feb7c,_0x284c57);else{const _0x4ad027=_0x284d3f['writer']['createElement']('footnoteInlineContent');_0x284d3f['writer']['insert'](_0x4ad027,_0x284c57),_0x284d3f['convertChildren'](_0x1feb7c,_0x4ad027);}}_0x284d3f['updateConversionResult'](_0x284c57,_0x55594f);});}),_0x1fcdd0['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x383963,{writer:_0x279222})=>b(_0x383963,_0x279222,_0x307730,{'dataPipeline':!0x0})}),_0x1fcdd0['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x18bc9b,{writer:_0x257f6a})=>b(_0x18bc9b,_0x257f6a,_0x307730)});}['_defineBogusParagraphConverters'](){const {editor:_0x51d335}=this,{conversion:_0x4732dc}=_0x51d335;_0x51d335['config']['get']('footnotes.multiBlock')?(_0x4732dc['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':h(),'converterPriority':'high'}),_0x4732dc['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':h({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x51d335['model']['document'],'change:data',()=>{!function(_0x57133d,_0x5bd891){const _0x58e182=_0x57133d['document']['differ'],_0x2f14ea=new Set();for(const _0x44021e of _0x58e182['getChanges']()){const _0x5c8276='attribute'==_0x44021e['type']?_0x44021e['range']['start']['parent']:_0x44021e['position']['parent'];_0x5c8276['is']('element','footnoteDefinition')&&_0x2f14ea['add'](_0x5c8276);}for(const _0x519e97 of _0x2f14ea['values']()){const _0x1e6cd5=Array['from'](_0x519e97['getChildren']())['filter'](_0xaf8f20=>g(_0xaf8f20,_0x5bd891['mapper']));for(const _0x4e2b7b of _0x1e6cd5)_0x5bd891['reconvertItem'](_0x4e2b7b);}}(_0x51d335['model'],_0x51d335['editing']);})):(_0x4732dc['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':h()}),_0x4732dc['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x5bc94c,{writer:_0x40416e})=>{const _0x2d92eb=_0x40416e['createContainerElement']('span');return _0x40416e['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x2d92eb),_0x2d92eb;}}));}['_defineKeyboardHandlers'](){const {editor:_0x17ce34}=this,{editing:_0x4928fb,t:t}=_0x17ce34,_0x298307=_0x17ce34['model']['document']['selection'];_0x17ce34['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0x17ce34['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0x4928fb['view']['document'],'enter',(_0x51002e,_0x50ec4e)=>{const _0x5591a6=function(_0x3940a6){const _0x1b253b=_0x3940a6['getSelectedElement']();if(_0x1b253b?.['is']('element','footnoteRef'))return _0x1b253b;return null;}(_0x298307);if(_0x5591a6){const _0x59523c=_0x5591a6['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x59523c),_0x50ec4e['preventDefault'](),_0x51002e['stop']();}},{'context':_0x34233c});}['_defineClickHandlers'](){const {editor:_0x309330}=this,{editing:_0x5b7328}=_0x309330;_0x309330['editing']['view']['addObserver'](_0x31f6aa),_0x309330['editing']['view']['addObserver'](_0x2800aa);let _0x54d58b=!0x1;this['listenTo'](_0x5b7328['view']['document'],'pointerdown',(_0x4bb22c,_0x164cdc)=>{const {target:_0x707025}=_0x164cdc,_0x1aeb6a=_0x5b7328['view']['document']['selection'];_0x54d58b=!!(_0x707025?.['is']('element','a')&&_0x707025['parent']?.['is']('element','sup')&&_0x707025['parent']['hasClass']('footnote'))&&_0x1aeb6a['getSelectedElement']()===_0x707025['parent'];},{'priority':'high'}),this['listenTo'](_0x5b7328['view']['document'],'click',(_0x309a8b,_0x1c6f38)=>{const {target:_0x1cc0d0}=_0x1c6f38;if(!_0x1cc0d0?.['is']('element','a'))return;if(_0x1cc0d0['parent']?.['is']('element','sup')&&_0x1cc0d0['parent']['hasClass']('footnote')&&!_0x54d58b)return void _0x1c6f38['preventDefault']();let _0x342c48=_0x1cc0d0['getAttribute']('href');if(!_0x342c48?.['startsWith']('#'))return;_0x342c48=_0x342c48['slice'](0x1);let _0x4857cb=!0x1;(_0x342c48['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x342c48['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x342c48))&&(_0x4857cb=!0x0),_0x4857cb&&(_0x1c6f38['preventDefault'](),_0x309a8b['stop']());},{'priority':'high','context':'$capture'});}}function h({dataPipeline:_0x39e673}={}){return(_0x3e73bb,{writer:_0x234658})=>{if(!p(_0x3e73bb))return null;if(!_0x39e673)return _0x234658['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0xe76364=_0x234658['createContainerElement']('p');return _0x234658['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0xe76364),_0xe76364;};}function p(_0x91fe7b){const {parent:_0x20f9a2}=_0x91fe7b;if(!_0x20f9a2?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x20f9a2['childCount'])return!0x1;for(const _0x10a17c of _0x91fe7b['getAttributeKeys']())if(!_0x10a17c['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x10a17c)return!0x1;return!0x0;}function g(_0x1f90b3,_0x1d8e22){if(!_0x1f90b3['is']('element','paragraph'))return!0x1;const _0x141ab3=_0x1d8e22['toViewElement'](_0x1f90b3);return!!_0x141ab3&&p(_0x1f90b3)!==_0x141ab3['is']('element','span');}export function isFootnotesDefinitionsWidget(_0x150ef5){return _0x34233c(_0x150ef5)&&_0x150ef5['is']('containerElement')&&!!_0x150ef5['getCustomProperty']('footnotesDefinitions');}function v(_0x14b343,_0x468575={}){const _0x495287=_0x14b343['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x701f02=_0x14b343['createContainerElement']('ol',{'class':'footnotes-list'},_0x14b343['createSlot']());return _0x14b343['createContainerElement']('div',{'class':'footnotes',..._0x468575},[_0x495287,_0x701f02]);}function D(_0x5787f6,_0x1e8c6c){const _0x4fc7ed=_0x5787f6['getAttribute']('footnoteId'),_0x3b6341=_0x5787f6['getAttribute']('footnoteCounter'),_0x941af5=_0x1e8c6c['createUIElement']('a',{'href':'#'+_0x4fc7ed},function(_0xd2eb44){const _0x5d9f1c=this['toDomElement'](_0xd2eb44);return _0x5d9f1c['textContent']=_0x3b6341,_0x5d9f1c;}),_0x3b9010=_0x1e8c6c['createContainerElement']('sup',{'id':'ref-'+_0x4fc7ed,'class':'footnote'},[_0x941af5]);return _0x3b9010['getFillerOffset']=()=>null,_0x3b9010;}function b(_0x3d4d50,_0x412707,_0x48e37e,{dataPipeline:_0x3d547c}={}){const {t:t}=_0x48e37e,_0x220db8=_0x3d4d50['getAttribute']('footnoteId'),_0x243344=_0x412707['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x220db8},function(_0x344cb6){const _0x27c203=this['toDomElement'](_0x344cb6);return _0x27c203['innerText']='^',_0x27c203;}),_0x1f8a5b=_0x3d547c?_0x412707['createContainerElement']('div',{'class':'footnote-content'}):_0x20bc47(_0x412707['createEditableElement']('div',{'class':'footnote-content'}),_0x412707,{'label':t('Footnote\x20content.')});return _0x412707['insert'](_0x412707['createPositionAt'](_0x1f8a5b,0x0),_0x412707['createSlot']()),_0x412707['createContainerElement']('li',{'class':'footnote-definition','id':_0x220db8},[_0x243344,_0x1f8a5b]);}
|
|
23
|
+
import{Plugin as _0x212793}from'ckeditor5/src/core.js';import{isWidget as _0x174841,toWidget as _0x285831,toWidgetEditable as _0x28c73e}from'ckeditor5/src/widget.js';import{uid as _0x52a962}from'ckeditor5/src/utils.js';import{PointerObserver as _0x9de2c,ClickObserver as _0xb6410d}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x59be59}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x124bb8}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x212793{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x59be59];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x458bc4}=this;_0x458bc4['config']['define']('footnotes.multiBlock',!0x0),_0x458bc4['commands']['add']('insertFootnote',new _0x124bb8(_0x458bc4)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x3c6fc8){const _0x5ec538=_0x226755([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]),_0x301ddd=0x47a28506,_0x35c84b=0x47a5f2f6^_0x301ddd,_0xf4301c=window[_0x226755([0x44,0x61,0x74,0x65])][_0x226755([0x6e,0x6f,0x77])](),_0x346043=_0x3c6fc8[_0x226755([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x225bbb=new window[(_0x226755([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5935b7=>{_0x346043[_0x226755([0x6f,0x6e,0x63,0x65])](_0x226755([0x72,0x65,0x61,0x64,0x79]),_0x5935b7);}),_0x1b5a1c={[_0x226755([0x6b,0x74,0x79])]:_0x226755([0x45,0x43]),[_0x226755([0x75,0x73,0x65])]:_0x226755([0x73,0x69,0x67]),[_0x226755([0x63,0x72,0x76])]:_0x226755([0x50,0x2d,0x32,0x35,0x36]),[_0x226755([0x78])]:_0x226755([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]),[_0x226755([0x79])]:_0x226755([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]),[_0x226755([0x61,0x6c,0x67])]:_0x226755([0x45,0x53,0x32,0x35,0x36])},_0x4e23e8=_0x346043[_0x226755([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x226755([0x67,0x65,0x74])](_0x226755([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2a4f87(){let _0x2573e4,_0x54b4cf=null,_0x38de7c=null;try{if(_0x4e23e8==_0x226755([0x47,0x50,0x4c]))return _0x226755([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2573e4=_0x22aa5f(),!_0x2573e4)return _0x226755([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2573e4[_0x226755([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x38de7c=_0x4a69b9(_0x2573e4[_0x226755([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2573e4[_0x226755([0x6a,0x74,0x69])])),await _0x41f92e()?_0x593c39()?_0x4009d1()?_0x226755([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x595004()?(_0x2573e4[_0x226755([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x226755([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x54b4cf=_0x1b38e2(_0x226755([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2573e4[_0x226755([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x226755([0x74,0x72,0x69,0x61,0x6c])&&(_0x54b4cf=_0x1b38e2(_0x226755([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3560fc()):_0x226755([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x226755([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x226755([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x226755([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4009d1(){const _0x549888=[_0x226755([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x226755([0x74,0x72,0x69,0x61,0x6c])][_0x226755([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2573e4[_0x226755([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xf4301c/0x3e8:0xe10*_0x35c84b;return _0x2573e4[_0x226755([0x65,0x78,0x70])]<_0x549888;}function _0x593c39(){const _0x378dfc=_0x2573e4[_0x226755([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x378dfc&&(!!_0x378dfc[_0x226755([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x226755([0x2a]))||!!_0x378dfc[_0x226755([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x226755([0x46,0x4f,0x4f])));}function _0x595004(){const _0x5793c4=_0x2573e4[_0x226755([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5793c4||0x0==_0x5793c4[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2c04bc}=new URL(window[_0x226755([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5793c4[_0x226755([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c04bc))return!0x0;const _0x425e76=_0x2c04bc[_0x226755([0x73,0x70,0x6c,0x69,0x74])](_0x226755([0x2e]));return _0x5793c4[_0x226755([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x22a0bb=>_0x22a0bb[_0x226755([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x226755([0x2a])))[_0x226755([0x6d,0x61,0x70])](_0x5cc595=>_0x5cc595[_0x226755([0x73,0x70,0x6c,0x69,0x74])](_0x226755([0x2e])))[_0x226755([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4bc567=>_0x4bc567[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x425e76[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x226755([0x6d,0x61,0x70])](_0x3f7137=>Array(_0x425e76[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3f7137[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x226755([0x66,0x69,0x6c,0x6c])](_0x3f7137[0x0]===_0x226755([0x2a])?_0x226755([0x2a]):'')[_0x226755([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3f7137))[_0x226755([0x73,0x6f,0x6d,0x65])](_0x4d3e7f=>_0x425e76[_0x226755([0x65,0x76,0x65,0x72,0x79])]((_0x43e3a8,_0x148167)=>_0x4d3e7f[_0x148167]===_0x43e3a8||_0x4d3e7f[_0x148167]===_0x226755([0x2a])));}function _0x3560fc(){return _0x54b4cf&&_0x38de7c?new window[(_0x226755([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x42784d,_0x4f186b)=>{_0x54b4cf[_0x226755([0x74,0x68,0x65,0x6e])](_0x42784d,_0x4f186b),_0x38de7c[_0x226755([0x74,0x68,0x65,0x6e])](_0x255223=>{_0x255223!=_0x226755([0x56,0x61,0x6c,0x69,0x64])&&_0x42784d(_0x255223);},_0x4f186b);}):_0x54b4cf||_0x38de7c||_0x226755([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4a69b9(_0xf4020d,_0xb47975){return new window[(_0x226755([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf72099=>{if(_0x20dec6())return _0xf72099(_0x226755([0x56,0x61,0x6c,0x69,0x64]));_0x7fc7ea(),_0x346043[_0x226755([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x226755([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x209b4c=!0x1;const _0x10390a=_0x52a962();function _0x1a37c4(_0x287a76){return!!_0x287a76&&(typeof _0x287a76===_0x226755([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x287a76===_0x226755([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x287a76[_0x226755([0x74,0x68,0x65,0x6e])]===_0x226755([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x287a76[_0x226755([0x63,0x61,0x74,0x63,0x68])]===_0x226755([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x18a404(_0x315f1b){_0x3349e2(_0x315f1b)[_0x226755([0x74,0x68,0x65,0x6e])](_0x4e0b53=>{if(!_0x4e0b53||_0x4e0b53[_0x226755([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x226755([0x6f,0x6b]))return _0x226755([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2173cb(_0x85b3db(_0x10390a+_0xb47975))!=_0x4e0b53[_0x226755([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x226755([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x226755([0x56,0x61,0x6c,0x69,0x64]);})[_0x226755([0x74,0x68,0x65,0x6e])](_0x42bf0d=>(_0x20c45c(),_0x42bf0d),()=>{const _0x141d49=_0x3e7c6e();return null==_0x141d49?(_0x20c45c(),_0x226755([0x56,0x61,0x6c,0x69,0x64])):_0x226755(_0xf4301c-_0x141d49>(0x63ae0106^_0x301ddd)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x226755([0x74,0x68,0x65,0x6e])](_0xf72099)[_0x226755([0x63,0x61,0x74,0x63,0x68])](()=>{_0xf72099(_0x226755([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x35088d=0x47946b86^_0x301ddd;function _0x20c45c(){const _0x33633a=_0x226755([0x6c,0x6c,0x63,0x74,0x2d])+_0x2173cb(_0x85b3db(_0xf4020d)),_0x468d83=_0x3476db(_0x2173cb(window[_0x226755([0x4d,0x61,0x74,0x68])][_0x226755([0x63,0x65,0x69,0x6c])](_0xf4301c/_0x35088d)));window[_0x226755([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x226755([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x33633a,_0x468d83);}function _0x3e7c6e(){const _0x29e24f=_0x226755([0x6c,0x6c,0x63,0x74,0x2d])+_0x2173cb(_0x85b3db(_0xf4020d)),_0xbe1be5=window[_0x226755([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x226755([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x29e24f);return _0xbe1be5?window[_0x226755([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3476db(_0xbe1be5),0x10)*_0x35088d:null;}function _0x3349e2(_0x3c3463){return new window[(_0x226755([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x29a2ad,_0x3251fc)=>{_0x3c3463[_0x226755([0x74,0x68,0x65,0x6e])](_0x29a2ad,_0x3251fc),window[_0x226755([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3251fc,0x47a351c6^_0x301ddd);});}}_0x346043[_0x226755([0x6f,0x6e])](_0x226755([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3b11f2,_0x3c11ca)=>{if(_0x3c11ca[0x0]!=_0xf4020d)return _0xf72099(_0x226755([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3c11ca[0x1]={..._0x3c11ca[0x1],[_0x226755([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x10390a};},{[_0x226755([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x226755([0x68,0x69,0x67,0x68])}),_0x346043[_0x226755([0x6f,0x6e])](_0x226755([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x40c345=>{_0x1a37c4(_0x40c345[_0x226755([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x209b4c=!0x0,_0x18a404(_0x40c345[_0x226755([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x226755([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x226755([0x6c,0x6f,0x77])}),_0x225bbb[_0x226755([0x74,0x68,0x65,0x6e])](()=>{_0x209b4c||_0xf72099(_0x226755([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x20dec6(){return _0x346043[_0x226755([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x226755([0x76,0x69,0x65,0x77])][_0x226755([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x226755([0x61,0x75,0x74,0x6f]);}function _0x7fc7ea(){_0x346043[_0x226755([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x226755([0x76,0x69,0x65,0x77])][_0x226755([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x226755([0x61,0x75,0x74,0x6f]);}}function _0x1b38e2(_0x354227){const _0x3cf85d=[new window[(_0x226755([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a33ad=>setTimeout(_0x3a33ad,0x47abbbca^_0x301ddd)),_0x225bbb[_0x226755([0x74,0x68,0x65,0x6e])](()=>new window[(_0x226755([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x561b9f=>{let _0x2681c0=0x0;_0x346043[_0x226755([0x6d,0x6f,0x64,0x65,0x6c])][_0x226755([0x6f,0x6e])](_0x226755([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4c5a7c,_0x456ad4)=>{_0x456ad4[0x0][_0x226755([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2681c0++,_0x2681c0==(0x47a284fe^_0x301ddd)&&(_0x561b9f(),_0x4c5a7c[_0x226755([0x6f,0x66,0x66])]());});}))];return window[_0x226755([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x226755([0x72,0x61,0x63,0x65])](_0x3cf85d)[_0x226755([0x74,0x68,0x65,0x6e])](()=>_0x354227);}async function _0x11536a(){await _0x225bbb,_0x346043[_0x226755([0x6d,0x6f,0x64,0x65,0x6c])][_0x226755([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5d79a8,_0x346043[_0x226755([0x6d,0x6f,0x64,0x65,0x6c])][_0x226755([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5d79a8,_0x346043[_0x226755([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x226755([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x497d47(_0x33279c){const _0x228e21=_0x345e22();_0x346043[_0x228e21]=_0x226755([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x33279c,_0x33279c!=_0x226755([0x56,0x61,0x6c,0x69,0x64])&&_0x11536a();}function _0x345e22(){const _0x5e412b=window[_0x226755([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x226755([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x226755([0x6e,0x6f,0x77])]())[_0x226755([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x226755([0x2e]),'');let _0x58ec56=_0x226755([0x75]);for(let _0x2503ba=0x0;_0x2503ba<_0x5e412b[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2503ba+=0x2){let _0x569ba2=window[_0x226755([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5e412b[_0x226755([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2503ba,_0x2503ba+0x2));_0x569ba2>=_0x5ec538[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x569ba2-=_0x5ec538[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x58ec56+=_0x5ec538[_0x569ba2];}return _0x58ec56;}function _0x22aa5f(){const _0x40fb9d=_0x4e23e8[_0x226755([0x73,0x70,0x6c,0x69,0x74])](_0x226755([0x2e]));if(0x3!=_0x40fb9d[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x117b9c(_0x40fb9d[0x1]);function _0x117b9c(_0x598fdd){const _0x49b3ee=_0x4dd60e(_0x598fdd);return _0x49b3ee&&_0x25e9a9()?_0x49b3ee:null;function _0x25e9a9(){const _0x2c2e1e=_0x49b3ee[_0x226755([0x6a,0x74,0x69])],_0xdc68c1=window[_0x226755([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2c2e1e[_0x226755([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2c2e1e[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x820af={..._0x49b3ee,[_0x226755([0x6a,0x74,0x69])]:_0x2c2e1e[_0x226755([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2c2e1e[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x820af[_0x226755([0x76,0x63])],_0x85b3db(_0x820af)==_0xdc68c1;}}}async function _0x41f92e(){let _0x5bfef1=!0x0;try{const _0x2c2909=_0x4e23e8[_0x226755([0x73,0x70,0x6c,0x69,0x74])](_0x226755([0x2e])),[_0x3286f5,_0x164056,_0x3bf75d]=_0x2c2909;return _0xa7a26d(_0x3286f5),await _0xf9783b(_0x3286f5,_0x164056,_0x3bf75d),_0x5bfef1;}catch{return!0x1;}function _0xa7a26d(_0x29a480){const _0x2f1a24=_0x4dd60e(_0x29a480);_0x2f1a24&&_0x2f1a24[_0x226755([0x61,0x6c,0x67])]==_0x226755([0x45,0x53,0x32,0x35,0x36])||(_0x5bfef1=!0x1);}async function _0xf9783b(_0x2eef23,_0x5bd491,_0x24a619){const _0x5c482e=window[_0x226755([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x226755([0x66,0x72,0x6f,0x6d])](_0x4bc086(_0x24a619),_0x4b3e95=>_0x4b3e95[_0x226755([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4ac43a=new window[(_0x226755([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x226755([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2eef23+_0x226755([0x2e])+_0x5bd491),_0x48308c=window[_0x226755([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x226755([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x48308c)return;const _0xe293a9=await _0x48308c[_0x226755([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x226755([0x6a,0x77,0x6b]),_0x1b5a1c,{[_0x226755([0x6e,0x61,0x6d,0x65])]:_0x226755([0x45,0x43,0x44,0x53,0x41]),[_0x226755([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x226755([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x226755([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x48308c[_0x226755([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x226755([0x6e,0x61,0x6d,0x65])]:_0x226755([0x45,0x43,0x44,0x53,0x41]),[_0x226755([0x68,0x61,0x73,0x68])]:{[_0x226755([0x6e,0x61,0x6d,0x65])]:_0x226755([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xe293a9,_0x5c482e,_0x4ac43a)||(_0x5bfef1=!0x1);}}function _0x4dd60e(_0x401d28){return _0x401d28[_0x226755([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x226755([0x65,0x79]))?JSON[_0x226755([0x70,0x61,0x72,0x73,0x65])](_0x4bc086(_0x401d28)):null;}function _0x4bc086(_0x3e8b8c){return window[_0x226755([0x61,0x74,0x6f,0x62])](_0x3e8b8c[_0x226755([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x226755([0x2b]))[_0x226755([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x226755([0x2f])));}function _0x85b3db(_0x5e376e){let _0xa64cf1=0x1505;function _0x188492(_0x1dc756){for(let _0x4e1914=0x0;_0x4e1914<_0x1dc756[_0x226755([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4e1914++){const _0x332374=_0x1dc756[_0x226755([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4e1914);_0xa64cf1=(_0xa64cf1<<0x5)+_0xa64cf1+_0x332374,_0xa64cf1&=_0xa64cf1;}}function _0x249d11(_0x5a1bb2){Array[_0x226755([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5a1bb2)?_0x5a1bb2[_0x226755([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x249d11):_0x5a1bb2&&typeof _0x5a1bb2==_0x226755([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x226755([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5a1bb2)[_0x226755([0x73,0x6f,0x72,0x74])]()[_0x226755([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x6f34df,_0x190783])=>{_0x188492(_0x6f34df),_0x249d11(_0x190783);}):_0x188492(window[_0x226755([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5a1bb2));}return _0x249d11(_0x5e376e),_0xa64cf1>>>0x0;}function _0x2173cb(_0x17462c){return _0x17462c[_0x226755([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x226755([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x226755([0x30]));}function _0x3476db(_0x10a049){return _0x10a049[_0x226755([0x73,0x70,0x6c,0x69,0x74])]('')[_0x226755([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x226755([0x6a,0x6f,0x69,0x6e])]('');}function _0x5d79a8(){}function _0x226755(_0x56bdb7){return _0x56bdb7['map'](_0x3eb29a=>String['fromCharCode'](_0x3eb29a))['join']('');}_0x497d47(await _0x2a4f87());}(this);}['_moveSelectionToFootnoteDefinition'](_0x37c03d){const {plugins:_0x54cf7d,editing:_0x57b50f,model:_0x47952f}=this['editor'],_0x281c52=_0x54cf7d['get'](_0x59be59)['getFootnote'](_0x37c03d);return!!_0x281c52&&(_0x47952f['change'](_0x243524=>{_0x243524['setSelection'](_0x243524['createPositionAt'](_0x281c52['definition'],'end'));}),_0x57b50f['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x2ca1f9){const {plugins:_0x42d3db,editing:_0x18e822,model:_0x112731}=this['editor'],_0x29b67f=_0x42d3db['get'](_0x59be59)['getFootnote'](_0x2ca1f9);return!!_0x29b67f&&(_0x112731['change'](_0x21eb9a=>{_0x21eb9a['setSelection'](_0x29b67f['reference'],'on');}),_0x18e822['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x3ce536}=this['editor']['model'],_0x1c6c58=this['editor']['config']['get']('footnotes.multiBlock');_0x3ce536['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x3ce536['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x3ce536['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x1c6c58?_0x3ce536['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x3ce536['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x3ce536['addChildCheck'](_0x50db6e=>{for(const _0x532d9e of _0x50db6e)if('footnoteDefinition'===_0x532d9e['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x3aeb89}=this,{conversion:_0x477b3b,editing:_0xa67fde}=_0x3aeb89,{t:t}=_0x3aeb89['locale'];_0x477b3b['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x15cfd6,{writer:_0x39dc65,consumable:_0x1066d6})=>{const _0xca07f1=_0x15cfd6['getChild'](0x0);if(!_0xca07f1||!_0xca07f1['is']('element','a'))return null;const _0x23a3a7=_0xca07f1['getAttribute']('href')||'';if(!_0x23a3a7['startsWith']('#'))return null;const _0x1a2935=_0x23a3a7['replace'](/^#/,'');if(!_0x1a2935)return null;_0x1066d6['consume'](_0xca07f1,{'name':!0x0,'attributes':['href']});for(const {item:_0xc91c64}of _0xa67fde['view']['createRangeIn'](_0xca07f1))_0xc91c64['is']('$textProxy')?_0x1066d6['consume'](_0xc91c64['textNode'],{'name':!0x0}):_0xc91c64['is']('element')&&_0x1066d6['consume'](_0xc91c64,{'name':!0x0});return _0x39dc65['createElement']('footnoteRef',{'footnoteId':_0x1a2935});}}),_0x477b3b['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x30e801,{writer:_0x6fe1a6})=>D(_0x30e801,_0x6fe1a6)}),_0x477b3b['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x40ca2d,{writer:_0x366d86})=>{const _0x1e5d28=_0x40ca2d['getAttribute']('footnoteCounter');return _0x285831(D(_0x40ca2d,_0x366d86),_0x366d86,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x1e5d28)});}});}['_defineDefinitionsConverters'](){const {editor:_0x53deb3}=this,{t:t}=_0x53deb3['locale'],{conversion:_0x541971}=_0x53deb3;_0x541971['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x541971['for']('upcast')['add'](_0xc79255=>{_0xc79255['on']('element:ol',(_0x4b55b8,_0x23b1a4,_0x35f59b)=>{const _0x447fc0=_0x23b1a4['viewItem'];if(!_0x447fc0['hasClass']('footnotes-list')||!_0x23b1a4['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x35f59b['consumable']['consume'](_0x447fc0,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x580124,modelCursor:_0x865b43}=_0x35f59b['convertChildren'](_0x23b1a4['viewItem'],_0x23b1a4['modelCursor']);_0x23b1a4['modelRange']=_0x580124,_0x23b1a4['modelCursor']=_0x865b43;}),_0xc79255['on']('element:hr',(_0x53c497,_0x324d34,_0x288169)=>{const _0x239051=_0x324d34['viewItem'];_0x239051['hasClass']('footnotes-divider')&&_0x324d34['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x288169['consumable']['consume'](_0x239051,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x541971['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x10e949,{writer:_0x526760})=>v(_0x526760)}),_0x541971['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x51a149,{writer:_0x5781e9})=>{const _0x4dac4b=v(_0x5781e9,{'data-footnotes-list-label':t('Footnotes')}),_0x6e7999=_0x285831(_0x4dac4b,_0x5781e9,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x5781e9['setCustomProperty']('footnotesDefinitions',!0x0,_0x6e7999),_0x6e7999;}});}['_defineDefinitionConverters'](){const {editor:_0x261df1}=this,{conversion:_0x239c66,locale:_0x3fd523}=_0x261df1,_0x1b797d=_0x261df1['config']['get']('footnotes.multiBlock');_0x239c66['for']('upcast')['add'](_0x49239d=>{_0x49239d['on']('element:li',(_0x577402,_0x440e52,_0x26d707)=>{const _0x36102a=_0x440e52['viewItem'];if(!_0x36102a['hasClass']('footnote-definition')||!_0x36102a['getAttribute']('id'))return;const _0x321c3d=_0x36102a['parent'];if(!_0x321c3d['is']('element','ol')||!_0x321c3d['hasClass']('footnotes-list'))return;if(!_0x26d707['consumable']['test'](_0x36102a,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x3e1c83=_0x26d707['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x36102a['getAttribute']('id')});if(!_0x26d707['safeInsert'](_0x3e1c83,_0x440e52['modelCursor']))return;_0x26d707['consumable']['consume'](_0x36102a,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x5ec3ed=Array['from'](_0x36102a['getChildren']())['find'](_0x12331b=>_0x12331b['is']('element')&&_0x12331b['hasClass']('footnote-content'));for(const _0x164a72 of _0x36102a['getChildren']())_0x164a72['is']('element')&&(_0x26d707['consumable']['consume'](_0x164a72,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x26d707['consumable']['consume'](_0x164a72,{'name':!0x0,'classes':'footnote-content'}));if(_0x5ec3ed){if(_0x1b797d)_0x26d707['convertChildren'](_0x5ec3ed,_0x3e1c83);else{const _0x152183=_0x26d707['writer']['createElement']('footnoteInlineContent');_0x26d707['writer']['insert'](_0x152183,_0x3e1c83),_0x26d707['convertChildren'](_0x5ec3ed,_0x152183);}}_0x26d707['updateConversionResult'](_0x3e1c83,_0x440e52);});}),_0x239c66['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x147e53,{writer:_0x2ee1ce})=>b(_0x147e53,_0x2ee1ce,_0x3fd523,{'dataPipeline':!0x0})}),_0x239c66['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x5934c3,{writer:_0x38dc83})=>b(_0x5934c3,_0x38dc83,_0x3fd523)});}['_defineBogusParagraphConverters'](){const {editor:_0x31e150}=this,{conversion:_0x50762f}=_0x31e150;_0x31e150['config']['get']('footnotes.multiBlock')?(_0x50762f['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':h(),'converterPriority':'high'}),_0x50762f['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':h({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x31e150['model']['document'],'change:data',()=>{!function(_0x173d8f,_0x248823){const _0x2eeba8=_0x173d8f['document']['differ'],_0x15a524=new Set();for(const _0x46daec of _0x2eeba8['getChanges']()){const _0x177954='attribute'==_0x46daec['type']?_0x46daec['range']['start']['parent']:_0x46daec['position']['parent'];_0x177954['is']('element','footnoteDefinition')&&_0x15a524['add'](_0x177954);}for(const _0x273ee6 of _0x15a524['values']()){const _0x370eaf=Array['from'](_0x273ee6['getChildren']())['filter'](_0x5479d4=>g(_0x5479d4,_0x248823['mapper']));for(const _0x1d9b59 of _0x370eaf)_0x248823['reconvertItem'](_0x1d9b59);}}(_0x31e150['model'],_0x31e150['editing']);})):(_0x50762f['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':h()}),_0x50762f['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x1983b4,{writer:_0xc80382})=>{const _0x386ad6=_0xc80382['createContainerElement']('span');return _0xc80382['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x386ad6),_0x386ad6;}}));}['_defineKeyboardHandlers'](){const {editor:_0x542ee8}=this,{editing:_0x9ca2d8,t:t}=_0x542ee8,_0x147c05=_0x542ee8['model']['document']['selection'];_0x542ee8['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0x542ee8['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0x9ca2d8['view']['document'],'enter',(_0x1894ab,_0x2e8308)=>{const _0x254e39=function(_0x1296fc){const _0x48499f=_0x1296fc['getSelectedElement']();if(_0x48499f?.['is']('element','footnoteRef'))return _0x48499f;return null;}(_0x147c05);if(_0x254e39){const _0x356e6a=_0x254e39['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x356e6a),_0x2e8308['preventDefault'](),_0x1894ab['stop']();}},{'context':_0x174841});}['_defineClickHandlers'](){const {editor:_0x3e58eb}=this,{editing:_0x83387d}=_0x3e58eb;_0x3e58eb['editing']['view']['addObserver'](_0x9de2c),_0x3e58eb['editing']['view']['addObserver'](_0xb6410d);let _0x5e8573=!0x1;this['listenTo'](_0x83387d['view']['document'],'pointerdown',(_0x334b2f,_0x4f3898)=>{const {target:_0x1e7597}=_0x4f3898,_0x568e4d=_0x83387d['view']['document']['selection'];_0x5e8573=!!(_0x1e7597?.['is']('element','a')&&_0x1e7597['parent']?.['is']('element','sup')&&_0x1e7597['parent']['hasClass']('footnote'))&&_0x568e4d['getSelectedElement']()===_0x1e7597['parent'];},{'priority':'high'}),this['listenTo'](_0x83387d['view']['document'],'click',(_0x482811,_0x52d541)=>{const {target:_0xd2e97}=_0x52d541;if(!_0xd2e97?.['is']('element','a'))return;if(_0xd2e97['parent']?.['is']('element','sup')&&_0xd2e97['parent']['hasClass']('footnote')&&!_0x5e8573)return void _0x52d541['preventDefault']();let _0x27110e=_0xd2e97['getAttribute']('href');if(!_0x27110e?.['startsWith']('#'))return;_0x27110e=_0x27110e['slice'](0x1);let _0x4d9358=!0x1;(_0x27110e['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x27110e['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x27110e))&&(_0x4d9358=!0x0),_0x4d9358&&(_0x52d541['preventDefault'](),_0x482811['stop']());},{'priority':'high','context':'$capture'});}}function h({dataPipeline:_0x450d49}={}){return(_0x182294,{writer:_0x84c8f3})=>{if(!p(_0x182294))return null;if(!_0x450d49)return _0x84c8f3['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x21b496=_0x84c8f3['createContainerElement']('p');return _0x84c8f3['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x21b496),_0x21b496;};}function p(_0x17f163){const {parent:_0x219572}=_0x17f163;if(!_0x219572?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x219572['childCount'])return!0x1;for(const _0x118186 of _0x17f163['getAttributeKeys']())if(!_0x118186['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x118186)return!0x1;return!0x0;}function g(_0x3f559f,_0x4dfc06){if(!_0x3f559f['is']('element','paragraph'))return!0x1;const _0x226f1f=_0x4dfc06['toViewElement'](_0x3f559f);return!!_0x226f1f&&p(_0x3f559f)!==_0x226f1f['is']('element','span');}export function isFootnotesDefinitionsWidget(_0x5d4093){return _0x174841(_0x5d4093)&&_0x5d4093['is']('containerElement')&&!!_0x5d4093['getCustomProperty']('footnotesDefinitions');}function v(_0x45d931,_0x2b2a26={}){const _0x3f62ff=_0x45d931['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x51cf97=_0x45d931['createContainerElement']('ol',{'class':'footnotes-list'},_0x45d931['createSlot']());return _0x45d931['createContainerElement']('div',{'class':'footnotes',..._0x2b2a26},[_0x3f62ff,_0x51cf97]);}function D(_0x2926c8,_0x2f853c){const _0x417ae6=_0x2926c8['getAttribute']('footnoteId'),_0x1d2b02=_0x2926c8['getAttribute']('footnoteCounter'),_0x1ac7f7=_0x2f853c['createUIElement']('a',{'href':'#'+_0x417ae6},function(_0x18c1b5){const _0x5e6488=this['toDomElement'](_0x18c1b5);return _0x5e6488['textContent']=_0x1d2b02,_0x5e6488;}),_0x55e9b5=_0x2f853c['createContainerElement']('sup',{'id':'ref-'+_0x417ae6,'class':'footnote'},[_0x1ac7f7]);return _0x55e9b5['getFillerOffset']=()=>null,_0x55e9b5;}function b(_0x3aa48a,_0x15d925,_0x59ecbd,{dataPipeline:_0x4152f4}={}){const {t:t}=_0x59ecbd,_0x5ca40f=_0x3aa48a['getAttribute']('footnoteId'),_0x63866b=_0x15d925['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x5ca40f},function(_0xf288c6){const _0x95f817=this['toDomElement'](_0xf288c6);return _0x95f817['innerText']='^',_0x95f817;}),_0x2be7ed=_0x4152f4?_0x15d925['createContainerElement']('div',{'class':'footnote-content'}):_0x28c73e(_0x15d925['createEditableElement']('div',{'class':'footnote-content'}),_0x15d925,{'label':t('Footnote\x20content.')});return _0x15d925['insert'](_0x15d925['createPositionAt'](_0x2be7ed,0x0),_0x15d925['createSlot']()),_0x15d925['createContainerElement']('li',{'class':'footnote-definition','id':_0x5ca40f},[_0x63866b,_0x2be7ed]);}
|