@themarioga/grid-editor 8.4.0 → 8.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +105 -5
  3. package/dist/grideditor.bundle.min.js +3 -3
  4. package/dist/grideditor.css +15 -4
  5. package/dist/grideditor.d.ts +76 -4
  6. package/dist/grideditor.esm.js +212 -38
  7. package/dist/grideditor.js +212 -38
  8. package/dist/grideditor.min.css +1 -1
  9. package/dist/grideditor.min.css.map +1 -1
  10. package/dist/grideditor.min.js +2 -2
  11. package/dist/grideditor.min.js.map +3 -3
  12. package/dist/locales/grideditor.es.esm.js +5 -0
  13. package/dist/locales/grideditor.es.js +5 -0
  14. package/dist/locales/grideditor.es.min.js +1 -1
  15. package/dist/locales/grideditor.es.min.js.map +2 -2
  16. package/dist/plugins/grideditor.accordion.esm.js +7 -0
  17. package/dist/plugins/grideditor.accordion.js +7 -0
  18. package/dist/plugins/grideditor.accordion.min.js +1 -1
  19. package/dist/plugins/grideditor.accordion.min.js.map +3 -3
  20. package/dist/plugins/grideditor.autosave.esm.js +309 -0
  21. package/dist/plugins/grideditor.autosave.js +316 -0
  22. package/dist/plugins/grideditor.autosave.min.js +1 -0
  23. package/dist/plugins/grideditor.autosave.min.js.map +7 -0
  24. package/dist/plugins/grideditor.card.esm.js +10 -0
  25. package/dist/plugins/grideditor.card.js +10 -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.ckeditor.esm.js +30 -1
  29. package/dist/plugins/grideditor.ckeditor.js +30 -1
  30. package/dist/plugins/grideditor.ckeditor.min.js +1 -1
  31. package/dist/plugins/grideditor.ckeditor.min.js.map +3 -3
  32. package/dist/plugins/grideditor.clipboard.esm.js +3 -0
  33. package/dist/plugins/grideditor.clipboard.js +3 -0
  34. package/dist/plugins/grideditor.clipboard.min.js +1 -1
  35. package/dist/plugins/grideditor.clipboard.min.js.map +2 -2
  36. package/dist/plugins/grideditor.codemirror-inline.esm.js +11 -0
  37. package/dist/plugins/grideditor.codemirror-inline.js +11 -0
  38. package/dist/plugins/grideditor.codemirror-inline.min.js +1 -1
  39. package/dist/plugins/grideditor.codemirror-inline.min.js.map +3 -3
  40. package/dist/plugins/grideditor.elements.esm.js +78 -4
  41. package/dist/plugins/grideditor.elements.js +78 -4
  42. package/dist/plugins/grideditor.elements.min.js +1 -1
  43. package/dist/plugins/grideditor.elements.min.js.map +3 -3
  44. package/dist/plugins/grideditor.gutters.esm.js +5 -0
  45. package/dist/plugins/grideditor.gutters.js +5 -0
  46. package/dist/plugins/grideditor.gutters.min.js +1 -1
  47. package/dist/plugins/grideditor.gutters.min.js.map +3 -3
  48. package/dist/plugins/grideditor.inline-style.esm.js +18 -10
  49. package/dist/plugins/grideditor.inline-style.js +18 -10
  50. package/dist/plugins/grideditor.inline-style.min.js +3 -3
  51. package/dist/plugins/grideditor.inline-style.min.js.map +3 -3
  52. package/dist/plugins/grideditor.order.esm.js +5 -0
  53. package/dist/plugins/grideditor.order.js +5 -0
  54. package/dist/plugins/grideditor.order.min.js +1 -1
  55. package/dist/plugins/grideditor.order.min.js.map +3 -3
  56. package/dist/plugins/grideditor.popup.esm.js +17 -6
  57. package/dist/plugins/grideditor.popup.js +17 -6
  58. package/dist/plugins/grideditor.popup.min.js +1 -1
  59. package/dist/plugins/grideditor.popup.min.js.map +3 -3
  60. package/dist/plugins/grideditor.sections.esm.js +6 -3
  61. package/dist/plugins/grideditor.sections.js +6 -3
  62. package/dist/plugins/grideditor.sections.min.js +1 -1
  63. package/dist/plugins/grideditor.sections.min.js.map +3 -3
  64. package/dist/plugins/grideditor.summernote.esm.js +40 -1
  65. package/dist/plugins/grideditor.summernote.js +40 -1
  66. package/dist/plugins/grideditor.summernote.min.js +1 -1
  67. package/dist/plugins/grideditor.summernote.min.js.map +3 -3
  68. package/dist/plugins/grideditor.tabs.esm.js +7 -0
  69. package/dist/plugins/grideditor.tabs.js +7 -0
  70. package/dist/plugins/grideditor.tabs.min.js +1 -1
  71. package/dist/plugins/grideditor.tabs.min.js.map +3 -3
  72. package/dist/plugins/grideditor.tinymce.esm.js +32 -1
  73. package/dist/plugins/grideditor.tinymce.js +32 -1
  74. package/dist/plugins/grideditor.tinymce.min.js +1 -1
  75. package/dist/plugins/grideditor.tinymce.min.js.map +3 -3
  76. package/docs/events.md +8 -0
  77. package/docs/locale-keys.md +16 -1
  78. package/docs/plugins.md +60 -7
  79. package/example/autosave.html +39 -22
  80. package/example/index.html +1 -1
  81. package/example/plugins.html +10 -0
  82. package/package.json +1 -2
  83. package/src/js/grideditor.js +248 -28
  84. package/src/js/inline-style/display.js +4 -3
  85. package/src/js/inline-style/drawerflow.js +10 -5
  86. package/src/js/locales/grideditor.es.js +5 -0
  87. package/src/js/plugins/grideditor.accordion.js +6 -0
  88. package/src/js/plugins/grideditor.autosave.js +349 -0
  89. package/src/js/plugins/grideditor.card.js +6 -0
  90. package/src/js/plugins/grideditor.ckeditor.js +6 -0
  91. package/src/js/plugins/grideditor.clipboard.js +3 -0
  92. package/src/js/plugins/grideditor.codemirror-inline.js +7 -0
  93. package/src/js/plugins/grideditor.elements.js +98 -4
  94. package/src/js/plugins/grideditor.gutters.js +4 -0
  95. package/src/js/plugins/grideditor.inline-style.js +2 -0
  96. package/src/js/plugins/grideditor.order.js +4 -0
  97. package/src/js/plugins/grideditor.popup.js +15 -6
  98. package/src/js/plugins/grideditor.sections.js +4 -3
  99. package/src/js/plugins/grideditor.summernote.js +14 -0
  100. package/src/js/plugins/grideditor.tabs.js +6 -0
  101. package/src/js/plugins/grideditor.tinymce.js +8 -0
  102. package/src/js/text/grideditor.text.js +27 -1
  103. package/src/less/grideditor.less +16 -8
  104. package/types/grideditor.d.ts +76 -4
  105. package/AUTO_SAVE.md +0 -30
@@ -500,8 +500,8 @@
500
500
  });
501
501
  });
502
502
  }
503
- function unmark() {
504
- all(ge.canvas, ".ge-hidden-in-view, [data-ge-hidden-in], [" + SHOWN_ATTR + "]").forEach(function(node) {
503
+ function unmark(root) {
504
+ all(root || ge.canvas, ".ge-hidden-in-view, [data-ge-hidden-in], [" + SHOWN_ATTR + "]").forEach(function(node) {
505
505
  removeClass(node, "ge-hidden-in-view");
506
506
  node.removeAttribute("data-ge-hidden-in");
507
507
  node.removeAttribute(SHOWN_ATTR);
@@ -543,7 +543,10 @@
543
543
  });
544
544
  },
545
545
  onRefresh: mark2,
546
- onDeinit: unmark
546
+ onDeinit: function() {
547
+ unmark();
548
+ },
549
+ cleanMarkup: unmark
547
550
  };
548
551
  }
549
552
 
@@ -815,16 +818,19 @@
815
818
  }
816
819
  });
817
820
  }
821
+ function unmarkNodes(root) {
822
+ all(root, "." + OUT_CLASS).forEach(function(node) {
823
+ removeClass(node, OUT_CLASS);
824
+ node.removeAttribute(OUT_ATTR);
825
+ dropEmptyClass(node);
826
+ });
827
+ }
818
828
  function unmark() {
819
829
  if (observer) {
820
830
  observer.disconnect();
821
831
  }
822
832
  observer = null;
823
- all(ge.canvas, "." + OUT_CLASS).forEach(function(node) {
824
- removeClass(node, OUT_CLASS);
825
- node.removeAttribute(OUT_ATTR);
826
- dropEmptyClass(node);
827
- });
833
+ unmarkNodes(ge.canvas);
828
834
  if (sheet) {
829
835
  sheet.remove();
830
836
  }
@@ -834,7 +840,8 @@
834
840
  return {
835
841
  families: [],
836
842
  onRefresh: mark2,
837
- onDeinit: unmark
843
+ onDeinit: unmark,
844
+ cleanMarkup: unmarkNodes
838
845
  };
839
846
  }
840
847
 
@@ -1926,7 +1933,8 @@
1926
1933
  onDeinit: function() {
1927
1934
  each2("onDeinit")();
1928
1935
  accordions = [];
1929
- }
1936
+ },
1937
+ cleanMarkup: each2("cleanMarkup")
1930
1938
  };
1931
1939
  };
1932
1940
  })();
@@ -1,4 +1,4 @@
1
- (()=>{var T=window.GridEditor;if(!T||typeof T.get!="function")throw new Error("grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, its locales and grideditor.jquery.js");function P(e,t){return e?Array.prototype.slice.call(e.querySelectorAll(t)):[]}function N(e,t){return e?e.querySelector(t):null}function I(e,t){if(!e)return[];var n=P(e,t);return e.nodeType===1&&e.matches(t)&&n.unshift(e),n}function J(e,t){return e?Array.prototype.filter.call(e.children,function(n){return!t||n.matches(t)}):[]}function j(e,t){return J(e,t)[0]||null}function H(e,t){return!!e&&e.nodeType===1&&e.matches(t)}function g(e,t,n){var i=document.createElement(e);return Object.keys(t||{}).forEach(function(l){var o=t[l];o!=null&&o!==!1&&i.setAttribute(l,o)}),n!=null&&(i.textContent=n),i}function Z(e,t){return oe(t).forEach(function(n){e.classList.add(n)}),e}function D(e,t){return oe(t).forEach(function(n){e.classList.remove(n)}),e}function $(e,t,n){return oe(t).forEach(function(i){n===void 0?e.classList.toggle(i):e.classList.toggle(i,!!n)}),e}function R(e,t){return!!e&&e.nodeType===1&&e.classList.contains(t)}function oe(e){return String(e||"").split(/\s+/).filter(Boolean)}function W(e){return e.getAttribute("class")||e.removeAttribute("class"),e}function ae(e,t){return Object.keys(t).forEach(function(n){var i=t[n];typeof i=="number"&&!We[n]&&(i=i+"px"),e.style.setProperty(n,i==null?"":String(i))}),e}var We={opacity:!0,"z-index":!0,"flex-grow":!0,"flex-shrink":!0,order:!0},V={};function qe(e){var t=e.nodeName;if(!V[t]){var n=document.body.appendChild(document.createElement(t));V[t]=getComputedStyle(n).display,n.remove(),V[t]==="none"&&(V[t]="block")}return V[t]}function Xe(e){return e.style.removeProperty("display"),getComputedStyle(e).display==="none"&&(e.style.display=qe(e)),e}function Ye(e){return e.style.display="none",e}function F(e,t){return t===void 0&&(t=!Je(e)),t?Xe(e):Ye(e)}function Je(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}Object.assign(T.locales.en,{"utility.padding":"Padding","utility.margin":"Margin","utility.side_all":"All sides","utility.side_x":"Left and right","utility.side_y":"Top and bottom","utility.side_t":"Top","utility.side_b":"Bottom","utility.side_s":"Start","utility.side_e":"End","utility.spacing_gutter":"A column's side padding is its gutter: changing it changes the gutter"});var q=["0","1","2","3","4","5"],Ze=["0",".25rem",".5rem","1rem","1.5rem","3rem"],Q=["","x","y","t","e","b","s"],Qe={"":["top","right","bottom","left"],x:["left","right"],y:["top","bottom"],t:["top"],e:["right"],b:["bottom"],s:["left"]},he=["","sm","md","lg","xl","xxl"],se={p:"padding",m:"margin"};function ve(e){return new RegExp("^"+e+"[xytbse]?-(?:(?:sm|md|lg|xl|xxl)-)?(?:[0-5]|auto)$")}function be(e,t){var n=Object.assign({values:q,scale:Ze},t),i={p:ve("p"),m:ve("m")};function l(r,a){return a==="row"||a==="column"||a==="element"||H(r,"[data-ge-container]")}function o(r){return(r.getAttribute("class")||"").split(/\s+/)}function u(r,a){return o(r).some(function(p){return i[a].test(p)})}function c(r,a,p){for(var w=o(r),_=a.charAt(0)==="m"?q.concat(["auto"]):q,v=p;v>=0;v--)for(var E=0;E<_.length;E++){var O=a+(he[v]?"-"+he[v]:"")+"-"+_[E];if(w.indexOf(O)!==-1)return{tier:v,value:_[E]}}return null}function d(r,a){var p=r.getAttribute("class"),w,_={};return r.setAttribute("class",o(r).filter(function(v){return!i[a].test(v)}).join(" ")),w=getComputedStyle(r),["top","right","bottom","left"].forEach(function(v){_[v]=w.getPropertyValue(se[a]+"-"+v)}),p===null?r.removeAttribute("class"):r.setAttribute("class",p),_}function m(r,a,p){var w=e.breakpoints.indexOf(p),_={},v={},E=null;return Q.forEach(function(O,K){var A=c(r,a+O,w);A&&Qe[O].forEach(function(G){var Y=_[G];(!Y||A.tier>Y.tier||A.tier===Y.tier&&K>Y.order)&&(_[G]={tier:A.tier,order:K,value:A.value})})}),["top","right","bottom","left"].forEach(function(O){var K=_[O];K?v[se[a]+"-"+O]=K.value==="auto"?"auto":n.scale[K.value]:(E=E||d(r,a),v[se[a]+"-"+O]=E[O])}),v}function y(r,a){var p=o(r).filter(function(_){return i[a].test(_)}),w=Q.filter(function(_){return p.some(function(v){return v.indexOf(a+_+"-")===0})});return w.length?w[0]:""}function f(r){switch(r){case"x":return e.t("utility.side_x");case"y":return e.t("utility.side_y");case"t":return e.t("utility.side_t");case"b":return e.t("utility.side_b");case"s":return e.t("utility.side_s");case"e":return e.t("utility.side_e");default:return e.t("utility.side_all")}}function b(r,a,p){var w=g("div",{class:"ge-spacing-group","data-ge-spacing":a}),_=g("select",{class:"ge-spacing-side form-select form-select-sm"});w.appendChild(g("span",{class:"ge-utility-label"},p)),Q.forEach(function(E){_.appendChild(g("option",{value:E},f(E)))});var v=e.utilityField(r,a+y(r,a));return _.value=v.getAttribute("data-ge-family").slice(1),_.addEventListener("change",function(){var E=e.utilityField(r,a+this.value);v.replaceWith(E),v=E}),w.appendChild(_),w.appendChild(v),w}var S=".row, .column, .ge-element, [data-ge-container]";function k(r){I(r,S).forEach(function(a){var p=j(a,".ge-tools-drawer");if(!(!p||!l(a,e.kindOf(a)))){if(u(a,"p")){var w=getComputedStyle(a);ae(p,{"margin-top":"-"+w.paddingTop,"margin-left":"-"+w.paddingLeft,"margin-right":"-"+w.paddingRight,width:"calc(100% + "+w.paddingLeft+" + "+w.paddingRight+")"})}else ae(p,{"margin-top":"","margin-left":"","margin-right":"",width:""});if(R(a,"column")){var _=o(a).some(function(v){return/^p[xse]?-/.test(v)&&i.p.test(v)});P(p,".ge-spacing-gutter").forEach(function(v){F(v,_)})}}})}function s(r,a){var p=r==="m"?q.concat(["auto"]):q,w=n.values.concat(r==="m"?["auto"]:[]);return Q.map(function(_){return{name:r+_,prefix:r+_,values:p,appliesTo:["row","column","text","element","container"],labelKey:a,panel:!1,choices:function(){return p.filter(function(v){return w.indexOf(v)!==-1})}}})}return{families:s("p","utility.padding").concat(s("m","utility.margin")),panel:function(r,a){if(!l(r,a))return null;var p=g("div",{class:"ge-spacing"});return p.appendChild(b(r,"p",e.t("utility.padding"))),p.appendChild(b(r,"m",e.t("utility.margin"))),a==="column"&&p.appendChild(g("small",{class:"ge-spacing-gutter"},e.t("utility.spacing_gutter"))),p},preview:function(r,a,p){if(!l(r,a))return{};var w={};return["p","m"].forEach(function(_){u(r,_)&&Object.assign(w,m(r,_,p))}),w},onRefresh:k}}Object.assign(T.locales.en,{"utility.text_align":"Text alignment","utility.text_start":"Start","utility.text_center":"Center","utility.text_end":"End"});var et={start:"left",center:"center",end:"right"};function _e(e){function t(n){return n==="start"?e.t("utility.text_start"):n==="center"?e.t("utility.text_center"):e.t("utility.text_end")}return{families:[{name:"text-align",prefix:"text",values:["start","center","end"],appliesTo:["row","column","text","element","container"],labelKey:"utility.text_align",label:t,preview:function(n,i){return{"text-align":n===null?e.bareStyle(i,"text-align","text-align"):et[n]}}}]}}Object.assign(T.locales.en,{"utility.display":"Display","utility.visibility_hidden":"Hidden","tool.hide_in_view":"Hide in this view","tool.show_in_view":"Show in this view","badge.hidden_in":"Hidden at {breakpoints}"});var te=["none","inline","inline-block","block","grid","inline-grid","flex","inline-flex"],tt=new RegExp("(?:^|\\s)d-(?:(?:sm|md|lg|xl|xxl)-)?(?:"+te.join("|")+")(?:\\s|$)"),nt=/^d-(?:(?:sm|md|lg|xl|xxl)-)?none$/,it=".row, .column, .ge-content, .ge-element, [data-ge-container]",ee="data-ge-display";function xe(e,t){var n=Object.assign({drawer:!0},t);function i(s){return s==="row"?["none","flex"]:s==="text"||s==="plain"?["none","block"]:te}function l(s){return s==="row"?"flex":"block"}function o(s,r){return r==="row"||r==="column"||r==="element"||r==="text"||r==="plain"||H(s,"[data-ge-container]")}function u(s,r){return e.getUtility(s,"display",r)==="none"}function c(s){return e.breakpoints.filter(function(r){return u(s,r)})}function d(s){return e.view()==="all"?c(s).length===e.breakpoints.length:u(s,e.view())}function m(s){var r=e.breakpoints.indexOf(e.view());return r>0&&u(s,e.breakpoints[r-1])}function y(s,r){for(var a=e.breakpoints.indexOf(r)-1;a>=0;a--){var p=e.getUtility(s,"display",e.breakpoints[a]);if(p===null)return null;if(p!=="none")return p}return null}function f(s,r){var a=!d(s),p;e.view()==="all"?p=a?"none":null:a?p=m(s)?null:"none":p=m(s)?y(s,e.view())||l(r):null,e.setUtility(s,"display",p,{source:"tool"})}function b(s){var r=s.getAttribute("class");s.setAttribute("class",r.split(/\s+/).filter(function(p){return!nt.test(p)}).join(" "));var a=getComputedStyle(s).display;return s.setAttribute("class",r),a!=="none"&&te.indexOf(a)!==-1?a:"block"}function S(s){I(s,it).forEach(function(r){var a=e.kindOf(r),p=o(r,a)&&tt.test(r.getAttribute("class")||""),w=p?c(r):[],_=p&&d(r),v=p&&e.view()==="all"&&w.length>0&&!_;r.removeAttribute(ee),p&&getComputedStyle(r).display==="none"&&r.setAttribute(ee,b(r)),$(r,"ge-hidden-in-view",_),v?r.setAttribute("data-ge-hidden-in",e.t("badge.hidden_in",{breakpoints:w.join(", ")})):r.removeAttribute("data-ge-hidden-in"),J(r,".ge-tools-drawer").forEach(function(E){J(E,".ge-visibility-tool").forEach(function(O){O.setAttribute("title",_?e.t("tool.show_in_view"):e.t("tool.hide_in_view")),P(O,"i").forEach(function(K){K.setAttribute("class",_?"bi bi-eye-slash":"bi bi-eye")})})})})}function k(){P(e.canvas,".ge-hidden-in-view, [data-ge-hidden-in], ["+ee+"]").forEach(function(s){D(s,"ge-hidden-in-view"),s.removeAttribute("data-ge-hidden-in"),s.removeAttribute(ee),W(s)})}return{families:[{name:"display",prefix:"d",values:te,appliesTo:["row","column","text","element","container"],labelKey:"utility.display",choices:function(s,r){return i(r)},label:function(s){return s==="none"?e.t("utility.visibility_hidden"):s},preview:function(s,r){return s==="none"&&(s=y(r,e.view())),{display:s===null?e.bareStyle(r,"display","display"):s}}}],drawerTools:function(s,r,a){!n.drawer||!o(r,a)||e.createTool(s,e.t("tool.hide_in_view"),"ge-visibility-tool","bi bi-eye",function(){f(r,a)})},onRefresh:S,onDeinit:k}}Object.assign(T.locales.en,{"utility.flex_direction":"Direction","utility.flex_wrap":"Wrap","utility.justify_content":"Justify columns","utility.align_items":"Align columns","utility.align_content":"Align lines","utility.gap":"Gap","utility.row_gap":"Row gap","utility.column_gap":"Column gap","utility.flex_fill":"Fill","utility.flex_grow":"Grow","utility.flex_shrink":"Shrink"});var rt={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",baseline:"baseline",stretch:"stretch"},lt=["0","1","2","3","4","5"],ot=["0",".25rem",".5rem","1rem","1.5rem","3rem"],ce=["row","column","element","container"],ne=["column","element","container"];function we(e,t){var n=t&&t.scale||ot;function i(c){var d=c.property||c.name;return Object.assign({prefix:c.name,panel:!1,preview:function(m,y){var f={};return f[d]=m===null?e.bareStyle(y,c.name,d):c.css(m),f}},c)}function l(c){return i(Object.assign({appliesTo:ce,preview:function(d){var m={};return m[c.name]=d===null?"normal":rt[d],m}},c))}function o(c){return i(Object.assign({values:lt,appliesTo:ne,css:function(d){return n[d]}},c))}function u(c){return c}return{families:[i({name:"flex-direction",prefix:"flex",labelKey:"utility.flex_direction",values:["row","row-reverse","column","column-reverse"],appliesTo:ce,css:u}),i({name:"flex-wrap",prefix:"flex",labelKey:"utility.flex_wrap",values:["wrap","nowrap","wrap-reverse"],appliesTo:ce,css:u}),l({name:"justify-content",labelKey:"utility.justify_content",values:["start","center","end","between","around","evenly"]}),l({name:"align-items",labelKey:"utility.align_items",values:["start","center","end","baseline","stretch"]}),l({name:"align-content",labelKey:"utility.align_content",values:["start","center","end","between","around","stretch"]}),o({name:"gap",labelKey:"utility.gap"}),o({name:"row-gap",labelKey:"utility.row_gap"}),o({name:"column-gap",labelKey:"utility.column_gap"}),i({name:"flex-fill",prefix:"flex",property:"flex",labelKey:"utility.flex_fill",values:["fill"],appliesTo:ne,css:function(){return"1 1 auto"}}),i({name:"flex-grow",prefix:"flex",labelKey:"utility.flex_grow",values:["grow-0","grow-1"],appliesTo:ne,css:function(c){return c.slice(-1)}}),i({name:"flex-shrink",prefix:"flex",labelKey:"utility.flex_shrink",values:["shrink-0","shrink-1"],appliesTo:ne,css:function(c){return c.slice(-1)}})]}}Object.assign(T.locales.en,{"utility.float":"Float","utility.float_start":"Start","utility.float_end":"End","utility.float_none":"None"});var at={start:"left",end:"right",none:"none"};function Ee(e){function t(n){return n==="start"?e.t("utility.float_start"):n==="end"?e.t("utility.float_end"):e.t("utility.float_none")}return{families:[{name:"float",prefix:"float",values:["start","end","none"],appliesTo:["element"],labelKey:"utility.float",label:t,preview:function(n,i){return{float:n===null?e.bareStyle(i,"float","float"):at[n]}}}]}}Object.assign(T.locales.en,{"utility.sticky":"Sticky"});var st={top:{position:"sticky",top:"0","z-index":"1020"},bottom:{position:"sticky",bottom:"0","z-index":"1020"}};function Ce(e){return{families:[{name:"sticky",prefix:"sticky",values:["top","bottom"],appliesTo:["row","column","element","container"],labelKey:"utility.sticky",panel:!1,preview:function(t,n){return t!==null?st[t]:{position:e.bareStyle(n,"sticky","position")}}}]}}var ct=".row, .column, .ge-element, [data-ge-container]",U="ge-drawer-out",ie="data-ge-drawer-out",ut=5,pt=/^(?:inline-)?(?:flex|grid)$/;function Se(e){var t=null,n={},i=null;function l(y){if(!n[y]){n[y]=!0,t||(t=document.head.appendChild(g("style",{"data-ge-drawer-flow":""})));var f=".ge-canvas.ge-editing ["+ie+'="'+y+'"]';t.appendChild(document.createTextNode(f+" { border-top-width: "+y+`px !important; }
1
+ (()=>{var T=window.GridEditor;if(!T||typeof T.get!="function")throw new Error("grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, its locales and grideditor.jquery.js");function P(e,t){return e?Array.prototype.slice.call(e.querySelectorAll(t)):[]}function N(e,t){return e?e.querySelector(t):null}function I(e,t){if(!e)return[];var n=P(e,t);return e.nodeType===1&&e.matches(t)&&n.unshift(e),n}function J(e,t){return e?Array.prototype.filter.call(e.children,function(n){return!t||n.matches(t)}):[]}function j(e,t){return J(e,t)[0]||null}function M(e,t){return!!e&&e.nodeType===1&&e.matches(t)}function g(e,t,n){var i=document.createElement(e);return Object.keys(t||{}).forEach(function(l){var o=t[l];o!=null&&o!==!1&&i.setAttribute(l,o)}),n!=null&&(i.textContent=n),i}function Z(e,t){return oe(t).forEach(function(n){e.classList.add(n)}),e}function H(e,t){return oe(t).forEach(function(n){e.classList.remove(n)}),e}function $(e,t,n){return oe(t).forEach(function(i){n===void 0?e.classList.toggle(i):e.classList.toggle(i,!!n)}),e}function R(e,t){return!!e&&e.nodeType===1&&e.classList.contains(t)}function oe(e){return String(e||"").split(/\s+/).filter(Boolean)}function W(e){return e.getAttribute("class")||e.removeAttribute("class"),e}function ae(e,t){return Object.keys(t).forEach(function(n){var i=t[n];typeof i=="number"&&!We[n]&&(i=i+"px"),e.style.setProperty(n,i==null?"":String(i))}),e}var We={opacity:!0,"z-index":!0,"flex-grow":!0,"flex-shrink":!0,order:!0},V={};function qe(e){var t=e.nodeName;if(!V[t]){var n=document.body.appendChild(document.createElement(t));V[t]=getComputedStyle(n).display,n.remove(),V[t]==="none"&&(V[t]="block")}return V[t]}function Xe(e){return e.style.removeProperty("display"),getComputedStyle(e).display==="none"&&(e.style.display=qe(e)),e}function Ye(e){return e.style.display="none",e}function F(e,t){return t===void 0&&(t=!Je(e)),t?Xe(e):Ye(e)}function Je(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}Object.assign(T.locales.en,{"utility.padding":"Padding","utility.margin":"Margin","utility.side_all":"All sides","utility.side_x":"Left and right","utility.side_y":"Top and bottom","utility.side_t":"Top","utility.side_b":"Bottom","utility.side_s":"Start","utility.side_e":"End","utility.spacing_gutter":"A column's side padding is its gutter: changing it changes the gutter"});var q=["0","1","2","3","4","5"],Ze=["0",".25rem",".5rem","1rem","1.5rem","3rem"],Q=["","x","y","t","e","b","s"],Qe={"":["top","right","bottom","left"],x:["left","right"],y:["top","bottom"],t:["top"],e:["right"],b:["bottom"],s:["left"]},he=["","sm","md","lg","xl","xxl"],se={p:"padding",m:"margin"};function ve(e){return new RegExp("^"+e+"[xytbse]?-(?:(?:sm|md|lg|xl|xxl)-)?(?:[0-5]|auto)$")}function be(e,t){var n=Object.assign({values:q,scale:Ze},t),i={p:ve("p"),m:ve("m")};function l(r,a){return a==="row"||a==="column"||a==="element"||M(r,"[data-ge-container]")}function o(r){return(r.getAttribute("class")||"").split(/\s+/)}function u(r,a){return o(r).some(function(p){return i[a].test(p)})}function c(r,a,p){for(var w=o(r),b=a.charAt(0)==="m"?q.concat(["auto"]):q,v=p;v>=0;v--)for(var C=0;C<b.length;C++){var k=a+(he[v]?"-"+he[v]:"")+"-"+b[C];if(w.indexOf(k)!==-1)return{tier:v,value:b[C]}}return null}function d(r,a){var p=r.getAttribute("class"),w,b={};return r.setAttribute("class",o(r).filter(function(v){return!i[a].test(v)}).join(" ")),w=getComputedStyle(r),["top","right","bottom","left"].forEach(function(v){b[v]=w.getPropertyValue(se[a]+"-"+v)}),p===null?r.removeAttribute("class"):r.setAttribute("class",p),b}function m(r,a,p){var w=e.breakpoints.indexOf(p),b={},v={},C=null;return Q.forEach(function(k,K){var A=c(r,a+k,w);A&&Qe[k].forEach(function(G){var Y=b[G];(!Y||A.tier>Y.tier||A.tier===Y.tier&&K>Y.order)&&(b[G]={tier:A.tier,order:K,value:A.value})})}),["top","right","bottom","left"].forEach(function(k){var K=b[k];K?v[se[a]+"-"+k]=K.value==="auto"?"auto":n.scale[K.value]:(C=C||d(r,a),v[se[a]+"-"+k]=C[k])}),v}function E(r,a){var p=o(r).filter(function(b){return i[a].test(b)}),w=Q.filter(function(b){return p.some(function(v){return v.indexOf(a+b+"-")===0})});return w.length?w[0]:""}function y(r){switch(r){case"x":return e.t("utility.side_x");case"y":return e.t("utility.side_y");case"t":return e.t("utility.side_t");case"b":return e.t("utility.side_b");case"s":return e.t("utility.side_s");case"e":return e.t("utility.side_e");default:return e.t("utility.side_all")}}function f(r,a,p){var w=g("div",{class:"ge-spacing-group","data-ge-spacing":a}),b=g("select",{class:"ge-spacing-side form-select form-select-sm"});w.appendChild(g("span",{class:"ge-utility-label"},p)),Q.forEach(function(C){b.appendChild(g("option",{value:C},y(C)))});var v=e.utilityField(r,a+E(r,a));return b.value=v.getAttribute("data-ge-family").slice(1),b.addEventListener("change",function(){var C=e.utilityField(r,a+this.value);v.replaceWith(C),v=C}),w.appendChild(b),w.appendChild(v),w}var x=".row, .column, .ge-element, [data-ge-container]";function O(r){I(r,x).forEach(function(a){var p=j(a,".ge-tools-drawer");if(!(!p||!l(a,e.kindOf(a)))){if(u(a,"p")){var w=getComputedStyle(a);ae(p,{"margin-top":"-"+w.paddingTop,"margin-left":"-"+w.paddingLeft,"margin-right":"-"+w.paddingRight,width:"calc(100% + "+w.paddingLeft+" + "+w.paddingRight+")"})}else ae(p,{"margin-top":"","margin-left":"","margin-right":"",width:""});if(R(a,"column")){var b=o(a).some(function(v){return/^p[xse]?-/.test(v)&&i.p.test(v)});P(p,".ge-spacing-gutter").forEach(function(v){F(v,b)})}}})}function s(r,a){var p=r==="m"?q.concat(["auto"]):q,w=n.values.concat(r==="m"?["auto"]:[]);return Q.map(function(b){return{name:r+b,prefix:r+b,values:p,appliesTo:["row","column","text","element","container"],labelKey:a,panel:!1,choices:function(){return p.filter(function(v){return w.indexOf(v)!==-1})}}})}return{families:s("p","utility.padding").concat(s("m","utility.margin")),panel:function(r,a){if(!l(r,a))return null;var p=g("div",{class:"ge-spacing"});return p.appendChild(f(r,"p",e.t("utility.padding"))),p.appendChild(f(r,"m",e.t("utility.margin"))),a==="column"&&p.appendChild(g("small",{class:"ge-spacing-gutter"},e.t("utility.spacing_gutter"))),p},preview:function(r,a,p){if(!l(r,a))return{};var w={};return["p","m"].forEach(function(b){u(r,b)&&Object.assign(w,m(r,b,p))}),w},onRefresh:O}}Object.assign(T.locales.en,{"utility.text_align":"Text alignment","utility.text_start":"Start","utility.text_center":"Center","utility.text_end":"End"});var et={start:"left",center:"center",end:"right"};function _e(e){function t(n){return n==="start"?e.t("utility.text_start"):n==="center"?e.t("utility.text_center"):e.t("utility.text_end")}return{families:[{name:"text-align",prefix:"text",values:["start","center","end"],appliesTo:["row","column","text","element","container"],labelKey:"utility.text_align",label:t,preview:function(n,i){return{"text-align":n===null?e.bareStyle(i,"text-align","text-align"):et[n]}}}]}}Object.assign(T.locales.en,{"utility.display":"Display","utility.visibility_hidden":"Hidden","tool.hide_in_view":"Hide in this view","tool.show_in_view":"Show in this view","badge.hidden_in":"Hidden at {breakpoints}"});var te=["none","inline","inline-block","block","grid","inline-grid","flex","inline-flex"],tt=new RegExp("(?:^|\\s)d-(?:(?:sm|md|lg|xl|xxl)-)?(?:"+te.join("|")+")(?:\\s|$)"),nt=/^d-(?:(?:sm|md|lg|xl|xxl)-)?none$/,it=".row, .column, .ge-content, .ge-element, [data-ge-container]",ee="data-ge-display";function xe(e,t){var n=Object.assign({drawer:!0},t);function i(s){return s==="row"?["none","flex"]:s==="text"||s==="plain"?["none","block"]:te}function l(s){return s==="row"?"flex":"block"}function o(s,r){return r==="row"||r==="column"||r==="element"||r==="text"||r==="plain"||M(s,"[data-ge-container]")}function u(s,r){return e.getUtility(s,"display",r)==="none"}function c(s){return e.breakpoints.filter(function(r){return u(s,r)})}function d(s){return e.view()==="all"?c(s).length===e.breakpoints.length:u(s,e.view())}function m(s){var r=e.breakpoints.indexOf(e.view());return r>0&&u(s,e.breakpoints[r-1])}function E(s,r){for(var a=e.breakpoints.indexOf(r)-1;a>=0;a--){var p=e.getUtility(s,"display",e.breakpoints[a]);if(p===null)return null;if(p!=="none")return p}return null}function y(s,r){var a=!d(s),p;e.view()==="all"?p=a?"none":null:a?p=m(s)?null:"none":p=m(s)?E(s,e.view())||l(r):null,e.setUtility(s,"display",p,{source:"tool"})}function f(s){var r=s.getAttribute("class");s.setAttribute("class",r.split(/\s+/).filter(function(p){return!nt.test(p)}).join(" "));var a=getComputedStyle(s).display;return s.setAttribute("class",r),a!=="none"&&te.indexOf(a)!==-1?a:"block"}function x(s){I(s,it).forEach(function(r){var a=e.kindOf(r),p=o(r,a)&&tt.test(r.getAttribute("class")||""),w=p?c(r):[],b=p&&d(r),v=p&&e.view()==="all"&&w.length>0&&!b;r.removeAttribute(ee),p&&getComputedStyle(r).display==="none"&&r.setAttribute(ee,f(r)),$(r,"ge-hidden-in-view",b),v?r.setAttribute("data-ge-hidden-in",e.t("badge.hidden_in",{breakpoints:w.join(", ")})):r.removeAttribute("data-ge-hidden-in"),J(r,".ge-tools-drawer").forEach(function(C){J(C,".ge-visibility-tool").forEach(function(k){k.setAttribute("title",b?e.t("tool.show_in_view"):e.t("tool.hide_in_view")),P(k,"i").forEach(function(K){K.setAttribute("class",b?"bi bi-eye-slash":"bi bi-eye")})})})})}function O(s){P(s||e.canvas,".ge-hidden-in-view, [data-ge-hidden-in], ["+ee+"]").forEach(function(r){H(r,"ge-hidden-in-view"),r.removeAttribute("data-ge-hidden-in"),r.removeAttribute(ee),W(r)})}return{families:[{name:"display",prefix:"d",values:te,appliesTo:["row","column","text","element","container"],labelKey:"utility.display",choices:function(s,r){return i(r)},label:function(s){return s==="none"?e.t("utility.visibility_hidden"):s},preview:function(s,r){return s==="none"&&(s=E(r,e.view())),{display:s===null?e.bareStyle(r,"display","display"):s}}}],drawerTools:function(s,r,a){!n.drawer||!o(r,a)||e.createTool(s,e.t("tool.hide_in_view"),"ge-visibility-tool","bi bi-eye",function(){y(r,a)})},onRefresh:x,onDeinit:function(){O()},cleanMarkup:O}}Object.assign(T.locales.en,{"utility.flex_direction":"Direction","utility.flex_wrap":"Wrap","utility.justify_content":"Justify columns","utility.align_items":"Align columns","utility.align_content":"Align lines","utility.gap":"Gap","utility.row_gap":"Row gap","utility.column_gap":"Column gap","utility.flex_fill":"Fill","utility.flex_grow":"Grow","utility.flex_shrink":"Shrink"});var rt={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",baseline:"baseline",stretch:"stretch"},lt=["0","1","2","3","4","5"],ot=["0",".25rem",".5rem","1rem","1.5rem","3rem"],ce=["row","column","element","container"],ne=["column","element","container"];function we(e,t){var n=t&&t.scale||ot;function i(c){var d=c.property||c.name;return Object.assign({prefix:c.name,panel:!1,preview:function(m,E){var y={};return y[d]=m===null?e.bareStyle(E,c.name,d):c.css(m),y}},c)}function l(c){return i(Object.assign({appliesTo:ce,preview:function(d){var m={};return m[c.name]=d===null?"normal":rt[d],m}},c))}function o(c){return i(Object.assign({values:lt,appliesTo:ne,css:function(d){return n[d]}},c))}function u(c){return c}return{families:[i({name:"flex-direction",prefix:"flex",labelKey:"utility.flex_direction",values:["row","row-reverse","column","column-reverse"],appliesTo:ce,css:u}),i({name:"flex-wrap",prefix:"flex",labelKey:"utility.flex_wrap",values:["wrap","nowrap","wrap-reverse"],appliesTo:ce,css:u}),l({name:"justify-content",labelKey:"utility.justify_content",values:["start","center","end","between","around","evenly"]}),l({name:"align-items",labelKey:"utility.align_items",values:["start","center","end","baseline","stretch"]}),l({name:"align-content",labelKey:"utility.align_content",values:["start","center","end","between","around","stretch"]}),o({name:"gap",labelKey:"utility.gap"}),o({name:"row-gap",labelKey:"utility.row_gap"}),o({name:"column-gap",labelKey:"utility.column_gap"}),i({name:"flex-fill",prefix:"flex",property:"flex",labelKey:"utility.flex_fill",values:["fill"],appliesTo:ne,css:function(){return"1 1 auto"}}),i({name:"flex-grow",prefix:"flex",labelKey:"utility.flex_grow",values:["grow-0","grow-1"],appliesTo:ne,css:function(c){return c.slice(-1)}}),i({name:"flex-shrink",prefix:"flex",labelKey:"utility.flex_shrink",values:["shrink-0","shrink-1"],appliesTo:ne,css:function(c){return c.slice(-1)}})]}}Object.assign(T.locales.en,{"utility.float":"Float","utility.float_start":"Start","utility.float_end":"End","utility.float_none":"None"});var at={start:"left",end:"right",none:"none"};function Ee(e){function t(n){return n==="start"?e.t("utility.float_start"):n==="end"?e.t("utility.float_end"):e.t("utility.float_none")}return{families:[{name:"float",prefix:"float",values:["start","end","none"],appliesTo:["element"],labelKey:"utility.float",label:t,preview:function(n,i){return{float:n===null?e.bareStyle(i,"float","float"):at[n]}}}]}}Object.assign(T.locales.en,{"utility.sticky":"Sticky"});var st={top:{position:"sticky",top:"0","z-index":"1020"},bottom:{position:"sticky",bottom:"0","z-index":"1020"}};function Ce(e){return{families:[{name:"sticky",prefix:"sticky",values:["top","bottom"],appliesTo:["row","column","element","container"],labelKey:"utility.sticky",panel:!1,preview:function(t,n){return t!==null?st[t]:{position:e.bareStyle(n,"sticky","position")}}}]}}var ct=".row, .column, .ge-element, [data-ge-container]",U="ge-drawer-out",ie="data-ge-drawer-out",ut=5,pt=/^(?:inline-)?(?:flex|grid)$/;function Se(e){var t=null,n={},i=null;function l(y){if(!n[y]){n[y]=!0,t||(t=document.head.appendChild(g("style",{"data-ge-drawer-flow":""})));var f=".ge-canvas.ge-editing ["+ie+'="'+y+'"]';t.appendChild(document.createTextNode(f+" { border-top-width: "+y+`px !important; }
2
2
  `+f+" > .ge-tools-drawer { top: -"+y+`px; }
3
- `))}}function o(y){var f=getComputedStyle(y);return pt.test(f.display)?!(R(y,"row")&&f.flexDirection==="row"&&f.flexWrap==="wrap"):!1}function u(y,f){var b=Math.ceil(f.offsetHeight)+ut;l(b),y.setAttribute(ie,String(b))}function c(y){typeof ResizeObserver!="undefined"&&(i||(i=new ResizeObserver(function(f){f.forEach(function(b){var S=b.target.parentNode;S&&R(S,U)&&u(S,b.target)})})),i.observe(y))}function d(y){I(y,ct).forEach(function(f){var b=j(f,".ge-tools-drawer");b&&(o(f)?(Z(f,U),u(f,b),c(b)):R(f,U)&&(D(f,U),f.removeAttribute(ie),W(f),i&&i.unobserve(b)))})}function m(){i&&i.disconnect(),i=null,P(e.canvas,"."+U).forEach(function(y){D(y,U),y.removeAttribute(ie),W(y)}),t&&t.remove(),t=null,n={}}return{families:[],onRefresh:d,onDeinit:m}}var L=["primary","secondary","success","danger","warning","info","light","dark"],ue=["top","end","bottom","start"],Oe=["10","25","50","75","100"];function C(e,t,n){return t.map(function(i){return e+i+(n||"")})}function x(e,t,n,i){return{classes:e,exclusive:t!==!1,notOn:n||[],onlyOn:i||null}}function h(e,t){return{name:e,labelKey:t.labelKey,type:t.type||"text",values:t.values||null,notOn:t.notOn||[]}}var B=["column"],ke=["element"],fe=[{key:"size",labelKey:"inline_style.section_size",properties:[h("width",{labelKey:"inline_style.prop_width",notOn:B}),h("height",{labelKey:"inline_style.prop_height",notOn:B}),h("min-width",{labelKey:"inline_style.prop_min_width"}),h("min-height",{labelKey:"inline_style.prop_min_height"}),h("max-width",{labelKey:"inline_style.prop_max_width"}),h("max-height",{labelKey:"inline_style.prop_max_height"})],catalog:[x(C("w-",["25","50","75","100","auto"]),!0,B),x(C("h-",["25","50","75","100","auto"]),!0,B),x(["mw-100","mh-100","vw-100","vh-100","min-vw-100","min-vh-100"],!1,B),x(["img-fluid","img-thumbnail"],!1,[],ke),x(C("object-fit-",["contain","cover","fill","scale","none"]),!0,[],ke)],parts:[]},{key:"spacing",labelKey:"inline_style.section_spacing",properties:[h("margin-top",{labelKey:"inline_style.prop_margin_top"}),h("margin-right",{labelKey:"inline_style.prop_margin_right"}),h("margin-bottom",{labelKey:"inline_style.prop_margin_bottom"}),h("margin-left",{labelKey:"inline_style.prop_margin_left"}),h("padding-top",{labelKey:"inline_style.prop_padding_top"}),h("padding-right",{labelKey:"inline_style.prop_padding_right"}),h("padding-bottom",{labelKey:"inline_style.prop_padding_bottom"}),h("padding-left",{labelKey:"inline_style.prop_padding_left"})],catalog:[],parts:["spacing"]},{key:"border",labelKey:"inline_style.section_border",properties:[h("border-width",{labelKey:"inline_style.prop_border_width"}),h("border-style",{labelKey:"inline_style.prop_border_style",type:"select",values:["none","solid","dashed","dotted","double","groove","ridge","inset","outset"]}),h("border-color",{labelKey:"inline_style.prop_border_color",type:"color"}),h("border-radius",{labelKey:"inline_style.prop_border_radius"}),h("box-shadow",{labelKey:"inline_style.prop_box_shadow",type:"shadow"})],catalog:[x(["border","border-0"].concat(C("border-",ue),C("border-",ue,"-0")),!1),x(C("border-",["1","2","3","4","5"])),x(C("border-",L.concat(["black","white"])).concat(C("border-",L,"-subtle"))),x(C("border-opacity-",Oe)),x(["rounded"].concat(C("rounded-",["0","1","2","3","4","5","circle","pill"]))),x(C("rounded-",ue),!1),x(["shadow-none","shadow-sm","shadow","shadow-lg"])],parts:[]},{key:"background",labelKey:"inline_style.section_background",properties:[h("background-color",{labelKey:"inline_style.prop_background_color",type:"color"}),h("background-image",{labelKey:"inline_style.prop_background_image",type:"url"}),h("background-size",{labelKey:"inline_style.prop_background_size"}),h("background-position",{labelKey:"inline_style.prop_background_position"}),h("background-repeat",{labelKey:"inline_style.prop_background_repeat",type:"select",values:["repeat","no-repeat","repeat-x","repeat-y","space","round"]})],catalog:[x(C("bg-",L.concat(["body","body-secondary","body-tertiary","white","black","transparent"])).concat(C("bg-",L,"-subtle"),C("text-bg-",L))),x(["bg-gradient"],!1),x(C("bg-opacity-",Oe))],parts:[]},{key:"text",labelKey:"inline_style.section_text",properties:[h("color",{labelKey:"inline_style.prop_color",type:"color"}),h("font-size",{labelKey:"inline_style.prop_font_size"}),h("text-align",{labelKey:"inline_style.prop_text_align",type:"select",values:["start","center","end","left","right","justify"]}),h("text-shadow",{labelKey:"inline_style.prop_text_shadow",type:"shadow"})],catalog:[x(C("text-",L.concat(["body","body-secondary","body-tertiary","white","black"])).concat(C("text-",L,"-emphasis"),["text-body-emphasis"])),x(C("text-opacity-",["25","50","75","100"])),x(C("fs-",["1","2","3","4","5","6"])),x(C("text-decoration-",["none","underline","line-through"]))],parts:["textalign"]},{key:"typography",labelKey:"inline_style.section_typography",properties:[h("font-family",{labelKey:"inline_style.prop_font_family"}),h("font-weight",{labelKey:"inline_style.prop_font_weight",type:"select",values:["100","200","300","400","500","600","700","800","900","normal","bold","lighter","bolder"]}),h("font-style",{labelKey:"inline_style.prop_font_style",type:"select",values:["normal","italic","oblique"]}),h("line-height",{labelKey:"inline_style.prop_line_height"}),h("letter-spacing",{labelKey:"inline_style.prop_letter_spacing"}),h("text-transform",{labelKey:"inline_style.prop_text_transform",type:"select",values:["none","uppercase","lowercase","capitalize"]}),h("text-decoration",{labelKey:"inline_style.prop_text_decoration",type:"select",values:["none","underline","line-through","overline"]})],catalog:[x(C("fw-",["lighter","light","normal","medium","semibold","bold","bolder"])),x(C("fst-",["italic","normal"])),x(C("lh-",["1","sm","base","lg"])),x(C("text-",["lowercase","uppercase","capitalize"])),x(["font-monospace"],!1),x(["text-wrap","text-nowrap"]),x(["text-break"],!1)],parts:[]},{key:"display",labelKey:"inline_style.section_display",properties:[h("display",{labelKey:"inline_style.prop_display",type:"select",values:["none","block","inline","inline-block","flex","inline-flex","grid","inline-grid"]}),h("opacity",{labelKey:"inline_style.prop_opacity"}),h("overflow",{labelKey:"inline_style.prop_overflow",type:"select",values:["visible","hidden","auto","scroll","clip"]}),h("visibility",{labelKey:"inline_style.prop_visibility",type:"select",values:["visible","hidden"]})],catalog:[x(C("opacity-",["0","25","50","75","100"])),x(C("overflow-",["auto","hidden","visible","scroll"])),x(["visible","invisible"])],parts:["display"]},{key:"flex",labelKey:"inline_style.section_flex",properties:[],catalog:[x(["vstack","hstack"],!0,["row"])],parts:["flex"]},{key:"position",labelKey:"inline_style.section_position",properties:[h("position",{labelKey:"inline_style.prop_position",type:"select",values:["static","relative","absolute","fixed","sticky"]}),h("top",{labelKey:"inline_style.prop_top",notOn:B}),h("right",{labelKey:"inline_style.prop_right",notOn:B}),h("bottom",{labelKey:"inline_style.prop_bottom",notOn:B}),h("left",{labelKey:"inline_style.prop_left",notOn:B}),h("z-index",{labelKey:"inline_style.prop_z_index"})],catalog:[x(C("position-",["static","relative","absolute","fixed","sticky"])),x(C("top-",["0","50","100"])),x(C("bottom-",["0","50","100"])),x(C("start-",["0","50","100"])),x(C("end-",["0","50","100"])),x(["translate-middle","translate-middle-x","translate-middle-y"]),x(["z-n1","z-0","z-1","z-2","z-3"]),x(["fixed-top","fixed-bottom"])],parts:["float","sticky"]},{key:"custom",labelKey:"inline_style.section_custom",properties:[],catalog:[],parts:[],custom:!0}];function Ke(e){return fe.filter(function(t){return t.key===e})[0]||null}function le(e,t){return e.onlyOn&&e.onlyOn.indexOf(t)===-1?!1:e.notOn.indexOf(t)===-1}var re="(?:(?:sm|md|lg|xl|xxl)-)?",dt="(?:[0-5]|auto)",ft="(?:"+L.join("|")+"|black|white)",mt="(?:"+L.join("|")+"|body|body-secondary|body-tertiary|white|black|transparent)",yt="(?:"+L.join("|")+"|body|body-secondary|body-tertiary|white|black|muted|black-50|white-50)",pe="border(?:-(?:top|end|bottom|start))?(?:-0)?",Ae="(?:"+L.join("|")+")-subtle",gt="(?:"+L.join("|")+"|body)-emphasis",Te="text-bg-(?:"+L.join("|")+")",de="sticky-"+re;function z(e,t){var n={top:"[ty]?",bottom:"[by]?",left:"[sx]?",right:"[ex]?"}[t];return new RegExp("^"+e+n+"-"+re+dt+"$")}var ht={width:/^(?:w-(?:25|50|75|100|auto)|vw-100)$/,height:/^(?:h-(?:25|50|75|100|auto)|vh-100)$/,"max-width":/^mw-100$/,"max-height":/^mh-100$/,"min-width":/^min-vw-100$/,"min-height":/^min-vh-100$/,"margin-top":z("m","top"),"margin-right":z("m","right"),"margin-bottom":z("m","bottom"),"margin-left":z("m","left"),"padding-top":z("p","top"),"padding-right":z("p","right"),"padding-bottom":z("p","bottom"),"padding-left":z("p","left"),"border-width":new RegExp("^(?:"+pe+"|border-[1-5])$"),"border-style":new RegExp("^"+pe+"$"),"border-color":new RegExp("^(?:"+pe+"|border-"+ft+"|border-"+Ae+")$"),"border-radius":/^rounded(?:-(?:[0-5]|circle|pill|top|end|bottom|start))?$/,"box-shadow":/^shadow(?:-(?:none|sm|lg))?$/,"background-color":new RegExp("^(?:bg-"+mt+"|bg-"+Ae+"|"+Te+")$"),"background-image":/^bg-gradient$/,color:new RegExp("^(?:text-"+yt+"|text-"+gt+"|"+Te+")$"),"font-size":/^fs-[1-6]$/,"text-align":new RegExp("^text-"+re+"(?:start|center|end)$"),"text-decoration":/^text-decoration-(?:none|underline|line-through)$/,"font-family":/^font-monospace$/,"font-weight":/^fw-(?:lighter|light|normal|medium|semibold|bold|bolder)$/,"font-style":/^fst-(?:italic|normal)$/,"line-height":/^lh-(?:1|sm|base|lg)$/,"text-transform":/^text-(?:lowercase|uppercase|capitalize)$/,display:new RegExp("^(?:d-"+re+"(?:none|inline|inline-block|block|grid|inline-grid|table|table-row|table-cell|flex|inline-flex)|vstack|hstack)$"),opacity:/^opacity-(?:0|25|50|75|100)$/,overflow:/^overflow-(?:auto|hidden|visible|scroll)$/,visibility:/^(?:visible|invisible)$/,position:new RegExp("^(?:position-(?:static|relative|absolute|fixed|sticky)|fixed-(?:top|bottom)|"+de+"(?:top|bottom))$"),top:new RegExp("^(?:top-(?:0|50|100)|fixed-top|"+de+"top)$"),bottom:new RegExp("^(?:bottom-(?:0|50|100)|fixed-bottom|"+de+"bottom)$"),left:/^start-(?:0|50|100)$/,right:/^end-(?:0|50|100)$/,"z-index":/^z-(?:n1|[0-3])$/};function Le(e,t){var n=ht[e];return n&&t.filter(function(i){return n.test(i)})[0]||null}function vt(e,t){var n={};return Object.keys(t||{}).forEach(function(i){Ke(i)||e.warn('inline_style.sections: there is no "'+i+'" section: ignored')}),fe.forEach(function(i){var l=t&&t[i.key]!==void 0?t[i.key]:!0;if(l!==!1){var o=i.properties.map(function(d){return d.name}),u=i.properties,c=!0;l&&typeof l=="object"&&(Array.isArray(l.properties)&&(l.properties.forEach(function(d){o.indexOf(d)===-1&&e.warn("inline_style.sections."+i.key+': "'+d+'" is not one of its properties: ignored')}),u=l.properties.filter(function(d){return o.indexOf(d)!==-1}).map(function(d){return i.properties[o.indexOf(d)]})),l.catalog===!1&&(c=!1)),n[i.key]={section:i,properties:u,catalog:c}}}),n}function Pe(e){var t=e.settings.inline_style||{};return{sections:vt(e,t.sections),spacing:t.spacing,visibility:t.visibility}}var je=new WeakMap,bt=0;function _t(e){return(e.getAttribute("class")||"").split(/\s+/).filter(Boolean)}function ze(e,t,n,i){var l=String(i==null?"":i).trim(),o=/\s*!\s*important\s*$/i.exec(l),u;return o&&(l=l.slice(0,o.index).trim(),u="important"),e.setHostStyle(t,n,l,u)}function Ne(e,t,n){$(e,"is-invalid",!t),t?e.removeAttribute("title"):e.setAttribute("title",n.t("inline_style.invalid"))}function me(e,t){R(e,"is-invalid")||(e.value=t)}function X(e){return g("input",{type:"text",class:"form-control form-control-sm "+(e||"")})}var xt=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i;function Re(e){var t=xt.exec(e.trim());if(!t)return null;var n=t[1];return n.length===3&&(n=n.split("").map(function(i){return i+i}).join("")),"#"+n.toLowerCase()}function He(e){var t=g("div",{class:"input-group input-group-sm ge-inline-style-color"}),n=t.appendChild(g("input",{type:"color",class:"form-control form-control-color"})),i=t.appendChild(X());return n.addEventListener("input",function(){D(i,"is-invalid"),i.value=n.value,e(n.value,i)}),i.addEventListener("change",function(){var l=Re(i.value);l&&(n.value=l),e(i.value,i)}),{element:t,set:function(l){me(i,l);var o=Re(l);o&&(n.value=o)}}}var wt=/^url\(\s*(["']?)(.*)\1\s*\)$/i;function Et(e){var t=wt.exec(e.trim());return t?t[1]?t[2].replace(/\\(["\\])/g,"$1"):t[2]:e}function Ct(e){return e=e.trim(),e===""||/^(?:none|inherit|initial|unset|revert)$/i.test(e)||/^[a-z-]+\(/i.test(e)?e:'url("'+e.replace(/(["\\])/g,"\\$1")+'")'}function St(e){for(var t=[],n=0,i="",l=0;l<e.length;l++){var o=e.charAt(l);o==="("&&n++,o===")"&&n--,n===0&&(o===" "||o===",")?(i&&t.push(i),o===","&&t.push(","),i=""):i+=o}return i&&t.push(i),t}var Ot=/^-?(?:\d*\.)?\d+(?:[a-z%]+)?$/i,$e=[{name:"x",labelKey:"inline_style.shadow_x"},{name:"y",labelKey:"inline_style.shadow_y"},{name:"blur",labelKey:"inline_style.shadow_blur"},{name:"spread",labelKey:"inline_style.shadow_spread"}];function Be(e,t){if(e=e.trim(),e==="")return{inset:!1,lengths:[],color:""};if(/var\(/i.test(e))return null;var n=St(e);if(n.indexOf(",")!==-1)return null;var i=!1,l=[],o=[];return n.forEach(function(u){t&&u.toLowerCase()==="inset"?i=!0:Ot.test(u)?l.push(u):o.push(u)}),o.length>1||l.length<2||l.length>(t?4:3)||o.length&&/^(?:none|inherit|initial|unset|revert)$/i.test(o[0])?null:{inset:i,lengths:l,color:o[0]||""}}function kt(e,t){for(var n=e.lengths.slice(),i=n.length-1;i>=0;i--)n[i]===""&&n.slice(i+1).some(Boolean)&&(n[i]="0");if(n=n.filter(Boolean),!n.length&&!e.color&&!e.inset)return"";for(;n.length<2;)n.push("0");return(t&&e.inset?"inset ":"")+n.join(" ")+(e.color?" "+e.color:"")}function At(e,t,n,i){var l=n==="box-shadow",o=g("div",{class:"ge-inline-style-shadow"}),u=!1;function c(b,S){var k=ze(e,t,n,b);return Ne(S,k,e),k&&i(),k}function d(b){o.innerHTML="";var S=o.appendChild(g("div",{class:"ge-inline-style-shadow-builder"})),k=l?$e:$e.slice(0,3),s=k.map(function(E,O){var K=S.appendChild(g("label",{class:"ge-inline-style-shadow-part"}));K.appendChild(g("span",{class:"ge-inline-style-shadow-label"},e.t(E.labelKey)));var A=K.appendChild(X("ge-inline-style-shadow-"+E.name));return A.value=b.lengths[O]||"",A}),r=S.appendChild(g("label",{class:"ge-inline-style-shadow-part ge-inline-style-shadow-color"}));r.appendChild(g("span",{class:"ge-inline-style-shadow-label"},e.t("inline_style.shadow_color")));var a=He(function(){v()});r.appendChild(a.element),a.set(b.color);var p=null;if(l){var w=S.appendChild(g("label",{class:"form-check ge-inline-style-shadow-inset"}));p=w.appendChild(g("input",{type:"checkbox",class:"form-check-input"})),w.appendChild(g("span",{class:"form-check-label"},e.t("inline_style.shadow_inset"))),p.checked=b.inset,p.addEventListener("change",function(){v()})}s.forEach(function(E){E.addEventListener("change",function(){v()})});var _=o.appendChild(g("a",{href:"#",class:"ge-inline-style-shadow-mode"},e.t("inline_style.shadow_text_mode")));_.addEventListener("click",function(E){E.preventDefault(),u=!0,f()});function v(){var E=kt({inset:p?p.checked:!1,lengths:s.map(function(O){return O.value.trim()}),color:N(a.element,'input[type="text"]').value.trim()},l);c(E,s[0])}}function m(b){o.innerHTML="";var S=o.appendChild(X("ge-inline-style-shadow-text"));if(S.value=b,S.addEventListener("change",function(){if(S.value.trim()===""){c("",S)&&(u=!1,f());return}c(S.value,S)}),Be(b,l)){var k=o.appendChild(g("a",{href:"#",class:"ge-inline-style-shadow-mode"},e.t("inline_style.shadow_builder_mode")));k.addEventListener("click",function(s){s.preventDefault(),u=!1,f()})}}var y=null;function f(){if(!o.querySelector(".is-invalid")){var b=e.hostStyle(t,n).value,S=Be(b,l);b===y&&o.firstChild&&u===!!o.querySelector(".ge-inline-style-shadow-text")||(y=b,u||!S?(u=!!b||u,m(b)):d(S))}}return{element:o,render:f,value:function(){return e.hostStyle(t,n).value}}}function De(e,t,n,i){var l=g("div",{class:"ge-inline-style-field","data-ge-inline-style-property":n.name}),o=l.appendChild(g("label",{class:"ge-inline-style-label"},e.t(n.labelKey))),u;function c(){return e.hostStyle(t,n.name).value}function d(s,r){var a=ze(e,t,n.name,s);Ne(r,a,e),a&&i()}if(n.type==="select"){var m=l.appendChild(g("select",{class:"form-select form-select-sm"}));m.addEventListener("change",function(){d(m.value,m)}),u=function(){var s=c(),r=n.values.slice();s&&r.indexOf(s)===-1&&r.push(s),m.innerHTML="",m.appendChild(g("option",{value:""},"")),r.forEach(function(a){m.appendChild(g("option",{value:a},a))}),m.value=s}}else if(n.type==="color"){var y=He(function(s,r){d(s,r)});l.appendChild(y.element),u=function(){y.set(c())}}else if(n.type==="url"){var f=l.appendChild(X());f.addEventListener("change",function(){d(Ct(f.value),f)}),u=function(){me(f,Et(c()))}}else if(n.type==="shadow"){var b=At(e,t,n.name,i);l.appendChild(b.element),u=b.render}else{var S=l.appendChild(X());S.addEventListener("change",function(){d(S.value,S)}),u=function(){me(S,c())}}var k=l.querySelector("input, select");return k&&(k.id="ge-inline-style-field-"+ ++bt,o.setAttribute("for",k.id)),l.appendChild(g("small",{class:"ge-inline-style-note ge-inline-style-overridden"})),je.set(l,function(){u();var s=c()?Le(n.name,_t(t)):null,r=j(l,".ge-inline-style-overridden");r.textContent=s?e.t("inline_style.overridden",{class:s}):"",F(r,!!s)}),ye(l),l}function ye(e){var t=je.get(e);t&&t()}function Me(e){return(e.getAttribute("class")||"").split(/\s+/).filter(Boolean)}function Tt(e,t,n,i){var l=e.detailsOf(t),o=l?N(l,".ge-classes"):null;if(o){var u=Me(t).indexOf(i)!==-1,c=o.value.split(/\s+/).filter(Boolean).filter(function(d){return d===i?!1:!(n.exclusive&&!u&&n.classes.indexOf(d)!==-1)});u||c.push(i),o.value=c.join(" "),o.dispatchEvent(new Event("change",{bubbles:!0}))}}function Ie(e,t,n,i){var l=i.filter(function(u){return le(u,n)});if(!l.length)return null;var o=g("div",{class:"ge-inline-style-catalog"});return o.appendChild(g("span",{class:"ge-inline-style-label"},e.t("inline_style.catalog"))),l.forEach(function(u){var c=o.appendChild(g("div",{class:"ge-inline-style-chips"}));u.classes.forEach(function(d){var m=c.appendChild(g("button",{type:"button",class:"btn btn-sm btn-outline-secondary ge-inline-style-chip","data-ge-class":d,"aria-pressed":"false"},d));m.addEventListener("click",function(){Tt(e,t,u,d)})})}),ge(o,t),o}function ge(e,t){var n=Me(t);P(e,".ge-inline-style-chip").forEach(function(i){var l=n.indexOf(i.getAttribute("data-ge-class"))!==-1;$(i,"active",l),i.setAttribute("aria-pressed",l?"true":"false")})}function Kt(e){var t=document.createElement("div").style,n=[];t.setProperty(e,"initial");for(var i=0;i<t.length;i++)n.push(t[i]);return n.length?n:[e]}function Fe(e){var t=document.createElement("div").style;return t.cssText=e,t}function Ue(e,t,n,i){var l={};n.forEach(function(m){Kt(m).forEach(function(y){l[y]=!0})});var o=g("div",{class:"ge-inline-style-custom"}),u=o.appendChild(g("textarea",{class:"form-control form-control-sm font-monospace ge-inline-style-custom-css",rows:"4",spellcheck:"false","aria-label":e.t("inline_style.section_custom")}));function c(){for(var m=Fe(e.hostStyle(t)),y=document.createElement("div").style,f=0;f<m.length;f++){var b=m[f];l[b]||y.setProperty(b,m.getPropertyValue(b),m.getPropertyPriority(b))}return y}u.addEventListener("change",function(){var m=c(),y=Fe(u.value),f;for(f=0;f<m.length;f++)y.getPropertyValue(m[f])===""&&e.setHostStyle(t,m[f],"");for(f=0;f<y.length;f++)e.setHostStyle(t,y[f],y.getPropertyValue(y[f]),y.getPropertyPriority(y[f]));d(),i()});function d(){document.activeElement!==u&&(u.value=c().cssText.replace(/; /g,`;
4
- `))}return d(),{element:o,render:d}}function Lt(e,t){return t==="row"||t==="column"||t==="element"||t==="section"||H(e,"[data-ge-container]")?!0:!!j(e,".ge-tools-drawer.ge-pane-drawer")}function Pt(e,t,n){return n==="plain"&&(n="text"),e.appliesTo.indexOf(n)!==-1?!0:e.appliesTo.indexOf("container")!==-1&&H(t,"[data-ge-container]")}function Rt(e,t,n,i){if(t.panel)return t.panel(n,i);var l=t.families.filter(function(u){return Pt(u,n,i)}).map(function(u){return e.utilityField(n,u.name)});if(l.length<2)return l[0]||null;var o=g("div",{class:"ge-inline-style-part-fields"});return l.forEach(function(u){o.appendChild(u)}),o}function Ge(e,t,n,i){var l=Lt(t,n),o=g("div",{class:"accordion ge-inline-style"}),u=[],c=[],d=[],m=null,y=null,f=function(){s()};function b(r,a){var p=o.appendChild(g("div",{class:"accordion-item","data-ge-inline-style-section":r})),w=p.appendChild(g("h2",{class:"accordion-header"})),_=w.appendChild(g("button",{type:"button",class:"accordion-button collapsed","aria-expanded":"false"},e.t(a))),v=p.appendChild(g("div",{class:"accordion-collapse collapse"})),E=v.appendChild(g("div",{class:"accordion-body"}));return _.addEventListener("click",function(){var O=!R(v,"show");i.state.open=O?r:null,i.opened(i.state.open)}),{entry:p,body:E}}function S(r,a){$(N(r,".accordion-collapse"),"show",a);var p=N(r,".accordion-button");$(p,"collapsed",!a),p.setAttribute("aria-expanded",a?"true":"false")}if(Object.keys(i.sections).forEach(function(r){var a=i.sections[r],p=a.section;if(p.custom){l&&(y=b(r,p.labelKey));return}var w=p.parts.map(function(A){return i.parts[A]?Rt(e,i.parts[A],t,n):null}).filter(Boolean),_=l?a.properties.filter(function(A){return le(A,n)}):[],v=l&&a.catalog?Ie(e,t,n,p.catalog):null;if(!(!w.length&&!_.length&&!v)){var E=b(r,p.labelKey).body;if(w.forEach(function(A){E.appendChild(Z(A,"ge-inline-style-part"))}),_.length){var O=E.appendChild(g("small",{class:"ge-inline-style-note ge-inline-style-all-sizes"},e.t("inline_style.all_sizes")));d.push(O);var K=E.appendChild(g("div",{class:"ge-inline-style-fields"}));_.forEach(function(A){var G=De(e,t,A,f);u.push(G),K.appendChild(G)})}v&&(c.push(v),E.appendChild(v))}}),y&&(m=Ue(e,t,u.map(function(r){return r.getAttribute("data-ge-inline-style-property")}),f),y.body.appendChild(m.element),o.appendChild(y.entry)),!o.children.length)return null;function k(r){P(o,".accordion-item").forEach(function(a){S(a,a.getAttribute("data-ge-inline-style-section")===r)})}k(i.state.open);function s(){u.forEach(ye),c.forEach(function(r){ge(r,t)}),m&&m.render(),d.forEach(function(r){F(r,e.view()!=="all")})}return s(),{element:o,render:s,open:k}}Object.assign(T.locales.en,{"inline_style.section_title":"Style","inline_style.dialog_title":"Style: {kind}","inline_style.section_size":"Size","inline_style.section_spacing":"Spacing","inline_style.section_border":"Border","inline_style.section_background":"Background","inline_style.section_text":"Text","inline_style.section_typography":"Typography","inline_style.section_display":"Display","inline_style.section_flex":"Flex","inline_style.section_position":"Position","inline_style.section_custom":"Custom css","inline_style.all_sizes":"Applies to every size","inline_style.overridden":"The class {class} takes priority over this value","inline_style.invalid":"Not a value this property takes","inline_style.catalog":"Bootstrap classes","inline_style.shadow_x":"X","inline_style.shadow_y":"Y","inline_style.shadow_blur":"Blur","inline_style.shadow_spread":"Spread","inline_style.shadow_color":"Color","inline_style.shadow_inset":"Inset","inline_style.shadow_text_mode":"Edit as text","inline_style.shadow_builder_mode":"Edit with the builder","inline_style.prop_width":"Width","inline_style.prop_height":"Height","inline_style.prop_min_width":"Min width","inline_style.prop_min_height":"Min height","inline_style.prop_max_width":"Max width","inline_style.prop_max_height":"Max height","inline_style.prop_margin_top":"Margin top","inline_style.prop_margin_right":"Margin right","inline_style.prop_margin_bottom":"Margin bottom","inline_style.prop_margin_left":"Margin left","inline_style.prop_padding_top":"Padding top","inline_style.prop_padding_right":"Padding right","inline_style.prop_padding_bottom":"Padding bottom","inline_style.prop_padding_left":"Padding left","inline_style.prop_border_width":"Border width","inline_style.prop_border_style":"Border style","inline_style.prop_border_color":"Border color","inline_style.prop_border_radius":"Border radius","inline_style.prop_box_shadow":"Shadow","inline_style.prop_background_color":"Background color","inline_style.prop_background_image":"Background image","inline_style.prop_background_size":"Background size","inline_style.prop_background_position":"Background position","inline_style.prop_background_repeat":"Background repeat","inline_style.prop_color":"Color","inline_style.prop_font_size":"Font size","inline_style.prop_text_align":"Text align","inline_style.prop_text_shadow":"Text shadow","inline_style.prop_font_family":"Font family","inline_style.prop_font_weight":"Font weight","inline_style.prop_font_style":"Font style","inline_style.prop_line_height":"Line height","inline_style.prop_letter_spacing":"Letter spacing","inline_style.prop_text_transform":"Text transform","inline_style.prop_text_decoration":"Text decoration","inline_style.prop_display":"Display","inline_style.prop_opacity":"Opacity","inline_style.prop_overflow":"Overflow","inline_style.prop_visibility":"Visibility","inline_style.prop_position":"Position","inline_style.prop_top":"Top","inline_style.prop_right":"Right","inline_style.prop_bottom":"Bottom","inline_style.prop_left":"Left","inline_style.prop_z_index":"Z-index"});var Ve=["spacing","textalign","display","flex","float","sticky","drawerflow"];T.utilities["inline-style"]=function(e){var t=Pe(e),n={spacing:be(e,t.spacing),textalign:_e(e),display:xe(e,t.visibility),flex:we(e,t.spacing),float:Ee(e),sticky:Ce(e),drawerflow:Se(e)},i=[],l={sections:t.sections,parts:n,state:{open:null},opened:function(c){i.forEach(function(d){d.accordion.open(c)})}};function o(c){return function(){var d=arguments;Ve.forEach(function(m){n[m][c]&&n[m][c].apply(null,d)})}}var u=o("onRefresh");return{families:Ve.reduce(function(c,d){return c.concat(n[d].families.map(function(m){return Object.assign({},m,{panel:!1})}))},[]),panelSection:function(c,d){var m=Ge(e,c,d,l);return m?(i.push({node:c,accordion:m}),{labelKey:"inline_style.section_title",titleKey:"inline_style.dialog_title",body:m.element}):null},preview:function(c,d,m){return n.spacing.preview(c,d,m)},onRefresh:function(c){u(c),i=i.filter(function(d){return d.accordion.element.isConnected}),i.forEach(function(d){(d.node===c||c.contains(d.node))&&d.accordion.render()})},drawerTools:o("drawerTools"),onDeinit:function(){o("onDeinit")(),i=[]}}};})();
3
+ `))}}function o(y){var f=getComputedStyle(y);return pt.test(f.display)?!(R(y,"row")&&f.flexDirection==="row"&&f.flexWrap==="wrap"):!1}function u(y,f){var x=Math.ceil(f.offsetHeight)+ut;l(x),y.setAttribute(ie,String(x))}function c(y){typeof ResizeObserver!="undefined"&&(i||(i=new ResizeObserver(function(f){f.forEach(function(x){var O=x.target.parentNode;O&&R(O,U)&&u(O,x.target)})})),i.observe(y))}function d(y){I(y,ct).forEach(function(f){var x=j(f,".ge-tools-drawer");x&&(o(f)?(Z(f,U),u(f,x),c(x)):R(f,U)&&(H(f,U),f.removeAttribute(ie),W(f),i&&i.unobserve(x)))})}function m(y){P(y,"."+U).forEach(function(f){H(f,U),f.removeAttribute(ie),W(f)})}function E(){i&&i.disconnect(),i=null,m(e.canvas),t&&t.remove(),t=null,n={}}return{families:[],onRefresh:d,onDeinit:E,cleanMarkup:m}}var L=["primary","secondary","success","danger","warning","info","light","dark"],ue=["top","end","bottom","start"],Oe=["10","25","50","75","100"];function S(e,t,n){return t.map(function(i){return e+i+(n||"")})}function _(e,t,n,i){return{classes:e,exclusive:t!==!1,notOn:n||[],onlyOn:i||null}}function h(e,t){return{name:e,labelKey:t.labelKey,type:t.type||"text",values:t.values||null,notOn:t.notOn||[]}}var B=["column"],ke=["element"],fe=[{key:"size",labelKey:"inline_style.section_size",properties:[h("width",{labelKey:"inline_style.prop_width",notOn:B}),h("height",{labelKey:"inline_style.prop_height",notOn:B}),h("min-width",{labelKey:"inline_style.prop_min_width"}),h("min-height",{labelKey:"inline_style.prop_min_height"}),h("max-width",{labelKey:"inline_style.prop_max_width"}),h("max-height",{labelKey:"inline_style.prop_max_height"})],catalog:[_(S("w-",["25","50","75","100","auto"]),!0,B),_(S("h-",["25","50","75","100","auto"]),!0,B),_(["mw-100","mh-100","vw-100","vh-100","min-vw-100","min-vh-100"],!1,B),_(["img-fluid","img-thumbnail"],!1,[],ke),_(S("object-fit-",["contain","cover","fill","scale","none"]),!0,[],ke)],parts:[]},{key:"spacing",labelKey:"inline_style.section_spacing",properties:[h("margin-top",{labelKey:"inline_style.prop_margin_top"}),h("margin-right",{labelKey:"inline_style.prop_margin_right"}),h("margin-bottom",{labelKey:"inline_style.prop_margin_bottom"}),h("margin-left",{labelKey:"inline_style.prop_margin_left"}),h("padding-top",{labelKey:"inline_style.prop_padding_top"}),h("padding-right",{labelKey:"inline_style.prop_padding_right"}),h("padding-bottom",{labelKey:"inline_style.prop_padding_bottom"}),h("padding-left",{labelKey:"inline_style.prop_padding_left"})],catalog:[],parts:["spacing"]},{key:"border",labelKey:"inline_style.section_border",properties:[h("border-width",{labelKey:"inline_style.prop_border_width"}),h("border-style",{labelKey:"inline_style.prop_border_style",type:"select",values:["none","solid","dashed","dotted","double","groove","ridge","inset","outset"]}),h("border-color",{labelKey:"inline_style.prop_border_color",type:"color"}),h("border-radius",{labelKey:"inline_style.prop_border_radius"}),h("box-shadow",{labelKey:"inline_style.prop_box_shadow",type:"shadow"})],catalog:[_(["border","border-0"].concat(S("border-",ue),S("border-",ue,"-0")),!1),_(S("border-",["1","2","3","4","5"])),_(S("border-",L.concat(["black","white"])).concat(S("border-",L,"-subtle"))),_(S("border-opacity-",Oe)),_(["rounded"].concat(S("rounded-",["0","1","2","3","4","5","circle","pill"]))),_(S("rounded-",ue),!1),_(["shadow-none","shadow-sm","shadow","shadow-lg"])],parts:[]},{key:"background",labelKey:"inline_style.section_background",properties:[h("background-color",{labelKey:"inline_style.prop_background_color",type:"color"}),h("background-image",{labelKey:"inline_style.prop_background_image",type:"url"}),h("background-size",{labelKey:"inline_style.prop_background_size"}),h("background-position",{labelKey:"inline_style.prop_background_position"}),h("background-repeat",{labelKey:"inline_style.prop_background_repeat",type:"select",values:["repeat","no-repeat","repeat-x","repeat-y","space","round"]})],catalog:[_(S("bg-",L.concat(["body","body-secondary","body-tertiary","white","black","transparent"])).concat(S("bg-",L,"-subtle"),S("text-bg-",L))),_(["bg-gradient"],!1),_(S("bg-opacity-",Oe))],parts:[]},{key:"text",labelKey:"inline_style.section_text",properties:[h("color",{labelKey:"inline_style.prop_color",type:"color"}),h("font-size",{labelKey:"inline_style.prop_font_size"}),h("text-align",{labelKey:"inline_style.prop_text_align",type:"select",values:["start","center","end","left","right","justify"]}),h("text-shadow",{labelKey:"inline_style.prop_text_shadow",type:"shadow"})],catalog:[_(S("text-",L.concat(["body","body-secondary","body-tertiary","white","black"])).concat(S("text-",L,"-emphasis"),["text-body-emphasis"])),_(S("text-opacity-",["25","50","75","100"])),_(S("fs-",["1","2","3","4","5","6"])),_(S("text-decoration-",["none","underline","line-through"]))],parts:["textalign"]},{key:"typography",labelKey:"inline_style.section_typography",properties:[h("font-family",{labelKey:"inline_style.prop_font_family"}),h("font-weight",{labelKey:"inline_style.prop_font_weight",type:"select",values:["100","200","300","400","500","600","700","800","900","normal","bold","lighter","bolder"]}),h("font-style",{labelKey:"inline_style.prop_font_style",type:"select",values:["normal","italic","oblique"]}),h("line-height",{labelKey:"inline_style.prop_line_height"}),h("letter-spacing",{labelKey:"inline_style.prop_letter_spacing"}),h("text-transform",{labelKey:"inline_style.prop_text_transform",type:"select",values:["none","uppercase","lowercase","capitalize"]}),h("text-decoration",{labelKey:"inline_style.prop_text_decoration",type:"select",values:["none","underline","line-through","overline"]})],catalog:[_(S("fw-",["lighter","light","normal","medium","semibold","bold","bolder"])),_(S("fst-",["italic","normal"])),_(S("lh-",["1","sm","base","lg"])),_(S("text-",["lowercase","uppercase","capitalize"])),_(["font-monospace"],!1),_(["text-wrap","text-nowrap"]),_(["text-break"],!1)],parts:[]},{key:"display",labelKey:"inline_style.section_display",properties:[h("display",{labelKey:"inline_style.prop_display",type:"select",values:["none","block","inline","inline-block","flex","inline-flex","grid","inline-grid"]}),h("opacity",{labelKey:"inline_style.prop_opacity"}),h("overflow",{labelKey:"inline_style.prop_overflow",type:"select",values:["visible","hidden","auto","scroll","clip"]}),h("visibility",{labelKey:"inline_style.prop_visibility",type:"select",values:["visible","hidden"]})],catalog:[_(S("opacity-",["0","25","50","75","100"])),_(S("overflow-",["auto","hidden","visible","scroll"])),_(["visible","invisible"])],parts:["display"]},{key:"flex",labelKey:"inline_style.section_flex",properties:[],catalog:[_(["vstack","hstack"],!0,["row"])],parts:["flex"]},{key:"position",labelKey:"inline_style.section_position",properties:[h("position",{labelKey:"inline_style.prop_position",type:"select",values:["static","relative","absolute","fixed","sticky"]}),h("top",{labelKey:"inline_style.prop_top",notOn:B}),h("right",{labelKey:"inline_style.prop_right",notOn:B}),h("bottom",{labelKey:"inline_style.prop_bottom",notOn:B}),h("left",{labelKey:"inline_style.prop_left",notOn:B}),h("z-index",{labelKey:"inline_style.prop_z_index"})],catalog:[_(S("position-",["static","relative","absolute","fixed","sticky"])),_(S("top-",["0","50","100"])),_(S("bottom-",["0","50","100"])),_(S("start-",["0","50","100"])),_(S("end-",["0","50","100"])),_(["translate-middle","translate-middle-x","translate-middle-y"]),_(["z-n1","z-0","z-1","z-2","z-3"]),_(["fixed-top","fixed-bottom"])],parts:["float","sticky"]},{key:"custom",labelKey:"inline_style.section_custom",properties:[],catalog:[],parts:[],custom:!0}];function Ke(e){return fe.filter(function(t){return t.key===e})[0]||null}function le(e,t){return e.onlyOn&&e.onlyOn.indexOf(t)===-1?!1:e.notOn.indexOf(t)===-1}var re="(?:(?:sm|md|lg|xl|xxl)-)?",dt="(?:[0-5]|auto)",ft="(?:"+L.join("|")+"|black|white)",mt="(?:"+L.join("|")+"|body|body-secondary|body-tertiary|white|black|transparent)",yt="(?:"+L.join("|")+"|body|body-secondary|body-tertiary|white|black|muted|black-50|white-50)",pe="border(?:-(?:top|end|bottom|start))?(?:-0)?",Ae="(?:"+L.join("|")+")-subtle",gt="(?:"+L.join("|")+"|body)-emphasis",Te="text-bg-(?:"+L.join("|")+")",de="sticky-"+re;function z(e,t){var n={top:"[ty]?",bottom:"[by]?",left:"[sx]?",right:"[ex]?"}[t];return new RegExp("^"+e+n+"-"+re+dt+"$")}var ht={width:/^(?:w-(?:25|50|75|100|auto)|vw-100)$/,height:/^(?:h-(?:25|50|75|100|auto)|vh-100)$/,"max-width":/^mw-100$/,"max-height":/^mh-100$/,"min-width":/^min-vw-100$/,"min-height":/^min-vh-100$/,"margin-top":z("m","top"),"margin-right":z("m","right"),"margin-bottom":z("m","bottom"),"margin-left":z("m","left"),"padding-top":z("p","top"),"padding-right":z("p","right"),"padding-bottom":z("p","bottom"),"padding-left":z("p","left"),"border-width":new RegExp("^(?:"+pe+"|border-[1-5])$"),"border-style":new RegExp("^"+pe+"$"),"border-color":new RegExp("^(?:"+pe+"|border-"+ft+"|border-"+Ae+")$"),"border-radius":/^rounded(?:-(?:[0-5]|circle|pill|top|end|bottom|start))?$/,"box-shadow":/^shadow(?:-(?:none|sm|lg))?$/,"background-color":new RegExp("^(?:bg-"+mt+"|bg-"+Ae+"|"+Te+")$"),"background-image":/^bg-gradient$/,color:new RegExp("^(?:text-"+yt+"|text-"+gt+"|"+Te+")$"),"font-size":/^fs-[1-6]$/,"text-align":new RegExp("^text-"+re+"(?:start|center|end)$"),"text-decoration":/^text-decoration-(?:none|underline|line-through)$/,"font-family":/^font-monospace$/,"font-weight":/^fw-(?:lighter|light|normal|medium|semibold|bold|bolder)$/,"font-style":/^fst-(?:italic|normal)$/,"line-height":/^lh-(?:1|sm|base|lg)$/,"text-transform":/^text-(?:lowercase|uppercase|capitalize)$/,display:new RegExp("^(?:d-"+re+"(?:none|inline|inline-block|block|grid|inline-grid|table|table-row|table-cell|flex|inline-flex)|vstack|hstack)$"),opacity:/^opacity-(?:0|25|50|75|100)$/,overflow:/^overflow-(?:auto|hidden|visible|scroll)$/,visibility:/^(?:visible|invisible)$/,position:new RegExp("^(?:position-(?:static|relative|absolute|fixed|sticky)|fixed-(?:top|bottom)|"+de+"(?:top|bottom))$"),top:new RegExp("^(?:top-(?:0|50|100)|fixed-top|"+de+"top)$"),bottom:new RegExp("^(?:bottom-(?:0|50|100)|fixed-bottom|"+de+"bottom)$"),left:/^start-(?:0|50|100)$/,right:/^end-(?:0|50|100)$/,"z-index":/^z-(?:n1|[0-3])$/};function Le(e,t){var n=ht[e];return n&&t.filter(function(i){return n.test(i)})[0]||null}function vt(e,t){var n={};return Object.keys(t||{}).forEach(function(i){Ke(i)||e.warn('inline_style.sections: there is no "'+i+'" section: ignored')}),fe.forEach(function(i){var l=t&&t[i.key]!==void 0?t[i.key]:!0;if(l!==!1){var o=i.properties.map(function(d){return d.name}),u=i.properties,c=!0;l&&typeof l=="object"&&(Array.isArray(l.properties)&&(l.properties.forEach(function(d){o.indexOf(d)===-1&&e.warn("inline_style.sections."+i.key+': "'+d+'" is not one of its properties: ignored')}),u=l.properties.filter(function(d){return o.indexOf(d)!==-1}).map(function(d){return i.properties[o.indexOf(d)]})),l.catalog===!1&&(c=!1)),n[i.key]={section:i,properties:u,catalog:c}}}),n}function Pe(e){var t=e.settings.inline_style||{};return{sections:vt(e,t.sections),spacing:t.spacing,visibility:t.visibility}}var je=new WeakMap,bt=0;function _t(e){return(e.getAttribute("class")||"").split(/\s+/).filter(Boolean)}function ze(e,t,n,i){var l=String(i==null?"":i).trim(),o=/\s*!\s*important\s*$/i.exec(l),u;return o&&(l=l.slice(0,o.index).trim(),u="important"),e.setHostStyle(t,n,l,u)}function Ne(e,t,n){$(e,"is-invalid",!t),t?e.removeAttribute("title"):e.setAttribute("title",n.t("inline_style.invalid"))}function me(e,t){R(e,"is-invalid")||(e.value=t)}function X(e){return g("input",{type:"text",class:"form-control form-control-sm "+(e||"")})}var xt=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i;function Re(e){var t=xt.exec(e.trim());if(!t)return null;var n=t[1];return n.length===3&&(n=n.split("").map(function(i){return i+i}).join("")),"#"+n.toLowerCase()}function Me(e){var t=g("div",{class:"input-group input-group-sm ge-inline-style-color"}),n=t.appendChild(g("input",{type:"color",class:"form-control form-control-color"})),i=t.appendChild(X());return n.addEventListener("input",function(){H(i,"is-invalid"),i.value=n.value,e(n.value,i)}),i.addEventListener("change",function(){var l=Re(i.value);l&&(n.value=l),e(i.value,i)}),{element:t,set:function(l){me(i,l);var o=Re(l);o&&(n.value=o)}}}var wt=/^url\(\s*(["']?)(.*)\1\s*\)$/i;function Et(e){var t=wt.exec(e.trim());return t?t[1]?t[2].replace(/\\(["\\])/g,"$1"):t[2]:e}function Ct(e){return e=e.trim(),e===""||/^(?:none|inherit|initial|unset|revert)$/i.test(e)||/^[a-z-]+\(/i.test(e)?e:'url("'+e.replace(/(["\\])/g,"\\$1")+'")'}function St(e){for(var t=[],n=0,i="",l=0;l<e.length;l++){var o=e.charAt(l);o==="("&&n++,o===")"&&n--,n===0&&(o===" "||o===",")?(i&&t.push(i),o===","&&t.push(","),i=""):i+=o}return i&&t.push(i),t}var Ot=/^-?(?:\d*\.)?\d+(?:[a-z%]+)?$/i,$e=[{name:"x",labelKey:"inline_style.shadow_x"},{name:"y",labelKey:"inline_style.shadow_y"},{name:"blur",labelKey:"inline_style.shadow_blur"},{name:"spread",labelKey:"inline_style.shadow_spread"}];function Be(e,t){if(e=e.trim(),e==="")return{inset:!1,lengths:[],color:""};if(/var\(/i.test(e))return null;var n=St(e);if(n.indexOf(",")!==-1)return null;var i=!1,l=[],o=[];return n.forEach(function(u){t&&u.toLowerCase()==="inset"?i=!0:Ot.test(u)?l.push(u):o.push(u)}),o.length>1||l.length<2||l.length>(t?4:3)||o.length&&/^(?:none|inherit|initial|unset|revert)$/i.test(o[0])?null:{inset:i,lengths:l,color:o[0]||""}}function kt(e,t){for(var n=e.lengths.slice(),i=n.length-1;i>=0;i--)n[i]===""&&n.slice(i+1).some(Boolean)&&(n[i]="0");if(n=n.filter(Boolean),!n.length&&!e.color&&!e.inset)return"";for(;n.length<2;)n.push("0");return(t&&e.inset?"inset ":"")+n.join(" ")+(e.color?" "+e.color:"")}function At(e,t,n,i){var l=n==="box-shadow",o=g("div",{class:"ge-inline-style-shadow"}),u=!1;function c(f,x){var O=ze(e,t,n,f);return Ne(x,O,e),O&&i(),O}function d(f){o.innerHTML="";var x=o.appendChild(g("div",{class:"ge-inline-style-shadow-builder"})),O=l?$e:$e.slice(0,3),s=O.map(function(C,k){var K=x.appendChild(g("label",{class:"ge-inline-style-shadow-part"}));K.appendChild(g("span",{class:"ge-inline-style-shadow-label"},e.t(C.labelKey)));var A=K.appendChild(X("ge-inline-style-shadow-"+C.name));return A.value=f.lengths[k]||"",A}),r=x.appendChild(g("label",{class:"ge-inline-style-shadow-part ge-inline-style-shadow-color"}));r.appendChild(g("span",{class:"ge-inline-style-shadow-label"},e.t("inline_style.shadow_color")));var a=Me(function(){v()});r.appendChild(a.element),a.set(f.color);var p=null;if(l){var w=x.appendChild(g("label",{class:"form-check ge-inline-style-shadow-inset"}));p=w.appendChild(g("input",{type:"checkbox",class:"form-check-input"})),w.appendChild(g("span",{class:"form-check-label"},e.t("inline_style.shadow_inset"))),p.checked=f.inset,p.addEventListener("change",function(){v()})}s.forEach(function(C){C.addEventListener("change",function(){v()})});var b=o.appendChild(g("a",{href:"#",class:"ge-inline-style-shadow-mode"},e.t("inline_style.shadow_text_mode")));b.addEventListener("click",function(C){C.preventDefault(),u=!0,y()});function v(){var C=kt({inset:p?p.checked:!1,lengths:s.map(function(k){return k.value.trim()}),color:N(a.element,'input[type="text"]').value.trim()},l);c(C,s[0])}}function m(f){o.innerHTML="";var x=o.appendChild(X("ge-inline-style-shadow-text"));if(x.value=f,x.addEventListener("change",function(){if(x.value.trim()===""){c("",x)&&(u=!1,y());return}c(x.value,x)}),Be(f,l)){var O=o.appendChild(g("a",{href:"#",class:"ge-inline-style-shadow-mode"},e.t("inline_style.shadow_builder_mode")));O.addEventListener("click",function(s){s.preventDefault(),u=!1,y()})}}var E=null;function y(){if(!o.querySelector(".is-invalid")){var f=e.hostStyle(t,n).value,x=Be(f,l);f===E&&o.firstChild&&u===!!o.querySelector(".ge-inline-style-shadow-text")||(E=f,u||!x?(u=!!f||u,m(f)):d(x))}}return{element:o,render:y,value:function(){return e.hostStyle(t,n).value}}}function He(e,t,n,i){var l=g("div",{class:"ge-inline-style-field","data-ge-inline-style-property":n.name}),o=l.appendChild(g("label",{class:"ge-inline-style-label"},e.t(n.labelKey))),u;function c(){return e.hostStyle(t,n.name).value}function d(s,r){var a=ze(e,t,n.name,s);Ne(r,a,e),a&&i()}if(n.type==="select"){var m=l.appendChild(g("select",{class:"form-select form-select-sm"}));m.addEventListener("change",function(){d(m.value,m)}),u=function(){var s=c(),r=n.values.slice();s&&r.indexOf(s)===-1&&r.push(s),m.innerHTML="",m.appendChild(g("option",{value:""},"")),r.forEach(function(a){m.appendChild(g("option",{value:a},a))}),m.value=s}}else if(n.type==="color"){var E=Me(function(s,r){d(s,r)});l.appendChild(E.element),u=function(){E.set(c())}}else if(n.type==="url"){var y=l.appendChild(X());y.addEventListener("change",function(){d(Ct(y.value),y)}),u=function(){me(y,Et(c()))}}else if(n.type==="shadow"){var f=At(e,t,n.name,i);l.appendChild(f.element),u=f.render}else{var x=l.appendChild(X());x.addEventListener("change",function(){d(x.value,x)}),u=function(){me(x,c())}}var O=l.querySelector("input, select");return O&&(O.id="ge-inline-style-field-"+ ++bt,o.setAttribute("for",O.id)),l.appendChild(g("small",{class:"ge-inline-style-note ge-inline-style-overridden"})),je.set(l,function(){u();var s=c()?Le(n.name,_t(t)):null,r=j(l,".ge-inline-style-overridden");r.textContent=s?e.t("inline_style.overridden",{class:s}):"",F(r,!!s)}),ye(l),l}function ye(e){var t=je.get(e);t&&t()}function De(e){return(e.getAttribute("class")||"").split(/\s+/).filter(Boolean)}function Tt(e,t,n,i){var l=e.detailsOf(t),o=l?N(l,".ge-classes"):null;if(o){var u=De(t).indexOf(i)!==-1,c=o.value.split(/\s+/).filter(Boolean).filter(function(d){return d===i?!1:!(n.exclusive&&!u&&n.classes.indexOf(d)!==-1)});u||c.push(i),o.value=c.join(" "),o.dispatchEvent(new Event("change",{bubbles:!0}))}}function Ie(e,t,n,i){var l=i.filter(function(u){return le(u,n)});if(!l.length)return null;var o=g("div",{class:"ge-inline-style-catalog"});return o.appendChild(g("span",{class:"ge-inline-style-label"},e.t("inline_style.catalog"))),l.forEach(function(u){var c=o.appendChild(g("div",{class:"ge-inline-style-chips"}));u.classes.forEach(function(d){var m=c.appendChild(g("button",{type:"button",class:"btn btn-sm btn-outline-secondary ge-inline-style-chip","data-ge-class":d,"aria-pressed":"false"},d));m.addEventListener("click",function(){Tt(e,t,u,d)})})}),ge(o,t),o}function ge(e,t){var n=De(t);P(e,".ge-inline-style-chip").forEach(function(i){var l=n.indexOf(i.getAttribute("data-ge-class"))!==-1;$(i,"active",l),i.setAttribute("aria-pressed",l?"true":"false")})}function Kt(e){var t=document.createElement("div").style,n=[];t.setProperty(e,"initial");for(var i=0;i<t.length;i++)n.push(t[i]);return n.length?n:[e]}function Fe(e){var t=document.createElement("div").style;return t.cssText=e,t}function Ue(e,t,n,i){var l={};n.forEach(function(m){Kt(m).forEach(function(E){l[E]=!0})});var o=g("div",{class:"ge-inline-style-custom"}),u=o.appendChild(g("textarea",{class:"form-control form-control-sm font-monospace ge-inline-style-custom-css",rows:"4",spellcheck:"false","aria-label":e.t("inline_style.section_custom")}));function c(){for(var m=Fe(e.hostStyle(t)),E=document.createElement("div").style,y=0;y<m.length;y++){var f=m[y];l[f]||E.setProperty(f,m.getPropertyValue(f),m.getPropertyPriority(f))}return E}u.addEventListener("change",function(){var m=c(),E=Fe(u.value),y;for(y=0;y<m.length;y++)E.getPropertyValue(m[y])===""&&e.setHostStyle(t,m[y],"");for(y=0;y<E.length;y++)e.setHostStyle(t,E[y],E.getPropertyValue(E[y]),E.getPropertyPriority(E[y]));d(),i()});function d(){document.activeElement!==u&&(u.value=c().cssText.replace(/; /g,`;
4
+ `))}return d(),{element:o,render:d}}function Lt(e,t){return t==="row"||t==="column"||t==="element"||t==="section"||M(e,"[data-ge-container]")?!0:!!j(e,".ge-tools-drawer.ge-pane-drawer")}function Pt(e,t,n){return n==="plain"&&(n="text"),e.appliesTo.indexOf(n)!==-1?!0:e.appliesTo.indexOf("container")!==-1&&M(t,"[data-ge-container]")}function Rt(e,t,n,i){if(t.panel)return t.panel(n,i);var l=t.families.filter(function(u){return Pt(u,n,i)}).map(function(u){return e.utilityField(n,u.name)});if(l.length<2)return l[0]||null;var o=g("div",{class:"ge-inline-style-part-fields"});return l.forEach(function(u){o.appendChild(u)}),o}function Ge(e,t,n,i){var l=Lt(t,n),o=g("div",{class:"accordion ge-inline-style"}),u=[],c=[],d=[],m=null,E=null,y=function(){s()};function f(r,a){var p=o.appendChild(g("div",{class:"accordion-item","data-ge-inline-style-section":r})),w=p.appendChild(g("h2",{class:"accordion-header"})),b=w.appendChild(g("button",{type:"button",class:"accordion-button collapsed","aria-expanded":"false"},e.t(a))),v=p.appendChild(g("div",{class:"accordion-collapse collapse"})),C=v.appendChild(g("div",{class:"accordion-body"}));return b.addEventListener("click",function(){var k=!R(v,"show");i.state.open=k?r:null,i.opened(i.state.open)}),{entry:p,body:C}}function x(r,a){$(N(r,".accordion-collapse"),"show",a);var p=N(r,".accordion-button");$(p,"collapsed",!a),p.setAttribute("aria-expanded",a?"true":"false")}if(Object.keys(i.sections).forEach(function(r){var a=i.sections[r],p=a.section;if(p.custom){l&&(E=f(r,p.labelKey));return}var w=p.parts.map(function(A){return i.parts[A]?Rt(e,i.parts[A],t,n):null}).filter(Boolean),b=l?a.properties.filter(function(A){return le(A,n)}):[],v=l&&a.catalog?Ie(e,t,n,p.catalog):null;if(!(!w.length&&!b.length&&!v)){var C=f(r,p.labelKey).body;if(w.forEach(function(A){C.appendChild(Z(A,"ge-inline-style-part"))}),b.length){var k=C.appendChild(g("small",{class:"ge-inline-style-note ge-inline-style-all-sizes"},e.t("inline_style.all_sizes")));d.push(k);var K=C.appendChild(g("div",{class:"ge-inline-style-fields"}));b.forEach(function(A){var G=He(e,t,A,y);u.push(G),K.appendChild(G)})}v&&(c.push(v),C.appendChild(v))}}),E&&(m=Ue(e,t,u.map(function(r){return r.getAttribute("data-ge-inline-style-property")}),y),E.body.appendChild(m.element),o.appendChild(E.entry)),!o.children.length)return null;function O(r){P(o,".accordion-item").forEach(function(a){x(a,a.getAttribute("data-ge-inline-style-section")===r)})}O(i.state.open);function s(){u.forEach(ye),c.forEach(function(r){ge(r,t)}),m&&m.render(),d.forEach(function(r){F(r,e.view()!=="all")})}return s(),{element:o,render:s,open:O}}Object.assign(T.locales.en,{"inline_style.section_title":"Style","inline_style.dialog_title":"Style: {kind}","inline_style.section_size":"Size","inline_style.section_spacing":"Spacing","inline_style.section_border":"Border","inline_style.section_background":"Background","inline_style.section_text":"Text","inline_style.section_typography":"Typography","inline_style.section_display":"Display","inline_style.section_flex":"Flex","inline_style.section_position":"Position","inline_style.section_custom":"Custom css","inline_style.all_sizes":"Applies to every size","inline_style.overridden":"The class {class} takes priority over this value","inline_style.invalid":"Not a value this property takes","inline_style.catalog":"Bootstrap classes","inline_style.shadow_x":"X","inline_style.shadow_y":"Y","inline_style.shadow_blur":"Blur","inline_style.shadow_spread":"Spread","inline_style.shadow_color":"Color","inline_style.shadow_inset":"Inset","inline_style.shadow_text_mode":"Edit as text","inline_style.shadow_builder_mode":"Edit with the builder","inline_style.prop_width":"Width","inline_style.prop_height":"Height","inline_style.prop_min_width":"Min width","inline_style.prop_min_height":"Min height","inline_style.prop_max_width":"Max width","inline_style.prop_max_height":"Max height","inline_style.prop_margin_top":"Margin top","inline_style.prop_margin_right":"Margin right","inline_style.prop_margin_bottom":"Margin bottom","inline_style.prop_margin_left":"Margin left","inline_style.prop_padding_top":"Padding top","inline_style.prop_padding_right":"Padding right","inline_style.prop_padding_bottom":"Padding bottom","inline_style.prop_padding_left":"Padding left","inline_style.prop_border_width":"Border width","inline_style.prop_border_style":"Border style","inline_style.prop_border_color":"Border color","inline_style.prop_border_radius":"Border radius","inline_style.prop_box_shadow":"Shadow","inline_style.prop_background_color":"Background color","inline_style.prop_background_image":"Background image","inline_style.prop_background_size":"Background size","inline_style.prop_background_position":"Background position","inline_style.prop_background_repeat":"Background repeat","inline_style.prop_color":"Color","inline_style.prop_font_size":"Font size","inline_style.prop_text_align":"Text align","inline_style.prop_text_shadow":"Text shadow","inline_style.prop_font_family":"Font family","inline_style.prop_font_weight":"Font weight","inline_style.prop_font_style":"Font style","inline_style.prop_line_height":"Line height","inline_style.prop_letter_spacing":"Letter spacing","inline_style.prop_text_transform":"Text transform","inline_style.prop_text_decoration":"Text decoration","inline_style.prop_display":"Display","inline_style.prop_opacity":"Opacity","inline_style.prop_overflow":"Overflow","inline_style.prop_visibility":"Visibility","inline_style.prop_position":"Position","inline_style.prop_top":"Top","inline_style.prop_right":"Right","inline_style.prop_bottom":"Bottom","inline_style.prop_left":"Left","inline_style.prop_z_index":"Z-index"});var Ve=["spacing","textalign","display","flex","float","sticky","drawerflow"];T.utilities["inline-style"]=function(e){var t=Pe(e),n={spacing:be(e,t.spacing),textalign:_e(e),display:xe(e,t.visibility),flex:we(e,t.spacing),float:Ee(e),sticky:Ce(e),drawerflow:Se(e)},i=[],l={sections:t.sections,parts:n,state:{open:null},opened:function(c){i.forEach(function(d){d.accordion.open(c)})}};function o(c){return function(){var d=arguments;Ve.forEach(function(m){n[m][c]&&n[m][c].apply(null,d)})}}var u=o("onRefresh");return{families:Ve.reduce(function(c,d){return c.concat(n[d].families.map(function(m){return Object.assign({},m,{panel:!1})}))},[]),panelSection:function(c,d){var m=Ge(e,c,d,l);return m?(i.push({node:c,accordion:m}),{labelKey:"inline_style.section_title",titleKey:"inline_style.dialog_title",body:m.element}):null},preview:function(c,d,m){return n.spacing.preview(c,d,m)},onRefresh:function(c){u(c),i=i.filter(function(d){return d.accordion.element.isConnected}),i.forEach(function(d){(d.node===c||c.contains(d.node))&&d.accordion.render()})},drawerTools:o("drawerTools"),onDeinit:function(){o("onDeinit")(),i=[]},cleanMarkup:o("cleanMarkup")}};})();