@ninebone/util 1.0.41 → 1.0.43

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.
@@ -1,2 +1,2 @@
1
- !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("react-dom/client")):"function"==typeof define&&define.amd?define(["exports","react","react-dom/client"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self)["nine-util"]={},t.React,t.ReactDOMClient)}(this,function(t,n,e){"use strict";var o,i,s,r,a,l,c,d,h,u,p,f,g,m,v,y,w,b,x,$,k,E,S,M,L,C=Object.defineProperty,R=t=>{throw TypeError(t)},D=(t,n,e)=>((t,n,e)=>n in t?C(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e)(t,"symbol"!=typeof n?n+"":n,e),A=(t,n,e)=>n.has(t)||R("Cannot "+e),O=(t,n,e)=>(A(t,n,"read from private field"),e?e.call(t):n.get(t)),_=(t,n,e)=>n.has(t)?R("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,e),T=(t,n,e,o)=>(A(t,n,"write to private field"),o?o.call(t,e):n.set(t,e),e),B=(t,n,e)=>(A(t,n,"access private method"),e);const N=new Set,z={ux:{nativeOverride:!1,theme:"light"},board:{readOnly:!1},cssPath:"",debug:!1};"undefined"==typeof window||window.__NINE_GLOBAL_CONFIG__||(window.__NINE_GLOBAL_CONFIG__=z);const P="undefined"!=typeof window?window.__NINE_GLOBAL_CONFIG__:z,W=t=>(N.add(t),t("all",P),()=>N.delete(t)),j=new Proxy(P,{set:(t,n,e)=>(t[n]=e,N.forEach(e=>e(n,t)),!0),get:(t,n)=>t[n]}),Y={config:j,get cssPath(){return this.config.cssPath||""},setup(t={}){Object.entries(t).forEach(([t,n])=>{"object"!=typeof n||null===n||Array.isArray(n)?this.config[t]=n:this.config[t]={...this.config[t],...n}}),"undefined"!=typeof window&&(window.nine=window.nine||this)}};let I=(a=class{constructor(t=null,n="green"){_(this,s),_(this,o),_(this,i),T(this,o,t),T(this,i,n)}init(t,n="green"){return T(this,o,t),T(this,i,n),this}get log(){if(!B(this,s,r).call(this))return()=>{};const t=`color: ${O(this,i)}; font-weight: bold;`;return O(this,o)?console.log.bind(console,`%c[${O(this,o)}]`,t):console.log.bind(console)}get warn(){return B(this,s,r).call(this)?O(this,o)?console.warn.bind(console,`%c[${O(this,o)}]`,"color: cyan; font-weight: bold;"):console.warn.bind(console):()=>{}}get error(){return O(this,o)?console.error.bind(console,`%c[${O(this,o)}]`,"color: red; font-weight: bold;"):console.error.bind(console)}},o=new WeakMap,i=new WeakMap,s=new WeakSet,r=function(){if(nine&&nine.config&&nine.config.debug){const t=nine.config.debug;return!1!==t.enable&&(!0===t.enable&&Array.isArray(t.filter)&&O(this,o)?t.filter.includes(O(this,o)):t.enable)}return"undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname||window.location.hostname.startsWith("192.168."))},a);const H=new I;"undefined"!=typeof window&&(window.trace=H);l=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakSet,u=function(){if(0===O(this,c).length)return;const t=O(this,c).splice(0,O(this,c).length),n=new Set;t.forEach(t=>{const e=`${t.func.name}_${JSON.stringify(t.args)}`;n.has(e)||(t.func(...t.args),n.add(e))}),T(this,l,null)};class q extends H.constructor{constructor(){super(),this.init("nine-util","green")}}const F=new q;class X{static show(){let t=document.getElementById("global-loading-overlay");if(!t&&(t=document.createElement("div"),t.id="global-loading-overlay",t.style.cssText="\n position: fixed; inset: 0; z-index: 9999;\n background: rgba(0, 0, 0, 0.4); display: flex; \n justify-content: center; align-items: center;\n backdrop-filter: blur(2px);\n ",t.innerHTML='<div class="loading-spinner"></div>',document.body.appendChild(t),!document.getElementById("nine-util-style"))){const t=document.createElement("style");t.id="nine-util-style",t.innerHTML="\n .loading-spinner {\n width: 48px; height: 48px;\n border: 5px solid rgba(255, 255, 255, 0.3);\n border-top-color: white; border-radius: 50%;\n animation: nine-spin 1s linear infinite;\n }\n @keyframes nine-spin { to { transform: rotate(360deg); } }\n ",document.head.appendChild(t)}t.style.display="flex"}static hide(){const t=document.getElementById("global-loading-overlay");t&&(t.style.display="none")}}const U=class{};p=new WeakMap,D(U,"BASE_URL",window.__API_BASE_URL__||""),_(U,p,(t,n,e={},o={},i=!0)=>{const s=n.startsWith("http")?n:`${U.BASE_URL}${n}`;i&&X.show();const r={...o},a=localStorage.getItem("accessToken");!a||r.Authorization||r.authorization||(r.Authorization=`Bearer ${a}`),e instanceof FormData||(r["Content-Type"]="application/json");const l={method:t,headers:r};let c=s;return"GET"===t?c+=`?${new URLSearchParams(e)}`:l.body=e instanceof FormData?e:JSON.stringify(e),fetch(c,l).then(async t=>{if(!t.ok){const n=(await t.json().catch(()=>({}))).message||`API 오류 (${t.status})`;throw 400===t.status?null==nine||nine.alert(n).rgb().shake():console.error("시스템 오류:",n),new Error(n)}return t.json()}).catch(n=>{throw F.error(`[IdeFetch.${t.toLowerCase()}] ${s} 실패:`,n),n}).finally(()=>{i&&X.hide()})}),D(U,"get",(t,n={},e={},o=!0)=>{var i;return O(i=U,p).call(i,"GET",t,n,e,o)}),D(U,"post",(t,n={},e={},o=!0)=>{var i;return O(i=U,p).call(i,"POST",t,n,e,o)}),D(U,"postMultipart",async(t,n=[],e={})=>{const{fileKey:o="fileContents",filePartName:i="files",jsonPartName:s="dataList",chunkSize:r=10}=e,a=Array.isArray(n)?n:[n];X.show();let l=0,c=null;return(async()=>{let e=0;for(let d=0;d<a.length;d+=r){const h=new FormData,u=a.slice(d,d+r),p=[];u.forEach((t,n)=>{const{[o]:s,...r}=t,a=Array.isArray(s)?s:[s],l=[];a.forEach(t=>{t instanceof File&&(h.append(i,t),l.push(e++))}),p.push({...r,fileIndices:l})});const f=new Blob([JSON.stringify(Array.isArray(n)?p:p[0])],{type:"application/json"});if(h.append(s,f),c=await U.post(t,h,!1),!c||!c.success&&"OK"!==c.status)throw new Error(`청크 전송 실패: ${d}번째 섹션`);l+=u.length}return{...c,success:!0,totalCount:l}})().finally(()=>X.hide())}),D(U,"postOneMultipart",async(t,n={},e={})=>{const{fileKey:o="fileContents",jsonPartName:i="dataList"}=e;X.show();try{const e=new FormData,{[o]:s,...r}=n,a=(t,n)=>{Array.isArray(n)?n.forEach(n=>a(t,n)):n instanceof File?e.append(t,n):n&&"object"==typeof n&&Object.entries(n).forEach(([t,n])=>a(t,n))};s&&"object"==typeof s&&Object.entries(s).forEach(([t,n])=>{a(t,n)});const l=new Blob([JSON.stringify(r)],{type:"application/json"});e.append(i,l);const c=await U.post(t,e,!1);if(c&&(c.success||"OK"===c.status))return{...c,success:!0};throw new Error("전송 실패")}catch(s){throw F.error("[postOneMultipart] Error:",s),s}finally{X.hide()}}),D(U,"postMultipart_BAK",async(t,n=[],e={})=>{const{fileKey:o="fileContents",filePartName:i="files",jsonPartName:s="dataList",chunkSize:r=10}=e;X.show();let a=0,l=null;return(async()=>{for(let e=0;e<n.length;e+=r){const c=new FormData,d=n.slice(e,e+r),h=[];d.forEach(t=>{const{[o]:n,_fileObj:e,...s}=t;h.push(s),n instanceof File&&c.append(i,n)});const u=new Blob([JSON.stringify(h)],{type:"application/json"});if(c.append(s,u),l=await U.post(t,c,!1),!l||!l.success&&"OK"!==l.status)throw new Error(`청크 전송 실패: ${e}번째 섹션`);a+=d.length}return{...l,success:!0,totalCount:a}})().catch(t=>{throw F.error("[postChunk] Error:",t),t}).finally(()=>{X.hide()})});let K=U;const G=K,J='\n\tdialog::backdrop {\n\t\tbackground: rgba(0, 0, 0, 0.3);\n\t}\n\t\n\tdialog:modal {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tpadding: 0;\n\t\toverflow: hidden;\n\t\tborder: 1px solid darkgreen;\n\t\toutline: none;\n\t\tresize: both;\n\t\tbox-shadow: 0 0 4px 0 darkgreen;\n width: 500px;\n height: fit-content;\n min-width: 330px;\n min-height: 60px;\n max-height: 100%;\n }\n \n \n \n \n\tdiv.head .rect1, div.head .rect2, div.head .rect3 {\n\t\tdisplay: none;\n\t\twidth: 50px;\n\t\theight: 100%;\n\t}\n\tdiv.head .rect1 {\n\t\tbackground-color: red;\n\t}\n\tdiv.head .rect2 {\n\t\tbackground-color: darkgreen;\n\t}\n\tdiv.head .rect3 {\n\t\tbackground-color: olive;\n\t}\n\t\n\tdiv.head {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t--height: 30px;\n\t\tbackground-color: darkgreen;\n\t\tpadding: 4px;\n\t\tcursor: move;\n\t}\n\tdiv.head:hover {\n\t\tfilter: brightness(110%);\n\t}\n\t\n\tdiv.head span {\n\t\tfont-size: 12px;\n\t\tposition: relative;\n\t}\n\t\n\tdiv.head span.title {\n\t\tcolor: #ddd;\n\t\tmargin-left: 4px;\n\t\tfont-weight: bold;\n\t}\n\t\n\tdiv.head span.sub-title {\n\t\tcolor: #ccc;\n\t\tmargin-left: 8px;\n\t\tfont-style: italic;\n\t}\n\t\n\tdiv.head form {\n\t\tmargin: 0;\n\t}\n\tdiv.head button {\n\t\tmargin-right: 4px;\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tcolor: #ccc;\n\t\tfont-size: x-small;\n\t}\n\tdiv.head button:hover {\n\t\tcursor: pointer;\n\t}\n\t\n\tdiv.contents {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden;\n\t\tbackground-color: white;\n\t\tcolor: #333;\n\t}\n\tdiv.left {\n\t\tposition: relative;\n\t\twidth: 16px;\n\t\theight: 100%;\n\t\tbackground-color: #ddd;\n\t\tdisplay: none;\n\t}\n\t\n\tdiv.left span {\n\t\twriting-mode: vertical-rl;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tuser-select: none;\n\t\tcolor: #ccc;\n\t\tfont-weight: 700;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmargin-left: 3px;\n\t\tmargin-top: 3px;\n\t}\n\tdiv.close2 {\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 3px;\n\t\tcursor: pointer;\n\t\tcolor: #666;\n\t}\n\tdiv.close2 svg:hover {\n\t\tcolor: #999;\n\t}\n\t\n\tdiv.body {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: unset;\n\t\t--border: 3px solid #999;\n\t\t--border-top: none;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tpadding: 10px;\n\t\tgap: 8px;\n\t\tflex-direction: column;\n\t}\n\t\n\t\n\t\n\t\n\tng-sphere.icon {\n\t\tmargin-left: 8px;\n\t}\n\t\n\t.buttons {\n\t\tdisplay: flex;\n\t\tposition: absolute;\n\t\tright: 4px;\n\t}\n\t\n\tng-sphere {\n\t\tposition: relative;\n\t\t--width: 16px;\n\t\t--height: 16px;\n\t\tcursor: pointer;\n\t\tmargin-right: 4px;\n\t\tdisplay: flex;\n\t}\n\tng-sphere:hover {\n\t\tfilter: brightness(90%);\n\t}\n\tng-sphere:active {\n\t\tfilter: brightness(80%);\n\t}\n\t\n\tng-sphere:hover::after {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t}\n\tng-sphere.apply:hover::after {\n\t\tbackground-size: 14px 14px;\n\t\tbackground-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><polyline points="2.5,7 6,10 11,3" style="fill:none;stroke:white;stroke-width:2px;" /></svg>\');\n\t}\n\t\n\tng-sphere.reset:hover::after {\n\t\tbackground-size: 12px 12px;\n\t\tbackground-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" style="fill:none;stroke:white;stroke-width:2px;" focusable="false" aria-hidden="true"><path d="M10 5h5V0"></path><path d="M15 8a6.957 6.957 0 0 1-7 7 6.957 6.957 0 0 1-7-7 6.957 6.957 0 0 1 7-7 6.87 6.87 0 0 1 6.3 4"></path></svg>\');\n\t}\n\t\n\tng-sphere.close:hover::after {\n\t\tbackground-size: 12px 12px;\n\t\tbackground-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" style="fill:none;stroke:white;stroke-width:2px;" focusable="false" aria-hidden="true" viewBox="0 0 16 16"><path d="M2 2l12 12M14 2L2 14"></path></svg>\');\n\t}\n\t\n\t\n\tbutton {\n cursor: pointer;\n }\n \n .input-area {\n position: relative;\n height: 100%;\n --display: flex;\n textarea {\n width: 100%;\n height: 100%;\n min-height: 100px;\n padding: 8px;\n box-sizing: border-box;\n resize: none;\n border-radius: 2px;\n border-color: #ccc;\n }\n textarea:focus {\n border-color: green;\n outline: none; /* 브라우저 기본 파란색 테두리 제거 */\n }\n }\n \n .buttons-confirm {\n position: absolute;\n display: flex;\n justify-content: flex-end;\n bottom: 8px;\n right: 8px;\n }\n \n \n .buttons-confirm button {\n height: 32px;\n margin-right: 8px;\n border: none;\n outline: none;\n width: 60px;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .buttons-confirm button:hover {\n filter: brightness(90%);\n }\n .buttons-confirm button:active {\n color: #ccc;\n }\n \n button.ok {\n --display: none;\n background-color: darkgreen;\n color: white;\n }\n button.cancel {\n color: white;\n background-color: #6c757d;\n }\n \n \n \n div.msg {\n position: relative;\n height: 100%;\n font-size: 14px;\n color: #333;\n padding-bottom: 48px;\n }\n \n .reset, .apply {\n display: none;\n }\n \n \n \n :host(.classic) dialog:modal {\n border: 1px solid #007bff;\n box-shadow: 0 0 4px 0 #007bff;\n }\n \n :host(.classic) div.head {\n background-color: #007bff;\n }\n :host(.classic) div.head:hover {\n filter: brightness(110%);\n }\n \n :host(.classic) div.head span {\n font-size: 12px;\n }\n \n :host(.classic) div.head span.title {\n color: #ddd;\n margin-left: 4px;\n font-weight: bold;\n }\n \n :host(.classic) div.head span.sub-title {\n color: #ccc;\n margin-left: 8px;\n font-style: italic;\n }\n :host(.classic) div.head button {\n margin-right: 4px;\n background-color: transparent;\n border: none;\n color: #ccc;\n font-size: x-small;\n }\n \n \n \n \n :host(.rgb) dialog:modal {\n border: none;\n box-shadow: unset;\n border-top: none;\n height: 140px;\n }\n \n :host(.rgb) div.left {\n display: block;\n background-color: #ddd;\n }\n :host(.rgb) div.left span {\n color: #ccc;\n }\n :host(.rgb) div.close2 {\n display: block;\n color: #666;\n }\n :host(.rgb) div.close2 svg:hover {\n color: #999;\n }\n :host(.rgb) div.head {\n height: 4px;\n background-color: #999;\n padding: 0;\n }\n :host(.rgb) div.contents {\n height: calc(100% - 4px);\n }\n \n :host(.rgb) div.body {\n height: auto; /* 세로로 꽉 차는 현상 방지 */\n --max-height: 500px; /* 내용이 많을 때만 스크롤 생기도록 제한 */\n }\n \n :host(.rgb) div.head ng-sphere,\n :host(.rgb) div.head span,\n :host(.rgb) div.head .buttons {\n display: none;\n }\n \n :host(.rgb) div.head .rect1,\n :host(.rgb) div.head .rect2,\n :host(.rgb) div.head .rect3 {\n display: flex;\n }\n \n \n :host(.rgb) div.head:hover {\n filter: unset;\n }\n \n \n /* --- Animation Core --- */\n:host {\n --nx-duration: 0.4s;\n --nx-timing: cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n\n/* 🎯 수정: 애니메이션 클래스가 붙은 경우에만 초기 opacity를 0으로 설정 */\n:host(.fade) dialog,\n:host(.zoom) dialog,\n:host(.moveUp) dialog,\n:host(.moveDown) dialog,\n:host(.moveLeft) dialog,\n:host(.moveRight) dialog,\n:host(.roadRunner) dialog {\n opacity: 0;\n}\n\n/* shake는 애니메이션 내부에서 opacity를 다루므로 제외하거나 별도 처리 */\n:host(.shake) dialog { \n opacity: 1; \n}\n\n/* 1. Fade (서서히 나타남) */\n:host(.fade) dialog { animation: nx-fade-in var(--nx-duration) forwards; }\n@keyframes nx-fade-in { from { opacity: 0; } to { opacity: 1; } }\n\n/* 2. Zoom (커지며 나타남) */\n:host(.zoom) dialog { animation: nx-zoom-in var(--nx-duration) var(--nx-timing) forwards; }\n@keyframes nx-zoom-in { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }\n\n/* 3. Slide (상하좌우) */\n:host(.moveUp) dialog { animation: nx-move-up var(--nx-duration) var(--nx-timing) forwards; }\n:host(.moveDown) dialog { animation: nx-move-down var(--nx-duration) var(--nx-timing) forwards; }\n:host(.moveLeft) dialog { animation: nx-move-left var(--nx-duration) var(--nx-timing) forwards; }\n:host(.moveRight) dialog { animation: nx-move-right var(--nx-duration) var(--nx-timing) forwards; }\n\n@keyframes nx-move-up { from { opacity: 0; transform: translateY(100px); } to { opacity: 1; transform: translateY(0); } }\n@keyframes nx-move-down { from { opacity: 0; transform: translateY(-100px); } to { opacity: 1; transform: translateY(0); } }\n@keyframes nx-move-left { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }\n@keyframes nx-move-right { from { opacity: 0; transform: translateX(-100px); } to { opacity: 1; transform: translateY(0); } }\n\n/* 4. Shake (상하좌우 격렬한 진동 - 에러 인지용) */\n:host(.shake) dialog { \n animation: nx-heavy-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;\n opacity: 1; \n}\n\n@keyframes nx-heavy-shake {\n 10%, 90% { transform: translate3d(-1px, -2px, 0); }\n 20%, 80% { transform: translate3d(2px, 4px, 0); }\n 30%, 50%, 70% { transform: translate3d(-6px, -6px, 0); }\n 40%, 60% { transform: translate3d(6px, 6px, 0); }\n}\n\n/* 5. Road Runner (등장: 왼쪽에서 탄력 있게 / 퇴장: 움츠렸다가 광속 탈출) */\n:host(.roadRunner) dialog { \n animation: roadRunnerIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; \n}\n\n@keyframes roadRunnerIn {\n 0% { transform: translateX(-1500px) skewX(30deg); opacity: 1; }\n 70% { transform: translateX(30px) skewX(-10deg); opacity: 1; }\n 100% { transform: translateX(0) skewX(0deg); opacity: 1; }\n}\n\n/* --- Out Animations (닫힐 때) --- */\ndialog.out { pointer-events: none; }\n\n/* Road Runner 퇴장: 슥 움츠렸다가(Anticipation) 쌩~! */\n:host(.roadRunner) dialog.out { \n animation: roadRunnerOut 0.5s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards; \n}\n\n@keyframes roadRunnerOut {\n 0% { \n transform: translateX(0) scale(1) skewX(0deg); \n opacity: 1; \n }\n 30% { \n /* 예비 동작: 뒤로 살짝 갔다가 움츠러들기 */\n transform: translateX(50px) scaleX(1.2) scaleY(0.8) skewX(-20deg); \n opacity: 1; \n }\n 100% { \n /* 발사: 길게 늘어나며 광속 탈출 */\n transform: translateX(2000px) scaleX(4) scaleY(0.3) skewX(50deg); \n opacity: 0; \n filter: blur(10px); /* 👈 잔상 느낌 추가 */\n }\n}\n\n/* 일반 퇴장 (기본) */\ndialog.out { animation: nx-fade-out 0.3s forwards; }\n@keyframes nx-fade-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.9); } }\n';class V extends HTMLElement{constructor(){super(),_(this,f),_(this,g),D(this,"showModal",()=>{var t,n;O(this,g).showModal(),null==(n=(null==(t=this.shadowRoot)?void 0:t.activeElement)||document.activeElement)||n.blur()}),D(this,"close",()=>{O(this,g).close(),this.remove()}),_(this,m,()=>{const t=this.querySelector(".head");t&&(t.addEventListener("mousedown",O(this,v)),t.addEventListener("touchstart",O(this,y))),this.querySelectorAll(".close, .close2, .cancel").forEach(t=>{t.onclick=()=>this.closeWithAnimation(null)}),this.querySelectorAll(".ok").forEach(t=>{})}),_(this,v,t=>{if(t.target.closest("buttons"))return;if(0!==t.button||t.altKey||t.ctrlKey||t.shiftKey)return;const n=O(this,g).getBoundingClientRect();T(this,f,{x:t.clientX-n.left,y:t.clientY-n.top});const e=t=>{O(this,g).style.position="fixed",O(this,g).style.margin="0",O(this,g).style.left=t.clientX-O(this,f).x+"px",O(this,g).style.top=t.clientY-O(this,f).y+"px"},o=()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",o)};document.addEventListener("mousemove",e),document.addEventListener("mouseup",o)}),_(this,y,t=>{if(t.target.closest("buttons"))return;const n=O(this,g).getBoundingClientRect(),e=t.changedTouches[0];T(this,f,{x:e.pageX-n.left,y:e.pageY-n.top});const o=t=>{const n=t.changedTouches[0];O(this,g).style.position="fixed",O(this,g).style.margin="0",O(this,g).style.left=n.pageX-O(this,f).x+"px",O(this,g).style.top=n.pageY-O(this,f).y+"px"},i=()=>{document.removeEventListener("touchmove",o),document.removeEventListener("touchend",i)};document.addEventListener("touchmove",o),document.addEventListener("touchend",i)})}connectedCallback(){const t=this.innerHTML,n=this.getAttribute("subject")||"Details";F.log(J),this.innerHTML=`\n\t\t\t<style>${J}</style>\n\t\t\n\t\t\t<dialog>\n\t\t\t\t<div class="head">\n\t\t\t\t\t<div class="rect1"></div>\n\t\t\t\t\t<div class="rect2"></div>\n\t\t\t\t\t<div class="rect3"></div>\n\t\t\t\t\t<ng-sphere class="icon" end-fill="#666" size="8"></ng-sphere>\n\t\t\t\t\t<span class="title">${n}</span>\n\t\t\t\t\t<span class="sub-title"></span>\n\t\t\t\t\t<div class="buttons">\n\t\t\t\t\t\t<ng-sphere class="apply" start-fill="#cc6" end-fill="#660" size="16" title="apply"></ng-sphere>\n\t\t\t\t\t\t<ng-sphere class="reset" start-fill="#99f" end-fill="#00f" size="16" title="reset"></ng-sphere>\n\t\t\t\t\t\t<ng-sphere class="close" start-fill="#f99" end-fill="#f00" size="16" title="close"></ng-sphere>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="contents">\n\t\t\t\t\t<div class="left">\n\t\t\t\t\t\t<span>가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="body">\n\t\t\t\t\t\t${t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="close2">\n\t\t\t\t\t\t<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">\n\t\t\t\t\t\t\t<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</dialog>\n\t\t`,T(this,g,this.querySelector("dialog")),O(this,m).call(this)}closeWithAnimation(t){O(this,g).classList.add("out"),setTimeout(()=>{O(this,g).close(),this.dispatchEvent(new CustomEvent("closed",{detail:t})),this.remove()},300)}}f=new WeakMap,g=new WeakMap,m=new WeakMap,v=new WeakMap,y=new WeakMap;class Z extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}static async open(t,n,e,o,i){var s,r,a;const l=t.tagName.toLowerCase(),c={"true-text":"확인","false-text":"취소",class:"classic",animation:"fade",...(null==(a=null==(r=null==(s=window.nine)?void 0:s.config)?void 0:r.ux)?void 0:a[l.replace("nine-","").replace("-popup","")])||{},...o};document.querySelectorAll(l).forEach(t=>t.remove());const d=document.createElement(l);c.class&&d.classList.add(c.class),c.animation&&d.classList.add(c.animation),document.body.appendChild(d),i(d,n,c);const h=d.shadowRoot.querySelector("nine-dialog");return e&&h.setAttribute("subject",e),new Promise(t=>{h.addEventListener("closed",n=>t(n.detail)),d.setupEvents(t,h),h.showModal()})}}customElements.get("nine-dialog")||customElements.define("nine-dialog",V);const Q=class extends Z{constructor(){super()}render(t,n){this.shadowRoot.innerHTML=`\n <nine-dialog>\n <div class="msg">${t.replace(/\n/g,"<br/>")}</div>\n <div class="buttons-confirm">\n <button class="cancel">${n["false-text"]}</button>\n <button class="ok">${n["true-text"]}</button>\n </div>\n </nine-dialog>`}setupEvents(t,n){this.shadowRoot.querySelector(".ok").onclick=()=>n.closeWithAnimation(!0)}};D(Q,"tagName","nine-confirm-popup"),D(Q,"confirm",(t,n,e)=>Z.open(Q,t,n,e,(t,n,e)=>t.render(n,e)));let tt=Q;const nt=class extends Z{constructor(){super()}render(t,n){this.shadowRoot.innerHTML=`\n <nine-dialog>\n <div class="msg">${t.replace(/\n/g,"<br/>")}</div>\n <div class="buttons-confirm">\n <button class="cancel">확인</button>\n </div>\n </nine-dialog>`}setupEvents(t,n){}};D(nt,"tagName","nine-alert-popup"),D(nt,"alert",(t,n,e)=>Z.open(nt,t,n,e,(t,n,e)=>t.render(n,e)));let et=nt;customElements.get("nine-confirm-popup")||customElements.define("nine-confirm-popup",tt),customElements.get("nine-alert-popup")||customElements.define("nine-alert-popup",et);const ot=class extends Z{constructor(){super()}render(t,n){trace.log(this),trace.log(this.shadowRoot),this.shadowRoot.innerHTML=`\n\t\t\t<style>\n\t\t\t\tdialog {\n\t\t\t\t\theight: 300px !important;\n\t\t\t\t}\n\t\t\t\t.msg {\n\t\t\t\t\theight: unset !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t\n <nine-dialog>\n <div class="msg">${t.replace(/\n/g,"<br/>")}</div>\n <div class="input-area">\n <textarea placeholder="내용을 입력하세요..."></textarea>\n </div>\n <div class="buttons-confirm">\n <button class="cancel">${n["false-text"]}</button>\n <button class="ok">${n["true-text"]}</button>\n </div>\n </nine-dialog>`}setupEvents(t,n){const e=this.shadowRoot.querySelector("textarea");this.shadowRoot.querySelector(".ok").onclick=()=>n.closeWithAnimation(e.value),requestAnimationFrame(()=>e.focus())}};D(ot,"tagName","nine-prompt-popup"),D(ot,"prompt",(t,n,e)=>Z.open(ot,t,n,e,(t,n,e)=>t.render(n,e)));let it=ot;customElements.get("nine-prompt-popup")||customElements.define("nine-prompt-popup",it);class st{constructor(){_(this,w),D(this,"alert",(t,n="Alert")=>B(this,w,b).call(this,"alert",t,n,"classic")),D(this,"confirm",(t,n="Confirm")=>B(this,w,b).call(this,"confirm",t,n,"classic")),D(this,"prompt",(t,n="Prompt")=>B(this,w,b).call(this,"prompt",t,n,"classic"))}}w=new WeakSet,b=function(t,n,e,o){const i={class:o,animation:"fade"};let s=!1;const r={alert:et,confirm:tt,prompt:it}[t],a={rgb:()=>(i.class="rgb",a),classic:()=>(i.class="classic",a),shake:()=>(i.animation="shake",a),run:()=>(i.animation="roadRunner",a),zoom:()=>(i.animation="zoom",a),then:(o,a)=>(s=!0,r[t](n,e,i).then(o,a))};return Promise.resolve().then(()=>{s||(s=!0,r[t](n,e,i))}),a},D(st,"cssPath",""),Object.assign(Y,new st);class rt extends HTMLElement{constructor(){super(),_(this,x),_(this,$,()=>{const t=this.getAttribute("only-sibling");return null!==t&&"false"!==t.toLowerCase()}),_(this,k,t=>{const n=t.previousElementSibling,e=t.nextElementSibling;if(!n||!e)return void T(this,x,this.classList.contains("h")?"h":"v");const o=n.getBoundingClientRect(),i=e.getBoundingClientRect();this.classList.contains("h")?T(this,x,"h"):this.classList.contains("v")?T(this,x,"v"):T(this,x,Math.abs(o.top-i.top)<5?"h":"v")}),_(this,E,t=>{t.preventDefault(),t.stopPropagation();const n=this.getBoundingClientRect(),e="h"===O(this,x),o=e?t.clientX-n.left:t.clientY-n.top,i=document.createElement("div");i.className=`nx-splitter-drag-bar-${O(this,x)}`,Object.assign(i.style,{position:"absolute",zIndex:"999",background:"#666",opacity:"0.6",pointerEvents:"none"});const s=this.getRootNode({composed:!0}),r=s instanceof ShadowRoot?s.host:this.parentElement,a=this.previousElementSibling,l=this.nextElementSibling;if(!r||!a||!l)return void F.warn("Spliter's parent or siblings not found.");(r.shadowRoot||r).appendChild(i);const c=i.offsetParent.getBoundingClientRect(),d=a.getBoundingClientRect(),h=l.getBoundingClientRect(),u=(e?n.left-c.left:n.top-c.top)+o;e?(i.style.top="0",i.style.left=`${u}px`,i.style.width="2px",i.style.height="100%"):(i.style.left="0",i.style.top=`${u}px`,i.style.height="2px",i.style.width="100%"),i.style.mixBlendMode="difference",i.style.zIndex="99999";const p=e?d.left-c.left:d.top-c.top,f=e?h.right-c.left-n.width:h.bottom-c.top-n.height,g=t=>{const n=e?t.clientX:t.clientY,o=e?n-c.left:n-c.top,s=Math.max(p,Math.min(o,f));e?i.style.left=`${s}px`:i.style.top=`${s}px`},m=()=>{window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",m),i.remove();const t=Array.from(r.children),n=t.filter(t=>"nx-splitter"!==t.tagName.toLowerCase()),o=window.getComputedStyle(r),s=e?o.getPropertyValue("column-gap"):o.getPropertyValue("row-gap"),c=parseFloat(s)||0,d=t.length>1?t.length-1:0,h=d*c,p=(e?parseFloat(i.style.left):parseFloat(i.style.top))-u,f=e?a.getBoundingClientRect().width:a.getBoundingClientRect().height,v=e?l.getBoundingClientRect().width:l.getBoundingClientRect().height;let y=f+p,w=v-p;y<0&&(w+=y,y=0),w<0&&(y+=w,w=0);const b=n.map(t=>e?t.getBoundingClientRect().width:t.getBoundingClientRect().height),x=t.reduce((t,n)=>"nx-splitter"===n.tagName.toLowerCase()?t+(e?n.getBoundingClientRect().width:n.getBoundingClientRect().height):t,0),k=e?r.getBoundingClientRect().width:r.getBoundingClientRect().height,E=k-x-h;if(F.log("[Debug] ---------------------------"),F.log(`[Debug] TotalContainerSize: ${k}`),F.log(`[Debug] TotalSplitterSize: ${x}`),F.log(`[Debug] GapSize: ${c}, GapCount: ${d}`),F.log(`[Debug] PrevSize(Old): ${f}, NextSize(Old): ${v}`),F.log(`[Debug] DragOffset: ${p}`),F.log(`[Debug] NewPrevSize: ${y}, NewNextSize: ${w}`),n.forEach((t,n)=>{const o=null!==t.querySelector("canvas"),i=e?t.getBoundingClientRect().width:t.getBoundingClientRect().height;F.log(`[Debug] Panel[${n}] (${o?"Canvas":"Normal"}): Current=${i.toFixed(2)}, New=${(t===a?y:t===l?w:b[n]).toFixed(2)}`)}),F.log("[Debug] ---------------------------"),O(this,$).call(this)){const t=this.previousElementSibling,n=this.nextElementSibling;t&&n&&(t.style.flex=`0 0 ${y}px`,n.style.flex=`0 0 ${w}px`)}else n.forEach((t,n)=>{let e;e=t===a?y:t===l?w:b[n];const o=e/E;F.log(t),t.classList.contains("sidebar")?t.style.flex=`0 0 ${e}px`:t.style.flex=`${o} ${o} 0`})};window.addEventListener("mousemove",g),window.addEventListener("mouseup",m)}),_(this,S,()=>{O(this,k).call(this,this),this.classList.add(O(this,x));const t=this.innerHTML.trim(),n=""===t?'<div class="grip"></div>':`<div class="grip"></div><div class="inner-container">${t}</div><div class="grip"></div>`,e=nine.cssPath?`@import "${nine.cssPath}/nine-util.css";`:"";this.innerHTML="";const o=document.createElement("template");o.innerHTML=`\n\t\t\t<style>\n\t\t\t\t@import "https://cdn.jsdelivr.net/npm/@ninebone/util@1.0.41/dist/css/nine-util.css";\n\t\t\t\t${e}\n\t\t\t</style>\n\t\t\t${n}\n `,this.shadowRoot.appendChild(o.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".grip").forEach(t=>{t.addEventListener("mousedown",t=>O(this,E).call(this,t))}),O(this,M).call(this),window.addEventListener("resize",()=>O(this,M).call(this))}),_(this,M,()=>{const t="h"===O(this,x),n=this.parentElement,e=Array.from(n.children).filter(t=>"nine-splitter"!==t.tagName.toLowerCase());if(e.length<2)return;const o=n.getBoundingClientRect(),i=e.reduce((n,e)=>n+(t?e.getBoundingClientRect().width:e.getBoundingClientRect().height),0),s=t?o.width:o.height;e.forEach(n=>{if(n.style.flex&&""!==n.style.flex.trim())return;const e=t?n.getBoundingClientRect().width:n.getBoundingClientRect().height,o=s*(e/i)/s;n.style.flex=`${o} ${o} 0`,F.log(n.style.flex)})}),this.attachShadow({mode:"open"})}connectedCallback(){O(this,S).call(this)}get cssPath(){return this.getAttribute("css-path")||st.cssPath}}function at(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}x=new WeakMap,$=new WeakMap,k=new WeakMap,E=new WeakMap,S=new WeakMap,M=new WeakMap,customElements.get("nine-splitter")||customElements.define("nine-splitter",rt);var lt,ct={exports:{}};var dt=(lt||(lt=1,ct.exports=function(){var t=1e3,n=6e4,e=36e5,o="millisecond",i="second",s="minute",r="hour",a="day",l="week",c="month",d="quarter",h="year",u="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var n=["th","st","nd","rd"],e=t%100;return"["+t+(n[(e-20)%10]||n[e]||n[0])+"]"}},v=function(t,n,e){var o=String(t);return!o||o.length>=n?t:""+Array(n+1-o.length).join(e)+t},y={s:v,z:function(t){var n=-t.utcOffset(),e=Math.abs(n),o=Math.floor(e/60),i=e%60;return(n<=0?"+":"-")+v(o,2,"0")+":"+v(i,2,"0")},m:function t(n,e){if(n.date()<e.date())return-t(e,n);var o=12*(e.year()-n.year())+(e.month()-n.month()),i=n.clone().add(o,c),s=e-i<0,r=n.clone().add(o+(s?-1:1),c);return+(-(o+(e-i)/(s?i-r:r-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:l,d:a,D:u,h:r,m:s,s:i,ms:o,Q:d}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},w="en",b={};b[w]=m;var x="$isDayjsObject",$=function(t){return t instanceof M||!(!t||!t[x])},k=function t(n,e,o){var i;if(!n)return w;if("string"==typeof n){var s=n.toLowerCase();b[s]&&(i=s),e&&(b[s]=e,i=s);var r=n.split("-");if(!i&&r.length>1)return t(r[0])}else{var a=n.name;b[a]=n,i=a}return!o&&i&&(w=i),i||!o&&w},E=function(t,n){if($(t))return t.clone();var e="object"==typeof n?n:{};return e.date=t,e.args=arguments,new M(e)},S=y;S.l=k,S.i=$,S.w=function(t,n){return E(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var M=function(){function m(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[x]=!0}var v=m.prototype;return v.parse=function(t){this.$d=function(t){var n=t.date,e=t.utc;if(null===n)return new Date(NaN);if(S.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(f);if(o){var i=o[2]-1||0,s=(o[7]||"0").substring(0,3);return e?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,s)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,s)}}return new Date(n)}(t),this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(t,n){var e=E(t);return this.startOf(n)<=e&&e<=this.endOf(n)},v.isAfter=function(t,n){return E(t)<this.startOf(n)},v.isBefore=function(t,n){return this.endOf(n)<E(t)},v.$g=function(t,n,e){return S.u(t)?this[n]:this.set(e,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,n){var e=this,o=!!S.u(n)||n,d=S.p(t),p=function(t,n){var i=S.w(e.$u?Date.UTC(e.$y,n,t):new Date(e.$y,n,t),e);return o?i:i.endOf(a)},f=function(t,n){return S.w(e.toDate()[t].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(n)),e)},g=this.$W,m=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case h:return o?p(1,0):p(31,11);case c:return o?p(1,m):p(0,m+1);case l:var w=this.$locale().weekStart||0,b=(g<w?g+7:g)-w;return p(o?v-b:v+(6-b),m);case a:case u:return f(y+"Hours",0);case r:return f(y+"Minutes",1);case s:return f(y+"Seconds",2);case i:return f(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,n){var e,l=S.p(t),d="set"+(this.$u?"UTC":""),p=(e={},e[a]=d+"Date",e[u]=d+"Date",e[c]=d+"Month",e[h]=d+"FullYear",e[r]=d+"Hours",e[s]=d+"Minutes",e[i]=d+"Seconds",e[o]=d+"Milliseconds",e)[l],f=l===a?this.$D+(n-this.$W):n;if(l===c||l===h){var g=this.clone().set(u,1);g.$d[p](f),g.init(),this.$d=g.set(u,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},v.set=function(t,n){return this.clone().$set(t,n)},v.get=function(t){return this[S.p(t)]()},v.add=function(o,d){var u,p=this;o=Number(o);var f=S.p(d),g=function(t){var n=E(p);return S.w(n.date(n.date()+Math.round(t*o)),p)};if(f===c)return this.set(c,this.$M+o);if(f===h)return this.set(h,this.$y+o);if(f===a)return g(1);if(f===l)return g(7);var m=(u={},u[s]=n,u[r]=e,u[i]=t,u)[f]||1,v=this.$d.getTime()+o*m;return S.w(v,this)},v.subtract=function(t,n){return this.add(-1*t,n)},v.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||p;var o=t||"YYYY-MM-DDTHH:mm:ssZ",i=S.z(this),s=this.$H,r=this.$m,a=this.$M,l=e.weekdays,c=e.months,d=e.meridiem,h=function(t,e,i,s){return t&&(t[e]||t(n,o))||i[e].slice(0,s)},u=function(t){return S.s(s%12||12,t,"0")},f=d||function(t,n,e){var o=t<12?"AM":"PM";return e?o.toLowerCase():o};return o.replace(g,function(t,o){return o||function(t){switch(t){case"YY":return String(n.$y).slice(-2);case"YYYY":return S.s(n.$y,4,"0");case"M":return a+1;case"MM":return S.s(a+1,2,"0");case"MMM":return h(e.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return n.$D;case"DD":return S.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return h(e.weekdaysMin,n.$W,l,2);case"ddd":return h(e.weekdaysShort,n.$W,l,3);case"dddd":return l[n.$W];case"H":return String(s);case"HH":return S.s(s,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return f(s,r,!0);case"A":return f(s,r,!1);case"m":return String(r);case"mm":return S.s(r,2,"0");case"s":return String(n.$s);case"ss":return S.s(n.$s,2,"0");case"SSS":return S.s(n.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(o,u,p){var f,g=this,m=S.p(u),v=E(o),y=(v.utcOffset()-this.utcOffset())*n,w=this-v,b=function(){return S.m(g,v)};switch(m){case h:f=b()/12;break;case c:f=b();break;case d:f=b()/3;break;case l:f=(w-y)/6048e5;break;case a:f=(w-y)/864e5;break;case r:f=w/e;break;case s:f=w/n;break;case i:f=w/t;break;default:f=w}return p?f:S.a(f)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return b[this.$L]},v.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),o=k(t,n,!0);return o&&(e.$L=o),e},v.clone=function(){return S.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),L=M.prototype;return E.prototype=L,[["$ms",o],["$s",i],["$m",s],["$H",r],["$W",a],["$M",c],["$y",h],["$D",u]].forEach(function(t){L[t[1]]=function(n){return this.$g(n,t[0],t[1])}}),E.extend=function(t,n){return t.$i||(t(n,M,E),t.$i=!0),E},E.locale=k,E.isDayjs=$,E.unix=function(t){return E(1e3*t)},E.en=b[w],E.Ls=b,E.p={},E}()),ct.exports);const ht=at(dt);class ut extends HTMLElement{static get tagName(){return"nine-popup"}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML='\n\t\t\t<nine-dialog>\n\t\t\t\t<div class="popup-body"></div>\n\t\t\t</nine-dialog>\n\t\t'}close(t=null){const n=this.dialog;n&&n.closeWithAnimation(t)}get popupBody(){var t;return(null==(t=this.shadowRoot)?void 0:t.querySelector("nine-dialog .popup-body"))||null}get dialog(){var t;return(null==(t=this.shadowRoot)?void 0:t.querySelector("nine-dialog"))||null}}customElements.get("nine-popup")||customElements.define("nine-popup",ut);const pt={sort:(t,n="id",e="parentId",o="sortOrder",i="level")=>{if(!t||0===t.length)return[];const s={};t.forEach(t=>{s[t[n]]={...t,children:[]}});const r=[];t.forEach(t=>{const o=s[t[n]],i=t[e];i&&s[i]?s[i].children.push(o):r.push(o)});const a=t=>{t.sort((t,n)=>{const e=t[o],i=n[o];return"number"==typeof e&&"number"==typeof i?e-i:String(e||"").localeCompare(String(i||""))}),t.forEach(t=>{t.children.length>0&&a(t.children)})};a(r);const l=[],c=(t,n=1)=>{t.forEach(t=>{t[i]=n;const{children:e,...o}=t;l.push(o),e.length>0&&c(e,n+1)})};return c(r),l}};class ft extends HTMLElement{static get tagName(){return"nine-simple-popup"}constructor(){super()}connectedCallback(){const t=this.getAttribute("subject")||"Details";this.innerHTML=`\n\t\t\t<style>\n\t\t\t\tnine-simple-popup {\n\t\t\t\t\tposition: fixed;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\twidth: 100vw;\n\t\t\t\t\theight: 100vh;\n\t\t\t\t\tz-index: 9999;\n\t\t\t\t\tfont-family: inherit;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-overlay {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tbackground-color: rgba(0, 0, 0, 0.4);\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tbackdrop-filter: blur(2px);\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-dialog {\n\t\t\t\t\tbackground-color: #ffffff;\n\t\t\t\t\t--width: 460px;\n\t\t\t\t\tborder-radius: 12px;\n\t\t\t\t\tbox-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\tanimation: nsPopupShow 0.2s ease-out;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-header {\n\t\t\t\t\tpadding: 16px 20px;\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tjustify-content: space-between;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tborder-bottom: 1px solid #f1f5f9;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-title {\n\t\t\t\t\tfont-size: 16px;\n\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\tcolor: #0f172a;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-close-btn {\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tborder: none;\n\t\t\t\t\tfont-size: 20px;\n\t\t\t\t\tcolor: #94a3b8;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\tline-height: 1;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-close-btn:hover {\n\t\t\t\t\tcolor: #0f172a;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-body {\n\t\t\t\t\tpadding: 20px;\n\t\t\t\t\tmax-height: 80vh;\n\t\t\t\t\toverflow-y: auto;\n\t\t\t\t}\n\t\t\t\t@keyframes nsPopupShow {\n\t\t\t\t\tfrom {\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\ttransform: scale(0.95) translateY(10px);\n\t\t\t\t\t}\n\t\t\t\t\tto {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\ttransform: scale(1) translateY(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t\n\t\t\t<div class="ns-popup-overlay">\n\t\t\t\t<div class="ns-popup-dialog">\n\t\t\t\t\t<div class="ns-popup-header">\n\t\t\t\t\t\t<span class="ns-popup-title">${t}</span>\n\t\t\t\t\t\t<button class="ns-popup-close-btn">&times;</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ns-popup-body"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`,this.querySelector(".ns-popup-close-btn").onclick=()=>this.close(null),this.querySelector(".ns-popup-overlay").onclick=t=>{t.target.classList.contains("ns-popup-overlay")&&this.close(null)}}close(t=null){this.dispatchEvent(new CustomEvent("closed",{detail:t})),this.remove()}get popupBody(){return this.querySelector(".ns-popup-body")||null}}customElements.get("nine-simple-popup")||customElements.define("nine-simple-popup",ft);L=new WeakMap;const gt=new class{constructor(){D(this,"formatDate",(t,n)=>ht(t).format(n)),D(this,"popup",(t,o={},i="Details")=>{document.querySelectorAll(ut.tagName).forEach(t=>t.remove());const s=document.createElement(ut.tagName);return document.body.appendChild(s),new Promise(r=>{const a=s.popupBody,l=s.dialog;i&&l&&l.setAttribute("subject",i);const c=e.createRoot(a);null==l||l.addEventListener("closed",t=>{r(t.detail),setTimeout(()=>{c.unmount(),s.remove()},0)}),c.render(n.createElement(t,{data:o})),setTimeout(()=>{null==l||l.showModal()},0)})}),D(this,"simplePopup",(t,o={},i="Details")=>{document.querySelectorAll(ft.tagName).forEach(t=>t.remove());const s=document.createElement(ft.tagName);return i&&s.setAttribute("subject",i),document.body.appendChild(s),new Promise(i=>{const r=s.popupBody,a=e.createRoot(r);s.addEventListener("closed",t=>{i(t.detail),setTimeout(()=>{a.unmount(),s.remove()},0)}),a.render(n.createElement(t,{data:o,onClose:t=>s.close(t)}))})}),D(this,"querySelectorAll",(t,n=document)=>{const e=[],o=n=>{var i;if(!n)return;n.shadowRoot&&o(n.shadowRoot),null==(i=n.querySelectorAll)||i.call(n,t).forEach(t=>{e.includes(t)||e.push(t)});(n.children?Array.from(n.children):[]).forEach(t=>{o(t)})};return o(n),e}),D(this,"querySelector",(t,n=document)=>{var e;if(!n)return null;let o=null==(e=n.querySelector)?void 0:e.call(n,t);if(o)return o;if(n.shadowRoot&&(o=this.querySelector(t,n.shadowRoot),o))return o;const i=n.children?Array.from(n.children):[];for(const s of i)if(o=this.querySelector(t,s),o)return o;return null}),D(this,"closest",(t,n)=>{var e;if(!n||"string"!=typeof t)return null;let o=n;for(;o;){if(o.nodeType===Node.ELEMENT_NODE&&o.matches(t))return o;const n=null==(e=o.getRootNode)?void 0:e.call(o);o=n&&n instanceof ShadowRoot?n.host:o.parentElement||null}return null}),D(this,"login",t=>{const n=window.location.origin,e=window.__API_BASE_URL__||"";window.location.href=`${e}/accounts/auth/${t}/login?frontendUrl=${encodeURIComponent(n)}`}),_(this,L,t=>{const n=window.location.origin,e=window.__API_BASE_URL__||"";window.location.href=`${e}/accounts/auth/${t}/login?frontendUrl=${encodeURIComponent(n)}`}),D(this,"google",()=>({login:()=>O(this,L).call(this,"google")})),D(this,"kakao",()=>({login:()=>O(this,L).call(this,"kakao")})),D(this,"naver",()=>({login:()=>O(this,L).call(this,"naver")})),D(this,"randomUUID",t=>{t||(t=10);const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";let e="";for(let o=0;o<t;o++)e+=n.charAt(Math.floor(52*Math.random()));return e}),D(this,"tree",{sort:pt.sort})}};Object.assign(Y,gt),Y.safe=async t=>{try{return[await t,null]}catch(n){return[null,n]}},Y.api=G,Y.trace=H,Y.subscribeConfig=W,Y.config=j||{},"undefined"!=typeof window&&(window.nine=Y),t.Fetch=K,t.TaskDebouncer=class{constructor(t=50){_(this,h),_(this,l,null),_(this,c,[]),_(this,d),T(this,d,t)}exec(t,...n){O(this,c).push({func:t,args:n}),O(this,l)&&clearTimeout(O(this,l)),T(this,l,setTimeout(()=>B(this,h,u).call(this),O(this,d)))}execWithKey(t,n,...e){T(this,c,O(this,c).filter(n=>n.key!==t)),O(this,c).push({key:t,func:n,args:e}),O(this,l)&&clearTimeout(O(this,l)),T(this,l,setTimeout(()=>B(this,h,u).call(this),O(this,d)))}},t.Trace=I,t.api=G,t.config=j,t.loading=X,t.nine=Y,t.nineAlertPopup=et,t.nineConfirmPopup=tt,t.nineDialog=V,t.ninePromptPopup=it,t.subscribeConfig=W,t.trace=H,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
1
+ !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("react-dom/client")):"function"==typeof define&&define.amd?define(["exports","react","react-dom/client"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self)["nine-util"]={},t.React,t.ReactDOMClient)}(this,function(t,n,e){"use strict";var o,i,s,r,a,l,c,d,h,u,p,g,f,m,v,y,w,b,x,$,k,E,S,M,L,C=Object.defineProperty,R=t=>{throw TypeError(t)},A=(t,n,e)=>((t,n,e)=>n in t?C(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e)(t,"symbol"!=typeof n?n+"":n,e),D=(t,n,e)=>n.has(t)||R("Cannot "+e),O=(t,n,e)=>(D(t,n,"read from private field"),e?e.call(t):n.get(t)),_=(t,n,e)=>n.has(t)?R("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,e),T=(t,n,e,o)=>(D(t,n,"write to private field"),o?o.call(t,e):n.set(t,e),e),B=(t,n,e)=>(D(t,n,"access private method"),e);const N=new Set,z={ux:{nativeOverride:!1,theme:"light"},board:{readOnly:!1},cssPath:"",debug:!1};"undefined"==typeof window||window.__NINE_GLOBAL_CONFIG__||(window.__NINE_GLOBAL_CONFIG__=z);const P="undefined"!=typeof window?window.__NINE_GLOBAL_CONFIG__:z,j=t=>(N.add(t),t("all",P),()=>N.delete(t)),W=new Proxy(P,{set:(t,n,e)=>(t[n]=e,N.forEach(e=>e(n,t)),!0),get:(t,n)=>t[n]}),Y={config:W,get cssPath(){return this.config.cssPath||""},setup(t={}){Object.entries(t).forEach(([t,n])=>{"object"!=typeof n||null===n||Array.isArray(n)?this.config[t]=n:this.config[t]={...this.config[t],...n}}),"undefined"!=typeof window&&(window.nine=window.nine||this)}};let I=(a=class{constructor(t=null,n="green"){_(this,s),_(this,o),_(this,i),T(this,o,t),T(this,i,n)}init(t,n="green"){return T(this,o,t),T(this,i,n),this}get log(){if(!B(this,s,r).call(this))return()=>{};const t=`color: ${O(this,i)}; font-weight: bold;`;return O(this,o)?console.log.bind(console,`%c[${O(this,o)}]`,t):console.log.bind(console)}get warn(){return B(this,s,r).call(this)?O(this,o)?console.warn.bind(console,`%c[${O(this,o)}]`,"color: cyan; font-weight: bold;"):console.warn.bind(console):()=>{}}get error(){return O(this,o)?console.error.bind(console,`%c[${O(this,o)}]`,"color: red; font-weight: bold;"):console.error.bind(console)}},o=new WeakMap,i=new WeakMap,s=new WeakSet,r=function(){if(nine&&nine.config&&nine.config.debug){const t=nine.config.debug;return!1!==t.enable&&(!0===t.enable&&Array.isArray(t.filter)&&O(this,o)?t.filter.includes(O(this,o)):t.enable)}return"undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname||window.location.hostname.startsWith("192.168."))},a);const H=new I;"undefined"!=typeof window&&(window.trace=H);l=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakSet,u=function(){if(0===O(this,c).length)return;const t=O(this,c).splice(0,O(this,c).length),n=new Set;t.forEach(t=>{const e=`${t.func.name}_${JSON.stringify(t.args)}`;n.has(e)||(t.func(...t.args),n.add(e))}),T(this,l,null)};class q extends H.constructor{constructor(){super(),this.init("nine-util","green")}}const F=new q;class X{static show(){let t=document.getElementById("global-loading-overlay");if(!t&&(t=document.createElement("div"),t.id="global-loading-overlay",t.style.cssText="\n position: fixed; inset: 0; z-index: 9999;\n background: rgba(0, 0, 0, 0.4); display: flex; \n justify-content: center; align-items: center;\n backdrop-filter: blur(2px);\n ",t.innerHTML='<div class="loading-spinner"></div>',document.body.appendChild(t),!document.getElementById("nine-util-style"))){const t=document.createElement("style");t.id="nine-util-style",t.innerHTML="\n .loading-spinner {\n width: 48px; height: 48px;\n border: 5px solid rgba(255, 255, 255, 0.3);\n border-top-color: white; border-radius: 50%;\n animation: nine-spin 1s linear infinite;\n }\n @keyframes nine-spin { to { transform: rotate(360deg); } }\n ",document.head.appendChild(t)}t.style.display="flex"}static hide(){const t=document.getElementById("global-loading-overlay");t&&(t.style.display="none")}}const U=class{};p=new WeakMap,A(U,"BASE_URL",window.__API_BASE_URL__||""),_(U,p,(t,n,e={},o={},i=!0)=>{const s=n.startsWith("http")?n:`${U.BASE_URL}${n}`;i&&X.show();const r={...o},a=localStorage.getItem("accessToken");!a||r.Authorization||r.authorization||(r.Authorization=`Bearer ${a}`),e instanceof FormData||(r["Content-Type"]="application/json");const l={method:t,headers:r};let c=s;return"GET"===t?c+=`?${new URLSearchParams(e)}`:l.body=e instanceof FormData?e:JSON.stringify(e),fetch(c,l).then(async t=>{if(!t.ok){const n=(await t.json().catch(()=>({}))).message||`API 오류 (${t.status})`;throw 400===t.status?null==nine||nine.alert(n).rgb().shake():console.error("시스템 오류:",n),new Error(n)}return t.json()}).catch(n=>{throw F.error(`[IdeFetch.${t.toLowerCase()}] ${s} 실패:`,n),n}).finally(()=>{i&&X.hide()})}),A(U,"get",(t,n={},e={},o=!0)=>{var i;return O(i=U,p).call(i,"GET",t,n,e,o)}),A(U,"post",(t,n={},e={},o=!0)=>{var i;return O(i=U,p).call(i,"POST",t,n,e,o)}),A(U,"postMultipart",async(t,n=[],e={})=>{const{fileKey:o="fileContents",filePartName:i="files",jsonPartName:s="dataList",chunkSize:r=10}=e,a=Array.isArray(n)?n:[n];X.show();let l=0,c=null;return(async()=>{let e=0;for(let d=0;d<a.length;d+=r){const h=new FormData,u=a.slice(d,d+r),p=[];u.forEach((t,n)=>{const{[o]:s,...r}=t,a=Array.isArray(s)?s:[s],l=[];a.forEach(t=>{t instanceof File&&(h.append(i,t),l.push(e++))}),p.push({...r,fileIndices:l})});const g=new Blob([JSON.stringify(Array.isArray(n)?p:p[0])],{type:"application/json"});if(h.append(s,g),c=await U.post(t,h,!1),!c||!c.success&&"OK"!==c.status)throw new Error(`청크 전송 실패: ${d}번째 섹션`);l+=u.length}return{...c,success:!0,totalCount:l}})().finally(()=>X.hide())}),A(U,"postOneMultipart",async(t,n={},e={})=>{const{fileKey:o="fileContents",jsonPartName:i="dataList"}=e;X.show();try{const e=new FormData,{[o]:s,...r}=n,a=(t,n)=>{Array.isArray(n)?n.forEach(n=>a(t,n)):n instanceof File?e.append(t,n):n&&"object"==typeof n&&Object.entries(n).forEach(([t,n])=>a(t,n))};s&&"object"==typeof s&&Object.entries(s).forEach(([t,n])=>{a(t,n)});const l=new Blob([JSON.stringify(r)],{type:"application/json"});e.append(i,l);const c=await U.post(t,e,!1);if(c&&(c.success||"OK"===c.status))return{...c,success:!0};throw new Error("전송 실패")}catch(s){throw F.error("[postOneMultipart] Error:",s),s}finally{X.hide()}}),A(U,"postMultipart_BAK",async(t,n=[],e={})=>{const{fileKey:o="fileContents",filePartName:i="files",jsonPartName:s="dataList",chunkSize:r=10}=e;X.show();let a=0,l=null;return(async()=>{for(let e=0;e<n.length;e+=r){const c=new FormData,d=n.slice(e,e+r),h=[];d.forEach(t=>{const{[o]:n,_fileObj:e,...s}=t;h.push(s),n instanceof File&&c.append(i,n)});const u=new Blob([JSON.stringify(h)],{type:"application/json"});if(c.append(s,u),l=await U.post(t,c,!1),!l||!l.success&&"OK"!==l.status)throw new Error(`청크 전송 실패: ${e}번째 섹션`);a+=d.length}return{...l,success:!0,totalCount:a}})().catch(t=>{throw F.error("[postChunk] Error:",t),t}).finally(()=>{X.hide()})});let K=U;const G=K,J='\n\tdialog::backdrop {\n\t\tbackground: rgba(0, 0, 0, 0.3);\n\t}\n\t\n\tdialog:modal {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tpadding: 0;\n\t\toverflow: hidden;\n\t\tborder: 1px solid darkgreen;\n\t\toutline: none;\n\t\tresize: both;\n\t\tbox-shadow: 0 0 4px 0 darkgreen;\n width: 500px;\n height: fit-content;\n min-width: 330px;\n min-height: 60px;\n max-height: 100%;\n }\n \n \n \n \n\tdiv.head .rect1, div.head .rect2, div.head .rect3 {\n\t\tdisplay: none;\n\t\twidth: 50px;\n\t\theight: 100%;\n\t}\n\tdiv.head .rect1 {\n\t\tbackground-color: red;\n\t}\n\tdiv.head .rect2 {\n\t\tbackground-color: darkgreen;\n\t}\n\tdiv.head .rect3 {\n\t\tbackground-color: olive;\n\t}\n\t\n\tdiv.head {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t--height: 30px;\n\t\tbackground-color: darkgreen;\n\t\tpadding: 4px;\n\t\tcursor: move;\n\t}\n\tdiv.head:hover {\n\t\tfilter: brightness(110%);\n\t}\n\t\n\tdiv.head span {\n\t\tfont-size: 12px;\n\t\tposition: relative;\n\t}\n\t\n\tdiv.head span.title {\n\t\tcolor: #ddd;\n\t\tmargin-left: 4px;\n\t\tfont-weight: bold;\n\t}\n\t\n\tdiv.head span.sub-title {\n\t\tcolor: #ccc;\n\t\tmargin-left: 8px;\n\t\tfont-style: italic;\n\t}\n\t\n\tdiv.head form {\n\t\tmargin: 0;\n\t}\n\tdiv.head button {\n\t\tmargin-right: 4px;\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tcolor: #ccc;\n\t\tfont-size: x-small;\n\t}\n\tdiv.head button:hover {\n\t\tcursor: pointer;\n\t}\n\t\n\tdiv.contents {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden;\n\t\tbackground-color: white;\n\t\tcolor: #333;\n\t}\n\tdiv.left {\n\t\tposition: relative;\n\t\twidth: 16px;\n\t\theight: 100%;\n\t\tbackground-color: #ddd;\n\t\tdisplay: none;\n\t}\n\t\n\tdiv.left span {\n\t\twriting-mode: vertical-rl;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tuser-select: none;\n\t\tcolor: #ccc;\n\t\tfont-weight: 700;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmargin-left: 3px;\n\t\tmargin-top: 3px;\n\t}\n\tdiv.close2 {\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 3px;\n\t\tcursor: pointer;\n\t\tcolor: #666;\n\t}\n\tdiv.close2 svg:hover {\n\t\tcolor: #999;\n\t}\n\t\n\tdiv.body {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: unset;\n\t\t--border: 3px solid #999;\n\t\t--border-top: none;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tpadding: 10px;\n\t\tgap: 8px;\n\t\tflex-direction: column;\n\t}\n\t\n\t\n\t\n\t\n\tng-sphere.icon {\n\t\tmargin-left: 8px;\n\t}\n\t\n\t.buttons {\n\t\tdisplay: flex;\n\t\tposition: absolute;\n\t\tright: 4px;\n\t}\n\t\n\tng-sphere {\n\t\tposition: relative;\n\t\t--width: 16px;\n\t\t--height: 16px;\n\t\tcursor: pointer;\n\t\tmargin-right: 4px;\n\t\tdisplay: flex;\n\t}\n\tng-sphere:hover {\n\t\tfilter: brightness(90%);\n\t}\n\tng-sphere:active {\n\t\tfilter: brightness(80%);\n\t}\n\t\n\tng-sphere:hover::after {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t}\n\tng-sphere.apply:hover::after {\n\t\tbackground-size: 14px 14px;\n\t\tbackground-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><polyline points="2.5,7 6,10 11,3" style="fill:none;stroke:white;stroke-width:2px;" /></svg>\');\n\t}\n\t\n\tng-sphere.reset:hover::after {\n\t\tbackground-size: 12px 12px;\n\t\tbackground-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" style="fill:none;stroke:white;stroke-width:2px;" focusable="false" aria-hidden="true"><path d="M10 5h5V0"></path><path d="M15 8a6.957 6.957 0 0 1-7 7 6.957 6.957 0 0 1-7-7 6.957 6.957 0 0 1 7-7 6.87 6.87 0 0 1 6.3 4"></path></svg>\');\n\t}\n\t\n\tng-sphere.close:hover::after {\n\t\tbackground-size: 12px 12px;\n\t\tbackground-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" style="fill:none;stroke:white;stroke-width:2px;" focusable="false" aria-hidden="true" viewBox="0 0 16 16"><path d="M2 2l12 12M14 2L2 14"></path></svg>\');\n\t}\n\t\n\t\n\tbutton {\n cursor: pointer;\n }\n \n .input-area {\n position: relative;\n height: 100%;\n --display: flex;\n textarea {\n width: 100%;\n height: 100%;\n min-height: 100px;\n padding: 8px;\n box-sizing: border-box;\n resize: none;\n border-radius: 2px;\n border-color: #ccc;\n }\n textarea:focus {\n border-color: green;\n outline: none; /* 브라우저 기본 파란색 테두리 제거 */\n }\n }\n \n .buttons-confirm {\n position: absolute;\n display: flex;\n justify-content: flex-end;\n bottom: 8px;\n right: 8px;\n }\n \n \n .buttons-confirm button {\n height: 32px;\n margin-right: 8px;\n border: none;\n outline: none;\n width: 60px;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .buttons-confirm button:hover {\n filter: brightness(90%);\n }\n .buttons-confirm button:active {\n color: #ccc;\n }\n \n button.ok {\n --display: none;\n background-color: darkgreen;\n color: white;\n }\n button.cancel {\n color: white;\n background-color: #6c757d;\n }\n \n \n \n div.msg {\n position: relative;\n height: 100%;\n font-size: 14px;\n color: #333;\n padding-bottom: 48px;\n }\n \n .reset, .apply {\n display: none;\n }\n \n \n \n :host(.classic) dialog:modal {\n border: 1px solid #007bff;\n box-shadow: 0 0 4px 0 #007bff;\n }\n \n :host(.classic) div.head {\n background-color: #007bff;\n }\n :host(.classic) div.head:hover {\n filter: brightness(110%);\n }\n \n :host(.classic) div.head span {\n font-size: 12px;\n }\n \n :host(.classic) div.head span.title {\n color: #ddd;\n margin-left: 4px;\n font-weight: bold;\n }\n \n :host(.classic) div.head span.sub-title {\n color: #ccc;\n margin-left: 8px;\n font-style: italic;\n }\n :host(.classic) div.head button {\n margin-right: 4px;\n background-color: transparent;\n border: none;\n color: #ccc;\n font-size: x-small;\n }\n \n \n \n \n :host(.rgb) dialog:modal {\n border: none;\n box-shadow: unset;\n border-top: none;\n height: 140px;\n }\n \n :host(.rgb) div.left {\n display: block;\n background-color: #ddd;\n }\n :host(.rgb) div.left span {\n color: #ccc;\n }\n :host(.rgb) div.close2 {\n display: block;\n color: #666;\n }\n :host(.rgb) div.close2 svg:hover {\n color: #999;\n }\n :host(.rgb) div.head {\n height: 4px;\n background-color: #999;\n padding: 0;\n }\n :host(.rgb) div.contents {\n height: calc(100% - 4px);\n }\n \n :host(.rgb) div.body {\n height: auto; /* 세로로 꽉 차는 현상 방지 */\n --max-height: 500px; /* 내용이 많을 때만 스크롤 생기도록 제한 */\n }\n \n :host(.rgb) div.head ng-sphere,\n :host(.rgb) div.head span,\n :host(.rgb) div.head .buttons {\n display: none;\n }\n \n :host(.rgb) div.head .rect1,\n :host(.rgb) div.head .rect2,\n :host(.rgb) div.head .rect3 {\n display: flex;\n }\n \n \n :host(.rgb) div.head:hover {\n filter: unset;\n }\n \n \n /* --- Animation Core --- */\n:host {\n --nx-duration: 0.4s;\n --nx-timing: cubic-bezier(0.34, 1.56, 0.64, 1);\n}\n\n/* 🎯 수정: 애니메이션 클래스가 붙은 경우에만 초기 opacity를 0으로 설정 */\n:host(.fade) dialog,\n:host(.zoom) dialog,\n:host(.moveUp) dialog,\n:host(.moveDown) dialog,\n:host(.moveLeft) dialog,\n:host(.moveRight) dialog,\n:host(.roadRunner) dialog {\n opacity: 0;\n}\n\n/* shake는 애니메이션 내부에서 opacity를 다루므로 제외하거나 별도 처리 */\n:host(.shake) dialog { \n opacity: 1; \n}\n\n/* 1. Fade (서서히 나타남) */\n:host(.fade) dialog { animation: nx-fade-in var(--nx-duration) forwards; }\n@keyframes nx-fade-in { from { opacity: 0; } to { opacity: 1; } }\n\n/* 2. Zoom (커지며 나타남) */\n:host(.zoom) dialog { animation: nx-zoom-in var(--nx-duration) var(--nx-timing) forwards; }\n@keyframes nx-zoom-in { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }\n\n/* 3. Slide (상하좌우) */\n:host(.moveUp) dialog { animation: nx-move-up var(--nx-duration) var(--nx-timing) forwards; }\n:host(.moveDown) dialog { animation: nx-move-down var(--nx-duration) var(--nx-timing) forwards; }\n:host(.moveLeft) dialog { animation: nx-move-left var(--nx-duration) var(--nx-timing) forwards; }\n:host(.moveRight) dialog { animation: nx-move-right var(--nx-duration) var(--nx-timing) forwards; }\n\n@keyframes nx-move-up { from { opacity: 0; transform: translateY(100px); } to { opacity: 1; transform: translateY(0); } }\n@keyframes nx-move-down { from { opacity: 0; transform: translateY(-100px); } to { opacity: 1; transform: translateY(0); } }\n@keyframes nx-move-left { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }\n@keyframes nx-move-right { from { opacity: 0; transform: translateX(-100px); } to { opacity: 1; transform: translateY(0); } }\n\n/* 4. Shake (상하좌우 격렬한 진동 - 에러 인지용) */\n:host(.shake) dialog { \n animation: nx-heavy-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;\n opacity: 1; \n}\n\n@keyframes nx-heavy-shake {\n 10%, 90% { transform: translate3d(-1px, -2px, 0); }\n 20%, 80% { transform: translate3d(2px, 4px, 0); }\n 30%, 50%, 70% { transform: translate3d(-6px, -6px, 0); }\n 40%, 60% { transform: translate3d(6px, 6px, 0); }\n}\n\n/* 5. Road Runner (등장: 왼쪽에서 탄력 있게 / 퇴장: 움츠렸다가 광속 탈출) */\n:host(.roadRunner) dialog { \n animation: roadRunnerIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; \n}\n\n@keyframes roadRunnerIn {\n 0% { transform: translateX(-1500px) skewX(30deg); opacity: 1; }\n 70% { transform: translateX(30px) skewX(-10deg); opacity: 1; }\n 100% { transform: translateX(0) skewX(0deg); opacity: 1; }\n}\n\n/* --- Out Animations (닫힐 때) --- */\ndialog.out { pointer-events: none; }\n\n/* Road Runner 퇴장: 슥 움츠렸다가(Anticipation) 쌩~! */\n:host(.roadRunner) dialog.out { \n animation: roadRunnerOut 0.5s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards; \n}\n\n@keyframes roadRunnerOut {\n 0% { \n transform: translateX(0) scale(1) skewX(0deg); \n opacity: 1; \n }\n 30% { \n /* 예비 동작: 뒤로 살짝 갔다가 움츠러들기 */\n transform: translateX(50px) scaleX(1.2) scaleY(0.8) skewX(-20deg); \n opacity: 1; \n }\n 100% { \n /* 발사: 길게 늘어나며 광속 탈출 */\n transform: translateX(2000px) scaleX(4) scaleY(0.3) skewX(50deg); \n opacity: 0; \n filter: blur(10px); /* 👈 잔상 느낌 추가 */\n }\n}\n\n/* 일반 퇴장 (기본) */\ndialog.out { animation: nx-fade-out 0.3s forwards; }\n@keyframes nx-fade-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.9); } }\n';class V extends HTMLElement{constructor(){super(),_(this,g),_(this,f),A(this,"showModal",()=>{var t,n;O(this,f).showModal(),null==(n=(null==(t=this.shadowRoot)?void 0:t.activeElement)||document.activeElement)||n.blur()}),A(this,"close",()=>{O(this,f).close(),this.remove()}),_(this,m,()=>{const t=this.querySelector(".head");t&&(t.addEventListener("mousedown",O(this,v)),t.addEventListener("touchstart",O(this,y))),this.querySelectorAll(".close, .close2, .cancel").forEach(t=>{t.onclick=()=>this.closeWithAnimation(null)}),this.querySelectorAll(".ok").forEach(t=>{})}),_(this,v,t=>{if(t.target.closest("buttons"))return;if(0!==t.button||t.altKey||t.ctrlKey||t.shiftKey)return;const n=O(this,f).getBoundingClientRect();T(this,g,{x:t.clientX-n.left,y:t.clientY-n.top});const e=t=>{O(this,f).style.position="fixed",O(this,f).style.margin="0",O(this,f).style.left=t.clientX-O(this,g).x+"px",O(this,f).style.top=t.clientY-O(this,g).y+"px"},o=()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",o)};document.addEventListener("mousemove",e),document.addEventListener("mouseup",o)}),_(this,y,t=>{if(t.target.closest("buttons"))return;const n=O(this,f).getBoundingClientRect(),e=t.changedTouches[0];T(this,g,{x:e.pageX-n.left,y:e.pageY-n.top});const o=t=>{const n=t.changedTouches[0];O(this,f).style.position="fixed",O(this,f).style.margin="0",O(this,f).style.left=n.pageX-O(this,g).x+"px",O(this,f).style.top=n.pageY-O(this,g).y+"px"},i=()=>{document.removeEventListener("touchmove",o),document.removeEventListener("touchend",i)};document.addEventListener("touchmove",o),document.addEventListener("touchend",i)})}connectedCallback(){const t=this.innerHTML,n=this.getAttribute("subject")||"Details";F.log(J),this.innerHTML=`\n\t\t\t<style>${J}</style>\n\t\t\n\t\t\t<dialog>\n\t\t\t\t<div class="head">\n\t\t\t\t\t<div class="rect1"></div>\n\t\t\t\t\t<div class="rect2"></div>\n\t\t\t\t\t<div class="rect3"></div>\n\t\t\t\t\t<ng-sphere class="icon" end-fill="#666" size="8"></ng-sphere>\n\t\t\t\t\t<span class="title">${n}</span>\n\t\t\t\t\t<span class="sub-title"></span>\n\t\t\t\t\t<div class="buttons">\n\t\t\t\t\t\t<ng-sphere class="apply" start-fill="#cc6" end-fill="#660" size="16" title="apply"></ng-sphere>\n\t\t\t\t\t\t<ng-sphere class="reset" start-fill="#99f" end-fill="#00f" size="16" title="reset"></ng-sphere>\n\t\t\t\t\t\t<ng-sphere class="close" start-fill="#f99" end-fill="#f00" size="16" title="close"></ng-sphere>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="contents">\n\t\t\t\t\t<div class="left">\n\t\t\t\t\t\t<span>가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="body">\n\t\t\t\t\t\t${t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="close2">\n\t\t\t\t\t\t<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">\n\t\t\t\t\t\t\t<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</dialog>\n\t\t`,T(this,f,this.querySelector("dialog")),O(this,m).call(this)}closeWithAnimation(t){O(this,f).classList.add("out"),setTimeout(()=>{O(this,f).close(),this.dispatchEvent(new CustomEvent("closed",{detail:t})),this.remove()},300)}}g=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakMap,y=new WeakMap;class Z extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}static async open(t,n,e,o,i){var s,r,a;const l=t.tagName.toLowerCase(),c={"true-text":"확인","false-text":"취소",class:"classic",animation:"fade",...(null==(a=null==(r=null==(s=window.nine)?void 0:s.config)?void 0:r.ux)?void 0:a[l.replace("nine-","").replace("-popup","")])||{},...o};document.querySelectorAll(l).forEach(t=>t.remove());const d=document.createElement(l);c.class&&d.classList.add(c.class),c.animation&&d.classList.add(c.animation),document.body.appendChild(d),i(d,n,c);const h=d.shadowRoot.querySelector("nine-dialog");return e&&h.setAttribute("subject",e),new Promise(t=>{h.addEventListener("closed",n=>t(n.detail)),d.setupEvents(t,h),h.showModal()})}}customElements.get("nine-dialog")||customElements.define("nine-dialog",V);const Q=class extends Z{constructor(){super()}render(t,n){this.shadowRoot.innerHTML=`\n <nine-dialog>\n <div class="msg">${t.replace(/\n/g,"<br/>")}</div>\n <div class="buttons-confirm">\n <button class="cancel">${n["false-text"]}</button>\n <button class="ok">${n["true-text"]}</button>\n </div>\n </nine-dialog>`}setupEvents(t,n){this.shadowRoot.querySelector(".ok").onclick=()=>n.closeWithAnimation(!0)}};A(Q,"tagName","nine-confirm-popup"),A(Q,"confirm",(t,n,e)=>Z.open(Q,t,n,e,(t,n,e)=>t.render(n,e)));let tt=Q;const nt=class extends Z{constructor(){super()}render(t,n){this.shadowRoot.innerHTML=`\n <nine-dialog>\n <div class="msg">${t.replace(/\n/g,"<br/>")}</div>\n <div class="buttons-confirm">\n <button class="cancel">확인</button>\n </div>\n </nine-dialog>`}setupEvents(t,n){}};A(nt,"tagName","nine-alert-popup"),A(nt,"alert",(t,n,e)=>Z.open(nt,t,n,e,(t,n,e)=>t.render(n,e)));let et=nt;customElements.get("nine-confirm-popup")||customElements.define("nine-confirm-popup",tt),customElements.get("nine-alert-popup")||customElements.define("nine-alert-popup",et);const ot=class extends Z{constructor(){super()}render(t,n){trace.log(this),trace.log(this.shadowRoot),this.shadowRoot.innerHTML=`\n\t\t\t<style>\n\t\t\t\tdialog {\n\t\t\t\t\theight: 300px !important;\n\t\t\t\t}\n\t\t\t\t.msg {\n\t\t\t\t\theight: unset !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t\n <nine-dialog>\n <div class="msg">${t.replace(/\n/g,"<br/>")}</div>\n <div class="input-area">\n <textarea placeholder="내용을 입력하세요..."></textarea>\n </div>\n <div class="buttons-confirm">\n <button class="cancel">${n["false-text"]}</button>\n <button class="ok">${n["true-text"]}</button>\n </div>\n </nine-dialog>`}setupEvents(t,n){const e=this.shadowRoot.querySelector("textarea");this.shadowRoot.querySelector(".ok").onclick=()=>n.closeWithAnimation(e.value),requestAnimationFrame(()=>e.focus())}};A(ot,"tagName","nine-prompt-popup"),A(ot,"prompt",(t,n,e)=>Z.open(ot,t,n,e,(t,n,e)=>t.render(n,e)));let it=ot;customElements.get("nine-prompt-popup")||customElements.define("nine-prompt-popup",it);class st{constructor(){_(this,w),A(this,"alert",(t,n="Alert")=>B(this,w,b).call(this,"alert",t,n,"classic")),A(this,"confirm",(t,n="Confirm")=>B(this,w,b).call(this,"confirm",t,n,"classic")),A(this,"prompt",(t,n="Prompt")=>B(this,w,b).call(this,"prompt",t,n,"classic"))}}w=new WeakSet,b=function(t,n,e,o){const i={class:o,animation:"fade"};let s=!1;const r={alert:et,confirm:tt,prompt:it}[t],a={rgb:()=>(i.class="rgb",a),classic:()=>(i.class="classic",a),shake:()=>(i.animation="shake",a),run:()=>(i.animation="roadRunner",a),zoom:()=>(i.animation="zoom",a),then:(o,a)=>(s=!0,r[t](n,e,i).then(o,a))};return Promise.resolve().then(()=>{s||(s=!0,r[t](n,e,i))}),a},A(st,"cssPath",""),Object.assign(Y,new st);class rt extends HTMLElement{constructor(){super(),_(this,x),_(this,$,()=>{const t=this.getAttribute("only-sibling");return null!==t&&"false"!==t.toLowerCase()}),_(this,k,t=>{const n=t.previousElementSibling,e=t.nextElementSibling;if(!n||!e)return void T(this,x,this.classList.contains("h")?"h":"v");const o=n.getBoundingClientRect(),i=e.getBoundingClientRect();this.classList.contains("h")?T(this,x,"h"):this.classList.contains("v")?T(this,x,"v"):T(this,x,Math.abs(o.top-i.top)<5?"h":"v")}),_(this,E,t=>{t.preventDefault(),t.stopPropagation();const n=this.getBoundingClientRect(),e="h"===O(this,x),o=e?t.clientX-n.left:t.clientY-n.top,i=document.createElement("div");i.className=`nx-splitter-drag-bar-${O(this,x)}`,Object.assign(i.style,{position:"absolute",zIndex:"999",background:"#666",opacity:"0.6",pointerEvents:"none"});const s=this.getRootNode({composed:!0}),r=s instanceof ShadowRoot?s.host:this.parentElement,a=this.previousElementSibling,l=this.nextElementSibling;if(!r||!a||!l)return void F.warn("Spliter's parent or siblings not found.");(r.shadowRoot||r).appendChild(i);const c=i.offsetParent.getBoundingClientRect(),d=a.getBoundingClientRect(),h=l.getBoundingClientRect(),u=(e?n.left-c.left:n.top-c.top)+o;e?(i.style.top="0",i.style.left=`${u}px`,i.style.width="2px",i.style.height="100%"):(i.style.left="0",i.style.top=`${u}px`,i.style.height="2px",i.style.width="100%"),i.style.mixBlendMode="difference",i.style.zIndex="99999";const p=e?d.left-c.left:d.top-c.top,g=e?h.right-c.left-n.width:h.bottom-c.top-n.height,f=t=>{const n=e?t.clientX:t.clientY,o=e?n-c.left:n-c.top,s=Math.max(p,Math.min(o,g));e?i.style.left=`${s}px`:i.style.top=`${s}px`},m=()=>{window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",m),i.remove();const t=Array.from(r.children),n=t.filter(t=>"nx-splitter"!==t.tagName.toLowerCase()),o=window.getComputedStyle(r),s=e?o.getPropertyValue("column-gap"):o.getPropertyValue("row-gap"),c=parseFloat(s)||0,d=t.length>1?t.length-1:0,h=d*c,p=(e?parseFloat(i.style.left):parseFloat(i.style.top))-u,g=e?a.getBoundingClientRect().width:a.getBoundingClientRect().height,v=e?l.getBoundingClientRect().width:l.getBoundingClientRect().height;let y=g+p,w=v-p;y<0&&(w+=y,y=0),w<0&&(y+=w,w=0);const b=n.map(t=>e?t.getBoundingClientRect().width:t.getBoundingClientRect().height),x=t.reduce((t,n)=>"nx-splitter"===n.tagName.toLowerCase()?t+(e?n.getBoundingClientRect().width:n.getBoundingClientRect().height):t,0),k=e?r.getBoundingClientRect().width:r.getBoundingClientRect().height,E=k-x-h;if(F.log("[Debug] ---------------------------"),F.log(`[Debug] TotalContainerSize: ${k}`),F.log(`[Debug] TotalSplitterSize: ${x}`),F.log(`[Debug] GapSize: ${c}, GapCount: ${d}`),F.log(`[Debug] PrevSize(Old): ${g}, NextSize(Old): ${v}`),F.log(`[Debug] DragOffset: ${p}`),F.log(`[Debug] NewPrevSize: ${y}, NewNextSize: ${w}`),n.forEach((t,n)=>{const o=null!==t.querySelector("canvas"),i=e?t.getBoundingClientRect().width:t.getBoundingClientRect().height;F.log(`[Debug] Panel[${n}] (${o?"Canvas":"Normal"}): Current=${i.toFixed(2)}, New=${(t===a?y:t===l?w:b[n]).toFixed(2)}`)}),F.log("[Debug] ---------------------------"),O(this,$).call(this)){const t=this.previousElementSibling,n=this.nextElementSibling;t&&n&&(t.style.flex=`0 0 ${y}px`,n.style.flex=`0 0 ${w}px`)}else n.forEach((t,n)=>{let e;e=t===a?y:t===l?w:b[n];const o=e/E;F.log(t),t.classList.contains("sidebar")?t.style.flex=`0 0 ${e}px`:t.style.flex=`${o} ${o} 0`})};window.addEventListener("mousemove",f),window.addEventListener("mouseup",m)}),_(this,S,()=>{O(this,k).call(this,this),this.classList.add(O(this,x));const t=this.innerHTML.trim(),n=""===t?'<div class="grip"></div>':`<div class="grip"></div><div class="inner-container">${t}</div><div class="grip"></div>`,e=nine.cssPath?`@import "${nine.cssPath}/nine-util.css";`:"";this.innerHTML="";const o=document.createElement("template");o.innerHTML=`\n\t\t\t<style>\n\t\t\t\t@import "https://cdn.jsdelivr.net/npm/@ninebone/util@1.0.43/dist/css/nine-util.css";\n\t\t\t\t${e}\n\t\t\t</style>\n\t\t\t${n}\n `,this.shadowRoot.appendChild(o.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".grip").forEach(t=>{t.addEventListener("mousedown",t=>O(this,E).call(this,t))}),O(this,M).call(this),window.addEventListener("resize",()=>O(this,M).call(this))}),_(this,M,()=>{const t="h"===O(this,x),n=this.parentElement,e=Array.from(n.children).filter(t=>"nine-splitter"!==t.tagName.toLowerCase());if(e.length<2)return;const o=n.getBoundingClientRect(),i=e.reduce((n,e)=>n+(t?e.getBoundingClientRect().width:e.getBoundingClientRect().height),0),s=t?o.width:o.height;e.forEach(n=>{if(n.style.flex&&""!==n.style.flex.trim())return;const e=t?n.getBoundingClientRect().width:n.getBoundingClientRect().height,o=s*(e/i)/s;n.style.flex=`${o} ${o} 0`,F.log(n.style.flex)})}),this.attachShadow({mode:"open"})}connectedCallback(){O(this,S).call(this)}get cssPath(){return this.getAttribute("css-path")||st.cssPath}}function at(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}x=new WeakMap,$=new WeakMap,k=new WeakMap,E=new WeakMap,S=new WeakMap,M=new WeakMap,customElements.get("nine-splitter")||customElements.define("nine-splitter",rt);var lt,ct={exports:{}};var dt=(lt||(lt=1,ct.exports=function(){var t=1e3,n=6e4,e=36e5,o="millisecond",i="second",s="minute",r="hour",a="day",l="week",c="month",d="quarter",h="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var n=["th","st","nd","rd"],e=t%100;return"["+t+(n[(e-20)%10]||n[e]||n[0])+"]"}},v=function(t,n,e){var o=String(t);return!o||o.length>=n?t:""+Array(n+1-o.length).join(e)+t},y={s:v,z:function(t){var n=-t.utcOffset(),e=Math.abs(n),o=Math.floor(e/60),i=e%60;return(n<=0?"+":"-")+v(o,2,"0")+":"+v(i,2,"0")},m:function t(n,e){if(n.date()<e.date())return-t(e,n);var o=12*(e.year()-n.year())+(e.month()-n.month()),i=n.clone().add(o,c),s=e-i<0,r=n.clone().add(o+(s?-1:1),c);return+(-(o+(e-i)/(s?i-r:r-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:l,d:a,D:u,h:r,m:s,s:i,ms:o,Q:d}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},w="en",b={};b[w]=m;var x="$isDayjsObject",$=function(t){return t instanceof M||!(!t||!t[x])},k=function t(n,e,o){var i;if(!n)return w;if("string"==typeof n){var s=n.toLowerCase();b[s]&&(i=s),e&&(b[s]=e,i=s);var r=n.split("-");if(!i&&r.length>1)return t(r[0])}else{var a=n.name;b[a]=n,i=a}return!o&&i&&(w=i),i||!o&&w},E=function(t,n){if($(t))return t.clone();var e="object"==typeof n?n:{};return e.date=t,e.args=arguments,new M(e)},S=y;S.l=k,S.i=$,S.w=function(t,n){return E(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var M=function(){function m(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[x]=!0}var v=m.prototype;return v.parse=function(t){this.$d=function(t){var n=t.date,e=t.utc;if(null===n)return new Date(NaN);if(S.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(g);if(o){var i=o[2]-1||0,s=(o[7]||"0").substring(0,3);return e?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,s)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,s)}}return new Date(n)}(t),this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(t,n){var e=E(t);return this.startOf(n)<=e&&e<=this.endOf(n)},v.isAfter=function(t,n){return E(t)<this.startOf(n)},v.isBefore=function(t,n){return this.endOf(n)<E(t)},v.$g=function(t,n,e){return S.u(t)?this[n]:this.set(e,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,n){var e=this,o=!!S.u(n)||n,d=S.p(t),p=function(t,n){var i=S.w(e.$u?Date.UTC(e.$y,n,t):new Date(e.$y,n,t),e);return o?i:i.endOf(a)},g=function(t,n){return S.w(e.toDate()[t].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(n)),e)},f=this.$W,m=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case h:return o?p(1,0):p(31,11);case c:return o?p(1,m):p(0,m+1);case l:var w=this.$locale().weekStart||0,b=(f<w?f+7:f)-w;return p(o?v-b:v+(6-b),m);case a:case u:return g(y+"Hours",0);case r:return g(y+"Minutes",1);case s:return g(y+"Seconds",2);case i:return g(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,n){var e,l=S.p(t),d="set"+(this.$u?"UTC":""),p=(e={},e[a]=d+"Date",e[u]=d+"Date",e[c]=d+"Month",e[h]=d+"FullYear",e[r]=d+"Hours",e[s]=d+"Minutes",e[i]=d+"Seconds",e[o]=d+"Milliseconds",e)[l],g=l===a?this.$D+(n-this.$W):n;if(l===c||l===h){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},v.set=function(t,n){return this.clone().$set(t,n)},v.get=function(t){return this[S.p(t)]()},v.add=function(o,d){var u,p=this;o=Number(o);var g=S.p(d),f=function(t){var n=E(p);return S.w(n.date(n.date()+Math.round(t*o)),p)};if(g===c)return this.set(c,this.$M+o);if(g===h)return this.set(h,this.$y+o);if(g===a)return f(1);if(g===l)return f(7);var m=(u={},u[s]=n,u[r]=e,u[i]=t,u)[g]||1,v=this.$d.getTime()+o*m;return S.w(v,this)},v.subtract=function(t,n){return this.add(-1*t,n)},v.format=function(t){var n=this,e=this.$locale();if(!this.isValid())return e.invalidDate||p;var o=t||"YYYY-MM-DDTHH:mm:ssZ",i=S.z(this),s=this.$H,r=this.$m,a=this.$M,l=e.weekdays,c=e.months,d=e.meridiem,h=function(t,e,i,s){return t&&(t[e]||t(n,o))||i[e].slice(0,s)},u=function(t){return S.s(s%12||12,t,"0")},g=d||function(t,n,e){var o=t<12?"AM":"PM";return e?o.toLowerCase():o};return o.replace(f,function(t,o){return o||function(t){switch(t){case"YY":return String(n.$y).slice(-2);case"YYYY":return S.s(n.$y,4,"0");case"M":return a+1;case"MM":return S.s(a+1,2,"0");case"MMM":return h(e.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return n.$D;case"DD":return S.s(n.$D,2,"0");case"d":return String(n.$W);case"dd":return h(e.weekdaysMin,n.$W,l,2);case"ddd":return h(e.weekdaysShort,n.$W,l,3);case"dddd":return l[n.$W];case"H":return String(s);case"HH":return S.s(s,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(s,r,!0);case"A":return g(s,r,!1);case"m":return String(r);case"mm":return S.s(r,2,"0");case"s":return String(n.$s);case"ss":return S.s(n.$s,2,"0");case"SSS":return S.s(n.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(o,u,p){var g,f=this,m=S.p(u),v=E(o),y=(v.utcOffset()-this.utcOffset())*n,w=this-v,b=function(){return S.m(f,v)};switch(m){case h:g=b()/12;break;case c:g=b();break;case d:g=b()/3;break;case l:g=(w-y)/6048e5;break;case a:g=(w-y)/864e5;break;case r:g=w/e;break;case s:g=w/n;break;case i:g=w/t;break;default:g=w}return p?g:S.a(g)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return b[this.$L]},v.locale=function(t,n){if(!t)return this.$L;var e=this.clone(),o=k(t,n,!0);return o&&(e.$L=o),e},v.clone=function(){return S.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),L=M.prototype;return E.prototype=L,[["$ms",o],["$s",i],["$m",s],["$H",r],["$W",a],["$M",c],["$y",h],["$D",u]].forEach(function(t){L[t[1]]=function(n){return this.$g(n,t[0],t[1])}}),E.extend=function(t,n){return t.$i||(t(n,M,E),t.$i=!0),E},E.locale=k,E.isDayjs=$,E.unix=function(t){return E(1e3*t)},E.en=b[w],E.Ls=b,E.p={},E}()),ct.exports);const ht=at(dt);class ut extends HTMLElement{static get tagName(){return"nine-popup"}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML='\n\t\t\t<nine-dialog>\n\t\t\t\t<div class="popup-body"></div>\n\t\t\t</nine-dialog>\n\t\t'}close(t=null){const n=this.dialog;n&&n.closeWithAnimation(t)}get popupBody(){var t;return(null==(t=this.shadowRoot)?void 0:t.querySelector("nine-dialog .popup-body"))||null}get dialog(){var t;return(null==(t=this.shadowRoot)?void 0:t.querySelector("nine-dialog"))||null}}customElements.get("nine-popup")||customElements.define("nine-popup",ut);const pt={sort:(t,n="id",e="parentId",o="sortOrder",i="level")=>{if(!t||0===t.length)return[];const s={};t.forEach(t=>{s[t[n]]={...t,children:[]}});const r=[];t.forEach(t=>{const o=s[t[n]],i=t[e];i&&s[i]?s[i].children.push(o):r.push(o)});const a=t=>{t.sort((t,n)=>{const e=t[o],i=n[o];return"number"==typeof e&&"number"==typeof i?e-i:String(e||"").localeCompare(String(i||""))}),t.forEach(t=>{t.children.length>0&&a(t.children)})};a(r);const l=[],c=(t,n=1)=>{t.forEach(t=>{t[i]=n;const{children:e,...o}=t;l.push(o),e.length>0&&c(e,n+1)})};return c(r),l}};class gt extends HTMLElement{static get tagName(){return"nine-simple-popup"}constructor(){super()}connectedCallback(){const t=this.getAttribute("subject")||"Details";this.innerHTML=`\n\t\t\t<style>\n\t\t\t\tnine-simple-popup {\n\t\t\t\t\tposition: fixed;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\twidth: 100vw;\n\t\t\t\t\theight: 100vh;\n\t\t\t\t\tz-index: 9999;\n\t\t\t\t\tfont-family: inherit;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-overlay {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tbackground-color: rgba(0, 0, 0, 0.4);\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tbackdrop-filter: blur(2px);\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-dialog {\n\t\t\t\t\tbackground-color: #ffffff;\n\t\t\t\t\t--width: 460px;\n\t\t\t\t\tborder-radius: 12px;\n\t\t\t\t\tbox-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\tanimation: nsPopupShow 0.2s ease-out;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-header {\n\t\t\t\t\tpadding: 16px 20px;\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tjustify-content: space-between;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tborder-bottom: 1px solid #f1f5f9;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-title {\n\t\t\t\t\tfont-size: 16px;\n\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\tcolor: #0f172a;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-close-btn {\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tborder: none;\n\t\t\t\t\tfont-size: 20px;\n\t\t\t\t\tcolor: #94a3b8;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\tline-height: 1;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-close-btn:hover {\n\t\t\t\t\tcolor: #0f172a;\n\t\t\t\t}\n\t\t\t\tnine-simple-popup .ns-popup-body {\n\t\t\t\t\tpadding: 20px;\n\t\t\t\t\tmax-height: 80vh;\n\t\t\t\t\toverflow-y: auto;\n\t\t\t\t}\n\t\t\t\t@keyframes nsPopupShow {\n\t\t\t\t\tfrom {\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\ttransform: scale(0.95) translateY(10px);\n\t\t\t\t\t}\n\t\t\t\t\tto {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\ttransform: scale(1) translateY(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t\n\t\t\t<div class="ns-popup-overlay">\n\t\t\t\t<div class="ns-popup-dialog">\n\t\t\t\t\t<div class="ns-popup-header">\n\t\t\t\t\t\t<span class="ns-popup-title">${t}</span>\n\t\t\t\t\t\t<button class="ns-popup-close-btn">&times;</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ns-popup-body"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`,this.querySelector(".ns-popup-close-btn").onclick=()=>this.close(null),this.querySelector(".ns-popup-overlay").onclick=t=>{t.target.classList.contains("ns-popup-overlay")&&this.close(null)}}close(t=null){this.dispatchEvent(new CustomEvent("closed",{detail:t})),this.remove()}get popupBody(){return this.querySelector(".ns-popup-body")||null}}customElements.get("nine-simple-popup")||customElements.define("nine-simple-popup",gt);L=new WeakMap;const ft=new class{constructor(){A(this,"formatDate",(t,n)=>ht(t).format(n)),A(this,"lpad",(t,n,e)=>Array(n-String(t).length+1).join(e||"0")+t),A(this,"rpad",(t,n,e)=>t+Array(n-String(t).length+1).join(e||"0")),A(this,"cut",(t,n)=>{for(var e=t,o=0,i=0;i<e.length;i++)if((o+=e.charCodeAt(i)>128?2:1)>n)return e.substring(0,i);return e}),A(this,"getByteLength",t=>t.replace(/[\0-\x7f]|([0-\u07ff]|(.))/g,"$&$1$2").length),A(this,"popup",(t,o={},i="Details")=>{document.querySelectorAll(ut.tagName).forEach(t=>t.remove());const s=document.createElement(ut.tagName);return document.body.appendChild(s),new Promise(r=>{const a=s.popupBody,l=s.dialog;i&&l&&l.setAttribute("subject",i);const c=e.createRoot(a);null==l||l.addEventListener("closed",t=>{r(t.detail),setTimeout(()=>{c.unmount(),s.remove()},0)}),c.render(n.createElement(t,{data:o})),setTimeout(()=>{null==l||l.showModal()},0)})}),A(this,"simplePopup",(t,o={},i="Details")=>{document.querySelectorAll(gt.tagName).forEach(t=>t.remove());const s=document.createElement(gt.tagName);return i&&s.setAttribute("subject",i),document.body.appendChild(s),new Promise(i=>{const r=s.popupBody,a=e.createRoot(r);s.addEventListener("closed",t=>{i(t.detail),setTimeout(()=>{a.unmount(),s.remove()},0)}),a.render(n.createElement(t,{data:o,onClose:t=>s.close(t)}))})}),A(this,"querySelectorAll",(t,n=document)=>{const e=[],o=n=>{var i;if(!n)return;n.shadowRoot&&o(n.shadowRoot),null==(i=n.querySelectorAll)||i.call(n,t).forEach(t=>{e.includes(t)||e.push(t)});(n.children?Array.from(n.children):[]).forEach(t=>{o(t)})};return o(n),e}),A(this,"querySelector",(t,n=document)=>{var e;if(!n)return null;let o=null==(e=n.querySelector)?void 0:e.call(n,t);if(o)return o;if(n.shadowRoot&&(o=this.querySelector(t,n.shadowRoot),o))return o;const i=n.children?Array.from(n.children):[];for(const s of i)if(o=this.querySelector(t,s),o)return o;return null}),A(this,"closest",(t,n)=>{var e;if(!n||"string"!=typeof t)return null;let o=n;for(;o;){if(o.nodeType===Node.ELEMENT_NODE&&o.matches(t))return o;const n=null==(e=o.getRootNode)?void 0:e.call(o);o=n&&n instanceof ShadowRoot?n.host:o.parentElement||null}return null}),A(this,"login",t=>{const n=window.location.origin,e=window.__API_BASE_URL__||"";window.location.href=`${e}/accounts/auth/${t}/login?frontendUrl=${encodeURIComponent(n)}`}),_(this,L,t=>{const n=window.location.origin,e=window.__API_BASE_URL__||"";window.location.href=`${e}/accounts/auth/${t}/login?frontendUrl=${encodeURIComponent(n)}`}),A(this,"google",()=>({login:()=>O(this,L).call(this,"google")})),A(this,"kakao",()=>({login:()=>O(this,L).call(this,"kakao")})),A(this,"naver",()=>({login:()=>O(this,L).call(this,"naver")})),A(this,"randomUUID",t=>{t||(t=10);const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";let e="";for(let o=0;o<t;o++)e+=n.charAt(Math.floor(52*Math.random()));return e}),A(this,"tree",{sort:pt.sort})}};Object.assign(Y,ft),Y.safe=async t=>{try{return[await t,null]}catch(n){return[null,n]}},Y.api=G,Y.trace=H,Y.subscribeConfig=j,Y.config=W||{},"undefined"!=typeof window&&(window.nine=Y),t.Fetch=K,t.TaskDebouncer=class{constructor(t=50){_(this,h),_(this,l,null),_(this,c,[]),_(this,d),T(this,d,t)}exec(t,...n){O(this,c).push({func:t,args:n}),O(this,l)&&clearTimeout(O(this,l)),T(this,l,setTimeout(()=>B(this,h,u).call(this),O(this,d)))}execWithKey(t,n,...e){T(this,c,O(this,c).filter(n=>n.key!==t)),O(this,c).push({key:t,func:n,args:e}),O(this,l)&&clearTimeout(O(this,l)),T(this,l,setTimeout(()=>B(this,h,u).call(this),O(this,d)))}},t.Trace=I,t.api=G,t.config=W,t.loading=X,t.nine=Y,t.nineAlertPopup=et,t.nineConfirmPopup=tt,t.nineDialog=V,t.ninePromptPopup=it,t.subscribeConfig=j,t.trace=H,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=nine-util.umd.js.map