@ckeditor/ckeditor5-footnotes 47.6.1-alpha.0 → 47.6.1

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.
Files changed (164) hide show
  1. package/build/footnotes.js +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +9 -9
  150. package/src/commands/insertfootnotecommand.js +1 -1
  151. package/src/footnotes.js +1 -1
  152. package/src/footnotesclipboard.js +1 -1
  153. package/src/footnotesediting.js +1 -1
  154. package/src/footnotesproperties/commands/footnotesstartcommand.js +1 -1
  155. package/src/footnotesproperties/commands/footnotesstylecommand.js +1 -1
  156. package/src/footnotesproperties/footnotespropertiesconfig.js +1 -1
  157. package/src/footnotesproperties/footnotespropertiesediting.js +1 -1
  158. package/src/footnotesproperties/footnotespropertiesui.js +1 -1
  159. package/src/footnotesproperties/ui/footnotesdefinitionspropertiesview.js +1 -1
  160. package/src/footnotesproperties.js +1 -1
  161. package/src/footnotestracker.js +1 -1
  162. package/src/footnotesui.js +1 -1
  163. package/src/index.js +1 -1
  164. package/src/modelelementtracker.js +1 -1
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var t={102:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},237:t=>{"use strict";t.exports=CKEditor5.dll},291:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r},297:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,i){var s;if(n)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=o(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,o=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},331:(t,e,o)=>{t.exports=o(237)("./src/clipboard.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},728:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(t,o,n,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},901:(t,e,o)=>{t.exports=o(237)("./src/widget.js")},929:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=o(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,n);n.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var o=e.domAPI(e);o.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var s=n(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=o(s[r]);e[a].references--}for(var c=n(t,i),l=0;l<s.length;l++){var u=o(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Footnotes:()=>$,FootnotesClipboard:()=>_,FootnotesEditing:()=>v,FootnotesProperties:()=>At,FootnotesPropertiesEditing:()=>gt,FootnotesPropertiesUI:()=>Ft,FootnotesStartCommand:()=>dt,FootnotesStyleCommand:()=>ct,FootnotesTracker:()=>d,FootnotesUI:()=>q,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);function r(){const t=["insert","829831tWYrWw","elementName","from","flat","attributes","rootName","root","clear","type","getItems","reset","2466atQZKN","has","slice","1135965arwmtV","6337842BMnRpQ","getElementKey","push","2121162QbvudB","add","$graveyard","element","set","length","_getElementKey","values","name","getChanges","createRangeOn","delete","_model","_elementName","4kltAbe","remove","_trackedElements","1275745KlBPWt","985226cGRRpR","$text","58712aXXHli","nodeAfter","get","position"];return(r=function(){return t})()}const a=c;function c(t,e){const o=r();return(c=function(t,e){return o[t-=101]})(t,e)}!function(t){const e=c,o=t();for(;;)try{if(455367===parseInt(e(113))/1+-parseInt(e(106))/2+-parseInt(e(127))/3*(parseInt(e(102))/4)+-parseInt(e(105))/5+-parseInt(e(131))/6+-parseInt(e(128))/7+parseInt(e(108))/8*(parseInt(e(124))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(r);class l{[a(143)];[a(101)];[a(137)];[a(104)]=new Map;constructor(t,e){const o=a;this[o(143)]=t,this[o(101)]=e[o(114)],this[o(137)]=e[o(129)]}[a(123)](){const t=a;this[t(104)][t(120)]()}[a(140)](t){const e=a,o=new Set,n=new Map;for(const i of t){if(e(112)===i[e(121)]&&e(107)!==i[e(139)]&&i[e(111)][e(109)]){const t=this[e(143)][e(141)](i[e(111)][e(109)]);for(const o of t[e(122)]()){if(!o.is(e(134),this[e(101)]))continue;const t=this[e(137)](o);n[e(125)](t)||n[e(135)](t,[]),n[e(110)](t)[e(130)](o)}}if(e(103)===i[e(121)]&&i[e(139)]===this[e(101)]){const t=this[e(137)]({getAttribute:t=>i[e(117)][e(110)](t)});o[e(132)](t)}}for(const[t,n]of this[e(104)])e(133)===n[e(119)][e(118)]&&o[e(132)](t);for(const t of o)this[e(104)][e(142)](t);for(const[t,o]of n)this[e(104)][e(135)](t,o[o[e(136)]-1]);const i=new Set;for(const[t,s]of n)o[e(125)](t)&&(i[e(132)](s[0]),s[e(136)]>1?n[e(135)](t,s[e(126)](1)):n[e(142)](t),o[e(142)](t));return{removed:Array[e(115)](o),inserted:Array[e(115)](n[e(138)]())[e(116)](),moved:Array[e(115)](i)}}}function u(t,e){const o=p();return(u=function(t,e){return o[t-=255]})(t,e)}const f=u;!function(t){const e=u,o=t();for(;;)try{if(421360===parseInt(e(282))/1*(parseInt(e(317))/2)+-parseInt(e(262))/3+-parseInt(e(257))/4*(-parseInt(e(286))/5)+parseInt(e(285))/6*(-parseInt(e(289))/7)+-parseInt(e(352))/8*(-parseInt(e(284))/9)+-parseInt(e(281))/10+-parseInt(e(263))/11*(parseInt(e(345))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(p);class d extends t.Plugin{[f(343)]=[];[f(332)]=null;[f(355)]=null;[f(347)];[f(308)];[f(259)];static get[f(339)](){return f(264)}static get[f(266)](){return!0}static get[f(303)](){return!0}constructor(t){const e=f;super(t),this[e(347)]=new l(this[e(307)][e(302)],{elementName:e(341),getElementKey:()=>e(318)}),this[e(308)]=new l(this[e(307)][e(302)],{elementName:e(276),getElementKey:t=>t[e(283)](e(349))}),this[e(259)]=new l(this[e(307)][e(302)],{elementName:e(274),getElementKey:t=>t[e(283)](e(349))})}[f(288)](){const t=f,{editor:e}=this,{model:o,data:n}=e;o[t(350)][t(327)](e=>{const n=t,i=o[n(350)][n(313)][n(329)]();let s=!1;return this[n(334)](e,i)&&(s=!0),this[n(310)](e,i)&&(s=!0),this[n(311)](e,i)&&(s=!0),this[n(301)](e)&&(s=!0),this[n(277)](e)&&(s=!0),this[n(336)](e)&&(s=!0),s}),this[t(331)](o[t(350)],t(316),()=>{const e=t;o[e(305)]({isUndoable:!1},t=>{this[e(290)](t)})},{priority:t(265)}),this[t(331)](n,t(273),()=>{const e=t;this[e(343)]=[],this[e(347)][e(314)](),this[e(308)][e(314)](),this[e(259)][e(314)]()},{priority:t(295)})}[f(298)](){return this[f(332)]}[f(324)](t){const e=f;return this[e(343)][e(287)](e=>e.id===t)||null}[f(335)](){const t=f;return Array[t(321)](this[t(343)])}[f(342)](){return this[f(355)]}[f(353)](t){this[f(355)]=t}[f(291)](t,e=0){const o=f;let n=!1;for(let i=e;i<this[o(343)][o(304)];i++)this[o(260)](t,i)&&(n=!0);return n}[f(330)](t,e){const o=f,n=t[o(299)](o(341),{});return t[o(297)](n,e),this[o(332)]=n,n}[f(290)](t){const e=f;if(!this[e(343)][e(304)]||this[e(332)])return;const o=this[e(343)][0][e(354)][e(333)],n=this[e(330)](t,o);for(const o of this[e(343)])o[e(256)][e(328)]||t[e(294)](o[e(256)],n,e(279));this[e(291)](t)}[f(334)](t,e){const o=f;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(347)][o(329)](e);if(r[o(304)]&&(this[o(332)]=r[0]),i[o(304)])if(i[o(304)]>1||this[o(332)]&&i[o(278)](t=>t!==this[o(332)])){const e=t[o(299)](o(341),{}),s=[];this[o(332)]&&s[o(309)](this[o(332)]),s[o(309)](...i),t[o(294)](e,s[0],o(312));for(const n of s)t[o(270)](t[o(319)](n),t[o(357)](e,o(279))),t[o(267)](n);this[o(332)]=e,this[o(291)](t),n=!0}else this[o(332)]=i[0];if(s[o(304)]&&o(292)===this[o(332)]?.[o(333)][o(337)]){for(const e of this[o(343)])t[o(267)](e[o(354)]),n=!0;this[o(343)]=[],this[o(332)]=null}return n}[f(310)](t,e){const o=f;let n=!1;const i=this[o(307)][o(258)][o(356)](o(269)),{inserted:s,moved:r}=this[o(259)][o(329)](e);for(const e of[...r,...s]){const s=e[o(283)](o(349)),r=this[o(324)](s);r&&(r[o(256)]=e),h(t,i,e)&&(n=!0)}return n}[f(311)](t,e){const o=f;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(308)][o(329)](e);for(const e of i)this[o(306)](t,e)&&(n=!0);for(const e of s)this[o(315)](t,e)&&(n=!0);for(const e of r)this[o(348)](t,e)&&(n=!0);return n}[f(277)](t){const e=f;if(!this[e(332)])return!1;let o=!1;if(this[e(332)][e(338)]!==this[e(343)][e(304)]){const n=[];for(const t of this[e(332)][e(261)]()){const i=t[e(283)](e(349));this[e(324)](i)||(n[e(323)](t),o=!0)}for(const o of n)t[e(267)](o)}const n=new Set,i=[];for(const t of this[e(332)][e(261)]()){const s=t[e(283)](e(349));n[e(300)](s)?(i[e(323)](t),o=!0):n[e(340)](s)}for(const o of i)t[e(267)](o);return this[e(332)][e(338)]||(t[e(267)](this[e(332)]),this[e(332)]=null,o=!0),o}[f(315)](t,e){const o=f;if(this[o(343)][o(287)](t=>t[o(354)]===e))return!1;let n=!1;const i=e[o(283)](o(349)),s=this[o(343)][o(255)](t=>t.id===i);-1!==s&&(t[o(267)](this[o(343)][s][o(354)]),this[o(343)][o(344)](s,1),n=!0);let r=this[o(332)]?function(t,e){const n=o;for(const o of t[n(261)]())if(o[n(283)](n(349))===e)return o;return null}(this[o(332)],i):null;r||(r=t[o(299)](o(274),{footnoteId:i}),this[o(332)]&&(t[o(294)](r,this[o(332)],o(279)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(307)][o(302)],this[o(343)],e);this[o(343)][o(344)](c,0,a);let l=c;return-1!==s&&(l=Math[o(271)](c,s)),this[o(291)](t,l)&&(n=!0),n}[f(306)](t,e){const o=f,n=this[o(343)][o(255)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(343)][n];return o(292)!==s[o(256)][o(333)][o(337)]&&(t[o(267)](s[o(256)]),i=!0),this[o(343)][o(344)](n,1),this[o(291)](t,n)&&(i=!0),i}[f(348)](t,e){const o=f,n=e[o(283)](o(349)),i=this[o(343)][o(255)](t=>t.id===n),s=this[o(343)][i];let r=!1;s[o(354)]=e,this[o(343)][o(344)](i,1);const a=m(this[o(307)][o(302)],this[o(343)],e);return this[o(343)][o(344)](a,0,s),this[o(291)](t,Math[o(271)](i,a))&&(r=!0),r}[f(260)](t,e){const o=f;if(!this[o(332)])return!1;const n=this[o(343)][e];let i;return i=this[o(355)]?this[o(355)]({footnote:n,container:this[o(332)],digits:String(this[o(343)][o(304)])[o(304)],value:e+1}):String(e+1),n[o(354)][o(283)](o(351))!=i&&(t[o(293)](o(351),i,n[o(354)]),!0)}[f(336)](t){const e=f;if(!this[e(332)]||this[e(343)][e(304)]<2)return!1;if(function(t,o){const n=e;if(t[n(304)]!==o[n(304)])return!1;for(let e=0;e<t[n(304)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(343)][e(346)](t=>t.id),Array[e(321)](this[e(332)][e(261)]())[e(346)](t=>t[e(283)](e(349)))))return!1;let o=!1;for(let n=0;n<this[e(343)][e(304)];n++){const i=this[e(343)][n],s=t[e(296)](i[e(256)]),r=t[e(357)](this[e(332)],n);s[e(320)](r)||(t[e(270)](t[e(272)](i[e(256)]),r),o=!0)}return o}[f(301)](t){const e=f;if(!this[e(343)][e(304)])return!1;const{model:o}=this[e(307)];let n=!1;for(let i=0;i<this[e(343)][e(304)]-1;i++){const s=this[e(343)][i],r=this[e(343)][i+1],a=o[e(296)](s[e(354)]),c=o[e(296)](r[e(354)]);e(268)===a[e(325)](c)&&(this[e(348)](t,s[e(354)]),i=-1,n=!0)}return n}}function p(){const t=["795580IUHdhE","find","init","197435rvMmya","_ensureFootnotesDefinitionsContainerExists","_updateFootnotesCounters","$graveyard","setAttribute","insert","high","createPositionBefore","append","getFootnotesDefinitionsObjectElement","createElement","has","_ensureFootnotesReferencesHaveProperOrder","model","isPremiumPlugin","length","enqueueChange","_handleRemoveFootnoteReferenceById","editor","_footnoteRefsTracker","push","_handleFootnoteDefinitionsChanges","_handleFootnoteReferencesChanges","before","differ","reset","_handleInsertedFootnoteReference","change:data","38qStKro","singleton","createRangeIn","isEqual","from","footnoteInlineContent","unshift","getFootnote","compareWith","paragraph","registerPostFixer","parent","getChanges","_insertEmptyFootnotesDefinitionsContainer","listenTo","_footnotesDefinitions","root","_handleFootnotesDefinitionsObjectChanges","getFootnotes","_sortFootnoteDefinitions","rootName","childCount","pluginName","add","footnotesDefinitions","getFootnotesFormatter","_footnotes","splice","21324vxNlBu","map","_footnoteDefsContainerTracker","_handleMovedFootnoteReference","footnoteId","document","footnoteCounter","5624ShyHQr","setFootnoteFormatter","reference","_footnoteFormatter","get","createPositionAt","findIndex","definition","20GZtYzx","config","_footnoteDefsTracker","_updateFootnoteRefCounter","getChildren","2169960PIMvpw","121FkGBzO","FootnotesTracker","low","isOfficialPlugin","remove","after","footnotes.multiBlock","move","min","createRangeOn","set","footnoteDefinition","getRootNames","footnoteRef","_handleFootnotesDefinitionsObjectSync","some","end","indexOf","2438740fURtYz","13555DbApwS","getAttribute","10683QeqpdB","102jqGiwo"];return(p=function(){return t})()}function h(t,e,o){const n=f;if(o[n(338)])return!1;const i=n(e?326:322);return t[n(294)](t[n(299)](i),o),!0}function m(t,e,o){const n=f;if(0===e[n(304)])return 0;const i=t[n(296)](o);for(let o=0;o<e[n(304)];o++){const s=e[o],r=t[n(296)](s[n(354)]);if(n(312)===i[n(325)](r))return o}const s=o[n(333)];let r=-1;for(let t=e[n(304)]-1;t>=0;t--)if(e[t][n(354)][n(333)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(350)][n(275)](),c=a[n(280)](s[n(337)]),l=a[c+1];if(l)for(let t=0;t<e[n(304)];t++)if(e[t][n(354)][n(333)][n(337)]===l)return t;return e[n(304)]}function g(){const t=["plugins","insertObject","getItems","model","isObject","312141NBpWIP","88496yuFOZE","footnoteId","createElement","_moveSelectionToFootnoteDefinition","refresh","1901313dPAjUu","350ZhJnvc","145166GaJSHa","execute","footnoteRef","length","543665OtadjL","9xuWDRA","FootnotesEditing","_getPositionToInsertFootnote","document","insert-footnote-command-executed-with-invalid-id","change","string","334280WRofJV","getFirstRange","checkChild","64LPbJqZ","get","106403gkmsxK","editor","test","isBlock","6TQQmmP","selection","isEnabled","end"];return(g=function(){return t})()}function w(t,e){const o=g();return(w=function(t,e){return o[t-=391]})(t,e)}const y=w;!function(t){const e=w,o=t();for(;;)try{if(213976===parseInt(e(406))/1+-parseInt(e(407))/2*(-parseInt(e(419))/3)+-parseInt(e(426))/4+-parseInt(e(418))/5*(parseInt(e(397))/6)+-parseInt(e(414))/7*(parseInt(e(391))/8)+-parseInt(e(412))/9+parseInt(e(413))/10*(parseInt(e(393))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(g);class b extends t.Command{[y(411)](){const t=y,e=this[t(394)][t(404)][t(422)][t(398)],o=this[t(421)](e);this[t(399)]=!!o}[y(415)](t){const e=y,{editor:o}=this,{model:n}=o,{selection:s}=n[e(422)],r=this[e(421)](s);if(!r)return;const a=o[e(401)][e(392)](e(420)),c=t?.[e(408)]??(0,i.uid)();!function(t){const o=e;return o(425)==typeof t&&t[o(417)]>0&&!/\s/[o(395)](t)&&!/^\d/[o(395)](t)}(c)?(0,i.logWarning)(e(423)):(n[e(424)](t=>{const o=e,i=t[o(409)](o(416),{footnoteId:c});n[o(402)](i,r,null)}),a[e(410)](c))}[y(421)](t){const e=y,{model:o}=this[e(394)],{schema:n}=o,i=t[e(427)]();for(const t of i[e(403)]())if(n[e(396)](t)||n[e(405)](t))return null;const s=i[e(400)];return n[e(428)](s,e(416))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=h([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),o=window[h([68,97,116,101])][h([110,111,119])](),n=t[h([101,100,105,116,111,114])],s=new(window[h([80,114,111,109,105,115,101])])(t=>{n[h([111,110,99,101])](h([114,101,97,100,121]),t)}),r={[h([107,116,121])]:h([69,67]),[h([117,115,101])]:h([115,105,103]),[h([99,114,118])]:h([80,45,50,53,54]),[h([120])]:h([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[h([121])]:h([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[h([97,108,103])]:h([69,83,50,53,54])},a=n[h([99,111,110,102,105,103])][h([103,101,116])](h([108,105,99,101,110,115,101,75,101,121]));function c(t){return t[h([115,116,97,114,116,115,87,105,116,104])](h([101,121]))?JSON[h([112,97,114,115,101])](l(t)):null}function l(t){return window[h([97,116,111,98])](t[h([114,101,112,108,97,99,101])](/-/g,h([43]))[h([114,101,112,108,97,99,101])](/_/g,h([47])))}function u(t){let e=5381;function o(t){for(let o=0;o<t[h([108,101,110,103,116,104])];o++){const n=t[h([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[h([105,115,65,114,114,97,121])](e)?e[h([102,111,114,69,97,99,104])](t):e&&typeof e==h([111,98,106,101,99,116])?Object[h([101,110,116,114,105,101,115])](e)[h([115,111,114,116])]()[h([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[h([83,116,114,105,110,103])](e))}(t),e>>>0}function f(t){return t[h([116,111,83,116,114,105,110,103])](16)[h([112,97,100,83,116,97,114,116])](8,h([48]))}function d(t){return t[h([115,112,108,105,116])]("")[h([114,101,118,101,114,115,101])]()[h([106,111,105,110])]("")}function p(){}function h(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[h([83,116,114,105,110,103])](window[h([112,101,114,102,111,114,109,97,110,99,101])][h([110,111,119])]())[h([114,101,112,108,97,99,101])](h([46]),"");let o=h([117]);for(let n=0;n<t[h([108,101,110,103,116,104])];n+=2){let i=window[h([112,97,114,115,101,73,110,116])](t[h([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[h([108,101,110,103,116,104])]&&(i-=e[h([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=h([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=h([86,97,108,105,100])&&async function(){await s,n[h([109,111,100,101,108])][h([99,104,97,110,103,101])]=p,n[h([109,111,100,101,108])][h([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,n[h([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](h([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==h([71,80,76])?h([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[h([115,112,108,105,116])](h([46]));return 3!=t[h([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=c(t);return e&&o()?e:null;function o(){const t=e[h([106,116,105])],o=window[h([112,97,114,115,101,73,110,116])](t[h([115,117,98,115,116,114,105,110,103])](t[h([108,101,110,103,116,104])]-8),16),n={...e,[h([106,116,105])]:t[h([115,117,98,115,116,114,105,110,103])](0,t[h([108,101,110,103,116,104])]-8)};return delete n[h([118,99])],u(n)==o}}}(),t?(t[h([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[h([80,114,111,109,105,115,101])])(c=>{if(r())return c(h([86,97,108,105,100]));a(),n[h([100,101,99,111,114,97,116,101])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const p=(0,i.uid)();function m(t){return!!t&&(typeof t===h([111,98,106,101,99,116])||typeof t===h([102,117,110,99,116,105,111,110]))&&typeof t[h([116,104,101,110])]===h([102,117,110,99,116,105,111,110])&&typeof t[h([99,97,116,99,104])]===h([102,117,110,99,116,105,111,110])}function g(n){a(n)[h([116,104,101,110])](t=>t&&t[h([115,116,97,116,117,115])]==h([111,107])?f(u(p+e))!=t[h([118,101,114,105,102,105,99,97,116,105,111,110])]?h([85,115,97,103,101,76,105,109,105,116]):h([86,97,108,105,100]):h([85,115,97,103,101,76,105,109,105,116]))[h([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),h([86,97,108,105,100])):h(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[h([116,104,101,110])](c)[h([99,97,116,99,104])](()=>{c(h([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=h([108,108,99,116,45])+f(u(t)),n=d(f(window[h([77,97,116,104])][h([99,101,105,108])](o/i)));window[h([108,111,99,97,108,83,116,111,114,97,103,101])][h([115,101,116,73,116,101,109])](e,n)}function r(){const e=h([108,108,99,116,45])+f(u(t)),o=window[h([108,111,99,97,108,83,116,111,114,97,103,101])][h([103,101,116,73,116,101,109])](e);return o?window[h([112,97,114,115,101,73,110,116])](d(o),16)*i:null}function a(t){return new(window[h([80,114,111,109,105,115,101])])((e,o)=>{t[h([116,104,101,110])](e,o),window[h([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[h([111,110])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,o)=>{if(o[0]!=t)return c(h([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[h([114,101,113,117,101,115,116,73,100])]:p}},{[h([112,114,105,111,114,105,116,121])]:h([104,105,103,104])}),n[h([111,110])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{m(t[h([114,101,116,117,114,110])])&&(l=!0,g(t[h([114,101,116,117,114,110])]))},{[h([112,114,105,111,114,105,116,121])]:h([108,111,119])}),s[h([116,104,101,110])](()=>{l||c(h([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[h([101,100,105,116,105,110,103])][h([118,105,101,119])][h([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==h([97,117,116,111])}function a(){n[h([101,100,105,116,105,110,103])][h([118,105,101,119])][h([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=h([97,117,116,111])}}(t[h([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[h([106,116,105])])),await async function(){let t=!0;try{const n=a[h([115,112,108,105,116])](h([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=c(e);o&&o[h([97,108,103])]==h([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[h([85,105,110,116,56,65,114,114,97,121])][h([102,114,111,109])](l(n),t=>t[h([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[h([84,101,120,116,69,110,99,111,100,101,114])]))[h([101,110,99,111,100,101])](e+h([46])+o),a=window[h([99,114,121,112,116,111])][h([115,117,98,116,108,101])];if(!a)return;const c=await a[h([105,109,112,111,114,116,75,101,121])](h([106,119,107]),r,{[h([110,97,109,101])]:h([69,67,68,83,65]),[h([110,97,109,101,100,67,117,114,118,101])]:h([80,45,50,53,54])},!1,[h([118,101,114,105,102,121])]);await a[h([118,101,114,105,102,121])]({[h([110,97,109,101])]:h([69,67,68,83,65]),[h([104,97,115,104])]:{[h([110,97,109,101])]:h([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[h([102,101,97,116,117,114,101,115])];return!(!e||!e[h([105,110,99,108,117,100,101,115])](h([42]))&&!e[h([105,110,99,108,117,100,101,115])](h([70,79,79])))}()?function(){const e=[h([101,118,97,108,117,97,116,105,111,110]),h([116,114,105,97,108])][h([105,110,99,108,117,100,101,115])](t[h([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1773100800;return t[h([101,120,112])]<e}()?h([69,120,112,105,114,101,100]):function(){const e=t[h([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[h([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[h([108,111,99,97,116,105,111,110])].href);if(e[h([105,110,99,108,117,100,101,115])](o))return!0;const n=o[h([115,112,108,105,116])](h([46]));return e[h([102,105,108,116,101,114])](t=>t[h([105,110,99,108,117,100,101,115])](h([42])))[h([109,97,112])](t=>t[h([115,112,108,105,116])](h([46])))[h([102,105,108,116,101,114])](t=>t[h([108,101,110,103,116,104])]<=n[h([108,101,110,103,116,104])])[h([109,97,112])](t=>Array(n[h([108,101,110,103,116,104])]-t[h([108,101,110,103,116,104])])[h([102,105,108,108])](t[0]===h([42])?h([42]):"")[h([99,111,110,99,97,116])](t))[h([115,111,109,101])](t=>n[h([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===h([42])))}()?(t[h([108,105,99,101,110,115,101,84,121,112,101])]==h([101,118,97,108,117,97,116,105,111,110])&&(e=function(t){const e=[new(window[h([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[h([116,104,101,110])](()=>new(window[h([80,114,111,109,105,115,101])])(t=>{let e=0;n[h([109,111,100,101,108])][h([111,110])](h([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][h([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,1512==e&&(t(),o[h([111,102,102])]())})}))];return window[h([80,114,111,109,105,115,101])][h([114,97,99,101])](e)[h([116,104,101,110])](()=>t)}(h([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),await(e&&p?new(window[h([80,114,111,109,105,115,101])])((t,o)=>{e[h([116,104,101,110])](t,o),p[h([116,104,101,110])](e=>{e!=h([86,97,108,105,100])&&t(e)},o)}):e||p||h([86,97,108,105,100]))):h([68,111,109,97,105,110,76,105,109,105,116]):h([78,111,116,65,108,108,111,119,101,100]):h([73,110,118,97,108,105,100])):h([73,110,118,97,108,105,100]))}catch{return h([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(d).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(d).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})=>S(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>S(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 S(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 D=P;function P(t,e){const o=T();return(P=function(t,e){return o[t-=325]})(t,e)}function T(){const t=["insert","push","6182330ZgmDGr","_defineClipboardIntegration","editing","entries","editor","toView","setData","init","_insertEmptyFootnotesDefinitionsContainer","createElement","length","root","pluginName","clipboardInput","getSelectedBlocks","create","footnoteDefinition","isPremiumPlugin","1890747pagEHm","application/ckeditor5-footnotes","stringify","166688XzJpsp","4359504TVEeNv","method","FootnotesClipboard","2582ZZKUOw","reduce","816GQAbsj","outputTransformation","from","config","htmlProcessor","document","listenTo","footnotes.multiBlock","flatMap","306513BwsIvV","get","footnotesDefinitions","getRanges","drop","string","getAttribute","50yhPDoM","sourceEditorId","getFootnotes","_handleCopyFootnotesDefinitions","111uzzaMU","getData","createRangeIn","cloneElement","footnoteInlineContent","getFootnotesDefinitionsObjectElement","append","dataTransfer","requires","remove","40ubplvO","getChildren","data","30737ZLYocJ","_handlePasteFootnotesDefinitions","includes","find","toModel","getFootnote","keys","hasAttribute","contentInsertion","content","parse","change","end","element","add","toData","isOfficialPlugin","setAttribute","definition","footnoteRef","getFirstRange","footnoteId","selection"];return(T=function(){return t})()}!function(t){const e=P,o=t();for(;;)try{if(489784===parseInt(e(391))/1*(-parseInt(e(369))/2)+parseInt(e(362))/3+-parseInt(e(365))/4*(parseInt(e(387))/5)+-parseInt(e(366))/6+-parseInt(e(404))/7*(-parseInt(e(371))/8)+parseInt(e(380))/9*(parseInt(e(401))/10)+parseInt(e(344))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(T);class _ extends t.Plugin{static get[D(356)](){return D(368)}static get[D(399)](){return[v,A.ClipboardPipeline]}static get[D(335)](){return!0}static get[D(361)](){return!0}[D(351)](){this[D(345)]()}[D(345)](){const t=D;this[t(390)](),this[t(405)]()}[D(390)](){const t=D,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(381)](A.ClipboardPipeline),s=o[t(381)](d);this[t(377)](i,t(372),(o,i)=>{const r=t,a=O(n[r(393)](i[r(328)]));if(!a[r(354)])return;const c=s[r(389)](),l=a[r(370)]((t,o)=>{const n=r,i=c[n(407)](t=>t.id===o);if(i){const o=e[n(403)][n(349)](i[n(337)],{isClipboardPipeline:!0}),s=e[n(403)][n(375)][n(334)](o);t[i.id]=s}return t},Object[r(359)](null));i[r(398)][r(350)](r(363),JSON[r(364)](l))})}[D(405)](){const t=D,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(346)],r=n[t(381)](A.ClipboardPipeline),a=n[t(381)](d),c=e[t(374)][t(381)](t(378));let l=null;this[t(377)](s[t(376)],t(357),(e,o)=>{const n=t,i=o[n(398)][n(392)](n(363));l=i?JSON[n(329)](i):null}),this[t(377)](r,t(327),(n,s)=>{const r=t,u=s[r(388)]===this[r(348)].id;u&&r(384)===s[r(367)]||o[r(330)](t=>{const n=r;let f=a[n(396)]();const d=!!f&&Array[n(373)](o[n(376)][n(341)][n(358)]())[n(406)](f);if(!l&&function(t){const e=n;for(const{item:o}of t)if(o.is(e(332),e(338)))return!0;return!1}(o[n(393)](s[n(328)]))&&(l=function(t,e){const o=n,i=L(t,e);if(!i)return null;const s=Object[o(359)](null);for(const e of i[o(402)]())e.is(o(332),o(360))&&e[o(326)](o(340))&&(s[e[o(386)](o(340))]=t[o(394)](e,!0));return Object[o(325)](s)[o(354)]?s:null}(t,s[n(328)])),(f&&!d||!f&&!l)&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(393)](e))n.is(o(332),o(382))&&i[o(343)](n);for(const e of i)t[o(400)](e)}(t,s[n(328)]),!l)return;const{selection:p}=o[n(376)],h=p[n(339)]()[n(355)];f&&!d||(f=L(t,s[n(328)]),f||=a[n(352)](t,h));const m=Array[n(373)](p[n(383)]())[n(379)](O),g=function(t,e,o){const s=n,r=Object[s(359)](null);for(const{item:n}of t[s(393)](e))if(n.is(s(332),s(338))){const e=n[s(386)](s(340));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(336)](s(340),r[e],n)}return r}(t,s[n(328)],t=>{const e=n;return!u||!!a[e(409)](t)&&!m[e(406)](t)});for(const[o,i]of Object[n(347)](l)){const s=g[o]||o;let r;if(n(385)!=typeof i)r=i,s!==o&&t[n(336)](n(340),s,r);else{r=t[n(353)](n(360),{footnoteId:s});const o=e[n(403)][n(375)][n(349)](i);let a;if(c)a=e[n(403)][n(408)](o,r);else{a=t[n(353)](n(395));const i=e[n(403)][n(408)](o,a);t[n(342)](i,a)}t[n(397)](a,r)}t[n(342)](r,f,n(331))}l=null})})}}function L(t,e){const o=D;for(const{item:n}of t[o(393)](e))if(n.is(o(332),o(382)))return n;return null}function O(t){const e=D,o=new Set;for(const{item:n}of t)n.is(e(332),e(338))&&o[e(333)](n[e(386)](e(340)));return Array[e(373)](o)}var V=o(311),N=o(355),R=o(929),K=o.n(R),j=o(297),B=o.n(j),M=o(102),z=o.n(M),U=o(123),W=o.n(U),H=o(741),G=o.n(H),J=o(728),Z={attributes:{"data-cke":!0}};Z.setAttributes=W(),Z.insert=z().bind(null,"head"),Z.domAPI=B(),Z.insertStyleElement=G();K()(J.A,Z);J.A&&J.A.locals&&J.A.locals;class q extends t.Plugin{licenseKey;_licenseKeyCheckInterval;static get pluginName(){return"FootnotesUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;e.add("insertFootnote",Y(t,V.ButtonView)),e.add("menuBar:insertFootnote",Y(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||"footnotesLicenseKeyUsageLimit"==i){delete o[n],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&o._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&o._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&o._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&o._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&o._showLicenseError("evaluationLimit"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function Y(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:N.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}function Q(t,e){var o=tt();return(Q=function(t,e){return o[t-=274]})(t,e)}var X=Q;!function(t){for(var e=Q,o=t();;)try{if(156331===-parseInt(e(283))/1*(parseInt(e(288))/2)+parseInt(e(281))/3*(parseInt(e(274))/4)+-parseInt(e(280))/5*(parseInt(e(279))/6)+-parseInt(e(276))/7*(parseInt(e(275))/8)+-parseInt(e(284))/9*(parseInt(e(282))/10)+parseInt(e(289))/11*(parseInt(e(278))/12)+parseInt(e(290))/13*(parseInt(e(277))/14))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(tt);class $ extends t.Plugin{static get[X(291)](){return X(285)}static get[X(292)](){return[v,_,q]}static get[X(287)](){return!0}static get[X(286)](){return!0}}function tt(){var t=["74863LKjjba","153tCwSdT","Footnotes","isPremiumPlugin","isOfficialPlugin","4UrBCOf","11NAxpLs","13lIAttl","pluginName","requires","260zRhXuj","8KwGspo","562849prAocj","4377352ixByjN","2083404xCqsHm","420510lfYzln","15OBQoCe","7563mNoRHE","31430xseUrY"];return(tt=function(){return t})()}const et=nt;function ot(){const t=["decimal","decimal-leading-zero","2ZaAtub","upper-alpha","upper-roman","655736hxouGE","upper-latin","lower-roman","7543683OYxsHy","1444096mSBGkm","2522780hXkrLJ","lower-alpha","2262600RDZJGr","289241ODjCmY","9QnDTHm","3421755HiFCbV","lower-latin"];return(ot=function(){return t})()}function nt(t,e){const o=ot();return(nt=function(t,e){return o[t-=151]})(t,e)}!function(t){const e=nt,o=t();for(;;)try{if(664990===parseInt(e(166))/1*(parseInt(e(155))/2)+-parseInt(e(151))/3+-parseInt(e(162))/4+parseInt(e(163))/5+parseInt(e(165))/6+parseInt(e(161))/7+parseInt(e(158))/8*(-parseInt(e(167))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ot);const it=[et(153),et(154),et(152),et(159),et(164),et(156),et(160),et(157)];function st(){const t=["setAttribute","isEnabled","execute","1858664DJKnGB","224253CZWYZf","includes","3576828GahDEV","2nkbibx","footnotesListStyle","8iElSuJ","get","model","value","change","plugins","getAttribute","1578579kSaaEG","refresh","6245110wLveZd","476693evoKYh","16715394yzJZvB","_updateFootnotesCounters","getFootnotesDefinitionsObjectElement"];return(st=function(){return t})()}const rt=at;function at(t,e){const o=st();return(at=function(t,e){return o[t-=308]})(t,e)}!function(t){const e=at,o=t();for(;;)try{if(686401===-parseInt(e(329))/1+parseInt(e(309))/2*(parseInt(e(318))/3)+parseInt(e(328))/4+parseInt(e(320))/5+parseInt(e(308))/6+-parseInt(e(321))/7+-parseInt(e(311))/8*(parseInt(e(322))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(st);class ct extends t.Command{[rt(319)](){const t=rt,{editor:e}=this,o=e[t(316)][t(312)](d)[t(324)]();this[t(326)]=!!o,this[t(314)]=o?.[t(317)](t(310))??null}[rt(327)]({value:t}){const e=rt,{editor:o}=this,n=o[e(316)][e(312)](d),i=n[e(324)]();i&&it[e(330)](t)&&o[e(313)][e(315)](o=>{const s=e;o[s(325)](s(310),t,i),n[s(323)](o)})}}const lt=ft;function ut(){const t=["11875500STfsDn","7239888wGFLlO","isEnabled","execute","change","model","1264510bJnMKn","plugins","isInteger","3167435OHaeCr","setAttribute","7fwSlcn","refresh","footnotesListStart","value","1325143Fjllpu","20716010TgBTFN","get","_updateFootnotesCounters","getAttribute","3QfyaXx","getFootnotesDefinitionsObjectElement","8EdtLyd","191370YgpCrr"];return(ut=function(){return t})()}function ft(t,e){const o=ut();return(ft=function(t,e){return o[t-=242]})(t,e)}!function(t){const e=ft,o=t();for(;;)try{if(770152===parseInt(e(258))/1+-parseInt(e(249))/2*(-parseInt(e(263))/3)+parseInt(e(265))/4*(parseInt(e(252))/5)+parseInt(e(242))/6+parseInt(e(254))/7*(parseInt(e(244))/8)+-parseInt(e(243))/9+-parseInt(e(259))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ut);class dt extends t.Command{[lt(255)](){const t=lt,{editor:e}=this,o=e[t(250)][t(260)](d)[t(264)]();this[t(245)]=!!o,this[t(257)]=o?.[t(262)](t(256))??null}[lt(246)]({value:t}){const e=lt,{editor:o}=this,n=o[e(250)][e(260)](d),i=n[e(264)]();i&&Number[e(251)](t)&&o[e(248)][e(247)](o=>{const s=e;o[s(253)](s(256),t,i),n[s(261)](o)})}}const pt=mt;function ht(){const t=["item","removeAttribute","isOfficialPlugin","position","setFootnoteFormatter","54291WPJYaG","hasAttribute","footnotes.footnotesProperties.defaultListStyle","commands","footnotesDefinitions","49672AmsUoj","5bAQSeb","define","footnotesListStart","padStart","differ","upcast","document","add","footnotesListStyle","createRangeOn","writer","getStyle","FootnotesPropertiesEditing","_definePostfixer","getChanges","footnotes.footnotesProperties.defaultStartIndex","_defineSchema","_getDefaultListStyle","_getDefaultStartIndex","extend","getItems","mapper","name","init","requires","get","1228416xvKnIq","consumable","70zOnnXi","max","footnotesStart","plugins","isPremiumPlugin","setStyle","for","decimal","getAttribute","3936273RYOODv","parseInt","lower-alpha","type","lower-roman","floor","consume","attribute:footnotesListStyle:footnotesDefinitions","list-style-type","toUpperCase","footnotes-list","registerPostFixer","lower-latin","_defineFormatter","nodeAfter","viewItem","setAttribute","downcast","element:ol","removeStyle","upper-alpha","modelCursor","decimal-leading-zero","pluginName","editor","model","find","config","from","389780IWBeet","parent","insert","179404CEtSOF","fromCharCode","start","getChildren","footnotesStyle","element","_defineConverters","2pTUrPj","upper-roman","isNaN","$text","89577rVwmhB","schema","toLowerCase","248AbGJaV","hasClass","_formatFootnoteListValue","attribute:footnotesListStart:footnotesDefinitions","upper-latin","checkAttribute","_updateFootnotesCounters","toViewElement"];return(ht=function(){return t})()}function mt(t,e){const o=ht();return(mt=function(t,e){return o[t-=388]})(t,e)}!function(t){const e=mt,o=t();for(;;)try{if(117328===-parseInt(e(390))/1+parseInt(e(397))/2*(-parseInt(e(417))/3)+-parseInt(e(489))/4*(parseInt(e(423))/5)+parseInt(e(449))/6+-parseInt(e(422))/7*(parseInt(e(404))/8)+parseInt(e(401))/9*(parseInt(e(451))/10)+parseInt(e(460))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ht);class gt extends t.Plugin{static get[pt(483)](){return pt(435)}static get[pt(447)](){return[v,d]}static get[pt(414)](){return!0}static get[pt(455)](){return!0}[pt(446)](){const t=pt,{editor:e}=this;e[t(487)][t(424)](t(419),t(458)),e[t(487)][t(424)](t(438),1),e[t(420)][t(430)](t(394),new ct(e)),e[t(420)][t(430)](t(453),new dt(e)),this[t(439)](),this[t(396)](),this[t(473)](),this[t(436)]()}[pt(439)](){const t=pt,{editor:e}=this,{schema:o}=e[t(485)];o[t(442)](t(421),{allowAttributes:[t(431),t(425)]})}[pt(396)](){const t=pt,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(457)](t(428))[t(430)](e=>{const o=t;e.on(o(478),(t,e,n)=>{const s=o,r=e[s(475)],a=e[s(481)]?.[s(388)];r[s(405)](s(470))&&a?.is(s(395),s(421))&&(function(t,e,o,n){const i=s;if(!n[i(409)](e,i(425)))return;let r=1;const a=o[i(450)][i(466)](t,{attributes:i(392)});if(a){const e=Number[i(461)](t[i(459)](i(392)),10);Number[i(399)](e)||(r=e)}!a&&e[i(418)](i(425))||o[i(433)][i(476)](i(425),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(409)](e,i(431)))return;let r=i(458),a=!1;if(o[i(450)][i(466)](t,{attributes:i(463)})){const e={1:i(458),a:i(462),A:i(480),i:i(464),I:i(398)}[t[i(459)](i(463))];e&&(r=e),a=!0}o[i(450)][i(466)](t,{styles:i(468)})&&(r=function(t){const e=i;switch(t){case e(462):return e(472);case e(480):return e(408);default:return t}}(t[i(434)](i(468))),a=!0),!a&&e[i(418)](i(431))||o[i(433)][i(476)](i(431),r,e)}(r,a,n,i))})}),o[t(457)](t(477))[t(430)](e=>{const o=t;e.on(o(407),(t,e,n)=>{const i=o;if(!n[i(450)][i(466)](e[i(412)],t[i(445)]))return;const s=wt(e[i(412)],n[i(444)]),{attributeNewValue:r}=e;null==r||1===r?n[i(433)][i(413)](i(392),s):n[i(433)][i(476)](i(392),String(r),s)}),e.on(o(467),(t,e,n)=>{const i=o;if(!n[i(450)][i(466)](e[i(412)],t[i(445)]))return;const s=wt(e[i(412)],n[i(444)]),{attributeNewValue:r}=e;r&&i(458)!==r?n[i(433)][i(456)](i(468),r,s):n[i(433)][i(479)](i(468),s)})})}[pt(436)](){const t=pt,{editor:e}=this,{model:o}=e,n=e[t(454)][t(448)](d),i=this[t(440)](),s=this[t(441)]();o[t(429)][t(471)](e=>{const r=t,a=o[r(429)][r(427)][r(437)]();let c=!1;for(const t of a){if(r(389)!==t[r(463)]||r(400)===t[r(445)])continue;const n=o[r(432)](t[r(415)][r(474)]);for(const t of n[r(443)]())t.is(r(395),r(421))&&(!t[r(418)](r(425))&&o[r(402)][r(409)](t,r(425))&&(e[r(476)](r(425),s,t),c=!0),!t[r(418)](r(431))&&o[r(402)][r(409)](t,r(431))&&(e[r(476)](r(431),i,t),c=!0))}return c&&n[r(410)](e),c})}[pt(473)](){const t=pt,{editor:e}=this;e[t(454)][t(448)](d)[t(416)](e=>this[t(406)](e))}[pt(440)](){const t=pt;return this[t(484)][t(487)][t(448)](t(419))}[pt(441)](){const t=pt;return this[t(484)][t(487)][t(448)](t(438))}[pt(406)]({container:t,value:e,digits:o}){const n=pt,i=t[n(459)](n(431)),s=t[n(459)](n(425)),r=Math[n(465)](e)+(s??1)-1;switch(i){case n(482):return function(t,e){const o=n;return String(t)[o(426)](e,"0")}(r,Math[n(452)](2,o));case n(462):case n(472):return yt(r,!1);case n(480):case n(408):return yt(r,!0);case n(464):return vt(r,!1);case n(398):return vt(r,!0);default:return String(r)}}}function wt(t,e){const o=pt,n=e[o(411)](t);return Array[o(488)](n[o(393)]())[o(486)](t=>t.is(o(395),"ol")&&t[o(405)](o(470)))}function yt(t,e){const o=pt;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(391)](97+t)+n,i=Math[o(465)]((i-1)/26)}return e?n[o(469)]():n}const bt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function vt(t,e){const o=pt;let n="",i=t;for(const{value:t,numeral:e}of bt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(403)]()}class It 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 kt=o(291),Ct={attributes:{"data-cke":!0}};Ct.setAttributes=W(),Ct.insert=z().bind(null,"head"),Ct.domAPI=B(),Ct.insertStyleElement=G();K()(kt.A,Ct);kt.A&&kt.A.locals&&kt.A.locals;class Ft extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[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:N.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:N.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:N.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:N.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:N.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:N.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:N.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 It(t.locale,{styleGridAriaLabel:n,styleButtonViews:i}),r=t.commands.get("footnotesStart");return s.startIndexFieldView.bind("isEnabled").to(r),s.startIndexFieldView.fieldView.bind("value").to(r),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s.delegate("execute").to(e),s}({editor:o,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:o}=t.locale,n=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=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 xt=St;function Et(){var t=["596132NseLhx","107804cDbFMD","requires","693OCCisE","203noDChH","34630QvLSTo","isPremiumPlugin","5892WLGeng","isOfficialPlugin","10791FmJgkS","FootnotesProperties","41896gOGDkd","pluginName","13266FEITcp","116256kSPeiG","85XrACRt","332xKUaCK"];return(Et=function(){return t})()}function St(t,e){var o=Et();return(St=function(t,e){return o[t-=478]})(t,e)}!function(t){for(var e=St,o=t();;)try{if(192465===parseInt(e(489))/1+-parseInt(e(488))/2+parseInt(e(480))/3*(-parseInt(e(487))/4)+parseInt(e(486))/5*(-parseInt(e(485))/6)+parseInt(e(492))/7*(parseInt(e(482))/8)+parseInt(e(491))/9*(parseInt(e(493))/10)+-parseInt(e(484))/11*(-parseInt(e(478))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Et);class At extends t.Plugin{static get[xt(483)](){return xt(481)}static get[xt(490)](){return[gt,Ft]}static get[xt(479)](){return!0}static get[xt(494)](){return!0}}function Dt(t,e){var o=Pt();return(Dt=function(t,e){return o[t-=421]})(t,e)}function Pt(){var t=["912684vezdpk","5919046eJtiPE","100610FLbvzO","15mpFjFN","1107tkZVDn","828532gHkFzx","1249784qZDtQO","396ADzopS","8342MheYOW","483JYuZbz","8raASyx","1389456VoqwaH"];return(Pt=function(){return t})()}!function(t){for(var e=Dt,o=t();;)try{if(776257===parseInt(e(423))/1+-parseInt(e(425))/2*(parseInt(e(426))/3)+-parseInt(e(422))/4*(-parseInt(e(432))/5)+parseInt(e(428))/6+-parseInt(e(430))/7*(-parseInt(e(427))/8)+-parseInt(e(421))/9*(-parseInt(e(431))/10)+-parseInt(e(424))/11*(parseInt(e(429))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Pt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
5
+ */(()=>{var t={102:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},237:t=>{"use strict";t.exports=CKEditor5.dll},291:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r},297:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,i){var s;if(n)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=o(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,o=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},331:(t,e,o)=>{t.exports=o(237)("./src/clipboard.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},728:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(t,o,n,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var f=[].concat(t[l]);n&&r[f[0]]||(void 0!==s&&(void 0===f[5]||(f[1]="@layer".concat(f[5].length>0?" ".concat(f[5]):""," {").concat(f[1],"}")),f[5]=s),o&&(f[2]?(f[1]="@media ".concat(f[2]," {").concat(f[1],"}"),f[2]=o):f[2]=o),i&&(f[4]?(f[1]="@supports (".concat(f[4],") {").concat(f[1],"}"),f[4]=i):f[4]="".concat(i)),e.push(f))}},e}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},901:(t,e,o)=>{t.exports=o(237)("./src/widget.js")},929:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],f=s[l]||0,u="".concat(l," ").concat(f);s[l]=f+1;var d=o(u),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,n);n.byIndex=a,e.splice(a,0,{identifier:u,updater:h,references:1})}r.push(u)}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 f=o(s[l]);0===e[f].references&&(e[f].updater(),e.splice(f,1))}s=c}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Footnotes:()=>tt,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>At,FootnotesPropertiesEditing:()=>gt,FootnotesPropertiesUI:()=>Ft,FootnotesStartCommand:()=>dt,FootnotesStyleCommand:()=>ct,FootnotesTracker:()=>p,FootnotesUI:()=>J,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);function r(){const t=["from","1476835RoeUsw","add","nodeAfter","10615157sFsLGn","name","attributes","_trackedElements","63789WkEiOP","$text","1025cAjhsv","_getElementKey","reset","remove","set","3269736rOvSxw","root","has","type","flat","createRangeOn","$graveyard","getChanges","slice","9TuyBRN","getElementKey","position","get","_model","_elementName","length","element","12616990wzZhCZ","push","getItems","6841962pyaPUA","clear","elementName","44atQfrA","32996HpPQAC","insert","delete","values","rootName"];return(r=function(){return t})()}const a=c;function c(t,e){const o=r();return(c=function(t,e){return o[t-=430]})(t,e)}!function(t){const e=c,o=t();for(;;)try{if(975530===-parseInt(e(435))/1+-parseInt(e(472))/2*(parseInt(e(442))/3)+parseInt(e(473))/4*(parseInt(e(444))/5)+-parseInt(e(469))/6+parseInt(e(438))/7+-parseInt(e(449))/8+-parseInt(e(458))/9*(-parseInt(e(466))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(r);class l{[a(462)];[a(463)];[a(445)];[a(441)]=new Map;constructor(t,e){const o=a;this[o(462)]=t,this[o(463)]=e[o(471)],this[o(445)]=e[o(459)]}[a(446)](){const t=a;this[t(441)][t(470)]()}[a(456)](t){const e=a,o=new Set,n=new Map;for(const i of t){if(e(430)===i[e(452)]&&e(443)!==i[e(439)]&&i[e(460)][e(437)]){const t=this[e(462)][e(454)](i[e(460)][e(437)]);for(const o of t[e(468)]()){if(!o.is(e(465),this[e(463)]))continue;const t=this[e(445)](o);n[e(451)](t)||n[e(448)](t,[]),n[e(461)](t)[e(467)](o)}}if(e(447)===i[e(452)]&&i[e(439)]===this[e(463)]){const t=this[e(445)]({getAttribute:t=>i[e(440)][e(461)](t)});o[e(436)](t)}}for(const[t,n]of this[e(441)])e(455)===n[e(450)][e(433)]&&o[e(436)](t);for(const t of o)this[e(441)][e(431)](t);for(const[t,o]of n)this[e(441)][e(448)](t,o[o[e(464)]-1]);const i=new Set;for(const[t,s]of n)o[e(451)](t)&&(i[e(436)](s[0]),s[e(464)]>1?n[e(448)](t,s[e(457)](1)):n[e(431)](t),o[e(431)](t));return{removed:Array[e(434)](o),inserted:Array[e(434)](n[e(432)]())[e(453)](),moved:Array[e(434)](i)}}}function f(t,e){const o=d();return(f=function(t,e){return o[t-=500]})(t,e)}const u=f;function d(){const t=["_footnotes","splice","has","_sortFootnoteDefinitions","find","_handleRemoveFootnoteReferenceById","footnoteInlineContent","length","107562jdhTnG","_handleFootnoteReferencesChanges","_handleInsertedFootnoteReference","paragraph","before","insert","parent","_insertEmptyFootnotesDefinitionsContainer","config","_footnoteFormatter","singleton","footnoteCounter","reset","createElement","remove","unshift","map","findIndex","differ","reference","438579hEWbTq","_handleFootnoteDefinitionsChanges","_handleFootnotesDefinitionsObjectSync","pluginName","from","setFootnoteFormatter","isPremiumPlugin","isOfficialPlugin","setAttribute","definition","24NjsXlq","add","964128qesSHD","_updateFootnoteRefCounter","registerPostFixer","createRangeOn","2jefDUS","11IseDYa","init","childCount","1167830XwvQba","getChanges","change:data","createPositionBefore","_footnotesDefinitions","4bKGPFl","190298UqmegS","getFootnotesDefinitionsObjectElement","get","root","footnoteId","120969gXqMpS","indexOf","footnotes.multiBlock","high","getFootnote","_handleMovedFootnoteReference","getChildren","push","model","editor","document","rootName","enqueueChange","_footnoteDefsTracker","_ensureFootnotesDefinitionsContainerExists","min","createRangeIn","low","move","append","720645pBpZMf","footnoteRef","getAttribute","_footnoteRefsTracker","FootnotesTracker","$graveyard","getFootnotes","_footnoteDefsContainerTracker","some","set","compareWith","after","listenTo","_handleFootnotesDefinitionsObjectChanges","end","getFootnotesFormatter","footnotesDefinitions","getRootNames","_ensureFootnotesReferencesHaveProperOrder","isEqual","footnoteDefinition","createPositionAt","_updateFootnotesCounters"];return(d=function(){return t})()}!function(t){const e=f,o=t();for(;;)try{if(147460===parseInt(e(583))/1*(parseInt(e(573))/2)+-parseInt(e(588))/3+parseInt(e(582))/4*(parseInt(e(506))/5)+-parseInt(e(569))/6+-parseInt(e(537))/7+parseInt(e(567))/8*(parseInt(e(557))/9)+-parseInt(e(577))/10*(parseInt(e(574))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(d);class p extends t.Plugin{[u(529)]=[];[u(581)]=null;[u(546)]=null;[u(513)];[u(509)];[u(601)];static get[u(560)](){return u(510)}static get[u(564)](){return!0}static get[u(563)](){return!0}constructor(t){const e=u;super(t),this[e(513)]=new l(this[e(597)][e(596)],{elementName:e(522),getElementKey:()=>e(547)}),this[e(509)]=new l(this[e(597)][e(596)],{elementName:e(507),getElementKey:t=>t[e(508)](e(587))}),this[e(601)]=new l(this[e(597)][e(596)],{elementName:e(526),getElementKey:t=>t[e(508)](e(587))})}[u(575)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(598)][t(571)](e=>{const n=t,i=o[n(598)][n(555)][n(578)]();let s=!1;return this[n(519)](e,i)&&(s=!0),this[n(558)](e,i)&&(s=!0),this[n(538)](e,i)&&(s=!0),this[n(524)](e)&&(s=!0),this[n(559)](e)&&(s=!0),this[n(532)](e)&&(s=!0),s}),this[t(518)](o[t(598)],t(579),()=>{const e=t;o[e(600)]({isUndoable:!1},t=>{this[e(500)](t)})},{priority:t(503)}),this[t(518)](n,t(515),()=>{const e=t;this[e(529)]=[],this[e(513)][e(549)](),this[e(509)][e(549)](),this[e(601)][e(549)]()},{priority:t(591)})}[u(584)](){return this[u(581)]}[u(592)](t){const e=u;return this[e(529)][e(533)](e=>e.id===t)||null}[u(512)](){const t=u;return Array[t(561)](this[t(529)])}[u(521)](){return this[u(546)]}[u(562)](t){this[u(546)]=t}[u(528)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(529)][o(536)];i++)this[o(570)](t,i)&&(n=!0);return n}[u(544)](t,e){const o=u,n=t[o(550)](o(522),{});return t[o(505)](n,e),this[o(581)]=n,n}[u(500)](t){const e=u;if(!this[e(529)][e(536)]||this[e(581)])return;const o=this[e(529)][0][e(556)][e(586)],n=this[e(544)](t,o);for(const o of this[e(529)])o[e(566)][e(543)]||t[e(542)](o[e(566)],n,e(520));this[e(528)](t)}[u(519)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(513)][o(578)](e);if(r[o(536)]&&(this[o(581)]=r[0]),i[o(536)])if(i[o(536)]>1||this[o(581)]&&i[o(514)](t=>t!==this[o(581)])){const e=t[o(550)](o(522),{}),s=[];this[o(581)]&&s[o(595)](this[o(581)]),s[o(595)](...i),t[o(542)](e,s[0],o(541));for(const n of s)t[o(504)](t[o(502)](n),t[o(527)](e,o(520))),t[o(551)](n);this[o(581)]=e,this[o(528)](t),n=!0}else this[o(581)]=i[0];if(s[o(536)]&&o(511)===this[o(581)]?.[o(586)][o(599)]){for(const e of this[o(529)])t[o(551)](e[o(556)]),n=!0;this[o(529)]=[],this[o(581)]=null}return n}[u(558)](t,e){const o=u;let n=!1;const i=this[o(597)][o(545)][o(585)](o(590)),{inserted:s,moved:r}=this[o(601)][o(578)](e);for(const e of[...r,...s]){const s=e[o(508)](o(587)),r=this[o(592)](s);r&&(r[o(566)]=e),h(t,i,e)&&(n=!0)}return n}[u(538)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(509)][o(578)](e);for(const e of i)this[o(534)](t,e)&&(n=!0);for(const e of s)this[o(539)](t,e)&&(n=!0);for(const e of r)this[o(593)](t,e)&&(n=!0);return n}[u(559)](t){const e=u;if(!this[e(581)])return!1;let o=!1;if(this[e(581)][e(576)]!==this[e(529)][e(536)]){const n=[];for(const t of this[e(581)][e(594)]()){const i=t[e(508)](e(587));this[e(592)](i)||(n[e(552)](t),o=!0)}for(const o of n)t[e(551)](o)}const n=new Set,i=[];for(const t of this[e(581)][e(594)]()){const s=t[e(508)](e(587));n[e(531)](s)?(i[e(552)](t),o=!0):n[e(568)](s)}for(const o of i)t[e(551)](o);return this[e(581)][e(576)]||(t[e(551)](this[e(581)]),this[e(581)]=null,o=!0),o}[u(539)](t,e){const o=u;if(this[o(529)][o(533)](t=>t[o(556)]===e))return!1;let n=!1;const i=e[o(508)](o(587)),s=this[o(529)][o(554)](t=>t.id===i);-1!==s&&(t[o(551)](this[o(529)][s][o(556)]),this[o(529)][o(530)](s,1),n=!0);let r=this[o(581)]?function(t,e){const n=o;for(const o of t[n(594)]())if(o[n(508)](n(587))===e)return o;return null}(this[o(581)],i):null;r||(r=t[o(550)](o(526),{footnoteId:i}),this[o(581)]&&(t[o(542)](r,this[o(581)],o(520)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(597)][o(596)],this[o(529)],e);this[o(529)][o(530)](c,0,a);let l=c;return-1!==s&&(l=Math[o(501)](c,s)),this[o(528)](t,l)&&(n=!0),n}[u(534)](t,e){const o=u,n=this[o(529)][o(554)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(529)][n];return o(511)!==s[o(566)][o(586)][o(599)]&&(t[o(551)](s[o(566)]),i=!0),this[o(529)][o(530)](n,1),this[o(528)](t,n)&&(i=!0),i}[u(593)](t,e){const o=u,n=e[o(508)](o(587)),i=this[o(529)][o(554)](t=>t.id===n),s=this[o(529)][i];let r=!1;s[o(556)]=e,this[o(529)][o(530)](i,1);const a=m(this[o(597)][o(596)],this[o(529)],e);return this[o(529)][o(530)](a,0,s),this[o(528)](t,Math[o(501)](i,a))&&(r=!0),r}[u(570)](t,e){const o=u;if(!this[o(581)])return!1;const n=this[o(529)][e];let i;return i=this[o(546)]?this[o(546)]({footnote:n,container:this[o(581)],digits:String(this[o(529)][o(536)])[o(536)],value:e+1}):String(e+1),n[o(556)][o(508)](o(548))!=i&&(t[o(565)](o(548),i,n[o(556)]),!0)}[u(532)](t){const e=u;if(!this[e(581)]||this[e(529)][e(536)]<2)return!1;if(function(t,o){const n=e;if(t[n(536)]!==o[n(536)])return!1;for(let e=0;e<t[n(536)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(529)][e(553)](t=>t.id),Array[e(561)](this[e(581)][e(594)]())[e(553)](t=>t[e(508)](e(587)))))return!1;let o=!1;for(let n=0;n<this[e(529)][e(536)];n++){const i=this[e(529)][n],s=t[e(580)](i[e(566)]),r=t[e(527)](this[e(581)],n);s[e(525)](r)||(t[e(504)](t[e(572)](i[e(566)]),r),o=!0)}return o}[u(524)](t){const e=u;if(!this[e(529)][e(536)])return!1;const{model:o}=this[e(597)];let n=!1;for(let i=0;i<this[e(529)][e(536)]-1;i++){const s=this[e(529)][i],r=this[e(529)][i+1],a=o[e(580)](s[e(556)]),c=o[e(580)](r[e(556)]);e(517)===a[e(516)](c)&&(this[e(593)](t,s[e(556)]),i=-1,n=!0)}return n}}function h(t,e,o){const n=u;if(o[n(576)])return!1;const i=n(e?540:535);return t[n(542)](t[n(550)](i),o),!0}function m(t,e,o){const n=u;if(0===e[n(536)])return 0;const i=t[n(580)](o);for(let o=0;o<e[n(536)];o++){const s=e[o],r=t[n(580)](s[n(556)]);if(n(541)===i[n(516)](r))return o}const s=o[n(586)];let r=-1;for(let t=e[n(536)]-1;t>=0;t--)if(e[t][n(556)][n(586)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(598)][n(523)](),c=a[n(589)](s[n(599)]),l=a[c+1];if(l)for(let t=0;t<e[n(536)];t++)if(e[t][n(556)][n(586)][n(599)]===l)return t;return e[n(536)]}const g=w;function w(t,e){const o=y();return(w=function(t,e){return o[t-=459]})(t,e)}function y(){const t=["execute","189DNHJfh","513282VMqKAs","2369437RtXEPB","791632oVaWne","footnoteId","selection","plugins","footnoteRef","148912rlwBBK","isBlock","editor","refresh","document","insertObject","getItems","test","isEnabled","insert-footnote-command-executed-with-invalid-id","createElement","getFirstRange","change","get","6gpSalS","checkChild","_getPositionToInsertFootnote","532690wdsovx","2oXPSJp","_moveSelectionToFootnoteDefinition","model","length","isObject","103750vZrJQY","528880JIAtyL","FootnotesEditing","string","end"];return(y=function(){return t})()}!function(t){const e=w,o=t();for(;;)try{if(194914===parseInt(e(490))/1*(parseInt(e(471))/2)+-parseInt(e(483))/3+parseInt(e(477))/4+parseInt(e(470))/5+parseInt(e(467))/6*(-parseInt(e(484))/7)+parseInt(e(485))/8+parseInt(e(482))/9*(parseInt(e(476))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(y);class b extends t.Command{[g(493)](){const t=g,e=this[t(492)][t(473)][t(494)][t(487)],o=this[t(469)](e);this[t(461)]=!!o}[g(481)](t){const e=g,{editor:o}=this,{model:n}=o,{selection:s}=n[e(494)],r=this[e(469)](s);if(!r)return;const a=o[e(488)][e(466)](e(478)),c=t?.[e(486)]??(0,i.uid)();!function(t){const o=e;return o(479)==typeof t&&t[o(474)]>0&&!/\s/[o(460)](t)&&!/^\d/[o(460)](t)}(c)?(0,i.logWarning)(e(462)):(n[e(465)](t=>{const o=e,i=t[o(463)](o(489),{footnoteId:c});n[o(495)](i,r,null)}),a[e(472)](c))}[g(469)](t){const e=g,{model:o}=this[e(492)],{schema:n}=o,i=t[e(464)]();for(const t of i[e(459)]())if(n[e(491)](t)||n[e(475)](t))return null;const s=i[e(480)];return n[e(468)](s,e(489))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[p]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=h([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),o=window[h([68,97,116,101])][h([110,111,119])](),n=t[h([101,100,105,116,111,114])],s=new(window[h([80,114,111,109,105,115,101])])(t=>{n[h([111,110,99,101])](h([114,101,97,100,121]),t)}),r={[h([107,116,121])]:h([69,67]),[h([117,115,101])]:h([115,105,103]),[h([99,114,118])]:h([80,45,50,53,54]),[h([120])]:h([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[h([121])]:h([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[h([97,108,103])]:h([69,83,50,53,54])},a=n[h([99,111,110,102,105,103])][h([103,101,116])](h([108,105,99,101,110,115,101,75,101,121]));function c(t){return t[h([115,116,97,114,116,115,87,105,116,104])](h([101,121]))?JSON[h([112,97,114,115,101])](l(t)):null}function l(t){return window[h([97,116,111,98])](t[h([114,101,112,108,97,99,101])](/-/g,h([43]))[h([114,101,112,108,97,99,101])](/_/g,h([47])))}function f(t){let e=5381;function o(t){for(let o=0;o<t[h([108,101,110,103,116,104])];o++){const n=t[h([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[h([105,115,65,114,114,97,121])](e)?e[h([102,111,114,69,97,99,104])](t):e&&typeof e==h([111,98,106,101,99,116])?Object[h([101,110,116,114,105,101,115])](e)[h([115,111,114,116])]()[h([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[h([83,116,114,105,110,103])](e))}(t),e>>>0}function u(t){return t[h([116,111,83,116,114,105,110,103])](16)[h([112,97,100,83,116,97,114,116])](8,h([48]))}function d(t){return t[h([115,112,108,105,116])]("")[h([114,101,118,101,114,115,101])]()[h([106,111,105,110])]("")}function p(){}function h(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[h([83,116,114,105,110,103])](window[h([112,101,114,102,111,114,109,97,110,99,101])][h([110,111,119])]())[h([114,101,112,108,97,99,101])](h([46]),"");let o=h([117]);for(let n=0;n<t[h([108,101,110,103,116,104])];n+=2){let i=window[h([112,97,114,115,101,73,110,116])](t[h([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[h([108,101,110,103,116,104])]&&(i-=e[h([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=h([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=h([86,97,108,105,100])&&async function(){await s,n[h([109,111,100,101,108])][h([99,104,97,110,103,101])]=p,n[h([109,111,100,101,108])][h([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,n[h([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](h([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==h([71,80,76])?h([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[h([115,112,108,105,116])](h([46]));return 3!=t[h([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=c(t);return e&&o()?e:null;function o(){const t=e[h([106,116,105])],o=window[h([112,97,114,115,101,73,110,116])](t[h([115,117,98,115,116,114,105,110,103])](t[h([108,101,110,103,116,104])]-8),16),n={...e,[h([106,116,105])]:t[h([115,117,98,115,116,114,105,110,103])](0,t[h([108,101,110,103,116,104])]-8)};return delete n[h([118,99])],f(n)==o}}}(),t?(t[h([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[h([80,114,111,109,105,115,101])])(c=>{if(r())return c(h([86,97,108,105,100]));a(),n[h([100,101,99,111,114,97,116,101])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const p=(0,i.uid)();function m(t){return!!t&&(typeof t===h([111,98,106,101,99,116])||typeof t===h([102,117,110,99,116,105,111,110]))&&typeof t[h([116,104,101,110])]===h([102,117,110,99,116,105,111,110])&&typeof t[h([99,97,116,99,104])]===h([102,117,110,99,116,105,111,110])}function g(n){a(n)[h([116,104,101,110])](t=>t&&t[h([115,116,97,116,117,115])]==h([111,107])?u(f(p+e))!=t[h([118,101,114,105,102,105,99,97,116,105,111,110])]?h([85,115,97,103,101,76,105,109,105,116]):h([86,97,108,105,100]):h([85,115,97,103,101,76,105,109,105,116]))[h([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),h([86,97,108,105,100])):h(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[h([116,104,101,110])](c)[h([99,97,116,99,104])](()=>{c(h([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=h([108,108,99,116,45])+u(f(t)),n=d(u(window[h([77,97,116,104])][h([99,101,105,108])](o/i)));window[h([108,111,99,97,108,83,116,111,114,97,103,101])][h([115,101,116,73,116,101,109])](e,n)}function r(){const e=h([108,108,99,116,45])+u(f(t)),o=window[h([108,111,99,97,108,83,116,111,114,97,103,101])][h([103,101,116,73,116,101,109])](e);return o?window[h([112,97,114,115,101,73,110,116])](d(o),16)*i:null}function a(t){return new(window[h([80,114,111,109,105,115,101])])((e,o)=>{t[h([116,104,101,110])](e,o),window[h([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[h([111,110])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,o)=>{if(o[0]!=t)return c(h([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[h([114,101,113,117,101,115,116,73,100])]:p}},{[h([112,114,105,111,114,105,116,121])]:h([104,105,103,104])}),n[h([111,110])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{m(t[h([114,101,116,117,114,110])])&&(l=!0,g(t[h([114,101,116,117,114,110])]))},{[h([112,114,105,111,114,105,116,121])]:h([108,111,119])}),s[h([116,104,101,110])](()=>{l||c(h([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[h([101,100,105,116,105,110,103])][h([118,105,101,119])][h([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==h([97,117,116,111])}function a(){n[h([101,100,105,116,105,110,103])][h([118,105,101,119])][h([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=h([97,117,116,111])}}(t[h([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[h([106,116,105])])),await async function(){let t=!0;try{const n=a[h([115,112,108,105,116])](h([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=c(e);o&&o[h([97,108,103])]==h([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[h([85,105,110,116,56,65,114,114,97,121])][h([102,114,111,109])](l(n),t=>t[h([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[h([84,101,120,116,69,110,99,111,100,101,114])]))[h([101,110,99,111,100,101])](e+h([46])+o),a=window[h([99,114,121,112,116,111])][h([115,117,98,116,108,101])];if(!a)return;const c=await a[h([105,109,112,111,114,116,75,101,121])](h([106,119,107]),r,{[h([110,97,109,101])]:h([69,67,68,83,65]),[h([110,97,109,101,100,67,117,114,118,101])]:h([80,45,50,53,54])},!1,[h([118,101,114,105,102,121])]);await a[h([118,101,114,105,102,121])]({[h([110,97,109,101])]:h([69,67,68,83,65]),[h([104,97,115,104])]:{[h([110,97,109,101])]:h([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[h([102,101,97,116,117,114,101,115])];return!(!e||!e[h([105,110,99,108,117,100,101,115])](h([42]))&&!e[h([105,110,99,108,117,100,101,115])](h([70,79,79])))}()?function(){const e=[h([101,118,97,108,117,97,116,105,111,110]),h([116,114,105,97,108])][h([105,110,99,108,117,100,101,115])](t[h([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1773187200;return t[h([101,120,112])]<e}()?h([69,120,112,105,114,101,100]):function(){const e=t[h([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[h([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[h([108,111,99,97,116,105,111,110])].href);if(e[h([105,110,99,108,117,100,101,115])](o))return!0;const n=o[h([115,112,108,105,116])](h([46]));return e[h([102,105,108,116,101,114])](t=>t[h([105,110,99,108,117,100,101,115])](h([42])))[h([109,97,112])](t=>t[h([115,112,108,105,116])](h([46])))[h([102,105,108,116,101,114])](t=>t[h([108,101,110,103,116,104])]<=n[h([108,101,110,103,116,104])])[h([109,97,112])](t=>Array(n[h([108,101,110,103,116,104])]-t[h([108,101,110,103,116,104])])[h([102,105,108,108])](t[0]===h([42])?h([42]):"")[h([99,111,110,99,97,116])](t))[h([115,111,109,101])](t=>n[h([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===h([42])))}()?(t[h([108,105,99,101,110,115,101,84,121,112,101])]==h([101,118,97,108,117,97,116,105,111,110])&&(e=function(t){const e=[new(window[h([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[h([116,104,101,110])](()=>new(window[h([80,114,111,109,105,115,101])])(t=>{let e=0;n[h([109,111,100,101,108])][h([111,110])](h([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][h([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,1512==e&&(t(),o[h([111,102,102])]())})}))];return window[h([80,114,111,109,105,115,101])][h([114,97,99,101])](e)[h([116,104,101,110])](()=>t)}(h([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),await(e&&p?new(window[h([80,114,111,109,105,115,101])])((t,o)=>{e[h([116,104,101,110])](t,o),p[h([116,104,101,110])](e=>{e!=h([86,97,108,105,100])&&t(e)},o)}):e||p||h([86,97,108,105,100]))):h([68,111,109,97,105,110,76,105,109,105,116]):h([78,111,116,65,108,108,111,119,101,100]):h([73,110,118,97,108,105,100])):h([73,110,118,97,108,105,100]))}catch{return h([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(p).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),o.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(p).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(i.reference,"on")}),o.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:o,editing:n}=t,{t:i}=t.locale;o.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:o})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;o.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of n.view.createRangeIn(i))t.is("$textProxy")?o.consume(t.textNode,{name:!0}):t.is("element")&&o.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),o.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>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})=>S(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>S(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 S(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 P=T;function T(t,e){const o=L();return(T=function(t,e){return o[t-=200]})(t,e)}!function(t){const e=T,o=t();for(;;)try{if(494202===-parseInt(e(226))/1*(parseInt(e(283))/2)+-parseInt(e(284))/3+parseInt(e(224))/4*(parseInt(e(235))/5)+-parseInt(e(218))/6*(-parseInt(e(223))/7)+-parseInt(e(234))/8*(parseInt(e(254))/9)+-parseInt(e(240))/10*(-parseInt(e(275))/11)+parseInt(e(245))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(L);class D extends t.Plugin{static get[P(274)](){return P(249)}static get[P(205)](){return[v,A.ClipboardPipeline]}static get[P(225)](){return!0}static get[P(258)](){return!0}[P(270)](){this[P(276)]()}[P(276)](){const t=P;this[t(207)](),this[t(277)]()}[P(207)](){const t=P,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(260)](A.ClipboardPipeline),s=o[t(260)](p);this[t(217)](i,t(232),(o,i)=>{const r=t,a=V(n[r(271)](i[r(255)]));if(!a[r(241)])return;const c=s[r(256)](),l=a[r(239)]((t,o)=>{const n=r,i=c[n(261)](t=>t.id===o);if(i){const o=e[n(206)][n(264)](i[n(266)],{isClipboardPipeline:!0}),s=e[n(206)][n(243)][n(263)](o);t[i.id]=s}return t},Object[r(246)](null));i[r(227)][r(242)](r(251),JSON[r(210)](l))})}[P(277)](){const t=P,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(262)],r=n[t(260)](A.ClipboardPipeline),a=n[t(260)](p),c=e[t(257)][t(260)](t(285));let l=null;this[t(217)](s[t(219)],t(228),(e,o)=>{const n=t,i=o[n(227)][n(244)](n(251));l=i?JSON[n(273)](i):null}),this[t(217)](r,t(200),(n,s)=>{const r=t,f=s[r(201)]===this[r(211)].id;f&&r(209)===s[r(253)]||o[r(268)](t=>{const n=r;let u=a[n(248)]();const d=!!u&&Array[n(214)](o[n(219)][n(233)][n(237)]())[n(269)](u);if(!l&&function(t){const e=n;for(const{item:o}of t)if(o.is(e(250),e(272)))return!0;return!1}(o[n(271)](s[n(255)]))&&(l=function(t,e){const o=n,i=_(t,e);if(!i)return null;const s=Object[o(246)](null);for(const e of i[o(203)]())e.is(o(250),o(278))&&e[o(252)](o(236))&&(s[e[o(280)](o(236))]=t[o(202)](e,!0));return Object[o(282)](s)[o(241)]?s:null}(t,s[n(255)])),(u&&!d||!u&&!l)&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(271)](e))n.is(o(250),o(216))&&i[o(229)](n);for(const e of i)t[o(215)](e)}(t,s[n(255)]),!l)return;const{selection:p}=o[n(219)],h=p[n(247)]()[n(212)];u&&!d||(u=_(t,s[n(255)]),u||=a[n(238)](t,h));const m=Array[n(214)](p[n(279)]())[n(222)](V),g=function(t,e,o){const s=n,r=Object[s(246)](null);for(const{item:n}of t[s(271)](e))if(n.is(s(250),s(272))){const e=n[s(280)](s(236));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(231)](s(236),r[e],n)}return r}(t,s[n(255)],t=>{const e=n;return!f||!!a[e(213)](t)&&!m[e(269)](t)});for(const[o,i]of Object[n(267)](l)){const s=g[o]||o;let r;if(n(281)!=typeof i)r=i,s!==o&&t[n(231)](n(236),s,r);else{r=t[n(259)](n(278),{footnoteId:s});const o=e[n(206)][n(243)][n(264)](i);let a;if(c)a=e[n(206)][n(204)](o,r);else{a=t[n(259)](n(230));const i=e[n(206)][n(204)](o,a);t[n(265)](i,a)}t[n(221)](a,r)}t[n(265)](r,u,n(220))}l=null})})}}function _(t,e){const o=P;for(const{item:n}of t[o(271)](e))if(n.is(o(250),o(216)))return n;return null}function L(){const t=["dataTransfer","clipboardInput","push","footnoteInlineContent","setAttribute","outputTransformation","selection","32gpLQEG","5VoVMCB","footnoteId","getSelectedBlocks","_insertEmptyFootnotesDefinitionsContainer","reduce","390ZCYnaH","length","setData","htmlProcessor","getData","13901292ZmAMRU","create","getFirstRange","getFootnotesDefinitionsObjectElement","FootnotesClipboard","element","application/ckeditor5-footnotes","hasAttribute","method","2123865xMfFIj","content","getFootnotes","config","isPremiumPlugin","createElement","get","find","editing","toData","toView","insert","definition","entries","change","includes","init","createRangeIn","footnoteRef","parse","pluginName","101134dDwqUt","_defineClipboardIntegration","_handlePasteFootnotesDefinitions","footnoteDefinition","getRanges","getAttribute","string","keys","960922gpCxFc","2148438VwARlb","footnotes.multiBlock","contentInsertion","sourceEditorId","cloneElement","getChildren","toModel","requires","data","_handleCopyFootnotesDefinitions","add","drop","stringify","editor","root","getFootnote","from","remove","footnotesDefinitions","listenTo","1218rrwFWD","document","end","append","flatMap","27482NEtBrX","1283056ZwknaT","isOfficialPlugin","1ZaXVlV"];return(L=function(){return t})()}function V(t){const e=P,o=new Set;for(const{item:n}of t)n.is(e(250),e(272))&&o[e(208)](n[e(280)](e(236)));return Array[e(214)](o)}var N=o(311),R=o(355),O=o(929),K=o.n(O),j=o(297),M=o.n(j),B=o(102),U=o.n(B),z=o(123),H=o.n(z),W=o(741),q=o.n(W),X=o(728),G={attributes:{"data-cke":!0}};G.setAttributes=H(),G.insert=U().bind(null,"head"),G.domAPI=M(),G.insertStyleElement=q();K()(X.A,G);X.A&&X.A.locals&&X.A.locals;class J 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",Q(t,N.ButtonView)),e.add("menuBar:insertFootnote",Q(t,N.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const o=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in o){const n=e,i=o[n];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete o[n],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&o._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&o._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&o._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&o._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&o._showLicenseError("evaluationLimit"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function Q(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof N.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(o,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:R.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}var Y=Z;function Z(t,e){var o=$();return(Z=function(t,e){return o[t-=116]})(t,e)}function $(){var t=["1943850GTkfUg","2677527pcYBfJ","isPremiumPlugin","194607truoTF","456Gpmsvn","isOfficialPlugin","Footnotes","requires","2814772UmBwtu","pluginName","1695507khinhJ","1023RuaCwO","8yHVQYv","78ImWRSq","190fKHNge","57490XbZlmB"];return($=function(){return t})()}!function(t){for(var e=Z,o=t();;)try{if(417825===parseInt(e(122))/1*(parseInt(e(116))/2)+parseInt(e(128))/3+-parseInt(e(126))/4+parseInt(e(118))/5+parseInt(e(131))/6*(parseInt(e(121))/7)+parseInt(e(130))/8*(parseInt(e(119))/9)+parseInt(e(117))/10*(-parseInt(e(129))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}($);class tt extends t.Plugin{static get[Y(127)](){return Y(124)}static get[Y(125)](){return[v,D,J]}static get[Y(123)](){return!0}static get[Y(120)](){return!0}}const et=nt;function ot(){const t=["1881980EqtzAV","15599507RqaZyK","decimal-leading-zero","lower-alpha","10GQKvzl","27746088piFPYi","968nNpLtJ","decimal","15LrPSeq","326zgQSdX","3Xxujpz","13gtDcis","10012GcdQgx","2492670cmRzdY","lower-latin","upper-roman","109692CwHTip","upper-latin","upper-alpha","lower-roman","5556705sIhavW"];return(ot=function(){return t})()}function nt(t,e){const o=ot();return(nt=function(t,e){return o[t-=466]})(t,e)}!function(t){const e=nt,o=t();for(;;)try{if(946048===parseInt(e(481))/1*(parseInt(e(478))/2)+-parseInt(e(479))/3*(parseInt(e(469))/4)+parseInt(e(477))/5*(parseInt(e(482))/6)+parseInt(e(468))/7+-parseInt(e(475))/8*(-parseInt(e(485))/9)+parseInt(e(473))/10*(-parseInt(e(470))/11)+parseInt(e(474))/12*(-parseInt(e(480))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ot);const it=[et(476),et(471),et(483),et(486),et(472),et(466),et(467),et(484)],st=at;function rt(){const t=["5077330qXdkHz","includes","footnotesListStyle","3878403sLIMXm","value","14121SlEXXx","3821wXzFKH","628ssmoKO","change","getAttribute","_updateFootnotesCounters","5699845ftjmYJ","226824FpjwQr","setAttribute","get","154jIdrzs","refresh","plugins","isEnabled","2191536vwiZcG","2008IodepT","model","execute","getFootnotesDefinitionsObjectElement","22MbyuRp"];return(rt=function(){return t})()}function at(t,e){const o=rt();return(at=function(t,e){return o[t-=292]})(t,e)}!function(t){const e=at,o=t();for(;;)try{if(768243===parseInt(e(298))/1*(parseInt(e(299))/2)+-parseInt(e(295))/3+parseInt(e(311))/4+-parseInt(e(303))/5+parseInt(e(304))/6*(parseInt(e(307))/7)+parseInt(e(312))/8*(-parseInt(e(297))/9)+-parseInt(e(292))/10*(-parseInt(e(316))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(rt);class ct extends t.Command{[st(308)](){const t=st,{editor:e}=this,o=e[t(309)][t(306)](p)[t(315)]();this[t(310)]=!!o,this[t(296)]=o?.[t(301)](t(294))??null}[st(314)]({value:t}){const e=st,{editor:o}=this,n=o[e(309)][e(306)](p),i=n[e(315)]();i&&it[e(293)](t)&&o[e(313)][e(300)](o=>{const s=e;o[s(305)](s(294),t,i),n[s(302)](o)})}}function lt(){const t=["_updateFootnotesCounters","refresh","733910yDVokN","getFootnotesDefinitionsObjectElement","model","isInteger","setAttribute","6155217tHrLQJ","execute","footnotesListStart","isEnabled","getAttribute","241332GEokNH","value","3702774YKxlvI","change","plugins","8ePATGq","get","2TCzGTJ","165545yxXBMq","1692723scUvIo","1671016rRHCLR"];return(lt=function(){return t})()}const ft=ut;function ut(t,e){const o=lt();return(ut=function(t,e){return o[t-=343]})(t,e)}!function(t){const e=ut,o=t();for(;;)try{if(372286===parseInt(e(350))/1+-parseInt(e(349))/2*(parseInt(e(351))/3)+-parseInt(e(352))/4+-parseInt(e(355))/5+parseInt(e(344))/6+parseInt(e(365))/7+-parseInt(e(347))/8*(-parseInt(e(360))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(lt);class dt extends t.Command{[ft(354)](){const t=ft,{editor:e}=this,o=e[t(346)][t(348)](p)[t(356)]();this[t(363)]=!!o,this[t(343)]=o?.[t(364)](t(362))??null}[ft(361)]({value:t}){const e=ft,{editor:o}=this,n=o[e(346)][e(348)](p),i=n[e(356)]();i&&Number[e(358)](t)&&o[e(357)][e(345)](o=>{const s=e;o[s(359)](s(362),t,i),n[s(353)](o)})}}const pt=mt;function ht(){const t=["_getDefaultStartIndex","footnotesDefinitions","type","createRangeOn","consumable","footnotesStyle","1404666BUMgoN","lower-roman","model","decimal","1083483QWRAKc","start","_formatFootnoteListValue","writer","removeAttribute","position","upper-roman","nodeAfter","upper-alpha","getChanges","3CFNeaQ","removeStyle","consume","_updateFootnotesCounters","162PfDPek","pluginName","lower-alpha","setStyle","_definePostfixer","getAttribute","isPremiumPlugin","registerPostFixer","hasAttribute","hasClass","attribute:footnotesListStyle:footnotesDefinitions","config","getItems","checkAttribute","decimal-leading-zero","insert","_defineConverters","downcast","footnotesListStyle","749682UKskSY","modelCursor","max","document","_getDefaultListStyle","929797oncAnN","fromCharCode","parent","$text","7863344cXTCAD","setAttribute","footnotesListStart","attribute:footnotesListStart:footnotesDefinitions","differ","toLowerCase","isNaN","118839gVrRNs","list-style-type","footnotesStart","for","isOfficialPlugin","viewItem","936596MDabfu","mapper","getChildren","170umqIHV","extend","_defineFormatter","add","25wRdpdd","footnotes-list","_defineSchema","upper-latin","commands","lower-latin","upcast","toViewElement","from","schema","parseInt","find","editor","define","plugins","floor","element","requires","getStyle","padStart","footnotes.footnotesProperties.defaultListStyle","name","item","get","element:ol","toUpperCase","footnotes.footnotesProperties.defaultStartIndex","setFootnoteFormatter","FootnotesPropertiesEditing","init"];return(ht=function(){return t})()}function mt(t,e){const o=ht();return(mt=function(t,e){return o[t-=183]})(t,e)}!function(t){const e=mt,o=t();for(;;)try{if(899353===-parseInt(e(264))/1+-parseInt(e(260))/2*(-parseInt(e(274))/3)+parseInt(e(217))/4*(parseInt(e(224))/5)+parseInt(e(278))/6*(parseInt(e(211))/7)+parseInt(e(204))/8+parseInt(e(195))/9*(-parseInt(e(220))/10)+parseInt(e(200))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ht);class gt extends t.Plugin{static get[pt(279)](){return pt(252)}static get[pt(241)](){return[v,p]}static get[pt(215)](){return!0}static get[pt(284)](){return!0}[pt(253)](){const t=pt,{editor:e}=this;e[t(187)][t(237)](t(244),t(263)),e[t(187)][t(237)](t(250),1),e[t(228)][t(223)](t(259),new ct(e)),e[t(228)][t(223)](t(213),new dt(e)),this[t(226)](),this[t(192)](),this[t(222)](),this[t(282)]()}[pt(226)](){const t=pt,{editor:e}=this,{schema:o}=e[t(262)];o[t(221)](t(255),{allowAttributes:[t(194),t(206)]})}[pt(192)](){const t=pt,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(214)](t(230))[t(223)](e=>{const o=t;e.on(o(248),(t,e,n)=>{const s=o,r=e[s(216)],a=e[s(196)]?.[s(202)];r[s(185)](s(225))&&a?.is(s(240),s(255))&&(function(t,e,o,n){const i=s;if(!n[i(189)](e,i(206)))return;let r=1;const a=o[i(258)][i(276)](t,{attributes:i(265)});if(a){const e=Number[i(234)](t[i(283)](i(265)),10);Number[i(210)](e)||(r=e)}!a&&e[i(184)](i(206))||o[i(267)][i(205)](i(206),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(189)](e,i(194)))return;let r=i(263),a=!1;if(o[i(258)][i(276)](t,{attributes:i(256)})){const e={1:i(263),a:i(280),A:i(272),i:i(261),I:i(270)}[t[i(283)](i(256))];e&&(r=e),a=!0}o[i(258)][i(276)](t,{styles:i(212)})&&(r=function(t){const e=i;switch(t){case e(280):return e(229);case e(272):return e(227);default:return t}}(t[i(242)](i(212))),a=!0),!a&&e[i(184)](i(194))||o[i(267)][i(205)](i(194),r,e)}(r,a,n,i))})}),o[t(214)](t(193))[t(223)](e=>{const o=t;e.on(o(207),(t,e,n)=>{const i=o;if(!n[i(258)][i(276)](e[i(246)],t[i(245)]))return;const s=wt(e[i(246)],n[i(218)]),{attributeNewValue:r}=e;null==r||1===r?n[i(267)][i(268)](i(265),s):n[i(267)][i(205)](i(265),String(r),s)}),e.on(o(186),(t,e,n)=>{const i=o;if(!n[i(258)][i(276)](e[i(246)],t[i(245)]))return;const s=wt(e[i(246)],n[i(218)]),{attributeNewValue:r}=e;r&&i(263)!==r?n[i(267)][i(281)](i(212),r,s):n[i(267)][i(275)](i(212),s)})})}[pt(282)](){const t=pt,{editor:e}=this,{model:o}=e,n=e[t(238)][t(247)](p),i=this[t(199)](),s=this[t(254)]();o[t(198)][t(183)](e=>{const r=t,a=o[r(198)][r(208)][r(273)]();let c=!1;for(const t of a){if(r(191)!==t[r(256)]||r(203)===t[r(245)])continue;const n=o[r(257)](t[r(269)][r(271)]);for(const t of n[r(188)]())t.is(r(240),r(255))&&(!t[r(184)](r(206))&&o[r(233)][r(189)](t,r(206))&&(e[r(205)](r(206),s,t),c=!0),!t[r(184)](r(194))&&o[r(233)][r(189)](t,r(194))&&(e[r(205)](r(194),i,t),c=!0))}return c&&n[r(277)](e),c})}[pt(222)](){const t=pt,{editor:e}=this;e[t(238)][t(247)](p)[t(251)](e=>this[t(266)](e))}[pt(199)](){const t=pt;return this[t(236)][t(187)][t(247)](t(244))}[pt(254)](){const t=pt;return this[t(236)][t(187)][t(247)](t(250))}[pt(266)]({container:t,value:e,digits:o}){const n=pt,i=t[n(283)](n(194)),s=t[n(283)](n(206)),r=Math[n(239)](e)+(s??1)-1;switch(i){case n(190):return function(t,e){const o=n;return String(t)[o(243)](e,"0")}(r,Math[n(197)](2,o));case n(280):case n(229):return yt(r,!1);case n(272):case n(227):return yt(r,!0);case n(261):return vt(r,!1);case n(270):return vt(r,!0);default:return String(r)}}}function wt(t,e){const o=pt,n=e[o(231)](t);return Array[o(232)](n[o(219)]())[o(235)](t=>t.is(o(240),"ol")&&t[o(185)](o(225)))}function yt(t,e){const o=pt;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(201)](97+t)+n,i=Math[o(239)]((i-1)/26)}return e?n[o(249)]():n}const bt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function vt(t,e){const o=pt;let n="",i=t;for(const{value:t,numeral:e}of bt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(209)]()}class It extends N.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new N.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new N.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,o),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,N.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const o=new N.View(this.locale);return o.children=o.createCollection(),o.children.addMany(t),o.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:o.children}),o.children.delegate("execute").to(this),o.focus=function(){for(const t of this.children)if(t instanceof N.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},o.focusTracker=new i.FocusTracker,o.keystrokes=new i.KeystrokeHandler,o.render(),o.keystrokes.listenTo(o.element),this.children.add(o),o}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),o=[e],n=new N.CollapsibleView(this.locale,o);return n.set({label:t("Footnotes properties"),isCollapsed:!0}),n.buttonView.bind("isEnabled").toMany(o,"isEnabled",(...t)=>t.some(t=>t)),n.buttonView.on("change:isEnabled",(t,e,o)=>{o||(n.isCollapsed=!0)}),this.children.add(n),[e,n]}_createStartIndexPropertyView(){const{t}=this.locale,e=new N.LabeledFieldView(this.locale,N.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const o=e.fieldView.element,n=o.valueAsNumber;Number.isNaN(n)?e.errorText=t("Invalid footnotes start index value."):o.checkValidity()?this.fire("footnotesListStart",{startIndex:n}):e.errorText=t(n<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var kt=o(291),Ct={attributes:{"data-cke":!0}};Ct.setAttributes=H(),Ct.insert=U().bind(null,"head"),Ct.domAPI=M(),Ct.insertStyleElement=q();K()(kt.A,Ct);kt.A&&kt.A.locals&&kt.A.locals;class Ft extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[N.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var o;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(o=t,t=>{const{t:e}=t,n=o.commands.get("footnotesStyle"),i=(0,N.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(n,"isEnabled"),s.set({label:e("Footnotes style"),icon:R.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:R.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:R.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:R.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:R.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:R.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:R.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:o,icon:n,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new N.ButtonView(e);return a.set({label:o,icon:n,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new It(t.locale,{styleGridAriaLabel:n,styleButtonViews:i}),r=t.commands.get("footnotesStart");return s.startIndexFieldView.bind("isEnabled").to(r),s.startIndexFieldView.fieldView.bind("value").to(r),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s.delegate("execute").to(e),s}({editor:o,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:o}=t.locale,n=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=N.BalloonPanelView;n.register("footnotesDefinitions",{ariaLabel:o("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}function xt(){var t=["1284954JopcYp","1681835GYuSni","21717064sKulBd","4951492zsYgwj","1125786nYGAOv","requires","30468UZgWQo","360wLEzBw","FootnotesProperties","98070zLGRsA","pluginName","isPremiumPlugin","isOfficialPlugin"];return(xt=function(){return t})()}var Et=St;function St(t,e){var o=xt();return(St=function(t,e){return o[t-=470]})(t,e)}!function(t){for(var e=St,o=t();;)try{if(666680===parseInt(e(476))/1+-parseInt(e(472))/2+-parseInt(e(482))/3*(-parseInt(e(470))/4)+parseInt(e(477))/5+parseInt(e(480))/6+parseInt(e(479))/7+-parseInt(e(478))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(xt);class At extends t.Plugin{static get[Et(473)](){return Et(471)}static get[Et(481)](){return[gt,Ft]}static get[Et(475)](){return!0}static get[Et(474)](){return!0}}function Pt(t,e){var o=Tt();return(Pt=function(t,e){return o[t-=453]})(t,e)}function Tt(){var t=["107pnXvJU","26920KWhYAC","2354BVaaZs","3585010JekKaf","24rHCkfn","1931022gFrdDN","14568iNnMQf","132948GtjmnB","413xKpUql","1171824WTHRGW"];return(Tt=function(){return t})()}!function(t){for(var e=Pt,o=t();;)try{if(154643===parseInt(e(458))/1*(parseInt(e(460))/2)+parseInt(e(462))/3*(parseInt(e(455))/4)+-parseInt(e(459))/5+-parseInt(e(457))/6+-parseInt(e(456))/7*(-parseInt(e(454))/8)+parseInt(e(453))/9+-parseInt(e(461))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Tt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();