layerpro 4.0.0 → 4.1.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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- ;(()=>{if(typeof document==="undefined"||document.querySelector("style[data-layerpro-styles]"))return;const s=document.createElement("style");const n=globalThis.__layerproNonce||globalThis.layerpro?.nonce||document.querySelector("style[nonce],script[nonce]")?.nonce||document.body?.dataset?.nonce;if(n)s.setAttribute("nonce",n);s.setAttribute("data-layerpro-styles","");s.textContent=":root{--input-background-color:#444;--input-color:white;--button-background-color:#444;--button-color:white;--inputButton-fontSize:.8em;--resize-background-color:rgba(30,150,255,.5);--resize-shadow:0 0 10px rgba(30,150,255,.5);--dock-background-color:black;--dock-height:40px;--dock-sideLeft:10px;--dock-sideCenter:auto;--dock-sideRight:10px;--dock-icon-width:140px;--bar-background:linear-gradient( 45deg,#4a4a4f 60%,#AAA 100%);--bar-selected-background:linear-gradient( 45deg,#162858 60%,#224e918a 100%);--bar-color:#eee;--bar-border-bottom:2px solid #555;--bar-shadow:0 1px 1px #888;--window-background:gray;--window-shadow:0 0 10px rgba(0,0,0,.3);--window-border-radius:10px;--window-z-high-border:#278ed0;--window-z-high-shadow:0 0 15px rgba(0,0,0,.7);--internal-background:linear-gradient( 0deg,rgba(60,60,60,1) 0%,#4a4a4f 100%);--body-color:#eee;--body-background:transparent;--modal-background:rgba(0,0,0,.3);--popup-z-index:1000;--transition-time:.5s;--border-radius:25px;--corner-size:14px;--corner-border-radius:50%;--hover-opacity:1;--hover-filter:blur(3px);}#popup > [class^=popup_overflow],#popup > [class^=popup_bar_],#popup > [class^=popup_window_],#popup > [class^=popup_internal],#popup > [class^=popup_body]{position:static;}#popup > [class^=popup_overflow],#popup > [class^=popup_bar_],#popup > [class^=popup_window_],#popup > [class^=popup_internal],#popup > [class^=popup_body],#popup,#popup_dock{will-change:transform,opacity,top,left,height,width;}#popup{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;}#popup .buttons{display:flex;position:absolute;left:0;right:0;bottom:0;height:40px;justify-content:space-evenly;align-items:center;}#popup .buttons button{all:unset;width:100%;height:100%;border-right:2px solid #636363;background:linear-gradient( 180deg,#000 0%,rgb(60,60,60) 100%);overflow:hidden;position:relative;color:var(--button-color);}#popup .buttons button:last-child{border-right:none;}#popup .buttons button img{filter:invert(1);opacity:0.5;width:15px;height:auto;margin-top:2px;}#popup .buttons button:hover{transition:all 0.3s ease;box-shadow:inset 0 0 5px rgb(0,0,0);text-shadow:0 0 15px rgb(255,255,255),0 0 3px rgb(255,255,255);}#popup .popup_bar_selected{background:var(--bar-selected-background) !important;}#popup .zHigh{border-top-color:var(--window-z-high-border) !important;box-shadow:var(--window-z-high-shadow) !important;border:1px solid rgba(0,0,0,0.05);}#popup [class*=popup_modal_]{position:absolute;inset:0;width:100%;height:100%;background-color:var(--modal-background);z-index:1;}#popup [class*=popup_window_]{position:absolute;inset:0;width:100%;height:100%;z-index:2;border-radius:var(--window-border-radius);box-shadow:var(--window-shadow);overflow:hidden;}#popup [class*=popup_overflow_]{position:absolute;inset:auto;z-index:3;border-radius:var(--window-border-radius);background:var(--window-background);}#popup .popup_bar,#popup [class*=popup_bar_]{display:flex;width:100%;height:36px;background:var(--bar-background);border-bottom:var(--bar-border-bottom);box-shadow:var(--bar-shadow);z-index:2;}#popup [class*=popup_drag_]{width:100%;padding:10px 0 0 10px;color:var(--bar-color);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}#popup [class*=popup_icon_]{padding:8px 0 0 10px;color:var(--bar-color);font-size:1.1em;}#popup [class*=popup_option_]{display:flex;margin-right:15px;}#popup [class*=popup_option_] button{position:relative;display:inline-block;width:36px;height:28px;color:white;border-radius:5px;margin:4px;transition:all 0.3s ease;background:transparent;}#popup [class*=popup_option_] button img{filter:invert(1);opacity:0.5;width:15px;height:auto;margin-top:2px;}#popup [class*=popup_option_] button:after{content:\"\";inset:0;display:block;position:absolute;background:linear-gradient( 180deg,#000 0%,rgb(60,60,60) 100%);border-radius:5px;z-index:-1;}#popup [class*=popup_option_] button:after{opacity:0;transition:opacity 0.3s ease-in-out;}#popup [class*=popup_option_] button:hover{background:rgba(255,255,255,0.1);box-shadow:inset 0 0 5px rgb(0,0,0);text-shadow:0 0 15px rgb(255,255,255),0 0 3px rgb(255,255,255);}#popup [class*=popup_option_] button:hover::after{opacity:1;}#popup [class*=popup_option_] button [class*=button_close_]:hover{background:rgb(255,0,0) !important;box-shadow:inset 0 0 25px rgb(255,255,255),0 0 35px rgb(255,0,0) !important;}#popup [class*=button_close_]:hover{background:rgb(255,0,0) !important;box-shadow:inset 0 0 25px rgb(255,255,255),0 0 35px rgb(255,0,0) !important;}#popup [class*=popup_internal_]{position:absolute;inset:37px 0 0 0;z-index:1;background:var(--internal-background);}#popup .popup_body,#popup [class*=popup_body_]{position:absolute;inset:0;color:var(--body-color);background:var(--body-background);text-align:center;}.popupMaxSize{position:absolute !important;width:100% !important;height:100% !important;inset:0 !important;margin:0 !important;padding:0 !important;border-radius:0 !important;}#popup_dock{position:absolute;bottom:0;left:0;right:0;height:var(--dock-height);background-color:var(--dock-background-color);border-top:1px solid rgba(255,255,255,0.521);}#popup_dock #popup_dock_icon{position:absolute;top:3px;left:3px;width:70px;height:var(--dock-height);}#popup_dock #popup_dock_list{position:absolute;top:3px;left:var(--dock-sideLeft);right:var(--dock-sideLeft);height:calc(var(--dock-height) - 5px);overflow-y:auto;text-align:right;display:flex;flex-direction:row;justify-content:flex-end;height:30px;}#popup_dock #popup_dock_list [class^=icon_]{width:var(--dock-icon-width);float:left;padding:4px;color:white;margin:2px 3px 0 0;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;filter:saturate(400%);}#popup_dock #popup_dock_list [class^=icon_]:hover{background-color:rgb(77,77,77);}#popup_dock #popup_dock_list [class^=icon_] span:nth-child(1){width:20%;text-align:center;color:#F60;}#popup_dock #popup_dock_list [class^=icon_] span:nth-child(2){width:80%;text-align:left;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}#popup_dock #popup_dock_list [class^=icon_] button{width:20px;height:20px;color:white;padding:4px;margin:0;display:flex;align-content:center;justify-content:center;font-size:0.7em;border:none;background:none;}#popup_dock #popup_dock_options{position:absolute;top:3px;right:10px;width:var(--dock-sideRight);height:var(--dock-height);}#popup .iconize:before,#popup .maximize:before,#popup .close:before{content:\"\";position:absolute;inset:0;background-repeat:no-repeat !important;background-position:center !important;background-size:50% !important;filter:invert(1);opacity:0.5;margin:0;padding:0;}#popup .iconize:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMjAiCiAgIGhlaWdodD0iMjAiCiAgIHZpZXdCb3g9IjAgMCA1LjI5MTY2NjUgNS4yOTE2NjY4IgogICB2ZXJzaW9uPSIxLjEiCiAgIGlkPSJzdmczNzY4IgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjEuMSAoM2JmNWFlMGQyNSwgMjAyMS0wOS0yMCkiCiAgIHNvZGlwb2RpOmRvY25hbWU9Imljb25pemUuc3ZnIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1y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c3ZnK3htbDwvZGM6Zm9ybWF0PgogICAgICAgIDxkYzp0eXBlCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4KICAgICAgPC9jYzpXb3JrPgogICAgPC9yZGY6UkRGPgogIDwvbWV0YWRhdGE+CiAgPGcKICAgICBpbmtzY2FwZTpsYWJlbD0iTGF5ZXIgMSIKICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIgogICAgIGlkPSJsYXllcjEiCiAgICAgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCwtMjkxLjcwODMyKSI+CiAgICA8cmVjdAogICAgICAgcnk9IjAuNjk5MTc0MjMiCiAgICAgICB5PSIyOTMuNjkyNzgiCiAgICAgICB4PSIwLjI3NDg0NjczIgogICAgICAgaGVpZ2h0PSIxLjM5ODM0ODUiCiAgICAgICB3aWR0aD0iNC43NjI0OTk4IgogICAgICAgaWQ9InJlY3QzNzM2LTciCiAgICAgICBzdHlsZT0iZmlsbDojMDAwMDAwO3N0cm9rZS13aWR0aDowLjEzMjk5MTg1IiAvPgogIDwvZz4KPC9zdmc+Cg==) !important;}#popup .maximize:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMjAiCiAgIGhlaWdodD0iMjAiCiAgIHZpZXdCb3g9IjAgMCA1LjI5MTY2NjUgNS4yOTE2NjY4IgogICB2ZXJzaW9uPSIxLjEiCiAgIGlkPSJzdmczNzY4IgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjEuMSAoM2JmNWFlMGQyNSwgMjAyMS0wOS0yMCkiCiAgIHNvZGlwb2RpOmRvY25hb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CIKICAgICBpbmtzY2FwZTp3aW5kb3ctaGVpZ2h0PSIxMDI3IgogICAgIGlua3NjYXBlOndpbmRvdy14PSItOCIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpwYWdlY2hlY2tlcmJvYXJkPSIwIiAvPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTM3NjUiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxnCiAgICAgaW5rc2NhcGU6bGFiZWw9IkxheWVyIDEiCiAgICAgaW5rc2NhcGU6Z3JvdXBtb2RlPSJsYXllciIKICAgICBpZD0ibGF5ZXIxIgogICAgIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTI5MS43MDgzMikiPgogICAgPHJlY3QKICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjAuMTQ3MDQ1NCIKICAgICAgIGlkPSJyZWN0MzczMiIKICAgICAgIHdpZHRoPSI0Ljc2MjQ5OTgiCiAgICAgICBoZWlnaHQ9IjQuNzYyNDk5OCIKICAgICAgIHg9IjAuMjkxODUyNTMiCiAgICAgICB5PSIyOTIuMDEwNDQiCiAgICAgICByeT0iMC42NjcxMjEyMyIgLz4KICA8L2c+Cjwvc3ZnPgo=) !important;}#popup .close:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlb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LjEzMjY5LC0wLjEzMjY5IC0wLjMwNTgzLC0wLjE5OTI3IC0wLjQ3ODk4OTk1LC0wLjE5OTI3IHoiCiAgICAgICBpZD0icmVjdDM3MTUiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIiAvPgogIDwvZz4KPC9zdmc+Cg==) !important;}#popup > input,#popup > button,#popup > textarea,#popup > select{all:unset;}.popup_alert,.popup_message,.popup_prompt,.popup_confirm{height:calc(100% - 41px);box-shadow:0 1px 1px #888;overflow:auto;padding:20px;word-break:break-all;}.popup_alert input[type=text],.popup_message input[type=text],.popup_prompt input[type=text],.popup_confirm input[type=text]{position:relative;width:90%;height:35px;padding:5px;font-size:1.05em;border:2px solid rgba(0,0,0,0.3);border-radius:6px;color:#ddd;background-color:#4a4a4f;}.popup_window___alert #a___alert,.popup_window___alert #a___message,.popup_window___message #a___alert,.popup_window___message #a___message{width:100% !important;}.popup_window___prompt #a___alert,.popup_window___prompt #b___alert,.popup_window___prompt #a___message,.popup_window___prompt #b___message,.popup_window___confirm #a___alert,.popup_window___confirm #b___alert,.popup_window___confirm #a___message,.popup_window___confirm #b___message{width:50% !important;}.resize_0,.resize_1,.resize_2,.resize_3{position:absolute;background-color:var(--resize-background-color);border-radius:var(--border-radius);opacity:0;z-index:5000;transition:var(--transition-time);}.resize_0{top:-4px;left:0;width:100%;height:10px;cursor:n-resize;}.resize_1{top:0;right:-4px;width:10px;height:100%;cursor:e-resize;}.resize_2{bottom:-4px;left:0;width:100%;height:10px;cursor:n-resize;}.resize_3{top:0;left:-4px;width:10px;height:100%;cursor:e-resize;}.resize_corner_0,.resize_corner_1,.resize_corner_2,.resize_corner_3{position:absolute;background-color:var(--resize-background-color);border-radius:var(--border-radius);opacity:0;z-index:5000;transition:var(--transition-time);width:var(--corner-size);height:var(--corner-size);border-radius:var(--corner-border-radius);}.resize_corner_0{top:-4px;left:-4px;cursor:nw-resize;}.resize_corner_1{top:-4px;right:-4px;cursor:ne-resize;}.resize_corner_2{bottom:-4px;right:-4px;cursor:nw-resize;}.resize_corner_3{bottom:-4px;left:-4px;cursor:ne-resize;}.resize_0:hover,.resize_1:hover,.resize_2:hover,.resize_3:hover,.resize_corner_0:hover,.resize_corner_1:hover,.resize_corner_2:hover,.resize_corner_3:hover{opacity:var(--hover-opacity);filter:var(--hover-filter);box-shadow:var(--resize-shadow);transition:var(--transition-time);}#popup{}#popup::-webkit-scrollbar{width:10px;scroll-behavior:smooth;}#popup{}#popup::-webkit-scrollbar-track{-webkit-border-radius:2px;border-radius:2px;margin:5px;}#popup{}#popup::-webkit-scrollbar-thumb{-webkit-border-radius:2px;border-radius:2px;background:rgb(30,150,255) !important;}";document.head.appendChild(s)})();var e = Object.defineProperty, t = (t, o, n) => ((t, o, n) => o in t ? e(t, o, {
1
+ ;(()=>{if(typeof document==="undefined"||document.querySelector("style[data-layerpro-styles]"))return;const s=document.createElement("style");const n=globalThis.__layerproNonce||globalThis.layerpro?.nonce||document.querySelector("style[nonce],script[nonce]")?.nonce||document.body?.dataset?.nonce;if(n)s.setAttribute("nonce",n);s.setAttribute("data-layerpro-styles","");s.textContent="@layer layerpro{:root{--input-background-color:#444;--input-color:white;--button-background-color:#444;--button-color:white;--inputButton-fontSize:.8em;--resize-background-color:rgba(30,150,255,.5);--resize-shadow:0 0 10px rgba(30,150,255,.5);--dock-background-color:black;--dock-height:40px;--dock-sideLeft:10px;--dock-sideCenter:auto;--dock-sideRight:10px;--dock-icon-width:140px;--bar-background:linear-gradient( 45deg,#4a4a4f 60%,#AAA 100%);--bar-selected-background:linear-gradient( 45deg,#162858 60%,#224e918a 100%);--bar-color:#eee;--bar-border-bottom:2px solid #555;--bar-shadow:0 1px 1px #888;--window-background:gray;--window-shadow:0 0 10px rgba(0,0,0,.3);--window-border-radius:10px;--window-z-high-border:#278ed0;--window-z-high-shadow:0 0 15px rgba(0,0,0,.7);--internal-background:linear-gradient( 0deg,rgba(60,60,60,1) 0%,#4a4a4f 100%);--body-color:#eee;--body-background:transparent;--modal-background:rgba(0,0,0,.3);--popup-z-index:1000;--transition-time:.5s;--border-radius:25px;--corner-size:14px;--corner-border-radius:50%;--hover-opacity:1;--hover-filter:blur(3px);}}@layer layerpro{#popup > [class^=popup_overflow],#popup > [class^=popup_bar_],#popup > [class^=popup_window_],#popup > [class^=popup_internal],#popup > [class^=popup_body]{position:static;}#popup > [class^=popup_overflow],#popup > [class^=popup_bar_],#popup > [class^=popup_window_],#popup > [class^=popup_internal],#popup > [class^=popup_body],#popup,#popup_dock{will-change:transform,opacity,top,left,height,width;}#popup{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none;z-index:var(--lp-z-index,1001);}#popup .buttons{display:flex;position:absolute;left:0;right:0;bottom:0;height:40px;justify-content:space-evenly;align-items:center;text-align:center;}#popup .buttons button{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-right:2px solid #636363;background:linear-gradient( 180deg,#000 0%,rgb(60,60,60) 100%);overflow:hidden;position:relative;color:var(--button-color);}#popup .buttons button:last-child{border-right:none;}#popup .buttons button img{filter:invert(1);opacity:0.5;width:15px;height:auto;margin-top:2px;}#popup .buttons button:hover{transition:all 0.3s ease;box-shadow:inset 0 0 5px rgb(0,0,0);text-shadow:0 0 15px rgb(255,255,255),0 0 3px rgb(255,255,255);}#popup .popup_bar_selected{background:var(--bar-selected-background) !important;}#popup .zHigh{border-top-color:var(--window-z-high-border) !important;box-shadow:var(--window-z-high-shadow) !important;border:1px solid rgba(0,0,0,0.05);}#popup [class*=popup_modal_]{position:absolute;inset:0;width:100%;height:100%;background-color:var(--modal-background);pointer-events:auto;z-index:var(--lp-z-index,1);}#popup [class*=popup_window_]{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:auto;border-radius:var(--window-border-radius);box-shadow:var(--window-shadow);overflow:hidden;}#popup [class*=popup_overflow_]{position:absolute;inset:auto;top:var(--lp-top,auto);left:var(--lp-left,auto);right:var(--lp-right,auto);bottom:var(--lp-bottom,auto);width:var(--lp-width,auto);height:var(--lp-height,auto);min-width:var(--lp-min-width,auto);min-height:var(--lp-min-height,auto);max-width:var(--lp-max-width,none);max-height:var(--lp-max-height,none);z-index:var(--lp-z-index,3);pointer-events:auto;border-radius:var(--window-border-radius);background:var(--window-background);}#popup .popup_bar,#popup [class*=popup_bar_]{display:flex;width:100%;height:36px;background:var(--bar-background);border-bottom:var(--bar-border-bottom);box-shadow:var(--bar-shadow);z-index:2;}#popup [class*=popup_drag_]{width:100%;padding:10px 0 0 10px;color:var(--bar-color);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}#popup [class*=popup_icon_]{padding:8px 0 0 10px;color:var(--bar-color);font-size:1.1em;}#popup [class*=popup_option_]{display:flex;margin-right:15px;}#popup [class*=popup_option_] button{position:relative;display:inline-block;width:36px;height:28px;color:white;border-radius:5px;margin:4px;transition:all 0.3s ease;background:transparent;}#popup [class*=popup_option_] button img{filter:invert(1);opacity:0.5;width:15px;height:auto;margin-top:2px;}#popup [class*=popup_option_] button:after{content:\"\";inset:0;display:block;position:absolute;background:linear-gradient( 180deg,#000 0%,rgb(60,60,60) 100%);border-radius:5px;z-index:-1;}#popup [class*=popup_option_] button:after{opacity:0;transition:opacity 0.3s ease-in-out;}#popup [class*=popup_option_] button:hover{background:rgba(255,255,255,0.1);box-shadow:inset 0 0 5px rgb(0,0,0);text-shadow:0 0 15px rgb(255,255,255),0 0 3px rgb(255,255,255);}#popup [class*=popup_option_] button:hover::after{opacity:1;}#popup [class*=popup_option_] button [class*=button_close_]:hover{background:rgb(255,0,0) !important;box-shadow:inset 0 0 25px rgb(255,255,255),0 0 35px rgb(255,0,0) !important;}#popup [class*=button_close_]:hover{background:rgb(255,0,0) !important;box-shadow:inset 0 0 25px rgb(255,255,255),0 0 35px rgb(255,0,0) !important;}#popup [class*=popup_internal_]{position:absolute;inset:37px 0 0 0;z-index:1;background:var(--internal-background);}#popup .popup_body,#popup [class*=popup_body_]{position:absolute;inset:0;color:var(--body-color);background:var(--body-background);text-align:center;}.popupMaxSize{position:absolute !important;width:100% !important;height:100% !important;inset:0 !important;margin:0 !important;padding:0 !important;border-radius:0 !important;}dialog[class*=popup_window_]{margin:0;padding:0;border:none;background:transparent;color:inherit;max-width:none;max-height:none;}dialog[class*=popup_window_]::backdrop{background:transparent;}dialog[class*=popup_window_]:not([open]){display:none;}dialog[class*=popup_window_][open]{display:block;}}@layer layerpro{#popup .lp_hidden{display:none;}#popup .lp_fade_in{opacity:1;transition:opacity var(--lp-fade-duration,100ms) ease;}#popup .lp_fade_out{opacity:0;transition:opacity var(--lp-fade-duration,100ms) ease;}#popup .lp_no_transition{transition:none;}#popup .popup_maximized{position:fixed;top:-6px;left:-6px;right:-6px;bottom:-6px;width:auto;height:auto;}#popup .popup_iconized{width:0;height:0;opacity:0;}#popup .popup_dimmed{opacity:0.5;}#popup [class*=popup_body_].popup_content_hidden{content-visibility:hidden;}#popup [class*=popup_body_].popup_content_visible{content-visibility:visible;}#popup .lp_no_pointer{pointer-events:none;}#popup .lp_pointer{pointer-events:auto;}#popup .lp_no_touch{touch-action:none;}body.lp_page_locked{pointer-events:none;}}@layer layerpro{#root.layerpro-dock,html.layerpro-dock,body.layerpro-dock{position:absolute;top:0;right:0;left:0;bottom:var(--dock-height) !important;overflow-y:auto !important;}#popup_dock{position:fixed;bottom:0;left:0;right:0;height:var(--dock-height);pointer-events:auto;z-index:var(--lp-z-index,1001);background-color:var(--dock-background-color);border-top:1px solid rgba(255,255,255,0.521);}#popup_dock #popup_dock_icon{position:absolute;top:3px;left:3px;width:70px;height:var(--dock-height);}#popup_dock #popup_dock_list{position:absolute;top:3px;left:var(--dock-sideLeft);right:var(--dock-sideLeft);height:calc(var(--dock-height) - 5px);overflow-y:auto;text-align:right;display:flex;flex-direction:row;justify-content:flex-end;height:30px;}#popup_dock #popup_dock_list [class^=icon_]{width:var(--dock-icon-width);float:left;padding:4px;color:white;margin:2px 3px 0 0;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;filter:saturate(400%);}#popup_dock #popup_dock_list [class^=icon_]:hover{background-color:rgb(77,77,77);}#popup_dock #popup_dock_list [class^=icon_] span:nth-child(1){width:20%;text-align:center;color:#F60;}#popup_dock #popup_dock_list [class^=icon_] span:nth-child(2){width:80%;text-align:left;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}#popup_dock #popup_dock_list [class^=icon_] button{width:20px;height:20px;color:white;padding:4px;margin:0;display:flex;align-content:center;justify-content:center;font-size:0.7em;border:none;background:none;}#popup_dock #popup_dock_options{position:absolute;top:3px;right:10px;width:var(--dock-sideRight);height:var(--dock-height);}}@layer layerpro{#popup .iconize:before,#popup .maximize:before,#popup .close:before{content:\"\";position:absolute;inset:0;background-repeat:no-repeat !important;background-position:center !important;background-size:50% !important;filter:invert(1);opacity:0.5;margin:0;padding:0;}#popup .iconize:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMjAiCiAgIGhlaWdodD0iMjAiCiAgIHZpZXdCb3g9IjAgMCA1LjI5MTY2NjUgNS4yOTE2NjY4IgogICB2ZXJzaW9uPSIxLjEiCiAgIGlkPSJzdmczNzY4IgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjEuMSAoM2JmNWFlMGQyNSwgMjAyMS0wOS0yMCkiCiAgIHNvZGlwb2RpOmRvY25hbWU9Imljb25pemUuc3ZnIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3Nv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2VjaGVja2VyYm9hcmQ9IjAiIC8+CiAgPG1ldGFkYXRhCiAgICAgaWQ9Im1ldGFkYXRhMzc2NSI+CiAgICA8cmRmOlJERj4KICAgICAgPGNjOldvcmsKICAgICAgICAgcmRmOmFib3V0PSIiPgogICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0PgogICAgICAgIDxkYzp0eXBlCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4KICAgICAgPC9jYzpXb3JrPgogICAgPC9yZGY6UkRGPgogIDwvbWV0YWRhdGE+CiAgPGcKICAgICBpbmtzY2FwZTpsYWJlbD0iTGF5ZXIgMSIKICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIgogICAgIGlkPSJsYXllcjEiCiAgICAgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCwtMjkxLjcwODMyKSI+CiAgICA8cmVjdAogICAgICAgcnk9IjAuNjk5MTc0MjMiCiAgICAgICB5PSIyOTMuNjkyNzgiCiAgICAgICB4PSIwLjI3NDg0NjczIgogICAgICAgaGVpZ2h0PSIxLjM5ODM0ODUiCiAgICAgICB3aWR0aD0iNC43NjI0OTk4IgogICAgICAgaWQ9InJlY3QzNzM2LTciCiAgICAgICBzdHlsZT0iZmlsbDojMDAwMDAwO3N0cm9rZS13aWR0aDowLjEzMjk5MTg1IiAvPgogIDwvZz4KPC9zdmc+Cg==) !important;}#popup .maximize:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMjAiCiAgIGhlaWdodD0iMjAiCiAgIHZpZXdCb3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MC4yNjUzNyAwLjI2NTM3LC0wLjY5MjQ0IDAsLTAuOTU3ODEgLTAuMjY1Mzc5LC0wLjI2NTM3IC0wLjY5MjYxLC0wLjI2NTM3IC0wLjk1Nzk5LDAgbCAtMS4yMjQyMDgsMS4yMjQxNyAtMS4yMjQyMSwtMS4yMjQxNyBjIC0wLjEzMjY5LC0wLjEzMjY5IC0wLjMwNTgzLC0wLjE5OTI3IC0wLjQ3ODk4OTk1LC0wLjE5OTI3IHoiCiAgICAgICBpZD0icmVjdDM3MTUiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIiAvPgogIDwvZz4KPC9zdmc+Cg==) !important;}}@layer layerpro{#popup > input,#popup > button,#popup > textarea,#popup > select{all:unset;}}@layer layerpro{.popup_alert,.popup_message,.popup_prompt,.popup_confirm{height:calc(100% - 41px);box-shadow:0 1px 1px #888;overflow:auto;padding:20px;word-break:break-all;}.popup_alert input[type=text],.popup_message input[type=text],.popup_prompt input[type=text],.popup_confirm input[type=text]{position:relative;width:90%;height:35px;padding:5px;font-size:1.05em;border:2px solid rgba(0,0,0,0.3);border-radius:6px;color:#ddd;background-color:#4a4a4f;}.popup_window___alert #a___alert,.popup_window___alert #a___message,.popup_window___message #a___alert,.popup_window___message #a___message{width:100% !important;}.popup_window___prompt #a___alert,.popup_window___prompt #b___alert,.popup_window___prompt #a___message,.popup_window___prompt #b___message,.popup_window___confirm #a___alert,.popup_window___confirm #b___alert,.popup_window___confirm #a___message,.popup_window___confirm #b___message{width:50% !important;}}@layer layerpro{.resize_0,.resize_1,.resize_2,.resize_3{position:absolute;background-color:var(--resize-background-color);border-radius:var(--border-radius);opacity:0;z-index:5000;transition:var(--transition-time);}.resize_0{top:-4px;left:0;width:100%;height:10px;cursor:n-resize;}.resize_1{top:0;right:-4px;width:10px;height:100%;cursor:e-resize;}.resize_2{bottom:-4px;left:0;width:100%;height:10px;cursor:n-resize;}.resize_3{top:0;left:-4px;width:10px;height:100%;cursor:e-resize;}.resize_corner_0,.resize_corner_1,.resize_corner_2,.resize_corner_3{position:absolute;background-color:var(--resize-background-color);border-radius:var(--border-radius);opacity:0;z-index:5000;transition:var(--transition-time);width:var(--corner-size);height:var(--corner-size);border-radius:var(--corner-border-radius);}.resize_corner_0{top:-4px;left:-4px;cursor:nw-resize;}.resize_corner_1{top:-4px;right:-4px;cursor:ne-resize;}.resize_corner_2{bottom:-4px;right:-4px;cursor:nw-resize;}.resize_corner_3{bottom:-4px;left:-4px;cursor:ne-resize;}.resize_0:hover,.resize_1:hover,.resize_2:hover,.resize_3:hover,.resize_corner_0:hover,.resize_corner_1:hover,.resize_corner_2:hover,.resize_corner_3:hover{opacity:var(--hover-opacity);filter:var(--hover-filter);box-shadow:var(--resize-shadow);transition:var(--transition-time);}}@layer layerpro{#popup{}#popup::-webkit-scrollbar{width:10px;scroll-behavior:smooth;}#popup{}#popup::-webkit-scrollbar-track{-webkit-border-radius:2px;border-radius:2px;margin:5px;}#popup{}#popup::-webkit-scrollbar-thumb{-webkit-border-radius:2px;border-radius:2px;background:rgb(30,150,255) !important;}}";document.head.appendChild(s)})();var e = Object.defineProperty, t = (t, o, n) => ((t, o, n) => o in t ? e(t, o, {
2
2
  enumerable: !0,
3
3
  configurable: !0,
4
4
  writable: !0,
@@ -20,8 +20,8 @@ if (!n.setProps) {
20
20
  const i = Object.getOwnPropertyDescriptor(t, n);
21
21
  i && (i.enumerable = o?.enumerable ?? !1, i.configurable = o?.configurable ?? !1,
22
22
  i.writable = o?.writable ?? !1, Object.defineProperty(t, n, i));
23
- const s = t[n];
24
- "object" == typeof s && null !== s && e(s, o);
23
+ const r = t[n];
24
+ "object" == typeof r && null !== r && e(r, o);
25
25
  });
26
26
  };
27
27
  Object.defineProperty(n, "setProps", {
@@ -31,46 +31,46 @@ if (!n.setProps) {
31
31
  });
32
32
  }
33
33
 
34
- var i = globalThis.layerpro, s = globalThis;
34
+ var i = globalThis.layerpro, r = globalThis;
35
35
 
36
36
  Object.defineProperty(i, "config", {
37
37
  value: e => {
38
- void 0 !== e.nonce && (s.__layerproNonce = e.nonce);
38
+ void 0 !== e.nonce && (r.__layerproNonce = e.nonce);
39
39
  },
40
40
  writable: !1,
41
41
  configurable: !1
42
42
  });
43
43
 
44
- var r = globalThis.layerpro;
44
+ var s = globalThis.layerpro;
45
45
 
46
- Object.defineProperty(r, "credits", {
46
+ Object.defineProperty(s, "credits", {
47
47
  value: e => {},
48
48
  writable: !1,
49
49
  configurable: !1
50
50
  });
51
51
 
52
- var p = "4.0.0", a = globalThis.layerpro;
52
+ var p = "4.1.0", l = globalThis.layerpro;
53
53
 
54
- Object.defineProperty(a, "version", {
54
+ Object.defineProperty(l, "version", {
55
55
  value: () => p,
56
56
  writable: !1,
57
57
  configurable: !1
58
58
  });
59
59
 
60
- var l = new WeakMap, c = new WeakMap, d = e => "string" == typeof e ? document.querySelector(e) ?? document : e instanceof HTMLElement ? e : document, u = e => e ? e.split(/\s+/).filter(e => e.length > 0) : [], h = new Set([ "opacity", "zindex", "z-index", "fontweight", "font-weight", "lineheight", "line-height", "zoom", "flex", "flexgrow", "flex-grow", "flexshrink", "flex-shrink", "order", "gridcolumn", "grid-column", "gridrow", "grid-row", "columncount", "column-count", "fontsizeadjust", "font-size-adjust", "appearance" ]), m = (e, t) => "number" != typeof t || h.has(e.toLowerCase()) ? String(t) : `${t}px`, f = (e, t, o, n) => {
61
- const i = e => o(e), s = n?.ns ? `${t}.${n.ns}` : t;
60
+ var c = new WeakMap, a = new WeakMap, d = e => "string" == typeof e ? document.querySelector(e) ?? document : e instanceof HTMLElement || e && "function" == typeof e.querySelector ? e : document, u = e => e ? e.split(/\s+/).filter(e => e.length > 0) : [], h = new Set([ "--lp-z-index", "--lp-opacity" ]), m = (e, t, o, n) => {
61
+ const i = e => o(e), r = n?.ns ? `${t}.${n.ns}` : t;
62
62
  e.addEventListener(t, i, n);
63
- let r = l.get(e);
64
- r || (r = new Map, l.set(e, r)), r.set(s, {
63
+ let s = c.get(e);
64
+ s || (s = new Map, c.set(e, s)), s.set(r, {
65
65
  handler: i,
66
66
  opts: n ?? {}
67
67
  });
68
- }, b = (e, t, o) => {
69
- const n = l.get(e);
68
+ }, f = (e, t, o) => {
69
+ const n = c.get(e);
70
70
  if (n) {
71
71
  if (o?.ns) {
72
- const i = `${t}.${o.ns}`, s = n.get(i);
73
- return void (s && (e.removeEventListener(t, s.handler, s.opts), n.delete(i)));
72
+ const i = `${t}.${o.ns}`, r = n.get(i);
73
+ return void (r && (e.removeEventListener(t, r.handler, r.opts), n.delete(i)));
74
74
  }
75
75
  for (const [o, i] of [ ...n ]) (o === t || o.startsWith(`${t}.`)) && (e.removeEventListener(t, i.handler, i.opts),
76
76
  n.delete(o));
@@ -80,15 +80,15 @@ var l = new WeakMap, c = new WeakMap, d = e => "string" == typeof e ? document.q
80
80
  t(this, "el"), this.el = e;
81
81
  }
82
82
  append(t) {
83
- return t instanceof e ? this.el.appendChild(t.el) : "string" == typeof t ? this.el.appendChild(document.createTextNode(t)) : this.el.appendChild(t),
83
+ return t instanceof e ? this.el.appendChild(t.el) : "string" == typeof t ? this.el.appendChild(this.el.ownerDocument.createTextNode(t)) : this.el.appendChild(t),
84
84
  this;
85
85
  }
86
86
  appendTo(t) {
87
87
  let o;
88
- if (t instanceof e) o = t.el; else {
89
- const e = d(t);
90
- o = e === document ? document.body : e;
91
- }
88
+ if (t instanceof e) o = t.el; else if ("string" == typeof t) {
89
+ const e = this.el.ownerDocument;
90
+ o = "body" === t ? e.body ?? e.documentElement : "html" === t ? e.documentElement : e.querySelector(t) ?? e.body ?? e.documentElement;
91
+ } else o = t;
92
92
  return o.appendChild(this.el), this;
93
93
  }
94
94
  html(e) {
@@ -97,9 +97,19 @@ var l = new WeakMap, c = new WeakMap, d = e => "string" == typeof e ? document.q
97
97
  text(e) {
98
98
  return this.el.textContent = e, this;
99
99
  }
100
- css(e, t) {
101
- if ("object" == typeof e && null !== e) for (const [t, o] of Object.entries(e)) this.el.style.setProperty(t.replace(/[A-Z]/g, e => `-${e.toLowerCase()}`), m(t, o)); else this.el.style.setProperty(e.replace(/[A-Z]/g, e => `-${e.toLowerCase()}`), m(e, t));
102
- return this;
100
+ cssVar(e, t) {
101
+ const o = e.startsWith("--") ? e : `--${e}`, n = "number" == typeof t && !h.has(o) ? `${t}px` : String(t);
102
+ return this.el.style.setProperty(o, n), this;
103
+ }
104
+ removeVar(e) {
105
+ const t = e.startsWith("--") ? e : `--${e}`;
106
+ return this.el.style.removeProperty(t), this;
107
+ }
108
+ geom(e) {
109
+ return void 0 !== e.top && this.cssVar("--lp-top", e.top), void 0 !== e.left && this.cssVar("--lp-left", e.left),
110
+ void 0 !== e.right && this.cssVar("--lp-right", e.right), void 0 !== e.bottom && this.cssVar("--lp-bottom", e.bottom),
111
+ void 0 !== e.width && this.cssVar("--lp-width", e.width), void 0 !== e.height && this.cssVar("--lp-height", e.height),
112
+ this;
103
113
  }
104
114
  addClass(e) {
105
115
  for (const t of u(e)) this.el.classList.add(t);
@@ -118,7 +128,9 @@ var l = new WeakMap, c = new WeakMap, d = e => "string" == typeof e ? document.q
118
128
  }
119
129
  isHidden() {
120
130
  const e = this.el;
121
- return "none" === e.style.display || ("none" === getComputedStyle(e).display || 0 === e.offsetWidth && 0 === e.offsetHeight);
131
+ if (e.classList.contains("lp_hidden")) return !0;
132
+ const t = e.ownerDocument.defaultView;
133
+ return !(!t || "none" !== t.getComputedStyle(e).display) || 0 === e.offsetWidth && 0 === e.offsetHeight;
122
134
  }
123
135
  attr(e, t) {
124
136
  return void 0 === t ? this.el.getAttribute(e) : (this.el.setAttribute(e, t), this);
@@ -134,37 +146,40 @@ var l = new WeakMap, c = new WeakMap, d = e => "string" == typeof e ? document.q
134
146
  const o = this.el.closest(t);
135
147
  return o ? new e(o) : null;
136
148
  }
149
+ children() {
150
+ return [ ...this.el.children ].map(t => new e(t));
151
+ }
137
152
  parent() {
138
153
  return this.el.parentElement ? new e(this.el.parentElement) : null;
139
154
  }
140
155
  hide() {
141
- return this.el.style.display = "none", this;
156
+ return this.el.classList.add("lp_hidden"), this;
142
157
  }
143
158
  show() {
144
- return this.el.style.display = "", this;
159
+ return this.el.classList.remove("lp_hidden"), this;
145
160
  }
146
161
  toggle() {
147
- return this.el.style.display = "none" === this.el.style.display ? "" : "none", this;
162
+ return this.el.classList.toggle("lp_hidden"), this;
148
163
  }
149
164
  on(e, t, o) {
150
- return f(this.el, e, t, o), this;
165
+ return m(this.el, e, t, o), this;
151
166
  }
152
167
  off(e, t) {
153
- return b(this.el, e, t), this;
168
+ return f(this.el, e, t), this;
154
169
  }
155
170
  data(e, t) {
156
- let o = c.get(this.el);
157
- return o || (o = new Map, c.set(this.el, o)), void 0 === t ? o.get(e) : (o.set(e, t),
171
+ let o = a.get(this.el);
172
+ return o || (o = new Map, a.set(this.el, o)), void 0 === t ? o.get(e) : (o.set(e, t),
158
173
  this);
159
174
  }
160
175
  removeData(e) {
161
- return c.get(this.el)?.delete(e), this;
176
+ return a.get(this.el)?.delete(e), this;
162
177
  }
163
178
  offset() {
164
- const e = this.el.getBoundingClientRect();
179
+ const e = this.el.getBoundingClientRect(), t = this.el.ownerDocument.defaultView;
165
180
  return {
166
- top: e.top + (window.scrollY || 0),
167
- left: e.left + (window.scrollX || 0)
181
+ top: e.top + (t?.scrollY || 0),
182
+ left: e.left + (t?.scrollX || 0)
168
183
  };
169
184
  }
170
185
  position() {
@@ -192,181 +207,453 @@ var l = new WeakMap, c = new WeakMap, d = e => "string" == typeof e ? document.q
192
207
  fadeIn(e, t) {
193
208
  const o = this.el;
194
209
  let n = 100, i = t;
195
- return "function" == typeof e ? i = e : n = e, o.style.display = "", o.style.transition = "none",
196
- o.style.opacity = "0", o.offsetWidth, o.style.transition = `opacity ${n}ms ease`,
197
- o.style.opacity = "1", this.finishTransition(n, () => {
198
- o.style.transition = "", o.style.opacity = "", i?.();
210
+ return "function" == typeof e ? i = e : n = e, o.style.setProperty("--lp-fade-duration", `${n}ms`),
211
+ o.classList.remove("lp_hidden"), o.classList.add("lp_no_transition"), o.classList.add("lp_fade_out"),
212
+ o.offsetWidth, o.classList.remove("lp_no_transition"), o.classList.remove("lp_fade_out"),
213
+ o.classList.add("lp_fade_in"), this.finishTransition(n, () => {
214
+ o.classList.remove("lp_fade_in"), i?.();
199
215
  }), this;
200
216
  }
201
217
  fadeOut(e, t) {
202
218
  const o = this.el;
203
219
  let n = 100, i = t;
204
- return "function" == typeof e ? i = e : n = e, o.style.transition = `opacity ${n}ms ease`,
205
- o.style.opacity = "0", this.finishTransition(n, () => {
206
- o.style.display = "none", o.style.transition = "", o.style.opacity = "", i?.();
207
- }), this;
208
- }
209
- animate(e, t, o) {
210
- const n = this.el;
211
- let i = 200, s = o;
212
- "function" == typeof t ? s = t : i = t;
213
- const r = Object.keys(e), p = {};
214
- for (const t of r) p[t] = m(t, e[t]);
215
- return n.style.transition = "none", n.offsetWidth, n.style.transition = `${r.join(", ")} ${i}ms ease`,
216
- Object.assign(n.style, p), this.finishTransition(i, () => {
217
- n.style.transition = "", s?.();
220
+ return "function" == typeof e ? i = e : n = e, o.style.setProperty("--lp-fade-duration", `${n}ms`),
221
+ o.classList.remove("lp_fade_in"), o.classList.add("lp_fade_out"), this.finishTransition(n, () => {
222
+ o.classList.add("lp_hidden"), o.classList.remove("lp_fade_out"), i?.();
218
223
  }), this;
219
224
  }
220
225
  finishTransition(e, t) {
221
226
  const o = this.el;
222
227
  let n = !1;
223
228
  const i = () => {
224
- n || (n = !0, o.removeEventListener("transitionend", s), t());
225
- }, s = e => {
229
+ n || (n = !0, o.removeEventListener("transitionend", r), t());
230
+ }, r = e => {
226
231
  e.target === o && i();
227
232
  };
228
- o.addEventListener("transitionend", s), window.setTimeout(i, e + 60);
233
+ o.addEventListener("transitionend", r);
234
+ (o.ownerDocument.defaultView ?? window).setTimeout(i, e + 60);
235
+ }
236
+ }, g = e => {
237
+ const t = e;
238
+ if (!t.open) {
239
+ if ("function" == typeof t.show) try {
240
+ return void t.show();
241
+ } catch {}
242
+ t.setAttribute("open", "");
243
+ }
244
+ }, b = e => {
245
+ const t = e;
246
+ if (t.open) {
247
+ if ("function" == typeof t.close) try {
248
+ return void t.close();
249
+ } catch {}
250
+ t.removeAttribute("open");
229
251
  }
230
252
  };
231
253
 
232
- function g(e, t) {
254
+ function v(e, t) {
233
255
  const o = d(t).querySelector(e);
234
256
  return o ? new _(o) : null;
235
257
  }
236
258
 
237
- function v(e, t) {
259
+ function w(e, t) {
238
260
  return [ ...d(t).querySelectorAll(e) ].map(e => new _(e));
239
261
  }
240
262
 
241
- var y = e => {
242
- const t = document.createElement("div");
243
- t.innerHTML = e.trim();
244
- const o = t.firstElementChild;
245
- return new _(o);
246
- }, w = {
247
- on(e, t, o) {
248
- f(document, e, t, o);
263
+ var y = (e, t) => {
264
+ const o = (t ?? document).createElement("div");
265
+ o.innerHTML = e.trim();
266
+ const n = o.firstElementChild;
267
+ return new _(n);
268
+ }, z = {
269
+ on(e, t, o, n) {
270
+ m(n ?? document, e, t, o);
249
271
  },
250
- off(e, t) {
251
- b(document, e, t);
272
+ off(e, t, o) {
273
+ f(o ?? document, e, t);
252
274
  }
253
- }, z = {
254
- on(e, t, o) {
255
- f(window, e, t, o);
275
+ }, $ = {
276
+ on(e, t, o, n) {
277
+ m(n ?? window, e, t, o);
256
278
  },
257
- off(e, t) {
258
- b(window, e, t);
279
+ off(e, t, o) {
280
+ f(o ?? window, e, t);
259
281
  },
260
- height: () => window.innerHeight,
261
- width: () => window.innerWidth,
262
- scrollTop: () => window.scrollY || document.documentElement.scrollTop || 0,
263
- scrollLeft: () => window.scrollX || document.documentElement.scrollLeft || 0
264
- }, x = new Map, k = new WeakSet, $ = new Map, E = e => {
265
- e ? Array.from(document.body.children).forEach(e => {
266
- "popup" !== e.id && (e.setAttribute("aria-hidden", "true"), k.add(e));
267
- }) : Array.from(document.body.children).forEach(e => {
268
- k.has(e) && (e.removeAttribute("aria-hidden"), k.delete(e));
269
- });
270
- }, T = () => {
271
- const e = x.get("__lastActive__");
272
- e && "function" == typeof e.focus && e.focus(), x.delete("__lastActive__");
273
- }, S = e => {
274
- const t = $.get(e);
275
- t && (t.el.removeEventListener("keydown", t.handler), $.delete(e));
276
- }, C = E, L = () => {
277
- const e = document.activeElement;
278
- x.set("__lastActive__", e);
279
- }, M = (e, t) => {
280
- const o = e => {
281
- const o = e;
282
- if ("Tab" !== o.key) return;
283
- const n = t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
284
- if (0 === n.length) return;
285
- const i = n[0], s = n[n.length - 1];
286
- o.shiftKey ? document.activeElement === i && (e.preventDefault(), s.focus()) : document.activeElement === s && (e.preventDefault(),
287
- i.focus());
282
+ height: e => (e ?? window).innerHeight,
283
+ width: e => (e ?? window).innerWidth,
284
+ scrollTop(e) {
285
+ const t = e ?? window;
286
+ return t.scrollY || t.document?.documentElement.scrollTop || 0;
287
+ },
288
+ scrollLeft(e) {
289
+ const t = e ?? window;
290
+ return t.scrollX || t.document?.documentElement.scrollLeft || 0;
291
+ }
292
+ }, k = new Map, S = new WeakMap, x = new WeakSet, C = new Map, E = (e, t) => {
293
+ const o = t ?? document;
294
+ o.body && (e ? Array.from(o.body.children).forEach(e => {
295
+ "popup" !== e.id && "popup_dock" !== e.id && (e.setAttribute("aria-hidden", "true"),
296
+ x.add(e));
297
+ }) : Array.from(o.body.children).forEach(e => {
298
+ x.has(e) && (e.removeAttribute("aria-hidden"), x.delete(e));
299
+ }));
300
+ }, L = () => {
301
+ const e = k.get("__lastActive__");
302
+ e && "function" == typeof e.focus && e.focus(), k.delete("__lastActive__");
303
+ }, T = e => {
304
+ const t = C.get(e);
305
+ t && (t.el.removeEventListener("keydown", t.handler), C.delete(e));
306
+ }, M = E, A = e => {
307
+ const t = e ?? document, o = t.activeElement;
308
+ S.set(t, o), k.set("__lastActive__", o);
309
+ }, P = (e, t) => {
310
+ const o = t.ownerDocument, n = e => {
311
+ const n = e;
312
+ if ("Tab" !== n.key) return;
313
+ const i = t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
314
+ if (0 === i.length) return;
315
+ const r = i[0], s = i[i.length - 1];
316
+ n.shiftKey ? o.activeElement === r && (e.preventDefault(), s.focus()) : o.activeElement === s && (e.preventDefault(),
317
+ r.focus());
288
318
  };
289
- $.set(e, {
319
+ C.set(e, {
290
320
  el: t,
291
- handler: o
292
- }), t.addEventListener("keydown", o, !0);
293
- }, A = e => {
294
- S(e), T(), E(!1);
295
- }, N = new Map, O = new Map, H = {
321
+ handler: n
322
+ }), t.addEventListener("keydown", n, !0);
323
+ }, V = (e, t) => {
324
+ T(e), L(), E(!1, t);
325
+ }, N = "layerpro-dock", O = e => {
326
+ const t = e ?? document;
327
+ t.documentElement?.classList.remove(N), t.body?.classList.remove(N);
328
+ }, H = {
296
329
  "&": "&",
297
330
  "<": "&lt;",
298
331
  ">": "&gt;",
299
332
  '"': "&quot;",
300
333
  "'": "&#39;"
301
- }, P = e => e.replace(/[&<>"']/g, e => H[e]), I = e => {
334
+ }, I = e => e.replace(/[&<>"']/g, e => H[e]), W = e => `layerpro:geometry:${e}`, j = e => `layerpro:native:${e}`, q = () => {
335
+ try {
336
+ return "undefined" == typeof localStorage ? null : localStorage;
337
+ } catch {
338
+ return null;
339
+ }
340
+ }, D = (e, t) => {
341
+ const o = q();
342
+ if (o) try {
343
+ o.setItem(e, JSON.stringify(t));
344
+ } catch {}
345
+ }, R = e => {
346
+ const t = q();
347
+ if (!t) return null;
348
+ try {
349
+ const o = t.getItem(e);
350
+ if (!o) return null;
351
+ const n = JSON.parse(o);
352
+ return n && "object" == typeof n ? n : null;
353
+ } catch {
354
+ return null;
355
+ }
356
+ }, X = [ "--input-background-color", "--input-color", "--button-background-color", "--button-color", "--inputButton-fontSize", "--resize-background-color", "--resize-shadow", "--dock-background-color", "--dock-height", "--dock-sideLeft", "--dock-sideCenter", "--dock-sideRight", "--dock-icon-width", "--bar-background", "--bar-selected-background", "--bar-color", "--bar-border-bottom", "--bar-shadow", "--window-background", "--window-shadow", "--window-border-radius", "--window-z-high-border", "--window-z-high-shadow", "--internal-background", "--body-color", "--body-background", "--modal-background", "--popup-z-index", "--transition-time", "--border-radius", "--corner-size", "--corner-border-radius", "--hover-opacity", "--hover-filter" ], Y = new Map, B = (e, t) => {
357
+ const o = String(e.id), n = !0 === e.persist ? (e => R(j(e)))(o) : null, i = ((e, t) => {
358
+ const o = t?.outerWidth ?? ("number" == typeof e.width ? e.width : 340), n = t?.outerHeight ?? ("number" == typeof e.height ? e.height : 220), i = t?.screenX ?? ("number" == typeof e.left ? e.left : void 0), r = t?.screenY ?? ("number" == typeof e.top ? e.top : void 0), s = [ `width=${Math.round(o)}`, `height=${Math.round(n)}`, "menubar=no", "toolbar=no", "location=no", "status=no", "resizable=yes", "scrollbars=yes" ];
359
+ return void 0 !== i && s.push(`left=${Math.round(i)}`), void 0 !== r && s.push(`top=${Math.round(r)}`),
360
+ s.join(",");
361
+ })(e, n), r = window.open("", `layerpro_${o}`, i);
362
+ if (!r) return null;
363
+ const s = r.document;
364
+ s.open(), s.write(`<!DOCTYPE html><html><head><meta charset="utf-8"><title>${I(String(e.name ?? "LayerPro"))}</title><style>${(() => {
365
+ const e = document.querySelector("style[data-layerpro-styles]");
366
+ return e?.textContent ?? "";
367
+ })()}</style><style>:root{${(() => {
368
+ const e = getComputedStyle(document.documentElement), t = [];
369
+ for (const o of X) {
370
+ const n = e.getPropertyValue(o);
371
+ n && t.push(`${o}:${n.trim()};`);
372
+ }
373
+ return t.join("");
374
+ })()}}html,body{margin:0;padding:0;height:100%;overflow:hidden}</style></head><body>${(e => {
375
+ const t = String(e.id), o = I(String(e.name ?? "")), n = e.icon ? I(String(e.icon)) : "", i = [];
376
+ return !0 === e.maximize && i.push(`<button class="button_maximize_${t} maximize"></button>`),
377
+ !0 === e.close && i.push(`<button class="button_close_${t} close"></button>`), `\n <div id="popup">\n <div class="popup_overflow_${t} popup_overflow">\n <dialog class="popup_window_${t} popup_window zHigh" role="dialog" tabindex="-1" aria-label="${o}">\n <div class="popup_bar_${t} popup_bar popup_bar_selected">\n ${n ? `<div class="popup_icon_${t} popup_icon">${n}</div>` : ""}\n <div class="popup_drag_${t} popup_drag">${o}</div>\n <div class="popup_option_${t} popup_option">${i.join("")}</div>\n </div>\n <div class="popup_internal_${t} popup_internal">\n <div class="popup_body_${t} popup_body"></div>\n </div>\n </dialog>\n </div>\n </div>\n `;
378
+ })(e)}</body></html>`), s.close();
379
+ const p = s.querySelector(`.popup_overflow_${o}`);
380
+ p && (p.style.setProperty("--lp-top", "0"), p.style.setProperty("--lp-left", "0"),
381
+ p.style.setProperty("--lp-width", "100%"), p.style.setProperty("--lp-height", "100%"));
382
+ const l = s.querySelector(`.popup_window_${o}`);
383
+ l && g(l);
384
+ const c = s.querySelector(`.popup_body_${o}`);
385
+ c && (c.innerHTML = (e => {
386
+ const t = e.body;
387
+ return "string" != typeof t ? "" : (t.trim().startsWith("<"), I(t));
388
+ })(e) + (e => {
389
+ if (!e.buttons) return "";
390
+ const t = [ '<div class="buttons">' ];
391
+ return e.buttons.confirm && t.push(`<button id="lp_confirm_${id}" class="lp_confirm" type="button">${I(String(e.buttons.confirm.text).toUpperCase())}</button>`),
392
+ e.buttons.cancel && t.push(`<button id="lp_cancel_${id}" class="lp_cancel" type="button">${I(String(e.buttons.cancel.text).toUpperCase())}</button>`),
393
+ t.push("</div>"), t.join("");
394
+ })(e));
395
+ const a = s.querySelector(".lp_confirm");
396
+ a?.addEventListener("click", () => {
397
+ e.buttons?.confirm?.cb?.(), r.close();
398
+ });
399
+ const d = s.querySelector(".lp_cancel");
400
+ d?.addEventListener("click", () => {
401
+ e.buttons?.cancel?.cb?.(), r.close();
402
+ });
403
+ const u = s.querySelector(`.button_close_${o}`);
404
+ u?.addEventListener("click", () => {
405
+ e.buttons?.cancel?.cb?.(), r.close();
406
+ }), s.addEventListener("keydown", t => {
407
+ const o = t;
408
+ "Escape" !== o.key && 27 !== o.keyCode || (e.buttons?.cancel?.cb?.(), r.close());
409
+ }), !0 === e.closeWithOpener && (e => {
410
+ const t = e.setInterval(() => {
411
+ let o = !1;
412
+ try {
413
+ const t = e.opener;
414
+ o = !t || !0 === t.closed;
415
+ } catch {
416
+ o = !1;
417
+ }
418
+ if (o) {
419
+ e.clearInterval(t);
420
+ try {
421
+ e.close();
422
+ } catch {}
423
+ }
424
+ }, 400);
425
+ })(r);
426
+ const h = () => {
427
+ if (!0 === e.persist) try {
428
+ ((e, t) => {
429
+ D(j(e), t);
430
+ })(o, {
431
+ screenX: r.screenX,
432
+ screenY: r.screenY,
433
+ outerWidth: r.outerWidth,
434
+ outerHeight: r.outerHeight
435
+ });
436
+ } catch {}
437
+ }, m = window.setInterval(() => {
438
+ r.closed && (window.clearInterval(m), h(), Y.delete(o), t?.());
439
+ }, 400), f = {
440
+ win: r,
441
+ id: o,
442
+ close: () => {
443
+ window.clearInterval(m), h(), Y.delete(o);
444
+ try {
445
+ r.close();
446
+ } catch {}
447
+ t?.();
448
+ }
449
+ };
450
+ return Y.set(o, f), f;
451
+ }, U = new Map, K = () => ({
452
+ win: window,
453
+ doc: document
454
+ }), F = () => {
455
+ const e = [ K() ];
456
+ for (const t of U.values()) e.includes(t) || e.push(t);
457
+ return e;
458
+ }, J = e => U.get(String(e)) ?? K(), G = e => Z(e?.target) ?? K(), Q = e => {
459
+ try {
460
+ return e.document ?? null;
461
+ } catch {
462
+ return null;
463
+ }
464
+ }, Z = e => {
465
+ if (null == e) return K();
466
+ if ("string" == typeof e || "number" == typeof e) {
467
+ const o = (t = e, Y.get(String(t)));
468
+ if (!o) return null;
469
+ const n = Q(o.win);
470
+ return n ? {
471
+ win: o.win,
472
+ doc: n
473
+ } : null;
474
+ }
475
+ var t;
476
+ if ("doc" in e && "win" in e) {
477
+ const t = e;
478
+ return t.doc ? t : null;
479
+ }
480
+ const o = e, n = Q(o);
481
+ return n ? {
482
+ win: o,
483
+ doc: n
484
+ } : null;
485
+ }, ee = new Map, te = new Map, oe = (e, t = G(e)) => {
486
+ if ("function" == typeof e.body) return;
487
+ const o = !0 === e.modal ? ".popup_modal_" + e.id : "#popup", n = () => {
488
+ e.buttons?.cancel?.cb?.(), layerpro.popup.close(e);
489
+ };
490
+ w('[class^="popup_window_"]', t.doc).forEach(e => e.removeClass("zHigh")), w('[class^="popup_bar_"]', t.doc).forEach(e => e.removeClass("popup_bar_selected")),
491
+ w('[class^="icon_"]', t.doc).forEach(e => e.removeClass("popup_bar_selected")),
492
+ !0 === e.modal && y(`<div class="popup_modal_${e.id} popup_modal">`, t.doc).appendTo("#popup").cssVar("--lp-z-index", layerpro.popup.zIndex(t) + 1e3),
493
+ y(`<div class="popup_overflow_${e.id} popup_overflow">`, t.doc).appendTo(o).cssVar("--lp-top", e.top).cssVar("--lp-left", e.left).cssVar("--lp-right", e.right).cssVar("--lp-bottom", e.bottom).cssVar("--lp-width", e.width).cssVar("--lp-height", e.height).cssVar("--lp-min-width", e.minWidth).cssVar("--lp-min-height", e.minHeight).cssVar("--lp-z-index", layerpro.popup.zIndex(t)).on("pointerdown", () => {
494
+ layerpro.popup.index(e);
495
+ }).hide().fadeIn(e.fadeIn);
496
+ const i = y(`<dialog class="popup_window_${e.id} popup_window">`, t.doc).appendTo(`.popup_overflow_${e.id}`).addClass("zHigh").addClass(e.class);
497
+ g(i.el), i.attr("role", "dialog"), i.attr("tabindex", "-1"), i.attr("aria-modal", !0 === e.modal ? "true" : "false"),
498
+ e.name && i.attr("aria-label", String(e.name)), M(!0, t.doc), A(t.doc), P(String(e.id), i.el),
499
+ "function" == typeof requestAnimationFrame ? requestAnimationFrame(() => i.el.focus()) : i.el.focus();
500
+ const r = [ e.top, e.left, e.bottom, e.right ].reduce((e, t) => "number" == typeof t && isFinite(t) ? Number(e) + t : e, 0);
501
+ if (!0 === e.center || 0 === r) {
502
+ const o = w('[class^="popup_overflow_"]', t.doc).length, n = 20 * Math.max(0, o - 1);
503
+ layerpro.popup.center(e, n);
504
+ }
505
+ layerpro.popup.unmount = e => {
506
+ import("layerpro/react").then(t => {
507
+ const o = t.default;
508
+ o.unmount && o.unmount(String(e));
509
+ }).catch(() => {});
510
+ }, layerpro.popup.cleanupEvents = e => {
511
+ const o = te.get(e);
512
+ o && (o.iconClick && v(`.icon_${e}`, t.doc)?.off("click"), o.iconClose && v(`.icon_close_${e}`, t.doc)?.off("click"),
513
+ o.buttonIconize && v(`.button_iconize_${e}`, t.doc)?.off("click"), o.buttonMaximize && v(`.button_maximize_${e}`, t.doc)?.off("click"),
514
+ o.buttonClose && v(`.button_close_${e}`, t.doc)?.off("click"), o.escKey && z.off("keydown", {
515
+ ns: `esc-${e}`
516
+ }, t.doc), te.delete(e));
517
+ }, layerpro.popup.abortSource = e => {
518
+ const t = ee.get(e);
519
+ t && (t.abort(), ee.delete(e));
520
+ }, layerpro.popup.destroy = e => {
521
+ layerpro.popup.abortSource(e), layerpro.popup.cleanupEvents(e), M(!1, t.doc);
522
+ const o = t.doc.querySelector(`.popup_window_${e}`);
523
+ o && (b(o), o.remove());
524
+ }, y(`<div class="popup_bar_${e.id} popup_bar">`, t.doc).appendTo(i).addClass("popup_bar_selected"),
525
+ e.icon && y(`<div class="popup_icon_${e.id} popup_icon">${e.icon}</div>`, t.doc).appendTo(`.popup_bar_${e.id}`);
526
+ const s = I(String(e.name));
527
+ if (y(`<div class="popup_drag_${e.id} popup_drag">${s}</div>`, t.doc).appendTo(`.popup_bar_${e.id}`),
528
+ y(`<div class="popup_option_${e.id} popup_option">`, t.doc).appendTo(`.popup_bar_${e.id}`),
529
+ !0 === e.iconize && !v("#popup_dock", t.doc)) {
530
+ y('\n <div id="popup_dock">\n <div id="popup_dock_icon"></div>\n <div id="popup_dock_list"></div>\n <div id="popup_dock_options"></div>\n </div>\n ', t.doc).appendTo("html").cssVar("--lp-z-index", layerpro.popup.zIndex(t) + 1e3),
531
+ (e => {
532
+ const t = e ?? document;
533
+ t.documentElement?.classList.add(N), t.body?.classList.add(N);
534
+ })(t.doc);
535
+ }
536
+ if (v("#popup_dock", t.doc) && !0 === e.dockable) {
537
+ const o = String(e.id), i = `\n <div class="icon_${e.id}">\n <span>${e.icon ? e.icon : ""}</span>\n <span>${s}</span>\n </div>\n `, r = () => {
538
+ const o = v(".popup_overflow_" + e.id, t.doc);
539
+ o && o.data("iconize") ? (layerpro.popup.index(e), layerpro.popup.iconize(e)) : (layerpro.popup.iconize(e),
540
+ layerpro.popup.index(e));
541
+ }, p = e => {
542
+ e?.stopPropagation(), n();
543
+ };
544
+ te.set(o, {
545
+ iconClick: !0,
546
+ iconClose: !0
547
+ }), y(i, t.doc).appendTo("#popup_dock_list").addClass("popup_bar_selected").on("click", r),
548
+ y(`<button class="icon_close_${e.id}">X</button>`, t.doc).appendTo(`.icon_${e.id}`).on("click", p);
549
+ }
550
+ if (!0 === e.iconize) {
551
+ const o = String(e.id), n = () => {
552
+ layerpro.popup.iconize(e);
553
+ }, i = te.get(o) || {};
554
+ i.buttonIconize = !0, te.set(o, i), y(`<button class="button_iconize_${e.id} iconize">`, t.doc).appendTo(`.popup_option_${e.id}`).on("click", n);
555
+ }
556
+ if (!0 === e.maximize) {
557
+ const o = String(e.id), n = () => {
558
+ layerpro.popup.maximize(e);
559
+ }, i = te.get(o) || {};
560
+ i.buttonMaximize = !0, te.set(o, i), y(`<button class="button_maximize_${e.id} maximize">`, t.doc).appendTo(`.popup_option_${e.id}`).on("click", n);
561
+ }
562
+ if (!0 === e.close) {
563
+ const o = String(e.id), i = () => {
564
+ n();
565
+ }, r = te.get(o) || {};
566
+ r.buttonClose = !0, te.set(o, r), y(`<button class="button_close_${e.id} close">`, t.doc).appendTo(`.popup_option_${e.id}`).on("click", i);
567
+ }
568
+ const p = String(e.id), l = te.get(p) || {};
569
+ if (l.escKey = !0, te.set(p, l), z.on("keydown", e => {
570
+ const t = e;
571
+ "Escape" !== t.key && 27 !== t.keyCode || n();
572
+ }, {
573
+ ns: `esc-${p}`
574
+ }, t.doc), e.timer > 0) {
575
+ const t = {};
576
+ t[String(`st_${e.id}`)] = setTimeout(() => {
577
+ layerpro.popup.close(e), clearTimeout(t[String(`st_${e.id}`)]);
578
+ }, e.timer);
579
+ }
580
+ e.movable && layerpro.popup.movable(e), e.resizable && layerpro.popup.resizable(e),
581
+ e.isMaximize && layerpro.popup.maximize(e), y(`<div class="popup_internal_${e.id} popup_internal">`, t.doc).appendTo(i),
582
+ y(`<div class="popup_body_${e.id} popup_body">`, t.doc).appendTo(`.popup_internal_${e.id}`).hide().fadeIn(e.fadeIn, () => {
583
+ ne(e, t), ie(e, t), re(e, t);
584
+ });
585
+ }, ne = (e, t = G(e)) => {
302
586
  if (!e.source) return;
303
- const t = g(`.popup_body_${e.id}`), o = String(e.source);
304
- let n;
587
+ const o = v(`.popup_body_${e.id}`, t.doc), n = String(e.source);
588
+ let i;
305
589
  try {
306
- n = new URL(o, window.location.origin);
590
+ i = new URL(n, window.location.origin);
307
591
  } catch {
308
592
  return;
309
593
  }
310
- if (n.origin !== window.location.origin) return;
311
- const i = new AbortController;
312
- N.set(String(e.id), i), fetch(o, {
594
+ if (i.origin !== window.location.origin) return;
595
+ const r = new AbortController;
596
+ ee.set(String(e.id), r), fetch(n, {
313
597
  mode: "same-origin",
314
- signal: i.signal
598
+ signal: r.signal
315
599
  }).then(e => {
316
600
  if ((e.headers.get("content-type") || "").includes("text/html"), !e.ok) throw new Error(`HTTP error! status: ${e.status}`);
317
601
  return e.text();
318
- }).then(o => {
319
- N.get(String(e.id)) && !i.signal.aborted && t?.hide().html(o).fadeIn(e.fadeIn);
602
+ }).then(t => {
603
+ ee.get(String(e.id)) && !r.signal.aborted && o?.hide().html(t).fadeIn(e.fadeIn);
320
604
  }).catch(e => {
321
605
  e.name;
322
606
  });
323
- }, W = e => {
607
+ }, ie = (e, t = G(e)) => {
324
608
  if (e.body && !e.source) {
325
- const t = e.body;
326
- if ("object" == typeof t && null !== t && void 0 !== t.type && "object" == typeof t.props && null !== t.props) {
327
- const t = document.querySelector(".popup_body_" + e.id);
328
- if (!t) return;
329
- "function" == typeof layerpro.popup.useReactAdapter ? layerpro.popup.useReactAdapter(e, t) : import("layerpro/react").then(o => {
330
- const n = o.default;
331
- n && n(e, t);
609
+ const o = e.body;
610
+ if ("object" == typeof o && null !== o && void 0 !== o.type && "object" == typeof o.props && null !== o.props) {
611
+ const o = t.doc.querySelector(".popup_body_" + e.id);
612
+ if (!o) return;
613
+ "function" == typeof layerpro.popup.useReactAdapter ? layerpro.popup.useReactAdapter(e, o) : import("layerpro/react").then(t => {
614
+ const n = t.default;
615
+ n && n(e, o);
332
616
  }).catch(e => {});
333
617
  } else if ("string" == typeof e.body && e.body.trim().startsWith("<")) {
334
- const t = P(e.body);
335
- g(`.popup_body_${e.id}`)?.html(t).fadeIn(e.fadeIn);
618
+ const o = I(e.body);
619
+ v(`.popup_body_${e.id}`, t.doc)?.html(o).fadeIn(e.fadeIn);
336
620
  } else {
337
- const t = P(String(e.body));
338
- g(`.popup_body_${e.id}`)?.text(t).fadeIn(e.fadeIn);
621
+ const o = I(String(e.body));
622
+ v(`.popup_body_${e.id}`, t.doc)?.text(o).fadeIn(e.fadeIn);
339
623
  }
340
624
  }
341
- }, j = e => {
625
+ }, re = (e, t = G(e)) => {
342
626
  if (e.buttons) {
343
- if (y('<div class="buttons"></div>').appendTo(`.popup_body_${e.id}`), e.buttons.confirm) {
344
- const t = P(e.buttons.confirm.text.toUpperCase()), o = y(`<button id="lp_confirm" type="button">\n ${t}\n </button>`).appendTo(`.popup_body_${e.id} .buttons`);
345
- e.buttons.confirm.cb && o.on("click", () => {
627
+ const o = v(`.popup_internal_${e.id}`, t.doc);
628
+ if (!o) return;
629
+ let n = o.children().find(e => e.hasClass("buttons"));
630
+ if (n ? n.html("") : n = y('<div class="buttons"></div>', t.doc).appendTo(o), e.buttons.confirm) {
631
+ const o = I(e.buttons.confirm.text.toUpperCase()), i = y(`<button id="lp_confirm_${e.id}" class="lp_confirm" type="button">\n ${o}\n </button>`, t.doc).appendTo(n);
632
+ e.buttons.confirm.cb && i.on("click", () => {
346
633
  e.buttons?.confirm?.cb?.(), layerpro.popup.close(e);
347
634
  });
348
635
  }
349
636
  if (e.buttons.cancel) {
350
- const t = P(e.buttons.cancel.text.toUpperCase());
351
- y(`<button id="lp_cancel" type="button">\n ${t}\n </button>`).appendTo(`.popup_body_${e.id} .buttons`).on("click", () => {
637
+ const o = I(e.buttons.cancel.text.toUpperCase());
638
+ y(`<button id="lp_cancel_${e.id}" class="lp_cancel" type="button">\n ${o}\n </button>`, t.doc).appendTo(n).on("click", () => {
352
639
  e.buttons?.cancel?.cb?.(), layerpro.popup.close(e);
353
640
  });
354
641
  }
355
642
  }
356
- }, R = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches, D = () => {
643
+ }, se = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches, pe = () => {
357
644
  if (!0 === window.__FORCE_TOUCH_MODE__) return "touch";
358
645
  const e = (() => {
359
646
  if ("undefined" == typeof navigator) return !1;
360
647
  const e = navigator.userAgent;
361
648
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);
362
- })() || R();
649
+ })() || se();
363
650
  return ("ontouchstart" in window || navigator.maxTouchPoints > 0) && e ? "touch" : "mouse";
364
- }, q = D(), B = !R(), X = null;
651
+ }, le = pe(), ce = !se(), ae = null;
365
652
 
366
653
  if ("undefined" != typeof window) {
367
654
  const e = window.matchMedia("(max-width: 1024px)"), t = () => {
368
- const e = D(), t = q, o = !R();
369
- q = e, B !== o && (B = o, X && X(e, t));
655
+ const e = pe(), t = le, o = !se();
656
+ le = e, ce !== o && (ce = o, ae && ae(e, t));
370
657
  };
371
658
  let o;
372
659
  e.addListener ? e.addListener(t) : e.addEventListener("change", t), window.addEventListener("resize", () => {
@@ -374,481 +661,418 @@ if ("undefined" != typeof window) {
374
661
  });
375
662
  }
376
663
 
377
- var Y = e => {
664
+ var de = e => {
378
665
  const t = e;
379
666
  return void 0 !== t.clientX ? t.clientX : t.touches && t.touches.length > 0 ? t.touches[0].clientX : 0;
380
- }, K = e => {
667
+ }, ue = e => {
381
668
  const t = e;
382
669
  return void 0 !== t.clientY ? t.clientY : t.touches && t.touches.length > 0 ? t.touches[0].clientY : 0;
383
- }, F = 250, U = 150, Z = !1, G = 1e3, V = !1, J = 0, Q = new Map, ee = new Map, te = new Map, oe = new Map, ne = null, ie = () => g("body"), se = e => "object" == typeof e && null !== e ? e.id : e, re = {
670
+ }, he = 250, me = 150, fe = !1, _e = 0, ge = new WeakMap, be = new Map, ve = new Map, we = new Map, ye = new Map, ze = new Map, $e = null, ke = (e = K()) => v("body", e.doc), Se = (e, t) => {
671
+ const o = v(".popup_window_" + e, t.doc);
672
+ o && b(o.el);
673
+ }, xe = e => "object" == typeof e && null !== e ? e.id : e, Ce = e => {
674
+ const t = xe(e), o = "object" == typeof e && null !== e ? e.target : void 0;
675
+ if (null != o) {
676
+ const e = Z(o);
677
+ if (e) return e;
678
+ }
679
+ return J(t);
680
+ }, Ee = {
384
681
  open: e => {
385
682
  if (!e) return Promise.reject(new Error("LayerPro: open() requires a props object"));
386
- e.id = e.id ?? "popup_" + ++J, e.body = e.body ?? "", e.class = e.class ?? "", e.width = e.width ?? 340,
387
- e.height = e.height ?? 220, e.minWidth = e.minWidth ?? 340, e.minHeight = e.minHeight ?? 220,
388
- e.name = e.name ?? "popUp_" + e.id, e.source = e.source ?? null, e.icon = e.icon ?? null,
389
- e.iconize = e.iconize ?? null, e.maximize = e.maximize ?? null, e.isMaximize = e.isMaximize ?? null,
390
- e.dockable = e.dockable ?? null, e.close = e.close ?? null, e.modal = e.modal ?? null,
391
- e.movable = e.movable ?? null, e.resizable = e.resizable ?? null, e.store = e.store ?? !1,
392
- e.top = e.top ?? "auto", e.left = e.left ?? "auto", e.right = e.right ?? "auto",
683
+ let t = Z(e.target);
684
+ t || (t = K()), e.id = e.id ?? "popup_" + ++_e, e.body = e.body ?? "", e.class = e.class ?? "",
685
+ e.width = e.width ?? 340, e.height = e.height ?? 220, e.minWidth = e.minWidth ?? 340,
686
+ e.minHeight = e.minHeight ?? 220, e.name = e.name ?? "popUp_" + e.id, e.source = e.source ?? null,
687
+ e.icon = e.icon ?? null, e.iconize = e.iconize ?? null, e.maximize = e.maximize ?? null,
688
+ e.isMaximize = e.isMaximize ?? null, e.dockable = e.dockable ?? null, e.close = e.close ?? null,
689
+ e.modal = e.modal ?? null, e.movable = e.movable ?? null, e.resizable = e.resizable ?? null,
690
+ e.store = e.store ?? !1, e.top = e.top ?? "auto", e.left = e.left ?? "auto", e.right = e.right ?? "auto",
393
691
  e.bottom = e.bottom ?? "auto", e.fadeIn = e.fadeIn ?? 100, e.fadeOut = e.fadeOut ?? 100,
394
- F = e.minWidth, U = e.minHeight, e.width < e.minWidth && (e.width, e.width = e.minWidth),
692
+ e.native = e.native ?? !1, e.persist = e.persist ?? !1, e.closeWithOpener = e.closeWithOpener ?? !1,
693
+ he = e.minWidth, me = e.minHeight, e.width < e.minWidth && (e.width, e.width = e.minWidth),
395
694
  e.height < e.minHeight && (e.height, e.height = e.minHeight), "auto" === e.width && (e.width = "100%"),
396
- "auto" === e.height && (e.height = "100%"), g("#popup") || y('<div id="popup">').appendTo("body").css({
397
- "pointer-events": "none",
398
- "z-index": re.zIndex() + 1
399
- });
400
- const t = String(e.id);
401
- oe.delete(t);
402
- const o = new Promise(e => {
403
- oe.set(t, e);
695
+ "auto" === e.height && (e.height = "100%"), v("#popup", t.doc) || y('<div id="popup">', t.doc).appendTo("body").cssVar("--lp-z-index", Ee.zIndex(t) + 1);
696
+ const o = String(e.id);
697
+ ye.delete(o), ze.set(o, e), ((e, t) => {
698
+ U.set(String(e), t);
699
+ })(o, t);
700
+ const n = new Promise(e => {
701
+ ye.set(o, e);
404
702
  });
405
- return g(".popup_window_" + e.id, "#popup") ? (re.index(e), W(e), j(e)) : (e => {
406
- if ("function" == typeof e.body) return;
407
- const t = !0 === e.modal ? ".popup_modal_" + e.id : "#popup";
408
- v('[class^="popup_window_"]', t).forEach(e => e.removeClass("zHigh")), v('[class^="popup_bar_"]', t).forEach(e => e.removeClass("popup_bar_selected")),
409
- v('[class^="icon_"]', t).forEach(e => e.removeClass("popup_bar_selected")), !0 === e.modal && y(`<div class="popup_modal_${e.id} popup_modal">`).appendTo("#popup").css({
410
- "pointer-events": "auto",
411
- "z-index": layerpro.popup.zIndex() + 1e3
412
- }), y(`<div class="popup_overflow_${e.id} popup_overflow">`).appendTo(t).css({
413
- top: e.top,
414
- left: e.left,
415
- right: e.right,
416
- bottom: e.bottom,
417
- width: e.width,
418
- height: e.height,
419
- minWidth: e.minWidth,
420
- minHeight: e.minHeight,
421
- maxWidth: e.maxWidth,
422
- maxHeight: e.maxHeight,
423
- pointerEvents: "auto",
424
- zIndex: layerpro.popup.zIndex()
425
- }).on("pointerdown", () => {
426
- layerpro.popup.index(e);
427
- }).hide().fadeIn(e.fadeIn);
428
- const o = y(`<div class="popup_window_${e.id} popup_window">`).appendTo(`.popup_overflow_${e.id}`).css({
429
- "pointer-events": "auto"
430
- }).addClass("zHigh").addClass(e.class);
431
- o.attr("role", "dialog"), o.attr("tabindex", "-1"), o.attr("aria-modal", !0 === e.modal ? "true" : "false"),
432
- e.name && o.attr("aria-label", String(e.name)), C(!0), L(), M(String(e.id), o.el),
433
- "function" == typeof requestAnimationFrame ? requestAnimationFrame(() => o.el.focus()) : o.el.focus();
434
- const n = [ e.top, e.left, e.bottom, e.right ].reduce((e, t) => "number" == typeof t && isFinite(t) ? Number(e) + t : e, 0);
435
- if (!0 === e.center || 0 === n) {
436
- const t = v('[class^="popup_overflow_"]', "#popup").length, o = 20 * Math.max(0, t - 1);
437
- layerpro.popup.center(e, o);
438
- }
439
- layerpro.popup.unmount = e => {
440
- import("layerpro/react").then(t => {
441
- const o = t.default;
442
- o.unmount && o.unmount(String(e));
443
- }).catch(() => {});
444
- }, layerpro.popup.cleanupEvents = e => {
445
- const t = O.get(e);
446
- t && (t.iconClick && g(`.icon_${e}`, "#popup_dock")?.off("click"), t.iconClose && g(`.icon_close_${e}`, "#popup_dock")?.off("click"),
447
- t.buttonIconize && g(`.button_iconize_${e}`)?.off("click"), t.buttonMaximize && g(`.button_maximize_${e}`)?.off("click"),
448
- t.buttonClose && g(`.button_close_${e}`)?.off("click"), t.escKey && w.off("keydown", {
449
- ns: `esc-${e}`
450
- }), O.delete(e));
451
- }, layerpro.popup.abortSource = e => {
452
- const t = N.get(e);
453
- t && (t.abort(), N.delete(e));
454
- }, layerpro.popup.destroy = e => {
455
- layerpro.popup.abortSource(e), layerpro.popup.cleanupEvents(e), C(!1);
456
- const t = document.querySelector(`.popup_window_${e}`);
457
- t && t.remove();
458
- }, y(`<div class="popup_bar_${e.id} popup_bar">`).appendTo(o).addClass("popup_bar_selected"),
459
- e.icon && y(`<div class="popup_icon_${e.id} popup_icon">${e.icon}</div>`).appendTo(`.popup_bar_${e.id}`);
460
- const i = P(String(e.name));
461
- y(`<div class="popup_drag_${e.id} popup_drag">${i}</div>`).appendTo(`.popup_bar_${e.id}`),
462
- y(`<div class="popup_option_${e.id} popup_option">`).appendTo(`.popup_bar_${e.id}`),
463
- !0 !== e.iconize || g("#popup_dock") || (g("#root")?.css("margin", "0 0 var( --dock-height ) 0"),
464
- y('\n <div id="popup_dock">\n <div id="popup_dock_icon"></div>\n <div id="popup_dock_list"></div>\n <div id="popup_dock_options"></div>\n </div>\n ').appendTo("#popup").css({
465
- pointerEvents: "auto",
466
- zIndex: layerpro.popup.zIndex() + 1e3
467
- }));
468
- if (g("#popup_dock") && !0 === e.dockable) {
469
- const t = String(e.id), o = `\n <div class="icon_${e.id}">\n <span>${e.icon ? e.icon : ""}</span>\n <span>${i}</span>\n </div>\n `, n = () => {
470
- const t = g(".popup_overflow_" + e.id, "#popup");
471
- t && t.data("iconize") ? (layerpro.popup.index(e), layerpro.popup.iconize(e)) : layerpro.popup.iconize(e),
472
- layerpro.popup.index(e);
473
- }, s = t => {
474
- t?.stopPropagation(), e?.buttons?.cancel?.cb && e?.buttons?.cancel?.cb(), layerpro.popup.close(e);
475
- };
476
- O.set(t, {
477
- iconClick: !0,
478
- iconClose: !0
479
- }), y(o).appendTo("#popup_dock_list").addClass("popup_bar_selected").on("click", n),
480
- y(`<button class="icon_close_${e.id}">X</button>`).appendTo(`.icon_${e.id}`).on("click", s);
481
- }
482
- if (!0 === e.iconize) {
483
- const t = String(e.id), o = () => {
484
- layerpro.popup.iconize(e);
485
- }, n = O.get(t) || {};
486
- n.buttonIconize = !0, O.set(t, n), y(`<button class="button_iconize_${e.id} iconize">`).appendTo(`.popup_option_${e.id}`).on("click", o);
487
- }
488
- if (!0 === e.maximize) {
489
- const t = String(e.id), o = () => {
490
- layerpro.popup.maximize(e);
491
- }, n = O.get(t) || {};
492
- n.buttonMaximize = !0, O.set(t, n), y(`<button class="button_maximize_${e.id} maximize">`).appendTo(`.popup_option_${e.id}`).on("click", o);
493
- }
494
- if (!0 === e.close) {
495
- const t = String(e.id), o = () => {
496
- e?.buttons?.cancel?.cb && e?.buttons?.cancel?.cb(), layerpro.popup.close(e);
497
- }, n = O.get(t) || {};
498
- n.buttonClose = !0, O.set(t, n), y(`<button class="button_close_${e.id} close">`).appendTo(`.popup_option_${e.id}`).on("click", o);
499
- }
500
- const s = String(e.id), r = O.get(s) || {};
501
- if (r.escKey = !0, O.set(s, r), w.on("keydown", t => {
502
- const o = t;
503
- "Escape" !== o.key && 27 !== o.keyCode || (e?.buttons?.cancel?.cb && e?.buttons?.cancel?.cb(),
504
- layerpro.popup.close(e));
505
- }, {
506
- ns: `esc-${s}`
507
- }), e.timer > 0) {
508
- const t = {};
509
- t[String(`st_${e.id}`)] = setTimeout(() => {
510
- layerpro.popup.close(e), clearTimeout(t[String(`st_${e.id}`)]);
511
- }, e.timer);
512
- }
513
- e.movable && layerpro.popup.movable(e), e.resizable && layerpro.popup.resizable(e),
514
- e.isMaximize && layerpro.popup.maximize(e), y(`<div class="popup_internal_${e.id} popup_internal">`).appendTo(o),
515
- y(`<div class="popup_body_${e.id} popup_body">`).appendTo(`.popup_internal_${e.id}`).hide().fadeIn(e.fadeIn, () => {
516
- I(e), W(e), j(e);
517
- });
518
- })(e), o;
703
+ if (!0 === e.native) {
704
+ if (B(e, () => {
705
+ const t = ye.get(o);
706
+ t && (t(e), ye.delete(o));
707
+ })) return n;
708
+ e.native = !1;
709
+ }
710
+ if (v(".popup_window_" + e.id, t.doc) ? (Ee.index(e), ie(e, t), re(e, t)) : oe(e, t),
711
+ !0 === e.persist) {
712
+ const o = (i = String(e.id), R(W(i)));
713
+ o && ((e, t, o) => {
714
+ const n = (o ?? document).querySelector(`.popup_overflow_${e}`);
715
+ !!n && (void 0 !== t.top && n.style.setProperty("--lp-top", `${t.top}px`), void 0 !== t.left && n.style.setProperty("--lp-left", `${t.left}px`),
716
+ void 0 !== t.width && n.style.setProperty("--lp-width", `${t.width}px`), void 0 !== t.height && n.style.setProperty("--lp-height", `${t.height}px`));
717
+ })(String(e.id), o, t.doc);
718
+ }
719
+ var i;
720
+ return n;
519
721
  },
520
722
  store: e => {
521
- null != e && te.set(String(Date.now()), e);
723
+ null != e && we.set(String(Date.now()), e);
522
724
  },
523
725
  show: e => {
524
- const t = e instanceof _ ? e : "string" == typeof e ? g(e) : null;
726
+ const t = e instanceof _ ? e : "string" == typeof e ? v(e) : null;
525
727
  t?.toggle();
526
728
  },
527
729
  vfx: (e, t, o = !1) => {
730
+ const n = e instanceof _ ? e : "string" == typeof e ? v(e) : null, i = n?.el.ownerDocument ?? document;
528
731
  setTimeout(() => {
529
- v('[class^="popup_overflow_"]', "#popup").forEach(e => {
530
- e.css("opacity", !0 === t ? 1 : .5), e.find('[class^="popup_body_"]')?.css({
531
- "content-visibility": !0 === t ? "auto" : "hidden"
532
- });
533
- });
534
- const n = e instanceof _ ? e : "string" == typeof e ? g(e) : null;
535
- n?.css("opacity", 1), !o && n && v('[class^="popup_body_"]', n.el).forEach(e => e.css("content-visibility", "visible"));
732
+ w('[class^="popup_overflow_"]', i).forEach(e => {
733
+ e.toggleClass("popup_dimmed", !0 !== t), e.find('[class^="popup_body_"]')?.toggleClass("popup_content_hidden", !0 !== t);
734
+ }), n?.removeClass("popup_dimmed"), !o && n && w('[class^="popup_body_"]', n.el).forEach(e => e.addClass("popup_content_visible"));
536
735
  }, 1), dispatchEvent(new Event("layerProResize"));
537
736
  },
538
737
  center: (e, t = 0) => {
539
- const o = g(".popup_overflow_" + se(e), "#popup");
540
- o && (o.css("top", Math.max(0, (z.height() - o.outerHeight()) / 2 + z.scrollTop() + t)),
541
- o.css("left", Math.max(0, (z.width() - o.outerWidth()) / 2 + z.scrollLeft() + t)));
738
+ const o = xe(e), n = Ce(e), i = v(".popup_overflow_" + o, n.doc);
739
+ i && (i.cssVar("--lp-top", Math.max(0, ($.height(n.win) - i.outerHeight()) / 2 + $.scrollTop(n.win) + t)),
740
+ i.cssVar("--lp-left", Math.max(0, ($.width(n.win) - i.outerWidth()) / 2 + $.scrollLeft(n.win) + t)));
542
741
  },
543
- checkArea: e => [ Y(e), K(e), z.scrollLeft(), z.scrollTop(), z.height(), z.width() ],
742
+ checkArea: (e, t = K()) => [ de(e), ue(e), $.scrollLeft(t.win), $.scrollTop(t.win), $.height(t.win), $.width(t.win) ],
544
743
  close: e => {
545
744
  let t;
546
745
  if (e) {
547
- t = se(e);
548
- const o = "object" == typeof e && null !== e ? e : void 0;
746
+ t = xe(e);
747
+ const n = "object" == typeof e && null !== e ? e : void 0, i = Ce(e);
748
+ if (o = t, Y.has(String(o))) return void (e => {
749
+ const t = Y.get(String(e));
750
+ !!t && t.close();
751
+ })(t);
752
+ const r = n ?? ze.get(String(t));
753
+ if (!0 === r?.persist) {
754
+ const e = ((e, t) => {
755
+ const o = (t ?? document).querySelector(`.popup_overflow_${e}`);
756
+ return o ? {
757
+ top: o.offsetTop,
758
+ left: o.offsetLeft,
759
+ width: o.offsetWidth,
760
+ height: o.offsetHeight
761
+ } : null;
762
+ })(String(t), i.doc);
763
+ e && ((e, t) => {
764
+ D(W(e), t);
765
+ })(String(t), e);
766
+ }
549
767
  layerpro.popup.unmount && layerpro.popup.unmount(String(t)), layerpro.popup.abortSource && layerpro.popup.abortSource(String(t)),
550
- layerpro.popup.cleanupEvents && layerpro.popup.cleanupEvents(String(t)), A(String(t));
551
- const n = oe.get(String(t));
552
- n && (n(o ?? {}), oe.delete(String(t)));
553
- const i = Q.get(String(t));
554
- if (i) {
768
+ layerpro.popup.cleanupEvents && layerpro.popup.cleanupEvents(String(t)), V(String(t), i.doc);
769
+ const s = ye.get(String(t));
770
+ s && (s(n ?? {}), ye.delete(String(t))), ze.delete(String(t));
771
+ const p = be.get(String(t));
772
+ if (p) {
555
773
  const e = {
556
774
  passive: !1
557
775
  };
558
- i.move && document.removeEventListener("pointermove", i.move, e), i.up && document.removeEventListener("pointerup", i.up, e),
559
- Q.delete(String(t));
776
+ p.move && i.doc.removeEventListener("pointermove", p.move, e), p.up && i.doc.removeEventListener("pointerup", p.up, e),
777
+ be.delete(String(t));
560
778
  }
561
- const s = ee.get(String(t));
562
- if (s) {
779
+ const l = ve.get(String(t));
780
+ if (l) {
563
781
  const e = {
564
782
  passive: !1
565
783
  };
566
- s.move && document.removeEventListener("pointermove", s.move, e), s.up && document.removeEventListener("pointerup", s.up, e),
567
- ee.delete(String(t));
784
+ l.move && i.doc.removeEventListener("pointermove", l.move, e), l.up && i.doc.removeEventListener("pointerup", l.up, e),
785
+ ve.delete(String(t));
568
786
  }
569
- (o ? !0 === o.modal : !!g(".popup_modal_" + t)) ? g(".popup_modal_" + t)?.fadeOut(o?.fadeOut || 500, () => g(".popup_modal_" + t)?.remove()) : g(".popup_overflow_" + t)?.fadeOut(o?.fadeOut || 500, () => {
570
- g(".popup_overflow_" + t)?.remove(), g(".popup_modal_" + t)?.fadeOut(o?.fadeOut || 500, () => g(".popup_modal_" + t)?.remove());
787
+ (n ? !0 === n.modal : !!v(".popup_modal_" + t, i.doc)) ? v(".popup_modal_" + t, i.doc)?.fadeOut(n?.fadeOut || 500, () => {
788
+ Se(String(t), i), v(".popup_modal_" + t, i.doc)?.remove();
789
+ }) : v(".popup_overflow_" + t, i.doc)?.fadeOut(n?.fadeOut || 500, () => {
790
+ Se(String(t), i), v(".popup_overflow_" + t, i.doc)?.remove(), v(".popup_modal_" + t, i.doc)?.fadeOut(n?.fadeOut || 500, () => v(".popup_modal_" + t, i.doc)?.remove());
571
791
  });
572
- } else g("#popup")?.fadeOut(() => g("#popup")?.remove());
573
- setTimeout(() => re.removeDock(e), 300);
792
+ } else (() => {
793
+ for (const e of [ ...Y.values() ]) e.close();
794
+ })(), F().forEach(e => {
795
+ v("#popup", e.doc)?.fadeOut(() => {
796
+ w('[class^="popup_window_"]', e.doc).forEach(e => b(e.el)), v("#popup", e.doc)?.remove(),
797
+ v("#popup_dock", e.doc)?.remove(), O(e.doc);
798
+ });
799
+ });
800
+ var o;
801
+ setTimeout(() => Ee.removeDock(e), 300);
574
802
  },
575
803
  removeDock: e => {
576
- const t = se(e);
577
- g(".icon_" + t)?.remove(), v('[class^="popup_overflow_"]', "#popup").length < 1 && (g("#root")?.css("margin", "0"),
578
- g("#popup_dock")?.remove());
804
+ const t = xe(e), o = Ce(e);
805
+ var n;
806
+ (v(".icon_" + t, o.doc)?.remove(), v(".popup_overflow_" + t, o.doc)) ? setTimeout(() => Ee.removeDock(e), 100) : (n = t,
807
+ U.delete(String(n)), w('[class^="popup_overflow_"]', o.doc).length < 1 && (v("#popup_dock", o.doc)?.remove(),
808
+ O(o.doc)));
579
809
  },
580
810
  iconize: e => {
581
- const t = se(e), o = g(".popup_overflow_" + t, "#popup");
582
- if (o && !1 !== o.find("[class^=popup_window_]")?.hasClass("zHigh")) if (re.vfx(o, !1, !0),
583
- o.data("iconize")) {
584
- if (o.data("iconize")) {
585
- const e = o.data("iconize");
586
- o.css({
587
- top: e.y,
588
- left: e.x,
589
- width: e.w,
590
- height: e.h,
591
- opacity: 1
592
- }), re.vfx(o, !0), o.removeData("iconize");
811
+ const t = xe(e), o = Ce(e), n = v(".popup_overflow_" + t, o.doc);
812
+ if (n && !1 !== n.find("[class^=popup_window_]")?.hasClass("zHigh")) if (Ee.vfx(n, !1, !0),
813
+ n.data("iconize")) {
814
+ if (n.data("iconize")) {
815
+ const e = n.data("iconize");
816
+ n.removeClass("popup_iconized").cssVar("--lp-top", e.y).cssVar("--lp-left", e.x).cssVar("--lp-width", e.w).cssVar("--lp-height", e.h),
817
+ Ee.vfx(n, !0), n.removeData("iconize");
593
818
  }
594
819
  } else {
595
- const e = g(".icon_" + t, "#popup_dock")?.el.offsetLeft ?? 0;
596
- o.data("iconize", {
597
- y: o.el.offsetTop,
598
- x: o.el.offsetLeft,
599
- w: o.el.offsetWidth,
600
- h: o.el.offsetHeight
601
- }), o.css({
602
- top: "100%",
603
- left: e + 15,
604
- width: 0,
605
- height: 0,
606
- opacity: 0
607
- }), re.vfx(o, !0);
820
+ const e = v(".icon_" + t, o.doc)?.el.offsetLeft ?? 0;
821
+ n.data("iconize", {
822
+ y: n.el.offsetTop,
823
+ x: n.el.offsetLeft,
824
+ w: n.el.offsetWidth,
825
+ h: n.el.offsetHeight
826
+ }), n.cssVar("--lp-top", "100%").cssVar("--lp-left", e + 15).addClass("popup_iconized"),
827
+ Ee.vfx(n, !0);
608
828
  }
609
829
  },
610
830
  maximize: e => {
611
- const t = g(".popup_overflow_" + se(e), "#popup"), o = t ? g('[class^="resize_"]', t.el) : null;
612
- if (re.vfx(t, !1, !0), t?.data("store")) {
831
+ const t = v(".popup_overflow_" + xe(e), Ce(e).doc), o = t ? v('[class^="resize_"]', t.el) : null;
832
+ if (Ee.vfx(t, !1, !0), t?.data("store")) {
613
833
  if (t?.data("store")) {
614
834
  const n = t.data("store");
615
- t.css({
616
- position: "absolute",
617
- top: n.y,
618
- left: n.x,
619
- right: "auto",
620
- bottom: "auto",
621
- width: n.w,
622
- height: n.h
623
- }), o?.on("pointerdown", function(t) {
624
- re.resizeModals(t, this, e);
625
- }), re.vfx(t, !0), t.removeData("store");
835
+ t.removeClass("popup_maximized"), t.cssVar("--lp-top", n.y).cssVar("--lp-left", n.x).cssVar("--lp-width", n.w).cssVar("--lp-height", n.h),
836
+ o?.on("pointerdown", function(t) {
837
+ Ee.resizeModals(t, this, e);
838
+ }), Ee.vfx(t, !0), t.removeData("store");
626
839
  }
627
840
  } else t.data("store", {
628
841
  y: t.el.offsetTop,
629
842
  x: t.el.offsetLeft,
630
843
  w: t.el.offsetWidth,
631
844
  h: t.el.offsetHeight
632
- }), t.css({
633
- position: "fixed",
634
- top: -6,
635
- left: -6,
636
- right: -6,
637
- bottom: 39,
638
- width: "auto",
639
- height: "auto"
640
- }), o?.off("pointerdown"), re.vfx(t, !0, !0);
845
+ }), t.addClass("popup_maximized"), o?.off("pointerdown"), Ee.vfx(t, !0, !0);
641
846
  },
642
847
  movable: e => {
643
848
  if (!1 === e.movable) return;
644
- const t = se(e), o = String(t), n = g(".popup_overflow_" + t, "#popup"), i = n ? g(".popup_drag_" + t, n.el) : null, s = n ? g(".popup_body_" + t, n.el) : null;
645
- n?.css("touch-action", "none");
646
- let r = 0, p = 0, a = 0, l = 0;
647
- const c = e => {
849
+ const t = xe(e), o = Ce(e), n = String(t), i = v(".popup_overflow_" + t, o.doc), r = i ? v(".popup_drag_" + t, i.el) : null, s = i ? v(".popup_body_" + t, i.el) : null;
850
+ i?.addClass("lp_no_touch");
851
+ let p = 0, l = 0, c = 0, a = 0;
852
+ const d = e => {
648
853
  e.preventDefault();
649
- const t = Y(e), o = K(e);
650
- r = a - t, p = l - o, a = t, l = o, re.checkArea(e)[1] < re.checkArea(e)[4] && 1 === Math.sign(re.checkArea(e)[1]) && n?.css("top", n.el.offsetTop - p),
651
- re.checkArea(e)[0] < re.checkArea(e)[5] && 1 === Math.sign(re.checkArea(e)[0]) && n?.css("left", n.el.offsetLeft - r);
652
- }, d = () => {
854
+ const t = de(e), n = ue(e);
855
+ p = c - t, l = a - n, c = t, a = n, Ee.checkArea(e, o)[1] < Ee.checkArea(e, o)[4] && 1 === Math.sign(Ee.checkArea(e, o)[1]) && i?.cssVar("--lp-top", i.el.offsetTop - l),
856
+ Ee.checkArea(e, o)[0] < Ee.checkArea(e, o)[5] && 1 === Math.sign(Ee.checkArea(e, o)[0]) && i?.cssVar("--lp-left", i.el.offsetLeft - p);
857
+ }, u = () => {
653
858
  const e = {
654
859
  passive: !1
655
860
  };
656
- document.removeEventListener("pointermove", c, e), document.removeEventListener("pointerup", d, e),
657
- Q.delete(o), s?.css("pointer-events", "auto"), re.vfx(n, !0);
861
+ o.doc.removeEventListener("pointermove", d, e), o.doc.removeEventListener("pointerup", u, e),
862
+ be.delete(n), s?.addClass("lp_pointer"), Ee.vfx(i, !0);
658
863
  };
659
- Q.set(o, {
660
- move: c,
661
- up: d
864
+ be.set(n, {
865
+ move: d,
866
+ up: u
662
867
  });
663
- i?.el.addEventListener("pointerdown", e => {
664
- "fixed" !== n?.el.style.position && (e.preventDefault(), s?.css("pointer-events", "none"),
665
- u(e), re.vfx(n, !1));
868
+ r?.el.addEventListener("pointerdown", e => {
869
+ i?.hasClass("popup_maximized") || (e.preventDefault(), s?.addClass("lp_no_pointer"),
870
+ h(e), Ee.vfx(i, !1));
666
871
  }, {
667
872
  passive: !1
668
- }), e.maximize && i?.on("dblclick", () => {
873
+ }), e.maximize && r?.on("dblclick", () => {
669
874
  layerpro.popup.maximize(e);
670
875
  });
671
- const u = e => {
672
- a = Y(e), l = K(e);
876
+ const h = e => {
877
+ c = de(e), a = ue(e);
673
878
  const t = {
674
879
  passive: !1
675
880
  };
676
- document.addEventListener("pointermove", c, t), document.addEventListener("pointerup", d, t);
881
+ o.doc.addEventListener("pointermove", d, t), o.doc.addEventListener("pointerup", u, t);
677
882
  };
678
883
  },
679
884
  resizable: e => {
680
885
  if (!e.resizable) return;
681
- const t = se(e), o = String(t), n = g(".popup_overflow_" + t, "#popup");
682
- for (let e = 4; e--; ) y(`<div class='resize_${e}'>`).appendTo(n?.el).css("touch-action", "none"),
683
- y(`<div class='resize_corner_${e}'>`).appendTo(n?.el).css("touch-action", "none");
684
- const i = ee.get(o) || {};
685
- i.down = function(t) {
686
- re.resizeModals(t, this, e);
687
- }, ee.set(o, i);
886
+ const t = xe(e), o = Ce(e), n = String(t), i = v(".popup_overflow_" + t, o.doc);
887
+ for (let e = 4; e--; ) y(`<div class='resize_${e}'>`, o.doc).appendTo(i?.el).addClass("lp_no_touch"),
888
+ y(`<div class='resize_corner_${e}'>`, o.doc).appendTo(i?.el).addClass("lp_no_touch");
889
+ const r = ve.get(n) || {};
890
+ r.down = function(t) {
891
+ Ee.resizeModals(t, this, e);
892
+ }, ve.set(n, r);
688
893
  const s = {
689
894
  passive: !1
690
895
  };
691
- v("[class^=resize_]").forEach(t => {
896
+ w("[class^=resize_]", i?.el).forEach(t => {
692
897
  t.el.addEventListener("pointerdown", o => {
693
- o.preventDefault(), re.resizeModals(o, t.el, e);
898
+ o.preventDefault(), Ee.resizeModals(o, t.el, e);
694
899
  }, s);
695
900
  });
696
901
  },
697
902
  resizeModals: (e, t, o) => {
698
- const n = t instanceof HTMLElement ? new _(t) : g(t), i = n?.parent(), s = String(o.id);
699
- i?.el.style.setProperty("transition", "none");
700
- const r = Y(e), p = K(e), a = [ r - z.scrollLeft(), p - z.scrollTop() ];
701
- o.minWidth, ie()?.css("pointer-events", "none"), i?.css("pointer-events", "none"),
702
- re.vfx(i, !1);
703
- const l = e => {
704
- re.doRes(e, t);
705
- }, c = () => {
706
- re.stopRes(t, s);
707
- }, d = ee.get(s) || {};
708
- d.move = l, d.up = c, ee.set(s, d);
709
- const u = {
903
+ const n = Ce(o), i = t instanceof HTMLElement ? new _(t) : v(t), r = i?.parent(), s = String(o.id);
904
+ r?.addClass("lp_no_transition");
905
+ const p = de(e), l = ue(e), c = [ p - $.scrollLeft(n.win), l - $.scrollTop(n.win) ];
906
+ o.minWidth, ke(n)?.addClass("lp_page_locked"), r?.addClass("lp_no_pointer"), Ee.vfx(r, !1);
907
+ const a = e => {
908
+ Ee.doRes(e, t, n);
909
+ }, d = () => {
910
+ Ee.stopRes(t, s, n);
911
+ }, u = ve.get(s) || {};
912
+ u.move = a, u.up = d, ve.set(s, u);
913
+ const h = {
710
914
  passive: !1
711
915
  };
712
- document.addEventListener("pointermove", l, u), document.addEventListener("pointerup", c, u);
713
- const h = i?.position().left ?? 0, m = i?.position().top ?? 0, f = i?.width() ?? 0, b = i?.height() ?? 0;
714
- ne = {
916
+ n.doc.addEventListener("pointermove", a, h), n.doc.addEventListener("pointerup", d, h);
917
+ const m = r?.position().left ?? 0, f = r?.position().top ?? 0, g = r?.width() ?? 0, b = r?.height() ?? 0;
918
+ $e = {
715
919
  id: String(o.id),
716
- startX: a[0],
717
- startY: a[1],
718
- startWidth: f,
920
+ startX: c[0],
921
+ startY: c[1],
922
+ startWidth: g,
719
923
  startHeight: b,
720
- startLeft: h,
721
- startTop: m,
722
- startBottom: m + b + 1,
723
- startRight: h + f + 1
724
- }, Z = t;
924
+ startLeft: m,
925
+ startTop: f,
926
+ startBottom: f + b + 1,
927
+ startRight: m + g + 1
928
+ }, fe = t;
725
929
  },
726
- doRes: (e, t) => {
930
+ doRes: (e, t, o = K()) => {
727
931
  dispatchEvent(new Event("layerProResize"));
728
- const o = t instanceof HTMLElement ? new _(t) : g(t), n = o?.parent(), i = Y(e), s = K(e), r = [ i - z.scrollLeft(), s - z.scrollTop() ];
729
- if (t === Z && ne) {
730
- const t = ne;
731
- let i = t.startWidth + r[0] - t.startX, s = t.startHeight + r[1] - t.startY;
732
- const p = t.startWidth - r[0] + t.startX, a = t.startHeight - r[1] + t.startY;
733
- i <= 0 && (i = 0), s <= 0 && (s = 0), re.checkArea(e)[1] < re.checkArea(e)[4] && 1 === Math.sign(re.checkArea(e)[1]) && o?.hasClass("resize_0") && (n && n.height() <= U && a > U && n.css({
734
- height: Number(U + 1)
735
- }), n && n.height() > U && U <= a && n.css({
736
- top: Number(t.startBottom - a),
737
- height: parseInt(String(a))
738
- })), re.checkArea(e)[0] < re.checkArea(e)[5] && 1 === Math.sign(re.checkArea(e)[0]) && o?.hasClass("resize_1") && (n && n.width() >= F && n.css({
739
- width: Number(i),
740
- right: Number(t.startLeft - i)
741
- }), n && n.width() <= F && n.css({
742
- width: Number(F + 1)
743
- })), re.checkArea(e)[1] < re.checkArea(e)[4] && 1 === Math.sign(re.checkArea(e)[1]) && o?.hasClass("resize_2") && (n && n.height() >= U && n.css({
932
+ const n = t instanceof HTMLElement ? new _(t) : v(t), i = n?.parent(), r = de(e), s = ue(e), p = [ r - $.scrollLeft(o.win), s - $.scrollTop(o.win) ];
933
+ if (t === fe && $e) {
934
+ const t = $e;
935
+ let r = t.startWidth + p[0] - t.startX, s = t.startHeight + p[1] - t.startY;
936
+ const l = t.startWidth - p[0] + t.startX, c = t.startHeight - p[1] + t.startY;
937
+ r <= 0 && (r = 0), s <= 0 && (s = 0), Ee.checkArea(e, o)[1] < Ee.checkArea(e, o)[4] && 1 === Math.sign(Ee.checkArea(e, o)[1]) && n?.hasClass("resize_0") && (i && i.height() <= me && c > me && i.geom({
938
+ height: Number(me + 1)
939
+ }), i && i.height() > me && me <= c && i.geom({
940
+ top: Number(t.startBottom - c),
941
+ height: parseInt(String(c))
942
+ })), Ee.checkArea(e, o)[0] < Ee.checkArea(e, o)[5] && 1 === Math.sign(Ee.checkArea(e, o)[0]) && n?.hasClass("resize_1") && (i && i.width() >= he && i.geom({
943
+ width: Number(r),
944
+ right: Number(t.startLeft - r)
945
+ }), i && i.width() <= he && i.geom({
946
+ width: Number(he + 1)
947
+ })), Ee.checkArea(e, o)[1] < Ee.checkArea(e, o)[4] && 1 === Math.sign(Ee.checkArea(e, o)[1]) && n?.hasClass("resize_2") && (i && i.height() >= me && i.geom({
744
948
  height: Number(s)
745
- }), n && n.height() <= U && s > U && n.css({
746
- height: Number(U + 1)
747
- })), re.checkArea(e)[0] < re.checkArea(e)[5] && 1 === Math.sign(re.checkArea(e)[0]) && o?.hasClass("resize_3") && (n && n.width() <= F && p > F && n.css({
748
- width: Number(F + 1)
749
- }), n && n.width() > F && F <= p && n.css({
750
- width: parseInt(String(p)),
751
- left: Number(t.startRight - p)
752
- })), re.checkArea(e)[1] < re.checkArea(e)[4] && re.checkArea(e)[0] < re.checkArea(e)[5] && 1 === Math.sign(re.checkArea(e)[0]) && 1 === Math.sign(re.checkArea(e)[1]) && (o?.hasClass("resize_corner_0") && (n && n.height() >= U && a > U && n.css({
753
- top: Number(t.startBottom - a),
754
- height: parseInt(String(a))
755
- }), n && n.height() <= U && a > U && n.css({
756
- height: Number(U + 1)
757
- }), n && n.width() >= F && p > F && n.css({
758
- width: parseInt(String(p)),
759
- left: Number(t.startRight - p)
760
- }), n && n.width() <= F && p > F && n.css({
761
- width: Number(F + 1)
762
- })), o?.hasClass("resize_corner_1") && (n && n.height() >= U && a > U && n.css({
763
- top: Number(t.startBottom - a),
764
- height: Number(a)
765
- }), n && n.height() <= U && a > U && n.css({
766
- height: Number(U + 1)
767
- }), n && n.width() >= F && n.css({
768
- width: Number(i),
769
- right: Number(t.startLeft - i)
770
- }), n && n.width() <= F && p > F && n.css({
771
- width: Number(F + 1)
772
- })), o?.hasClass("resize_corner_2") && (n && n.height() >= U && n.css({
949
+ }), i && i.height() <= me && s > me && i.geom({
950
+ height: Number(me + 1)
951
+ })), Ee.checkArea(e, o)[0] < Ee.checkArea(e, o)[5] && 1 === Math.sign(Ee.checkArea(e, o)[0]) && n?.hasClass("resize_3") && (i && i.width() <= he && l > he && i.geom({
952
+ width: Number(he + 1)
953
+ }), i && i.width() > he && he <= l && i.geom({
954
+ width: parseInt(String(l)),
955
+ left: Number(t.startRight - l)
956
+ })), Ee.checkArea(e, o)[1] < Ee.checkArea(e, o)[4] && Ee.checkArea(e, o)[0] < Ee.checkArea(e, o)[5] && 1 === Math.sign(Ee.checkArea(e, o)[0]) && 1 === Math.sign(Ee.checkArea(e, o)[1]) && (n?.hasClass("resize_corner_0") && (i && i.height() >= me && c > me && i.geom({
957
+ top: Number(t.startBottom - c),
958
+ height: parseInt(String(c))
959
+ }), i && i.height() <= me && c > me && i.geom({
960
+ height: Number(me + 1)
961
+ }), i && i.width() >= he && l > he && i.geom({
962
+ width: parseInt(String(l)),
963
+ left: Number(t.startRight - l)
964
+ }), i && i.width() <= he && l > he && i.geom({
965
+ width: Number(he + 1)
966
+ })), n?.hasClass("resize_corner_1") && (i && i.height() >= me && c > me && i.geom({
967
+ top: Number(t.startBottom - c),
968
+ height: Number(c)
969
+ }), i && i.height() <= me && c > me && i.geom({
970
+ height: Number(me + 1)
971
+ }), i && i.width() >= he && i.geom({
972
+ width: Number(r),
973
+ right: Number(t.startLeft - r)
974
+ }), i && i.width() <= he && l > he && i.geom({
975
+ width: Number(he + 1)
976
+ })), n?.hasClass("resize_corner_2") && (i && i.height() >= me && i.geom({
773
977
  height: Number(s)
774
- }), n && n.height() <= U && s > U && n.css({
775
- height: Number(U + 1)
776
- }), n && n.width() >= F && n.css({
777
- width: Number(i),
778
- right: Number(t.startLeft - i)
779
- }), n && n.width() <= F && n.css({
780
- width: Number(F + 1)
781
- })), o?.hasClass("resize_corner_3") && (n && n.height() >= U && s > U && n.css({
978
+ }), i && i.height() <= me && s > me && i.geom({
979
+ height: Number(me + 1)
980
+ }), i && i.width() >= he && i.geom({
981
+ width: Number(r),
982
+ right: Number(t.startLeft - r)
983
+ }), i && i.width() <= he && i.geom({
984
+ width: Number(he + 1)
985
+ })), n?.hasClass("resize_corner_3") && (i && i.height() >= me && s > me && i.geom({
782
986
  height: Number(s)
783
- }), n && n.height() <= U && s > U && n.css({
784
- height: Number(U + 1)
785
- }), n && n.width() >= F && p > F && n.css({
786
- width: Number(p),
787
- left: Number(t.startRight - p)
788
- }), n && n.width() <= F && p > F && n.css({
789
- width: Number(F + 1)
987
+ }), i && i.height() <= me && s > me && i.geom({
988
+ height: Number(me + 1)
989
+ }), i && i.width() >= he && l > he && i.geom({
990
+ width: Number(l),
991
+ left: Number(t.startRight - l)
992
+ }), i && i.width() <= he && l > he && i.geom({
993
+ width: Number(he + 1)
790
994
  })));
791
995
  }
792
996
  },
793
- stopRes: (e, t) => {
794
- const o = e instanceof HTMLElement ? new _(e) : g(e), n = o?.parent();
795
- n?.el.style.setProperty("transition", ""), o?.el.style.setProperty("transition", ""),
796
- ie()?.css("pointer-events", "auto"), n?.css("pointer-events", "auto"), re.vfx(n, !0),
797
- Z = !1, ne?.id === t && (ne = null);
798
- const i = ee.get(t);
799
- if (i) {
997
+ stopRes: (e, t, o = K()) => {
998
+ const n = e instanceof HTMLElement ? new _(e) : v(e), i = n?.parent();
999
+ i?.removeClass("lp_no_transition"), n?.removeClass("lp_no_transition"), ke(o)?.removeClass("lp_page_locked"),
1000
+ i?.removeClass("lp_no_pointer"), Ee.vfx(i, !0), fe = !1, $e?.id === t && ($e = null);
1001
+ const r = ve.get(t);
1002
+ if (r) {
800
1003
  const e = {
801
1004
  passive: !1
802
1005
  };
803
- i.move && document.removeEventListener("pointermove", i.move, e), i.up && document.removeEventListener("pointerup", i.up, e),
804
- ee.delete(t);
1006
+ r.move && o.doc.removeEventListener("pointermove", r.move, e), r.up && o.doc.removeEventListener("pointerup", r.up, e),
1007
+ ve.delete(t);
805
1008
  }
806
1009
  },
807
1010
  index: e => {
808
- const t = se(e);
809
- v('[class^="popup_window_"]', "#popup").forEach(e => e.removeClass("zHigh")), v('[class^="popup_bar_"]', "#popup").forEach(e => e.removeClass("popup_bar_selected")),
810
- v('[class^="icon_"]', "#popup").forEach(e => e.removeClass("popup_bar_selected")),
811
- g(".icon_" + t, "#popup")?.addClass("popup_bar_selected"), g(".popup_overflow_" + t, "#popup")?.css("zIndex", re.zIndex()),
812
- g(".popup_bar_" + t, "#popup")?.addClass("popup_bar_selected"), g(".popup_window_" + t, "#popup")?.addClass("zHigh");
1011
+ const t = xe(e), o = Ce(e);
1012
+ w('[class^="popup_window_"]', o.doc).forEach(e => e.removeClass("zHigh")), w('[class^="popup_bar_"]', o.doc).forEach(e => e.removeClass("popup_bar_selected")),
1013
+ w('[class^="icon_"]', o.doc).forEach(e => e.removeClass("popup_bar_selected")),
1014
+ v(".icon_" + t, o.doc)?.addClass("popup_bar_selected"), v(".popup_overflow_" + t, o.doc)?.cssVar("--lp-z-index", Ee.zIndex(o)),
1015
+ v(".popup_bar_" + t, o.doc)?.addClass("popup_bar_selected"), v(".popup_window_" + t, o.doc)?.addClass("zHigh");
813
1016
  },
814
- zIndex: () => {
815
- if (!V) {
816
- V = !0;
1017
+ zIndex: (e = K()) => {
1018
+ let t = ge.get(e.doc);
1019
+ if (!t) {
1020
+ let o = 1e3;
817
1021
  try {
818
- const e = getComputedStyle(document.documentElement).getPropertyValue("--popup-z-index").trim();
819
- if (e) {
820
- const t = parseInt(e, 10);
821
- isNaN(t) || (G = t);
1022
+ const t = e.doc.defaultView, n = t ? t.getComputedStyle(e.doc.documentElement).getPropertyValue("--popup-z-index").trim() : "";
1023
+ if (n) {
1024
+ const e = parseInt(n, 10);
1025
+ isNaN(e) || (o = e);
822
1026
  }
823
1027
  } catch {}
1028
+ t = {
1029
+ counter: o
1030
+ }, ge.set(e.doc, t);
824
1031
  }
825
- return ++G;
1032
+ return ++t.counter;
826
1033
  }
827
1034
  };
828
1035
 
829
1036
  Object.defineProperty(layerpro, "popup", {
830
- value: re,
1037
+ value: Ee,
1038
+ writable: !1,
1039
+ configurable: !1
1040
+ }), Object.defineProperty(layerpro, "window", {
1041
+ value: e => {
1042
+ const t = () => Z(e);
1043
+ return {
1044
+ id: e,
1045
+ get win() {
1046
+ return t()?.win ?? null;
1047
+ },
1048
+ get doc() {
1049
+ return t()?.doc ?? null;
1050
+ },
1051
+ popup: {
1052
+ open: t => (t.target = e, Ee.open(t)),
1053
+ close: e => Ee.close(e),
1054
+ center: (e, t) => Ee.center(e, t),
1055
+ maximize: e => Ee.maximize(e),
1056
+ iconize: e => Ee.iconize(e),
1057
+ index: e => Ee.index(e)
1058
+ }
1059
+ };
1060
+ },
831
1061
  writable: !1,
832
1062
  configurable: !1
833
- }), globalThis.popup = re, Object.defineProperty(window, "popup", {
1063
+ }), globalThis.popup = Ee, Object.defineProperty(window, "popup", {
834
1064
  enumerable: !1
835
1065
  });
836
1066
 
837
- var pe = {
838
- "&": "&amp;",
839
- "<": "&lt;",
840
- ">": "&gt;",
841
- '"': "&quot;",
842
- "'": "&#39;"
843
- }, ae = e => e.replace(/[&<>"']/g, e => pe[e]);
1067
+ var Le = 0, Te = e => 1 === (Le += 1) ? e : `${e}_${Le}`;
844
1068
 
845
1069
  Object.defineProperties(layerpro, {
846
1070
  prompt: {
847
- value: (e, t) => {
848
- const o = ae(String(e)), n = {
1071
+ value: (e, t, o) => {
1072
+ const n = I(String(e)), i = {
849
1073
  value: ""
850
- }, i = {
851
- id: "__prompt",
1074
+ }, r = {
1075
+ id: Te("__prompt"),
852
1076
  name: "Prompt",
853
1077
  icon: "&#9998;",
854
1078
  width: 380,
@@ -860,26 +1084,29 @@ Object.defineProperties(layerpro, {
860
1084
  dockable: !1,
861
1085
  modal: !0,
862
1086
  movable: !0,
863
- resizable: !1
864
- }, s = layerpro.popup.open(i), r = `\n <div class='popup_prompt'>\n\n <div class="popup_message_body">\n <center>\n ${o}\n </center>\n </div>\n\n <input id="input_${i.id}" type="text" placeholder="write here" />\n <br/>\n\n <div class="buttons">\n <button id="a_${i.id}" type="button">OK</button>\n <button id="b_${i.id}" type="button">CANCEL</button>\n </div>\n\n </div>\n `;
865
- g(".popup_body_" + i.id)?.html(r);
866
- const p = g("#input_" + i.id);
867
- return t && p?.val(t), p?.on("focus", () => {
868
- p.attr("placeholder", "");
1087
+ resizable: !1,
1088
+ target: o?.target ?? null
1089
+ }, s = layerpro.popup.open(r), p = J(r.id), l = `\n <div class='popup_prompt'>\n\n <div class="popup_message_body">\n <center>\n ${n}\n </center>\n </div>\n\n <input id="input_${r.id}" type="text" placeholder="write here" />\n <br/>\n\n <div class="buttons">\n <button id="a_${r.id}" type="button">OK</button>\n <button id="b_${r.id}" type="button">CANCEL</button>\n </div>\n\n </div>\n `;
1090
+ v(".popup_body_" + r.id, p.doc)?.html(l);
1091
+ const c = v("#input_" + r.id, p.doc);
1092
+ return t && c?.val(t), c?.on("focus", () => {
1093
+ c.attr("placeholder", "");
869
1094
  })?.on("blur", () => {
870
- p.attr("placeholder", "write here");
871
- }), g("#a_" + i.id)?.on("click", () => {
872
- const e = p?.val() ?? "";
873
- String(e) > "" ? (n.value = String(e), layerpro.popup.close(i)) : layerpro.alert("input can't be empty!");
874
- }), g("#b_" + i.id)?.on("click", () => {
875
- n.value = "", layerpro.popup.close(i);
876
- }), s.then(() => n.value);
1095
+ c.attr("placeholder", "write here");
1096
+ }), v("#a_" + r.id, p.doc)?.on("click", () => {
1097
+ const e = c?.val() ?? "";
1098
+ String(e) > "" ? (i.value = String(e), layerpro.popup.close(r)) : layerpro.alert("input can't be empty!", {
1099
+ target: o?.target
1100
+ });
1101
+ }), v("#b_" + r.id, p.doc)?.on("click", () => {
1102
+ i.value = "", layerpro.popup.close(r);
1103
+ }), s.then(() => i.value);
877
1104
  }
878
1105
  },
879
1106
  alert: {
880
- value: e => {
881
- const t = ae(String(e)), o = {
882
- id: "__alert",
1107
+ value: (e, t) => {
1108
+ const o = I(String(e)), n = {
1109
+ id: Te("__alert"),
883
1110
  name: "Warning",
884
1111
  icon: "&#9888;",
885
1112
  width: 380,
@@ -891,17 +1118,18 @@ Object.defineProperties(layerpro, {
891
1118
  dockable: !1,
892
1119
  modal: !0,
893
1120
  movable: !0,
894
- resizable: !1
895
- }, n = layerpro.popup.open(o), i = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + o.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
896
- return g(".popup_body_" + o.id)?.html(i), g("#a_" + o.id)?.on("click", () => {
897
- layerpro.popup.close(o);
898
- }), n.then(() => {});
1121
+ resizable: !1,
1122
+ target: t?.target ?? null
1123
+ }, i = layerpro.popup.open(n), r = J(n.id), s = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${o}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + n.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
1124
+ return v(".popup_body_" + n.id, r.doc)?.html(s), v("#a_" + n.id, r.doc)?.on("click", () => {
1125
+ layerpro.popup.close(n);
1126
+ }), i.then(() => {});
899
1127
  }
900
1128
  },
901
1129
  message: {
902
- value: e => {
903
- const t = ae(String(e)), o = {
904
- id: "__message",
1130
+ value: (e, t) => {
1131
+ const o = I(String(e)), n = {
1132
+ id: Te("__message"),
905
1133
  name: "Message",
906
1134
  icon: "&#9965;",
907
1135
  width: 380,
@@ -913,19 +1141,20 @@ Object.defineProperties(layerpro, {
913
1141
  dockable: !1,
914
1142
  modal: !0,
915
1143
  movable: !0,
916
- resizable: !1
917
- }, n = layerpro.popup.open(o), i = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + o.id}" type="button">OK</button>\n </div>\n </div>\n `;
918
- return g(".popup_body_" + o.id)?.html(i), g("#a_" + o.id)?.on("click", () => {
919
- layerpro.popup.close(o);
920
- }), n.then(() => {});
1144
+ resizable: !1,
1145
+ target: t?.target ?? null
1146
+ }, i = layerpro.popup.open(n), r = J(n.id), s = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${o}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + n.id}" type="button">OK</button>\n </div>\n </div>\n `;
1147
+ return v(".popup_body_" + n.id, r.doc)?.html(s), v("#a_" + n.id, r.doc)?.on("click", () => {
1148
+ layerpro.popup.close(n);
1149
+ }), i.then(() => {});
921
1150
  }
922
1151
  },
923
1152
  confirm: {
924
- value: e => {
925
- const t = ae(String(e)), o = {
1153
+ value: (e, t) => {
1154
+ const o = I(String(e)), n = {
926
1155
  value: !1
927
- }, n = {
928
- id: "__confirm",
1156
+ }, i = {
1157
+ id: Te("__confirm"),
929
1158
  name: "Confirm",
930
1159
  icon: "&#9745;",
931
1160
  width: 380,
@@ -937,13 +1166,14 @@ Object.defineProperties(layerpro, {
937
1166
  dockable: !1,
938
1167
  modal: !0,
939
1168
  movable: !0,
940
- resizable: !1
941
- }, i = layerpro.popup.open(n), s = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + n.id}" type="button">CONFIRM</button>\n <button id="${"b_" + n.id}" type="button">CANCEL</button>\n </div>\n </div>\n `;
942
- return g(".popup_body_" + n.id)?.html(s), g("#a_" + n.id)?.on("click", () => {
943
- o.value = !0, layerpro.popup.close(n);
944
- }), g("#b_" + n.id)?.on("click", () => {
945
- o.value = !1, layerpro.popup.close(n);
946
- }), i.then(() => o.value);
1169
+ resizable: !1,
1170
+ target: t?.target ?? null
1171
+ }, r = layerpro.popup.open(i), s = J(i.id), p = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${o}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + i.id}" type="button">CONFIRM</button>\n <button id="${"b_" + i.id}" type="button">CANCEL</button>\n </div>\n </div>\n `;
1172
+ return v(".popup_body_" + i.id, s.doc)?.html(p), v("#a_" + i.id, s.doc)?.on("click", () => {
1173
+ n.value = !0, layerpro.popup.close(i);
1174
+ }), v("#b_" + i.id, s.doc)?.on("click", () => {
1175
+ n.value = !1, layerpro.popup.close(i);
1176
+ }), r.then(() => n.value);
947
1177
  }
948
1178
  },
949
1179
  installGlobals: {
@@ -955,20 +1185,22 @@ Object.defineProperties(layerpro, {
955
1185
  }
956
1186
  });
957
1187
 
958
- X = (e, t) => {
959
- v('[class^="popup_overflow_"]').forEach(e => {
960
- const t = e.el.className.match(/popup_overflow_(\d+)/);
961
- t && t[1] && layerpro.popup.close({
962
- id: t[1],
963
- fadeOut: 0
1188
+ ae = (e, t) => {
1189
+ F().forEach(e => {
1190
+ w('[class^="popup_overflow_"]', e.doc).forEach(e => {
1191
+ const t = e.el.className.match(/popup_overflow_(\d+)/);
1192
+ t && t[1] && layerpro.popup.close({
1193
+ id: t[1],
1194
+ fadeOut: 0
1195
+ });
964
1196
  });
965
1197
  });
966
1198
  };
967
1199
 
968
- var le = globalThis.layerpro;
1200
+ var Me = globalThis.layerpro;
969
1201
 
970
- le.setProps(le, {
1202
+ Me.setProps(Me, {
971
1203
  configurable: !1,
972
1204
  enumerable: !1,
973
1205
  writable: !1
974
- }), Object.freeze(le);
1206
+ }), Object.freeze(Me);