@themarioga/grid-editor 9.0.0-beta.5 → 9.0.0-beta.7

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 (96) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +43 -24
  3. package/UPGRADING.md +24 -5
  4. package/dist/grideditor.bundle.min.js +3 -3
  5. package/dist/grideditor.css +5 -4
  6. package/dist/grideditor.d.ts +13 -20
  7. package/dist/grideditor.esm.js +174 -104
  8. package/dist/grideditor.jquery.js +1 -3
  9. package/dist/grideditor.jquery.min.js +1 -1
  10. package/dist/grideditor.jquery.min.js.map +2 -2
  11. package/dist/grideditor.js +174 -104
  12. package/dist/grideditor.min.css +1 -1
  13. package/dist/grideditor.min.css.map +1 -1
  14. package/dist/grideditor.min.js +2 -2
  15. package/dist/grideditor.min.js.map +3 -3
  16. package/dist/locales/grideditor.es.esm.js +1 -0
  17. package/dist/locales/grideditor.es.js +1 -0
  18. package/dist/locales/grideditor.es.min.js +1 -1
  19. package/dist/locales/grideditor.es.min.js.map +2 -2
  20. package/dist/plugins/grideditor.accordion.esm.js +16 -0
  21. package/dist/plugins/grideditor.accordion.js +16 -0
  22. package/dist/plugins/grideditor.accordion.min.js +1 -1
  23. package/dist/plugins/grideditor.accordion.min.js.map +3 -3
  24. package/dist/plugins/grideditor.card.esm.js +4 -0
  25. package/dist/plugins/grideditor.card.js +4 -0
  26. package/dist/plugins/grideditor.card.min.js +1 -1
  27. package/dist/plugins/grideditor.card.min.js.map +3 -3
  28. package/dist/plugins/grideditor.carousel.esm.js +7 -0
  29. package/dist/plugins/grideditor.carousel.js +7 -0
  30. package/dist/plugins/grideditor.carousel.min.js +1 -1
  31. package/dist/plugins/grideditor.carousel.min.js.map +3 -3
  32. package/dist/plugins/grideditor.ckeditor.esm.js +9 -0
  33. package/dist/plugins/grideditor.ckeditor.js +9 -0
  34. package/dist/plugins/grideditor.ckeditor.min.js +1 -1
  35. package/dist/plugins/grideditor.ckeditor.min.js.map +3 -3
  36. package/dist/plugins/grideditor.clipboard.esm.js +47 -25
  37. package/dist/plugins/grideditor.clipboard.js +47 -25
  38. package/dist/plugins/grideditor.clipboard.min.js +1 -1
  39. package/dist/plugins/grideditor.clipboard.min.js.map +3 -3
  40. package/dist/plugins/grideditor.codemirror-inline.min.js.map +1 -1
  41. package/dist/plugins/grideditor.codemirror.min.js.map +1 -1
  42. package/dist/plugins/grideditor.elements.esm.js +3 -0
  43. package/dist/plugins/grideditor.elements.js +3 -0
  44. package/dist/plugins/grideditor.elements.min.js +1 -1
  45. package/dist/plugins/grideditor.elements.min.js.map +3 -3
  46. package/dist/plugins/grideditor.gutters.min.js.map +1 -1
  47. package/dist/plugins/grideditor.history.esm.js +2 -7
  48. package/dist/plugins/grideditor.history.js +2 -7
  49. package/dist/plugins/grideditor.history.min.js +1 -1
  50. package/dist/plugins/grideditor.history.min.js.map +3 -3
  51. package/dist/plugins/grideditor.inline-style.min.js.map +1 -1
  52. package/dist/plugins/grideditor.offcanvas.esm.js +4 -0
  53. package/dist/plugins/grideditor.offcanvas.js +4 -0
  54. package/dist/plugins/grideditor.offcanvas.min.js +1 -1
  55. package/dist/plugins/grideditor.offcanvas.min.js.map +3 -3
  56. package/dist/plugins/grideditor.order.min.js +1 -1
  57. package/dist/plugins/grideditor.order.min.js.map +1 -1
  58. package/dist/plugins/grideditor.popup.esm.js +4 -0
  59. package/dist/plugins/grideditor.popup.js +4 -0
  60. package/dist/plugins/grideditor.popup.min.js +1 -1
  61. package/dist/plugins/grideditor.popup.min.js.map +3 -3
  62. package/dist/plugins/grideditor.sections.esm.js +9 -0
  63. package/dist/plugins/grideditor.sections.js +9 -0
  64. package/dist/plugins/grideditor.sections.min.js +1 -1
  65. package/dist/plugins/grideditor.sections.min.js.map +3 -3
  66. package/dist/plugins/grideditor.summernote.esm.js +9 -0
  67. package/dist/plugins/grideditor.summernote.js +9 -0
  68. package/dist/plugins/grideditor.summernote.min.js +1 -1
  69. package/dist/plugins/grideditor.summernote.min.js.map +3 -3
  70. package/dist/plugins/grideditor.tabs.esm.js +7 -0
  71. package/dist/plugins/grideditor.tabs.js +7 -0
  72. package/dist/plugins/grideditor.tabs.min.js +1 -1
  73. package/dist/plugins/grideditor.tabs.min.js.map +3 -3
  74. package/dist/plugins/grideditor.tinymce.esm.js +9 -0
  75. package/dist/plugins/grideditor.tinymce.js +9 -0
  76. package/dist/plugins/grideditor.tinymce.min.js +1 -1
  77. package/dist/plugins/grideditor.tinymce.min.js.map +3 -3
  78. package/docs/events.md +14 -12
  79. package/docs/locale-keys.md +1 -0
  80. package/docs/plugins.md +11 -8
  81. package/example/clipboard.html +20 -14
  82. package/package.json +1 -1
  83. package/src/js/dom.js +6 -0
  84. package/src/js/grideditor.jquery.js +0 -2
  85. package/src/js/grideditor.js +233 -114
  86. package/src/js/locales/grideditor.es.js +1 -0
  87. package/src/js/plugins/grideditor.accordion.js +9 -0
  88. package/src/js/plugins/grideditor.card.js +5 -0
  89. package/src/js/plugins/grideditor.carousel.js +5 -0
  90. package/src/js/plugins/grideditor.clipboard.js +70 -33
  91. package/src/js/plugins/grideditor.history.js +6 -9
  92. package/src/js/plugins/grideditor.offcanvas.js +5 -0
  93. package/src/js/plugins/grideditor.popup.js +5 -0
  94. package/src/js/plugins/grideditor.tabs.js +5 -0
  95. package/src/less/grideditor.less +5 -4
  96. package/types/grideditor.d.ts +13 -20
@@ -1,14 +1,14 @@
1
1
  /*!
2
- * grid-editor 9.0.0-beta.5 bundled with SortableJS.
2
+ * grid-editor 9.0.0-beta.7 bundled with SortableJS.
3
3
  *
4
4
  * grid-editor: MIT, https://github.com/themarioga/grid-editor
5
5
  * SortableJS: MIT, https://github.com/SortableJS/Sortable
6
6
  */
7
7
  /*! Sortable 1.15.6 - MIT | git://github.com/SortableJS/Sortable.git */
8
8
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function e(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)),o}function I(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?e(Object(i),!0).forEach(function(t){var e,n;e=o,t=i[n=t],n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(i,t))})}return o}function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,o=arguments[e];for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t}).apply(this,arguments)}function i(t,e){if(null==t)return{};var n,o=function(t,e){if(null==t)return{};for(var n,o={},i=Object.keys(t),r=0;r<i.length;r++)n=i[r],0<=e.indexOf(n)||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(t),r=0;r<i.length;r++)n=i[r],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n]);return o}function r(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function t(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var y=t(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),w=t(/Edge/i),s=t(/firefox/i),u=t(/safari/i)&&!t(/chrome/i)&&!t(/android/i),c=t(/iP(ad|od|hone)/i),n=t(/chrome/i)&&t(/android/i),d={capture:!1,passive:!1};function h(t,e,n){t.addEventListener(e,n,!y&&d)}function p(t,e,n){t.removeEventListener(e,n,!y&&d)}function f(t,e){if(e&&(">"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function g(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function P(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"!==e[0]||t.parentNode===n)&&f(t,e)||o&&t===n)return t}while(t!==n&&(t=g(t)))}return null}var m,v=/\s+/g;function k(t,e,n){var o;t&&e&&(t.classList?t.classList[n?"add":"remove"](e):(o=(" "+t.className+" ").replace(v," ").replace(" "+e+" "," "),t.className=(o+(n?" "+e:"")).replace(v," ")))}function R(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];o[e=!(e in o||-1!==e.indexOf("webkit"))?"-webkit-"+e:e]=n+("string"==typeof n?"":"px")}}function b(t,e){var n="";if("string"==typeof t)n=t;else do{var o=R(t,"transform")}while(o&&"none"!==o&&(n=o+" "+n),!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function D(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function O(){var t=document.scrollingElement;return t||document.documentElement}function X(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,c,u,d=t!==window&&t.parentNode&&t!==O()?(a=(r=t.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,u=r.height,r.width):(l=a=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,window.innerWidth);if((e||n)&&t!==window&&(i=i||t.parentNode,!y))do{if(i&&i.getBoundingClientRect&&("none"!==R(i,"transform")||n&&"static"!==R(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(R(i,"border-top-width")),l-=h.left+parseInt(R(i,"border-left-width")),s=a+r.height,c=l+r.width;break}}while(i=i.parentNode);return o&&t!==window&&(o=(e=b(i||t))&&e.a,t=e&&e.d,e&&(s=(a/=t)+(u/=t),c=(l/=o)+(d/=o))),{top:a,left:l,bottom:s,right:c,width:d,height:u}}}function Y(t,e,n){for(var o=M(t,!0),i=X(t)[e];o;){var r=X(o)[n];if(!("top"===n||"left"===n?r<=i:i<=r))return o;if(o===O())break;o=M(o,!1)}return!1}function B(t,e,n,o){for(var i=0,r=0,a=t.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==jt.ghost&&(o||a[r]!==jt.dragged)&&P(a[r],n.draggable,t,!1)){if(i===e)return a[r];i++}r++}return null}function F(t,e){for(var n=t.lastElementChild;n&&(n===jt.ghost||"none"===R(n,"display")||e&&!f(n,e));)n=n.previousElementSibling;return n||null}function j(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===jt.clone||e&&!f(t,e)||n++;return n}function E(t){var e=0,n=0,o=O();if(t)do{var i=b(t),r=i.a,i=i.d}while(e+=t.scrollLeft*r,n+=t.scrollTop*i,t!==o&&(t=t.parentNode));return[e,n]}function M(t,e){if(!t||!t.getBoundingClientRect)return O();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=R(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return O();if(o||e)return n;o=!0}}}while(n=n.parentNode);return O()}function S(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function _(e,n){return function(){var t;m||(1===(t=arguments).length?e.call(this,t[0]):e.apply(this,t),m=setTimeout(function(){m=void 0},n))}}function H(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function C(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function T(t,e){R(t,"position","absolute"),R(t,"top",e.top),R(t,"left",e.left),R(t,"width",e.width),R(t,"height",e.height)}function x(t){R(t,"position",""),R(t,"top",""),R(t,"left",""),R(t,"width",""),R(t,"height","")}function L(n,o,i){var r={};return Array.from(n.children).forEach(function(t){var e;P(t,o.draggable,n,!1)&&!t.animated&&t!==i&&(e=X(t),r.left=Math.min(null!==(t=r.left)&&void 0!==t?t:1/0,e.left),r.top=Math.min(null!==(t=r.top)&&void 0!==t?t:1/0,e.top),r.right=Math.max(null!==(t=r.right)&&void 0!==t?t:-1/0,e.right),r.bottom=Math.max(null!==(t=r.bottom)&&void 0!==t?t:-1/0,e.bottom))}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var K="Sortable"+(new Date).getTime();function A(){var e,o=[];return{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(t){var e,n;"none"!==R(t,"display")&&t!==jt.ghost&&(o.push({target:t,rect:X(t)}),e=I({},o[o.length-1].rect),!t.thisAnimationDuration||(n=b(t,!0))&&(e.top-=n.f,e.left-=n.e),t.fromRect=e)})},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(o,{target:t}),1)},animateAll:function(t){var c=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof t&&t());var u=!1,d=0;o.forEach(function(t){var e=0,n=t.target,o=n.fromRect,i=X(n),r=n.prevFromRect,a=n.prevToRect,l=t.rect,s=b(n,!0);s&&(i.top-=s.f,i.left-=s.e),n.toRect=i,n.thisAnimationDuration&&S(r,i)&&!S(o,i)&&(l.top-i.top)/(l.left-i.left)==(o.top-i.top)/(o.left-i.left)&&(t=l,s=r,r=a,a=c.options,e=Math.sqrt(Math.pow(s.top-t.top,2)+Math.pow(s.left-t.left,2))/Math.sqrt(Math.pow(s.top-r.top,2)+Math.pow(s.left-r.left,2))*a.animation),S(i,o)||(n.prevFromRect=o,n.prevToRect=i,e=e||c.options.animation,c.animate(n,l,i,e)),e&&(u=!0,d=Math.max(d,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},e),n.thisAnimationDuration=e)}),clearTimeout(e),u?e=setTimeout(function(){"function"==typeof t&&t()},d):"function"==typeof t&&t(),o=[]},animate:function(t,e,n,o){var i,r;o&&(R(t,"transition",""),R(t,"transform",""),i=(r=b(this.el))&&r.a,r=r&&r.d,i=(e.left-n.left)/(i||1),r=(e.top-n.top)/(r||1),t.animatingX=!!i,t.animatingY=!!r,R(t,"transform","translate3d("+i+"px,"+r+"px,0)"),this.forRepaintDummy=t.offsetWidth,R(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),R(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){R(t,"transition",""),R(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},o))}}}var N=[],W={initializeByDefault:!0},z={mount:function(e){for(var t in W)!W.hasOwnProperty(t)||t in e||(e[t]=W[t]);N.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),N.push(e)},pluginEvent:function(e,n,o){var t=this;this.eventCanceled=!1,o.cancel=function(){t.eventCanceled=!0};var i=e+"Global";N.forEach(function(t){n[t.pluginName]&&(n[t.pluginName][i]&&n[t.pluginName][i](I({sortable:n},o)),n.options[t.pluginName]&&n[t.pluginName][e]&&n[t.pluginName][e](I({sortable:n},o)))})},initializePlugins:function(n,o,i,t){for(var e in N.forEach(function(t){var e=t.pluginName;(n.options[e]||t.initializeByDefault)&&((t=new t(n,o,n.options)).sortable=n,t.options=n.options,n[e]=t,a(i,t.defaults))}),n.options){var r;n.options.hasOwnProperty(e)&&(void 0!==(r=this.modifyOption(n,e,n.options[e]))&&(n.options[e]=r))}},getEventProperties:function(e,n){var o={};return N.forEach(function(t){"function"==typeof t.eventProperties&&a(o,t.eventProperties.call(n[t.pluginName],e))}),o},modifyOption:function(e,n,o){var i;return N.forEach(function(t){e[t.pluginName]&&t.optionListeners&&"function"==typeof t.optionListeners[n]&&(i=t.optionListeners[n].call(e[t.pluginName],o))}),i}};function G(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,a=t.toEl,l=t.fromEl,s=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,f=t.extraEventProperties;if(e=e||n&&n[K]){var g,m=e.options,t="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||y||w?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=l||n,g.item=i||n,g.clone=r,g.oldIndex=s,g.newIndex=c,g.oldDraggableIndex=u,g.newDraggableIndex=d,g.originalEvent=h,g.pullMode=p?p.lastPutMode:void 0;var v,b=I(I({},f),z.getEventProperties(o,e));for(v in b)g[v]=b[v];n&&n.dispatchEvent(g),m[t]&&m[t].call(e,g)}}function U(t,e){var n=(o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).evt,o=i(o,q);z.pluginEvent.bind(jt)(t,e,I({dragEl:Z,parentEl:$,ghostEl:Q,rootEl:J,nextEl:tt,lastDownEl:et,cloneEl:nt,cloneHidden:ot,dragStarted:mt,putSortable:ct,activeSortable:jt.active,originalEvent:n,oldIndex:it,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:lt,hideGhostForTarget:Xt,unhideGhostForTarget:Yt,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(t){V({sortable:e,name:t,originalEvent:n})}},o))}var q=["evt"];function V(t){G(I({putSortable:ct,cloneEl:nt,targetEl:Z,rootEl:J,oldIndex:it,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:lt},t))}var Z,$,Q,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,pt,ft,gt,mt,vt,bt,yt,wt,Dt=!1,Et=!1,St=[],_t=!1,Ct=!1,Tt=[],xt=!1,Ot=[],Mt="undefined"!=typeof document,At=c,Nt=w||y?"cssFloat":"float",It=Mt&&!n&&!c&&"draggable"in document.createElement("div"),Pt=function(){if(Mt){if(y)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),kt=function(t,e){var n=R(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=B(t,0,e),r=B(t,1,e),a=i&&R(i),l=r&&R(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+X(i).width,t=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+X(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){e="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==e?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||o<=s&&"none"===n[Nt]||r&&"none"===n[Nt]&&o<s+t)?"vertical":"horizontal"},Rt=function(t){function l(r,a){return function(t,e,n,o){var i=t.options.group.name&&e.options.group.name&&t.options.group.name===e.options.group.name;if(null==r&&(a||i))return!0;if(null==r||!1===r)return!1;if(a&&"clone"===r)return r;if("function"==typeof r)return l(r(t,e,n,o),a)(t,e,n,o);e=(a?t:e).options.group.name;return!0===r||"string"==typeof r&&r===e||r.join&&-1<r.indexOf(e)}}var e={},n=t.group;n&&"object"==o(n)||(n={name:n}),e.name=n.name,e.checkPull=l(n.pull,!0),e.checkPut=l(n.put),e.revertClone=n.revertClone,t.group=e},Xt=function(){!Pt&&Q&&R(Q,"display","none")},Yt=function(){!Pt&&Q&&R(Q,"display","")};Mt&&!n&&document.addEventListener("click",function(t){if(Et)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Et=!1},!0);function Bt(t){if(Z){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,St.some(function(t){var e=t[K].options.emptyInsertThreshold;if(e&&!F(t)){var n=X(t),o=i>=n.left-e&&i<=n.right+e,e=r>=n.top-e&&r<=n.bottom+e;return o&&e?a=t:void 0}}),a);if(e){var n,o={};for(n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[K]._onDragOver(o)}}var i,r,a}function Ft(t){Z&&Z.parentNode[K]._isOutsideThisEl(t.target)}function jt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[K]=this;var n,o,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return kt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==jt.supportPointer&&"PointerEvent"in window&&(!u||c),emptyInsertThreshold:5};for(n in z.initializePlugins(this,t,i),i)n in e||(e[n]=i[n]);for(o in Rt(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&It,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?h(t,"pointerdown",this._onTapStart):(h(t,"mousedown",this._onTapStart),h(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(h(t,"dragover",this),h(t,"dragenter",this)),St.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,A())}function Ht(t,e,n,o,i,r,a,l){var s,c,u=t[K],d=u.options.onMove;return!window.CustomEvent||y||w?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||X(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),c=d?d.call(u,s,a):c}function Lt(t){t.draggable=!1}function Kt(){xt=!1}function Wt(t){return setTimeout(t,0)}function zt(t){return clearTimeout(t)}jt.prototype={constructor:jt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(vt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(!function(t){Ot.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Ot.push(o)}}(o),!Z&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!u||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=P(l,t.draggable,o,!1))&&l.animated||et===l)){if(it=j(l),at=j(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return V({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),U("filter",n,{evt:e}),void(i&&e.preventDefault())}else if(c=c&&c.split(",").some(function(t){if(t=P(s,t.trim(),o,!1))return V({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),U("filter",n,{evt:e}),!0}))return void(i&&e.preventDefault());t.handle&&!P(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;n&&!Z&&n.parentNode===r&&(o=X(n),J=r,$=(Z=n).parentNode,tt=Z.nextSibling,et=n,st=a.group,ut={target:jt.dragged=Z,clientX:(e||t).clientX,clientY:(e||t).clientY},ft=ut.clientX-o.left,gt=ut.clientY-o.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Z.style["will-change"]="all",o=function(){U("delayEnded",i,{evt:t}),jt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!s&&i.nativeDraggable&&(Z.draggable=!0),i._triggerDragStart(t,e),V({sortable:i,name:"choose",originalEvent:t}),k(Z,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){D(Z,t.trim(),Lt)}),h(l,"dragover",Bt),h(l,"mousemove",Bt),h(l,"touchmove",Bt),a.supportPointer?(h(l,"pointerup",i._onDrop),this.nativeDraggable||h(l,"pointercancel",i._onDrop)):(h(l,"mouseup",i._onDrop),h(l,"touchend",i._onDrop),h(l,"touchcancel",i._onDrop)),s&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),U("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(w||y)?o():jt.eventCanceled?this._onDrop():(a.supportPointer?(h(l,"pointerup",i._disableDelayedDrag),h(l,"pointercancel",i._disableDelayedDrag)):(h(l,"mouseup",i._disableDelayedDrag),h(l,"touchend",i._disableDelayedDrag),h(l,"touchcancel",i._disableDelayedDrag)),h(l,"mousemove",i._delayedDragTouchMoveHandler),h(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&h(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&Lt(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;p(t,"mouseup",this._disableDelayedDrag),p(t,"touchend",this._disableDelayedDrag),p(t,"touchcancel",this._disableDelayedDrag),p(t,"pointerup",this._disableDelayedDrag),p(t,"pointercancel",this._disableDelayedDrag),p(t,"mousemove",this._delayedDragTouchMoveHandler),p(t,"touchmove",this._delayedDragTouchMoveHandler),p(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?h(document,"pointermove",this._onTouchMove):h(document,e?"touchmove":"mousemove",this._onTouchMove):(h(Z,"dragend",this),h(J,"dragstart",this._onDragStart));try{document.selection?Wt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var n;Dt=!1,J&&Z?(U("dragStarted",this,{evt:e}),this.nativeDraggable&&h(document,"dragover",Ft),n=this.options,t||k(Z,n.dragClass,!1),k(Z,n.ghostClass,!0),jt.active=this,t&&this._appendGhost(),V({sortable:this,name:"start",originalEvent:e})):this._nulling()},_emulateDragOver:function(){if(dt){this._lastX=dt.clientX,this._lastY=dt.clientY,Xt();for(var t=document.elementFromPoint(dt.clientX,dt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(dt.clientX,dt.clientY))!==e;)e=t;if(Z.parentNode[K]._isOutsideThisEl(t),e)do{if(e[K])if(e[K]._onDragOver({clientX:dt.clientX,clientY:dt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}while(e=g(t=e));Yt()}},_onTouchMove:function(t){if(ut){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=Q&&b(Q,!0),a=Q&&r&&r.a,l=Q&&r&&r.d,e=At&&wt&&E(wt),a=(i.clientX-ut.clientX+o.x)/(a||1)+(e?e[0]-Tt[0]:0)/(a||1),l=(i.clientY-ut.clientY+o.y)/(l||1)+(e?e[1]-Tt[1]:0)/(l||1);if(!jt.active&&!Dt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}Q&&(r?(r.e+=a-(ht||0),r.f+=l-(pt||0)):r={a:1,b:0,c:0,d:1,e:a,f:l},r="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")"),R(Q,"webkitTransform",r),R(Q,"mozTransform",r),R(Q,"msTransform",r),R(Q,"transform",r),ht=a,pt=l,dt=i),t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Q){var t=this.options.fallbackOnBody?document.body:J,e=X(Z,!0,At,!0,t),n=this.options;if(At){for(wt=t;"static"===R(wt,"position")&&"none"===R(wt,"transform")&&wt!==document;)wt=wt.parentNode;wt!==document.body&&wt!==document.documentElement?(wt===document&&(wt=O()),e.top+=wt.scrollTop,e.left+=wt.scrollLeft):wt=O(),Tt=E(wt)}k(Q=Z.cloneNode(!0),n.ghostClass,!1),k(Q,n.fallbackClass,!0),k(Q,n.dragClass,!0),R(Q,"transition",""),R(Q,"transform",""),R(Q,"box-sizing","border-box"),R(Q,"margin",0),R(Q,"top",e.top),R(Q,"left",e.left),R(Q,"width",e.width),R(Q,"height",e.height),R(Q,"opacity","0.8"),R(Q,"position",At?"absolute":"fixed"),R(Q,"zIndex","100000"),R(Q,"pointerEvents","none"),jt.ghost=Q,t.appendChild(Q),R(Q,"transform-origin",ft/parseInt(Q.style.width)*100+"% "+gt/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;U("dragStart",this,{evt:t}),jt.eventCanceled?this._onDrop():(U("setupClone",this),jt.eventCanceled||((nt=C(Z)).removeAttribute("id"),nt.draggable=!1,nt.style["will-change"]="",this._hideClone(),k(nt,this.options.chosenClass,!1),jt.clone=nt),n.cloneId=Wt(function(){U("clone",n),jt.eventCanceled||(n.options.removeCloneOnHide||J.insertBefore(nt,Z),n._hideClone(),V({sortable:n,name:"clone"}))}),e||k(Z,i.dragClass,!0),e?(Et=!0,n._loopId=setInterval(n._emulateDragOver,50)):(p(document,"mouseup",n._onDrop),p(document,"touchend",n._onDrop),p(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,Z)),h(document,"drop",n),R(Z,"transform","translateZ(0)")),Dt=!0,n._dragStartId=Wt(n._dragStarted.bind(n,e,t)),h(document,"selectstart",n),mt=!0,window.getSelection().removeAllRanges(),u&&R(document.body,"user-select","none"))},_onDragOver:function(n){var o,i,r,t,e,a=this.el,l=n.target,s=this.options,c=s.group,u=jt.active,d=st===c,h=s.sort,p=ct||u,f=this,g=!1;if(!xt){if(void 0!==n.preventDefault&&n.cancelable&&n.preventDefault(),l=P(l,s.draggable,a,!0),O("dragOver"),jt.eventCanceled)return g;if(Z.contains(n.target)||l.animated&&l.animatingX&&l.animatingY||f._ignoreWhileAnimating===l)return A(!1);if(Et=!1,u&&!s.disabled&&(d?h||(i=$!==J):ct===this||(this.lastPutMode=st.checkPull(this,u,Z,n))&&c.checkPut(this,u,Z,n))){if(r="vertical"===this._getDirection(n,l),o=X(Z),O("dragOverValid"),jt.eventCanceled)return g;if(i)return $=J,M(),this._hideClone(),O("revert"),jt.eventCanceled||(tt?J.insertBefore(Z,tt):J.appendChild(Z)),A(!0);var m=F(a,s.draggable);if(m&&(S=n,c=r,x=X(F((E=this).el,E.options.draggable)),E=L(E.el,E.options,Q),!(c?S.clientX>E.right+10||S.clientY>x.bottom&&S.clientX>x.left:S.clientY>E.bottom+10||S.clientX>x.right&&S.clientY>x.top)||m.animated)){if(m&&(t=n,e=r,C=X(B((_=this).el,0,_.options,!0)),_=L(_.el,_.options,Q),e?t.clientX<_.left-10||t.clientY<C.top&&t.clientX<C.right:t.clientY<_.top-10||t.clientY<C.bottom&&t.clientX<C.left)){var v=B(a,0,s,!0);if(v===Z)return A(!1);if(D=X(l=v),!1!==Ht(J,a,Z,o,l,D,n,!1))return M(),a.insertBefore(Z,v),$=a,N(),A(!0)}else if(l.parentNode===a){var b,y,w,D=X(l),E=Z.parentNode!==a,S=(S=Z.animated&&Z.toRect||o,x=l.animated&&l.toRect||D,_=(e=r)?S.left:S.top,t=e?S.right:S.bottom,C=e?S.width:S.height,v=e?x.left:x.top,S=e?x.right:x.bottom,x=e?x.width:x.height,!(_===v||t===S||_+C/2===v+x/2)),_=r?"top":"left",C=Y(l,"top","top")||Y(Z,"top","top"),v=C?C.scrollTop:void 0;if(vt!==l&&(y=D[_],_t=!1,Ct=!S&&s.invertSwap||E),0!==(b=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,t=o?n.top:n.left,o=o?n.bottom:n.right,n=!1;if(!a)if(l&&yt<c*i){if(_t=!_t&&(1===bt?t+c*r/2<s:s<o-c*r/2)?!0:_t)n=!0;else if(1===bt?s<t+yt:o-yt<s)return-bt}else if(t+c*(1-i)/2<s&&s<o-c*(1-i)/2)return function(t){return j(Z)<j(t)?1:-1}(e);if((n=n||a)&&(s<t+c*r/2||o-c*r/2<s))return t+c/2<s?1:-1;return 0}(n,l,D,r,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ct,vt===l)))for(var T=j(Z);(w=$.children[T-=b])&&("none"===R(w,"display")||w===Q););if(0===b||w===l)return A(!1);bt=b;var x=(vt=l).nextElementSibling,E=!1,S=Ht(J,a,Z,o,l,D,n,E=1===b);if(!1!==S)return 1!==S&&-1!==S||(E=1===S),xt=!0,setTimeout(Kt,30),M(),E&&!x?a.appendChild(Z):l.parentNode.insertBefore(Z,E?x:l),C&&H(C,0,v-C.scrollTop),$=Z.parentNode,void 0===y||Ct||(yt=Math.abs(y-X(l)[_])),N(),A(!0)}}else{if(m===Z)return A(!1);if((l=m&&a===n.target?m:l)&&(D=X(l)),!1!==Ht(J,a,Z,o,l,D,n,!!l))return M(),m&&m.nextSibling?a.insertBefore(Z,m.nextSibling):a.appendChild(Z),$=a,N(),A(!0)}if(a.contains(Z))return A(!1)}return!1}function O(t,e){U(t,f,I({evt:n,isOwner:d,axis:r?"vertical":"horizontal",revert:i,dragRect:o,targetRect:D,canSort:h,fromSortable:p,target:l,completed:A,onMove:function(t,e){return Ht(J,a,Z,o,t,X(t),n,e)},changed:N},e))}function M(){O("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function A(t){return O("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(f),f!==p&&(k(Z,(ct||u).options.ghostClass,!1),k(Z,s.ghostClass,!0)),ct!==f&&f!==jt.active?ct=f:f===jt.active&&ct&&(ct=null),p===f&&(f._ignoreWhileAnimating=l),f.animateAll(function(){O("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(l===Z&&!Z.animated||l===a&&!l.animated)&&(vt=null),s.dragoverBubble||n.rootEl||l===document||(Z.parentNode[K]._isOutsideThisEl(n.target),t||Bt(n)),!s.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),g=!0}function N(){rt=j(Z),lt=j(Z,s.draggable),V({sortable:f,name:"change",toEl:a,newIndex:rt,newDraggableIndex:lt,originalEvent:n})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){p(document,"mousemove",this._onTouchMove),p(document,"touchmove",this._onTouchMove),p(document,"pointermove",this._onTouchMove),p(document,"dragover",Bt),p(document,"mousemove",Bt),p(document,"touchmove",Bt)},_offUpEvents:function(){var t=this.el.ownerDocument;p(t,"mouseup",this._onDrop),p(t,"touchend",this._onDrop),p(t,"pointerup",this._onDrop),p(t,"pointercancel",this._onDrop),p(t,"touchcancel",this._onDrop),p(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;rt=j(Z),lt=j(Z,n.draggable),U("drop",this,{evt:t}),$=Z&&Z.parentNode,rt=j(Z),lt=j(Z,n.draggable),jt.eventCanceled||(_t=Ct=Dt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),zt(this.cloneId),zt(this._dragStartId),this.nativeDraggable&&(p(document,"drop",this),p(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),u&&R(document.body,"user-select",""),R(Z,"transform",""),t&&(mt&&(t.cancelable&&t.preventDefault(),n.dropBubble||t.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(J===$||ct&&"clone"!==ct.lastPutMode)&&nt&&nt.parentNode&&nt.parentNode.removeChild(nt),Z&&(this.nativeDraggable&&p(Z,"dragend",this),Lt(Z),Z.style["will-change"]="",mt&&!Dt&&k(Z,(ct||this).options.ghostClass,!1),k(Z,this.options.chosenClass,!1),V({sortable:this,name:"unchoose",toEl:$,newIndex:null,newDraggableIndex:null,originalEvent:t}),J!==$?(0<=rt&&(V({rootEl:$,name:"add",toEl:$,fromEl:J,originalEvent:t}),V({sortable:this,name:"remove",toEl:$,originalEvent:t}),V({rootEl:$,name:"sort",toEl:$,fromEl:J,originalEvent:t}),V({sortable:this,name:"sort",toEl:$,originalEvent:t})),ct&&ct.save()):rt!==it&&0<=rt&&(V({sortable:this,name:"update",toEl:$,originalEvent:t}),V({sortable:this,name:"sort",toEl:$,originalEvent:t})),jt.active&&(null!=rt&&-1!==rt||(rt=it,lt=at),V({sortable:this,name:"end",toEl:$,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){U("nulling",this),J=Z=$=Q=tt=nt=et=ot=ut=dt=mt=rt=lt=it=at=vt=bt=ct=st=jt.dragged=jt.ghost=jt.clone=jt.active=null,Ot.forEach(function(t){t.checked=!0}),Ot.length=ht=pt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Z&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)P(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||function(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;for(;n--;)o+=e.charCodeAt(n);return o.toString(36)}(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach(function(t,e){e=o.children[e];P(e,this.options.draggable,o,!1)&&(n[t]=e)},this),e&&this.captureAnimationState(),t.forEach(function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return P(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=z.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Rt(n)},destroy:function(){U("destroy",this);var t=this.el;t[K]=null,p(t,"mousedown",this._onTapStart),p(t,"touchstart",this._onTapStart),p(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(p(t,"dragover",this),p(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),St.splice(St.indexOf(this.el),1),this.el=t=null},_hideClone:function(){ot||(U("hideClone",this),jt.eventCanceled||(R(nt,"display","none"),this.options.removeCloneOnHide&&nt.parentNode&&nt.parentNode.removeChild(nt),ot=!0))},_showClone:function(t){"clone"===t.lastPutMode?ot&&(U("showClone",this),jt.eventCanceled||(Z.parentNode!=J||this.options.group.revertClone?tt?J.insertBefore(nt,tt):J.appendChild(nt):J.insertBefore(nt,Z),this.options.group.revertClone&&this.animate(Z,nt),R(nt,"display",""),ot=!1)):this._hideClone()}},Mt&&h(document,"touchmove",function(t){(jt.active||Dt)&&t.cancelable&&t.preventDefault()}),jt.utils={on:h,off:p,css:R,find:D,is:function(t,e){return!!P(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:_,closest:P,toggleClass:k,clone:C,index:j,nextTick:Wt,cancelNextTick:zt,detectDirection:kt,getChild:B,expando:K},jt.get=function(t){return t[K]},jt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];(e=e[0].constructor===Array?e[0]:e).forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(jt.utils=I(I({},jt.utils),t.utils)),z.mount(t)})},jt.create=function(t,e){return new jt(t,e)};var Gt,Ut,qt,Vt,Zt,$t,Qt=[],Jt=!(jt.version="1.15.6");function te(){Qt.forEach(function(t){clearInterval(t.pid)}),Qt=[]}function ee(){clearInterval($t)}var ne,oe=_(function(n,t,e,o){if(t.scroll){var i,r=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=O(),u=!1;Ut!==e&&(Ut=e,te(),Gt=t.scroll,i=t.scrollFn,!0===Gt&&(Gt=M(e,!0)));var d=0,h=Gt;do{var p=h,f=X(p),g=f.top,m=f.bottom,v=f.left,b=f.right,y=f.width,w=f.height,D=void 0,E=void 0,S=p.scrollWidth,_=p.scrollHeight,C=R(p),T=p.scrollLeft,f=p.scrollTop,E=p===c?(D=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(D=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY)),T=D&&(Math.abs(b-r)<=l&&T+y<S)-(Math.abs(v-r)<=l&&!!T),f=E&&(Math.abs(m-a)<=l&&f+w<_)-(Math.abs(g-a)<=l&&!!f);if(!Qt[d])for(var x=0;x<=d;x++)Qt[x]||(Qt[x]={});Qt[d].vx==T&&Qt[d].vy==f&&Qt[d].el===p||(Qt[d].el=p,Qt[d].vx=T,Qt[d].vy=f,clearInterval(Qt[d].pid),0==T&&0==f||(u=!0,Qt[d].pid=setInterval(function(){o&&0===this.layer&&jt.active._onTouchMove(Zt);var t=Qt[this.layer].vy?Qt[this.layer].vy*s:0,e=Qt[this.layer].vx?Qt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(jt.dragged.parentNode[K],e,t,n,Zt,Qt[this.layer].el)||H(Qt[this.layer].el,e,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==c&&(h=M(h,!1)));Jt=u}},30),n=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,t=t.unhideGhostForTarget;e&&(i=n||i,a(),e=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,e=document.elementFromPoint(e.clientX,e.clientY),t(),i&&!i.el.contains(e)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n})))};function ie(){}function re(){}ie.prototype={startIndex:null,dragStart:function(t){t=t.oldDraggableIndex;this.startIndex=t},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();t=B(this.sortable.el,this.startIndex,this.options);t?this.sortable.el.insertBefore(e,t):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:n},a(ie,{pluginName:"revertOnSpill"}),re.prototype={onSpill:function(t){var e=t.dragEl,t=t.putSortable||this.sortable;t.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),t.animateAll()},drop:n},a(re,{pluginName:"removeOnSpill"});var ae,le,se,ce,ue,de=[],he=[],pe=!1,fe=!1,ge=!1;function me(n,o){he.forEach(function(t,e){e=o.children[t.sortableIndex+(n?Number(e):0)];e?o.insertBefore(t,e):o.appendChild(t)})}function ve(){de.forEach(function(t){t!==se&&t.parentNode&&t.parentNode.removeChild(t)})}return jt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){t=t.originalEvent;this.sortable.nativeDraggable?h(document,"dragover",this._handleAutoScroll):this.options.supportPointer?h(document,"pointermove",this._handleFallbackAutoScroll):t.touches?h(document,"touchmove",this._handleFallbackAutoScroll):h(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){t=t.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?p(document,"dragover",this._handleAutoScroll):(p(document,"pointermove",this._handleFallbackAutoScroll),p(document,"touchmove",this._handleFallbackAutoScroll),p(document,"mousemove",this._handleFallbackAutoScroll)),ee(),te(),clearTimeout(m),m=void 0},nulling:function(){Zt=Ut=Gt=Jt=$t=qt=Vt=null,Qt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(e,n){var o,i=this,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,t=document.elementFromPoint(r,a);Zt=e,n||this.options.forceAutoScrollFallback||w||y||u?(oe(e,this.options,t,n),o=M(t,!0),!Jt||$t&&r===qt&&a===Vt||($t&&ee(),$t=setInterval(function(){var t=M(document.elementFromPoint(r,a),!0);t!==o&&(o=t,te()),oe(e,i.options,t,n)},10),qt=r,Vt=a)):this.options.bubbleScroll&&M(t,!0)!==O()?oe(e,this.options,M(t,!1),!1):te()}},a(t,{pluginName:"scroll",initializeByDefault:!0})}),jt.mount(re,ie),jt.mount(new function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){t=t.dragEl;ne=t},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;i.options.swap&&(t=this.sortable.el,i=this.options,n&&n!==t&&(t=ne,ne=!1!==o(n)?(k(n,i.swapClass,!0),n):null,t&&t!==ne&&k(t,i.swapClass,!1)),r(),e(!0),a())},drop:function(t){var e,n,o=t.activeSortable,i=t.putSortable,r=t.dragEl,a=i||this.sortable,l=this.options;ne&&k(ne,l.swapClass,!1),ne&&(l.swap||i&&i.options.swap)&&r!==ne&&(a.captureAnimationState(),a!==o&&o.captureAnimationState(),n=ne,t=(e=r).parentNode,l=n.parentNode,t&&l&&!t.isEqualNode(n)&&!l.isEqualNode(e)&&(i=j(e),r=j(n),t.isEqualNode(l)&&i<r&&r++,t.insertBefore(n,t.children[i]),l.insertBefore(e,l.children[r])),a.animateAll(),a!==o&&o.animateAll())},nulling:function(){ne=null}},a(t,{pluginName:"swap",eventProperties:function(){return{swapItem:ne}}})}),jt.mount(new function(){function t(o){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));o.options.avoidImplicitDeselect||(o.options.supportPointer?h(document,"pointerup",this._deselectMultiDrag):(h(document,"mouseup",this._deselectMultiDrag),h(document,"touchend",this._deselectMultiDrag))),h(document,"keydown",this._checkKeyDown),h(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,e){var n="";de.length&&le===o?de.forEach(function(t,e){n+=(e?", ":"")+t.textContent}):n=e.textContent,t.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){t=t.dragEl;se=t},delayEnded:function(){this.isMultiDrag=~de.indexOf(se)},setupClone:function(t){var e=t.sortable,t=t.cancel;if(this.isMultiDrag){for(var n=0;n<de.length;n++)he.push(C(de[n])),he[n].sortableIndex=de[n].sortableIndex,he[n].draggable=!1,he[n].style["will-change"]="",k(he[n],this.options.selectedClass,!1),de[n]===se&&k(he[n],this.options.chosenClass,!1);e._hideClone(),t()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,t=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||de.length&&le===e&&(me(!0,n),o("clone"),t()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,t=t.cancel;this.isMultiDrag&&(me(!1,n),he.forEach(function(t){R(t,"display","")}),e(),ue=!1,t())},hideClone:function(t){var e=this,n=(t.sortable,t.cloneNowHidden),t=t.cancel;this.isMultiDrag&&(he.forEach(function(t){R(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)}),n(),ue=!0,t())},dragStartGlobal:function(t){t.sortable;!this.isMultiDrag&&le&&le.multiDrag._deselectMultiDrag(),de.forEach(function(t){t.sortableIndex=j(t)}),de=de.sort(function(t,e){return t.sortableIndex-e.sortableIndex}),ge=!0},dragStarted:function(t){var e,n=this,t=t.sortable;this.isMultiDrag&&(this.options.sort&&(t.captureAnimationState(),this.options.animation&&(de.forEach(function(t){t!==se&&R(t,"position","absolute")}),e=X(se,!1,!0,!0),de.forEach(function(t){t!==se&&T(t,e)}),pe=fe=!0)),t.animateAll(function(){pe=fe=!1,n.options.animation&&de.forEach(function(t){x(t)}),n.options.sort&&ve()}))},dragOver:function(t){var e=t.target,n=t.completed,t=t.cancel;fe&&~de.indexOf(e)&&(n(!1),t())},revert:function(t){var n,o,e=t.fromSortable,i=t.rootEl,r=t.sortable,a=t.dragRect;1<de.length&&(de.forEach(function(t){r.addAnimationState({target:t,rect:fe?X(t):a}),x(t),t.fromRect=a,e.removeAnimationState(t)}),fe=!1,n=!this.options.removeCloneOnHide,o=i,de.forEach(function(t,e){e=o.children[t.sortableIndex+(n?Number(e):0)];e?o.insertBefore(t,e):o.appendChild(t)}))},dragOverCompleted:function(t){var e,n=t.sortable,o=t.isOwner,i=t.insertion,r=t.activeSortable,a=t.parentEl,l=t.putSortable,t=this.options;i&&(o&&r._hideClone(),pe=!1,t.animation&&1<de.length&&(fe||!o&&!r.options.sort&&!l)&&(e=X(se,!1,!0,!0),de.forEach(function(t){t!==se&&(T(t,e),a.appendChild(t))}),fe=!0),o||(fe||ve(),1<de.length?(o=ue,r._showClone(n),r.options.animation&&!ue&&o&&he.forEach(function(t){r.addAnimationState({target:t,rect:ce}),t.fromRect=ce,t.thisAnimationDuration=null})):r._showClone(n)))},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,t=t.activeSortable;de.forEach(function(t){t.thisAnimationDuration=null}),t.options.animation&&!n&&t.multiDrag.isMultiDrag&&(ce=a({},e),e=b(se,!0),ce.top-=e.f,ce.left-=e.e)},dragOverAnimationComplete:function(){fe&&(fe=!1,ve())},drop:function(t){var o,i,r,a,n,e,l,s=t.originalEvent,c=t.rootEl,u=t.parentEl,d=t.sortable,h=t.dispatchSortableEvent,p=t.oldIndex,t=t.putSortable,f=t||this.sortable;s&&(o=this.options,i=u.children,ge||(o.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),k(se,o.selectedClass,!~de.indexOf(se)),~de.indexOf(se)?(de.splice(de.indexOf(se),1),ae=null,G({sortable:d,rootEl:c,name:"deselect",targetEl:se,originalEvent:s})):(de.push(se),G({sortable:d,rootEl:c,name:"select",targetEl:se,originalEvent:s}),s.shiftKey&&ae&&d.el.contains(ae)?(r=j(ae),a=j(se),~r&&~a&&r!==a&&function(){for(var e,t=r<a?(e=r,a):(e=a,r+1),n=o.filter;e<t;e++)~de.indexOf(i[e])||P(i[e],o.draggable,u,!1)&&(n&&("function"==typeof n?n.call(d,s,i[e],d):n.split(",").some(function(t){return P(i[e],t.trim(),u,!1)}))||(k(i[e],o.selectedClass,!0),de.push(i[e]),G({sortable:d,rootEl:c,name:"select",targetEl:i[e],originalEvent:s})))}()):ae=se,le=f)),ge&&this.isMultiDrag&&(fe=!1,(u[K].options.sort||u!==c)&&1<de.length&&(n=X(se),e=j(se,":not(."+this.options.selectedClass+")"),!pe&&o.animation&&(se.thisAnimationDuration=null),f.captureAnimationState(),pe||(o.animation&&(se.fromRect=n,de.forEach(function(t){var e;t.thisAnimationDuration=null,t!==se&&(e=fe?X(t):n,t.fromRect=e,f.addAnimationState({target:t,rect:e}))})),ve(),de.forEach(function(t){i[e]?u.insertBefore(t,i[e]):u.appendChild(t),e++}),p===j(se)&&(l=!1,de.forEach(function(t){t.sortableIndex!==j(t)&&(l=!0)}),l&&(h("update"),h("sort")))),de.forEach(function(t){x(t)}),f.animateAll()),le=f),(c===u||t&&"clone"!==t.lastPutMode)&&he.forEach(function(t){t.parentNode&&t.parentNode.removeChild(t)}))},nullingGlobal:function(){this.isMultiDrag=ge=!1,he.length=0},destroyGlobal:function(){this._deselectMultiDrag(),p(document,"pointerup",this._deselectMultiDrag),p(document,"mouseup",this._deselectMultiDrag),p(document,"touchend",this._deselectMultiDrag),p(document,"keydown",this._checkKeyDown),p(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ge&&ge||le!==this.sortable||t&&P(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;de.length;){var e=de[0];k(e,this.options.selectedClass,!1),de.shift(),G({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},a(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[K];e&&e.options.multiDrag&&!~de.indexOf(t)&&(le&&le!==e&&(le.multiDrag._deselectMultiDrag(),le=e),k(t,e.options.selectedClass,!0),de.push(t))},deselect:function(t){var e=t.parentNode[K],n=de.indexOf(t);e&&e.options.multiDrag&&~n&&(k(t,e.options.selectedClass,!1),de.splice(n,1))}},eventProperties:function(){var n=this,o=[],i=[];return de.forEach(function(t){var e;o.push({multiDragElement:t,index:t.sortableIndex}),e=fe&&t!==se?-1:fe?j(t,":not(."+n.options.selectedClass+")"):j(t),i.push({multiDragElement:t,index:e})}),{items:r(de),clones:[].concat(he),oldIndicies:o,newIndicies:i}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":1<t.length&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}),jt});
9
- (()=>{function x(a,u){return a?Array.prototype.slice.call(a.querySelectorAll(u)):[]}function T(a,u){return a?a.querySelector(u):null}function de(a,u){if(!a)return[];var p=x(a,u);return a.nodeType===1&&a.matches(u)&&p.unshift(a),p}function q(a,u){return a?Array.prototype.filter.call(a.children,function(p){return!u||p.matches(u)}):[]}function z(a,u){return q(a,u)[0]||null}function X(a,u,p){var s=a&&a.nodeType===1?a.closest(u):null;return s&&p&&s!==p&&!p.contains(s)?null:s}function Oe(a,u){return!!a&&a.nodeType===1&&a.matches(u)}function Le(a){return!!a&&document.documentElement.contains(a)}function Mo(a,u){for(var p=[],s=a.nextElementSibling;s;s=s.nextElementSibling)(!u||s.matches(u))&&p.push(s);return p}function Po(a,u){for(var p=[],s=a.parentElement;s&&s!==u;s=s.parentElement)p.push(s);return p}function Va(a){var u=document.createElement("template");return u.innerHTML=a,Array.prototype.slice.call(u.content.childNodes)}function V(a){for(var u=Va(a.trim()),p=0;p<u.length;p++)if(u[p].nodeType===1)return u[p];return null}function v(a,u,p){var s=document.createElement(a);return Object.keys(u||{}).forEach(function(c){var E=u[c];E!=null&&E!==!1&&s.setAttribute(c,E)}),p!=null&&(s.textContent=p),s}function mt(a,u){return a.innerHTML=u==null?"":String(u),a}function C(a,u){return $e(u).forEach(function(p){a.classList.add(p)}),a}function A(a,u){return $e(u).forEach(function(p){a.classList.remove(p)}),a}function M(a,u,p){return $e(u).forEach(function(s){p===void 0?a.classList.toggle(s):a.classList.toggle(s,!!p)}),a}function b(a,u){return!!a&&a.nodeType===1&&a.classList.contains(u)}function $e(a){return String(a||"").split(/\s+/).filter(Boolean)}function gt(a){return a.getAttribute("class")||a.removeAttribute("class"),a}function pt(a){return a.getAttribute("style")||a.removeAttribute("style"),a}function Kt(a,u){return Object.keys(u).forEach(function(p){var s=u[p];s==null?a.removeAttribute(p):a.setAttribute(p,s)}),a}function Me(a,u){return Object.keys(u).forEach(function(p){var s=u[p];typeof s=="number"&&!Ga[p]&&(s=s+"px"),a.style.setProperty(p,s==null?"":String(s))}),a}var Ga={opacity:!0,"z-index":!0,"flex-grow":!0,"flex-shrink":!0,order:!0},ft={};function qa(a){var u=a.nodeName;if(!ft[u]){var p=document.body.appendChild(document.createElement(u));ft[u]=getComputedStyle(p).display,p.remove(),ft[u]==="none"&&(ft[u]="block")}return ft[u]}function Pe(a){return a.style.removeProperty("display"),getComputedStyle(a).display==="none"&&(a.style.display=qa(a)),a}function ce(a){return a.style.display="none",a}function qn(a,u){return u===void 0&&(u=!vt(a)),u?Pe(a):ce(a)}function vt(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)}function ht(a){return a.getBoundingClientRect().width}function Bt(a){return a.getBoundingClientRect().height}function zo(a){var u=getComputedStyle(a);return a.clientHeight-parseFloat(u.paddingTop)-parseFloat(u.paddingBottom)}function Vt(a){var u=a.getBoundingClientRect();return{top:u.top+window.pageYOffset,left:u.left+window.pageXOffset}}function Gt(a,u){return u.parentNode.insertBefore(a,u.nextSibling),a}function qt(a){for(var u=a.parentNode;a.firstChild;)u.insertBefore(a.firstChild,a);a.remove()}function jo(a,u){return a.parentNode.insertBefore(u,a),u.appendChild(a),u}function bt(a,u,p,s,c){var E=function(w){var I=X(w.target,p,a);if(I&&a.contains(I))return s.call(I,w)};return $e(u).forEach(function(w){a.addEventListener(w,E,c)}),E}function fe(a,u,p,s){return $e(u).forEach(function(c){a.addEventListener(c,p,s)}),p}function Xn(a,u,p,s){$e(u).forEach(function(c){a.removeEventListener(c,p,s)})}var Xa=400;function Ro(a,u,p,s){p=p===void 0?Xa:p;var c=function(){ce(a),s&&s()};if(!vt(a)||!a.animate||p<=0){window.setTimeout(c,0);return}var E=a.animate(u(getComputedStyle(a)),{duration:p,easing:"ease-in-out"}),w=!1,I=function(){w||(w=!0,c())};E.onfinish=I,E.oncancel=I}function wt(a,u,p){typeof u=="function"&&(p=u,u=void 0),a.style.overflow="hidden",Ro(a,function(s){return[{height:s.height,paddingTop:s.paddingTop,paddingBottom:s.paddingBottom,marginTop:s.marginTop,marginBottom:s.marginBottom},{height:"0px",paddingTop:"0px",paddingBottom:"0px",marginTop:"0px",marginBottom:"0px"}]},u,function(){a.style.removeProperty("overflow"),p&&p()})}function No(a,u,p,s){a.style.overflow="hidden",Ro(a,function(c){var E={opacity:c.opacity,height:c.height},w={opacity:0,height:"0px"};return s&&(E.width=c.width,w.width="0px"),[E,w]},u,function(){a.style.removeProperty("overflow"),p&&p()})}var Io={getHtml:{value:!0},getPlainHtml:{value:!0},init:{},deinit:{},reset:{},destroy:{},changeView:{},getView:{value:!0},createRow:{value:!0},createColumn:{value:!0},createElement:{value:!0},createText:{value:!0},createSection:{value:!0},createContainer:{value:!0},addTab:{value:!0},addAccordionItem:{value:!0},addPane:{value:!0},setLocale:{},getUtility:{value:!0},setUtility:{value:!0},getActiveTarget:{value:!0},setActiveTarget:{},getSelected:{value:!0},setSelected:{}},Ja=["appendTo","prependTo","insertAfter","insertBefore"],$a=["data-bs-target","data-bs-parent","href","aria-controls","aria-labelledby","aria-describedby","for"],Qa=/^ge-([a-z][a-z-]*?)-\d+-[a-z0-9]+$/,y=[{key:"xs",infix:"",colPrefix:"col-",offsetPrefix:"offset-",min:0,preview:400,labelKey:"view.xs"},{key:"sm",infix:"sm",colPrefix:"col-sm-",offsetPrefix:"offset-sm-",min:576,preview:576,labelKey:"view.sm"},{key:"md",infix:"md",colPrefix:"col-md-",offsetPrefix:"offset-md-",min:768,preview:768,labelKey:"view.md"},{key:"lg",infix:"lg",colPrefix:"col-lg-",offsetPrefix:"offset-lg-",min:992,preview:992,labelKey:"view.lg"},{key:"xl",infix:"xl",colPrefix:"col-xl-",offsetPrefix:"offset-xl-",min:1200,preview:1200,labelKey:"view.xl"},{key:"xxl",infix:"xxl",colPrefix:"col-xxl-",offsetPrefix:"offset-xxl-",min:1400,preview:null,labelKey:"view.xxl"}],Z="all",Za="view.all",Yn=[Z].concat(y.map(function(a){return a.key})),H=12,Do=11,Jn=["equal","auto"],Qe=["1","2","3","4","5","6","auto"];function $n(a,u){return"row-cols"+(a.infix?"-"+a.infix:"")+"-"+u}function J(a){return typeof a=="number"}function Ue(a,u){return u==="equal"?a.infix?"col-"+a.infix:"col":a.colPrefix+u}function ee(a){for(var u=0;u<y.length;u++)if(y[u].key===a)return y[u];return null}function Fo(a){if(a===Z)return[y[0]];var u=ee(a);return u?[u]:[]}function yt(a){var u=ee(a);return u?u.labelKey:Za}var ze={add_column:{size:12,picker:!0,delay:600},elements:{enabled:"auto",selector:"[data-ge-element]",auto:!1,types:[]},resize:{enabled:!0,tools:!0,handles:"e",balance:"next"},indent:{tools:!0},sidebar:{empty:null},drag:{delay:0,touch_delay:100,threshold:3,animation:150,scroll:!0}},Ho={},el=0,Yt=new WeakMap,Xt=null,tl=".ge-mainControls, .ge-settings-panel, .ge-sidebar-toggle, .ge-dialog, .ge-confirm, .ge-size-picker, .modal, .modal-backdrop";function Zn(a,u,p){var s=S.locales,c=s[a.locale]||{},E=a.locale_strings||{},w=E[u];return w===void 0&&(w=c[u]),w===void 0&&(w=s.en[u]),w===void 0&&(rl("locale:"+u,'no string for "'+u+'" in any locale, showing the key'),w=u),w.replace(/\{(\w+)\}/g,function(I,me){return p&&p[me]!==void 0?p[me]:I})}function nl(a,u){var p=S.locales;return(a.locale_strings||{})[u]!==void 0||(p[a.locale]||{})[u]!==void 0||p.en[u]!==void 0}function W(a){window.console&&window.console.warn&&window.console.warn("grid-editor: "+a)}function rl(a,u){Ho[a]||(Ho[a]=!0,W(u))}function ol(a,u){return Zn({locale:"en"},a,u)}function il(a){if(typeof a=="string"){var u=document.querySelector(a);if(!u)throw new TypeError("grid-editor: no element matches "+JSON.stringify(a));return u}if(a&&a.nodeType===1)return a;throw new TypeError("grid-editor: the target is an element or a selector, not "+(a===null?"null":typeof a))}function ie(a){return typeof a=="string"?document.querySelector(a):a&&a.nodeType===1?a:null}function Wo(){return S.Sortable||window.Sortable||null}function Ct(){var a=S.bootstrap||window.bootstrap;return a&&a.Modal?a.Modal:null}function Qn(a){var u=document.implementation.createHTMLDocument("").body;u.innerHTML=a;var p=[];return x(u,"*").forEach(function(s){var c=!1;Array.prototype.slice.call(s.attributes).forEach(function(I){I.name.indexOf("data-ge-")===0&&(s.removeAttribute(I.name),c=!0)});var E=(s.getAttribute("class")||"").split(/\s+/).filter(Boolean),w=E.filter(function(I){return I!=="column"&&I.indexOf("ge-")!==0});w.length!==E.length&&(c=!0),w.length?s.setAttribute("class",w.join(" ")):s.removeAttribute("class"),c&&s.tagName==="DIV"&&!s.attributes.length&&p.push(s)}),p.forEach(function(s){qt(s)}),u.innerHTML}function S(a,u){var p=il(a),s=Yt.get(p);if(s)return Uo.has(p)||(Uo.add(p),W(ol("warning.already_editing"))),s;if(!(this instanceof S))return new S(p,u);al(this,p,u||{})}var Uo=new WeakSet;S.create=function(a,u){return new S(a,u)};S.get=function(a){var u=ie(a);return u&&Yt.get(u)||null};function al(a,u,p){var s=Object.assign({new_row_layouts:[[12],[6,6],[4,4,4],[3,3,3,3],[2,2,2,2,2,2],[2,8,2],[4,8],[8,4]],row_classes:[],col_classes:[],col_tools:[],row_tools:[],drag_handle:"tool",toolbar_drag:"auto",toolbar_overflow:"menu",drawer_overflow:"menu",toolbar_groups:!1,active_target:!1,element_tools:[],element_classes:[],container_classes:[],pane_classes:[],container_tools:[],tab_tools:[],accordion_tools:[],plugins:null,row_cols:!0,utilities:{},elements:ze.elements,custom_filter:"",valid_col_sizes:[1,2,3,4,5,6,7,8,9,10,11,12,"equal","auto"],valid_col_offsets:[0,1,2,3,4,5,6,7,8,9,10,11],add_column:ze.add_column,layout_modes:Yn.slice(),default_view:Z,resize:ze.resize,indent:ze.indent,source_textarea:"",edit_source:!0,locale:"en",locale_strings:{},callbacks:{},confirm_delete:!0,settings_panel:"offcanvas",sidebar:ze.sidebar,drag:ze.drag},p);if(Object.keys(ze).forEach(function(e){s[e]=Object.assign({},ze[e],s[e])}),s.settings_panel==="sidebar"){if(p&&p.active_target===!1)throw new TypeError('grid-editor: settings_panel "sidebar" needs active_target; leave it out or set it to true');s.active_target=!0}var c,E,w,I,me,Ke,te,j=s.default_view,R=null,ne=null,ye=!1,je=!1,Be=null,F=null,Et=null,Jt=function(){},$t=function(){},ge=[],xt={},Qt=null,er={},_t=[],tr=++el,kt=!1,G=null,Ve=null,nr=null;s.settings_panel==="sidebar"&&(Xt?(U("sidebar",'settings_panel "sidebar" is in use by another editor on the page, which has one sidebar: using offcanvas'),s.settings_panel="offcanvas"):Xt=a);var Re=new WeakMap,Zt=new WeakMap,At=new WeakMap,rr=new WeakMap,en=new WeakSet,tn=new AbortController;c=C(u,"ge-canvas");function U(e,t){er[e]||(er[e]=!0,W(t))}function g(e,t){return Zn(s,e,t)}function Ko(e){s.locale=e,a.settings=Wn(),ir(),Qr(),co(),mn(),fn(),Cr()}var Ze=0,nn=[];function re(e,t,n){return Object.assign({kind:e,node:t,parent:t.parentElement,canvas:c,breakpoint:Vn(),source:"api"},n||{})}function N(e,t){var n=[e],r=e.replace(/^(before|after)-add-.+$/,"$1-add");r!==e&&n.push(r);var o=!1;return n.forEach(function(i){var l=new CustomEvent("grideditor:"+i,{detail:t,bubbles:!0,cancelable:!0});c.dispatchEvent(l)||(o=!0)}),n.forEach(function(i){var l=s.callbacks[i.replace(/-/g,"_")];typeof l=="function"&&l(t)===!1&&(o=!0)}),!o}function $(e){Ze++;try{return e()}finally{if(Ze--,Ze===0)for(;nn.length;)nn.shift()()}}function rn(e){if(Ze===0){e();return}nn.push(e)}function ae(e,t,n,r){var o=Bo(e);return $(function(){var i=re(e,t,r);return N("before-add-"+o,i)?(n(),ve(),N("after-add-"+o,i),t):null})}function Bo(e){return S.containers[e]?"container":e}function Vo(e,t){if(!s.confirm_delete){t();return}or(e,{danger:!0},function(n){n&&t()})}function or(e,t,n){t=t||{};var r=Ct();if(!r){n(window.confirm(e));return}var o=Go(),i=!1,l=T(o,".ge-confirm-ok");Ne&&Ne(null);var d=function(f){Ne===d&&(Ne=null,n(f))};Ne=d,T(o,".modal-title").textContent=t.title||g("confirm.title"),T(o,".ge-confirm-cancel").textContent=t.cancel||g("confirm.cancel"),l.textContent=t.ok||g("confirm.ok"),M(l,"btn-danger",!!t.danger),M(l,"btn-primary",!t.danger),T(o,".ge-confirm-message").textContent=e,l.onclick=function(){i=!0,r.getInstance(o).hide()},Ce.hidden=function(){d(i)},Ce.shown=function(){l.focus()},r.getOrCreateInstance(o).show()}var Ce={hidden:null,shown:null},Ne=null;function Go(){if(R)return R;R=V('<div class="modal fade ge-confirm" tabindex="-1" aria-hidden="true"><div class="modal-dialog modal-dialog-centered"><div class="modal-content"><div class="modal-header"><h5 class="modal-title"></h5><button type="button" class="btn-close" data-bs-dismiss="modal"></button></div><div class="modal-body"><p class="ge-confirm-message"></p></div><div class="modal-footer"><button type="button" class="btn btn-secondary ge-confirm-cancel" data-bs-dismiss="modal"></button><button type="button" class="btn btn-danger ge-confirm-ok"></button></div></div></div></div>'),document.body.appendChild(R),T(R,".modal-title").textContent=g("confirm.title"),T(R,".btn-close").setAttribute("aria-label",g("confirm.cancel")),T(R,".ge-confirm-cancel").textContent=g("confirm.cancel"),T(R,".ge-confirm-ok").textContent=g("confirm.ok"),ar(R);var e=R;return R.addEventListener("hidden.bs.modal",function(){e===R&&Ce.hidden&&Ce.hidden()}),R.addEventListener("shown.bs.modal",function(){e===R&&Ce.shown&&Ce.shown()}),R}function ir(){R&&(Ce.hidden=null,Ce.shown=null,on(R),R=null,Ne&&Ne(null))}function on(e){var t=Ct(),n=t?t.getInstance(e):null,r=!1,o=function(){r||(r=!0,n&&n.dispose(),e.remove())};if(!n||!an.get(e)&&!b(e,"show")){o();return}e.addEventListener("hidden.bs.modal",o,{once:!0}),e.addEventListener("shown.bs.modal",function(){n.hide()},{once:!0}),n.hide()}var an=new WeakMap;function ar(e){fe(e,"show.bs.modal hide.bs.modal",function(){an.set(e,!0)}),fe(e,"shown.bs.modal hidden.bs.modal",function(){an.set(e,!1)})}function Ie(e,t,n,r){$(function(){var o=re(e,t,{source:"tool"});N("before-delete",o)&&Vo(n,function(){$(function(){r(function(){t.remove(),$(function(){ve(),N("after-delete",o)})})})})})}function ln(e,t,n){if(n=n||j,n!==Z){var r=ee(n),o=Ft({size:t,offset:It(e,r)||0});return o.refused||Xe(e,r)===o.size?null:{writes:[{tier:r,size:o.size}],cleared:null,size:o.size}}var i=y.some(function(m){return Ft({size:t,offset:It(e,m)||0}).refused});if(i)return null;var l=y[0],d=[],f=[];return y.slice(1).forEach(function(m){var h=Xe(e,m);h!==null&&(d.push({tier:m,size:null}),f.push({breakpoint:m.key,value:h}))}),Xe(e,l)!==t&&d.unshift({tier:l,size:t}),d.length?{writes:d,cleared:f,size:t}:null}function sn(e,t){t.writes.forEach(function(n){Dt(e,n.tier,n.size)}),Ye(e)}function un(e,t){return t&&(e.cleared=t),e}function dn(e,t,n,r){r=r||j;var o=ot(e),i=ln(e,t,r);return i?$(function(){var l=re("column",e,un({source:n,breakpoint:r,from:o,to:i.size},i.cleared));return N("before-resize",l)?(sn(e,i),he(e),N("after-resize",l),!0):(he(e),!1)}):!1}function lr(e,t,n){var r=j===Z,o=r?y[0]:ee(j),i=at(e);t=Math.min(Math.max(t,0),Do);var l=r?y.slice(1).filter(function(d){return Nt(e,d)!==null}):[];return(Nt(e,o)||0)===t&&!l.length?!1:$(function(){var d=re("column",e,un({source:n,from:i,to:t},r?l.map(function(f){return{breakpoint:f.key,value:Nt(e,f)}}):null));return N("before-indent",d)?(Rn(e,o,t),l.forEach(function(f){Rn(e,f,0)}),(r?y:[o]).forEach(function(f){var m=jn(e,f);if(J(m)){var h=Ft({size:m,offset:t,leading:"offset"});h.size!==m&&Dt(e,f,h.size)}}),he(e),N("after-indent",d),!0):!1})}function cn(e){var t=e.parentElement;return{parent:t,index:q(t).filter(function(n){return!b(n,"ge-tools-drawer")}).indexOf(e)}}function pe(e){var t=null;if(Object.keys(L).forEach(function(r){var o=L[r];!t&&o.kindOf&&(t=o.kindOf(e))}),t)return t;if(e.getAttribute("data-ge-container"))return e.getAttribute("data-ge-container");var n=null;return Object.keys(O).forEach(function(r){var o=O[r];!n&&o.paneClass&&b(e,o.paneClass)&&(n=o.paneKind)}),n||(b(e,"ge-tab")?"tab":b(e,"ge-accordion-item")?"accordion-item":b(e,"row")?"row":b(e,"column")?"column":b(e,"ge-element")?"element":(b(e,"ge-text-block")&&(e=z(e,".ge-content")||e),b(e,"ge-content")?e.getAttribute("data-ge-content-type")?"text":"plain":"node"))}if(s.source_textarea){var et=ie(s.source_textarea).value,sr=v("div");sr.innerHTML=et,et.length>0&&!sr.querySelector(".row")&&(et='<div class="row"><div class="col-lg-12">'+et+"</div></div>"),mt(u,et)}if(u.children.length&&!u.querySelector("div.row")){var qo=q(u),ur=V('<div class="row"><div class="col-lg-12"></div></div>');u.appendChild(ur),qo.forEach(function(e){ur.firstChild.appendChild(e)})}function Xo(){te=v("textarea",{class:"ge-html-output"}),c.parentNode.insertBefore(te,c),fn(),$i();var e={signal:tn.signal};window.addEventListener("scroll",pr,e),bt(c,"click",".ge-content",fi,e);var t=le()==="sidebar";if(s.active_target||t){var n=null;c.addEventListener("pointerdown",function(o){n={x:o.clientX,y:o.clientY}},e),c.addEventListener("click",function(o){var i=n;n=null,b(c,"ge-editing")&&(i&&Math.abs(o.clientX-i.x)+Math.abs(o.clientY-i.y)>s.drag.threshold||(s.active_target&&r(o),t&&c.contains(o.target)&&se(lo(o.target))))},e),document.addEventListener("keydown",function(o){if(!(o.key!=="Escape"||B||ue)&&!(R&&b(R,"show"))){var i=document.activeElement;i&&(Oe(i,"input, textarea, select")||i.isContentEditable)||(G&&dt()?se(null):F&&Ee(null))}},e)}t&&(c.addEventListener("focusin",function(o){var i=dt()?lo(o.target):null;i&&se(i)},e),document.addEventListener("click",function(o){var i=o.target;!G||!dt()||!i||i.nodeType!==1||!Le(i)||c.contains(i)||X(i,tl)||c.querySelector(".ge-rte-active")||se(null)},e),window.addEventListener("resize",to,e));function r(o){var i=X(o.target,Er());if(i&&i===F&&(o.target===i||o.target===z(i,".ge-tools-drawer"))){Ee(null);return}Ee(i&&i!==c&&c.contains(i)?i:null)}}function Yo(e){!Oe(e,".ge-content")||!c.contains(e)||(oe("onContentReady",e),rt(e))}function fn(){E=v("div",{class:"ge-mainControls"}),te.parentNode.insertBefore(E,te),w=E.appendChild(v("div",{class:"ge-wrapper ge-top"}));var e=s.toolbar_overflow!=="wrap",t=w;e&&(C(w,"ge-toolbar-menu"),t=w.appendChild(v("div",{class:"ge-toolbar-start"}))),ge=[],I=t.appendChild(v("div",{class:"ge-addRowGroup btn-group"})),me=v("div",{class:"ge-addContainerGroup btn-group ms-1"}),s.new_row_layouts.forEach(function(d){var f=!Array.isArray(d),m=v("a",{class:"btn btn-sm btn-light",title:f?g("row.add_row_cols",{columns:d.columns,counts:di(d.row_cols)}):g("row.add",{layout:d.join("-")}),"data-ge-toolbar":"row","data-ge-layout":f?JSON.stringify(d):d.join(",")});m.addEventListener("click",function(){if(F){bn(m,"tool");return}var k=tt(d),Q=ae("row",k,function(){c.appendChild(k)},{parent:c,source:"tool"});Q&&k.scrollIntoView&&k.scrollIntoView({behavior:"smooth"})}),I.appendChild(m),ge.push({button:m,home:I,group:"rows"}),m.appendChild(V('<i class="bi bi-plus"></i>'));var h=f?ci(d):d,_='<div class="row ge-row-icon">';h.forEach(function(k){_+='<div class="column '+Ue(y[0],k)+'"></div>'}),_+="</div>",m.appendChild(V(_))}),t.appendChild(me),Object.keys(O).forEach(function(d){var f=O[d],m=cr(v("a",{class:"btn btn-sm btn-light ge-add-container"}),g(f.labelKey),f.iconClass);Kt(m,{"data-ge-toolbar":"container","data-ge-container-type":d}),m.addEventListener("click",function(){if(F){bn(m,"tool");return}var h=Je(),_=h.appendChild(Te(H)),k=_.appendChild(f.create({}));ae(d,k,function(){c.appendChild(h)},{parent:c,source:"tool"})}),me.appendChild(m),ge.push({button:m,home:me,group:dr(f.group)||"content"})});var n=[];xt={},Object.keys(L).forEach(function(d){xt[d]=ei(L[d]),xt[d].forEach(function(f,m){var h=ri(d,f,m);f.align==="end"?n.push(h):(me.appendChild(h),ge.push({button:h,home:me,group:dr(f.group)||d}))})}),Ke=V('<div class="dropdown pull-right ge-layout-mode"><button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown"></button><div class="dropdown-menu" role="menu"></div></div>'),bt(Ke,"click","a",function(){So(this.getAttribute("data-ge-view"))}),w.appendChild(Ke),s.layout_modes.forEach(function(d){T(Ke,".dropdown-menu").appendChild(v("a",{class:"dropdown-item","data-ge-view":d,title:g(yt(d))},g(yt(d))))}),T(Ke,"button").textContent=g(yt(j));var r=w.appendChild(v("div",{class:"btn-group pull-right"}));if(s.edit_source){var o=V('<button type="button" class="btn btn-sm btn-primary gm-edit-mode"><i class="bi bi-code-slash"></i></button>');o.setAttribute("title",g("tool.edit_source")),M(o,"active btn-danger",ye),o.addEventListener("click",function(){ye?hn():pi(),M(o,"active btn-danger",ye)}),r.appendChild(o)}var i=V('<button type="button" class="btn btn-sm btn-primary gm-preview"><i class="bi bi-eye-fill"></i></button>');if(i.setAttribute("title",g("tool.preview")),M(i,"active btn-danger",je),i.addEventListener("mouseenter",function(){A(c,"ge-editing")}),i.addEventListener("click",function(){St(!je)}),i.addEventListener("mouseleave",function(){je||C(c,"ge-editing")}),r.appendChild(i),n.length){var l=w.appendChild(v("div",{class:"pull-right ge-toolbar-end"}));n.forEach(function(d){l.appendChild(d)})}s.toolbar_groups&&$o(t),e&&ni(t),ii()}var Jo=[{name:"rows",labelKey:"group.rows"},{name:"content",labelKey:"group.content"},{name:"elements",labelKey:"group.elements"}];function dr(e){return typeof e=="string"&&e.trim()!==""?e:null}function $o(e){var t=Jo.map(function(i){return i.name});if(ge.forEach(function(i){t.indexOf(i.group)<0&&t.push(i.group)}),t=t.filter(function(i){return ge.some(function(l){return l.group===i})}),t.length<2)return;var n=v("div",{class:"ge-toolbar-groups btn-group",role:"tablist","aria-label":g("group.select")});e.insertBefore(n,e.firstChild);var r=E.appendChild(v("div",{class:"ge-toolbar-stash",hidden:"hidden"}));t.forEach(function(i){var l=n.appendChild(v("button",{type:"button",class:"btn btn-sm btn-outline-secondary",role:"tab","data-ge-group":i},Qo(i)));l.addEventListener("click",function(){o(i)})}),o(t.indexOf(Qt)>=0?Qt:t[0]);function o(i){Qt=i,ge.forEach(function(l){(l.group===i?l.home:r).appendChild(l.button)}),q(n).forEach(function(l){var d=l.getAttribute("data-ge-group")===i;M(l,"active",d),l.setAttribute("aria-selected",d?"true":"false")}),$t()}}function Qo(e){var t="group."+e;if(nl(s,t))return g(t);var n=ge.filter(function(r){return r.group===e})[0];return n.button.getAttribute("title")||e}function Zo(){return ge.filter(function(e){return!X(e.button,".ge-toolbar-stash")})}function ei(e){var t=typeof e.toolbar=="function"?e.toolbar():e.toolbar;return Array.isArray(t)?t:[]}function ti(){!E||kt||(mn(),fn(),pr())}function mn(){Et&&Et.abort(),Et=null,Jt=function(){},$t=function(){},E.remove()}function ni(e){var t=V('<div class="ge-toolbar-more"><button type="button" class="btn btn-sm btn-light"><i class="bi bi-three-dots"></i></button><div class="ge-toolbar-overflow"><div class="ge-addRowGroup btn-group"></div><div class="ge-addContainerGroup btn-group"></div></div></div>');e.parentNode.insertBefore(t,e.nextSibling);var n=T(t,"button"),r=T(t,".ge-toolbar-overflow"),o=x(r,".btn-group");function i(k){return k===I?o[0]:o[1]}n.setAttribute("title",g("tool.more")),n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded","false");var l=Et=new AbortController,d={signal:l.signal};if(n.addEventListener("click",function(){h(!b(t,"ge-open"))}),r.addEventListener("click",function(k){X(k.target,"[data-ge-toolbar]")&&h(!1)}),document.addEventListener("pointerdown",function(k){t.contains(k.target)||h(!1)},d),document.addEventListener("keydown",function(k){k.key==="Escape"&&h(!1)},d),Jt=function(){h(!1)},$t=_,_(),window.ResizeObserver){var f=!1,m=new window.ResizeObserver(function(){f||(f=!0,window.requestAnimationFrame(function(){f=!1,l.signal.aborted||_()}))});m.observe(w),m.observe(e),l.signal.addEventListener("abort",function(){m.disconnect()})}function h(k){k=k&&b(t,"ge-needed"),M(t,"ge-open",k),n.setAttribute("aria-expanded",k?"true":"false")}function _(){var k=Zo();if(k.forEach(function(Lo){Lo.home.appendChild(Lo.button)}),A(t,"ge-needed"),e.scrollWidth<=e.clientWidth){h(!1);return}C(t,"ge-needed");for(var Q=k.length-1;Q>=0&&e.scrollWidth>e.clientWidth;Q--){var Oo=i(k[Q].home);Oo.insertBefore(k[Q].button,Oo.firstChild)}}}function cr(e,t,n){return e.setAttribute("title",t),n?(e.appendChild(v("i",{class:n})),e):(e.appendChild(V('<i class="bi bi-plus"></i>')),e.appendChild(v("span",{},t)),e)}function ri(e,t,n){var r=t.iconClass||(t.align==="end"?"bi bi-plus":null),o=typeof t.label=="function"?t.label():t.label||g(t.labelKey),i=t.align==="end"?"btn-primary":"btn-light",l=cr(v("a",{class:"btn btn-sm "+i+" ge-add-container ge-add-feature"}),o,r),d=typeof t.action=="function";return C(l,t.className||""),(typeof t.hidden=="function"?t.hidden():t.hidden)&&ce(l),Kt(l,{"data-ge-toolbar":"feature","data-ge-feature":e,"data-ge-item":n}),d&&(l.setAttribute("data-ge-action",""),(typeof t.disabled=="function"?t.disabled():t.disabled)&&(C(l,"disabled"),l.setAttribute("aria-disabled","true"))),l.addEventListener("click",function(){if(d){b(l,"disabled")||t.action(l);return}if(F){bn(l,t.source||"tool");return}var f=t.create();if(f){var m=t.inColumn?gn(f):f,h=ae(t.kind,f,function(){c.appendChild(m)},{parent:c,source:t.source||"tool"});h&&t.inColumn&&m.scrollIntoView&&m.scrollIntoView({behavior:"smooth"})}}),l}function oi(){return s.toolbar_drag==="auto"?s.drag_handle==="drawer":!!s.toolbar_drag}function ii(){var e=x(E,"[data-ge-toolbar]:not([data-ge-action])");e.forEach(function(t){A(t,"ge-palette-button"),t.removeEventListener("pointerdown",fr)}),oi()&&e.forEach(function(t){C(t,"ge-palette-button"),t.addEventListener("pointerdown",fr)})}function fr(e){var t=e.currentTarget,n=e.pageX,r=e.pageY,o=null;if(e.button)return;function i(f){return Math.abs(f.pageX-n)+Math.abs(f.pageY-r)>s.drag.threshold}function l(f){if(!o){if(!i(f))return;o=C(t.cloneNode(!0),"ge-toolbar-helper"),document.body.appendChild(o),Jt(),C(c,"ge-dropping")}Me(o,{left:f.pageX-14,top:f.pageY-14}),li(f.pageX,f.pageY)}function d(f){if(document.removeEventListener("pointermove",l),Xn(document,"pointerup pointercancel",d),!!o){o.remove(),A(c,"ge-dropping"),pn();var m=function(_){_.target!==t&&!t.contains(_.target)||(_.preventDefault(),_.stopImmediatePropagation())};window.addEventListener("click",m,{capture:!0,once:!0}),window.setTimeout(function(){window.removeEventListener("click",m,{capture:!0})},0);var h=mr(f.pageX,f.pageY);h&&gr(t,h)}}document.addEventListener("pointermove",l),fe(document,"pointerup pointercancel",d)}function mr(e,t){var n=e-window.scrollX,r=t-window.scrollY,o=document.elementFromPoint(n,r);if(!o)return null;var i=X(o,[".column",".ge-canvas"].concat(Ht("regions")).join(", "));if(!i||i!==c&&!c.contains(i))return null;var l=null;return q(i,In()).forEach(function(d){if(!l){var f=d.getBoundingClientRect();r<f.top+f.height/2&&(l=d)}}),{region:i,before:l}}function ai(e,t,n){var r=(xt[e.getAttribute("data-ge-feature")]||[])[parseInt(e.getAttribute("data-ge-item"),10)];if(!r)return null;var o=r.create();if(!o)return null;var i=o;if(r.inColumn)Oe(t.region,".column")||(i=gn(o));else if(!Dn(t.region,o)){var l=t.region===c?[]:Po(t.region,c).reverse().concat([t.region]),d=l[0]||null;t={region:c,before:d?d.nextElementSibling:null}}return ae(r.kind,o,function(){t.before?t.before.parentNode.insertBefore(i,t.before):t.region.appendChild(i)},{parent:t.region,source:r.source||n||"dragdrop"})}function gn(e){var t=Je();return t.appendChild(Te(H)).appendChild(e),t}function li(e,t){var n=mr(e,t);if(!n)return pn();Be||(Be=v("div",{class:"ge-drop-marker"})),n.before?n.before.parentNode.insertBefore(Be,n.before):n.region.appendChild(Be)}function pn(){Be&&Be.remove()}function gr(e,t,n){if(e.getAttribute("data-ge-toolbar")==="feature")return ai(e,t,n);var r=e.getAttribute("data-ge-toolbar")==="container",o=e.getAttribute("data-ge-container-type"),i=r?O[o].create({}):ui(e.getAttribute("data-ge-layout")),l=i;return r&&!Oe(t.region,".column")&&(l=gn(i)),ae(r?o:"row",i,function(){t.before?t.before.parentNode.insertBefore(l,t.before):t.region.appendChild(l)},{parent:t.region,source:n||"dragdrop"})}function si(){for(var e=[],t=1;t<=H;t++)e.push(String(t));return{name:"col",values:e.concat(Jn),appliesTo:["column"],labelKey:"utility.col_width",className:function(n,r){return Ue(ee(n),vn(r))},choices:function(){return s.valid_col_sizes.map(String)},label:function(n){return n==="equal"?g("utility.col_equal"):n==="auto"?g("utility.col_auto"):n},write:function(n,r,o,i){return dn(n,r===null?null:vn(r),i,o)},blank:function(n,r){var o=r===Z?null:Rt(n,ee(r));return o?g("utility.col_from_row",{count:go(o.value)}):null}}}function vn(e){return/^\d+$/.test(String(e))?parseInt(e,10):e}function ui(e){return/^\s*\{/.test(e||"")?tt(JSON.parse(e)):tt((e||"").split(",").filter(function(t){return t!==""}).map(vn))}function tt(e){var t=Je();if(Array.isArray(e))return e.forEach(function(r){t.appendChild(Te(r))}),t;Object.keys(e.row_cols||{}).forEach(function(r){var o=e.row_cols[r],i=ee(r);i&&Qe.indexOf(String(o))!==-1&&C(t,$n(i,o))});for(var n=0;n<(e.columns||0);n++)t.appendChild(Te(null));return t}function di(e){return y.filter(function(t){return e&&e[t.key]!==void 0}).map(function(t){return(t.infix?t.key+": ":"")+e[t.key]}).join(", ")}function ci(e){var t=1;return Object.keys(e.row_cols||{}).forEach(function(n){var r=e.row_cols[n];r!=="auto"&&(t=Math.max(t,parseInt(r,10)||1))}),Array.apply(null,Array(Math.min(t,e.columns||t))).map(function(){return"equal"})}function pr(){var e=window.pageYOffset;e>Vt(E).top&&e<Vt(c).top+zo(c)?b(w,"ge-top")&&(Me(w,{left:Vt(w).left,width:ht(w)}),A(w,"ge-top"),C(w,"ge-fixed")):b(w,"ge-fixed")&&(Me(w,{left:"",width:""}),A(w,"ge-fixed"),C(w,"ge-top"))}function fi(){var e=this;if(!e.getAttribute("data-ge-content-type")&&!be()&&vt(e)){var t=yr();t.length&&(t.length===1?vr(e,t[0]):mi(e,t))}}function vr(e,t){return t.available&&!t.available()?(t.missingKey&&console.error(g(t.missingKey)),!1):$(function(){var n=re("plain",e,{source:"tool",from:"plain",to:t.type});if(!N("before-convert",n))return!1;C(e,"ge-content-type-"+t.type),e.setAttribute("data-ge-content-type",t.type);var r=e.parentElement;return b(r,"ge-text-block")&&(A(r,"ge-plain-block"),q(r,".ge-tools-drawer").forEach(function(o){o.remove()})),N("after-convert",n),t.edit(e),!0})}function mi(e,t){var n=b(e.parentElement,"ge-text-block")?e.parentElement:null;n&&hr(z(n,".ge-tools-drawer"),t.map(function(r){return{label:r.label,title:g("tool.convert_type",{editor:r.label}),attributes:{"data-ge-content-type":r.type},choose:function(){vr(e,r)}}}),"ge-text-picker ge-convert-picker",n)}function hr(e,t,n,r){if(be(),!!e){var o=X(e,".ge-tools-drawer");o&&C(o,"ge-picker-open"),ne=e.appendChild(C(v("div",{class:"ge-size-picker"}),n||"")),t.forEach(function(i){var l=Kt(v("a",{class:"ge-size ge-size-flex"}),i.attributes||{});l.setAttribute("title",i.title||i.label),l.textContent=i.label,l.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),be(),i.choose()}),ne.appendChild(l)}),br(r||e)}}function br(e){e.addEventListener("mouseleave",function(){window.setTimeout(function(){ne&&!ne.matches(":hover")&&be()},400)},{once:!0})}function wr(){var e={},t=[];return Object.keys(L).forEach(function(n){var r=L[n];r.textTypes&&(r.textTypes()||[]).forEach(function(o){if(e[o.type]){e[o.type]!==n&&U("text-type:"+o.type,'the "'+n+'" plugin declares the text type "'+o.type+'", which the "'+e[o.type]+'" plugin already declares: ignored');return}e[o.type]=n,t.push(o)})}),t}function yr(){return wr().filter(function(e){return e.offered!==!1})}function gi(e){return wr().some(function(t){return t.type===e})}function Cr(){De(),ve()}function St(e){if(e=!!e,e!==je){je=e;var t=E?T(E,".gm-preview"):null;t&&M(t,"active btn-danger",e),M(c,"ge-editing",!e),oe("onPreviewChange",e),N("preview-change",{canvas:c,previewing:e})}}function pi(){St(!1),De(),Ee(null),se(null),te.style.height=.8*document.documentElement.clientHeight+"px",te.value=c.innerHTML,Pe(te),ce(c),ye=!0,oe("onSourceOpen",te)}function hn(){oe("onSourceClose",te),ye=!1,mt(c,te.value),Pe(c),ve(),ce(te)}function Er(){return[".column"].concat(Ht("regions")).join(", ")}function xr(e){return!!e&&e!==c&&c.contains(e)&&Oe(e,Er())}function Ee(e){if(e!==F){var t=F;t&&A(t,"ge-active-target"),F=e,e&&b(c,"ge-editing")&&C(e,"ge-active-target"),N("target-change",{canvas:c,target:e,from:t})}}function bn(e,t){var n=gr(e,{region:F,before:null},t);n&&n.scrollIntoView&&n.scrollIntoView({behavior:"smooth"})}function ve(){B&&!Le(B.node)&&Ae(),G&&!c.contains(G)&&se(null),ue&&ue.home&&!Le(ue.home)&&we(),Un(!0),M(c,"ge-editing",!je),M(c,"ge-drag-drawer",s.drag_handle==="drawer"),ca();var e=Ra();Na(e),Da(e),Fa(),qi(),Xi(),Ii(),oe("onInit"),ba(),Ea(),Ao(j),rt(c),F&&!c.contains(F)?Ee(null):F&&C(F,"ge-active-target"),la()}function De(){Ae(),sa(),A(c,"ge-editing ge-drag-drawer ge-dropping"),F&&A(F,"ge-active-target"),oe("onBeforeDeinit"),be(),pn(),we(),_r(c),Lt.clear(),ko(c),oe("onDeinit"),Ot(c),kr(c),Di(),La(),ka(),Un(!1,c)}function _r(e){x(e,".ge-tools-drawer").forEach(function(t){t.remove()})}function kr(e){x(e,"[data-ge-row-cols]").forEach(function(t){t.removeAttribute("data-ge-row-cols")})}function vi(){var e=[];return[O,L,K].forEach(function(t){Object.keys(t).forEach(function(n){var r=t[n],o=r.unmark||r.onDeinit||r.onBeforeDeinit;o&&!r.cleanMarkup&&e.push(n)})}),e}function hi(){for(var e=c.cloneNode(!0),t=new Map,n=new Map,r=document.createTreeWalker(c,NodeFilter.SHOW_ELEMENT),o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),i=r.currentNode,l=o.currentNode;i&&l;)t.set(l,i),n.set(i,l),i=r.nextNode(),l=o.nextNode();return{root:e,liveOf:function(d){return t.get(d)||null},copyOf:function(d){return n.get(d)||null}}}function Ar(){if(ye)return nt();var e=vi();if(e.length)return e.forEach(function(o){U("snapshot:"+o,'the "'+o+'" plugin has no cleanMarkup, so the canvas leaves editing to be read: open texts and settings panels close')}),nt();var t=hi(),n=t.root;[n].concat(x(n,".ge-active-target, .ge-settings-target")).forEach(function(o){A(o,"ge-active-target ge-settings-target"),gt(o)}),x(n,".ge-drop-marker").forEach(function(o){o.remove()}),_r(n),ko(n);var r=null;return[O,L,K].forEach(function(o){Object.keys(o).forEach(function(i){var l=o[i];r||!l.cleanMarkup||l.cleanMarkup(n,t.liveOf)===!1&&(r=i)})}),r?(U("snapshot-refused:"+r,'the "'+r+'" plugin cannot take its marking off a copy right now, so the canvas leaves editing to be read'),nt()):(Ot(n),kr(n),x(n,"[data-ge-container]").forEach(Hr),_t.forEach(function(o){var i=t.copyOf(o.el);i&&x(i,"[draggable]").forEach(function(l){l.removeAttribute("draggable")})}),yo(n),Un(!1,n),Ye(n),n.innerHTML)}function nt(e){if(e&&e.keepEditing)return Ar();De(),Ye(c);var t=c.innerHTML;return ve(),t}function bi(e){De(),Ye(e);var t=e.outerHTML;return ve(),t}function wi(e){return Qn(nt(e))}function yi(e){ye&&(hn(),E&&x(E,".gm-edit-mode").forEach(function(t){A(t,"active btn-danger")})),St(!1),De(),mt(c,e),ve()}function Ci(){oe("onDestroy"),ye&&hn(),St(!1),De(),F=null,G=null,Xt===a&&(Xt=null),ir(),Qr(),co(),mn(),te.remove(),tn.abort(),Yt.delete(c),kt=!0}function Ei(){var e=nr=xi();yn("grid",{},si()),s.row_cols!==!1&&yn("grid",{},pa());var t=function(r){return!s.plugins||s.plugins.indexOf(r)!==-1},n=function(r,o){return o.always===!0||t(r)};Object.keys(S.containers).forEach(function(r){t(r)&&(O[r]=S.containers[r](e))}),Object.keys(S.features).forEach(function(r){var o=S.features[r];n(r,o)&&(L[r]=o(e))}),Object.keys(S.utilities).forEach(function(r){t(r)&&(K[r]=S.utilities[r](e),(K[r].families||[]).forEach(function(o){yn(r,K[r],o)}))}),Object.keys(L).forEach(function(r){var o=L[r].methods||{};Object.keys(o).forEach(function(i){Fe[i]=o[i]})}),(s.plugins||[]).forEach(function(r){O[r]||L[r]||K[r]||U("plugin:"+r,'the "'+r+'" plugin is not loaded: include dist/plugins/grideditor.'+r+".js after the editor")})}function oe(e,t){[O,L,K].forEach(function(n){Object.keys(n).forEach(function(r){n[r][e]&&n[r][e](t)})})}function xi(){return{canvas:c,settings:s,t:g,warn:W,containerId:Fr,freshNode:Ri,defaultRegion:Ni,createTool:D,createMoveTool:We,addSettingsTool:st,deleteNode:Ie,place:Ut,createPaneControls:Hi,makeLabelEditable:Wi,labelIn:Ui,unwrapLabels:Ki,suspendToggles:Wr,resumeToggles:Ur,emit:N,payloadFor:re,operate:$,kindOf:pe,view:Vn,previewing:function(){return je},viewTiers:function(){return Fo(j).map(function(e){return e.key})},breakpoints:y.map(function(e){return e.key}),getUtility:zr,setUtility:xn,utilityField:ji,bareStyle:Si,hostStyle:jr,setHostStyle:Pi,openDialog:uo,closeDialog:we,rowFromLayout:tt,nodeHtml:bi,snapshotHtml:Ar,setHtml:yi,confirm:or,textReady:Yo,attachPicker:Br,openPicker:hr,closePicker:be,detailsOf:On,drawerOf:_i,refreshToolbar:ti,toolbarItems:function(e){return E?x(E,'[data-ge-toolbar="feature"][data-ge-feature="'+e+'"]'):[]},getSelected:function(){return le()==="sidebar"?G:null},getActiveTarget:function(){return s.active_target?F:null},setSelected:function(e){var t=le()==="sidebar"&&!!e&&e!==c&&c.contains(e)&&Re.has(e);return t&&se(e),t},setActiveTarget:function(e){var t=!!s.active_target&&xr(e);return t&&Ee(e),t},panelOpen:function(){return B||ue||R&&b(R,"show")?!0:le()==="inline"&&x(c,".ge-tools-drawer > .ge-details").some(vt)},contains:function(e){return!e||e.nodeType!==1?!1:c.contains(e)||E&&E.contains(e)||Y&&Y.contains(e)||R&&R.contains(e)?!0:Object.keys(P).some(function(t){return P[t].contains(e)})}}}function _i(e){if(b(e,"ge-content")){var t=e.parentElement;return b(t,"ge-text-block")?z(t,".ge-tools-drawer"):null}return z(e,".ge-tools-drawer")}var xe={},ki=".row, .column, .ge-content, .ge-element, [data-ge-container]",Ge="data-ge-preview",wn=!1;function yn(e,t,n){var r=n.name||n.prefix;if(xe[r]){W('the "'+e+'" plugin declares the utility "'+r+'", which the "'+xe[r].plugin+'" plugin already declared: ignored');return}xe[r]={plugin:e,family:Object.assign({},n,{name:r,values:n.values.map(String),appliesTo:n.appliesTo||t.appliesTo||["row","column"]})}}function Tt(e,t){return xe[e]?xe[e].family:(U("utility:"+e,t+"("+JSON.stringify(e)+"): no loaded plugin declares that utility"),null)}function Sr(e,t){return t==="plain"&&(t="text"),e.appliesTo.indexOf(t)!==-1?!0:!!O[t]&&e.appliesTo.indexOf("container")!==-1}function Tr(e){return Object.keys(xe).map(function(t){return xe[t].family}).filter(function(t){return Sr(t,e)})}function Cn(e,t,n){return e.className?e.className(t.key,n):e.prefix+(t.infix?"-"+t.infix:"")+"-"+n}function _e(e,t,n){for(var r=(e.getAttribute("class")||"").split(/\s+/),o=0;o<t.values.length;o++)if(r.indexOf(Cn(t,n,t.values[o]))!==-1)return t.values[o];return null}function Or(e,t,n){for(var r=y.indexOf(n)-1;r>=0;r--){var o=_e(e,t,y[r]);if(o!==null)return{tier:y[r],value:o}}return null}function Lr(e,t,n){var r=_e(e,t,n);if(r!==null)return r;var o=Or(e,t,n);return o?o.value:null}function En(e,t){return y.map(function(n){return{tier:n,value:_e(e,t,n)}}).filter(function(n){return n.value!==null})}function Mr(e,t,n,r){t.values.forEach(function(o){A(e,Cn(t,n,o))}),r!==null&&C(e,Cn(t,n,r)),gt(e)}function Pr(e,t,n){return n===Z?_e(e,t,y[0]):Lr(e,t,ee(n))}function Ai(e,t,n,r){if(n!==Z){var o=ee(n);return _e(e,t,o)===r?null:{writes:[{tier:o,value:r}],cleared:[]}}var i=[],l=[];return En(e,t).forEach(function(d){d.tier!==y[0]&&(i.push({tier:d.tier,value:null}),l.push({breakpoint:d.tier.key,value:d.value}))}),_e(e,t,y[0])!==r&&i.unshift({tier:y[0],value:r}),i.length?{writes:i,cleared:l}:null}function zr(e,t,n){e=ie(e);var r=Tt(t,"getUtility");if(!r||!e)return null;var o=n===void 0?j:Bn(n);return o===null?(W("getUtility("+JSON.stringify(n)+"): no such layout mode"),null):Pr(e,r,o)}function xn(e,t,n,r){r=typeof r=="string"?{view:r}:r||{},e=ie(e);var o=Tt(t,"setUtility");if(!o||!e)return!1;var i=r.view===void 0?j:Bn(r.view);if(i===null)return W("setUtility("+JSON.stringify(r.view)+"): no such layout mode"),!1;if(n=n==null||n===""?null:String(n),n!==null&&o.values.indexOf(n)===-1)return W("setUtility: "+JSON.stringify(n)+' is not a value of "'+t+'", which takes '+JSON.stringify(o.values)),!1;var l=pe(e);if(!Sr(o,l))return W('setUtility: "'+t+'" does not apply to a '+l),!1;if(o.write)return o.write(e,n,i,r.source||"api");var d=Ai(e,o,i,n);return d?$(function(){var f=re(l,e,{family:t,breakpoint:i,tiers:d.writes.map(function(m){return m.tier.key}),from:Pr(e,o,i),to:n,cleared:d.cleared,source:r.source||"api"});return N("before-utility",f)?(d.writes.forEach(function(m){Mr(e,o,m.tier,m.value)}),he(e),N("after-utility",f),!0):(he(e),!1)}):!1}function Si(e,t,n){var r=Tt(t,"bareStyle");if(e=ie(e),!r||!e)return null;var o=e.getAttribute("class");y.forEach(function(l){Mr(e,r,l,null)});var i=getComputedStyle(e).getPropertyValue(n);return o===null?e.removeAttribute("class"):e.setAttribute("class",o),i}function he(e){var t=On(e);if(t){var n=T(t,".ge-classes");n&&(n.value=Tn(e).join(" ")),q(t,".ge-utilities").forEach(function(r){_n(r)})}Nr(e),rt(e)}function Ti(e){return de(e,ki)}function rt(e){Ot(e),j!==Z&&Oi(e,ee(j)),ga(e),oe("onRefresh",e)}function Oi(e,t){Ti(e).forEach(function(n){var r=pe(n),o={};Tr(r).forEach(function(i){!i.preview||!En(n,i).length||Object.assign(o,i.preview(Lr(n,i,t),n,r))}),r==="column"&&Object.assign(o,ma(n,t)),Object.keys(K).forEach(function(i){var l=K[i];l.preview&&Object.assign(o,l.preview(n,r,t.key))}),Object.keys(o).length&&Li(n,o)})}function Li(e,t){var n=e.style,r={};Object.keys(t).forEach(function(o){r[o]=[n.getPropertyValue(o),n.getPropertyPriority(o)],n.setProperty(o,String(t[o]),"important")}),e.setAttribute(Ge,JSON.stringify(r))}function Ot(e){de(e,"["+Ge+"]").forEach(function(t){var n=t.style,r={};try{r=JSON.parse(t.getAttribute(Ge))||{}}catch(o){}Object.keys(r).forEach(function(o){var i=r[o];i&&i[0]?n.setProperty(o,i[0],i[1]):n.removeProperty(o)}),t.removeAttribute(Ge),pt(t)})}function Mi(e){var t=document.createElement("div"),n={};t.style.cssText=e.style.cssText;try{n=JSON.parse(e.getAttribute(Ge))||{}}catch(r){}return Object.keys(n).forEach(function(r){var o=n[r];o&&o[0]?t.style.setProperty(r,o[0],o[1]):t.style.removeProperty(r)}),t.style}function jr(e,t){var n=Mi(e);return t===void 0?n.cssText:{value:n.getPropertyValue(t),priority:n.getPropertyPriority(t)}}function Pi(e,t,n,r){if(n=n==null?"":String(n).trim(),r===void 0&&(r=jr(e,t).priority),n!==""){var o=document.createElement("div").style;if(o.setProperty(t,n,r||""),o.getPropertyValue(t)==="")return!1}var i=e.hasAttribute(Ge);return i&&Ot(e),n===""?e.style.removeProperty(t):e.style.setProperty(t,n,r||""),pt(e),i&&rt(e),!0}function zi(e){var t=pe(e),n=Tr(t).filter(function(l){return l.panel!==!1}).map(function(l){return Rr(e,l)});if(Object.keys(K).forEach(function(l){var d=K[l],f=d.panel?d.panel(e,t):null;f&&n.push(f)}),!n.length)return null;var r=M(v("div",{class:"ge-utilities"}),"ge-open",wn);rr.set(r,e);var o=r.appendChild(v("a",{class:"ge-utilities-toggle"}));o.addEventListener("click",function(){wn=!b(r,"ge-open"),Yr().forEach(function(l){x(l,".ge-utilities").forEach(function(d){M(d,"ge-open",wn)})})});var i=r.appendChild(v("div",{class:"ge-utilities-body"}));return n.forEach(function(l){i.appendChild(l)}),_n(r),r}function Rr(e,t){var n=v("label",{class:"ge-utility","data-ge-family":t.name});n.appendChild(v("span",{class:"ge-utility-label"},t.labelKey?g(t.labelKey):t.name));var r=n.appendChild(v("select",{class:"form-select form-select-sm"}));return r.addEventListener("change",function(){xn(e,t.name,this.value,{source:"panel"})}),n.appendChild(v("small",{class:"ge-utility-note"})),n}function ji(e,t){var n=Tt(t,"utilityField");if(!n)return null;var r=Rr(e,n);return kn(r,e),Lt.set(r,e),r}var Lt=new Map;function Nr(e){Lt.forEach(function(t,n){if(!n.isConnected){Lt.delete(n);return}e&&t!==e||X(n,".ge-utilities")||kn(n,t)})}function _n(e){var t=rr.get(e);q(e,".ge-utilities-toggle").forEach(function(n){n.textContent=g("utility.section",{view:g(yt(j))})}),x(e,".ge-utility").forEach(function(n){kn(n,t)})}function kn(e,t){var n=xe[e.getAttribute("data-ge-family")].family,r=z(e,"select"),o=n.choices?n.choices(t,pe(t)):n.values,i,l,d="";if(r.innerHTML="",j===Z){i=_e(t,n,y[0]),l=g("utility.default");var f=En(t,n).filter(function(Q){return Q.tier!==y[0]});f.length&&(d=g("utility.varies",{breakpoints:f.map(function(Q){return Q.tier.key}).join(", ")}))}else{var m=ee(j),h=Or(t,n,m);i=_e(t,n,m),l=h?g("utility.inherit",{value:Ir(n,h.value),breakpoint:h.tier.key}):g("utility.default");var _=n.blank?n.blank(t,j):null;_&&i===null&&(l=_)}i!==null&&o.indexOf(i)===-1&&(o=o.concat([i])),r.appendChild(v("option",{value:""},l)),o.forEach(function(Q){r.appendChild(v("option",{value:Q},Ir(n,Q)))}),r.value=i===null?"":i;var k=z(e,".ge-utility-note");k.textContent=d,qn(k,d!=="")}function Ir(e,t){return e.label?e.label(t):t}var O={},L={},K={},Fe={},Dr=0;function Fr(e){return Dr++,"ge-"+e+"-"+Dr+"-"+Math.random().toString(36).slice(2,6)}function Ri(e){var t=V(e),n={},r=function(i){return!!document.getElementById(i)||Object.keys(n).some(function(l){return n[l]===i})};if(de(t,"[id]").forEach(function(i){var l=i.id;if(document.getElementById(l)){var d=Qa.exec(l),f;if(d)do f=Fr(d[1]);while(r(f));else{for(var m=2;r(l+"-"+m);)m++;f=l+"-"+m}n[l]=f,i.id=f}}),!Object.keys(n).length)return t;var o=Object.keys(O).reduce(function(i,l){return i.concat(O[l].references||[])},$a);return de(t,"*").forEach(function(i){o.forEach(function(l){var d=i.getAttribute(l);if(d!==null&&!(l==="href"&&d.charAt(0)!=="#")){var f=d.split(/(\s+)/).map(function(m){return n[m]?n[m]:m.charAt(0)==="#"&&n[m.slice(1)]?"#"+n[m.slice(1)]:m}).join("");f!==d&&i.setAttribute(l,f)}})}),t}function Ni(){var e=Je();return e.appendChild(Te(H)),e}function He(e){return e?e.getAttribute("data-ge-container"):null}function Ii(){x(c,"[data-ge-container]").forEach(function(e){var t=He(e),n=O[t];if(!n){U("container:"+t,'unknown container type "'+t+'"');return}C(e,"ge-container ge-container-"+t),n.mark(e),z(e,".ge-tools-drawer")||Fi(e,t,n)})}function Di(){x(c,"[data-ge-container]").forEach(function(e){var t=O[He(e)];t&&t.unmark(e),Hr(e)})}function Hr(e){A(e,"ge-container ge-container-"+He(e)),gt(e)}function qe(e,t){var n=v("div",{class:t});return e.insertBefore(n,e.firstChild),n}function Mt(e,t){(t||[]).forEach(function(n){D(e,n.title||"",n.className||"",n.iconClass||"bi bi-wrench",n.on)})}function Fi(e,t,n){var r=qe(e,"ge-tools-drawer ge-container-drawer");We(r),st(r,e,s.container_classes),Mt(r,s.container_tools),n.tools&&n.tools(r,e),D(r,g("tool.delete_container"),"ge-delete-container","bi bi-trash",function(){Ie(t,e,g("confirm.delete_container"),function(o){wt(e,o)})}),n.addPane&&D(r,g(n.addPaneKey),"ge-add-pane","bi bi-plus-circle",function(){var o=n.addPane(e,{});o&&ae(n.paneKind,o,function(){},{parent:e,source:"tool",container:e})})}function Hi(e,t,n,r,o){var i=qe(e,"ge-tools-drawer ge-pane-drawer");return We(i),st(i,e,s.pane_classes),Mt(i,n),D(i,g("tool.delete_pane"),"ge-delete-pane","bi bi-trash",function(){Ie(t,e,r,function(l){o(l)})}),i}var Pt=["toggle","dismiss","slide","slide-to","ride"];function Wr(e){e&&de(e,Pt.map(function(t){return"[data-bs-"+t+"]"}).join(", ")).forEach(function(t){Pt.forEach(function(n){var r=t.getAttribute("data-bs-"+n);r!==null&&(t.setAttribute("data-ge-bs-"+n,r),t.removeAttribute("data-bs-"+n))})})}function Ur(e){e&&de(e,Pt.map(function(t){return"[data-ge-bs-"+t+"]"}).join(", ")).forEach(function(t){Pt.forEach(function(n){var r=t.getAttribute("data-ge-bs-"+n);r!==null&&(t.setAttribute("data-bs-"+n,r),t.removeAttribute("data-ge-bs-"+n))})})}function Wi(e){if(!en.has(e)){var t=X(e,"[data-bs-toggle], [data-ge-bs-toggle]");en.add(e),e.setAttribute("title",g("tool.rename")),e.addEventListener("dblclick",function(n){n.preventDefault(),n.stopPropagation(),Wr(t),e.setAttribute("contenteditable","true"),e.focus(),window.getSelection().selectAllChildren(e)}),e.addEventListener("keydown",function(n){e.getAttribute("contenteditable")==="true"&&n.key==="Enter"&&(n.preventDefault(),e.blur())}),e.addEventListener("blur",function(){e.removeAttribute("contenteditable"),Ur(t)})}}function Ui(e){var t=z(e,".ge-pane-label");return t||(t=v("span",{class:"ge-pane-label"},e.textContent.trim()),e.innerHTML="",e.appendChild(t)),t}function Ki(e){x(e,".ge-pane-label").forEach(function(t){en.delete(t),qt(t)})}function Kr(e,t){var n=Te(t);return ae("column",n,function(){e.appendChild(n)},{parent:e,source:"tool"})}function Bi(e,t){!s.add_column.picker||!e||Br(e,function(){Vi(e,t)})}function Br(e,t){var n=null,r=function(){window.clearTimeout(n),n=null};fe(e,"mouseenter mousedown",function(){n||ne||(n=window.setTimeout(function(){n=null,t()},s.add_column.delay))}),fe(e,"mouseleave mouseup",r)}function Vi(e,t){be();var n=Nn(t,ke()),r=X(e,".ge-tools-drawer");r&&C(r,"ge-picker-open"),ne=e.appendChild(v("div",{class:"ge-size-picker"})),s.valid_col_sizes.forEach(function(o){var i=v("a",{class:"ge-size","data-ge-size":o,title:Gi(o)},J(o)?o:Ue(y[0],o));M(i,"ge-size-tight",J(o)&&o>n),M(i,"ge-size-flex",!J(o)),i.addEventListener("click",function(l){l.preventDefault(),l.stopPropagation(),be(),Kr(t,o)}),ne.appendChild(i)}),br(e)}function Gi(e){return e==="equal"?g("tool.column_equal"):e==="auto"?g("tool.column_auto"):g("tool.column_size",{size:e})}function be(){if(!ne)return!1;var e=X(ne,".ge-tools-drawer");return e&&A(e,"ge-picker-open"),ne.remove(),ne=null,!0}function qi(){x(c,".row").forEach(function(e){if(!z(e,".ge-tools-drawer")){var t=qe(e,"ge-tools-drawer");We(t),st(t,e,s.row_classes),Mt(t,s.row_tools),D(t,g("tool.delete_row"),"ge-delete-row","bi bi-trash",function(){Ie("row",e,g("confirm.delete_row"),function(n){wt(e,n)})}),D(t,g("tool.add_column"),"ge-add-column","bi bi-plus-circle",function(){be()||Kr(e,ct(e,ke())?null:s.add_column.size)}),Bi(z(t,".ge-add-column"),e)}})}function Xi(){x(c,".column").forEach(function(e){if(!z(e,".ge-tools-drawer")){var t=qe(e,"ge-tools-drawer");We(t),s.resize.tools!==!1&&(D(t,g("tool.column_narrower"),"ge-decrease-col-width","bi bi-dash-lg",function(n){dn(e,n.shiftKey?lt(s.valid_col_sizes):zt(s.valid_col_sizes.filter(J),it(e),-1),"tool")}),D(t,g("tool.column_wider"),"ge-increase-col-width","bi bi-plus-lg",function(n){dn(e,n.shiftKey?Yi(e):zt(s.valid_col_sizes.filter(J),it(e),1),"tool")})),s.indent.tools!==!1&&(D(t,g("tool.indent_decrease"),"ge-decrease-col-offset","bi bi-text-indent-right",function(n){lr(e,n.shiftKey?lt(s.valid_col_offsets):zt(s.valid_col_offsets,at(e),-1),"tool")}),D(t,g("tool.indent_increase"),"ge-increase-col-offset","bi bi-text-indent-left",function(n){lr(e,n.shiftKey?Ji(e):zt(s.valid_col_offsets,at(e),1),"tool")})),st(t,e,s.col_classes),Mt(t,s.col_tools),D(t,g("tool.delete_column"),"ge-delete-column","bi bi-trash",function(){Ie("column",e,g("confirm.delete_column"),function(n){No(e,400,n,!0)})}),D(t,g("tool.add_row"),"ge-add-row","bi bi-plus-circle",function(){var n=Je();ae("row",n,function(){e.appendChild(n)},{parent:e,source:"tool"})})}})}function ke(){return j===Z?y[y.length-1]:ee(j)}function ot(e){var t=ke();if(Rt(e,t))return null;var n=jn(e,t);return n===null?H:n}function it(e){var t=ot(e);if(J(t))return t;var n=Math.round(ht(e)/Vr(e.parentElement)*H);return Math.min(Math.max(n,1),H)}function Vr(e){var t=window.getComputedStyle(e);return e.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)}function at(e){return It(e,ke())||0}function zt(e,t,n){var r=e.indexOf(t);return r===-1?e.reduce(function(o,i){return Math.abs(i-t)<Math.abs(o-t)?i:o},e[0]):e[Math.min(Math.max(r+n,0),e.length-1)]}function lt(e){return e.filter(J).reduce(function(t,n){return Math.min(t,n)},H)}function An(e){return e.filter(J).reduce(function(t,n){return Math.max(t,n)},0)}function Yi(e){var t=Nn(e.parentElement,ke(),e)-at(e);return Math.min(An(s.valid_col_sizes),Math.max(t,1))}function Ji(e){var t=Nn(e.parentElement,ke(),e)-it(e);return Math.min(An(s.valid_col_offsets),Math.max(t,0))}function We(e){return s.drag_handle==="drawer"?null:D(e,g("tool.move"),"ge-move","bi bi-arrows-move")}var Sn=".ge-tools-drawer:not(.ge-text-drawer):not(.ge-pane-drawer):not(.ge-code-inline)";function $i(){if(s.drawer_overflow==="wrap"||!window.ResizeObserver||!window.MutationObserver)return;var e=new Set,t=null;function n(l){e.add(l),t===null&&(t=window.requestAnimationFrame(r))}function r(){t=null;var l=Array.from(e);e.clear(),l.forEach(function(d){if(!d.isConnected){o.unobserve(d);return}Qi(d)})}var o=new window.ResizeObserver(function(l){l.forEach(function(d){n(d.target)})}),i=new window.MutationObserver(function(l){l.forEach(function(d){var f=d.target;if(d.type==="attributes"){var m=f.parentNode;m&&m.nodeType===1&&m.matches(Sn)&&n(m);return}if(f.nodeType===1&&f.matches(Sn)){n(f);return}d.addedNodes.forEach(function(h){h.nodeType===1&&de(h,Sn).forEach(function(_){C(_,"ge-drawer-fit"),o.observe(_),n(_)})})})});i.observe(c,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),tn.signal.addEventListener("abort",function(){i.disconnect(),o.disconnect(),t!==null&&window.cancelAnimationFrame(t)})}function Qi(e){var t=q(e,"a").filter(function(o){return!b(o,"ge-drawer-more")}),n=b(e,"ge-drawer-expanded");if(A(e,"ge-drawer-overflow ge-drawer-expanded"),t.forEach(function(o){A(o,"ge-tool-overflow")}),!!Gr(e,t)){C(e,"ge-drawer-overflow"),z(e,".ge-drawer-more")||D(e,g("tool.more"),"ge-drawer-more","bi bi-three-dots",function(){M(e,"ge-drawer-expanded")});for(var r=t.length-1;r>=0&&Gr(e,t);r--)C(t[r],"ge-tool-overflow");M(e,"ge-drawer-expanded",n)}}function Gr(e,t){var n=window.getComputedStyle(e),r=e.getBoundingClientRect().right-parseFloat(n.borderRightWidth)-parseFloat(n.paddingRight);return t.some(function(o){var i=o.getClientRects();return i.length>0&&i[0].right>r+.5})}function D(e,t,n,r,o){var i=v("a",{title:t,class:n});return i.appendChild(v("i",{class:r})),e.appendChild(i),typeof o=="function"&&i.addEventListener("click",o),o&&typeof o=="object"&&Object.keys(o).forEach(function(l){fe(i,l,o[l])}),i}function Tn(e){return(e.getAttribute("class")||"").split(/\s+/).filter(function(t){return t!==""&&!Zi(t)})}function Zi(e){return e==="row"||e==="column"||/^(ge-|ui-)/.test(e)||/^col(-(sm|md|lg|xl|xxl))?(-auto)?$/.test(e)?!0:y.some(function(t){return new RegExp("^("+t.colPrefix+"|"+t.offsetPrefix+")\\d+$").test(e)})}function ea(e,t){Tn(e).forEach(function(n){A(e,n)}),t.split(/\s+/).forEach(function(n){n!==""&&C(e,n)}),gt(e)}function st(e,t,n){var r=ta(t,n||[]);Re.set(t,r),le()!=="sidebar"&&D(e,g("tool.settings"),"ge-settings","bi bi-gear-fill",function(){ra(t,r,this)});var o=pe(t);return Object.keys(K).forEach(function(i){K[i].drawerTools&&K[i].drawerTools(e,t,o)}),Object.keys(L).forEach(function(i){L[i].drawerTools&&L[i].drawerTools(e,t,o)}),e.appendChild(r)}function ta(e,t){var n=v("div",{class:"ge-details"});n.appendChild(qr(g("panel.section_general")));var r=n.appendChild(v("div",{class:"ge-details-general"})),o=function(m){var h=v("label",{class:"ge-field"});return h.appendChild(v("span",{class:"ge-field-label"},m)),r.appendChild(h)},i=v("input",{class:"ge-id form-control form-control-sm",placeholder:g("tool.id_placeholder"),title:g("tool.id_title")});i.value=e.getAttribute("id")||"",o(g("panel.id")).appendChild(i),i.addEventListener("change",function(){this.value===""?e.removeAttribute("id"):e.setAttribute("id",this.value)});var l=v("input",{class:"ge-classes form-control form-control-sm",placeholder:g("tool.classes_placeholder"),title:g("tool.classes_title")});l.value=Tn(e).join(" "),o(g("panel.classes")).appendChild(l),l.addEventListener("change",function(){ea(e,this.value),he(e)});var d=r.appendChild(v("div",{class:"btn-group btn-group-sm ge-presets",role:"group"}));t.forEach(function(m){var h=b(e,m.cssClass),_=v("a",{role:"button",class:"btn btn-sm btn-outline-secondary",title:m.title?m.title:g("tool.toggle_class",{label:m.label}),"aria-pressed":h?"true":"false"});_.innerHTML=m.label,M(_,"active",h),_.addEventListener("click",function(){M(_,"active"),_.setAttribute("aria-pressed",b(_,"active")?"true":"false"),M(e,m.cssClass,b(_,"active")),he(e)}),d.appendChild(_)}),na(e).forEach(function(m){n.appendChild(m)});var f=zi(e);return f&&n.appendChild(f),n}function qr(e){return v("h6",{class:"ge-section-title"},e)}function na(e){var t=pe(e),n=le(),r=[];return[O,L,K].forEach(function(o){Object.keys(o).forEach(function(i){var l=o[i],d=l.panelSection?l.panelSection(e,t):null;if(!(!d||!d.body)){var f=v("div",{class:"ge-panel-section","data-ge-plugin":i});if(n==="offcanvas"||n==="modal"||n==="sidebar")f.appendChild(qr(g(d.labelKey))),f.appendChild(d.body);else{var m=g(d.labelKey),h=f.appendChild(v("button",{type:"button",class:"btn btn-sm btn-outline-secondary ge-panel-section-open"},m));ce(d.body),f.appendChild(d.body),h.addEventListener("click",function(){uo(d.titleKey?g(d.titleKey,{kind:zn(e)}):m,d.body,h)})}r.push(f)}})}),r}var Xr=["offcanvas","popover","modal","inline","sidebar"],P={},B=null,jt=new WeakMap;function le(){return Xr.indexOf(s.settings_panel)!==-1?s.settings_panel:(U("settings_panel",'settings_panel "'+s.settings_panel+'" is not one of '+Xr.join(", ")+": using offcanvas"),"offcanvas")}function On(e){return e&&Re.get(e)||null}function Yr(){var e=[c];return B&&B.mode!=="inline"&&e.push(B.details),Se&&e.push(Se.details),e}function ra(e,t,n){var r=le();if(r==="inline"){qn(t);return}var o=B&&B.details===t;Ae(),o||oa(r,e,t,n)}function oa(e,t,n,r){var o=$r(e),i=new AbortController;B={mode:e,node:t,details:n,home:n.parentElement,next:n.nextElementSibling,gear:r,listening:i},T(o,".ge-settings-title").textContent=g("panel.title",{kind:zn(t)}),T(o,".ge-settings-body").appendChild(n),Pe(n),C(t,"ge-settings-target");var l={signal:i.signal};if(document.addEventListener("keydown",function(f){f.key==="Escape"&&!ue&&Ae()},l),e==="offcanvas"){var d=window.innerWidth<576;M(o,"offcanvas-end",!d),M(o,"offcanvas-bottom",d),A(o,"hiding"),o.getBoundingClientRect(),C(o,"show")}else e==="popover"?(Ln(o,r),fe(window,"scroll resize",function(){Ln(o,r)},l),window.ResizeObserver&&(B.observer=new window.ResizeObserver(function(){Ln(o,r)}),B.observer.observe(n)),fe(document,"mousedown touchstart",function(f){!ue&&!o.contains(f.target)&&!r.contains(f.target)&&Ae()},l)):Mn(o,function(){B&&B.mode==="modal"&&Ae()})}function Ae(){we();var e=B;if(e){B=null;var t=P[e.mode];e.listening.abort(),e.observer&&e.observer.disconnect(),e.mode==="offcanvas"?(A(t,"show"),C(t,"hiding"),window.setTimeout(function(){A(t,"hiding")},300)):e.mode==="popover"?ce(t):Pn(t),Jr(e)}}function Jr(e){A(e.node,"ge-settings-target"),e.details.style.removeProperty("display"),pt(e.details),e.home&&Le(e.home)?e.next&&e.next.parentElement===e.home?e.home.insertBefore(e.details,e.next):e.home.appendChild(e.details):e.details.remove()}function $r(e){if(P[e])return P[e];var t=function(){return v("button",{type:"button",class:"btn-close ge-settings-close","aria-label":g("panel.close")})},n;return e==="offcanvas"?(n=V('<div class="offcanvas offcanvas-end ge-settings-panel ge-settings-offcanvas" tabindex="-1" role="dialog"><div class="offcanvas-header"><h5 class="offcanvas-title ge-settings-title"></h5></div><div class="offcanvas-body ge-settings-body"></div></div>'),T(n,".offcanvas-header").appendChild(t())):e==="popover"?(n=V('<div class="popover bs-popover-bottom ge-settings-panel ge-settings-popover" role="dialog"><div class="popover-arrow"></div><div class="popover-header"><span class="ge-settings-title"></span></div><div class="popover-body ge-settings-body"></div></div>'),T(n,".popover-header").appendChild(t()),ce(n)):e==="sidebar"?(n=V('<div class="offcanvas offcanvas-end ge-settings-panel ge-settings-sidebar" tabindex="-1" role="complementary"><div class="offcanvas-header"><h5 class="offcanvas-title ge-settings-title"></h5></div><div class="offcanvas-body ge-settings-body"></div></div>'),n.id="ge-settings-sidebar-"+tr,T(n,".offcanvas-header").appendChild(t()),P["sidebar-toggle"]=document.body.appendChild(ia(n))):(n=V('<div class="modal fade ge-settings-panel ge-settings-modal" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-centered modal-dialog-scrollable"><div class="modal-content"><div class="modal-header"><h5 class="modal-title ge-settings-title"></h5></div><div class="modal-body ge-settings-body"></div><div class="modal-footer"></div></div></div></div>'),T(n,".modal-header").appendChild(t()),T(n,".modal-footer").appendChild(v("button",{type:"button",class:"btn btn-primary ge-settings-close"},g("panel.done")))),bt(n,"click",".ge-settings-close",function(r){r.preventDefault(),e==="sidebar"?se(null):Ae()}),P[e]=document.body.appendChild(n),n}function Qr(){Ae(),oo(),A(document.documentElement,"ge-sidebar-open"),Object.keys(P).forEach(function(e){e==="modal"?on(P[e]):P[e].remove()}),Object.keys(P).forEach(function(e){so(P[e])}),P={}}var Zr=576,Se=null,ut=null;function dt(){return b(c,"ge-editing")}function ia(e){var t=v("button",{type:"button",class:"ge-sidebar-toggle","aria-controls":e.id});return t.appendChild(v("i")),t.addEventListener("click",function(){aa(!Ve)}),t}function aa(e){Ve=e,eo()}function eo(){var e=P.sidebar,t=P["sidebar-toggle"];if(e){var n=!Ve;n&&!b(e,"show")?(A(e,"hiding"),e.getBoundingClientRect(),C(e,"show")):!n&&b(e,"show")&&(A(e,"show"),C(e,"hiding"),window.setTimeout(function(){A(e,"hiding")},300));var r=g(n?"panel.collapse":"panel.expand");t.setAttribute("aria-expanded",n?"true":"false"),t.setAttribute("aria-label",r),t.setAttribute("title",r),T(t,"i").className="bi "+(n?"bi-chevron-right":"bi-chevron-left"),to()}}function to(){M(document.documentElement,"ge-sidebar-open",!!P.sidebar&&dt()&&!Ve&&window.innerWidth>=Zr)}function la(){if(le()==="sidebar"){var e=$r("sidebar");Ve===null&&(Ve=window.innerWidth<Zr),e.style.removeProperty("display"),P["sidebar-toggle"].style.removeProperty("display"),io(),eo()}}function sa(){ro();var e=P.sidebar;e&&(e.style.display="none",P["sidebar-toggle"].style.display="none",A(document.documentElement,"ge-sidebar-open"))}function no(e){var t=P.sidebar;T(t,".ge-settings-title").textContent=e,t.setAttribute("aria-label",e)}function ro(){var e=Se;Se=null,e&&Jr(e)}function oo(){ro(),ut&&(ut.body.remove(),ut=null)}function io(){var e=P.sidebar;if(!(!e||!dt())){var t=G?On(G):null;if(!(t?Se&&Se.details===t:!Se&&ut)){oo();var n=T(e,".ge-settings-body");if(!t){var r=ua(),o=r?r.body:v("p",{class:"ge-sidebar-empty"},g("panel.sidebar_empty"));no(r?r.title:g("panel.sidebar_title")),n.appendChild(o),ut={body:o};return}Se={node:G,details:t,home:t.parentElement,next:t.nextElementSibling},no(g("panel.title",{kind:zn(G)})),n.appendChild(t),Pe(t),C(G,"ge-settings-target")}}}function ua(){var e=s.sidebar.empty,t=null;return typeof e=="function"?t=ao(e(a),function(n){return n.title}):e!=null&&U("sidebar.empty","sidebar.empty is a function(ge) returning { title, body }, not "+typeof e+": ignored"),[O,L,K].forEach(function(n){Object.keys(n).forEach(function(r){var o=n[r];t||!o.sidebarEmpty||(t=ao(o.sidebarEmpty(nr),function(i){return typeof i.titleKey=="string"&&i.titleKey!==""?g(i.titleKey):""}))})}),t}function ao(e,t){if(!e||!e.body||e.body.nodeType!==1)return null;var n=t(e);return{title:typeof n=="string"&&n!==""?n:g("panel.sidebar_title"),body:e.body}}function lo(e){var t=X(e,".ge-tools-drawer",c);if(t){var n=t.parentElement,r=Re.has(n)?n:q(n).filter(function(i){return Re.has(i)})[0];if(r)return r}for(var o=e;o&&o!==c;o=o.parentElement)if(Re.has(o))return o;return null}function se(e){if(e!==G){var t=G;G=e,io(),N("selection-change",{canvas:c,node:e,from:t})}}function Ln(e,t){if(Le(t)){Pe(e);var n=t.getBoundingClientRect(),r=8,o=z(e,".popover-body");o.style.removeProperty("max-height");var i=ht(e),l=Bt(e),d=window.innerHeight-n.bottom-2*r,f=n.top-2*r,m=l<=d||d>=f,h=m?d:f;l>h&&(Me(o,{"max-height":Math.max(120,h-(l-Bt(o)))}),l=Bt(e));var _=m?n.bottom+r:n.top-r-l,k=Math.max(r,Math.min(n.left+n.width/2-24,window.innerWidth-i-r));M(e,"bs-popover-bottom",m),M(e,"bs-popover-top",!m),Me(e,{top:_+window.pageYOffset,left:k+window.pageXOffset}),Me(z(e,".popover-arrow"),{left:Math.max(r,Math.min(n.left+n.width/2-k-8,i-24))})}}function Mn(e,t){var n=Ct(),r=jt.get(e);if(r||(r={wanted:null,busy:!1,backdrop:null,dismissed:t},jt.set(e,r)),r.dismissed=t,!n){r.backdrop||(r.backdrop=v("div",{class:"modal-backdrop fade show ge-settings-backdrop"}),r.backdrop.addEventListener("click",function(){r.dismissed()}),document.body.appendChild(r.backdrop)),C(e,"show"),e.style.display="block",e.removeAttribute("aria-hidden");return}var o=n.getOrCreateInstance(e);r.watched||(r.watched=!0,ar(e),e.addEventListener("hide.bs.modal",function(){r.wanted==="open"&&(r.wanted="closed",r.busy=!0)}),e.addEventListener("shown.bs.modal",function(){r.busy=!1,r.wanted==="closed"&&Pn(e)}),e.addEventListener("hidden.bs.modal",function(){r.busy=!1,r.wanted==="open"?Mn(e,r.dismissed):r.dismissed()})),r.wanted="open",r.busy||(r.busy=!0,o.show())}function Pn(e){var t=Ct(),n=jt.get(e);if(n){if(n.wanted="closed",!t){n.backdrop&&(n.backdrop.remove(),n.backdrop=null),A(e,"show"),e.style.removeProperty("display"),e.setAttribute("aria-hidden","true");return}!n.busy&&b(e,"show")&&(n.busy=!0,t.getOrCreateInstance(e).hide())}}function so(e){var t=jt.get(e);t&&t.backdrop&&(t.backdrop.remove(),t.backdrop=null)}var Y=null,ue=null;function da(){return Y||(Y=V('<div class="modal fade ge-dialog" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-centered modal-dialog-scrollable"><div class="modal-content"><div class="modal-header"><h5 class="modal-title ge-dialog-title"></h5></div><div class="modal-body ge-dialog-body"></div><div class="modal-footer"></div></div></div></div>'),T(Y,".modal-header").appendChild(v("button",{type:"button",class:"btn-close ge-dialog-close","aria-label":g("panel.close")})),T(Y,".modal-footer").appendChild(v("button",{type:"button",class:"btn btn-primary ge-dialog-close"},g("panel.done"))),bt(Y,"click",".ge-dialog-close",function(e){e.preventDefault(),we()}),document.body.appendChild(Y))}function uo(e,t,n){we();var r=da(),o=new AbortController;ue={body:t,home:t.parentElement,next:t.nextElementSibling,opener:n||document.activeElement,listening:o},T(r,".ge-dialog-title").textContent=e,T(r,".ge-dialog-body").appendChild(t),Pe(t),Ct()||document.addEventListener("keydown",function(i){i.key==="Escape"&&we()},{signal:o.signal}),Object.keys(P).forEach(function(i){C(P[i],"ge-under-dialog")}),Mn(r,function(){we()})}function we(){var e=ue;e&&(ue=null,e.listening.abort(),Pn(Y),Object.keys(P).forEach(function(t){A(P[t],"ge-under-dialog")}),ce(e.body),e.home&&Le(e.home)?e.next&&e.next.parentElement===e.home?e.home.insertBefore(e.body,e.next):e.home.appendChild(e.body):e.body.remove(),e.opener&&Le(e.opener)&&e.opener.focus&&e.opener.focus())}function co(){we(),Y&&(so(Y),on(Y),Y=null)}function zn(e){var t=pe(e);if(O[t]&&O[t].labelKey)return g(O[t].labelKey);var n=Object.keys(O).filter(function(r){return O[r].paneKind===t&&O[r].paneLabelKey})[0];if(n)return g(O[n].paneLabelKey);switch(t){case"row":return g("panel.kind_row");case"column":return g("panel.kind_column");case"text":return g("panel.kind_text");case"element":return g("panel.kind_element");case"section":return g("panel.kind_section");case"tab":return g("panel.kind_tab");case"accordion-item":return g("panel.kind_accordion_item");default:return t}}function ca(){x(c,'.column, div[class*="col-"], div.col').forEach(function(e){C(e,"column"),!(va(e).length||fo(e.parentElement))&&Dt(e,y[0],H)})}function fo(e){return b(e,"row")&&y.some(function(t){return Qe.some(function(n){return b(e,$n(t,n))})})}function ct(e,t){if(!b(e,"row"))return null;for(var n=y.indexOf(t);n>=0;n--)for(var r=0;r<Qe.length;r++)if(b(e,$n(y[n],Qe[r])))return{tier:n,value:Qe[r]};return null}function mo(e,t){for(var n=y.indexOf(t);n>=0;n--){var r=Xe(e,y[n]);if(r!==null)return{tier:n,size:r}}return null}function Rt(e,t){var n=ct(e.parentElement,t);if(!n)return null;var r=mo(e,t);return!r||n.tier>r.tier||n.tier===r.tier&&r.size==="equal"?n:null}function fa(e){return e.value==="auto"?0:H/parseInt(e.value,10)}function ma(e,t){var n=Rt(e,t);return n?{flex:"0 0 auto",width:n.value==="auto"?"auto":100/parseInt(n.value,10)+"%","max-width":"100%"}:fo(e.parentElement)&&!mo(e,t)?{flex:"0 0 auto",width:"100%","max-width":"100%"}:{}}function ga(e){de(e,".row").forEach(function(t){var n=s.row_cols===!1?null:j===Z?ct(t,y[0])||null:ct(t,ee(j));n?t.setAttribute("data-ge-row-cols",go(n.value)):t.removeAttribute("data-ge-row-cols")})}function go(e){return e==="auto"?g("badge.row_cols_auto"):g("badge.row_cols",{count:e})}function pa(){return{name:"row-cols",prefix:"row-cols",values:Qe,appliesTo:["row"],labelKey:"utility.row_cols"}}function Xe(e,t){var n=vo(e,t.colPrefix);return n!==null?n:b(e,Ue(t,"auto"))?"auto":b(e,Ue(t,"equal"))?"equal":null}function Nt(e,t){return vo(e,t.offsetPrefix)}function jn(e,t){return po(e,t,Xe)}function It(e,t){return po(e,t,Nt)}function po(e,t,n){for(var r=y.indexOf(t);r>=0;r--){var o=n(e,y[r]);if(o!==null)return o}return null}function vo(e,t){var n=new RegExp("(?:^|\\s)"+t+"(\\d+)(?:\\s|$)").exec(e.getAttribute("class")||"");return n?parseInt(n[1],10):null}function ho(e,t,n){var r=(e.getAttribute("class")||"").split(/\s+/).filter(function(o){return o!==""&&!new RegExp("^"+t+"\\d+$").test(o)});n!==null&&r.push(t+n),e.setAttribute("class",r.join(" "))}function Dt(e,t,n){ho(e,t.colPrefix,null),Jn.forEach(function(r){A(e,Ue(t,r))}),n!=null&&C(e,Ue(t,n))}function Rn(e,t,n){ho(e,t.offsetPrefix,n||null)}function va(e){return y.filter(function(t){return Xe(e,t)!==null})}function Nn(e,t,n){var r=0;return q(e,".column").forEach(function(o){if(!(n&&o===n)){var i=Rt(o,t),l=i?fa(i):jn(o,t);r+=(J(l)?l:0)+(It(o,t)||0)}}),H-r}function Ft(e){var t=e.size===null||e.size===void 0?null:e.size,n=e.offset===null||e.offset===void 0?0:e.offset;return n=Math.min(Math.max(n,0),Do),t===null||!J(t)?{size:t,offset:n,refused:!1}:(t=Math.min(Math.max(t,1),H),t+n<=H?{size:t,offset:n,refused:!1}:e.leading==="offset"?{size:H-n,offset:n,refused:!1}:{size:null,offset:n,refused:!0})}function Ye(e){de(e,".column").forEach(function(t){Me(t,{width:"",height:"",left:"",top:""}),pt(t)})}function bo(e){return"ge-"+e+"-"+tr}function In(){return[".row",".ge-text-block",".ge-content","[data-ge-container]"].concat(Ht("blocks")).join(", ")}function Ht(e){return Object.keys(L).map(function(t){return L[t][e]||null}).filter(function(t){return t!==null})}function Dn(e,t){var n=!0;return Object.keys(L).forEach(function(r){var o=L[r];n&&o.accepts&&o.accepts(e,t)===!1&&(n=!1)}),n}function ha(){return s.drag_handle==="drawer"?".ge-tools-drawer > a:not(.ge-text-info):not(.ge-element-info), .ge-details, input, textarea, button, select, option":"input, textarea, button, select, option"}function Wt(e,t){var n=Wo();if(e=Array.isArray(e)?e:e?[e]:[],!(!e.length||!n)){var r=s.drag_handle==="drawer",o=ha(),i=0;e.forEach(function(l){var d=t.group?{name:bo(t.group)}:{name:bo(t.draggable+"-"+ ++i),pull:!1,put:!1};t.group&&t.accepts&&(d.put=function(f,m,h){return m.options.group.name===d.name&&t.accepts(f.el,h)}),_t.push(n.create(l,Object.assign({group:d,draggable:t.draggable,handle:r?".ge-tools-drawer":".ge-tools-drawer .ge-move",filter:function(f,m){return X(f.target,o,l)?!0:!m||m.parentNode!==l},preventOnFilter:!1,forceFallback:!0,fallbackOnBody:!1,ghostClass:"ge-drag-placeholder",chosenClass:"ge-drag-chosen",dragClass:"ge-drag-helper",fallbackClass:"ge-drag-helper",animation:s.drag.animation,delay:s.drag.delay||s.drag.touch_delay,delayOnTouchOnly:!s.drag.delay,touchStartThreshold:s.drag.threshold,scroll:s.drag.scroll,onStart:wa,onEnd:Ca},t.options||{})))})}}function ba(){if(!Wo()){U("sortable_missing",g("error.sortable_missing"));return}Wt(x(c,".row"),{draggable:".column",group:"column"}),Wt([c].concat(x(c,".column")),{draggable:In(),group:"block",accepts:Dn});var e=Ht("regions");e.length&&Wt(x(c,e.join(", ")),{draggable:">"+In(),group:"block",accepts:Dn}),oe("onSortable",Wt)}function wa(e){var t=e.item,n=cn(t),r=wo(t),o={from:n,canceled:!1};Zt.set(t,o),$(function(){var i=N("before-move",re(r.kind,r.node,{parent:n.parent,source:"dragdrop",from:n}));i||(o.canceled=!0)})}function wo(e){var t=b(e,"ge-text-block")&&z(e,".ge-content")||e;return{kind:pe(t),node:t}}function ya(e,t){var n=q(t.parent).filter(function(r){return r!==e&&!b(r,"ge-tools-drawer")});!n.length||t.index>=n.length?t.parent.appendChild(e):t.parent.insertBefore(e,n[t.index])}function Ca(e){var t=e.item,n=Zt.get(t),r=n?n.from:cn(t);if(Zt.delete(t),n&&n.canceled){ya(t,r);return}var o=cn(t);if(!(o.parent===r.parent&&o.index===r.index)){var i=X(t,"[data-ge-container]"),l=O[He(i)];l&&l.afterPaneMove&&l.afterPaneMove(i,t,r);var d=wo(t);$(function(){N("after-move",re(d.kind,d.node,{parent:o.parent,source:"dragdrop",from:r,to:o,container:i||void 0}))})}}function Ea(){s.resize.enabled&&x(c,".column").forEach(function(e){if(!z(e,".ge-resize-handle")){var t=z(e,".ge-tools-drawer");t&&t.appendChild(v("span",{class:"ge-resize-size"})),xa().forEach(function(n){var r=v("span",{class:"ge-resize-handle ge-resize-"+n,"data-ge-edge":n});r.addEventListener("pointerdown",_a),e.appendChild(r)})}})}function xa(){return String(s.resize.handles).split(",").map(function(e){return e.trim()}).filter(function(e){return e==="e"||e==="w"})}function _a(e){var t=e.currentTarget,n=t.parentElement,r=t.getAttribute("data-ge-edge")==="w",o=e.pageX,i=ht(n);if(e.preventDefault(),!Aa(n))return;C(n,"ge-resizing"),e.pointerId!==void 0&&t.setPointerCapture&&t.setPointerCapture(e.pointerId);function l(m){var h=m.pageX-o;return Math.max(1,i+(r?-h:h))}function d(m){n.style.width=l(m)+"px",Sa(n,l(m))}function f(m){t.removeEventListener("pointermove",d),Xn(t,"pointerup pointercancel",f),A(n,"ge-resizing"),Ta(n,l(m))}t.addEventListener("pointermove",d),fe(t,"pointerup pointercancel",f)}function ka(){yo(c)}function yo(e){x(e,".ge-resize-handle").forEach(function(t){t.remove()}),x(e,".ge-resize-size").forEach(function(t){t.remove()}),Ye(e)}function Co(e,t){var n=Math.round(t/Vr(e.parentElement)*H),r=Eo(e),o=r?ot(r):null,i=At.get(e),l=i?i.units:it(e),d=r&&J(o)?l+o-lt(s.valid_col_sizes):H-at(e);return Math.min(Math.max(n,lt(s.valid_col_sizes)),Math.max(d,lt(s.valid_col_sizes)),An(s.valid_col_sizes))}function Eo(e){return s.resize.balance!=="next"?null:Mo(e,".column")[0]||null}function Fn(e,t){var n=z(e,".ge-tools-drawer"),r=n?z(n,".ge-resize-size"):null;r&&(r.textContent=t)}function xo(e){return(j===Z?y[0].colPrefix:ke().colPrefix)+e}function Aa(e){var t=ot(e),n=$(function(){return N("before-resize",re("column",e,{source:"dragdrop",from:t,to:null}))});if(!n)return!1;var r={from:t,units:it(e)};return At.set(e,r),Fn(e,xo(r.units)),!0}function Sa(e,t){Fn(e,xo(Co(e,t)))}function Ta(e,t){var n=At.get(e),r=Co(e,t);if(At.delete(e),Fn(e,""),Ye(e),!!n&&r!==n.units){var o=ln(e,r);o&&$(function(){sn(e,o),Oa(e,r-n.units),he(e),N("after-resize",re("column",e,un({source:"dragdrop",from:n.from,to:o.size},o.cleared)))})}}function Oa(e,t){var n=Eo(e);if(!(!n||!t)){var r=ot(n);if(J(r)){var o=ln(n,r-t);o&&(sn(n,o),he(n))}}}function La(){_t.forEach(function(e){e.destroy()}),_t=[]}function Je(){return v("div",{class:"row"})}function Ut(e,t,n){var r=null;if(Ja.forEach(function(d){r===null&&n&&n[d]!==void 0&&(r=d)}),r===null)return e;var o=ie(n[r]);if(!o)return W(t+": "+r+" matches no element; the "+t+" is left detached"),e;var i=r==="appendTo"||r==="prependTo"?o:o.parentElement,l=function(){return ae(t,e,function(){r==="appendTo"?o.appendChild(e):r==="prependTo"?o.insertBefore(e,o.firstChild):r==="insertBefore"?o.parentNode.insertBefore(e,o):Gt(e,o)},{parent:i,source:n.source||"api"})};return Ze>0?(rn(l),e):l()}function Ma(e,t){var n=Je();return e!==void 0&&!Array.isArray(e)&&!(e&&e.row_cols)&&(W("createRow: the layout is an array of column sizes, as in [8, 4], or { row_cols, columns }. Making an empty row instead."),e=[]),e&&!Array.isArray(e)&&(n=tt(e)),(Array.isArray(e)?e:[]).forEach(function(r){n.appendChild(Te(r))}),Ut(n,"row",t)}function Pa(e,t){t=t||{};var n=ie(t.appendTo||t.prependTo||null);e===void 0&&n&&ct(n,ke())?e=null:!J(e)&&Jn.indexOf(e)===-1&&(W("createColumn: no column size given, using "+H),e=H);var r=Te(e,t.offset);return t.content!==void 0&&r.appendChild(Ua(t.content)),Ut(r,"column",t)}function za(e,t){t=t||{};var n=O[e];return n?Ut(n.create(t),e,t):(W('createContainer: no such container type "'+e+'"'),null)}function Hn(e,t,n){e=ie(e),n=n||{};var r=O[He(e)];if(!r||He(e)!==t)return W("this is not a "+t+" container"),null;var o=r.addPane(e,n);return o?ae(r.paneKind,o,function(){},{parent:e,source:"api",container:e}):null}function ja(e,t){e=ie(e);var n=He(e);return!O[n]||!O[n].addPane?(W("addPane: this is not a container with panes"),null):Hn(e,n,t)}function Wn(){var e={};return Object.keys(s).forEach(function(t){var n=s[t];e[t]=Array.isArray(n)?n.slice():n}),Object.freeze(e)}function Te(e,t){var n=v("div",{class:"column"}),r=Fo(j)[0],o=Ft({size:e,offset:t||0,leading:"offset"});return Dt(n,r,o.size===null?e:o.size),Rn(n,r,o.offset),n}function Un(e,t){if(!(!s.custom_filter||!s.custom_filter.length)){var n=typeof s.custom_filter=="string"||typeof s.custom_filter=="function"?[s.custom_filter]:s.custom_filter;Array.prototype.forEach.call(n,function(r){typeof r=="string"&&(r=window[r]),r(t||c,e)})}}function Ra(){var e=[".row","[data-ge-container]"];return Object.keys(L).forEach(function(t){var n=L[t],r=typeof n.cuts=="function"?n.cuts():n.cuts;r&&e.push(r)}),e.join(", ")}function Na(e){x(c,".column > .ge-content, .column > .ge-text-block > .ge-content").forEach(function(t){if(!(b(t,"ge-rte-active")||!q(t,e).length)){var n=t.getAttribute("data-ge-content-type"),r=b(t.parentElement,"ge-text-block")?t.parentElement:t,o=[],i=[];for(Array.prototype.slice.call(t.childNodes).forEach(function(f){f.nodeType===1&&f.matches(e)?(o.push({text:i},{block:f}),i=[]):i.push(f)}),o.push({text:i});t.firstChild;)t.removeChild(t.firstChild);var l=!1,d=r;o.forEach(function(f){var m;if(f.block)m=f.block;else if(Ia(f.text))l?(m=Kn(n),f.text.forEach(function(h){m.appendChild(h)})):(f.text.forEach(function(h){t.appendChild(h)}),m=r,l=!0);else return;m!==d&&Gt(m,d),d=m}),l||r.remove()}})}function Ia(e){return e.some(function(t){return t.nodeType===1||t.nodeType===3&&/\S/.test(t.nodeValue)})}function Da(e){x(c,".column").forEach(function(t){var n=[];q(t).forEach(function(r){Oe(r,".ge-tools-drawer, .ge-resize-handle")||(Oe(r,".ge-content, .ge-text-block")||r.matches(e)?n=_o(n):n.push(r))}),_o(n)})}function _o(e){if(e.length){var t=Gt(Kn(),e[e.length-1]);e.forEach(function(n){t.appendChild(n)})}return[]}function Kn(e){var t=v("div",{class:"ge-content"});return e&&(C(t,"ge-content-type-"+e),t.setAttribute("data-ge-content-type",e)),t}function Fa(){x(c,".column > .ge-content").forEach(function(e){jo(e,v("div",{class:"ge-text-block"}))}),x(c,".ge-text-block").forEach(function(e){if(!z(e,".ge-tools-drawer")){var t=z(e,".ge-content"),n=t?t.getAttribute("data-ge-content-type"):null;n?gi(n)||Wa(e,n):Ha(e)}})}function ko(e){x(e,".ge-text-block").forEach(function(t){qt(t)})}function Ha(e){var t=z(e,".ge-content"),n=qe(e,"ge-tools-drawer ge-text-drawer ge-plain-drawer");C(e,"ge-plain-block"),We(n),Object.keys(L).forEach(function(r){L[r].plainTools&&L[r].plainTools(n,t)}),D(n,g("tool.delete_plain"),"ge-delete-plain","bi bi-trash",function(){Ie("plain",t,g("confirm.delete_plain"),function(r){wt(e,function(){e.remove(),r()})})})}function Wa(e,t){var n=z(e,".ge-content"),r=qe(e,"ge-tools-drawer ge-text-drawer");We(r),D(r,g("text.no_editor",{type:t}),"ge-text-info ge-text-missing","bi bi-exclamation-triangle"),D(r,g("tool.delete_text"),"ge-delete-text","bi bi-trash",function(){Ie("text",n,g("confirm.delete_text"),function(o){wt(e,function(){e.remove(),o()})})})}function Ua(e){var t=yr(),n=Kn(t.length?t[0].type:null);return e&&e.nodeType?n.appendChild(e):mt(n,e),n}function Ao(e){j=e,Yn.forEach(function(t){M(c,"ge-layout-"+t,t===e)}),T(Ke,"button").textContent=g(yt(e))}function Bn(e){return Yn.indexOf(e)===-1?null:e}function So(e){var t=Bn(e);if(t===null){W("changeView("+JSON.stringify(e)+"): no such layout mode");return}var n=j;Ao(t),t!==n&&(Yr().forEach(function(r){x(r,".ge-utilities").forEach(function(o){_n(o)})}),Nr(null),rt(c),oe("onViewChange",t),N("view-change",{canvas:c,breakpoint:t,from:n,to:t}))}function Vn(){return j}function To(e,t,n){return function(){return Fe[e]?Fe[e].apply(null,arguments):(U("plugin:"+t,e+" needs the "+t+" plugin: include dist/plugins/grideditor."+n+".js after the editor"),null)}}function Ka(e){if(!s.active_target){U("active_target","setActiveTarget needs the active_target setting: without it, it does nothing");return}if(e==null){Ee(null);return}var t=ie(e);if(!xr(t)){var n=typeof e=="string"?e:t?"<"+t.tagName.toLowerCase()+">":String(e);W("setActiveTarget: "+n+" is not a column or a region of the canvas");return}Ee(t)}function Ba(e){if(le()!=="sidebar"){U("sidebar-api",'setSelected needs settings_panel "sidebar": without it, it does nothing');return}if(e==null){se(null);return}var t=ie(e);if(!t||t===c||!c.contains(t)||!Re.has(t)){var n=typeof e=="string"?e:t?"<"+t.tagName.toLowerCase()+">":String(e);W("setSelected: "+n+" is not a node of the canvas with settings");return}se(t)}var Gn={getHtml:nt,getPlainHtml:wi,init:function(){rn(ve)},reset:function(){rn(Cr)},deinit:De,destroy:Ci,changeView:So,getView:Vn,createRow:Ma,createColumn:Pa,createText:function(e,t){return Fe.createText?Fe.createText(e,t):(U("plugin:text","createText needs a text editor plugin: include dist/plugins/grideditor.tinymce.js, or another editor's, after the editor"),null)},createElement:To("createElement","elements","elements"),createSection:To("createSection","sections","sections"),createContainer:za,addTab:function(e,t){return Hn(e,"tabs",t)},addAccordionItem:function(e,t){return Hn(e,"accordion",t)},addPane:ja,setLocale:Ko,getUtility:zr,setUtility:xn,getActiveTarget:function(){return s.active_target?F:null},setActiveTarget:Ka,getSelected:function(){return le()==="sidebar"?G:null},setSelected:Ba};Object.keys(Gn).forEach(function(e){var t=!!(Io[e]&&Io[e].value);a[e]=function(){if(kt)return U("destroyed:"+e,g("warning.destroyed",{method:e})),e==="getHtml"?c.innerHTML:e==="getPlainHtml"?Qn(c.innerHTML):t?null:a;var n=Gn[e].apply(a,arguments);return t?n:a}}),a.canvas=c,a.settings=Wn(),Yt.set(c,a),Ei(),a.settings=Wn(),Object.keys(Fe).forEach(function(e){Object.prototype.hasOwnProperty.call(Gn,e)||e in a||(a[e]=function(){return kt?(U("destroyed:"+e,g("warning.destroyed",{method:e})),null):Fe[e].apply(null,arguments)})}),Xo(),ve(),S._created.forEach(function(e){e(a)})}S._created=[];S.containers={};S.features={};S.utilities={};S.texts={};S.t=Zn;S._plainHtml=Qn;S.Sortable=null;S.bootstrap=null;S.version="9.0.0-beta.5";S.locales={en:{"tool.move":"Move","tool.settings":"Settings","tool.add_row":"Add row","tool.delete_text":"Remove text","tool.delete_plain":"Remove content","tool.convert_type":"Edit as {editor} text","text.no_editor":'No text editor "{type}" is loaded: this text can be moved and deleted, not edited',"tool.add_column":`Add column
9
+ (()=>{function x(a,u){return a?Array.prototype.slice.call(a.querySelectorAll(u)):[]}function S(a,u){return a?a.querySelector(u):null}function de(a,u){if(!a)return[];var p=x(a,u);return a.nodeType===1&&a.matches(u)&&p.unshift(a),p}function q(a,u){return a?Array.prototype.filter.call(a.children,function(p){return!u||p.matches(u)}):[]}function j(a,u){return q(a,u)[0]||null}function W(a,u,p){var s=a&&a.nodeType===1?a.closest(u):null;return s&&p&&s!==p&&!p.contains(s)?null:s}function ne(a,u){return!!a&&a.nodeType===1&&a.matches(u)}function Oe(a){return!!a&&document.documentElement.contains(a)}function Ro(a,u){for(var p=[],s=a.nextElementSibling;s;s=s.nextElementSibling)(!u||s.matches(u))&&p.push(s);return p}function No(a,u){for(var p=[],s=a.parentElement;s&&s!==u;s=s.parentElement)p.push(s);return p}function Za(a){var u=document.createElement("template");return u.innerHTML=a,Array.prototype.slice.call(u.content.childNodes)}function V(a){for(var u=Za(a.trim()),p=0;p<u.length;p++)if(u[p].nodeType===1)return u[p];return null}function v(a,u,p){var s=document.createElement(a);return Object.keys(u||{}).forEach(function(c){var E=u[c];E!=null&&E!==!1&&s.setAttribute(c,E)}),p!=null&&(s.textContent=p),s}function ft(a,u){return a.innerHTML=u==null?"":String(u),a}function C(a,u){return Je(u).forEach(function(p){a.classList.add(p)}),a}function _(a,u){return Je(u).forEach(function(p){a.classList.remove(p)}),a}function P(a,u,p){return Je(u).forEach(function(s){p===void 0?a.classList.toggle(s):a.classList.toggle(s,!!p)}),a}function b(a,u){return!!a&&a.nodeType===1&&a.classList.contains(u)}function Je(a){return String(a||"").split(/\s+/).filter(Boolean)}function $e(a){return a.getAttribute("class")||a.removeAttribute("class"),a}function mt(a){return a.getAttribute("style")||a.removeAttribute("style"),a}function Bt(a,u){return Object.keys(u).forEach(function(p){var s=u[p];s==null?a.removeAttribute(p):a.setAttribute(p,s)}),a}function Se(a,u){return Object.keys(u).forEach(function(p){var s=u[p];typeof s=="number"&&!el[p]&&(s=s+"px"),a.style.setProperty(p,s==null?"":String(s))}),a}var el={opacity:!0,"z-index":!0,"flex-grow":!0,"flex-shrink":!0,order:!0},ct={};function tl(a){var u=a.nodeName;if(!ct[u]){var p=document.body.appendChild(document.createElement(u));ct[u]=getComputedStyle(p).display,p.remove(),ct[u]==="none"&&(ct[u]="block")}return ct[u]}function Le(a){return a.style.removeProperty("display"),getComputedStyle(a).display==="none"&&(a.style.display=tl(a)),a}function ce(a){return a.style.display="none",a}function Yn(a,u){return u===void 0&&(u=!gt(a)),u?Le(a):ce(a)}function gt(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)}function pt(a){return a.getBoundingClientRect().width}function Vt(a){return a.getBoundingClientRect().height}function Io(a){var u=getComputedStyle(a);return a.clientHeight-parseFloat(u.paddingTop)-parseFloat(u.paddingBottom)}function Gt(a){var u=a.getBoundingClientRect();return{top:u.top+window.pageYOffset,left:u.left+window.pageXOffset}}function qt(a,u){return u.parentNode.insertBefore(a,u.nextSibling),a}function Xt(a){for(var u=a.parentNode;a.firstChild;)u.insertBefore(a.firstChild,a);a.remove()}function Do(a,u){return a.parentNode.insertBefore(u,a),u.appendChild(a),u}function vt(a,u,p,s,c){var E=function(w){var D=W(w.target,p,a);if(D&&a.contains(D))return s.call(D,w)};return Je(u).forEach(function(w){a.addEventListener(w,E,c)}),E}function fe(a,u,p,s){return Je(u).forEach(function(c){a.addEventListener(c,p,s)}),p}function Jn(a,u,p,s){Je(u).forEach(function(c){a.removeEventListener(c,p,s)})}var nl=400;function Fo(a,u,p,s){p=p===void 0?nl:p,C(a,"ge-leaving");var c=function(){_(a,"ge-leaving"),$e(a),ce(a),s&&s()};if(!gt(a)||!a.animate||p<=0){window.setTimeout(c,0);return}var E=a.animate(u(getComputedStyle(a)),{duration:p,easing:"ease-in-out"}),w=!1,D=function(){w||(w=!0,c())};E.onfinish=D,E.oncancel=D}function ht(a,u,p){typeof u=="function"&&(p=u,u=void 0),a.style.overflow="hidden",Fo(a,function(s){return[{height:s.height,paddingTop:s.paddingTop,paddingBottom:s.paddingBottom,marginTop:s.marginTop,marginBottom:s.marginBottom},{height:"0px",paddingTop:"0px",paddingBottom:"0px",marginTop:"0px",marginBottom:"0px"}]},u,function(){a.style.removeProperty("overflow"),p&&p()})}function Ho(a,u,p,s){a.style.overflow="hidden",Fo(a,function(c){var E={opacity:c.opacity,height:c.height},w={opacity:0,height:"0px"};return s&&(E.width=c.width,w.width="0px"),[E,w]},u,function(){a.style.removeProperty("overflow"),p&&p()})}var Wo={getHtml:{value:!0},getPlainHtml:{value:!0},init:{},deinit:{},reset:{},destroy:{},changeView:{},getView:{value:!0},createRow:{value:!0},createColumn:{value:!0},createElement:{value:!0},createText:{value:!0},createSection:{value:!0},createContainer:{value:!0},addTab:{value:!0},addAccordionItem:{value:!0},addPane:{value:!0},setLocale:{},getUtility:{value:!0},setUtility:{value:!0},getActiveTarget:{value:!0},setActiveTarget:{}},ol=["appendTo","prependTo","insertAfter","insertBefore"],il=["data-bs-target","data-bs-parent","href","aria-controls","aria-labelledby","aria-describedby","for"],al=/^ge-([a-z][a-z-]*?)-\d+-[a-z0-9]+$/,y=[{key:"xs",infix:"",colPrefix:"col-",offsetPrefix:"offset-",min:0,preview:400,labelKey:"view.xs"},{key:"sm",infix:"sm",colPrefix:"col-sm-",offsetPrefix:"offset-sm-",min:576,preview:576,labelKey:"view.sm"},{key:"md",infix:"md",colPrefix:"col-md-",offsetPrefix:"offset-md-",min:768,preview:768,labelKey:"view.md"},{key:"lg",infix:"lg",colPrefix:"col-lg-",offsetPrefix:"offset-lg-",min:992,preview:992,labelKey:"view.lg"},{key:"xl",infix:"xl",colPrefix:"col-xl-",offsetPrefix:"offset-xl-",min:1200,preview:1200,labelKey:"view.xl"},{key:"xxl",infix:"xxl",colPrefix:"col-xxl-",offsetPrefix:"offset-xxl-",min:1400,preview:null,labelKey:"view.xxl"}],Q="all",ll="view.all",$n=[Q].concat(y.map(function(a){return a.key})),H=12,Ko=11,Qn=["equal","auto"],Qe=["1","2","3","4","5","6","auto"];function Zn(a,u){return"row-cols"+(a.infix?"-"+a.infix:"")+"-"+u}function Y(a){return typeof a=="number"}function De(a,u){return u==="equal"?a.infix?"col-"+a.infix:"col":a.colPrefix+u}function Z(a){for(var u=0;u<y.length;u++)if(y[u].key===a)return y[u];return null}function Uo(a){if(a===Q)return[y[0]];var u=Z(a);return u?[u]:[]}function bt(a){var u=Z(a);return u?u.labelKey:ll}var Me={add_column:{size:12,picker:!0,delay:600},elements:{enabled:"auto",selector:"[data-ge-element]",auto:!1,types:[]},resize:{enabled:!0,tools:!0,handles:"e",balance:"next"},indent:{tools:!0},sidebar:{empty:null},drag:{delay:0,touch_delay:100,threshold:3,animation:150,scroll:!0}},Bo={},sl=0,Jt=new WeakMap,Yt=null,Vo=".ge-mainControls, .ge-settings-panel, .ge-sidebar-toggle, .ge-dialog, .ge-confirm, .ge-size-picker, .modal, .modal-backdrop";function tr(a,u,p){var s=O.locales,c=s[a.locale]||{},E=a.locale_strings||{},w=E[u];return w===void 0&&(w=c[u]),w===void 0&&(w=s.en[u]),w===void 0&&(dl("locale:"+u,'no string for "'+u+'" in any locale, showing the key'),w=u),w.replace(/\{(\w+)\}/g,function(D,ge){return p&&p[ge]!==void 0?p[ge]:D})}function ul(a,u){var p=O.locales;return(a.locale_strings||{})[u]!==void 0||(p[a.locale]||{})[u]!==void 0||p.en[u]!==void 0}function K(a){window.console&&window.console.warn&&window.console.warn("grid-editor: "+a)}function dl(a,u){Bo[a]||(Bo[a]=!0,K(u))}function cl(a,u){return tr({locale:"en"},a,u)}function fl(a){if(typeof a=="string"){var u=document.querySelector(a);if(!u)throw new TypeError("grid-editor: no element matches "+JSON.stringify(a));return u}if(a&&a.nodeType===1)return a;throw new TypeError("grid-editor: the target is an element or a selector, not "+(a===null?"null":typeof a))}function me(a){return typeof a=="string"?document.querySelector(a):a&&a.nodeType===1?a:null}function Go(){return O.Sortable||window.Sortable||null}function wt(){var a=O.bootstrap||window.bootstrap;return a&&a.Modal?a.Modal:null}function er(a){var u=document.implementation.createHTMLDocument("").body;u.innerHTML=a;var p=[];return x(u,"*").forEach(function(s){var c=!1;Array.prototype.slice.call(s.attributes).forEach(function(D){D.name.indexOf("data-ge-")===0&&(s.removeAttribute(D.name),c=!0)});var E=(s.getAttribute("class")||"").split(/\s+/).filter(Boolean),w=E.filter(function(D){return D!=="column"&&D.indexOf("ge-")!==0});w.length!==E.length&&(c=!0),w.length?s.setAttribute("class",w.join(" ")):s.removeAttribute("class"),c&&s.tagName==="DIV"&&!s.attributes.length&&p.push(s)}),p.forEach(function(s){Xt(s)}),u.innerHTML}function O(a,u){var p=fl(a),s=Jt.get(p);if(s)return qo.has(p)||(qo.add(p),K(cl("warning.already_editing"))),s;if(!(this instanceof O))return new O(p,u);ml(this,p,u||{})}var qo=new WeakSet;O.create=function(a,u){return new O(a,u)};O.get=function(a){var u=me(a);return u&&Jt.get(u)||null};function ml(a,u,p){var s=Object.assign({new_row_layouts:[[12],[6,6],[4,4,4],[3,3,3,3],[2,2,2,2,2,2],[2,8,2],[4,8],[8,4]],row_classes:[],col_classes:[],col_tools:[],row_tools:[],drag_handle:"tool",toolbar_drag:"auto",toolbar_overflow:"menu",drawer_overflow:"menu",toolbar_groups:!1,active_target:!1,element_tools:[],element_classes:[],container_classes:[],pane_classes:[],container_tools:[],tab_tools:[],accordion_tools:[],plugins:null,row_cols:!0,utilities:{},elements:Me.elements,custom_filter:"",valid_col_sizes:[1,2,3,4,5,6,7,8,9,10,11,12,"equal","auto"],valid_col_offsets:[0,1,2,3,4,5,6,7,8,9,10,11],add_column:Me.add_column,layout_modes:$n.slice(),default_view:Q,resize:Me.resize,indent:Me.indent,source_textarea:"",edit_source:!0,locale:"en",locale_strings:{},callbacks:{},confirm_delete:!0,settings_panel:"offcanvas",sidebar:Me.sidebar,drag:Me.drag},p);if(Object.keys(Me).forEach(function(e){s[e]=Object.assign({},Me[e],s[e])}),s.settings_panel==="sidebar"){if(p&&p.active_target===!1)throw new TypeError('grid-editor: settings_panel "sidebar" needs active_target; leave it out or set it to true');s.active_target=!0}var c,E,w,D,ge,Fe,ee,R=s.default_view,N=null,re=null,Ee=!1,Pe=!1,He=null,L=null,yt=null,$t=function(){},Qt=function(){},pe=[],Ct={},Zt=null,nr={},Et=[],rr=++sl,xt=!1,We=null,or=null;s.settings_panel==="sidebar"&&(Yt?(G("sidebar",'settings_panel "sidebar" is in use by another editor on the page, which has one sidebar: using offcanvas'),s.settings_panel="offcanvas"):Yt=a);var Ke=new WeakMap,en=new WeakMap,_t=null,tn=new WeakMap,kt=new WeakMap,ir=new WeakMap,nn=new WeakSet,rn=new AbortController;c=C(u,"ge-canvas");function G(e,t){nr[e]||(nr[e]=!0,K(t))}function g(e,t){return tr(s,e,t)}function Xo(e){s.locale=e,a.settings=Un(),lr(),no(),po(),pn(),gn(),_r()}var Ze=0,on=[];function oe(e,t,n){return Object.assign({kind:e,node:t,parent:t.parentElement,canvas:c,breakpoint:qn(),source:"api"},n||{})}function I(e,t){var n=[e],r=e.replace(/^(before|after)-add-.+$/,"$1-add");r!==e&&n.push(r);var o=!1;return n.forEach(function(i){var l=new CustomEvent("grideditor:"+i,{detail:t,bubbles:!0,cancelable:!0});c.dispatchEvent(l)||(o=!0)}),n.forEach(function(i){var l=s.callbacks[i.replace(/-/g,"_")];typeof l=="function"&&l(t)===!1&&(o=!0)}),!o}function J(e){Ze++;try{return e()}finally{if(Ze--,Ze===0)for(;on.length;)on.shift()()}}function an(e){if(Ze===0){e();return}on.push(e)}function ie(e,t,n,r){var o=Yo(e);return J(function(){var i=oe(e,t,r);return I("before-add-"+o,i)?(n(),ve(),I("after-add-"+o,i),t):null})}function Yo(e){return O.containers[e]?"container":e}function Jo(e,t){if(!s.confirm_delete){t();return}ar(e,{danger:!0},function(n){n&&t()})}function ar(e,t,n){t=t||{};var r=wt();if(!r){n(window.confirm(e));return}var o=$o(),i=!1,l=S(o,".ge-confirm-ok");ze&&ze(null);var d=function(f){ze===d&&(ze=null,n(f))};ze=d,S(o,".modal-title").textContent=t.title||g("confirm.title"),S(o,".ge-confirm-cancel").textContent=t.cancel||g("confirm.cancel"),l.textContent=t.ok||g("confirm.ok"),P(l,"btn-danger",!!t.danger),P(l,"btn-primary",!t.danger),S(o,".ge-confirm-message").textContent=e,l.onclick=function(){i=!0,r.getInstance(o).hide()},xe.hidden=function(){d(i)},xe.shown=function(){l.focus()},r.getOrCreateInstance(o).show()}var xe={hidden:null,shown:null},ze=null;function $o(){if(N)return N;N=V('<div class="modal fade ge-confirm" tabindex="-1" aria-hidden="true"><div class="modal-dialog modal-dialog-centered"><div class="modal-content"><div class="modal-header"><h5 class="modal-title"></h5><button type="button" class="btn-close" data-bs-dismiss="modal"></button></div><div class="modal-body"><p class="ge-confirm-message"></p></div><div class="modal-footer"><button type="button" class="btn btn-secondary ge-confirm-cancel" data-bs-dismiss="modal"></button><button type="button" class="btn btn-danger ge-confirm-ok"></button></div></div></div></div>'),document.body.appendChild(N),S(N,".modal-title").textContent=g("confirm.title"),S(N,".btn-close").setAttribute("aria-label",g("confirm.cancel")),S(N,".ge-confirm-cancel").textContent=g("confirm.cancel"),S(N,".ge-confirm-ok").textContent=g("confirm.ok"),sr(N);var e=N;return N.addEventListener("hidden.bs.modal",function(){e===N&&xe.hidden&&xe.hidden()}),N.addEventListener("shown.bs.modal",function(){e===N&&xe.shown&&xe.shown()}),N}function lr(){N&&(xe.hidden=null,xe.shown=null,ln(N),N=null,ze&&ze(null))}function ln(e){var t=wt(),n=t?t.getInstance(e):null,r=!1,o=function(){r||(r=!0,n&&n.dispose(),e.remove())};if(!n||!sn.get(e)&&!b(e,"show")){o();return}e.addEventListener("hidden.bs.modal",o,{once:!0}),e.addEventListener("shown.bs.modal",function(){n.hide()},{once:!0}),n.hide()}var sn=new WeakMap;function sr(e){fe(e,"show.bs.modal hide.bs.modal",function(){sn.set(e,!0)}),fe(e,"shown.bs.modal hidden.bs.modal",function(){sn.set(e,!1)})}function je(e,t,n,r){var o=_t||{};_t=null,J(function(){var i=oe(e,t,{source:o.source||"tool"});if(I("before-delete",i)){o.before&&o.before();var l=function(){J(function(){r(function(){t.remove(),J(function(){ve(),I("after-delete",i)})})})};o.confirm===!1?l():Jo(n,l)}})}function Qo(e,t){t=t||{};var n=e?Cn(e):null,r=n?j(n,'[class*="ge-delete-"]'):null,o=r?en.get(r):null;if(!o)return!1;var i=!1;_t={source:t.source,confirm:t.confirm,before:function(){i=!0,t.before&&t.before()}};try{o.call(r)}finally{_t=null}return i}function un(e,t,n){if(n=n||R,n!==Q){var r=Z(n),o=Ht({size:t,offset:Dt(e,r)||0});return o.refused||qe(e,r)===o.size?null:{writes:[{tier:r,size:o.size}],cleared:null,size:o.size}}var i=y.some(function(m){return Ht({size:t,offset:Dt(e,m)||0}).refused});if(i)return null;var l=y[0],d=[],f=[];return y.slice(1).forEach(function(m){var h=qe(e,m);h!==null&&(d.push({tier:m,size:null}),f.push({breakpoint:m.key,value:h}))}),qe(e,l)!==t&&d.unshift({tier:l,size:t}),d.length?{writes:d,cleared:f,size:t}:null}function dn(e,t){t.writes.forEach(function(n){Ft(e,n.tier,n.size)}),Xe(e)}function cn(e,t){return t&&(e.cleared=t),e}function fn(e,t,n,r){r=r||R;var o=ot(e),i=un(e,t,r);return i?J(function(){var l=oe("column",e,cn({source:n,breakpoint:r,from:o,to:i.size},i.cleared));return I("before-resize",l)?(dn(e,i),he(e),I("after-resize",l),!0):(he(e),!1)}):!1}function ur(e,t,n){var r=R===Q,o=r?y[0]:Z(R),i=at(e);t=Math.min(Math.max(t,0),Ko);var l=r?y.slice(1).filter(function(d){return It(e,d)!==null}):[];return(It(e,o)||0)===t&&!l.length?!1:J(function(){var d=oe("column",e,cn({source:n,from:i,to:t},r?l.map(function(f){return{breakpoint:f.key,value:It(e,f)}}):null));return I("before-indent",d)?(Dn(e,o,t),l.forEach(function(f){Dn(e,f,0)}),(r?y:[o]).forEach(function(f){var m=In(e,f);if(Y(m)){var h=Ht({size:m,offset:t,leading:"offset"});h.size!==m&&Ft(e,f,h.size)}}),he(e),I("after-indent",d),!0):!1})}function mn(e){var t=e.parentElement;return{parent:t,index:q(t).filter(function(n){return!b(n,"ge-tools-drawer")}).indexOf(e)}}function le(e){var t=null;if(Object.keys(M).forEach(function(r){var o=M[r];!t&&o.kindOf&&(t=o.kindOf(e))}),t)return t;if(e.getAttribute("data-ge-container"))return e.getAttribute("data-ge-container");var n=null;return Object.keys(T).forEach(function(r){var o=T[r];!n&&o.paneClass&&b(e,o.paneClass)&&(n=o.paneKind)}),n||(b(e,"ge-tab")?"tab":b(e,"ge-accordion-item")?"accordion-item":b(e,"row")?"row":b(e,"column")?"column":b(e,"ge-element")?"element":(b(e,"ge-text-block")&&(e=j(e,".ge-content")||e),b(e,"ge-content")?e.getAttribute("data-ge-content-type")?"text":"plain":"node"))}if(s.source_textarea){var et=me(s.source_textarea).value,dr=v("div");dr.innerHTML=et,et.length>0&&!dr.querySelector(".row")&&(et='<div class="row"><div class="col-lg-12">'+et+"</div></div>"),ft(u,et)}if(u.children.length&&!u.querySelector("div.row")){var Zo=q(u),cr=V('<div class="row"><div class="col-lg-12"></div></div>');u.appendChild(cr),Zo.forEach(function(e){cr.firstChild.appendChild(e)})}function ei(){ee=v("textarea",{class:"ge-html-output"}),c.parentNode.insertBefore(ee,c),gn(),aa();var e={signal:rn.signal};if(window.addEventListener("scroll",br,e),vt(c,"click",".ge-content",yi,e),s.active_target){var t=null;c.addEventListener("pointerdown",function(o){t={x:o.clientX,y:o.clientY}},e),c.addEventListener("click",function(o){var i=t;t=null,b(c,"ge-editing")&&(i&&Math.abs(o.clientX-i.x)+Math.abs(o.clientY-i.y)>s.drag.threshold||r(o))},e),document.addEventListener("keydown",function(o){if(!(o.key!=="Escape"||B||se)&&!(N&&b(N,"show"))){var i=document.activeElement;i&&(ne(i,"input, textarea, select")||i.isContentEditable)||L&&te(null)}},e),c.addEventListener("focusin",function(o){var i=Rt()?fo(o.target):null;i&&te(i)},e);var n=null;document.addEventListener("pointerdown",function(o){n=o.target},{capture:!0,signal:e.signal}),document.addEventListener("click",function(o){var i=o.target,l=n;n=null,!(!L||!Rt()||!i||i.nodeType!==1)&&(l&&l.nodeType===1&&(c.contains(l)||W(l,Vo))||!Oe(i)||c.contains(i)||W(i,Vo)||c.querySelector(".ge-rte-active")||te(null))},e)}Ve()==="sidebar"&&window.addEventListener("resize",io,e);function r(o){if(c.contains(o.target)){var i=fo(o.target);if(i&&i===L&&(o.target===Cn(i)||o.target===i&&!b(i,"ge-content"))){te(null);return}te(i)}}}function ti(e){!ne(e,".ge-content")||!c.contains(e)||(ae("onContentReady",e),rt(e))}function gn(){E=v("div",{class:"ge-mainControls"}),ee.parentNode.insertBefore(E,ee),w=E.appendChild(v("div",{class:"ge-wrapper ge-top"}));var e=s.toolbar_overflow!=="wrap",t=w;e&&(C(w,"ge-toolbar-menu"),t=w.appendChild(v("div",{class:"ge-toolbar-start"}))),pe=[],D=t.appendChild(v("div",{class:"ge-addRowGroup btn-group"})),ge=v("div",{class:"ge-addContainerGroup btn-group ms-1"}),s.new_row_layouts.forEach(function(d){var f=!Array.isArray(d),m=v("a",{class:"btn btn-sm btn-light",title:f?g("row.add_row_cols",{columns:d.columns,counts:bi(d.row_cols)}):g("row.add",{layout:d.join("-")}),"data-ge-toolbar":"row","data-ge-layout":f?JSON.stringify(d):d.join(",")});m.addEventListener("click",function(){if(L){yn(m,"tool");return}var A=tt(d),$=ie("row",A,function(){c.appendChild(A)},{parent:c,source:"tool"});$&&A.scrollIntoView&&A.scrollIntoView({behavior:"smooth"})}),D.appendChild(m),pe.push({button:m,home:D,group:"rows"}),m.appendChild(V('<i class="bi bi-plus"></i>'));var h=f?wi(d):d,k='<div class="row ge-row-icon">';h.forEach(function(A){k+='<div class="column '+De(y[0],A)+'"></div>'}),k+="</div>",m.appendChild(V(k))}),t.appendChild(ge),Object.keys(T).forEach(function(d){var f=T[d],m=mr(v("a",{class:"btn btn-sm btn-light ge-add-container"}),g(f.labelKey),f.iconClass);Bt(m,{"data-ge-toolbar":"container","data-ge-container-type":d}),m.addEventListener("click",function(){if(L){yn(m,"tool");return}var h=Ye(),k=h.appendChild(ue(H)),A=k.appendChild(f.create({}));ie(d,A,function(){c.appendChild(h)},{parent:c,source:"tool"})}),ge.appendChild(m),pe.push({button:m,home:ge,group:fr(f.group)||"content"})});var n=[];Ct={},Object.keys(M).forEach(function(d){Ct[d]=ai(M[d]),Ct[d].forEach(function(f,m){var h=ui(d,f,m);f.align==="end"?n.push(h):(ge.appendChild(h),pe.push({button:h,home:ge,group:fr(f.group)||d}))})}),Fe=V('<div class="dropdown pull-right ge-layout-mode"><button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown"></button><div class="dropdown-menu" role="menu"></div></div>'),vt(Fe,"click","a",function(){Mo(this.getAttribute("data-ge-view"))}),w.appendChild(Fe),s.layout_modes.forEach(function(d){S(Fe,".dropdown-menu").appendChild(v("a",{class:"dropdown-item","data-ge-view":d,title:g(bt(d))},g(bt(d))))}),S(Fe,"button").textContent=g(bt(R));var r=w.appendChild(v("div",{class:"btn-group pull-right"}));if(s.edit_source){var o=V('<button type="button" class="btn btn-sm btn-primary gm-edit-mode"><i class="bi bi-code-slash"></i></button>');o.setAttribute("title",g("tool.edit_source")),P(o,"active btn-danger",Ee),o.addEventListener("click",function(){Ee?bn():xi(),P(o,"active btn-danger",Ee)}),r.appendChild(o)}var i=V('<button type="button" class="btn btn-sm btn-primary gm-preview"><i class="bi bi-eye-fill"></i></button>');if(i.setAttribute("title",g("tool.preview")),P(i,"active btn-danger",Pe),i.addEventListener("mouseenter",function(){_(c,"ge-editing")}),i.addEventListener("click",function(){At(!Pe)}),i.addEventListener("mouseleave",function(){Pe||C(c,"ge-editing")}),r.appendChild(i),n.length){var l=w.appendChild(v("div",{class:"pull-right ge-toolbar-end"}));n.forEach(function(d){l.appendChild(d)})}s.toolbar_groups&&ri(t),e&&si(t),ci()}var ni=[{name:"rows",labelKey:"group.rows"},{name:"content",labelKey:"group.content"},{name:"elements",labelKey:"group.elements"}];function fr(e){return typeof e=="string"&&e.trim()!==""?e:null}function ri(e){var t=ni.map(function(i){return i.name});if(pe.forEach(function(i){t.indexOf(i.group)<0&&t.push(i.group)}),t=t.filter(function(i){return pe.some(function(l){return l.group===i})}),t.length<2)return;var n=v("div",{class:"ge-toolbar-groups btn-group",role:"tablist","aria-label":g("group.select")});e.insertBefore(n,e.firstChild);var r=E.appendChild(v("div",{class:"ge-toolbar-stash",hidden:"hidden"}));t.forEach(function(i){var l=n.appendChild(v("button",{type:"button",class:"btn btn-sm btn-outline-secondary",role:"tab","data-ge-group":i},oi(i)));l.addEventListener("click",function(){o(i)})}),o(t.indexOf(Zt)>=0?Zt:t[0]);function o(i){Zt=i,pe.forEach(function(l){(l.group===i?l.home:r).appendChild(l.button)}),q(n).forEach(function(l){var d=l.getAttribute("data-ge-group")===i;P(l,"active",d),l.setAttribute("aria-selected",d?"true":"false")}),Qt()}}function oi(e){var t="group."+e;if(ul(s,t))return g(t);var n=pe.filter(function(r){return r.group===e})[0];return n.button.getAttribute("title")||e}function ii(){return pe.filter(function(e){return!W(e.button,".ge-toolbar-stash")})}function ai(e){var t=typeof e.toolbar=="function"?e.toolbar():e.toolbar;return Array.isArray(t)?t:[]}function li(){!E||xt||(pn(),gn(),br())}function pn(){yt&&yt.abort(),yt=null,$t=function(){},Qt=function(){},E.remove()}function si(e){var t=V('<div class="ge-toolbar-more"><button type="button" class="btn btn-sm btn-light"><i class="bi bi-three-dots"></i></button><div class="ge-toolbar-overflow"><div class="ge-addRowGroup btn-group"></div><div class="ge-addContainerGroup btn-group"></div></div></div>');e.parentNode.insertBefore(t,e.nextSibling);var n=S(t,"button"),r=S(t,".ge-toolbar-overflow"),o=x(r,".btn-group");function i(A){return A===D?o[0]:o[1]}n.setAttribute("title",g("tool.more")),n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded","false");var l=yt=new AbortController,d={signal:l.signal};if(n.addEventListener("click",function(){h(!b(t,"ge-open"))}),r.addEventListener("click",function(A){W(A.target,"[data-ge-toolbar]")&&h(!1)}),document.addEventListener("pointerdown",function(A){t.contains(A.target)||h(!1)},d),document.addEventListener("keydown",function(A){A.key==="Escape"&&h(!1)},d),$t=function(){h(!1)},Qt=k,k(),window.ResizeObserver){var f=!1,m=new window.ResizeObserver(function(){f||(f=!0,window.requestAnimationFrame(function(){f=!1,l.signal.aborted||k()}))});m.observe(w),m.observe(e),l.signal.addEventListener("abort",function(){m.disconnect()})}function h(A){A=A&&b(t,"ge-needed"),P(t,"ge-open",A),n.setAttribute("aria-expanded",A?"true":"false")}function k(){var A=ii();if(A.forEach(function(jo){jo.home.appendChild(jo.button)}),_(t,"ge-needed"),e.scrollWidth<=e.clientWidth){h(!1);return}C(t,"ge-needed");for(var $=A.length-1;$>=0&&e.scrollWidth>e.clientWidth;$--){var zo=i(A[$].home);zo.insertBefore(A[$].button,zo.firstChild)}}}function mr(e,t,n){return e.setAttribute("title",t),n?(e.appendChild(v("i",{class:n})),e):(e.appendChild(V('<i class="bi bi-plus"></i>')),e.appendChild(v("span",{},t)),e)}function ui(e,t,n){var r=t.iconClass||(t.align==="end"?"bi bi-plus":null),o=typeof t.label=="function"?t.label():t.label||g(t.labelKey),i=t.align==="end"?"btn-primary":"btn-light",l=mr(v("a",{class:"btn btn-sm "+i+" ge-add-container ge-add-feature"}),o,r),d=typeof t.action=="function";return C(l,t.className||""),(typeof t.hidden=="function"?t.hidden():t.hidden)&&ce(l),Bt(l,{"data-ge-toolbar":"feature","data-ge-feature":e,"data-ge-item":n}),d&&(l.setAttribute("data-ge-action",""),(typeof t.disabled=="function"?t.disabled():t.disabled)&&(C(l,"disabled"),l.setAttribute("aria-disabled","true"))),l.addEventListener("click",function(){if(d){b(l,"disabled")||t.action(l);return}if(L){yn(l,t.source||"tool");return}var f=t.create();if(f){var m=t.inColumn?gi(f):f,h=ie(t.kind,f,function(){c.appendChild(m)},{parent:c,source:t.source||"tool"});h&&t.inColumn&&m.scrollIntoView&&m.scrollIntoView({behavior:"smooth"})}}),l}function di(){return s.toolbar_drag==="auto"?s.drag_handle==="drawer":!!s.toolbar_drag}function ci(){var e=x(E,"[data-ge-toolbar]:not([data-ge-action])");e.forEach(function(t){_(t,"ge-palette-button"),t.removeEventListener("pointerdown",gr)}),di()&&e.forEach(function(t){C(t,"ge-palette-button"),t.addEventListener("pointerdown",gr)})}function gr(e){var t=e.currentTarget,n=e.pageX,r=e.pageY,o=null;if(e.button)return;function i(f){return Math.abs(f.pageX-n)+Math.abs(f.pageY-r)>s.drag.threshold}function l(f){if(!o){if(!i(f))return;o=C(t.cloneNode(!0),"ge-toolbar-helper"),document.body.appendChild(o),$t(),C(c,"ge-dropping")}Se(o,{left:f.pageX-14,top:f.pageY-14}),pi(f.pageX,f.pageY)}function d(f){if(document.removeEventListener("pointermove",l),Jn(document,"pointerup pointercancel",d),!!o){o.remove(),_(c,"ge-dropping"),vn();var m=function(k){k.target!==t&&!t.contains(k.target)||(k.preventDefault(),k.stopImmediatePropagation())};window.addEventListener("click",m,{capture:!0,once:!0}),window.setTimeout(function(){window.removeEventListener("click",m,{capture:!0})},0);var h=pr(f.pageX,f.pageY);h&&hr(t,h)}}document.addEventListener("pointermove",l),fe(document,"pointerup pointercancel",d)}function pr(e,t){var n=e-window.scrollX,r=t-window.scrollY,o=document.elementFromPoint(n,r);if(!o)return null;var i=W(o,[".column",".ge-canvas"].concat(Wt("regions")).join(", "));if(!i||i!==c&&!c.contains(i))return null;var l=null;return q(i,Hn()).forEach(function(d){if(!l){var f=d.getBoundingClientRect();r<f.top+f.height/2&&(l=d)}}),{region:i,before:l}}function fi(e,t,n){var r=(Ct[e.getAttribute("data-ge-feature")]||[])[parseInt(e.getAttribute("data-ge-item"),10)];if(!r)return null;var o=r.create();if(!o)return null;var i=o;return r.inColumn?i=Tt(t.region,o):dt(t.region,o)?ne(t.region,".row")&&(i=Tt(t.region,o)):t=vr(t.region),ie(r.kind,o,function(){t.before?t.before.parentNode.insertBefore(i,t.before):t.region.appendChild(i)},{parent:t.region,source:r.source||n||"dragdrop"})}function vr(e){var t=e===c?[]:No(e,c).reverse().concat([e]),n=t[0]||null;return{region:c,before:n?n.nextElementSibling:null}}function mi(e,t,n){if(!L)return null;var r={region:Tr(L),before:null},o=Tt(r.region,e),i=o===e?null:e.parentElement;return(!dt(r.region,o)||i&&!dt(i,e))&&(r=vr(r.region),o=e),ie(t,e,function(){r.before?r.before.parentNode.insertBefore(o,r.before):r.region.appendChild(o)},{parent:r.region,source:n||"api"})}function gi(e){return wn(ue(H),e)}function pi(e,t){var n=pr(e,t);if(!n)return vn();He||(He=v("div",{class:"ge-drop-marker"})),n.before?n.before.parentNode.insertBefore(He,n.before):n.region.appendChild(He)}function vn(){He&&He.remove()}function hr(e,t,n){if(e.getAttribute("data-ge-toolbar")==="feature")return fi(e,t,n);var r=e.getAttribute("data-ge-toolbar")==="container",o=e.getAttribute("data-ge-container-type"),i=r?T[o].create({}):hi(e.getAttribute("data-ge-layout")),l=Tt(t.region,i);return ie(r?o:"row",i,function(){t.before?t.before.parentNode.insertBefore(l,t.before):t.region.appendChild(l)},{parent:t.region,source:n||"dragdrop"})}function vi(){for(var e=[],t=1;t<=H;t++)e.push(String(t));return{name:"col",values:e.concat(Qn),appliesTo:["column"],labelKey:"utility.col_width",className:function(n,r){return De(Z(n),hn(r))},choices:function(){return s.valid_col_sizes.map(String)},label:function(n){return n==="equal"?g("utility.col_equal"):n==="auto"?g("utility.col_auto"):n},write:function(n,r,o,i){return fn(n,r===null?null:hn(r),i,o)},blank:function(n,r){var o=r===Q?null:Nt(n,Z(r));return o?g("utility.col_from_row",{count:bo(o.value)}):null}}}function hn(e){return/^\d+$/.test(String(e))?parseInt(e,10):e}function hi(e){return/^\s*\{/.test(e||"")?tt(JSON.parse(e)):tt((e||"").split(",").filter(function(t){return t!==""}).map(hn))}function tt(e){var t=Ye();if(Array.isArray(e))return e.forEach(function(r){t.appendChild(ue(r))}),t;Object.keys(e.row_cols||{}).forEach(function(r){var o=e.row_cols[r],i=Z(r);i&&Qe.indexOf(String(o))!==-1&&C(t,Zn(i,o))});for(var n=0;n<(e.columns||0);n++)t.appendChild(ue(null));return t}function bi(e){return y.filter(function(t){return e&&e[t.key]!==void 0}).map(function(t){return(t.infix?t.key+": ":"")+e[t.key]}).join(", ")}function wi(e){var t=1;return Object.keys(e.row_cols||{}).forEach(function(n){var r=e.row_cols[n];r!=="auto"&&(t=Math.max(t,parseInt(r,10)||1))}),Array.apply(null,Array(Math.min(t,e.columns||t))).map(function(){return"equal"})}function br(){var e=window.pageYOffset;e>Gt(E).top&&e<Gt(c).top+Io(c)?b(w,"ge-top")&&(Se(w,{left:Gt(w).left,width:pt(w)}),_(w,"ge-top"),C(w,"ge-fixed")):b(w,"ge-fixed")&&(Se(w,{left:"",width:""}),_(w,"ge-fixed"),C(w,"ge-top"))}function yi(){var e=this;if(!e.getAttribute("data-ge-content-type")&&!we()&&gt(e)){var t=xr();t.length&&(t.length===1?wr(e,t[0]):Ci(e,t))}}function wr(e,t){return t.available&&!t.available()?(t.missingKey&&console.error(g(t.missingKey)),!1):J(function(){var n=oe("plain",e,{source:"tool",from:"plain",to:t.type});if(!I("before-convert",n))return!1;C(e,"ge-content-type-"+t.type),e.setAttribute("data-ge-content-type",t.type);var r=e.parentElement;return b(r,"ge-text-block")&&(_(r,"ge-plain-block"),q(r,".ge-tools-drawer").forEach(function(o){o.remove()})),I("after-convert",n),t.edit(e),!0})}function Ci(e,t){var n=b(e.parentElement,"ge-text-block")?e.parentElement:null;n&&yr(j(n,".ge-tools-drawer"),t.map(function(r){return{label:r.label,title:g("tool.convert_type",{editor:r.label}),attributes:{"data-ge-content-type":r.type},choose:function(){wr(e,r)}}}),"ge-text-picker ge-convert-picker",n)}function yr(e,t,n,r){if(we(),!!e){var o=W(e,".ge-tools-drawer");o&&C(o,"ge-picker-open"),re=e.appendChild(C(v("div",{class:"ge-size-picker"}),n||"")),t.forEach(function(i){var l=Bt(v("a",{class:"ge-size ge-size-flex"}),i.attributes||{});l.setAttribute("title",i.title||i.label),l.textContent=i.label,l.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),we(),i.choose()}),re.appendChild(l)}),Cr(r||e)}}function Cr(e){e.addEventListener("mouseleave",function(){window.setTimeout(function(){re&&!re.matches(":hover")&&we()},400)},{once:!0})}function Er(){var e={},t=[];return Object.keys(M).forEach(function(n){var r=M[n];r.textTypes&&(r.textTypes()||[]).forEach(function(o){if(e[o.type]){e[o.type]!==n&&G("text-type:"+o.type,'the "'+n+'" plugin declares the text type "'+o.type+'", which the "'+e[o.type]+'" plugin already declares: ignored');return}e[o.type]=n,t.push(o)})}),t}function xr(){return Er().filter(function(e){return e.offered!==!1})}function Ei(e){return Er().some(function(t){return t.type===e})}function _r(){Re(),ve()}function At(e){if(e=!!e,e!==Pe){Pe=e;var t=E?S(E,".gm-preview"):null;t&&P(t,"active btn-danger",e),P(c,"ge-editing",!e),ae("onPreviewChange",e),I("preview-change",{canvas:c,previewing:e})}}function xi(){At(!1),Re(),te(null),ee.style.height=.8*document.documentElement.clientHeight+"px",ee.value=c.innerHTML,Le(ee),ce(c),Ee=!0,ae("onSourceOpen",ee)}function bn(){ae("onSourceClose",ee),Ee=!1,ft(c,ee.value),Le(c),ve(),ce(ee)}function kr(e){return!!e&&e!==c&&c.contains(e)&&Ke.has(e)}function te(e){if(e!==L){var t=L;t&&_(t,"ge-selected"),L=e,e&&b(c,"ge-editing")&&C(e,"ge-selected"),uo(),I("target-change",{canvas:c,target:e,from:t})}}function Ar(){return[".column"].concat(Wt("regions")).join(", ")}function Tr(e){if(ne(e,".row, "+Ar()))return e;var t=_i(e)?ki(e):null;return t||W(e.parentElement,Ar())||c}function _i(e){if(e.getAttribute("data-ge-container"))return!0;var t=W(e.parentElement,"[data-ge-container]",c),n=t&&T[be(t)];return!!n&&!!n.paneKind&&le(e)===n.paneKind}function ki(e){var t=!!e.getAttribute("data-ge-container"),n=t?e:W(e.parentElement,"[data-ge-container]",c),r=T[be(n)];return r&&r.regionOf&&r.regionOf(n,t?null:e)||null}function Tt(e,t){if(ne(t,".column"))return ne(e,".row")?t:wn(t);if(ne(e,".row")){var n=ue(Ge(e,ye())?null:s.add_column.size);return n.appendChild(t),n}return ne(e,".column")||ne(t,".row")?t:wn(ue(H),t)}function wn(e,t){var n=Ye();return t&&e.appendChild(t),n.appendChild(e),n}function yn(e,t){var n=hr(e,{region:Tr(L),before:null},t);n&&n.scrollIntoView&&n.scrollIntoView({behavior:"smooth"})}function ve(){B&&!Oe(B.node)&&Ae(),L&&!c.contains(L)&&te(null),se&&se.home&&!Oe(se.home)&&Ce(),Bn(!0),P(c,"ge-editing",!Pe),P(c,"ge-drag-drawer",s.drag_handle==="drawer"),ya();var e=Ba();Va(e),qa(e),Xa(),na(),ra(),Gi(),ae("onInit"),Ta(),Ma(),Lo(R),rt(c),L&&!c.contains(L)?te(null):L&&C(L,"ge-selected"),va()}function Re(){Ae(),ha(),_(c,"ge-editing ge-drag-drawer ge-dropping"),L&&_(L,"ge-selected"),ae("onBeforeDeinit"),we(),vn(),Ce(),Or(c),Lt.clear(),So(c),ae("onDeinit"),St(c),Sr(c),qi(),Fa(),ja(),Bn(!1,c)}function Or(e){x(e,".ge-tools-drawer").forEach(function(t){t.remove()})}function Sr(e){x(e,"[data-ge-row-cols]").forEach(function(t){t.removeAttribute("data-ge-row-cols")})}function Ai(){var e=[];return[T,M,U].forEach(function(t){Object.keys(t).forEach(function(n){var r=t[n],o=r.unmark||r.onDeinit||r.onBeforeDeinit;o&&!r.cleanMarkup&&e.push(n)})}),e}function Ti(){for(var e=c.cloneNode(!0),t=new Map,n=new Map,r=document.createTreeWalker(c,NodeFilter.SHOW_ELEMENT),o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),i=r.currentNode,l=o.currentNode;i&&l;)t.set(l,i),n.set(i,l),i=r.nextNode(),l=o.nextNode();return{root:e,liveOf:function(d){return t.get(d)||null},copyOf:function(d){return n.get(d)||null}}}function Lr(){if(Ee)return nt();var e=Ai();if(e.length)return e.forEach(function(o){G("snapshot:"+o,'the "'+o+'" plugin has no cleanMarkup, so the canvas leaves editing to be read: open texts and settings panels close')}),nt();var t=Ti(),n=t.root;[n].concat(x(n,".ge-selected, .ge-settings-target, .ge-leaving")).forEach(function(o){_(o,"ge-selected ge-settings-target ge-leaving"),$e(o)}),x(n,".ge-drop-marker").forEach(function(o){o.remove()}),Or(n),So(n);var r=null;return[T,M,U].forEach(function(o){Object.keys(o).forEach(function(i){var l=o[i];r||!l.cleanMarkup||l.cleanMarkup(n,t.liveOf)===!1&&(r=i)})}),r?(G("snapshot-refused:"+r,'the "'+r+'" plugin cannot take its marking off a copy right now, so the canvas leaves editing to be read'),nt()):(St(n),Sr(n),x(n,"[data-ge-container]").forEach(Br),Et.forEach(function(o){var i=t.copyOf(o.el);i&&x(i,"[draggable]").forEach(function(l){l.removeAttribute("draggable")})}),_o(n),Bn(!1,n),Xe(n),n.innerHTML)}function nt(e){if(e&&e.keepEditing)return Lr();Re(),Xe(c);var t=c.innerHTML;return ve(),t}function Oi(e){Re(),Xe(e);var t=e.outerHTML;return ve(),t}function Si(e){return er(nt(e))}function Li(e){Ee&&(bn(),E&&x(E,".gm-edit-mode").forEach(function(t){_(t,"active btn-danger")})),At(!1),Re(),ft(c,e),ve()}function Mi(){ae("onDestroy"),Ee&&bn(),At(!1),Re(),L=null,Yt===a&&(Yt=null),lr(),no(),po(),pn(),ee.remove(),rn.abort(),Jt.delete(c),xt=!0}function Pi(){var e=or=zi();xn("grid",{},vi()),s.row_cols!==!1&&xn("grid",{},_a());var t=function(r){return!s.plugins||s.plugins.indexOf(r)!==-1},n=function(r,o){return o.always===!0||t(r)};Object.keys(O.containers).forEach(function(r){t(r)&&(T[r]=O.containers[r](e))}),Object.keys(O.features).forEach(function(r){var o=O.features[r];n(r,o)&&(M[r]=o(e))}),Object.keys(O.utilities).forEach(function(r){t(r)&&(U[r]=O.utilities[r](e),(U[r].families||[]).forEach(function(o){xn(r,U[r],o)}))}),Object.keys(M).forEach(function(r){var o=M[r].methods||{};Object.keys(o).forEach(function(i){Ne[i]=o[i]})}),(s.plugins||[]).forEach(function(r){T[r]||M[r]||U[r]||G("plugin:"+r,'the "'+r+'" plugin is not loaded: include dist/plugins/grideditor.'+r+".js after the editor")})}function ae(e,t){[T,M,U].forEach(function(n){Object.keys(n).forEach(function(r){n[r][e]&&n[r][e](t)})})}function zi(){return{canvas:c,settings:s,t:g,warn:K,containerId:Ur,freshNode:Bi,defaultRegion:Vi,createTool:F,createMoveTool:Ie,addSettingsTool:st,deleteNode:je,place:Ut,placeInTarget:mi,createPaneControls:Yi,makeLabelEditable:Ji,labelIn:$i,unwrapLabels:Qi,suspendToggles:Vr,resumeToggles:Gr,emit:I,payloadFor:oe,operate:J,kindOf:le,view:qn,previewing:function(){return Pe},viewTiers:function(){return Uo(R).map(function(e){return e.key})},breakpoints:y.map(function(e){return e.key}),getUtility:Ir,setUtility:An,utilityField:Ui,bareStyle:Ni,hostStyle:Dr,setHostStyle:Wi,openDialog:go,closeDialog:Ce,rowFromLayout:tt,nodeHtml:Oi,snapshotHtml:Lr,setHtml:Li,confirm:ar,textReady:ti,attachPicker:Xr,openPicker:yr,closePicker:we,detailsOf:Pn,drawerOf:Cn,refreshToolbar:li,toolbarItems:function(e){return E?x(E,'[data-ge-toolbar="feature"][data-ge-feature="'+e+'"]'):[]},getActiveTarget:function(){return s.active_target?L:null},setActiveTarget:function(e){var t=!!s.active_target&&(e===null||kr(e));return t&&te(e),t},removeNode:Qo,panelOpen:function(){return B||se||N&&b(N,"show")?!0:Ve()==="inline"&&x(c,".ge-tools-drawer > .ge-details").some(gt)},contains:function(e){return!e||e.nodeType!==1?!1:c.contains(e)||E&&E.contains(e)||X&&X.contains(e)||N&&N.contains(e)?!0:Object.keys(z).some(function(t){return z[t].contains(e)})}}}function Cn(e){if(b(e,"ge-content")){var t=e.parentElement;return b(t,"ge-text-block")?j(t,".ge-tools-drawer"):null}return j(e,".ge-tools-drawer")}var _e={},ji=".row, .column, .ge-content, .ge-element, [data-ge-container]",Ue="data-ge-preview",En=!1;function xn(e,t,n){var r=n.name||n.prefix;if(_e[r]){K('the "'+e+'" plugin declares the utility "'+r+'", which the "'+_e[r].plugin+'" plugin already declared: ignored');return}_e[r]={plugin:e,family:Object.assign({},n,{name:r,values:n.values.map(String),appliesTo:n.appliesTo||t.appliesTo||["row","column"]})}}function Ot(e,t){return _e[e]?_e[e].family:(G("utility:"+e,t+"("+JSON.stringify(e)+"): no loaded plugin declares that utility"),null)}function Mr(e,t){return t==="plain"&&(t="text"),e.appliesTo.indexOf(t)!==-1?!0:!!T[t]&&e.appliesTo.indexOf("container")!==-1}function Pr(e){return Object.keys(_e).map(function(t){return _e[t].family}).filter(function(t){return Mr(t,e)})}function _n(e,t,n){return e.className?e.className(t.key,n):e.prefix+(t.infix?"-"+t.infix:"")+"-"+n}function ke(e,t,n){for(var r=(e.getAttribute("class")||"").split(/\s+/),o=0;o<t.values.length;o++)if(r.indexOf(_n(t,n,t.values[o]))!==-1)return t.values[o];return null}function zr(e,t,n){for(var r=y.indexOf(n)-1;r>=0;r--){var o=ke(e,t,y[r]);if(o!==null)return{tier:y[r],value:o}}return null}function jr(e,t,n){var r=ke(e,t,n);if(r!==null)return r;var o=zr(e,t,n);return o?o.value:null}function kn(e,t){return y.map(function(n){return{tier:n,value:ke(e,t,n)}}).filter(function(n){return n.value!==null})}function Rr(e,t,n,r){t.values.forEach(function(o){_(e,_n(t,n,o))}),r!==null&&C(e,_n(t,n,r)),$e(e)}function Nr(e,t,n){return n===Q?ke(e,t,y[0]):jr(e,t,Z(n))}function Ri(e,t,n,r){if(n!==Q){var o=Z(n);return ke(e,t,o)===r?null:{writes:[{tier:o,value:r}],cleared:[]}}var i=[],l=[];return kn(e,t).forEach(function(d){d.tier!==y[0]&&(i.push({tier:d.tier,value:null}),l.push({breakpoint:d.tier.key,value:d.value}))}),ke(e,t,y[0])!==r&&i.unshift({tier:y[0],value:r}),i.length?{writes:i,cleared:l}:null}function Ir(e,t,n){e=me(e);var r=Ot(t,"getUtility");if(!r||!e)return null;var o=n===void 0?R:Gn(n);return o===null?(K("getUtility("+JSON.stringify(n)+"): no such layout mode"),null):Nr(e,r,o)}function An(e,t,n,r){r=typeof r=="string"?{view:r}:r||{},e=me(e);var o=Ot(t,"setUtility");if(!o||!e)return!1;var i=r.view===void 0?R:Gn(r.view);if(i===null)return K("setUtility("+JSON.stringify(r.view)+"): no such layout mode"),!1;if(n=n==null||n===""?null:String(n),n!==null&&o.values.indexOf(n)===-1)return K("setUtility: "+JSON.stringify(n)+' is not a value of "'+t+'", which takes '+JSON.stringify(o.values)),!1;var l=le(e);if(!Mr(o,l))return K('setUtility: "'+t+'" does not apply to a '+l),!1;if(o.write)return o.write(e,n,i,r.source||"api");var d=Ri(e,o,i,n);return d?J(function(){var f=oe(l,e,{family:t,breakpoint:i,tiers:d.writes.map(function(m){return m.tier.key}),from:Nr(e,o,i),to:n,cleared:d.cleared,source:r.source||"api"});return I("before-utility",f)?(d.writes.forEach(function(m){Rr(e,o,m.tier,m.value)}),he(e),I("after-utility",f),!0):(he(e),!1)}):!1}function Ni(e,t,n){var r=Ot(t,"bareStyle");if(e=me(e),!r||!e)return null;var o=e.getAttribute("class");y.forEach(function(l){Rr(e,r,l,null)});var i=getComputedStyle(e).getPropertyValue(n);return o===null?e.removeAttribute("class"):e.setAttribute("class",o),i}function he(e){var t=Pn(e);if(t){var n=S(t,".ge-classes");n&&(n.value=Mn(e).join(" ")),q(t,".ge-utilities").forEach(function(r){Tn(r)})}Hr(e),rt(e)}function Ii(e){return de(e,ji)}function rt(e){St(e),R!==Q&&Di(e,Z(R)),xa(e),ae("onRefresh",e)}function Di(e,t){Ii(e).forEach(function(n){var r=le(n),o={};Pr(r).forEach(function(i){!i.preview||!kn(n,i).length||Object.assign(o,i.preview(jr(n,i,t),n,r))}),r==="column"&&Object.assign(o,Ea(n,t)),Object.keys(U).forEach(function(i){var l=U[i];l.preview&&Object.assign(o,l.preview(n,r,t.key))}),Object.keys(o).length&&Fi(n,o)})}function Fi(e,t){var n=e.style,r={};Object.keys(t).forEach(function(o){r[o]=[n.getPropertyValue(o),n.getPropertyPriority(o)],n.setProperty(o,String(t[o]),"important")}),e.setAttribute(Ue,JSON.stringify(r))}function St(e){de(e,"["+Ue+"]").forEach(function(t){var n=t.style,r={};try{r=JSON.parse(t.getAttribute(Ue))||{}}catch(o){}Object.keys(r).forEach(function(o){var i=r[o];i&&i[0]?n.setProperty(o,i[0],i[1]):n.removeProperty(o)}),t.removeAttribute(Ue),mt(t)})}function Hi(e){var t=document.createElement("div"),n={};t.style.cssText=e.style.cssText;try{n=JSON.parse(e.getAttribute(Ue))||{}}catch(r){}return Object.keys(n).forEach(function(r){var o=n[r];o&&o[0]?t.style.setProperty(r,o[0],o[1]):t.style.removeProperty(r)}),t.style}function Dr(e,t){var n=Hi(e);return t===void 0?n.cssText:{value:n.getPropertyValue(t),priority:n.getPropertyPriority(t)}}function Wi(e,t,n,r){if(n=n==null?"":String(n).trim(),r===void 0&&(r=Dr(e,t).priority),n!==""){var o=document.createElement("div").style;if(o.setProperty(t,n,r||""),o.getPropertyValue(t)==="")return!1}var i=e.hasAttribute(Ue);return i&&St(e),n===""?e.style.removeProperty(t):e.style.setProperty(t,n,r||""),mt(e),i&&rt(e),!0}function Ki(e){var t=le(e),n=Pr(t).filter(function(l){return l.panel!==!1}).map(function(l){return Fr(e,l)});if(Object.keys(U).forEach(function(l){var d=U[l],f=d.panel?d.panel(e,t):null;f&&n.push(f)}),!n.length)return null;var r=P(v("div",{class:"ge-utilities"}),"ge-open",En);ir.set(r,e);var o=r.appendChild(v("a",{class:"ge-utilities-toggle"}));o.addEventListener("click",function(){En=!b(r,"ge-open"),Zr().forEach(function(l){x(l,".ge-utilities").forEach(function(d){P(d,"ge-open",En)})})});var i=r.appendChild(v("div",{class:"ge-utilities-body"}));return n.forEach(function(l){i.appendChild(l)}),Tn(r),r}function Fr(e,t){var n=v("label",{class:"ge-utility","data-ge-family":t.name});n.appendChild(v("span",{class:"ge-utility-label"},t.labelKey?g(t.labelKey):t.name));var r=n.appendChild(v("select",{class:"form-select form-select-sm"}));return r.addEventListener("change",function(){An(e,t.name,this.value,{source:"panel"})}),n.appendChild(v("small",{class:"ge-utility-note"})),n}function Ui(e,t){var n=Ot(t,"utilityField");if(!n)return null;var r=Fr(e,n);return On(r,e),Lt.set(r,e),r}var Lt=new Map;function Hr(e){Lt.forEach(function(t,n){if(!n.isConnected){Lt.delete(n);return}e&&t!==e||W(n,".ge-utilities")||On(n,t)})}function Tn(e){var t=ir.get(e);q(e,".ge-utilities-toggle").forEach(function(n){n.textContent=g("utility.section",{view:g(bt(R))})}),x(e,".ge-utility").forEach(function(n){On(n,t)})}function On(e,t){var n=_e[e.getAttribute("data-ge-family")].family,r=j(e,"select"),o=n.choices?n.choices(t,le(t)):n.values,i,l,d="";if(r.innerHTML="",R===Q){i=ke(t,n,y[0]),l=g("utility.default");var f=kn(t,n).filter(function($){return $.tier!==y[0]});f.length&&(d=g("utility.varies",{breakpoints:f.map(function($){return $.tier.key}).join(", ")}))}else{var m=Z(R),h=zr(t,n,m);i=ke(t,n,m),l=h?g("utility.inherit",{value:Wr(n,h.value),breakpoint:h.tier.key}):g("utility.default");var k=n.blank?n.blank(t,R):null;k&&i===null&&(l=k)}i!==null&&o.indexOf(i)===-1&&(o=o.concat([i])),r.appendChild(v("option",{value:""},l)),o.forEach(function($){r.appendChild(v("option",{value:$},Wr(n,$)))}),r.value=i===null?"":i;var A=j(e,".ge-utility-note");A.textContent=d,Yn(A,d!=="")}function Wr(e,t){return e.label?e.label(t):t}var T={},M={},U={},Ne={},Kr=0;function Ur(e){return Kr++,"ge-"+e+"-"+Kr+"-"+Math.random().toString(36).slice(2,6)}function Bi(e){var t=V(e),n={},r=function(i){return!!document.getElementById(i)||Object.keys(n).some(function(l){return n[l]===i})};if(de(t,"[id]").forEach(function(i){var l=i.id;if(document.getElementById(l)){var d=al.exec(l),f;if(d)do f=Ur(d[1]);while(r(f));else{for(var m=2;r(l+"-"+m);)m++;f=l+"-"+m}n[l]=f,i.id=f}}),!Object.keys(n).length)return t;var o=Object.keys(T).reduce(function(i,l){return i.concat(T[l].references||[])},il);return de(t,"*").forEach(function(i){o.forEach(function(l){var d=i.getAttribute(l);if(d!==null&&!(l==="href"&&d.charAt(0)!=="#")){var f=d.split(/(\s+)/).map(function(m){return n[m]?n[m]:m.charAt(0)==="#"&&n[m.slice(1)]?"#"+n[m.slice(1)]:m}).join("");f!==d&&i.setAttribute(l,f)}})}),t}function Vi(){var e=Ye();return e.appendChild(ue(H)),e}function be(e){return e?e.getAttribute("data-ge-container"):null}function Gi(){x(c,"[data-ge-container]").forEach(function(e){var t=be(e),n=T[t];if(!n){G("container:"+t,'unknown container type "'+t+'"');return}C(e,"ge-container ge-container-"+t),n.mark(e),j(e,".ge-tools-drawer")||Xi(e,t,n)})}function qi(){x(c,"[data-ge-container]").forEach(function(e){var t=T[be(e)];t&&t.unmark(e),Br(e)})}function Br(e){_(e,"ge-container ge-container-"+be(e)),$e(e)}function Be(e,t){var n=v("div",{class:t});return e.insertBefore(n,e.firstChild),n}function Mt(e,t){(t||[]).forEach(function(n){F(e,n.title||"",n.className||"",n.iconClass||"bi bi-wrench",n.on)})}function Xi(e,t,n){var r=Be(e,"ge-tools-drawer ge-container-drawer");Ie(r),st(r,e,s.container_classes),Mt(r,s.container_tools),n.tools&&n.tools(r,e),F(r,g("tool.delete_container"),"ge-delete-container","bi bi-trash",function(){je(t,e,g("confirm.delete_container"),function(o){ht(e,o)})}),n.addPane&&F(r,g(n.addPaneKey),"ge-add-pane","bi bi-plus-circle",function(){var o=n.addPane(e,{});o&&ie(n.paneKind,o,function(){},{parent:e,source:"tool",container:e})})}function Yi(e,t,n,r,o){var i=Be(e,"ge-tools-drawer ge-pane-drawer");return Ie(i),st(i,e,s.pane_classes),Mt(i,n),F(i,g("tool.delete_pane"),"ge-delete-pane","bi bi-trash",function(){je(t,e,r,function(l){o(l)})}),i}var Pt=["toggle","dismiss","slide","slide-to","ride"];function Vr(e){e&&de(e,Pt.map(function(t){return"[data-bs-"+t+"]"}).join(", ")).forEach(function(t){Pt.forEach(function(n){var r=t.getAttribute("data-bs-"+n);r!==null&&(t.setAttribute("data-ge-bs-"+n,r),t.removeAttribute("data-bs-"+n))})})}function Gr(e){e&&de(e,Pt.map(function(t){return"[data-ge-bs-"+t+"]"}).join(", ")).forEach(function(t){Pt.forEach(function(n){var r=t.getAttribute("data-ge-bs-"+n);r!==null&&(t.setAttribute("data-bs-"+n,r),t.removeAttribute("data-ge-bs-"+n))})})}function Ji(e){if(!nn.has(e)){var t=W(e,"[data-bs-toggle], [data-ge-bs-toggle]");nn.add(e),e.setAttribute("title",g("tool.rename")),e.addEventListener("dblclick",function(n){n.preventDefault(),n.stopPropagation(),Vr(t),e.setAttribute("contenteditable","true"),e.focus(),window.getSelection().selectAllChildren(e)}),e.addEventListener("keydown",function(n){e.getAttribute("contenteditable")==="true"&&n.key==="Enter"&&(n.preventDefault(),e.blur())}),e.addEventListener("blur",function(){e.removeAttribute("contenteditable"),Gr(t)})}}function $i(e){var t=j(e,".ge-pane-label");return t||(t=v("span",{class:"ge-pane-label"},e.textContent.trim()),e.innerHTML="",e.appendChild(t)),t}function Qi(e){x(e,".ge-pane-label").forEach(function(t){nn.delete(t),Xt(t)})}function qr(e,t){var n=ue(t);return ie("column",n,function(){e.appendChild(n)},{parent:e,source:"tool"})}function Zi(e,t){!s.add_column.picker||!e||Xr(e,function(){ea(e,t)})}function Xr(e,t){var n=null,r=function(){window.clearTimeout(n),n=null};fe(e,"mouseenter mousedown",function(){n||re||(n=window.setTimeout(function(){n=null,t()},s.add_column.delay))}),fe(e,"mouseleave mouseup",r)}function ea(e,t){we();var n=Fn(t,ye()),r=W(e,".ge-tools-drawer");r&&C(r,"ge-picker-open"),re=e.appendChild(v("div",{class:"ge-size-picker"})),s.valid_col_sizes.forEach(function(o){var i=v("a",{class:"ge-size","data-ge-size":o,title:ta(o)},Y(o)?o:De(y[0],o));P(i,"ge-size-tight",Y(o)&&o>n),P(i,"ge-size-flex",!Y(o)),i.addEventListener("click",function(l){l.preventDefault(),l.stopPropagation(),we(),qr(t,o)}),re.appendChild(i)}),Cr(e)}function ta(e){return e==="equal"?g("tool.column_equal"):e==="auto"?g("tool.column_auto"):g("tool.column_size",{size:e})}function we(){if(!re)return!1;var e=W(re,".ge-tools-drawer");return e&&_(e,"ge-picker-open"),re.remove(),re=null,!0}function na(){x(c,".row").forEach(function(e){if(!j(e,".ge-tools-drawer")){var t=Be(e,"ge-tools-drawer");Ie(t),st(t,e,s.row_classes),Mt(t,s.row_tools),F(t,g("tool.delete_row"),"ge-delete-row","bi bi-trash",function(){je("row",e,g("confirm.delete_row"),function(n){ht(e,n)})}),F(t,g("tool.add_column"),"ge-add-column","bi bi-plus-circle",function(){we()||qr(e,Ge(e,ye())?null:s.add_column.size)}),Zi(j(t,".ge-add-column"),e)}})}function ra(){x(c,".column").forEach(function(e){if(!j(e,".ge-tools-drawer")){var t=Be(e,"ge-tools-drawer");Ie(t),s.resize.tools!==!1&&(F(t,g("tool.column_narrower"),"ge-decrease-col-width","bi bi-dash-lg",function(n){fn(e,n.shiftKey?lt(s.valid_col_sizes):zt(s.valid_col_sizes.filter(Y),it(e),-1),"tool")}),F(t,g("tool.column_wider"),"ge-increase-col-width","bi bi-plus-lg",function(n){fn(e,n.shiftKey?oa(e):zt(s.valid_col_sizes.filter(Y),it(e),1),"tool")})),s.indent.tools!==!1&&(F(t,g("tool.indent_decrease"),"ge-decrease-col-offset","bi bi-text-indent-right",function(n){ur(e,n.shiftKey?lt(s.valid_col_offsets):zt(s.valid_col_offsets,at(e),-1),"tool")}),F(t,g("tool.indent_increase"),"ge-increase-col-offset","bi bi-text-indent-left",function(n){ur(e,n.shiftKey?ia(e):zt(s.valid_col_offsets,at(e),1),"tool")})),st(t,e,s.col_classes),Mt(t,s.col_tools),F(t,g("tool.delete_column"),"ge-delete-column","bi bi-trash",function(){je("column",e,g("confirm.delete_column"),function(n){Ho(e,400,n,!0)})}),F(t,g("tool.add_row"),"ge-add-row","bi bi-plus-circle",function(){var n=Ye();ie("row",n,function(){e.appendChild(n)},{parent:e,source:"tool"})})}})}function ye(){return R===Q?y[y.length-1]:Z(R)}function ot(e){var t=ye();if(Nt(e,t))return null;var n=In(e,t);return n===null?H:n}function it(e){var t=ot(e);if(Y(t))return t;var n=Math.round(pt(e)/Yr(e.parentElement)*H);return Math.min(Math.max(n,1),H)}function Yr(e){var t=window.getComputedStyle(e);return e.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)}function at(e){return Dt(e,ye())||0}function zt(e,t,n){var r=e.indexOf(t);return r===-1?e.reduce(function(o,i){return Math.abs(i-t)<Math.abs(o-t)?i:o},e[0]):e[Math.min(Math.max(r+n,0),e.length-1)]}function lt(e){return e.filter(Y).reduce(function(t,n){return Math.min(t,n)},H)}function Sn(e){return e.filter(Y).reduce(function(t,n){return Math.max(t,n)},0)}function oa(e){var t=Fn(e.parentElement,ye(),e)-at(e);return Math.min(Sn(s.valid_col_sizes),Math.max(t,1))}function ia(e){var t=Fn(e.parentElement,ye(),e)-it(e);return Math.min(Sn(s.valid_col_offsets),Math.max(t,0))}function Ie(e){return s.drag_handle==="drawer"?null:F(e,g("tool.move"),"ge-move","bi bi-arrows-move")}var Ln=".ge-tools-drawer:not(.ge-text-drawer):not(.ge-pane-drawer):not(.ge-code-inline)";function aa(){if(s.drawer_overflow==="wrap"||!window.ResizeObserver||!window.MutationObserver)return;var e=new Set,t=null;function n(l){e.add(l),t===null&&(t=window.requestAnimationFrame(r))}function r(){t=null;var l=Array.from(e);e.clear(),l.forEach(function(d){if(!d.isConnected){o.unobserve(d);return}la(d)})}var o=new window.ResizeObserver(function(l){l.forEach(function(d){n(d.target)})}),i=new window.MutationObserver(function(l){l.forEach(function(d){var f=d.target;if(d.type==="attributes"){var m=f.parentNode;m&&m.nodeType===1&&m.matches(Ln)&&n(m);return}if(f.nodeType===1&&f.matches(Ln)){n(f);return}d.addedNodes.forEach(function(h){h.nodeType===1&&de(h,Ln).forEach(function(k){C(k,"ge-drawer-fit"),o.observe(k),n(k)})})})});i.observe(c,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),rn.signal.addEventListener("abort",function(){i.disconnect(),o.disconnect(),t!==null&&window.cancelAnimationFrame(t)})}function la(e){var t=q(e,"a").filter(function(o){return!b(o,"ge-drawer-more")}),n=b(e,"ge-drawer-expanded");if(_(e,"ge-drawer-overflow ge-drawer-expanded"),t.forEach(function(o){_(o,"ge-tool-overflow")}),!!Jr(e,t)){C(e,"ge-drawer-overflow"),j(e,".ge-drawer-more")||F(e,g("tool.more"),"ge-drawer-more","bi bi-three-dots",function(){P(e,"ge-drawer-expanded")});for(var r=t.length-1;r>=0&&Jr(e,t);r--)C(t[r],"ge-tool-overflow");P(e,"ge-drawer-expanded",n)}}function Jr(e,t){var n=window.getComputedStyle(e),r=e.getBoundingClientRect().right-parseFloat(n.borderRightWidth)-parseFloat(n.paddingRight);return t.some(function(o){var i=o.getClientRects();return i.length>0&&i[0].right>r+.5})}function F(e,t,n,r,o){var i=v("a",{title:t,class:n});return i.appendChild(v("i",{class:r})),e.appendChild(i),typeof o=="function"&&(i.addEventListener("click",o),en.set(i,o)),o&&typeof o=="object"&&(Object.keys(o).forEach(function(l){fe(i,l,o[l])}),typeof o.click=="function"&&en.set(i,o.click)),i}function Mn(e){return(e.getAttribute("class")||"").split(/\s+/).filter(function(t){return t!==""&&!sa(t)})}function sa(e){return e==="row"||e==="column"||/^(ge-|ui-)/.test(e)||/^col(-(sm|md|lg|xl|xxl))?(-auto)?$/.test(e)?!0:y.some(function(t){return new RegExp("^("+t.colPrefix+"|"+t.offsetPrefix+")\\d+$").test(e)})}function ua(e,t){Mn(e).forEach(function(n){_(e,n)}),t.split(/\s+/).forEach(function(n){n!==""&&C(e,n)}),$e(e)}function st(e,t,n){var r=da(t,n||[]);Ke.set(t,r),Ve()!=="sidebar"&&F(e,g("tool.settings"),"ge-settings","bi bi-gear-fill",function(){fa(t,r,this)});var o=le(t);return Object.keys(U).forEach(function(i){U[i].drawerTools&&U[i].drawerTools(e,t,o)}),Object.keys(M).forEach(function(i){M[i].drawerTools&&M[i].drawerTools(e,t,o)}),e.appendChild(r)}function da(e,t){var n=v("div",{class:"ge-details"});n.appendChild($r(g("panel.section_general")));var r=n.appendChild(v("div",{class:"ge-details-general"})),o=function(m){var h=v("label",{class:"ge-field"});return h.appendChild(v("span",{class:"ge-field-label"},m)),r.appendChild(h)},i=v("input",{class:"ge-id form-control form-control-sm",placeholder:g("tool.id_placeholder"),title:g("tool.id_title")});i.value=e.getAttribute("id")||"",o(g("panel.id")).appendChild(i),i.addEventListener("change",function(){this.value===""?e.removeAttribute("id"):e.setAttribute("id",this.value)});var l=v("input",{class:"ge-classes form-control form-control-sm",placeholder:g("tool.classes_placeholder"),title:g("tool.classes_title")});l.value=Mn(e).join(" "),o(g("panel.classes")).appendChild(l),l.addEventListener("change",function(){ua(e,this.value),he(e)});var d=r.appendChild(v("div",{class:"btn-group btn-group-sm ge-presets",role:"group"}));t.forEach(function(m){var h=b(e,m.cssClass),k=v("a",{role:"button",class:"btn btn-sm btn-outline-secondary",title:m.title?m.title:g("tool.toggle_class",{label:m.label}),"aria-pressed":h?"true":"false"});k.innerHTML=m.label,P(k,"active",h),k.addEventListener("click",function(){P(k,"active"),k.setAttribute("aria-pressed",b(k,"active")?"true":"false"),P(e,m.cssClass,b(k,"active")),he(e)}),d.appendChild(k)}),ca(e).forEach(function(m){n.appendChild(m)});var f=Ki(e);return f&&n.appendChild(f),n}function $r(e){return v("h6",{class:"ge-section-title"},e)}function ca(e){var t=le(e),n=Ve(),r=[];return[T,M,U].forEach(function(o){Object.keys(o).forEach(function(i){var l=o[i],d=l.panelSection?l.panelSection(e,t):null;if(!(!d||!d.body)){var f=v("div",{class:"ge-panel-section","data-ge-plugin":i});if(n==="offcanvas"||n==="modal"||n==="sidebar")f.appendChild($r(g(d.labelKey))),f.appendChild(d.body);else{var m=g(d.labelKey),h=f.appendChild(v("button",{type:"button",class:"btn btn-sm btn-outline-secondary ge-panel-section-open"},m));ce(d.body),f.appendChild(d.body),h.addEventListener("click",function(){go(d.titleKey?g(d.titleKey,{kind:Nn(e)}):m,d.body,h)})}r.push(f)}})}),r}var Qr=["offcanvas","popover","modal","inline","sidebar"],z={},B=null,jt=new WeakMap;function Ve(){return Qr.indexOf(s.settings_panel)!==-1?s.settings_panel:(G("settings_panel",'settings_panel "'+s.settings_panel+'" is not one of '+Qr.join(", ")+": using offcanvas"),"offcanvas")}function Pn(e){return e&&Ke.get(e)||null}function Zr(){var e=[c];return B&&B.mode!=="inline"&&e.push(B.details),Te&&e.push(Te.details),e}function fa(e,t,n){var r=Ve();if(r==="inline"){Yn(t);return}var o=B&&B.details===t;Ae(),o||ma(r,e,t,n)}function ma(e,t,n,r){var o=to(e),i=new AbortController;B={mode:e,node:t,details:n,home:n.parentElement,next:n.nextElementSibling,gear:r,listening:i},S(o,".ge-settings-title").textContent=g("panel.title",{kind:Nn(t)}),S(o,".ge-settings-body").appendChild(n),Le(n),C(t,"ge-settings-target");var l={signal:i.signal};if(document.addEventListener("keydown",function(f){f.key==="Escape"&&!se&&Ae()},l),e==="offcanvas"){var d=window.innerWidth<576;P(o,"offcanvas-end",!d),P(o,"offcanvas-bottom",d),_(o,"hiding"),o.getBoundingClientRect(),C(o,"show")}else e==="popover"?(zn(o,r),fe(window,"scroll resize",function(){zn(o,r)},l),window.ResizeObserver&&(B.observer=new window.ResizeObserver(function(){zn(o,r)}),B.observer.observe(n)),fe(document,"mousedown touchstart",function(f){!se&&!o.contains(f.target)&&!r.contains(f.target)&&Ae()},l)):jn(o,function(){B&&B.mode==="modal"&&Ae()})}function Ae(){Ce();var e=B;if(e){B=null;var t=z[e.mode];e.listening.abort(),e.observer&&e.observer.disconnect(),e.mode==="offcanvas"?(_(t,"show"),C(t,"hiding"),window.setTimeout(function(){_(t,"hiding")},300)):e.mode==="popover"?ce(t):Rn(t),eo(e)}}function eo(e){_(e.node,"ge-settings-target"),e.details.style.removeProperty("display"),mt(e.details),e.home&&Oe(e.home)?e.next&&e.next.parentElement===e.home?e.home.insertBefore(e.details,e.next):e.home.appendChild(e.details):e.details.remove()}function to(e){if(z[e])return z[e];var t=function(){return v("button",{type:"button",class:"btn-close ge-settings-close","aria-label":g("panel.close")})},n;return e==="offcanvas"?(n=V('<div class="offcanvas offcanvas-end ge-settings-panel ge-settings-offcanvas" tabindex="-1" role="dialog"><div class="offcanvas-header"><h5 class="offcanvas-title ge-settings-title"></h5></div><div class="offcanvas-body ge-settings-body"></div></div>'),S(n,".offcanvas-header").appendChild(t())):e==="popover"?(n=V('<div class="popover bs-popover-bottom ge-settings-panel ge-settings-popover" role="dialog"><div class="popover-arrow"></div><div class="popover-header"><span class="ge-settings-title"></span></div><div class="popover-body ge-settings-body"></div></div>'),S(n,".popover-header").appendChild(t()),ce(n)):e==="sidebar"?(n=V('<div class="offcanvas offcanvas-end ge-settings-panel ge-settings-sidebar" tabindex="-1" role="complementary"><div class="offcanvas-header"><h5 class="offcanvas-title ge-settings-title"></h5></div><div class="offcanvas-body ge-settings-body"></div></div>'),n.id="ge-settings-sidebar-"+rr,S(n,".offcanvas-header").appendChild(t()),z["sidebar-toggle"]=document.body.appendChild(ga(n))):(n=V('<div class="modal fade ge-settings-panel ge-settings-modal" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-centered modal-dialog-scrollable"><div class="modal-content"><div class="modal-header"><h5 class="modal-title ge-settings-title"></h5></div><div class="modal-body ge-settings-body"></div><div class="modal-footer"></div></div></div></div>'),S(n,".modal-header").appendChild(t()),S(n,".modal-footer").appendChild(v("button",{type:"button",class:"btn btn-primary ge-settings-close"},g("panel.done")))),vt(n,"click",".ge-settings-close",function(r){r.preventDefault(),e==="sidebar"?te(null):Ae()}),z[e]=document.body.appendChild(n),n}function no(){Ae(),so(),_(document.documentElement,"ge-sidebar-open"),Object.keys(z).forEach(function(e){e==="modal"?ln(z[e]):z[e].remove()}),Object.keys(z).forEach(function(e){mo(z[e])}),z={}}var ro=576,Te=null,ut=null;function Rt(){return b(c,"ge-editing")}function ga(e){var t=v("button",{type:"button",class:"ge-sidebar-toggle","aria-controls":e.id});return t.appendChild(v("i")),t.addEventListener("click",function(){pa(!We)}),t}function pa(e){We=e,oo()}function oo(){var e=z.sidebar,t=z["sidebar-toggle"];if(e){var n=!We;n&&!b(e,"show")?(_(e,"hiding"),e.getBoundingClientRect(),C(e,"show")):!n&&b(e,"show")&&(_(e,"show"),C(e,"hiding"),window.setTimeout(function(){_(e,"hiding")},300));var r=g(n?"panel.collapse":"panel.expand");t.setAttribute("aria-expanded",n?"true":"false"),t.setAttribute("aria-label",r),t.setAttribute("title",r),S(t,"i").className="bi "+(n?"bi-chevron-right":"bi-chevron-left"),io()}}function io(){P(document.documentElement,"ge-sidebar-open",!!z.sidebar&&Rt()&&!We&&window.innerWidth>=ro)}function va(){if(Ve()==="sidebar"){var e=to("sidebar");We===null&&(We=window.innerWidth<ro),e.style.removeProperty("display"),z["sidebar-toggle"].style.removeProperty("display"),uo(),oo()}}function ha(){lo();var e=z.sidebar;e&&(e.style.display="none",z["sidebar-toggle"].style.display="none",_(document.documentElement,"ge-sidebar-open"))}function ao(e){var t=z.sidebar;S(t,".ge-settings-title").textContent=e,t.setAttribute("aria-label",e)}function lo(){var e=Te;Te=null,e&&eo(e)}function so(){lo(),ut&&(ut.body.remove(),ut=null)}function uo(){var e=z.sidebar;if(!(!e||!Rt())){var t=L?Pn(L):null;if(!(t?Te&&Te.details===t:!Te&&ut)){so();var n=S(e,".ge-settings-body");if(!t){var r=ba(),o=r?r.body:v("p",{class:"ge-sidebar-empty"},g("panel.sidebar_empty"));ao(r?r.title:g("panel.sidebar_title")),n.appendChild(o),ut={body:o};return}Te={node:L,details:t,home:t.parentElement,next:t.nextElementSibling},ao(g("panel.title",{kind:Nn(L)})),n.appendChild(t),Le(t)}}}function ba(){var e=s.sidebar.empty,t=null;return typeof e=="function"?t=co(e(a),function(n){return n.title}):e!=null&&G("sidebar.empty","sidebar.empty is a function(ge) returning { title, body }, not "+typeof e+": ignored"),[T,M,U].forEach(function(n){Object.keys(n).forEach(function(r){var o=n[r];t||!o.sidebarEmpty||(t=co(o.sidebarEmpty(or),function(i){return typeof i.titleKey=="string"&&i.titleKey!==""?g(i.titleKey):""}))})}),t}function co(e,t){if(!e||!e.body||e.body.nodeType!==1)return null;var n=t(e);return{title:typeof n=="string"&&n!==""?n:g("panel.sidebar_title"),body:e.body}}function fo(e){var t=W(e,".ge-tools-drawer",c);if(t){var n=t.parentElement,r=Ke.has(n)?n:q(n).filter(function(i){return Ke.has(i)})[0];if(r)return r}for(var o=e;o&&o!==c;o=o.parentElement)if(Ke.has(o))return o;return null}function zn(e,t){if(Oe(t)){Le(e);var n=t.getBoundingClientRect(),r=8,o=j(e,".popover-body");o.style.removeProperty("max-height");var i=pt(e),l=Vt(e),d=window.innerHeight-n.bottom-2*r,f=n.top-2*r,m=l<=d||d>=f,h=m?d:f;l>h&&(Se(o,{"max-height":Math.max(120,h-(l-Vt(o)))}),l=Vt(e));var k=m?n.bottom+r:n.top-r-l,A=Math.max(r,Math.min(n.left+n.width/2-24,window.innerWidth-i-r));P(e,"bs-popover-bottom",m),P(e,"bs-popover-top",!m),Se(e,{top:k+window.pageYOffset,left:A+window.pageXOffset}),Se(j(e,".popover-arrow"),{left:Math.max(r,Math.min(n.left+n.width/2-A-8,i-24))})}}function jn(e,t){var n=wt(),r=jt.get(e);if(r||(r={wanted:null,busy:!1,backdrop:null,dismissed:t},jt.set(e,r)),r.dismissed=t,!n){r.backdrop||(r.backdrop=v("div",{class:"modal-backdrop fade show ge-settings-backdrop"}),r.backdrop.addEventListener("click",function(){r.dismissed()}),document.body.appendChild(r.backdrop)),C(e,"show"),e.style.display="block",e.removeAttribute("aria-hidden");return}var o=n.getOrCreateInstance(e);r.watched||(r.watched=!0,sr(e),e.addEventListener("hide.bs.modal",function(){r.wanted==="open"&&(r.wanted="closed",r.busy=!0)}),e.addEventListener("shown.bs.modal",function(){r.busy=!1,r.wanted==="closed"&&Rn(e)}),e.addEventListener("hidden.bs.modal",function(){r.busy=!1,r.wanted==="open"?jn(e,r.dismissed):r.dismissed()})),r.wanted="open",r.busy||(r.busy=!0,o.show())}function Rn(e){var t=wt(),n=jt.get(e);if(n){if(n.wanted="closed",!t){n.backdrop&&(n.backdrop.remove(),n.backdrop=null),_(e,"show"),e.style.removeProperty("display"),e.setAttribute("aria-hidden","true");return}!n.busy&&b(e,"show")&&(n.busy=!0,t.getOrCreateInstance(e).hide())}}function mo(e){var t=jt.get(e);t&&t.backdrop&&(t.backdrop.remove(),t.backdrop=null)}var X=null,se=null;function wa(){return X||(X=V('<div class="modal fade ge-dialog" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-centered modal-dialog-scrollable"><div class="modal-content"><div class="modal-header"><h5 class="modal-title ge-dialog-title"></h5></div><div class="modal-body ge-dialog-body"></div><div class="modal-footer"></div></div></div></div>'),S(X,".modal-header").appendChild(v("button",{type:"button",class:"btn-close ge-dialog-close","aria-label":g("panel.close")})),S(X,".modal-footer").appendChild(v("button",{type:"button",class:"btn btn-primary ge-dialog-close"},g("panel.done"))),vt(X,"click",".ge-dialog-close",function(e){e.preventDefault(),Ce()}),document.body.appendChild(X))}function go(e,t,n){Ce();var r=wa(),o=new AbortController;se={body:t,home:t.parentElement,next:t.nextElementSibling,opener:n||document.activeElement,listening:o},S(r,".ge-dialog-title").textContent=e,S(r,".ge-dialog-body").appendChild(t),Le(t),wt()||document.addEventListener("keydown",function(i){i.key==="Escape"&&Ce()},{signal:o.signal}),Object.keys(z).forEach(function(i){C(z[i],"ge-under-dialog")}),jn(r,function(){Ce()})}function Ce(){var e=se;e&&(se=null,e.listening.abort(),Rn(X),Object.keys(z).forEach(function(t){_(z[t],"ge-under-dialog")}),ce(e.body),e.home&&Oe(e.home)?e.next&&e.next.parentElement===e.home?e.home.insertBefore(e.body,e.next):e.home.appendChild(e.body):e.body.remove(),e.opener&&Oe(e.opener)&&e.opener.focus&&e.opener.focus())}function po(){Ce(),X&&(mo(X),ln(X),X=null)}function Nn(e){var t=le(e);if(T[t]&&T[t].labelKey)return g(T[t].labelKey);var n=Object.keys(T).filter(function(r){return T[r].paneKind===t&&T[r].paneLabelKey})[0];if(n)return g(T[n].paneLabelKey);switch(t){case"row":return g("panel.kind_row");case"column":return g("panel.kind_column");case"text":return g("panel.kind_text");case"element":return g("panel.kind_element");case"section":return g("panel.kind_section");case"tab":return g("panel.kind_tab");case"accordion-item":return g("panel.kind_accordion_item");default:return t}}function ya(){x(c,'.column, div[class*="col-"], div.col').forEach(function(e){C(e,"column"),!(ka(e).length||vo(e.parentElement))&&Ft(e,y[0],H)})}function vo(e){return b(e,"row")&&y.some(function(t){return Qe.some(function(n){return b(e,Zn(t,n))})})}function Ge(e,t){if(!b(e,"row"))return null;for(var n=y.indexOf(t);n>=0;n--)for(var r=0;r<Qe.length;r++)if(b(e,Zn(y[n],Qe[r])))return{tier:n,value:Qe[r]};return null}function ho(e,t){for(var n=y.indexOf(t);n>=0;n--){var r=qe(e,y[n]);if(r!==null)return{tier:n,size:r}}return null}function Nt(e,t){var n=Ge(e.parentElement,t);if(!n)return null;var r=ho(e,t);return!r||n.tier>r.tier||n.tier===r.tier&&r.size==="equal"?n:null}function Ca(e){return e.value==="auto"?0:H/parseInt(e.value,10)}function Ea(e,t){var n=Nt(e,t);return n?{flex:"0 0 auto",width:n.value==="auto"?"auto":100/parseInt(n.value,10)+"%","max-width":"100%"}:vo(e.parentElement)&&!ho(e,t)?{flex:"0 0 auto",width:"100%","max-width":"100%"}:{}}function xa(e){de(e,".row").forEach(function(t){var n=s.row_cols===!1?null:R===Q?Ge(t,y[0])||null:Ge(t,Z(R));n?t.setAttribute("data-ge-row-cols",bo(n.value)):t.removeAttribute("data-ge-row-cols")})}function bo(e){return e==="auto"?g("badge.row_cols_auto"):g("badge.row_cols",{count:e})}function _a(){return{name:"row-cols",prefix:"row-cols",values:Qe,appliesTo:["row"],labelKey:"utility.row_cols"}}function qe(e,t){var n=yo(e,t.colPrefix);return n!==null?n:b(e,De(t,"auto"))?"auto":b(e,De(t,"equal"))?"equal":null}function It(e,t){return yo(e,t.offsetPrefix)}function In(e,t){return wo(e,t,qe)}function Dt(e,t){return wo(e,t,It)}function wo(e,t,n){for(var r=y.indexOf(t);r>=0;r--){var o=n(e,y[r]);if(o!==null)return o}return null}function yo(e,t){var n=new RegExp("(?:^|\\s)"+t+"(\\d+)(?:\\s|$)").exec(e.getAttribute("class")||"");return n?parseInt(n[1],10):null}function Co(e,t,n){var r=(e.getAttribute("class")||"").split(/\s+/).filter(function(o){return o!==""&&!new RegExp("^"+t+"\\d+$").test(o)});n!==null&&r.push(t+n),e.setAttribute("class",r.join(" "))}function Ft(e,t,n){Co(e,t.colPrefix,null),Qn.forEach(function(r){_(e,De(t,r))}),n!=null&&C(e,De(t,n))}function Dn(e,t,n){Co(e,t.offsetPrefix,n||null)}function ka(e){return y.filter(function(t){return qe(e,t)!==null})}function Fn(e,t,n){var r=0;return q(e,".column").forEach(function(o){if(!(n&&o===n)){var i=Nt(o,t),l=i?Ca(i):In(o,t);r+=(Y(l)?l:0)+(Dt(o,t)||0)}}),H-r}function Ht(e){var t=e.size===null||e.size===void 0?null:e.size,n=e.offset===null||e.offset===void 0?0:e.offset;return n=Math.min(Math.max(n,0),Ko),t===null||!Y(t)?{size:t,offset:n,refused:!1}:(t=Math.min(Math.max(t,1),H),t+n<=H?{size:t,offset:n,refused:!1}:e.leading==="offset"?{size:H-n,offset:n,refused:!1}:{size:null,offset:n,refused:!0})}function Xe(e){de(e,".column").forEach(function(t){Se(t,{width:"",height:"",left:"",top:""}),mt(t)})}function Eo(e){return"ge-"+e+"-"+rr}function Hn(){return[".row",".ge-text-block",".ge-content","[data-ge-container]"].concat(Wt("blocks")).join(", ")}function Wt(e){return Object.keys(M).map(function(t){return M[t][e]||null}).filter(function(t){return t!==null})}function dt(e,t){var n=!0;return Object.keys(M).forEach(function(r){var o=M[r];n&&o.accepts&&o.accepts(e,t)===!1&&(n=!1)}),n}function Aa(){return s.drag_handle==="drawer"?".ge-tools-drawer > a:not(.ge-text-info):not(.ge-element-info), .ge-details, input, textarea, button, select, option":"input, textarea, button, select, option"}function Kt(e,t){var n=Go();if(e=Array.isArray(e)?e:e?[e]:[],!(!e.length||!n)){var r=s.drag_handle==="drawer",o=Aa(),i=0;e.forEach(function(l){var d=t.group?{name:Eo(t.group)}:{name:Eo(t.draggable+"-"+ ++i),pull:!1,put:!1};t.group&&t.accepts&&(d.put=function(f,m,h){return m.options.group.name===d.name&&t.accepts(f.el,h)}),Et.push(n.create(l,Object.assign({group:d,draggable:t.draggable,handle:r?".ge-tools-drawer":".ge-tools-drawer .ge-move",filter:function(f,m){return W(f.target,o,l)?!0:!m||m.parentNode!==l},preventOnFilter:!1,forceFallback:!0,fallbackOnBody:!1,ghostClass:"ge-drag-placeholder",chosenClass:"ge-drag-chosen",dragClass:"ge-drag-helper",fallbackClass:"ge-drag-helper",animation:s.drag.animation,delay:s.drag.delay||s.drag.touch_delay,delayOnTouchOnly:!s.drag.delay,touchStartThreshold:s.drag.threshold,scroll:s.drag.scroll,onStart:Oa,onEnd:La},t.options||{})))})}}function Ta(){if(!Go()){G("sortable_missing",g("error.sortable_missing"));return}Kt(x(c,".row"),{draggable:".column",group:"column"}),Kt([c].concat(x(c,".column")),{draggable:Hn(),group:"block",accepts:dt});var e=Wt("regions");e.length&&Kt(x(c,e.join(", ")),{draggable:">"+Hn(),group:"block",accepts:dt}),ae("onSortable",Kt)}function Oa(e){var t=e.item,n=mn(t),r=xo(t),o={from:n,canceled:!1};tn.set(t,o),J(function(){var i=I("before-move",oe(r.kind,r.node,{parent:n.parent,source:"dragdrop",from:n}));i||(o.canceled=!0)})}function xo(e){var t=b(e,"ge-text-block")&&j(e,".ge-content")||e;return{kind:le(t),node:t}}function Sa(e,t){var n=q(t.parent).filter(function(r){return r!==e&&!b(r,"ge-tools-drawer")});!n.length||t.index>=n.length?t.parent.appendChild(e):t.parent.insertBefore(e,n[t.index])}function La(e){var t=e.item,n=tn.get(t),r=n?n.from:mn(t);if(tn.delete(t),n&&n.canceled){Sa(t,r);return}var o=mn(t);if(!(o.parent===r.parent&&o.index===r.index)){var i=W(t,"[data-ge-container]"),l=T[be(i)];l&&l.afterPaneMove&&l.afterPaneMove(i,t,r);var d=xo(t);J(function(){I("after-move",oe(d.kind,d.node,{parent:o.parent,source:"dragdrop",from:r,to:o,container:i||void 0}))})}}function Ma(){s.resize.enabled&&x(c,".column").forEach(function(e){if(!j(e,".ge-resize-handle")){var t=j(e,".ge-tools-drawer");t&&t.appendChild(v("span",{class:"ge-resize-size"})),Pa().forEach(function(n){var r=v("span",{class:"ge-resize-handle ge-resize-"+n,"data-ge-edge":n});r.addEventListener("pointerdown",za),e.appendChild(r)})}})}function Pa(){return String(s.resize.handles).split(",").map(function(e){return e.trim()}).filter(function(e){return e==="e"||e==="w"})}function za(e){var t=e.currentTarget,n=t.parentElement,r=t.getAttribute("data-ge-edge")==="w",o=e.pageX,i=pt(n);if(e.preventDefault(),!Ra(n))return;C(n,"ge-resizing"),e.pointerId!==void 0&&t.setPointerCapture&&t.setPointerCapture(e.pointerId);function l(m){var h=m.pageX-o;return Math.max(1,i+(r?-h:h))}function d(m){n.style.width=l(m)+"px",Na(n,l(m))}function f(m){t.removeEventListener("pointermove",d),Jn(t,"pointerup pointercancel",f),_(n,"ge-resizing"),Ia(n,l(m))}t.addEventListener("pointermove",d),fe(t,"pointerup pointercancel",f)}function ja(){_o(c)}function _o(e){x(e,".ge-resize-handle").forEach(function(t){t.remove()}),x(e,".ge-resize-size").forEach(function(t){t.remove()}),Xe(e)}function ko(e,t){var n=Math.round(t/Yr(e.parentElement)*H),r=Ao(e),o=r?ot(r):null,i=kt.get(e),l=i?i.units:it(e),d=r&&Y(o)?l+o-lt(s.valid_col_sizes):H-at(e);return Math.min(Math.max(n,lt(s.valid_col_sizes)),Math.max(d,lt(s.valid_col_sizes)),Sn(s.valid_col_sizes))}function Ao(e){return s.resize.balance!=="next"?null:Ro(e,".column")[0]||null}function Wn(e,t){var n=j(e,".ge-tools-drawer"),r=n?j(n,".ge-resize-size"):null;r&&(r.textContent=t)}function To(e){return(R===Q?y[0].colPrefix:ye().colPrefix)+e}function Ra(e){var t=ot(e),n=J(function(){return I("before-resize",oe("column",e,{source:"dragdrop",from:t,to:null}))});if(!n)return!1;var r={from:t,units:it(e)};return kt.set(e,r),Wn(e,To(r.units)),!0}function Na(e,t){Wn(e,To(ko(e,t)))}function Ia(e,t){var n=kt.get(e),r=ko(e,t);if(kt.delete(e),Wn(e,""),Xe(e),!!n&&r!==n.units){var o=un(e,r);o&&J(function(){dn(e,o),Da(e,r-n.units),he(e),I("after-resize",oe("column",e,cn({source:"dragdrop",from:n.from,to:o.size},o.cleared)))})}}function Da(e,t){var n=Ao(e);if(!(!n||!t)){var r=ot(n);if(Y(r)){var o=un(n,r-t);o&&(dn(n,o),he(n))}}}function Fa(){Et.forEach(function(e){e.destroy()}),Et=[]}function Ye(){return v("div",{class:"row"})}function Ut(e,t,n){var r=null;if(ol.forEach(function(d){r===null&&n&&n[d]!==void 0&&(r=d)}),r===null)return e;var o=me(n[r]);if(!o)return K(t+": "+r+" matches no element; the "+t+" is left detached"),e;var i=r==="appendTo"||r==="prependTo"?o:o.parentElement,l=function(){return ie(t,e,function(){r==="appendTo"?o.appendChild(e):r==="prependTo"?o.insertBefore(e,o.firstChild):r==="insertBefore"?o.parentNode.insertBefore(e,o):qt(e,o)},{parent:i,source:n.source||"api"})};return Ze>0?(an(l),e):l()}function Ha(e,t){var n=Ye();return e!==void 0&&!Array.isArray(e)&&!(e&&e.row_cols)&&(K("createRow: the layout is an array of column sizes, as in [8, 4], or { row_cols, columns }. Making an empty row instead."),e=[]),e&&!Array.isArray(e)&&(n=tt(e)),(Array.isArray(e)?e:[]).forEach(function(r){n.appendChild(ue(r))}),Ut(n,"row",t)}function Wa(e,t){t=t||{};var n=me(t.appendTo||t.prependTo||null);e===void 0&&n&&Ge(n,ye())?e=null:!Y(e)&&Qn.indexOf(e)===-1&&(K("createColumn: no column size given, using "+H),e=H);var r=ue(e,t.offset);return t.content!==void 0&&r.appendChild($a(t.content)),Ut(r,"column",t)}function Ka(e,t){t=t||{};var n=T[e];return n?Ut(n.create(t),e,t):(K('createContainer: no such container type "'+e+'"'),null)}function Kn(e,t,n){e=me(e),n=n||{};var r=T[be(e)];if(!r||be(e)!==t)return K("this is not a "+t+" container"),null;var o=r.addPane(e,n);return o?ie(r.paneKind,o,function(){},{parent:e,source:"api",container:e}):null}function Ua(e,t){e=me(e);var n=be(e);return!T[n]||!T[n].addPane?(K("addPane: this is not a container with panes"),null):Kn(e,n,t)}function Un(){var e={};return Object.keys(s).forEach(function(t){var n=s[t];e[t]=Array.isArray(n)?n.slice():n}),Object.freeze(e)}function ue(e,t){var n=v("div",{class:"column"}),r=Uo(R)[0],o=Ht({size:e,offset:t||0,leading:"offset"});return Ft(n,r,o.size===null?e:o.size),Dn(n,r,o.offset),n}function Bn(e,t){if(!(!s.custom_filter||!s.custom_filter.length)){var n=typeof s.custom_filter=="string"||typeof s.custom_filter=="function"?[s.custom_filter]:s.custom_filter;Array.prototype.forEach.call(n,function(r){typeof r=="string"&&(r=window[r]),r(t||c,e)})}}function Ba(){var e=[".row","[data-ge-container]"];return Object.keys(M).forEach(function(t){var n=M[t],r=typeof n.cuts=="function"?n.cuts():n.cuts;r&&e.push(r)}),e.join(", ")}function Va(e){x(c,".column > .ge-content, .column > .ge-text-block > .ge-content").forEach(function(t){if(!(b(t,"ge-rte-active")||!q(t,e).length)){var n=t.getAttribute("data-ge-content-type"),r=b(t.parentElement,"ge-text-block")?t.parentElement:t,o=[],i=[];for(Array.prototype.slice.call(t.childNodes).forEach(function(f){f.nodeType===1&&f.matches(e)?(o.push({text:i},{block:f}),i=[]):i.push(f)}),o.push({text:i});t.firstChild;)t.removeChild(t.firstChild);var l=!1,d=r;o.forEach(function(f){var m;if(f.block)m=f.block;else if(Ga(f.text))l?(m=Vn(n),f.text.forEach(function(h){m.appendChild(h)})):(f.text.forEach(function(h){t.appendChild(h)}),m=r,l=!0);else return;m!==d&&qt(m,d),d=m}),l||r.remove()}})}function Ga(e){return e.some(function(t){return t.nodeType===1||t.nodeType===3&&/\S/.test(t.nodeValue)})}function qa(e){x(c,".column").forEach(function(t){var n=[];q(t).forEach(function(r){ne(r,".ge-tools-drawer, .ge-resize-handle")||(ne(r,".ge-content, .ge-text-block")||r.matches(e)?n=Oo(n):n.push(r))}),Oo(n)})}function Oo(e){if(e.length){var t=qt(Vn(),e[e.length-1]);e.forEach(function(n){t.appendChild(n)})}return[]}function Vn(e){var t=v("div",{class:"ge-content"});return e&&(C(t,"ge-content-type-"+e),t.setAttribute("data-ge-content-type",e)),t}function Xa(){x(c,".column > .ge-content").forEach(function(e){Do(e,v("div",{class:"ge-text-block"}))}),x(c,".ge-text-block").forEach(function(e){if(!j(e,".ge-tools-drawer")){var t=j(e,".ge-content"),n=t?t.getAttribute("data-ge-content-type"):null;n?Ei(n)||Ja(e,n):Ya(e)}})}function So(e){x(e,".ge-text-block").forEach(function(t){Xt(t)})}function Ya(e){var t=j(e,".ge-content"),n=Be(e,"ge-tools-drawer ge-text-drawer ge-plain-drawer");C(e,"ge-plain-block"),Ie(n),Object.keys(M).forEach(function(r){M[r].plainTools&&M[r].plainTools(n,t)}),F(n,g("tool.delete_plain"),"ge-delete-plain","bi bi-trash",function(){je("plain",t,g("confirm.delete_plain"),function(r){ht(e,function(){e.remove(),r()})})})}function Ja(e,t){var n=j(e,".ge-content"),r=Be(e,"ge-tools-drawer ge-text-drawer");Ie(r),F(r,g("text.no_editor",{type:t}),"ge-text-info ge-text-missing","bi bi-exclamation-triangle"),F(r,g("tool.delete_text"),"ge-delete-text","bi bi-trash",function(){je("text",n,g("confirm.delete_text"),function(o){ht(e,function(){e.remove(),o()})})})}function $a(e){var t=xr(),n=Vn(t.length?t[0].type:null);return e&&e.nodeType?n.appendChild(e):ft(n,e),n}function Lo(e){R=e,$n.forEach(function(t){P(c,"ge-layout-"+t,t===e)}),S(Fe,"button").textContent=g(bt(e))}function Gn(e){return $n.indexOf(e)===-1?null:e}function Mo(e){var t=Gn(e);if(t===null){K("changeView("+JSON.stringify(e)+"): no such layout mode");return}var n=R;Lo(t),t!==n&&(Zr().forEach(function(r){x(r,".ge-utilities").forEach(function(o){Tn(o)})}),Hr(null),rt(c),ae("onViewChange",t),I("view-change",{canvas:c,breakpoint:t,from:n,to:t}))}function qn(){return R}function Po(e,t,n){return function(){return Ne[e]?Ne[e].apply(null,arguments):(G("plugin:"+t,e+" needs the "+t+" plugin: include dist/plugins/grideditor."+n+".js after the editor"),null)}}function Qa(e){if(!s.active_target){G("active_target","setActiveTarget needs the active_target setting: without it, it does nothing");return}if(e==null){te(null);return}var t=me(e);if(!kr(t)){var n=typeof e=="string"?e:t?"<"+t.tagName.toLowerCase()+">":String(e);K("setActiveTarget: "+n+" is not a node of the canvas with settings");return}te(t)}var Xn={getHtml:nt,getPlainHtml:Si,init:function(){an(ve)},reset:function(){an(_r)},deinit:Re,destroy:Mi,changeView:Mo,getView:qn,createRow:Ha,createColumn:Wa,createText:function(e,t){return Ne.createText?Ne.createText(e,t):(G("plugin:text","createText needs a text editor plugin: include dist/plugins/grideditor.tinymce.js, or another editor's, after the editor"),null)},createElement:Po("createElement","elements","elements"),createSection:Po("createSection","sections","sections"),createContainer:Ka,addTab:function(e,t){return Kn(e,"tabs",t)},addAccordionItem:function(e,t){return Kn(e,"accordion",t)},addPane:Ua,setLocale:Xo,getUtility:Ir,setUtility:An,getActiveTarget:function(){return s.active_target?L:null},setActiveTarget:Qa};Object.keys(Xn).forEach(function(e){var t=!!(Wo[e]&&Wo[e].value);a[e]=function(){if(xt)return G("destroyed:"+e,g("warning.destroyed",{method:e})),e==="getHtml"?c.innerHTML:e==="getPlainHtml"?er(c.innerHTML):t?null:a;var n=Xn[e].apply(a,arguments);return t?n:a}}),a.canvas=c,a.settings=Un(),Jt.set(c,a),Pi(),a.settings=Un(),Object.keys(Ne).forEach(function(e){Object.prototype.hasOwnProperty.call(Xn,e)||e in a||(a[e]=function(){return xt?(G("destroyed:"+e,g("warning.destroyed",{method:e})),null):Ne[e].apply(null,arguments)})}),ei(),ve(),O._created.forEach(function(e){e(a)})}O._created=[];O.containers={};O.features={};O.utilities={};O.texts={};O.t=tr;O._plainHtml=er;O.Sortable=null;O.bootstrap=null;O.version="9.0.0-beta.7";O.locales={en:{"tool.move":"Move","tool.settings":"Settings","tool.add_row":"Add row","tool.delete_text":"Remove text","tool.delete_plain":"Remove content","tool.convert_type":"Edit as {editor} text","text.no_editor":'No text editor "{type}" is loaded: this text can be moved and deleted, not edited',"tool.add_column":`Add column
10
10
  (hold to choose the width)`,"tool.column_size":"{size} of 12","tool.column_equal":"Equal: shares what the row has left","tool.column_auto":"Auto: as wide as its content","tool.delete_row":"Remove row","tool.delete_column":"Remove col","tool.delete_container":"Remove container","tool.delete_pane":"Remove pane","tool.rename":"Double click to rename","tool.column_narrower":`Make column narrower
11
11
  (hold shift for min)`,"tool.column_wider":`Make column wider
12
12
  (hold shift for max)`,"tool.indent_decrease":`Decrease indent
13
13
  (hold shift for none)`,"tool.indent_increase":`Increase indent
14
- (hold shift for max)`,"tool.edit_source":"Edit Source Code","tool.preview":"Preview","tool.more":"More","group.rows":"Rows","group.content":"Content","group.elements":"Elements","group.select":"Add","panel.title":"{kind} settings","panel.close":"Close","panel.done":"Done","panel.sidebar_title":"Settings","panel.sidebar_empty":"Click an element to see its settings","panel.collapse":"Hide settings","panel.expand":"Show settings","panel.id":"Id","panel.classes":"Classes","panel.section_general":"Id and classes","panel.kind_row":"Row","panel.kind_column":"Column","panel.kind_element":"Element","panel.kind_section":"Section","panel.kind_tab":"Tab","panel.kind_accordion_item":"Accordion item","tool.id_placeholder":"id","tool.id_title":"Set a unique identifier","tool.classes_placeholder":"classes","tool.classes_title":"Css classes, separated by spaces","tool.toggle_class":'Toggle "{label}" styling',"row.add":"Add row {layout}","row.add_row_cols":"Add a row of {columns} columns, {counts} per row","confirm.title":"Confirm","confirm.ok":"Delete","confirm.cancel":"Cancel","confirm.delete_row":"Delete row?","confirm.delete_column":"Delete column?","confirm.delete_text":"Delete this text?","confirm.delete_plain":"Delete this content?","confirm.delete_container":"Delete this container and everything in it?","view.all":"All sizes","view.xs":"Phone","view.sm":"Tablet","view.md":"Small desktop","view.lg":"Desktop","view.xl":"Large desktop","view.xxl":"Widescreen","utility.section":"Responsive: {view}","utility.col_width":"Width","utility.col_equal":"Equal","utility.col_auto":"Auto","utility.col_from_row":"From the row: {count}","utility.row_cols":"Columns per row","badge.row_cols":"{count} per row","badge.row_cols_auto":"As wide as their content","utility.default":"Default","utility.inherit":"Inherit: {value} (from {breakpoint})","utility.varies":"Changes at {breakpoints}; choosing here replaces that","error.sortable_missing":"SortableJS not available! Make sure you loaded the Sortable js file; dragging is off without it.","warning.already_editing":"This element already has an editor: that one is handed back, with the options it was made with.","warning.destroyed":"{method}() was called on an editor that has been destroyed, and does nothing.","warning.duplicate_build":"grideditor.js was loaded twice: the first GridEditor is kept.","warning.adapter_no_jquery":"grideditor.jquery.js needs jQuery 4, and there is no jQuery on the page: the jQuery API is not there.","error.tinymce_missing":"tinyMCE not available! Make sure you loaded the tinyMCE js file.","error.ckeditor_missing":"CKEditor 5 not available! Make sure you loaded its ckeditor5.umd.js file.","error.summernote_missing":"Summernote not available! Make sure you loaded jQuery and the Summernote js file."}};window.GridEditor?window.console&&window.console.warn&&window.console.warn("grid-editor: "+S.t({locale:"en"},"warning.duplicate_build")):window.GridEditor=S;})();
14
+ (hold shift for max)`,"tool.edit_source":"Edit Source Code","tool.preview":"Preview","tool.more":"More","group.rows":"Rows","group.content":"Content","group.elements":"Elements","group.select":"Add","panel.title":"{kind} settings","panel.close":"Close","panel.done":"Done","panel.sidebar_title":"Settings","panel.sidebar_empty":"Click an element to see its settings","panel.collapse":"Hide settings","panel.expand":"Show settings","panel.id":"Id","panel.classes":"Classes","panel.section_general":"Id and classes","panel.kind_row":"Row","panel.kind_column":"Column","panel.kind_element":"Element","panel.kind_section":"Section","panel.kind_tab":"Tab","panel.kind_accordion_item":"Accordion item","tool.id_placeholder":"id","tool.id_title":"Set a unique identifier","tool.classes_placeholder":"classes","tool.classes_title":"Css classes, separated by spaces","tool.toggle_class":'Toggle "{label}" styling',"row.add":"Add row {layout}","row.add_row_cols":"Add a row of {columns} columns, {counts} per row","confirm.title":"Confirm","confirm.ok":"Delete","confirm.cancel":"Cancel","confirm.delete_row":"Delete row?","confirm.delete_column":"Delete column?","confirm.delete_text":"Delete this text?","confirm.delete_plain":"Delete this content?","confirm.delete_container":"Delete this container and everything in it?","view.all":"All sizes","view.xs":"Phone","view.sm":"Tablet","view.md":"Small desktop","view.lg":"Desktop","view.xl":"Large desktop","view.xxl":"Widescreen","utility.section":"Responsive: {view}","utility.col_width":"Width","utility.col_equal":"Equal","utility.col_auto":"Auto","utility.col_from_row":"From the row: {count}","utility.row_cols":"Columns per row","badge.row_cols":"{count} per row","badge.row_cols_auto":"As wide as their content","utility.default":"Default","utility.inherit":"Inherit: {value} (from {breakpoint})","utility.varies":"Changes at {breakpoints}; choosing here replaces that","error.sortable_missing":"SortableJS not available! Make sure you loaded the Sortable js file; dragging is off without it.","warning.already_editing":"This element already has an editor: that one is handed back, with the options it was made with.","warning.destroyed":"{method}() was called on an editor that has been destroyed, and does nothing.","warning.duplicate_build":"grideditor.js was loaded twice: the first GridEditor is kept.","warning.adapter_no_jquery":"grideditor.jquery.js needs jQuery 4, and there is no jQuery on the page: the jQuery API is not there.","error.tinymce_missing":"tinyMCE not available! Make sure you loaded the tinyMCE js file.","error.ckeditor_missing":"CKEditor 5 not available! Make sure you loaded its ckeditor5.umd.js file.","error.summernote_missing":"Summernote not available! Make sure you loaded jQuery and the Summernote js file."}};window.GridEditor?window.console&&window.console.warn&&window.console.warn("grid-editor: "+O.t({locale:"en"},"warning.duplicate_build")):window.GridEditor=O;})();