@openmfp/webcomponents 0.20.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mfp-wc-dashboard.js +1 -1
- package/mfp-webcomponents.js +1 -1
- package/package.json +1 -1
package/mfp-wc-dashboard.js
CHANGED
|
@@ -3084,7 +3084,7 @@ design guidelines, please use the \`ui5-button\` component.
|
|
|
3084
3084
|
design guidelines, please use the \`ui5-button\` component.
|
|
3085
3085
|
**Note:** When the slot is not present, a built-in delete button will be displayed.`,since:"1.9.0"},{name:"endContent",description:"Defines the components that should be displayed at the end of the menu item.\n\n**Note:** It is highly recommended to slot only components of type `ui5-button`,`ui5-link`\nor `ui5-icon` in order to preserve the intended design. If there are components added to this slot,\nand there is text set in `additionalText`, it will not be displayed. If there are items added to `items` slot,\nnether `additionalText` nor components added to this slot would be displayed.\n\nThe priority of what will be displayed at the end of the menu item is as follows:\nsub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`.\n\nApplication developers are responsible for ensuring that interactive elements placed in the `endContent` slot\nhave the correct accessibility behaviour, including their enabled or disabled states.\nThe menu does not manage these aspects when the menu item state changes.",since:"2.0.0"}],this.elementRef=b(E1),this.injector=b(V1),this._contentDensityObserver=b(se)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){let t=this.element;for(let o of["accessibilityAttributes","accessibleName","accessibleRole","additionalText","checked","disabled","highlight","icon","loading","loadingDelay","navigated","selected","text","tooltip","type"]){let r=o.replace(/-./g,i=>i[1].toUpperCase());this[r]&&typeof this[r]=="function"&&ie(this.injector,()=>{e0(()=>{let i=this[r]();if(t){if(i===void 0&&t[o])return;t[o]=i}})})}for(let o of["ui5BeforeClose","ui5BeforeOpen","ui5Check","ui5Click","ui5Close","ui5DetailClick","ui5Open"]){let r=o.replace("ui5","").replace(/([A-Z])/g,"-$1").toLowerCase().substring(1);this[o]&&typeof this[o].emit=="function"&&t.addEventListener&&t.addEventListener(r,i=>{this[o].emit(i)})}}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=K1({type:e,selectors:[["ui5-menu-item"],["","ui5-menu-item",""]],inputs:{accessibilityAttributes:[1,"accessibilityAttributes"],accessibleName:[1,"accessibleName"],accessibleRole:[1,"accessibleRole"],additionalText:[1,"additionalText"],checked:[1,"checked"],disabled:[1,"disabled"],highlight:[1,"highlight"],icon:[1,"icon"],loading:[1,"loading"],loadingDelay:[1,"loadingDelay"],navigated:[1,"navigated"],selected:[1,"selected"],text:[1,"text"],tooltip:[1,"tooltip"],type:[1,"type"]},outputs:{ui5BeforeClose:"ui5BeforeClose",ui5BeforeOpen:"ui5BeforeOpen",ui5Check:"ui5Check",ui5Click:"ui5Click",ui5Close:"ui5Close",ui5DetailClick:"ui5DetailClick",ui5Open:"ui5Open"},exportAs:["ui5MenuItem"],features:[j0([ke({supportedContentDensity:[z.COMPACT,z.COZY]})])],ngContentSelectors:RI,decls:1,vars:0,template:function(t,o){t&1&&(P0(),A0(0))},encapsulation:2})}}return e})(),$I=["*"],GI=(()=>{class e{constructor(){this.elementRef=b(E1),this.injector=b(V1),this._contentDensityObserver=b(se)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){this.element}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=K1({type:e,selectors:[["ui5-menu-separator"],["","ui5-menu-separator",""]],exportAs:["ui5MenuSeparator"],features:[j0([ke({supportedContentDensity:[z.COMPACT,z.COZY]})])],ngContentSelectors:$I,decls:1,vars:0,template:function(t,o){t&1&&(P0(),A0(0))},encapsulation:2})}}return e})();Z("action-settings",{pathData:"M0 7c0-.292.094-.531.281-.719A.973.973 0 0 1 1 6h.813a2.68 2.68 0 0 1 .171-.484c.073-.157.151-.318.235-.485l-.594-.562a1.043 1.043 0 0 1-.281-.719c0-.27.093-.5.281-.688l1.438-1.437a.935.935 0 0 1 .687-.281c.292 0 .531.093.719.281l.562.594c.167-.084.328-.162.485-.235A2.68 2.68 0 0 1 6 1.813V1c0-.292.094-.531.281-.719A.973.973 0 0 1 7 0h2c.292 0 .531.094.719.281A.973.973 0 0 1 10 1v.813c.167.062.328.125.484.187.157.063.308.135.454.219l.593-.594a.974.974 0 0 1 .719-.281c.27 0 .5.093.688.281l1.437 1.438a.935.935 0 0 1 .281.687c0 .27-.094.51-.281.719l-.594.593c.167.271.292.584.375.938H15c.292 0 .531.094.719.281A.973.973 0 0 1 16 7v2a.973.973 0 0 1-.281.719A.974.974 0 0 1 15 10h-.844a3.68 3.68 0 0 1-.375.938l.594.593c.188.209.281.448.281.719 0 .27-.094.5-.281.688l-1.438 1.437a.935.935 0 0 1-.687.281.974.974 0 0 1-.719-.281l-.594-.594a3.62 3.62 0 0 1-.453.219 22.56 22.56 0 0 1-.484.188V15a.974.974 0 0 1-.281.719A.973.973 0 0 1 9 16H7a.973.973 0 0 1-.719-.281A.974.974 0 0 1 6 15v-.813a2.683 2.683 0 0 1-.484-.171 19.641 19.641 0 0 1-.485-.235l-.562.594a.973.973 0 0 1-.719.281.94.94 0 0 1-.688-.281l-1.437-1.438a.935.935 0 0 1-.281-.687c0-.27.093-.51.281-.719l.594-.562a20.151 20.151 0 0 1-.235-.485A2.68 2.68 0 0 1 1.813 10H1a.973.973 0 0 1-.719-.281A.973.973 0 0 1 0 9V7Zm1 0v2h1.531c.063.208.12.39.172.547.052.156.11.307.172.453.063.167.14.338.234.516.094.177.204.39.329.64L2.343 12.25l1.406 1.406 1.094-1.094c.354.209.708.386 1.062.532.354.146.719.27 1.094.375V15h2v-1.563c.208-.062.39-.12.547-.171.156-.053.307-.1.453-.141.167-.083.344-.167.531-.25a8.68 8.68 0 0 0 .625-.313l1.094 1.094 1.406-1.406-1.094-1.125c.188-.354.35-.703.485-1.047s.265-.703.39-1.078H15V7h-1.563a9.505 9.505 0 0 0-.874-2.125l1.093-1.125-1.406-1.406-1.094 1.094a7.478 7.478 0 0 0-1.047-.516A9.907 9.907 0 0 0 9 2.562V1H7v1.531l-.516.172c-.156.052-.317.11-.484.172l-.563.25a5.519 5.519 0 0 0-.593.313L3.75 2.343 2.344 3.75l1.094 1.094A12.821 12.821 0 0 0 2.53 7H1Zm4.219 0 .093-.281a3.48 3.48 0 0 1 .22-.375c.083-.125.176-.24.28-.344.209-.208.396-.37.563-.484A3.49 3.49 0 0 1 7 5.187a3.55 3.55 0 0 1 1-.156c.354 0 .688.063 1 .188l.281.093.375.25c.125.084.24.178.344.282a.559.559 0 0 1 .156.156c.271.25.469.583.594 1 .125.313.188.646.188 1s-.063.688-.188 1a2.41 2.41 0 0 1-.594 1 .56.56 0 0 1-.156.156 2.25 2.25 0 0 1-.344.281l-.375.25-.281.094a2.665 2.665 0 0 1-1 .188 3.55 3.55 0 0 1-1-.156 3.454 3.454 0 0 1-.625-.329A4.164 4.164 0 0 1 5.812 10a2.249 2.249 0 0 1-.28-.344 3.496 3.496 0 0 1-.22-.375L5.22 9a2.667 2.667 0 0 1-.188-1c0-.354.063-.688.188-1Zm.812 1c0 .354.089.682.266.984A1.9 1.9 0 0 0 7 9.688c.292.187.625.28 1 .28.125 0 .292-.02.5-.062a2.42 2.42 0 0 0 .656-.328c.188-.135.354-.328.5-.578.188-.292.281-.625.281-1 0-.396-.093-.73-.28-1a1.843 1.843 0 0 0-.5-.578 2.42 2.42 0 0 0-.657-.328A2.69 2.69 0 0 0 8 6.03c-.375 0-.708.094-1 .282a1.897 1.897 0 0 0-.703.703c-.177.302-.266.63-.266.984Z",ltr:!1,viewBox:"0 0 16 16",accData:n_,collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});Z("action-settings",{pathData:"M8.549 0a1.757 1.757 0 0 1 1.568 1.49l.121.805a.251.251 0 0 0 .123.18l1.238.715a.252.252 0 0 0 .217.017l.755-.298a1.75 1.75 0 0 1 2.156.754v.001l.387.673a1.75 1.75 0 0 1-.423 2.244l-.617.49a.251.251 0 0 0-.094.196v1.465c0 .076.035.148.094.196l.616.49c.677.54.858 1.495.425 2.245l-.387.673h-.001a1.75 1.75 0 0 1-2.155.755l-.757-.298a.251.251 0 0 0-.217.016l-1.238.715a.251.251 0 0 0-.122.18l-.12.806A1.75 1.75 0 0 1 8.387 16H7.61a1.75 1.75 0 0 1-1.698-1.333l-.16-1.013a.25.25 0 0 0-.122-.18l-1.184-.684a.251.251 0 0 0-.216-.016l-.803.317a1.75 1.75 0 0 1-2.156-.754l-.387-.675-.001.001a1.753 1.753 0 0 1 .425-2.244l.695-.555A.25.25 0 0 0 2.1 8.67V7.33a.25.25 0 0 0-.095-.195L1.31 6.58a1.753 1.753 0 0 1-.425-2.244l.388-.674a1.75 1.75 0 0 1 2.156-.754l.802.317c.07.027.15.02.216-.017l1.185-.685a.25.25 0 0 0 .122-.18l.16-1.011A1.75 1.75 0 0 1 7.611 0h.938Zm-.982 1.504a.25.25 0 0 0-.19.164l-.14.9a1.75 1.75 0 0 1-.855 1.255l-1.185.685a1.752 1.752 0 0 1-1.516.113l-.803-.315a.25.25 0 0 0-.307.107l-.388.673a.253.253 0 0 0 .06.321l.696.555c.416.332.66.835.66 1.368v1.34a1.75 1.75 0 0 1-.66 1.368l-.695.555a.251.251 0 0 0-.061.321l.387.674a.25.25 0 0 0 .308.107l.802-.315a1.752 1.752 0 0 1 1.517.112l1.185.685c.461.266.775.729.854 1.256l.14.9a.25.25 0 0 0 .235.168h.777a.25.25 0 0 0 .246-.213l.121-.806a1.75 1.75 0 0 1 .855-1.255l1.238-.716a1.751 1.751 0 0 1 1.516-.114l.757.298c.1.04.213.01.28-.07l.415-.71a.25.25 0 0 0-.06-.321l-.617-.492a1.751 1.751 0 0 1-.66-1.369V7.267c0-.533.244-1.037.66-1.369l.616-.49a.25.25 0 0 0 .06-.321l-.387-.675a.249.249 0 0 0-.307-.106l-.758.297a1.75 1.75 0 0 1-1.515-.114L9.61 3.773a1.75 1.75 0 0 1-.855-1.255l-.121-.805a.25.25 0 0 0-.201-.21h-.866ZM8 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 1.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z",ltr:!1,viewBox:"0 0 16 16",accData:n_,collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});Z("menu2",{pathData:"M1 4.01a.96.96 0 0 1-.703-.298A.969.969 0 0 1 0 3.005c0-.293.099-.534.297-.722A.985.985 0 0 1 1 2h14a.97.97 0 0 1 .719.283.981.981 0 0 1 .281.722.996.996 0 0 1-.281.707.944.944 0 0 1-.719.298H1Zm0 4.995c-.27 0-.505-.1-.703-.298A.969.969 0 0 1 0 8c0-.293.099-.534.297-.723A.985.985 0 0 1 1 6.995h14a.97.97 0 0 1 .719.282c.187.189.281.43.281.723a.996.996 0 0 1-.281.707.944.944 0 0 1-.719.298H1ZM1 14c-.27 0-.505-.1-.703-.298A.969.969 0 0 1 0 12.995c0-.293.099-.534.297-.723A.986.986 0 0 1 1 11.99h14c.292 0 .531.095.719.283.187.189.281.43.281.723a.996.996 0 0 1-.281.707A.945.945 0 0 1 15 14H1Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});Z("menu2",{pathData:"M15.25 12.5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5Zm0-5.5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5Zm0-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});Z("user-edit",{pathData:"M4.723 12H0v-2a4.016 4.016 0 0 1 2.44-3.688A3.883 3.883 0 0 1 4.004 6h1a2.897 2.897 0 0 1-2.126-.875A2.892 2.892 0 0 1 2.002 3c0-.833.292-1.542.876-2.125A2.897 2.897 0 0 1 5.005 0c.834 0 1.543.292 2.127.875.584.583.876 1.292.876 2.125s-.292 1.542-.876 2.125A2.897 2.897 0 0 1 5.005 6h1c.647 0 1.242.146 1.784.438a4.34 4.34 0 0 1 1.376 1.156l-.72.687a2.927 2.927 0 0 0-1.047-.937A2.9 2.9 0 0 0 6.006 7H4.004c-.834 0-1.543.292-2.127.875A2.892 2.892 0 0 0 1 10v1h4.723l-1 1Zm-.281 4a8.93 8.93 0 0 0 .25-.625c.125-.333.25-.688.375-1.063.084-.208.162-.427.235-.656.073-.229.162-.479.266-.75l8.164-8.125a.479.479 0 0 1 .344-.156c.125 0 .24.052.344.156l1.408 1.407c.23.229.23.458 0 .687l-8.133 8.156c-.02.021-.198.084-.532.188-.333.104-.709.208-1.126.312-.459.167-.99.323-1.595.469Zm.563-11c.542 0 1.011-.198 1.408-.594A1.92 1.92 0 0 0 7.007 3a1.92 1.92 0 0 0-.594-1.406A1.925 1.925 0 0 0 5.005 1a1.91 1.91 0 0 0-1.423.594A1.947 1.947 0 0 0 3.002 3c0 .542.194 1.01.58 1.406.385.396.86.594 1.423.594Zm1.408 8.469.719.687L12.794 8.5l-.688-.688-5.693 5.657Zm6.38-6.375.72.718 1.252-1.28-.689-.688-1.282 1.25Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});Z("user-edit",{pathData:"M10.798 7.543a.749.749 0 0 1 1.002.05l1.583 1.585a.75.75 0 0 1 .002 1.06l-5.53 5.542a.75.75 0 0 1-.53.22H5.742a.75.75 0 0 1-.749-.75v-1.583c0-.199.08-.39.22-.53l5.586-5.594ZM6.49 13.977v.523h.525l4.78-4.792-.524-.523-4.781 4.792ZM5.99 0a3.997 3.997 0 0 1 3.994 4 3.996 3.996 0 0 1-3.638 3.983C6.108 8 5.97 8 5.789 8c-2.375 0-4.291 1.911-4.291 4.25v.25h.749a.75.75 0 0 1 0 1.5H.749A.75.75 0 0 1 0 13.25v-1c0-2.323 1.387-4.319 3.378-5.227A3.992 3.992 0 0 1 1.997 4c0-2.21 1.788-4 3.994-4Zm7.526 5c.199 0 .39.078.53.219l1.584 1.584a.75.75 0 0 1 .002 1.06l-.787.791a.749.749 0 0 1-1.06.002l-1.583-1.584a.75.75 0 0 1-.002-1.06l.787-.791a.746.746 0 0 1 .53-.221ZM5.991 1.5A2.498 2.498 0 0 0 3.495 4c0 1.38 1.117 2.5 2.496 2.5A2.498 2.498 0 0 0 8.487 4c0-1.38-1.118-2.5-2.496-2.5Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});D0={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"},y=class{},fe=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0&&window.matchMedia("(any-pointer: coarse)").matches||navigator.msMaxTouchPoints>0),R0=class{};UI=(()=>{class e{constructor(t,o,r){this.host=t,this.dir=o,this.option=r,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){if(this.option.element)try{this.el=this.option.element instanceof HTMLElement?this.option.element:this.host.querySelector(this.option.element)}catch(t){this.option.element=void 0,console.error("Query for resizeable handle failed, falling back",t)}return this.el||(this.el=document.createElement("div"),this.host.appendChild(this.el)),this.el.classList.add("ui-resizable-handle"),this.el.classList.add(`${e.prefix}${this.dir}`),this.el.addEventListener("mousedown",this._mouseDown),fe&&(this.el.addEventListener("touchstart",pr),this.el.addEventListener("pointerdown",vr)),this}destroy(){return this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),fe&&(this.el.removeEventListener("touchstart",pr),this.el.removeEventListener("pointerdown",vr)),this.option.element||this.host.removeChild(this.el),this}_mouseDown(t){this.mouseDownEvent=t,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),fe&&(this.el.addEventListener("touchmove",fr),this.el.addEventListener("touchend",Cr)),t.stopPropagation(),t.preventDefault()}_mouseMove(t){let o=this.mouseDownEvent;this.moving?this._triggerEvent("move",t):Math.abs(t.x-o.x)+Math.abs(t.y-o.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",t),document.addEventListener("keydown",this._keyEvent)),t.stopPropagation()}_mouseUp(t){this.moving&&(this._triggerEvent("stop",t),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),fe&&(this.el.removeEventListener("touchmove",fr),this.el.removeEventListener("touchend",Cr)),delete this.moving,delete this.mouseDownEvent,t.stopPropagation(),t.preventDefault()}_keyEvent(t){t.key==="Escape"&&(this.host.gridstackNode?.grid?.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(t,o){let r=this.option;return r[t]&&r[t](o),this}}return e.prefix="ui-resizable-",e})(),gn=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,a){this._eventRegister[e]=a}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){this._eventRegister={}}triggerEvent(e,a){if(!this.disabled&&this._eventRegister[e])return this._eventRegister[e](a)}},jI=(()=>{class e extends gn{constructor(t,o={}){super(),this.el=t,this.option=o,this.rectScale={x:1,y:1},this._ui=()=>{let r=this.el.parentElement.getBoundingClientRect(),i={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,right:this.originalRect.right,top:this.originalRect.top-this.scrolled},n=this.temporalRect||i;return{position:{left:this.option.rtl?(r.right-n.right)*this.rectScale.x:(n.left-r.left)*this.rectScale.x,top:(n.top-r.top)*this.rectScale.y},size:{width:n.width*this.rectScale.x,height:n.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(!!this.option.autoHide),this._setupHandlers()}on(t,o){super.on(t,o)}off(t){super.off(t)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(!!this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(t){let o=t.handles&&t.handles!==this.option.handles,r=t.autoHide&&t.autoHide!==this.option.autoHide;return Object.assign(this.option,t),o&&(this._removeHandlers(),this._setupHandlers()),r&&this._setupAutoHide(!!this.option.autoHide),this}_setupAutoHide(t){return t?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),y.overResizeElement===this&&delete y.overResizeElement),this}_mouseOver(t){y.overResizeElement||y.dragElement||(y.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(t){y.overResizeElement===this&&(delete y.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=(this.option.handles??"se").split(",").map(t=>t.trim()).map(t=>new UI(this.el,t,{element:this.option.element,start:o=>this._resizeStart(o),stop:o=>this._resizeStop(o),move:o=>this._resizing(o,t)})),this}_resizeStart(t){this.sizeToContent=v.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=v.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=t,this._setupHelper(),this._applyChange();let o=v.initEvent(t,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(o,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",o),this}_resizing(t,o){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(t,o),this._applyChange();let r=v.initEvent(t,{type:"resize",target:this.el});return r.resizeDir=o,r.hasMovedX=this.option.rtl?o.includes("e"):o.includes("w"),r.hasMovedY=o.includes("n"),this.option.resize&&this.option.resize(r,this._ui()),this.triggerEvent("resize",r),this}_resizeStop(t){let o=v.initEvent(t,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(o),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",o),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=e._originStyleProp.map(r=>this.el.style[r]);let t=this.el.parentElement;this.parentOriginStylePosition=t.style.position;let o=v.getValuesFromTransformedElement(t);return this.rectScale={x:o.xScale,y:o.yScale},getComputedStyle(t).position.match(/static/)&&(t.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return e._originStyleProp.forEach((t,o)=>{this.el.style[t]=this.elOriginStyleVal[o]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(t,o){let r=this.startEvent,i={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,right:this.originalRect.right,top:this.originalRect.top-this.scrolled},n=t.clientX-r.clientX,s=this.sizeToContent?0:t.clientY-r.clientY,l=!1,_=!1,d=this.option.rtl;!d&&o.indexOf("e")>-1?i.width+=n:d&&o.indexOf("w")>-1?i.width-=n:!d&&o.indexOf("w")>-1?(i.width-=n,i.left+=n,l=!0):d&&o.indexOf("e")>-1&&(i.width+=n,i.right+=n,l=!0),o.indexOf("s")>-1?i.height+=s:o.indexOf("n")>-1&&(i.height-=s,i.top+=s,_=!0);let c=this._constrainSize(i.width,i.height,l,_);return Math.round(i.width)!==Math.round(c.width)&&(!d&&o.indexOf("w")>-1?i.left+=i.width-c.width:d&&o.indexOf("e")>-1&&(i.right-=i.width-c.width),i.width=c.width),Math.round(i.height)!==Math.round(c.height)&&(o.indexOf("n")>-1&&(i.top+=i.height-c.height),i.height=c.height),i}_constrainSize(t,o,r,i){let n=this.option,s=(r?n.maxWidthMoveLeft:n.maxWidth)||Number.MAX_SAFE_INTEGER,l=(n.minWidth??0)/this.rectScale.x||t,_=(i?n.maxHeightMoveUp:n.maxHeight)||Number.MAX_SAFE_INTEGER,d=(n.minHeight??0)/this.rectScale.y||o;return{width:Math.min(s,Math.max(l,t)),height:Math.min(_,Math.max(d,o))}}_applyChange(){let t={left:0,right:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){let{left:r,right:i,top:n}=this.el.parentElement.getBoundingClientRect();t={left:r,right:i,top:n,width:0,height:0}}if(!this.temporalRect)return this;let o=t;return Object.entries(this.temporalRect).forEach(([r,i])=>{if(this.option.rtl?r==="left":r==="right")return;let n=r==="width"||r==="left"||r==="right"?this.rectScale.x:r==="height"||r==="top"?this.rectScale.y:1,s;r==="right"?s=(t.right-i)*this.rectScale.x+"px":s=(i-o[r])*n+"px",this.el.style[r]=s}),this}_removeHandlers(){return this.handlers.forEach(t=>t.destroy()),delete this.handlers,this}}return e._originStyleProp=["width","height","position","left","right","top","opacity","zIndex"],e})(),WI='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle',XI=(()=>{class e extends gn{constructor(t,o={}){super(),this.el=t,this.option=o,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},this._autoScrollTick=()=>{let n=this.helper,s=this._autoScrollContainer;if(!n||!s){this._stopScrolling();return}let l=this._getClipping(n,s);if(l===0){this._stopScrolling();return}if(!this._autoScrollMaxSpeed){let u=window.innerHeight||document.documentElement.clientHeight;this._autoScrollMaxSpeed=Math.max(u/150,4)}let _=Math.min(Math.abs(l)*.5,this._autoScrollMaxSpeed),d=l>0?_:-_,c=s.scrollTop;if(s.scrollTop+=d,s.scrollTop===c){this._stopScrolling();return}this.dragging&&this.lastDrag&&(this._dragFollow(this.lastDrag),this._callDrag(this.lastDrag)),this._autoScrollAnimId=requestAnimationFrame(this._autoScrollTick)};let r=o?.handle?.substring(1),i=t.gridstackNode;this.dragEls=!r||t.classList.contains(r)?[t]:i?.subGrid?[t.querySelector(o.handle)||t]:this.getAllHandles(),this.dragEls.length===0&&(this.dragEls=[t]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}getAllHandles(){return Array.from(this.el.querySelectorAll(this.option.handle)).filter(t=>{if(!(t instanceof HTMLElement))return!1;let o=t.closest(".grid-stack-item");return o===this.el||!o})}on(t,o){super.on(t,o)}off(t){super.off(t)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(t=>{t.addEventListener("mousedown",this._mouseDown),fe&&(t.addEventListener("touchstart",pr),t.addEventListener("pointerdown",vr))}),this.el.classList.remove("ui-draggable-disabled"))}disable(t=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(o=>{o.removeEventListener("mousedown",this._mouseDown),fe&&(o.removeEventListener("touchstart",pr),o.removeEventListener("pointerdown",vr))}),t||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.option,super.destroy()}updateOption(t){return Object.assign(this.option,t),this}refreshHandles(){let t=this.disabled;t||this.disable(!0);let o=this.option?.handle?.substring(1),r=this.el.gridstackNode;this.dragEls=!o||this.el.classList.contains(o)?[this.el]:r?.subGrid?[this.el.querySelector(this.option.handle)||this.el]:this.getAllHandles(),this.dragEls.length===0&&(this.dragEls=[this.el]),t||this.enable()}_mouseDown(t){return t.isTrusted&&(R0.touchHandled&&(R0.touchHandled=!1),y.mouseHandled&&t.timeStamp!==y.mouseHandledTimeStamp&&delete y.mouseHandled),y.mouseHandled||t.button!==0||!this.dragEls.find(o=>o===t.target)&&t.target.closest(WI)||this.option.cancel&&t.target.closest(this.option.cancel)||(this.mouseDownEvent=t,delete this.dragging,delete y.dragElement,delete y.dropElement,delete this._autoScrollMaxSpeed,delete this._autoScrollContainer,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),fe&&t.currentTarget&&(t.currentTarget.addEventListener("touchmove",fr),t.currentTarget.addEventListener("touchend",Cr)),t.preventDefault(),document.activeElement&&document.activeElement.blur(),y.mouseHandled=!0,y.mouseHandledTimeStamp=t.timeStamp),!0}_callDrag(t){if(!this.dragging)return;let o=v.initEvent(t,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(o,this.ui()),this.triggerEvent("drag",o)}_mouseMove(t){let o=this.mouseDownEvent;if(this.lastDrag=t,this.dragging)if(this._dragFollow(t),y.pauseDrag){let r=Number.isInteger(y.pauseDrag)?y.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(t),r)}else this._callDrag(t);else if(Math.abs(t.x-o.x)+Math.abs(t.y-o.y)>3){this.dragging=!0,y.dragElement=this;let r=this.el.gridstackNode?.grid;r?y.dropElement=r.el.ddElement?.ddDroppable:delete y.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=v.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(t,this.el,this.helperContainment),this._setupHelperStyle(t);let i=v.initEvent(t,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(i,this.ui()),this.triggerEvent("dragstart",i),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(t){if(this._stopScrolling(),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),fe&&t.currentTarget&&(t.currentTarget.removeEventListener("touchmove",fr,!0),t.currentTarget.removeEventListener("touchend",Cr,!0)),this.dragging){delete this.dragging,delete this.el.gridstackNode?._origRotate,document.removeEventListener("keydown",this._keyEvent),y.dropElement?.el===this.el.parentElement&&delete y.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper&&this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();let o=v.initEvent(t,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(o),this.triggerEvent("dragstop",o),y.dropElement&&y.dropElement.drop(t)}delete this.helper,delete this.mouseDownEvent,delete y.dragElement,delete y.dropElement,delete y.mouseHandled,delete y.mouseHandledTimeStamp,t.preventDefault()}_keyEvent(t){let o=this.el.gridstackNode,r=o?.grid||y.dropElement?.el?.gridstack;if(t.key==="Escape")o&&o._origRotate&&(o._orig=o._origRotate,delete o._origRotate),r?.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(o&&r&&(t.key==="r"||t.key==="R")){if(!v.canBeRotated(o))return;o._origRotate=o._origRotate||B({},o._orig),delete o._moving,r.setAnimation(!1).rotate(o.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetX}).setAnimation(),o._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,o.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",v.swap(o._orig,"w","h"),delete o._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let t=this.el;return typeof this.option.helper=="function"?t=this.option.helper(this.el):this.option.helper==="clone"&&(t=v.cloneNode(this.el)),t.parentElement||v.appendTo(t,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo??"body"),this.dragElementOriginStyle=e.originStyleProp.map(o=>this.el.style[o]),t}_setupHelperStyle(t){this.helper.classList.add("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");let o=this.helper.style;return o.pointerEvents="none",o.width=this.dragOffset.width+"px",o.height=this.dragOffset.height+"px",o.willChange="left, right, top",o.position="fixed",this._dragFollow(t),o.transition="none",setTimeout(()=>{this.helper&&(o.transition=null)},0),this}_removeHelperStyle(){if(this.helper.classList.remove("ui-draggable-dragging"),(this.el._gridstackNodeOrig||this.el.gridstackNode)?.grid?.el.classList.remove("grid-stack-dragging"),!this.helper?.gridstackNode?._isAboutToRemove&&this.dragElementOriginStyle){let t=this.helper,o=this.dragElementOriginStyle,r=e.originStyleProp.indexOf("transition"),i=o[r]||null;t.style.transition=o[r]="none";let n=t.style;e.originStyleProp.forEach((s,l)=>n[s]=o[l]||null),setTimeout(()=>t.style.transition=i||"",50)}return delete this.dragElementOriginStyle,this}_dragFollow(t){let o=this.helper.style,r=this.dragOffset;this.option.rtl?(o.right=(window.innerWidth-t.clientX+r.offsetX)*this.dragTransform.xScale+"px",o.left&&(o.left="")):(o.left=(t.clientX+r.offsetX)*this.dragTransform.xScale+"px",o.right&&(o.right="")),o.top=(t.clientY+r.offsetTop)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(t,o,r){let i=0,n=0;r&&(i=this.dragTransform.xOffset,n=this.dragTransform.yOffset);let s=o.getBoundingClientRect(),l=this.option.rtl?s.right:s.left,_=this.option.rtl?t.clientX-s.right+i:-t.clientX+s.left-i;return{x:l,top:s.top,offsetX:_,offsetTop:-t.clientY+s.top-n,width:s.width*this.dragTransform.xScale,height:s.height*this.dragTransform.yScale}}updateScrollPosition(t){this._autoScrollContainer=v.getScrollElement(t),this._getClipping(this.helper,this._autoScrollContainer)===0?this._stopScrolling():this._autoScrollAnimId||(this._autoScrollAnimId=requestAnimationFrame(this._autoScrollTick))}_getClipping(t,o){let r=t.getBoundingClientRect(),i=o.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;if(r.bottom<i.top||r.top>i.bottom)return 0;let s=r.bottom-Math.min(i.bottom,n),l=r.top-Math.max(i.top,0);return l<0?l:s>0?s:0}_stopScrolling(){this._autoScrollAnimId&&(cancelAnimationFrame(this._autoScrollAnimId),delete this._autoScrollAnimId)}ui(){let t=this.el.parentElement.getBoundingClientRect(),o=this.helper.getBoundingClientRect(),r=this.option.rtl?(t.right-o.right)*this.dragTransform.xScale:(o.left-t.left)*this.dragTransform.xScale;return{position:{top:(o.top-t.top)*this.dragTransform.yScale,left:r}}}}return e.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","right","top","minWidth","willChange"],e})(),KI=class extends gn{constructor(e,a={}){super(),this.el=e,this.option=a,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.eventEl=this.el.closest(".grid-stack-item")||this.el,this.enable(),this._setupAccept()}on(e,a){super.on(e,a)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.eventEl.addEventListener("mouseenter",this._mouseEnter),this.eventEl.addEventListener("mouseleave",this._mouseLeave),fe&&(this.eventEl.addEventListener("pointerenter",$8),this.eventEl.addEventListener("pointerleave",G8)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.eventEl.removeEventListener("mouseenter",this._mouseEnter),this.eventEl.removeEventListener("mouseleave",this._mouseLeave),fe&&(this.eventEl.removeEventListener("pointerenter",$8),this.eventEl.removeEventListener("pointerleave",G8)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.assign(this.option,e),this._setupAccept(),this}_mouseEnter(e){if(!y.dragElement||R0.touchHandled&&e.isTrusted||!this._canDrop(y.dragElement.el))return;e.preventDefault(),e.stopPropagation(),y.dragElement._stopScrolling(),y.dropElement&&y.dropElement!==this&&y.dropElement._mouseLeave(e,!0),y.dropElement=this;let a=v.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(a,this._ui(y.dragElement)),this.triggerEvent("dropover",a),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,a=!1){if(!y.dragElement||y.dropElement!==this)return;e.preventDefault(),e.stopPropagation(),a&&y.dragElement._stopScrolling();let t=v.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(t,this._ui(y.dragElement)),this.triggerEvent("dropout",t),y.dropElement===this&&(delete y.dropElement,!a)){let o,r=this.el.parentElement;for(;!o&&r;)o=r.ddElement?.ddDroppable,r=r.parentElement;o&&o._mouseEnter(e)}}drop(e){e.preventDefault();let a=v.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(a,this._ui(y.dragElement)),this.triggerEvent("drop",a)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return B({draggable:e.el},e.ui())}},YI=class Ap{static init(a){return a.ddElement||(a.ddElement=new Ap(a)),a.ddElement}constructor(a){this.el=a}on(a,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(a)>-1?this.ddDraggable.on(a,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(a)>-1?this.ddDroppable.on(a,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(a)>-1&&this.ddResizable.on(a,t),this}off(a){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(a)>-1?this.ddDraggable.off(a):this.ddDroppable&&["drop","dropover","dropout"].indexOf(a)>-1?this.ddDroppable.off(a):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(a)>-1&&this.ddResizable.off(a),this}setupDraggable(a){return this.ddDraggable?this.ddDraggable.updateOption(a):this.ddDraggable=new XI(this.el,a),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(a){return this.ddResizable?this.ddResizable.updateOption(a):this.ddResizable=new jI(this.el,a),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(a){return this.ddDroppable?this.ddDroppable.updateOption(a):this.ddDroppable=new KI(this.el,a),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}},QI=class{resizable(e,a,t,o){return this._getDDElements(e,typeof a=="string"?a:void 0).forEach(r=>{if(a==="disable"||a==="enable")r.ddResizable&&r.ddResizable[a]();else if(a==="destroy")r.ddResizable&&r.cleanResizable();else if(a==="option")r.setupResizable({[t]:o});else{let i=r.el.gridstackNode.grid,n=r.el.getAttribute("gs-resize-handles")||i.opts.resizable.handles||"e,s,se";n==="all"&&(n="n,e,s,w,se,sw,ne,nw");let s=!i.opts.alwaysShowResizeHandle,l=a;r.setupResizable(F(B({},i.opts.resizable),{handles:n,autoHide:s,start:l.start,stop:l.stop,resize:l.resize,rtl:l.rtl}))}}),this}draggable(e,a,t,o){return this._getDDElements(e,typeof a=="string"?a:void 0).forEach(r=>{if(a==="disable"||a==="enable")r.ddDraggable&&r.ddDraggable[a]();else if(a==="destroy")r.ddDraggable&&r.cleanDraggable();else if(a==="option")r.setupDraggable({[t]:o});else{let i=r.el.gridstackNode.grid,n=a;r.setupDraggable(F(B({},i.opts.draggable),{start:n.start,stop:n.stop,drag:n.drag,rtl:n.rtl}))}}),this}dragIn(e,a){return this._getDDElements(e).forEach(t=>t.setupDraggable(a)),this}droppable(e,a,t,o){if(typeof a!="string"){let i=a;typeof i.accept=="function"&&!i._accept&&(i._accept=i.accept,i.accept=n=>i._accept(n))}let r=typeof a=="string"?a:void 0;return this._getDDElements(e,r).forEach(i=>{a==="disable"||a==="enable"?i.ddDroppable&&i.ddDroppable[a]():a==="destroy"?i.ddDroppable&&i.cleanDroppable():a==="option"?i.setupDroppable({[t]:o}):i.setupDroppable(a)}),this}isDroppable(e){return!!(e?.ddElement?.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){return!!(e?.ddElement?.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){return!!(e?.ddElement?.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,a,t){return this._getDDElements(e).forEach(o=>o.on(a,r=>{t(r,y.dragElement?y.dragElement.el:r.target,y.dragElement?y.dragElement.helper:void 0)})),this}off(e,a){return this._getDDElements(e).forEach(t=>t.off(a)),this}_getDDElements(e,a){let t=e.gridstack||a!=="destroy"&&a!=="disable",o=v.getElements(e);return o.length?o.map(r=>r.ddElement||(t?YI.init(r):null)).filter(r=>!!r):[]}},M0=new QI,X0=class q{static init(a={},t=".grid-stack"){if(typeof document>"u")return null;let o=q.getGridElement(t);return o?(o.gridstack||(o.gridstack=new q(o,v.cloneDeep(a))),o.gridstack):(console.error(typeof t=="string"?'GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
|
|
3086
3086
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(a={},t=".grid-stack"){let o=[];return typeof document>"u"||(q.getGridElements(t).forEach(r=>{r.gridstack||(r.gridstack=new q(r,v.cloneDeep(a))),o.push(r.gridstack)}),o.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
|
|
3087
|
-
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),o}static addGrid(a,t={}){if(!a)return null;let o=a;if(o.gridstack){let r=o.gridstack;return t&&(r.opts=B(B({},r.opts),t)),t.children!==void 0&&r.load(t.children),r}return(!a.classList.contains("grid-stack")||q.addRemoveCB)&&(q.addRemoveCB?o=q.addRemoveCB(a,t,!0,!0):o=v.createDiv(["grid-stack",t.class],a)),q.init(t,o)}static registerEngine(a){q.engineClass=a}get placeholder(){if(!this._placeholder){this._placeholder=v.createDiv([this.opts.placeholderClass,D0.itemClass,this.opts.itemClass]);let a=v.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(a.textContent=this.opts.placeholderText)}return this._placeholder}constructor(a,t={}){this.el=a,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},a.gridstack=this,this.opts=t=t||{},a.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);let o=v.toNumber(a.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);let r=t.columnOpts;if(r){let l=r.breakpoints;!r.columnWidth&&!l?.length?delete t.columnOpts:l&&l.length>1?(l.sort((_,d)=>(d.w||0)-(_.w||0)),delete r.columnWidth):r.columnMax=r.columnMax||12}let i=F(B({},v.cloneDeep(D0)),{column:v.toNumber(a.getAttribute("gs-column"))||D0.column,minRow:o||v.toNumber(a.getAttribute("gs-min-row"))||D0.minRow,maxRow:o||v.toNumber(a.getAttribute("gs-max-row"))||D0.maxRow,staticGrid:v.toBool(a.getAttribute("gs-static"))||D0.staticGrid,sizeToContent:v.toBool(a.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||D0.draggable.handle},removableOptions:{accept:t.itemClass||D0.removableOptions.accept,decline:D0.removableOptions.decline}});a.getAttribute("gs-animate")&&(i.animate=v.toBool(a.getAttribute("gs-animate"))),t=v.defaults(t,i),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(t),t.rtl==="auto"&&(t.rtl=a.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");let n=this.el.closest("."+D0.itemClass)?.gridstackNode;if(n&&(n.subGrid=this,this.parentGridNode=n,this.el.classList.add("grid-stack-nested"),n.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial")this.cellHeight(void 0);else{typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==D0.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit);let l=t.cellHeight;delete t.cellHeight,this.cellHeight(l)}t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=fe),this._setStaticClass();let s=t.engineClass||q.engineClass||vn;if(this.engine=new s({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:l=>{l.forEach(_=>{let d=_.el;d&&(_._removeDOM?(d&&d.remove(),delete _._removeDOM):this._writePosAttr(d,_))}),this._updateContainerHeight()}}),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(l=>this._prepareElement(l)),delete this.engine._loading,this.batchUpdate(!1)),t.children){let l=t.children;delete t.children,l.length&&this.load(l)}this.setAnimation(),t.subGridDynamic&&!y.pauseDrag&&(y.pauseDrag=!0),t.draggable?.pause!==void 0&&(y.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(a=this.opts){this.el.classList.add("gs-"+a.column),typeof a.column=="number"&&(this.el.style.setProperty("--gs-column-width",`${100/a.column}%`),this.el.style.setProperty("--gs-columns",String(a.column)))}addWidget(a){if(!a)return;if(typeof a=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(a.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(a);let t,o=a;if(o.grid=this,o.el?t=o.el:q.addRemoveCB?t=q.addRemoveCB(this.el,a,!0,!1):t=this.createWidgetDivs(o),!t)return;if(o=t.gridstackNode,o&&t.parentElement===this.el&&this.engine.nodes.find(i=>i._id===o._id))return t;let r=this._readAttr(t);return v.defaults(a,r),this.engine.prepareNode(a),this.el.appendChild(t),this.makeWidget(t,a),t}createWidgetDivs(a){let t=v.createDiv(["grid-stack-item",this.opts.itemClass]),o=v.createDiv(["grid-stack-item-content"],t);return v.lazyLoad(a)?a.visibleObservable||(a.visibleObservable=new IntersectionObserver(([r])=>{r.isIntersecting&&(a.visibleObservable?.disconnect(),delete a.visibleObservable,q.renderCB(o,a),a.grid?.prepareDragDrop(a.el))}),window.setTimeout(()=>a.visibleObservable?.observe(t))):q.renderCB(o,a),t}makeSubGrid(a,t,o,r=!0){let i=a.gridstackNode;if(i||(i=this.makeWidget(a).gridstackNode),i.subGrid?.el)return i.subGrid;let n,s=this;for(;s&&!n;)n=s.opts?.subGridOpts,s=s.parentGridNode?.grid;t=v.cloneDeep(B(B(F(B({},this.opts),{id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0}),n||{}),t||i.subGridOpts||{})),i.subGridOpts=t;let l=!1;t.column==="auto"&&(l=!0,t.column=Math.max(i.w||1,o?.w||1),delete t.columnOpts);let _=i.el.querySelector(".grid-stack-item-content"),d,c;if(r&&(this._removeDD(i.el),c=F(B({},i),{x:0,y:0}),v.removeInternalForSave(c),delete c.subGridOpts,i.content&&(c.content=i.content,delete i.content),q.addRemoveCB?d=q.addRemoveCB(this.el,c,!0,!1)||void 0:(d=v.createDiv(["grid-stack-item"]),d.appendChild(_),_=v.createDiv(["grid-stack-item-content"],i.el)),this.prepareDragDrop(i.el)),o){let h=l?t.column:i.w,f=i.h+o.h,x=i.el.style;x.transition="none",this.update(i.el,{w:h,h:f}),setTimeout(()=>x.transition="")}let u=i.subGrid=q.addGrid(_,t)||void 0;return o?._moving&&(u._isTemp=!0),l&&(u._autoColumn=!0),r&&u.makeWidget(d,c),o&&(o._moving?window.setTimeout(()=>v.simulateMouseEvent(o._event,"mouseenter",u.el),0):u.makeWidget(i.el,i)),this.resizeToContentCheck(!1,i),u}removeAsSubGrid(a){let t=this.parentGridNode?.grid;if(t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(o=>{o.x=(o.x??0)+(this.parentGridNode.x??0),o.y=(o.y??0)+(this.parentGridNode.y??0),this._removeDD(o.el),o.el.remove(),delete o.el.gridstackNode,t.makeWidget(o.el,o)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,a)){let o=a.el?.gridstackNode;o&&o!==a&&(o._temporaryRemoved=!0),window.setTimeout(()=>{let r=y.dragElement?.lastDrag||a._event;r&&v.simulateMouseEvent(r,"mouseenter",t.el)},0)}}save(a=!0,t=!1,o=q.saveCB,r){let i=this.engine.save(a,o,r);if(i.forEach(n=>{if(a&&n.el&&!n.subGrid&&!o)n.content=n.el.querySelector(".grid-stack-item-content")?.innerHTML,n.content||delete n.content;else if(!a&&!o&&delete n.content,n.subGrid?.el){let s=n.w||n.subGrid.getColumn(),l=n.subGrid.save(a,t,o,s);n.subGridOpts=t?l:{children:l},delete n.subGrid}delete n.el}),t){let n=v.cloneDeep(this.opts);n.marginBottom===n.marginTop&&n.marginRight===n.marginLeft&&n.marginTop===n.marginRight&&(n.margin=n.marginTop,delete n.marginTop,delete n.marginRight,delete n.marginBottom,delete n.marginLeft),n.rtl===(this.el.style.direction==="rtl")&&(n.rtl="auto"),this._isAutoCellHeight&&(n.cellHeight="auto"),this._autoColumn&&(n.column="auto");let s=n._alwaysShowResizeHandle;return delete n._alwaysShowResizeHandle,s!==void 0?n.alwaysShowResizeHandle=s:delete n.alwaysShowResizeHandle,v.removeInternalAndSame(n,D0),n.children=i,n}return i}load(a,t=q.addRemoveCB||!0){a.forEach(d=>{d.w=d.w||d.minW||1,d.h=d.h||d.minH||1}),a=v.sort(a),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let o=0;a.forEach(d=>{o=Math.max(o,(d.x||0)+d.w)}),o>this.engine.defaultColumn&&(this.engine.defaultColumn=o);let r=this.getColumn();o>r&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=a,this.engine.columnChanged(o,r,this.responseLayout),a=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(a,o,!0));let i=q.addRemoveCB;typeof t=="function"&&(q.addRemoveCB=t);let n=[];this.batchUpdate();let s=!this.engine.nodes.length,l=s&&this.opts.animate;l&&this.setAnimation(!1),!s&&t&&[...this.engine.nodes].forEach(d=>{d.id&&(v.find(a,d.id)||(q.addRemoveCB&&q.addRemoveCB(this.el,d,!1,!1),n.push(d),this.removeWidget(d.el,!0,!1)))}),this.engine._loading=!0;let _=[];return this.engine.nodes=this.engine.nodes.filter(d=>d.id&&v.find(a,d.id)?(_.push(d),!1):!0),a.forEach(d=>{let c=d.id?v.find(_,d.id):void 0;if(c){if(v.shouldSizeToContent(c)&&(d.h=c.h),this.engine.nodeBoundFix(d),(d.autoPosition||d.x===void 0||d.y===void 0)&&(d.w=d.w||c.w,d.h=d.h||c.h,this.engine.findEmptyPosition(d)),this.engine.nodes.push(c),v.samePos(c,d)&&this.engine.nodes.length>1&&(this.moveNode(c,F(B({},d),{forceCollide:!0})),v.copyPos(d,c)),this.update(c.el,d),d.subGridOpts?.children){let u=c.el.querySelector(".grid-stack");u&&u.gridstack&&u.gridstack.load(d.subGridOpts.children)}}else t&&this.addWidget(d)}),delete this.engine._loading,this.engine.removedNodes=n,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,i?q.addRemoveCB=i:delete q.addRemoveCB,l&&this.setAnimation(!0,!0),this}batchUpdate(a=!0){return this.engine.batchUpdate(a),a||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(a=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!a||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;let t=this.el.querySelector("."+this.opts.itemClass);if(t){let r=v.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/r)}let o=parseInt(this.el.getAttribute("gs-current-row")||"0");return o?Math.round(this.el.getBoundingClientRect().height/o):this.opts.cellHeight}cellHeight(a){if(a!==void 0&&this._isAutoCellHeight!==(a==="auto")&&(this._isAutoCellHeight=a==="auto",this._updateResizeEvent()),(a==="initial"||a==="auto")&&(a=void 0),a===void 0){let o=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;a=this.cellWidth()+o}let t=v.parseHeight(a);return this.opts.cellHeightUnit===t.unit&&this.opts.cellHeight===t.h?this:(this.opts.cellHeightUnit=t.unit,this.opts.cellHeight=t.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(a=!1){return a&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){let a=this.opts.columnOpts;if(!a||!a.columnWidth&&!a.breakpoints?.length)return!1;let t=this.getColumn(),o=t,r=this._widthOrContainer(!0);if(a.columnWidth)o=Math.min(Math.round(r/a.columnWidth)||1,a.columnMax);else{o=a.columnMax;let i=0;for(;i<a.breakpoints.length&&r<=a.breakpoints[i].w;)o=a.breakpoints[i++].c||t}if(o!==t){let i=a.breakpoints?.find(n=>n.c===o);return this.column(o,i?.layout||a.layout),!0}return!1}compact(a="compact",t=!0){return this.engine.compact(a,t),this._triggerChangeEvent(),this}column(a,t="moveScale"){if(!a||a<1||this.opts.column===a)return this;let o=this.getColumn();return this.opts.column=a,this.engine?(this.engine.column=a,this.el.classList.remove("gs-"+o),this._updateColumnVar(),this.engine.columnChanged(o,a,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=t,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(a=>a.matches("."+this.opts.itemClass)&&!a.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return!!this._ignoreLayoutsNodeChange}destroy(a=!0){return this.el?(this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),a?this.el.parentNode.removeChild(this.el):(this.removeAll(a),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this):this}float(a){return this.opts.float!==a&&(this.opts.float=this.engine.float=a,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(a,t=!1){let o=this.el.getBoundingClientRect(),r;t?r={top:o.top+document.documentElement.scrollTop,left:o.left}:r={top:this.el.offsetTop,left:this.el.offsetLeft};let i=a.left-r.left,n=a.top-r.top,s=o.width/this.getColumn(),l=o.height/parseInt(this.el.getAttribute("gs-current-row")||"0");return{x:Math.floor(i/s),y:Math.floor(n/l)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(a,t,o,r){return this.engine.isAreaEmpty(a,t,o,r)}makeWidget(a,t){let o=q.getElement(a);if(!o||o.gridstackNode)return o;o.parentElement||this.el.appendChild(o),this._prepareElement(o,!0,t);let r=o.gridstackNode;this._updateContainerHeight(),r.subGridOpts&&this.makeSubGrid(o,r.subGridOpts,void 0,!1);let i=!1;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(i=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),i&&delete this._ignoreLayoutsNodeChange,o}on(a,t){return a.indexOf(" ")!==-1?(a.split(" ").forEach(o=>this.on(o,t)),this):(a==="change"||a==="added"||a==="removed"||a==="enable"||a==="disable"?(a==="enable"||a==="disable"?this._gsEventHandler[a]=o=>t(o):this._gsEventHandler[a]=(o=>{o.detail&&t(o,o.detail)}),this.el.addEventListener(a,this._gsEventHandler[a])):a==="drag"||a==="dragstart"||a==="dragstop"||a==="resizestart"||a==="resize"||a==="resizestop"||a==="dropped"||a==="resizecontent"?this._gsEventHandler[a]=t:console.error("GridStack.on("+a+") event not supported"),this)}off(a){return a.indexOf(" ")!==-1?(a.split(" ").forEach(t=>this.off(t)),this):((a==="change"||a==="added"||a==="removed"||a==="enable"||a==="disable")&&this._gsEventHandler[a]&&this.el.removeEventListener(a,this._gsEventHandler[a]),delete this._gsEventHandler[a],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(a=>this.off(a)),this}removeWidget(a,t=!0,o=!0){return a?(q.getElements(a).forEach(r=>{if(r.parentElement&&r.parentElement!==this.el)return;let i=r.gridstackNode;i||(i=this.engine.nodes.find(n=>r===n.el)),i&&(t&&q.addRemoveCB&&q.addRemoveCB(this.el,i,!1,!1),delete r.gridstackNode,this._removeDD(r),this.engine.removeNode(i,t,o),t&&r.parentElement&&r.remove())}),o&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(a=!0,t=!0){return this.engine.nodes.forEach(o=>{a&&q.addRemoveCB&&q.addRemoveCB(this.el,o,!1,!1),delete o.el.gridstackNode,this.opts.staticGrid||this._removeDD(o.el)}),this.engine.removeAll(a,t),t&&this._triggerRemoveEvent(),this}setAnimation(a=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(a)}):a?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=a,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(a,t=!0,o=!0){return!!this.opts.staticGrid===a?this:(a?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(r=>{this.prepareDragDrop(r.el),r.subGrid&&o&&r.subGrid.setStatic(a,t,o)}),t&&this._setStaticClass(),this)}updateOptions(a){let t=this.opts;if(a===t)return this;if(a.acceptWidgets!==void 0&&(t.acceptWidgets=a.acceptWidgets,this._setupAcceptWidget()),a.animate!==void 0&&this.setAnimation(a.animate),a.cellHeight&&this.cellHeight(a.cellHeight),a.class!==void 0&&a.class!==t.class&&(t.class&&this.el.classList.remove(t.class),a.class&&this.el.classList.add(a.class)),a.columnOpts){let o=!!this.opts.columnOpts;this.opts.columnOpts=a.columnOpts,o!==!!this.opts.columnOpts&&this._updateResizeEvent(),this.checkDynamicColumn()}else a.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof a.column=="number"&&this.column(a.column);return a.margin!==void 0&&this.margin(a.margin),a.staticGrid!==void 0&&this.setStatic(a.staticGrid),a.disableDrag!==void 0&&!a.staticGrid&&this.enableMove(!a.disableDrag),a.disableResize!==void 0&&!a.staticGrid&&this.enableResize(!a.disableResize),a.float!==void 0&&this.float(a.float),a.row!==void 0?(t.minRow=t.maxRow=this.engine.maxRow=t.row=a.row,this._updateContainerHeight(),this.engine.getRow()>a.row&&this.compact()):(a.minRow!==void 0&&(t.minRow=a.minRow,this._updateContainerHeight()),a.maxRow!==void 0&&(t.maxRow=this.engine.maxRow=a.maxRow,this.engine.getRow()>a.maxRow&&this.compact())),a.lazyLoad!==void 0&&(t.lazyLoad=a.lazyLoad),a.children?.length&&this.load(a.children),this}update(a,t){return q.getElements(a).forEach(o=>{let r=o?.gridstackNode;if(!r)return;let i=B(B({},v.copyPos({},r)),v.cloneDeep(t));this.engine.nodeBoundFix(i),delete i.autoPosition;let n=["x","y","w","h"],s,l=i,_=r;if(n.some(u=>l[u]!==void 0&&l[u]!==_[u])){s={};let u=s;n.forEach(h=>{u[h]=l[h]!==void 0?l[h]:_[h],delete l[h]})}if(!s&&(i.minW||i.minH||i.maxW||i.maxH)&&(s={}),i.content!==void 0){let u=o.querySelector(".grid-stack-item-content");u&&u.textContent!==i.content&&(r.content=i.content,q.renderCB(u,i),r.subGrid?.el&&(u.appendChild(r.subGrid.el),r.subGrid._updateContainerHeight())),delete i.content}let d=!1,c=!1;for(let u in l)u[0]!=="_"&&_[u]!==l[u]&&(_[u]=l[u],d=!0,c=c||!this.opts.staticGrid&&(u==="noResize"||u==="noMove"||u==="locked"));if(v.sanitizeMinMax(r),s){let u=s.w!==void 0&&s.w!==r.w;this.moveNode(r,s),u&&r.subGrid?r.subGrid.onResize(this.hasAnimationCSS()?r.w:void 0):this.resizeToContentCheck(u,r),delete r._orig}(s||d)&&this._writeAttr(o,r),c&&this.prepareDragDrop(r.el),q.updateCB&&q.updateCB(r)}),this}moveNode(a,t){let o=a._updating;o||this.engine.cleanNodes().beginUpdate(a),this.engine.moveNode(a,t),this._updateContainerHeight(),o||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(a){if(!a||(a.classList.remove("size-to-content-max"),!a.clientHeight))return;let t=a.gridstackNode;if(!t)return;let o=t.grid;if(!o||a.parentElement!==o.el)return;let r=o.getCellHeight(!0);if(!r)return;let i=t.h?t.h*r:a.clientHeight,n=null;if(t.resizeToContentParent&&(n=a.querySelector(t.resizeToContentParent)),n||(n=a.querySelector(q.resizeToContentParent)),!n)return;let s=a.clientHeight-n.clientHeight,l=t.h?t.h*r-s:n.clientHeight,_;if(t.subGrid){_=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);let u=t.subGrid.el.getBoundingClientRect(),h=a.getBoundingClientRect();_+=u.top-h.top}else{if(t.subGridOpts?.children?.length)return;{let u=n.firstElementChild;if(!u){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${q.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}_=u.getBoundingClientRect().height||l}}if(l===_)return;i+=_-l;let d=Math.ceil(i/r),c=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;c&&d>c&&(d=c,a.classList.add("size-to-content-max")),t.minH&&d<t.minH?d=t.minH:t.maxH&&d>t.maxH&&(d=t.maxH),d!==t.h&&(o._ignoreLayoutsNodeChange=!0,o.moveNode(t,{h:d}),delete o._ignoreLayoutsNodeChange)}resizeToContentCBCheck(a){q.resizeToContentCB?q.resizeToContentCB(a):this.resizeToContent(a)}rotate(a,t){return q.getElements(a).forEach(o=>{let r=o.gridstackNode;if(!r||!v.canBeRotated(r))return;let i={w:r.h,h:r.w,minH:r.minW,minW:r.minH,maxH:r.maxW,maxW:r.maxH};if(t){let l=t.left>0?Math.floor(t.left/this.cellWidth()):0,_=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;i.x=r.x+l-(r.h-(_+1)),i.y=r.y+_-l}let n=i;Object.keys(n).forEach(l=>{n[l]===void 0&&delete n[l]});let s=r._orig;this.update(o,i),r._orig=s}),this}margin(a){if(!(typeof a=="string"&&a.split(" ").length>1)){let t=v.parseHeight(a);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return this}return this.opts.margin=a,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(a){return this.engine.willItFit(a)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let a=this.engine.getDirtyNodes(!0);return a&&a.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(a),this._triggerEvent("change",a)),this.engine.saveInitial(),this._sortDom(),this}_sortDom(){let a=this.engine.nodes;if(a.forEach(o=>{o.subGrid&&o.subGrid._sortDom()}),a.length<2)return this;this.engine.sortNodes(),a=this.engine.nodes;let t=this.el.children;return a.some((o,r)=>o.el!==t[r])&&a.forEach(o=>{o.el&&o.el.parentElement===this.el&&this.el.appendChild(o.el)}),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(t=>{delete t._dirty});let a=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",a)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){let a=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",a)}return this}_triggerEvent(a,t){let o=t?new CustomEvent(a,{bubbles:!1,detail:t}):new Event(a),r=this;for(;r.parentGridNode;)r=r.parentGridNode.grid;return r.el.dispatchEvent(o),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let a=this.parentGridNode,t=this.getRow()+this._extraDragRow,o=this.opts.cellHeight,r=this.opts.cellHeightUnit;if(!o)return this;if(!a&&!this.opts.minRow){let i=v.parseHeight(getComputedStyle(this.el).minHeight);if(i.h>0&&i.unit===r){let n=Math.floor(i.h/o);t<n&&(t=n)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[a?"minHeight":"height"]=t*o+r),a&&v.shouldSizeToContent(a)&&a.grid.resizeToContentCBCheck(a.el),this}_prepareElement(a,t=!1,o){o=o||this._readAttr(a),a.gridstackNode=o,o.el=a,o.grid=this,o=this.engine.addNode(o,t),this._writeAttr(a,o),a.classList.add(D0.itemClass,this.opts.itemClass);let r=v.shouldSizeToContent(o);return r?a.classList.add("size-to-content"):a.classList.remove("size-to-content"),r&&this.resizeToContentCheck(!1,o),(!v.lazyLoad(o)||!o.visibleObservable)&&this.prepareDragDrop(o.el),this}_writePosAttr(a,t){if(!t._moving&&!t._resizing||this._placeholder===a){let o=this.opts.rtl?"right":"left",r=a.style;r.top=t.y?t.y===1?"var(--gs-cell-height)":`calc(${t.y} * var(--gs-cell-height))`:null,r[o]=t.x?t.x===1?"var(--gs-column-width)":`calc(${t.x} * var(--gs-column-width))`:null,r.width=t.w>1?`calc(${t.w} * var(--gs-column-width))`:null,r.height=t.h>1?`calc(${t.h} * var(--gs-cell-height))`:null}return a.style.setProperty("--gs-x",String(t.x||0)),a.style.setProperty("--gs-y",String(t.y||0)),a.style.setProperty("--gs-w",String(t.w||1)),a.style.setProperty("--gs-h",String(t.h||1)),a.setAttribute("gs-x",String(t.x??0)),a.setAttribute("gs-y",String(t.y??0)),t.w>1?a.setAttribute("gs-w",String(t.w)):a.removeAttribute("gs-w"),t.h>1?a.setAttribute("gs-h",String(t.h)):a.removeAttribute("gs-h"),this}_writeAttr(a,t){if(!t)return this;this._writePosAttr(a,t);let o={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"},r=t,i=o;for(let n in i)r[n]!==void 0&&r[n]!==null&&r[n]!==!1?a.setAttribute(i[n],String(r[n])):a.removeAttribute(i[n]);return t.print?(t.print.pageBreak?a.setAttribute("gs-page-break",String(t.print.pageBreak)):a.removeAttribute("gs-page-break"),t.print.hide?a.classList.add("gs-print-hide"):a.classList.remove("gs-print-hide"),t.print.orientation?a.setAttribute("gs-print-orientation",String(t.print.orientation)):a.removeAttribute("gs-print-orientation")):(a.removeAttribute("gs-page-break"),a.classList.remove("gs-print-hide"),a.removeAttribute("gs-print-orientation")),this}_readAttr(a,t=!0){let o={};o.x=v.toNumber(a.getAttribute("gs-x")),o.y=v.toNumber(a.getAttribute("gs-y")),o.w=v.toNumber(a.getAttribute("gs-w")),o.h=v.toNumber(a.getAttribute("gs-h")),o.autoPosition=v.toBool(a.getAttribute("gs-auto-position")),o.noResize=v.toBool(a.getAttribute("gs-no-resize")),o.noMove=v.toBool(a.getAttribute("gs-no-move")),o.locked=v.toBool(a.getAttribute("gs-locked"));let r=a.getAttribute("gs-page-break"),i=a.classList.contains("gs-print-hide"),n=a.getAttribute("gs-print-orientation");(r||i||n)&&(o.print={},r&&(o.print.pageBreak=v.toBool(r)),i&&(o.print.hide=!0),n&&(o.print.orientation=n));let s=a.getAttribute("gs-size-to-content");s&&(s==="true"||s==="false"?o.sizeToContent=v.toBool(s):o.sizeToContent=parseInt(s,10)),o.id=a.getAttribute("gs-id")??void 0,o.maxW=v.toNumber(a.getAttribute("gs-max-w")),o.minW=v.toNumber(a.getAttribute("gs-min-w")),o.maxH=v.toNumber(a.getAttribute("gs-max-h")),o.minH=v.toNumber(a.getAttribute("gs-min-h")),t&&(o.w===1&&a.removeAttribute("gs-w"),o.h===1&&a.removeAttribute("gs-h"),o.maxW&&a.removeAttribute("gs-max-w"),o.minW&&a.removeAttribute("gs-min-w"),o.maxH&&a.removeAttribute("gs-max-h"),o.minH&&a.removeAttribute("gs-min-h"));let l=o;for(let _ in l)o.hasOwnProperty(_)&&!l[_]&&l[_]!==0&&_!=="sizeToContent"&&delete l[_];return o}_setStaticClass(){let a=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...a),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...a),this.el.removeAttribute("gs-static")),this}onResize(a=this.el?.clientWidth){if(!a)return this;if(this.prevWidth===a)return this;this.prevWidth=a,this.batchUpdate();let t=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),t=!0):t=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(o=>{o.subGrid&&o.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(t),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(a=!1,t){if(!this.engine)return;if(a&&this.hasAnimationCSS()){setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);return}if(t)v.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(r=>v.shouldSizeToContent(r))){let r=[...this.engine.nodes];this.batchUpdate(),r.forEach(i=>{v.shouldSizeToContent(i)&&this.resizeToContentCBCheck(i.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}let o=this._gsEventHandler.resizecontent;o&&o(new Event("resizecontent"),t?[t]:this.engine.nodes)}_updateResizeEvent(a=!1){let t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(o=>o.sizeToContent));return!a&&t&&!this.resizeObserver?(this._sizeThrottle=v.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(a||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(a=".grid-stack-item"){return v.getElement(a)}static getElements(a=".grid-stack-item"){return v.getElements(a)}static getGridElement(a){return q.getElement(a)}static getGridElements(a){return v.getElements(a)}_initMargin(){let a={h:0,unit:"px"},t=0,o=[];typeof this.opts.margin=="string"&&(o=this.opts.margin.split(" ")),o.length===2?(this.opts.marginTop=this.opts.marginBottom=o[0],this.opts.marginLeft=this.opts.marginRight=o[1]):o.length===4?(this.opts.marginTop=o[0],this.opts.marginRight=o[1],this.opts.marginBottom=o[2],this.opts.marginLeft=o[3]):(a=v.parseHeight(this.opts.margin),this.opts.marginUnit=a.unit,t=this.opts.margin=a.h);let r=["marginTop","marginRight","marginBottom","marginLeft"],i=this.opts;r.forEach(s=>{i[s]===void 0?i[s]=t:(a=v.parseHeight(i[s]),i[s]=a.h,delete this.opts.margin)}),this.opts.marginUnit=a.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);let n=this.el.style;return n.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),n.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),n.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),n.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return M0}static setupDragIn(a,t,o,r=document){t?.pause!==void 0&&(y.pauseDrag=t.pause),t=B({appendTo:"body",helper:"clone"},t||{}),(typeof a=="string"?v.getElements(a,r):a).forEach((i,n)=>{M0.isDraggable(i)||M0.dragIn(i,t),o?.[n]&&(i.gridstackNode=o[n])})}movable(a,t){return this.opts.staticGrid?this:(q.getElements(a).forEach(o=>{let r=o.gridstackNode;r&&(t?delete r.noMove:r.noMove=!0,this.prepareDragDrop(r.el))}),this)}resizable(a,t){return this.opts.staticGrid?this:(q.getElements(a).forEach(o=>{let r=o.gridstackNode;r&&(t?delete r.noResize:r.noResize=!0,this.prepareDragDrop(r.el))}),this)}disable(a=!0){return this.opts.staticGrid?this:(this.enableMove(!1,a),this.enableResize(!1,a),this._triggerEvent("disable"),this)}enable(a=!0){return this.opts.staticGrid?this:(this.enableMove(!0,a),this.enableResize(!0,a),this._triggerEvent("enable"),this)}enableMove(a,t=!0){return this.opts.staticGrid?this:(a?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&t&&o.subGrid.enableMove(a,t)}),this)}enableResize(a,t=!0){return this.opts.staticGrid?this:(a?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&t&&o.subGrid.enableResize(a,t)}),this)}cancelDrag(){let a=y.dragElement?.el;if(a?._gridstackNodeOrig){let o=a._gridstackNodeOrig,r=o.grid,i=this._placeholder?.gridstackNode;i&&(i._isAboutToRemove=!0,this.engine.removeNode(i)),this.engine.restoreInitial(),a.gridstackNode=o,delete a._gridstackNodeOrig,delete y.dropElement,r&&(r.engine.addNode(o,!1),r.engine.restoreInitial());return}let t=this._placeholder?.gridstackNode;t&&(t._isExternal?(t._isAboutToRemove=!0,this.engine.removeNode(t)):t._isAboutToRemove&&q._itemRemoving(t.el,!1),this.engine.restoreInitial())}_removeDD(a){return M0.draggable(a,"destroy").resizable(a,"destroy"),a.gridstackNode&&delete a.gridstackNode._initDD,delete a.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return M0.droppable(this.el,"destroy"),this;let a,t,o=(r,i,n)=>{n=n||i;let s=n.gridstackNode;if(!s)return;if(!s.grid?.el){n.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;let u=n.getBoundingClientRect();n.style.left=u.x+(this.dragTransform.xScale-1)*(r.clientX-u.x)/this.dragTransform.xScale+"px",n.style.top=u.y+(this.dragTransform.yScale-1)*(r.clientY-u.y)/this.dragTransform.yScale+"px",n.style.transformOrigin="0px 0px"}let{top:l,left:_}=n.getBoundingClientRect(),d=this.el.getBoundingClientRect();_-=d.left,l-=d.top;let c={position:{top:l*this.dragTransform.xScale,left:_*this.dragTransform.yScale}};if(s._temporaryRemoved){if(s.x=Math.max(0,Math.round(_/t)),s.y=Math.max(0,Math.round(l/a)),delete s.autoPosition,this.engine.nodeBoundFix(s),!this.engine.willItFit(s)){if(s.autoPosition=!0,!this.engine.willItFit(s)){M0.off(i,"drag");return}s._willFitPos&&(v.copyPos(s,s._willFitPos),delete s._willFitPos)}this._onStartMoving(n,r,c,s,t,a)}else this._dragOrResize(n,r,c,s,t,a)};return M0.droppable(this.el,{accept:r=>{let i=r.gridstackNode||this._readAttr(r,!1);if(i?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let n=!0;if(typeof this.opts.acceptWidgets=="function")n=this.opts.acceptWidgets(r);else{let s=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;n=r.matches(s)}if(n&&i&&this.opts.maxRow){let s={w:i.w,h:i.h,minW:i.minW,minH:i.minH};n=this.engine.willItFit(s)}return n}}).on(this.el,"dropover",(r,i,n)=>{let s=n?.gridstackNode||i.gridstackNode;if(s?.grid===this&&!s._temporaryRemoved)return!1;if(s?._sidebarOrig&&(s.w=s._sidebarOrig.w,s.h=s._sidebarOrig.h),s?.grid&&s.grid!==this&&!s._temporaryRemoved&&s.grid._leave(i,n),n=n||i,t=this.cellWidth(),a=this.getCellHeight(!0),!s){let d=n.getAttribute("data-gs-widget")||n.getAttribute("gridstacknode");if(d){try{s=JSON.parse(d)}catch{console.error("Gridstack dropover: Bad JSON format: ",d)}n.removeAttribute("data-gs-widget"),n.removeAttribute("gridstacknode")}s||(s=this._readAttr(n)),s._sidebarOrig={w:s.w,h:s.h}}s.grid||(s.el||(s=B({},s)),s._isExternal=!0,n.gridstackNode=s);let l=s.w||Math.round(n.offsetWidth/t)||1,_=s.h||Math.round(n.offsetHeight/a)||1;return s.grid&&s.grid!==this?(i._gridstackNodeOrig||(i._gridstackNodeOrig=s),i.gridstackNode=s=F(B({},s),{w:l,h:_,grid:this}),delete s.x,delete s.y,this.engine.cleanupNode(s).nodeBoundFix(s),s._initDD=s._isExternal=s._temporaryRemoved=!0):(s.w=l,s.h=_,s._temporaryRemoved=!0),q._itemRemoving(s.el,!1),M0.on(i,"drag",o),o(r,i,n),!1}).on(this.el,"dropout",(r,i,n)=>{let s=n?.gridstackNode||i.gridstackNode;return s&&(!s.grid||s.grid===this)&&(this._leave(i,n),this._isTemp&&this.removeAsSubGrid(s)),!1}).on(this.el,"drop",(r,i,n)=>{let s=n?.gridstackNode||i.gridstackNode;if(s?.grid===this&&!s._isExternal)return!1;let l=!!this.placeholder.parentElement,_=i!==n;this.placeholder.remove(),delete this.placeholder.gridstackNode,l&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));let d=i._gridstackNodeOrig;if(delete i._gridstackNodeOrig,l&&d?.grid&&d.grid!==this){let u=d.grid;u.engine.removeNodeFromLayoutCache(d),u.engine.removedNodes.push(d),u._triggerRemoveEvent()._triggerChangeEvent(),u.parentGridNode&&!u.engine.nodes.length&&u.opts.subGridDynamic&&u.removeAsSubGrid()}if(!s||(l&&(this.engine.cleanupNode(s),s.grid=this),delete s.grid?._isTemp,M0.off(i,"drag"),n&&n!==i?(n.remove(),i=n):i.remove(),this._removeDD(i),!l))return!1;let c=s.subGrid?.el?.gridstack;return v.copyPos(s,this._readAttr(this.placeholder)),v.removePositioningStyles(i),_&&(s.content||s.subGridOpts||q.addRemoveCB)?(delete s.el,i=this.addWidget(s)||i):(this._prepareElement(i,!0,s),this.el.appendChild(i),this.resizeToContentCheck(!1,s),c&&(c.parentGridNode=s),this._updateContainerHeight()),this.engine.addedNodes.push(s),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(F(B({},r),{type:"dropped"}),d&&d.grid?d:void 0,s),!1}),this}static _itemRemoving(a,t){if(!a)return;let o=a?a.gridstackNode:void 0;!o?.grid||a.classList.contains(o.grid.opts.removableOptions.decline)||(t?o._isAboutToRemove=!0:delete o._isAboutToRemove,t?a.classList.add("grid-stack-item-removing"):a.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;let a=document.querySelector(this.opts.removable);return a?(!this.opts.staticGrid&&!M0.isDroppable(a)&&M0.droppable(a,this.opts.removableOptions).on(a,"dropover",(t,o)=>q._itemRemoving(o,!0)).on(a,"dropout",(t,o)=>q._itemRemoving(o,!1)),this):this}refreshDragHandles(a){return q.getElements(a).forEach(t=>{t.ddElement?.ddDraggable?.refreshHandles()}),this}prepareDragDrop(a,t=!1){let o=a?.gridstackNode;if(!o)return this;let r=o.noMove||this.opts.disableDrag,i=o.noResize||this.opts.disableResize,n=this.opts.staticGrid||r&&i;if((t||n)&&(o._initDD&&(this._removeDD(a),delete o._initDD),n))return a.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!o._initDD){let s,l,_=(u,h)=>{this.triggerEvent(u,u.target),s=this.cellWidth(),l=this.getCellHeight(!0),this._onStartMoving(a,u,h,o,s,l)},d=(u,h)=>{this._dragOrResize(a,u,h,o,s,l)},c=u=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete o._moving,delete o._resizing,delete o._event,delete o._lastTried;let h=o.w!==o._orig.w,f=u.target;if(!(!f.gridstackNode||f.gridstackNode.grid!==this)){if(o.el=f,o._isAboutToRemove){let x=a.gridstackNode.grid;x._gsEventHandler[u.type]&&x._gsEventHandler[u.type](u,f),x.engine.nodes.push(o),x.removeWidget(a,!0,!0)}else v.removePositioningStyles(f),o._temporaryRemoved?(this._writePosAttr(f,o),this.engine.addNode(o)):this._writePosAttr(f,o),this.triggerEvent(u,f);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),u.type==="resizestop"&&(Number.isInteger(o.sizeToContent)&&(o.sizeToContent=o.h),this.resizeToContentCheck(h,o))}};M0.draggable(a,{start:_,stop:c,drag:d,rtl:this.opts.rtl==="auto"?void 0:this.opts.rtl}).resizable(a,{start:_,stop:c,resize:d,rtl:this.opts.rtl==="auto"?void 0:this.opts.rtl}),o._initDD=!0}return M0.draggable(a,r?"disable":"enable").resizable(a,i?"disable":"enable"),this}_onStartMoving(a,t,o,r,i,n){if(this.engine.cleanNodes().beginUpdate(r),this._writePosAttr(this.placeholder,r),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=r,r.grid?.el)this.dragTransform=v.getValuesFromTransformedElement(a);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){let s=this.placeholder.closest(".grid-stack");this.dragTransform=v.getValuesFromTransformedElement(s)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(r.el=this.placeholder,r._lastUiPosition=o.position,r._prevYPix=o.position.top,r._moving=t.type==="dragstart",r._resizing=t.type==="resizestart",delete r._lastTried,t.type==="dropover"&&r._temporaryRemoved&&(this.engine.addNode(r),r._moving=!0),this.engine.cacheRects(i,n,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){let s=this.getColumn()-r.x,l=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-r.y;M0.resizable(a,"option","minWidth",i*Math.min(r.minW||1,s)).resizable(a,"option","minHeight",n*Math.min(r.minH||1,l)).resizable(a,"option","maxWidth",i*Math.min(r.maxW||Number.MAX_SAFE_INTEGER,s)).resizable(a,"option","maxWidthMoveLeft",i*Math.min(r.maxW||Number.MAX_SAFE_INTEGER,r.x+r.w)).resizable(a,"option","maxHeight",n*Math.min(r.maxH||Number.MAX_SAFE_INTEGER,l)).resizable(a,"option","maxHeightMoveUp",n*Math.min(r.maxH||Number.MAX_SAFE_INTEGER,r.y+r.h))}}_dragOrResize(a,t,o,r,i,n){let s=B({},r._orig),l=!1,_=this.opts.marginLeft,d=this.opts.marginRight,c=this.opts.marginTop,u=this.opts.marginBottom,h=Math.round(n*.1),f=Math.round(i*.1);if(_=Math.min(_,f),d=Math.min(d,f),c=Math.min(c,h),u=Math.min(u,h),t.type==="drag"){if(r._temporaryRemoved)return;r._prevYPix=o.position.top,this.opts.draggable.scroll!==!1&&y.dragElement?.updateScrollPosition(this.el);let T=o.position.left+(o.position.left>r._lastUiPosition.left?-d:_),S=o.position.top+(o.position.top>r._lastUiPosition.top?-u:c);s.x=Math.round(T/i),s.y=Math.round(S/n);let k=this._extraDragRow;if(this.engine.collide(r,s)){let A=this.getRow(),i1=Math.max(0,s.y+r.h-A);this.opts.maxRow&&A+i1>this.opts.maxRow&&(i1=Math.max(0,this.opts.maxRow-A)),this._extraDragRow=i1}else this._extraDragRow=0;if(this._extraDragRow!==k&&this._updateContainerHeight(),r.x===s.x&&r.y===s.y)return}else if(t.type==="resize"){if((s.x??0)<0||(v.updateScrollResize(t,a,n),s.w=Math.round((o.size.width-_)/i),s.h=Math.round((o.size.height-c)/n),r.w===s.w&&r.h===s.h)||r._lastTried&&r._lastTried.w===s.w&&r._lastTried.h===s.h)return;if(t.hasMovedX){let T=r.x-(s.w-r.w);s.x=T<0?0:T}if(t.hasMovedY){let T=r.y-(s.h-r.h);s.y=T<0?0:T}l=!0}r._event=t,r._lastTried=s;let x={x:o.position.left+_,y:o.position.top+c,w:(o.size?o.size.width:r.w*i)-_-d,h:(o.size?o.size.height:r.h*n)-c-u};if(this.engine.moveNodeCheck(r,F(B({},s),{cellWidth:i,cellHeight:n,rect:x,resizing:l}))){r._lastUiPosition=o.position,this.engine.cacheRects(i,n,c,d,u,_),delete r._skipDown,l&&r.subGrid&&r.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();let T=t.target;r._sidebarOrig||this._writePosAttr(T,r),this.triggerEvent(t,T)}}triggerEvent(a,t){let o=this;for(;o.parentGridNode;)o=o.parentGridNode.grid;o._gsEventHandler[a.type]&&o._gsEventHandler[a.type](a,t)}_leave(a,t){t=t||a;let o=t.gridstackNode;if(!o||(t.style.transform=t.style.transformOrigin="",M0.off(a,"drag"),o._temporaryRemoved))return;o._temporaryRemoved=!0,this.engine.removeNode(o),o.el=o._isExternal&&t?t:a;let r=o._sidebarOrig;o._isExternal&&this.engine.cleanupNode(o),o._sidebarOrig=r,this.opts.removable===!0&&q._itemRemoving(a,!0),a._gridstackNodeOrig?(a.gridstackNode=a._gridstackNodeOrig,delete a._gridstackNodeOrig):o._isExternal&&this.engine.restoreInitial()}};X0.renderCB=(e,a)=>{e&&a?.content&&(e.textContent=a.content)};X0.resizeToContentParent=".grid-stack-item-content";X0.Utils=v;X0.Engine=vn;X0.GDRev="13.2.0";Tp=["container"],JI=["*"];aq=["*",[["","empty-content",""]]],tq=["*","[empty-content]"],oq=["*ngIf","isEmpty"];mn=(()=>{class e{constructor(t){this.elementRef=t,this.el._gridItemComp=this}set options(t){let o=this.el.gridstackNode?.grid;o?o.update(this.el,t):this._options=F(B({},t),{el:this.el})}get options(){return this.el.gridstackNode||this._options||{el:this.el}}get el(){return this.elementRef.nativeElement}clearOptions(){delete this._options}ngOnDestroy(){this.clearOptions(),delete this.childWidget,delete this.el._gridItemComp,delete this.container,delete this.ref}}return e.\u0275fac=function(a){return new(a||e)(g2(E1))},e.\u0275cmp=K1({type:e,selectors:[["gridstack-item"]],viewQuery:function(a,t){if(a&1&&cn(Tp,7,N5),a&2){let o;s4(o=l4())&&(t.container=o.first)}},inputs:{options:"options"},ngContentSelectors:JI,decls:5,vars:1,consts:[["container",""],[1,"grid-stack-item-content"]],template:function(a,t){a&1&&(P0(),Mu(0,"div",1),Tu(1,eq,0,0,"ng-template",null,0,Wu),A0(3),v1(4),yu()),a&2&&(w(4),qa(" ",t.options.content," "))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:1}),e})(),M4=(()=>{class e{constructor(t){this.elementRef=t,this.addedCB=new F1,this.changeCB=new F1,this.disableCB=new F1,this.dragCB=new F1,this.dragStartCB=new F1,this.dragStopCB=new F1,this.droppedCB=new F1,this.enableCB=new F1,this.removedCB=new F1,this.resizeCB=new F1,this.resizeStartCB=new F1,this.resizeStopCB=new F1,X0.addRemoveCB||(X0.addRemoveCB=nq),X0.saveCB||(X0.saveCB=sq),X0.updateCB||(X0.updateCB=lq),this.el._gridComp=this}set options(t){this._grid?this._grid.updateOptions(t):this._options=t}get options(){return this._grid?.opts||this._options||{}}get el(){return this.elementRef.nativeElement}get grid(){return this._grid}static registerComponents(t){t.forEach(o=>e.componentMap[e.getSelector(o)]=o)}static getSelector(t){return xa(t).selector}ngOnInit(){this.loaded=!!this.options?.children?.length,this._grid=X0.init(this._options,this.el),delete this._options,this.checkEmpty()}ngAfterContentInit(){this._sub=this.gridstackItems?.changes.subscribe(()=>this.updateAll()),this.loaded||this.updateAll(),this.hookEvents(this.grid)}ngOnDestroy(){this.unhookEvents(this._grid),this._sub?.unsubscribe(),this._grid?.destroy(),delete this._grid,delete this.el._gridComp,delete this.container,delete this.ref}updateAll(){if(!this.grid)return;let t=[];this.gridstackItems?.forEach(o=>{t.push(o.options),o.clearOptions()}),this.grid.load(t)}checkEmpty(){this.grid&&(this.isEmpty=!this.grid.engine.nodes.length)}hookEvents(t){t&&(t.parentGridNode||t.on("added",(o,r)=>{(r[0].grid?.el._gridComp||this).checkEmpty(),this.addedCB.emit({event:o,nodes:r})}).on("change",(o,r)=>this.changeCB.emit({event:o,nodes:r})).on("disable",o=>this.disableCB.emit({event:o})).on("drag",(o,r)=>this.dragCB.emit({event:o,el:r})).on("dragstart",(o,r)=>this.dragStartCB.emit({event:o,el:r})).on("dragstop",(o,r)=>this.dragStopCB.emit({event:o,el:r})).on("dropped",(o,r,i)=>this.droppedCB.emit({event:o,previousNode:r,newNode:i})).on("enable",o=>this.enableCB.emit({event:o})).on("removed",(o,r)=>{(r[0].grid?.el._gridComp||this).checkEmpty(),this.removedCB.emit({event:o,nodes:r})}).on("resize",(o,r)=>this.resizeCB.emit({event:o,el:r})).on("resizestart",(o,r)=>this.resizeStartCB.emit({event:o,el:r})).on("resizestop",(o,r)=>this.resizeStopCB.emit({event:o,el:r})))}unhookEvents(t){t&&(t.parentGridNode||t.off("added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop"))}}return e.componentMap={},e.\u0275fac=function(a){return new(a||e)(g2(E1))},e.\u0275cmp=K1({type:e,selectors:[["gridstack"]],contentQueries:function(a,t,o){if(a&1&&Zu(o,mn,4),a&2){let r;s4(r=l4())&&(t.gridstackItems=r)}},viewQuery:function(a,t){if(a&1&&cn(Tp,7,N5),a&2){let o;s4(o=l4())&&(t.container=o.first)}},inputs:{options:"options",isEmpty:"isEmpty"},outputs:{addedCB:"addedCB",changeCB:"changeCB",disableCB:"disableCB",dragCB:"dragCB",dragStartCB:"dragStartCB",dragStopCB:"dragStopCB",droppedCB:"droppedCB",enableCB:"enableCB",removedCB:"removedCB",resizeCB:"resizeCB",resizeStartCB:"resizeStartCB",resizeStopCB:"resizeStopCB"},ngContentSelectors:tq,decls:4,vars:1,consts:[["container",""],[4,"ngIf"]],template:function(a,t){a&1&&(P0(aq),Au(0,rq,1,0,"ng-content",1)(1,iq,0,0,"ng-template",null,0,Wu),A0(3)),a&2&&W("ngIf",t.isEmpty)},dependencies:[MZ],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:1}),e})();_q=["grid"],cq=["dragOriginPlaceholder"],dq=["editCardsBtn"],hq=[[["","slot","dashboard-subheader"]]],uq=["[slot=dashboard-subheader]"],U8=(e,a)=>a.id,wp=(e,a)=>a.action;document.body.classList.add("ui5-content-density-compact");Iq=class y4{static registerAngularComponents(a){iL(a)}hostEl=b(E1);injector=b(V1);sanitizer=b(lp);i18nService=b(S2);config=m({});sections=H8([]);cards=H8([]);availableCards=m([]);customActions=m([]);i18n=m(x4);loading=m(!1,{transform:o1});loadingDelay=m(1e3,{transform:cZ});saved=R();actionButtonClick=R();unsavedChangesChange=R();i18nKeys=ue;gridDirty=y0(!1);isXLPage=y0(!0);editMode=y0(!1);compactToolbar=y0(!1);toolbarMenuOpen=y0(!1);cardDialogOpen=y0(!1);discardDialogOpen=y0(!1);unsavedNavDialogOpen=y0(!1);backgroundImageHeight=y0(null);dragOriginStyle=y0(null);dragOriginVisible=y0(!1);busyVisible=y0(!1);hasUnsavedChanges=S1(()=>this.editMode()?this.gridDirty()?!0:JSON.stringify(this.sections())!==this.sectionsSnapshotJson||JSON.stringify(this.cards())!==this.cardsSnapshotJson:!1);safeTitle=S1(()=>{let a=this.sanitizer.sanitize(Z1.HTML,this.config().title??this.i18nService.getTranslation(ue.TITLE))??"";return this.sanitizer.bypassSecurityTrustHtml(a)});safeDescription=S1(()=>{let a=this.config().description??this.i18nService.getTranslation(ue.DESCRIPTION);if(!a)return null;let t=this.sanitizer.sanitize(Z1.HTML,a)??"";return this.sanitizer.bypassSecurityTrustHtml(t)});engineProfile=S1(()=>this.config().zFlow?O8.zFlow:O8.default);keyboardNavigationActive=S1(()=>this.editMode()&&!!this.config().zFlow);cardAriaKeyshortcuts=vI;hasToolbarMenuContent=S1(()=>!!this.config().editable||this.customActions().length>0);gridStackEngine=S1(()=>this.engineProfile().engineClass);gridBreakpoints=S1(()=>[...this.engineProfile().breakpoints]);columnVars=S1(()=>{let[a,t,o,r]=this.engineProfile().sectionColumns;return{"--dashboard-cols-sm":a,"--dashboard-cols-md":t,"--dashboard-cols-lg":o,"--dashboard-cols-xl":r}});addedCardsIds=S1(()=>new Set(this.cards().map(a=>a.id)));editViewButton=S1(()=>F(B({icon:"action-settings",design:"Transparent",tooltip:this.i18nService.getTranslation(ue.EDIT_HOME_BUTTON)},this.config().buttonsSettings?.editViewButton),{text:this.i18nService.getTranslation(ue.EDIT_HOME_BUTTON)}));editCardsButton=S1(()=>F(B({icon:"",design:"Default",tooltip:""},this.config().buttonsSettings?.editCardsButton),{text:this.i18nService.getTranslation(ue.EDIT_CARDS_BUTTON)}));sectionCards=S1(()=>{let a=this.cards();return t=>a.filter(o=>o.sectionId===t)});looseCards=Yu(()=>{let a=this.cards().filter(o=>!o.sectionId),t=this.config().zFlow?.cardHeight;return!this.engineProfile().fixedCardHeight||t===void 0?a:a.map(o=>F(B({},o),{h:t,maxH:t,minH:t}))});isEmpty=S1(()=>this.looseCards().length===0);isDashboardEditable=S1(()=>this.config().editable);gridOptions=S1(()=>({cellHeight:10,sizeToContent:!0,disableResize:!this.editMode(),disableDrag:!this.editMode(),marginBottom:0,marginLeft:0,marginRight:0,engineClass:this.gridStackEngine(),columnOpts:{breakpoints:this.gridBreakpoints()}}));sectionsSnapshotJson="";cardsSnapshotJson="";sectionsSnapshot=[];cardsSnapshot=[];gridStack=wo.required("grid");dragOriginPlaceholder=wo("dragOriginPlaceholder");addCardBtn=wo("editCardsBtn");resizeObserver;cardsPosition=new Map;pendingNavigation=null;beforeUnloadHandler=a=>{this.hasUnsavedChanges()&&(a.preventDefault(),a.returnValue="")};constructor(){e0(()=>{this.unsavedChangesChange.emit(this.hasUnsavedChanges())}),e0(()=>{let a=this.i18n(),t=this.config(),o={};t.title!=null&&(o.title=t.title),t.description!=null&&(o.description=t.description);let r=a&&Object.keys(a).length>0?a:null,i=r||Object.keys(o).length>0?B(B({},o),r):x4;this.i18nService.overrides.set(i)}),e0(a=>{if(!this.loading()){this.busyVisible.set(!1);return}let t=Math.max(0,this.loadingDelay());if(t===0){this.busyVisible.set(!0);return}let o=setTimeout(()=>{this.busyVisible.set(!0)},t);a(()=>{clearTimeout(o)})}),e0(a=>{let t=this.config().backgroundImageUrl;if(this.backgroundImageHeight.set(null),!t)return;let o=new Image;o.onload=()=>{this.backgroundImageHeight.set(o.naturalHeight)},o.src=t,a(()=>{o.onload=null})})}ngOnInit(){this.resizeObserver=new ResizeObserver(a=>{let t=a[0]?.contentRect.width??0;this.compactToolbar.set(t<726),this.changeCardSettingsForXlPage(t)}),this.resizeObserver.observe(this.hostEl.nativeElement),window.addEventListener("beforeunload",this.beforeUnloadHandler)}ngOnDestroy(){this.resizeObserver?.disconnect(),window.removeEventListener("beforeunload",this.beforeUnloadHandler)}onMenuItemClick(a,t){if(a==="edit-view"){this.enterEditMode();return}let o=this.customActions().find(r=>r.action===a);o&&this.actionButtonClick.emit({event:t,action:o})}enterEditMode(){this.updateCardsPositions(),this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.sectionsSnapshot=[...this.sections()],this.cardsSnapshot=[...this.cards()],this.sectionsSnapshotJson=JSON.stringify(this.sections()),this.cardsSnapshotJson=JSON.stringify(this.cards()),this.gridDirty.set(!1),this.editMode.set(!0),E2(()=>{this.addCardBtn()?.element.focus()},{injector:this.injector})}enterEditModeAndEditCards(){this.enterEditMode(),this.openCardPanel()}saveEdit(){this.updateCardsPositions();let a=this.cards().map(t=>{let o=this.cardsPosition.get(t.id);return F(B({},t),{x:o?.x,y:o?.y,w:o?.w??t.w,h:o?.h??t.h})});this.gridDirty.set(!1),this.editMode.set(!1),this.cards.set(a),this.saved.emit({sections:this.sections(),cards:a})}cancelEdit(){if(this.hasUnsavedChanges()){this.discardDialogOpen.set(!0);return}this.discardEdit()}confirmDiscard(){this.discardDialogOpen.set(!1),this.discardEdit()}cancelDiscard(){this.discardDialogOpen.set(!1)}requestNavigation(a){return this.hasUnsavedChanges()?(this.pendingNavigation=a,this.unsavedNavDialogOpen.set(!0),!1):(a(),!0)}onUnsavedNavSave(){this.unsavedNavDialogOpen.set(!1),this.saveEdit(),this.runPendingNavigation()}onUnsavedNavDiscard(){this.unsavedNavDialogOpen.set(!1),this.discardEdit(),this.runPendingNavigation()}onUnsavedNavCancel(){this.unsavedNavDialogOpen.set(!1),this.pendingNavigation=null}runPendingNavigation(){let a=this.pendingNavigation;this.pendingNavigation=null,a?.()}discardEdit(){this.sections.set(this.sectionsSnapshot),this.cards.set(this.cardsSnapshot.map(a=>{let t=this.cardsPosition.get(a.id);return F(B({},a),{x:t?.x,y:t?.y})})),this.cardDialogOpen.set(!1),this.gridDirty.set(!1),this.editMode.set(!1),E2(()=>{this.restoreGridLayoutFromCards();let a=this.getZFlowEngine();a?.syncZFlowOrderFromLayout(),a?.commitZFlowLayout()},{injector:this.injector})}restoreGridLayoutFromCards(){let a=this.gridStack().grid;a&&a.load(this.createGridLayoutFromCards(a.engine.nodes),!1)}createGridLayoutFromCards(a){let t=new Map(this.cards().map(o=>[o.id,o]));return a.map(o=>{let r=o.id?t.get(o.id):void 0;return{id:o.id,x:r?.x??o.x,y:r?.y??o.y,w:r?.w??o.w,h:r?.h??o.h}})}onCardKeydown(a,t){let o=this.getZFlowEngine();if(!this.keyboardNavigationActive()||!o||a.target!==a.currentTarget)return;let r=CI(a);if(!r)return;a.preventDefault(),a.stopPropagation();let i=a.currentTarget,n=i.gridstackNode;if(!n||n.id!==t){this.restoreCardFocus(i);return}o.applyKeyboardCommand(t,r)&&this.onGridChange(),this.restoreCardFocus(i)}restoreCardFocus(a){queueMicrotask(()=>{a.isConnected&&this.editMode()&&a.focus({preventScroll:!0})})}removeSection(a){this.sections.update(t=>t.filter(o=>o.id!==a)),this.cards.update(t=>t.filter(o=>o.sectionId!==a))}removeCard(a){let t=this.looseCards().some(o=>o.id===a);this.cards.update(o=>o.filter(r=>r.id!==a)),t&&E2(()=>{this.gridStack().grid?.compact("compact",!1)},{injector:this.injector})}openCardPanel(){this.cardDialogOpen.set(!0)}closeCardPanel(){this.cardDialogOpen.set(!1)}onCardsEdited(a){let t=new Set(this.looseCards().map(o=>o.id));(a.added.some(o=>!o.sectionId)||a.removed.some(o=>t.has(o)))&&this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.cards.update(o=>[...o.filter(r=>!a.removed.includes(r.id)),...a.added.map(r=>B({},r))]),this.closeCardPanel()}onDragStart(a){this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.dragOriginVisible.set(!1),this.engineProfile().renderOriginPosition&&this.renderDragOriginPlaceholder(a.el)}onDrag(){this.dragOriginVisible.set(!1)}onDragStop(){this.getZFlowEngine()?.commitZFlowLayout(),this.dragOriginVisible.set(!1),this.dragOriginStyle.set(null)}onGridChange(){this.getZFlowEngine()?.commitZFlowLayout(),this.editMode()&&this.gridDirty.set(!0)}saveCardsPosition(a){a.forEach(t=>{t.id&&this.cardsPosition.set(t.id,{x:t.x,y:t.y,w:t.w,h:t.h})})}updateCardsPositions(){let a=this.gridStack().gridstackItems?.toArray().map(t=>t.options);a&&this.saveCardsPosition(a)}getZFlowEngine(){let a=this.gridStack().grid?.engine;return a instanceof Bp?a:null}createDragOriginClone(a){let t=a.querySelector(tL);if(!t)return null;let o=t.cloneNode(!0);return o.classList.add("mfp-dashboard__drag-origin-content"),o.setAttribute("aria-hidden","true"),o.removeAttribute("id"),o.querySelectorAll("[id]").forEach(r=>{r.removeAttribute("id")}),o}renderDragOriginPlaceholder(a){let t=this.gridStack().el.getBoundingClientRect(),o=a.getBoundingClientRect(),r=this.createDragOriginClone(a);this.dragOriginStyle.set({top:`${o.top-t.top}px`,left:`${o.left-t.left}px`,width:`${o.width}px`,height:`${o.height}px`}),this.dragOriginVisible.set(!0),r&&E2(()=>{this.dragOriginVisible()&&this.dragOriginPlaceholder()?.nativeElement.replaceChildren(r)},{injector:this.injector})}updateCardsForBreakpoint(a){this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.cards.set(this.cards().map(a)),E2(()=>{this.getZFlowEngine()?.commitZFlowLayout()},{injector:this.injector})}changeCardSettingsForXlPage(a){this.engineProfile().xlWidthSwap&&(a>=aL?this.isXLPage()||(this.isXLPage.set(!0),this.updateCardsForBreakpoint(t=>F(B({},t),{w:t.w===4?3:t.w,maxW:t.maxW===4?3:t.maxW}))):this.isXLPage()&&(this.isXLPage.set(!1),this.updateCardsForBreakpoint(t=>F(B({},t),{w:t.w===3?4:t.w,maxW:t.maxW===3?4:t.maxW}))))}static \u0275fac=function(a){return new(a||y4)};static \u0275cmp=K1({type:y4,selectors:[["mfp-dashboard"]],viewQuery:function(a,t){a&1&&dn(t.gridStack,_q,5)(t.dragOriginPlaceholder,cq,5)(t.addCardBtn,dq,5),a&2&&Lu(3)},hostVars:4,hostBindings:function(a,t){a&2&&x2("background-image",t.config().backgroundImageUrl?"url("+t.config().backgroundImageUrl+")":"var(--mfp-dashboard-background, none)")("background-size",t.backgroundImageHeight()?"100% "+t.backgroundImageHeight()+"px":"100% auto")},inputs:{config:[1,"config"],sections:[1,"sections"],cards:[1,"cards"],availableCards:[1,"availableCards"],customActions:[1,"customActions"],i18n:[1,"i18n"],loading:[1,"loading"],loadingDelay:[1,"loadingDelay"]},outputs:{sections:"sectionsChange",cards:"cardsChange",saved:"saved",actionButtonClick:"actionButtonClick",unsavedChangesChange:"unsavedChangesChange"},features:[j0([S2])],ngContentSelectors:uq,decls:29,vars:24,consts:[["grid",""],["editCardsBtn",""],["menuBtn",""],["dragOriginPlaceholder",""],["data-testid","dashboard",1,"mfp-dashboard"],["data-testid","dashboard-busy","size","M",1,"mfp-dashboard__busy",3,"active","delay"],[1,"mfp-dashboard__busy-content"],[1,"mfp-dashboard__topbar"],[1,"mfp-dashboard__topbar-row"],[1,"mfp-dashboard__header"],[1,"mfp-dashboard__title-row"],["data-testid","dashboard-title","level","H3","size","H3","wrapping-type","Normal"],["role","status",1,"mfp-dashboard__unsaved-changes"],["data-testid","dashboard-description","level","H5","size","H5","wrapping-type","Normal"],[1,"mfp-dashboard__toolbar"],["data-testid","dashboard-edit-cards-btn","id","edit-cards-btn",3,"accessibleName","design","icon","tooltip"],[1,"mfp-dashboard__subheader"],[1,"mfp-sections-container"],[3,"cards","editMode","section"],["data-testid","dashboard-empty-state",1,"mfp-dashboard__empty"],["data-testid","dashboard-grid",3,"addedCB","changeCB","dragCB","dragStartCB","dragStopCB","removedCB","options"],[1,"mfp-dashboard__drag-origin-placeholder",3,"style"],[3,"options"],[1,"mfp-dashboard__edit-bar"],[3,"cancelled","confirm","addedCardsIds","availableCards","open"],[3,"cancelled","confirm","open"],[3,"cancelled","discard","save","open"],[3,"innerHTML"],["name","user-edit",1,"mfp-dashboard__unsaved-changes-icon",3,"accessibleName"],[1,"mfp-dashboard__unsaved-changes-text"],[1,"mfp-dashboard__description",3,"innerHTML"],["data-testid","dashboard-edit-cards-btn","id","edit-cards-btn",3,"click","accessibleName","design","icon","tooltip"],["data-testid","dashboard-toolbar-menu-btn","design","Transparent","icon","menu2",3,"click","accessibleName","tooltip"],["data-testid","dashboard-toolbar-menu",3,"ui5Close","ui5ItemClick","ui5Open","open","opener"],[3,"icon","text"],["data-action","edit-view","data-testid","dashboard-action-edit-view",3,"icon","text"],["data-testid","dashboard-edit-view-btn",3,"accessibleName","design","icon","tooltip"],[3,"accessibleName","design","endIcon","icon","tooltip"],["data-testid","dashboard-edit-view-btn",3,"click","accessibleName","design","icon","tooltip"],[3,"click","accessibleName","design","endIcon","icon","tooltip"],[3,"removeCard","removeSection","cards","editMode","section"],["data-testid","dashboard-empty-state-illustration","role","img",1,"mfp-dashboard__empty-illustration"],["data-testid","dashboard-empty-state-title","level","H4","size","H3","wrapping-type","Normal",1,"mfp-dashboard__empty-title"],["data-testid","dashboard-empty-state-description",1,"mfp-dashboard__empty-description"],["data-testid","dashboard-empty-state-edit-btn","design","Emphasized",3,"accessibleName"],["data-testid","dashboard-empty-state-edit-btn","design","Emphasized",3,"click","accessibleName"],[1,"mfp-dashboard__drag-origin-placeholder"],[3,"keydown","options"],[3,"removeCard","card","editMode"],["data-testid","dashboard-save-btn","design","Emphasized",3,"click"],["data-testid","dashboard-cancel-btn","design","Transparent",3,"click"]],template:function(a,t){a&1&&(P0(hq),H(0,"div",4)(1,"ui5-busy-indicator",5)(2,"div",6)(3,"div",7)(4,"div",8)(5,"div",9)(6,"div",10),s0(7,pq,2,1,"ui5-title",11),s0(8,fq,4,2,"div",12),P(),s0(9,Cq,2,1,"ui5-title",13),P(),H(10,"div",14),s0(11,vq,3,5,"ui5-button",15)(12,Bq,7,6)(13,Tq,4,2),P()(),H(14,"div",16),A0(15),P()(),H(16,"div",17),Ca(17,wq,1,3,"mfp-dashboard-section",18,U8),P(),s0(19,yq,7,4,"div",19),H(20,"gridstack",20,0),e1("addedCB",function(){return t.onGridChange()})("changeCB",function(){return t.onGridChange()})("dragCB",function(){return t.onDrag()})("dragStartCB",function(o){return t.onDragStart(o)})("dragStopCB",function(){return t.onDragStop()})("removedCB",function(){return t.onGridChange()}),s0(22,Hq,2,2,"div",21),Ca(23,Zq,2,7,"gridstack-item",22,U8),P()()()(),s0(25,Lq,5,2,"div",23),H(26,"mfp-edit-cards-dialog",24),e1("cancelled",function(){return t.closeCardPanel()})("confirm",function(o){return t.onCardsEdited(o)}),P(),H(27,"mfp-discard-changes-dialog",25),e1("cancelled",function(){return t.cancelDiscard()})("confirm",function(){return t.confirmDiscard()}),P(),H(28,"mfp-unsaved-changes-dialog",26),e1("cancelled",function(){return t.onUnsavedNavCancel()})("discard",function(){return t.onUnsavedNavDiscard()})("save",function(){return t.onUnsavedNavSave()}),P()),a&2&&(Eu(t.columnVars()),Q2("edit",t.editMode()),w(),W("active",t.busyVisible())("delay",0),w(),Q2("mfp-dashboard__busy-content--busy",t.busyVisible()),w(5),l0(t.i18nService.getTranslation(t.i18nKeys.TITLE)?7:-1),w(),l0(t.hasUnsavedChanges()?8:-1),w(),l0(t.i18nService.getTranslation(t.i18nKeys.DESCRIPTION)?9:-1),w(2),l0(t.editMode()?11:t.compactToolbar()&&t.hasToolbarMenuContent()?12:13),w(6),va(t.sections()),w(2),l0(t.isEmpty()&&t.isDashboardEditable()&&!t.loading()?19:-1),w(),Q2("zflow-dragging",!!t.dragOriginStyle()),W("options",t.gridOptions()),b0("role",t.keyboardNavigationActive()?"list":null),w(2),l0(t.dragOriginStyle()&&t.dragOriginVisible()?22:-1),w(),va(t.looseCards()),w(2),l0(t.editMode()?25:-1),w(),W("addedCardsIds",t.addedCardsIds())("availableCards",t.availableCards())("open",t.cardDialogOpen()),w(),W("open",t.discardDialogOpen()),w(),W("open",t.unsavedNavDialogOpen()))},dependencies:[M4,mn,EL,YL,oI,tI,Cp,mI,Pa,fp,DI,OI,GI,Yr],styles:[`.grid-stack{position:relative}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0;top:0;width:var(--%NS%gs-column-width);height:var(--%NS%gs-cell-height)}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item{right:0}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--%NS%gs-item-margin-top);right:var(--%NS%gs-item-margin-right);bottom:var(--%NS%gs-item-margin-bottom);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;user-select:none;z-index:100}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center;z-index:101}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--%NS%gs-item-margin-top);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--%NS%gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--%NS%gs-item-margin-top);right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--%NS%gs-item-margin-bottom);right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--%NS%gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--%NS%gs-item-margin-bottom);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--%NS%gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,right,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,right .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left 0s,right 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item[gs-x="0"]{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item[gs-x="0"]{right:0}.gs-print-show{display:none}@media print{@page gs-landscape{size:landscape}@page gs-portrait{size:portrait}.grid-stack{display:block!important;height:auto!important;position:static!important}.grid-stack>.grid-stack-item{display:block!important;float:left!important;position:static!important;height:auto!important;left:auto!important;top:auto!important;width:calc(100% * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important;break-inside:avoid!important;page-break-inside:avoid!important}.grid-stack>.grid-stack-item>.grid-stack-item-content{position:relative!important;height:auto!important;overflow:visible!important;white-space:normal!important;margin-top:var(--%NS%gs-item-margin-top)!important;margin-right:var(--%NS%gs-item-margin-right)!important;margin-bottom:var(--%NS%gs-item-margin-bottom)!important;margin-left:var(--%NS%gs-item-margin-left)!important;inset:auto!important}.gs-print-hide{display:none}.gs-print-show{display:block}.grid-stack>.grid-stack-item.gs-print-hide{display:none!important}.grid-stack>.grid-stack-item[gs-page-break=true],.grid-stack>.grid-stack-item[gs-print-orientation]{float:none!important;clear:both!important}.grid-stack>.grid-stack-item[gs-page-break=true]{page-break-before:always!important;break-before:page!important}.grid-stack>.grid-stack-item[gs-print-orientation=landscape]{page:gs-landscape;min-width:calc(100vmax * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important}.grid-stack>.grid-stack-item[gs-print-orientation=portrait]{page:gs-portrait;min-width:calc(100vmin * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important}.grid-stack>.grid-stack-item>.ui-resizable-handle{display:none!important}}.grid-stack-placeholder{z-index:2;pointer-events:none}.grid-stack-placeholder .placeholder-content{border-radius:16px;height:calc(100% - 30px);top:calc(var(--%NS%gs-item-margin-top) * 2 - 2px)!important;width:calc(100% - 19px);left:8px!important;background:var(--%NS%sapContent_Selected_Hover_Background, #e3f0ff);border:1px solid var(--%NS%sapContent_DragAndDropActiveColor, #0064d9);z-index:2!important}mfp-dashboard,mfp-wc-dashboard{display:block;flex:1;margin:0;padding:0;min-height:100%;background-size:100% auto;background-position:top center;background-repeat:no-repeat;background-attachment:local}.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_XL, 3rem) - 10px);container-type:inline-size;container-name:mfp-dashboard}.mfp-dashboard.edit{padding-bottom:60px}.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item,.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item:focus,.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item:focus-visible{outline:none!important;border:0!important;box-shadow:none!important}.mfp-sections-container{display:grid;grid-auto-rows:auto;align-content:start;gap:1rem;grid-template-columns:repeat(var(--%NS%dashboard-cols-xl, 14),1fr)}@container mfp-dashboard (max-width: 599px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-sm, 1),1fr)}}@container mfp-dashboard (min-width: 600px) and (max-width: 1023px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-md, 8),1fr)}}@container mfp-dashboard (min-width: 1024px) and (max-width: 1439px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-lg, 12),1fr)}}.mfp-dashboard__topbar{grid-column:1/-1;align-self:start;display:flex;flex-direction:column;gap:1rem;padding-bottom:3rem;width:100%;min-width:0}.mfp-dashboard__topbar-row{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:0 10px}.mfp-dashboard__header{display:flex;flex-direction:column;gap:.25rem}.mfp-dashboard__title-row{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.mfp-dashboard__unsaved-changes{display:inline-flex;align-items:center;gap:.375rem}.mfp-dashboard__unsaved-changes-icon{width:16px;height:16px;color:var(--%NS%sapContent_MarkerIconColor)}.mfp-dashboard__unsaved-changes-text{color:var(--%NS%sapContent_LabelColor);text-shadow:0 0 2px var(--%NS%sapContent_ContrastTextShadow, #fff);font-family:var(--%NS%sapFontFamily);font-size:var(--%NS%sapFontSize, 14px);font-style:normal;font-weight:400;line-height:normal}.mfp-dashboard__description{font-weight:400;font-family:var(--%NS%sapFontFamily)}.mfp-dashboard__description b,.mfp-dashboard__description strong{font-family:var(--%NS%sapFontBoldFamily)}.mfp-dashboard__toolbar{flex-shrink:0;display:flex;gap:.5rem}.mfp-dashboard__subheader{display:flex;align-items:center;gap:var(--%NS%sapShell_Space_S, 1rem)}.mfp-dashboard__busy{display:block;width:100%}.mfp-dashboard__busy-content{width:100%}.mfp-dashboard__busy-content--busy{min-height:60vh}.mfp-dashboard__empty{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:2rem 1rem 4rem;text-align:center}.mfp-dashboard__empty-illustration{width:320px;max-width:100%;aspect-ratio:320/240;background-image:var(--%NS%mfp-dashboard-empty-image, url("data:image/svg+xml;utf8,%3Csvg id='tnt-Scene-NoApplications' xmlns='http://www.w3.org/2000/svg' width='320' height='240' fill='none' viewBox='0 0 320 240'%3E%3Crect width='320' height='138' y='59' fill='%2389d1ff' rx='24'/%3E%3Cpath fill='%231b90ff' fill-rule='evenodd' d='m96.085 187.07 133.74-23.88c.83-.15.86-1.32.05-1.53l-83.86-20.89c-1-.25-2.05-.3-3.07-.14L37.355 156.9c-1.87.29-2.23 2.82-.51 3.62l56.21 26.14c.94.44 2.01.58 3.04.39l-.01.02Z' clip-rule='evenodd'/%3E%3Cpath fill='%230070f2' d='M234.425 39.1c.53-.03 1.07.07 1.57.25s.99.47 1.43.83c.44.36.82.79 1.12 1.27.31.49.54 1.03.68 1.6l2.49 10.83-161.93 9.75-2.09-12.04a4.21 4.21 0 0 1 .06-1.81 3.917 3.917 0 0 1 2.07-2.57c.52-.26 1.11-.42 1.76-.46l152.84-7.65Z'/%3E%3Cpath fill='%23ffffff' d='m79.775 63.63 161.92-9.74 20.81 90.49c.14.61.16 1.21.1 1.76-.07.55-.25 1.07-.51 1.52-.27.45-.61.83-1.03 1.11-.42.28-.9.47-1.45.54l-156.56 19.62c-.67.09-1.32.02-1.94-.15-.62-.17-1.21-.47-1.72-.88-.51-.4-.96-.88-1.31-1.45-.35-.57-.6-1.2-.71-1.88L79.785 63.63h-.01Z'/%3E%3Cpath fill='%2389d1ff' d='m95.125 73.19 43.77-2.41c.38-.02.76.03 1.12.14.36.11.69.29.99.51.3.22.55.49.76.79.21.3.34.64.41.99l7.57 38.85a2.51 2.51 0 0 1-.45 1.98c-.2.27-.47.5-.77.68-.3.18-.66.3-1.04.34l-43.82 5.29a3.685 3.685 0 0 1-2.41-.58c-.34-.22-.62-.5-.83-.82-.21-.32-.37-.68-.44-1.07l-7.46-41.74c-.07-.38-.05-.75.05-1.08.1-.33.27-.65.51-.92s.53-.49.88-.65c.35-.16.74-.27 1.16-.3Zm104.68-5.76 32.44-1.79c.28-.02.57.03.84.13s.53.25.76.44c.23.19.44.43.6.69.16.26.29.55.36.86l7.53 33.48c.07.32.08.62.04.91-.04.29-.14.55-.28.78-.14.23-.32.42-.54.57-.22.15-.48.24-.76.28l-32.34 3.91a2.504 2.504 0 0 1-1.8-.53c-.26-.2-.48-.44-.66-.71-.18-.27-.31-.58-.38-.92l-7.58-35.6c-.07-.32-.07-.64-.02-.93.05-.29.17-.55.33-.78.16-.23.37-.41.61-.55.24-.14.53-.22.84-.25l.01.01Zm-48.05 2.64 37.44-2.05c.33-.02.65.03.97.14.32.11.6.27.87.47.27.2.49.45.67.73.18.28.31.59.38.92l7.58 35.95c.07.34.07.67.01.98-.06.31-.18.6-.35.84-.17.24-.39.46-.65.62-.26.16-.56.27-.88.31l-37.4 4.52c-.38.04-.75 0-1.1-.09-.35-.09-.68-.26-.97-.46-.29-.2-.54-.47-.74-.76-.2-.29-.34-.63-.41-.98l-7.58-38.41c-.07-.35-.06-.69.01-1 .07-.31.21-.6.41-.84.2-.24.44-.45.73-.6.29-.15.62-.25.98-.27l.03-.02Z'/%3E%3Cpath fill='%2356bdff' d='M88.485 51.02c.51-.03 1.02.05 1.5.21.49.16.92.41 1.32.72s.73.69 1 1.12c.27.43.46.9.54 1.41.09.5.08.99-.04 1.44-.11.45-.31.86-.59 1.21-.28.35-.63.65-1.04.86-.41.21-.88.34-1.4.37-.51.03-1.02-.05-1.5-.21a4.23 4.23 0 0 1-1.32-.72c-.39-.31-.74-.69-1.01-1.12-.27-.43-.46-.9-.54-1.42-.09-.51-.07-1 .04-1.45.1-.45.31-.87.59-1.21.28-.34.63-.64 1.05-.86.42-.22.88-.34 1.4-.36v.01Z'/%3E%3Cpath fill='%230040b0' d='M103.065 168.93c-.67.08-1.32.02-1.94-.15-.62-.18-1.21-.48-1.72-.88s-.96-.88-1.31-1.46c-.35-.56-.6-1.2-.71-1.88L79.795 63.63l-2.09-12.04c-.06-.3-.08-.61-.07-.9 0-.29.05-.58.11-.86.07-.28.16-.54.28-.79.11-.25.27-.49.43-.7l-2.65 3.45c-.16.22-.3.45-.43.69-.11.25-.21.5-.28.78-.07.28-.1.55-.11.85 0 .29 0 .59.07.89l2.06 11.91 17.29 99.82c.11.68.36 1.3.7 1.86a5.4 5.4 0 0 0 1.29 1.44c.51.39 1.08.68 1.7.87.62.18 1.27.24 1.92.15l155.15-19.6 4.46-2.15-156.56 19.62v.01Z'/%3E%3Cpath fill='%23046c7c' d='m269.075 164.4-3.89 2.51s-.09.06-.13.08c-.04.02-.09.06-.12.08-.04.02-.09.06-.12.08-.04.02-.09.06-.13.08-.83.5-1.68.96-2.55 1.37-.87.41-1.77.76-2.7 1.08-.92.32-1.86.57-2.81.78-.96.21-1.94.37-2.92.47-.49.06-.99.1-1.48.13s-1 .04-1.5.05c-.5 0-1.01 0-1.52-.04s-1.02-.06-1.53-.12c-1.54-.15-3.07-.43-4.6-.81-1.52-.39-3.03-.89-4.5-1.5-1.47-.61-2.92-1.34-4.33-2.17-1.41-.83-2.77-1.76-4.07-2.79a36.883 36.883 0 0 1-3.7-3.36c-1.15-1.2-2.24-2.48-3.23-3.81-.99-1.33-1.89-2.75-2.7-4.2a37.21 37.21 0 0 1-2.12-4.52c-.61-1.55-1.1-3.12-1.48-4.71a34.17 34.17 0 0 1-.8-4.77c-.15-1.6-.19-3.17-.12-4.74.07-1.57.27-3.11.58-4.62.3-1.49.7-2.92 1.21-4.3s1.12-2.71 1.82-3.97c.7-1.26 1.49-2.45 2.38-3.56.89-1.11 1.85-2.15 2.91-3.1l3.43-3.1a26.29 26.29 0 0 0-5.33 6.73 28.19 28.19 0 0 0-3.04 8.35 32.074 32.074 0 0 0-.46 9.46c.15 1.61.42 3.22.81 4.82.39 1.6.89 3.19 1.49 4.76.62 1.57 1.33 3.09 2.14 4.56a38.822 38.822 0 0 0 5.99 8.11c1.17 1.22 2.42 2.35 3.74 3.39a36.466 36.466 0 0 0 8.49 5.03c1.49.63 3.01 1.13 4.55 1.53a31.16 31.16 0 0 0 6.19.95c.52.03 1.02.04 1.53.04s1.01-.02 1.52-.04 1-.07 1.5-.13c.99-.11 1.98-.27 2.95-.47.97-.2 1.92-.47 2.84-.78.93-.31 1.83-.68 2.72-1.08.89-.41 1.74-.87 2.57-1.38.05-.03.09-.06.13-.08.05-.02.09-.06.12-.08.04-.02.09-.06.12-.08.04-.02.09-.06.13-.09'/%3E%3Cpath fill='%230899a7' d='M267.365 111.939c1.68 1.36 3.24 2.86 4.66 4.48 1.42 1.62 2.7 3.35 3.83 5.16 1.13 1.82 2.1 3.73 2.9 5.71.8 1.97 1.44 4.02 1.89 6.1.33 1.56.56 3.11.67 4.67.11 1.56.13 3.1.02 4.61-.11 1.52-.31 3.03-.63 4.5-.32 1.47-.74 2.91-1.27 4.3a27.574 27.574 0 0 1-4.37 7.57c-.91 1.12-1.92 2.16-3.01 3.1-1.09.95-2.26 1.81-3.51 2.57a25.402 25.402 0 0 1-5.29 2.46c-.93.31-1.88.57-2.84.78-.96.21-1.95.37-2.95.47-.5.06-1 .1-1.5.12-.5.03-1.01.04-1.52.04s-1.02 0-1.53-.04c-.51-.03-1.03-.07-1.55-.12-1.55-.15-3.1-.43-4.64-.83-1.53-.4-3.06-.9-4.55-1.53a36.39 36.39 0 0 1-4.37-2.19c-1.42-.84-2.8-1.78-4.12-2.83a38.772 38.772 0 0 1-3.74-3.39 37.388 37.388 0 0 1-3.26-3.86c-.99-1.35-1.92-2.78-2.73-4.25-.81-1.47-1.53-3-2.14-4.57-.62-1.57-1.11-3.16-1.49-4.76-.38-1.6-.65-3.21-.81-4.82-.15-1.61-.19-3.2-.12-4.79.08-1.59.27-3.14.58-4.67.31-1.53.72-3.01 1.24-4.43s1.16-2.78 1.88-4.07c.72-1.3 1.55-2.51 2.48-3.65.93-1.14 1.93-2.2 3.02-3.15 1.09-.97 2.26-1.83 3.49-2.59a26.8 26.8 0 0 1 3.85-1.96c1.33-.55 2.72-.99 4.15-1.32 1.43-.33 2.88-.54 4.38-.64 2-.13 4.01-.05 6.01.23s3.98.75 5.93 1.41c1.95.66 3.85 1.5 5.69 2.52 1.84 1.03 3.61 2.21 5.3 3.58v.03l-.03.05Z'/%3E%3Cpath fill='%23ffffff' d='M248.495 118.529c.32-.02.64.02.95.12.31.1.6.27.85.47.25.2.48.46.66.74.18.28.31.6.38.94l2.62 12.86 12.14-1.04c.32-.03.64.02.94.12.3.1.59.26.84.46a2.943 2.943 0 0 1 1.04 1.68c.07.34.07.67.02.97-.05.3-.17.59-.33.83s-.37.45-.62.6c-.25.15-.54.25-.86.28l-12.15 1.08 2.65 13c.07.35.07.68.01.99-.06.31-.18.6-.35.85a2.066 2.066 0 0 1-1.52.9c-.33.03-.65 0-.96-.11-.31-.11-.6-.26-.86-.47-.26-.21-.49-.46-.67-.75a2.88 2.88 0 0 1-.38-.96l-2.63-13.04-12.41 1.1c-.33.03-.66-.01-.97-.12-.31-.11-.61-.26-.87-.47-.26-.21-.49-.46-.68-.75-.19-.29-.31-.61-.38-.96s-.07-.68 0-.99c.07-.31.19-.6.36-.84.17-.24.4-.45.66-.6.26-.15.56-.25.89-.28l12.4-1.07-2.61-12.9a2.315 2.315 0 0 1 .35-1.79 1.965 1.965 0 0 1 1.51-.85h-.02Z'/%3E%3C/svg%3E"));background-repeat:no-repeat;background-position:center;background-size:contain}.mfp-dashboard__empty-title{margin-top:1rem}.mfp-dashboard__empty-description{margin:0 0 1.5rem;color:var(--%NS%sapContent_LabelColor);font-family:var(--%NS%sapFontFamily);font-size:var(--%NS%sapFontSize, 14px)}.mfp-dashboard__edit-bar{position:sticky;bottom:var(--%NS%sapShell_Space_S, 1rem);margin:var(--%NS%sapShell_Space_S, 1rem) var(--%NS%sapShell_Space_S, 1rem) 0;z-index:1000;display:flex;justify-content:flex-end;align-items:center;gap:.5rem;padding:.5rem var(--%NS%sapShell_Space_S, 1rem);background:var(--%NS%sapPageFooter_Background, white);border-radius:var(--%NS%sapElement_BorderCornerRadius, 12px);box-shadow:var(--%NS%sapContent_Shadow1, 0 0 0 1px rgba(34, 53, 72, .48), 0 2px 8px 0 rgba(34, 53, 72, .3));box-sizing:border-box;overflow:hidden}@media screen and (min-width:0px)and (max-width:599px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_S, 1rem) - 10px)}}@media screen and (min-width:600px)and (max-width:1023px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_M, 2rem) - 10px)}}@media screen and (min-width:1024px)and (max-width:1439px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_L, 2rem) - 10px)}}.grid-stack.grid-stack-dragging,.grid-stack.grid-stack-dragging *{cursor:grabbing!important}.mfp-dashboard__drag-origin-placeholder{position:absolute;pointer-events:none;z-index:1}.mfp-dashboard__drag-origin-placeholder:after,.mfp-dashboard__drag-origin-placeholder .mfp-dashboard__drag-origin-content{height:calc(100% - 30px);top:calc(var(--%NS%gs-item-margin-top) * 2 - 2px)!important;width:calc(100% - 19px);left:8px!important;position:absolute;border-radius:16px}.mfp-dashboard__drag-origin-placeholder .mfp-dashboard__drag-origin-content{overflow:hidden}.mfp-dashboard__drag-origin-placeholder:after{content:"";background:var(--%NS%sapNeutralColor, #6a6d75);opacity:.3}.grid-stack:has(>.mfp-dashboard__drag-origin-placeholder)>.grid-stack-placeholder{visibility:hidden}gridstack{position:relative}.grid-stack:has(.ui-resizable-resizing),.grid-stack:has(.ui-resizable-resizing) *{cursor:nwse-resize!important}.grid-stack-item>.ui-resizable-handle{background-image:none!important}
|
|
3087
|
+
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),o}static addGrid(a,t={}){if(!a)return null;let o=a;if(o.gridstack){let r=o.gridstack;return t&&(r.opts=B(B({},r.opts),t)),t.children!==void 0&&r.load(t.children),r}return(!a.classList.contains("grid-stack")||q.addRemoveCB)&&(q.addRemoveCB?o=q.addRemoveCB(a,t,!0,!0):o=v.createDiv(["grid-stack",t.class],a)),q.init(t,o)}static registerEngine(a){q.engineClass=a}get placeholder(){if(!this._placeholder){this._placeholder=v.createDiv([this.opts.placeholderClass,D0.itemClass,this.opts.itemClass]);let a=v.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(a.textContent=this.opts.placeholderText)}return this._placeholder}constructor(a,t={}){this.el=a,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},a.gridstack=this,this.opts=t=t||{},a.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);let o=v.toNumber(a.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);let r=t.columnOpts;if(r){let l=r.breakpoints;!r.columnWidth&&!l?.length?delete t.columnOpts:l&&l.length>1?(l.sort((_,d)=>(d.w||0)-(_.w||0)),delete r.columnWidth):r.columnMax=r.columnMax||12}let i=F(B({},v.cloneDeep(D0)),{column:v.toNumber(a.getAttribute("gs-column"))||D0.column,minRow:o||v.toNumber(a.getAttribute("gs-min-row"))||D0.minRow,maxRow:o||v.toNumber(a.getAttribute("gs-max-row"))||D0.maxRow,staticGrid:v.toBool(a.getAttribute("gs-static"))||D0.staticGrid,sizeToContent:v.toBool(a.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||D0.draggable.handle},removableOptions:{accept:t.itemClass||D0.removableOptions.accept,decline:D0.removableOptions.decline}});a.getAttribute("gs-animate")&&(i.animate=v.toBool(a.getAttribute("gs-animate"))),t=v.defaults(t,i),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(t),t.rtl==="auto"&&(t.rtl=a.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");let n=this.el.closest("."+D0.itemClass)?.gridstackNode;if(n&&(n.subGrid=this,this.parentGridNode=n,this.el.classList.add("grid-stack-nested"),n.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial")this.cellHeight(void 0);else{typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==D0.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit);let l=t.cellHeight;delete t.cellHeight,this.cellHeight(l)}t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=fe),this._setStaticClass();let s=t.engineClass||q.engineClass||vn;if(this.engine=new s({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:l=>{l.forEach(_=>{let d=_.el;d&&(_._removeDOM?(d&&d.remove(),delete _._removeDOM):this._writePosAttr(d,_))}),this._updateContainerHeight()}}),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(l=>this._prepareElement(l)),delete this.engine._loading,this.batchUpdate(!1)),t.children){let l=t.children;delete t.children,l.length&&this.load(l)}this.setAnimation(),t.subGridDynamic&&!y.pauseDrag&&(y.pauseDrag=!0),t.draggable?.pause!==void 0&&(y.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(a=this.opts){this.el.classList.add("gs-"+a.column),typeof a.column=="number"&&(this.el.style.setProperty("--gs-column-width",`${100/a.column}%`),this.el.style.setProperty("--gs-columns",String(a.column)))}addWidget(a){if(!a)return;if(typeof a=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(a.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(a);let t,o=a;if(o.grid=this,o.el?t=o.el:q.addRemoveCB?t=q.addRemoveCB(this.el,a,!0,!1):t=this.createWidgetDivs(o),!t)return;if(o=t.gridstackNode,o&&t.parentElement===this.el&&this.engine.nodes.find(i=>i._id===o._id))return t;let r=this._readAttr(t);return v.defaults(a,r),this.engine.prepareNode(a),this.el.appendChild(t),this.makeWidget(t,a),t}createWidgetDivs(a){let t=v.createDiv(["grid-stack-item",this.opts.itemClass]),o=v.createDiv(["grid-stack-item-content"],t);return v.lazyLoad(a)?a.visibleObservable||(a.visibleObservable=new IntersectionObserver(([r])=>{r.isIntersecting&&(a.visibleObservable?.disconnect(),delete a.visibleObservable,q.renderCB(o,a),a.grid?.prepareDragDrop(a.el))}),window.setTimeout(()=>a.visibleObservable?.observe(t))):q.renderCB(o,a),t}makeSubGrid(a,t,o,r=!0){let i=a.gridstackNode;if(i||(i=this.makeWidget(a).gridstackNode),i.subGrid?.el)return i.subGrid;let n,s=this;for(;s&&!n;)n=s.opts?.subGridOpts,s=s.parentGridNode?.grid;t=v.cloneDeep(B(B(F(B({},this.opts),{id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0}),n||{}),t||i.subGridOpts||{})),i.subGridOpts=t;let l=!1;t.column==="auto"&&(l=!0,t.column=Math.max(i.w||1,o?.w||1),delete t.columnOpts);let _=i.el.querySelector(".grid-stack-item-content"),d,c;if(r&&(this._removeDD(i.el),c=F(B({},i),{x:0,y:0}),v.removeInternalForSave(c),delete c.subGridOpts,i.content&&(c.content=i.content,delete i.content),q.addRemoveCB?d=q.addRemoveCB(this.el,c,!0,!1)||void 0:(d=v.createDiv(["grid-stack-item"]),d.appendChild(_),_=v.createDiv(["grid-stack-item-content"],i.el)),this.prepareDragDrop(i.el)),o){let h=l?t.column:i.w,f=i.h+o.h,x=i.el.style;x.transition="none",this.update(i.el,{w:h,h:f}),setTimeout(()=>x.transition="")}let u=i.subGrid=q.addGrid(_,t)||void 0;return o?._moving&&(u._isTemp=!0),l&&(u._autoColumn=!0),r&&u.makeWidget(d,c),o&&(o._moving?window.setTimeout(()=>v.simulateMouseEvent(o._event,"mouseenter",u.el),0):u.makeWidget(i.el,i)),this.resizeToContentCheck(!1,i),u}removeAsSubGrid(a){let t=this.parentGridNode?.grid;if(t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(o=>{o.x=(o.x??0)+(this.parentGridNode.x??0),o.y=(o.y??0)+(this.parentGridNode.y??0),this._removeDD(o.el),o.el.remove(),delete o.el.gridstackNode,t.makeWidget(o.el,o)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,a)){let o=a.el?.gridstackNode;o&&o!==a&&(o._temporaryRemoved=!0),window.setTimeout(()=>{let r=y.dragElement?.lastDrag||a._event;r&&v.simulateMouseEvent(r,"mouseenter",t.el)},0)}}save(a=!0,t=!1,o=q.saveCB,r){let i=this.engine.save(a,o,r);if(i.forEach(n=>{if(a&&n.el&&!n.subGrid&&!o)n.content=n.el.querySelector(".grid-stack-item-content")?.innerHTML,n.content||delete n.content;else if(!a&&!o&&delete n.content,n.subGrid?.el){let s=n.w||n.subGrid.getColumn(),l=n.subGrid.save(a,t,o,s);n.subGridOpts=t?l:{children:l},delete n.subGrid}delete n.el}),t){let n=v.cloneDeep(this.opts);n.marginBottom===n.marginTop&&n.marginRight===n.marginLeft&&n.marginTop===n.marginRight&&(n.margin=n.marginTop,delete n.marginTop,delete n.marginRight,delete n.marginBottom,delete n.marginLeft),n.rtl===(this.el.style.direction==="rtl")&&(n.rtl="auto"),this._isAutoCellHeight&&(n.cellHeight="auto"),this._autoColumn&&(n.column="auto");let s=n._alwaysShowResizeHandle;return delete n._alwaysShowResizeHandle,s!==void 0?n.alwaysShowResizeHandle=s:delete n.alwaysShowResizeHandle,v.removeInternalAndSame(n,D0),n.children=i,n}return i}load(a,t=q.addRemoveCB||!0){a.forEach(d=>{d.w=d.w||d.minW||1,d.h=d.h||d.minH||1}),a=v.sort(a),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let o=0;a.forEach(d=>{o=Math.max(o,(d.x||0)+d.w)}),o>this.engine.defaultColumn&&(this.engine.defaultColumn=o);let r=this.getColumn();o>r&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=a,this.engine.columnChanged(o,r,this.responseLayout),a=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(a,o,!0));let i=q.addRemoveCB;typeof t=="function"&&(q.addRemoveCB=t);let n=[];this.batchUpdate();let s=!this.engine.nodes.length,l=s&&this.opts.animate;l&&this.setAnimation(!1),!s&&t&&[...this.engine.nodes].forEach(d=>{d.id&&(v.find(a,d.id)||(q.addRemoveCB&&q.addRemoveCB(this.el,d,!1,!1),n.push(d),this.removeWidget(d.el,!0,!1)))}),this.engine._loading=!0;let _=[];return this.engine.nodes=this.engine.nodes.filter(d=>d.id&&v.find(a,d.id)?(_.push(d),!1):!0),a.forEach(d=>{let c=d.id?v.find(_,d.id):void 0;if(c){if(v.shouldSizeToContent(c)&&(d.h=c.h),this.engine.nodeBoundFix(d),(d.autoPosition||d.x===void 0||d.y===void 0)&&(d.w=d.w||c.w,d.h=d.h||c.h,this.engine.findEmptyPosition(d)),this.engine.nodes.push(c),v.samePos(c,d)&&this.engine.nodes.length>1&&(this.moveNode(c,F(B({},d),{forceCollide:!0})),v.copyPos(d,c)),this.update(c.el,d),d.subGridOpts?.children){let u=c.el.querySelector(".grid-stack");u&&u.gridstack&&u.gridstack.load(d.subGridOpts.children)}}else t&&this.addWidget(d)}),delete this.engine._loading,this.engine.removedNodes=n,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,i?q.addRemoveCB=i:delete q.addRemoveCB,l&&this.setAnimation(!0,!0),this}batchUpdate(a=!0){return this.engine.batchUpdate(a),a||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(a=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!a||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;let t=this.el.querySelector("."+this.opts.itemClass);if(t){let r=v.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/r)}let o=parseInt(this.el.getAttribute("gs-current-row")||"0");return o?Math.round(this.el.getBoundingClientRect().height/o):this.opts.cellHeight}cellHeight(a){if(a!==void 0&&this._isAutoCellHeight!==(a==="auto")&&(this._isAutoCellHeight=a==="auto",this._updateResizeEvent()),(a==="initial"||a==="auto")&&(a=void 0),a===void 0){let o=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;a=this.cellWidth()+o}let t=v.parseHeight(a);return this.opts.cellHeightUnit===t.unit&&this.opts.cellHeight===t.h?this:(this.opts.cellHeightUnit=t.unit,this.opts.cellHeight=t.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(a=!1){return a&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){let a=this.opts.columnOpts;if(!a||!a.columnWidth&&!a.breakpoints?.length)return!1;let t=this.getColumn(),o=t,r=this._widthOrContainer(!0);if(a.columnWidth)o=Math.min(Math.round(r/a.columnWidth)||1,a.columnMax);else{o=a.columnMax;let i=0;for(;i<a.breakpoints.length&&r<=a.breakpoints[i].w;)o=a.breakpoints[i++].c||t}if(o!==t){let i=a.breakpoints?.find(n=>n.c===o);return this.column(o,i?.layout||a.layout),!0}return!1}compact(a="compact",t=!0){return this.engine.compact(a,t),this._triggerChangeEvent(),this}column(a,t="moveScale"){if(!a||a<1||this.opts.column===a)return this;let o=this.getColumn();return this.opts.column=a,this.engine?(this.engine.column=a,this.el.classList.remove("gs-"+o),this._updateColumnVar(),this.engine.columnChanged(o,a,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=t,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(a=>a.matches("."+this.opts.itemClass)&&!a.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return!!this._ignoreLayoutsNodeChange}destroy(a=!0){return this.el?(this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),a?this.el.parentNode.removeChild(this.el):(this.removeAll(a),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this):this}float(a){return this.opts.float!==a&&(this.opts.float=this.engine.float=a,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(a,t=!1){let o=this.el.getBoundingClientRect(),r;t?r={top:o.top+document.documentElement.scrollTop,left:o.left}:r={top:this.el.offsetTop,left:this.el.offsetLeft};let i=a.left-r.left,n=a.top-r.top,s=o.width/this.getColumn(),l=o.height/parseInt(this.el.getAttribute("gs-current-row")||"0");return{x:Math.floor(i/s),y:Math.floor(n/l)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(a,t,o,r){return this.engine.isAreaEmpty(a,t,o,r)}makeWidget(a,t){let o=q.getElement(a);if(!o||o.gridstackNode)return o;o.parentElement||this.el.appendChild(o),this._prepareElement(o,!0,t);let r=o.gridstackNode;this._updateContainerHeight(),r.subGridOpts&&this.makeSubGrid(o,r.subGridOpts,void 0,!1);let i=!1;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(i=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),i&&delete this._ignoreLayoutsNodeChange,o}on(a,t){return a.indexOf(" ")!==-1?(a.split(" ").forEach(o=>this.on(o,t)),this):(a==="change"||a==="added"||a==="removed"||a==="enable"||a==="disable"?(a==="enable"||a==="disable"?this._gsEventHandler[a]=o=>t(o):this._gsEventHandler[a]=(o=>{o.detail&&t(o,o.detail)}),this.el.addEventListener(a,this._gsEventHandler[a])):a==="drag"||a==="dragstart"||a==="dragstop"||a==="resizestart"||a==="resize"||a==="resizestop"||a==="dropped"||a==="resizecontent"?this._gsEventHandler[a]=t:console.error("GridStack.on("+a+") event not supported"),this)}off(a){return a.indexOf(" ")!==-1?(a.split(" ").forEach(t=>this.off(t)),this):((a==="change"||a==="added"||a==="removed"||a==="enable"||a==="disable")&&this._gsEventHandler[a]&&this.el.removeEventListener(a,this._gsEventHandler[a]),delete this._gsEventHandler[a],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(a=>this.off(a)),this}removeWidget(a,t=!0,o=!0){return a?(q.getElements(a).forEach(r=>{if(r.parentElement&&r.parentElement!==this.el)return;let i=r.gridstackNode;i||(i=this.engine.nodes.find(n=>r===n.el)),i&&(t&&q.addRemoveCB&&q.addRemoveCB(this.el,i,!1,!1),delete r.gridstackNode,this._removeDD(r),this.engine.removeNode(i,t,o),t&&r.parentElement&&r.remove())}),o&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(a=!0,t=!0){return this.engine.nodes.forEach(o=>{a&&q.addRemoveCB&&q.addRemoveCB(this.el,o,!1,!1),delete o.el.gridstackNode,this.opts.staticGrid||this._removeDD(o.el)}),this.engine.removeAll(a,t),t&&this._triggerRemoveEvent(),this}setAnimation(a=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(a)}):a?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=a,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(a,t=!0,o=!0){return!!this.opts.staticGrid===a?this:(a?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(r=>{this.prepareDragDrop(r.el),r.subGrid&&o&&r.subGrid.setStatic(a,t,o)}),t&&this._setStaticClass(),this)}updateOptions(a){let t=this.opts;if(a===t)return this;if(a.acceptWidgets!==void 0&&(t.acceptWidgets=a.acceptWidgets,this._setupAcceptWidget()),a.animate!==void 0&&this.setAnimation(a.animate),a.cellHeight&&this.cellHeight(a.cellHeight),a.class!==void 0&&a.class!==t.class&&(t.class&&this.el.classList.remove(t.class),a.class&&this.el.classList.add(a.class)),a.columnOpts){let o=!!this.opts.columnOpts;this.opts.columnOpts=a.columnOpts,o!==!!this.opts.columnOpts&&this._updateResizeEvent(),this.checkDynamicColumn()}else a.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof a.column=="number"&&this.column(a.column);return a.margin!==void 0&&this.margin(a.margin),a.staticGrid!==void 0&&this.setStatic(a.staticGrid),a.disableDrag!==void 0&&!a.staticGrid&&this.enableMove(!a.disableDrag),a.disableResize!==void 0&&!a.staticGrid&&this.enableResize(!a.disableResize),a.float!==void 0&&this.float(a.float),a.row!==void 0?(t.minRow=t.maxRow=this.engine.maxRow=t.row=a.row,this._updateContainerHeight(),this.engine.getRow()>a.row&&this.compact()):(a.minRow!==void 0&&(t.minRow=a.minRow,this._updateContainerHeight()),a.maxRow!==void 0&&(t.maxRow=this.engine.maxRow=a.maxRow,this.engine.getRow()>a.maxRow&&this.compact())),a.lazyLoad!==void 0&&(t.lazyLoad=a.lazyLoad),a.children?.length&&this.load(a.children),this}update(a,t){return q.getElements(a).forEach(o=>{let r=o?.gridstackNode;if(!r)return;let i=B(B({},v.copyPos({},r)),v.cloneDeep(t));this.engine.nodeBoundFix(i),delete i.autoPosition;let n=["x","y","w","h"],s,l=i,_=r;if(n.some(u=>l[u]!==void 0&&l[u]!==_[u])){s={};let u=s;n.forEach(h=>{u[h]=l[h]!==void 0?l[h]:_[h],delete l[h]})}if(!s&&(i.minW||i.minH||i.maxW||i.maxH)&&(s={}),i.content!==void 0){let u=o.querySelector(".grid-stack-item-content");u&&u.textContent!==i.content&&(r.content=i.content,q.renderCB(u,i),r.subGrid?.el&&(u.appendChild(r.subGrid.el),r.subGrid._updateContainerHeight())),delete i.content}let d=!1,c=!1;for(let u in l)u[0]!=="_"&&_[u]!==l[u]&&(_[u]=l[u],d=!0,c=c||!this.opts.staticGrid&&(u==="noResize"||u==="noMove"||u==="locked"));if(v.sanitizeMinMax(r),s){let u=s.w!==void 0&&s.w!==r.w;this.moveNode(r,s),u&&r.subGrid?r.subGrid.onResize(this.hasAnimationCSS()?r.w:void 0):this.resizeToContentCheck(u,r),delete r._orig}(s||d)&&this._writeAttr(o,r),c&&this.prepareDragDrop(r.el),q.updateCB&&q.updateCB(r)}),this}moveNode(a,t){let o=a._updating;o||this.engine.cleanNodes().beginUpdate(a),this.engine.moveNode(a,t),this._updateContainerHeight(),o||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(a){if(!a||(a.classList.remove("size-to-content-max"),!a.clientHeight))return;let t=a.gridstackNode;if(!t)return;let o=t.grid;if(!o||a.parentElement!==o.el)return;let r=o.getCellHeight(!0);if(!r)return;let i=t.h?t.h*r:a.clientHeight,n=null;if(t.resizeToContentParent&&(n=a.querySelector(t.resizeToContentParent)),n||(n=a.querySelector(q.resizeToContentParent)),!n)return;let s=a.clientHeight-n.clientHeight,l=t.h?t.h*r-s:n.clientHeight,_;if(t.subGrid){_=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);let u=t.subGrid.el.getBoundingClientRect(),h=a.getBoundingClientRect();_+=u.top-h.top}else{if(t.subGridOpts?.children?.length)return;{let u=n.firstElementChild;if(!u){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${q.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}_=u.getBoundingClientRect().height||l}}if(l===_)return;i+=_-l;let d=Math.ceil(i/r),c=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;c&&d>c&&(d=c,a.classList.add("size-to-content-max")),t.minH&&d<t.minH?d=t.minH:t.maxH&&d>t.maxH&&(d=t.maxH),d!==t.h&&(o._ignoreLayoutsNodeChange=!0,o.moveNode(t,{h:d}),delete o._ignoreLayoutsNodeChange)}resizeToContentCBCheck(a){q.resizeToContentCB?q.resizeToContentCB(a):this.resizeToContent(a)}rotate(a,t){return q.getElements(a).forEach(o=>{let r=o.gridstackNode;if(!r||!v.canBeRotated(r))return;let i={w:r.h,h:r.w,minH:r.minW,minW:r.minH,maxH:r.maxW,maxW:r.maxH};if(t){let l=t.left>0?Math.floor(t.left/this.cellWidth()):0,_=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;i.x=r.x+l-(r.h-(_+1)),i.y=r.y+_-l}let n=i;Object.keys(n).forEach(l=>{n[l]===void 0&&delete n[l]});let s=r._orig;this.update(o,i),r._orig=s}),this}margin(a){if(!(typeof a=="string"&&a.split(" ").length>1)){let t=v.parseHeight(a);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return this}return this.opts.margin=a,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(a){return this.engine.willItFit(a)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let a=this.engine.getDirtyNodes(!0);return a&&a.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(a),this._triggerEvent("change",a)),this.engine.saveInitial(),this._sortDom(),this}_sortDom(){let a=this.engine.nodes;if(a.forEach(o=>{o.subGrid&&o.subGrid._sortDom()}),a.length<2)return this;this.engine.sortNodes(),a=this.engine.nodes;let t=this.el.children;return a.some((o,r)=>o.el!==t[r])&&a.forEach(o=>{o.el&&o.el.parentElement===this.el&&this.el.appendChild(o.el)}),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(t=>{delete t._dirty});let a=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",a)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){let a=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",a)}return this}_triggerEvent(a,t){let o=t?new CustomEvent(a,{bubbles:!1,detail:t}):new Event(a),r=this;for(;r.parentGridNode;)r=r.parentGridNode.grid;return r.el.dispatchEvent(o),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let a=this.parentGridNode,t=this.getRow()+this._extraDragRow,o=this.opts.cellHeight,r=this.opts.cellHeightUnit;if(!o)return this;if(!a&&!this.opts.minRow){let i=v.parseHeight(getComputedStyle(this.el).minHeight);if(i.h>0&&i.unit===r){let n=Math.floor(i.h/o);t<n&&(t=n)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[a?"minHeight":"height"]=t*o+r),a&&v.shouldSizeToContent(a)&&a.grid.resizeToContentCBCheck(a.el),this}_prepareElement(a,t=!1,o){o=o||this._readAttr(a),a.gridstackNode=o,o.el=a,o.grid=this,o=this.engine.addNode(o,t),this._writeAttr(a,o),a.classList.add(D0.itemClass,this.opts.itemClass);let r=v.shouldSizeToContent(o);return r?a.classList.add("size-to-content"):a.classList.remove("size-to-content"),r&&this.resizeToContentCheck(!1,o),(!v.lazyLoad(o)||!o.visibleObservable)&&this.prepareDragDrop(o.el),this}_writePosAttr(a,t){if(!t._moving&&!t._resizing||this._placeholder===a){let o=this.opts.rtl?"right":"left",r=a.style;r.top=t.y?t.y===1?"var(--gs-cell-height)":`calc(${t.y} * var(--gs-cell-height))`:null,r[o]=t.x?t.x===1?"var(--gs-column-width)":`calc(${t.x} * var(--gs-column-width))`:null,r.width=t.w>1?`calc(${t.w} * var(--gs-column-width))`:null,r.height=t.h>1?`calc(${t.h} * var(--gs-cell-height))`:null}return a.style.setProperty("--gs-x",String(t.x||0)),a.style.setProperty("--gs-y",String(t.y||0)),a.style.setProperty("--gs-w",String(t.w||1)),a.style.setProperty("--gs-h",String(t.h||1)),a.setAttribute("gs-x",String(t.x??0)),a.setAttribute("gs-y",String(t.y??0)),t.w>1?a.setAttribute("gs-w",String(t.w)):a.removeAttribute("gs-w"),t.h>1?a.setAttribute("gs-h",String(t.h)):a.removeAttribute("gs-h"),this}_writeAttr(a,t){if(!t)return this;this._writePosAttr(a,t);let o={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"},r=t,i=o;for(let n in i)r[n]!==void 0&&r[n]!==null&&r[n]!==!1?a.setAttribute(i[n],String(r[n])):a.removeAttribute(i[n]);return t.print?(t.print.pageBreak?a.setAttribute("gs-page-break",String(t.print.pageBreak)):a.removeAttribute("gs-page-break"),t.print.hide?a.classList.add("gs-print-hide"):a.classList.remove("gs-print-hide"),t.print.orientation?a.setAttribute("gs-print-orientation",String(t.print.orientation)):a.removeAttribute("gs-print-orientation")):(a.removeAttribute("gs-page-break"),a.classList.remove("gs-print-hide"),a.removeAttribute("gs-print-orientation")),this}_readAttr(a,t=!0){let o={};o.x=v.toNumber(a.getAttribute("gs-x")),o.y=v.toNumber(a.getAttribute("gs-y")),o.w=v.toNumber(a.getAttribute("gs-w")),o.h=v.toNumber(a.getAttribute("gs-h")),o.autoPosition=v.toBool(a.getAttribute("gs-auto-position")),o.noResize=v.toBool(a.getAttribute("gs-no-resize")),o.noMove=v.toBool(a.getAttribute("gs-no-move")),o.locked=v.toBool(a.getAttribute("gs-locked"));let r=a.getAttribute("gs-page-break"),i=a.classList.contains("gs-print-hide"),n=a.getAttribute("gs-print-orientation");(r||i||n)&&(o.print={},r&&(o.print.pageBreak=v.toBool(r)),i&&(o.print.hide=!0),n&&(o.print.orientation=n));let s=a.getAttribute("gs-size-to-content");s&&(s==="true"||s==="false"?o.sizeToContent=v.toBool(s):o.sizeToContent=parseInt(s,10)),o.id=a.getAttribute("gs-id")??void 0,o.maxW=v.toNumber(a.getAttribute("gs-max-w")),o.minW=v.toNumber(a.getAttribute("gs-min-w")),o.maxH=v.toNumber(a.getAttribute("gs-max-h")),o.minH=v.toNumber(a.getAttribute("gs-min-h")),t&&(o.w===1&&a.removeAttribute("gs-w"),o.h===1&&a.removeAttribute("gs-h"),o.maxW&&a.removeAttribute("gs-max-w"),o.minW&&a.removeAttribute("gs-min-w"),o.maxH&&a.removeAttribute("gs-max-h"),o.minH&&a.removeAttribute("gs-min-h"));let l=o;for(let _ in l)o.hasOwnProperty(_)&&!l[_]&&l[_]!==0&&_!=="sizeToContent"&&delete l[_];return o}_setStaticClass(){let a=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...a),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...a),this.el.removeAttribute("gs-static")),this}onResize(a=this.el?.clientWidth){if(!a)return this;if(this.prevWidth===a)return this;this.prevWidth=a,this.batchUpdate();let t=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),t=!0):t=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(o=>{o.subGrid&&o.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(t),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(a=!1,t){if(!this.engine)return;if(a&&this.hasAnimationCSS()){setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);return}if(t)v.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(r=>v.shouldSizeToContent(r))){let r=[...this.engine.nodes];this.batchUpdate(),r.forEach(i=>{v.shouldSizeToContent(i)&&this.resizeToContentCBCheck(i.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}let o=this._gsEventHandler.resizecontent;o&&o(new Event("resizecontent"),t?[t]:this.engine.nodes)}_updateResizeEvent(a=!1){let t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(o=>o.sizeToContent));return!a&&t&&!this.resizeObserver?(this._sizeThrottle=v.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(a||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(a=".grid-stack-item"){return v.getElement(a)}static getElements(a=".grid-stack-item"){return v.getElements(a)}static getGridElement(a){return q.getElement(a)}static getGridElements(a){return v.getElements(a)}_initMargin(){let a={h:0,unit:"px"},t=0,o=[];typeof this.opts.margin=="string"&&(o=this.opts.margin.split(" ")),o.length===2?(this.opts.marginTop=this.opts.marginBottom=o[0],this.opts.marginLeft=this.opts.marginRight=o[1]):o.length===4?(this.opts.marginTop=o[0],this.opts.marginRight=o[1],this.opts.marginBottom=o[2],this.opts.marginLeft=o[3]):(a=v.parseHeight(this.opts.margin),this.opts.marginUnit=a.unit,t=this.opts.margin=a.h);let r=["marginTop","marginRight","marginBottom","marginLeft"],i=this.opts;r.forEach(s=>{i[s]===void 0?i[s]=t:(a=v.parseHeight(i[s]),i[s]=a.h,delete this.opts.margin)}),this.opts.marginUnit=a.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);let n=this.el.style;return n.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),n.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),n.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),n.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return M0}static setupDragIn(a,t,o,r=document){t?.pause!==void 0&&(y.pauseDrag=t.pause),t=B({appendTo:"body",helper:"clone"},t||{}),(typeof a=="string"?v.getElements(a,r):a).forEach((i,n)=>{M0.isDraggable(i)||M0.dragIn(i,t),o?.[n]&&(i.gridstackNode=o[n])})}movable(a,t){return this.opts.staticGrid?this:(q.getElements(a).forEach(o=>{let r=o.gridstackNode;r&&(t?delete r.noMove:r.noMove=!0,this.prepareDragDrop(r.el))}),this)}resizable(a,t){return this.opts.staticGrid?this:(q.getElements(a).forEach(o=>{let r=o.gridstackNode;r&&(t?delete r.noResize:r.noResize=!0,this.prepareDragDrop(r.el))}),this)}disable(a=!0){return this.opts.staticGrid?this:(this.enableMove(!1,a),this.enableResize(!1,a),this._triggerEvent("disable"),this)}enable(a=!0){return this.opts.staticGrid?this:(this.enableMove(!0,a),this.enableResize(!0,a),this._triggerEvent("enable"),this)}enableMove(a,t=!0){return this.opts.staticGrid?this:(a?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&t&&o.subGrid.enableMove(a,t)}),this)}enableResize(a,t=!0){return this.opts.staticGrid?this:(a?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&t&&o.subGrid.enableResize(a,t)}),this)}cancelDrag(){let a=y.dragElement?.el;if(a?._gridstackNodeOrig){let o=a._gridstackNodeOrig,r=o.grid,i=this._placeholder?.gridstackNode;i&&(i._isAboutToRemove=!0,this.engine.removeNode(i)),this.engine.restoreInitial(),a.gridstackNode=o,delete a._gridstackNodeOrig,delete y.dropElement,r&&(r.engine.addNode(o,!1),r.engine.restoreInitial());return}let t=this._placeholder?.gridstackNode;t&&(t._isExternal?(t._isAboutToRemove=!0,this.engine.removeNode(t)):t._isAboutToRemove&&q._itemRemoving(t.el,!1),this.engine.restoreInitial())}_removeDD(a){return M0.draggable(a,"destroy").resizable(a,"destroy"),a.gridstackNode&&delete a.gridstackNode._initDD,delete a.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return M0.droppable(this.el,"destroy"),this;let a,t,o=(r,i,n)=>{n=n||i;let s=n.gridstackNode;if(!s)return;if(!s.grid?.el){n.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;let u=n.getBoundingClientRect();n.style.left=u.x+(this.dragTransform.xScale-1)*(r.clientX-u.x)/this.dragTransform.xScale+"px",n.style.top=u.y+(this.dragTransform.yScale-1)*(r.clientY-u.y)/this.dragTransform.yScale+"px",n.style.transformOrigin="0px 0px"}let{top:l,left:_}=n.getBoundingClientRect(),d=this.el.getBoundingClientRect();_-=d.left,l-=d.top;let c={position:{top:l*this.dragTransform.xScale,left:_*this.dragTransform.yScale}};if(s._temporaryRemoved){if(s.x=Math.max(0,Math.round(_/t)),s.y=Math.max(0,Math.round(l/a)),delete s.autoPosition,this.engine.nodeBoundFix(s),!this.engine.willItFit(s)){if(s.autoPosition=!0,!this.engine.willItFit(s)){M0.off(i,"drag");return}s._willFitPos&&(v.copyPos(s,s._willFitPos),delete s._willFitPos)}this._onStartMoving(n,r,c,s,t,a)}else this._dragOrResize(n,r,c,s,t,a)};return M0.droppable(this.el,{accept:r=>{let i=r.gridstackNode||this._readAttr(r,!1);if(i?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let n=!0;if(typeof this.opts.acceptWidgets=="function")n=this.opts.acceptWidgets(r);else{let s=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;n=r.matches(s)}if(n&&i&&this.opts.maxRow){let s={w:i.w,h:i.h,minW:i.minW,minH:i.minH};n=this.engine.willItFit(s)}return n}}).on(this.el,"dropover",(r,i,n)=>{let s=n?.gridstackNode||i.gridstackNode;if(s?.grid===this&&!s._temporaryRemoved)return!1;if(s?._sidebarOrig&&(s.w=s._sidebarOrig.w,s.h=s._sidebarOrig.h),s?.grid&&s.grid!==this&&!s._temporaryRemoved&&s.grid._leave(i,n),n=n||i,t=this.cellWidth(),a=this.getCellHeight(!0),!s){let d=n.getAttribute("data-gs-widget")||n.getAttribute("gridstacknode");if(d){try{s=JSON.parse(d)}catch{console.error("Gridstack dropover: Bad JSON format: ",d)}n.removeAttribute("data-gs-widget"),n.removeAttribute("gridstacknode")}s||(s=this._readAttr(n)),s._sidebarOrig={w:s.w,h:s.h}}s.grid||(s.el||(s=B({},s)),s._isExternal=!0,n.gridstackNode=s);let l=s.w||Math.round(n.offsetWidth/t)||1,_=s.h||Math.round(n.offsetHeight/a)||1;return s.grid&&s.grid!==this?(i._gridstackNodeOrig||(i._gridstackNodeOrig=s),i.gridstackNode=s=F(B({},s),{w:l,h:_,grid:this}),delete s.x,delete s.y,this.engine.cleanupNode(s).nodeBoundFix(s),s._initDD=s._isExternal=s._temporaryRemoved=!0):(s.w=l,s.h=_,s._temporaryRemoved=!0),q._itemRemoving(s.el,!1),M0.on(i,"drag",o),o(r,i,n),!1}).on(this.el,"dropout",(r,i,n)=>{let s=n?.gridstackNode||i.gridstackNode;return s&&(!s.grid||s.grid===this)&&(this._leave(i,n),this._isTemp&&this.removeAsSubGrid(s)),!1}).on(this.el,"drop",(r,i,n)=>{let s=n?.gridstackNode||i.gridstackNode;if(s?.grid===this&&!s._isExternal)return!1;let l=!!this.placeholder.parentElement,_=i!==n;this.placeholder.remove(),delete this.placeholder.gridstackNode,l&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));let d=i._gridstackNodeOrig;if(delete i._gridstackNodeOrig,l&&d?.grid&&d.grid!==this){let u=d.grid;u.engine.removeNodeFromLayoutCache(d),u.engine.removedNodes.push(d),u._triggerRemoveEvent()._triggerChangeEvent(),u.parentGridNode&&!u.engine.nodes.length&&u.opts.subGridDynamic&&u.removeAsSubGrid()}if(!s||(l&&(this.engine.cleanupNode(s),s.grid=this),delete s.grid?._isTemp,M0.off(i,"drag"),n&&n!==i?(n.remove(),i=n):i.remove(),this._removeDD(i),!l))return!1;let c=s.subGrid?.el?.gridstack;return v.copyPos(s,this._readAttr(this.placeholder)),v.removePositioningStyles(i),_&&(s.content||s.subGridOpts||q.addRemoveCB)?(delete s.el,i=this.addWidget(s)||i):(this._prepareElement(i,!0,s),this.el.appendChild(i),this.resizeToContentCheck(!1,s),c&&(c.parentGridNode=s),this._updateContainerHeight()),this.engine.addedNodes.push(s),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(F(B({},r),{type:"dropped"}),d&&d.grid?d:void 0,s),!1}),this}static _itemRemoving(a,t){if(!a)return;let o=a?a.gridstackNode:void 0;!o?.grid||a.classList.contains(o.grid.opts.removableOptions.decline)||(t?o._isAboutToRemove=!0:delete o._isAboutToRemove,t?a.classList.add("grid-stack-item-removing"):a.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;let a=document.querySelector(this.opts.removable);return a?(!this.opts.staticGrid&&!M0.isDroppable(a)&&M0.droppable(a,this.opts.removableOptions).on(a,"dropover",(t,o)=>q._itemRemoving(o,!0)).on(a,"dropout",(t,o)=>q._itemRemoving(o,!1)),this):this}refreshDragHandles(a){return q.getElements(a).forEach(t=>{t.ddElement?.ddDraggable?.refreshHandles()}),this}prepareDragDrop(a,t=!1){let o=a?.gridstackNode;if(!o)return this;let r=o.noMove||this.opts.disableDrag,i=o.noResize||this.opts.disableResize,n=this.opts.staticGrid||r&&i;if((t||n)&&(o._initDD&&(this._removeDD(a),delete o._initDD),n))return a.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!o._initDD){let s,l,_=(u,h)=>{this.triggerEvent(u,u.target),s=this.cellWidth(),l=this.getCellHeight(!0),this._onStartMoving(a,u,h,o,s,l)},d=(u,h)=>{this._dragOrResize(a,u,h,o,s,l)},c=u=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete o._moving,delete o._resizing,delete o._event,delete o._lastTried;let h=o.w!==o._orig.w,f=u.target;if(!(!f.gridstackNode||f.gridstackNode.grid!==this)){if(o.el=f,o._isAboutToRemove){let x=a.gridstackNode.grid;x._gsEventHandler[u.type]&&x._gsEventHandler[u.type](u,f),x.engine.nodes.push(o),x.removeWidget(a,!0,!0)}else v.removePositioningStyles(f),o._temporaryRemoved?(this._writePosAttr(f,o),this.engine.addNode(o)):this._writePosAttr(f,o),this.triggerEvent(u,f);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),u.type==="resizestop"&&(Number.isInteger(o.sizeToContent)&&(o.sizeToContent=o.h),this.resizeToContentCheck(h,o))}};M0.draggable(a,{start:_,stop:c,drag:d,rtl:this.opts.rtl==="auto"?void 0:this.opts.rtl}).resizable(a,{start:_,stop:c,resize:d,rtl:this.opts.rtl==="auto"?void 0:this.opts.rtl}),o._initDD=!0}return M0.draggable(a,r?"disable":"enable").resizable(a,i?"disable":"enable"),this}_onStartMoving(a,t,o,r,i,n){if(this.engine.cleanNodes().beginUpdate(r),this._writePosAttr(this.placeholder,r),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=r,r.grid?.el)this.dragTransform=v.getValuesFromTransformedElement(a);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){let s=this.placeholder.closest(".grid-stack");this.dragTransform=v.getValuesFromTransformedElement(s)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(r.el=this.placeholder,r._lastUiPosition=o.position,r._prevYPix=o.position.top,r._moving=t.type==="dragstart",r._resizing=t.type==="resizestart",delete r._lastTried,t.type==="dropover"&&r._temporaryRemoved&&(this.engine.addNode(r),r._moving=!0),this.engine.cacheRects(i,n,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){let s=this.getColumn()-r.x,l=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-r.y;M0.resizable(a,"option","minWidth",i*Math.min(r.minW||1,s)).resizable(a,"option","minHeight",n*Math.min(r.minH||1,l)).resizable(a,"option","maxWidth",i*Math.min(r.maxW||Number.MAX_SAFE_INTEGER,s)).resizable(a,"option","maxWidthMoveLeft",i*Math.min(r.maxW||Number.MAX_SAFE_INTEGER,r.x+r.w)).resizable(a,"option","maxHeight",n*Math.min(r.maxH||Number.MAX_SAFE_INTEGER,l)).resizable(a,"option","maxHeightMoveUp",n*Math.min(r.maxH||Number.MAX_SAFE_INTEGER,r.y+r.h))}}_dragOrResize(a,t,o,r,i,n){let s=B({},r._orig),l=!1,_=this.opts.marginLeft,d=this.opts.marginRight,c=this.opts.marginTop,u=this.opts.marginBottom,h=Math.round(n*.1),f=Math.round(i*.1);if(_=Math.min(_,f),d=Math.min(d,f),c=Math.min(c,h),u=Math.min(u,h),t.type==="drag"){if(r._temporaryRemoved)return;r._prevYPix=o.position.top,this.opts.draggable.scroll!==!1&&y.dragElement?.updateScrollPosition(this.el);let T=o.position.left+(o.position.left>r._lastUiPosition.left?-d:_),S=o.position.top+(o.position.top>r._lastUiPosition.top?-u:c);s.x=Math.round(T/i),s.y=Math.round(S/n);let k=this._extraDragRow;if(this.engine.collide(r,s)){let A=this.getRow(),i1=Math.max(0,s.y+r.h-A);this.opts.maxRow&&A+i1>this.opts.maxRow&&(i1=Math.max(0,this.opts.maxRow-A)),this._extraDragRow=i1}else this._extraDragRow=0;if(this._extraDragRow!==k&&this._updateContainerHeight(),r.x===s.x&&r.y===s.y)return}else if(t.type==="resize"){if((s.x??0)<0||(v.updateScrollResize(t,a,n),s.w=Math.round((o.size.width-_)/i),s.h=Math.round((o.size.height-c)/n),r.w===s.w&&r.h===s.h)||r._lastTried&&r._lastTried.w===s.w&&r._lastTried.h===s.h)return;if(t.hasMovedX){let T=r.x-(s.w-r.w);s.x=T<0?0:T}if(t.hasMovedY){let T=r.y-(s.h-r.h);s.y=T<0?0:T}l=!0}r._event=t,r._lastTried=s;let x={x:o.position.left+_,y:o.position.top+c,w:(o.size?o.size.width:r.w*i)-_-d,h:(o.size?o.size.height:r.h*n)-c-u};if(this.engine.moveNodeCheck(r,F(B({},s),{cellWidth:i,cellHeight:n,rect:x,resizing:l}))){r._lastUiPosition=o.position,this.engine.cacheRects(i,n,c,d,u,_),delete r._skipDown,l&&r.subGrid&&r.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();let T=t.target;r._sidebarOrig||this._writePosAttr(T,r),this.triggerEvent(t,T)}}triggerEvent(a,t){let o=this;for(;o.parentGridNode;)o=o.parentGridNode.grid;o._gsEventHandler[a.type]&&o._gsEventHandler[a.type](a,t)}_leave(a,t){t=t||a;let o=t.gridstackNode;if(!o||(t.style.transform=t.style.transformOrigin="",M0.off(a,"drag"),o._temporaryRemoved))return;o._temporaryRemoved=!0,this.engine.removeNode(o),o.el=o._isExternal&&t?t:a;let r=o._sidebarOrig;o._isExternal&&this.engine.cleanupNode(o),o._sidebarOrig=r,this.opts.removable===!0&&q._itemRemoving(a,!0),a._gridstackNodeOrig?(a.gridstackNode=a._gridstackNodeOrig,delete a._gridstackNodeOrig):o._isExternal&&this.engine.restoreInitial()}};X0.renderCB=(e,a)=>{e&&a?.content&&(e.textContent=a.content)};X0.resizeToContentParent=".grid-stack-item-content";X0.Utils=v;X0.Engine=vn;X0.GDRev="13.2.0";Tp=["container"],JI=["*"];aq=["*",[["","empty-content",""]]],tq=["*","[empty-content]"],oq=["*ngIf","isEmpty"];mn=(()=>{class e{constructor(t){this.elementRef=t,this.el._gridItemComp=this}set options(t){let o=this.el.gridstackNode?.grid;o?o.update(this.el,t):this._options=F(B({},t),{el:this.el})}get options(){return this.el.gridstackNode||this._options||{el:this.el}}get el(){return this.elementRef.nativeElement}clearOptions(){delete this._options}ngOnDestroy(){this.clearOptions(),delete this.childWidget,delete this.el._gridItemComp,delete this.container,delete this.ref}}return e.\u0275fac=function(a){return new(a||e)(g2(E1))},e.\u0275cmp=K1({type:e,selectors:[["gridstack-item"]],viewQuery:function(a,t){if(a&1&&cn(Tp,7,N5),a&2){let o;s4(o=l4())&&(t.container=o.first)}},inputs:{options:"options"},ngContentSelectors:JI,decls:5,vars:1,consts:[["container",""],[1,"grid-stack-item-content"]],template:function(a,t){a&1&&(P0(),Mu(0,"div",1),Tu(1,eq,0,0,"ng-template",null,0,Wu),A0(3),v1(4),yu()),a&2&&(w(4),qa(" ",t.options.content," "))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:1}),e})(),M4=(()=>{class e{constructor(t){this.elementRef=t,this.addedCB=new F1,this.changeCB=new F1,this.disableCB=new F1,this.dragCB=new F1,this.dragStartCB=new F1,this.dragStopCB=new F1,this.droppedCB=new F1,this.enableCB=new F1,this.removedCB=new F1,this.resizeCB=new F1,this.resizeStartCB=new F1,this.resizeStopCB=new F1,X0.addRemoveCB||(X0.addRemoveCB=nq),X0.saveCB||(X0.saveCB=sq),X0.updateCB||(X0.updateCB=lq),this.el._gridComp=this}set options(t){this._grid?this._grid.updateOptions(t):this._options=t}get options(){return this._grid?.opts||this._options||{}}get el(){return this.elementRef.nativeElement}get grid(){return this._grid}static registerComponents(t){t.forEach(o=>e.componentMap[e.getSelector(o)]=o)}static getSelector(t){return xa(t).selector}ngOnInit(){this.loaded=!!this.options?.children?.length,this._grid=X0.init(this._options,this.el),delete this._options,this.checkEmpty()}ngAfterContentInit(){this._sub=this.gridstackItems?.changes.subscribe(()=>this.updateAll()),this.loaded||this.updateAll(),this.hookEvents(this.grid)}ngOnDestroy(){this.unhookEvents(this._grid),this._sub?.unsubscribe(),this._grid?.destroy(),delete this._grid,delete this.el._gridComp,delete this.container,delete this.ref}updateAll(){if(!this.grid)return;let t=[];this.gridstackItems?.forEach(o=>{t.push(o.options),o.clearOptions()}),this.grid.load(t)}checkEmpty(){this.grid&&(this.isEmpty=!this.grid.engine.nodes.length)}hookEvents(t){t&&(t.parentGridNode||t.on("added",(o,r)=>{(r[0].grid?.el._gridComp||this).checkEmpty(),this.addedCB.emit({event:o,nodes:r})}).on("change",(o,r)=>this.changeCB.emit({event:o,nodes:r})).on("disable",o=>this.disableCB.emit({event:o})).on("drag",(o,r)=>this.dragCB.emit({event:o,el:r})).on("dragstart",(o,r)=>this.dragStartCB.emit({event:o,el:r})).on("dragstop",(o,r)=>this.dragStopCB.emit({event:o,el:r})).on("dropped",(o,r,i)=>this.droppedCB.emit({event:o,previousNode:r,newNode:i})).on("enable",o=>this.enableCB.emit({event:o})).on("removed",(o,r)=>{(r[0].grid?.el._gridComp||this).checkEmpty(),this.removedCB.emit({event:o,nodes:r})}).on("resize",(o,r)=>this.resizeCB.emit({event:o,el:r})).on("resizestart",(o,r)=>this.resizeStartCB.emit({event:o,el:r})).on("resizestop",(o,r)=>this.resizeStopCB.emit({event:o,el:r})))}unhookEvents(t){t&&(t.parentGridNode||t.off("added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop"))}}return e.componentMap={},e.\u0275fac=function(a){return new(a||e)(g2(E1))},e.\u0275cmp=K1({type:e,selectors:[["gridstack"]],contentQueries:function(a,t,o){if(a&1&&Zu(o,mn,4),a&2){let r;s4(r=l4())&&(t.gridstackItems=r)}},viewQuery:function(a,t){if(a&1&&cn(Tp,7,N5),a&2){let o;s4(o=l4())&&(t.container=o.first)}},inputs:{options:"options",isEmpty:"isEmpty"},outputs:{addedCB:"addedCB",changeCB:"changeCB",disableCB:"disableCB",dragCB:"dragCB",dragStartCB:"dragStartCB",dragStopCB:"dragStopCB",droppedCB:"droppedCB",enableCB:"enableCB",removedCB:"removedCB",resizeCB:"resizeCB",resizeStartCB:"resizeStartCB",resizeStopCB:"resizeStopCB"},ngContentSelectors:tq,decls:4,vars:1,consts:[["container",""],[4,"ngIf"]],template:function(a,t){a&1&&(P0(aq),Au(0,rq,1,0,"ng-content",1)(1,iq,0,0,"ng-template",null,0,Wu),A0(3)),a&2&&W("ngIf",t.isEmpty)},dependencies:[MZ],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:1}),e})();_q=["grid"],cq=["dragOriginPlaceholder"],dq=["editCardsBtn"],hq=[[["","slot","dashboard-subheader"]]],uq=["[slot=dashboard-subheader]"],U8=(e,a)=>a.id,wp=(e,a)=>a.action;document.body.classList.add("ui5-content-density-compact");Iq=class y4{static registerAngularComponents(a){iL(a)}hostEl=b(E1);injector=b(V1);sanitizer=b(lp);i18nService=b(S2);config=m({});sections=H8([]);cards=H8([]);availableCards=m([]);customActions=m([]);i18n=m(x4);loading=m(!1,{transform:o1});loadingDelay=m(1e3,{transform:cZ});saved=R();actionButtonClick=R();unsavedChangesChange=R();i18nKeys=ue;gridDirty=y0(!1);isXLPage=y0(!0);editMode=y0(!1);compactToolbar=y0(!1);toolbarMenuOpen=y0(!1);cardDialogOpen=y0(!1);discardDialogOpen=y0(!1);unsavedNavDialogOpen=y0(!1);backgroundImageHeight=y0(null);dragOriginStyle=y0(null);dragOriginVisible=y0(!1);busyVisible=y0(!1);hasUnsavedChanges=S1(()=>this.editMode()?this.gridDirty()?!0:JSON.stringify(this.sections())!==this.sectionsSnapshotJson||JSON.stringify(this.cards())!==this.cardsSnapshotJson:!1);safeTitle=S1(()=>{let a=this.sanitizer.sanitize(Z1.HTML,this.config().title??this.i18nService.getTranslation(ue.TITLE))??"";return this.sanitizer.bypassSecurityTrustHtml(a)});safeDescription=S1(()=>{let a=this.config().description??this.i18nService.getTranslation(ue.DESCRIPTION);if(!a)return null;let t=this.sanitizer.sanitize(Z1.HTML,a)??"";return this.sanitizer.bypassSecurityTrustHtml(t)});engineProfile=S1(()=>this.config().zFlow?O8.zFlow:O8.default);keyboardNavigationActive=S1(()=>this.editMode()&&!!this.config().zFlow);cardAriaKeyshortcuts=vI;hasToolbarMenuContent=S1(()=>!!this.config().editable||this.customActions().length>0);gridStackEngine=S1(()=>this.engineProfile().engineClass);gridBreakpoints=S1(()=>[...this.engineProfile().breakpoints]);columnVars=S1(()=>{let[a,t,o,r]=this.engineProfile().sectionColumns;return{"--dashboard-cols-sm":a,"--dashboard-cols-md":t,"--dashboard-cols-lg":o,"--dashboard-cols-xl":r}});addedCardsIds=S1(()=>new Set(this.cards().map(a=>a.id)));editViewButton=S1(()=>F(B({icon:"action-settings",design:"Transparent",tooltip:this.i18nService.getTranslation(ue.EDIT_HOME_BUTTON)},this.config().buttonsSettings?.editViewButton),{text:this.i18nService.getTranslation(ue.EDIT_HOME_BUTTON)}));editCardsButton=S1(()=>F(B({icon:"",design:"Default",tooltip:""},this.config().buttonsSettings?.editCardsButton),{text:this.i18nService.getTranslation(ue.EDIT_CARDS_BUTTON)}));sectionCards=S1(()=>{let a=this.cards();return t=>a.filter(o=>o.sectionId===t)});looseCards=Yu(()=>{let a=this.cards().filter(o=>!o.sectionId),t=this.config().zFlow?.cardHeight;return!this.engineProfile().fixedCardHeight||t===void 0?a:a.map(o=>F(B({},o),{h:t,maxH:t,minH:t}))});isEmpty=S1(()=>this.looseCards().length===0);isDashboardEditable=S1(()=>this.config().editable);gridOptions=S1(()=>({cellHeight:10,disableResize:!this.editMode(),disableDrag:!this.editMode(),marginBottom:0,marginLeft:0,marginRight:0,engineClass:this.gridStackEngine(),columnOpts:{breakpoints:this.gridBreakpoints()}}));sectionsSnapshotJson="";cardsSnapshotJson="";sectionsSnapshot=[];cardsSnapshot=[];gridStack=wo.required("grid");dragOriginPlaceholder=wo("dragOriginPlaceholder");addCardBtn=wo("editCardsBtn");resizeObserver;cardsPosition=new Map;pendingNavigation=null;beforeUnloadHandler=a=>{this.hasUnsavedChanges()&&(a.preventDefault(),a.returnValue="")};constructor(){e0(()=>{this.unsavedChangesChange.emit(this.hasUnsavedChanges())}),e0(()=>{let a=this.i18n(),t=this.config(),o={};t.title!=null&&(o.title=t.title),t.description!=null&&(o.description=t.description);let r=a&&Object.keys(a).length>0?a:null,i=r||Object.keys(o).length>0?B(B({},o),r):x4;this.i18nService.overrides.set(i)}),e0(a=>{if(!this.loading()){this.busyVisible.set(!1);return}let t=Math.max(0,this.loadingDelay());if(t===0){this.busyVisible.set(!0);return}let o=setTimeout(()=>{this.busyVisible.set(!0)},t);a(()=>{clearTimeout(o)})}),e0(a=>{let t=this.config().backgroundImageUrl;if(this.backgroundImageHeight.set(null),!t)return;let o=new Image;o.onload=()=>{this.backgroundImageHeight.set(o.naturalHeight)},o.src=t,a(()=>{o.onload=null})})}ngOnInit(){this.resizeObserver=new ResizeObserver(a=>{let t=a[0]?.contentRect.width??0;this.compactToolbar.set(t<726),this.changeCardSettingsForXlPage(t)}),this.resizeObserver.observe(this.hostEl.nativeElement),window.addEventListener("beforeunload",this.beforeUnloadHandler)}ngOnDestroy(){this.resizeObserver?.disconnect(),window.removeEventListener("beforeunload",this.beforeUnloadHandler)}onMenuItemClick(a,t){if(a==="edit-view"){this.enterEditMode();return}let o=this.customActions().find(r=>r.action===a);o&&this.actionButtonClick.emit({event:t,action:o})}enterEditMode(){this.updateCardsPositions(),this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.sectionsSnapshot=[...this.sections()],this.cardsSnapshot=[...this.cards()],this.sectionsSnapshotJson=JSON.stringify(this.sections()),this.cardsSnapshotJson=JSON.stringify(this.cards()),this.gridDirty.set(!1),this.editMode.set(!0),E2(()=>{this.addCardBtn()?.element.focus()},{injector:this.injector})}enterEditModeAndEditCards(){this.enterEditMode(),this.openCardPanel()}saveEdit(){this.updateCardsPositions();let a=this.cards().map(t=>{let o=this.cardsPosition.get(t.id);return F(B({},t),{x:o?.x,y:o?.y,w:o?.w??t.w,h:o?.h??t.h})});this.gridDirty.set(!1),this.editMode.set(!1),this.cards.set(a),this.saved.emit({sections:this.sections(),cards:a})}cancelEdit(){if(this.hasUnsavedChanges()){this.discardDialogOpen.set(!0);return}this.discardEdit()}confirmDiscard(){this.discardDialogOpen.set(!1),this.discardEdit()}cancelDiscard(){this.discardDialogOpen.set(!1)}requestNavigation(a){return this.hasUnsavedChanges()?(this.pendingNavigation=a,this.unsavedNavDialogOpen.set(!0),!1):(a(),!0)}onUnsavedNavSave(){this.unsavedNavDialogOpen.set(!1),this.saveEdit(),this.runPendingNavigation()}onUnsavedNavDiscard(){this.unsavedNavDialogOpen.set(!1),this.discardEdit(),this.runPendingNavigation()}onUnsavedNavCancel(){this.unsavedNavDialogOpen.set(!1),this.pendingNavigation=null}runPendingNavigation(){let a=this.pendingNavigation;this.pendingNavigation=null,a?.()}discardEdit(){this.sections.set(this.sectionsSnapshot),this.cards.set(this.cardsSnapshot.map(a=>{let t=this.cardsPosition.get(a.id);return F(B({},a),{x:t?.x,y:t?.y})})),this.cardDialogOpen.set(!1),this.gridDirty.set(!1),this.editMode.set(!1),E2(()=>{this.restoreGridLayoutFromCards();let a=this.getZFlowEngine();a?.syncZFlowOrderFromLayout(),a?.commitZFlowLayout()},{injector:this.injector})}restoreGridLayoutFromCards(){let a=this.gridStack().grid;a&&a.load(this.createGridLayoutFromCards(a.engine.nodes),!1)}createGridLayoutFromCards(a){let t=new Map(this.cards().map(o=>[o.id,o]));return a.map(o=>{let r=o.id?t.get(o.id):void 0;return{id:o.id,x:r?.x??o.x,y:r?.y??o.y,w:r?.w??o.w,h:r?.h??o.h}})}onCardKeydown(a,t){let o=this.getZFlowEngine();if(!this.keyboardNavigationActive()||!o||a.target!==a.currentTarget)return;let r=CI(a);if(!r)return;a.preventDefault(),a.stopPropagation();let i=a.currentTarget,n=i.gridstackNode;if(!n||n.id!==t){this.restoreCardFocus(i);return}o.applyKeyboardCommand(t,r)&&this.onGridChange(),this.restoreCardFocus(i)}restoreCardFocus(a){queueMicrotask(()=>{a.isConnected&&this.editMode()&&a.focus({preventScroll:!0})})}removeSection(a){this.sections.update(t=>t.filter(o=>o.id!==a)),this.cards.update(t=>t.filter(o=>o.sectionId!==a))}removeCard(a){let t=this.looseCards().some(o=>o.id===a);this.cards.update(o=>o.filter(r=>r.id!==a)),t&&E2(()=>{this.gridStack().grid?.compact("compact",!1)},{injector:this.injector})}openCardPanel(){this.cardDialogOpen.set(!0)}closeCardPanel(){this.cardDialogOpen.set(!1)}onCardsEdited(a){let t=new Set(this.looseCards().map(o=>o.id));(a.added.some(o=>!o.sectionId)||a.removed.some(o=>t.has(o)))&&this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.cards.update(o=>[...o.filter(r=>!a.removed.includes(r.id)),...a.added.map(r=>B({},r))]),this.closeCardPanel()}onDragStart(a){this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.dragOriginVisible.set(!1),this.engineProfile().renderOriginPosition&&this.renderDragOriginPlaceholder(a.el)}onDrag(){this.dragOriginVisible.set(!1)}onDragStop(){this.getZFlowEngine()?.commitZFlowLayout(),this.dragOriginVisible.set(!1),this.dragOriginStyle.set(null)}onGridChange(){this.getZFlowEngine()?.commitZFlowLayout(),this.editMode()&&this.gridDirty.set(!0)}saveCardsPosition(a){a.forEach(t=>{t.id&&this.cardsPosition.set(t.id,{x:t.x,y:t.y,w:t.w,h:t.h})})}updateCardsPositions(){let a=this.gridStack().gridstackItems?.toArray().map(t=>t.options);a&&this.saveCardsPosition(a)}getZFlowEngine(){let a=this.gridStack().grid?.engine;return a instanceof Bp?a:null}createDragOriginClone(a){let t=a.querySelector(tL);if(!t)return null;let o=t.cloneNode(!0);return o.classList.add("mfp-dashboard__drag-origin-content"),o.setAttribute("aria-hidden","true"),o.removeAttribute("id"),o.querySelectorAll("[id]").forEach(r=>{r.removeAttribute("id")}),o}renderDragOriginPlaceholder(a){let t=this.gridStack().el.getBoundingClientRect(),o=a.getBoundingClientRect(),r=this.createDragOriginClone(a);this.dragOriginStyle.set({top:`${o.top-t.top}px`,left:`${o.left-t.left}px`,width:`${o.width}px`,height:`${o.height}px`}),this.dragOriginVisible.set(!0),r&&E2(()=>{this.dragOriginVisible()&&this.dragOriginPlaceholder()?.nativeElement.replaceChildren(r)},{injector:this.injector})}updateCardsForBreakpoint(a){this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.cards.set(this.cards().map(a)),E2(()=>{this.getZFlowEngine()?.commitZFlowLayout()},{injector:this.injector})}changeCardSettingsForXlPage(a){this.engineProfile().xlWidthSwap&&(a>=aL?this.isXLPage()||(this.isXLPage.set(!0),this.updateCardsForBreakpoint(t=>F(B({},t),{w:t.w===4?3:t.w,maxW:t.maxW===4?3:t.maxW}))):this.isXLPage()&&(this.isXLPage.set(!1),this.updateCardsForBreakpoint(t=>F(B({},t),{w:t.w===3?4:t.w,maxW:t.maxW===3?4:t.maxW}))))}static \u0275fac=function(a){return new(a||y4)};static \u0275cmp=K1({type:y4,selectors:[["mfp-dashboard"]],viewQuery:function(a,t){a&1&&dn(t.gridStack,_q,5)(t.dragOriginPlaceholder,cq,5)(t.addCardBtn,dq,5),a&2&&Lu(3)},hostVars:4,hostBindings:function(a,t){a&2&&x2("background-image",t.config().backgroundImageUrl?"url("+t.config().backgroundImageUrl+")":"var(--mfp-dashboard-background, none)")("background-size",t.backgroundImageHeight()?"100% "+t.backgroundImageHeight()+"px":"100% auto")},inputs:{config:[1,"config"],sections:[1,"sections"],cards:[1,"cards"],availableCards:[1,"availableCards"],customActions:[1,"customActions"],i18n:[1,"i18n"],loading:[1,"loading"],loadingDelay:[1,"loadingDelay"]},outputs:{sections:"sectionsChange",cards:"cardsChange",saved:"saved",actionButtonClick:"actionButtonClick",unsavedChangesChange:"unsavedChangesChange"},features:[j0([S2])],ngContentSelectors:uq,decls:29,vars:24,consts:[["grid",""],["editCardsBtn",""],["menuBtn",""],["dragOriginPlaceholder",""],["data-testid","dashboard",1,"mfp-dashboard"],["data-testid","dashboard-busy","size","M",1,"mfp-dashboard__busy",3,"active","delay"],[1,"mfp-dashboard__busy-content"],[1,"mfp-dashboard__topbar"],[1,"mfp-dashboard__topbar-row"],[1,"mfp-dashboard__header"],[1,"mfp-dashboard__title-row"],["data-testid","dashboard-title","level","H3","size","H3","wrapping-type","Normal"],["role","status",1,"mfp-dashboard__unsaved-changes"],["data-testid","dashboard-description","level","H5","size","H5","wrapping-type","Normal"],[1,"mfp-dashboard__toolbar"],["data-testid","dashboard-edit-cards-btn","id","edit-cards-btn",3,"accessibleName","design","icon","tooltip"],[1,"mfp-dashboard__subheader"],[1,"mfp-sections-container"],[3,"cards","editMode","section"],["data-testid","dashboard-empty-state",1,"mfp-dashboard__empty"],["data-testid","dashboard-grid",3,"addedCB","changeCB","dragCB","dragStartCB","dragStopCB","removedCB","options"],[1,"mfp-dashboard__drag-origin-placeholder",3,"style"],[3,"options"],[1,"mfp-dashboard__edit-bar"],[3,"cancelled","confirm","addedCardsIds","availableCards","open"],[3,"cancelled","confirm","open"],[3,"cancelled","discard","save","open"],[3,"innerHTML"],["name","user-edit",1,"mfp-dashboard__unsaved-changes-icon",3,"accessibleName"],[1,"mfp-dashboard__unsaved-changes-text"],[1,"mfp-dashboard__description",3,"innerHTML"],["data-testid","dashboard-edit-cards-btn","id","edit-cards-btn",3,"click","accessibleName","design","icon","tooltip"],["data-testid","dashboard-toolbar-menu-btn","design","Transparent","icon","menu2",3,"click","accessibleName","tooltip"],["data-testid","dashboard-toolbar-menu",3,"ui5Close","ui5ItemClick","ui5Open","open","opener"],[3,"icon","text"],["data-action","edit-view","data-testid","dashboard-action-edit-view",3,"icon","text"],["data-testid","dashboard-edit-view-btn",3,"accessibleName","design","icon","tooltip"],[3,"accessibleName","design","endIcon","icon","tooltip"],["data-testid","dashboard-edit-view-btn",3,"click","accessibleName","design","icon","tooltip"],[3,"click","accessibleName","design","endIcon","icon","tooltip"],[3,"removeCard","removeSection","cards","editMode","section"],["data-testid","dashboard-empty-state-illustration","role","img",1,"mfp-dashboard__empty-illustration"],["data-testid","dashboard-empty-state-title","level","H4","size","H3","wrapping-type","Normal",1,"mfp-dashboard__empty-title"],["data-testid","dashboard-empty-state-description",1,"mfp-dashboard__empty-description"],["data-testid","dashboard-empty-state-edit-btn","design","Emphasized",3,"accessibleName"],["data-testid","dashboard-empty-state-edit-btn","design","Emphasized",3,"click","accessibleName"],[1,"mfp-dashboard__drag-origin-placeholder"],[3,"keydown","options"],[3,"removeCard","card","editMode"],["data-testid","dashboard-save-btn","design","Emphasized",3,"click"],["data-testid","dashboard-cancel-btn","design","Transparent",3,"click"]],template:function(a,t){a&1&&(P0(hq),H(0,"div",4)(1,"ui5-busy-indicator",5)(2,"div",6)(3,"div",7)(4,"div",8)(5,"div",9)(6,"div",10),s0(7,pq,2,1,"ui5-title",11),s0(8,fq,4,2,"div",12),P(),s0(9,Cq,2,1,"ui5-title",13),P(),H(10,"div",14),s0(11,vq,3,5,"ui5-button",15)(12,Bq,7,6)(13,Tq,4,2),P()(),H(14,"div",16),A0(15),P()(),H(16,"div",17),Ca(17,wq,1,3,"mfp-dashboard-section",18,U8),P(),s0(19,yq,7,4,"div",19),H(20,"gridstack",20,0),e1("addedCB",function(){return t.onGridChange()})("changeCB",function(){return t.onGridChange()})("dragCB",function(){return t.onDrag()})("dragStartCB",function(o){return t.onDragStart(o)})("dragStopCB",function(){return t.onDragStop()})("removedCB",function(){return t.onGridChange()}),s0(22,Hq,2,2,"div",21),Ca(23,Zq,2,7,"gridstack-item",22,U8),P()()()(),s0(25,Lq,5,2,"div",23),H(26,"mfp-edit-cards-dialog",24),e1("cancelled",function(){return t.closeCardPanel()})("confirm",function(o){return t.onCardsEdited(o)}),P(),H(27,"mfp-discard-changes-dialog",25),e1("cancelled",function(){return t.cancelDiscard()})("confirm",function(){return t.confirmDiscard()}),P(),H(28,"mfp-unsaved-changes-dialog",26),e1("cancelled",function(){return t.onUnsavedNavCancel()})("discard",function(){return t.onUnsavedNavDiscard()})("save",function(){return t.onUnsavedNavSave()}),P()),a&2&&(Eu(t.columnVars()),Q2("edit",t.editMode()),w(),W("active",t.busyVisible())("delay",0),w(),Q2("mfp-dashboard__busy-content--busy",t.busyVisible()),w(5),l0(t.i18nService.getTranslation(t.i18nKeys.TITLE)?7:-1),w(),l0(t.hasUnsavedChanges()?8:-1),w(),l0(t.i18nService.getTranslation(t.i18nKeys.DESCRIPTION)?9:-1),w(2),l0(t.editMode()?11:t.compactToolbar()&&t.hasToolbarMenuContent()?12:13),w(6),va(t.sections()),w(2),l0(t.isEmpty()&&t.isDashboardEditable()&&!t.loading()?19:-1),w(),Q2("zflow-dragging",!!t.dragOriginStyle()),W("options",t.gridOptions()),b0("role",t.keyboardNavigationActive()?"list":null),w(2),l0(t.dragOriginStyle()&&t.dragOriginVisible()?22:-1),w(),va(t.looseCards()),w(2),l0(t.editMode()?25:-1),w(),W("addedCardsIds",t.addedCardsIds())("availableCards",t.availableCards())("open",t.cardDialogOpen()),w(),W("open",t.discardDialogOpen()),w(),W("open",t.unsavedNavDialogOpen()))},dependencies:[M4,mn,EL,YL,oI,tI,Cp,mI,Pa,fp,DI,OI,GI,Yr],styles:[`.grid-stack{position:relative}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0;top:0;width:var(--%NS%gs-column-width);height:var(--%NS%gs-cell-height)}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item{right:0}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--%NS%gs-item-margin-top);right:var(--%NS%gs-item-margin-right);bottom:var(--%NS%gs-item-margin-bottom);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;user-select:none;z-index:100}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center;z-index:101}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--%NS%gs-item-margin-top);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--%NS%gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--%NS%gs-item-margin-top);right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--%NS%gs-item-margin-bottom);right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--%NS%gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--%NS%gs-item-margin-bottom);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--%NS%gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,right,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,right .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left 0s,right 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item[gs-x="0"]{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item[gs-x="0"]{right:0}.gs-print-show{display:none}@media print{@page gs-landscape{size:landscape}@page gs-portrait{size:portrait}.grid-stack{display:block!important;height:auto!important;position:static!important}.grid-stack>.grid-stack-item{display:block!important;float:left!important;position:static!important;height:auto!important;left:auto!important;top:auto!important;width:calc(100% * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important;break-inside:avoid!important;page-break-inside:avoid!important}.grid-stack>.grid-stack-item>.grid-stack-item-content{position:relative!important;height:auto!important;overflow:visible!important;white-space:normal!important;margin-top:var(--%NS%gs-item-margin-top)!important;margin-right:var(--%NS%gs-item-margin-right)!important;margin-bottom:var(--%NS%gs-item-margin-bottom)!important;margin-left:var(--%NS%gs-item-margin-left)!important;inset:auto!important}.gs-print-hide{display:none}.gs-print-show{display:block}.grid-stack>.grid-stack-item.gs-print-hide{display:none!important}.grid-stack>.grid-stack-item[gs-page-break=true],.grid-stack>.grid-stack-item[gs-print-orientation]{float:none!important;clear:both!important}.grid-stack>.grid-stack-item[gs-page-break=true]{page-break-before:always!important;break-before:page!important}.grid-stack>.grid-stack-item[gs-print-orientation=landscape]{page:gs-landscape;min-width:calc(100vmax * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important}.grid-stack>.grid-stack-item[gs-print-orientation=portrait]{page:gs-portrait;min-width:calc(100vmin * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important}.grid-stack>.grid-stack-item>.ui-resizable-handle{display:none!important}}.grid-stack-placeholder{z-index:2;pointer-events:none}.grid-stack-placeholder .placeholder-content{border-radius:16px;height:calc(100% - 30px);top:calc(var(--%NS%gs-item-margin-top) * 2 - 2px)!important;width:calc(100% - 19px);left:8px!important;background:var(--%NS%sapContent_Selected_Hover_Background, #e3f0ff);border:1px solid var(--%NS%sapContent_DragAndDropActiveColor, #0064d9);z-index:2!important}mfp-dashboard,mfp-wc-dashboard{display:block;flex:1;margin:0;padding:0;min-height:100%;background-size:100% auto;background-position:top center;background-repeat:no-repeat;background-attachment:local}.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_XL, 3rem) - 10px);container-type:inline-size;container-name:mfp-dashboard}.mfp-dashboard.edit{padding-bottom:60px}.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item,.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item:focus,.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item:focus-visible{outline:none!important;border:0!important;box-shadow:none!important}.mfp-sections-container{display:grid;grid-auto-rows:auto;align-content:start;gap:1rem;grid-template-columns:repeat(var(--%NS%dashboard-cols-xl, 14),1fr)}@container mfp-dashboard (max-width: 599px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-sm, 1),1fr)}}@container mfp-dashboard (min-width: 600px) and (max-width: 1023px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-md, 8),1fr)}}@container mfp-dashboard (min-width: 1024px) and (max-width: 1439px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-lg, 12),1fr)}}.mfp-dashboard__topbar{grid-column:1/-1;align-self:start;display:flex;flex-direction:column;gap:1rem;padding-bottom:3rem;width:100%;min-width:0}.mfp-dashboard__topbar-row{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:0 10px}.mfp-dashboard__header{display:flex;flex-direction:column;gap:.25rem}.mfp-dashboard__title-row{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.mfp-dashboard__unsaved-changes{display:inline-flex;align-items:center;gap:.375rem}.mfp-dashboard__unsaved-changes-icon{width:16px;height:16px;color:var(--%NS%sapContent_MarkerIconColor)}.mfp-dashboard__unsaved-changes-text{color:var(--%NS%sapContent_LabelColor);text-shadow:0 0 2px var(--%NS%sapContent_ContrastTextShadow, #fff);font-family:var(--%NS%sapFontFamily);font-size:var(--%NS%sapFontSize, 14px);font-style:normal;font-weight:400;line-height:normal}.mfp-dashboard__description{font-weight:400;font-family:var(--%NS%sapFontFamily)}.mfp-dashboard__description b,.mfp-dashboard__description strong{font-family:var(--%NS%sapFontBoldFamily)}.mfp-dashboard__toolbar{flex-shrink:0;display:flex;gap:.5rem}.mfp-dashboard__subheader{display:flex;align-items:center;gap:var(--%NS%sapShell_Space_S, 1rem)}.mfp-dashboard__busy{display:block;width:100%}.mfp-dashboard__busy-content{width:100%}.mfp-dashboard__busy-content--busy{min-height:60vh}.mfp-dashboard__empty{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:2rem 1rem 4rem;text-align:center}.mfp-dashboard__empty-illustration{width:320px;max-width:100%;aspect-ratio:320/240;background-image:var(--%NS%mfp-dashboard-empty-image, url("data:image/svg+xml;utf8,%3Csvg id='tnt-Scene-NoApplications' xmlns='http://www.w3.org/2000/svg' width='320' height='240' fill='none' viewBox='0 0 320 240'%3E%3Crect width='320' height='138' y='59' fill='%2389d1ff' rx='24'/%3E%3Cpath fill='%231b90ff' fill-rule='evenodd' d='m96.085 187.07 133.74-23.88c.83-.15.86-1.32.05-1.53l-83.86-20.89c-1-.25-2.05-.3-3.07-.14L37.355 156.9c-1.87.29-2.23 2.82-.51 3.62l56.21 26.14c.94.44 2.01.58 3.04.39l-.01.02Z' clip-rule='evenodd'/%3E%3Cpath fill='%230070f2' d='M234.425 39.1c.53-.03 1.07.07 1.57.25s.99.47 1.43.83c.44.36.82.79 1.12 1.27.31.49.54 1.03.68 1.6l2.49 10.83-161.93 9.75-2.09-12.04a4.21 4.21 0 0 1 .06-1.81 3.917 3.917 0 0 1 2.07-2.57c.52-.26 1.11-.42 1.76-.46l152.84-7.65Z'/%3E%3Cpath fill='%23ffffff' d='m79.775 63.63 161.92-9.74 20.81 90.49c.14.61.16 1.21.1 1.76-.07.55-.25 1.07-.51 1.52-.27.45-.61.83-1.03 1.11-.42.28-.9.47-1.45.54l-156.56 19.62c-.67.09-1.32.02-1.94-.15-.62-.17-1.21-.47-1.72-.88-.51-.4-.96-.88-1.31-1.45-.35-.57-.6-1.2-.71-1.88L79.785 63.63h-.01Z'/%3E%3Cpath fill='%2389d1ff' d='m95.125 73.19 43.77-2.41c.38-.02.76.03 1.12.14.36.11.69.29.99.51.3.22.55.49.76.79.21.3.34.64.41.99l7.57 38.85a2.51 2.51 0 0 1-.45 1.98c-.2.27-.47.5-.77.68-.3.18-.66.3-1.04.34l-43.82 5.29a3.685 3.685 0 0 1-2.41-.58c-.34-.22-.62-.5-.83-.82-.21-.32-.37-.68-.44-1.07l-7.46-41.74c-.07-.38-.05-.75.05-1.08.1-.33.27-.65.51-.92s.53-.49.88-.65c.35-.16.74-.27 1.16-.3Zm104.68-5.76 32.44-1.79c.28-.02.57.03.84.13s.53.25.76.44c.23.19.44.43.6.69.16.26.29.55.36.86l7.53 33.48c.07.32.08.62.04.91-.04.29-.14.55-.28.78-.14.23-.32.42-.54.57-.22.15-.48.24-.76.28l-32.34 3.91a2.504 2.504 0 0 1-1.8-.53c-.26-.2-.48-.44-.66-.71-.18-.27-.31-.58-.38-.92l-7.58-35.6c-.07-.32-.07-.64-.02-.93.05-.29.17-.55.33-.78.16-.23.37-.41.61-.55.24-.14.53-.22.84-.25l.01.01Zm-48.05 2.64 37.44-2.05c.33-.02.65.03.97.14.32.11.6.27.87.47.27.2.49.45.67.73.18.28.31.59.38.92l7.58 35.95c.07.34.07.67.01.98-.06.31-.18.6-.35.84-.17.24-.39.46-.65.62-.26.16-.56.27-.88.31l-37.4 4.52c-.38.04-.75 0-1.1-.09-.35-.09-.68-.26-.97-.46-.29-.2-.54-.47-.74-.76-.2-.29-.34-.63-.41-.98l-7.58-38.41c-.07-.35-.06-.69.01-1 .07-.31.21-.6.41-.84.2-.24.44-.45.73-.6.29-.15.62-.25.98-.27l.03-.02Z'/%3E%3Cpath fill='%2356bdff' d='M88.485 51.02c.51-.03 1.02.05 1.5.21.49.16.92.41 1.32.72s.73.69 1 1.12c.27.43.46.9.54 1.41.09.5.08.99-.04 1.44-.11.45-.31.86-.59 1.21-.28.35-.63.65-1.04.86-.41.21-.88.34-1.4.37-.51.03-1.02-.05-1.5-.21a4.23 4.23 0 0 1-1.32-.72c-.39-.31-.74-.69-1.01-1.12-.27-.43-.46-.9-.54-1.42-.09-.51-.07-1 .04-1.45.1-.45.31-.87.59-1.21.28-.34.63-.64 1.05-.86.42-.22.88-.34 1.4-.36v.01Z'/%3E%3Cpath fill='%230040b0' d='M103.065 168.93c-.67.08-1.32.02-1.94-.15-.62-.18-1.21-.48-1.72-.88s-.96-.88-1.31-1.46c-.35-.56-.6-1.2-.71-1.88L79.795 63.63l-2.09-12.04c-.06-.3-.08-.61-.07-.9 0-.29.05-.58.11-.86.07-.28.16-.54.28-.79.11-.25.27-.49.43-.7l-2.65 3.45c-.16.22-.3.45-.43.69-.11.25-.21.5-.28.78-.07.28-.1.55-.11.85 0 .29 0 .59.07.89l2.06 11.91 17.29 99.82c.11.68.36 1.3.7 1.86a5.4 5.4 0 0 0 1.29 1.44c.51.39 1.08.68 1.7.87.62.18 1.27.24 1.92.15l155.15-19.6 4.46-2.15-156.56 19.62v.01Z'/%3E%3Cpath fill='%23046c7c' d='m269.075 164.4-3.89 2.51s-.09.06-.13.08c-.04.02-.09.06-.12.08-.04.02-.09.06-.12.08-.04.02-.09.06-.13.08-.83.5-1.68.96-2.55 1.37-.87.41-1.77.76-2.7 1.08-.92.32-1.86.57-2.81.78-.96.21-1.94.37-2.92.47-.49.06-.99.1-1.48.13s-1 .04-1.5.05c-.5 0-1.01 0-1.52-.04s-1.02-.06-1.53-.12c-1.54-.15-3.07-.43-4.6-.81-1.52-.39-3.03-.89-4.5-1.5-1.47-.61-2.92-1.34-4.33-2.17-1.41-.83-2.77-1.76-4.07-2.79a36.883 36.883 0 0 1-3.7-3.36c-1.15-1.2-2.24-2.48-3.23-3.81-.99-1.33-1.89-2.75-2.7-4.2a37.21 37.21 0 0 1-2.12-4.52c-.61-1.55-1.1-3.12-1.48-4.71a34.17 34.17 0 0 1-.8-4.77c-.15-1.6-.19-3.17-.12-4.74.07-1.57.27-3.11.58-4.62.3-1.49.7-2.92 1.21-4.3s1.12-2.71 1.82-3.97c.7-1.26 1.49-2.45 2.38-3.56.89-1.11 1.85-2.15 2.91-3.1l3.43-3.1a26.29 26.29 0 0 0-5.33 6.73 28.19 28.19 0 0 0-3.04 8.35 32.074 32.074 0 0 0-.46 9.46c.15 1.61.42 3.22.81 4.82.39 1.6.89 3.19 1.49 4.76.62 1.57 1.33 3.09 2.14 4.56a38.822 38.822 0 0 0 5.99 8.11c1.17 1.22 2.42 2.35 3.74 3.39a36.466 36.466 0 0 0 8.49 5.03c1.49.63 3.01 1.13 4.55 1.53a31.16 31.16 0 0 0 6.19.95c.52.03 1.02.04 1.53.04s1.01-.02 1.52-.04 1-.07 1.5-.13c.99-.11 1.98-.27 2.95-.47.97-.2 1.92-.47 2.84-.78.93-.31 1.83-.68 2.72-1.08.89-.41 1.74-.87 2.57-1.38.05-.03.09-.06.13-.08.05-.02.09-.06.12-.08.04-.02.09-.06.12-.08.04-.02.09-.06.13-.09'/%3E%3Cpath fill='%230899a7' d='M267.365 111.939c1.68 1.36 3.24 2.86 4.66 4.48 1.42 1.62 2.7 3.35 3.83 5.16 1.13 1.82 2.1 3.73 2.9 5.71.8 1.97 1.44 4.02 1.89 6.1.33 1.56.56 3.11.67 4.67.11 1.56.13 3.1.02 4.61-.11 1.52-.31 3.03-.63 4.5-.32 1.47-.74 2.91-1.27 4.3a27.574 27.574 0 0 1-4.37 7.57c-.91 1.12-1.92 2.16-3.01 3.1-1.09.95-2.26 1.81-3.51 2.57a25.402 25.402 0 0 1-5.29 2.46c-.93.31-1.88.57-2.84.78-.96.21-1.95.37-2.95.47-.5.06-1 .1-1.5.12-.5.03-1.01.04-1.52.04s-1.02 0-1.53-.04c-.51-.03-1.03-.07-1.55-.12-1.55-.15-3.1-.43-4.64-.83-1.53-.4-3.06-.9-4.55-1.53a36.39 36.39 0 0 1-4.37-2.19c-1.42-.84-2.8-1.78-4.12-2.83a38.772 38.772 0 0 1-3.74-3.39 37.388 37.388 0 0 1-3.26-3.86c-.99-1.35-1.92-2.78-2.73-4.25-.81-1.47-1.53-3-2.14-4.57-.62-1.57-1.11-3.16-1.49-4.76-.38-1.6-.65-3.21-.81-4.82-.15-1.61-.19-3.2-.12-4.79.08-1.59.27-3.14.58-4.67.31-1.53.72-3.01 1.24-4.43s1.16-2.78 1.88-4.07c.72-1.3 1.55-2.51 2.48-3.65.93-1.14 1.93-2.2 3.02-3.15 1.09-.97 2.26-1.83 3.49-2.59a26.8 26.8 0 0 1 3.85-1.96c1.33-.55 2.72-.99 4.15-1.32 1.43-.33 2.88-.54 4.38-.64 2-.13 4.01-.05 6.01.23s3.98.75 5.93 1.41c1.95.66 3.85 1.5 5.69 2.52 1.84 1.03 3.61 2.21 5.3 3.58v.03l-.03.05Z'/%3E%3Cpath fill='%23ffffff' d='M248.495 118.529c.32-.02.64.02.95.12.31.1.6.27.85.47.25.2.48.46.66.74.18.28.31.6.38.94l2.62 12.86 12.14-1.04c.32-.03.64.02.94.12.3.1.59.26.84.46a2.943 2.943 0 0 1 1.04 1.68c.07.34.07.67.02.97-.05.3-.17.59-.33.83s-.37.45-.62.6c-.25.15-.54.25-.86.28l-12.15 1.08 2.65 13c.07.35.07.68.01.99-.06.31-.18.6-.35.85a2.066 2.066 0 0 1-1.52.9c-.33.03-.65 0-.96-.11-.31-.11-.6-.26-.86-.47-.26-.21-.49-.46-.67-.75a2.88 2.88 0 0 1-.38-.96l-2.63-13.04-12.41 1.1c-.33.03-.66-.01-.97-.12-.31-.11-.61-.26-.87-.47-.26-.21-.49-.46-.68-.75-.19-.29-.31-.61-.38-.96s-.07-.68 0-.99c.07-.31.19-.6.36-.84.17-.24.4-.45.66-.6.26-.15.56-.25.89-.28l12.4-1.07-2.61-12.9a2.315 2.315 0 0 1 .35-1.79 1.965 1.965 0 0 1 1.51-.85h-.02Z'/%3E%3C/svg%3E"));background-repeat:no-repeat;background-position:center;background-size:contain}.mfp-dashboard__empty-title{margin-top:1rem}.mfp-dashboard__empty-description{margin:0 0 1.5rem;color:var(--%NS%sapContent_LabelColor);font-family:var(--%NS%sapFontFamily);font-size:var(--%NS%sapFontSize, 14px)}.mfp-dashboard__edit-bar{position:sticky;bottom:var(--%NS%sapShell_Space_S, 1rem);margin:var(--%NS%sapShell_Space_S, 1rem) var(--%NS%sapShell_Space_S, 1rem) 0;z-index:1000;display:flex;justify-content:flex-end;align-items:center;gap:.5rem;padding:.5rem var(--%NS%sapShell_Space_S, 1rem);background:var(--%NS%sapPageFooter_Background, white);border-radius:var(--%NS%sapElement_BorderCornerRadius, 12px);box-shadow:var(--%NS%sapContent_Shadow1, 0 0 0 1px rgba(34, 53, 72, .48), 0 2px 8px 0 rgba(34, 53, 72, .3));box-sizing:border-box;overflow:hidden}@media screen and (min-width:0px)and (max-width:599px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_S, 1rem) - 10px)}}@media screen and (min-width:600px)and (max-width:1023px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_M, 2rem) - 10px)}}@media screen and (min-width:1024px)and (max-width:1439px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_L, 2rem) - 10px)}}.grid-stack.grid-stack-dragging,.grid-stack.grid-stack-dragging *{cursor:grabbing!important}.mfp-dashboard__drag-origin-placeholder{position:absolute;pointer-events:none;z-index:1}.mfp-dashboard__drag-origin-placeholder:after,.mfp-dashboard__drag-origin-placeholder .mfp-dashboard__drag-origin-content{height:calc(100% - 30px);top:calc(var(--%NS%gs-item-margin-top) * 2 - 2px)!important;width:calc(100% - 19px);left:8px!important;position:absolute;border-radius:16px}.mfp-dashboard__drag-origin-placeholder .mfp-dashboard__drag-origin-content{overflow:hidden}.mfp-dashboard__drag-origin-placeholder:after{content:"";background:var(--%NS%sapNeutralColor, #6a6d75);opacity:.3}.grid-stack:has(>.mfp-dashboard__drag-origin-placeholder)>.grid-stack-placeholder{visibility:hidden}gridstack{position:relative}.grid-stack:has(.ui-resizable-resizing),.grid-stack:has(.ui-resizable-resizing) *{cursor:nwse-resize!important}.grid-stack-item>.ui-resizable-handle{background-image:none!important}
|
|
3088
3088
|
`],encapsulation:2})},qq=["saveEdit","cancelEdit","confirmDiscard","onUnsavedNavSave","onUnsavedNavDiscard","onUnsavedNavCancel"];Z("add",{pathData:"M0 7.429c0-.167.06-.304.179-.411a.575.575 0 0 1 .392-.16h6.286V.57c0-.166.06-.303.179-.41A.575.575 0 0 1 7.429 0H8.57c.381 0 .572.19.572.571v6.286h6.286c.38 0 .571.19.571.572V8.57c0 .381-.19.572-.571.572H9.143v6.286c0 .38-.19.571-.572.571H7.43a.575.575 0 0 1-.393-.16.528.528 0 0 1-.179-.411V9.143H.571a.575.575 0 0 1-.392-.16A.528.528 0 0 1 0 8.57V7.43Z",ltr:!1,viewBox:"0 0 16 16",accData:s_,collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});Z("add",{pathData:"M8 1a.75.75 0 0 1 .75.75v5.5h5.5a.75.75 0 0 1 0 1.5h-5.5v5.5a.75.75 0 0 1-1.5 0v-5.5h-5.5a.75.75 0 0 1 0-1.5h5.5v-5.5A.75.75 0 0 1 8 1Z",ltr:!1,viewBox:"0 0 16 16",accData:s_,collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});Z("delete",{pathData:"M14.984 3.01v1.03h-.998l-.997 10.946c0 .665-.333.998-.998.998H4.009c-.665 0-.997-.333-.997-.998L2.014 4.039h-.998V3.01h13.968ZM4.01 14.986h7.982l.998-10.947H3.012l.997 10.947ZM1.016 2.012v-.998h4.521l.031-.156a.81.81 0 0 1 .187-.343 1.46 1.46 0 0 1 .452-.343c.198-.104.463-.156.795-.156H9.03c.312 0 .618.078.92.234.301.156.483.41.545.764h4.49v.998H1.016ZM7.44 12.99V5.973H8.5v7.017H7.44Zm2.214-.062.623-6.986 1.03.093-.624 6.986-1.03-.093ZM4.695 6.035l.967-.093.623 6.986-.966.093-.624-6.986Z",ltr:!1,viewBox:"0 0 16 16",accData:__,collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});Z("delete",{pathData:"M10.25 0C11.216 0 12 .784 12 1.75V3.5h2.25a.75.75 0 0 1 0 1.5h-.75v9.25A1.75 1.75 0 0 1 11.75 16h-7.5a1.75 1.75 0 0 1-1.741-1.571L2.5 5h-.75a.75.75 0 0 1 0-1.5H4V1.75C4 .784 4.784 0 5.75 0h4.5ZM4.005 14.3a.25.25 0 0 0 .245.2h7.5a.25.25 0 0 0 .25-.25V5H4l.005 9.3ZM6.25 7a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 6.25 7Zm3.5 0a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 9.75 7Zm-4-5.5a.25.25 0 0 0-.25.25V3.5h5V1.75a.25.25 0 0 0-.25-.25h-4.5Z",ltr:!1,viewBox:"0 0 16 16",accData:__,collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});Z("navigation-down-arrow",{pathData:"M13.285 4.277A.958.958 0 0 1 13.987 4c.28 0 .514.092.701.277a.967.967 0 0 1 .312.708.967.967 0 0 1-.312.707L8.67 11.754a.727.727 0 0 0-.156.092.367.367 0 0 0-.077.046.363.363 0 0 1-.078.046c-.125.041-.24.062-.343.062a.219.219 0 0 1-.094-.015.14.14 0 0 0-.062-.016.44.44 0 0 1-.297-.092 1.023 1.023 0 0 0-.109-.062c-.02-.02-.036-.03-.046-.03-.01 0-.026-.01-.047-.031-.021-.02-.042-.03-.063-.03L1.312 5.691A.967.967 0 0 1 1 4.985c0-.267.104-.503.312-.708A.959.959 0 0 1 2.013 4c.281 0 .515.092.702.277l4.802 4.77a.889.889 0 0 0 .997 0l4.771-4.77Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});Z("navigation-down-arrow",{pathData:"M3.235 5.205a.75.75 0 0 0-.03 1.06l4.247 4.5a.75.75 0 0 0 1.09 0l4.253-4.5a.75.75 0 1 0-1.09-1.03L7.997 9.157 4.295 5.235a.75.75 0 0 0-1.06-.03Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});Z("navigation-right-arrow",{pathData:"M9.25 8.373c.23-.249.23-.487 0-.715L4.344 2.71a.982.982 0 0 1-.313-.715c0-.27.104-.498.313-.685A.892.892 0 0 1 5.03 1c.271 0 .51.104.719.311l5.969 6.005c.187.186.281.42.281.7a.95.95 0 0 1-.281.7l-6 5.973A.99.99 0 0 1 5 15a.99.99 0 0 1-.719-.311.948.948 0 0 1-.281-.7.95.95 0 0 1 .281-.7L9.25 8.373Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});Z("navigation-right-arrow",{pathData:"M5.205 3.235a.75.75 0 0 1 1.06-.03l4.5 4.247a.75.75 0 0 1 0 1.09l-4.5 4.253a.75.75 0 1 1-1.03-1.09l3.922-3.708-3.922-3.702a.75.75 0 0 1-.03-1.06Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});Vq=class{add(e,a,t){if(typeof arguments[0]!="string")for(let o in arguments[0])this.add(o,arguments[0][o],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(o){this[o]=this[o]||[],a&&this[o][t?"unshift":"push"](a)},this)}run(e,a){this[e]=this[e]||[],this[e].forEach(function(t){t.call(a&&a.context?a.context:a,a)})}},Eq=class{constructor(e){this.jsep=e,this.registered={}}register(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];a.forEach(o=>{if(typeof o!="object"||!o.name||!o.init)throw new Error("Invalid JSEP plugin format");this.registered[o.name]||(o.init(this.jsep),this.registered[o.name]=o)})}},J0=class g{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+g.version}static addUnaryOp(a){return g.max_unop_len=Math.max(a.length,g.max_unop_len),g.unary_ops[a]=1,g}static addBinaryOp(a,t,o){return g.max_binop_len=Math.max(a.length,g.max_binop_len),g.binary_ops[a]=t,o?g.right_associative.add(a):g.right_associative.delete(a),g}static addIdentifierChar(a){return g.additional_identifier_chars.add(a),g}static addLiteral(a,t){return g.literals[a]=t,g}static removeUnaryOp(a){return delete g.unary_ops[a],a.length===g.max_unop_len&&(g.max_unop_len=g.getMaxKeyLen(g.unary_ops)),g}static removeAllUnaryOps(){return g.unary_ops={},g.max_unop_len=0,g}static removeIdentifierChar(a){return g.additional_identifier_chars.delete(a),g}static removeBinaryOp(a){return delete g.binary_ops[a],a.length===g.max_binop_len&&(g.max_binop_len=g.getMaxKeyLen(g.binary_ops)),g.right_associative.delete(a),g}static removeAllBinaryOps(){return g.binary_ops={},g.max_binop_len=0,g}static removeLiteral(a){return delete g.literals[a],g}static removeAllLiterals(){return g.literals={},g}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(a){this.expr=a,this.index=0}static parse(a){return new g(a).parse()}static getMaxKeyLen(a){return Math.max(0,...Object.keys(a).map(t=>t.length))}static isDecimalDigit(a){return a>=48&&a<=57}static binaryPrecedence(a){return g.binary_ops[a]||0}static isIdentifierStart(a){return a>=65&&a<=90||a>=97&&a<=122||a>=128&&!g.binary_ops[String.fromCharCode(a)]||g.additional_identifier_chars.has(String.fromCharCode(a))}static isIdentifierPart(a){return g.isIdentifierStart(a)||g.isDecimalDigit(a)}throwError(a){let t=new Error(a+" at character "+this.index);throw t.index=this.index,t.description=a,t}runHook(a,t){if(g.hooks[a]){let o={context:this,node:t};return g.hooks.run(a,o),o.node}return t}searchHook(a){if(g.hooks[a]){let t={context:this};return g.hooks[a].find(function(o){return o.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let a=this.code;for(;a===g.SPACE_CODE||a===g.TAB_CODE||a===g.LF_CODE||a===g.CR_CODE;)a=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let a=this.gobbleExpressions(),t=a.length===1?a[0]:{type:g.COMPOUND,body:a};return this.runHook("after-all",t)}gobbleExpressions(a){let t=[],o,r;for(;this.index<this.expr.length;)if(o=this.code,o===g.SEMCOL_CODE||o===g.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())t.push(r);else if(this.index<this.expr.length){if(o===a)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let a=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",a)}gobbleBinaryOp(){this.gobbleSpaces();let a=this.expr.substr(this.index,g.max_binop_len),t=a.length;for(;t>0;){if(g.binary_ops.hasOwnProperty(a)&&(!g.isIdentifierStart(this.code)||this.index+a.length<this.expr.length&&!g.isIdentifierPart(this.expr.charCodeAt(this.index+a.length))))return this.index+=t,a;a=a.substr(0,--t)}return!1}gobbleBinaryExpression(){let a,t,o,r,i,n,s,l,_;if(n=this.gobbleToken(),!n||(t=this.gobbleBinaryOp(),!t))return n;for(i={value:t,prec:g.binaryPrecedence(t),right_a:g.right_associative.has(t)},s=this.gobbleToken(),s||this.throwError("Expected expression after "+t),r=[n,i,s];t=this.gobbleBinaryOp();){if(o=g.binaryPrecedence(t),o===0){this.index-=t.length;break}i={value:t,prec:o,right_a:g.right_associative.has(t)},_=t;let d=c=>i.right_a&&c.right_a?o>c.prec:o<=c.prec;for(;r.length>2&&d(r[r.length-2]);)s=r.pop(),t=r.pop().value,n=r.pop(),a={type:g.BINARY_EXP,operator:t,left:n,right:s},r.push(a);a=this.gobbleToken(),a||this.throwError("Expected expression after "+_),r.push(i,a)}for(l=r.length-1,a=r[l];l>1;)a={type:g.BINARY_EXP,operator:r[l-1].value,left:r[l-2],right:a},l-=2;return a}gobbleToken(){let a,t,o,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"),r)return this.runHook("after-token",r);if(a=this.code,g.isDecimalDigit(a)||a===g.PERIOD_CODE)return this.gobbleNumericLiteral();if(a===g.SQUOTE_CODE||a===g.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(a===g.OBRACK_CODE)r=this.gobbleArray();else{for(t=this.expr.substr(this.index,g.max_unop_len),o=t.length;o>0;){if(g.unary_ops.hasOwnProperty(t)&&(!g.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!g.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=o;let i=this.gobbleToken();return i||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:g.UNARY_EXP,operator:t,argument:i,prefix:!0})}t=t.substr(0,--o)}g.isIdentifierStart(a)?(r=this.gobbleIdentifier(),g.literals.hasOwnProperty(r.name)?r={type:g.LITERAL,value:g.literals[r.name],raw:r.name}:r.name===g.this_str&&(r={type:g.THIS_EXP})):a===g.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(a){this.gobbleSpaces();let t=this.code;for(;t===g.PERIOD_CODE||t===g.OBRACK_CODE||t===g.OPAREN_CODE||t===g.QUMARK_CODE;){let o;if(t===g.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==g.PERIOD_CODE)break;o=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===g.OBRACK_CODE?(a={type:g.MEMBER_EXP,computed:!0,object:a,property:this.gobbleExpression()},a.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),t=this.code,t!==g.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===g.OPAREN_CODE?a={type:g.CALL_EXP,arguments:this.gobbleArguments(g.CPAREN_CODE),callee:a}:(t===g.PERIOD_CODE||o)&&(o&&this.index--,this.gobbleSpaces(),a={type:g.MEMBER_EXP,computed:!1,object:a,property:this.gobbleIdentifier()}),o&&(a.optional=!0),this.gobbleSpaces(),t=this.code}return a}gobbleNumericLiteral(){let a="",t,o;for(;g.isDecimalDigit(this.code);)a+=this.expr.charAt(this.index++);if(this.code===g.PERIOD_CODE)for(a+=this.expr.charAt(this.index++);g.isDecimalDigit(this.code);)a+=this.expr.charAt(this.index++);if(t=this.char,t==="e"||t==="E"){for(a+=this.expr.charAt(this.index++),t=this.char,(t==="+"||t==="-")&&(a+=this.expr.charAt(this.index++));g.isDecimalDigit(this.code);)a+=this.expr.charAt(this.index++);g.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+a+this.char+")")}return o=this.code,g.isIdentifierStart(o)?this.throwError("Variable names cannot start with a number ("+a+this.char+")"):(o===g.PERIOD_CODE||a.length===1&&a.charCodeAt(0)===g.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:g.LITERAL,value:parseFloat(a),raw:a}}gobbleStringLiteral(){let a="",t=this.index,o=this.expr.charAt(this.index++),r=!1;for(;this.index<this.expr.length;){let i=this.expr.charAt(this.index++);if(i===o){r=!0;break}else if(i==="\\")switch(i=this.expr.charAt(this.index++),i){case"n":a+=`
|
|
3089
3089
|
`;break;case"r":a+="\r";break;case"t":a+=" ";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;default:a+=i}else a+=i}return r||this.throwError('Unclosed quote after "'+a+'"'),{type:g.LITERAL,value:a,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let a=this.code,t=this.index;for(g.isIdentifierStart(a)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(a=this.code,g.isIdentifierPart(a));)this.index++;return{type:g.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(a){let t=[],o=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let i=this.code;if(i===a){o=!0,this.index++,a===g.CPAREN_CODE&&r&&r>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(a));break}else if(i===g.COMMA_CODE){if(this.index++,r++,r!==t.length){if(a===g.CPAREN_CODE)this.throwError("Unexpected token ,");else if(a===g.CBRACK_CODE)for(let n=t.length;n<r;n++)t.push(null)}}else if(t.length!==r&&r!==0)this.throwError("Expected comma");else{let n=this.gobbleExpression();(!n||n.type===g.COMPOUND)&&this.throwError("Expected comma"),t.push(n)}}return o||this.throwError("Expected "+String.fromCharCode(a)),t}gobbleGroup(){this.index++;let a=this.gobbleExpressions(g.CPAREN_CODE);if(this.code===g.CPAREN_CODE)return this.index++,a.length===1?a[0]:a.length?{type:g.SEQUENCE_EXP,expressions:a}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:g.ARRAY_EXP,elements:this.gobbleArguments(g.CBRACK_CODE)}}},Nq=new Vq;Object.assign(J0,{hooks:Nq,plugins:new Eq(J0),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});J0.max_unop_len=J0.getMaxKeyLen(J0.unary_ops);J0.max_binop_len=J0.getMaxKeyLen(J0.binary_ops);Ee=e=>new J0(e).parse(),Fq=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(J0).filter(e=>!Fq.includes(e)&&Ee[e]===void 0).forEach(e=>{Ee[e]=J0[e]});Ee.Jsep=J0;zq="ConditionalExpression";Ee.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(a){if(a.node&&this.code===e.QUMARK_CODE){this.index++;let t=a.node,o=this.gobbleExpression();if(o||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let r=this.gobbleExpression();if(r||this.throwError("Expected expression"),a.node={type:zq,test:t,consequent:o,alternate:r},t.operator&&e.binary_ops[t.operator]<=.9){let i=t;for(;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;a.node.test=i.right,i.right=a.node,a.node=t}}else this.throwError("Expected :")}})}});W8=47,Dq=92,Rq={name:"regex",init(e){e.hooks.add("gobble-token",function(a){if(this.code===W8){let t=++this.index,o=!1;for(;this.index<this.expr.length;){if(this.code===W8&&!o){let r=this.expr.slice(t,this.index),i="";for(;++this.index<this.expr.length;){let s=this.code;if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57)i+=this.char;else break}let n;try{n=new RegExp(r,i)}catch(s){this.throwError(s.message)}return a.node={type:e.LITERAL,value:n,raw:this.expr.slice(t-1,this.index)},a.node=this.gobbleTokenProperty(a.node),a.node}this.code===e.OBRACK_CODE?o=!0:o&&this.code===e.CBRACK_CODE&&(o=!1),this.index+=this.code===Dq?2:1}this.throwError("Unclosed Regex")}})}},Y7=43,F2={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Y7,45],assignmentPrecedence:.9,init(e){let a=[e.IDENTIFIER,e.MEMBER_EXP];F2.assignmentOperators.forEach(o=>e.addBinaryOp(o,F2.assignmentPrecedence,!0)),e.hooks.add("gobble-token",function(o){let r=this.code;F2.updateOperators.some(i=>i===r&&i===this.expr.charCodeAt(this.index+1))&&(this.index+=2,o.node={type:"UpdateExpression",operator:r===Y7?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!o.node.argument||!a.includes(o.node.argument.type))&&this.throwError(`Unexpected ${o.node.operator}`))}),e.hooks.add("after-token",function(o){if(o.node){let r=this.code;F2.updateOperators.some(i=>i===r&&i===this.expr.charCodeAt(this.index+1))&&(a.includes(o.node.type)||this.throwError(`Unexpected ${o.node.operator}`),this.index+=2,o.node={type:"UpdateExpression",operator:r===Y7?"++":"--",argument:o.node,prefix:!1})}}),e.hooks.add("after-expression",function(o){o.node&&t(o.node)});function t(o){F2.assignmentOperators.has(o.operator)?(o.type="AssignmentExpression",t(o.left),t(o.right)):o.operator||Object.values(o).forEach(r=>{r&&typeof r=="object"&&t(r)})}}};Ee.plugins.register(Rq,F2);Ee.addUnaryOp("typeof");Ee.addUnaryOp("void");Ee.addLiteral("null",null);Ee.addLiteral("undefined",void 0);Oq=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"]),n1={evalAst(e,a){switch(e.type){case"BinaryExpression":case"LogicalExpression":return n1.evalBinaryExpression(e,a);case"Compound":return n1.evalCompound(e,a);case"ConditionalExpression":return n1.evalConditionalExpression(e,a);case"Identifier":return n1.evalIdentifier(e,a);case"Literal":return n1.evalLiteral(e,a);case"MemberExpression":return n1.evalMemberExpression(e,a);case"UnaryExpression":return n1.evalUnaryExpression(e,a);case"ArrayExpression":return n1.evalArrayExpression(e,a);case"CallExpression":return n1.evalCallExpression(e,a);case"AssignmentExpression":return n1.evalAssignmentExpression(e,a);default:throw SyntaxError("Unexpected expression",e)}},evalBinaryExpression(e,a){return{"||":(t,o)=>t||o(),"&&":(t,o)=>t&&o(),"|":(t,o)=>t|o(),"^":(t,o)=>t^o(),"&":(t,o)=>t&o(),"==":(t,o)=>t==o(),"!=":(t,o)=>t!=o(),"===":(t,o)=>t===o(),"!==":(t,o)=>t!==o(),"<":(t,o)=>t<o(),">":(t,o)=>t>o(),"<=":(t,o)=>t<=o(),">=":(t,o)=>t>=o(),"<<":(t,o)=>t<<o(),">>":(t,o)=>t>>o(),">>>":(t,o)=>t>>>o(),"+":(t,o)=>t+o(),"-":(t,o)=>t-o(),"*":(t,o)=>t*o(),"/":(t,o)=>t/o(),"%":(t,o)=>t%o()}[e.operator](n1.evalAst(e.left,a),()=>n1.evalAst(e.right,a))},evalCompound(e,a){let t;for(let o=0;o<e.body.length;o++){e.body[o].type==="Identifier"&&["var","let","const"].includes(e.body[o].name)&&e.body[o+1]&&e.body[o+1].type==="AssignmentExpression"&&(o+=1);let r=e.body[o];t=n1.evalAst(r,a)}return t},evalConditionalExpression(e,a){return n1.evalAst(e.test,a)?n1.evalAst(e.consequent,a):n1.evalAst(e.alternate,a)},evalIdentifier(e,a){if(Object.hasOwn(a,e.name))return a[e.name];throw ReferenceError(`${e.name} is not defined`)},evalLiteral(e){return e.value},evalMemberExpression(e,a){let t=String(e.computed?n1.evalAst(e.property):e.property.name),o=n1.evalAst(e.object,a);if(o==null)throw TypeError(`Cannot read properties of ${o} (reading '${t}')`);if(!Object.hasOwn(o,t)&&Oq.has(t))throw TypeError(`Cannot read properties of ${o} (reading '${t}')`);let r=o[t];return typeof r=="function"?r.bind(o):r},evalUnaryExpression(e,a){return{"-":t=>-n1.evalAst(t,a),"!":t=>!n1.evalAst(t,a),"~":t=>~n1.evalAst(t,a),"+":t=>+n1.evalAst(t,a),typeof:t=>typeof n1.evalAst(t,a),void:t=>{n1.evalAst(t,a)}}[e.operator](e.argument)},evalArrayExpression(e,a){return e.elements.map(t=>n1.evalAst(t,a))},evalCallExpression(e,a){let t=e.arguments.map(r=>n1.evalAst(r,a)),o=n1.evalAst(e.callee,a);if(o===Function)throw new Error("Function constructor is disabled");return o(...t)},evalAssignmentExpression(e,a){if(e.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");let t=e.left.name;return a[t]=n1.evalAst(e.right,a),a[t]}},$q=class{constructor(e){this.code=e,this.ast=Ee(this.code)}runInNewContext(e){let a=Object.assign(Object.create(null),e);return n1.evalAst(this.ast,a)}};Gq=class extends Error{constructor(e){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=e,this.name="NewError"}};J.prototype.evaluate=function(e,a,t,o){let r=this.parent,i=this.parentProperty,{flatten:n,wrap:s}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,t=t||this.callback,this.currOtherTypeCallback=o||this.otherTypeCallback,a=a||this.json,e=e||this.path,e&&typeof e=="object"&&!Array.isArray(e)){if(!e.path&&e.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(e,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:a}=e),n=Object.hasOwn(e,"flatten")?e.flatten:n,this.currResultType=Object.hasOwn(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=Object.hasOwn(e,"sandbox")?e.sandbox:this.currSandbox,s=Object.hasOwn(e,"wrap")?e.wrap:s,this.currEval=Object.hasOwn(e,"eval")?e.eval:this.currEval,t=Object.hasOwn(e,"callback")?e.callback:t,this.currOtherTypeCallback=Object.hasOwn(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,r=Object.hasOwn(e,"parent")?e.parent:r,i=Object.hasOwn(e,"parentProperty")?e.parentProperty:i,e=e.path}if(r=r||null,i=i||null,Array.isArray(e)&&(e=J.toPathString(e)),!e&&e!==""||!a)return;let l=J.toPathArray(e);l[0]==="$"&&l.length>1&&l.shift(),this._hasParentSelector=null;let _=this._trace(l,a,["$"],r,i,t).filter(function(d){return d&&!d.isParentSelector});return _.length?!s&&_.length===1&&!_[0].hasArrExpr?this._getPreferredOutput(_[0]):_.reduce((d,c)=>{let u=this._getPreferredOutput(c);return n&&Array.isArray(u)?d=d.concat(u):d.push(u),d},[]):s?[]:void 0};J.prototype._getPreferredOutput=function(e){let a=this.currResultType;switch(a){case"all":{let t=Array.isArray(e.path)?e.path:J.toPathArray(e.path);return e.pointer=J.toPointer(t),e.path=typeof e.path=="string"?e.path:J.toPathString(e.path),e}case"value":case"parent":case"parentProperty":return e[a];case"path":return J.toPathString(e[a]);case"pointer":return J.toPointer(e.path);default:throw new TypeError("Unknown result type")}};J.prototype._handleCallback=function(e,a,t){if(a){let o=this._getPreferredOutput(e);e.path=typeof e.path=="string"?e.path:J.toPathString(e.path),a(o,t,e)}};J.prototype._trace=function(e,a,t,o,r,i,n,s){let l;if(!e.length)return l={path:t,value:a,parent:o,parentProperty:r,hasArrExpr:n},this._handleCallback(l,i,"value"),l;let _=e[0],d=e.slice(1),c=[];function u(h){Array.isArray(h)?h.forEach(f=>{c.push(f)}):c.push(h)}if((typeof _!="string"||s)&&a&&Object.hasOwn(a,_))u(this._trace(d,a[_],p5(t,_),a,_,i,n));else if(_==="*")this._walk(a,h=>{u(this._trace(d,a[h],p5(t,h),a,h,i,!0,!0))});else if(_==="..")u(this._trace(d,a,t,o,r,i,n)),this._walk(a,h=>{typeof a[h]=="object"&&u(this._trace(e.slice(),a[h],p5(t,h),a,h,i,!0))});else{if(_==="^")return this._hasParentSelector=!0,{path:t.slice(0,-1),expr:d,isParentSelector:!0};if(_==="~")return l={path:p5(t,_),value:r,parent:o,parentProperty:null},this._handleCallback(l,i,"property"),l;if(_==="$")u(this._trace(d,a,t,null,null,i,n));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(_))u(this._slice(_,d,a,t,o,r,i));else if(_.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");let h=_.replace(/^\?\((.*?)\)$/u,"$1"),f=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(h);f?this._walk(a,x=>{let T=[f[2]],S=f[1]?a[x][f[1]]:a[x];this._trace(T,S,t,o,r,i,!0).length>0&&u(this._trace(d,a[x],p5(t,x),a,x,i,!0))}):this._walk(a,x=>{this._eval(h,a[x],x,t,o,r)&&u(this._trace(d,a[x],p5(t,x),a,x,i,!0))})}else if(_[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");u(this._trace(H4(this._eval(_,a,t.at(-1),t.slice(0,-1),o,r),d),a,t,o,r,i,n))}else if(_[0]==="@"){let h=!1,f=_.slice(1,-2);switch(f){case"scalar":(!a||!["object","function"].includes(typeof a))&&(h=!0);break;case"boolean":case"string":case"undefined":case"function":typeof a===f&&(h=!0);break;case"integer":Number.isFinite(a)&&!(a%1)&&(h=!0);break;case"number":Number.isFinite(a)&&(h=!0);break;case"nonFinite":typeof a=="number"&&!Number.isFinite(a)&&(h=!0);break;case"object":a&&typeof a===f&&(h=!0);break;case"array":Array.isArray(a)&&(h=!0);break;case"other":h=this.currOtherTypeCallback(a,t,o,r);break;case"null":a===null&&(h=!0);break;default:throw new TypeError("Unknown value type "+f)}if(h)return l={path:t,value:a,parent:o,parentProperty:r},this._handleCallback(l,i,"value"),l}else if(_[0]==="`"&&a&&Object.hasOwn(a,_.slice(1))){let h=_.slice(1);u(this._trace(d,a[h],p5(t,h),a,h,i,n,!0))}else if(_.includes(",")){let h=_.split(",");for(let f of h)u(this._trace(H4(f,d),a,t,o,r,i,!0))}else!s&&a&&Object.hasOwn(a,_)&&u(this._trace(d,a[_],p5(t,_),a,_,i,n,!0))}if(this._hasParentSelector)for(let h=0;h<c.length;h++){let f=c[h];if(f&&f.isParentSelector){let x=this._trace(f.expr,a,f.path,o,r,i,n);if(Array.isArray(x)){c[h]=x[0];let T=x.length;for(let S=1;S<T;S++)h++,c.splice(h,0,x[S])}else c[h]=x}}return c};J.prototype._walk=function(e,a){if(Array.isArray(e)){let t=e.length;for(let o=0;o<t;o++)a(o)}else e&&typeof e=="object"&&Object.keys(e).forEach(t=>{a(t)})};J.prototype._slice=function(e,a,t,o,r,i,n){if(!Array.isArray(t))return;let s=t.length,l=e.split(":"),_=l[2]&&Number.parseInt(l[2])||1,d=l[0]&&Number.parseInt(l[0])||0,c=l[1]&&Number.parseInt(l[1])||s;d=d<0?Math.max(0,d+s):Math.min(s,d),c=c<0?Math.max(0,c+s):Math.min(s,c);let u=[];for(let h=d;h<c;h+=_)this._trace(H4(h,a),t,o,r,i,n,!0).forEach(f=>{u.push(f)});return u};J.prototype._eval=function(e,a,t,o,r,i){this.currSandbox._$_parentProperty=i,this.currSandbox._$_parent=r,this.currSandbox._$_property=t,this.currSandbox._$_root=this.json,this.currSandbox._$_v=a;let n=e.includes("@path");n&&(this.currSandbox._$_path=J.toPathString(o.concat([t])));let s=this.currEval+"Script:"+e;if(!J.cache[s]){let l=e.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(n&&(l=l.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)J.cache[s]=new this.safeVm.Script(l);else if(this.currEval==="native")J.cache[s]=new this.vm.Script(l);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){let _=this.currEval;J.cache[s]=new _(l)}else if(typeof this.currEval=="function")J.cache[s]={runInNewContext:_=>this.currEval(l,_)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return J.cache[s].runInNewContext(this.currSandbox)}catch(l){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+l.message+": "+e)}};J.cache={};J.toPathString=function(e){let a=e,t=a.length,o="$";for(let r=1;r<t;r++)/^(~|\^|@.*?\(\))$/u.test(a[r])||(o+=/^[0-9*]+$/u.test(a[r])?"["+a[r]+"]":"['"+a[r]+"']");return o};J.toPointer=function(e){let a=e,t=a.length,o="";for(let r=1;r<t;r++)/^(~|\^|@.*?\(\))$/u.test(a[r])||(o+="/"+a[r].toString().replaceAll("~","~0").replaceAll("/","~1"));return o};J.toPathArray=function(e){let{cache:a}=J;if(a[e])return a[e].concat();let t=[];return a[e]=e.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(o,r){return"[#"+(t.push(r)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(o,r){return"['"+r.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(o,r){return";"+r.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(o){let r=o.match(/#(\d+)/u);return!r||!r[1]?o:t[r[1]]}),a[e].concat()};J.prototype.safeVm={Script:$q};Uq=function(e,a,t){let o=e.length;for(let r=0;r<o;r++){let i=e[r];t(i)&&a.push(e.splice(r--,1)[0])}},jq=class{constructor(e){this.code=e}runInNewContext(e){let a=this.code,t=Object.keys(e),o=[];Uq(t,o,s=>typeof e[s]=="function");let r=t.map(s=>e[s]);a=o.reduce((s,l)=>{let _=e[l].toString();return/function/u.test(_)||(_="function "+_),"var "+l+"="+_+";"+s},"")+a,!/(['"])use strict\1/u.test(a)&&!t.includes("arguments")&&(a="var arguments = undefined;"+a),a=a.replace(/;\s*$/u,"");let i=a.lastIndexOf(";"),n=i!==-1?a.slice(0,i+1)+" return "+a.slice(i+1):" return "+a;return new Function(...t,n)(...r)}};J.prototype.vm={Script:jq};X8=async e=>{let a;if(e==="SAP-icons-v5"?a=(await Promise.resolve().then(()=>(n6(),i6))).default:a=(await Promise.resolve().then(()=>(l6(),s6))).default,typeof a=="string"&&a.endsWith(".json"))throw new Error('[icons] Invalid bundling detected - dynamic JSON imports bundled as URLs. Switch to inlining JSON files from the build. Check the "Assets" documentation for more information.');return a},Wq=()=>{os("SAP-icons-v4",X8),os("SAP-icons-v5",X8)};Wq();Xq={key:"IM_TITLE_NODATA",defaultText:"There''s no data yet."},Kq={key:"IM_SUBTITLE_NODATA",defaultText:"When there is, you''ll see it here."},Yq={key:"IM_TITLE_UNABLETOLOAD",defaultText:"Unable to load data"},Qq={key:"IM_SUBTITLE_UNABLETOLOAD",defaultText:"Check your internet connection. And if that''s not it, try reloading. If that still doesn''t help, check with your administrator."},Jq="V4",eP=Se("SVGIllustration.registry",new Map);Se("SVGIllustration.promises",new Map);Mp=(e,a)=>{let t=a.collection||Jq;eP.set(`${a.set}/${t}/${e}`,{dialogSvg:a.dialogSvg,sceneSvg:a.sceneSvg,spotSvg:a.spotSvg,dotSvg:a.dotSvg,title:a.title,subtitle:a.subtitle})};Z("search",{pathData:"M15.643 14.071c.238.215.357.483.357.804 0 .321-.119.59-.357.804a1.069 1.069 0 0 1-.786.321 1.19 1.19 0 0 1-.821-.321l-4.179-4.215a6.155 6.155 0 0 1-3.571 1.107c-.857 0-1.667-.16-2.429-.482a6.215 6.215 0 0 1-2-1.339 6.462 6.462 0 0 1-1.357-2A6.08 6.08 0 0 1 0 6.286c0-.857.167-1.667.5-2.429a6.463 6.463 0 0 1 1.357-2 6.463 6.463 0 0 1 2-1.357A5.993 5.993 0 0 1 6.286 0c.857 0 1.666.167 2.428.5a6.462 6.462 0 0 1 2 1.357 6.463 6.463 0 0 1 1.357 2c.334.762.5 1.572.5 2.429a5.84 5.84 0 0 1-.303 1.893 7.776 7.776 0 0 1-.804 1.678l4.179 4.214ZM6.286 11.43A5.08 5.08 0 0 0 9.91 9.946a5.258 5.258 0 0 0 1.107-1.642c.274-.631.41-1.304.41-2.018 0-.715-.136-1.381-.41-2A5.317 5.317 0 0 0 9.91 2.66a5.315 5.315 0 0 0-1.625-1.107 4.888 4.888 0 0 0-2-.411c-.715 0-1.387.137-2.018.41A5.256 5.256 0 0 0 2.624 2.66a5.064 5.064 0 0 0-1.482 3.625c0 .714.13 1.387.393 2.018a5.015 5.015 0 0 0 1.089 1.642 5.015 5.015 0 0 0 1.643 1.09 5.21 5.21 0 0 0 2.018.393Z",ltr:!0,viewBox:"0 0 16 16",accData:p_,collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});Z("search",{pathData:"M7 1a6 6 0 0 1 4.738 9.678l3.042 3.042a.75.75 0 1 1-1.06 1.06l-3.042-3.042A6 6 0 1 1 7 1Zm0 1.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z",ltr:!0,viewBox:"0 0 16 16",accData:p_,collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});Mp("NoData",{dialogSvg:`<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg" id="sapIllus-Dialog-NoData">
|
|
3090
3090
|
<rect y="51.5" width="160" height="69" rx="12" fill="var(--sapContent_Illustrative_Color20)"/>
|
package/mfp-webcomponents.js
CHANGED
|
@@ -125,7 +125,7 @@ design guidelines, please use the \`ui5-button\` component.
|
|
|
125
125
|
design guidelines, please use the \`ui5-button\` component.
|
|
126
126
|
**Note:** When the slot is not present, a built-in delete button will be displayed.`,since:"1.9.0"},{name:"endContent",description:"Defines the components that should be displayed at the end of the menu item.\n\n**Note:** It is highly recommended to slot only components of type `ui5-button`,`ui5-link`\nor `ui5-icon` in order to preserve the intended design. If there are components added to this slot,\nand there is text set in `additionalText`, it will not be displayed. If there are items added to `items` slot,\nnether `additionalText` nor components added to this slot would be displayed.\n\nThe priority of what will be displayed at the end of the menu item is as follows:\nsub-menu arrow (if there are items added in `items` slot) -> components added in `endContent` -> text set to `additionalText`.\n\nApplication developers are responsible for ensuring that interactive elements placed in the `endContent` slot\nhave the correct accessibility behaviour, including their enabled or disabled states.\nThe menu does not manage these aspects when the menu item state changes.",since:"2.0.0"}],this.elementRef=W(f1),this.injector=W(g1),this._contentDensityObserver=W(dt)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){let i=this.element;for(let o of["accessibilityAttributes","accessibleName","accessibleRole","additionalText","checked","disabled","highlight","icon","loading","loadingDelay","navigated","selected","text","tooltip","type"]){let a=o.replace(/-./g,n=>n[1].toUpperCase());this[a]&&typeof this[a]=="function"&&ct(this.injector,()=>{l1(()=>{let n=this[a]();if(i){if(n===void 0&&i[o])return;i[o]=n}})})}for(let o of["ui5BeforeClose","ui5BeforeOpen","ui5Check","ui5Click","ui5Close","ui5DetailClick","ui5Open"]){let a=o.replace("ui5","").replace(/([A-Z])/g,"-$1").toLowerCase().substring(1);this[o]&&typeof this[o].emit=="function"&&i.addEventListener&&i.addEventListener(a,n=>{this[o].emit(n)})}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=e1({type:e,selectors:[["ui5-menu-item"],["","ui5-menu-item",""]],inputs:{accessibilityAttributes:[1,"accessibilityAttributes"],accessibleName:[1,"accessibleName"],accessibleRole:[1,"accessibleRole"],additionalText:[1,"additionalText"],checked:[1,"checked"],disabled:[1,"disabled"],highlight:[1,"highlight"],icon:[1,"icon"],loading:[1,"loading"],loadingDelay:[1,"loadingDelay"],navigated:[1,"navigated"],selected:[1,"selected"],text:[1,"text"],tooltip:[1,"tooltip"],type:[1,"type"]},outputs:{ui5BeforeClose:"ui5BeforeClose",ui5BeforeOpen:"ui5BeforeOpen",ui5Check:"ui5Check",ui5Click:"ui5Click",ui5Close:"ui5Close",ui5DetailClick:"ui5DetailClick",ui5Open:"ui5Open"},exportAs:["ui5MenuItem"],features:[V1([Ct({supportedContentDensity:[ye.COMPACT,ye.COZY]})])],ngContentSelectors:XQ,decls:1,vars:0,template:function(i,o){i&1&&(X1(),U1(0))},encapsulation:2})}}return e})(),YQ=["*"],QQ=(()=>{class e{constructor(){this.elementRef=W(f1),this.injector=W(g1),this._contentDensityObserver=W(dt)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){this.element}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=e1({type:e,selectors:[["ui5-menu-separator"],["","ui5-menu-separator",""]],exportAs:["ui5MenuSeparator"],features:[V1([Ct({supportedContentDensity:[ye.COMPACT,ye.COZY]})])],ngContentSelectors:YQ,decls:1,vars:0,template:function(i,o){i&1&&(X1(),U1(0))},encapsulation:2})}}return e})();J("action-settings",{pathData:"M0 7c0-.292.094-.531.281-.719A.973.973 0 0 1 1 6h.813a2.68 2.68 0 0 1 .171-.484c.073-.157.151-.318.235-.485l-.594-.562a1.043 1.043 0 0 1-.281-.719c0-.27.093-.5.281-.688l1.438-1.437a.935.935 0 0 1 .687-.281c.292 0 .531.093.719.281l.562.594c.167-.084.328-.162.485-.235A2.68 2.68 0 0 1 6 1.813V1c0-.292.094-.531.281-.719A.973.973 0 0 1 7 0h2c.292 0 .531.094.719.281A.973.973 0 0 1 10 1v.813c.167.062.328.125.484.187.157.063.308.135.454.219l.593-.594a.974.974 0 0 1 .719-.281c.27 0 .5.093.688.281l1.437 1.438a.935.935 0 0 1 .281.687c0 .27-.094.51-.281.719l-.594.593c.167.271.292.584.375.938H15c.292 0 .531.094.719.281A.973.973 0 0 1 16 7v2a.973.973 0 0 1-.281.719A.974.974 0 0 1 15 10h-.844a3.68 3.68 0 0 1-.375.938l.594.593c.188.209.281.448.281.719 0 .27-.094.5-.281.688l-1.438 1.437a.935.935 0 0 1-.687.281.974.974 0 0 1-.719-.281l-.594-.594a3.62 3.62 0 0 1-.453.219 22.56 22.56 0 0 1-.484.188V15a.974.974 0 0 1-.281.719A.973.973 0 0 1 9 16H7a.973.973 0 0 1-.719-.281A.974.974 0 0 1 6 15v-.813a2.683 2.683 0 0 1-.484-.171 19.641 19.641 0 0 1-.485-.235l-.562.594a.973.973 0 0 1-.719.281.94.94 0 0 1-.688-.281l-1.437-1.438a.935.935 0 0 1-.281-.687c0-.27.093-.51.281-.719l.594-.562a20.151 20.151 0 0 1-.235-.485A2.68 2.68 0 0 1 1.813 10H1a.973.973 0 0 1-.719-.281A.973.973 0 0 1 0 9V7Zm1 0v2h1.531c.063.208.12.39.172.547.052.156.11.307.172.453.063.167.14.338.234.516.094.177.204.39.329.64L2.343 12.25l1.406 1.406 1.094-1.094c.354.209.708.386 1.062.532.354.146.719.27 1.094.375V15h2v-1.563c.208-.062.39-.12.547-.171.156-.053.307-.1.453-.141.167-.083.344-.167.531-.25a8.68 8.68 0 0 0 .625-.313l1.094 1.094 1.406-1.406-1.094-1.125c.188-.354.35-.703.485-1.047s.265-.703.39-1.078H15V7h-1.563a9.505 9.505 0 0 0-.874-2.125l1.093-1.125-1.406-1.406-1.094 1.094a7.478 7.478 0 0 0-1.047-.516A9.907 9.907 0 0 0 9 2.562V1H7v1.531l-.516.172c-.156.052-.317.11-.484.172l-.563.25a5.519 5.519 0 0 0-.593.313L3.75 2.343 2.344 3.75l1.094 1.094A12.821 12.821 0 0 0 2.53 7H1Zm4.219 0 .093-.281a3.48 3.48 0 0 1 .22-.375c.083-.125.176-.24.28-.344.209-.208.396-.37.563-.484A3.49 3.49 0 0 1 7 5.187a3.55 3.55 0 0 1 1-.156c.354 0 .688.063 1 .188l.281.093.375.25c.125.084.24.178.344.282a.559.559 0 0 1 .156.156c.271.25.469.583.594 1 .125.313.188.646.188 1s-.063.688-.188 1a2.41 2.41 0 0 1-.594 1 .56.56 0 0 1-.156.156 2.25 2.25 0 0 1-.344.281l-.375.25-.281.094a2.665 2.665 0 0 1-1 .188 3.55 3.55 0 0 1-1-.156 3.454 3.454 0 0 1-.625-.329A4.164 4.164 0 0 1 5.812 10a2.249 2.249 0 0 1-.28-.344 3.496 3.496 0 0 1-.22-.375L5.22 9a2.667 2.667 0 0 1-.188-1c0-.354.063-.688.188-1Zm.812 1c0 .354.089.682.266.984A1.9 1.9 0 0 0 7 9.688c.292.187.625.28 1 .28.125 0 .292-.02.5-.062a2.42 2.42 0 0 0 .656-.328c.188-.135.354-.328.5-.578.188-.292.281-.625.281-1 0-.396-.093-.73-.28-1a1.843 1.843 0 0 0-.5-.578 2.42 2.42 0 0 0-.657-.328A2.69 2.69 0 0 0 8 6.03c-.375 0-.708.094-1 .282a1.897 1.897 0 0 0-.703.703c-.177.302-.266.63-.266.984Z",ltr:!1,viewBox:"0 0 16 16",accData:dy,collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});J("action-settings",{pathData:"M8.549 0a1.757 1.757 0 0 1 1.568 1.49l.121.805a.251.251 0 0 0 .123.18l1.238.715a.252.252 0 0 0 .217.017l.755-.298a1.75 1.75 0 0 1 2.156.754v.001l.387.673a1.75 1.75 0 0 1-.423 2.244l-.617.49a.251.251 0 0 0-.094.196v1.465c0 .076.035.148.094.196l.616.49c.677.54.858 1.495.425 2.245l-.387.673h-.001a1.75 1.75 0 0 1-2.155.755l-.757-.298a.251.251 0 0 0-.217.016l-1.238.715a.251.251 0 0 0-.122.18l-.12.806A1.75 1.75 0 0 1 8.387 16H7.61a1.75 1.75 0 0 1-1.698-1.333l-.16-1.013a.25.25 0 0 0-.122-.18l-1.184-.684a.251.251 0 0 0-.216-.016l-.803.317a1.75 1.75 0 0 1-2.156-.754l-.387-.675-.001.001a1.753 1.753 0 0 1 .425-2.244l.695-.555A.25.25 0 0 0 2.1 8.67V7.33a.25.25 0 0 0-.095-.195L1.31 6.58a1.753 1.753 0 0 1-.425-2.244l.388-.674a1.75 1.75 0 0 1 2.156-.754l.802.317c.07.027.15.02.216-.017l1.185-.685a.25.25 0 0 0 .122-.18l.16-1.011A1.75 1.75 0 0 1 7.611 0h.938Zm-.982 1.504a.25.25 0 0 0-.19.164l-.14.9a1.75 1.75 0 0 1-.855 1.255l-1.185.685a1.752 1.752 0 0 1-1.516.113l-.803-.315a.25.25 0 0 0-.307.107l-.388.673a.253.253 0 0 0 .06.321l.696.555c.416.332.66.835.66 1.368v1.34a1.75 1.75 0 0 1-.66 1.368l-.695.555a.251.251 0 0 0-.061.321l.387.674a.25.25 0 0 0 .308.107l.802-.315a1.752 1.752 0 0 1 1.517.112l1.185.685c.461.266.775.729.854 1.256l.14.9a.25.25 0 0 0 .235.168h.777a.25.25 0 0 0 .246-.213l.121-.806a1.75 1.75 0 0 1 .855-1.255l1.238-.716a1.751 1.751 0 0 1 1.516-.114l.757.298c.1.04.213.01.28-.07l.415-.71a.25.25 0 0 0-.06-.321l-.617-.492a1.751 1.751 0 0 1-.66-1.369V7.267c0-.533.244-1.037.66-1.369l.616-.49a.25.25 0 0 0 .06-.321l-.387-.675a.249.249 0 0 0-.307-.106l-.758.297a1.75 1.75 0 0 1-1.515-.114L9.61 3.773a1.75 1.75 0 0 1-.855-1.255l-.121-.805a.25.25 0 0 0-.201-.21h-.866ZM8 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 1.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z",ltr:!1,viewBox:"0 0 16 16",accData:dy,collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});J("menu2",{pathData:"M1 4.01a.96.96 0 0 1-.703-.298A.969.969 0 0 1 0 3.005c0-.293.099-.534.297-.722A.985.985 0 0 1 1 2h14a.97.97 0 0 1 .719.283.981.981 0 0 1 .281.722.996.996 0 0 1-.281.707.944.944 0 0 1-.719.298H1Zm0 4.995c-.27 0-.505-.1-.703-.298A.969.969 0 0 1 0 8c0-.293.099-.534.297-.723A.985.985 0 0 1 1 6.995h14a.97.97 0 0 1 .719.282c.187.189.281.43.281.723a.996.996 0 0 1-.281.707.944.944 0 0 1-.719.298H1ZM1 14c-.27 0-.505-.1-.703-.298A.969.969 0 0 1 0 12.995c0-.293.099-.534.297-.723A.986.986 0 0 1 1 11.99h14c.292 0 .531.095.719.283.187.189.281.43.281.723a.996.996 0 0 1-.281.707A.945.945 0 0 1 15 14H1Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});J("menu2",{pathData:"M15.25 12.5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5Zm0-5.5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5Zm0-5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5h14.5Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});J("user-edit",{pathData:"M4.723 12H0v-2a4.016 4.016 0 0 1 2.44-3.688A3.883 3.883 0 0 1 4.004 6h1a2.897 2.897 0 0 1-2.126-.875A2.892 2.892 0 0 1 2.002 3c0-.833.292-1.542.876-2.125A2.897 2.897 0 0 1 5.005 0c.834 0 1.543.292 2.127.875.584.583.876 1.292.876 2.125s-.292 1.542-.876 2.125A2.897 2.897 0 0 1 5.005 6h1c.647 0 1.242.146 1.784.438a4.34 4.34 0 0 1 1.376 1.156l-.72.687a2.927 2.927 0 0 0-1.047-.937A2.9 2.9 0 0 0 6.006 7H4.004c-.834 0-1.543.292-2.127.875A2.892 2.892 0 0 0 1 10v1h4.723l-1 1Zm-.281 4a8.93 8.93 0 0 0 .25-.625c.125-.333.25-.688.375-1.063.084-.208.162-.427.235-.656.073-.229.162-.479.266-.75l8.164-8.125a.479.479 0 0 1 .344-.156c.125 0 .24.052.344.156l1.408 1.407c.23.229.23.458 0 .687l-8.133 8.156c-.02.021-.198.084-.532.188-.333.104-.709.208-1.126.312-.459.167-.99.323-1.595.469Zm.563-11c.542 0 1.011-.198 1.408-.594A1.92 1.92 0 0 0 7.007 3a1.92 1.92 0 0 0-.594-1.406A1.925 1.925 0 0 0 5.005 1a1.91 1.91 0 0 0-1.423.594A1.947 1.947 0 0 0 3.002 3c0 .542.194 1.01.58 1.406.385.396.86.594 1.423.594Zm1.408 8.469.719.687L12.794 8.5l-.688-.688-5.693 5.657Zm6.38-6.375.72.718 1.252-1.28-.689-.688-1.282 1.25Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});J("user-edit",{pathData:"M10.798 7.543a.749.749 0 0 1 1.002.05l1.583 1.585a.75.75 0 0 1 .002 1.06l-5.53 5.542a.75.75 0 0 1-.53.22H5.742a.75.75 0 0 1-.749-.75v-1.583c0-.199.08-.39.22-.53l5.586-5.594ZM6.49 13.977v.523h.525l4.78-4.792-.524-.523-4.781 4.792ZM5.99 0a3.997 3.997 0 0 1 3.994 4 3.996 3.996 0 0 1-3.638 3.983C6.108 8 5.97 8 5.789 8c-2.375 0-4.291 1.911-4.291 4.25v.25h.749a.75.75 0 0 1 0 1.5H.749A.75.75 0 0 1 0 13.25v-1c0-2.323 1.387-4.319 3.378-5.227A3.992 3.992 0 0 1 1.997 4c0-2.21 1.788-4 3.994-4Zm7.526 5c.199 0 .39.078.53.219l1.584 1.584a.75.75 0 0 1 .002 1.06l-.787.791a.749.749 0 0 1-1.06.002l-1.583-1.584a.75.75 0 0 1-.002-1.06l.787-.791a.746.746 0 0 1 .53-.221ZM5.991 1.5A2.498 2.498 0 0 0 3.495 4c0 1.38 1.117 2.5 2.496 2.5A2.498 2.498 0 0 0 8.487 4c0-1.38-1.118-2.5-2.496-2.5Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});JQ="user-edit",pi={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"},De=class{},Io=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0&&window.matchMedia("(any-pointer: coarse)").matches||navigator.msMaxTouchPoints>0),gi=class{};eJ=(()=>{class e{constructor(i,o,a){this.host=i,this.dir=o,this.option=a,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){if(this.option.element)try{this.el=this.option.element instanceof HTMLElement?this.option.element:this.host.querySelector(this.option.element)}catch(i){this.option.element=void 0,console.error("Query for resizeable handle failed, falling back",i)}return this.el||(this.el=document.createElement("div"),this.host.appendChild(this.el)),this.el.classList.add("ui-resizable-handle"),this.el.classList.add(`${e.prefix}${this.dir}`),this.el.addEventListener("mousedown",this._mouseDown),Io&&(this.el.addEventListener("touchstart",e8),this.el.addEventListener("pointerdown",o8)),this}destroy(){return this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),Io&&(this.el.removeEventListener("touchstart",e8),this.el.removeEventListener("pointerdown",o8)),this.option.element||this.host.removeChild(this.el),this}_mouseDown(i){this.mouseDownEvent=i,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),Io&&(this.el.addEventListener("touchmove",t8),this.el.addEventListener("touchend",i8)),i.stopPropagation(),i.preventDefault()}_mouseMove(i){let o=this.mouseDownEvent;this.moving?this._triggerEvent("move",i):Math.abs(i.x-o.x)+Math.abs(i.y-o.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",i),document.addEventListener("keydown",this._keyEvent)),i.stopPropagation()}_mouseUp(i){this.moving&&(this._triggerEvent("stop",i),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),Io&&(this.el.removeEventListener("touchmove",t8),this.el.removeEventListener("touchend",i8)),delete this.moving,delete this.mouseDownEvent,i.stopPropagation(),i.preventDefault()}_keyEvent(i){i.key==="Escape"&&(this.host.gridstackNode?.grid?.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(i,o){let a=this.option;return a[i]&&a[i](o),this}}return e.prefix="ui-resizable-",e})(),iv=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,t){this._eventRegister[e]=t}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){this._eventRegister={}}triggerEvent(e,t){if(!this.disabled&&this._eventRegister[e])return this._eventRegister[e](t)}},tJ=(()=>{class e extends iv{constructor(i,o={}){super(),this.el=i,this.option=o,this.rectScale={x:1,y:1},this._ui=()=>{let a=this.el.parentElement.getBoundingClientRect(),n={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,right:this.originalRect.right,top:this.originalRect.top-this.scrolled},c=this.temporalRect||n;return{position:{left:this.option.rtl?(a.right-c.right)*this.rectScale.x:(c.left-a.left)*this.rectScale.x,top:(c.top-a.top)*this.rectScale.y},size:{width:c.width*this.rectScale.x,height:c.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(!!this.option.autoHide),this._setupHandlers()}on(i,o){super.on(i,o)}off(i){super.off(i)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(!!this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(i){let o=i.handles&&i.handles!==this.option.handles,a=i.autoHide&&i.autoHide!==this.option.autoHide;return Object.assign(this.option,i),o&&(this._removeHandlers(),this._setupHandlers()),a&&this._setupAutoHide(!!this.option.autoHide),this}_setupAutoHide(i){return i?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),De.overResizeElement===this&&delete De.overResizeElement),this}_mouseOver(i){De.overResizeElement||De.dragElement||(De.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(i){De.overResizeElement===this&&(delete De.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=(this.option.handles??"se").split(",").map(i=>i.trim()).map(i=>new eJ(this.el,i,{element:this.option.element,start:o=>this._resizeStart(o),stop:o=>this._resizeStop(o),move:o=>this._resizing(o,i)})),this}_resizeStart(i){this.sizeToContent=Q.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=Q.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=i,this._setupHelper(),this._applyChange();let o=Q.initEvent(i,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(o,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",o),this}_resizing(i,o){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(i,o),this._applyChange();let a=Q.initEvent(i,{type:"resize",target:this.el});return a.resizeDir=o,a.hasMovedX=this.option.rtl?o.includes("e"):o.includes("w"),a.hasMovedY=o.includes("n"),this.option.resize&&this.option.resize(a,this._ui()),this.triggerEvent("resize",a),this}_resizeStop(i){let o=Q.initEvent(i,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(o),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",o),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=e._originStyleProp.map(a=>this.el.style[a]);let i=this.el.parentElement;this.parentOriginStylePosition=i.style.position;let o=Q.getValuesFromTransformedElement(i);return this.rectScale={x:o.xScale,y:o.yScale},getComputedStyle(i).position.match(/static/)&&(i.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return e._originStyleProp.forEach((i,o)=>{this.el.style[i]=this.elOriginStyleVal[o]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(i,o){let a=this.startEvent,n={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,right:this.originalRect.right,top:this.originalRect.top-this.scrolled},c=i.clientX-a.clientX,h=this.sizeToContent?0:i.clientY-a.clientY,m=!1,f=!1,w=this.option.rtl;!w&&o.indexOf("e")>-1?n.width+=c:w&&o.indexOf("w")>-1?n.width-=c:!w&&o.indexOf("w")>-1?(n.width-=c,n.left+=c,m=!0):w&&o.indexOf("e")>-1&&(n.width+=c,n.right+=c,m=!0),o.indexOf("s")>-1?n.height+=h:o.indexOf("n")>-1&&(n.height-=h,n.top+=h,f=!0);let y=this._constrainSize(n.width,n.height,m,f);return Math.round(n.width)!==Math.round(y.width)&&(!w&&o.indexOf("w")>-1?n.left+=n.width-y.width:w&&o.indexOf("e")>-1&&(n.right-=n.width-y.width),n.width=y.width),Math.round(n.height)!==Math.round(y.height)&&(o.indexOf("n")>-1&&(n.top+=n.height-y.height),n.height=y.height),n}_constrainSize(i,o,a,n){let c=this.option,h=(a?c.maxWidthMoveLeft:c.maxWidth)||Number.MAX_SAFE_INTEGER,m=(c.minWidth??0)/this.rectScale.x||i,f=(n?c.maxHeightMoveUp:c.maxHeight)||Number.MAX_SAFE_INTEGER,w=(c.minHeight??0)/this.rectScale.y||o;return{width:Math.min(h,Math.max(m,i)),height:Math.min(f,Math.max(w,o))}}_applyChange(){let i={left:0,right:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){let{left:a,right:n,top:c}=this.el.parentElement.getBoundingClientRect();i={left:a,right:n,top:c,width:0,height:0}}if(!this.temporalRect)return this;let o=i;return Object.entries(this.temporalRect).forEach(([a,n])=>{if(this.option.rtl?a==="left":a==="right")return;let c=a==="width"||a==="left"||a==="right"?this.rectScale.x:a==="height"||a==="top"?this.rectScale.y:1,h;a==="right"?h=(i.right-n)*this.rectScale.x+"px":h=(n-o[a])*c+"px",this.el.style[a]=h}),this}_removeHandlers(){return this.handlers.forEach(i=>i.destroy()),delete this.handlers,this}}return e._originStyleProp=["width","height","position","left","right","top","opacity","zIndex"],e})(),iJ='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle',oJ=(()=>{class e extends iv{constructor(i,o={}){super(),this.el=i,this.option=o,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},this._autoScrollTick=()=>{let c=this.helper,h=this._autoScrollContainer;if(!c||!h){this._stopScrolling();return}let m=this._getClipping(c,h);if(m===0){this._stopScrolling();return}if(!this._autoScrollMaxSpeed){let L=window.innerHeight||document.documentElement.clientHeight;this._autoScrollMaxSpeed=Math.max(L/150,4)}let f=Math.min(Math.abs(m)*.5,this._autoScrollMaxSpeed),w=m>0?f:-f,y=h.scrollTop;if(h.scrollTop+=w,h.scrollTop===y){this._stopScrolling();return}this.dragging&&this.lastDrag&&(this._dragFollow(this.lastDrag),this._callDrag(this.lastDrag)),this._autoScrollAnimId=requestAnimationFrame(this._autoScrollTick)};let a=o?.handle?.substring(1),n=i.gridstackNode;this.dragEls=!a||i.classList.contains(a)?[i]:n?.subGrid?[i.querySelector(o.handle)||i]:this.getAllHandles(),this.dragEls.length===0&&(this.dragEls=[i]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}getAllHandles(){return Array.from(this.el.querySelectorAll(this.option.handle)).filter(i=>{if(!(i instanceof HTMLElement))return!1;let o=i.closest(".grid-stack-item");return o===this.el||!o})}on(i,o){super.on(i,o)}off(i){super.off(i)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(i=>{i.addEventListener("mousedown",this._mouseDown),Io&&(i.addEventListener("touchstart",e8),i.addEventListener("pointerdown",o8))}),this.el.classList.remove("ui-draggable-disabled"))}disable(i=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(o=>{o.removeEventListener("mousedown",this._mouseDown),Io&&(o.removeEventListener("touchstart",e8),o.removeEventListener("pointerdown",o8))}),i||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.option,super.destroy()}updateOption(i){return Object.assign(this.option,i),this}refreshHandles(){let i=this.disabled;i||this.disable(!0);let o=this.option?.handle?.substring(1),a=this.el.gridstackNode;this.dragEls=!o||this.el.classList.contains(o)?[this.el]:a?.subGrid?[this.el.querySelector(this.option.handle)||this.el]:this.getAllHandles(),this.dragEls.length===0&&(this.dragEls=[this.el]),i||this.enable()}_mouseDown(i){return i.isTrusted&&(gi.touchHandled&&(gi.touchHandled=!1),De.mouseHandled&&i.timeStamp!==De.mouseHandledTimeStamp&&delete De.mouseHandled),De.mouseHandled||i.button!==0||!this.dragEls.find(o=>o===i.target)&&i.target.closest(iJ)||this.option.cancel&&i.target.closest(this.option.cancel)||(this.mouseDownEvent=i,delete this.dragging,delete De.dragElement,delete De.dropElement,delete this._autoScrollMaxSpeed,delete this._autoScrollContainer,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),Io&&i.currentTarget&&(i.currentTarget.addEventListener("touchmove",t8),i.currentTarget.addEventListener("touchend",i8)),i.preventDefault(),document.activeElement&&document.activeElement.blur(),De.mouseHandled=!0,De.mouseHandledTimeStamp=i.timeStamp),!0}_callDrag(i){if(!this.dragging)return;let o=Q.initEvent(i,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(o,this.ui()),this.triggerEvent("drag",o)}_mouseMove(i){let o=this.mouseDownEvent;if(this.lastDrag=i,this.dragging)if(this._dragFollow(i),De.pauseDrag){let a=Number.isInteger(De.pauseDrag)?De.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(i),a)}else this._callDrag(i);else if(Math.abs(i.x-o.x)+Math.abs(i.y-o.y)>3){this.dragging=!0,De.dragElement=this;let a=this.el.gridstackNode?.grid;a?De.dropElement=a.el.ddElement?.ddDroppable:delete De.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=Q.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(i,this.el,this.helperContainment),this._setupHelperStyle(i);let n=Q.initEvent(i,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(n,this.ui()),this.triggerEvent("dragstart",n),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(i){if(this._stopScrolling(),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),Io&&i.currentTarget&&(i.currentTarget.removeEventListener("touchmove",t8,!0),i.currentTarget.removeEventListener("touchend",i8,!0)),this.dragging){delete this.dragging,delete this.el.gridstackNode?._origRotate,document.removeEventListener("keydown",this._keyEvent),De.dropElement?.el===this.el.parentElement&&delete De.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper&&this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();let o=Q.initEvent(i,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(o),this.triggerEvent("dragstop",o),De.dropElement&&De.dropElement.drop(i)}delete this.helper,delete this.mouseDownEvent,delete De.dragElement,delete De.dropElement,delete De.mouseHandled,delete De.mouseHandledTimeStamp,i.preventDefault()}_keyEvent(i){let o=this.el.gridstackNode,a=o?.grid||De.dropElement?.el?.gridstack;if(i.key==="Escape")o&&o._origRotate&&(o._orig=o._origRotate,delete o._origRotate),a?.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(o&&a&&(i.key==="r"||i.key==="R")){if(!Q.canBeRotated(o))return;o._origRotate=o._origRotate||X({},o._orig),delete o._moving,a.setAnimation(!1).rotate(o.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetX}).setAnimation(),o._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,o.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",Q.swap(o._orig,"w","h"),delete o._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let i=this.el;return typeof this.option.helper=="function"?i=this.option.helper(this.el):this.option.helper==="clone"&&(i=Q.cloneNode(this.el)),i.parentElement||Q.appendTo(i,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo??"body"),this.dragElementOriginStyle=e.originStyleProp.map(o=>this.el.style[o]),i}_setupHelperStyle(i){this.helper.classList.add("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");let o=this.helper.style;return o.pointerEvents="none",o.width=this.dragOffset.width+"px",o.height=this.dragOffset.height+"px",o.willChange="left, right, top",o.position="fixed",this._dragFollow(i),o.transition="none",setTimeout(()=>{this.helper&&(o.transition=null)},0),this}_removeHelperStyle(){if(this.helper.classList.remove("ui-draggable-dragging"),(this.el._gridstackNodeOrig||this.el.gridstackNode)?.grid?.el.classList.remove("grid-stack-dragging"),!this.helper?.gridstackNode?._isAboutToRemove&&this.dragElementOriginStyle){let i=this.helper,o=this.dragElementOriginStyle,a=e.originStyleProp.indexOf("transition"),n=o[a]||null;i.style.transition=o[a]="none";let c=i.style;e.originStyleProp.forEach((h,m)=>c[h]=o[m]||null),setTimeout(()=>i.style.transition=n||"",50)}return delete this.dragElementOriginStyle,this}_dragFollow(i){let o=this.helper.style,a=this.dragOffset;this.option.rtl?(o.right=(window.innerWidth-i.clientX+a.offsetX)*this.dragTransform.xScale+"px",o.left&&(o.left="")):(o.left=(i.clientX+a.offsetX)*this.dragTransform.xScale+"px",o.right&&(o.right="")),o.top=(i.clientY+a.offsetTop)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(i,o,a){let n=0,c=0;a&&(n=this.dragTransform.xOffset,c=this.dragTransform.yOffset);let h=o.getBoundingClientRect(),m=this.option.rtl?h.right:h.left,f=this.option.rtl?i.clientX-h.right+n:-i.clientX+h.left-n;return{x:m,top:h.top,offsetX:f,offsetTop:-i.clientY+h.top-c,width:h.width*this.dragTransform.xScale,height:h.height*this.dragTransform.yScale}}updateScrollPosition(i){this._autoScrollContainer=Q.getScrollElement(i),this._getClipping(this.helper,this._autoScrollContainer)===0?this._stopScrolling():this._autoScrollAnimId||(this._autoScrollAnimId=requestAnimationFrame(this._autoScrollTick))}_getClipping(i,o){let a=i.getBoundingClientRect(),n=o.getBoundingClientRect(),c=window.innerHeight||document.documentElement.clientHeight;if(a.bottom<n.top||a.top>n.bottom)return 0;let h=a.bottom-Math.min(n.bottom,c),m=a.top-Math.max(n.top,0);return m<0?m:h>0?h:0}_stopScrolling(){this._autoScrollAnimId&&(cancelAnimationFrame(this._autoScrollAnimId),delete this._autoScrollAnimId)}ui(){let i=this.el.parentElement.getBoundingClientRect(),o=this.helper.getBoundingClientRect(),a=this.option.rtl?(i.right-o.right)*this.dragTransform.xScale:(o.left-i.left)*this.dragTransform.xScale;return{position:{top:(o.top-i.top)*this.dragTransform.yScale,left:a}}}}return e.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","right","top","minWidth","willChange"],e})(),aJ=class extends iv{constructor(e,t={}){super(),this.el=e,this.option=t,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.eventEl=this.el.closest(".grid-stack-item")||this.el,this.enable(),this._setupAccept()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.eventEl.addEventListener("mouseenter",this._mouseEnter),this.eventEl.addEventListener("mouseleave",this._mouseLeave),Io&&(this.eventEl.addEventListener("pointerenter",cb),this.eventEl.addEventListener("pointerleave",db)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.eventEl.removeEventListener("mouseenter",this._mouseEnter),this.eventEl.removeEventListener("mouseleave",this._mouseLeave),Io&&(this.eventEl.removeEventListener("pointerenter",cb),this.eventEl.removeEventListener("pointerleave",db)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.assign(this.option,e),this._setupAccept(),this}_mouseEnter(e){if(!De.dragElement||gi.touchHandled&&e.isTrusted||!this._canDrop(De.dragElement.el))return;e.preventDefault(),e.stopPropagation(),De.dragElement._stopScrolling(),De.dropElement&&De.dropElement!==this&&De.dropElement._mouseLeave(e,!0),De.dropElement=this;let t=Q.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(De.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,t=!1){if(!De.dragElement||De.dropElement!==this)return;e.preventDefault(),e.stopPropagation(),t&&De.dragElement._stopScrolling();let i=Q.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(De.dragElement)),this.triggerEvent("dropout",i),De.dropElement===this&&(delete De.dropElement,!t)){let o,a=this.el.parentElement;for(;!o&&a;)o=a.ddElement?.ddDroppable,a=a.parentElement;o&&o._mouseEnter(e)}}drop(e){e.preventDefault();let t=Q.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(De.dragElement)),this.triggerEvent("drop",t)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return X({draggable:e.el},e.ui())}},rJ=class bT{static init(t){return t.ddElement||(t.ddElement=new bT(t)),t.ddElement}constructor(t){this.el=t}on(t,i){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(t)>-1?this.ddDraggable.on(t,i):this.ddDroppable&&["drop","dropover","dropout"].indexOf(t)>-1?this.ddDroppable.on(t,i):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(t)>-1&&this.ddResizable.on(t,i),this}off(t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(t)>-1?this.ddDraggable.off(t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(t)>-1?this.ddDroppable.off(t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(t)>-1&&this.ddResizable.off(t),this}setupDraggable(t){return this.ddDraggable?this.ddDraggable.updateOption(t):this.ddDraggable=new oJ(this.el,t),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(t){return this.ddResizable?this.ddResizable.updateOption(t):this.ddResizable=new tJ(this.el,t),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(t){return this.ddDroppable?this.ddDroppable.updateOption(t):this.ddDroppable=new aJ(this.el,t),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}},nJ=class{resizable(e,t,i,o){return this._getDDElements(e,typeof t=="string"?t:void 0).forEach(a=>{if(t==="disable"||t==="enable")a.ddResizable&&a.ddResizable[t]();else if(t==="destroy")a.ddResizable&&a.cleanResizable();else if(t==="option")a.setupResizable({[i]:o});else{let n=a.el.gridstackNode.grid,c=a.el.getAttribute("gs-resize-handles")||n.opts.resizable.handles||"e,s,se";c==="all"&&(c="n,e,s,w,se,sw,ne,nw");let h=!n.opts.alwaysShowResizeHandle,m=t;a.setupResizable(Se(X({},n.opts.resizable),{handles:c,autoHide:h,start:m.start,stop:m.stop,resize:m.resize,rtl:m.rtl}))}}),this}draggable(e,t,i,o){return this._getDDElements(e,typeof t=="string"?t:void 0).forEach(a=>{if(t==="disable"||t==="enable")a.ddDraggable&&a.ddDraggable[t]();else if(t==="destroy")a.ddDraggable&&a.cleanDraggable();else if(t==="option")a.setupDraggable({[i]:o});else{let n=a.el.gridstackNode.grid,c=t;a.setupDraggable(Se(X({},n.opts.draggable),{start:c.start,stop:c.stop,drag:c.drag,rtl:c.rtl}))}}),this}dragIn(e,t){return this._getDDElements(e).forEach(i=>i.setupDraggable(t)),this}droppable(e,t,i,o){if(typeof t!="string"){let n=t;typeof n.accept=="function"&&!n._accept&&(n._accept=n.accept,n.accept=c=>n._accept(c))}let a=typeof t=="string"?t:void 0;return this._getDDElements(e,a).forEach(n=>{t==="disable"||t==="enable"?n.ddDroppable&&n.ddDroppable[t]():t==="destroy"?n.ddDroppable&&n.cleanDroppable():t==="option"?n.setupDroppable({[i]:o}):n.setupDroppable(t)}),this}isDroppable(e){return!!(e?.ddElement?.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){return!!(e?.ddElement?.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){return!!(e?.ddElement?.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,t,i){return this._getDDElements(e).forEach(o=>o.on(t,a=>{i(a,De.dragElement?De.dragElement.el:a.target,De.dragElement?De.dragElement.helper:void 0)})),this}off(e,t){return this._getDDElements(e).forEach(i=>i.off(t)),this}_getDDElements(e,t){let i=e.gridstack||t!=="destroy"&&t!=="disable",o=Q.getElements(e);return o.length?o.map(a=>a.ddElement||(i?rJ.init(a):null)).filter(a=>!!a):[]}},x5=new nJ,Vi=class Ge{static init(t={},i=".grid-stack"){if(typeof document>"u")return null;let o=Ge.getGridElement(i);return o?(o.gridstack||(o.gridstack=new Ge(o,Q.cloneDeep(t))),o.gridstack):(console.error(typeof i=="string"?'GridStack.initAll() no grid was found with selector "'+i+`" - element missing or wrong selector ?
|
|
127
127
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(t={},i=".grid-stack"){let o=[];return typeof document>"u"||(Ge.getGridElements(i).forEach(a=>{a.gridstack||(a.gridstack=new Ge(a,Q.cloneDeep(t))),o.push(a.gridstack)}),o.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+i+`" - element missing or wrong selector ?
|
|
128
|
-
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),o}static addGrid(t,i={}){if(!t)return null;let o=t;if(o.gridstack){let a=o.gridstack;return i&&(a.opts=X(X({},a.opts),i)),i.children!==void 0&&a.load(i.children),a}return(!t.classList.contains("grid-stack")||Ge.addRemoveCB)&&(Ge.addRemoveCB?o=Ge.addRemoveCB(t,i,!0,!0):o=Q.createDiv(["grid-stack",i.class],t)),Ge.init(i,o)}static registerEngine(t){Ge.engineClass=t}get placeholder(){if(!this._placeholder){this._placeholder=Q.createDiv([this.opts.placeholderClass,pi.itemClass,this.opts.itemClass]);let t=Q.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(t.textContent=this.opts.placeholderText)}return this._placeholder}constructor(t,i={}){this.el=t,this.opts=i,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},t.gridstack=this,this.opts=i=i||{},t.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),i.row&&(i.minRow=i.maxRow=i.row,delete i.row);let o=Q.toNumber(t.getAttribute("gs-row"));i.column==="auto"&&delete i.column,i.alwaysShowResizeHandle!==void 0&&(i._alwaysShowResizeHandle=i.alwaysShowResizeHandle);let a=i.columnOpts;if(a){let m=a.breakpoints;!a.columnWidth&&!m?.length?delete i.columnOpts:m&&m.length>1?(m.sort((f,w)=>(w.w||0)-(f.w||0)),delete a.columnWidth):a.columnMax=a.columnMax||12}let n=Se(X({},Q.cloneDeep(pi)),{column:Q.toNumber(t.getAttribute("gs-column"))||pi.column,minRow:o||Q.toNumber(t.getAttribute("gs-min-row"))||pi.minRow,maxRow:o||Q.toNumber(t.getAttribute("gs-max-row"))||pi.maxRow,staticGrid:Q.toBool(t.getAttribute("gs-static"))||pi.staticGrid,sizeToContent:Q.toBool(t.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(i.handleClass?"."+i.handleClass:i.handle?i.handle:"")||pi.draggable.handle},removableOptions:{accept:i.itemClass||pi.removableOptions.accept,decline:pi.removableOptions.decline}});t.getAttribute("gs-animate")&&(n.animate=Q.toBool(t.getAttribute("gs-animate"))),i=Q.defaults(i,n),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(i),i.rtl==="auto"&&(i.rtl=t.style.direction==="rtl"),i.rtl&&this.el.classList.add("grid-stack-rtl");let c=this.el.closest("."+pi.itemClass)?.gridstackNode;if(c&&(c.subGrid=this,this.parentGridNode=c,this.el.classList.add("grid-stack-nested"),c.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=i.cellHeight==="auto",this._isAutoCellHeight||i.cellHeight==="initial")this.cellHeight(void 0);else{typeof i.cellHeight=="number"&&i.cellHeightUnit&&i.cellHeightUnit!==pi.cellHeightUnit&&(i.cellHeight=i.cellHeight+i.cellHeightUnit,delete i.cellHeightUnit);let m=i.cellHeight;delete i.cellHeight,this.cellHeight(m)}i.alwaysShowResizeHandle==="mobile"&&(i.alwaysShowResizeHandle=Io),this._setStaticClass();let h=i.engineClass||Ge.engineClass||tv;if(this.engine=new h({column:this.getColumn(),float:i.float,maxRow:i.maxRow,onChange:m=>{m.forEach(f=>{let w=f.el;w&&(f._removeDOM?(w&&w.remove(),delete f._removeDOM):this._writePosAttr(w,f))}),this._updateContainerHeight()}}),i.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(m=>this._prepareElement(m)),delete this.engine._loading,this.batchUpdate(!1)),i.children){let m=i.children;delete i.children,m.length&&this.load(m)}this.setAnimation(),i.subGridDynamic&&!De.pauseDrag&&(De.pauseDrag=!0),i.draggable?.pause!==void 0&&(De.pauseDrag=i.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(t=this.opts){this.el.classList.add("gs-"+t.column),typeof t.column=="number"&&(this.el.style.setProperty("--gs-column-width",`${100/t.column}%`),this.el.style.setProperty("--gs-columns",String(t.column)))}addWidget(t){if(!t)return;if(typeof t=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(t.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(t);let i,o=t;if(o.grid=this,o.el?i=o.el:Ge.addRemoveCB?i=Ge.addRemoveCB(this.el,t,!0,!1):i=this.createWidgetDivs(o),!i)return;if(o=i.gridstackNode,o&&i.parentElement===this.el&&this.engine.nodes.find(n=>n._id===o._id))return i;let a=this._readAttr(i);return Q.defaults(t,a),this.engine.prepareNode(t),this.el.appendChild(i),this.makeWidget(i,t),i}createWidgetDivs(t){let i=Q.createDiv(["grid-stack-item",this.opts.itemClass]),o=Q.createDiv(["grid-stack-item-content"],i);return Q.lazyLoad(t)?t.visibleObservable||(t.visibleObservable=new IntersectionObserver(([a])=>{a.isIntersecting&&(t.visibleObservable?.disconnect(),delete t.visibleObservable,Ge.renderCB(o,t),t.grid?.prepareDragDrop(t.el))}),window.setTimeout(()=>t.visibleObservable?.observe(i))):Ge.renderCB(o,t),i}makeSubGrid(t,i,o,a=!0){let n=t.gridstackNode;if(n||(n=this.makeWidget(t).gridstackNode),n.subGrid?.el)return n.subGrid;let c,h=this;for(;h&&!c;)c=h.opts?.subGridOpts,h=h.parentGridNode?.grid;i=Q.cloneDeep(X(X(Se(X({},this.opts),{id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0}),c||{}),i||n.subGridOpts||{})),n.subGridOpts=i;let m=!1;i.column==="auto"&&(m=!0,i.column=Math.max(n.w||1,o?.w||1),delete i.columnOpts);let f=n.el.querySelector(".grid-stack-item-content"),w,y;if(a&&(this._removeDD(n.el),y=Se(X({},n),{x:0,y:0}),Q.removeInternalForSave(y),delete y.subGridOpts,n.content&&(y.content=n.content,delete n.content),Ge.addRemoveCB?w=Ge.addRemoveCB(this.el,y,!0,!1)||void 0:(w=Q.createDiv(["grid-stack-item"]),w.appendChild(f),f=Q.createDiv(["grid-stack-item-content"],n.el)),this.prepareDragDrop(n.el)),o){let I=m?i.column:n.w,D=n.h+o.h,q=n.el.style;q.transition="none",this.update(n.el,{w:I,h:D}),setTimeout(()=>q.transition="")}let L=n.subGrid=Ge.addGrid(f,i)||void 0;return o?._moving&&(L._isTemp=!0),m&&(L._autoColumn=!0),a&&L.makeWidget(w,y),o&&(o._moving?window.setTimeout(()=>Q.simulateMouseEvent(o._event,"mouseenter",L.el),0):L.makeWidget(n.el,n)),this.resizeToContentCheck(!1,n),L}removeAsSubGrid(t){let i=this.parentGridNode?.grid;if(i&&(i.batchUpdate(),i.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(o=>{o.x=(o.x??0)+(this.parentGridNode.x??0),o.y=(o.y??0)+(this.parentGridNode.y??0),this._removeDD(o.el),o.el.remove(),delete o.el.gridstackNode,i.makeWidget(o.el,o)}),i.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,t)){let o=t.el?.gridstackNode;o&&o!==t&&(o._temporaryRemoved=!0),window.setTimeout(()=>{let a=De.dragElement?.lastDrag||t._event;a&&Q.simulateMouseEvent(a,"mouseenter",i.el)},0)}}save(t=!0,i=!1,o=Ge.saveCB,a){let n=this.engine.save(t,o,a);if(n.forEach(c=>{if(t&&c.el&&!c.subGrid&&!o)c.content=c.el.querySelector(".grid-stack-item-content")?.innerHTML,c.content||delete c.content;else if(!t&&!o&&delete c.content,c.subGrid?.el){let h=c.w||c.subGrid.getColumn(),m=c.subGrid.save(t,i,o,h);c.subGridOpts=i?m:{children:m},delete c.subGrid}delete c.el}),i){let c=Q.cloneDeep(this.opts);c.marginBottom===c.marginTop&&c.marginRight===c.marginLeft&&c.marginTop===c.marginRight&&(c.margin=c.marginTop,delete c.marginTop,delete c.marginRight,delete c.marginBottom,delete c.marginLeft),c.rtl===(this.el.style.direction==="rtl")&&(c.rtl="auto"),this._isAutoCellHeight&&(c.cellHeight="auto"),this._autoColumn&&(c.column="auto");let h=c._alwaysShowResizeHandle;return delete c._alwaysShowResizeHandle,h!==void 0?c.alwaysShowResizeHandle=h:delete c.alwaysShowResizeHandle,Q.removeInternalAndSame(c,pi),c.children=n,c}return n}load(t,i=Ge.addRemoveCB||!0){t.forEach(w=>{w.w=w.w||w.minW||1,w.h=w.h||w.minH||1}),t=Q.sort(t),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let o=0;t.forEach(w=>{o=Math.max(o,(w.x||0)+w.w)}),o>this.engine.defaultColumn&&(this.engine.defaultColumn=o);let a=this.getColumn();o>a&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=t,this.engine.columnChanged(o,a,this.responseLayout),t=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(t,o,!0));let n=Ge.addRemoveCB;typeof i=="function"&&(Ge.addRemoveCB=i);let c=[];this.batchUpdate();let h=!this.engine.nodes.length,m=h&&this.opts.animate;m&&this.setAnimation(!1),!h&&i&&[...this.engine.nodes].forEach(w=>{w.id&&(Q.find(t,w.id)||(Ge.addRemoveCB&&Ge.addRemoveCB(this.el,w,!1,!1),c.push(w),this.removeWidget(w.el,!0,!1)))}),this.engine._loading=!0;let f=[];return this.engine.nodes=this.engine.nodes.filter(w=>w.id&&Q.find(t,w.id)?(f.push(w),!1):!0),t.forEach(w=>{let y=w.id?Q.find(f,w.id):void 0;if(y){if(Q.shouldSizeToContent(y)&&(w.h=y.h),this.engine.nodeBoundFix(w),(w.autoPosition||w.x===void 0||w.y===void 0)&&(w.w=w.w||y.w,w.h=w.h||y.h,this.engine.findEmptyPosition(w)),this.engine.nodes.push(y),Q.samePos(y,w)&&this.engine.nodes.length>1&&(this.moveNode(y,Se(X({},w),{forceCollide:!0})),Q.copyPos(w,y)),this.update(y.el,w),w.subGridOpts?.children){let L=y.el.querySelector(".grid-stack");L&&L.gridstack&&L.gridstack.load(w.subGridOpts.children)}}else i&&this.addWidget(w)}),delete this.engine._loading,this.engine.removedNodes=c,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,n?Ge.addRemoveCB=n:delete Ge.addRemoveCB,m&&this.setAnimation(!0,!0),this}batchUpdate(t=!0){return this.engine.batchUpdate(t),t||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(t=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!t||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;let i=this.el.querySelector("."+this.opts.itemClass);if(i){let a=Q.toNumber(i.getAttribute("gs-h"))||1;return Math.round(i.offsetHeight/a)}let o=parseInt(this.el.getAttribute("gs-current-row")||"0");return o?Math.round(this.el.getBoundingClientRect().height/o):this.opts.cellHeight}cellHeight(t){if(t!==void 0&&this._isAutoCellHeight!==(t==="auto")&&(this._isAutoCellHeight=t==="auto",this._updateResizeEvent()),(t==="initial"||t==="auto")&&(t=void 0),t===void 0){let o=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;t=this.cellWidth()+o}let i=Q.parseHeight(t);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h?this:(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(t=!1){return t&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){let t=this.opts.columnOpts;if(!t||!t.columnWidth&&!t.breakpoints?.length)return!1;let i=this.getColumn(),o=i,a=this._widthOrContainer(!0);if(t.columnWidth)o=Math.min(Math.round(a/t.columnWidth)||1,t.columnMax);else{o=t.columnMax;let n=0;for(;n<t.breakpoints.length&&a<=t.breakpoints[n].w;)o=t.breakpoints[n++].c||i}if(o!==i){let n=t.breakpoints?.find(c=>c.c===o);return this.column(o,n?.layout||t.layout),!0}return!1}compact(t="compact",i=!0){return this.engine.compact(t,i),this._triggerChangeEvent(),this}column(t,i="moveScale"){if(!t||t<1||this.opts.column===t)return this;let o=this.getColumn();return this.opts.column=t,this.engine?(this.engine.column=t,this.el.classList.remove("gs-"+o),this._updateColumnVar(),this.engine.columnChanged(o,t,i),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=i,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(t=>t.matches("."+this.opts.itemClass)&&!t.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return!!this._ignoreLayoutsNodeChange}destroy(t=!0){return this.el?(this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),t?this.el.parentNode.removeChild(this.el):(this.removeAll(t),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this):this}float(t){return this.opts.float!==t&&(this.opts.float=this.engine.float=t,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(t,i=!1){let o=this.el.getBoundingClientRect(),a;i?a={top:o.top+document.documentElement.scrollTop,left:o.left}:a={top:this.el.offsetTop,left:this.el.offsetLeft};let n=t.left-a.left,c=t.top-a.top,h=o.width/this.getColumn(),m=o.height/parseInt(this.el.getAttribute("gs-current-row")||"0");return{x:Math.floor(n/h),y:Math.floor(c/m)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(t,i,o,a){return this.engine.isAreaEmpty(t,i,o,a)}makeWidget(t,i){let o=Ge.getElement(t);if(!o||o.gridstackNode)return o;o.parentElement||this.el.appendChild(o),this._prepareElement(o,!0,i);let a=o.gridstackNode;this._updateContainerHeight(),a.subGridOpts&&this.makeSubGrid(o,a.subGridOpts,void 0,!1);let n=!1;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(n=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),n&&delete this._ignoreLayoutsNodeChange,o}on(t,i){return t.indexOf(" ")!==-1?(t.split(" ").forEach(o=>this.on(o,i)),this):(t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable"?(t==="enable"||t==="disable"?this._gsEventHandler[t]=o=>i(o):this._gsEventHandler[t]=(o=>{o.detail&&i(o,o.detail)}),this.el.addEventListener(t,this._gsEventHandler[t])):t==="drag"||t==="dragstart"||t==="dragstop"||t==="resizestart"||t==="resize"||t==="resizestop"||t==="dropped"||t==="resizecontent"?this._gsEventHandler[t]=i:console.error("GridStack.on("+t+") event not supported"),this)}off(t){return t.indexOf(" ")!==-1?(t.split(" ").forEach(i=>this.off(i)),this):((t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable")&&this._gsEventHandler[t]&&this.el.removeEventListener(t,this._gsEventHandler[t]),delete this._gsEventHandler[t],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(t=>this.off(t)),this}removeWidget(t,i=!0,o=!0){return t?(Ge.getElements(t).forEach(a=>{if(a.parentElement&&a.parentElement!==this.el)return;let n=a.gridstackNode;n||(n=this.engine.nodes.find(c=>a===c.el)),n&&(i&&Ge.addRemoveCB&&Ge.addRemoveCB(this.el,n,!1,!1),delete a.gridstackNode,this._removeDD(a),this.engine.removeNode(n,i,o),i&&a.parentElement&&a.remove())}),o&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(t=!0,i=!0){return this.engine.nodes.forEach(o=>{t&&Ge.addRemoveCB&&Ge.addRemoveCB(this.el,o,!1,!1),delete o.el.gridstackNode,this.opts.staticGrid||this._removeDD(o.el)}),this.engine.removeAll(t,i),i&&this._triggerRemoveEvent(),this}setAnimation(t=this.opts.animate,i){return i?setTimeout(()=>{this.opts&&this.setAnimation(t)}):t?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=t,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(t,i=!0,o=!0){return!!this.opts.staticGrid===t?this:(t?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(a=>{this.prepareDragDrop(a.el),a.subGrid&&o&&a.subGrid.setStatic(t,i,o)}),i&&this._setStaticClass(),this)}updateOptions(t){let i=this.opts;if(t===i)return this;if(t.acceptWidgets!==void 0&&(i.acceptWidgets=t.acceptWidgets,this._setupAcceptWidget()),t.animate!==void 0&&this.setAnimation(t.animate),t.cellHeight&&this.cellHeight(t.cellHeight),t.class!==void 0&&t.class!==i.class&&(i.class&&this.el.classList.remove(i.class),t.class&&this.el.classList.add(t.class)),t.columnOpts){let o=!!this.opts.columnOpts;this.opts.columnOpts=t.columnOpts,o!==!!this.opts.columnOpts&&this._updateResizeEvent(),this.checkDynamicColumn()}else t.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof t.column=="number"&&this.column(t.column);return t.margin!==void 0&&this.margin(t.margin),t.staticGrid!==void 0&&this.setStatic(t.staticGrid),t.disableDrag!==void 0&&!t.staticGrid&&this.enableMove(!t.disableDrag),t.disableResize!==void 0&&!t.staticGrid&&this.enableResize(!t.disableResize),t.float!==void 0&&this.float(t.float),t.row!==void 0?(i.minRow=i.maxRow=this.engine.maxRow=i.row=t.row,this._updateContainerHeight(),this.engine.getRow()>t.row&&this.compact()):(t.minRow!==void 0&&(i.minRow=t.minRow,this._updateContainerHeight()),t.maxRow!==void 0&&(i.maxRow=this.engine.maxRow=t.maxRow,this.engine.getRow()>t.maxRow&&this.compact())),t.lazyLoad!==void 0&&(i.lazyLoad=t.lazyLoad),t.children?.length&&this.load(t.children),this}update(t,i){return Ge.getElements(t).forEach(o=>{let a=o?.gridstackNode;if(!a)return;let n=X(X({},Q.copyPos({},a)),Q.cloneDeep(i));this.engine.nodeBoundFix(n),delete n.autoPosition;let c=["x","y","w","h"],h,m=n,f=a;if(c.some(L=>m[L]!==void 0&&m[L]!==f[L])){h={};let L=h;c.forEach(I=>{L[I]=m[I]!==void 0?m[I]:f[I],delete m[I]})}if(!h&&(n.minW||n.minH||n.maxW||n.maxH)&&(h={}),n.content!==void 0){let L=o.querySelector(".grid-stack-item-content");L&&L.textContent!==n.content&&(a.content=n.content,Ge.renderCB(L,n),a.subGrid?.el&&(L.appendChild(a.subGrid.el),a.subGrid._updateContainerHeight())),delete n.content}let w=!1,y=!1;for(let L in m)L[0]!=="_"&&f[L]!==m[L]&&(f[L]=m[L],w=!0,y=y||!this.opts.staticGrid&&(L==="noResize"||L==="noMove"||L==="locked"));if(Q.sanitizeMinMax(a),h){let L=h.w!==void 0&&h.w!==a.w;this.moveNode(a,h),L&&a.subGrid?a.subGrid.onResize(this.hasAnimationCSS()?a.w:void 0):this.resizeToContentCheck(L,a),delete a._orig}(h||w)&&this._writeAttr(o,a),y&&this.prepareDragDrop(a.el),Ge.updateCB&&Ge.updateCB(a)}),this}moveNode(t,i){let o=t._updating;o||this.engine.cleanNodes().beginUpdate(t),this.engine.moveNode(t,i),this._updateContainerHeight(),o||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(t){if(!t||(t.classList.remove("size-to-content-max"),!t.clientHeight))return;let i=t.gridstackNode;if(!i)return;let o=i.grid;if(!o||t.parentElement!==o.el)return;let a=o.getCellHeight(!0);if(!a)return;let n=i.h?i.h*a:t.clientHeight,c=null;if(i.resizeToContentParent&&(c=t.querySelector(i.resizeToContentParent)),c||(c=t.querySelector(Ge.resizeToContentParent)),!c)return;let h=t.clientHeight-c.clientHeight,m=i.h?i.h*a-h:c.clientHeight,f;if(i.subGrid){f=i.subGrid.getRow()*i.subGrid.getCellHeight(!0);let L=i.subGrid.el.getBoundingClientRect(),I=t.getBoundingClientRect();f+=L.top-I.top}else{if(i.subGridOpts?.children?.length)return;{let L=c.firstElementChild;if(!L){console.error(`Error: GridStack.resizeToContent() widget id:${i.id} '${Ge.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}f=L.getBoundingClientRect().height||m}}if(m===f)return;n+=f-m;let w=Math.ceil(n/a),y=Number.isInteger(i.sizeToContent)?i.sizeToContent:0;y&&w>y&&(w=y,t.classList.add("size-to-content-max")),i.minH&&w<i.minH?w=i.minH:i.maxH&&w>i.maxH&&(w=i.maxH),w!==i.h&&(o._ignoreLayoutsNodeChange=!0,o.moveNode(i,{h:w}),delete o._ignoreLayoutsNodeChange)}resizeToContentCBCheck(t){Ge.resizeToContentCB?Ge.resizeToContentCB(t):this.resizeToContent(t)}rotate(t,i){return Ge.getElements(t).forEach(o=>{let a=o.gridstackNode;if(!a||!Q.canBeRotated(a))return;let n={w:a.h,h:a.w,minH:a.minW,minW:a.minH,maxH:a.maxW,maxW:a.maxH};if(i){let m=i.left>0?Math.floor(i.left/this.cellWidth()):0,f=i.top>0?Math.floor(i.top/this.opts.cellHeight):0;n.x=a.x+m-(a.h-(f+1)),n.y=a.y+f-m}let c=n;Object.keys(c).forEach(m=>{c[m]===void 0&&delete c[m]});let h=a._orig;this.update(o,n),a._orig=h}),this}margin(t){if(!(typeof t=="string"&&t.split(" ").length>1)){let i=Q.parseHeight(t);if(this.opts.marginUnit===i.unit&&this.opts.margin===i.h)return this}return this.opts.margin=t,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(t){return this.engine.willItFit(t)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let t=this.engine.getDirtyNodes(!0);return t&&t.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(t),this._triggerEvent("change",t)),this.engine.saveInitial(),this._sortDom(),this}_sortDom(){let t=this.engine.nodes;if(t.forEach(o=>{o.subGrid&&o.subGrid._sortDom()}),t.length<2)return this;this.engine.sortNodes(),t=this.engine.nodes;let i=this.el.children;return t.some((o,a)=>o.el!==i[a])&&t.forEach(o=>{o.el&&o.el.parentElement===this.el&&this.el.appendChild(o.el)}),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(i=>{delete i._dirty});let t=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",t)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){let t=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",t)}return this}_triggerEvent(t,i){let o=i?new CustomEvent(t,{bubbles:!1,detail:i}):new Event(t),a=this;for(;a.parentGridNode;)a=a.parentGridNode.grid;return a.el.dispatchEvent(o),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let t=this.parentGridNode,i=this.getRow()+this._extraDragRow,o=this.opts.cellHeight,a=this.opts.cellHeightUnit;if(!o)return this;if(!t&&!this.opts.minRow){let n=Q.parseHeight(getComputedStyle(this.el).minHeight);if(n.h>0&&n.unit===a){let c=Math.floor(n.h/o);i<c&&(i=c)}}return this.el.setAttribute("gs-current-row",String(i)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),i&&(this.el.style[t?"minHeight":"height"]=i*o+a),t&&Q.shouldSizeToContent(t)&&t.grid.resizeToContentCBCheck(t.el),this}_prepareElement(t,i=!1,o){o=o||this._readAttr(t),t.gridstackNode=o,o.el=t,o.grid=this,o=this.engine.addNode(o,i),this._writeAttr(t,o),t.classList.add(pi.itemClass,this.opts.itemClass);let a=Q.shouldSizeToContent(o);return a?t.classList.add("size-to-content"):t.classList.remove("size-to-content"),a&&this.resizeToContentCheck(!1,o),(!Q.lazyLoad(o)||!o.visibleObservable)&&this.prepareDragDrop(o.el),this}_writePosAttr(t,i){if(!i._moving&&!i._resizing||this._placeholder===t){let o=this.opts.rtl?"right":"left",a=t.style;a.top=i.y?i.y===1?"var(--gs-cell-height)":`calc(${i.y} * var(--gs-cell-height))`:null,a[o]=i.x?i.x===1?"var(--gs-column-width)":`calc(${i.x} * var(--gs-column-width))`:null,a.width=i.w>1?`calc(${i.w} * var(--gs-column-width))`:null,a.height=i.h>1?`calc(${i.h} * var(--gs-cell-height))`:null}return t.style.setProperty("--gs-x",String(i.x||0)),t.style.setProperty("--gs-y",String(i.y||0)),t.style.setProperty("--gs-w",String(i.w||1)),t.style.setProperty("--gs-h",String(i.h||1)),t.setAttribute("gs-x",String(i.x??0)),t.setAttribute("gs-y",String(i.y??0)),i.w>1?t.setAttribute("gs-w",String(i.w)):t.removeAttribute("gs-w"),i.h>1?t.setAttribute("gs-h",String(i.h)):t.removeAttribute("gs-h"),this}_writeAttr(t,i){if(!i)return this;this._writePosAttr(t,i);let o={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"},a=i,n=o;for(let c in n)a[c]!==void 0&&a[c]!==null&&a[c]!==!1?t.setAttribute(n[c],String(a[c])):t.removeAttribute(n[c]);return i.print?(i.print.pageBreak?t.setAttribute("gs-page-break",String(i.print.pageBreak)):t.removeAttribute("gs-page-break"),i.print.hide?t.classList.add("gs-print-hide"):t.classList.remove("gs-print-hide"),i.print.orientation?t.setAttribute("gs-print-orientation",String(i.print.orientation)):t.removeAttribute("gs-print-orientation")):(t.removeAttribute("gs-page-break"),t.classList.remove("gs-print-hide"),t.removeAttribute("gs-print-orientation")),this}_readAttr(t,i=!0){let o={};o.x=Q.toNumber(t.getAttribute("gs-x")),o.y=Q.toNumber(t.getAttribute("gs-y")),o.w=Q.toNumber(t.getAttribute("gs-w")),o.h=Q.toNumber(t.getAttribute("gs-h")),o.autoPosition=Q.toBool(t.getAttribute("gs-auto-position")),o.noResize=Q.toBool(t.getAttribute("gs-no-resize")),o.noMove=Q.toBool(t.getAttribute("gs-no-move")),o.locked=Q.toBool(t.getAttribute("gs-locked"));let a=t.getAttribute("gs-page-break"),n=t.classList.contains("gs-print-hide"),c=t.getAttribute("gs-print-orientation");(a||n||c)&&(o.print={},a&&(o.print.pageBreak=Q.toBool(a)),n&&(o.print.hide=!0),c&&(o.print.orientation=c));let h=t.getAttribute("gs-size-to-content");h&&(h==="true"||h==="false"?o.sizeToContent=Q.toBool(h):o.sizeToContent=parseInt(h,10)),o.id=t.getAttribute("gs-id")??void 0,o.maxW=Q.toNumber(t.getAttribute("gs-max-w")),o.minW=Q.toNumber(t.getAttribute("gs-min-w")),o.maxH=Q.toNumber(t.getAttribute("gs-max-h")),o.minH=Q.toNumber(t.getAttribute("gs-min-h")),i&&(o.w===1&&t.removeAttribute("gs-w"),o.h===1&&t.removeAttribute("gs-h"),o.maxW&&t.removeAttribute("gs-max-w"),o.minW&&t.removeAttribute("gs-min-w"),o.maxH&&t.removeAttribute("gs-max-h"),o.minH&&t.removeAttribute("gs-min-h"));let m=o;for(let f in m)o.hasOwnProperty(f)&&!m[f]&&m[f]!==0&&f!=="sizeToContent"&&delete m[f];return o}_setStaticClass(){let t=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...t),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...t),this.el.removeAttribute("gs-static")),this}onResize(t=this.el?.clientWidth){if(!t)return this;if(this.prevWidth===t)return this;this.prevWidth=t,this.batchUpdate();let i=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),i=!0):i=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(o=>{o.subGrid&&o.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(i),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(t=!1,i){if(!this.engine)return;if(t&&this.hasAnimationCSS()){setTimeout(()=>this.resizeToContentCheck(!1,i),this.animationDelay);return}if(i)Q.shouldSizeToContent(i)&&this.resizeToContentCBCheck(i.el);else if(this.engine.nodes.some(a=>Q.shouldSizeToContent(a))){let a=[...this.engine.nodes];this.batchUpdate(),a.forEach(n=>{Q.shouldSizeToContent(n)&&this.resizeToContentCBCheck(n.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}let o=this._gsEventHandler.resizecontent;o&&o(new Event("resizecontent"),i?[i]:this.engine.nodes)}_updateResizeEvent(t=!1){let i=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(o=>o.sizeToContent));return!t&&i&&!this.resizeObserver?(this._sizeThrottle=Q.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(t||!i)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(t=".grid-stack-item"){return Q.getElement(t)}static getElements(t=".grid-stack-item"){return Q.getElements(t)}static getGridElement(t){return Ge.getElement(t)}static getGridElements(t){return Q.getElements(t)}_initMargin(){let t={h:0,unit:"px"},i=0,o=[];typeof this.opts.margin=="string"&&(o=this.opts.margin.split(" ")),o.length===2?(this.opts.marginTop=this.opts.marginBottom=o[0],this.opts.marginLeft=this.opts.marginRight=o[1]):o.length===4?(this.opts.marginTop=o[0],this.opts.marginRight=o[1],this.opts.marginBottom=o[2],this.opts.marginLeft=o[3]):(t=Q.parseHeight(this.opts.margin),this.opts.marginUnit=t.unit,i=this.opts.margin=t.h);let a=["marginTop","marginRight","marginBottom","marginLeft"],n=this.opts;a.forEach(h=>{n[h]===void 0?n[h]=i:(t=Q.parseHeight(n[h]),n[h]=t.h,delete this.opts.margin)}),this.opts.marginUnit=t.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);let c=this.el.style;return c.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),c.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),c.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),c.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return x5}static setupDragIn(t,i,o,a=document){i?.pause!==void 0&&(De.pauseDrag=i.pause),i=X({appendTo:"body",helper:"clone"},i||{}),(typeof t=="string"?Q.getElements(t,a):t).forEach((n,c)=>{x5.isDraggable(n)||x5.dragIn(n,i),o?.[c]&&(n.gridstackNode=o[c])})}movable(t,i){return this.opts.staticGrid?this:(Ge.getElements(t).forEach(o=>{let a=o.gridstackNode;a&&(i?delete a.noMove:a.noMove=!0,this.prepareDragDrop(a.el))}),this)}resizable(t,i){return this.opts.staticGrid?this:(Ge.getElements(t).forEach(o=>{let a=o.gridstackNode;a&&(i?delete a.noResize:a.noResize=!0,this.prepareDragDrop(a.el))}),this)}disable(t=!0){return this.opts.staticGrid?this:(this.enableMove(!1,t),this.enableResize(!1,t),this._triggerEvent("disable"),this)}enable(t=!0){return this.opts.staticGrid?this:(this.enableMove(!0,t),this.enableResize(!0,t),this._triggerEvent("enable"),this)}enableMove(t,i=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&i&&o.subGrid.enableMove(t,i)}),this)}enableResize(t,i=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&i&&o.subGrid.enableResize(t,i)}),this)}cancelDrag(){let t=De.dragElement?.el;if(t?._gridstackNodeOrig){let o=t._gridstackNodeOrig,a=o.grid,n=this._placeholder?.gridstackNode;n&&(n._isAboutToRemove=!0,this.engine.removeNode(n)),this.engine.restoreInitial(),t.gridstackNode=o,delete t._gridstackNodeOrig,delete De.dropElement,a&&(a.engine.addNode(o,!1),a.engine.restoreInitial());return}let i=this._placeholder?.gridstackNode;i&&(i._isExternal?(i._isAboutToRemove=!0,this.engine.removeNode(i)):i._isAboutToRemove&&Ge._itemRemoving(i.el,!1),this.engine.restoreInitial())}_removeDD(t){return x5.draggable(t,"destroy").resizable(t,"destroy"),t.gridstackNode&&delete t.gridstackNode._initDD,delete t.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return x5.droppable(this.el,"destroy"),this;let t,i,o=(a,n,c)=>{c=c||n;let h=c.gridstackNode;if(!h)return;if(!h.grid?.el){c.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;let L=c.getBoundingClientRect();c.style.left=L.x+(this.dragTransform.xScale-1)*(a.clientX-L.x)/this.dragTransform.xScale+"px",c.style.top=L.y+(this.dragTransform.yScale-1)*(a.clientY-L.y)/this.dragTransform.yScale+"px",c.style.transformOrigin="0px 0px"}let{top:m,left:f}=c.getBoundingClientRect(),w=this.el.getBoundingClientRect();f-=w.left,m-=w.top;let y={position:{top:m*this.dragTransform.xScale,left:f*this.dragTransform.yScale}};if(h._temporaryRemoved){if(h.x=Math.max(0,Math.round(f/i)),h.y=Math.max(0,Math.round(m/t)),delete h.autoPosition,this.engine.nodeBoundFix(h),!this.engine.willItFit(h)){if(h.autoPosition=!0,!this.engine.willItFit(h)){x5.off(n,"drag");return}h._willFitPos&&(Q.copyPos(h,h._willFitPos),delete h._willFitPos)}this._onStartMoving(c,a,y,h,i,t)}else this._dragOrResize(c,a,y,h,i,t)};return x5.droppable(this.el,{accept:a=>{let n=a.gridstackNode||this._readAttr(a,!1);if(n?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let c=!0;if(typeof this.opts.acceptWidgets=="function")c=this.opts.acceptWidgets(a);else{let h=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;c=a.matches(h)}if(c&&n&&this.opts.maxRow){let h={w:n.w,h:n.h,minW:n.minW,minH:n.minH};c=this.engine.willItFit(h)}return c}}).on(this.el,"dropover",(a,n,c)=>{let h=c?.gridstackNode||n.gridstackNode;if(h?.grid===this&&!h._temporaryRemoved)return!1;if(h?._sidebarOrig&&(h.w=h._sidebarOrig.w,h.h=h._sidebarOrig.h),h?.grid&&h.grid!==this&&!h._temporaryRemoved&&h.grid._leave(n,c),c=c||n,i=this.cellWidth(),t=this.getCellHeight(!0),!h){let w=c.getAttribute("data-gs-widget")||c.getAttribute("gridstacknode");if(w){try{h=JSON.parse(w)}catch{console.error("Gridstack dropover: Bad JSON format: ",w)}c.removeAttribute("data-gs-widget"),c.removeAttribute("gridstacknode")}h||(h=this._readAttr(c)),h._sidebarOrig={w:h.w,h:h.h}}h.grid||(h.el||(h=X({},h)),h._isExternal=!0,c.gridstackNode=h);let m=h.w||Math.round(c.offsetWidth/i)||1,f=h.h||Math.round(c.offsetHeight/t)||1;return h.grid&&h.grid!==this?(n._gridstackNodeOrig||(n._gridstackNodeOrig=h),n.gridstackNode=h=Se(X({},h),{w:m,h:f,grid:this}),delete h.x,delete h.y,this.engine.cleanupNode(h).nodeBoundFix(h),h._initDD=h._isExternal=h._temporaryRemoved=!0):(h.w=m,h.h=f,h._temporaryRemoved=!0),Ge._itemRemoving(h.el,!1),x5.on(n,"drag",o),o(a,n,c),!1}).on(this.el,"dropout",(a,n,c)=>{let h=c?.gridstackNode||n.gridstackNode;return h&&(!h.grid||h.grid===this)&&(this._leave(n,c),this._isTemp&&this.removeAsSubGrid(h)),!1}).on(this.el,"drop",(a,n,c)=>{let h=c?.gridstackNode||n.gridstackNode;if(h?.grid===this&&!h._isExternal)return!1;let m=!!this.placeholder.parentElement,f=n!==c;this.placeholder.remove(),delete this.placeholder.gridstackNode,m&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));let w=n._gridstackNodeOrig;if(delete n._gridstackNodeOrig,m&&w?.grid&&w.grid!==this){let L=w.grid;L.engine.removeNodeFromLayoutCache(w),L.engine.removedNodes.push(w),L._triggerRemoveEvent()._triggerChangeEvent(),L.parentGridNode&&!L.engine.nodes.length&&L.opts.subGridDynamic&&L.removeAsSubGrid()}if(!h||(m&&(this.engine.cleanupNode(h),h.grid=this),delete h.grid?._isTemp,x5.off(n,"drag"),c&&c!==n?(c.remove(),n=c):n.remove(),this._removeDD(n),!m))return!1;let y=h.subGrid?.el?.gridstack;return Q.copyPos(h,this._readAttr(this.placeholder)),Q.removePositioningStyles(n),f&&(h.content||h.subGridOpts||Ge.addRemoveCB)?(delete h.el,n=this.addWidget(h)||n):(this._prepareElement(n,!0,h),this.el.appendChild(n),this.resizeToContentCheck(!1,h),y&&(y.parentGridNode=h),this._updateContainerHeight()),this.engine.addedNodes.push(h),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(Se(X({},a),{type:"dropped"}),w&&w.grid?w:void 0,h),!1}),this}static _itemRemoving(t,i){if(!t)return;let o=t?t.gridstackNode:void 0;!o?.grid||t.classList.contains(o.grid.opts.removableOptions.decline)||(i?o._isAboutToRemove=!0:delete o._isAboutToRemove,i?t.classList.add("grid-stack-item-removing"):t.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;let t=document.querySelector(this.opts.removable);return t?(!this.opts.staticGrid&&!x5.isDroppable(t)&&x5.droppable(t,this.opts.removableOptions).on(t,"dropover",(i,o)=>Ge._itemRemoving(o,!0)).on(t,"dropout",(i,o)=>Ge._itemRemoving(o,!1)),this):this}refreshDragHandles(t){return Ge.getElements(t).forEach(i=>{i.ddElement?.ddDraggable?.refreshHandles()}),this}prepareDragDrop(t,i=!1){let o=t?.gridstackNode;if(!o)return this;let a=o.noMove||this.opts.disableDrag,n=o.noResize||this.opts.disableResize,c=this.opts.staticGrid||a&&n;if((i||c)&&(o._initDD&&(this._removeDD(t),delete o._initDD),c))return t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!o._initDD){let h,m,f=(L,I)=>{this.triggerEvent(L,L.target),h=this.cellWidth(),m=this.getCellHeight(!0),this._onStartMoving(t,L,I,o,h,m)},w=(L,I)=>{this._dragOrResize(t,L,I,o,h,m)},y=L=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete o._moving,delete o._resizing,delete o._event,delete o._lastTried;let I=o.w!==o._orig.w,D=L.target;if(!(!D.gridstackNode||D.gridstackNode.grid!==this)){if(o.el=D,o._isAboutToRemove){let q=t.gridstackNode.grid;q._gsEventHandler[L.type]&&q._gsEventHandler[L.type](L,D),q.engine.nodes.push(o),q.removeWidget(t,!0,!0)}else Q.removePositioningStyles(D),o._temporaryRemoved?(this._writePosAttr(D,o),this.engine.addNode(o)):this._writePosAttr(D,o),this.triggerEvent(L,D);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),L.type==="resizestop"&&(Number.isInteger(o.sizeToContent)&&(o.sizeToContent=o.h),this.resizeToContentCheck(I,o))}};x5.draggable(t,{start:f,stop:y,drag:w,rtl:this.opts.rtl==="auto"?void 0:this.opts.rtl}).resizable(t,{start:f,stop:y,resize:w,rtl:this.opts.rtl==="auto"?void 0:this.opts.rtl}),o._initDD=!0}return x5.draggable(t,a?"disable":"enable").resizable(t,n?"disable":"enable"),this}_onStartMoving(t,i,o,a,n,c){if(this.engine.cleanNodes().beginUpdate(a),this._writePosAttr(this.placeholder,a),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=a,a.grid?.el)this.dragTransform=Q.getValuesFromTransformedElement(t);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){let h=this.placeholder.closest(".grid-stack");this.dragTransform=Q.getValuesFromTransformedElement(h)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(a.el=this.placeholder,a._lastUiPosition=o.position,a._prevYPix=o.position.top,a._moving=i.type==="dragstart",a._resizing=i.type==="resizestart",delete a._lastTried,i.type==="dropover"&&a._temporaryRemoved&&(this.engine.addNode(a),a._moving=!0),this.engine.cacheRects(n,c,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),i.type==="resizestart"){let h=this.getColumn()-a.x,m=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-a.y;x5.resizable(t,"option","minWidth",n*Math.min(a.minW||1,h)).resizable(t,"option","minHeight",c*Math.min(a.minH||1,m)).resizable(t,"option","maxWidth",n*Math.min(a.maxW||Number.MAX_SAFE_INTEGER,h)).resizable(t,"option","maxWidthMoveLeft",n*Math.min(a.maxW||Number.MAX_SAFE_INTEGER,a.x+a.w)).resizable(t,"option","maxHeight",c*Math.min(a.maxH||Number.MAX_SAFE_INTEGER,m)).resizable(t,"option","maxHeightMoveUp",c*Math.min(a.maxH||Number.MAX_SAFE_INTEGER,a.y+a.h))}}_dragOrResize(t,i,o,a,n,c){let h=X({},a._orig),m=!1,f=this.opts.marginLeft,w=this.opts.marginRight,y=this.opts.marginTop,L=this.opts.marginBottom,I=Math.round(c*.1),D=Math.round(n*.1);if(f=Math.min(f,D),w=Math.min(w,D),y=Math.min(y,I),L=Math.min(L,I),i.type==="drag"){if(a._temporaryRemoved)return;a._prevYPix=o.position.top,this.opts.draggable.scroll!==!1&&De.dragElement?.updateScrollPosition(this.el);let de=o.position.left+(o.position.left>a._lastUiPosition.left?-w:f),U=o.position.top+(o.position.top>a._lastUiPosition.top?-L:y);h.x=Math.round(de/n),h.y=Math.round(U/c);let ce=this._extraDragRow;if(this.engine.collide(a,h)){let ne=this.getRow(),Pe=Math.max(0,h.y+a.h-ne);this.opts.maxRow&&ne+Pe>this.opts.maxRow&&(Pe=Math.max(0,this.opts.maxRow-ne)),this._extraDragRow=Pe}else this._extraDragRow=0;if(this._extraDragRow!==ce&&this._updateContainerHeight(),a.x===h.x&&a.y===h.y)return}else if(i.type==="resize"){if((h.x??0)<0||(Q.updateScrollResize(i,t,c),h.w=Math.round((o.size.width-f)/n),h.h=Math.round((o.size.height-y)/c),a.w===h.w&&a.h===h.h)||a._lastTried&&a._lastTried.w===h.w&&a._lastTried.h===h.h)return;if(i.hasMovedX){let de=a.x-(h.w-a.w);h.x=de<0?0:de}if(i.hasMovedY){let de=a.y-(h.h-a.h);h.y=de<0?0:de}m=!0}a._event=i,a._lastTried=h;let q={x:o.position.left+f,y:o.position.top+y,w:(o.size?o.size.width:a.w*n)-f-w,h:(o.size?o.size.height:a.h*c)-y-L};if(this.engine.moveNodeCheck(a,Se(X({},h),{cellWidth:n,cellHeight:c,rect:q,resizing:m}))){a._lastUiPosition=o.position,this.engine.cacheRects(n,c,y,w,L,f),delete a._skipDown,m&&a.subGrid&&a.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();let de=i.target;a._sidebarOrig||this._writePosAttr(de,a),this.triggerEvent(i,de)}}triggerEvent(t,i){let o=this;for(;o.parentGridNode;)o=o.parentGridNode.grid;o._gsEventHandler[t.type]&&o._gsEventHandler[t.type](t,i)}_leave(t,i){i=i||t;let o=i.gridstackNode;if(!o||(i.style.transform=i.style.transformOrigin="",x5.off(t,"drag"),o._temporaryRemoved))return;o._temporaryRemoved=!0,this.engine.removeNode(o),o.el=o._isExternal&&i?i:t;let a=o._sidebarOrig;o._isExternal&&this.engine.cleanupNode(o),o._sidebarOrig=a,this.opts.removable===!0&&Ge._itemRemoving(t,!0),t._gridstackNodeOrig?(t.gridstackNode=t._gridstackNodeOrig,delete t._gridstackNodeOrig):o._isExternal&&this.engine.restoreInitial()}};Vi.renderCB=(e,t)=>{e&&t?.content&&(e.textContent=t.content)};Vi.resizeToContentParent=".grid-stack-item-content";Vi.Utils=Q;Vi.Engine=tv;Vi.GDRev="13.2.0";CT=["container"],sJ=["*"];cJ=["*",[["","empty-content",""]]],dJ=["*","[empty-content]"],hJ=["*ngIf","isEmpty"];ov=(()=>{class e{constructor(i){this.elementRef=i,this.el._gridItemComp=this}set options(i){let o=this.el.gridstackNode?.grid;o?o.update(this.el,i):this._options=Se(X({},i),{el:this.el})}get options(){return this.el.gridstackNode||this._options||{el:this.el}}get el(){return this.elementRef.nativeElement}clearOptions(){delete this._options}ngOnDestroy(){this.clearOptions(),delete this.childWidget,delete this.el._gridItemComp,delete this.container,delete this.ref}}return e.\u0275fac=function(t){return new(t||e)(xt(f1))},e.\u0275cmp=e1({type:e,selectors:[["gridstack-item"]],viewQuery:function(t,i){if(t&1&&E_(CT,7,lr),t&2){let o;Th(o=Mh())&&(i.container=o.first)}},inputs:{options:"options"},ngContentSelectors:sJ,decls:5,vars:1,consts:[["container",""],[1,"grid-stack-item-content"]],template:function(t,i){t&1&&(X1(),M_(0,"div",1),XI(1,lJ,0,0,"ng-template",null,0,mL),U1(3),Me(4),B_()),t&2&&(N(4),y0(" ",i.options.content," "))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:1}),e})(),Yh=(()=>{class e{constructor(i){this.elementRef=i,this.addedCB=new Mt,this.changeCB=new Mt,this.disableCB=new Mt,this.dragCB=new Mt,this.dragStartCB=new Mt,this.dragStopCB=new Mt,this.droppedCB=new Mt,this.enableCB=new Mt,this.removedCB=new Mt,this.resizeCB=new Mt,this.resizeStartCB=new Mt,this.resizeStopCB=new Mt,Vi.addRemoveCB||(Vi.addRemoveCB=_J),Vi.saveCB||(Vi.saveCB=vJ),Vi.updateCB||(Vi.updateCB=mJ),this.el._gridComp=this}set options(i){this._grid?this._grid.updateOptions(i):this._options=i}get options(){return this._grid?.opts||this._options||{}}get el(){return this.elementRef.nativeElement}get grid(){return this._grid}static registerComponents(i){i.forEach(o=>e.componentMap[e.getSelector(o)]=o)}static getSelector(i){return Gs(i).selector}ngOnInit(){this.loaded=!!this.options?.children?.length,this._grid=Vi.init(this._options,this.el),delete this._options,this.checkEmpty()}ngAfterContentInit(){this._sub=this.gridstackItems?.changes.subscribe(()=>this.updateAll()),this.loaded||this.updateAll(),this.hookEvents(this.grid)}ngOnDestroy(){this.unhookEvents(this._grid),this._sub?.unsubscribe(),this._grid?.destroy(),delete this._grid,delete this.el._gridComp,delete this.container,delete this.ref}updateAll(){if(!this.grid)return;let i=[];this.gridstackItems?.forEach(o=>{i.push(o.options),o.clearOptions()}),this.grid.load(i)}checkEmpty(){this.grid&&(this.isEmpty=!this.grid.engine.nodes.length)}hookEvents(i){i&&(i.parentGridNode||i.on("added",(o,a)=>{(a[0].grid?.el._gridComp||this).checkEmpty(),this.addedCB.emit({event:o,nodes:a})}).on("change",(o,a)=>this.changeCB.emit({event:o,nodes:a})).on("disable",o=>this.disableCB.emit({event:o})).on("drag",(o,a)=>this.dragCB.emit({event:o,el:a})).on("dragstart",(o,a)=>this.dragStartCB.emit({event:o,el:a})).on("dragstop",(o,a)=>this.dragStopCB.emit({event:o,el:a})).on("dropped",(o,a,n)=>this.droppedCB.emit({event:o,previousNode:a,newNode:n})).on("enable",o=>this.enableCB.emit({event:o})).on("removed",(o,a)=>{(a[0].grid?.el._gridComp||this).checkEmpty(),this.removedCB.emit({event:o,nodes:a})}).on("resize",(o,a)=>this.resizeCB.emit({event:o,el:a})).on("resizestart",(o,a)=>this.resizeStartCB.emit({event:o,el:a})).on("resizestop",(o,a)=>this.resizeStopCB.emit({event:o,el:a})))}unhookEvents(i){i&&(i.parentGridNode||i.off("added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop"))}}return e.componentMap={},e.\u0275fac=function(t){return new(t||e)(xt(f1))},e.\u0275cmp=e1({type:e,selectors:[["gridstack"]],contentQueries:function(t,i,o){if(t&1&&QI(o,ov,4),t&2){let a;Th(a=Mh())&&(i.gridstackItems=a)}},viewQuery:function(t,i){if(t&1&&E_(CT,7,lr),t&2){let o;Th(o=Mh())&&(i.container=o.first)}},inputs:{options:"options",isEmpty:"isEmpty"},outputs:{addedCB:"addedCB",changeCB:"changeCB",disableCB:"disableCB",dragCB:"dragCB",dragStartCB:"dragStartCB",dragStopCB:"dragStopCB",droppedCB:"droppedCB",enableCB:"enableCB",removedCB:"removedCB",resizeCB:"resizeCB",resizeStartCB:"resizeStartCB",resizeStopCB:"resizeStopCB"},ngContentSelectors:dJ,decls:4,vars:1,consts:[["container",""],[4,"ngIf"]],template:function(t,i){t&1&&(X1(cJ),qI(0,uJ,1,0,"ng-content",1)(1,pJ,0,0,"ng-template",null,0,mL),U1(3)),t&2&&pe("ngIf",i.isEmpty)},dependencies:[MX],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:1}),e})();gJ=["grid"],fJ=["dragOriginPlaceholder"],bJ=["editCardsBtn"],CJ=[[["","slot","dashboard-subheader"]]],wJ=["[slot=dashboard-subheader]"],hb=(e,t)=>t.id,wT=(e,t)=>t.action;document.body.classList.add("ui5-content-density-compact");(class Qh{static registerAngularComponents(t){$K(t)}hostEl=W(f1);injector=W(g1);sanitizer=W(V_);i18nService=W(Cn);config=E({});sections=Pf([]);cards=Pf([]);availableCards=E([]);customActions=E([]);i18n=E(zh);loading=E(!1,{transform:Ne});loadingDelay=E(1e3,{transform:yX});saved=ue();actionButtonClick=ue();unsavedChangesChange=ue();i18nKeys=yo;gridDirty=w1(!1);isXLPage=w1(!0);editMode=w1(!1);compactToolbar=w1(!1);toolbarMenuOpen=w1(!1);cardDialogOpen=w1(!1);discardDialogOpen=w1(!1);unsavedNavDialogOpen=w1(!1);backgroundImageHeight=w1(null);dragOriginStyle=w1(null);dragOriginVisible=w1(!1);busyVisible=w1(!1);hasUnsavedChanges=fe(()=>this.editMode()?this.gridDirty()?!0:JSON.stringify(this.sections())!==this.sectionsSnapshotJson||JSON.stringify(this.cards())!==this.cardsSnapshotJson:!1);safeTitle=fe(()=>{let t=this.sanitizer.sanitize(Ot.HTML,this.config().title??this.i18nService.getTranslation(yo.TITLE))??"";return this.sanitizer.bypassSecurityTrustHtml(t)});safeDescription=fe(()=>{let t=this.config().description??this.i18nService.getTranslation(yo.DESCRIPTION);if(!t)return null;let i=this.sanitizer.sanitize(Ot.HTML,t)??"";return this.sanitizer.bypassSecurityTrustHtml(i)});engineProfile=fe(()=>this.config().zFlow?lb.zFlow:lb.default);keyboardNavigationActive=fe(()=>this.editMode()&&!!this.config().zFlow);cardAriaKeyshortcuts=TQ;hasToolbarMenuContent=fe(()=>!!this.config().editable||this.customActions().length>0);gridStackEngine=fe(()=>this.engineProfile().engineClass);gridBreakpoints=fe(()=>[...this.engineProfile().breakpoints]);columnVars=fe(()=>{let[t,i,o,a]=this.engineProfile().sectionColumns;return{"--dashboard-cols-sm":t,"--dashboard-cols-md":i,"--dashboard-cols-lg":o,"--dashboard-cols-xl":a}});addedCardsIds=fe(()=>new Set(this.cards().map(t=>t.id)));editViewButton=fe(()=>Se(X({icon:"action-settings",design:"Transparent",tooltip:this.i18nService.getTranslation(yo.EDIT_HOME_BUTTON)},this.config().buttonsSettings?.editViewButton),{text:this.i18nService.getTranslation(yo.EDIT_HOME_BUTTON)}));editCardsButton=fe(()=>Se(X({icon:"",design:"Default",tooltip:""},this.config().buttonsSettings?.editCardsButton),{text:this.i18nService.getTranslation(yo.EDIT_CARDS_BUTTON)}));sectionCards=fe(()=>{let t=this.cards();return i=>t.filter(o=>o.sectionId===i)});looseCards=z6(()=>{let t=this.cards().filter(o=>!o.sectionId),i=this.config().zFlow?.cardHeight;return!this.engineProfile().fixedCardHeight||i===void 0?t:t.map(o=>Se(X({},o),{h:i,maxH:i,minH:i}))});isEmpty=fe(()=>this.looseCards().length===0);isDashboardEditable=fe(()=>this.config().editable);gridOptions=fe(()=>({cellHeight:10,sizeToContent:!0,disableResize:!this.editMode(),disableDrag:!this.editMode(),marginBottom:0,marginLeft:0,marginRight:0,engineClass:this.gridStackEngine(),columnOpts:{breakpoints:this.gridBreakpoints()}}));sectionsSnapshotJson="";cardsSnapshotJson="";sectionsSnapshot=[];cardsSnapshot=[];gridStack=v3.required("grid");dragOriginPlaceholder=v3("dragOriginPlaceholder");addCardBtn=v3("editCardsBtn");resizeObserver;cardsPosition=new Map;pendingNavigation=null;beforeUnloadHandler=t=>{this.hasUnsavedChanges()&&(t.preventDefault(),t.returnValue="")};constructor(){l1(()=>{this.unsavedChangesChange.emit(this.hasUnsavedChanges())}),l1(()=>{let t=this.i18n(),i=this.config(),o={};i.title!=null&&(o.title=i.title),i.description!=null&&(o.description=i.description);let a=t&&Object.keys(t).length>0?t:null,n=a||Object.keys(o).length>0?X(X({},o),a):zh;this.i18nService.overrides.set(n)}),l1(t=>{if(!this.loading()){this.busyVisible.set(!1);return}let i=Math.max(0,this.loadingDelay());if(i===0){this.busyVisible.set(!0);return}let o=setTimeout(()=>{this.busyVisible.set(!0)},i);t(()=>{clearTimeout(o)})}),l1(t=>{let i=this.config().backgroundImageUrl;if(this.backgroundImageHeight.set(null),!i)return;let o=new Image;o.onload=()=>{this.backgroundImageHeight.set(o.naturalHeight)},o.src=i,t(()=>{o.onload=null})})}ngOnInit(){this.resizeObserver=new ResizeObserver(t=>{let i=t[0]?.contentRect.width??0;this.compactToolbar.set(i<726),this.changeCardSettingsForXlPage(i)}),this.resizeObserver.observe(this.hostEl.nativeElement),window.addEventListener("beforeunload",this.beforeUnloadHandler)}ngOnDestroy(){this.resizeObserver?.disconnect(),window.removeEventListener("beforeunload",this.beforeUnloadHandler)}onMenuItemClick(t,i){if(t==="edit-view"){this.enterEditMode();return}let o=this.customActions().find(a=>a.action===t);o&&this.actionButtonClick.emit({event:i,action:o})}enterEditMode(){this.updateCardsPositions(),this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.sectionsSnapshot=[...this.sections()],this.cardsSnapshot=[...this.cards()],this.sectionsSnapshotJson=JSON.stringify(this.sections()),this.cardsSnapshotJson=JSON.stringify(this.cards()),this.gridDirty.set(!1),this.editMode.set(!0),$a(()=>{this.addCardBtn()?.element.focus()},{injector:this.injector})}enterEditModeAndEditCards(){this.enterEditMode(),this.openCardPanel()}saveEdit(){this.updateCardsPositions();let t=this.cards().map(i=>{let o=this.cardsPosition.get(i.id);return Se(X({},i),{x:o?.x,y:o?.y,w:o?.w??i.w,h:o?.h??i.h})});this.gridDirty.set(!1),this.editMode.set(!1),this.cards.set(t),this.saved.emit({sections:this.sections(),cards:t})}cancelEdit(){if(this.hasUnsavedChanges()){this.discardDialogOpen.set(!0);return}this.discardEdit()}confirmDiscard(){this.discardDialogOpen.set(!1),this.discardEdit()}cancelDiscard(){this.discardDialogOpen.set(!1)}requestNavigation(t){return this.hasUnsavedChanges()?(this.pendingNavigation=t,this.unsavedNavDialogOpen.set(!0),!1):(t(),!0)}onUnsavedNavSave(){this.unsavedNavDialogOpen.set(!1),this.saveEdit(),this.runPendingNavigation()}onUnsavedNavDiscard(){this.unsavedNavDialogOpen.set(!1),this.discardEdit(),this.runPendingNavigation()}onUnsavedNavCancel(){this.unsavedNavDialogOpen.set(!1),this.pendingNavigation=null}runPendingNavigation(){let t=this.pendingNavigation;this.pendingNavigation=null,t?.()}discardEdit(){this.sections.set(this.sectionsSnapshot),this.cards.set(this.cardsSnapshot.map(t=>{let i=this.cardsPosition.get(t.id);return Se(X({},t),{x:i?.x,y:i?.y})})),this.cardDialogOpen.set(!1),this.gridDirty.set(!1),this.editMode.set(!1),$a(()=>{this.restoreGridLayoutFromCards();let t=this.getZFlowEngine();t?.syncZFlowOrderFromLayout(),t?.commitZFlowLayout()},{injector:this.injector})}restoreGridLayoutFromCards(){let t=this.gridStack().grid;t&&t.load(this.createGridLayoutFromCards(t.engine.nodes),!1)}createGridLayoutFromCards(t){let i=new Map(this.cards().map(o=>[o.id,o]));return t.map(o=>{let a=o.id?i.get(o.id):void 0;return{id:o.id,x:a?.x??o.x,y:a?.y??o.y,w:a?.w??o.w,h:a?.h??o.h}})}onCardKeydown(t,i){let o=this.getZFlowEngine();if(!this.keyboardNavigationActive()||!o||t.target!==t.currentTarget)return;let a=LQ(t);if(!a)return;t.preventDefault(),t.stopPropagation();let n=t.currentTarget,c=n.gridstackNode;if(!c||c.id!==i){this.restoreCardFocus(n);return}o.applyKeyboardCommand(i,a)&&this.onGridChange(),this.restoreCardFocus(n)}restoreCardFocus(t){queueMicrotask(()=>{t.isConnected&&this.editMode()&&t.focus({preventScroll:!0})})}removeSection(t){this.sections.update(i=>i.filter(o=>o.id!==t)),this.cards.update(i=>i.filter(o=>o.sectionId!==t))}removeCard(t){let i=this.looseCards().some(o=>o.id===t);this.cards.update(o=>o.filter(a=>a.id!==t)),i&&$a(()=>{this.gridStack().grid?.compact("compact",!1)},{injector:this.injector})}openCardPanel(){this.cardDialogOpen.set(!0)}closeCardPanel(){this.cardDialogOpen.set(!1)}onCardsEdited(t){let i=new Set(this.looseCards().map(o=>o.id));(t.added.some(o=>!o.sectionId)||t.removed.some(o=>i.has(o)))&&this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.cards.update(o=>[...o.filter(a=>!t.removed.includes(a.id)),...t.added.map(a=>X({},a))]),this.closeCardPanel()}onDragStart(t){this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.dragOriginVisible.set(!1),this.engineProfile().renderOriginPosition&&this.renderDragOriginPlaceholder(t.el)}onDrag(){this.dragOriginVisible.set(!1)}onDragStop(){this.getZFlowEngine()?.commitZFlowLayout(),this.dragOriginVisible.set(!1),this.dragOriginStyle.set(null)}onGridChange(){this.getZFlowEngine()?.commitZFlowLayout(),this.editMode()&&this.gridDirty.set(!0)}saveCardsPosition(t){t.forEach(i=>{i.id&&this.cardsPosition.set(i.id,{x:i.x,y:i.y,w:i.w,h:i.h})})}updateCardsPositions(){let t=this.gridStack().gridstackItems?.toArray().map(i=>i.options);t&&this.saveCardsPosition(t)}getZFlowEngine(){let t=this.gridStack().grid?.engine;return t instanceof uT?t:null}createDragOriginClone(t){let i=t.querySelector(zK);if(!i)return null;let o=i.cloneNode(!0);return o.classList.add("mfp-dashboard__drag-origin-content"),o.setAttribute("aria-hidden","true"),o.removeAttribute("id"),o.querySelectorAll("[id]").forEach(a=>{a.removeAttribute("id")}),o}renderDragOriginPlaceholder(t){let i=this.gridStack().el.getBoundingClientRect(),o=t.getBoundingClientRect(),a=this.createDragOriginClone(t);this.dragOriginStyle.set({top:`${o.top-i.top}px`,left:`${o.left-i.left}px`,width:`${o.width}px`,height:`${o.height}px`}),this.dragOriginVisible.set(!0),a&&$a(()=>{this.dragOriginVisible()&&this.dragOriginPlaceholder()?.nativeElement.replaceChildren(a)},{injector:this.injector})}updateCardsForBreakpoint(t){this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.cards.set(this.cards().map(t)),$a(()=>{this.getZFlowEngine()?.commitZFlowLayout()},{injector:this.injector})}changeCardSettingsForXlPage(t){this.engineProfile().xlWidthSwap&&(t>=PK?this.isXLPage()||(this.isXLPage.set(!0),this.updateCardsForBreakpoint(i=>Se(X({},i),{w:i.w===4?3:i.w,maxW:i.maxW===4?3:i.maxW}))):this.isXLPage()&&(this.isXLPage.set(!1),this.updateCardsForBreakpoint(i=>Se(X({},i),{w:i.w===3?4:i.w,maxW:i.maxW===3?4:i.maxW}))))}static \u0275fac=function(t){return new(t||Qh)};static \u0275cmp=e1({type:Qh,selectors:[["mfp-dashboard"]],viewQuery:function(t,i){t&1&&G8(i.gridStack,gJ,5)(i.dragOriginPlaceholder,fJ,5)(i.addCardBtn,bJ,5),t&2&&k_(3)},hostVars:4,hostBindings:function(t,i){t&2&&a2("background-image",i.config().backgroundImageUrl?"url("+i.config().backgroundImageUrl+")":"var(--mfp-dashboard-background, none)")("background-size",i.backgroundImageHeight()?"100% "+i.backgroundImageHeight()+"px":"100% auto")},inputs:{config:[1,"config"],sections:[1,"sections"],cards:[1,"cards"],availableCards:[1,"availableCards"],customActions:[1,"customActions"],i18n:[1,"i18n"],loading:[1,"loading"],loadingDelay:[1,"loadingDelay"]},outputs:{sections:"sectionsChange",cards:"cardsChange",saved:"saved",actionButtonClick:"actionButtonClick",unsavedChangesChange:"unsavedChangesChange"},features:[V1([Cn])],ngContentSelectors:wJ,decls:29,vars:24,consts:[["grid",""],["editCardsBtn",""],["menuBtn",""],["dragOriginPlaceholder",""],["data-testid","dashboard",1,"mfp-dashboard"],["data-testid","dashboard-busy","size","M",1,"mfp-dashboard__busy",3,"active","delay"],[1,"mfp-dashboard__busy-content"],[1,"mfp-dashboard__topbar"],[1,"mfp-dashboard__topbar-row"],[1,"mfp-dashboard__header"],[1,"mfp-dashboard__title-row"],["data-testid","dashboard-title","level","H3","size","H3","wrapping-type","Normal"],["role","status",1,"mfp-dashboard__unsaved-changes"],["data-testid","dashboard-description","level","H5","size","H5","wrapping-type","Normal"],[1,"mfp-dashboard__toolbar"],["data-testid","dashboard-edit-cards-btn","id","edit-cards-btn",3,"accessibleName","design","icon","tooltip"],[1,"mfp-dashboard__subheader"],[1,"mfp-sections-container"],[3,"cards","editMode","section"],["data-testid","dashboard-empty-state",1,"mfp-dashboard__empty"],["data-testid","dashboard-grid",3,"addedCB","changeCB","dragCB","dragStartCB","dragStopCB","removedCB","options"],[1,"mfp-dashboard__drag-origin-placeholder",3,"style"],[3,"options"],[1,"mfp-dashboard__edit-bar"],[3,"cancelled","confirm","addedCardsIds","availableCards","open"],[3,"cancelled","confirm","open"],[3,"cancelled","discard","save","open"],[3,"innerHTML"],["name","user-edit",1,"mfp-dashboard__unsaved-changes-icon",3,"accessibleName"],[1,"mfp-dashboard__unsaved-changes-text"],[1,"mfp-dashboard__description",3,"innerHTML"],["data-testid","dashboard-edit-cards-btn","id","edit-cards-btn",3,"click","accessibleName","design","icon","tooltip"],["data-testid","dashboard-toolbar-menu-btn","design","Transparent","icon","menu2",3,"click","accessibleName","tooltip"],["data-testid","dashboard-toolbar-menu",3,"ui5Close","ui5ItemClick","ui5Open","open","opener"],[3,"icon","text"],["data-action","edit-view","data-testid","dashboard-action-edit-view",3,"icon","text"],["data-testid","dashboard-edit-view-btn",3,"accessibleName","design","icon","tooltip"],[3,"accessibleName","design","endIcon","icon","tooltip"],["data-testid","dashboard-edit-view-btn",3,"click","accessibleName","design","icon","tooltip"],[3,"click","accessibleName","design","endIcon","icon","tooltip"],[3,"removeCard","removeSection","cards","editMode","section"],["data-testid","dashboard-empty-state-illustration","role","img",1,"mfp-dashboard__empty-illustration"],["data-testid","dashboard-empty-state-title","level","H4","size","H3","wrapping-type","Normal",1,"mfp-dashboard__empty-title"],["data-testid","dashboard-empty-state-description",1,"mfp-dashboard__empty-description"],["data-testid","dashboard-empty-state-edit-btn","design","Emphasized",3,"accessibleName"],["data-testid","dashboard-empty-state-edit-btn","design","Emphasized",3,"click","accessibleName"],[1,"mfp-dashboard__drag-origin-placeholder"],[3,"keydown","options"],[3,"removeCard","card","editMode"],["data-testid","dashboard-save-btn","design","Emphasized",3,"click"],["data-testid","dashboard-cancel-btn","design","Transparent",3,"click"]],template:function(t,i){t&1&&(X1(CJ),$(0,"div",4)(1,"ui5-busy-indicator",5)(2,"div",6)(3,"div",7)(4,"div",8)(5,"div",9)(6,"div",10),ze(7,yJ,2,1,"ui5-title",11),ze(8,AJ,4,2,"div",12),K(),ze(9,xJ,2,1,"ui5-title",13),K(),$(10,"div",14),ze(11,SJ,3,5,"ui5-button",15)(12,BJ,7,6)(13,HJ,4,2),K()(),$(14,"div",16),U1(15),K()(),$(16,"div",17),G0(17,DJ,1,3,"mfp-dashboard-section",18,hb),K(),ze(19,RJ,7,4,"div",19),$(20,"gridstack",20,0),we("addedCB",function(){return i.onGridChange()})("changeCB",function(){return i.onGridChange()})("dragCB",function(){return i.onDrag()})("dragStartCB",function(o){return i.onDragStart(o)})("dragStopCB",function(){return i.onDragStop()})("removedCB",function(){return i.onGridChange()}),ze(22,NJ,2,2,"div",21),G0(23,VJ,2,7,"gridstack-item",22,hb),K()()()(),ze(25,PJ,5,2,"div",23),$(26,"mfp-edit-cards-dialog",24),we("cancelled",function(){return i.closeCardPanel()})("confirm",function(o){return i.onCardsEdited(o)}),K(),$(27,"mfp-discard-changes-dialog",25),we("cancelled",function(){return i.cancelDiscard()})("confirm",function(){return i.confirmDiscard()}),K(),$(28,"mfp-unsaved-changes-dialog",26),we("cancelled",function(){return i.onUnsavedNavCancel()})("discard",function(){return i.onUnsavedNavDiscard()})("save",function(){return i.onUnsavedNavSave()}),K()),t&2&&(Z_(i.columnVars()),oi("edit",i.editMode()),N(),pe("active",i.busyVisible())("delay",0),N(),oi("mfp-dashboard__busy-content--busy",i.busyVisible()),N(5),Fe(i.i18nService.getTranslation(i.i18nKeys.TITLE)?7:-1),N(),Fe(i.hasUnsavedChanges()?8:-1),N(),Fe(i.i18nService.getTranslation(i.i18nKeys.DESCRIPTION)?9:-1),N(2),Fe(i.editMode()?11:i.compactToolbar()&&i.hasToolbarMenuContent()?12:13),N(6),q0(i.sections()),N(2),Fe(i.isEmpty()&&i.isDashboardEditable()&&!i.loading()?19:-1),N(),oi("zflow-dragging",!!i.dragOriginStyle()),pe("options",i.gridOptions()),Qe("role",i.keyboardNavigationActive()?"list":null),N(2),Fe(i.dragOriginStyle()&&i.dragOriginVisible()?22:-1),N(),q0(i.looseCards()),N(2),Fe(i.editMode()?25:-1),N(),pe("addedCardsIds",i.addedCardsIds())("availableCards",i.availableCards())("open",i.cardDialogOpen()),N(),pe("open",i.discardDialogOpen()),N(),pe("open",i.unsavedNavDialogOpen()))},dependencies:[Yh,ov,nY,lQ,_Q,pQ,DL,BQ,lo,v2,qQ,KQ,QQ,C7],styles:[`.grid-stack{position:relative}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0;top:0;width:var(--%NS%gs-column-width);height:var(--%NS%gs-cell-height)}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item{right:0}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--%NS%gs-item-margin-top);right:var(--%NS%gs-item-margin-right);bottom:var(--%NS%gs-item-margin-bottom);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;user-select:none;z-index:100}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center;z-index:101}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--%NS%gs-item-margin-top);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--%NS%gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--%NS%gs-item-margin-top);right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--%NS%gs-item-margin-bottom);right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--%NS%gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--%NS%gs-item-margin-bottom);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--%NS%gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,right,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,right .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left 0s,right 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item[gs-x="0"]{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item[gs-x="0"]{right:0}.gs-print-show{display:none}@media print{@page gs-landscape{size:landscape}@page gs-portrait{size:portrait}.grid-stack{display:block!important;height:auto!important;position:static!important}.grid-stack>.grid-stack-item{display:block!important;float:left!important;position:static!important;height:auto!important;left:auto!important;top:auto!important;width:calc(100% * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important;break-inside:avoid!important;page-break-inside:avoid!important}.grid-stack>.grid-stack-item>.grid-stack-item-content{position:relative!important;height:auto!important;overflow:visible!important;white-space:normal!important;margin-top:var(--%NS%gs-item-margin-top)!important;margin-right:var(--%NS%gs-item-margin-right)!important;margin-bottom:var(--%NS%gs-item-margin-bottom)!important;margin-left:var(--%NS%gs-item-margin-left)!important;inset:auto!important}.gs-print-hide{display:none}.gs-print-show{display:block}.grid-stack>.grid-stack-item.gs-print-hide{display:none!important}.grid-stack>.grid-stack-item[gs-page-break=true],.grid-stack>.grid-stack-item[gs-print-orientation]{float:none!important;clear:both!important}.grid-stack>.grid-stack-item[gs-page-break=true]{page-break-before:always!important;break-before:page!important}.grid-stack>.grid-stack-item[gs-print-orientation=landscape]{page:gs-landscape;min-width:calc(100vmax * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important}.grid-stack>.grid-stack-item[gs-print-orientation=portrait]{page:gs-portrait;min-width:calc(100vmin * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important}.grid-stack>.grid-stack-item>.ui-resizable-handle{display:none!important}}.grid-stack-placeholder{z-index:2;pointer-events:none}.grid-stack-placeholder .placeholder-content{border-radius:16px;height:calc(100% - 30px);top:calc(var(--%NS%gs-item-margin-top) * 2 - 2px)!important;width:calc(100% - 19px);left:8px!important;background:var(--%NS%sapContent_Selected_Hover_Background, #e3f0ff);border:1px solid var(--%NS%sapContent_DragAndDropActiveColor, #0064d9);z-index:2!important}mfp-dashboard,mfp-wc-dashboard{display:block;flex:1;margin:0;padding:0;min-height:100%;background-size:100% auto;background-position:top center;background-repeat:no-repeat;background-attachment:local}.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_XL, 3rem) - 10px);container-type:inline-size;container-name:mfp-dashboard}.mfp-dashboard.edit{padding-bottom:60px}.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item,.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item:focus,.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item:focus-visible{outline:none!important;border:0!important;box-shadow:none!important}.mfp-sections-container{display:grid;grid-auto-rows:auto;align-content:start;gap:1rem;grid-template-columns:repeat(var(--%NS%dashboard-cols-xl, 14),1fr)}@container mfp-dashboard (max-width: 599px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-sm, 1),1fr)}}@container mfp-dashboard (min-width: 600px) and (max-width: 1023px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-md, 8),1fr)}}@container mfp-dashboard (min-width: 1024px) and (max-width: 1439px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-lg, 12),1fr)}}.mfp-dashboard__topbar{grid-column:1/-1;align-self:start;display:flex;flex-direction:column;gap:1rem;padding-bottom:3rem;width:100%;min-width:0}.mfp-dashboard__topbar-row{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:0 10px}.mfp-dashboard__header{display:flex;flex-direction:column;gap:.25rem}.mfp-dashboard__title-row{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.mfp-dashboard__unsaved-changes{display:inline-flex;align-items:center;gap:.375rem}.mfp-dashboard__unsaved-changes-icon{width:16px;height:16px;color:var(--%NS%sapContent_MarkerIconColor)}.mfp-dashboard__unsaved-changes-text{color:var(--%NS%sapContent_LabelColor);text-shadow:0 0 2px var(--%NS%sapContent_ContrastTextShadow, #fff);font-family:var(--%NS%sapFontFamily);font-size:var(--%NS%sapFontSize, 14px);font-style:normal;font-weight:400;line-height:normal}.mfp-dashboard__description{font-weight:400;font-family:var(--%NS%sapFontFamily)}.mfp-dashboard__description b,.mfp-dashboard__description strong{font-family:var(--%NS%sapFontBoldFamily)}.mfp-dashboard__toolbar{flex-shrink:0;display:flex;gap:.5rem}.mfp-dashboard__subheader{display:flex;align-items:center;gap:var(--%NS%sapShell_Space_S, 1rem)}.mfp-dashboard__busy{display:block;width:100%}.mfp-dashboard__busy-content{width:100%}.mfp-dashboard__busy-content--busy{min-height:60vh}.mfp-dashboard__empty{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:2rem 1rem 4rem;text-align:center}.mfp-dashboard__empty-illustration{width:320px;max-width:100%;aspect-ratio:320/240;background-image:var(--%NS%mfp-dashboard-empty-image, url("data:image/svg+xml;utf8,%3Csvg id='tnt-Scene-NoApplications' xmlns='http://www.w3.org/2000/svg' width='320' height='240' fill='none' viewBox='0 0 320 240'%3E%3Crect width='320' height='138' y='59' fill='%2389d1ff' rx='24'/%3E%3Cpath fill='%231b90ff' fill-rule='evenodd' d='m96.085 187.07 133.74-23.88c.83-.15.86-1.32.05-1.53l-83.86-20.89c-1-.25-2.05-.3-3.07-.14L37.355 156.9c-1.87.29-2.23 2.82-.51 3.62l56.21 26.14c.94.44 2.01.58 3.04.39l-.01.02Z' clip-rule='evenodd'/%3E%3Cpath fill='%230070f2' d='M234.425 39.1c.53-.03 1.07.07 1.57.25s.99.47 1.43.83c.44.36.82.79 1.12 1.27.31.49.54 1.03.68 1.6l2.49 10.83-161.93 9.75-2.09-12.04a4.21 4.21 0 0 1 .06-1.81 3.917 3.917 0 0 1 2.07-2.57c.52-.26 1.11-.42 1.76-.46l152.84-7.65Z'/%3E%3Cpath fill='%23ffffff' d='m79.775 63.63 161.92-9.74 20.81 90.49c.14.61.16 1.21.1 1.76-.07.55-.25 1.07-.51 1.52-.27.45-.61.83-1.03 1.11-.42.28-.9.47-1.45.54l-156.56 19.62c-.67.09-1.32.02-1.94-.15-.62-.17-1.21-.47-1.72-.88-.51-.4-.96-.88-1.31-1.45-.35-.57-.6-1.2-.71-1.88L79.785 63.63h-.01Z'/%3E%3Cpath fill='%2389d1ff' d='m95.125 73.19 43.77-2.41c.38-.02.76.03 1.12.14.36.11.69.29.99.51.3.22.55.49.76.79.21.3.34.64.41.99l7.57 38.85a2.51 2.51 0 0 1-.45 1.98c-.2.27-.47.5-.77.68-.3.18-.66.3-1.04.34l-43.82 5.29a3.685 3.685 0 0 1-2.41-.58c-.34-.22-.62-.5-.83-.82-.21-.32-.37-.68-.44-1.07l-7.46-41.74c-.07-.38-.05-.75.05-1.08.1-.33.27-.65.51-.92s.53-.49.88-.65c.35-.16.74-.27 1.16-.3Zm104.68-5.76 32.44-1.79c.28-.02.57.03.84.13s.53.25.76.44c.23.19.44.43.6.69.16.26.29.55.36.86l7.53 33.48c.07.32.08.62.04.91-.04.29-.14.55-.28.78-.14.23-.32.42-.54.57-.22.15-.48.24-.76.28l-32.34 3.91a2.504 2.504 0 0 1-1.8-.53c-.26-.2-.48-.44-.66-.71-.18-.27-.31-.58-.38-.92l-7.58-35.6c-.07-.32-.07-.64-.02-.93.05-.29.17-.55.33-.78.16-.23.37-.41.61-.55.24-.14.53-.22.84-.25l.01.01Zm-48.05 2.64 37.44-2.05c.33-.02.65.03.97.14.32.11.6.27.87.47.27.2.49.45.67.73.18.28.31.59.38.92l7.58 35.95c.07.34.07.67.01.98-.06.31-.18.6-.35.84-.17.24-.39.46-.65.62-.26.16-.56.27-.88.31l-37.4 4.52c-.38.04-.75 0-1.1-.09-.35-.09-.68-.26-.97-.46-.29-.2-.54-.47-.74-.76-.2-.29-.34-.63-.41-.98l-7.58-38.41c-.07-.35-.06-.69.01-1 .07-.31.21-.6.41-.84.2-.24.44-.45.73-.6.29-.15.62-.25.98-.27l.03-.02Z'/%3E%3Cpath fill='%2356bdff' d='M88.485 51.02c.51-.03 1.02.05 1.5.21.49.16.92.41 1.32.72s.73.69 1 1.12c.27.43.46.9.54 1.41.09.5.08.99-.04 1.44-.11.45-.31.86-.59 1.21-.28.35-.63.65-1.04.86-.41.21-.88.34-1.4.37-.51.03-1.02-.05-1.5-.21a4.23 4.23 0 0 1-1.32-.72c-.39-.31-.74-.69-1.01-1.12-.27-.43-.46-.9-.54-1.42-.09-.51-.07-1 .04-1.45.1-.45.31-.87.59-1.21.28-.34.63-.64 1.05-.86.42-.22.88-.34 1.4-.36v.01Z'/%3E%3Cpath fill='%230040b0' d='M103.065 168.93c-.67.08-1.32.02-1.94-.15-.62-.18-1.21-.48-1.72-.88s-.96-.88-1.31-1.46c-.35-.56-.6-1.2-.71-1.88L79.795 63.63l-2.09-12.04c-.06-.3-.08-.61-.07-.9 0-.29.05-.58.11-.86.07-.28.16-.54.28-.79.11-.25.27-.49.43-.7l-2.65 3.45c-.16.22-.3.45-.43.69-.11.25-.21.5-.28.78-.07.28-.1.55-.11.85 0 .29 0 .59.07.89l2.06 11.91 17.29 99.82c.11.68.36 1.3.7 1.86a5.4 5.4 0 0 0 1.29 1.44c.51.39 1.08.68 1.7.87.62.18 1.27.24 1.92.15l155.15-19.6 4.46-2.15-156.56 19.62v.01Z'/%3E%3Cpath fill='%23046c7c' d='m269.075 164.4-3.89 2.51s-.09.06-.13.08c-.04.02-.09.06-.12.08-.04.02-.09.06-.12.08-.04.02-.09.06-.13.08-.83.5-1.68.96-2.55 1.37-.87.41-1.77.76-2.7 1.08-.92.32-1.86.57-2.81.78-.96.21-1.94.37-2.92.47-.49.06-.99.1-1.48.13s-1 .04-1.5.05c-.5 0-1.01 0-1.52-.04s-1.02-.06-1.53-.12c-1.54-.15-3.07-.43-4.6-.81-1.52-.39-3.03-.89-4.5-1.5-1.47-.61-2.92-1.34-4.33-2.17-1.41-.83-2.77-1.76-4.07-2.79a36.883 36.883 0 0 1-3.7-3.36c-1.15-1.2-2.24-2.48-3.23-3.81-.99-1.33-1.89-2.75-2.7-4.2a37.21 37.21 0 0 1-2.12-4.52c-.61-1.55-1.1-3.12-1.48-4.71a34.17 34.17 0 0 1-.8-4.77c-.15-1.6-.19-3.17-.12-4.74.07-1.57.27-3.11.58-4.62.3-1.49.7-2.92 1.21-4.3s1.12-2.71 1.82-3.97c.7-1.26 1.49-2.45 2.38-3.56.89-1.11 1.85-2.15 2.91-3.1l3.43-3.1a26.29 26.29 0 0 0-5.33 6.73 28.19 28.19 0 0 0-3.04 8.35 32.074 32.074 0 0 0-.46 9.46c.15 1.61.42 3.22.81 4.82.39 1.6.89 3.19 1.49 4.76.62 1.57 1.33 3.09 2.14 4.56a38.822 38.822 0 0 0 5.99 8.11c1.17 1.22 2.42 2.35 3.74 3.39a36.466 36.466 0 0 0 8.49 5.03c1.49.63 3.01 1.13 4.55 1.53a31.16 31.16 0 0 0 6.19.95c.52.03 1.02.04 1.53.04s1.01-.02 1.52-.04 1-.07 1.5-.13c.99-.11 1.98-.27 2.95-.47.97-.2 1.92-.47 2.84-.78.93-.31 1.83-.68 2.72-1.08.89-.41 1.74-.87 2.57-1.38.05-.03.09-.06.13-.08.05-.02.09-.06.12-.08.04-.02.09-.06.12-.08.04-.02.09-.06.13-.09'/%3E%3Cpath fill='%230899a7' d='M267.365 111.939c1.68 1.36 3.24 2.86 4.66 4.48 1.42 1.62 2.7 3.35 3.83 5.16 1.13 1.82 2.1 3.73 2.9 5.71.8 1.97 1.44 4.02 1.89 6.1.33 1.56.56 3.11.67 4.67.11 1.56.13 3.1.02 4.61-.11 1.52-.31 3.03-.63 4.5-.32 1.47-.74 2.91-1.27 4.3a27.574 27.574 0 0 1-4.37 7.57c-.91 1.12-1.92 2.16-3.01 3.1-1.09.95-2.26 1.81-3.51 2.57a25.402 25.402 0 0 1-5.29 2.46c-.93.31-1.88.57-2.84.78-.96.21-1.95.37-2.95.47-.5.06-1 .1-1.5.12-.5.03-1.01.04-1.52.04s-1.02 0-1.53-.04c-.51-.03-1.03-.07-1.55-.12-1.55-.15-3.1-.43-4.64-.83-1.53-.4-3.06-.9-4.55-1.53a36.39 36.39 0 0 1-4.37-2.19c-1.42-.84-2.8-1.78-4.12-2.83a38.772 38.772 0 0 1-3.74-3.39 37.388 37.388 0 0 1-3.26-3.86c-.99-1.35-1.92-2.78-2.73-4.25-.81-1.47-1.53-3-2.14-4.57-.62-1.57-1.11-3.16-1.49-4.76-.38-1.6-.65-3.21-.81-4.82-.15-1.61-.19-3.2-.12-4.79.08-1.59.27-3.14.58-4.67.31-1.53.72-3.01 1.24-4.43s1.16-2.78 1.88-4.07c.72-1.3 1.55-2.51 2.48-3.65.93-1.14 1.93-2.2 3.02-3.15 1.09-.97 2.26-1.83 3.49-2.59a26.8 26.8 0 0 1 3.85-1.96c1.33-.55 2.72-.99 4.15-1.32 1.43-.33 2.88-.54 4.38-.64 2-.13 4.01-.05 6.01.23s3.98.75 5.93 1.41c1.95.66 3.85 1.5 5.69 2.52 1.84 1.03 3.61 2.21 5.3 3.58v.03l-.03.05Z'/%3E%3Cpath fill='%23ffffff' d='M248.495 118.529c.32-.02.64.02.95.12.31.1.6.27.85.47.25.2.48.46.66.74.18.28.31.6.38.94l2.62 12.86 12.14-1.04c.32-.03.64.02.94.12.3.1.59.26.84.46a2.943 2.943 0 0 1 1.04 1.68c.07.34.07.67.02.97-.05.3-.17.59-.33.83s-.37.45-.62.6c-.25.15-.54.25-.86.28l-12.15 1.08 2.65 13c.07.35.07.68.01.99-.06.31-.18.6-.35.85a2.066 2.066 0 0 1-1.52.9c-.33.03-.65 0-.96-.11-.31-.11-.6-.26-.86-.47-.26-.21-.49-.46-.67-.75a2.88 2.88 0 0 1-.38-.96l-2.63-13.04-12.41 1.1c-.33.03-.66-.01-.97-.12-.31-.11-.61-.26-.87-.47-.26-.21-.49-.46-.68-.75-.19-.29-.31-.61-.38-.96s-.07-.68 0-.99c.07-.31.19-.6.36-.84.17-.24.4-.45.66-.6.26-.15.56-.25.89-.28l12.4-1.07-2.61-12.9a2.315 2.315 0 0 1 .35-1.79 1.965 1.965 0 0 1 1.51-.85h-.02Z'/%3E%3C/svg%3E"));background-repeat:no-repeat;background-position:center;background-size:contain}.mfp-dashboard__empty-title{margin-top:1rem}.mfp-dashboard__empty-description{margin:0 0 1.5rem;color:var(--%NS%sapContent_LabelColor);font-family:var(--%NS%sapFontFamily);font-size:var(--%NS%sapFontSize, 14px)}.mfp-dashboard__edit-bar{position:sticky;bottom:var(--%NS%sapShell_Space_S, 1rem);margin:var(--%NS%sapShell_Space_S, 1rem) var(--%NS%sapShell_Space_S, 1rem) 0;z-index:1000;display:flex;justify-content:flex-end;align-items:center;gap:.5rem;padding:.5rem var(--%NS%sapShell_Space_S, 1rem);background:var(--%NS%sapPageFooter_Background, white);border-radius:var(--%NS%sapElement_BorderCornerRadius, 12px);box-shadow:var(--%NS%sapContent_Shadow1, 0 0 0 1px rgba(34, 53, 72, .48), 0 2px 8px 0 rgba(34, 53, 72, .3));box-sizing:border-box;overflow:hidden}@media screen and (min-width:0px)and (max-width:599px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_S, 1rem) - 10px)}}@media screen and (min-width:600px)and (max-width:1023px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_M, 2rem) - 10px)}}@media screen and (min-width:1024px)and (max-width:1439px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_L, 2rem) - 10px)}}.grid-stack.grid-stack-dragging,.grid-stack.grid-stack-dragging *{cursor:grabbing!important}.mfp-dashboard__drag-origin-placeholder{position:absolute;pointer-events:none;z-index:1}.mfp-dashboard__drag-origin-placeholder:after,.mfp-dashboard__drag-origin-placeholder .mfp-dashboard__drag-origin-content{height:calc(100% - 30px);top:calc(var(--%NS%gs-item-margin-top) * 2 - 2px)!important;width:calc(100% - 19px);left:8px!important;position:absolute;border-radius:16px}.mfp-dashboard__drag-origin-placeholder .mfp-dashboard__drag-origin-content{overflow:hidden}.mfp-dashboard__drag-origin-placeholder:after{content:"";background:var(--%NS%sapNeutralColor, #6a6d75);opacity:.3}.grid-stack:has(>.mfp-dashboard__drag-origin-placeholder)>.grid-stack-placeholder{visibility:hidden}gridstack{position:relative}.grid-stack:has(.ui-resizable-resizing),.grid-stack:has(.ui-resizable-resizing) *{cursor:nwse-resize!important}.grid-stack-item>.ui-resizable-handle{background-image:none!important}
|
|
128
|
+
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),o}static addGrid(t,i={}){if(!t)return null;let o=t;if(o.gridstack){let a=o.gridstack;return i&&(a.opts=X(X({},a.opts),i)),i.children!==void 0&&a.load(i.children),a}return(!t.classList.contains("grid-stack")||Ge.addRemoveCB)&&(Ge.addRemoveCB?o=Ge.addRemoveCB(t,i,!0,!0):o=Q.createDiv(["grid-stack",i.class],t)),Ge.init(i,o)}static registerEngine(t){Ge.engineClass=t}get placeholder(){if(!this._placeholder){this._placeholder=Q.createDiv([this.opts.placeholderClass,pi.itemClass,this.opts.itemClass]);let t=Q.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(t.textContent=this.opts.placeholderText)}return this._placeholder}constructor(t,i={}){this.el=t,this.opts=i,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},t.gridstack=this,this.opts=i=i||{},t.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),i.row&&(i.minRow=i.maxRow=i.row,delete i.row);let o=Q.toNumber(t.getAttribute("gs-row"));i.column==="auto"&&delete i.column,i.alwaysShowResizeHandle!==void 0&&(i._alwaysShowResizeHandle=i.alwaysShowResizeHandle);let a=i.columnOpts;if(a){let m=a.breakpoints;!a.columnWidth&&!m?.length?delete i.columnOpts:m&&m.length>1?(m.sort((f,w)=>(w.w||0)-(f.w||0)),delete a.columnWidth):a.columnMax=a.columnMax||12}let n=Se(X({},Q.cloneDeep(pi)),{column:Q.toNumber(t.getAttribute("gs-column"))||pi.column,minRow:o||Q.toNumber(t.getAttribute("gs-min-row"))||pi.minRow,maxRow:o||Q.toNumber(t.getAttribute("gs-max-row"))||pi.maxRow,staticGrid:Q.toBool(t.getAttribute("gs-static"))||pi.staticGrid,sizeToContent:Q.toBool(t.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(i.handleClass?"."+i.handleClass:i.handle?i.handle:"")||pi.draggable.handle},removableOptions:{accept:i.itemClass||pi.removableOptions.accept,decline:pi.removableOptions.decline}});t.getAttribute("gs-animate")&&(n.animate=Q.toBool(t.getAttribute("gs-animate"))),i=Q.defaults(i,n),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(i),i.rtl==="auto"&&(i.rtl=t.style.direction==="rtl"),i.rtl&&this.el.classList.add("grid-stack-rtl");let c=this.el.closest("."+pi.itemClass)?.gridstackNode;if(c&&(c.subGrid=this,this.parentGridNode=c,this.el.classList.add("grid-stack-nested"),c.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=i.cellHeight==="auto",this._isAutoCellHeight||i.cellHeight==="initial")this.cellHeight(void 0);else{typeof i.cellHeight=="number"&&i.cellHeightUnit&&i.cellHeightUnit!==pi.cellHeightUnit&&(i.cellHeight=i.cellHeight+i.cellHeightUnit,delete i.cellHeightUnit);let m=i.cellHeight;delete i.cellHeight,this.cellHeight(m)}i.alwaysShowResizeHandle==="mobile"&&(i.alwaysShowResizeHandle=Io),this._setStaticClass();let h=i.engineClass||Ge.engineClass||tv;if(this.engine=new h({column:this.getColumn(),float:i.float,maxRow:i.maxRow,onChange:m=>{m.forEach(f=>{let w=f.el;w&&(f._removeDOM?(w&&w.remove(),delete f._removeDOM):this._writePosAttr(w,f))}),this._updateContainerHeight()}}),i.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(m=>this._prepareElement(m)),delete this.engine._loading,this.batchUpdate(!1)),i.children){let m=i.children;delete i.children,m.length&&this.load(m)}this.setAnimation(),i.subGridDynamic&&!De.pauseDrag&&(De.pauseDrag=!0),i.draggable?.pause!==void 0&&(De.pauseDrag=i.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(t=this.opts){this.el.classList.add("gs-"+t.column),typeof t.column=="number"&&(this.el.style.setProperty("--gs-column-width",`${100/t.column}%`),this.el.style.setProperty("--gs-columns",String(t.column)))}addWidget(t){if(!t)return;if(typeof t=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(t.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(t);let i,o=t;if(o.grid=this,o.el?i=o.el:Ge.addRemoveCB?i=Ge.addRemoveCB(this.el,t,!0,!1):i=this.createWidgetDivs(o),!i)return;if(o=i.gridstackNode,o&&i.parentElement===this.el&&this.engine.nodes.find(n=>n._id===o._id))return i;let a=this._readAttr(i);return Q.defaults(t,a),this.engine.prepareNode(t),this.el.appendChild(i),this.makeWidget(i,t),i}createWidgetDivs(t){let i=Q.createDiv(["grid-stack-item",this.opts.itemClass]),o=Q.createDiv(["grid-stack-item-content"],i);return Q.lazyLoad(t)?t.visibleObservable||(t.visibleObservable=new IntersectionObserver(([a])=>{a.isIntersecting&&(t.visibleObservable?.disconnect(),delete t.visibleObservable,Ge.renderCB(o,t),t.grid?.prepareDragDrop(t.el))}),window.setTimeout(()=>t.visibleObservable?.observe(i))):Ge.renderCB(o,t),i}makeSubGrid(t,i,o,a=!0){let n=t.gridstackNode;if(n||(n=this.makeWidget(t).gridstackNode),n.subGrid?.el)return n.subGrid;let c,h=this;for(;h&&!c;)c=h.opts?.subGridOpts,h=h.parentGridNode?.grid;i=Q.cloneDeep(X(X(Se(X({},this.opts),{id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0}),c||{}),i||n.subGridOpts||{})),n.subGridOpts=i;let m=!1;i.column==="auto"&&(m=!0,i.column=Math.max(n.w||1,o?.w||1),delete i.columnOpts);let f=n.el.querySelector(".grid-stack-item-content"),w,y;if(a&&(this._removeDD(n.el),y=Se(X({},n),{x:0,y:0}),Q.removeInternalForSave(y),delete y.subGridOpts,n.content&&(y.content=n.content,delete n.content),Ge.addRemoveCB?w=Ge.addRemoveCB(this.el,y,!0,!1)||void 0:(w=Q.createDiv(["grid-stack-item"]),w.appendChild(f),f=Q.createDiv(["grid-stack-item-content"],n.el)),this.prepareDragDrop(n.el)),o){let I=m?i.column:n.w,D=n.h+o.h,q=n.el.style;q.transition="none",this.update(n.el,{w:I,h:D}),setTimeout(()=>q.transition="")}let L=n.subGrid=Ge.addGrid(f,i)||void 0;return o?._moving&&(L._isTemp=!0),m&&(L._autoColumn=!0),a&&L.makeWidget(w,y),o&&(o._moving?window.setTimeout(()=>Q.simulateMouseEvent(o._event,"mouseenter",L.el),0):L.makeWidget(n.el,n)),this.resizeToContentCheck(!1,n),L}removeAsSubGrid(t){let i=this.parentGridNode?.grid;if(i&&(i.batchUpdate(),i.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(o=>{o.x=(o.x??0)+(this.parentGridNode.x??0),o.y=(o.y??0)+(this.parentGridNode.y??0),this._removeDD(o.el),o.el.remove(),delete o.el.gridstackNode,i.makeWidget(o.el,o)}),i.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,t)){let o=t.el?.gridstackNode;o&&o!==t&&(o._temporaryRemoved=!0),window.setTimeout(()=>{let a=De.dragElement?.lastDrag||t._event;a&&Q.simulateMouseEvent(a,"mouseenter",i.el)},0)}}save(t=!0,i=!1,o=Ge.saveCB,a){let n=this.engine.save(t,o,a);if(n.forEach(c=>{if(t&&c.el&&!c.subGrid&&!o)c.content=c.el.querySelector(".grid-stack-item-content")?.innerHTML,c.content||delete c.content;else if(!t&&!o&&delete c.content,c.subGrid?.el){let h=c.w||c.subGrid.getColumn(),m=c.subGrid.save(t,i,o,h);c.subGridOpts=i?m:{children:m},delete c.subGrid}delete c.el}),i){let c=Q.cloneDeep(this.opts);c.marginBottom===c.marginTop&&c.marginRight===c.marginLeft&&c.marginTop===c.marginRight&&(c.margin=c.marginTop,delete c.marginTop,delete c.marginRight,delete c.marginBottom,delete c.marginLeft),c.rtl===(this.el.style.direction==="rtl")&&(c.rtl="auto"),this._isAutoCellHeight&&(c.cellHeight="auto"),this._autoColumn&&(c.column="auto");let h=c._alwaysShowResizeHandle;return delete c._alwaysShowResizeHandle,h!==void 0?c.alwaysShowResizeHandle=h:delete c.alwaysShowResizeHandle,Q.removeInternalAndSame(c,pi),c.children=n,c}return n}load(t,i=Ge.addRemoveCB||!0){t.forEach(w=>{w.w=w.w||w.minW||1,w.h=w.h||w.minH||1}),t=Q.sort(t),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let o=0;t.forEach(w=>{o=Math.max(o,(w.x||0)+w.w)}),o>this.engine.defaultColumn&&(this.engine.defaultColumn=o);let a=this.getColumn();o>a&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=t,this.engine.columnChanged(o,a,this.responseLayout),t=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(t,o,!0));let n=Ge.addRemoveCB;typeof i=="function"&&(Ge.addRemoveCB=i);let c=[];this.batchUpdate();let h=!this.engine.nodes.length,m=h&&this.opts.animate;m&&this.setAnimation(!1),!h&&i&&[...this.engine.nodes].forEach(w=>{w.id&&(Q.find(t,w.id)||(Ge.addRemoveCB&&Ge.addRemoveCB(this.el,w,!1,!1),c.push(w),this.removeWidget(w.el,!0,!1)))}),this.engine._loading=!0;let f=[];return this.engine.nodes=this.engine.nodes.filter(w=>w.id&&Q.find(t,w.id)?(f.push(w),!1):!0),t.forEach(w=>{let y=w.id?Q.find(f,w.id):void 0;if(y){if(Q.shouldSizeToContent(y)&&(w.h=y.h),this.engine.nodeBoundFix(w),(w.autoPosition||w.x===void 0||w.y===void 0)&&(w.w=w.w||y.w,w.h=w.h||y.h,this.engine.findEmptyPosition(w)),this.engine.nodes.push(y),Q.samePos(y,w)&&this.engine.nodes.length>1&&(this.moveNode(y,Se(X({},w),{forceCollide:!0})),Q.copyPos(w,y)),this.update(y.el,w),w.subGridOpts?.children){let L=y.el.querySelector(".grid-stack");L&&L.gridstack&&L.gridstack.load(w.subGridOpts.children)}}else i&&this.addWidget(w)}),delete this.engine._loading,this.engine.removedNodes=c,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,n?Ge.addRemoveCB=n:delete Ge.addRemoveCB,m&&this.setAnimation(!0,!0),this}batchUpdate(t=!0){return this.engine.batchUpdate(t),t||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(t=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!t||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;let i=this.el.querySelector("."+this.opts.itemClass);if(i){let a=Q.toNumber(i.getAttribute("gs-h"))||1;return Math.round(i.offsetHeight/a)}let o=parseInt(this.el.getAttribute("gs-current-row")||"0");return o?Math.round(this.el.getBoundingClientRect().height/o):this.opts.cellHeight}cellHeight(t){if(t!==void 0&&this._isAutoCellHeight!==(t==="auto")&&(this._isAutoCellHeight=t==="auto",this._updateResizeEvent()),(t==="initial"||t==="auto")&&(t=void 0),t===void 0){let o=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;t=this.cellWidth()+o}let i=Q.parseHeight(t);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h?this:(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(t=!1){return t&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){let t=this.opts.columnOpts;if(!t||!t.columnWidth&&!t.breakpoints?.length)return!1;let i=this.getColumn(),o=i,a=this._widthOrContainer(!0);if(t.columnWidth)o=Math.min(Math.round(a/t.columnWidth)||1,t.columnMax);else{o=t.columnMax;let n=0;for(;n<t.breakpoints.length&&a<=t.breakpoints[n].w;)o=t.breakpoints[n++].c||i}if(o!==i){let n=t.breakpoints?.find(c=>c.c===o);return this.column(o,n?.layout||t.layout),!0}return!1}compact(t="compact",i=!0){return this.engine.compact(t,i),this._triggerChangeEvent(),this}column(t,i="moveScale"){if(!t||t<1||this.opts.column===t)return this;let o=this.getColumn();return this.opts.column=t,this.engine?(this.engine.column=t,this.el.classList.remove("gs-"+o),this._updateColumnVar(),this.engine.columnChanged(o,t,i),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=i,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(t=>t.matches("."+this.opts.itemClass)&&!t.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return!!this._ignoreLayoutsNodeChange}destroy(t=!0){return this.el?(this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),t?this.el.parentNode.removeChild(this.el):(this.removeAll(t),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this):this}float(t){return this.opts.float!==t&&(this.opts.float=this.engine.float=t,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(t,i=!1){let o=this.el.getBoundingClientRect(),a;i?a={top:o.top+document.documentElement.scrollTop,left:o.left}:a={top:this.el.offsetTop,left:this.el.offsetLeft};let n=t.left-a.left,c=t.top-a.top,h=o.width/this.getColumn(),m=o.height/parseInt(this.el.getAttribute("gs-current-row")||"0");return{x:Math.floor(n/h),y:Math.floor(c/m)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(t,i,o,a){return this.engine.isAreaEmpty(t,i,o,a)}makeWidget(t,i){let o=Ge.getElement(t);if(!o||o.gridstackNode)return o;o.parentElement||this.el.appendChild(o),this._prepareElement(o,!0,i);let a=o.gridstackNode;this._updateContainerHeight(),a.subGridOpts&&this.makeSubGrid(o,a.subGridOpts,void 0,!1);let n=!1;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(n=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),n&&delete this._ignoreLayoutsNodeChange,o}on(t,i){return t.indexOf(" ")!==-1?(t.split(" ").forEach(o=>this.on(o,i)),this):(t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable"?(t==="enable"||t==="disable"?this._gsEventHandler[t]=o=>i(o):this._gsEventHandler[t]=(o=>{o.detail&&i(o,o.detail)}),this.el.addEventListener(t,this._gsEventHandler[t])):t==="drag"||t==="dragstart"||t==="dragstop"||t==="resizestart"||t==="resize"||t==="resizestop"||t==="dropped"||t==="resizecontent"?this._gsEventHandler[t]=i:console.error("GridStack.on("+t+") event not supported"),this)}off(t){return t.indexOf(" ")!==-1?(t.split(" ").forEach(i=>this.off(i)),this):((t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable")&&this._gsEventHandler[t]&&this.el.removeEventListener(t,this._gsEventHandler[t]),delete this._gsEventHandler[t],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(t=>this.off(t)),this}removeWidget(t,i=!0,o=!0){return t?(Ge.getElements(t).forEach(a=>{if(a.parentElement&&a.parentElement!==this.el)return;let n=a.gridstackNode;n||(n=this.engine.nodes.find(c=>a===c.el)),n&&(i&&Ge.addRemoveCB&&Ge.addRemoveCB(this.el,n,!1,!1),delete a.gridstackNode,this._removeDD(a),this.engine.removeNode(n,i,o),i&&a.parentElement&&a.remove())}),o&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(t=!0,i=!0){return this.engine.nodes.forEach(o=>{t&&Ge.addRemoveCB&&Ge.addRemoveCB(this.el,o,!1,!1),delete o.el.gridstackNode,this.opts.staticGrid||this._removeDD(o.el)}),this.engine.removeAll(t,i),i&&this._triggerRemoveEvent(),this}setAnimation(t=this.opts.animate,i){return i?setTimeout(()=>{this.opts&&this.setAnimation(t)}):t?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=t,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(t,i=!0,o=!0){return!!this.opts.staticGrid===t?this:(t?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(a=>{this.prepareDragDrop(a.el),a.subGrid&&o&&a.subGrid.setStatic(t,i,o)}),i&&this._setStaticClass(),this)}updateOptions(t){let i=this.opts;if(t===i)return this;if(t.acceptWidgets!==void 0&&(i.acceptWidgets=t.acceptWidgets,this._setupAcceptWidget()),t.animate!==void 0&&this.setAnimation(t.animate),t.cellHeight&&this.cellHeight(t.cellHeight),t.class!==void 0&&t.class!==i.class&&(i.class&&this.el.classList.remove(i.class),t.class&&this.el.classList.add(t.class)),t.columnOpts){let o=!!this.opts.columnOpts;this.opts.columnOpts=t.columnOpts,o!==!!this.opts.columnOpts&&this._updateResizeEvent(),this.checkDynamicColumn()}else t.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof t.column=="number"&&this.column(t.column);return t.margin!==void 0&&this.margin(t.margin),t.staticGrid!==void 0&&this.setStatic(t.staticGrid),t.disableDrag!==void 0&&!t.staticGrid&&this.enableMove(!t.disableDrag),t.disableResize!==void 0&&!t.staticGrid&&this.enableResize(!t.disableResize),t.float!==void 0&&this.float(t.float),t.row!==void 0?(i.minRow=i.maxRow=this.engine.maxRow=i.row=t.row,this._updateContainerHeight(),this.engine.getRow()>t.row&&this.compact()):(t.minRow!==void 0&&(i.minRow=t.minRow,this._updateContainerHeight()),t.maxRow!==void 0&&(i.maxRow=this.engine.maxRow=t.maxRow,this.engine.getRow()>t.maxRow&&this.compact())),t.lazyLoad!==void 0&&(i.lazyLoad=t.lazyLoad),t.children?.length&&this.load(t.children),this}update(t,i){return Ge.getElements(t).forEach(o=>{let a=o?.gridstackNode;if(!a)return;let n=X(X({},Q.copyPos({},a)),Q.cloneDeep(i));this.engine.nodeBoundFix(n),delete n.autoPosition;let c=["x","y","w","h"],h,m=n,f=a;if(c.some(L=>m[L]!==void 0&&m[L]!==f[L])){h={};let L=h;c.forEach(I=>{L[I]=m[I]!==void 0?m[I]:f[I],delete m[I]})}if(!h&&(n.minW||n.minH||n.maxW||n.maxH)&&(h={}),n.content!==void 0){let L=o.querySelector(".grid-stack-item-content");L&&L.textContent!==n.content&&(a.content=n.content,Ge.renderCB(L,n),a.subGrid?.el&&(L.appendChild(a.subGrid.el),a.subGrid._updateContainerHeight())),delete n.content}let w=!1,y=!1;for(let L in m)L[0]!=="_"&&f[L]!==m[L]&&(f[L]=m[L],w=!0,y=y||!this.opts.staticGrid&&(L==="noResize"||L==="noMove"||L==="locked"));if(Q.sanitizeMinMax(a),h){let L=h.w!==void 0&&h.w!==a.w;this.moveNode(a,h),L&&a.subGrid?a.subGrid.onResize(this.hasAnimationCSS()?a.w:void 0):this.resizeToContentCheck(L,a),delete a._orig}(h||w)&&this._writeAttr(o,a),y&&this.prepareDragDrop(a.el),Ge.updateCB&&Ge.updateCB(a)}),this}moveNode(t,i){let o=t._updating;o||this.engine.cleanNodes().beginUpdate(t),this.engine.moveNode(t,i),this._updateContainerHeight(),o||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(t){if(!t||(t.classList.remove("size-to-content-max"),!t.clientHeight))return;let i=t.gridstackNode;if(!i)return;let o=i.grid;if(!o||t.parentElement!==o.el)return;let a=o.getCellHeight(!0);if(!a)return;let n=i.h?i.h*a:t.clientHeight,c=null;if(i.resizeToContentParent&&(c=t.querySelector(i.resizeToContentParent)),c||(c=t.querySelector(Ge.resizeToContentParent)),!c)return;let h=t.clientHeight-c.clientHeight,m=i.h?i.h*a-h:c.clientHeight,f;if(i.subGrid){f=i.subGrid.getRow()*i.subGrid.getCellHeight(!0);let L=i.subGrid.el.getBoundingClientRect(),I=t.getBoundingClientRect();f+=L.top-I.top}else{if(i.subGridOpts?.children?.length)return;{let L=c.firstElementChild;if(!L){console.error(`Error: GridStack.resizeToContent() widget id:${i.id} '${Ge.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}f=L.getBoundingClientRect().height||m}}if(m===f)return;n+=f-m;let w=Math.ceil(n/a),y=Number.isInteger(i.sizeToContent)?i.sizeToContent:0;y&&w>y&&(w=y,t.classList.add("size-to-content-max")),i.minH&&w<i.minH?w=i.minH:i.maxH&&w>i.maxH&&(w=i.maxH),w!==i.h&&(o._ignoreLayoutsNodeChange=!0,o.moveNode(i,{h:w}),delete o._ignoreLayoutsNodeChange)}resizeToContentCBCheck(t){Ge.resizeToContentCB?Ge.resizeToContentCB(t):this.resizeToContent(t)}rotate(t,i){return Ge.getElements(t).forEach(o=>{let a=o.gridstackNode;if(!a||!Q.canBeRotated(a))return;let n={w:a.h,h:a.w,minH:a.minW,minW:a.minH,maxH:a.maxW,maxW:a.maxH};if(i){let m=i.left>0?Math.floor(i.left/this.cellWidth()):0,f=i.top>0?Math.floor(i.top/this.opts.cellHeight):0;n.x=a.x+m-(a.h-(f+1)),n.y=a.y+f-m}let c=n;Object.keys(c).forEach(m=>{c[m]===void 0&&delete c[m]});let h=a._orig;this.update(o,n),a._orig=h}),this}margin(t){if(!(typeof t=="string"&&t.split(" ").length>1)){let i=Q.parseHeight(t);if(this.opts.marginUnit===i.unit&&this.opts.margin===i.h)return this}return this.opts.margin=t,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(t){return this.engine.willItFit(t)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let t=this.engine.getDirtyNodes(!0);return t&&t.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(t),this._triggerEvent("change",t)),this.engine.saveInitial(),this._sortDom(),this}_sortDom(){let t=this.engine.nodes;if(t.forEach(o=>{o.subGrid&&o.subGrid._sortDom()}),t.length<2)return this;this.engine.sortNodes(),t=this.engine.nodes;let i=this.el.children;return t.some((o,a)=>o.el!==i[a])&&t.forEach(o=>{o.el&&o.el.parentElement===this.el&&this.el.appendChild(o.el)}),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(i=>{delete i._dirty});let t=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",t)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){let t=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",t)}return this}_triggerEvent(t,i){let o=i?new CustomEvent(t,{bubbles:!1,detail:i}):new Event(t),a=this;for(;a.parentGridNode;)a=a.parentGridNode.grid;return a.el.dispatchEvent(o),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let t=this.parentGridNode,i=this.getRow()+this._extraDragRow,o=this.opts.cellHeight,a=this.opts.cellHeightUnit;if(!o)return this;if(!t&&!this.opts.minRow){let n=Q.parseHeight(getComputedStyle(this.el).minHeight);if(n.h>0&&n.unit===a){let c=Math.floor(n.h/o);i<c&&(i=c)}}return this.el.setAttribute("gs-current-row",String(i)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),i&&(this.el.style[t?"minHeight":"height"]=i*o+a),t&&Q.shouldSizeToContent(t)&&t.grid.resizeToContentCBCheck(t.el),this}_prepareElement(t,i=!1,o){o=o||this._readAttr(t),t.gridstackNode=o,o.el=t,o.grid=this,o=this.engine.addNode(o,i),this._writeAttr(t,o),t.classList.add(pi.itemClass,this.opts.itemClass);let a=Q.shouldSizeToContent(o);return a?t.classList.add("size-to-content"):t.classList.remove("size-to-content"),a&&this.resizeToContentCheck(!1,o),(!Q.lazyLoad(o)||!o.visibleObservable)&&this.prepareDragDrop(o.el),this}_writePosAttr(t,i){if(!i._moving&&!i._resizing||this._placeholder===t){let o=this.opts.rtl?"right":"left",a=t.style;a.top=i.y?i.y===1?"var(--gs-cell-height)":`calc(${i.y} * var(--gs-cell-height))`:null,a[o]=i.x?i.x===1?"var(--gs-column-width)":`calc(${i.x} * var(--gs-column-width))`:null,a.width=i.w>1?`calc(${i.w} * var(--gs-column-width))`:null,a.height=i.h>1?`calc(${i.h} * var(--gs-cell-height))`:null}return t.style.setProperty("--gs-x",String(i.x||0)),t.style.setProperty("--gs-y",String(i.y||0)),t.style.setProperty("--gs-w",String(i.w||1)),t.style.setProperty("--gs-h",String(i.h||1)),t.setAttribute("gs-x",String(i.x??0)),t.setAttribute("gs-y",String(i.y??0)),i.w>1?t.setAttribute("gs-w",String(i.w)):t.removeAttribute("gs-w"),i.h>1?t.setAttribute("gs-h",String(i.h)):t.removeAttribute("gs-h"),this}_writeAttr(t,i){if(!i)return this;this._writePosAttr(t,i);let o={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"},a=i,n=o;for(let c in n)a[c]!==void 0&&a[c]!==null&&a[c]!==!1?t.setAttribute(n[c],String(a[c])):t.removeAttribute(n[c]);return i.print?(i.print.pageBreak?t.setAttribute("gs-page-break",String(i.print.pageBreak)):t.removeAttribute("gs-page-break"),i.print.hide?t.classList.add("gs-print-hide"):t.classList.remove("gs-print-hide"),i.print.orientation?t.setAttribute("gs-print-orientation",String(i.print.orientation)):t.removeAttribute("gs-print-orientation")):(t.removeAttribute("gs-page-break"),t.classList.remove("gs-print-hide"),t.removeAttribute("gs-print-orientation")),this}_readAttr(t,i=!0){let o={};o.x=Q.toNumber(t.getAttribute("gs-x")),o.y=Q.toNumber(t.getAttribute("gs-y")),o.w=Q.toNumber(t.getAttribute("gs-w")),o.h=Q.toNumber(t.getAttribute("gs-h")),o.autoPosition=Q.toBool(t.getAttribute("gs-auto-position")),o.noResize=Q.toBool(t.getAttribute("gs-no-resize")),o.noMove=Q.toBool(t.getAttribute("gs-no-move")),o.locked=Q.toBool(t.getAttribute("gs-locked"));let a=t.getAttribute("gs-page-break"),n=t.classList.contains("gs-print-hide"),c=t.getAttribute("gs-print-orientation");(a||n||c)&&(o.print={},a&&(o.print.pageBreak=Q.toBool(a)),n&&(o.print.hide=!0),c&&(o.print.orientation=c));let h=t.getAttribute("gs-size-to-content");h&&(h==="true"||h==="false"?o.sizeToContent=Q.toBool(h):o.sizeToContent=parseInt(h,10)),o.id=t.getAttribute("gs-id")??void 0,o.maxW=Q.toNumber(t.getAttribute("gs-max-w")),o.minW=Q.toNumber(t.getAttribute("gs-min-w")),o.maxH=Q.toNumber(t.getAttribute("gs-max-h")),o.minH=Q.toNumber(t.getAttribute("gs-min-h")),i&&(o.w===1&&t.removeAttribute("gs-w"),o.h===1&&t.removeAttribute("gs-h"),o.maxW&&t.removeAttribute("gs-max-w"),o.minW&&t.removeAttribute("gs-min-w"),o.maxH&&t.removeAttribute("gs-max-h"),o.minH&&t.removeAttribute("gs-min-h"));let m=o;for(let f in m)o.hasOwnProperty(f)&&!m[f]&&m[f]!==0&&f!=="sizeToContent"&&delete m[f];return o}_setStaticClass(){let t=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...t),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...t),this.el.removeAttribute("gs-static")),this}onResize(t=this.el?.clientWidth){if(!t)return this;if(this.prevWidth===t)return this;this.prevWidth=t,this.batchUpdate();let i=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),i=!0):i=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(o=>{o.subGrid&&o.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(i),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(t=!1,i){if(!this.engine)return;if(t&&this.hasAnimationCSS()){setTimeout(()=>this.resizeToContentCheck(!1,i),this.animationDelay);return}if(i)Q.shouldSizeToContent(i)&&this.resizeToContentCBCheck(i.el);else if(this.engine.nodes.some(a=>Q.shouldSizeToContent(a))){let a=[...this.engine.nodes];this.batchUpdate(),a.forEach(n=>{Q.shouldSizeToContent(n)&&this.resizeToContentCBCheck(n.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}let o=this._gsEventHandler.resizecontent;o&&o(new Event("resizecontent"),i?[i]:this.engine.nodes)}_updateResizeEvent(t=!1){let i=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(o=>o.sizeToContent));return!t&&i&&!this.resizeObserver?(this._sizeThrottle=Q.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(t||!i)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(t=".grid-stack-item"){return Q.getElement(t)}static getElements(t=".grid-stack-item"){return Q.getElements(t)}static getGridElement(t){return Ge.getElement(t)}static getGridElements(t){return Q.getElements(t)}_initMargin(){let t={h:0,unit:"px"},i=0,o=[];typeof this.opts.margin=="string"&&(o=this.opts.margin.split(" ")),o.length===2?(this.opts.marginTop=this.opts.marginBottom=o[0],this.opts.marginLeft=this.opts.marginRight=o[1]):o.length===4?(this.opts.marginTop=o[0],this.opts.marginRight=o[1],this.opts.marginBottom=o[2],this.opts.marginLeft=o[3]):(t=Q.parseHeight(this.opts.margin),this.opts.marginUnit=t.unit,i=this.opts.margin=t.h);let a=["marginTop","marginRight","marginBottom","marginLeft"],n=this.opts;a.forEach(h=>{n[h]===void 0?n[h]=i:(t=Q.parseHeight(n[h]),n[h]=t.h,delete this.opts.margin)}),this.opts.marginUnit=t.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);let c=this.el.style;return c.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),c.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),c.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),c.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return x5}static setupDragIn(t,i,o,a=document){i?.pause!==void 0&&(De.pauseDrag=i.pause),i=X({appendTo:"body",helper:"clone"},i||{}),(typeof t=="string"?Q.getElements(t,a):t).forEach((n,c)=>{x5.isDraggable(n)||x5.dragIn(n,i),o?.[c]&&(n.gridstackNode=o[c])})}movable(t,i){return this.opts.staticGrid?this:(Ge.getElements(t).forEach(o=>{let a=o.gridstackNode;a&&(i?delete a.noMove:a.noMove=!0,this.prepareDragDrop(a.el))}),this)}resizable(t,i){return this.opts.staticGrid?this:(Ge.getElements(t).forEach(o=>{let a=o.gridstackNode;a&&(i?delete a.noResize:a.noResize=!0,this.prepareDragDrop(a.el))}),this)}disable(t=!0){return this.opts.staticGrid?this:(this.enableMove(!1,t),this.enableResize(!1,t),this._triggerEvent("disable"),this)}enable(t=!0){return this.opts.staticGrid?this:(this.enableMove(!0,t),this.enableResize(!0,t),this._triggerEvent("enable"),this)}enableMove(t,i=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&i&&o.subGrid.enableMove(t,i)}),this)}enableResize(t,i=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&i&&o.subGrid.enableResize(t,i)}),this)}cancelDrag(){let t=De.dragElement?.el;if(t?._gridstackNodeOrig){let o=t._gridstackNodeOrig,a=o.grid,n=this._placeholder?.gridstackNode;n&&(n._isAboutToRemove=!0,this.engine.removeNode(n)),this.engine.restoreInitial(),t.gridstackNode=o,delete t._gridstackNodeOrig,delete De.dropElement,a&&(a.engine.addNode(o,!1),a.engine.restoreInitial());return}let i=this._placeholder?.gridstackNode;i&&(i._isExternal?(i._isAboutToRemove=!0,this.engine.removeNode(i)):i._isAboutToRemove&&Ge._itemRemoving(i.el,!1),this.engine.restoreInitial())}_removeDD(t){return x5.draggable(t,"destroy").resizable(t,"destroy"),t.gridstackNode&&delete t.gridstackNode._initDD,delete t.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return x5.droppable(this.el,"destroy"),this;let t,i,o=(a,n,c)=>{c=c||n;let h=c.gridstackNode;if(!h)return;if(!h.grid?.el){c.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;let L=c.getBoundingClientRect();c.style.left=L.x+(this.dragTransform.xScale-1)*(a.clientX-L.x)/this.dragTransform.xScale+"px",c.style.top=L.y+(this.dragTransform.yScale-1)*(a.clientY-L.y)/this.dragTransform.yScale+"px",c.style.transformOrigin="0px 0px"}let{top:m,left:f}=c.getBoundingClientRect(),w=this.el.getBoundingClientRect();f-=w.left,m-=w.top;let y={position:{top:m*this.dragTransform.xScale,left:f*this.dragTransform.yScale}};if(h._temporaryRemoved){if(h.x=Math.max(0,Math.round(f/i)),h.y=Math.max(0,Math.round(m/t)),delete h.autoPosition,this.engine.nodeBoundFix(h),!this.engine.willItFit(h)){if(h.autoPosition=!0,!this.engine.willItFit(h)){x5.off(n,"drag");return}h._willFitPos&&(Q.copyPos(h,h._willFitPos),delete h._willFitPos)}this._onStartMoving(c,a,y,h,i,t)}else this._dragOrResize(c,a,y,h,i,t)};return x5.droppable(this.el,{accept:a=>{let n=a.gridstackNode||this._readAttr(a,!1);if(n?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let c=!0;if(typeof this.opts.acceptWidgets=="function")c=this.opts.acceptWidgets(a);else{let h=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;c=a.matches(h)}if(c&&n&&this.opts.maxRow){let h={w:n.w,h:n.h,minW:n.minW,minH:n.minH};c=this.engine.willItFit(h)}return c}}).on(this.el,"dropover",(a,n,c)=>{let h=c?.gridstackNode||n.gridstackNode;if(h?.grid===this&&!h._temporaryRemoved)return!1;if(h?._sidebarOrig&&(h.w=h._sidebarOrig.w,h.h=h._sidebarOrig.h),h?.grid&&h.grid!==this&&!h._temporaryRemoved&&h.grid._leave(n,c),c=c||n,i=this.cellWidth(),t=this.getCellHeight(!0),!h){let w=c.getAttribute("data-gs-widget")||c.getAttribute("gridstacknode");if(w){try{h=JSON.parse(w)}catch{console.error("Gridstack dropover: Bad JSON format: ",w)}c.removeAttribute("data-gs-widget"),c.removeAttribute("gridstacknode")}h||(h=this._readAttr(c)),h._sidebarOrig={w:h.w,h:h.h}}h.grid||(h.el||(h=X({},h)),h._isExternal=!0,c.gridstackNode=h);let m=h.w||Math.round(c.offsetWidth/i)||1,f=h.h||Math.round(c.offsetHeight/t)||1;return h.grid&&h.grid!==this?(n._gridstackNodeOrig||(n._gridstackNodeOrig=h),n.gridstackNode=h=Se(X({},h),{w:m,h:f,grid:this}),delete h.x,delete h.y,this.engine.cleanupNode(h).nodeBoundFix(h),h._initDD=h._isExternal=h._temporaryRemoved=!0):(h.w=m,h.h=f,h._temporaryRemoved=!0),Ge._itemRemoving(h.el,!1),x5.on(n,"drag",o),o(a,n,c),!1}).on(this.el,"dropout",(a,n,c)=>{let h=c?.gridstackNode||n.gridstackNode;return h&&(!h.grid||h.grid===this)&&(this._leave(n,c),this._isTemp&&this.removeAsSubGrid(h)),!1}).on(this.el,"drop",(a,n,c)=>{let h=c?.gridstackNode||n.gridstackNode;if(h?.grid===this&&!h._isExternal)return!1;let m=!!this.placeholder.parentElement,f=n!==c;this.placeholder.remove(),delete this.placeholder.gridstackNode,m&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));let w=n._gridstackNodeOrig;if(delete n._gridstackNodeOrig,m&&w?.grid&&w.grid!==this){let L=w.grid;L.engine.removeNodeFromLayoutCache(w),L.engine.removedNodes.push(w),L._triggerRemoveEvent()._triggerChangeEvent(),L.parentGridNode&&!L.engine.nodes.length&&L.opts.subGridDynamic&&L.removeAsSubGrid()}if(!h||(m&&(this.engine.cleanupNode(h),h.grid=this),delete h.grid?._isTemp,x5.off(n,"drag"),c&&c!==n?(c.remove(),n=c):n.remove(),this._removeDD(n),!m))return!1;let y=h.subGrid?.el?.gridstack;return Q.copyPos(h,this._readAttr(this.placeholder)),Q.removePositioningStyles(n),f&&(h.content||h.subGridOpts||Ge.addRemoveCB)?(delete h.el,n=this.addWidget(h)||n):(this._prepareElement(n,!0,h),this.el.appendChild(n),this.resizeToContentCheck(!1,h),y&&(y.parentGridNode=h),this._updateContainerHeight()),this.engine.addedNodes.push(h),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(Se(X({},a),{type:"dropped"}),w&&w.grid?w:void 0,h),!1}),this}static _itemRemoving(t,i){if(!t)return;let o=t?t.gridstackNode:void 0;!o?.grid||t.classList.contains(o.grid.opts.removableOptions.decline)||(i?o._isAboutToRemove=!0:delete o._isAboutToRemove,i?t.classList.add("grid-stack-item-removing"):t.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;let t=document.querySelector(this.opts.removable);return t?(!this.opts.staticGrid&&!x5.isDroppable(t)&&x5.droppable(t,this.opts.removableOptions).on(t,"dropover",(i,o)=>Ge._itemRemoving(o,!0)).on(t,"dropout",(i,o)=>Ge._itemRemoving(o,!1)),this):this}refreshDragHandles(t){return Ge.getElements(t).forEach(i=>{i.ddElement?.ddDraggable?.refreshHandles()}),this}prepareDragDrop(t,i=!1){let o=t?.gridstackNode;if(!o)return this;let a=o.noMove||this.opts.disableDrag,n=o.noResize||this.opts.disableResize,c=this.opts.staticGrid||a&&n;if((i||c)&&(o._initDD&&(this._removeDD(t),delete o._initDD),c))return t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!o._initDD){let h,m,f=(L,I)=>{this.triggerEvent(L,L.target),h=this.cellWidth(),m=this.getCellHeight(!0),this._onStartMoving(t,L,I,o,h,m)},w=(L,I)=>{this._dragOrResize(t,L,I,o,h,m)},y=L=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete o._moving,delete o._resizing,delete o._event,delete o._lastTried;let I=o.w!==o._orig.w,D=L.target;if(!(!D.gridstackNode||D.gridstackNode.grid!==this)){if(o.el=D,o._isAboutToRemove){let q=t.gridstackNode.grid;q._gsEventHandler[L.type]&&q._gsEventHandler[L.type](L,D),q.engine.nodes.push(o),q.removeWidget(t,!0,!0)}else Q.removePositioningStyles(D),o._temporaryRemoved?(this._writePosAttr(D,o),this.engine.addNode(o)):this._writePosAttr(D,o),this.triggerEvent(L,D);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),L.type==="resizestop"&&(Number.isInteger(o.sizeToContent)&&(o.sizeToContent=o.h),this.resizeToContentCheck(I,o))}};x5.draggable(t,{start:f,stop:y,drag:w,rtl:this.opts.rtl==="auto"?void 0:this.opts.rtl}).resizable(t,{start:f,stop:y,resize:w,rtl:this.opts.rtl==="auto"?void 0:this.opts.rtl}),o._initDD=!0}return x5.draggable(t,a?"disable":"enable").resizable(t,n?"disable":"enable"),this}_onStartMoving(t,i,o,a,n,c){if(this.engine.cleanNodes().beginUpdate(a),this._writePosAttr(this.placeholder,a),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=a,a.grid?.el)this.dragTransform=Q.getValuesFromTransformedElement(t);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){let h=this.placeholder.closest(".grid-stack");this.dragTransform=Q.getValuesFromTransformedElement(h)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(a.el=this.placeholder,a._lastUiPosition=o.position,a._prevYPix=o.position.top,a._moving=i.type==="dragstart",a._resizing=i.type==="resizestart",delete a._lastTried,i.type==="dropover"&&a._temporaryRemoved&&(this.engine.addNode(a),a._moving=!0),this.engine.cacheRects(n,c,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),i.type==="resizestart"){let h=this.getColumn()-a.x,m=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-a.y;x5.resizable(t,"option","minWidth",n*Math.min(a.minW||1,h)).resizable(t,"option","minHeight",c*Math.min(a.minH||1,m)).resizable(t,"option","maxWidth",n*Math.min(a.maxW||Number.MAX_SAFE_INTEGER,h)).resizable(t,"option","maxWidthMoveLeft",n*Math.min(a.maxW||Number.MAX_SAFE_INTEGER,a.x+a.w)).resizable(t,"option","maxHeight",c*Math.min(a.maxH||Number.MAX_SAFE_INTEGER,m)).resizable(t,"option","maxHeightMoveUp",c*Math.min(a.maxH||Number.MAX_SAFE_INTEGER,a.y+a.h))}}_dragOrResize(t,i,o,a,n,c){let h=X({},a._orig),m=!1,f=this.opts.marginLeft,w=this.opts.marginRight,y=this.opts.marginTop,L=this.opts.marginBottom,I=Math.round(c*.1),D=Math.round(n*.1);if(f=Math.min(f,D),w=Math.min(w,D),y=Math.min(y,I),L=Math.min(L,I),i.type==="drag"){if(a._temporaryRemoved)return;a._prevYPix=o.position.top,this.opts.draggable.scroll!==!1&&De.dragElement?.updateScrollPosition(this.el);let de=o.position.left+(o.position.left>a._lastUiPosition.left?-w:f),U=o.position.top+(o.position.top>a._lastUiPosition.top?-L:y);h.x=Math.round(de/n),h.y=Math.round(U/c);let ce=this._extraDragRow;if(this.engine.collide(a,h)){let ne=this.getRow(),Pe=Math.max(0,h.y+a.h-ne);this.opts.maxRow&&ne+Pe>this.opts.maxRow&&(Pe=Math.max(0,this.opts.maxRow-ne)),this._extraDragRow=Pe}else this._extraDragRow=0;if(this._extraDragRow!==ce&&this._updateContainerHeight(),a.x===h.x&&a.y===h.y)return}else if(i.type==="resize"){if((h.x??0)<0||(Q.updateScrollResize(i,t,c),h.w=Math.round((o.size.width-f)/n),h.h=Math.round((o.size.height-y)/c),a.w===h.w&&a.h===h.h)||a._lastTried&&a._lastTried.w===h.w&&a._lastTried.h===h.h)return;if(i.hasMovedX){let de=a.x-(h.w-a.w);h.x=de<0?0:de}if(i.hasMovedY){let de=a.y-(h.h-a.h);h.y=de<0?0:de}m=!0}a._event=i,a._lastTried=h;let q={x:o.position.left+f,y:o.position.top+y,w:(o.size?o.size.width:a.w*n)-f-w,h:(o.size?o.size.height:a.h*c)-y-L};if(this.engine.moveNodeCheck(a,Se(X({},h),{cellWidth:n,cellHeight:c,rect:q,resizing:m}))){a._lastUiPosition=o.position,this.engine.cacheRects(n,c,y,w,L,f),delete a._skipDown,m&&a.subGrid&&a.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();let de=i.target;a._sidebarOrig||this._writePosAttr(de,a),this.triggerEvent(i,de)}}triggerEvent(t,i){let o=this;for(;o.parentGridNode;)o=o.parentGridNode.grid;o._gsEventHandler[t.type]&&o._gsEventHandler[t.type](t,i)}_leave(t,i){i=i||t;let o=i.gridstackNode;if(!o||(i.style.transform=i.style.transformOrigin="",x5.off(t,"drag"),o._temporaryRemoved))return;o._temporaryRemoved=!0,this.engine.removeNode(o),o.el=o._isExternal&&i?i:t;let a=o._sidebarOrig;o._isExternal&&this.engine.cleanupNode(o),o._sidebarOrig=a,this.opts.removable===!0&&Ge._itemRemoving(t,!0),t._gridstackNodeOrig?(t.gridstackNode=t._gridstackNodeOrig,delete t._gridstackNodeOrig):o._isExternal&&this.engine.restoreInitial()}};Vi.renderCB=(e,t)=>{e&&t?.content&&(e.textContent=t.content)};Vi.resizeToContentParent=".grid-stack-item-content";Vi.Utils=Q;Vi.Engine=tv;Vi.GDRev="13.2.0";CT=["container"],sJ=["*"];cJ=["*",[["","empty-content",""]]],dJ=["*","[empty-content]"],hJ=["*ngIf","isEmpty"];ov=(()=>{class e{constructor(i){this.elementRef=i,this.el._gridItemComp=this}set options(i){let o=this.el.gridstackNode?.grid;o?o.update(this.el,i):this._options=Se(X({},i),{el:this.el})}get options(){return this.el.gridstackNode||this._options||{el:this.el}}get el(){return this.elementRef.nativeElement}clearOptions(){delete this._options}ngOnDestroy(){this.clearOptions(),delete this.childWidget,delete this.el._gridItemComp,delete this.container,delete this.ref}}return e.\u0275fac=function(t){return new(t||e)(xt(f1))},e.\u0275cmp=e1({type:e,selectors:[["gridstack-item"]],viewQuery:function(t,i){if(t&1&&E_(CT,7,lr),t&2){let o;Th(o=Mh())&&(i.container=o.first)}},inputs:{options:"options"},ngContentSelectors:sJ,decls:5,vars:1,consts:[["container",""],[1,"grid-stack-item-content"]],template:function(t,i){t&1&&(X1(),M_(0,"div",1),XI(1,lJ,0,0,"ng-template",null,0,mL),U1(3),Me(4),B_()),t&2&&(N(4),y0(" ",i.options.content," "))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:1}),e})(),Yh=(()=>{class e{constructor(i){this.elementRef=i,this.addedCB=new Mt,this.changeCB=new Mt,this.disableCB=new Mt,this.dragCB=new Mt,this.dragStartCB=new Mt,this.dragStopCB=new Mt,this.droppedCB=new Mt,this.enableCB=new Mt,this.removedCB=new Mt,this.resizeCB=new Mt,this.resizeStartCB=new Mt,this.resizeStopCB=new Mt,Vi.addRemoveCB||(Vi.addRemoveCB=_J),Vi.saveCB||(Vi.saveCB=vJ),Vi.updateCB||(Vi.updateCB=mJ),this.el._gridComp=this}set options(i){this._grid?this._grid.updateOptions(i):this._options=i}get options(){return this._grid?.opts||this._options||{}}get el(){return this.elementRef.nativeElement}get grid(){return this._grid}static registerComponents(i){i.forEach(o=>e.componentMap[e.getSelector(o)]=o)}static getSelector(i){return Gs(i).selector}ngOnInit(){this.loaded=!!this.options?.children?.length,this._grid=Vi.init(this._options,this.el),delete this._options,this.checkEmpty()}ngAfterContentInit(){this._sub=this.gridstackItems?.changes.subscribe(()=>this.updateAll()),this.loaded||this.updateAll(),this.hookEvents(this.grid)}ngOnDestroy(){this.unhookEvents(this._grid),this._sub?.unsubscribe(),this._grid?.destroy(),delete this._grid,delete this.el._gridComp,delete this.container,delete this.ref}updateAll(){if(!this.grid)return;let i=[];this.gridstackItems?.forEach(o=>{i.push(o.options),o.clearOptions()}),this.grid.load(i)}checkEmpty(){this.grid&&(this.isEmpty=!this.grid.engine.nodes.length)}hookEvents(i){i&&(i.parentGridNode||i.on("added",(o,a)=>{(a[0].grid?.el._gridComp||this).checkEmpty(),this.addedCB.emit({event:o,nodes:a})}).on("change",(o,a)=>this.changeCB.emit({event:o,nodes:a})).on("disable",o=>this.disableCB.emit({event:o})).on("drag",(o,a)=>this.dragCB.emit({event:o,el:a})).on("dragstart",(o,a)=>this.dragStartCB.emit({event:o,el:a})).on("dragstop",(o,a)=>this.dragStopCB.emit({event:o,el:a})).on("dropped",(o,a,n)=>this.droppedCB.emit({event:o,previousNode:a,newNode:n})).on("enable",o=>this.enableCB.emit({event:o})).on("removed",(o,a)=>{(a[0].grid?.el._gridComp||this).checkEmpty(),this.removedCB.emit({event:o,nodes:a})}).on("resize",(o,a)=>this.resizeCB.emit({event:o,el:a})).on("resizestart",(o,a)=>this.resizeStartCB.emit({event:o,el:a})).on("resizestop",(o,a)=>this.resizeStopCB.emit({event:o,el:a})))}unhookEvents(i){i&&(i.parentGridNode||i.off("added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop"))}}return e.componentMap={},e.\u0275fac=function(t){return new(t||e)(xt(f1))},e.\u0275cmp=e1({type:e,selectors:[["gridstack"]],contentQueries:function(t,i,o){if(t&1&&QI(o,ov,4),t&2){let a;Th(a=Mh())&&(i.gridstackItems=a)}},viewQuery:function(t,i){if(t&1&&E_(CT,7,lr),t&2){let o;Th(o=Mh())&&(i.container=o.first)}},inputs:{options:"options",isEmpty:"isEmpty"},outputs:{addedCB:"addedCB",changeCB:"changeCB",disableCB:"disableCB",dragCB:"dragCB",dragStartCB:"dragStartCB",dragStopCB:"dragStopCB",droppedCB:"droppedCB",enableCB:"enableCB",removedCB:"removedCB",resizeCB:"resizeCB",resizeStartCB:"resizeStartCB",resizeStopCB:"resizeStopCB"},ngContentSelectors:dJ,decls:4,vars:1,consts:[["container",""],[4,"ngIf"]],template:function(t,i){t&1&&(X1(cJ),qI(0,uJ,1,0,"ng-content",1)(1,pJ,0,0,"ng-template",null,0,mL),U1(3)),t&2&&pe("ngIf",i.isEmpty)},dependencies:[MX],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:1}),e})();gJ=["grid"],fJ=["dragOriginPlaceholder"],bJ=["editCardsBtn"],CJ=[[["","slot","dashboard-subheader"]]],wJ=["[slot=dashboard-subheader]"],hb=(e,t)=>t.id,wT=(e,t)=>t.action;document.body.classList.add("ui5-content-density-compact");(class Qh{static registerAngularComponents(t){$K(t)}hostEl=W(f1);injector=W(g1);sanitizer=W(V_);i18nService=W(Cn);config=E({});sections=Pf([]);cards=Pf([]);availableCards=E([]);customActions=E([]);i18n=E(zh);loading=E(!1,{transform:Ne});loadingDelay=E(1e3,{transform:yX});saved=ue();actionButtonClick=ue();unsavedChangesChange=ue();i18nKeys=yo;gridDirty=w1(!1);isXLPage=w1(!0);editMode=w1(!1);compactToolbar=w1(!1);toolbarMenuOpen=w1(!1);cardDialogOpen=w1(!1);discardDialogOpen=w1(!1);unsavedNavDialogOpen=w1(!1);backgroundImageHeight=w1(null);dragOriginStyle=w1(null);dragOriginVisible=w1(!1);busyVisible=w1(!1);hasUnsavedChanges=fe(()=>this.editMode()?this.gridDirty()?!0:JSON.stringify(this.sections())!==this.sectionsSnapshotJson||JSON.stringify(this.cards())!==this.cardsSnapshotJson:!1);safeTitle=fe(()=>{let t=this.sanitizer.sanitize(Ot.HTML,this.config().title??this.i18nService.getTranslation(yo.TITLE))??"";return this.sanitizer.bypassSecurityTrustHtml(t)});safeDescription=fe(()=>{let t=this.config().description??this.i18nService.getTranslation(yo.DESCRIPTION);if(!t)return null;let i=this.sanitizer.sanitize(Ot.HTML,t)??"";return this.sanitizer.bypassSecurityTrustHtml(i)});engineProfile=fe(()=>this.config().zFlow?lb.zFlow:lb.default);keyboardNavigationActive=fe(()=>this.editMode()&&!!this.config().zFlow);cardAriaKeyshortcuts=TQ;hasToolbarMenuContent=fe(()=>!!this.config().editable||this.customActions().length>0);gridStackEngine=fe(()=>this.engineProfile().engineClass);gridBreakpoints=fe(()=>[...this.engineProfile().breakpoints]);columnVars=fe(()=>{let[t,i,o,a]=this.engineProfile().sectionColumns;return{"--dashboard-cols-sm":t,"--dashboard-cols-md":i,"--dashboard-cols-lg":o,"--dashboard-cols-xl":a}});addedCardsIds=fe(()=>new Set(this.cards().map(t=>t.id)));editViewButton=fe(()=>Se(X({icon:"action-settings",design:"Transparent",tooltip:this.i18nService.getTranslation(yo.EDIT_HOME_BUTTON)},this.config().buttonsSettings?.editViewButton),{text:this.i18nService.getTranslation(yo.EDIT_HOME_BUTTON)}));editCardsButton=fe(()=>Se(X({icon:"",design:"Default",tooltip:""},this.config().buttonsSettings?.editCardsButton),{text:this.i18nService.getTranslation(yo.EDIT_CARDS_BUTTON)}));sectionCards=fe(()=>{let t=this.cards();return i=>t.filter(o=>o.sectionId===i)});looseCards=z6(()=>{let t=this.cards().filter(o=>!o.sectionId),i=this.config().zFlow?.cardHeight;return!this.engineProfile().fixedCardHeight||i===void 0?t:t.map(o=>Se(X({},o),{h:i,maxH:i,minH:i}))});isEmpty=fe(()=>this.looseCards().length===0);isDashboardEditable=fe(()=>this.config().editable);gridOptions=fe(()=>({cellHeight:10,disableResize:!this.editMode(),disableDrag:!this.editMode(),marginBottom:0,marginLeft:0,marginRight:0,engineClass:this.gridStackEngine(),columnOpts:{breakpoints:this.gridBreakpoints()}}));sectionsSnapshotJson="";cardsSnapshotJson="";sectionsSnapshot=[];cardsSnapshot=[];gridStack=v3.required("grid");dragOriginPlaceholder=v3("dragOriginPlaceholder");addCardBtn=v3("editCardsBtn");resizeObserver;cardsPosition=new Map;pendingNavigation=null;beforeUnloadHandler=t=>{this.hasUnsavedChanges()&&(t.preventDefault(),t.returnValue="")};constructor(){l1(()=>{this.unsavedChangesChange.emit(this.hasUnsavedChanges())}),l1(()=>{let t=this.i18n(),i=this.config(),o={};i.title!=null&&(o.title=i.title),i.description!=null&&(o.description=i.description);let a=t&&Object.keys(t).length>0?t:null,n=a||Object.keys(o).length>0?X(X({},o),a):zh;this.i18nService.overrides.set(n)}),l1(t=>{if(!this.loading()){this.busyVisible.set(!1);return}let i=Math.max(0,this.loadingDelay());if(i===0){this.busyVisible.set(!0);return}let o=setTimeout(()=>{this.busyVisible.set(!0)},i);t(()=>{clearTimeout(o)})}),l1(t=>{let i=this.config().backgroundImageUrl;if(this.backgroundImageHeight.set(null),!i)return;let o=new Image;o.onload=()=>{this.backgroundImageHeight.set(o.naturalHeight)},o.src=i,t(()=>{o.onload=null})})}ngOnInit(){this.resizeObserver=new ResizeObserver(t=>{let i=t[0]?.contentRect.width??0;this.compactToolbar.set(i<726),this.changeCardSettingsForXlPage(i)}),this.resizeObserver.observe(this.hostEl.nativeElement),window.addEventListener("beforeunload",this.beforeUnloadHandler)}ngOnDestroy(){this.resizeObserver?.disconnect(),window.removeEventListener("beforeunload",this.beforeUnloadHandler)}onMenuItemClick(t,i){if(t==="edit-view"){this.enterEditMode();return}let o=this.customActions().find(a=>a.action===t);o&&this.actionButtonClick.emit({event:i,action:o})}enterEditMode(){this.updateCardsPositions(),this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.sectionsSnapshot=[...this.sections()],this.cardsSnapshot=[...this.cards()],this.sectionsSnapshotJson=JSON.stringify(this.sections()),this.cardsSnapshotJson=JSON.stringify(this.cards()),this.gridDirty.set(!1),this.editMode.set(!0),$a(()=>{this.addCardBtn()?.element.focus()},{injector:this.injector})}enterEditModeAndEditCards(){this.enterEditMode(),this.openCardPanel()}saveEdit(){this.updateCardsPositions();let t=this.cards().map(i=>{let o=this.cardsPosition.get(i.id);return Se(X({},i),{x:o?.x,y:o?.y,w:o?.w??i.w,h:o?.h??i.h})});this.gridDirty.set(!1),this.editMode.set(!1),this.cards.set(t),this.saved.emit({sections:this.sections(),cards:t})}cancelEdit(){if(this.hasUnsavedChanges()){this.discardDialogOpen.set(!0);return}this.discardEdit()}confirmDiscard(){this.discardDialogOpen.set(!1),this.discardEdit()}cancelDiscard(){this.discardDialogOpen.set(!1)}requestNavigation(t){return this.hasUnsavedChanges()?(this.pendingNavigation=t,this.unsavedNavDialogOpen.set(!0),!1):(t(),!0)}onUnsavedNavSave(){this.unsavedNavDialogOpen.set(!1),this.saveEdit(),this.runPendingNavigation()}onUnsavedNavDiscard(){this.unsavedNavDialogOpen.set(!1),this.discardEdit(),this.runPendingNavigation()}onUnsavedNavCancel(){this.unsavedNavDialogOpen.set(!1),this.pendingNavigation=null}runPendingNavigation(){let t=this.pendingNavigation;this.pendingNavigation=null,t?.()}discardEdit(){this.sections.set(this.sectionsSnapshot),this.cards.set(this.cardsSnapshot.map(t=>{let i=this.cardsPosition.get(t.id);return Se(X({},t),{x:i?.x,y:i?.y})})),this.cardDialogOpen.set(!1),this.gridDirty.set(!1),this.editMode.set(!1),$a(()=>{this.restoreGridLayoutFromCards();let t=this.getZFlowEngine();t?.syncZFlowOrderFromLayout(),t?.commitZFlowLayout()},{injector:this.injector})}restoreGridLayoutFromCards(){let t=this.gridStack().grid;t&&t.load(this.createGridLayoutFromCards(t.engine.nodes),!1)}createGridLayoutFromCards(t){let i=new Map(this.cards().map(o=>[o.id,o]));return t.map(o=>{let a=o.id?i.get(o.id):void 0;return{id:o.id,x:a?.x??o.x,y:a?.y??o.y,w:a?.w??o.w,h:a?.h??o.h}})}onCardKeydown(t,i){let o=this.getZFlowEngine();if(!this.keyboardNavigationActive()||!o||t.target!==t.currentTarget)return;let a=LQ(t);if(!a)return;t.preventDefault(),t.stopPropagation();let n=t.currentTarget,c=n.gridstackNode;if(!c||c.id!==i){this.restoreCardFocus(n);return}o.applyKeyboardCommand(i,a)&&this.onGridChange(),this.restoreCardFocus(n)}restoreCardFocus(t){queueMicrotask(()=>{t.isConnected&&this.editMode()&&t.focus({preventScroll:!0})})}removeSection(t){this.sections.update(i=>i.filter(o=>o.id!==t)),this.cards.update(i=>i.filter(o=>o.sectionId!==t))}removeCard(t){let i=this.looseCards().some(o=>o.id===t);this.cards.update(o=>o.filter(a=>a.id!==t)),i&&$a(()=>{this.gridStack().grid?.compact("compact",!1)},{injector:this.injector})}openCardPanel(){this.cardDialogOpen.set(!0)}closeCardPanel(){this.cardDialogOpen.set(!1)}onCardsEdited(t){let i=new Set(this.looseCards().map(o=>o.id));(t.added.some(o=>!o.sectionId)||t.removed.some(o=>i.has(o)))&&this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.cards.update(o=>[...o.filter(a=>!t.removed.includes(a.id)),...t.added.map(a=>X({},a))]),this.closeCardPanel()}onDragStart(t){this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.dragOriginVisible.set(!1),this.engineProfile().renderOriginPosition&&this.renderDragOriginPlaceholder(t.el)}onDrag(){this.dragOriginVisible.set(!1)}onDragStop(){this.getZFlowEngine()?.commitZFlowLayout(),this.dragOriginVisible.set(!1),this.dragOriginStyle.set(null)}onGridChange(){this.getZFlowEngine()?.commitZFlowLayout(),this.editMode()&&this.gridDirty.set(!0)}saveCardsPosition(t){t.forEach(i=>{i.id&&this.cardsPosition.set(i.id,{x:i.x,y:i.y,w:i.w,h:i.h})})}updateCardsPositions(){let t=this.gridStack().gridstackItems?.toArray().map(i=>i.options);t&&this.saveCardsPosition(t)}getZFlowEngine(){let t=this.gridStack().grid?.engine;return t instanceof uT?t:null}createDragOriginClone(t){let i=t.querySelector(zK);if(!i)return null;let o=i.cloneNode(!0);return o.classList.add("mfp-dashboard__drag-origin-content"),o.setAttribute("aria-hidden","true"),o.removeAttribute("id"),o.querySelectorAll("[id]").forEach(a=>{a.removeAttribute("id")}),o}renderDragOriginPlaceholder(t){let i=this.gridStack().el.getBoundingClientRect(),o=t.getBoundingClientRect(),a=this.createDragOriginClone(t);this.dragOriginStyle.set({top:`${o.top-i.top}px`,left:`${o.left-i.left}px`,width:`${o.width}px`,height:`${o.height}px`}),this.dragOriginVisible.set(!0),a&&$a(()=>{this.dragOriginVisible()&&this.dragOriginPlaceholder()?.nativeElement.replaceChildren(a)},{injector:this.injector})}updateCardsForBreakpoint(t){this.getZFlowEngine()?.syncZFlowOrderFromLayout(),this.cards.set(this.cards().map(t)),$a(()=>{this.getZFlowEngine()?.commitZFlowLayout()},{injector:this.injector})}changeCardSettingsForXlPage(t){this.engineProfile().xlWidthSwap&&(t>=PK?this.isXLPage()||(this.isXLPage.set(!0),this.updateCardsForBreakpoint(i=>Se(X({},i),{w:i.w===4?3:i.w,maxW:i.maxW===4?3:i.maxW}))):this.isXLPage()&&(this.isXLPage.set(!1),this.updateCardsForBreakpoint(i=>Se(X({},i),{w:i.w===3?4:i.w,maxW:i.maxW===3?4:i.maxW}))))}static \u0275fac=function(t){return new(t||Qh)};static \u0275cmp=e1({type:Qh,selectors:[["mfp-dashboard"]],viewQuery:function(t,i){t&1&&G8(i.gridStack,gJ,5)(i.dragOriginPlaceholder,fJ,5)(i.addCardBtn,bJ,5),t&2&&k_(3)},hostVars:4,hostBindings:function(t,i){t&2&&a2("background-image",i.config().backgroundImageUrl?"url("+i.config().backgroundImageUrl+")":"var(--mfp-dashboard-background, none)")("background-size",i.backgroundImageHeight()?"100% "+i.backgroundImageHeight()+"px":"100% auto")},inputs:{config:[1,"config"],sections:[1,"sections"],cards:[1,"cards"],availableCards:[1,"availableCards"],customActions:[1,"customActions"],i18n:[1,"i18n"],loading:[1,"loading"],loadingDelay:[1,"loadingDelay"]},outputs:{sections:"sectionsChange",cards:"cardsChange",saved:"saved",actionButtonClick:"actionButtonClick",unsavedChangesChange:"unsavedChangesChange"},features:[V1([Cn])],ngContentSelectors:wJ,decls:29,vars:24,consts:[["grid",""],["editCardsBtn",""],["menuBtn",""],["dragOriginPlaceholder",""],["data-testid","dashboard",1,"mfp-dashboard"],["data-testid","dashboard-busy","size","M",1,"mfp-dashboard__busy",3,"active","delay"],[1,"mfp-dashboard__busy-content"],[1,"mfp-dashboard__topbar"],[1,"mfp-dashboard__topbar-row"],[1,"mfp-dashboard__header"],[1,"mfp-dashboard__title-row"],["data-testid","dashboard-title","level","H3","size","H3","wrapping-type","Normal"],["role","status",1,"mfp-dashboard__unsaved-changes"],["data-testid","dashboard-description","level","H5","size","H5","wrapping-type","Normal"],[1,"mfp-dashboard__toolbar"],["data-testid","dashboard-edit-cards-btn","id","edit-cards-btn",3,"accessibleName","design","icon","tooltip"],[1,"mfp-dashboard__subheader"],[1,"mfp-sections-container"],[3,"cards","editMode","section"],["data-testid","dashboard-empty-state",1,"mfp-dashboard__empty"],["data-testid","dashboard-grid",3,"addedCB","changeCB","dragCB","dragStartCB","dragStopCB","removedCB","options"],[1,"mfp-dashboard__drag-origin-placeholder",3,"style"],[3,"options"],[1,"mfp-dashboard__edit-bar"],[3,"cancelled","confirm","addedCardsIds","availableCards","open"],[3,"cancelled","confirm","open"],[3,"cancelled","discard","save","open"],[3,"innerHTML"],["name","user-edit",1,"mfp-dashboard__unsaved-changes-icon",3,"accessibleName"],[1,"mfp-dashboard__unsaved-changes-text"],[1,"mfp-dashboard__description",3,"innerHTML"],["data-testid","dashboard-edit-cards-btn","id","edit-cards-btn",3,"click","accessibleName","design","icon","tooltip"],["data-testid","dashboard-toolbar-menu-btn","design","Transparent","icon","menu2",3,"click","accessibleName","tooltip"],["data-testid","dashboard-toolbar-menu",3,"ui5Close","ui5ItemClick","ui5Open","open","opener"],[3,"icon","text"],["data-action","edit-view","data-testid","dashboard-action-edit-view",3,"icon","text"],["data-testid","dashboard-edit-view-btn",3,"accessibleName","design","icon","tooltip"],[3,"accessibleName","design","endIcon","icon","tooltip"],["data-testid","dashboard-edit-view-btn",3,"click","accessibleName","design","icon","tooltip"],[3,"click","accessibleName","design","endIcon","icon","tooltip"],[3,"removeCard","removeSection","cards","editMode","section"],["data-testid","dashboard-empty-state-illustration","role","img",1,"mfp-dashboard__empty-illustration"],["data-testid","dashboard-empty-state-title","level","H4","size","H3","wrapping-type","Normal",1,"mfp-dashboard__empty-title"],["data-testid","dashboard-empty-state-description",1,"mfp-dashboard__empty-description"],["data-testid","dashboard-empty-state-edit-btn","design","Emphasized",3,"accessibleName"],["data-testid","dashboard-empty-state-edit-btn","design","Emphasized",3,"click","accessibleName"],[1,"mfp-dashboard__drag-origin-placeholder"],[3,"keydown","options"],[3,"removeCard","card","editMode"],["data-testid","dashboard-save-btn","design","Emphasized",3,"click"],["data-testid","dashboard-cancel-btn","design","Transparent",3,"click"]],template:function(t,i){t&1&&(X1(CJ),$(0,"div",4)(1,"ui5-busy-indicator",5)(2,"div",6)(3,"div",7)(4,"div",8)(5,"div",9)(6,"div",10),ze(7,yJ,2,1,"ui5-title",11),ze(8,AJ,4,2,"div",12),K(),ze(9,xJ,2,1,"ui5-title",13),K(),$(10,"div",14),ze(11,SJ,3,5,"ui5-button",15)(12,BJ,7,6)(13,HJ,4,2),K()(),$(14,"div",16),U1(15),K()(),$(16,"div",17),G0(17,DJ,1,3,"mfp-dashboard-section",18,hb),K(),ze(19,RJ,7,4,"div",19),$(20,"gridstack",20,0),we("addedCB",function(){return i.onGridChange()})("changeCB",function(){return i.onGridChange()})("dragCB",function(){return i.onDrag()})("dragStartCB",function(o){return i.onDragStart(o)})("dragStopCB",function(){return i.onDragStop()})("removedCB",function(){return i.onGridChange()}),ze(22,NJ,2,2,"div",21),G0(23,VJ,2,7,"gridstack-item",22,hb),K()()()(),ze(25,PJ,5,2,"div",23),$(26,"mfp-edit-cards-dialog",24),we("cancelled",function(){return i.closeCardPanel()})("confirm",function(o){return i.onCardsEdited(o)}),K(),$(27,"mfp-discard-changes-dialog",25),we("cancelled",function(){return i.cancelDiscard()})("confirm",function(){return i.confirmDiscard()}),K(),$(28,"mfp-unsaved-changes-dialog",26),we("cancelled",function(){return i.onUnsavedNavCancel()})("discard",function(){return i.onUnsavedNavDiscard()})("save",function(){return i.onUnsavedNavSave()}),K()),t&2&&(Z_(i.columnVars()),oi("edit",i.editMode()),N(),pe("active",i.busyVisible())("delay",0),N(),oi("mfp-dashboard__busy-content--busy",i.busyVisible()),N(5),Fe(i.i18nService.getTranslation(i.i18nKeys.TITLE)?7:-1),N(),Fe(i.hasUnsavedChanges()?8:-1),N(),Fe(i.i18nService.getTranslation(i.i18nKeys.DESCRIPTION)?9:-1),N(2),Fe(i.editMode()?11:i.compactToolbar()&&i.hasToolbarMenuContent()?12:13),N(6),q0(i.sections()),N(2),Fe(i.isEmpty()&&i.isDashboardEditable()&&!i.loading()?19:-1),N(),oi("zflow-dragging",!!i.dragOriginStyle()),pe("options",i.gridOptions()),Qe("role",i.keyboardNavigationActive()?"list":null),N(2),Fe(i.dragOriginStyle()&&i.dragOriginVisible()?22:-1),N(),q0(i.looseCards()),N(2),Fe(i.editMode()?25:-1),N(),pe("addedCardsIds",i.addedCardsIds())("availableCards",i.availableCards())("open",i.cardDialogOpen()),N(),pe("open",i.discardDialogOpen()),N(),pe("open",i.unsavedNavDialogOpen()))},dependencies:[Yh,ov,nY,lQ,_Q,pQ,DL,BQ,lo,v2,qQ,KQ,QQ,C7],styles:[`.grid-stack{position:relative}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0;top:0;width:var(--%NS%gs-column-width);height:var(--%NS%gs-cell-height)}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item{right:0}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--%NS%gs-item-margin-top);right:var(--%NS%gs-item-margin-right);bottom:var(--%NS%gs-item-margin-bottom);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;user-select:none;z-index:100}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center;z-index:101}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--%NS%gs-item-margin-top);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--%NS%gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--%NS%gs-item-margin-top);right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--%NS%gs-item-margin-bottom);right:var(--%NS%gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--%NS%gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--%NS%gs-item-margin-bottom);left:var(--%NS%gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--%NS%gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,right,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,right .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left 0s,right 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item[gs-x="0"]{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item[gs-x="0"]{right:0}.gs-print-show{display:none}@media print{@page gs-landscape{size:landscape}@page gs-portrait{size:portrait}.grid-stack{display:block!important;height:auto!important;position:static!important}.grid-stack>.grid-stack-item{display:block!important;float:left!important;position:static!important;height:auto!important;left:auto!important;top:auto!important;width:calc(100% * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important;break-inside:avoid!important;page-break-inside:avoid!important}.grid-stack>.grid-stack-item>.grid-stack-item-content{position:relative!important;height:auto!important;overflow:visible!important;white-space:normal!important;margin-top:var(--%NS%gs-item-margin-top)!important;margin-right:var(--%NS%gs-item-margin-right)!important;margin-bottom:var(--%NS%gs-item-margin-bottom)!important;margin-left:var(--%NS%gs-item-margin-left)!important;inset:auto!important}.gs-print-hide{display:none}.gs-print-show{display:block}.grid-stack>.grid-stack-item.gs-print-hide{display:none!important}.grid-stack>.grid-stack-item[gs-page-break=true],.grid-stack>.grid-stack-item[gs-print-orientation]{float:none!important;clear:both!important}.grid-stack>.grid-stack-item[gs-page-break=true]{page-break-before:always!important;break-before:page!important}.grid-stack>.grid-stack-item[gs-print-orientation=landscape]{page:gs-landscape;min-width:calc(100vmax * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important}.grid-stack>.grid-stack-item[gs-print-orientation=portrait]{page:gs-portrait;min-width:calc(100vmin * var(--%NS%gs-w)/ var(--%NS%gs-columns,12))!important}.grid-stack>.grid-stack-item>.ui-resizable-handle{display:none!important}}.grid-stack-placeholder{z-index:2;pointer-events:none}.grid-stack-placeholder .placeholder-content{border-radius:16px;height:calc(100% - 30px);top:calc(var(--%NS%gs-item-margin-top) * 2 - 2px)!important;width:calc(100% - 19px);left:8px!important;background:var(--%NS%sapContent_Selected_Hover_Background, #e3f0ff);border:1px solid var(--%NS%sapContent_DragAndDropActiveColor, #0064d9);z-index:2!important}mfp-dashboard,mfp-wc-dashboard{display:block;flex:1;margin:0;padding:0;min-height:100%;background-size:100% auto;background-position:top center;background-repeat:no-repeat;background-attachment:local}.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_XL, 3rem) - 10px);container-type:inline-size;container-name:mfp-dashboard}.mfp-dashboard.edit{padding-bottom:60px}.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item,.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item:focus,.mfp-dashboard.edit>.mfp-dashboard__busy gridstack>.grid-stack-item:focus-visible{outline:none!important;border:0!important;box-shadow:none!important}.mfp-sections-container{display:grid;grid-auto-rows:auto;align-content:start;gap:1rem;grid-template-columns:repeat(var(--%NS%dashboard-cols-xl, 14),1fr)}@container mfp-dashboard (max-width: 599px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-sm, 1),1fr)}}@container mfp-dashboard (min-width: 600px) and (max-width: 1023px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-md, 8),1fr)}}@container mfp-dashboard (min-width: 1024px) and (max-width: 1439px){.mfp-sections-container{grid-template-columns:repeat(var(--%NS%dashboard-cols-lg, 12),1fr)}}.mfp-dashboard__topbar{grid-column:1/-1;align-self:start;display:flex;flex-direction:column;gap:1rem;padding-bottom:3rem;width:100%;min-width:0}.mfp-dashboard__topbar-row{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:0 10px}.mfp-dashboard__header{display:flex;flex-direction:column;gap:.25rem}.mfp-dashboard__title-row{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.mfp-dashboard__unsaved-changes{display:inline-flex;align-items:center;gap:.375rem}.mfp-dashboard__unsaved-changes-icon{width:16px;height:16px;color:var(--%NS%sapContent_MarkerIconColor)}.mfp-dashboard__unsaved-changes-text{color:var(--%NS%sapContent_LabelColor);text-shadow:0 0 2px var(--%NS%sapContent_ContrastTextShadow, #fff);font-family:var(--%NS%sapFontFamily);font-size:var(--%NS%sapFontSize, 14px);font-style:normal;font-weight:400;line-height:normal}.mfp-dashboard__description{font-weight:400;font-family:var(--%NS%sapFontFamily)}.mfp-dashboard__description b,.mfp-dashboard__description strong{font-family:var(--%NS%sapFontBoldFamily)}.mfp-dashboard__toolbar{flex-shrink:0;display:flex;gap:.5rem}.mfp-dashboard__subheader{display:flex;align-items:center;gap:var(--%NS%sapShell_Space_S, 1rem)}.mfp-dashboard__busy{display:block;width:100%}.mfp-dashboard__busy-content{width:100%}.mfp-dashboard__busy-content--busy{min-height:60vh}.mfp-dashboard__empty{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:2rem 1rem 4rem;text-align:center}.mfp-dashboard__empty-illustration{width:320px;max-width:100%;aspect-ratio:320/240;background-image:var(--%NS%mfp-dashboard-empty-image, url("data:image/svg+xml;utf8,%3Csvg id='tnt-Scene-NoApplications' xmlns='http://www.w3.org/2000/svg' width='320' height='240' fill='none' viewBox='0 0 320 240'%3E%3Crect width='320' height='138' y='59' fill='%2389d1ff' rx='24'/%3E%3Cpath fill='%231b90ff' fill-rule='evenodd' d='m96.085 187.07 133.74-23.88c.83-.15.86-1.32.05-1.53l-83.86-20.89c-1-.25-2.05-.3-3.07-.14L37.355 156.9c-1.87.29-2.23 2.82-.51 3.62l56.21 26.14c.94.44 2.01.58 3.04.39l-.01.02Z' clip-rule='evenodd'/%3E%3Cpath fill='%230070f2' d='M234.425 39.1c.53-.03 1.07.07 1.57.25s.99.47 1.43.83c.44.36.82.79 1.12 1.27.31.49.54 1.03.68 1.6l2.49 10.83-161.93 9.75-2.09-12.04a4.21 4.21 0 0 1 .06-1.81 3.917 3.917 0 0 1 2.07-2.57c.52-.26 1.11-.42 1.76-.46l152.84-7.65Z'/%3E%3Cpath fill='%23ffffff' d='m79.775 63.63 161.92-9.74 20.81 90.49c.14.61.16 1.21.1 1.76-.07.55-.25 1.07-.51 1.52-.27.45-.61.83-1.03 1.11-.42.28-.9.47-1.45.54l-156.56 19.62c-.67.09-1.32.02-1.94-.15-.62-.17-1.21-.47-1.72-.88-.51-.4-.96-.88-1.31-1.45-.35-.57-.6-1.2-.71-1.88L79.785 63.63h-.01Z'/%3E%3Cpath fill='%2389d1ff' d='m95.125 73.19 43.77-2.41c.38-.02.76.03 1.12.14.36.11.69.29.99.51.3.22.55.49.76.79.21.3.34.64.41.99l7.57 38.85a2.51 2.51 0 0 1-.45 1.98c-.2.27-.47.5-.77.68-.3.18-.66.3-1.04.34l-43.82 5.29a3.685 3.685 0 0 1-2.41-.58c-.34-.22-.62-.5-.83-.82-.21-.32-.37-.68-.44-1.07l-7.46-41.74c-.07-.38-.05-.75.05-1.08.1-.33.27-.65.51-.92s.53-.49.88-.65c.35-.16.74-.27 1.16-.3Zm104.68-5.76 32.44-1.79c.28-.02.57.03.84.13s.53.25.76.44c.23.19.44.43.6.69.16.26.29.55.36.86l7.53 33.48c.07.32.08.62.04.91-.04.29-.14.55-.28.78-.14.23-.32.42-.54.57-.22.15-.48.24-.76.28l-32.34 3.91a2.504 2.504 0 0 1-1.8-.53c-.26-.2-.48-.44-.66-.71-.18-.27-.31-.58-.38-.92l-7.58-35.6c-.07-.32-.07-.64-.02-.93.05-.29.17-.55.33-.78.16-.23.37-.41.61-.55.24-.14.53-.22.84-.25l.01.01Zm-48.05 2.64 37.44-2.05c.33-.02.65.03.97.14.32.11.6.27.87.47.27.2.49.45.67.73.18.28.31.59.38.92l7.58 35.95c.07.34.07.67.01.98-.06.31-.18.6-.35.84-.17.24-.39.46-.65.62-.26.16-.56.27-.88.31l-37.4 4.52c-.38.04-.75 0-1.1-.09-.35-.09-.68-.26-.97-.46-.29-.2-.54-.47-.74-.76-.2-.29-.34-.63-.41-.98l-7.58-38.41c-.07-.35-.06-.69.01-1 .07-.31.21-.6.41-.84.2-.24.44-.45.73-.6.29-.15.62-.25.98-.27l.03-.02Z'/%3E%3Cpath fill='%2356bdff' d='M88.485 51.02c.51-.03 1.02.05 1.5.21.49.16.92.41 1.32.72s.73.69 1 1.12c.27.43.46.9.54 1.41.09.5.08.99-.04 1.44-.11.45-.31.86-.59 1.21-.28.35-.63.65-1.04.86-.41.21-.88.34-1.4.37-.51.03-1.02-.05-1.5-.21a4.23 4.23 0 0 1-1.32-.72c-.39-.31-.74-.69-1.01-1.12-.27-.43-.46-.9-.54-1.42-.09-.51-.07-1 .04-1.45.1-.45.31-.87.59-1.21.28-.34.63-.64 1.05-.86.42-.22.88-.34 1.4-.36v.01Z'/%3E%3Cpath fill='%230040b0' d='M103.065 168.93c-.67.08-1.32.02-1.94-.15-.62-.18-1.21-.48-1.72-.88s-.96-.88-1.31-1.46c-.35-.56-.6-1.2-.71-1.88L79.795 63.63l-2.09-12.04c-.06-.3-.08-.61-.07-.9 0-.29.05-.58.11-.86.07-.28.16-.54.28-.79.11-.25.27-.49.43-.7l-2.65 3.45c-.16.22-.3.45-.43.69-.11.25-.21.5-.28.78-.07.28-.1.55-.11.85 0 .29 0 .59.07.89l2.06 11.91 17.29 99.82c.11.68.36 1.3.7 1.86a5.4 5.4 0 0 0 1.29 1.44c.51.39 1.08.68 1.7.87.62.18 1.27.24 1.92.15l155.15-19.6 4.46-2.15-156.56 19.62v.01Z'/%3E%3Cpath fill='%23046c7c' d='m269.075 164.4-3.89 2.51s-.09.06-.13.08c-.04.02-.09.06-.12.08-.04.02-.09.06-.12.08-.04.02-.09.06-.13.08-.83.5-1.68.96-2.55 1.37-.87.41-1.77.76-2.7 1.08-.92.32-1.86.57-2.81.78-.96.21-1.94.37-2.92.47-.49.06-.99.1-1.48.13s-1 .04-1.5.05c-.5 0-1.01 0-1.52-.04s-1.02-.06-1.53-.12c-1.54-.15-3.07-.43-4.6-.81-1.52-.39-3.03-.89-4.5-1.5-1.47-.61-2.92-1.34-4.33-2.17-1.41-.83-2.77-1.76-4.07-2.79a36.883 36.883 0 0 1-3.7-3.36c-1.15-1.2-2.24-2.48-3.23-3.81-.99-1.33-1.89-2.75-2.7-4.2a37.21 37.21 0 0 1-2.12-4.52c-.61-1.55-1.1-3.12-1.48-4.71a34.17 34.17 0 0 1-.8-4.77c-.15-1.6-.19-3.17-.12-4.74.07-1.57.27-3.11.58-4.62.3-1.49.7-2.92 1.21-4.3s1.12-2.71 1.82-3.97c.7-1.26 1.49-2.45 2.38-3.56.89-1.11 1.85-2.15 2.91-3.1l3.43-3.1a26.29 26.29 0 0 0-5.33 6.73 28.19 28.19 0 0 0-3.04 8.35 32.074 32.074 0 0 0-.46 9.46c.15 1.61.42 3.22.81 4.82.39 1.6.89 3.19 1.49 4.76.62 1.57 1.33 3.09 2.14 4.56a38.822 38.822 0 0 0 5.99 8.11c1.17 1.22 2.42 2.35 3.74 3.39a36.466 36.466 0 0 0 8.49 5.03c1.49.63 3.01 1.13 4.55 1.53a31.16 31.16 0 0 0 6.19.95c.52.03 1.02.04 1.53.04s1.01-.02 1.52-.04 1-.07 1.5-.13c.99-.11 1.98-.27 2.95-.47.97-.2 1.92-.47 2.84-.78.93-.31 1.83-.68 2.72-1.08.89-.41 1.74-.87 2.57-1.38.05-.03.09-.06.13-.08.05-.02.09-.06.12-.08.04-.02.09-.06.12-.08.04-.02.09-.06.13-.09'/%3E%3Cpath fill='%230899a7' d='M267.365 111.939c1.68 1.36 3.24 2.86 4.66 4.48 1.42 1.62 2.7 3.35 3.83 5.16 1.13 1.82 2.1 3.73 2.9 5.71.8 1.97 1.44 4.02 1.89 6.1.33 1.56.56 3.11.67 4.67.11 1.56.13 3.1.02 4.61-.11 1.52-.31 3.03-.63 4.5-.32 1.47-.74 2.91-1.27 4.3a27.574 27.574 0 0 1-4.37 7.57c-.91 1.12-1.92 2.16-3.01 3.1-1.09.95-2.26 1.81-3.51 2.57a25.402 25.402 0 0 1-5.29 2.46c-.93.31-1.88.57-2.84.78-.96.21-1.95.37-2.95.47-.5.06-1 .1-1.5.12-.5.03-1.01.04-1.52.04s-1.02 0-1.53-.04c-.51-.03-1.03-.07-1.55-.12-1.55-.15-3.1-.43-4.64-.83-1.53-.4-3.06-.9-4.55-1.53a36.39 36.39 0 0 1-4.37-2.19c-1.42-.84-2.8-1.78-4.12-2.83a38.772 38.772 0 0 1-3.74-3.39 37.388 37.388 0 0 1-3.26-3.86c-.99-1.35-1.92-2.78-2.73-4.25-.81-1.47-1.53-3-2.14-4.57-.62-1.57-1.11-3.16-1.49-4.76-.38-1.6-.65-3.21-.81-4.82-.15-1.61-.19-3.2-.12-4.79.08-1.59.27-3.14.58-4.67.31-1.53.72-3.01 1.24-4.43s1.16-2.78 1.88-4.07c.72-1.3 1.55-2.51 2.48-3.65.93-1.14 1.93-2.2 3.02-3.15 1.09-.97 2.26-1.83 3.49-2.59a26.8 26.8 0 0 1 3.85-1.96c1.33-.55 2.72-.99 4.15-1.32 1.43-.33 2.88-.54 4.38-.64 2-.13 4.01-.05 6.01.23s3.98.75 5.93 1.41c1.95.66 3.85 1.5 5.69 2.52 1.84 1.03 3.61 2.21 5.3 3.58v.03l-.03.05Z'/%3E%3Cpath fill='%23ffffff' d='M248.495 118.529c.32-.02.64.02.95.12.31.1.6.27.85.47.25.2.48.46.66.74.18.28.31.6.38.94l2.62 12.86 12.14-1.04c.32-.03.64.02.94.12.3.1.59.26.84.46a2.943 2.943 0 0 1 1.04 1.68c.07.34.07.67.02.97-.05.3-.17.59-.33.83s-.37.45-.62.6c-.25.15-.54.25-.86.28l-12.15 1.08 2.65 13c.07.35.07.68.01.99-.06.31-.18.6-.35.85a2.066 2.066 0 0 1-1.52.9c-.33.03-.65 0-.96-.11-.31-.11-.6-.26-.86-.47-.26-.21-.49-.46-.67-.75a2.88 2.88 0 0 1-.38-.96l-2.63-13.04-12.41 1.1c-.33.03-.66-.01-.97-.12-.31-.11-.61-.26-.87-.47-.26-.21-.49-.46-.68-.75-.19-.29-.31-.61-.38-.96s-.07-.68 0-.99c.07-.31.19-.6.36-.84.17-.24.4-.45.66-.6.26-.15.56-.25.89-.28l12.4-1.07-2.61-12.9a2.315 2.315 0 0 1 .35-1.79 1.965 1.965 0 0 1 1.51-.85h-.02Z'/%3E%3C/svg%3E"));background-repeat:no-repeat;background-position:center;background-size:contain}.mfp-dashboard__empty-title{margin-top:1rem}.mfp-dashboard__empty-description{margin:0 0 1.5rem;color:var(--%NS%sapContent_LabelColor);font-family:var(--%NS%sapFontFamily);font-size:var(--%NS%sapFontSize, 14px)}.mfp-dashboard__edit-bar{position:sticky;bottom:var(--%NS%sapShell_Space_S, 1rem);margin:var(--%NS%sapShell_Space_S, 1rem) var(--%NS%sapShell_Space_S, 1rem) 0;z-index:1000;display:flex;justify-content:flex-end;align-items:center;gap:.5rem;padding:.5rem var(--%NS%sapShell_Space_S, 1rem);background:var(--%NS%sapPageFooter_Background, white);border-radius:var(--%NS%sapElement_BorderCornerRadius, 12px);box-shadow:var(--%NS%sapContent_Shadow1, 0 0 0 1px rgba(34, 53, 72, .48), 0 2px 8px 0 rgba(34, 53, 72, .3));box-sizing:border-box;overflow:hidden}@media screen and (min-width:0px)and (max-width:599px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_S, 1rem) - 10px)}}@media screen and (min-width:600px)and (max-width:1023px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_M, 2rem) - 10px)}}@media screen and (min-width:1024px)and (max-width:1439px){.mfp-dashboard{padding:calc(var(--%NS%sapShell_Space_L, 2rem) - 10px)}}.grid-stack.grid-stack-dragging,.grid-stack.grid-stack-dragging *{cursor:grabbing!important}.mfp-dashboard__drag-origin-placeholder{position:absolute;pointer-events:none;z-index:1}.mfp-dashboard__drag-origin-placeholder:after,.mfp-dashboard__drag-origin-placeholder .mfp-dashboard__drag-origin-content{height:calc(100% - 30px);top:calc(var(--%NS%gs-item-margin-top) * 2 - 2px)!important;width:calc(100% - 19px);left:8px!important;position:absolute;border-radius:16px}.mfp-dashboard__drag-origin-placeholder .mfp-dashboard__drag-origin-content{overflow:hidden}.mfp-dashboard__drag-origin-placeholder:after{content:"";background:var(--%NS%sapNeutralColor, #6a6d75);opacity:.3}.grid-stack:has(>.mfp-dashboard__drag-origin-placeholder)>.grid-stack-placeholder{visibility:hidden}gridstack{position:relative}.grid-stack:has(.ui-resizable-resizing),.grid-stack:has(.ui-resizable-resizing) *{cursor:nwse-resize!important}.grid-stack-item>.ui-resizable-handle{background-image:none!important}
|
|
129
129
|
`],encapsulation:2})});yT=class Jh{sanitizer=W(V_);transform(t){return t?this.sanitizer.sanitize(Ot.HTML,t)??"":""}static \u0275fac=function(t){return new(t||Jh)};static \u0275pipe=jG({name:"sanitizeHtml",type:Jh,pure:!0})},zJ=["*"],av=(()=>{class e{constructor(){this.accessibleDescription=E(),this.accessibleDescriptionRef=E(),this.accessibleName=E(),this.accessibleNameRef=E(),this.disabled=E(!1,{transform:Ne}),this.filter=E("None"),this.maxlength=E(),this.name=E(),this.noTypeahead=E(!1,{transform:Ne}),this.open=E(!1,{transform:Ne}),this.placeholder=E(),this.readonly=E(!1,{transform:Ne}),this.required=E(!1,{transform:Ne}),this.showClearIcon=E(!1,{transform:Ne}),this.showSuggestions=E(!1,{transform:Ne}),this.type=E("Text"),this.value=E(""),this.valueState=E("None"),this.ui5Change=ue(),this.ui5Close=ue(),this.ui5Input=ue(),this.ui5Open=ue(),this.ui5Select=ue(),this.ui5SelectionChange=ue(),this.slots=[{name:"default",description:"Defines the suggestion items.\n\n**Note:** The suggestions would be displayed only if the `showSuggestions`\nproperty is set to `true`.\n\n**Note:** The `<ui5-suggestion-item>`, `<ui5-suggestion-item-group>` and `ui5-suggestion-item-custom` are recommended to be used as suggestion items.\n\n**Note:** Input with type `Number` does not support suggestions."},{name:"icon",description:"Defines the icon to be displayed in the component."},{name:"valueStateMessage",description:"Defines the value state message that will be displayed as pop up under the component.\nThe value state message slot should contain only one root element.\n\n**Note:** If not specified, a default text (in the respective language) will be displayed.\n\n**Note:** The `valueStateMessage` would be displayed,\nwhen the component is in `Information`, `Critical` or `Negative` value state.\n\n**Note:** If the component has `suggestionItems`,\nthe `valueStateMessage` would be displayed as part of the same popover, if used on desktop, or dialog - on phone.",since:"1.0.0-rc.6"}],this.elementRef=W(f1),this.injector=W(g1),this._contentDensityObserver=W(dt)}get element(){return this.elementRef.nativeElement}ngAfterViewInit(){let i=this.element;for(let o of["accessibleDescription","accessibleDescriptionRef","accessibleName","accessibleNameRef","disabled","filter","maxlength","name","noTypeahead","open","placeholder","readonly","required","showClearIcon","showSuggestions","type","value","valueState"]){let a=o.replace(/-./g,n=>n[1].toUpperCase());this[a]&&typeof this[a]=="function"&&ct(this.injector,()=>{l1(()=>{let n=this[a]();if(i){if(n===void 0&&i[o])return;i[o]=n}})})}for(let o of["ui5Change","ui5Close","ui5Input","ui5Open","ui5Select","ui5SelectionChange"]){let a=o.replace("ui5","").replace(/([A-Z])/g,"-$1").toLowerCase().substring(1);this[o]&&typeof this[o].emit=="function"&&i.addEventListener&&i.addEventListener(a,n=>{this[o].emit(n)})}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=e1({type:e,selectors:[["ui5-input"],["","ui5-input",""]],inputs:{accessibleDescription:[1,"accessibleDescription"],accessibleDescriptionRef:[1,"accessibleDescriptionRef"],accessibleName:[1,"accessibleName"],accessibleNameRef:[1,"accessibleNameRef"],disabled:[1,"disabled"],filter:[1,"filter"],maxlength:[1,"maxlength"],name:[1,"name"],noTypeahead:[1,"noTypeahead"],open:[1,"open"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],required:[1,"required"],showClearIcon:[1,"showClearIcon"],showSuggestions:[1,"showSuggestions"],type:[1,"type"],value:[1,"value"],valueState:[1,"valueState"]},outputs:{ui5Change:"ui5Change",ui5Close:"ui5Close",ui5Input:"ui5Input",ui5Open:"ui5Open",ui5Select:"ui5Select",ui5SelectionChange:"ui5SelectionChange"},exportAs:["ui5Input"],features:[V1([Ct({supportedContentDensity:[ye.COMPACT,ye.COZY]}),{provide:Q8,useValue:{property:"value",events:["change","input"],transformValue:i=>i||""}}]),L_([ev])],ngContentSelectors:zJ,decls:1,vars:0,template:function(i,o){i&1&&(X1(),U1(0))},encapsulation:2})}}return e})();jJ=class eu{open=E(!1);config=E(void 0);confirmed=ue();cancelled=ue();confirmationControl=new Ja("",{nonNullable:!0});requiresConfirmation=fe(()=>!!this.config()?.confirmationText);status=tK(this.confirmationControl.statusChanges,{initialValue:this.confirmationControl.status});confirmDisabled=fe(()=>(this.status(),this.requiresConfirmation()?this.confirmationControl.invalid:!1));constructor(){l1(()=>{this.open()||this.confirmationControl.reset()}),l1(()=>{this.config()?.confirmationText?this.confirmationControl.setValidators([this.matchValidator()]):this.confirmationControl.setValidators([]),this.confirmationControl.updateValueAndValidity()})}onConfirm(){this.confirmationControl.invalid||this.confirmed.emit()}matchValidator(){let t=this.config()?.confirmationText?.trim().toLowerCase();return i=>(i.value??"").trim().toLowerCase()===t?null:{confirmationMismatch:!0}}static \u0275fac=function(t){return new(t||eu)};static \u0275cmp=e1({type:eu,selectors:[["mfp-delete-confirmation-dialog"]],inputs:{open:[1,"open"],config:[1,"config"]},outputs:{confirmed:"confirmed",cancelled:"cancelled"},decls:12,vars:9,consts:[["data-testid","generic-table-card-delete-dialog",3,"ui5BeforeClose","accessibleName","open"],["slot","header",1,"dialog__header"],["design","Critical","name","alert",1,"dialog__header-icon"],["level","H5"],[3,"innerHTML"],[1,"dialog__body"],["slot","footer",1,"dialog__footer"],["data-testid","generic-table-card-delete-confirm","design","Negative",3,"click","disabled"],["data-testid","generic-table-card-delete-cancel","design","Transparent",3,"click"],[1,"dialog__message",3,"innerHTML"],[1,"dialog__message"],["data-testid","generic-table-card-delete-confirmation-input",1,"dialog__confirmation-input",3,"formControl","placeholder","valueState"]],template:function(t,i){t&1&&($(0,"ui5-dialog",0),we("ui5BeforeClose",function(){return i.cancelled.emit()}),$(1,"div",1),M1(2,"ui5-icon",2),$(3,"ui5-title",3),M1(4,"span",4),D_(5,"sanitizeHtml"),K()(),ze(6,$J,3,2,"div",5),$(7,"div",6)(8,"ui5-button",7),we("click",function(){return i.onConfirm()}),Me(9),K(),$(10,"ui5-button",8),we("click",function(){return i.cancelled.emit()}),Me(11),K()()()),t&2&&(pe("accessibleName",i.config()?.title??"Confirm Delete")("open",i.open()),N(4),pe("innerHTML",O_(5,7,i.config()?.title??"Confirm Delete"),y4),N(2),Fe(i.config()?.message||i.requiresConfirmation()?6:-1),N(2),pe("disabled",i.confirmDisabled()),N(),y0(" ",i.config()?.confirmLabel??"Delete"," "),N(2),y0(" ",i.config()?.cancelLabel??"Cancel"," "))},dependencies:[I4,C7,lo,av,v2,J_,rT,Q_,yT],styles:[`:host{display:contents}.dialog__header{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem}.dialog__header-icon{color:var(--%NS%sapCriticalColor)}.dialog__body{margin:-1rem;min-width:320px;padding:1rem}.dialog__message{margin:0;font-size:.875rem;max-width:320px}.dialog__message--critical{color:var(--%NS%sapCriticalElementColor)}.dialog__confirmation-input{display:block;width:100%;max-width:320px}.dialog__footer{display:flex;justify-content:space-between;align-items:center;gap:.5rem;padding:.5rem 1rem;margin:0 -1rem;width:100%}
|
|
130
130
|
`],encapsulation:3})},WJ=new Set(["__proto__","prototype","constructor"]);J("add",{pathData:"M0 7.429c0-.167.06-.304.179-.411a.575.575 0 0 1 .392-.16h6.286V.57c0-.166.06-.303.179-.41A.575.575 0 0 1 7.429 0H8.57c.381 0 .572.19.572.571v6.286h6.286c.38 0 .571.19.571.572V8.57c0 .381-.19.572-.571.572H9.143v6.286c0 .38-.19.571-.572.571H7.43a.575.575 0 0 1-.393-.16.528.528 0 0 1-.179-.411V9.143H.571a.575.575 0 0 1-.392-.16A.528.528 0 0 1 0 8.57V7.43Z",ltr:!1,viewBox:"0 0 16 16",accData:hy,collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});J("add",{pathData:"M8 1a.75.75 0 0 1 .75.75v5.5h5.5a.75.75 0 0 1 0 1.5h-5.5v5.5a.75.75 0 0 1-1.5 0v-5.5h-5.5a.75.75 0 0 1 0-1.5h5.5v-5.5A.75.75 0 0 1 8 1Z",ltr:!1,viewBox:"0 0 16 16",accData:hy,collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});J("delete",{pathData:"M14.984 3.01v1.03h-.998l-.997 10.946c0 .665-.333.998-.998.998H4.009c-.665 0-.997-.333-.997-.998L2.014 4.039h-.998V3.01h13.968ZM4.01 14.986h7.982l.998-10.947H3.012l.997 10.947ZM1.016 2.012v-.998h4.521l.031-.156a.81.81 0 0 1 .187-.343 1.46 1.46 0 0 1 .452-.343c.198-.104.463-.156.795-.156H9.03c.312 0 .618.078.92.234.301.156.483.41.545.764h4.49v.998H1.016ZM7.44 12.99V5.973H8.5v7.017H7.44Zm2.214-.062.623-6.986 1.03.093-.624 6.986-1.03-.093ZM4.695 6.035l.967-.093.623 6.986-.966.093-.624-6.986Z",ltr:!1,viewBox:"0 0 16 16",accData:py,collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});J("delete",{pathData:"M10.25 0C11.216 0 12 .784 12 1.75V3.5h2.25a.75.75 0 0 1 0 1.5h-.75v9.25A1.75 1.75 0 0 1 11.75 16h-7.5a1.75 1.75 0 0 1-1.741-1.571L2.5 5h-.75a.75.75 0 0 1 0-1.5H4V1.75C4 .784 4.784 0 5.75 0h4.5ZM4.005 14.3a.25.25 0 0 0 .245.2h7.5a.25.25 0 0 0 .25-.25V5H4l.005 9.3ZM6.25 7a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 6.25 7Zm3.5 0a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 9.75 7Zm-4-5.5a.25.25 0 0 0-.25.25V3.5h5V1.75a.25.25 0 0 0-.25-.25h-4.5Z",ltr:!1,viewBox:"0 0 16 16",accData:py,collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});J("navigation-down-arrow",{pathData:"M13.285 4.277A.958.958 0 0 1 13.987 4c.28 0 .514.092.701.277a.967.967 0 0 1 .312.708.967.967 0 0 1-.312.707L8.67 11.754a.727.727 0 0 0-.156.092.367.367 0 0 0-.077.046.363.363 0 0 1-.078.046c-.125.041-.24.062-.343.062a.219.219 0 0 1-.094-.015.14.14 0 0 0-.062-.016.44.44 0 0 1-.297-.092 1.023 1.023 0 0 0-.109-.062c-.02-.02-.036-.03-.046-.03-.01 0-.026-.01-.047-.031-.021-.02-.042-.03-.063-.03L1.312 5.691A.967.967 0 0 1 1 4.985c0-.267.104-.503.312-.708A.959.959 0 0 1 2.013 4c.281 0 .515.092.702.277l4.802 4.77a.889.889 0 0 0 .997 0l4.771-4.77Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});J("navigation-down-arrow",{pathData:"M3.235 5.205a.75.75 0 0 0-.03 1.06l4.247 4.5a.75.75 0 0 0 1.09 0l4.253-4.5a.75.75 0 1 0-1.09-1.03L7.997 9.157 4.295 5.235a.75.75 0 0 0-1.06-.03Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});rv="navigation-down-arrow";J("navigation-right-arrow",{pathData:"M9.25 8.373c.23-.249.23-.487 0-.715L4.344 2.71a.982.982 0 0 1-.313-.715c0-.27.104-.498.313-.685A.892.892 0 0 1 5.03 1c.271 0 .51.104.719.311l5.969 6.005c.187.186.281.42.281.7a.95.95 0 0 1-.281.7l-6 5.973A.99.99 0 0 1 5 15a.99.99 0 0 1-.719-.311.948.948 0 0 1-.281-.7.95.95 0 0 1 .281-.7L9.25 8.373Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v4",packageName:"@ui5/webcomponents-icons"});J("navigation-right-arrow",{pathData:"M5.205 3.235a.75.75 0 0 1 1.06-.03l4.5 4.247a.75.75 0 0 1 0 1.09l-4.5 4.253a.75.75 0 1 1-1.03-1.09l3.922-3.708-3.922-3.702a.75.75 0 0 1-.03-1.06Z",ltr:!1,viewBox:"0 0 16 16",collection:"SAP-icons-v5",packageName:"@ui5/webcomponents-icons"});a8="navigation-right-arrow";KJ=class tu{fields=E.required();label=E.required();initialEntries=E([]);valueChange=ue();entries=z6(()=>[...this.initialEntries()??[]]);expandedIndex=z6({source:this.initialEntries,computation:()=>null});previewFor(t,i){for(let o of this.fields()){let a=t[o.name];if(a!=null&&String(a).trim()!=="")return`${o.label??o.name}: ${String(a)}`}return`${this.label().trim()||"Item"} ${i+1}`}toggle(t){this.expandedIndex.set(this.expandedIndex()===t?null:t)}add(){let t=[...this.entries(),{}];this.entries.set(t),this.expandedIndex.set(t.length-1),this.valueChange.emit(t)}remove(t){let i=this.entries().filter((a,n)=>n!==t);this.entries.set(i);let o=this.expandedIndex();o===t?this.expandedIndex.set(null):o!==null&&o>t&&this.expandedIndex.set(o-1),this.valueChange.emit(i)}onEntryValueChange(t,i){let o=this.entries().map((a,n)=>n===t?X({},i):a);this.entries.set(o),this.valueChange.emit(o)}static \u0275fac=function(t){return new(t||tu)};static \u0275cmp=e1({type:tu,selectors:[["mfp-form-collection-field"]],inputs:{fields:[1,"fields"],label:[1,"label"],initialEntries:[1,"initialEntries"]},outputs:{valueChange:"valueChange"},decls:4,vars:0,consts:[["data-testid","collection-field",1,"collection"],[1,"card",3,"card--expanded"],["accessibleName","Add","data-testid","collection-add","design","Transparent","icon","add",1,"collection__add",3,"click"],[1,"card"],["type","button",1,"card__header",3,"click"],[1,"card__chevron",3,"name"],[1,"card__preview"],[1,"card__spacer"],["accessibleName","Remove","design","Transparent","icon","delete","tooltip","Remove",1,"card__action",3,"click"],[1,"card__body"],[3,"formValueChange","fields","initialValues"]],template:function(t,i){t&1&&($(0,"div",0),G0(1,XJ,8,9,"div",1,T_),$(3,"ui5-button",2),we("click",function(){return i.add()}),K()()),t&2&&(N(),q0(i.entries()))},dependencies:()=>[lo,v2,nv],styles:[`:host{display:block;width:100%}.collection{display:flex;flex-direction:column;gap:.5rem;width:100%;padding-top:.25rem}.card{border:1px solid var(--%NS%sapGroup_ContentBorderColor, #d9d9d9);border-radius:.5rem;background:var(--%NS%sapGroup_TitleBackground, #fff);overflow:hidden}.card--expanded{box-shadow:var(--%NS%sapContent_Shadow0, 0 1px 2px rgba(0, 0, 0, .04))}.card__header{display:flex;align-items:center;gap:.5rem;width:100%;padding:0 .75rem;background:transparent;border:0;text-align:left;cursor:pointer;font:inherit;min-height:1.5rem;color:var(--%NS%sapTextColor, #1d2d3e)}.card__header:hover{background:var(--%NS%sapList_Hover_Background, rgba(0, 0, 0, .03))}.card__chevron{flex:0 0 auto;color:var(--%NS%sapContent_IconColor, #6a6d70)}.card__preview{font-weight:500;color:var(--%NS%sapTextColor, #1d2d3e);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card__spacer{flex:1}.card__action{flex:0 0 auto}.card__body{padding:.75rem 1rem 1rem;border-top:1px solid var(--%NS%sapGroup_ContentBorderColor, #d9d9d9)}.collection__add{align-self:flex-start;color:var(--%NS%sapButton_IconColor, #0070f2)}
|
|
131
131
|
`],encapsulation:3})},YJ=["*"],QJ=(()=>{class e{constructor(){this.for=E(),this.required=E(!1,{transform:Ne}),this.showColon=E(!1,{transform:Ne}),this.wrappingType=E("Normal"),this.slots=[{name:"default",description:`Defines the text of the component.
|