PageSourceSearch

https://gateway-saas-4mee37bk.manus.space/assets/index-Cp-dKl8P.js

js gateway-saas-4mee37bk.manus.space collected 2026-10-03 05:01:51 UTC 1,234,851 bytes, 696 lines download raw bytes

vendor: 21,926 bytes, lines 1-9
1function ET(t,s){for(var c=0;c<s.length;c++){const r=s[c];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function c(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=c(i);fetch(i.href,o)}})();function b2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vx={exports:{}},ji={};/**
2 * @license React
3 * react-jsx-runtime.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var uy;function _T(){if(uy)return ji;uy=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function c(r,i,o){var u=null;if(o!==void 0&&(u=""+o),i.key!==void 0&&(u=""+i.key),"key"in i){o={};for(var m in i)m!=="key"&&(o[m]=i[m])}else o=i;return i=o.ref,{$$typeof:t,type:r,key:u,ref:i!==void 0?i:null,props:o}}return ji.Fragment=s,ji.jsx=c,ji.jsxs=c,ji}var my;function AT(){return my||(my=1,vx.exports=_T()),vx.exports}var e=AT(),lr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},PT={setTimeout:(t,s)=>setTimeout(t,s),clearTimeout:t=>clearTimeout(t),setInterval:(t,s)=>setInterval(t,s),clearInterval:t=>clearInterval(t)},MT=class{#t=PT;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,s){return this.#t.setTimeout(t,s)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,s){return this.#t.setInterval(t,s)}clearInterval(t){this.#t.clearInterval(t)}},Yc=new MT;function RT(t){setTimeout(t,0)}var Xc=typeof window>"u"||"Deno"in globalThis;function oa(){}function OT(t,s){return typeof t=="function"?t(s):t}function sf(t){return typeof t=="number"&&t>=0&&t!==1/0}function v2(t,s){return Math.max(t+(s||0)-Date.now(),0)}function xc(t,s){return typeof t=="function"?t(s):t}function as(t,s){return typeof t=="function"?t(s):t}function py(t,s){const{type:c="all",exact:r,fetchStatus:i,predicate:o,queryKey:u,stale:m}=t;if(u){if(r){if(s.queryHash!==Xf(u,s.options))return!1}else if(!_i(s.queryKey,u))return!1}if(c!=="all"){const p=s.isActive();if(c==="active"&&!p||c==="inactive"&&p)return!1}return!(typeof m=="boolean"&&s.isStale()!==m||i&&i!==s.state.fetchStatus||o&&!o(s))}function xy(t,s){const{exact:c,status:r,predicate:i,mutationKey:o}=t;if(o){if(!s.options.mutationKey)return!1;if(c){if(gc(s.options.mutationKey)!==gc(o))return!1}else if(!_i(s.options.mutationKey,o))return!1}return!(r&&s.state.status!==r||i&&!i(s))}function Xf(t,s){return(s?.queryKeyHashFn||gc)(t)}function gc(t){return JSON.stringify(t,(s,c)=>nf(c)?Object.keys(c).sort().reduce((r,i)=>(r[i]=c[i],r),{}):c)}function _i(t,s){return t===s?!0:typeof t!=typeof s?!1:t&&s&&typeof t=="object"&&typeof s=="object"?Object.keys(s).every(c=>_i(t[c],s[c])):!1}var zT=Object.prototype.hasOwnProperty;function Zf(t,s){if(t===s)return t;const c=fy(t)&&fy(s);if(!c&&!(nf(t)&&nf(s)))return s;const i=(c?t:Object.keys(t)).length,o=c?s:Object.keys(s),u=o.length,m=c?new Array(u):{};let p=0;for(let f=0;f<u;f++){const b=c?f:o[f],h=t[b],y=s[b];if(h===y){m[b]=h,(c?f<i:zT.call(t,b))&&p++;continue}if(h===null||y===null||typeof h!="object"||typeof y!="object"){m[b]=y;continue}const j=Zf(h,y);m[b]=j,j===h&&p++}return i===u&&p===i?t:m}function Ai(t,s){if(!s||Object.keys(t).length!==Object.keys(s).length)return!1;for(const c in t)if(t[c]!==s[c])return!1;return!0}function fy(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function nf(t){if(!gy(t))return!1;const s=t.constructor;if(s===void 0)return!0;const c=s.prototype;return!(!gy(c)||!c.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function gy(t){return Object.prototype.toString.call(t)==="[object Object]"}function LT(t){return new Promise(s=>{Yc.setTimeout(s,t)})}function cf(t,s,c){return typeof c.structuralSharing=="function"?c.structuralSharing(t,s):c.structuralSharing!==!1?Zf(t,s):s}function BT(t,s,c=0){const r=[...t,s];return c&&r.length>c?r.slice(1):r}function UT(t,s,c=0){const r=[s,...t];return c&&r.length>c?r.slice(0,-1):r}var Ua=Symbol();function y2(t,s){return!t.queryFn&&s?.initialPromise?()=>s.initialPromise:!t.queryFn||t.queryFn===Ua?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function j2(t,s){return typeof t=="function"?t(...s):!!t}var IT=class extends lr{#t;#e;#a;constructor(){super(),this.#a=t=>{if(!Xc&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#a=t,this.#e?.(),this.#e=t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Jf=new IT;function rf(){let t,s;const c=new Promise((i,o)=>{t=i,s=o});c.status="pending",c.catch(()=>{});function r(i){Object.assign(c,i),delete c.resolve,delete c.reject}return c.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},c.reject=i=>{r({status:"rejected",reason:i}),s(i)},c}var HT=RT;function $T(){let t=[],s=0,c=m=>{m()},r=m=>{m()},i=HT;const o=m=>{s?t.push(m):i(()=>{c(m)})},u=()=>{const m=t;t=[],m.length&&i(()=>{r(()=>{m.forEach(p=>{c(p)})})})};return{batch:m=>{let p;s++;try{p=m()}finally{s--,s||u()}return p},batchCalls:m=>(...p)=>{o(()=>{m(...p)})},schedule:o,setNotifyFunction:m=>{c=m},setBatchNotifyFunction:m=>{r=m},setScheduler:m=>{i=m}}}var wt=$T(),qT=class extends lr{#t=!0;#e;#a;constructor(){super(),this.#a=t=>{if(!Xc&&window.addEventListener){const s=()=>t(!0),c=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",c,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",c)}}}}onSubscribe(){this.#e||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#a=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(c=>{c(t)}))}isOnline(){return this.#t}},Zd=new qT;function QT(t){return Math.min(1e3*2**t,3e4)}function N2(t){return(t??"online")==="online"?Zd.isOnline():!0}var lf=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function C2(t){let s=!1,c=0,r;const i=rf(),o=()=>i.status!=="pending",u=N=>{if(!o()){const w=new lf(N);y(w),t.onCancel?.(w)}},m=()=>{s=!0},p=()=>{s=!1},f=()=>Jf.isFocused()&&(t.networkMode==="always"||Zd.isOnline())&&t.canRun(),b=()=>N2(t.networkMode)&&t.canRun(),h=N=>{o()||(r?.(),i.resolve(N))},y=N=>{o()||(r?.(),i.reject(N))},j=()=>new Promise(N=>{r=w=>{(o()||f())&&N(w)},t.onPause?.()}).then(()=>{r=void 0,o()||t.onContinue?.()}),S=()=>{if(o())return;let N;const w=c===0?t.initialPromise:void 0;try{N=w??t.fn()}catch(T){N=Promise.reject(T)}Promise.resolve(N).then(h).catch(T=>{if(o())return;const k=t.retry??(Xc?0:3),E=t.retryDelay??QT,z=typeof E=="function"?E(c,T):E,_=k===!0||typeof k=="number"&&c<k||typeof k=="function"&&k(c,T);if(s||!_){y(T);return}c++,t.onFail?.(c,T),LT(z).then(()=>f()?void 0:j()).then(()=>{s?y(T):S()})})};return{promise:i,status:()=>i.status,cancel:u,continue:()=>(r?.(),i),cancelRetry:m,continueRetry:p,canStart:b,start:()=>(b()?S():j().then(S),i)}}var w2=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sf(this.gcTime)&&(this.#t=Yc.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Xc?1/0:300*1e3))}clearGcTimeout(){this.#t&&(Yc.clearTimeout(this.#t),this.#t=void 0)}},WT=class extends w2{#t;#e;#a;#n;#s;#c;#l;constructor(t){super(),this.#l=!1,this.#c=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#n=t.client,this.#a=this.#n.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=hy(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(t){if(this.options={...this.#c,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=hy(this.options);s.data!==void 0&&(this.setData(s.data,{updatedAt:s.dataUpdatedAt,manual:!0}),this.#t=s)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(t,s){const c=cf(this.state.data,t,this.options);return this.#r({data:c,type:"success",dataUpdatedAt:s?.updatedAt,manual:s?.manual}),c}setState(t,s){this.#r({type:"setState",state:t,setStateOptions:s})}cancel(t){const s=this.#s?.promise;return this.#s?.cancel(t),s?s.then(oa).catch(oa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>as(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ua||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>xc(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!v2(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(s=>s.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(s=>s.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(this.#s&&(this.#l?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#r({type:"invalidate"})}async fetch(t,s){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&s?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const c=new AbortController,r=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#l=!0,c.signal)})},i=()=>{const m=y2(this.options,s),f=(()=>{const b={client:this.#n,queryKey:this.queryKey,meta:this.meta};return r(b),b})();return this.#l=!1,this.options.persister?this.options.persister(m,f,this):m(f)},u=(()=>{const m={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:i};return r(m),m})();this.options.behavior?.onFetch(u,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#r({type:"fetch",meta:u.fetchOptions?.meta}),this.#s=C2({initialPromise:s?.initialPromise,fn:u.fetchFn,onCancel:m=>{m instanceof lf&&m.revert&&this.setState({...this.#e,fetchStatus:"idle"}),c.abort()},onFail:(m,p)=>{this.#r({type:"failed",failureCount:m,error:p})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const m=await this.#s.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#a.config.onSuccess?.(m,this),this.#a.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof lf){if(m.silent)return this.#s.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#r({type:"error",error:m}),this.#a.config.onError?.(m,this),this.#a.config.onSettled?.(this.state.data,m,this),m}finally{this.scheduleGc()}}#r(t){const s=c=>{switch(t.type){case"failed":return{...c,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...c,fetchStatus:"paused"};case"continue":return{...c,fetchStatus:"fetching"};case"fetch":return{...c,...S2(c.data,this.options),fetchMeta:t.meta??null};case"success":const r={...c,data:t.data,dataUpdateCount:c.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?r:void 0,r;case"error":const i=t.error;return{...c,error:i,errorUpdateCount:c.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:c.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...c,isInvalidated:!0};case"setState":return{...c,...t.state}}};this.state=s(this.state),wt.batch(()=>{this.observers.forEach(c=>{c.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:t})})}};function S2(t,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N2(s.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function hy(t){const s=typeof t.initialData=="function"?t.initialData():t.initialData,c=s!==void 0,r=c?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:c?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:c?"success":"pending",fetchStatus:"idle"}}var Wi=class extends lr{constructor(t,s){super(),this.options=s,this.#t=t,this.#r=null,this.#l=rf(),this.bindMethods(),this.setOptions(s)}#t;#e=void 0;#a=void 0;#n=void 0;#s;#c;#l;#r;#p;#u;#m;#o;#d;#i;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),by(this.#e,this.options)?this.#x():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return of(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return of(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#j(),this.#e.removeObserver(this)}setOptions(t){const s=this.options,c=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof as(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#N(),this.#e.setOptions(this.options),s._defaulted&&!Ai(this.options,s)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&vy(this.#e,c,this.options,s)&&this.#x(),this.updateResult(),r&&(this.#e!==c||as(this.options.enabled,this.#e)!==as(s.enabled,this.#e)||xc(this.options.staleTime,this.#e)!==xc(s.staleTime,this.#e))&&this.#g();const i=this.#h();r&&(this.#e!==c||as(this.options.enabled,this.#e)!==as(s.enabled,this.#e)||i!==this.#i)&&this.#b(i)}getOptimisticResult(t){const s=this.#t.getQueryCache().build(this.#t,t),c=this.createResult(s,t);return FT(this,c)&&(this.#n=c,this.#c=this.options,this.#s=this.#e.state),c}getCurrentResult(){return this.#n}trackResult(t,s){return new Proxy(t,{get:(c,r)=>(this.trackProp(r),s?.(r),r==="promise"&&!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(c,r))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=this.#t.defaultQueryOptions(t),c=this.#t.getQueryCache().build(this.#t,s);return c.fetch().then(()=>this.createResult(c,s))}fetch(t){return this.#x({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#x(t){this.#N();let s=this.#e.fetch(this.options,t);return t?.throwOnError||(s=s.catch(oa)),s}#g(){this.#y();const t=xc(this.options.staleTime,this.#e);if(Xc||this.#n.isStale||!sf(t))return;const c=v2(this.#n.dataUpdatedAt,t)+1;this.#o=Yc.setTimeout(()=>{this.#n.isStale||this.updateResult()},c)}#h(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#b(t){this.#j(),this.#i=t,!(Xc||as(this.options.enabled,this.#e)===!1||!sf(this.#i)||this.#i===0)&&(this.#d=Yc.setInterval(()=>{(this.options.refetchIntervalInBackground||Jf.isFocused())&&this.#x()},this.#i))}#v(){this.#g(),this.#b(this.#h())}#y(){this.#o&&(Yc.clearTimeout(this.#o),this.#o=void 0)}#j(){this.#d&&(Yc.clearInterval(this.#d),this.#d=void 0)}createResult(t,s){const c=this.#e,r=this.options,i=this.#n,o=this.#s,u=this.#c,p=t!==c?t.state:this.#a,{state:f}=t;let b={...f},h=!1,y;if(s._optimisticResults){const A=this.hasListeners(),V=!A&&by(t,s),H=A&&vy(t,c,s,r);(V||H)&&(b={...b,...S2(f.data,t.options)}),s._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:j,errorUpdatedAt:S,status:N}=b;y=b.data;let w=!1;if(s.placeholderData!==void 0&&y===void 0&&N==="pending"){let A;i?.isPlaceholderData&&s.placeholderData===u?.placeholderData?(A=i.data,w=!0):A=typeof s.placeholderData=="function"?s.placeholderData(this.#m?.state.data,this.#m):s.placeholderData,A!==void 0&&(N="success",y=cf(i?.data,A,s),h=!0)}if(s.select&&y!==void 0&&!w)if(i&&y===o?.data&&s.select===this.#p)y=this.#u;else try{this.#p=s.select,y=s.select(y),y=cf(i?.data,y,s),this.#u=y,this.#r=null}catch(A){this.#r=A}this.#r&&(j=this.#r,y=this.#u,S=Date.now(),N="error");const T=b.fetchStatus==="fetching",k=N==="pending",E=N==="error",z=k&&T,_=y!==void 0,P={status:N,fetchStatus:b.fetchStatus,isPending:k,isSuccess:N==="success",isError:E,isInitialLoading:z,isLoading:z,data:y,dataUpdatedAt:b.dataUpdatedAt,error:j,errorUpdatedAt:S,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>p.dataUpdateCount||b.errorUpdateCount>p.errorUpdateCount,isFetching:T,isRefetching:T&&!k,isLoadingError:E&&!_,isPaused:b.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:E&&_,isStale:eg(t,s),refetch:this.refetch,promise:this.#l,isEnabled:as(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=M=>{P.status==="error"?M.reject(P.error):P.data!==void 0&&M.resolve(P.data)},V=()=>{const M=this.#l=P.promise=rf();A(M)},H=this.#l;switch(H.status){case"pending":t.queryHash===c.queryHash&&A(H);break;case"fulfilled":(P.status==="error"||P.data!==H.value)&&V();break;case"rejected":(P.status!=="error"||P.error!==H.reason)&&V();break}}return P}updateResult(){const t=this.#n,s=this.createResult(this.#e,this.options);if(this.#s=this.#e.state,this.#c=this.options,this.#s.data!==void 0&&(this.#m=this.#e),Ai(s,t))return;this.#n=s;const c=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#f.size)return!0;const o=new Set(i??this.#f);return this.options.throwOnError&&o.add("error"),Object.keys(this.#n).some(u=>{const m=u;return this.#n[m]!==t[m]&&o.has(m)})};this.#C({listeners:c()})}#N(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const s=this.#e;this.#e=t,this.#a=t.state,this.hasListeners()&&(s?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#C(t){wt.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function VT(t,s){return as(s.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&s.retryOnMount===!1)}function by(t,s){return VT(t,s)||t.state.data!==void 0&&of(t,s,s.refetchOnMount)}function of(t,s,c){if(as(s.enabled,t)!==!1&&xc(s.staleTime,t)!=="static"){const r=typeof c=="function"?c(t):c;return r==="always"||r!==!1&&eg(t,s)}return!1}function vy(t,s,c,r){return(t!==s||as(r.enabled,t)===!1)&&(!c.suspense||t.state.status!=="error")&&eg(t,c)}function eg(t,s){return as(s.enabled,t)!==!1&&t.isStaleByTime(xc(s.staleTime,t))}function FT(t,s){return!Ai(t.getCurrentResult(),s)}function Jd(t){return{onFetch:(s,c)=>{const r=s.options,i=s.fetchOptions?.meta?.fetchMore?.direction,o=s.state.data?.pages||[],u=s.state.data?.pageParams||[];let m={pages:[],pageParams:[]},p=0;const f=async()=>{let b=!1;const h=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(s.signal.aborted?b=!0:s.signal.addEventListener("abort",()=>{b=!0}),s.signal)}
9)},y=y2(s.options,s.fetchOptions),j=async(S,N,w)=>{if(b)return Promise.reject();if(N==null&&S.pages.length)return Promise.resolve(S);const k=(()=>{const R={client:s.client,queryKey:s.queryKey,pageParam:N,direction:w?"backward":"forward",meta:s.options.meta};return h(R),R})(),E=await y(k),{maxPages:z}=s.options,_=w?UT:BT;return{pages:_(S.pages,E,z),pageParams:_(S.pageParams,N,z)}};if(i&&o.length){const S=i==="backward",N=S?T2:df,w={pages:o,pageParams:u},T=N(r,w);m=await j(w,T,S)}else{const S=t??o.length;do{const N=p===0?u[0]??r.initialPageParam:df(r,m);if(p>0&&N==null)break;m=await j(m,N),p++}while(p<S)}return m};s.options.persister?s.fetchFn=()=>s.options.persister?.(f,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},c):s.fetchFn=f}}}function df(t,{pages:s,pageParams:c}){const r=s.length-1;return s.length>0?t.getNextPageParam(s[r],s,c[r],c):void 0}function T2(t,{pages:s,pageParams:c}){return s.length>0?t.getPreviousPageParam?.(s[0],s,c[0],c):void 0}function KT(t,s){return s?df(t,s)!=null:!1}function GT(t,s){return!s||!t.getPreviousPageParam?!1:T2(t,s)!=null}var k2=class extends Wi{constructor(t,s){super(t,s)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){super.setOptions({...t,behavior:Jd()})}getOptimisticResult(t){return t.behavior=Jd(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,s){const{state:c}=t,r=super.createResult(t,s),{isFetching:i,isRefetching:o,isError:u,isRefetchError:m}=r,p=c.fetchMeta?.fetchMore?.direction,f=u&&p==="forward",b=i&&p==="forward",h=u&&p==="backward",y=i&&p==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:KT(s,c.data),hasPreviousPage:GT(s,c.data),isFetchNextPageError:f,isFetchingNextPage:b,isFetchPreviousPageError:h,isFetchingPreviousPage:y,isRefetchError:m&&!f&&!h,isRefetching:o&&!b&&!y}}},YT=class extends w2{#t;#e;#a;#n;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#a=t.mutationCache,this.#e=[],this.state=t.state||D2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(s=>s!==t),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(t){const s=()=>{this.#s({type:"continue"})},c={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=C2({fn:()=>this.options.mutationFn?this.options.mutationFn(t,c):Promise.reject(new Error("No mutationFn found")),onFail:(o,u)=>{this.#s({type:"failed",failureCount:o,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)});const r=this.state.status==="pending",i=!this.#n.canStart();try{if(r)s();else{this.#s({type:"pending",variables:t,isPaused:i}),await this.#a.config.onMutate?.(t,this,c);const u=await this.options.onMutate?.(t,c);u!==this.state.context&&this.#s({type:"pending",context:u,variables:t,isPaused:i})}const o=await this.#n.start();return await this.#a.config.onSuccess?.(o,t,this.state.context,this,c),await this.options.onSuccess?.(o,t,this.state.context,c),await this.#a.config.onSettled?.(o,null,this.state.variables,this.state.context,this,c),await this.options.onSettled?.(o,null,t,this.state.context,c),this.#s({type:"success",data:o}),o}catch(o){try{throw await this.#a.config.onError?.(o,t,this.state.context,this,c),await this.options.onError?.(o,t,this.state.context,c),await this.#a.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,c),await this.options.onSettled?.(void 0,o,t,this.state.context,c),o}finally{this.#s({type:"error",error:o})}}finally{this.#a.runNext(this)}}#s(t){const s=c=>
vendor: 1,746 bytes, line 9
9{switch(t.type){case"failed":return{...c,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...c,isPaused:!0};case"continue":return{...c,isPaused:!1};case"pending":return{...c,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...c,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...c,data:void 0,error:t.error,failureCount:c.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),wt.batch(()=>{this.#e.forEach(c=>{c.onMutationUpdate(t)}),this.#a.notify({mutation:this,type:"updated",action:t})})}};function D2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var XT=class extends lr{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#a=0}#t;#e;#a;build(t,s,c){const r=new YT({client:t,mutationCache:this,mutationId:++this.#a,options:t.defaultMutationOptions(s),state:c});return this.add(r),r}add(t){this.#t.add(t);const s=Nd(t);if(typeof s=="string"){const c=this.#e.get(s);c?c.push(t):this.#e.set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const s=Nd(t);if(typeof s=="string"){const c=this.#e.get(s);if(c)if(c.length>1){const r=c.indexOf(t);r!==-1&&c.splice(r,1)}else c[0]===t&&this.#e.delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Nd(t);if(typeof s=="string"){const r=this.#e.get(s)?.find(i=>i.state.status==="pending");return!r||r===t}else return!0}runNext(t){const s=Nd(t);return typeof s=="string"?this.#e.get(s)?.find(r=>
9r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){wt.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const s={exact:!0,...t};return this.getAll().find(c=>xy(s,c))}findAll(t={}){return this.getAll().filter(s=>xy(t,s))}notify(t){wt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return wt.batch(()=>Promise.all(t.map(s=>s.continue().catch(oa))))}};function Nd(t){return t.options.scope?.id}var ZT=class extends lr{#t;#e=void 0;#a;#n;constructor(s,c){super(),this.#t=s,this.setOptions(c),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){const c=this.options;this.options=this.#t.defaultMutationOptions(s),Ai(this.options,c)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),c?.mutationKey&&this.options.mutationKey&&gc(c.mutationKey)!==gc(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(s){this.#s(),this.#c(s)}getCurrentResult(){return this.#e}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#s(),this.#c()}mutate(s,c){return this.#n=c,this.#a?.removeObserver(this),this.#a=this.#t.getMutationCache().build(this.#t,this.options),this.#a.addObserver(this),this.#a.execute(s)}#s(){const s=this.#a?.state??D2();this.#e={...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset}}#c(s){wt.batch(()=>{if(this.#n&&this.hasListeners()){const c=this.#e.variables,r=this.#e.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};s?.type==="success"?(this.#n.onSuccess?.(s.data,c,r,i),this.#n.onSettled?.(s.data,null,c,r,i)):s?.type==="error"&&(this.#n.onError?.(s.error,c,r,i),this.#n.onSettled?.(void 0,s.error,c,r,i))}this.listeners.forEach(c=>{c(this.#e)})})}};function yy(t,s){const c=new Set(s);return t.filter(r=>!c.has(r))}function JT(t,s,c){const r=t.slice(0);return r[s]=c,r}var e4=class extends lr{#t;#e;#a;#n;#s;#c;#l;#r;#p=[];constructor(t,s,c){super(),this.#t=t,this.#n=c,this.#a=[],this.#s=[],this.#e=[],this.setQueries(s)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(t=>{t.subscribe(s=>{this.#d(t,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(t=>{t.destroy()})}setQueries(t,s){this.#a=t,this.#n=s,wt.batch(()=>{const c=this.#s,r=this.#o(this.#a);this.#p=r,r.forEach(b=>b.observer.setOptions(b.defaultedQueryOptions));const i=r.map(b=>b.observer),o=i.map(b=>b.getCurrentResult()),u=c.length!==i.length,m=i.some((b,h)=>b!==c[h]),p=u||m,f=p?!0:o.some((b,h)=>{const y=this.#e[h];return!y||!Ai(b,y)});!p&&!f||(p&&(this.#s=i),this.#e=o,this.hasListeners()&&(p&&(yy(c,i).forEach(b=>{b.destroy()}),yy(i,c).forEach(b=>{b.subscribe(h=>{this.#d(b,h)})})),this.#i()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(t=>t.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(t,s){const c=this.#o(t),r=c.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[r,i=>this.#m(i??r,s),()=>this.#u(r,c)]}#u(t,s){return s.map((c,r)=>{const i=t[r];return c.defaultedQueryOptions.notifyOnChangeProps?i:c.observer.trackResult(i,o=>{s.forEach(u=>{u.observer.trackProp(o)})})})}#m(t,s){return s?((!this.#c||this.#e!==this.#r||s!==this.#l)&&(this.#l=s,this.#r=this.#e,this.#c=Zf(this.#c,s(t))),this.#c):t}#o(t){const s=new Map(this.#s.map(r=>[r.options.queryHash,r])),c=[];return t.forEach(r=>{const i=this.#t.defaultQueryOptions(r),o=s.get(i.queryHash);o?c.push({defaultedQueryOptions:i,observer:o}):c.push({defaultedQueryOptions:i,observer:new Wi(this.#t,i)})}),c}#d(t,s){const c=this.#s.indexOf(t);c!==-1&&(this.#e=JT(this.#e,c,s),this.#i())}#i(){if(this.hasListeners()){const t=this.#c,s=this.#u(this.#e,this.#p),c=this.#m(s,this.#n?.combine);t!==c&&wt.batch(()=>
vendor: 13,927 bytes, lines 9-17
9{this.listeners.forEach(r=>{r(this.#e)})})}}},t4=class extends lr{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,s,c){const r=s.queryKey,i=s.queryHash??Xf(r,s);let o=this.get(i);return o||(o=new WT({client:t,queryKey:r,queryHash:i,options:t.defaultQueryOptions(s),state:c,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=this.#t.get(t.queryHash);s&&(t.destroy(),s===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const s={exact:!0,...t};return this.getAll().find(c=>py(s,c))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(c=>py(t,c)):s}notify(t){wt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},a4=class{#t;#e;#a;#n;#s;#c;#l;#r;constructor(t={}){this.#t=t.queryCache||new t4,this.#e=t.mutationCache||new XT,this.#a=t.defaultOptions||{},this.#n=new Map,this.#s=new Map,this.#c=0}mount(){this.#c++,this.#c===1&&(this.#l=Jf.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#r=Zd.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#c--,this.#c===0&&(this.#l?.(),this.#l=void 0,this.#r?.(),this.#r=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const s=this.defaultQueryOptions({queryKey:t});return this.#t.get(s.queryHash)?.state.data}ensureQueryData(t){const s=this.defaultQueryOptions(t),c=this.#t.build(this,s),r=c.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&c.isStaleByTime(xc(s.staleTime,c))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:s,state:c})=>{const r=c.data;return[s,r]})}setQueryData(t,s,c){const r=this.defaultQueryOptions({queryKey:t}),o=this.#t.get(r.queryHash)?.state.data,u=OT(s,o);if(u!==void 0)return this.#t.build(this,r).setData(u,{...c,manual:!0})}setQueriesData(t,s,c){return wt.batch(()=>this.#t.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,s,c)]))}getQueryState(t){const s=this.defaultQueryOptions({queryKey:t});return this.#t.get(s.queryHash)?.state}removeQueries(t){const s=this.#t;wt.batch(()=>{s.findAll(t).forEach(c=>{s.remove(c)})})}resetQueries(t,s){const c=this.#t;return wt.batch(()=>(c.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},s)))}cancelQueries(t,s={}){const c={revert:!0,...s},r=wt.batch(()=>this.#t.findAll(t).map(i=>i.cancel(c)));return Promise.all(r).then(oa).catch(oa)}invalidateQueries(t,s={}){return wt.batch(()=>(this.#t.findAll(t).forEach(c=>{c.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},s)))}refetchQueries(t,s={}){const c={...s,cancelRefetch:s.cancelRefetch??!0},r=wt.batch(()=>this.#t.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,c);return c.throwOnError||(o=o.catch(oa)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(oa)}fetchQuery(t){const s=this.defaultQueryOptions(t);s.retry===void 0&&(s.retry=!1);const c=this.#t.build(this,s);return c.isStaleByTime(xc(s.staleTime,c))?c.fetch(s):Promise.resolve(c.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(oa).catch(oa)}fetchInfiniteQuery(t){return t.behavior=Jd(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(oa).catch(oa)}ensureInfiniteQueryData(t){return t.behavior=Jd(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Zd.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#a}setDefaultOptions(t){this.#a=t}setQueryDefaults(t,s){this.#n.set(gc(t),{queryKey:t,defaultOptions:s})}getQueryDefaults(t){const s=[...this.#n.values()],c={};return s.forEach(r=>{_i(t,r.queryKey)&&Object.assign(c,r.defaultOptions)}),c}setMutationDefaults(t,s){this.#s.set(gc(t),{mutationKey:t,defaultOptions:s})}getMutationDefaults(t){const s=[...this.#s.values()],c={};return s.forEach(r=>{_i(t,r.mutationKey)&&Object.assign(c,r.defaultOptions)}),c}defaultQueryOptions(t){if(t._defaulted)return t;const s={...this.#a.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return s.queryHash||(s.queryHash=Xf(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===Ua&&(s.enabled=!1),s}defaultMutationOptions(t){return t?._defaulted?t:{...this.#a.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},yx={exports:{}},Be={};/**
10 * @license React
11 * react.production.js
12 *
13 * Copyright (c) Meta Platforms, Inc. and affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var jy;function s4(){if(jy)return Be;jy=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),y=Symbol.iterator;function j(O){return O===null||typeof O!="object"?null:(O=y&&O[y]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,w={};function T(O,te,Y){this.props=O,this.context=te,this.refs=w,this.updater=Y||S}T.prototype.isReactComponent={},T.prototype.setState=function(O,te){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,te,"setState")},T.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function k(){}k.prototype=T.prototype;function E(O,te,Y){this.props=O,this.context=te,this.refs=w,this.updater=Y||S}var z=E.prototype=new k;z.constructor=E,N(z,T.prototype),z.isPureReactComponent=!0;var _=Array.isArray;function R(){}var P={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function V(O,te,Y){var ne=Y.ref;return{$$typeof:t,type:O,key:te,ref:ne!==void 0?ne:null,props:Y}}function H(O,te){return V(O.type,te,O.props)}function M(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function B(O){var te={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(Y){return te[Y]})}var I=/\/+/g;function ie(O,te){return typeof O=="object"&&O!==null&&O.key!=null?B(""+O.key):te.toString(36)}function se(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(R,R):(O.status="pending",O.then(function(te){O.status==="pending"&&(O.status="fulfilled",O.value=te)},function(te){O.status==="pending"&&(O.status="rejected",O.reason=te)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function L(O,te,Y,ne,pe){var be=typeof O;(be==="undefined"||be==="boolean")&&(O=null);var le=!1;if(O===null)le=!0;else switch(be){case"bigint":case"string":case"number":le=!0;break;case"object":switch(O.$$typeof){case t:case s:le=!0;break;case b:return le=O._init,L(le(O._payload),te,Y,ne,pe)}}if(le)return pe=pe(O),le=ne===""?"."+ie(O,0):ne,_(pe)?(Y="",le!=null&&(Y=le.replace(I,"$&/")+"/"),L(pe,te,Y,"",function(Re){return Re})):pe!=null&&(M(pe)&&(pe=H(pe,Y+(pe.key==null||O&&O.key===pe.key?"":(""+pe.key).replace(I,"$&/")+"/")+le)),te.push(pe)),1;le=0;var he=ne===""?".":ne+":";if(_(O))for(var Pe=0;Pe<O.length;Pe++)ne=O[Pe],be=he+ie(ne,Pe),le+=L(ne,te,Y,be,pe);else if(Pe=j(O),typeof Pe=="function")for(O=Pe.call(O),Pe=0;!(ne=O.next()).done;)ne=ne.value,be=he+ie(ne,Pe++),le+=L(ne,te,Y,be,pe);else if(be==="object"){if(typeof O.then=="function")return L(se(O),te,Y,ne,pe);throw te=String(O),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return le}function F(O,te,Y){if(O==null)return O;var ne=[],pe=0;return L(O,ne,"","",function(be){return te.call(Y,be,pe++)}),ne}function W(O){if(O._status===-1){var te=O._result;te=te(),te.then(function(Y){(O._status===0||O._status===-1)&&(O._status=1,O._result=Y)},function(Y){(O._status===0||O._status===-1)&&(O._status=2,O._result=Y)}),O._status===-1&&(O._status=0,O._result=te)}if(O._status===1)return O._result.default;throw O._result}var ce=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},ge={map:F,forEach:function(O,te,Y){F(O,function(){te.apply(this,arguments)},Y)},count:function(O){var te=0;return F(O,function(){te++}),te},toArray:function(O){return F(O,function(te){return te})||[]},only:function(O){if(!M(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Be.Activity=h,Be.Children=ge,Be.Component=T,Be.Fragment=c,Be.Profiler=i,Be.PureComponent=E,Be.StrictMode=r,Be.Suspense=p,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Be.__COMPILER_RUNTIME={__proto__:null,c:function(O){return P.H.useMemoCache(O)}},Be.cache=function(O){return function(){return O.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(O,te,Y){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ne=N({},O.props),pe=O.key;if(te!=null)for(be in te.key!==void 0&&(pe=""+te.key),te)!A.call(te,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&te.ref===void 0||(ne[be]=te[be]);var be=arguments.length-2;if(be===1)ne.children=Y;else if(1<be){for(var le=Array(be),he=0;he<be;he++)le[he]=arguments[he+2];ne.children=le}return V(O.type,pe,ne)},Be.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:o,_context:O},O},Be.createElement=function(O,te,Y){var ne,pe={},be=null;if(te!=null)for(ne in te.key!==void 0&&(be=""+te.key),te)A.call(te,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(pe[ne]=te[ne]);var le=arguments.length-2;if(le===1)pe.children=Y;else if(1<le){for(var he=Array(le),Pe=0;Pe<le;Pe++)he[Pe]=arguments[Pe+2];pe.children=he}if(O&&O.defaultProps)for(ne in le=O.defaultProps,le)pe[ne]===void 0&&(pe[ne]=le[ne]);return V(O,be,pe)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(O){return{$$typeof:m,render:O}},Be.isValidElement=M,Be.lazy=function(O){return{$$typeof:b,_payload:{_status:-1,_result:O},_init:W}},Be.memo=function(O,te){return{$$typeof:f,type:O,compare:te===void 0?null:te}},Be.startTransition=function(O){var te=P.T,Y={};P.T=Y;try{var ne=O(),pe=P.S;pe!==null&&pe(Y,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(R,ce)}catch(be){ce(be)}finally{te!==null&&Y.types!==null&&(te.types=Y.types),P.T=te}},Be.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Be.use=function(O){return P.H.use(O)},Be.useActionState=function(O,te,Y){return P.H.useActionState(O,te,Y)},Be.useCallback=function(O,te){return P.H.useCallback(O,te)},Be.useContext=function(O){return P.H.useContext(O)},Be.useDebugValue=function(){},Be.useDeferredValue=function(O,te){return P.H.useDeferredValue(O,te)},Be.useEffect=function(O,te){return P.H.useEffect(O,te)},Be.useEffectEvent=function(O){return P.H.useEffectEvent(O)},Be.useId=function(){return P.H.useId()},Be.useImperativeHandle=function(O,te,Y){return P.H.useImperativeHandle(O,te,Y)},Be.useInsertionEffect=function(O,te){return P.H.useInsertionEffect(O,te)},Be.useLayoutEffect=function(O,te){return P.H.useLayoutEffect(O,te)},Be.useMemo=function(O,te){return P.H.useMemo(O,te)},Be.useOptimistic=function(O,te){return P.H.useOptimistic(O,te)},Be.useReducer=function(O,te,Y){return P.H.useReducer(O,te,Y)},Be.useRef=function(O){return P.H.useRef(O)},Be.useState=function(O){return P.H.useState(O)},Be.useSyncExternalStore=function(O,te,Y){return P.H.useSyncExternalStore(O,te,Y)},Be.useTransition=function(){return P.H.useTransition()},Be.version="19.2.1",Be}var Ny;function yu(){return Ny||(Ny=1,yx.exports=s4()),yx.exports}var v=yu();const fe=b2(v),ju=ET({__proto__:null,default:fe},[v]);var E2=v.createContext(void 0),Vi=t=>{const s=v.useContext(E2);if(t)return t;if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},n4=({client:t,children:s})=>(v.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),e.jsx(E2.Provider,{value:t,children:s})),_2=v.createContext(!1),A2=()=>v.useContext(_2);_2.Provider;function c4(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var r4=v.createContext(c4()),P2=()=>v.useContext(r4),M2=(t,s)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(s.isReset()||(t.retryOn
17Mount=!1))},R2=t=>{v.useEffect(()=>{t.clearReset()},[t])},O2=({result:t,errorResetBoundary:s,throwOnError:c,query:r,suspense:i})=>t.isError&&!s.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||j2(c,[t.error,r])),tg=(t,s)=>s.state.data===void 0,z2=t=>{if(t.suspense){const c=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>c(r(...i)):c(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},L2=(t,s)=>t.isLoading&&t.isFetching&&!s,uf=(t,s)=>t?.suspense&&s.isPending,eu=(t,s,c)=>s.fetchOptimistic(t).catch(()=>{c.clearReset()});function B2({queries:t,...s},c){const r=Vi(c),i=A2(),o=P2(),u=v.useMemo(()=>t.map(N=>{const w=r.defaultQueryOptions(N);return w._optimisticResults=i?"isRestoring":"optimistic",w}),[t,r,i]);u.forEach(N=>{z2(N),M2(N,o)}),R2(o);const[m]=v.useState(()=>new e4(r,u,s)),[p,f,b]=m.getOptimisticResult(u,s.combine),h=!i&&s.subscribed!==!1;v.useSyncExternalStore(v.useCallback(N=>h?m.subscribe(wt.batchCalls(N)):oa,[m,h]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),v.useEffect(()=>{m.setQueries(u,s)},[u,s,m]);const j=p.some((N,w)=>uf(u[w],N))?p.flatMap((N,w)=>{const T=u[w];if(T){const k=new Wi(r,T);if(uf(T,N))return eu(T,k,o);L2(N,i)&&eu(T,k,o)}return[]}):[];if(j.length>0)throw Promise.all(j);const S=p.find((N,w)=>{const T=u[w];return T&&O2({result:N,errorResetBoundary:o,throwOnError:T.throwOnError,query:r.getQueryCache().get(T.queryHash),suspense:T.suspense})});if(S?.error)throw S.error;return f(b())}function Nu(t,s,c){const r=A2(),i=P2(),o=Vi(c),u=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=r?"isRestoring":"optimistic",z2(u),M2(u,i),R2(i);const m=!o.getQueryCache().get(u.queryHash),[p]=v.useState(()=>new s(o,u)),f=p.getOptimisticResult(u),b=!r&&t.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(h=>{const y=b?p.subscribe(wt.batchCalls(h)):oa;return p.updateResult(),y},[p,b]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),v.useEffect(()=>{p.setOptions(u)},[u,p]),uf(u,f))throw eu(u,p,i);if(O2({result:f,errorResetBoundary:i,throwOnError:u.throwOnError,query:o.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw f.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(u,f),u.experimental_prefetchInRender&&!Xc&&L2(f,r)&&(m?eu(u,p,i):o.getQueryCache().get(u.queryHash)?.promise)?.catch(oa).finally(()=>{p.updateResult()}),u.notifyOnChangeProps?f:p.trackResult(f)}function l4(t,s){return Nu(t,Wi,s)}function i4(t,s){return Nu({...t,enabled:!0,suspense:!0,throwOnError:tg,placeholderData:void 0},Wi,s)}function o4(t,s){return Nu({...t,enabled:!0,suspense:!0,throwOnError:tg},k2,s)}function d4(t,s){return B2({...t,queries:t.queries.map(c=>({...c,suspense:!0,throwOnError:tg,enabled:!0,placeholderData:void 0}))},s)}function u4(t,s){const c=Vi(s);c.getQueryState(t.queryKey)||c.prefetchQuery(t)}function m4(t,s){const c=Vi(s);c.getQueryState(t.queryKey)||c.prefetchInfiniteQuery(t)}function p4(t,s){const c=Vi(s),[r]=v.useState(()=>new ZT(c,t));v.useEffect(()=>{r.setOptions(t)},[r,t]);const i=v.useSyncExternalStore(v.useCallback(u=>r.subscribe(wt.batchCalls(u)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=v.useCallback((u,m)=>{r.mutate(u,m).catch(oa)},[r]);if(i.error&&j2(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function x4(t,s){return Nu(t,k2,s)}function Zc(t){return!!t&&!Array.isArray(t)&&typeof t=="object"}const f4=typeof Symbol=="function"&&!!Symbol.asyncIterator;function U2(t){return f4&&Zc(t)&&Symbol.asyncIterator in t}var g4=Object.create,I2=Object.defineProperty,h4=Object.getOwnPropertyDescriptor,H2=Object.getOwnPropertyNames,b4=Object.getPrototypeOf,v4=Object.prototype.hasOwnProperty,Fi=(t,s)=>function(){return s||(0,t[H2(t)[0]])((s={exports:{}}).exports,s),s.exports},y4=(t,s,c,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(var i=H2(s),o=0,u=i.length,m;o<u;o++)m=i[o],!v4.call(t,m)&&m!==c&&I2(t,m,{get:(p=>s[p]).bind(null,m),enumerable:!(r=h4(s,m))||r.enumerable});return t},Cu=(t,s,c)=>(c=t!=null?g4(b4(t)):{},y4(I2(c,"default",{value:t,enumerable:!0}),t));const $2=()=>{},Cy=t=>{Object.freeze&&Object.freeze(t)};function q2(t,s,c){var r;const i=s.join(".");return(r=c[i])!==null&&r!==void 0||(c[i]=new Proxy($2,{get(o,u){if(!(typeof u!="string"||u==="then"))return q2(t,[...s,u],c)},apply(o,u,m){const p=s[s.length-1];let f={args:m,path:s};
17return p==="call"?f={args:m.length>=2?[m[1]]:[],path:s.slice(0,-1)}:p==="apply"&&(f={args:m.length>=2?m[1]:[],path:s.slice(0,-1)}),Cy(f.args),Cy(f.path),t(f)}})),c[i]}const wu=t=>q2(t,[],Object.create(null)),ag=t=>new Proxy($2,{get(s,c){if(c!=="then")return t(c)}});var Q2=Fi({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,s){function c(r){"@babel/helpers - typeof";return s.exports=c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},s.exports.__esModule=!0,s.exports.default=s.exports,c(r)}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}}),j4=Fi({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,s){var c=Q2().default;function r(i,o){if(c(i)!="object"||!i)return i;var u=i[Symbol.toPrimitive];if(u!==void 0){var m=u.call(i,o||"default");if(c(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(i)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),N4=Fi({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,s){var c=Q2().default,r=j4();function i(o){var u=r(o,"string");return c(u)=="symbol"?u:u+""}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports}}),W2=Fi({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,s){var c=N4();function r(i,o,u){return(o=c(o))in i?Object.defineProperty(i,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[o]=u,i}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),sg=Fi({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,s){var c=W2();function r(o,u){var m=Object.keys(o);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(o);u&&(p=p.filter(function(f){return Object.getOwnPropertyDescriptor(o,f).enumerable})),m.push.apply(m,p)}return m}function i(o){for(var u=1;u<arguments.length;u++){var m=arguments[u]!=null?arguments[u]:{};u%2?r(Object(m),!0).forEach(function(p){c(o,p,m[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(m)):r(Object(m)).forEach(function(p){Object.defineProperty(o,p,Object.getOwnPropertyDescriptor(m,p))})}return o}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports}});Cu(sg());Cu(W2());var Cd=Cu(sg());function C4(t,s){if("error"in t){const r=s.deserialize(t.error);return{ok:!1,error:(0,Cd.default)((0,Cd.default)({},t),{},{error:r})}}return{ok:!0,result:(0,Cd.default)((0,Cd.default)({},t.result),(!t.result.type||t.result.type==="data")&&{type:"data",data:s.deserialize(t.result.data)})}}var jx=class extends Error{constructor(){super("Unable to transform response from server")}};function w4(t,s){let c;try{c=C4(t,s)}catch{throw new jx}if(!c.ok&&(!Zc(c.error.error)||typeof c.error.error.code!="number"))throw new jx;if(c.ok&&!Zc(c.result))throw new jx;return c}Cu(sg());function Su(t){const s={subscribe(c){let r=null,i=!1,o=!1,u=!1;function m(){if(r===null){u=!0;return}o||(o=!0,typeof r=="function"?r():r&&r.unsubscribe())}return r=t({next(p){var f;i||(f=c.next)===null||f===void 0||f.call(c,p)},error(p){var f;i||(i=!0,(f=c.error)===null||f===void 0||f.call(c,p),m())},complete(){var p;i||(i=!0,(p=c.complete)===null||p===void 0||p.call(c),m())}}),u&&m(),{unsubscribe:m}},pipe(...c){return c.reduce(S4,s)}};return s}function S4(t,s){return s(t)}function T4(t){const s=new AbortController;return new Promise((r,i)=>{let o=!1;function u(){o||(o=!0,m.unsubscribe())}s.signal.addEventListener("abort",()=>{i(s.signal.reason)});const m=t.subscribe({next(p){o=!0,r(p),u()},error(p){i(p)},complete(){s.abort(),u()}})})}var k4=Object.create,V2=Object.defineProperty,D4=Object.getOwnPropertyDescriptor,F2=Object.getOwnPropertyNames,E4=Object.getPrototypeOf,_4=Object.prototype.hasOwnProperty,jc=(t,s)=>function(){return s||(0,t[F2(t)[0]])((s={exports:{}}).exports,s),s.exports},A4=(t,s,c,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(var i=F2(s),o=0,u=i.length,m;o<u;o++)m=i[o],!_4.call(t,m)&&m!==c&&V2(t,m,{get:(p=>s[p]).bind(null,m),enumerable:!(r=D4(s,m))||r.enumerable});return t},ir=(t,s,c)=>
17(c=t!=null?k4(E4(t)):{},A4(s||!t||!t.__esModule?V2(c,"default",{value:t,enumerable:!0}):c,t)),P4=jc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(t,s){function c(r,i){if(r==null)return{};var o={};for(var u in r)if({}.hasOwnProperty.call(r,u)){if(i.includes(u))continue;o[u]=r[u]}return o}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}}),M4=jc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(t,s){var c=P4();function r(i,o){if(i==null)return{};var u,m,p=c(i,o);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(i);for(m=0;m<f.length;m++)u=f[m],o.includes(u)||{}.propertyIsEnumerable.call(i,u)&&(p[u]=i[u])}return p}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),K2=jc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,s){function c(r){"@babel/helpers - typeof";return s.exports=c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},s.exports.__esModule=!0,s.exports.default=s.exports,c(r)}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}}),R4=jc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,s){var c=K2().default;function r(i,o){if(c(i)!="object"||!i)return i;var u=i[Symbol.toPrimitive];if(u!==void 0){var m=u.call(i,o||"default");if(c(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(i)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),O4=jc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,s){var c=K2().default,r=R4();function i(o){var u=r(o,"string");return c(u)=="symbol"?u:u+""}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports}}),z4=jc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,s){var c=O4();function r(i,o,u){return(o=c(o))in i?Object.defineProperty(i,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[o]=u,i}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),Ki=jc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,s){var c=z4();function r(o,u){var m=Object.keys(o);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(o);u&&(p=p.filter(function(f){return Object.getOwnPropertyDescriptor(o,f).enumerable})),m.push.apply(m,p)}return m}function i(o){for(var u=1;u<arguments.length;u++){var m=arguments[u]!=null?arguments[u]:{};u%2?r(Object(m),!0).forEach(function(p){c(o,p,m[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(m)):r(Object(m)).forEach(function(p){Object.defineProperty(o,p,Object.getOwnPropertyDescriptor(m,p))})}return o}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports}}),L4=ir(M4(),1),wy=ir(Ki(),1);const B4=["cursor","direction"];function Ps(t,s,c){const r=t.flatMap(i=>i.split("."));if(!s&&(!c||c==="any"))return r.length?[r]:[];if(c==="infinite"&&Zc(s)&&("direction"in s||"cursor"in s)){const{cursor:i,direction:o}=s,u=(0,L4.default)(s,B4);return[r,{input:u,type:"infinite"}]}return[r,(0,wy.default)((0,wy.default)({},typeof s<"u"&&s!==Ua&&{input:s}),c&&c!=="any"&&{type:c})]}function Qd(t){return Ps(t,void 0,"any")}var U4=Object.create,G2=Object.defineProperty,I4=Object.getOwnPropertyDescriptor,Y2=Object.getOwnPropertyNames,H4=Object.getPrototypeOf,$4=Object.prototype.hasOwnProperty,Us=(t,s)=>function(){return s||(0,t[Y2(t)[0]])((s={exports:{}}).exports,s),s.exports},q4=(t,s,c,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(var i=Y2(s),o=0,u=i.length,m;o<u;o++)m=i[o],!$4.call(t,m)&&m!==c&&G2(t,m,{get:(p=>s[p]).bind(null,m),enumerable:!(r=I4(s,m))||r.enumerable});return t},At=(t,s,c)=>(c=t!=null?U4(H4(t)):{}
17,q4(s||!t||!t.__esModule?G2(c,"default",{value:t,enumerable:!0}):c,t)),X2=Us({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,s){function c(r){"@babel/helpers - typeof";return s.exports=c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},s.exports.__esModule=!0,s.exports.default=s.exports,c(r)}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}}),Q4=Us({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,s){var c=X2().default;function r(i,o){if(c(i)!="object"||!i)return i;var u=i[Symbol.toPrimitive];if(u!==void 0){var m=u.call(i,o||"default");if(c(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(i)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),W4=Us({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,s){var c=X2().default,r=Q4();function i(o){var u=r(o,"string");return c(u)=="symbol"?u:u+""}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports}}),or=Us({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,s){var c=W4();function r(i,o,u){return(o=c(o))in i?Object.defineProperty(i,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[o]=u,i}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),ys=Us({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,s){var c=or();function r(o,u){var m=Object.keys(o);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(o);u&&(p=p.filter(function(f){return Object.getOwnPropertyDescriptor(o,f).enumerable})),m.push.apply(m,p)}return m}function i(o){for(var u=1;u<arguments.length;u++){var m=arguments[u]!=null?arguments[u]:{};u%2?r(Object(m),!0).forEach(function(p){c(o,p,m[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(m)):r(Object(m)).forEach(function(p){Object.defineProperty(o,p,Object.getOwnPropertyDescriptor(m,p))})}return o}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports}});function V4(t){return s=>{let c=0,r=null;const i=[];function o(){r||(r=s.subscribe({next(m){for(const f of i){var p;(p=f.next)===null||p===void 0||p.call(f,m)}},error(m){for(const f of i){var p;(p=f.error)===null||p===void 0||p.call(f,m)}},complete(){for(const p of i){var m;(m=p.complete)===null||m===void 0||m.call(p)}}}))}function u(){if(c===0&&r){const m=r;r=null,m.unsubscribe()}}return Su(m=>(c++,i.push(m),o(),{unsubscribe(){c--,u();const p=i.findIndex(f=>f===m);p>-1&&i.splice(p,1)}}))}}function F4(t){let s=t;const c=[],r=u=>{s!==void 0&&u.next(s),c.push(u)},i=u=>{c.splice(c.indexOf(u),1)},o=Su(u=>(r(u),()=>{i(u)}));return o.next=u=>{if(s!==u){s=u;for(const m of c)m.next(u)}},o.get=()=>s,o}function K4(t){return Su(s=>{function c(i=0,o=t.op){const u=t.links[i];if(!u)throw new Error("No more links to execute - did you forget to add an ending link?");return u({op:o,next(p){return c(i+1,p)}})}return c().subscribe(s)})}var wd=At(or(),1),Jr=At(ys(),1);function G4(t){return t instanceof xl}function Y4(t){return Zc(t)&&Zc(t.error)&&typeof t.error.code=="number"&&typeof t.error.message=="string"}function X4(t,s){return typeof t=="string"?t:Zc(t)&&typeof t.message=="string"?t.message:s}var xl=class Wd extends Error{constructor(s,c){var r,i;const o=c?.cause;super(s,{cause:o}),(0,wd.default)(this,"cause",void 0),(0,wd.default)(this,"shape",void 0),(0,wd.default)(this,"data",void 0),(0,wd.default)(this,"meta",void 0),this.meta=c?.meta,this.cause=o,this.shape=c==null||(r=c.result)===null||r===void 0?void 0:r.error,this.data=c==null||(i=c.result)===null||i===void 0?void 0:i.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,Wd.prototype)}static from(s,c={}){const r=s;return G4(r)?(c.meta&&(r.meta=(0,Jr.default)((0,Jr.default)({},r.meta),c.meta)),r):Y4(r)?new Wd(r.error.message,(0,Jr.default)((0,Jr.default)({},c),{},{result:r})):new Wd(X4(r,"Unknown error"),(0,Jr.default)((0,Jr.default)({},c),{},{cause:r}))}};function Z4(t){const s=t;return s?"input"in s?s:{input:s,output:s}:{input:{serialize:c=>c,deserialize:c=>c},output:{serialize:c=>c,deserialize:c=>c}}}const Sy=t=>typeof t=="function";function J4(t){if(t)return t;if(typeof window<"u"&&Sy(window.fetch))return window.fetch;if(typeof globalThis<"u"&&Sy(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}var Di=At(ys());function ek(t){return{url:t.url.toString(),fetch:t.fetch,transformer:Z4(t.transformer),methodOverride:t.methodOverride}}function tk(t){const s={};for(let c=0;c<t.length;c++){const r=t[c];s[c]=r}return s}const ak={query:"GET",mutation:"POST",subscription:"PATCH"};function Z2(t){return"input"in t?t.transformer.input.serialize(t.input):tk(t.inputs.map(s=>t.transformer.input.serialize(s)))}const J2=t=>{const s=t.url.split("?");let r=s[0].replace(/\/$/,"")+"/"+t.path;const i=[];if(s[1]&&i.push(s[1]),"inputs"in t&&i.push("batch=1"),t.type==="query"||t.type==="subscription"){const o=Z2(t);o!==void 0&&t.methodOverride!=="POST"&&i.push(`input=${encodeURIComponent(JSON.stringify(o))}`)}return i.length&&(r+="?"+i.join("&")),r},sk=t=>{if(t.type==="query"&&t.methodOverride!=="POST")return;const s=Z2(t);return s!==void 0?JSON.stringify(s):void 0},nk=t=>ik((0,Di.default)((0,Di.default)({},t),{},{contentTypeHeader:"application/json",getUrl:J2,getBody:sk}));
17var ck=class extends Error{constructor(){const t="AbortError";super(t),this.name=t,this.message=t}};const rk=t=>{var s;if(t?.aborted)throw(s=t.throwIfAborted)===null||s===void 0||s.call(t),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new ck};async function lk(t){var s;rk(t.signal);const c=t.getUrl(t),r=t.getBody(t),i=(s=t.methodOverride)!==null&&s!==void 0?s:ak[t.type],o=await(async()=>{const m=await t.headers();return Symbol.iterator in m?Object.fromEntries(m):m})(),u=(0,Di.default)((0,Di.default)((0,Di.default)({},t.contentTypeHeader&&i!=="GET"?{"content-type":t.contentTypeHeader}:{}),t.trpcAcceptHeader?{"trpc-accept":t.trpcAcceptHeader}:void 0),o);return J4(t.fetch)(c,{method:i,signal:t.signal,body:r,headers:u})}async function ik(t){const s={},c=await lk(t);s.response=c;const r=await c.json();return s.responseJSON=r,{json:r,meta:s}}At(ys(),1);const Ty=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function ky(t){let s=null,c=null;const r=()=>{clearTimeout(c),c=null,s=null};function i(m){const p=[[]];let f=0;for(;;){const y=m[f];if(!y)break;const j=p[p.length-1];if(y.aborted){var b;(b=y.reject)===null||b===void 0||b.call(y,new Error("Aborted")),f++;continue}if(t.validate(j.concat(y).map(N=>N.key))){j.push(y),f++;continue}if(j.length===0){var h;(h=y.reject)===null||h===void 0||h.call(y,new Error("Input is too big for a single dispatch")),f++;continue}p.push([])}return p}function o(){const m=i(s);r();for(const p of m){if(!p.length)continue;const f={items:p};for(const h of p)h.batch=f;t.fetch(f.items.map(h=>h.key)).then(async h=>{await Promise.all(h.map(async(j,S)=>{const N=f.items[S];try{var w;const k=await Promise.resolve(j);(w=N.resolve)===null||w===void 0||w.call(N,k)}catch(k){var T;(T=N.reject)===null||T===void 0||T.call(N,k)}N.batch=null,N.reject=null,N.resolve=null}));for(const j of f.items){var y;(y=j.reject)===null||y===void 0||y.call(j,new Error("Missing result")),j.batch=null}}).catch(h=>{for(const j of f.items){var y;(y=j.reject)===null||y===void 0||y.call(j,h),j.batch=null}})}}function u(m){var p;const f={aborted:!1,key:m,batch:null,resolve:Ty,reject:Ty},b=new Promise((h,y)=>{var j;f.reject=y,f.resolve=h,(j=s)!==null&&j!==void 0||(s=[]),s.push(f)});return(p=c)!==null&&p!==void 0||(c=setTimeout(o)),b}return{load:u}}function ok(...t){const s=new AbortController,c=t.length;let r=0;const i=()=>{++r===c&&s.abort()};for(const o of t)o?.aborted?i():o?.addEventListener("abort",i,{once:!0});return s.signal}var Sd=At(ys(),1);function dk(t){var s,c;const r=ek(t),i=(s=t.maxURLLength)!==null&&s!==void 0?s:1/0,o=(c=t.maxItems)!==null&&c!==void 0?c:1/0;return()=>{const u=b=>({validate(h){if(i===1/0&&o===1/0)return!0;if(h.length>o)return!1;const y=h.map(N=>N.path).join(","),j=h.map(N=>N.input);return J2((0,Sd.default)((0,Sd.default)({},r),{},{type:b,path:y,inputs:j,signal:null})).length<=i},async fetch(h){const y=h.map(k=>k.path).join(","),j=h.map(k=>k.input),S=ok(...h.map(k=>k.signal)),N=await nk((0,Sd.default)((0,Sd.default)({},r),{},{path:y,inputs:j,type:b,headers(){return t.headers?typeof t.headers=="function"?t.headers({opList:h}):t.headers:{}},signal:S}));return(Array.isArray(N.json)?N.json:h.map(()=>N.json)).map(k=>({meta:N.meta,json:k}))}}),m=ky(u("query")),p=ky(u("mutation")),f={query:m,mutation:p};return({op:b})=>Su(h=>{/* istanbul ignore if -- @preserve */if(b.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const j=f[b.type].load(b);let S;return j.then(N=>{S=N;const w=w4(N.json,r.transformer.output);if(!w.ok){h.error(xl.from(w.error,{meta:N.meta}));return}h.next({context:N.meta,result:w.result}),h.complete()}).catch(N=>{h.error(xl.from(N,{meta:S?.meta}))}),()=>{}})}}At(ys(),1);const ej=(t,...s)=>typeof t=="function"?t(...s):t;At(or(),1);function uk(){let t,s;return{promise:new Promise((r,i)=>{t=r,s=i}),resolve:t,reject:s}}async function mk(t){const s=await ej(t.url);if(!t.connectionParams)return s;const r=`${s.includes("?")?"&":"?"}connectionParams=1`;return s+r}async function pk(t){const s={method:"connectionParams",data:await ej(t)};return JSON.stringify(s)}At(or(),1);var Kc=At(or(),1);function xk(t){const{promise:s,resolve:c,reject:r}=uk();return t.addEventListener("open",()=>{t.removeEventListener("error",r),c()}),t.addEventListener("error",r),s}function fk(t,{intervalMs:s,pongTimeoutMs:c}){let r,i;function o(){r=setTimeout(()=>{t.send("PING"),i=setTimeout(()=>{t.close()},c)},s)}function u(){clearTimeout(r),o()}function m(){clearTimeout(i),u()}t.addEventListener("open",o),t.addEventListener("message",({data:p})=>
17{clearTimeout(r),o(),p==="PONG"&&m()}),t.addEventListener("close",()=>{clearTimeout(r),clearTimeout(i)})}var gk=class mf{constructor(s){var c;if((0,Kc.default)(this,"id",++mf.connectCount),(0,Kc.default)(this,"WebSocketPonyfill",void 0),(0,Kc.default)(this,"urlOptions",void 0),(0,Kc.default)(this,"keepAliveOpts",void 0),(0,Kc.default)(this,"wsObservable",F4(null)),(0,Kc.default)(this,"openPromise",null),this.WebSocketPonyfill=(c=s.WebSocketPonyfill)!==null&&c!==void 0?c:WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=s.urlOptions,this.keepAliveOpts=s.keepAlive}get ws(){return this.wsObservable.get()}set ws(s){this.wsObservable.next(s)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var s=this;if(s.openPromise)return s.openPromise;s.id=++mf.connectCount;const c=mk(s.urlOptions).then(r=>new s.WebSocketPonyfill(r));s.openPromise=c.then(async r=>{s.ws=r,r.addEventListener("message",function({data:i}){i==="PING"&&this.send("PONG")}),s.keepAliveOpts.enabled&&fk(r,s.keepAliveOpts),r.addEventListener("close",()=>{s.ws===r&&(s.ws=null)}),await xk(r),s.urlOptions.connectionParams&&r.send(await pk(s.urlOptions.connectionParams))});try{await s.openPromise}finally{s.openPromise=null}}async close(){var s=this;try{await s.openPromise}finally{var c;(c=s.ws)===null||c===void 0||c.close()}}};(0,Kc.default)(gk,"connectCount",0);At(or(),1);At(ys(),1);var Nx=At(or(),1),Dy=At(ys(),1),Tu=class{constructor(t){(0,Nx.default)(this,"links",void 0),(0,Nx.default)(this,"runtime",void 0),(0,Nx.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=t.links.map(s=>s(this.runtime))}$request(t){var s;return K4({links:this.links,op:(0,Dy.default)((0,Dy.default)({},t),{},{context:(s=t.context)!==null&&s!==void 0?s:{},id:++this.requestId})}).pipe(V4())}async requestAsPromise(t){var s=this;try{const c=s.$request(t);return(await T4(c)).result.data}catch(c){throw xl.from(c)}}query(t,s,c){return this.requestAsPromise({type:"query",path:t,input:s,context:c?.context,signal:c?.signal})}mutation(t,s,c){return this.requestAsPromise({type:"mutation",path:t,input:s,context:c?.context,signal:c?.signal})}subscription(t,s,c){return this.$request({type:"subscription",path:t,input:s,context:c.context,signal:c.signal}).subscribe({next(i){switch(i.result.type){case"state":{var o;(o=c.onConnectionStateChange)===null||o===void 0||o.call(c,i.result);break}case"started":{var u;(u=c.onStarted)===null||u===void 0||u.call(c,{context:i.context});break}case"stopped":{var m;(m=c.onStopped)===null||m===void 0||m.call(c);break}case"data":case void 0:{var p;(p=c.onData)===null||p===void 0||p.call(c,i.result.data);break}}},error(i){var o;(o=c.onError)===null||o===void 0||o.call(c,i)},complete(){var i;(i=c.onComplete)===null||i===void 0||i.call(c)}})}};const tj=Symbol.for("trpc_untypedClient"),hk={query:"query",mutate:"mutation",subscribe:"subscription"},bk=t=>hk[t];function aj(t){const s=wu(({path:c,args:r})=>{const i=[...c],o=bk(i.pop()),u=i.join(".");return t[o](u,...r)});return ag(c=>c===tj?t:s[c])}function vk(t){const s=new Tu(t);return aj(s)}function ng(t){return t[tj]}At(ys(),1);At(ys(),1);var yk=Us({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(t,s){function c(i){var o,u,m,p=2;for(typeof Symbol<"u"&&(u=Symbol.asyncIterator,m=Symbol.iterator);p--;){if(u&&(o=i[u])!=null)return o.call(i);if(m&&(o=i[m])!=null)return new r(o.call(i));u="@@asyncIterator",m="@@iterator"}throw new TypeError("Object is not async iterable")}function r(i){function o(u){if(Object(u)!==u)return Promise.reject(new TypeError(u+" is not an object."));var m=u.done;return Promise.resolve(u.value).then(function(p){return{value:p,done:m}})}return r=function(m){this.s=m,this.n=m.next},r.prototype={s:null,n:null,next:function(){return o(this.n.apply(this.s,arguments))},return:function(m){var p=this.s.return;return p===void 0?Promise.resolve({value:m,done:!0}):o(p.apply(this.s,arguments))},throw:function(m){var p=this.s.return;return p===void 0?Promise.reject(m):o(p.apply(this.s,arguments))}},new r(i)}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}});At(yk(),1);At(ys(),1);var jk=Us({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(t,s){function c(){var r=typeof SuppressedError=="function"?SuppressedError:function(m,p){var f=Error();return f.name="SuppressedError",f.error=m,f.suppressed=p,f},i={},o=[];function u(m,p){if(p!=null){if(Object(p)!==p)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(m)var f=p[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(f===void 0&&(f=p[Symbol.dispose||Symbol.for("Symbol.dispose")],m))var b=f;if(typeof f!="function")throw new TypeError("Object is not disposable.");b&&(f=function(){try{b.call(p)}catch(y){return Promise.reject(y)}}),o.push({v:p,d:f,a:m})}else m&&o.push({d:p,a:m});return p}return{e:i,u:u.bind(null,!1),a:u.bind(null,!0),d:function(){var p,f=this.e,b=0;function h(){for(;p=o.pop();)try{if(!p.a&&b===1)return b=0,o.push(p),Promise.resolve().then(h);if(p.d){var j=p.d.call(p.v);if(p.a)return b|=2,Promise.resolve(j).then(h,y)}else b|=1}catch(S){return y(S)}
17if(b===1)return f!==i?Promise.reject(f):Promise.resolve();if(f!==i)throw f}function y(j){return f=f!==i?new r(j,f):j,h()}return h()}}}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}}),sj=Us({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(t,s){function c(r,i){this.v=r,this.k=i}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}}),Nk=Us({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(t,s){var c=sj();function r(i){return new c(i,0)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),Ck=Us({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(t,s){var c=sj();function r(o){return function(){return new i(o.apply(this,arguments))}}function i(o){var u,m;function p(b,h){try{var y=o[b](h),j=y.value,S=j instanceof c;Promise.resolve(S?j.v:j).then(function(N){if(S){var w=b==="return"?"return":"next";if(!j.k||N.done)return p(w,N);N=o[w](N).value}f(y.done?"return":"normal",N)},function(N){p("throw",N)})}catch(N){f("throw",N)}}function f(b,h){switch(b){case"return":u.resolve({value:h,done:!0});break;case"throw":u.reject(h);break;default:u.resolve({value:h,done:!1})}(u=u.next)?p(u.key,u.arg):m=null}this._invoke=function(b,h){return new Promise(function(y,j){var S={key:b,arg:h,resolve:y,reject:j,next:null};m?m=m.next=S:(u=m=S,p(b,h))})},typeof o.return!="function"&&(this.return=void 0)}i.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},i.prototype.next=function(o){return this._invoke("next",o)},i.prototype.throw=function(o){return this._invoke("throw",o)},i.prototype.return=function(o){return this._invoke("return",o)},s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}});At(jk(),1);At(Nk(),1);At(Ck(),1);At(ys(),1);function wk(t){return wu(({path:s,args:c})=>{var r;const i=[...s],o=i.pop();if(o==="useMutation")return t[o](i,...c);if(o==="_def")return{path:i};const[u,...m]=c,p=(r=m[0])!==null&&r!==void 0?r:{};return t[o](i,u,p)})}var Cx;const Sk=["client","ssrContext","ssrState","abortOnUnmount"],Tk=(Cx=v.createContext)===null||Cx===void 0?void 0:Cx.call(ju,null),kk=t=>{switch(t){case"queryOptions":case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";case"infiniteQueryOptions":case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"setMutationDefaults":case"getMutationDefaults":case"isMutating":case"cancel":case"invalidate":case"refetch":case"reset":return"any"}};function Dk(t){return wu(s=>{const c=[...s.path],r=c.pop(),i=[...s.args],o=i.shift(),u=kk(r),m=Ps(c,o,u);return{infiniteQueryOptions:()=>t.infiniteQueryOptions(c,m,i[0]),queryOptions:()=>t.queryOptions(c,m,...i),fetch:()=>t.fetchQuery(m,...i),fetchInfinite:()=>t.fetchInfiniteQuery(m,i[0]),prefetch:()=>t.prefetchQuery(m,...i),prefetchInfinite:()=>t.prefetchInfiniteQuery(m,i[0]),ensureData:()=>t.ensureQueryData(m,...i),invalidate:()=>t.invalidateQueries(m,...i),reset:()=>t.resetQueries(m,...i),refetch:()=>t.refetchQueries(m,...i),cancel:()=>t.cancelQuery(m,...i),setData:()=>{t.setQueryData(m,i[0],i[1])},setQueriesData:()=>t.setQueriesData(m,i[0],i[1],i[2]),setInfiniteData:()=>{t.setInfiniteQueryData(m,i[0],i[1])},getData:()=>t.getQueryData(m),getInfiniteData:()=>t.getInfiniteQueryData(m),setMutationDefaults:()=>t.setMutationDefaults(Qd(c),o),getMutationDefaults:()=>t.getMutationDefaults(Qd(c)),isMutating:()=>t.isMutating({mutationKey:Qd(c)})}[r]()})}function Ek(t){const s=aj(t.client),c=Dk(t);return ag(r=>{const i=r;return i==="client"?s:Sk.includes(i)?t[i]:c[r]})}var _k=ir(Ki(),1);function Ey(t){const s=t instanceof Tu?t:ng(t);return wu(c=>{const r=c.path,i=r.join("."),[o,u]=c.args;return(0,_k.default)({queryKey:Ps(r,o,"query"),queryFn:()=>s.query(i,o,u?.trpc)},u)})}var wx=ir(Ki(),1);function xa(t,s,c){var r;const i=t[0];let o=(r=t[1])===null||r===void 0?void 0:r.input;if(c){var u;o=(0,wx.default)((0,wx.default)((0,wx.default)({},(u=o)!==null&&u!==void 0?u:{}),c.pageParam?{cursor:c.pageParam}:{}),{},{direction:c.direction})}return[i.join("."),o,s?.trpc]}var Ak=jc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(t,s){function c(i){var o,u,m,p=2;for(typeof Symbol<"u"&&(u=Symbol.asyncIterator,m=Symbol.iterator);p--;){if(u&&(o=i[u])!=null)return o.call(i);if(m&&(o=i[m])!=null)return new r(o.call(i));u="@@asyncIterator",m="@@iterator"}throw new TypeError("Object is not async iterable")}function r(i){function o(u){if(Object(u)!==u)return Promise.reject(new TypeError(u+" is not an object."));var m=u.done;return Promise.resolve(u.value).then(function(p){return{value:p,done:m}})}return r=function(m){this.s=m,this.n=m.next},r.prototype={s:null,n:null,next:function(){return o(this.n.apply(this.s,arguments))},return:function(m){var p=this.s.return;return p===void 0?Promise.resolve({value:m,done:!0}):o(p.apply(this.s,arguments))},throw:function(m){var p=this.s.return;return p===void 0?Promise.reject(m):o(p.apply(this.s,arguments))}},new r(i)}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}}
17),Pk=ir(Ak(),1);function pf(t){return{path:t.path.join(".")}}function Ni(t){const s=pf(t);return v.useMemo(()=>s,[s])}async function nj(t,s,c){const i=s.getQueryCache().build(s,{queryKey:c});i.setState({data:[],status:"success"});const o=[];var u=!1,m=!1,p;try{for(var f=(0,Pk.default)(t),b;u=!(b=await f.next()).done;u=!1){const h=b.value;o.push(h),i.setState({data:[...o]})}}catch(h){m=!0,p=h}finally{try{u&&f.return!=null&&await f.return()}finally{if(m)throw p}}return o}var Je=ir(Ki(),1);function Mk(t){const{client:s,queryClient:c}=t,r=s instanceof Tu?s:ng(s);return{infiniteQueryOptions:(i,o,u)=>{var m,p;const f=((m=o[1])===null||m===void 0?void 0:m.input)===Ua,b=async h=>{var y;const j=(0,Je.default)((0,Je.default)({},u),{},{trpc:(0,Je.default)((0,Je.default)({},u?.trpc),!(u==null||(y=u.trpc)===null||y===void 0)&&y.abortOnUnmount?{signal:h.signal}:{signal:null})});return await r.query(...xa(o,j,{direction:h.direction,pageParam:h.pageParam}))};return Object.assign((0,Je.default)((0,Je.default)({},u),{},{initialData:u?.initialData,queryKey:o,queryFn:f?Ua:b,initialPageParam:(p=u?.initialCursor)!==null&&p!==void 0?p:null}),{trpc:pf({path:i})})},queryOptions:(i,o,u)=>{var m;const p=((m=o[1])===null||m===void 0?void 0:m.input)===Ua,f=async b=>{var h;const y=(0,Je.default)((0,Je.default)({},u),{},{trpc:(0,Je.default)((0,Je.default)({},u?.trpc),!(u==null||(h=u.trpc)===null||h===void 0)&&h.abortOnUnmount?{signal:b.signal}:{signal:null})}),j=await r.query(...xa(o,y));return U2(j)?nj(j,c,o):j};return Object.assign((0,Je.default)((0,Je.default)({},u),{},{initialData:u?.initialData,queryKey:o,queryFn:p?Ua:f}),{trpc:pf({path:i})})},fetchQuery:(i,o)=>c.fetchQuery((0,Je.default)((0,Je.default)({},o),{},{queryKey:i,queryFn:()=>r.query(...xa(i,o))})),fetchInfiniteQuery:(i,o)=>{var u;return c.fetchInfiniteQuery((0,Je.default)((0,Je.default)({},o),{},{queryKey:i,queryFn:({pageParam:m,direction:p})=>r.query(...xa(i,o,{pageParam:m,direction:p})),initialPageParam:(u=o?.initialCursor)!==null&&u!==void 0?u:null}))},prefetchQuery:(i,o)=>c.prefetchQuery((0,Je.default)((0,Je.default)({},o),{},{queryKey:i,queryFn:()=>r.query(...xa(i,o))})),prefetchInfiniteQuery:(i,o)=>{var u;return c.prefetchInfiniteQuery((0,Je.default)((0,Je.default)({},o),{},{queryKey:i,queryFn:({pageParam:m,direction:p})=>r.query(...xa(i,o,{pageParam:m,direction:p})),initialPageParam:(u=o?.initialCursor)!==null&&u!==void 0?u:null}))},ensureQueryData:(i,o)=>c.ensureQueryData((0,Je.default)((0,Je.default)({},o),{},{queryKey:i,queryFn:()=>r.query(...xa(i,o))})),invalidateQueries:(i,o,u)=>c.invalidateQueries((0,Je.default)((0,Je.default)({},o),{},{queryKey:i}),u),resetQueries:(i,o,u)=>c.resetQueries((0,Je.default)((0,Je.default)({},o),{},{queryKey:i}),u),refetchQueries:(i,o,u)=>c.refetchQueries((0,Je.default)((0,Je.default)({},o),{},{queryKey:i}),u),cancelQuery:(i,o)=>c.cancelQueries({queryKey:i},o),setQueryData:(i,o,u)=>c.setQueryData(i,o,u),setQueriesData:(i,o,u,m)=>c.setQueriesData((0,Je.default)((0,Je.default)({},o),{},{queryKey:i}),u,m),getQueryData:i=>c.getQueryData(i),setInfiniteQueryData:(i,o,u)=>c.setQueryData(i,o,u),getInfiniteQueryData:i=>c.getQueryData(i),setMutationDefaults:(i,o)=>{const u=i[0],m=p=>r.mutation(...xa([u,{input:p}],t));return c.setMutationDefaults(i,typeof o=="function"?o({canonicalMutationFn:m}):o)},getMutationDefaults:i=>c.getMutationDefaults(i),isMutating:i=>c.isMutating((0,Je.default)((0,Je.default)({},i),{},{exact:!0}))}}var je=ir(Ki());const _y=(t,s)=>new Proxy(t,{get(r,i){return s(i),r[i]}});function Rk(t){var s,c;const r=(s=void 0)!==null&&s!==void 0?s:_=>_.originalFn(),i=(c=void 0)!==null&&c!==void 0?c:Tk,o=vk,u=_=>{var R;const{abortOnUnmount:P=!1,queryClient:A,ssrContext:V}=_,[H,M]=v.useState((R=_.ssrState)!==null&&R!==void 0?R:!1),B=_.client instanceof Tu?_.client:ng(_.client),I=v.useMemo(()=>Mk({client:B,queryClient:A}),[B,A]),ie=v.useMemo(()=>(0,je.default)({abortOnUnmount:P,queryClient:A,client:B,ssrContext:V??null,ssrState:H},I),[P,B,I,A,V,H]);return v.useEffect(()=>{M(se=>se?"mounted":!1)},[]),e.jsx(i.Provider,{value:ie,children:_.children})};function m(){const _=v.useContext(i);if(!_)throw new Error("Unable to find tRPC Context. Did you forget to wrap your Ap
17p inside `withTRPC` HoC?");return _}function p(_,R){var P;const{queryClient:A,ssrState:V}=m();return V&&V!=="mounted"&&((P=A.getQueryCache().find({queryKey:_}))===null||P===void 0?void 0:P.state.status)==="error"?(0,je.default)({retryOnMount:!1},R):R}function f(_,R,P){var A,V,H,M,B;const I=m(),{abortOnUnmount:ie,client:se,ssrState:L,queryClient:F,prefetchQuery:W}=I,ce=Ps(_,R,"query"),ge=F.getQueryDefaults(ce),O=R===Ua;typeof window>"u"&&L==="prepass"&&(P==null||(A=P.trpc)===null||A===void 0?void 0:A.ssr)!==!1&&((V=P?.enabled)!==null&&V!==void 0?V:ge?.enabled)!==!1&&!O&&!F.getQueryCache().find({queryKey:ce})&&W(ce,P);const te=p(ce,(0,je.default)((0,je.default)({},ge),P)),Y=(H=(M=P==null||(B=P.trpc)===null||B===void 0?void 0:B.abortOnUnmount)!==null&&M!==void 0?M:void 0)!==null&&H!==void 0?H:ie,ne=l4((0,je.default)((0,je.default)({},te),{},{queryKey:ce,queryFn:O?R:async pe=>{const be=(0,je.default)((0,je.default)({},te),{},{trpc:(0,je.default)((0,je.default)({},te?.trpc),Y?{signal:pe.signal}:{signal:null})}),le=await se.query(...xa(ce,be));return U2(le)?nj(le,F,ce):le}}),F);return ne.trpc=Ni({path:_}),ne}function b(_,R,P){var A,V,H;const M=m(),B=Ps(_,R,"query"),I=R===Ua,ie=(A=(V=P==null||(H=P.trpc)===null||H===void 0?void 0:H.abortOnUnmount)!==null&&V!==void 0?V:void 0)!==null&&A!==void 0?A:M.abortOnUnmount;u4((0,je.default)((0,je.default)({},P),{},{queryKey:B,queryFn:I?R:se=>{const L={trpc:(0,je.default)((0,je.default)({},P?.trpc),ie?{signal:se.signal}:{})};return M.client.query(...xa(B,L))}}))}function h(_,R,P){var A,V,H;const M=m(),B=Ps(_,R,"query"),I=(A=(V=P==null||(H=P.trpc)===null||H===void 0?void 0:H.abortOnUnmount)!==null&&V!==void 0?V:void 0)!==null&&A!==void 0?A:M.abortOnUnmount,ie=i4((0,je.default)((0,je.default)({},P),{},{queryKey:B,queryFn:se=>{const L=(0,je.default)((0,je.default)({},P),{},{trpc:(0,je.default)((0,je.default)({},P?.trpc),I?{signal:se.signal}:{signal:null})});return M.client.query(...xa(B,L))}}),M.queryClient);return ie.trpc=Ni({path:_}),[ie.data,ie]}function y(_,R){const{client:P,queryClient:A}=m(),V=Qd(_),H=A.defaultMutationOptions(A.getMutationDefaults(V)),M=p4((0,je.default)((0,je.default)({},R),{},{mutationKey:V,mutationFn:B=>P.mutation(...xa([_,{input:B}],R)),onSuccess(...B){var I,ie;return r({originalFn:()=>{var L,F,W;return(L=R==null||(F=R.onSuccess)===null||F===void 0?void 0:F.call(R,...B))!==null&&L!==void 0?L:H==null||(W=H.onSuccess)===null||W===void 0?void 0:W.call(H,...B)},queryClient:A,meta:(I=(ie=R?.meta)!==null&&ie!==void 0?ie:H?.meta)!==null&&I!==void 0?I:{}})}}),A);return M.trpc=Ni({path:_}),M}const j={data:void 0,error:null,status:"idle"},S={data:void 0,error:null,status:"connecting"};/* istanbul ignore next -- @preserve */function N(_,R,P){var A;const V=(A=P?.enabled)!==null&&A!==void 0?A:R!==Ua,H=gc(Ps(_,R,"any")),{client:M}=m(),B=v.useRef(P);v.useEffect(()=>{B.current=P});const[I]=v.useState(new Set([])),ie=v.useCallback(O=>{I.add(O)},[I]),se=v.useRef(null),L=v.useCallback(O=>{const te=W.current,Y=W.current=O(te);let ne=!1;for(const pe of I)if(te[pe]!==Y[pe]){ne=!0;break}ne&&ge(_y(Y,ie))},[ie,I]),F=v.useCallback(()=>{var O;if((O=se.current)===null||O===void 0||O.unsubscribe(),!V){L(()=>(0,je.default)((0,je.default)({},j),{},{reset:F}));return}L(()=>(0,je.default)((0,je.default)({},S),{},{reset:F}));const te=M.subscription(_.join("."),R??void 0,{onStarted:()=>{var Y,ne;(Y=(ne=B.current).onStarted)===null||Y===void 0||Y.call(ne),L(pe=>(0,je.default)((0,je.default)({},pe),{},{status:"pending",error:null}))},onData:Y=>{var ne,pe;(ne=(pe=B.current).onData)===null||ne===void 0||ne.call(pe,Y),L(be=>(0,je.default)((0,je.default)({},be),{},{status:"pending",data:Y,error:null}))},onError:Y=>{var ne,pe;(ne=(pe=B.current).onError)===null||ne===void 0||ne.call(pe,Y),L(be=>(0,je.default)((0,je.default)({},be),{},{status:"error",error:Y}))},onConnectionStateChange:Y=>{L(ne=>{switch(Y.state){case"idle":return(0,je.default)((0,je.default)({},ne),{},{status:Y.state,error:null,data:void 0});case"connecting":return(0,je.default)((0,je.default)({},ne),{},{error:Y.error,status:Y.state});
17case"pending":return ne}})},onComplete:()=>{var Y,ne;(Y=(ne=B.current).onComplete)===null||Y===void 0||Y.call(ne),L(pe=>(0,je.default)((0,je.default)({},pe),{},{status:"idle",error:null,data:void 0}))}});se.current=te},[M,H,V,L]);v.useEffect(()=>(F(),()=>{var O;(O=se.current)===null||O===void 0||O.unsubscribe()}),[F]);const W=v.useRef(V?(0,je.default)((0,je.default)({},S),{},{reset:F}):(0,je.default)((0,je.default)({},j),{},{reset:F})),[ce,ge]=v.useState(_y(W.current,ie));return ce}function w(_,R,P){var A,V,H,M,B;const{client:I,ssrState:ie,prefetchInfiniteQuery:se,queryClient:L,abortOnUnmount:F}=m(),W=Ps(_,R,"infinite"),ce=L.getQueryDefaults(W),ge=R===Ua;typeof window>"u"&&ie==="prepass"&&(P==null||(A=P.trpc)===null||A===void 0?void 0:A.ssr)!==!1&&((V=P?.enabled)!==null&&V!==void 0?V:ce?.enabled)!==!1&&!ge&&!L.getQueryCache().find({queryKey:W})&&se(W,(0,je.default)((0,je.default)({},ce),P));const O=p(W,(0,je.default)((0,je.default)({},ce),P)),te=(H=P==null||(M=P.trpc)===null||M===void 0?void 0:M.abortOnUnmount)!==null&&H!==void 0?H:F,Y=x4((0,je.default)((0,je.default)({},O),{},{initialPageParam:(B=P.initialCursor)!==null&&B!==void 0?B:null,persister:P.persister,queryKey:W,queryFn:ge?R:ne=>{var pe;const be=(0,je.default)((0,je.default)({},O),{},{trpc:(0,je.default)((0,je.default)({},O?.trpc),te?{signal:ne.signal}:{signal:null})});return I.query(...xa(W,be,{pageParam:(pe=ne.pageParam)!==null&&pe!==void 0?pe:P.initialCursor,direction:ne.direction}))}}),L);return Y.trpc=Ni({path:_}),Y}function T(_,R,P){var A,V,H;const M=m(),B=Ps(_,R,"infinite"),I=M.queryClient.getQueryDefaults(B),ie=R===Ua,se=p(B,(0,je.default)((0,je.default)({},I),P)),L=(A=P==null||(V=P.trpc)===null||V===void 0?void 0:V.abortOnUnmount)!==null&&A!==void 0?A:M.abortOnUnmount;m4((0,je.default)((0,je.default)({},P),{},{initialPageParam:(H=P.initialCursor)!==null&&H!==void 0?H:null,queryKey:B,queryFn:ie?R:F=>{var W;const ce=(0,je.default)((0,je.default)({},se),{},{trpc:(0,je.default)((0,je.default)({},se?.trpc),L?{signal:F.signal}:{})});return M.client.query(...xa(B,ce,{pageParam:(W=F.pageParam)!==null&&W!==void 0?W:P.initialCursor,direction:F.direction}))}}))}function k(_,R,P){var A,V,H;const M=m(),B=Ps(_,R,"infinite"),I=M.queryClient.getQueryDefaults(B),ie=p(B,(0,je.default)((0,je.default)({},I),P)),se=(A=P==null||(V=P.trpc)===null||V===void 0?void 0:V.abortOnUnmount)!==null&&A!==void 0?A:M.abortOnUnmount,L=o4((0,je.default)((0,je.default)({},P),{},{initialPageParam:(H=P.initialCursor)!==null&&H!==void 0?H:null,queryKey:B,queryFn:F=>{var W;const ce=(0,je.default)((0,je.default)({},ie),{},{trpc:(0,je.default)((0,je.default)({},ie?.trpc),se?{signal:F.signal}:{})});return M.client.query(...xa(B,ce,{pageParam:(W=F.pageParam)!==null&&W!==void 0?W:P.initialCursor,direction:F.direction}))}}),M.queryClient);return L.trpc=Ni({path:_}),[L.data,L]}return{Provider:u,createClient:o,useContext:m,useUtils:m,useQuery:f,usePrefetchQuery:b,useSuspenseQuery:h,useQueries:(_,R)=>{const{ssrState:P,queryClient:A,prefetchQuery:V,client:H}=m(),M=Ey(H),B=_(M);if(typeof window>"u"&&P==="prepass")for(const ie of B){var I;const se=ie;((I=se.trpc)===null||I===void 0?void 0:I.ssr)!==!1&&!A.getQueryCache().find({queryKey:se.queryKey})&&V(se.queryKey,se)}return B2({queries:B.map(ie=>(0,je.default)((0,je.default)({},ie),{},{queryKey:ie.queryKey})),combine:R?.combine},A)},useSuspenseQueries:_=>{const{queryClient:R,client:P}=m(),A=Ey(P),V=_(A),H=d4({queries:V.map(M=>(0,je.default)((0,je.default)({},M),{},{queryFn:M.queryFn,queryKey:M.queryKey}))},R);return[H.map(M=>M.data),H]},useMutation:y,useSubscription:N,useInfiniteQuery:w,usePrefetchInfiniteQuery:T,useSuspenseInfiniteQuery:k}}function Ok(t){const s=wk(t);return ag(c=>c==="useContext"||c==="useUtils"?()=>{const r=t.useUtils();return v.useMemo(()=>Ek(r),[r])}:t.hasOwnProperty(c)?t[c]:s[c])}function zk(t){const s=Rk();return Ok(s)}const q=zk(),Lk="app_session_id",Bk="Please login (10001)",Uk="__Host-oauth_state",Ik=t=>btoa(JSON.stringify(t));var Sx={exports:{}},Ci={},Tx={exports:{}},kx={};/**
18 * @license React
19 * scheduler.production.js
20 *
21 * Copyright (c) Meta Platforms, Inc. and affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var Ay;function Hk(){return Ay||(Ay=1,(function(t){function s(L,F){var W=L.length;L.push(F);e:for(;0<W;){var ce=W-1>>>1,ge=L[ce];
vendor: 8,599 bytes, lines 25-41
25if(0<i(ge,F))L[ce]=F,L[W]=ge,W=ce;else break e}}function c(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var F=L[0],W=L.pop();if(W!==F){L[0]=W;e:for(var ce=0,ge=L.length,O=ge>>>1;ce<O;){var te=2*(ce+1)-1,Y=L[te],ne=te+1,pe=L[ne];if(0>i(Y,W))ne<ge&&0>i(pe,Y)?(L[ce]=pe,L[ne]=W,ce=ne):(L[ce]=Y,L[te]=W,ce=te);else if(ne<ge&&0>i(pe,W))L[ce]=pe,L[ne]=W,ce=ne;else break e}}return F}function i(L,F){var W=L.sortIndex-F.sortIndex;return W!==0?W:L.id-F.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var u=Date,m=u.now();t.unstable_now=function(){return u.now()-m}}var p=[],f=[],b=1,h=null,y=3,j=!1,S=!1,N=!1,w=!1,T=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function z(L){for(var F=c(f);F!==null;){if(F.callback===null)r(f);else if(F.startTime<=L)r(f),F.sortIndex=F.expirationTime,s(p,F);else break;F=c(f)}}function _(L){if(N=!1,z(L),!S)if(c(p)!==null)S=!0,R||(R=!0,B());else{var F=c(f);F!==null&&se(_,F.startTime-L)}}var R=!1,P=-1,A=5,V=-1;function H(){return w?!0:!(t.unstable_now()-V<A)}function M(){if(w=!1,R){var L=t.unstable_now();V=L;var F=!0;try{e:{S=!1,N&&(N=!1,k(P),P=-1),j=!0;var W=y;try{t:{for(z(L),h=c(p);h!==null&&!(h.expirationTime>L&&H());){var ce=h.callback;if(typeof ce=="function"){h.callback=null,y=h.priorityLevel;var ge=ce(h.expirationTime<=L);if(L=t.unstable_now(),typeof ge=="function"){h.callback=ge,z(L),F=!0;break t}h===c(p)&&r(p),z(L)}else r(p);h=c(p)}if(h!==null)F=!0;else{var O=c(f);O!==null&&se(_,O.startTime-L),F=!1}}break e}finally{h=null,y=W,j=!1}F=void 0}}finally{F?B():R=!1}}}var B;if(typeof E=="function")B=function(){E(M)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,ie=I.port2;I.port1.onmessage=M,B=function(){ie.postMessage(null)}}else B=function(){T(M,0)};function se(L,F){P=T(function(){L(t.unstable_now())},F)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(L){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var W=y;y=F;try{return L()}finally{y=W}},t.unstable_requestPaint=function(){w=!0},t.unstable_runWithPriority=function(L,F){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var W=y;y=L;try{return F()}finally{y=W}},t.unstable_scheduleCallback=function(L,F,W){var ce=t.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?ce+W:ce):W=ce,L){case 1:var ge=-1;break;case 2:ge=250;break;case 5:ge=1073741823;break;case 4:ge=1e4;break;default:ge=5e3}return ge=W+ge,L={id:b++,callback:F,priorityLevel:L,startTime:W,expirationTime:ge,sortIndex:-1},W>ce?(L.sortIndex=W,s(f,L),c(p)===null&&L===c(f)&&(N?(k(P),P=-1):N=!0,se(_,W-ce))):(L.sortIndex=ge,s(p,L),S||j||(S=!0,R||(R=!0,B()))),L},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(L){var F=y;return function(){var W=y;y=F;try{return L.apply(this,arguments)}finally{y=W}}}})(kx)),kx}var Py;function $k(){return Py||(Py=1,Tx.exports=Hk()),Tx.exports}var Dx={exports:{}},ia={};/**
26 * @license React
27 * react-dom.production.js
28 *
29 * Copyright (c) Meta Platforms, Inc. and affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var My;function qk(){if(My)return ia;My=1;var t=yu();function s(p){var f="https://react.dev/errors/"+p;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)f+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var r={d:{f:c,r:function(){throw Error(s(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(p,f,b){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:h==null?null:""+h,children:p,containerInfo:f,implementation:b}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,f){if(p==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return ia.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ia.createPortal=function(p,f){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(s(299));return o(p,f,null,b)},ia.flushSync=function(p){var f=u.T,b=r.p;try{if(u.T=null,r.p=2,p)return p()}finally{u.T=f,r.p=b,r.d.f()}},ia.preconnect=function(p,f){typeof p=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(p,f))},ia.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},ia.preinit=function(p,f){if(typeof p=="string"&&f&&typeof f.as=="string"){var b=f.as,h=m(b,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,j=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;b==="style"?r.d.S(p,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:y,fetchPriority:j}):b==="script"&&r.d.X(p,{crossOrigin:h,integrity:y,fetchPriority:j,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},ia.preinitModule=function(p,f){if(typeof p=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var b=m(f.as,f.crossOrigin);r.d.M(p,{crossOrigin:b,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(p)},ia.preload=function(p,f){if(typeof p=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var b=f.as,h=m(b,f.crossOrigin);r.d.L(p,b,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},ia.preloadModule=function(p,f){if(typeof p=="string")if(f){var b=m(f.as,f.crossOrigin);r.d.m(p,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:b,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(p)},ia.requestFormReset=function(p){r.d.r(p)},ia.unstable_batchedUpdates=function(p,f){return p(f)},ia.useFormState=function(p,f,b){return u.H.useFormState(p,f,b)},ia.useFormStatus=function(){return u.H.useHostTransitionStatus()},ia.version="19.2.1",ia}var Ry;function cj(){if(Ry)return Dx.exports;Ry=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(s){console.error(s)}}return t(),Dx.exports=qk(),Dx.exports}/**
34 * @license React
35 * react-dom-client.production.js
36 *
37 * Copyright (c) Meta Platforms, Inc. and affiliates.
38 *
39 * This source code is licensed under the MIT license found in the
40 * LICENSE file in the root directory of this source tree.
41 */var Oy;function Qk(){if(Oy)return Ci;Oy=1;var t=$k(),s=yu(),c=cj();function r(a){var n="https://react.dev/errors/"+a;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+a+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var n=a,l=a;if(a.alternate)for(;n.return;)n=n.return;else{a=n;do n=a,(n.flags&4098)!==0&&(l=n.return),a=n.return;while(a)}return n.tag===3?l:null}function u(a){if(a.tag===13){var n=a.memoizedState;if(n===null&&(a=a.alternate,a!==null&&(n=a.memoizedState)),n!==null)return n.dehydrated}return null}function m(a){if(a.tag===31){var n=a.memoizedState;if(n===null&&(a=a.alternate,a!==null&&(n=a.memoizedState)),n!==null)return n.dehydrated}return null}
vendor: 14,848 bytes, lines 41-48
41function p(a){if(o(a)!==a)throw Error(r(188))}function f(a){var n=a.alternate;if(!n){if(n=o(a),n===null)throw Error(r(188));return n!==a?null:a}for(var l=a,d=n;;){var x=l.return;if(x===null)break;var g=x.alternate;if(g===null){if(d=x.return,d!==null){l=d;continue}break}if(x.child===g.child){for(g=x.child;g;){if(g===l)return p(x),a;if(g===d)return p(x),n;g=g.sibling}throw Error(r(188))}if(l.return!==d.return)l=x,d=g;else{for(var C=!1,D=x.child;D;){if(D===l){C=!0,l=x,d=g;break}if(D===d){C=!0,d=x,l=g;break}D=D.sibling}if(!C){for(D=g.child;D;){if(D===l){C=!0,l=g,d=x;break}if(D===d){C=!0,d=g,l=x;break}D=D.sibling}if(!C)throw Error(r(189))}}if(l.alternate!==d)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?a:n}function b(a){var n=a.tag;if(n===5||n===26||n===27||n===6)return a;for(a=a.child;a!==null;){if(n=b(a),n!==null)return n;a=a.sibling}return null}var h=Object.assign,y=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),E=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),M=Symbol.iterator;function B(a){return a===null||typeof a!="object"?null:(a=M&&a[M]||a["@@iterator"],typeof a=="function"?a:null)}var I=Symbol.for("react.client.reference");function ie(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===I?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case N:return"Fragment";case T:return"Profiler";case w:return"StrictMode";case _:return"Suspense";case R:return"SuspenseList";case V:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case S:return"Portal";case E:return a.displayName||"Context";case k:return(a._context.displayName||"Context")+".Consumer";case z:var n=a.render;return a=a.displayName,a||(a=n.displayName||n.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case P:return n=a.displayName||null,n!==null?n:ie(a.type)||"Memo";case A:n=a._payload,a=a._init;try{return ie(a(n))}catch{}}return null}var se=Array.isArray,L=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},ce=[],ge=-1;function O(a){return{current:a}}function te(a){0>ge||(a.current=ce[ge],ce[ge]=null,ge--)}function Y(a,n){ge++,ce[ge]=a.current,a.current=n}var ne=O(null),pe=O(null),be=O(null),le=O(null);function he(a,n){switch(Y(be,n),Y(pe,a),Y(ne,null),n.nodeType){case 9:case 11:a=(a=n.documentElement)&&(a=a.namespaceURI)?Rv(a):0;break;default:if(a=n.tagName,n=n.namespaceURI)n=Rv(n),a=Ov(n,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}te(ne),Y(ne,a)}function Pe(){te(ne),te(pe),te(be)}function Re(a){a.memoizedState!==null&&Y(le,a);var n=ne.current,l=Ov(n,a.type);n!==l&&(Y(pe,a),Y(ne,l))}function Q(a){pe.current===a&&(te(ne),te(pe)),le.current===a&&(te(le),hi._currentValue=W)}var xe,Le;function Ue(a){if(xe===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);xe=n&&n[1]||"",Le=-1<l.stack.indexOf(`
42    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43`+xe+a+Le}var Ye=!1;function Z(a,n){if(!a||Ye)return"";Ye=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(n){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(re){var ae=re}Reflect.construct(a,[],ue)}else{try{ue.call()}catch(re){ae=re}a.call(ue.prototype)}}else{try{throw Error()}catch(re){ae=re}(ue=a())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(re){if(re&&ae&&typeof re.stack=="string")return[re.stack,ae.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=d.DetermineComponentFrameRoot(),C=g[0],D=g[1];if(C&&D){var U=C.split(`
44`),ee=D.split(`
45`);for(x=d=0;d<U.length&&!U[d].includes("DetermineComponentFrameRoot");)d++;for(;x<ee.length&&!ee[x].includes("DetermineComponentFrameRoot");)x++;if(d===U.length||x===ee.length)for(d=U.length-1,x=ee.length-1;1<=d&&0<=x&&U[d]!==ee[x];)x--;for(;1<=d&&0<=x;d--,x--)if(U[d]!==ee[x]){if(d!==1||x!==1)do if(d--,x--,0>x||U[d]!==ee[x]){var oe=`
46`+U[d].replace(" at new "," at ");return a.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",a.displayName)),oe}while(1<=d&&0<=x);break}}}finally{Ye=!1,Error.prepareStackTrace=l}return(l=a?a.displayName||a.name:"")?Ue(l):""}function Se(a,n){switch(a.tag){case 26:case 27:case 5:return Ue(a.type);case 16:return Ue("Lazy");case 13:return a.child!==n&&n!==null?Ue("Suspense Fallback"):Ue("Suspense");case 19:return Ue("SuspenseList");case 0:case 15:return Z(a.type,!1);case 11:return Z(a.type.render,!1);case 1:return Z(a.type,!0);case 31:return Ue("Activity");default:return""}}function Ft(a){try{var n="",l=null;do n+=Se(a,l),l=a,a=a.return;while(a);return n}catch(d){return`
47Error generating stack: `+d.message+`
48`+d.stack}}var ht=Object.prototype.hasOwnProperty,qa=t.unstable_scheduleCallback,On=t.unstable_cancelCallback,Ut=t.unstable_shouldYield,Cs=t.unstable_requestPaint,Ke=t.unstable_now,lm=t.unstable_getCurrentPriorityLevel,wc=t.unstable_ImmediatePriority,lo=t.unstable_UserBlockingPriority,Sc=t.unstable_NormalPriority,_l=t.unstable_LowPriority,qs=t.unstable_IdlePriority,io=t.log,zn=t.unstable_setDisableYieldValue,Tc=null,ua=null;function is(a){if(typeof io=="function"&&zn(a),ua&&typeof ua.setStrictMode=="function")try{ua.setStrictMode(Tc,a)}catch{}}var ra=Math.clz32?Math.clz32:ws,im=Math.log,Al=Math.LN2;function ws(a){return a>>>=0,a===0?32:31-(im(a)/Al|0)|0}var mr=256,pr=262144,kc=4194304;function Ss(a){var n=a&42;if(n!==0)return n;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function ze(a,n,l){var d=a.pendingLanes;if(d===0)return 0;var x=0,g=a.suspendedLanes,C=a.pingedLanes;a=a.warmLanes;var D=d&134217727;return D!==0?(d=D&~g,d!==0?x=Ss(d):(C&=D,C!==0?x=Ss(C):l||(l=D&~a,l!==0&&(x=Ss(l))))):(D=d&~g,D!==0?x=Ss(D):C!==0?x=Ss(C):l||(l=d&~a,l!==0&&(x=Ss(l)))),x===0?0:n!==0&&n!==x&&(n&g)===0&&(g=x&-x,l=n&-n,g>=l||g===32&&(l&4194048)!==0)?n:x}function bt(a,n){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&n)===0}function qt(a,n){switch(a){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function la(){var a=kc;return kc<<=1,(kc&62914560)===0&&(kc=4194304),a}function Ln(a){for(var n=[],l=0;31>l;l++)n.push(a);return n}function yt(a,n){a.pendingLanes|=n,n!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function ga(a,n,l,d,x,g){var C=a.pendingLanes;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=l,a.entangledLanes&=l,a.errorRecoveryDisabledLanes&=l,a.shellSuspendCounter=0;var D=a.entanglements,U=a.expirationTimes,ee=a.hiddenUpdates;for(l=C&~l;0<l;){var oe=31-ra(l),ue=1<<oe;D[oe]=0,U[oe]=-1;var ae=ee[oe];if(ae!==null)for(ee[oe]=null,oe=0;oe<ae.length;oe++){var re=ae[oe];re!==null&&(re.lane&=-536870913)}l&=~ue}d!==0&&Dc(a,d,0),g!==0&&x===0&&a.tag!==0&&(a.suspendedLanes|=g&~(C&~n))}function Dc(a,n,l){a.pendingLanes|=n,a.suspendedLanes&=~n;var d=31-ra(n);a.entangledLanes|=n,a.entanglements[d]=a.entanglements[d]|1073741824|l&261930}function ha(a,n){var l=a.entangledLanes|=n;for(a=a.entanglements;l;){var d=31-ra(l),x=1<<d;x&n|a[d]&n&&(a[d]|=n),l&=~x}}function ba(a,n){var l=n&-n;return l=(l&42)!==0?1:xr(l),(l&(a.suspendedLanes|n))!==0?0:l}function xr(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function os(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function om(){var a=F.p;return a!==0?a:(a=window.event,a===void 0?32:ny(a.type))}function yh(a,n){var l=F.p;try{return F.p=a,n()}finally{F.p=l}}var Bn=Math.random().toString(36).slice(2),Kt="__reactFiber$"+Bn,va="__reactProps$"+Bn,fr="__reactContainer$"+Bn,dm="__reactEvents$"+Bn,b3="__reactListeners$"+Bn,v3="__reactHandles$"+Bn,jh="__reactResources$"+Bn,Pl="__reactMarker$"+Bn;function um(a){delete a[Kt],delete a[va],delete a[dm],delete a[b3],delete a[v3]}function gr(a){var n=a[Kt];if(n)return n;for(var l=a.parentNode;l;){if(n=l[fr]||l[Kt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(a=$v(a);a!==null;){if(l=a[Kt])return l;a=$v(a)}return n}a=l,l=a.parentNode}return null}function hr(a){if(a=a[Kt]||a[fr]){var n=a.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return a}return null}function Ml(a){var n=a.tag;if(n===5||n===26||n===27||n===6)return a.stateNode;throw Error(r(33))}function br(a){var n=a[jh];return n||(n=a[jh]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Qt(a){a[Pl]=!0}var Nh=new Set,Ch={};function Ec(a,n){vr(a,n),vr(a+"Capture",n)}function vr(a,n){for(Ch[a]=n,a=0;a<n.length;a++)Nh.add(n[a])}var y3=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),wh={},Sh={};function j3(a){return ht.call(Sh,a)?!0:ht.call(wh,a)?!1:y3.test(a)?Sh[a]=!0:(wh[a]=!0,!1)}function oo(a,n,l){if(j3(n))if(l===null)a.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":a.removeAttribute(n);return;case"boolean":var d=n.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){a.removeAttribute(n);return}}a.setAttribute(n,""+l)}}function uo(a,n,l){if(l===null)a.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(n);return}a.setAttribute(n,""+l)}}function Qs(a,n,l,d){if(d===null)a.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(l);return}a.setAttributeNS(n,l,""+d)}}function Qa(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Th(a){var n=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function N3(a,n,l){var d=Object.getOwnPropertyDescriptor(a.constructor.prototype,n);if(!a.hasOwnProperty(n)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,g=d.set;return Object.defineProperty(a,n,{configurable:!0,get:function(){return x.call(this)},set:function(C){l=""+C,g.call(this,C)}}),Object.defineProperty(a,n,{enumerable:d.enumerable}),{getValue:function(){return l},setValue:function(C){l=""+C},stopTracking:function(){a._valueTracker=null,delete a[n]}}}}function mm(a){if(!a._valueTracker){var n=Th(a)?"checked":"value";a._valueTracker=N3(a,n,""+a[n])}}function kh(a){if(!a)return!1;var n=a._valueTracker;if(!n)return!0;var l=n.getValue(),d="";return a&&(d=Th(a)?a.checked?"true":"false":a.value),a=d,a!==l?(n.setValue(a),!0):!1}function mo(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var C3=/[\n"\\]/g;function Wa(a){return a.replace(C3,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function pm(a,n,l,d,x,g,C,D){a.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?a.type=C:a.removeAttribute("type"),n!=null?C==="number"?(n===0&&a.value===""||a.value!=n)&&(a.value=""+Qa(n)):a.value!==""+Qa(n)&&(a.value=""+Qa(n)):C!=="submit"&&C!=="reset"||a.removeAttribute("value"),n!=null?xm(a,C,Qa(n)):l!=null?xm(a,C,Qa(l)):d!=null&&a.removeAttribute("value"),x==null&&g!=null&&(a.defaultChecked=!!g),x!=null&&(a.checked=x&&typeof x!="function"&&typeof x!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?a.name=""+Qa(D):a.removeAttribute("name")}function Dh(a,n,l,d,x,g,C,D){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(a.type=g),n!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){mm(a);return}l=l!=null?""+Qa(l):"",n=n!=null?""+Qa(n):l,D||n===a.value||(a.value=n),a.defaultValue=n}d=d??x,d=typeof d!="function"&&typeof d!="symbol"&&!!d,a.checked=D?a.checked:!!d,a.defaultChecked=!!d,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(a.name=C),mm(a)}function xm(a,n,l){n==="number"&&mo(a.ownerDocument)===a||a.defaultValue===""+l||(a.defaultValue=""+l)}function yr(a,n,l,d){if(a=a.options,n){n={};for(var x=0;x<l.length;x++)n["$"+l[x]]=!0;for(l=0;l<a.length;l++)x=n.hasOwnProperty("$"+a[l].value),a[l].selected!==x&&(a[l].selected=x),x&&d&&(a[l].defaultSelected=!0)}else{for(l=""+Qa(l),n=null,x=0;x<a.length;x++){if(a[x].value===l){a[x].selected=!0,d&&(a[x].defaultSelected=!0);return}n!==null||a[x].disabled||(n=a[x])}n!==null&&(n.selected=!0)}}function Eh(a,n,l){if(n!=null&&(n=""+Qa(n),n!==a.value&&(a.value=n),l==null)){a.defaultValue!==n&&(a.defaultValue=n);return}a.defaultValue=l!=null?""+Qa(l):""}function _h(a,n,l,d){if(n==null){if(d!=null){if(l!=null)throw Error(r(92));if(se(d)){if(1<d.length)throw Error(r(93));d=d[0]}l=d}l==null&&(l=""),n=l}l=Qa(n),a.defaultValue=l,d=a.textContent,d===l&&d!==""&&d!==null&&(a.value=d),mm(a)}
vendor: 4,182 bytes, line 48
48function jr(a,n){if(n){var l=a.firstChild;if(l&&l===a.lastChild&&l.nodeType===3){l.nodeValue=n;return}}a.textContent=n}var w3=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ah(a,n,l){var d=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?d?a.setProperty(n,""):n==="float"?a.cssFloat="":a[n]="":d?a.setProperty(n,l):typeof l!="number"||l===0||w3.has(n)?n==="float"?a.cssFloat=l:a[n]=(""+l).trim():a[n]=l+"px"}function Ph(a,n,l){if(n!=null&&typeof n!="object")throw Error(r(62));if(a=a.style,l!=null){for(var d in l)!l.hasOwnProperty(d)||n!=null&&n.hasOwnProperty(d)||(d.indexOf("--")===0?a.setProperty(d,""):d==="float"?a.cssFloat="":a[d]="");for(var x in n)d=n[x],n.hasOwnProperty(x)&&l[x]!==d&&Ah(a,x,d)}else for(var g in n)n.hasOwnProperty(g)&&Ah(a,g,n[g])}function fm(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var S3=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
48-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),T3=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function po(a){return T3.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Ws(){}var gm=null;function hm(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Nr=null,Cr=null;function Mh(a){var n=hr(a);if(n&&(a=n.stateNode)){var l=a[va]||null;e:switch(a=n.stateNode,n.type){case"input":if(pm(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=a;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Wa(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var d=l[n];if(d!==a&&d.form===a.form){var x=d[va]||null;if(!x)throw Error(r(90));pm(d,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(n=0;n<l.length;n++)d=l[n],d.form===a.form&&kh(d)}break e;case"textarea":Eh(a,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&yr(a,!!l.multiple,n,!1)}}}var bm=!1;function Rh(a,n,l){if(bm)return a(n,l);bm=!0;try{var d=a(n);return d}finally{if(bm=!1,(Nr!==null||Cr!==null)&&(ed(),Nr&&(n=Nr,a=Cr,Cr=Nr=null,Mh(n),a)))for(n=0;n<a.length;n++)Mh(a[n])}}function Rl(a,n){var l=a.stateNode;if(l===null)return null;var d=l[va]||null;if(d===null)return null;l=d[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(a=a.type,d=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!d;break e;default:a=!1}if(a)return null;if(l&&typeof l!="function")throw Error(r(231,n,typeof l));return l}var Vs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vm=!1;if(Vs)try{var Ol={};Object.defineProperty(Ol,"passive",{get:function(){vm=!0}}),window.addEventListener("test",Ol,Ol),window.removeEventListener("test",Ol,Ol)}catch{vm=!1}var Un=null,ym=null,xo=null;function Oh(){if(xo)return xo;var a,n=ym,l=n.length,d,x="value"in Un?Un.value:Un.textContent,g=x.length;for(a=0;a<l&&n[a]===x[a];a++);var C=l-a;for(d=1;d<=C&&n[l-d]===x[g-d];d++);return xo=x.slice(a,1<d?1-d:void 0)}function fo(a){var n=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&n===13&&(a=13)):a=n,a===10&&(a=13),32<=a||a===13?a:0}function go(){return!0}function zh(){return!1}function ya(a){function n(l,d,x,g,C){this._reactName=l,this._targetInst=x,this.type=d,this.nativeEvent=g,this.target=C,this.currentTarget=null;for(var D in a)a.hasOwnProperty(D)&&(l=a[D],this[D]=l?l(g):g[D]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?go:zh,this.isPropagationStopped=zh,this}return h(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=go)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=go)},persist:function(){},isPersistent:go}),n}var _c={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ho=ya(_c),zl=h({},_c,{view:0,detail:0}),k3=ya(zl),jm,Nm,Ll,bo=h({},zl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wm,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Ll&&(Ll&&a.type==="mousemove"?(jm=a.screenX-Ll.screenX,Nm=a.screenY-Ll.screenY):Nm=jm=0,Ll=a),jm)},movementY:function(a){return"movementY"in a?a.movementY:Nm}}),Lh=ya(bo),D3=h({},bo,{dataTransfer:0}),E3=ya(D3),_3=h({},zl,{relatedTarget:0}),Cm=ya(_3),A3=h({},_c,{animationName:0,elapsedTime:0,pseudoElement:0}),P3=ya(A3),M3=h({}
vendor: 1,047 bytes, line 48
48,_c,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),R3=ya(M3),O3=h({},_c,{data:0}),Bh=ya(O3),z3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},L3={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},B3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function U3(a){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(a):(a=B3[a])?!!n[a]:!1}function wm(){return U3}var I3=h({},zl,{key:function(a){if(a.key){var n=z3[a.key]||a.key;if(n!=="Unidentified")return n}
vendor: 4,246 bytes, line 48
48return a.type==="keypress"?(a=fo(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?L3[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wm,charCode:function(a){return a.type==="keypress"?fo(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?fo(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),H3=ya(I3),$3=h({},bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uh=ya($3),q3=h({},zl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wm}),Q3=ya(q3),W3=h({},_c,{propertyName:0,elapsedTime:0,pseudoElement:0}),V3=ya(W3),F3=h({},bo,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),K3=ya(F3),G3=h({},_c,{newState:0,oldState:0}),Y3=ya(G3),X3=[9,13,27,32],Sm=Vs&&"CompositionEvent"in window,Bl=null;Vs&&"documentMode"in document&&(Bl=document.documentMode);var Z3=Vs&&"TextEvent"in window&&!Bl,Ih=Vs&&(!Sm||Bl&&8<Bl&&11>=Bl),Hh=" ",$h=!1;function qh(a,n){switch(a){case"keyup":return X3.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qh(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var wr=!1;function J3(a,n){switch(a){case"compositionend":return Qh(n);case"keypress":return n.which!==32?null:($h=!0,Hh);case"textInput":return a=n.data,a===Hh&&$h?null:a;default:return null}}function e5(a,n){if(wr)return a==="compositionend"||!Sm&&qh(a,n)?(a=Oh(),xo=ym=Un=null,wr=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Ih&&n.locale!=="ko"?null:n.data;default:return null}}var t5={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wh(a){var n=a&&a.nodeName&&a.nodeName.toLowerCase();return n==="input"?!!t5[a.type]:n==="textarea"}function Vh(a,n,l,d){Nr?Cr?Cr.push(d):Cr=[d]:Nr=d,n=ld(n,"onChange"),0<n.length&&(l=new ho("onChange","change",null,l,d),a.push({event:l,listeners:n}))}var Ul=null,Il=null;function a5(a){Dv(a,0)}function vo(a){var n=Ml(a);if(kh(n))return a}function Fh(a,n){if(a==="change")return n}var Kh=!1;if(Vs){var Tm;if(Vs){var km="oninput"in document;if(!km){var Gh=document.createElement("div");Gh.setAttribute("oninput","return;"),km=typeof Gh.oninput=="function"}Tm=km}else Tm=!1;Kh=Tm&&(!document.documentMode||9<document.documentMode)}function Yh(){Ul&&(Ul.detachEvent("onpropertychange",Xh),Il=Ul=null)}function Xh(a){if(a.propertyName==="value"&&vo(Il)){var n=[];Vh(n,Il,a,hm(a)),Rh(a5,n)}}function s5(a,n,l){a==="focusin"?(Yh(),Ul=n,Il=l,Ul.attachEvent("onpropertychange",Xh)):a==="focusout"&&Yh()}function n5(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return vo(Il)}function c5(a,n){if(a==="click")return vo(n)}function r5(a,n){if(a==="input"||a==="change")return vo(n)}function l5(a,n){return a===n&&(a!==0||1/a===1/n)||a!==a&&n!==n}var Aa=typeof Object.is=="function"?Object.is:l5;function Hl(a,n){if(Aa(a,n))return!0;if(typeof a!="object"||a===null||typeof n!="object"||n===null)return!1;var l=Object.keys(a),d=Object.keys(n);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var x=l[d];if(!ht.call(n,x)||!Aa(a[x],n[x]))return!1}return!0}function Zh(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Jh(a,n){var l=Zh(a);a=0;for(var d;l;){if(l.nodeType===3){if(d=a+l.textContent.length,a<=n&&d>=n)return{node:l,offset:n-a};a=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Zh(l)}}function eb(a,n){return a&&n?a===n?!0:a&&a.nodeType===3?!1:n&&n.nodeType===3?eb(a,n.parentNode):"contains"in a?a.contains(n):a.compareDocumentPosition?!!(a.compareDocumentPosition(n)&16):!1:!1}
vendor: 20,950 bytes, line 48
48function tb(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var n=mo(a.document);n instanceof a.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)a=n.contentWindow;else break;n=mo(a.document)}return n}function Dm(a){var n=a&&a.nodeName&&a.nodeName.toLowerCase();return n&&(n==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||n==="textarea"||a.contentEditable==="true")}var i5=Vs&&"documentMode"in document&&11>=document.documentMode,Sr=null,Em=null,$l=null,_m=!1;function ab(a,n,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;_m||Sr==null||Sr!==mo(d)||(d=Sr,"selectionStart"in d&&Dm(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),$l&&Hl($l,d)||($l=d,d=ld(Em,"onSelect"),0<d.length&&(n=new ho("onSelect","select",null,n,l),a.push({event:n,listeners:d}),n.target=Sr)))}function Ac(a,n){var l={};return l[a.toLowerCase()]=n.toLowerCase(),l["Webkit"+a]="webkit"+n,l["Moz"+a]="moz"+n,l}var Tr={animationend:Ac("Animation","AnimationEnd"),animationiteration:Ac("Animation","AnimationIteration"),animationstart:Ac("Animation","AnimationStart"),transitionrun:Ac("Transition","TransitionRun"),transitionstart:Ac("Transition","TransitionStart"),transitioncancel:Ac("Transition","TransitionCancel"),transitionend:Ac("Transition","TransitionEnd")},Am={},sb={};Vs&&(sb=document.createElement("div").style,"AnimationEvent"in window||(delete Tr.animationend.animation,delete Tr.animationiteration.animation,delete Tr.animationstart.animation),"TransitionEvent"in window||delete Tr.transitionend.transition);function Pc(a){if(Am[a])return Am[a];if(!Tr[a])return a;var n=Tr[a],l;for(l in n)if(n.hasOwnProperty(l)&&l in sb)return Am[a]=n[l];return a}var nb=Pc("animationend"),cb=Pc("animationiteration"),rb=Pc("animationstart"),o5=Pc("transitionrun"),d5=Pc("transitionstart"),u5=Pc("transitioncancel"),lb=Pc("transitionend"),ib=new Map,Pm="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Pm.push("scrollEnd");function ds(a,n){ib.set(a,n),Ec(n,[a])}var yo=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Va=[],kr=0,Mm=0;function jo(){for(var a=kr,n=Mm=kr=0;n<a;){var l=Va[n];Va[n++]=null;var d=Va[n];Va[n++]=null;var x=Va[n];Va[n++]=null;var g=Va[n];if(Va[n++]=null,d!==null&&x!==null){var C=d.pending;C===null?x.next=x:(x.next=C.next,C.next=x),d.pending=x}g!==0&&ob(l,x,g)}}function No(a,n,l,d){Va[kr++]=a,Va[kr++]=n,Va[kr++]=l,Va[kr++]=d,Mm|=d,a.lanes|=d,a=a.alternate,a!==null&&(a.lanes|=d)}function Rm(a,n,l,d){return No(a,n,l,d),Co(a)}function Mc(a,n){return No(a,null,null,n),Co(a)}function ob(a,n,l){a.lanes|=l;var d=a.alternate;d!==null&&(d.lanes|=l);for(var x=!1,g=a.return;g!==null;)g.childLanes|=l,d=g.alternate,d!==null&&(d.childLanes|=l),g.tag===22&&(a=g.stateNode,a===null||a._visibility&1||(x=!0)),a=g,g=g.return;return a.tag===3?(g=a.stateNode,x&&n!==null&&(x=31-ra(l),a=g.hiddenUpdates,d=a[x],d===null?a[x]=[n]:d.push(n),n.lane=l|536870912),g):null}function Co(a){if(50<di)throw di=0,qp=null,Error(r(185));for(var n=a.return;n!==null;)a=n,n=a.return;return a.tag===3?a.stateNode:null}var Dr={};function m5(a,n,l,d){this.tag=a,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pa(a,n,l,d){return new m5(a,n,l,d)}function Om(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Fs(a,n){var l=a.alternate;return l===null?(l=Pa(a.tag,n,a.key,a.mode),l.elementType=a.elementType,l.type=a.type,l.stateNode=a.stateNode,l.alternate=a,a.alternate=l):(l.pendingProps=n,l.type=a.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=a.flags&65011712,l.childLanes=a.childLanes,l.lanes=a.lanes,l.child=a.child,l.memoizedProps=a.memoizedProps,l.memoizedState=a.memoizedState,l.updateQueue=a.updateQueue,n=a.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=a.sibling,l.index=a.index,l.ref=a.ref,l.refCleanup=a.refCleanup,l}function db(a,n){a.flags&=65011714;var l=a.alternate;return l===null?(a.childLanes=0,a.lanes=n,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,n=l.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),a}function wo(a,n,l,d,x,g){var C=0;if(d=a,typeof a=="function")Om(a)&&(C=1);else if(typeof a=="string")C=hT(a,l,ne.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case V:return a=Pa(31,l,n,x),a.elementType=V,a.lanes=g,a;case N:return Rc(l.children,x,g,n);case w:C=8,x|=24;break;case T:return a=Pa(12,l,n,x|2),a.elementType=T,a.lanes=g,a;case _:return a=Pa(13,l,n,x),a.elementType=_,a.lanes=g,a;case R:return a=Pa(19,l,n,x),a.elementType=R,a.lanes=g,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case E:C=10;break e;case k:C=9;break e;case z:C=11;break e;case P:C=14;break e;case A:C=16,d=null;break e}C=29,l=Error(r(130,a===null?"null":typeof a,"")),d=null}return n=Pa(C,l,n,x),n.elementType=a,n.type=d,n.lanes=g,n}function Rc(a,n,l,d){return a=Pa(7,a,d,n),a.lanes=l,a}function zm(a,n,l){return a=Pa(6,a,null,n),a.lanes=l,a}function ub(a){var n=Pa(18,null,null,0);return n.stateNode=a,n}function Lm(a,n,l){return n=Pa(4,a.children!==null?a.children:[],a.key,n),n.lanes=l,n.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},n}var mb=new WeakMap;function Fa(a,n){if(typeof a=="object"&&a!==null){var l=mb.get(a);return l!==void 0?l:(n={value:a,source:n,stack:Ft(n)},mb.set(a,n),n)}return{value:a,source:n,stack:Ft(n)}}var Er=[],_r=0,So=null,ql=0,Ka=[],Ga=0,In=null,Ts=1,ks="";function Ks(a,n){Er[_r++]=ql,Er[_r++]=So,So=a,ql=n}function pb(a,n,l){Ka[Ga++]=Ts,Ka[Ga++]=ks,Ka[Ga++]=In,In=a;var d=Ts;a=ks;var x=32-ra(d)-1;d&=~(1<<x),l+=1;var g=32-ra(n)+x;if(30<g){var C=x-x%5;g=(d&(1<<C)-1).toString(32),d>>=C,x-=C,Ts=1<<32-ra(n)+x|l<<x|d,ks=g+a}else Ts=1<<g|l<<x|d,ks=a}function Bm(a){a.return!==null&&(Ks(a,1),pb(a,1,0))}function Um(a){for(;a===So;)So=Er[--_r],Er[_r]=null,ql=Er[--_r],Er[_r]=null;for(;a===In;)In=Ka[--Ga],Ka[Ga]=null,ks=Ka[--Ga],Ka[Ga]=null,Ts=Ka[--Ga],Ka[Ga]=null}function xb(a,n){Ka[Ga++]=Ts,Ka[Ga++]=ks,Ka[Ga++]=In,Ts=n.id,ks=n.overflow,In=a}var Gt=null,ft=null,Ge=!1,Hn=null,Ya=!1,Im=Error(r(519));function $n(a){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ql(Fa(n,a)),Im}function fb(a){var n=a.stateNode,l=a.type,d=a.memoizedProps;switch(n[Kt]=a,n[va]=d,l){case"dialog":We("cancel",n),We("close",n);break;case"iframe":case"object":case"embed":We("load",n);break;case"video":case"audio":for(l=0;l<mi.length;l++)We(mi[l],n);break;case"source":We("error",n);break;case"img":case"image":case"link":We("error",n),We("load",n);break;case"details":We("toggle",n);break;case"input":We("invalid",n),Dh(n,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":We("invalid",n);break;case"textarea":We("invalid",n),_h(n,d.value,d.defaultValue,d.children)}l=d.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||d.suppressHydrationWarning===!0||Pv(n.textContent,l)?(d.popover!=null&&(We("beforetoggle",n),We("toggle",n)),d.onScroll!=null&&We("scroll",n),d.onScrollEnd!=null&&We("scrollend",n),d.onClick!=null&&(n.onclick=Ws),n=!0):n=!1,n||$n(a,!0)}function gb(a){for(Gt=a.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:Ya=!1;return;case 27:case 3:Ya=!0;return;default:Gt=Gt.return}}function Ar(a){if(a!==Gt)return!1;if(!Ge)return gb(a),Ge=!0,!1;var n=a.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=a.type,l=!(l!=="form"&&l!=="button")||nx(a.type,a.memoizedProps)),l=!l),l&&ft&&$n(a),gb(a),n===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));ft=Hv(a)}else if(n===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));ft=Hv(a)}else n===27?(n=ft,ac(a.type)?(a=ox,ox=null,ft=a):ft=n):ft=Gt?Za(a.stateNode.nextSibling):null;return!0}function Oc(){ft=Gt=null,Ge=!1}function Hm(){var a=Hn;return a!==null&&(wa===null?wa=a:wa.push.apply(wa,a),Hn=null),a}function Ql(a){Hn===null?Hn=[a]:Hn.push(a)}var $m=O(null),zc=null,Gs=null;function qn(a,n,l){Y($m,n._currentValue),n._currentValue=l}function Ys(a){a._currentValue=$m.current,te($m)}function qm(a,n,l){for(;a!==null;){var d=a.alternate;if((a.childLanes&n)!==n?(a.childLanes|=n,d!==null&&(d.childLanes|=n)):d!==null&&(d.childLanes&n)!==n&&(d.childLanes|=n),a===l)break;a=a.return}}function Qm(a,n,l,d){var x=a.child;for(x!==null&&(x.return=a);x!==null;){var g=x.dependencies;if(g!==null){var C=x.child;g=g.firstContext;e:for(;g!==null;){var D=g;g=x;for(var U=0;U<n.length;U++)if(D.context===n[U]){g.lanes|=l,D=g.alternate,D!==null&&(D.lanes|=l),qm(g.return,l,a),d||(C=null);break e}g=D.next}}else if(x.tag===18){if(C=x.return,C===null)throw Error(r(341));C.lanes|=l,g=C.alternate,g!==null&&(g.lanes|=l),qm(C,l,a),C=null}else C=x.child;if(C!==null)C.return=x;else for(C=x;C!==null;){if(C===a){C=null;break}if(x=C.sibling,x!==null){x.return=C.return,C=x;break}C=C.return}x=C}}function Pr(a,n,l,d){a=null;for(var x=n,g=!1;x!==null;){if(!g){if((x.flags&524288)!==0)g=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var C=x.alternate;if(C===null)throw Error(r(387));if(C=C.memoizedProps,C!==null){var D=x.type;Aa(x.pendingProps.value,C.value)||(a!==null?a.push(D):a=[D])}}else if(x===le.current){if(C=x.alternate,C===null)throw Error(r(387));C.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(a!==null?a.push(hi):a=[hi])}x=x.return}a!==null&&Qm(n,a,l,d),n.flags|=262144}function To(a){for(a=a.firstContext;a!==null;){if(!Aa(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Lc(a){zc=a,Gs=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Yt(a){return hb(zc,a)}function ko(a,n){return zc===null&&Lc(a),hb(a,n)}function hb(a,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},Gs===null){if(a===null)throw Error(r(308));Gs=n,a.dependencies={lanes:0,firstContext:n},a.flags|=524288}else Gs=Gs.next=n;return l}var p5=typeof AbortController<"u"?AbortController:function(){var a=[],n=this.signal={aborted:!1,addEventListener:function(l,d){a.push(d)}};this.abort=function(){n.aborted=!0,a.forEach(function(l){return l()})}},x5=t.unstable_scheduleCallback,f5=t.unstable_NormalPriority,Pt={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wm(){return{controller:new p5,data:new Map,refCount:0}}function Wl(a){a.refCount--,a.refCount===0&&x5(f5,function(){a.controller.abort()})}var Vl=null,Vm=0,Mr=0,Rr=null;function g5(a,n){if(Vl===null){var l=Vl=[];Vm=0,Mr=Gp(),Rr={status:"pending",value:void 0,then:function(d){l.push(d)}}}return Vm++,n.then(bb,bb),n}function bb(){if(--Vm===0&&Vl!==null){Rr!==null&&(Rr.status="fulfilled");var a=Vl;Vl=null,Mr=0,Rr=null;for(var n=0;n<a.length;n++)(0,a[n])()}}function h5(a,n){var l=[],d={status:"pending",value:null,reason:null,then:function(x){l.push(x)}};return a.then(function(){d.status="fulfilled",d.value=n;for(var x=0;x<l.length;x++)(0,l[x])(n)},function(x){for(d.status="rejected",d.reason=x,x=0;x<l.length;x++)(0,l[x])(void 0)}),d}var vb=L.S;L.S=function(a,n){av=Ke(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&g5(a,n),vb!==null&&vb(a,n)};var Bc=O(null);function Fm(){var a=Bc.current;return a!==null?a:mt.pooledCache}function Do(a,n){n===null?Y(Bc,Bc.current):Y(Bc,n.pool)}function yb(){var a=Fm();return a===null?null:{parent:Pt._currentValue,pool:a}}var Or=Error(r(460)),Km=Error(r(474)),Eo=Error(r(542)),_o={then:function(){}};function jb(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Nb(a,n,l){switch(l=a[l],l===void 0?a.push(n):l!==n&&(n.then(Ws,Ws),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw a=n.reason,wb(a),a;default:if(typeof n.status=="string")n.then(Ws,Ws);else{if(a=mt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=n,a.status="pending",a.then(function(d){if(n.status==="pending"){var x=n;x.status="fulfilled",x.value=d}},function(d){if(n.status==="pending"){var x=n;x.status="rejected",x.reason=d}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw a=n.reason,wb(a),a}throw Ic=n,Or}}function Uc(a){try{var n=a._init;return n(a._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ic=l,Or):l}}var Ic=null;function Cb(){if(Ic===null)throw Error(r(459));var a=Ic;return Ic=null,a}function wb(a){if(a===Or||a===Eo)throw Error(r(483))}var zr=null,Fl=0;function Ao(a){var n=Fl;return Fl+=1,zr===null&&(zr=[]),Nb(zr,a,n)}function Kl(a,n){n=n.props.ref,a.ref=n!==void 0?n:null}function Po(a,n){throw n.$$typeof===y?Error(r(525)):(a=Object.prototype.toString.call(n),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":a)))}function Sb(a){function n(K,$){if(a){var J=K.deletions;J===null?(K.deletions=[$],K.flags|=16):J.push($)}}function l(K,$){if(!a)return null;for(;$!==null;)n(K,$),$=$.sibling;return null}function d(K){for(var $=new Map;K!==null;)K.key!==null?$.set(K.key,K):$.set(K.index,K),K=K.sibling;return $}function x(K,$){return K=Fs(K,$),K.index=0,K.sibling=null,K}function g(K,$,J){return K.index=J,a?(J=K.alternate,J!==null?(J=J.index,J<$?(K.flags|=67108866,$):J):(K.flags|=67108866,$)):(K.flags|=1048576,$)}function C(K){return a&&K.alternate===null&&(K.flags|=67108866),K}function D(K,$,J,de){return $===null||$.tag!==6?($=zm(J,K.mode,de),$.return=K,$):($=x($,J),$.return=K,$)}function U(K,$,J,de){var Me=J.type;return Me===N?oe(K,$,J.props.children,de,J.key):$!==null&&($.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===A&&Uc(Me)===$.type)?($=x($,J.props),Kl($,J),$.return=K,$):($=wo(J.type,J.key,J.props,null,K.mode,de),Kl($,J),$.return=K,$)}function ee(K,$,J,de){return $===null||$.tag!==4||$.stateNode.containerInfo!==J.containerInfo||$.stateNode.implementation!==J.implementation?($=Lm(J,K.mode,de),$.return=K,$):($=x($,J.children||[]),$.return=K,$)}function oe(K,$,J,de,Me){return $===null||$.tag!==7?($=Rc(J,K.mode,de,Me),$.return=K,$):($=x($,J),$.return=K,$)}function ue(K,$,J){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=zm(""+$,K.mode,J),$.return=K,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case j:return J=wo($.type,$.key,$.props,null,K.mode,J),Kl(J,$),J.return=K,J;case S:return $=Lm($,K.mode,J),$.return=K,$;case A:return $=Uc($),ue(K,$,J)}if(se($)||B($))return $=Rc($,K.mode,J,null),$.return=K,$;if(typeof $.then=="function")return ue(K,Ao($),J);if($.$$typeof===E)return ue(K,ko(K,$),J);Po(K,$)}return null}function ae(K,$,J,de){var Me=$!==null?$.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Me!==null?null:D(K,$,""+J,de);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case j:return J.key===Me?U(K,$,J,de):null;case S:return J.key===Me?ee(K,$,J,de):null;case A:return J=Uc(J),ae(K,$,J,de)}if(se(J)||B(J))return Me!==null?null:oe(K,$,J,de,null);if(typeof J.then=="function")return ae(K,$,Ao(J),de);if(J.$$typeof===E)return ae(K,$,ko(K,J),de);Po(K,J)}return null}function re(K,$,J,de,Me){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return K=K.get(J)||null,D($,K,""+de,Me);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case j:return K=K.get(de.key===null?J:de.key)||null,U($,K,de,Me);case S:return K=K.get(de.key===null?J:de.key)||null,ee($,K,de,Me);case A:return de=Uc(de),re(K,$,J,de,Me)}if(se(de)||B(de))return K=K.get(J)||null,oe($,K,de,Me,null);if(typeof de.then=="function")return re(K,$,J,Ao(de),Me);if(de.$$typeof===E)return re(K,$,J,ko($,de),Me);Po($,de)}return null}function Te(K,$,J,de){for(var Me=null,Xe=null,Ee=$,$e=$=0,Fe=null;Ee!==null&&$e<J.length;$e++){Ee.index>$e?(Fe=Ee,Ee=null):Fe=Ee.sibling;var Ze=ae(K,Ee,J[$e],de);if(Ze===null){Ee===null&&(Ee=Fe);break}a&&Ee&&Ze.alternate===null&&n(K,Ee),$=g(Ze,$,$e),Xe===null?Me=Ze:Xe.sibling=Ze,Xe=Ze,Ee=Fe}if($e===J.length)return l(K,Ee),Ge&&Ks(K,$e),Me;if(Ee===null){for(;$e<J.length;$e++)Ee=ue(K,J[$e],de),Ee!==null&&($=g(Ee,$,$e),Xe===null?Me=Ee:Xe.sibling=Ee,Xe=Ee);return Ge&&Ks(K,$e),Me}for(Ee=d(Ee);$e<J.length;$e++)Fe=re(Ee,K,$e,J[$e],de),Fe!==null&&(a&&Fe.alternate!==null&&Ee.delete(Fe.key===null?$e:Fe.key),$=g(Fe,$,$e),Xe===null?Me=Fe:Xe.sibling=Fe,Xe=Fe);return a&&Ee.forEach(function(lc){return n(K,lc)}),Ge&&Ks(K,$e),Me}function Oe(K,$,J,de){if(J==null)throw Error(r(151));for(var Me=null,Xe=null,Ee=$,$e=$=0,Fe=null,Ze=J.next();Ee!==null&&!Ze.done;$e++,Ze=J.next()){Ee.index>$e?(Fe=Ee,Ee=null):Fe=Ee.sibling;var lc=ae(K,Ee,Ze.value,de);if(lc===null){Ee===null&&(Ee=Fe);break}a&&Ee&&lc.alternate===null&&n(K,Ee),$=g(lc,$,$e),Xe===null?Me=lc:Xe.sibling=lc,Xe=lc,Ee=Fe}if(Ze.done)return l(K,Ee),Ge&&Ks(K,$e),Me;if(Ee===null){for(;!Ze.done;$e++,Ze=J.next())Ze=ue(K,Ze.value,de),Ze!==null&&($=g(Ze,$,$e),Xe===null?Me=Ze:Xe.sibling=Ze,Xe=Ze);return Ge&&Ks(K,$e),Me}for(Ee=d(Ee);!Ze.done;$e++,Ze=J.next())Ze=re(Ee,K,$e,Ze.value,de),Ze!==null&&(a&&Ze.alternate!==null&&Ee.delete(Ze.key===null?$e:Ze.key),$=g(Ze,$,$e),Xe===null?Me=Ze:Xe.sibling=Ze,Xe=Ze);return a&&Ee.forEach(function(DT){return n(K,DT)}),Ge&&Ks(K,$e),Me}function ut(K,$,J,de){if(typeof J=="object"&&J!==null&&J.type===N&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case j:e:{for(var Me=J.key;$!==null;){if($.key===Me){if(Me=J.type,Me===N){if($.tag===7){l(K,$.sibling),de=x($,J.props.children),de.return=K,K=de;break e}}else if($.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===A&&Uc(Me)===$.type){l(K,$.sibling),de=x($,J.props),Kl(de,J),de.return=K,K=de;break e}l(K,$);break}else n(K,$);$=$.sibling}J.type===N?(de=Rc(J.props.children,K.mode,de,J.key),de.return=K,K=de):(de=wo(J.type,J.key,J.props,null,K.mode,de),Kl(de,J),de.return=K,K=de)}return C(K);case S:e:{for(Me=J.key;$!==null;){if($.key===Me)if($.tag===4&&$.stateNode.containerInfo===J.containerInfo&&$.stateNode.implementation===J.implementation){l(K,$.sibling),de=x($,J.children||[]),de.return=K,K=de;break e}else{l(K,$);break}else n(K,$);$=$.sibling}de=Lm(J,K.mode,de),de.return=K,K=de}return C(K);case A:return J=Uc(J),ut(K,$,J,de)}if(se(J))return Te(K,$,J,de);if(B(J)){if(Me=B(J),typeof Me!="function")throw Error(r(150));return J=Me.call(J),Oe(K,$,J,de)}if(typeof J.then=="function")return ut(K,$,Ao(J),de);if(J.$$typeof===E)return ut(K,$,ko(K,J),de);Po(K,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,$!==null&&$.tag===6?(l(K,$.sibling),de=x($,J),de.return=K,K=de):(l(K,$),de=zm(J,K.mode,de),de.return=K,K=de),C(K)):l(K,$)}return function(K,$,J,de){try{Fl=0;var Me=ut(K,$,J,de);return zr=null,Me}catch(Ee){if(Ee===Or||Ee===Eo)throw Ee;var Xe=Pa(29,Ee,null,K.mode);return Xe.lanes=de,Xe.return=K,Xe}finally{}}}var Hc=Sb(!0),Tb=Sb(!1),Qn=!1;function Gm(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ym(a,n){a=a.updateQueue,n.updateQueue===a&&(n.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Wn(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Vn(a,n,l){var d=a.updateQueue;if(d===null)return null;
vendor: 4,680 bytes, line 48
48if(d=d.shared,(nt&2)!==0){var x=d.pending;return x===null?n.next=n:(n.next=x.next,x.next=n),d.pending=n,n=Co(a),ob(a,null,l),n}return No(a,d,n,l),Co(a)}function Gl(a,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var d=n.lanes;d&=a.pendingLanes,l|=d,n.lanes=l,ha(a,l)}}function Xm(a,n){var l=a.updateQueue,d=a.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var x=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var C={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?x=g=C:g=g.next=C,l=l.next}while(l!==null);g===null?x=g=n:g=g.next=n}else x=g=n;l={baseState:d.baseState,firstBaseUpdate:x,lastBaseUpdate:g,shared:d.shared,callbacks:d.callbacks},a.updateQueue=l;return}a=l.lastBaseUpdate,a===null?l.firstBaseUpdate=n:a.next=n,l.lastBaseUpdate=n}var Zm=!1;function Yl(){if(Zm){var a=Rr;if(a!==null)throw a}}function Xl(a,n,l,d){Zm=!1;var x=a.updateQueue;Qn=!1;var g=x.firstBaseUpdate,C=x.lastBaseUpdate,D=x.shared.pending;if(D!==null){x.shared.pending=null;var U=D,ee=U.next;U.next=null,C===null?g=ee:C.next=ee,C=U;var oe=a.alternate;oe!==null&&(oe=oe.updateQueue,D=oe.lastBaseUpdate,D!==C&&(D===null?oe.firstBaseUpdate=ee:D.next=ee,oe.lastBaseUpdate=U))}if(g!==null){var ue=x.baseState;C=0,oe=ee=U=null,D=g;do{var ae=D.lane&-536870913,re=ae!==D.lane;if(re?(Ve&ae)===ae:(d&ae)===ae){ae!==0&&ae===Mr&&(Zm=!0),oe!==null&&(oe=oe.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var Te=a,Oe=D;ae=n;var ut=l;switch(Oe.tag){case 1:if(Te=Oe.payload,typeof Te=="function"){ue=Te.call(ut,ue,ae);break e}ue=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=Oe.payload,ae=typeof Te=="function"?Te.call(ut,ue,ae):Te,ae==null)break e;ue=h({},ue,ae);break e;case 2:Qn=!0}}ae=D.callback,ae!==null&&(a.flags|=64,re&&(a.flags|=8192),re=x.callbacks,re===null?x.callbacks=[ae]:re.push(ae))}else re={lane:ae,tag:D.tag,payload:D.payload,callback:D.callback,next:null},oe===null?(ee=oe=re,U=ue):oe=oe.next=re,C|=ae;if(D=D.next,D===null){if(D=x.shared.pending,D===null)break;re=D,D=re.next,re.next=null,x.lastBaseUpdate=re,x.shared.pending=null}}while(!0);oe===null&&(U=ue),x.baseState=U,x.firstBaseUpdate=ee,x.lastBaseUpdate=oe,g===null&&(x.shared.lanes=0),Xn|=C,a.lanes=C,a.memoizedState=ue}}function kb(a,n){if(typeof a!="function")throw Error(r(191,a));a.call(n)}function Db(a,n){var l=a.callbacks;if(l!==null)for(a.callbacks=null,a=0;a<l.length;a++)kb(l[a],n)}var Lr=O(null),Mo=O(0);function Eb(a,n){a=cn,Y(Mo,a),Y(Lr,n),cn=a|n.baseLanes}function Jm(){Y(Mo,cn),Y(Lr,Lr.current)}function ep(){cn=Mo.current,te(Lr),te(Mo)}var Ma=O(null),Xa=null;function Fn(a){var n=a.alternate;Y(Tt,Tt.current&1),Y(Ma,a),Xa===null&&(n===null||Lr.current!==null||n.memoizedState!==null)&&(Xa=a)}function tp(a){Y(Tt,Tt.current),Y(Ma,a),Xa===null&&(Xa=a)}function _b(a){a.tag===22?(Y(Tt,Tt.current),Y(Ma,a),Xa===null&&(Xa=a)):Kn()}function Kn(){Y(Tt,Tt.current),Y(Ma,Ma.current)}function Ra(a){te(Ma),Xa===a&&(Xa=null),te(Tt)}var Tt=O(0);function Ro(a){for(var n=a;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||lx(l)||ix(l)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break;for(;n.sibling===null;){if(n.return===null||n.return===a)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Xs=0,Ie=null,ot=null,Mt=null,Oo=!1,Br=!1,$c=!1,zo=0,Zl=0,Ur=null,b5=0;function Nt(){throw Error(r(321))}function ap(a,n){if(n===null)return!1;for(var l=0;l<n.length&&l<a.length;l++)if(!Aa(a[l],n[l]))return!1;return!0}function sp(a,n,l,d,x,g){return Xs=g,Ie=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,L.H=a===null||a.memoizedState===null?p0:bp,$c=!1,g=l(d,x),$c=!1,Br&&(g=Pb(n,l,d,x)),Ab(a),g}function Ab(a){L.H=ti;var n=ot!==null&&ot.next!==null;if(Xs=0,Mt=ot=Ie=null,Oo=!1,Zl=0,Ur=null,n)throw Error(r(300));a===null||Rt||(a=a.dependencies,a!==null&&To(a)&&(Rt=!0))}function Pb(a,n,l,d){Ie=a;var x=0;do{if(Br&&(Ur=null),Zl=0,Br=!1,25<=x)throw Error(r(301));if(x+=1,Mt=ot=null,a.updateQueue!=null){var g=a.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}L.H=x0,g=n(l,d)}while(Br);return g}function v5(){var a=L.H,n=a.useState()[0];return n=typeof n.then=="function"?Jl(n):n,a=a.useState()[0],(ot!==null?ot.memoizedState:null)!==a&&(Ie.flags|=1024),n}function np(){var a=zo!==0;return zo=0,a}function cp(a,n,l){n.updateQueue=a.updateQueue,n.flags&=-2053,a.lanes&=~l}
vendor: 20,114 bytes, line 48
48function rp(a){if(Oo){for(a=a.memoizedState;a!==null;){var n=a.queue;n!==null&&(n.pending=null),a=a.next}Oo=!1}Xs=0,Mt=ot=Ie=null,Br=!1,Zl=zo=0,Ur=null}function ma(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?Ie.memoizedState=Mt=a:Mt=Mt.next=a,Mt}function kt(){if(ot===null){var a=Ie.alternate;a=a!==null?a.memoizedState:null}else a=ot.next;var n=Mt===null?Ie.memoizedState:Mt.next;if(n!==null)Mt=n,ot=a;else{if(a===null)throw Ie.alternate===null?Error(r(467)):Error(r(310));ot=a,a={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},Mt===null?Ie.memoizedState=Mt=a:Mt=Mt.next=a}return Mt}function Lo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Jl(a){var n=Zl;return Zl+=1,Ur===null&&(Ur=[]),a=Nb(Ur,a,n),n=Ie,(Mt===null?n.memoizedState:Mt.next)===null&&(n=n.alternate,L.H=n===null||n.memoizedState===null?p0:bp),a}function Bo(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Jl(a);if(a.$$typeof===E)return Yt(a)}throw Error(r(438,String(a)))}function lp(a){var n=null,l=Ie.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var d=Ie.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(n={data:d.data.map(function(x){return x.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=Lo(),Ie.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(a),d=0;d<a;d++)l[d]=H;return n.index++,l}function Zs(a,n){return typeof n=="function"?n(a):n}function Uo(a){var n=kt();return ip(n,ot,a)}function ip(a,n,l){var d=a.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=l;var x=a.baseQueue,g=d.pending;if(g!==null){if(x!==null){var C=x.next;x.next=g.next,g.next=C}n.baseQueue=x=g,d.pending=null}if(g=a.baseState,x===null)a.memoizedState=g;else{n=x.next;var D=C=null,U=null,ee=n,oe=!1;do{var ue=ee.lane&-536870913;if(ue!==ee.lane?(Ve&ue)===ue:(Xs&ue)===ue){var ae=ee.revertLane;if(ae===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),ue===Mr&&(oe=!0);else if((Xs&ae)===ae){ee=ee.next,ae===Mr&&(oe=!0);continue}else ue={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},U===null?(D=U=ue,C=g):U=U.next=ue,Ie.lanes|=ae,Xn|=ae;ue=ee.action,$c&&l(g,ue),g=ee.hasEagerState?ee.eagerState:l(g,ue)}else ae={lane:ue,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},U===null?(D=U=ae,C=g):U=U.next=ae,Ie.lanes|=ue,Xn|=ue;ee=ee.next}while(ee!==null&&ee!==n);if(U===null?C=g:U.next=D,!Aa(g,a.memoizedState)&&(Rt=!0,oe&&(l=Rr,l!==null)))throw l;a.memoizedState=g,a.baseState=C,a.baseQueue=U,d.lastRenderedState=g}return x===null&&(d.lanes=0),[a.memoizedState,d.dispatch]}function op(a){var n=kt(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var d=l.dispatch,x=l.pending,g=n.memoizedState;if(x!==null){l.pending=null;var C=x=x.next;do g=a(g,C.action),C=C.next;while(C!==x);Aa(g,n.memoizedState)||(Rt=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),l.lastRenderedState=g}return[g,d]}function Mb(a,n,l){var d=Ie,x=kt(),g=Ge;if(g){if(l===void 0)throw Error(r(407));l=l()}else l=n();var C=!Aa((ot||x).memoizedState,l);if(C&&(x.memoizedState=l,Rt=!0),x=x.queue,mp(zb.bind(null,d,x,a),[a]),x.getSnapshot!==n||C||Mt!==null&&Mt.memoizedState.tag&1){if(d.flags|=2048,Ir(9,{destroy:void 0},Ob.bind(null,d,x,l,n),null),mt===null)throw Error(r(349));g||(Xs&127)!==0||Rb(d,n,l)}return l}function Rb(a,n,l){a.flags|=16384,a={getSnapshot:n,value:l},n=Ie.updateQueue,n===null?(n=Lo(),Ie.updateQueue=n,n.stores=[a]):(l=n.stores,l===null?n.stores=[a]:l.push(a))}function Ob(a,n,l,d){n.value=l,n.getSnapshot=d,Lb(n)&&Bb(a)}function zb(a,n,l){return l(function(){Lb(n)&&Bb(a)})}function Lb(a){var n=a.getSnapshot;a=a.value;try{var l=n();return!Aa(a,l)}catch{return!0}}function Bb(a){var n=Mc(a,2);n!==null&&Sa(n,a,2)}function dp(a){var n=ma();if(typeof a=="function"){var l=a;if(a=l(),$c){is(!0);try{l()}finally{is(!1)}}}return n.memoizedState=n.baseState=a,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zs,lastRenderedState:a},n}function Ub(a,n,l,d){return a.baseState=l,ip(a,ot,typeof d=="function"?d:Zs)}function y5(a,n,l,d,x){if($o(a))throw Error(r(485));if(a=n.action,a!==null){var g={payload:x,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){g.listeners.push(C)}};L.T!==null?l(!0):g.isTransition=!1,d(g),l=n.pending,l===null?(g.next=n.pending=g,Ib(n,g)):(g.next=l.next,n.pending=l.next=g)}}function Ib(a,n){var l=n.action,d=n.payload,x=a.state;if(n.isTransition){var g=L.T,C={};L.T=C;try{var D=l(x,d),U=L.S;U!==null&&U(C,D),Hb(a,n,D)}catch(ee){up(a,n,ee)}finally{g!==null&&C.types!==null&&(g.types=C.types),L.T=g}}else try{g=l(x,d),Hb(a,n,g)}catch(ee){up(a,n,ee)}}function Hb(a,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(d){$b(a,n,d)},function(d){return up(a,n,d)}):$b(a,n,l)}function $b(a,n,l){n.status="fulfilled",n.value=l,qb(n),a.state=l,n=a.pending,n!==null&&(l=n.next,l===n?a.pending=null:(l=l.next,n.next=l,Ib(a,l)))}function up(a,n,l){var d=a.pending;if(a.pending=null,d!==null){d=d.next;do n.status="rejected",n.reason=l,qb(n),n=n.next;while(n!==d)}a.action=null}function qb(a){a=a.listeners;for(var n=0;n<a.length;n++)(0,a[n])()}function Qb(a,n){return n}function Wb(a,n){if(Ge){var l=mt.formState;if(l!==null){e:{var d=Ie;if(Ge){if(ft){t:{for(var x=ft,g=Ya;x.nodeType!==8;){if(!g){x=null;break t}if(x=Za(x.nextSibling),x===null){x=null;break t}}g=x.data,x=g==="F!"||g==="F"?x:null}if(x){ft=Za(x.nextSibling),d=x.data==="F!";break e}}$n(d)}d=!1}d&&(n=l[0])}}return l=ma(),l.memoizedState=l.baseState=n,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qb,lastRenderedState:n},l.queue=d,l=d0.bind(null,Ie,d),d.dispatch=l,d=dp(!1),g=hp.bind(null,Ie,!1,d.queue),d=ma(),x={state:n,dispatch:null,action:a,pending:null},d.queue=x,l=y5.bind(null,Ie,x,g,l),x.dispatch=l,d.memoizedState=a,[n,l,!1]}function Vb(a){var n=kt();return Fb(n,ot,a)}function Fb(a,n,l){if(n=ip(a,n,Qb)[0],a=Uo(Zs)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var d=Jl(n)}catch(C){throw C===Or?Eo:C}else d=n;n=kt();var x=n.queue,g=x.dispatch;return l!==n.memoizedState&&(Ie.flags|=2048,Ir(9,{destroy:void 0},j5.bind(null,x,l),null)),[d,g,a]}function j5(a,n){a.action=n}function Kb(a){var n=kt(),l=ot;if(l!==null)return Fb(n,l,a);kt(),n=n.memoizedState,l=kt();var d=l.queue.dispatch;return l.memoizedState=a,[n,d,!1]}function Ir(a,n,l,d){return a={tag:a,create:l,deps:d,inst:n,next:null},n=Ie.updateQueue,n===null&&(n=Lo(),Ie.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=a.next=a:(d=l.next,l.next=a,a.next=d,n.lastEffect=a),a}function Gb(){return kt().memoizedState}function Io(a,n,l,d){var x=ma();Ie.flags|=a,x.memoizedState=Ir(1|n,{destroy:void 0},l,d===void 0?null:d)}function Ho(a,n,l,d){var x=kt();d=d===void 0?null:d;var g=x.memoizedState.inst;ot!==null&&d!==null&&ap(d,ot.memoizedState.deps)?x.memoizedState=Ir(n,g,l,d):(Ie.flags|=a,x.memoizedState=Ir(1|n,g,l,d))}function Yb(a,n){Io(8390656,8,a,n)}function mp(a,n){Ho(2048,8,a,n)}function N5(a){Ie.flags|=4;var n=Ie.updateQueue;if(n===null)n=Lo(),Ie.updateQueue=n,n.events=[a];else{var l=n.events;l===null?n.events=[a]:l.push(a)}}function Xb(a){var n=kt().memoizedState;return N5({ref:n,nextImpl:a}),function(){if((nt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Zb(a,n){return Ho(4,2,a,n)}function Jb(a,n){return Ho(4,4,a,n)}function e0(a,n){if(typeof n=="function"){a=a();var l=n(a);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return a=a(),n.current=a,function(){n.current=null}}function t0(a,n,l){l=l!=null?l.concat([a]):null,Ho(4,4,e0.bind(null,n,a),l)}function pp(){}function a0(a,n){var l=kt();n=n===void 0?null:n;var d=l.memoizedState;return n!==null&&ap(n,d[1])?d[0]:(l.memoizedState=[a,n],a)}function s0(a,n){var l=kt();n=n===void 0?null:n;var d=l.memoizedState;if(n!==null&&ap(n,d[1]))return d[0];if(d=a(),$c){is(!0);try{a()}finally{is(!1)}}return l.memoizedState=[d,n],d}function xp(a,n,l){return l===void 0||(Xs&1073741824)!==0&&(Ve&261930)===0?a.memoizedState=n:(a.memoizedState=l,a=nv(),Ie.lanes|=a,Xn|=a,l)}function n0(a,n,l,d){return Aa(l,n)?l:Lr.current!==null?(a=xp(a,l,d),Aa(a,n)||(Rt=!0),a):(Xs&42)===0||(Xs&1073741824)!==0&&(Ve&261930)===0?(Rt=!0,a.memoizedState=l):(a=nv(),Ie.lanes|=a,Xn|=a,n)}function c0(a,n,l,d,x){var g=F.p;F.p=g!==0&&8>g?g:8;var C=L.T,D={};L.T=D,hp(a,!1,n,l);try{var U=x(),ee=L.S;if(ee!==null&&ee(D,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var oe=h5(U,d);ei(a,n,oe,La(a))}else ei(a,n,d,La(a))}catch(ue){ei(a,n,{then:function(){},status:"rejected",reason:ue},La())}finally{F.p=g,C!==null&&D.types!==null&&(C.types=D.types),L.T=C}}function C5(){}function fp(a,n,l,d){if(a.tag!==5)throw Error(r(476));var x=r0(a).queue;c0(a,x,n,W,l===null?C5:function(){return l0(a),l(d)})}function r0(a){var n=a.memoizedState;if(n!==null)return n;n={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zs,lastRenderedState:W},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zs,lastRenderedState:l},next:null},a.memoizedState=n,a=a.alternate,a!==null&&(a.memoizedState=n),n}function l0(a){var n=r0(a);n.next===null&&(n=a.alternate.memoizedState),ei(a,n.next.queue,{},La())}function gp(){return Yt(hi)}function i0(){return kt().memoizedState}function o0(){return kt().memoizedState}function w5(a){for(var n=a.return;n!==null;){switch(n.tag){case 24:case 3:var l=La();a=Wn(l);var d=Vn(n,a,l);d!==null&&(Sa(d,n,l),Gl(d,n,l)),n={cache:Wm()},a.payload=n;return}n=n.return}}function S5(a,n,l){var d=La();l={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},$o(a)?u0(n,l):(l=Rm(a,n,l,d),l!==null&&(Sa(l,a,d),m0(l,n,d)))}function d0(a,n,l){var d=La();ei(a,n,l,d)}function ei(a,n,l,d){var x={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if($o(a))u0(n,x);else{var g=a.alternate;if(a.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var C=n.lastRenderedState,D=g(C,l);if(x.hasEagerState=!0,x.eagerState=D,Aa(D,C))return No(a,n,x,0),mt===null&&jo(),!1}catch{}finally{}if(l=Rm(a,n,x,d),l!==null)return Sa(l,a,d),m0(l,n,d),!0}return!1}function hp(a,n,l,d){if(d={lane:2,revertLane:Gp(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},$o(a)){if(n)throw Error(r(479))}else n=Rm(a,l,d,2),n!==null&&Sa(n,a,2)}function $o(a){var n=a.alternate;return a===Ie||n!==null&&n===Ie}function u0(a,n){Br=Oo=!0;var l=a.pending;l===null?n.next=n:(n.next=l.next,l.next=n),a.pending=n}function m0(a,n,l){if((l&4194048)!==0){var d=n.lanes;d&=a.pendingLanes,l|=d,n.lanes=l,ha(a,l)}}var ti={readContext:Yt,use:Bo,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};ti.useEffectEvent=Nt;var p0={readContext:Yt,use:Bo,useCallback:function(a,n){return ma().memoizedState=[a,n===void 0?null:n],a},useContext:Yt,useEffect:Yb,useImperativeHandle:function(a,n,l){l=l!=null?l.concat([a]):null,Io(4194308,4,e0.bind(null,n,a),l)},useLayoutEffect:function(a,n){return Io(4194308,4,a,n)},useInsertionEffect:function(a,n){Io(4,2,a,n)},useMemo:function(a,n){var l=ma();n=n===void 0?null:n;var d=a();if($c){is(!0);try{a()}finally{is(!1)}}return l.memoizedState=[d,n],d},useReducer:function(a,n,l){var d=ma();if(l!==void 0){var x=l(n);if($c){is(!0);try{l(n)}finally{is(!1)}}}else x=n;return d.memoizedState=d.baseState=x,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:x},d.queue=a,a=a.dispatch=S5.bind(null,Ie,a),[d.memoizedState,a]},useRef:function(a){var n=ma();return a={current:a},n.memoizedState=a},useState:function(a){a=dp(a);var n=a.queue,l=d0.bind(null,Ie,n);return n.dispatch=l,[a.memoizedState,l]},useDebugValue:pp,useDeferredValue:function(a,n){var l=ma();return xp(l,a,n)},useTransition:function(){var a=dp(!1);return a=c0.bind(null,Ie,a.queue,!0,!1),ma().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,n,l){var d=Ie,x=ma();if(Ge){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),mt===null)throw Error(r(349));(Ve&127)!==0||Rb(d,n,l)}x.memoizedState=l;var g={value:l,getSnapshot:n};return x.queue=g,Yb(zb.bind(null,d,g,a),[a]),d.flags|=2048,Ir(9,{destroy:void 0},Ob.bind(null,d,g,l,n),null),l},useId:function(){var a=ma(),n=mt.identifierPrefix;if(Ge){var l=ks,d=Ts;l=(d&~(1<<32-ra(d)-1)).toString(32)+l,n="_"+n+"R_"+l,l=zo++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=b5++,n="_"+n+"r_"+l.toString(32)+"_";return a.memoizedState=n},useHostTransitionStatus:gp,useFormState:Wb,useActionState:Wb,useOptimistic:function(a){var n=ma();n.memoizedState=n.baseState=a;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=hp.bind(null,Ie,!0,l),l.dispatch=n,[a,n]},useMemoCache:lp,useCacheRefresh:function(){return ma().memoizedState=w5.bind(null,Ie)},useEffectEvent:function(a){var n=ma(),l={impl:a};return n.memoizedState=l,function(){if((nt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},bp={readContext:Yt,use:Bo,useCallback:a0,useContext:Yt,useEffect:mp,useImperativeHandle:t0,useInsertionEffect:Zb,useLayoutEffect:Jb,useMemo:s0,useReducer:Uo,useRef:Gb,useState:function(){return Uo(Zs)},useDebugValue:pp,useDeferredValue:function(a,n){var l=kt();return n0(l,ot.memoizedState,a,n)},useTransition:function(){var a=Uo(Zs)[0],n=kt().memoizedState;return[typeof a=="boolean"?a:Jl(a),n]},useSyncExternalStore:Mb,useId:i0,useHostTransitionStatus:gp,useFormState:Vb,useActionState:Vb,useOptimistic:function(a,n){var l=kt();return Ub(l,ot,a,n)},useMemoCache:lp,useCacheRefresh:o0};bp.useEffectEvent=Xb;var x0={readContext:Yt,use:Bo,useCallback:a0,useContext:Yt,useEffect:mp,useImperativeHandle:t0,useInsertionEffect:Zb,useLayoutEffect:Jb,useMemo:s0,useReducer:op,useRef:Gb,useState:function(){return op(Zs)},useDebugValue:pp,useDeferredValue:function(a,n){var l=kt();return ot===null?xp(l,a,n):n0(l,ot.memoizedState,a,n)},useTransition:function(){var a=op(Zs)[0],n=kt().memoizedState;return[typeof a=="boolean"?a:Jl(a),n]},useSyncExternalStore:Mb,useId:i0,useHostTransitionStatus:gp,useFormState:Kb,useActionState:Kb,useOptimistic:function(a,n){var l=kt();return ot!==null?Ub(l,ot,a,n):(l.baseState=a,[a,l.queue.dispatch])},useMemoCache:lp,useCacheRefresh:o0};x0.useEffectEvent=Xb;function vp(a,n,l,d){n=a.memoizedState,l=l(d,n),l=l==null?n:h({},n,l),a.memoizedState=l,a.lanes===0&&(a.updateQueue.baseState=l)}var yp={enqueueSetState:function(a,n,l){a=a._reactInternals;var d=La(),x=Wn(d);x.payload=n,l!=null&&(x.callback=l),n=Vn(a,x,d),n!==null&&(Sa(n,a,d),Gl(n,a,d))},enqueueReplaceState:function(a,n,l){a=a._reactInternals;var d=La(),x=Wn(d);x.tag=1,x.payload=n,l!=null&&(x.callback=l),n=Vn(a,x,d),n!==null&&(Sa(n,a,d),Gl(n,a,d))},enqueueForceUpdate:function(a,n){a=a._reactInternals;var l=La(),d=Wn(l);d.tag=2,n!=null&&(d.callback=n),n=Vn(a,d,l),n!==null&&(Sa(n,a,l),Gl(n,a,l))}};function f0(a,n,l,d,x,g,C){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(d,g,C):n.prototype&&n.prototype.isPureReactComponent?!Hl(l,d)||!Hl(x,g):!0}function g0(a,n,l,d){a=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,d),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,d),n.state!==a&&yp.enqueueReplaceState(n,n.state,null)}function qc(a,n){var l=n;if("ref"in n){l={};for(var d in n)d!=="ref"&&(l[d]=n[d])}if(a=a.defaultProps){l===n&&(l=h({},l));for(var x in a)l[x]===void 0&&(l[x]=a[x])}return l}function h0(a){yo(a)}function b0(a){console.error(a)}function v0(a){yo(a)}function qo(a,n){try{var l=a.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(d){setTimeout(function(){throw d})}}function y0(a,n,l){try{var d=a.onCaughtError;d(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function jp(a,n,l){return l=Wn(l),l.tag=3,l.payload={element:null},l.callback=function(){qo(a,n)},l}function j0(a){return a=Wn(a),a.tag=3,a}function N0(a,n,l,d){var x=l.type.getDerivedStateFromError;if(typeof x=="function"){var g=d.value;a.payload=function(){return x(g)},a.callback=function(){y0(n,l,d)}}var C=l.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(a.callback=function(){y0(n,l,d),typeof x!="function"&&(Zn===null?Zn=new Set([this]):Zn.add(this));var D=d.stack;this.componentDidCatch(d.value,{componentStack:D!==null?D:""})})}function T5(a,n,l,d,x){if(l.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(n=l.alternate,n!==null&&Pr(n,l,x,!0),l=Ma.current,l!==null){switch(l.tag){case 31:case 13:return Xa===null?td():l.alternate===null&&Ct===0&&(Ct=3),l.flags&=-257,l.flags|=65536,l.lanes=x,d===_o?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([d]):n.add(d),Vp(a,d,x)),!1;case 22:return l.flags|=65536,d===_o?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([d])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([d]):l.add(d)),Vp(a,d,x)),!1}throw Error(r(435,l.tag))}return Vp(a,d,x),td(),!1}if(Ge)return n=Ma.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=x,d!==Im&&(a=Error(r(422),{cause:d}),Ql(Fa(a,l)))):(d!==Im&&(n=Error(r(423),{cause:d}),Ql(Fa(n,l))),a=a.current.alternate,a.flags|=65536,x&=-x,a.lanes|=x,d=Fa(d,l),x=jp(a.stateNode,d,x),Xm(a,x),Ct!==4&&(Ct=2)),!1;var g=Error(r(520),{cause:d});if(g=Fa(g,l),oi===null?oi=[g]:oi.push(g),Ct!==4&&(Ct=2),n===null)return!0;d=Fa(d,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,a=x&-x,l.lanes|=a,a=jp(l.stateNode,d,a),Xm(l,a),!1;case 1:if(n=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Zn===null||!Zn.has(g))))return l.flags|=65536,x&=-x,l.lanes|=x,x=j0(x),N0(x,a,l,d),Xm(l,x),!1}l=l.return}while(l!==null);return!1}var Np=Error(r(461)),Rt=!1;function Xt(a,n,l,d){n.child=a===null?Tb(n,null,l,d):Hc(n,a.child,l,d)}function C0(a,n,l,d,x){l=l.render;var g=n.ref;if("ref"in d){var C={};for(var D in d)D!=="ref"&&(C[D]=d[D])}else C=d;return Lc(n),d=sp(a,n,l,C,g,x),D=np(),a!==null&&!Rt?(cp(a,n,x),Js(a,n,x)):(Ge&&D&&Bm(n),n.flags|=1,Xt(a,n,d,x),n.child)}function w0(a,n,l,d,x){if(a===null){var g=l.type;return typeof g=="function"&&!Om(g)&&g.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=g,S0(a,n,g,d,x)):(a=wo(l.type,null,d,n,n.mode,x),a.ref=n.ref,a.return=n,n.child=a)}if(g=a.child,!_p(a,x)){var C=g.memoizedProps;if(l=l.compare,l=l!==null?l:Hl,l(C,d)&&a.ref===n.ref)return Js(a,n,x)}return n.flags|=1,a=Fs(g,d),a.ref=n.ref,a.return=n,n.child=a}function S0(a,n,l,d,x){if(a!==null){var g=a.memoizedProps;if(Hl(g,d)&&a.ref===n.ref)if(Rt=!1,n.pendingProps=d=g,_p(a,x))(a.flags&131072)!==0&&(Rt=!0);else return n.lanes=a.lanes,Js(a,n,x)}return Cp(a,n,l,d,x)}function T0(a,n,l,d){var x=d.children,g=a!==null?a.memoizedState:null;if(a===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|l:l,a!==null){for(d=n.child=a.child,x=0;d!==null;)x=x|d.lanes|d.childLanes,d=d.sibling;d=x&~g}else d=0,n.child=null;return k0(a,n,g,l,d)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},a!==null&&Do(n,g!==null?g.cachePool:null),g!==null?Eb(n,g):Jm(),_b(n);else return d=n.lanes=536870912,k0(a,n,g!==null?g.baseLanes|l:l,l,d)}
vendor: 8,501 bytes, line 48
48else g!==null?(Do(n,g.cachePool),Eb(n,g),Kn(),n.memoizedState=null):(a!==null&&Do(n,null),Jm(),Kn());return Xt(a,n,x,l),n.child}function ai(a,n){return a!==null&&a.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function k0(a,n,l,d,x){var g=Fm();return g=g===null?null:{parent:Pt._currentValue,pool:g},n.memoizedState={baseLanes:l,cachePool:g},a!==null&&Do(n,null),Jm(),_b(n),a!==null&&Pr(a,n,d,!0),n.childLanes=x,null}function Qo(a,n){return n=Vo({mode:n.mode,children:n.children},a.mode),n.ref=a.ref,a.child=n,n.return=a,n}function D0(a,n,l){return Hc(n,a.child,null,l),a=Qo(n,n.pendingProps),a.flags|=2,Ra(n),n.memoizedState=null,a}function k5(a,n,l){var d=n.pendingProps,x=(n.flags&128)!==0;if(n.flags&=-129,a===null){if(Ge){if(d.mode==="hidden")return a=Qo(n,d),n.lanes=536870912,ai(null,a);if(tp(n),(a=ft)?(a=Iv(a,Ya),a=a!==null&&a.data==="&"?a:null,a!==null&&(n.memoizedState={dehydrated:a,treeContext:In!==null?{id:Ts,overflow:ks}:null,retryLane:536870912,hydrationErrors:null},l=ub(a),l.return=n,n.child=l,Gt=n,ft=null)):a=null,a===null)throw $n(n);return n.lanes=536870912,null}return Qo(n,d)}var g=a.memoizedState;if(g!==null){var C=g.dehydrated;if(tp(n),x)if(n.flags&256)n.flags&=-257,n=D0(a,n,l);else if(n.memoizedState!==null)n.child=a.child,n.flags|=128,n=null;else throw Error(r(558));else if(Rt||Pr(a,n,l,!1),x=(l&a.childLanes)!==0,Rt||x){if(d=mt,d!==null&&(C=ba(d,l),C!==0&&C!==g.retryLane))throw g.retryLane=C,Mc(a,C),Sa(d,a,C),Np;td(),n=D0(a,n,l)}else a=g.treeContext,ft=Za(C.nextSibling),Gt=n,Ge=!0,Hn=null,Ya=!1,a!==null&&xb(n,a),n=Qo(n,d),n.flags|=4096;return n}return a=Fs(a.child,{mode:d.mode,children:d.children}),a.ref=n.ref,n.child=a,a.return=n,a}function Wo(a,n){var l=n.ref;if(l===null)a!==null&&a.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(a===null||a.ref!==l)&&(n.flags|=4194816)}}function Cp(a,n,l,d,x){return Lc(n),l=sp(a,n,l,d,void 0,x),d=np(),a!==null&&!Rt?(cp(a,n,x),Js(a,n,x)):(Ge&&d&&Bm(n),n.flags|=1,Xt(a,n,l,x),n.child)}function E0(a,n,l,d,x,g){return Lc(n),n.updateQueue=null,l=Pb(n,d,l,x),Ab(a),d=np(),a!==null&&!Rt?(cp(a,n,g),Js(a,n,g)):(Ge&&d&&Bm(n),n.flags|=1,Xt(a,n,l,g),n.child)}function _0(a,n,l,d,x){if(Lc(n),n.stateNode===null){var g=Dr,C=l.contextType;typeof C=="object"&&C!==null&&(g=Yt(C)),g=new l(d,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=yp,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=d,g.state=n.memoizedState,g.refs={},Gm(n),C=l.contextType,g.context=typeof C=="object"&&C!==null?Yt(C):Dr,g.state=n.memoizedState,C=l.getDerivedStateFromProps,typeof C=="function"&&(vp(n,l,C,d),g.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(C=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),C!==g.state&&yp.enqueueReplaceState(g,g.state,null),Xl(n,d,g,x),Yl(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),d=!0}else if(a===null){g=n.stateNode;var D=n.memoizedProps,U=qc(l,D);g.props=U;var ee=g.context,oe=l.contextType;C=Dr,typeof oe=="object"&&oe!==null&&(C=Yt(oe));var ue=l.getDerivedStateFromProps;oe=typeof ue=="function"||typeof g.getSnapshotBeforeUpdate=="function",D=n.pendingProps!==D,oe||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(D||ee!==C)&&g0(n,g,d,C),Qn=!1;var ae=n.memoizedState;g.state=ae,Xl(n,d,g,x),Yl(),ee=n.memoizedState,D||ae!==ee||Qn?(typeof ue=="function"&&(vp(n,l,ue,d),ee=n.memoizedState),(U=Qn||f0(n,l,U,d,ae,ee,C))?(oe||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=d,n.memoizedState=ee),g.props=d,g.state=ee,g.context=C,d=U):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),d=!1)}else{g=n.stateNode,Ym(a,n),C=n.memoizedProps,oe=qc(l,C),g.props=oe,ue=n.pendingProps,ae=g.context,ee=l.contextType,U=Dr,typeof ee=="object"&&ee!==null&&(U=Yt(ee)),D=l.getDerivedStateFromProps,(ee=typeof D=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(C!==ue||ae!==U)&&g0(n,g,d,U),Qn=!1,ae=n.memoizedState,g.state=ae,Xl(n,d,g,x),Yl();var re=n.memoizedState;C!==ue||ae!==re||Qn||a!==null&&a.dependencies!==null&&To(a.dependencies)?(typeof D=="function"&&(vp(n,l,D,d),re=n.memoizedState),(oe=Qn||f0(n,l,oe,d,ae,re,U)||a!==null&&a.dependencies!==null&&To(a.dependencies))?(ee||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(d,re,U),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(d,re,U)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||C===a.memoizedProps&&ae===a.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||C===a.memoizedProps&&ae===a.memoizedState||(n.flags|=1024),n.memoizedProps=d,n.memoizedState=re),g.props=d,g.state=re,g.context=U,d=oe):(typeof g.componentDidUpdate!="function"||C===a.memoizedProps&&ae===a.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||C===a.memoizedProps&&ae===a.memoizedState||(n.flags|=1024),d=!1)}return g=d,Wo(a,n),d=(n.flags&128)!==0,g||d?(g=n.stateNode,l=d&&typeof l.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,a!==null&&d?(n.child=Hc(n,a.child,null,x),n.child=Hc(n,null,l,x)):Xt(a,n,l,x),n.memoizedState=g.state,a=n.child):a=Js(a,n,x),a}function A0(a,n,l,d){return Oc(),n.flags|=256,Xt(a,n,l,d),n.child}var wp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sp(a){return{baseLanes:a,cachePool:yb()}}function Tp(a,n,l){return a=a!==null?a.childLanes&~l:0,n&&(a|=za),a}function P0(a,n,l){var d=n.pendingProps,x=!1,g=(n.flags&128)!==0,C;if((C=g)||(C=a!==null&&a.memoizedState===null?!1:(Tt.current&2)!==0),C&&(x=!0,n.flags&=-129),C=(n.flags&32)!==0,n.flags&=-33,a===null){if(Ge){if(x?Fn(n):Kn(),(a=ft)?(a=Iv(a,Ya),a=a!==null&&a.data!=="&"?a:null,a!==null&&(n.memoizedState={dehydrated:a,treeContext:In!==null?{id:Ts,overflow:ks}:null,retryLane:536870912,hydrationErrors:null},l=ub(a),l.return=n,n.child=l,Gt=n,ft=null)):a=null,a===null)throw $n(n);return ix(a)?n.lanes=32:n.lanes=536870912,null}var D=d.children;return d=d.fallback,x?(Kn(),x=n.mode,D=Vo({mode:"hidden",children:D},x),d=Rc(d,x,l,null),D.return=n,d.return=n,D.sibling=d,n.child=D,d=n.child,d.memoizedState=Sp(l),d.childLanes=Tp(a,C,l),n.memoizedState=wp,ai(null,d)):(Fn(n),kp(n,D))}var U=a.memoizedState;if(U!==null&&(D=U.dehydrated,D!==null)){if(g)n.flags&256?(Fn(n),n.flags&=-257,n=Dp(a,n,l)):n.memoizedState!==null?(Kn(),n.child=a.child,n.flags|=128,n=null):(Kn(),D=d.fallback,x=n.mode,d=Vo({mode:"visible",children:d.children},x),D=Rc(D,x,l,null),D.flags|=2,d.return=n,D.return=n,d.sibling=D,n.child=d,Hc(n,a.child,null,l),d=n.child,d.memoizedState=Sp(l),d.childLanes=Tp(a,C,l),n.memoizedState=wp,n=ai(null,d));else if(Fn(n),ix(D)){if(C=D.nextSibling&&D.nextSibling.dataset,C)var ee=C.dgst;C=ee,d=Error(r(419)),d.stack="",d.digest=C,Ql({value:d,source:null,stack:null}),n=Dp(a,n,l)}else if(Rt||Pr(a,n,l,!1),C=(l&a.childLanes)!==0,Rt||C){if(C=mt,C!==null&&(d=ba(C,l),d!==0&&d!==U.retryLane))throw U.retryLane=d,Mc(a,d),Sa(C,a,d),Np;lx(D)||td(),n=Dp(a,n,l)}else lx(D)?(n.flags|=192,n.child=a.child,n=null):(a=U.treeContext,ft=Za(D.nextSibling),Gt=n,Ge=!0,Hn=null,Ya=!1,a!==null&&xb(n,a),n=kp(n,d.children),n.flags|=4096);return n}return x?(Kn(),D=d.fallback,x=n.mode,U=a.child,ee=U.sibling,d=Fs(U,{mode:"hidden",children:d.children}),d.subtreeFlags=U.subtreeFlags&65011712,ee!==null?D=Fs(ee,D):(D=Rc(D,x,l,null),D.flags|=2),D.return=n,d.return=n,d.sibling=D,n.child=d,ai(null,d),d=n.child,D=a.child.memoizedState,D===null?D=Sp(l):(x=D.cachePool,x!==null?(U=Pt._currentValue,x=x.parent!==U?{parent:U,pool:U}
vendor: 5,132 bytes, line 48
48:x):x=yb(),D={baseLanes:D.baseLanes|l,cachePool:x}),d.memoizedState=D,d.childLanes=Tp(a,C,l),n.memoizedState=wp,ai(a.child,d)):(Fn(n),l=a.child,a=l.sibling,l=Fs(l,{mode:"visible",children:d.children}),l.return=n,l.sibling=null,a!==null&&(C=n.deletions,C===null?(n.deletions=[a],n.flags|=16):C.push(a)),n.child=l,n.memoizedState=null,l)}function kp(a,n){return n=Vo({mode:"visible",children:n},a.mode),n.return=a,a.child=n}function Vo(a,n){return a=Pa(22,a,null,n),a.lanes=0,a}function Dp(a,n,l){return Hc(n,a.child,null,l),a=kp(n,n.pendingProps.children),a.flags|=2,n.memoizedState=null,a}function M0(a,n,l){a.lanes|=n;var d=a.alternate;d!==null&&(d.lanes|=n),qm(a.return,n,l)}function Ep(a,n,l,d,x,g){var C=a.memoizedState;C===null?a.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:x,treeForkCount:g}:(C.isBackwards=n,C.rendering=null,C.renderingStartTime=0,C.last=d,C.tail=l,C.tailMode=x,C.treeForkCount=g)}function R0(a,n,l){var d=n.pendingProps,x=d.revealOrder,g=d.tail;d=d.children;var C=Tt.current,D=(C&2)!==0;if(D?(C=C&1|2,n.flags|=128):C&=1,Y(Tt,C),Xt(a,n,d,l),d=Ge?ql:0,!D&&a!==null&&(a.flags&128)!==0)e:for(a=n.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&M0(a,l,n);else if(a.tag===19)M0(a,l,n);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(x){case"forwards":for(l=n.child,x=null;l!==null;)a=l.alternate,a!==null&&Ro(a)===null&&(x=l),l=l.sibling;l=x,l===null?(x=n.child,n.child=null):(x=l.sibling,l.sibling=null),Ep(n,!1,x,l,g,d);break;case"backwards":case"unstable_legacy-backwards":for(l=null,x=n.child,n.child=null;x!==null;){if(a=x.alternate,a!==null&&Ro(a)===null){n.child=x;break}a=x.sibling,x.sibling=l,l=x,x=a}Ep(n,!0,l,null,g,d);break;case"together":Ep(n,!1,null,null,void 0,d);break;default:n.memoizedState=null}return n.child}function Js(a,n,l){if(a!==null&&(n.dependencies=a.dependencies),Xn|=n.lanes,(l&n.childLanes)===0)if(a!==null){if(Pr(a,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(a!==null&&n.child!==a.child)throw Error(r(153));if(n.child!==null){for(a=n.child,l=Fs(a,a.pendingProps),n.child=l,l.return=n;a.sibling!==null;)a=a.sibling,l=l.sibling=Fs(a,a.pendingProps),l.return=n;l.sibling=null}return n.child}function _p(a,n){return(a.lanes&n)!==0?!0:(a=a.dependencies,!!(a!==null&&To(a)))}function D5(a,n,l){switch(n.tag){case 3:he(n,n.stateNode.containerInfo),qn(n,Pt,a.memoizedState.cache),Oc();break;case 27:case 5:Re(n);break;case 4:he(n,n.stateNode.containerInfo);break;case 10:qn(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,tp(n),null;break;case 13:var d=n.memoizedState;if(d!==null)return d.dehydrated!==null?(Fn(n),n.flags|=128,null):(l&n.child.childLanes)!==0?P0(a,n,l):(Fn(n),a=Js(a,n,l),a!==null?a.sibling:null);Fn(n);break;case 19:var x=(a.flags&128)!==0;if(d=(l&n.childLanes)!==0,d||(Pr(a,n,l,!1),d=(l&n.childLanes)!==0),x){if(d)return R0(a,n,l);n.flags|=128}if(x=n.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),Y(Tt,Tt.current),d)break;return null;case 22:return n.lanes=0,T0(a,n,l,n.pendingProps);case 24:qn(n,Pt,a.memoizedState.cache)}return Js(a,n,l)}function O0(a,n,l){if(a!==null)if(a.memoizedProps!==n.pendingProps)Rt=!0;else{if(!_p(a,l)&&(n.flags&128)===0)return Rt=!1,D5(a,n,l);Rt=(a.flags&131072)!==0}else Rt=!1,Ge&&(n.flags&1048576)!==0&&pb(n,ql,n.index);switch(n.lanes=0,n.tag){case 16:e:{var d=n.pendingProps;if(a=Uc(n.elementType),n.type=a,typeof a=="function")Om(a)?(d=qc(a,d),n.tag=1,n=_0(null,n,a,d,l)):(n.tag=0,n=Cp(null,n,a,d,l));else{if(a!=null){var x=a.$$typeof;if(x===z){n.tag=11,n=C0(null,n,a,d,l);break e}else if(x===P){n.tag=14,n=w0(null,n,a,d,l);break e}}throw n=ie(a)||a,Error(r(306,n,""))}}return n;case 0:return Cp(a,n,n.type,n.pendingProps,l);case 1:return d=n.type,x=qc(d,n.pendingProps),_0(a,n,d,x,l);case 3:e:{if(he(n,n.stateNode.containerInfo),a===null)throw Error(r(387));d=n.pendingProps;var g=n.memoizedState;x=g.element,Ym(a,n),Xl(n,d,null,l);var C=n.memoizedState;if(d=C.cache,qn(n,Pt,d),d!==g.cache&&Qm(n,[Pt],l,!0),Yl(),d=C.element,g.isDehydrated)if(g={element:d,isDehydrated:!1,cache:C.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=A0(a,n,d,l);break e}else if(d!==x){x=Fa(Error(r(424)),n),Ql(x),n=A0(a,n,d,l);break e}else{switch(a=n.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(ft=Za(a.firstChild),Gt=n,Ge=!0,Hn=null,Ya=!0,l=Tb(n,null,d,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Oc(),d===x){n=Js(a,n,l);break e}Xt(a,n,d,l)}n=n.child}return n;case 26:return Wo(a,n),a===null?(l=Vv(n.type,null,n.pendingProps,null))?n.memoizedState=l:Ge||(l=n.type,a=n.pendingProps,d=id(be.current).createElement(l),d[Kt]=n,d[va]=a,Zt(d,l,a),Qt(d),n.stateNode=d):n.memoizedState=Vv(n.type,a.memoizedProps,n.pendingProps,a.memoizedState),null;case 27:return Re(n),a===null&&Ge&&(d=n.stateNode=qv(n.type,n.pendingProps,be.current),Gt=n,Ya=!0,x=ft,ac(n.type)?(ox=x,ft
vendor: 4,663 bytes, line 48
48=Za(d.firstChild)):ft=x),Xt(a,n,n.pendingProps.children,l),Wo(a,n),a===null&&(n.flags|=4194304),n.child;case 5:return a===null&&Ge&&((x=d=ft)&&(d=nT(d,n.type,n.pendingProps,Ya),d!==null?(n.stateNode=d,Gt=n,ft=Za(d.firstChild),Ya=!1,x=!0):x=!1),x||$n(n)),Re(n),x=n.type,g=n.pendingProps,C=a!==null?a.memoizedProps:null,d=g.children,nx(x,g)?d=null:C!==null&&nx(x,C)&&(n.flags|=32),n.memoizedState!==null&&(x=sp(a,n,v5,null,null,l),hi._currentValue=x),Wo(a,n),Xt(a,n,d,l),n.child;case 6:return a===null&&Ge&&((a=l=ft)&&(l=cT(l,n.pendingProps,Ya),l!==null?(n.stateNode=l,Gt=n,ft=null,a=!0):a=!1),a||$n(n)),null;case 13:return P0(a,n,l);case 4:return he(n,n.stateNode.containerInfo),d=n.pendingProps,a===null?n.child=Hc(n,null,d,l):Xt(a,n,d,l),n.child;case 11:return C0(a,n,n.type,n.pendingProps,l);case 7:return Xt(a,n,n.pendingProps,l),n.child;case 8:return Xt(a,n,n.pendingProps.children,l),n.child;case 12:return Xt(a,n,n.pendingProps.children,l),n.child;case 10:return d=n.pendingProps,qn(n,n.type,d.value),Xt(a,n,d.children,l),n.child;case 9:return x=n.type._context,d=n.pendingProps.children,Lc(n),x=Yt(x),d=d(x),n.flags|=1,Xt(a,n,d,l),n.child;case 14:return w0(a,n,n.type,n.pendingProps,l);case 15:return S0(a,n,n.type,n.pendingProps,l);case 19:return R0(a,n,l);case 31:return k5(a,n,l);case 22:return T0(a,n,l,n.pendingProps);case 24:return Lc(n),d=Yt(Pt),a===null?(x=Fm(),x===null&&(x=mt,g=Wm(),x.pooledCache=g,g.refCount++,g!==null&&(x.pooledCacheLanes|=l),x=g),n.memoizedState={parent:d,cache:x},Gm(n),qn(n,Pt,x)):((a.lanes&l)!==0&&(Ym(a,n),Xl(n,null,null,l),Yl()),x=a.memoizedState,g=n.memoizedState,x.parent!==d?(x={parent:d,cache:d},n.memoizedState=x,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=x),qn(n,Pt,d)):(d=g.cache,qn(n,Pt,d),d!==x.cache&&Qm(n,[Pt],l,!0))),Xt(a,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function en(a){a.flags|=4}function Ap(a,n,l,d,x){if((n=(a.mode&32)!==0)&&(n=!1),n){if(a.flags|=16777216,(x&335544128)===x)if(a.stateNode.complete)a.flags|=8192;else if(iv())a.flags|=8192;else throw Ic=_o,Km}else a.flags&=-16777217}function z0(a,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!Xv(n))if(iv())a.flags|=8192;else throw Ic=_o,Km}function Fo(a,n){n!==null&&(a.flags|=4),a.flags&16384&&(n=a.tag!==22?la():536870912,a.lanes|=n,Qr|=n)}function si(a,n){if(!Ge)switch(a.tailMode){case"hidden":n=a.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?a.tail=null:l.sibling=null;break;case"collapsed":l=a.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?n||a.tail===null?a.tail=null:a.tail.sibling=null:d.sibling=null}}function gt(a){var n=a.alternate!==null&&a.alternate.child===a.child,l=0,d=0;if(n)for(var x=a.child;x!==null;)l|=x.lanes|x.childLanes,d|=x.subtreeFlags&65011712,d|=x.flags&65011712,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)l|=x.lanes|x.childLanes,d|=x.subtreeFlags,d|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=d,a.childLanes=l,n}function E5(a,n,l){var d=n.pendingProps;switch(Um(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(n),null;case 1:return gt(n),null;case 3:return l=n.stateNode,d=null,a!==null&&(d=a.memoizedState.cache),n.memoizedState.cache!==d&&(n.flags|=2048),Ys(Pt),Pe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(a===null||a.child===null)&&(Ar(n)?en(n):a===null||a.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Hm())),gt(n),null;case 26:var x=n.type,g=n.memoizedState;return a===null?(en(n),g!==null?(gt(n),z0(n,g)):(gt(n),Ap(n,x,null,d,l))):g?g!==a.memoizedState?(en(n),gt(n),z0(n,g)):(gt(n),n.flags&=-16777217):(a=a.memoizedProps,a!==d&&en(n),gt(n),Ap(n,x,a,d,l)),null;case 27:if(Q(n),l=be.current,x=n.type,a!==null&&n.stateNode!=null)a.memoizedProps!==d&&en(n);else{if(!d){if(n.stateNode===null)throw Error(r(166));return gt(n),null}a=ne.current,Ar(n)?fb(n):(a=qv(x,d,l),n.stateNode=a,en(n))}return gt(n),null;case 5:if(Q(n),x=n.type,a!==null&&n.stateNode!=null)a.memoizedProps!==d&&en(n);else{if(!d){if(n.stateNode===null)throw Error(r(166));return gt(n),null}if(g=ne.current,Ar(n))fb(n);else{var C=id(be.current);switch(g){case 1:g=C.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:g=C.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":g=C.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":g=C.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":g=C.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;
vendor: 23,039 bytes, line 48
48case"select":g=typeof d.is=="string"?C.createElement("select",{is:d.is}):C.createElement("select"),d.multiple?g.multiple=!0:d.size&&(g.size=d.size);break;default:g=typeof d.is=="string"?C.createElement(x,{is:d.is}):C.createElement(x)}}g[Kt]=n,g[va]=d;e:for(C=n.child;C!==null;){if(C.tag===5||C.tag===6)g.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===n)break e;for(;C.sibling===null;){if(C.return===null||C.return===n)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}n.stateNode=g;e:switch(Zt(g,x,d),x){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&en(n)}}return gt(n),Ap(n,n.type,a===null?null:a.memoizedProps,n.pendingProps,l),null;case 6:if(a&&n.stateNode!=null)a.memoizedProps!==d&&en(n);else{if(typeof d!="string"&&n.stateNode===null)throw Error(r(166));if(a=be.current,Ar(n)){if(a=n.stateNode,l=n.memoizedProps,d=null,x=Gt,x!==null)switch(x.tag){case 27:case 5:d=x.memoizedProps}a[Kt]=n,a=!!(a.nodeValue===l||d!==null&&d.suppressHydrationWarning===!0||Pv(a.nodeValue,l)),a||$n(n,!0)}else a=id(a).createTextNode(d),a[Kt]=n,n.stateNode=a}return gt(n),null;case 31:if(l=n.memoizedState,a===null||a.memoizedState!==null){if(d=Ar(n),l!==null){if(a===null){if(!d)throw Error(r(318));if(a=n.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[Kt]=n}else Oc(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;gt(n),a=!1}else l=Hm(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=l),a=!0;if(!a)return n.flags&256?(Ra(n),n):(Ra(n),null);if((n.flags&128)!==0)throw Error(r(558))}return gt(n),null;case 13:if(d=n.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(x=Ar(n),d!==null&&d.dehydrated!==null){if(a===null){if(!x)throw Error(r(318));if(x=n.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[Kt]=n}else Oc(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;gt(n),x=!1}else x=Hm(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=x),x=!0;if(!x)return n.flags&256?(Ra(n),n):(Ra(n),null)}return Ra(n),(n.flags&128)!==0?(n.lanes=l,n):(l=d!==null,a=a!==null&&a.memoizedState!==null,l&&(d=n.child,x=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(x=d.alternate.memoizedState.cachePool.pool),g=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(g=d.memoizedState.cachePool.pool),g!==x&&(d.flags|=2048)),l!==a&&l&&(n.child.flags|=8192),Fo(n,n.updateQueue),gt(n),null);case 4:return Pe(),a===null&&Jp(n.stateNode.containerInfo),gt(n),null;case 10:return Ys(n.type),gt(n),null;case 19:if(te(Tt),d=n.memoizedState,d===null)return gt(n),null;if(x=(n.flags&128)!==0,g=d.rendering,g===null)if(x)si(d,!1);else{if(Ct!==0||a!==null&&(a.flags&128)!==0)for(a=n.child;a!==null;){if(g=Ro(a),g!==null){for(n.flags|=128,si(d,!1),a=g.updateQueue,n.updateQueue=a,Fo(n,a),n.subtreeFlags=0,a=l,l=n.child;l!==null;)db(l,a),l=l.sibling;return Y(Tt,Tt.current&1|2),Ge&&Ks(n,d.treeForkCount),n.child}a=a.sibling}d.tail!==null&&Ke()>Zo&&(n.flags|=128,x=!0,si(d,!1),n.lanes=4194304)}else{if(!x)if(a=Ro(g),a!==null){if(n.flags|=128,x=!0,a=a.updateQueue,n.updateQueue=a,Fo(n,a),si(d,!0),d.tail===null&&d.tailMode==="hidden"&&!g.alternate&&!Ge)return gt(n),null}else 2*Ke()-d.renderingStartTime>Zo&&l!==536870912&&(n.flags|=128,x=!0,si(d,!1),n.lanes=4194304);d.isBackwards?(g.sibling=n.child,n.child=g):(a=d.last,a!==null?a.sibling=g:n.child=g,d.last=g)}return d.tail!==null?(a=d.tail,d.rendering=a,d.tail=a.sibling,d.renderingStartTime=Ke(),a.sibling=null,l=Tt.current,Y(Tt,x?l&1|2:l&1),Ge&&Ks(n,d.treeForkCount),a):(gt(n),null);case 22:case 23:return Ra(n),ep(),d=n.memoizedState!==null,a!==null?a.memoizedState!==null!==d&&(n.flags|=8192):d&&(n.flags|=8192),d?(l&536870912)!==0&&(n.flags&128)===0&&(gt(n),n.subtreeFlags&6&&(n.flags|=8192)):gt(n),l=n.updateQueue,l!==null&&Fo(n,l.retryQueue),l=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),d=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(d=n.memoizedState.cachePool.pool),d!==l&&(n.flags|=2048),a!==null&&te(Bc),null;case 24:return l=null,a!==null&&(l=a.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Ys(Pt),gt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function _5(a,n){switch(Um(n),n.tag){case 1:return a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 3:return Ys(Pt),Pe(),a=n.flags,(a&65536)!==0&&(a&128)===0?(n.flags=a&-65537|128,n):null;case 26:case 27:case 5:return Q(n),null;case 31:if(n.memoizedState!==null){if(Ra(n),n.alternate===null)throw Error(r(340));Oc()}return a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 13:if(Ra(n),a=n.memoizedState,a!==null&&a.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Oc()}return a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 19:return te(Tt),null;case 4:return Pe(),null;case 10:return Ys(n.type),null;case 22:case 23:return Ra(n),ep(),a!==null&&te(Bc),a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 24:return Ys(Pt),null;case 25:return null;default:return null}}function L0(a,n){switch(Um(n),n.tag){case 3:Ys(Pt),Pe();break;case 26:case 27:case 5:Q(n);break;case 4:Pe();break;case 31:n.memoizedState!==null&&Ra(n);break;case 13:Ra(n);break;case 19:te(Tt);break;case 10:Ys(n.type);break;case 22:case 23:Ra(n),ep(),a!==null&&te(Bc);break;case 24:Ys(Pt)}}function ni(a,n){try{var l=n.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var x=d.next;l=x;do{if((l.tag&a)===a){d=void 0;var g=l.create,C=l.inst;d=g(),C.destroy=d}l=l.next}while(l!==x)}}catch(D){it(n,n.return,D)}}function Gn(a,n,l){try{var d=n.updateQueue,x=d!==null?d.lastEffect:null;if(x!==null){var g=x.next;d=g;do{if((d.tag&a)===a){var C=d.inst,D=C.destroy;if(D!==void 0){C.destroy=void 0,x=n;var U=l,ee=D;try{ee()}catch(oe){it(x,U,oe)}}}d=d.next}while(d!==g)}}catch(oe){it(n,n.return,oe)}}function B0(a){var n=a.updateQueue;if(n!==null){var l=a.stateNode;try{Db(n,l)}catch(d){it(a,a.return,d)}}}function U0(a,n,l){l.props=qc(a.type,a.memoizedProps),l.state=a.memoizedState;try{l.componentWillUnmount()}catch(d){it(a,n,d)}}function ci(a,n){try{var l=a.ref;if(l!==null){switch(a.tag){case 26:case 27:case 5:var d=a.stateNode;break;case 30:d=a.stateNode;break;default:d=a.stateNode}typeof l=="function"?a.refCleanup=l(d):l.current=d}}catch(x){it(a,n,x)}}function Ds(a,n){var l=a.ref,d=a.refCleanup;if(l!==null)if(typeof d=="function")try{d()}catch(x){it(a,n,x)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(x){it(a,n,x)}else l.current=null}function I0(a){var n=a.type,l=a.memoizedProps,d=a.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&d.focus();break e;case"img":l.src?d.src=l.src:l.srcSet&&(d.srcset=l.srcSet)}}catch(x){it(a,a.return,x)}}function Pp(a,n,l){try{var d=a.stateNode;Z5(d,a.type,l,n),d[va]=n}catch(x){it(a,a.return,x)}}function H0(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&ac(a.type)||a.tag===4}function Mp(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||H0(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&ac(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Rp(a,n,l){var d=a.tag;if(d===5||d===6)a=a.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(a,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(a),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Ws));else if(d!==4&&(d===27&&ac(a.type)&&(l=a.stateNode,n=null),a=a.child,a!==null))for(Rp(a,n,l),a=a.sibling;a!==null;)Rp(a,n,l),a=a.sibling}function Ko(a,n,l){var d=a.tag;if(d===5||d===6)a=a.stateNode,n?l.insertBefore(a,n):l.appendChild(a);else if(d!==4&&(d===27&&ac(a.type)&&(l=a.stateNode),a=a.child,a!==null))for(Ko(a,n,l),a=a.sibling;a!==null;)Ko(a,n,l),a=a.sibling}function $0(a){var n=a.stateNode,l=a.memoizedProps;try{for(var d=a.type,x=n.attributes;x.length;)n.removeAttributeNode(x[0]);Zt(n,d,l),n[Kt]=a,n[va]=l}catch(g){it(a,a.return,g)}}var tn=!1,Ot=!1,Op=!1,q0=typeof WeakSet=="function"?WeakSet:Set,Wt=null;function A5(a,n){if(a=a.containerInfo,ax=fd,a=tb(a),Dm(a)){if("selectionStart"in a)var l={start:a.selectionStart,end:a.selectionEnd};else e:{l=(l=a.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var x=d.anchorOffset,g=d.focusNode;d=d.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break e}var C=0,D=-1,U=-1,ee=0,oe=0,ue=a,ae=null;t:for(;;){for(var re;ue!==l||x!==0&&ue.nodeType!==3||(D=C+x),ue!==g||d!==0&&ue.nodeType!==3||(U=C+d),ue.nodeType===3&&(C+=ue.nodeValue.length),(re=ue.firstChild)!==null;)ae=ue,ue=re;for(;;){if(ue===a)break t;if(ae===l&&++ee===x&&(D=C),ae===g&&++oe===d&&(U=C),(re=ue.nextSibling)!==null)break;ue=ae,ae=ue.parentNode}ue=re}l=D===-1||U===-1?null:{start:D,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(sx={focusedElem:a,selectionRange:l},fd=!1,Wt=n;Wt!==null;)if(n=Wt,a=n.child,(n.subtreeFlags&1028)!==0&&a!==null)a.return=n,Wt=a;else for(;Wt!==null;){switch(n=Wt,g=n.alternate,a=n.flags,n.tag){case 0:if((a&4)!==0&&(a=n.updateQueue,a=a!==null?a.events:null,a!==null))for(l=0;l<a.length;l++)x=a[l],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&g!==null){a=void 0,l=n,x=g.memoizedProps,g=g.memoizedState,d=l.stateNode;try{var Te=qc(l.type,x);a=d.getSnapshotBeforeUpdate(Te,g),d.__reactInternalSnapshotBeforeUpdate=a}catch(Oe){it(l,l.return,Oe)}}break;case 3:if((a&1024)!==0){if(a=n.stateNode.containerInfo,l=a.nodeType,l===9)rx(a);else if(l===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":rx(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=n.sibling,a!==null){a.return=n.return,Wt=a;break}Wt=n.return}}function Q0(a,n,l){var d=l.flags;switch(l.tag){case 0:case 11:case 15:sn(a,l),d&4&&ni(5,l);break;case 1:if(sn(a,l),d&4)if(a=l.stateNode,n===null)try{a.componentDidMount()}catch(C){it(l,l.return,C)}else{var x=qc(l.type,n.memoizedProps);n=n.memoizedState;try{a.componentDidUpdate(x,n,a.__reactInternalSnapshotBeforeUpdate)}catch(C){it(l,l.return,C)}}d&64&&B0(l),d&512&&ci(l,l.return);break;case 3:if(sn(a,l),d&64&&(a=l.updateQueue,a!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{Db(a,n)}catch(C){it(l,l.return,C)}}break;case 27:n===null&&d&4&&$0(l);case 26:case 5:sn(a,l),n===null&&d&4&&I0(l),d&512&&ci(l,l.return);break;case 12:sn(a,l);break;case 31:sn(a,l),d&4&&F0(a,l);break;case 13:sn(a,l),d&4&&K0(a,l),d&64&&(a=l.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(l=I5.bind(null,l),rT(a,l))));break;case 22:if(d=l.memoizedState!==null||tn,!d){n=n!==null&&n.memoizedState!==null||Ot,x=tn;var g=Ot;tn=d,(Ot=n)&&!g?nn(a,l,(l.subtreeFlags&8772)!==0):sn(a,l),tn=x,Ot=g}break;case 30:break;default:sn(a,l)}}function W0(a){var n=a.alternate;n!==null&&(a.alternate=null,W0(n)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(n=a.stateNode,n!==null&&um(n)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var vt=null,ja=!1;function an(a,n,l){for(l=l.child;l!==null;)V0(a,n,l),l=l.sibling}function V0(a,n,l){if(ua&&typeof ua.onCommitFiberUnmount=="function")try{ua.onCommitFiberUnmount(Tc,l)}catch{}switch(l.tag){case 26:Ot||Ds(l,n),an(a,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ot||Ds(l,n);var d=vt,x=ja;ac(l.type)&&(vt=l.stateNode,ja=!1),an(a,n,l),xi(l.stateNode),vt=d,ja=x;break;case 5:Ot||Ds(l,n);case 6:if(d=vt,x=ja,vt=null,an(a,n,l),vt=d,ja=x,vt!==null)if(ja)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(l.stateNode)}catch(g){it(l,n,g)}else try{vt.removeChild(l.stateNode)}catch(g){it(l,n,g)}break;case 18:vt!==null&&(ja?(a=vt,Bv(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,l.stateNode),Zr(a)):Bv(vt,l.stateNode));break;case 4:d=vt,x=ja,vt=l.stateNode.containerInfo,ja=!0,an(a,n,l),vt=d,ja=x;break;case 0:case 11:case 14:case 15:Gn(2,l,n),Ot||Gn(4,l,n),an(a,n,l);break;case 1:Ot||(Ds(l,n),d=l.stateNode,typeof d.componentWillUnmount=="function"&&U0(l,n,d)),an(a,n,l);break;case 21:an(a,n,l);break;case 22:Ot=(d=Ot)||l.memoizedState!==null,an(a,n,l),Ot=d;break;default:an(a,n,l)}}function F0(a,n){if(n.memoizedState===null&&(a=n.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Zr(a)}catch(l){it(n,n.return,l)}}}function K0(a,n){if(n.memoizedState===null&&(a=n.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Zr(a)}catch(l){it(n,n.return,l)}}function P5(a){switch(a.tag){case 31:case 13:case 19:var n=a.stateNode;return n===null&&(n=a.stateNode=new q0),n;case 22:return a=a.stateNode,n=a._retryCache,n===null&&(n=a._retryCache=new q0),n;default:throw Error(r(435,a.tag))}}function Go(a,n){var l=P5(a);n.forEach(function(d){if(!l.has(d)){l.add(d);var x=H5.bind(null,a,d);d.then(x,x)}})}function Na(a,n){var l=n.deletions;if(l!==null)for(var d=0;d<l.length;d++){var x=l[d],g=a,C=n,D=C;e:for(;D!==null;){switch(D.tag){case 27:if(ac(D.type)){vt=D.stateNode,ja=!1;break e}break;case 5:vt=D.stateNode,ja=!1;break e;case 3:case 4:vt=D.stateNode.containerInfo,ja=!0;break e}D=D.return}if(vt===null)throw Error(r(160));V0(g,C,x),vt=null,ja=!1,g=x.alternate,g!==null&&(g.return=null),x.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)G0(n,a),n=n.sibling}var us=null;function G0(a,n){var l=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Na(n,a),Ca(a),d&4&&(Gn(3,a,a.return),ni(3,a),Gn(5,a,a.return));break;case 1:Na(n,a),Ca(a),d&512&&(Ot||l===null||Ds(l,l.return)),d&64&&tn&&(a=a.updateQueue,a!==null&&(d=a.callbacks,d!==null&&(l=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=l===null?d:l.concat(d))));break;case 26:var x=us;if(Na(n,a),Ca(a),d&512&&(Ot||l===null||Ds(l,l.return)),d&4){var g=l!==null?l.memoizedState:null;if(d=a.memoizedState,l===null)if(d===null)if(a.stateNode===null){e:{d=a.type,l=a.memoizedProps,x=x.ownerDocument||x;t:switch(d){case"title":g=x.getElementsByTagName("title")[0],(!g||g[Pl]||g[Kt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=x.createElement(d),x.head.insertBefore(g,x.querySelector("head > title"))),Zt(g,d,l),g[Kt]=a,Qt(g),d=g;break e;case"link":var C=Gv("link","href",x).get(d+(l.href||""));if(C){for(var D=0;D<C.length;D++)if(g=C[D],g.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&g.getAttribute("rel")===(l.rel==null?null:l.rel)&&g.getAttribute("title")===(l.title==null?null:l.title)&&g.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){C.splice(D,1);break t}}g=x.createElement(d),Zt(g,d,l),x.head.appendChild(g);break;case"meta":if(C=Gv("meta","content",x).get(d+(l.content||""))){for(D=0;D<C.length;D++)if(g=C[D],g.getAttribute("content")===(l.content==null?null:""+l.content)&&g.getAttribute("name")===(l.name==null?null:l.name)&&g.getAttribute("property")===(l.property==null?null:l.property)&&g.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&g.getAttribute("charset")===(l.charSet==null?null:l.charSet)){C.splice(D,1);break t}}g=x.createElement(d),Zt(g,d,l),x.head.appendChild(g);break;default:throw Error(r(468,d))}g[Kt]=a,Qt(g),d=g}a.stateNode=d}else Yv(x,a.type,a.stateNode);else a.stateNode=Kv(x,d,a.memoizedProps);else g!==d?(g===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):g.count--,d===null?Yv(x,a.type,a.stateNode):Kv(x,d,a.memoizedProps)):d===null&&a.stateNode!==null&&Pp(a,a.memoizedProps,l.memoizedProps)}break;case 27:Na(n,a),Ca(a),d&512&&(Ot||l===null||Ds(l,l.return)),l!==null&&d&4&&Pp(a,a.memoizedProps,l.memoizedProps);break;case 5:if(Na(n,a),Ca(a),d&512&&(Ot||l===null||Ds(l,l.return)),a.flags&32){x=a.stateNode;try{jr(x,"")}catch(Te){it(a,a.return,Te)}}d&4&&a.stateNode!=null&&(x=a.memoizedProps,Pp(a,x,l!==null?l.memoizedProps:x)),d&1024&&(Op=!0);break;case 6:if(Na(n,a),Ca(a),d&4){if(a.stateNode===null)throw Error(r(162));d=a.memoizedProps,l=a.stateNode;try{l.nodeValue=d}catch(Te){it(a,a.return,Te)}}break;case 3:if(ud=null,x=us,us=od(n.containerInfo),Na(n,a),us=x,Ca(a),d&4&&l!==null&&l.memoizedState.isDehydrated)try{Zr(n.containerInfo)}catch(Te){it(a,a.return,Te)}Op&&(Op=!1,Y0(a));break;case 4:d=us,us=od(a.stateNode.containerInfo),Na(n,a),Ca(a),us=d;break;case 12:Na(n,a),Ca(a);break;case 31:Na(n,a),Ca(a),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,Go(a,d)));break;case 13:Na(n,a),Ca(a),a.child.flags&8192&&a.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Xo=Ke()),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,Go(a,d)));break;case 22:x=a.memoizedState!==null;var U=l!==null&&l.memoizedState!==null,ee=tn,oe=Ot;if(tn=ee||x,Ot=oe||U,Na(n,a),Ot=oe,tn=ee,Ca(a),d&8192)e:for(n=a.stateNode,n._visibility=x?n._visibility&-2:n._visibility|1,x&&(l===null||U||tn||Ot||Qc(a)),l=null,n=a;;){if(n.tag===5||n.tag===26){if(l===null){U=l=n;try{if(g=U.stateNode,x)C=g.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{D=U.stateNode;var ue=U.memoizedProps.style,ae=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;D.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(Te){it(U,U.return,Te)}}}else if(n.tag===6){if(l===null){U=n;try{U.stateNode.nodeValue=x?"":U.memoizedProps}catch(Te){it(U,U.return,Te)}}}else if(n.tag===18){if(l===null){U=n;try{var re=U.stateNode;x?Uv(re,!0):Uv(U.stateNode,!1)}catch(Te){it(U,U.return,Te)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===a)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}d&4&&(d=a.updateQueue,d!==null&&(l=d.retryQueue,l!==null&&(d.retryQueue=null,Go(a,l))));break;case 19:Na(n,a),Ca(a),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,Go(a,d)));break;case 30:break;case 21:break;default:Na(n,a),Ca(a)}}function Ca(a){var n=a.flags;if(n&2){try{for(var l,d=a.return;d!==null;){if(H0(d)){l=d;break}d=d.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var x=l.stateNode,g=Mp(a);Ko(a,g,x);break;case 5:var C=l.stateNode;l.flags&32&&(jr(C,""),l.flags&=-33);var D=Mp(a);Ko(a,D,C);break;case 3:case 4:var U=l.stateNode.containerInfo,ee=Mp(a);Rp(a,ee,U);break;default:throw Error(r(161))}}catch(oe){it(a,a.return,oe)}a.flags&=-3}n&4096&&(a.flags&=-4097)}function Y0(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var n=a;Y0(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),a=a.sibling}}function sn(a,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Q0(a,n.alternate,n),n=n.sibling}function Qc(a){for(a=a.child;a!==null;){var n=a;switch(n.tag){case 0:case 11:case 14:case 15:Gn(4,n,n.return),Qc(n);break;case 1:Ds(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&U0(n,n.return,l),Qc(n);break;case 27:xi(n.stateNode);case 26:case 5:Ds(n,n.return),Qc(n);break;case 22:n.memoizedState===null&&Qc(n);break;case 30:Qc(n);break;default:Qc(n)}a=a.sibling}}function nn(a,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var d=n.alternate,x=a,g=n,C=g.flags;switch(g.tag){case 0:case 11:case 15:nn(x,g,l),ni(4,g);break;case 1:if(nn(x,g,l),d=g,x=d.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(ee){it(d,d.return,ee)}if(d=g,x=d.updateQueue,x!==null){var D=d.stateNode;try{var U=x.shared.hiddenCallbacks;if(U!==null)for(x.shared.hiddenCallbacks=null,x=0;x<U.length;x++)kb(U[x],D)}catch(ee){it(d,d.return,ee)}}l&&C&64&&B0(g),ci(g,g.return);break;case 27:$0(g);case 26:case 5:nn(x,g,l),l&&d===null&&C&4&&I0(g),ci(g,g.return);break;case 12:nn(x,g,l);break;case 31:nn(x,g,l),l&&C&4&&F0(x,g);break;case 13:nn(x,g,l),l&&C&4&&K0(x,g);break;case 22:g.memoizedState===null&&nn(x,g,l),ci(g,g.return);break;case 30:break;default:nn(x,g,l)}n=n.sibling}}function zp(a,n){var l=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),a=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),a!==l&&(a!=null&&a.refCount++,l!=null&&Wl(l))}function Lp(a,n){a=null,n.alternate!==null&&(a=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==a&&(n.refCount++,a!=null&&Wl(a))}function ms(a,n,l,d){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)X0(a,n,l,d),n=n.sibling}function X0(a,n,l,d){var x=n.flags;switch(n.tag){case 0:case 11:case 15:ms(a,n,l,d),x&2048&&ni(9,n);break;case 1:ms(a,n,l,d);break;case 3:ms(a,n,l,d),x&2048&&(a=null,n.alternate!==null&&(a=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==a&&(n.refCount++,a!=null&&Wl(a)));break;case 12:if(x&2048){ms(a,n,l,d),a=n.stateNode;try{var g=n.memoizedProps,C=g.id,D=g.onPostCommit;typeof D=="function"&&D(C,n.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(U){it(n,n.return,U)}}else ms(a,n,l,d);break;case 31:ms(a,n,l,d);break;case 13:ms(a,n,l,d);break;case 23:break;case 22:g=n.stateNode,C=n.alternate,n.memoizedState!==null?g._visibility&2?ms(a,n,l,d):ri(a,n):g._visibility&2?ms(a,n,l,d):(g._visibility|=2,Hr(a,n,l,d,(n.subtreeFlags&10256)!==0||!1)),x&2048&&zp(C,n);break;case 24:ms(a,n,l,d),x&2048&&Lp(n.alternate,n);break;default:ms(a,n,l,d)}}function Hr(a,n,l,d,x){for(x=x&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=a,C=n,D=l,U=d,ee=C.flags;switch(C.tag){case 0:case 11:case 15:Hr(g,C,D,U,x),ni(8,C);break;case 23:break;case 22:var oe=C.stateNode;C.memoizedState!==null?oe._visibility&2?Hr(g,C,D,U,x):ri(g,C):(oe._visibility|=2,Hr(g,C,D,U,x)),x&&ee&2048&&zp(C.alternate,C);break;case 24:Hr(g,C,D,U,x),x&&ee&2048&&Lp(C.alternate,C);break;default:Hr(g,C,D,U,x)}n=n.sibling}}function ri(a,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=a,d=n,x=d.flags;switch(d.tag){case 22:ri(l,d),x&2048&&zp(d.alternate,d);break;case 24:ri(l,d),x&2048&&Lp(d.alternate,d);break;default:ri(l,d)}n=n.sibling}}var li=8192;function $r(a,n,l){if(a.subtreeFlags&li)for(a=a.child;a!==null;)Z0(a,n,l),a=a.sibling}function Z0(a,n,l){switch(a.tag){case 26:$r(a,n,l),a.flags&li&&a.memoizedState!==null&&bT(l,us,a.memoizedState,a.memoizedProps);break;case 5:$r(a,n,l);break;case 3:case 4:var d=us;us=od(a.stateNode.containerInfo),$r(a,n,l),us=d;break;case 22:a.memoizedState===null&&(d=a.alternate,d!==null&&d.memoizedState!==null?(d=li,li=16777216,$r(a,n,l),li=d):$r(a,n,l));break;default:$r(a,n,l)}}function J0(a){var n=a.alternate;if(n!==null&&(a=n.child,a!==null)){n.child=null;do n=a.sibling,a.sibling=null,a=n;while(a!==null)}}
vendor: 4,854 bytes, line 48
48function ii(a){var n=a.deletions;if((a.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var d=n[l];Wt=d,tv(d,a)}J0(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)ev(a),a=a.sibling}function ev(a){switch(a.tag){case 0:case 11:case 15:ii(a),a.flags&2048&&Gn(9,a,a.return);break;case 3:ii(a);break;case 12:ii(a);break;case 22:var n=a.stateNode;a.memoizedState!==null&&n._visibility&2&&(a.return===null||a.return.tag!==13)?(n._visibility&=-3,Yo(a)):ii(a);break;default:ii(a)}}function Yo(a){var n=a.deletions;if((a.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var d=n[l];Wt=d,tv(d,a)}J0(a)}for(a=a.child;a!==null;){switch(n=a,n.tag){case 0:case 11:case 15:Gn(8,n,n.return),Yo(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Yo(n));break;default:Yo(n)}a=a.sibling}}function tv(a,n){for(;Wt!==null;){var l=Wt;switch(l.tag){case 0:case 11:case 15:Gn(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var d=l.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Wl(l.memoizedState.cache)}if(d=l.child,d!==null)d.return=l,Wt=d;else e:for(l=a;Wt!==null;){d=Wt;var x=d.sibling,g=d.return;if(W0(d),d===l){Wt=null;break e}if(x!==null){x.return=g,Wt=x;break e}Wt=g}}}var M5={getCacheForType:function(a){var n=Yt(Pt),l=n.data.get(a);return l===void 0&&(l=a(),n.data.set(a,l)),l},cacheSignal:function(){return Yt(Pt).controller.signal}},R5=typeof WeakMap=="function"?WeakMap:Map,nt=0,mt=null,Qe=null,Ve=0,lt=0,Oa=null,Yn=!1,qr=!1,Bp=!1,cn=0,Ct=0,Xn=0,Wc=0,Up=0,za=0,Qr=0,oi=null,wa=null,Ip=!1,Xo=0,av=0,Zo=1/0,Jo=null,Zn=null,It=0,Jn=null,Wr=null,rn=0,Hp=0,$p=null,sv=null,di=0,qp=null;function La(){return(nt&2)!==0&&Ve!==0?Ve&-Ve:L.T!==null?Gp():om()}function nv(){if(za===0)if((Ve&536870912)===0||Ge){var a=pr;pr<<=1,(pr&3932160)===0&&(pr=262144),za=a}else za=536870912;return a=Ma.current,a!==null&&(a.flags|=32),za}function Sa(a,n,l){(a===mt&&(lt===2||lt===9)||a.cancelPendingCommit!==null)&&(Vr(a,0),ec(a,Ve,za,!1)),yt(a,l),((nt&2)===0||a!==mt)&&(a===mt&&((nt&2)===0&&(Wc|=l),Ct===4&&ec(a,Ve,za,!1)),Es(a))}function cv(a,n,l){if((nt&6)!==0)throw Error(r(327));var d=!l&&(n&127)===0&&(n&a.expiredLanes)===0||bt(a,n),x=d?L5(a,n):Wp(a,n,!0),g=d;do{if(x===0){qr&&!d&&ec(a,n,0,!1);break}else{if(l=a.current.alternate,g&&!O5(l)){x=Wp(a,n,!1),g=!1;continue}if(x===2){if(g=n,a.errorRecoveryDisabledLanes&g)var C=0;else C=a.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){n=C;e:{var D=a;x=oi;var U=D.current.memoizedState.isDehydrated;if(U&&(Vr(D,C).flags|=256),C=Wp(D,C,!1),C!==2){if(Bp&&!U){D.errorRecoveryDisabledLanes|=g,Wc|=g,x=4;break e}g=wa,wa=x,g!==null&&(wa===null?wa=g:wa.push.apply(wa,g))}x=C}if(g=!1,x!==2)continue}}if(x===1){Vr(a,0),ec(a,n,0,!0);break}e:{switch(d=a,g=x,g){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:ec(d,n,za,!Yn);break e;case 2:wa=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(x=Xo+300-Ke(),10<x)){if(ec(d,n,za,!Yn),ze(d,0,!0)!==0)break e;rn=n,d.timeoutHandle=zv(rv.bind(null,d,l,wa,Jo,Ip,n,za,Wc,Qr,Yn,g,"Throttled",-0,0),x);break e}rv(d,l,wa,Jo,Ip,n,za,Wc,Qr,Yn,g,null,-0,0)}}break}while(!0);Es(a)}function rv(a,n,l,d,x,g,C,D,U,ee,oe,ue,ae,re){if(a.timeoutHandle=-1,ue=n.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ws},Z0(n,g,ue);var Te=(g&62914560)===g?Xo-Ke():(g&4194048)===g?av-Ke():0;if(Te=vT(ue,Te),Te!==null){rn=g,a.cancelPendingCommit=Te(xv.bind(null,a,n,g,l,d,x,C,D,U,oe,ue,null,ae,re)),ec(a,g,C,!ee);return}}xv(a,n,g,l,d,x,C,D,U)}function O5(a){for(var n=a;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var d=0;d<l.length;d++){var x=l[d],g=x.getSnapshot;x=x.value;try{if(!Aa(g(),x))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===a)break;for(;n.sibling===null;){if(n.return===null||n.return===a)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ec(a,n,l,d){n&=~Up,n&=~Wc,a.suspendedLanes|=n,a.pingedLanes&=~n,d&&(a.warmLanes|=n),d=a.expirationTimes;for(var x=n;0<x;){var g=31-ra(x),C=1<<g;d[g]=-1,x&=~C}l!==0&&Dc(a,l,n)}function ed(){return(nt&6)===0?(ui(0),!1):!0}function Qp(){if(Qe!==null){if(lt===0)var a=Qe.return;else a=Qe,Gs=zc=null,rp(a),zr=null,Fl=0,a=Qe;for(;a!==null;)L0(a.alternate,a),a=a.return;Qe=null}}function Vr(a,n){var l=a.timeoutHandle;l!==-1&&(a.timeoutHandle=-1,tT(l)),l=a.cancelPendingCommit,l!==null&&(a.cancelPendingCommit=null,l()),rn=0,Qp(),mt=a,Qe=l=Fs(a.current,null),Ve=n,lt=0,Oa=null,Yn=!1,qr=bt(a,n),Bp=!1,Qr=za=Up=Wc=Xn=Ct=0,wa=oi=null,Ip=!1,(n&8)!==0&&(n|=n&32);var d=a.entangledLanes;if(d!==0)for(a=a.entanglements,d&=n;0<d;){var x=31-ra(d),g=1<<x;
vendor: 5,132 bytes, line 48
48n|=a[x],d&=~g}return cn=n,jo(),l}function lv(a,n){Ie=null,L.H=ti,n===Or||n===Eo?(n=Cb(),lt=3):n===Km?(n=Cb(),lt=4):lt=n===Np?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Oa=n,Qe===null&&(Ct=1,qo(a,Fa(n,a.current)))}function iv(){var a=Ma.current;return a===null?!0:(Ve&4194048)===Ve?Xa===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?a===Xa:!1}function ov(){var a=L.H;return L.H=ti,a===null?ti:a}function dv(){var a=L.A;return L.A=M5,a}function td(){Ct=4,Yn||(Ve&4194048)!==Ve&&Ma.current!==null||(qr=!0),(Xn&134217727)===0&&(Wc&134217727)===0||mt===null||ec(mt,Ve,za,!1)}function Wp(a,n,l){var d=nt;nt|=2;var x=ov(),g=dv();(mt!==a||Ve!==n)&&(Jo=null,Vr(a,n)),n=!1;var C=Ct;e:do try{if(lt!==0&&Qe!==null){var D=Qe,U=Oa;switch(lt){case 8:Qp(),C=6;break e;case 3:case 2:case 9:case 6:Ma.current===null&&(n=!0);var ee=lt;if(lt=0,Oa=null,Fr(a,D,U,ee),l&&qr){C=0;break e}break;default:ee=lt,lt=0,Oa=null,Fr(a,D,U,ee)}}z5(),C=Ct;break}catch(oe){lv(a,oe)}while(!0);return n&&a.shellSuspendCounter++,Gs=zc=null,nt=d,L.H=x,L.A=g,Qe===null&&(mt=null,Ve=0,jo()),C}function z5(){for(;Qe!==null;)uv(Qe)}function L5(a,n){var l=nt;nt|=2;var d=ov(),x=dv();mt!==a||Ve!==n?(Jo=null,Zo=Ke()+500,Vr(a,n)):qr=bt(a,n);e:do try{if(lt!==0&&Qe!==null){n=Qe;var g=Oa;t:switch(lt){case 1:lt=0,Oa=null,Fr(a,n,g,1);break;case 2:case 9:if(jb(g)){lt=0,Oa=null,mv(n);break}n=function(){lt!==2&&lt!==9||mt!==a||(lt=7),Es(a)},g.then(n,n);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:jb(g)?(lt=0,Oa=null,mv(n)):(lt=0,Oa=null,Fr(a,n,g,7));break;case 5:var C=null;switch(Qe.tag){case 26:C=Qe.memoizedState;case 5:case 27:var D=Qe;if(C?Xv(C):D.stateNode.complete){lt=0,Oa=null;var U=D.sibling;if(U!==null)Qe=U;else{var ee=D.return;ee!==null?(Qe=ee,ad(ee)):Qe=null}break t}}lt=0,Oa=null,Fr(a,n,g,5);break;case 6:lt=0,Oa=null,Fr(a,n,g,6);break;case 8:Qp(),Ct=6;break e;default:throw Error(r(462))}}B5();break}catch(oe){lv(a,oe)}while(!0);return Gs=zc=null,L.H=d,L.A=x,nt=l,Qe!==null?0:(mt=null,Ve=0,jo(),Ct)}function B5(){for(;Qe!==null&&!Ut();)uv(Qe)}function uv(a){var n=O0(a.alternate,a,cn);a.memoizedProps=a.pendingProps,n===null?ad(a):Qe=n}function mv(a){var n=a,l=n.alternate;switch(n.tag){case 15:case 0:n=E0(l,n,n.pendingProps,n.type,void 0,Ve);break;case 11:n=E0(l,n,n.pendingProps,n.type.render,n.ref,Ve);break;case 5:rp(n);default:L0(l,n),n=Qe=db(n,cn),n=O0(l,n,cn)}a.memoizedProps=a.pendingProps,n===null?ad(a):Qe=n}function Fr(a,n,l,d){Gs=zc=null,rp(n),zr=null,Fl=0;var x=n.return;try{if(T5(a,x,n,l,Ve)){Ct=1,qo(a,Fa(l,a.current)),Qe=null;return}}catch(g){if(x!==null)throw Qe=x,g;Ct=1,qo(a,Fa(l,a.current)),Qe=null;return}n.flags&32768?(Ge||d===1?a=!0:qr||(Ve&536870912)!==0?a=!1:(Yn=a=!0,(d===2||d===9||d===3||d===6)&&(d=Ma.current,d!==null&&d.tag===13&&(d.flags|=16384))),pv(n,a)):ad(n)}function ad(a){var n=a;do{if((n.flags&32768)!==0){pv(n,Yn);return}a=n.return;var l=E5(n.alternate,n,cn);if(l!==null){Qe=l;return}if(n=n.sibling,n!==null){Qe=n;return}Qe=n=a}while(n!==null);Ct===0&&(Ct=5)}function pv(a,n){do{var l=_5(a.alternate,a);if(l!==null){l.flags&=32767,Qe=l;return}if(l=a.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(a=a.sibling,a!==null)){Qe=a;return}Qe=a=l}while(a!==null);Ct=6,Qe=null}function xv(a,n,l,d,x,g,C,D,U){a.cancelPendingCommit=null;do sd();while(It!==0);if((nt&6)!==0)throw Error(r(327));if(n!==null){if(n===a.current)throw Error(r(177));if(g=n.lanes|n.childLanes,g|=Mm,ga(a,l,g,C,D,U),a===mt&&(Qe=mt=null,Ve=0),Wr=n,Jn=a,rn=l,Hp=g,$p=x,sv=d,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,$5(Sc,function(){return vv(),null})):(a.callbackNode=null,a.callbackPriority=0),d=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||d){d=L.T,L.T=null,x=F.p,F.p=2,C=nt,nt|=4;try{A5(a,n,l)}finally{nt=C,F.p=x,L.T=d}}It=1,fv(),gv(),hv()}}function fv(){if(It===1){It=0;var a=Jn,n=Wr,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=L.T,L.T=null;var d=F.p;F.p=2;var x=nt;nt|=4;try{G0(n,a);var g=sx,C=tb(a.containerInfo),D=g.focusedElem,U=g.selectionRange;if(C!==D&&D&&D.ownerDocument&&eb(D.ownerDocument.documentElement,D)){if(U!==null&&Dm(D)){var ee=U.start,oe=U.end;if(oe===void 0&&(oe=ee),"selectionStart"in D)D.selectionStart=ee,D.selectionEnd=Math.min(oe,D.value.length);else{var ue=D.ownerDocument||document,ae=ue&&ue.defaultView||window;if(ae.getSelection){var re=ae.getSelection(),Te=D.textContent.length,Oe=Math.min(U.start,Te),ut=U.end===void 0?Oe:Math.min(U.end,Te);!re.extend&&Oe>ut&&(C=ut,ut=Oe,Oe=C);var K=Jh(D,Oe),$=Jh(D,ut);if(K&&$&&(re.rangeCount!==1||re.anchorNode!==K.node||re.anchorOffset!==K.offset||re.focusNode!==$.node||re.focusOffset!==$.offset)){var J=ue.createRange();J.setStart(K.node,K.offset),re.removeAllRanges(),Oe>ut?(re.addRange(J),re.extend($.node,$.offset)):(J.setEnd($.node,$.offset),re.addRange(J))}}}}for(ue=[],re=D;re=re.parentNode;)re.nodeType===1&&ue.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<ue.length;D++){var de=ue[D];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}fd=!!ax,sx=ax=null}finally{nt=x,F.p=d,L.T=l}}a.current=n,It=2}}
vendor: 13,141 bytes, line 48
48function gv(){if(It===2){It=0;var a=Jn,n=Wr,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=L.T,L.T=null;var d=F.p;F.p=2;var x=nt;nt|=4;try{Q0(a,n.alternate,n)}finally{nt=x,F.p=d,L.T=l}}It=3}}function hv(){if(It===4||It===3){It=0,Cs();var a=Jn,n=Wr,l=rn,d=sv;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?It=5:(It=0,Wr=Jn=null,bv(a,a.pendingLanes));var x=a.pendingLanes;if(x===0&&(Zn=null),os(l),n=n.stateNode,ua&&typeof ua.onCommitFiberRoot=="function")try{ua.onCommitFiberRoot(Tc,n,void 0,(n.current.flags&128)===128)}catch{}if(d!==null){n=L.T,x=F.p,F.p=2,L.T=null;try{for(var g=a.onRecoverableError,C=0;C<d.length;C++){var D=d[C];g(D.value,{componentStack:D.stack})}}finally{L.T=n,F.p=x}}(rn&3)!==0&&sd(),Es(a),x=a.pendingLanes,(l&261930)!==0&&(x&42)!==0?a===qp?di++:(di=0,qp=a):di=0,ui(0)}}function bv(a,n){(a.pooledCacheLanes&=n)===0&&(n=a.pooledCache,n!=null&&(a.pooledCache=null,Wl(n)))}function sd(){return fv(),gv(),hv(),vv()}function vv(){if(It!==5)return!1;var a=Jn,n=Hp;Hp=0;var l=os(rn),d=L.T,x=F.p;try{F.p=32>l?32:l,L.T=null,l=$p,$p=null;var g=Jn,C=rn;if(It=0,Wr=Jn=null,rn=0,(nt&6)!==0)throw Error(r(331));var D=nt;if(nt|=4,ev(g.current),X0(g,g.current,C,l),nt=D,ui(0,!1),ua&&typeof ua.onPostCommitFiberRoot=="function")try{ua.onPostCommitFiberRoot(Tc,g)}catch{}return!0}finally{F.p=x,L.T=d,bv(a,n)}}function yv(a,n,l){n=Fa(l,n),n=jp(a.stateNode,n,2),a=Vn(a,n,2),a!==null&&(yt(a,2),Es(a))}function it(a,n,l){if(a.tag===3)yv(a,a,l);else for(;n!==null;){if(n.tag===3){yv(n,a,l);break}else if(n.tag===1){var d=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Zn===null||!Zn.has(d))){a=Fa(l,a),l=j0(2),d=Vn(n,l,2),d!==null&&(N0(l,d,n,a),yt(d,2),Es(d));break}}n=n.return}}function Vp(a,n,l){var d=a.pingCache;if(d===null){d=a.pingCache=new R5;var x=new Set;d.set(n,x)}else x=d.get(n),x===void 0&&(x=new Set,d.set(n,x));x.has(l)||(Bp=!0,x.add(l),a=U5.bind(null,a,n,l),n.then(a,a))}function U5(a,n,l){var d=a.pingCache;d!==null&&d.delete(n),a.pingedLanes|=a.suspendedLanes&l,a.warmLanes&=~l,mt===a&&(Ve&l)===l&&(Ct===4||Ct===3&&(Ve&62914560)===Ve&&300>Ke()-Xo?(nt&2)===0&&Vr(a,0):Up|=l,Qr===Ve&&(Qr=0)),Es(a)}function jv(a,n){n===0&&(n=la()),a=Mc(a,n),a!==null&&(yt(a,n),Es(a))}function I5(a){var n=a.memoizedState,l=0;n!==null&&(l=n.retryLane),jv(a,l)}function H5(a,n){var l=0;switch(a.tag){case 31:case 13:var d=a.stateNode,x=a.memoizedState;x!==null&&(l=x.retryLane);break;case 19:d=a.stateNode;break;case 22:d=a.stateNode._retryCache;break;default:throw Error(r(314))}d!==null&&d.delete(n),jv(a,l)}function $5(a,n){return qa(a,n)}var nd=null,Kr=null,Fp=!1,cd=!1,Kp=!1,tc=0;function Es(a){a!==Kr&&a.next===null&&(Kr===null?nd=Kr=a:Kr=Kr.next=a),cd=!0,Fp||(Fp=!0,Q5())}function ui(a,n){if(!Kp&&cd){Kp=!0;do for(var l=!1,d=nd;d!==null;){if(a!==0){var x=d.pendingLanes;if(x===0)var g=0;else{var C=d.suspendedLanes,D=d.pingedLanes;g=(1<<31-ra(42|a)+1)-1,g&=x&~(C&~D),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,Sv(d,g))}else g=Ve,g=ze(d,d===mt?g:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(g&3)===0||bt(d,g)||(l=!0,Sv(d,g));d=d.next}while(l);Kp=!1}}function q5(){Nv()}function Nv(){cd=Fp=!1;var a=0;tc!==0&&eT()&&(a=tc);for(var n=Ke(),l=null,d=nd;d!==null;){var x=d.next,g=Cv(d,n);g===0?(d.next=null,l===null?nd=x:l.next=x,x===null&&(Kr=l)):(l=d,(a!==0||(g&3)!==0)&&(cd=!0)),d=x}It!==0&&It!==5||ui(a),tc!==0&&(tc=0)}function Cv(a,n){for(var l=a.suspendedLanes,d=a.pingedLanes,x=a.expirationTimes,g=a.pendingLanes&-62914561;0<g;){var C=31-ra(g),D=1<<C,U=x[C];U===-1?((D&l)===0||(D&d)!==0)&&(x[C]=qt(D,n)):U<=n&&(a.expiredLanes|=D),g&=~D}if(n=mt,l=Ve,l=ze(a,a===n?l:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),d=a.callbackNode,l===0||a===n&&(lt===2||lt===9)||a.cancelPendingCommit!==null)return d!==null&&d!==null&&On(d),a.callbackNode=null,a.callbackPriority=0;if((l&3)===0||bt(a,l)){if(n=l&-l,n===a.callbackPriority)return n;switch(d!==null&&On(d),os(l)){case 2:case 8:l=lo;break;case 32:l=Sc;break;case 268435456:l=qs;break;default:l=Sc}return d=wv.bind(null,a),l=qa(l,d),a.callbackPriority=n,a.callbackNode=l,n}return d!==null&&d!==null&&On(d),a.callbackPriority=2,a.callbackNode=null,2}function wv(a,n){if(It!==0&&It!==5)return a.callbackNode=null,a.callbackPriority=0,null;var l=a.callbackNode;if(sd()&&a.callbackNode!==l)return null;var d=Ve;return d=ze(a,a===mt?d:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),d===0?null:(cv(a,d,n),Cv(a,Ke()),a.callbackNode!=null&&a.callbackNode===l?wv.bind(null,a):null)}function Sv(a,n){if(sd())return null;cv(a,n,!0)}function Q5(){aT(function(){(nt&6)!==0?qa(wc,q5):Nv()})}function Gp(){if(tc===0){var a=Mr;a===0&&(a=mr,mr<<=1,(mr&261888)===0&&(mr=256)),tc=a}return tc}function Tv(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:po(""+a)}function kv(a,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,a.id&&l.setAttribute("form",a.id),n.parentNode.insertBefore(l,n),a=new FormData(a),l.parentNode.removeChild(l),a}function W5(a,n,l,d,x){if(n==="submit"&&l&&l.stateNode===x){var g=Tv((x[va]||null).action),C=d.submitter;C&&(n=(n=C[va]||null)?Tv(n.formAction):C.getAttribute("formAction"),n!==null&&(g=n,C=null));var D=new ho("action","action",null,d,x);a.push({event:D,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(tc!==0){var U=C?kv(x,C):new FormData(x);fp(l,{pending:!0,data:U,method:x.method,action:g},null,U)}}else typeof g=="function"&&(D.preventDefault(),U=C?kv(x,C):new FormData(x),fp(l,{pending:!0,data:U,method:x.method,action:g},g,U))},currentTarget:x}]})}}for(var Yp=0;Yp<Pm.length;Yp++){var Xp=Pm[Yp],V5=Xp.toLowerCase(),F5=Xp[0].toUpperCase()+Xp.slice(1);ds(V5,"on"+F5)}ds(nb,"onAnimationEnd"),ds(cb,"onAnimationIteration"),ds(rb,"onAnimationStart"),ds("dblclick","onDoubleClick"),ds("focusin","onFocus"),ds("focusout","onBlur"),ds(o5,"onTransitionRun"),ds(d5,"onTransitionStart"),ds(u5,"onTransitionCancel"),ds(lb,"onTransitionEnd"),vr("onMouseEnter",["mouseout","mouseover"]),vr("onMouseLeave",["mouseout","mouseover"]),vr("onPointerEnter",["pointerout","pointerover"]),vr("onPointerLeave",["pointerout","pointerover"]),Ec("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ec("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ec("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ec("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ec("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ec("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),K5=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mi));function Dv(a,n){n=(n&4)!==0;for(var l=0;l<a.length;l++){var d=a[l],x=d.event;d=d.listeners;e:{var g=void 0;if(n)for(var C=d.length-1;0<=C;C--){var D=d[C],U=D.instance,ee=D.currentTarget;if(D=D.listener,U!==g&&x.isPropagationStopped())break e;g=D,x.currentTarget=ee;try{g(x)}catch(oe){yo(oe)}x.currentTarget=null,g=U}else for(C=0;C<d.length;C++){if(D=d[C],U=D.instance,ee=D.currentTarget,D=D.listener,U!==g&&x.isPropagationStopped())break e;g=D,x.currentTarget=ee;try{g(x)}catch(oe){yo(oe)}x.currentTarget=null,g=U}}}}function We(a,n){var l=n[dm];l===void 0&&(l=n[dm]=new Set);var d=a+"__bubble";l.has(d)||(Ev(n,a,2,!1),l.add(d))}function Zp(a,n,l){var d=0;n&&(d|=4),Ev(l,a,d,n)}var rd="_reactListening"+Math.random().toString(36).slice(2);function Jp(a){if(!a[rd]){a[rd]=!0,Nh.forEach(function(l){l!=="selectionchange"&&(K5.has(l)||Zp(l,!1,a),Zp(l,!0,a))});var n=a.nodeType===9?a:a.ownerDocument;n===null||n[rd]||(n[rd]=!0,Zp("selectionchange",!1,n))}}function Ev(a,n,l,d){switch(ny(n)){case 2:var x=NT;break;case 8:x=CT;break;default:x=xx}l=x.bind(null,n,l,a),x=void 0,!vm||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(x=!0),d?x!==void 0?a.addEventListener(n,l,{capture:!0,passive:x}):a.addEventListener(n,l,!0):x!==void 0?a.addEventListener(n,l,{passive:x}):a.addEventListener(n,l,!1)}function ex(a,n,l,d,x){var g=d;if((n&1)===0&&(n&2)===0&&d!==null)e:for(;;){if(d===null)return;var C=d.tag;if(C===3||C===4){var D=d.stateNode.containerInfo;if(D===x)break;if(C===4)for(C=d.return;C!==null;){var U=C.tag;if((U===3||U===4)&&C.stateNode.containerInfo===x)return;C=C.return}for(;D!==null;){if(C=gr(D),C===null)return;if(U=C.tag,U===5||U===6||U===26||U===27){d=g=C;continue e}D=D.parentNode}}d=d.return}Rh(function(){var ee=g,oe=hm(l),ue=[];e:{var ae=ib.get(a);if(ae!==void 0){var re=ho,Te=a;switch(a){case"keypress":if(fo(l)===0)break e;case"keydown":case"keyup":re=H3;break;case"focusin":Te="focus",re=Cm;break;case"focusout":Te="blur",re=Cm;break;case"beforeblur":case"afterblur":re=Cm;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=Lh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=E3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=Q3;break;case nb:case cb:case rb:re=P3;break;case lb:re=V3;break;case"scroll":case"scrollend":re=k3;break;case"wheel":re=K3;break;case"copy":case"cut":case"paste":re=R3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=Uh;break;case"toggle":case"beforetoggle":re=Y3}var Oe=(n&4)!==0,ut=!Oe&&(a==="scroll"||a==="scrollend"),K=Oe?ae!==null?ae+"Capture":null:ae;Oe=[];for(var $=ee,J;$!==null;){var de=$;if(J=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||J===null||K===null||(de=Rl($,K),de!=null&&Oe.push(pi($,de,J))),ut)break;$=$.return}0<Oe.length&&(ae=new re(ae,Te,null,l,oe),ue.push({event:ae,listeners:Oe}))}}if((n&7)===0){e:{if(ae=a==="mouseover"||a==="pointerover",re=a==="mouseout"||a==="pointerout",ae&&l!==gm&&(Te=l.relatedTarget||l.fromElement)&&(gr(Te)||Te[fr]))break e;if((re||ae)&&(ae=oe.window===oe?oe:(ae=oe.ownerDocument)?ae.defaultView||ae.parentWindow:window,re?(Te=l.relatedTarget||l.toElement,re=ee,Te=Te?gr(Te):null,Te!==null&&(ut=o(Te),Oe=Te.tag,Te!==ut||Oe!==5&&Oe!==27&&Oe!==6)&&(Te=null)):(re=null,Te=ee),re!==Te)){if(Oe=Lh,de="onMouseLeave",K="onMouseEnter",$="mouse",(a==="pointerout"||a==="pointerover")&&(Oe=Uh,de="onPointerLeave",K="onPointerEnter",$="pointer"),ut=re==null?ae:Ml(re),J=Te==null?ae:Ml(Te),ae=new Oe(de,$+"leave",re,l,oe),ae.target=ut,ae.relatedTarget=J,de=null,gr(oe)===ee&&(Oe=new Oe(K,$+"enter",Te,l,oe),Oe.target=J,Oe.relatedTarget=ut,de=Oe),ut=de,re&&Te)t:{for(Oe=G5,K=re,$=Te,J=0,de=K;de;de=Oe(de))J++;de=0;for(var Me=$;Me;Me=Oe(Me))de++;for(;0<J-de;)K=Oe(K),J--;for(;0<de-J;)$=Oe($),de--;for(;J--;){if(K===$||$!==null&&K===$.alternate){Oe=K;break t}K=Oe(K),$=Oe($)}Oe=null}else Oe=null;re!==null&&_v(ue,ae,re,Oe,!1),Te!==null&&ut!==null&&_v(ue,ut,Te,Oe,!0)}}e:{if(ae=ee?Ml(ee):window,re=ae.nodeName&&ae.nodeName.toLowerCase(),re==="select"||re==="input"&&ae.type==="file")var Xe=Fh;else if(Wh(ae))if(Kh)Xe=r5;else{Xe=n5;var Ee=s5}else re=ae.nodeName,!re||re.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?ee&&fm(ee.elementType)&&(Xe=Fh):Xe=c5;if(Xe&&(Xe=Xe(a,ee))){Vh(ue,Xe,l,oe);break e}Ee&&Ee(a,ae,ee),a==="focusout"&&ee&&ae.type==="number"&&ee.memoizedProps.value!=null&&xm(ae,"number",ae.value)}switch(Ee=ee?Ml(ee):window,a){case"focusin":(Wh(Ee)||Ee.contentEditable==="true")&&(Sr=Ee,Em=ee,$l=null);break;case"focusout":$l=Em=Sr=null;break;case"mousedown":_m=!0;break;case"contextmenu":case"mouseup":case"dragend":_m=!1,ab(ue,l,oe);break;case"selectionchange":if(i5)break;case"keydown":case"keyup":ab(ue,l,oe)}var $e;if(Sm)e:{switch(a){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else wr?qh(a,l)&&(Fe="onCompositionEnd"):a==="keydown"&&l.keyCode===229&&(Fe="onCompositionStart");Fe&&(Ih&&l.locale!=="ko"&&(wr||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&wr&&($e=Oh()):(Un=oe,ym="value"in Un?Un.value:Un.textContent,wr=!0)),Ee=ld(ee,Fe),0<Ee.length&&(Fe=new Bh(Fe,a,null,l,oe),ue.push({event:Fe,listeners:Ee}),$e?Fe.data=$e:($e=Qh(l),$e!==null&&(Fe.data=$e)))),($e=Z3?J3(a,l):e5(a,l))&&(Fe=ld(ee,"onBeforeInput"),0<Fe.length&&(Ee=new Bh("onBeforeInput","beforeinput",null,l,oe),ue.push({event:Ee,listeners:Fe}),Ee.data=$e)),W5(ue,a,ee,l,oe)}Dv(ue,n)})}function pi(a,n,l){return{instance:a,listener:n,currentTarget:l}}function ld(a,n){for(var l=n+"Capture",d=[];a!==null;){var x=a,g=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||g===null||(x=Rl(a,l),x!=null&&d.unshift(pi(a,x,g)),x=Rl(a,n),x!=null&&d.push(pi(a,x,g))),a.tag===3)return d;a=a.return}return[]}
vendor: 5,206 bytes, lines 48-49
48function G5(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function _v(a,n,l,d,x){for(var g=n._reactName,C=[];l!==null&&l!==d;){var D=l,U=D.alternate,ee=D.stateNode;if(D=D.tag,U!==null&&U===d)break;D!==5&&D!==26&&D!==27||ee===null||(U=ee,x?(ee=Rl(l,g),ee!=null&&C.unshift(pi(l,ee,U))):x||(ee=Rl(l,g),ee!=null&&C.push(pi(l,ee,U)))),l=l.return}C.length!==0&&a.push({event:n,listeners:C})}var Y5=/\r\n?/g,X5=/\u0000|\uFFFD/g;function Av(a){return(typeof a=="string"?a:""+a).replace(Y5,`
49`).replace(X5,"")}function Pv(a,n){return n=Av(n),Av(a)===n}function dt(a,n,l,d,x,g){switch(l){case"children":typeof d=="string"?n==="body"||n==="textarea"&&d===""||jr(a,d):(typeof d=="number"||typeof d=="bigint")&&n!=="body"&&jr(a,""+d);break;case"className":uo(a,"class",d);break;case"tabIndex":uo(a,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":uo(a,l,d);break;case"style":Ph(a,d,g);break;case"data":if(n!=="object"){uo(a,"data",d);break}case"src":case"href":if(d===""&&(n!=="a"||l!=="href")){a.removeAttribute(l);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){a.removeAttribute(l);break}d=po(""+d),a.setAttribute(l,d);break;case"action":case"formAction":if(typeof d=="function"){a.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(l==="formAction"?(n!=="input"&&dt(a,n,"name",x.name,x,null),dt(a,n,"formEncType",x.formEncType,x,null),dt(a,n,"formMethod",x.formMethod,x,null),dt(a,n,"formTarget",x.formTarget,x,null)):(dt(a,n,"encType",x.encType,x,null),dt(a,n,"method",x.method,x,null),dt(a,n,"target",x.target,x,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){a.removeAttribute(l);break}d=po(""+d),a.setAttribute(l,d);break;case"onClick":d!=null&&(a.onclick=Ws);break;case"onScroll":d!=null&&We("scroll",a);break;case"onScrollEnd":d!=null&&We("scrollend",a);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(l=d.__html,l!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=l}}break;case"multiple":a.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":a.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){a.removeAttribute("xlink:href");break}l=po(""+d),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(l,""+d):a.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(l,""):a.removeAttribute(l);break;case"capture":case"download":d===!0?a.setAttribute(l,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(l,d):a.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?a.setAttribute(l,d):a.removeAttribute(l);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?a.removeAttribute(l):a.setAttribute(l,d);break;case"popover":We("beforetoggle",a),We("toggle",a),oo(a,"popover",d);break;case"xlinkActuate":Qs(a,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Qs(a,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Qs(a,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Qs(a,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Qs(a,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Qs(a,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Qs(a,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Qs(a,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Qs(a,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":oo(a,"is",d);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=S3.get(l)||l,oo(a,l,d))}}function tx(a,n,l,d,x,g){switch(l){case"style":Ph(a,d,g);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(l=d.__html,l!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=l}}break;
vendor: 7,731 bytes, line 49
49case"children":typeof d=="string"?jr(a,d):(typeof d=="number"||typeof d=="bigint")&&jr(a,""+d);break;case"onScroll":d!=null&&We("scroll",a);break;case"onScrollEnd":d!=null&&We("scrollend",a);break;case"onClick":d!=null&&(a.onclick=Ws);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ch.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(x=l.endsWith("Capture"),n=l.slice(2,x?l.length-7:void 0),g=a[va]||null,g=g!=null?g[l]:null,typeof g=="function"&&a.removeEventListener(n,g,x),typeof d=="function")){typeof g!="function"&&g!==null&&(l in a?a[l]=null:a.hasAttribute(l)&&a.removeAttribute(l)),a.addEventListener(n,d,x);break e}l in a?a[l]=d:d===!0?a.setAttribute(l,""):oo(a,l,d)}}}function Zt(a,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",a),We("load",a);var d=!1,x=!1,g;for(g in l)if(l.hasOwnProperty(g)){var C=l[g];if(C!=null)switch(g){case"src":d=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:dt(a,n,g,C,l,null)}}x&&dt(a,n,"srcSet",l.srcSet,l,null),d&&dt(a,n,"src",l.src,l,null);return;case"input":We("invalid",a);var D=g=C=x=null,U=null,ee=null;for(d in l)if(l.hasOwnProperty(d)){var oe=l[d];if(oe!=null)switch(d){case"name":x=oe;break;case"type":C=oe;break;case"checked":U=oe;break;case"defaultChecked":ee=oe;break;case"value":g=oe;break;case"defaultValue":D=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,n));break;default:dt(a,n,d,oe,l,null)}}Dh(a,g,D,U,ee,C,x,!1);return;case"select":We("invalid",a),d=C=g=null;for(x in l)if(l.hasOwnProperty(x)&&(D=l[x],D!=null))switch(x){case"value":g=D;break;case"defaultValue":C=D;break;case"multiple":d=D;default:dt(a,n,x,D,l,null)}n=g,l=C,a.multiple=!!d,n!=null?yr(a,!!d,n,!1):l!=null&&yr(a,!!d,l,!0);return;case"textarea":We("invalid",a),g=x=d=null;for(C in l)if(l.hasOwnProperty(C)&&(D=l[C],D!=null))switch(C){case"value":d=D;break;case"defaultValue":x=D;break;case"children":g=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(91));break;default:dt(a,n,C,D,l,null)}_h(a,d,x,g);return;case"option":for(U in l)if(l.hasOwnProperty(U)&&(d=l[U],d!=null))switch(U){case"selected":a.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:dt(a,n,U,d,l,null)}return;case"dialog":We("beforetoggle",a),We("toggle",a),We("cancel",a),We("close",a);break;case"iframe":case"object":We("load",a);break;case"video":case"audio":for(d=0;d<mi.length;d++)We(mi[d],a);break;case"image":We("error",a),We("load",a);break;case"details":We("toggle",a);break;case"embed":case"source":case"link":We("error",a),We("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in l)if(l.hasOwnProperty(ee)&&(d=l[ee],d!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:dt(a,n,ee,d,l,null)}return;default:if(fm(n)){for(oe in l)l.hasOwnProperty(oe)&&(d=l[oe],d!==void 0&&tx(a,n,oe,d,l,void 0));return}}for(D in l)l.hasOwnProperty(D)&&(d=l[D],d!=null&&dt(a,n,D,d,l,null))}function Z5(a,n,l,d){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,g=null,C=null,D=null,U=null,ee=null,oe=null;for(re in l){var ue=l[re];if(l.hasOwnProperty(re)&&ue!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":U=ue;default:d.hasOwnProperty(re)||dt(a,n,re,null,d,ue)}}for(var ae in d){var re=d[ae];if(ue=l[ae],d.hasOwnProperty(ae)&&(re!=null||ue!=null))switch(ae){case"type":g=re;break;case"name":x=re;break;case"checked":ee=re;break;case"defaultChecked":oe=re;break;case"value":C=re;break;case"defaultValue":D=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,n));break;default:re!==ue&&dt(a,n,ae,re,d,ue)}}pm(a,C,D,U,ee,oe,g,x);return;case"select":re=C=D=ae=null;for(g in l)if(U=l[g],l.hasOwnProperty(g)&&U!=null)switch(g){case"value":break;case"multiple":re=U;default:d.hasOwnProperty(g)||dt(a,n,g,null,d,U)}for(x in d)if(g=d[x],U=l[x],d.hasOwnProperty(x)&&(g!=null||U!=null))switch(x){case"value":ae=g;break;case"defaultValue":D=g;break;case"multiple":C=g;default:g!==U&&dt(a,n,x,g,d,U)}n=D,l=C,d=re,ae!=null?yr(a,!!l,ae,!1):!!d!=!!l&&(n!=null?yr(a,!!l,n,!0):yr(a,!!l,l?[]:"",!1));return;case"textarea":re=ae=null;for(D in l)if(x=l[D],l.hasOwnProperty(D)&&x!=null&&!d.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:dt(a,n,D,null,d,x)}for(C in d)if(x=d[C],g=l[C],d.hasOwnProperty(C)&&(x!=null||g!=null))switch(C){case"value":ae=x;break;case"defaultValue":re=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==g&&dt(a,n,C,x,d,g)}Eh(a,ae,re);return;case"option":for(var Te in l)if(ae=l[Te],l.hasOwnProperty(Te)&&ae!=null&&!d.hasOwnProperty(Te))switch(Te){case"selected":a.selected=!1;break;default:dt(a,n,Te,null,d,ae)}for(U in d)if(ae=d[U],re=l[U],d.hasOwnProperty(U)&&ae!==re&&(ae!=null||re!=null))switch(U){case"selected":a.selected=ae&&typeof ae!="function"&&typeof ae!="symbol";break;default:dt(a,n,U,ae,d,re)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Oe in l)ae=l[Oe],l.hasOwnProperty(Oe)&&ae!=null&&!d.hasOwnProperty(Oe)&&dt(a,n,Oe,null,d,ae);for(ee in d)if(ae=d[ee],re=l[ee],d.hasOwnProperty(ee)&&ae!==re&&(ae!=null||re!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,n));break;default:dt(a,n,ee,ae,d,re)}return;default:if(fm(n)){for(var ut in l)ae=l[ut],l.hasOwnProperty(ut)&&ae!==void 0&&!d.hasOwnProperty(ut)&&tx(a,n,ut,void 0,d,ae);for(oe in d)ae=d[oe],re=l[oe],!d.hasOwnProperty(oe)||ae===re||ae===void 0&&re===void 0||tx(a,n,oe,ae,d,re);return}}for(var K in l)ae=l[K],l.hasOwnProperty(K)&&ae!=null&&!d.hasOwnProperty(K)&&dt(a,n,K,null,d,ae);for(ue in d)ae=d[ue],re=l[ue],!d.hasOwnProperty(ue)||ae===re||ae==null&&re==null||dt(a,n,ue,ae,d,re)}function Mv(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function J5(){if(typeof performance.getEntriesByType=="function"){for(var a=0,n=0,l=performance.getEntriesByType("resource"),d=0;d<l.length;d++){var x=l[d],g=x.transferSize,C=x.initiatorType,D=x.duration;if(g&&D&&Mv(C)){for(C=0,D=x.responseEnd,d+=1;d<l.length;d++){var U=l[d],ee=U.startTime;if(ee>D)break;var oe=U.transferSize,ue=U.initiatorType;oe&&Mv(ue)&&(U=U.responseEnd,C+=oe*(U<D?1:(D-ee)/(U-ee)))}if(--d,n+=8*(g+C)/(x.duration/1e3),a++,10<a)break}}if(0<a)return n/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var ax=null,sx=null;function id(a){return a.nodeType===9?a:a.ownerDocument}function Rv(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ov(a,n){if(a===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&n==="foreignObject"?0:a}function nx(a,n){return a==="textarea"||a==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var cx=null;function eT(){var a=window.event;return a&&a.type==="popstate"?a===cx?!1:(cx=a,!0):(cx=null,!1)}var zv=typeof setTimeout=="function"?setTimeout:void 0,tT=typeof clearTimeout=="function"?clearTimeout:void 0,Lv=typeof Promise=="function"?Promise:void 0,aT
vendor: 13,843 bytes, line 49
49=typeof queueMicrotask=="function"?queueMicrotask:typeof Lv<"u"?function(a){return Lv.resolve(null).then(a).catch(sT)}:zv;function sT(a){setTimeout(function(){throw a})}function ac(a){return a==="head"}function Bv(a,n){var l=n,d=0;do{var x=l.nextSibling;if(a.removeChild(l),x&&x.nodeType===8)if(l=x.data,l==="/$"||l==="/&"){if(d===0){a.removeChild(x),Zr(n);return}d--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")d++;else if(l==="html")xi(a.ownerDocument.documentElement);else if(l==="head"){l=a.ownerDocument.head,xi(l);for(var g=l.firstChild;g;){var C=g.nextSibling,D=g.nodeName;g[Pl]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&g.rel.toLowerCase()==="stylesheet"||l.removeChild(g),g=C}}else l==="body"&&xi(a.ownerDocument.body);l=x}while(l);Zr(n)}function Uv(a,n){var l=a;a=0;do{var d=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),d&&d.nodeType===8)if(l=d.data,l==="/$"){if(a===0)break;a--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||a++;l=d}while(l)}function rx(a){var n=a.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":rx(l),um(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}a.removeChild(l)}}function nT(a,n,l,d){for(;a.nodeType===1;){var x=l;if(a.nodeName.toLowerCase()!==n.toLowerCase()){if(!d&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(d){if(!a[Pl])switch(n){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(g=a.getAttribute("rel"),g==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(g!==x.rel||a.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||a.getAttribute("title")!==(x.title==null?null:x.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(g=a.getAttribute("src"),(g!==(x.src==null?null:x.src)||a.getAttribute("type")!==(x.type==null?null:x.type)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&g&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(n==="input"&&a.type==="hidden"){var g=x.name==null?null:""+x.name;if(x.type==="hidden"&&a.getAttribute("name")===g)return a}else return a;if(a=Za(a.nextSibling),a===null)break}return null}function cT(a,n,l){if(n==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!l||(a=Za(a.nextSibling),a===null))return null;return a}function Iv(a,n){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!n||(a=Za(a.nextSibling),a===null))return null;return a}function lx(a){return a.data==="$?"||a.data==="$~"}function ix(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function rT(a,n){var l=a.ownerDocument;if(a.data==="$~")a._reactRetry=n;else if(a.data!=="$?"||l.readyState!=="loading")n();else{var d=function(){n(),l.removeEventListener("DOMContentLoaded",d)};l.addEventListener("DOMContentLoaded",d),a._reactRetry=d}}function Za(a){for(;a!=null;a=a.nextSibling){var n=a.nodeType;if(n===1||n===3)break;if(n===8){if(n=a.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return a}var ox=null;function Hv(a){a=a.nextSibling;for(var n=0;a;){if(a.nodeType===8){var l=a.data;if(l==="/$"||l==="/&"){if(n===0)return Za(a.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}a=a.nextSibling}return null}function $v(a){a=a.previousSibling;for(var n=0;a;){if(a.nodeType===8){var l=a.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return a;n--}else l!=="/$"&&l!=="/&"||n++}a=a.previousSibling}return null}function qv(a,n,l){switch(n=id(l),a){case"html":if(a=n.documentElement,!a)throw Error(r(452));return a;case"head":if(a=n.head,!a)throw Error(r(453));return a;case"body":if(a=n.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function xi(a){for(var n=a.attributes;n.length;)a.removeAttributeNode(n[0]);um(a)}var Ja=new Map,Qv=new Set;function od(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var ln=F.d;F.d={f:lT,r:iT,D:oT,C:dT,L:uT,m:mT,X:xT,S:pT,M:fT};function lT(){var a=ln.f(),n=ed();return a||n}function iT(a){var n=hr(a);n!==null&&n.tag===5&&n.type==="form"?l0(n):ln.r(a)}var Gr=typeof document>"u"?null:document;function Wv(a,n,l){var d=Gr;if(d&&typeof n=="string"&&n){var x=Wa(n);x='link[rel="'+a+'"][href="'+x+'"]',typeof l=="string"&&(x+='[crossorigin="'+l+'"]'),Qv.has(x)||(Qv.add(x),a={rel:a,crossOrigin:l,href:n},d.querySelector(x)===null&&(n=d.createElement("link"),Zt(n,"link",a),Qt(n),d.head.appendChild(n)))}}function oT(a){ln.D(a),Wv("dns-prefetch",a,null)}function dT(a,n){ln.C(a,n),Wv("preconnect",a,n)}function uT(a,n,l){ln.L(a,n,l);var d=Gr;if(d&&a&&n){var x='link[rel="preload"][as="'+Wa(n)+'"]';n==="image"&&l&&l.imageSrcSet?(x+='[imagesrcset="'+Wa(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(x+='[imagesizes="'+Wa(l.imageSizes)+'"]')):x+='[href="'+Wa(a)+'"]';var g=x;switch(n){case"style":g=Yr(a);break;case"script":g=Xr(a)}Ja.has(g)||(a=h({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:a,as:n},l),Ja.set(g,a),d.querySelector(x)!==null||n==="style"&&d.querySelector(fi(g))||n==="script"&&d.querySelector(gi(g))||(n=d.createElement("link"),Zt(n,"link",a),Qt(n),d.head.appendChild(n)))}}function mT(a,n){ln.m(a,n);var l=Gr;if(l&&a){var d=n&&typeof n.as=="string"?n.as:"script",x='link[rel="modulepreload"][as="'+Wa(d)+'"][href="'+Wa(a)+'"]',g=x;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Xr(a)}if(!Ja.has(g)&&(a=h({rel:"modulepreload",href:a},n),Ja.set(g,a),l.querySelector(x)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(gi(g)))return}d=l.createElement("link"),Zt(d,"link",a),Qt(d),l.head.appendChild(d)}}}function pT(a,n,l){ln.S(a,n,l);var d=Gr;if(d&&a){var x=br(d).hoistableStyles,g=Yr(a);n=n||"default";var C=x.get(g);if(!C){var D={loading:0,preload:null};if(C=d.querySelector(fi(g)))D.loading=5;else{a=h({rel:"stylesheet",href:a,"data-precedence":n},l),(l=Ja.get(g))&&dx(a,l);var U=C=d.createElement("link");Qt(U),Zt(U,"link",a),U._p=new Promise(function(ee,oe){U.onload=ee,U.onerror=oe}),U.addEventListener("load",function(){D.loading|=1}),U.addEventListener("error",function(){D.loading|=2}),D.loading|=4,dd(C,n,d)}C={type:"stylesheet",instance:C,count:1,state:D},x.set(g,C)}}}function xT(a,n){ln.X(a,n);var l=Gr;if(l&&a){var d=br(l).hoistableScripts,x=Xr(a),g=d.get(x);g||(g=l.querySelector(gi(x)),g||(a=h({src:a,async:!0},n),(n=Ja.get(x))&&ux(a,n),g=l.createElement("script"),Qt(g),Zt(g,"link",a),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},d.set(x,g))}}function fT(a,n){ln.M(a,n);var l=Gr;if(l&&a){var d=br(l).hoistableScripts,x=Xr(a),g=d.get(x);g||(g=l.querySelector(gi(x)),g||(a=h({src:a,async:!0,type:"module"},n),(n=Ja.get(x))&&ux(a,n),g=l.createElement("script"),Qt(g),Zt(g,"link",a),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},d.set(x,g))}}function Vv(a,n,l,d){var x=(x=be.current)?od(x):null;if(!x)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=Yr(l.href),l=br(x).hoistableStyles,d=l.get(n),d||(d={type:"style",instance:null,count:0,state:null},l.set(n,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){a=Yr(l.href);var g=br(x).hoistableStyles,C=g.get(a);if(C||(x=x.ownerDocument||x,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(a,C),(g=x.querySelector(fi(a)))&&!g._p&&(C.instance=g,C.state.loading=5),Ja.has(a)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ja.set(a,l),g||gT(x,a,l,C.state))),n&&d===null)throw Error(r(528,""));return C}if(n&&d!==null)throw Error(r(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Xr(l),l=br(x).hoistableScripts,d=l.get(n),d||(d={type:"script",instance:null,count:0,state:null},l.set(n,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Yr(a){return'href="'+Wa(a)+'"'}function fi(a){return'link[rel="stylesheet"]['+a+"]"}function Fv(a){return h({},a,{"data-precedence":a.precedence,precedence:null})}function gT(a,n,l,d){a.querySelector('link[rel="preload"][as="style"]['+n+"]")?d.loading=1:(n=a.createElement("link"),d.preload=n,n.addEventListener("load",function(){return d.loading|=1}),n.addEventListener("error",function(){return d.loading|=2}),Zt(n,"link",l),Qt(n),a.head.appendChild(n))}function Xr(a){return'[src="'+Wa(a)+'"]'}function gi(a){return"script[async]"+a}function Kv(a,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var d=a.querySelector('style[data-href~="'+Wa(l.href)+'"]');if(d)return n.instance=d,Qt(d),d;var x=h({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return d=(a.ownerDocument||a).createElement("style"),Qt(d),Zt(d,"style",x),dd(d,l.precedence,a),n.instance=d;case"stylesheet":x=Yr(l.href);var g=a.querySelector(fi(x));if(g)return n.state.loading|=4,n.instance=g,Qt(g),g;d=Fv(l),(x=Ja.get(x))&&dx(d,x),g=(a.ownerDocument||a).createElement("link"),Qt(g);var C=g;return C._p=new Promise(function(D,U){C.onload=D,C.onerror=U}),Zt(g,"link",d),n.state.loading|=4,dd(g,l.precedence,a),n.instance=g;case"script":return g=Xr(l.src),(x=a.querySelector(gi(g)))?(n.instance=x,Qt(x),x):(d=l,(x=Ja.get(g))&&(d=h({},l),ux(d,x)),a=a.ownerDocument||a,x=a.createElement("script"),Qt(x),Zt(x,"link",d),a.head.appendChild(x),n.instance=x);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(d=n.instance,n.state.loading|=4,dd(d,l.precedence,a));return n.instance}function dd(a,n,l){for(var d=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=d.length?d[d.length-1]:null,g=x,C=0;C<d.length;C++){var D=d[C];if(D.dataset.precedence===n)g=D;else if(g!==x)break}g?g.parentNode.insertBefore(a,g.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(a,n.firstChild))}function dx(a,n){a.crossOrigin==null&&(a.crossOrigin=n.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=n.referrerPolicy),a.title==null&&(a.title=n.title)}function ux(a,n){a.crossOrigin==null&&(a.crossOrigin=n.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=n.referrerPolicy),a.integrity==null&&(a.integrity=n.integrity)}var ud=null;function Gv(a,n,l){if(ud===null){var d=new Map,x=ud=new Map;x.set(l,d)}else x=ud,d=x.get(l),d||(d=new Map,x.set(l,d));if(d.has(a))return d;for(d.set(a,null),l=l.getElementsByTagName(a),x=0;x<l.length;x++){var g=l[x];if(!(g[Pl]||g[Kt]||a==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var C=g.getAttribute(n)||"";C=a+C;var D=d.get(C);D?D.push(g):d.set(C,[g])}}return d}function Yv(a,n,l){a=a.ownerDocument||a,a.head.insertBefore(l,n==="title"?a.querySelector("head > title"):null)}function hT(a,n,l){if(l===1||n.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return a=n.disabled,typeof n.precedence=="string"&&a==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Xv(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function bT(a,n,l,d){if(l.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var x=Yr(d.href),g=n.querySelector(fi(x));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(a.count++,a=md.bind(a),n.then(a,a)),l.state.loading|=4,l.instance=g,Qt(g);return}g=n.ownerDocument||n,d=Fv(d),(x=Ja.get(x))&&dx(d,x),g=g.createElement("link"),Qt(g);var C=g;C._p=new Promise(function(D,U){C.onload=D,C.onerror=U}),Zt(g,"link",d),l.instance=g}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(a.count++,l=md.bind(a),n.addEventListener("load",l),n.addEventListener("error",l))}}var mx=0;function vT(a,n){return a.stylesheets&&a.count===0&&xd(a,a.stylesheets),0<a.count||0<a.imgCount?function(l){var d=setTimeout(function(){if(a.stylesheets&&xd(a,a.stylesheets),a.unsuspend){var g=a.unsuspend;a.unsuspend=null,g()}},6e4+n);0<a.imgBytes&&mx===0&&(mx=62500*J5());var x=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&xd(a,a.stylesheets),a.unsuspend)){var g=a.unsuspend;a.unsuspend=null,g()}},(a.imgBytes>mx?50:800)+n);return a.unsuspend=l,function(){a.unsuspend=null,clearTimeout(d),clearTimeout(x)}}:null}function md(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xd(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var pd=null;function xd(a,n){a.stylesheets=null,a.unsuspend!==null&&(a.count++,pd=new Map,n.forEac
vendor: 12,446 bytes, line 49
49h(yT,a),pd=null,md.call(a))}function yT(a,n){if(!(n.state.loading&4)){var l=pd.get(a);if(l)var d=l.get(null);else{l=new Map,pd.set(a,l);for(var x=a.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<x.length;g++){var C=x[g];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(l.set(C.dataset.precedence,C),d=C)}d&&l.set(null,d)}x=n.instance,C=x.getAttribute("data-precedence"),g=l.get(C)||d,g===d&&l.set(null,x),l.set(C,x),this.count++,d=md.bind(this),x.addEventListener("load",d),x.addEventListener("error",d),g?g.parentNode.insertBefore(x,g.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(x,a.firstChild)),n.state.loading|=4}}var hi={$$typeof:E,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function jT(a,n,l,d,x,g,C,D,U){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ln(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ln(0),this.hiddenUpdates=Ln(null),this.identifierPrefix=d,this.onUncaughtError=x,this.onCaughtError=g,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function Zv(a,n,l,d,x,g,C,D,U,ee,oe,ue){return a=new jT(a,n,l,C,U,ee,oe,ue,D),n=1,g===!0&&(n|=24),g=Pa(3,null,null,n),a.current=g,g.stateNode=a,n=Wm(),n.refCount++,a.pooledCache=n,n.refCount++,g.memoizedState={element:d,isDehydrated:l,cache:n},Gm(g),a}function Jv(a){return a?(a=Dr,a):Dr}function ey(a,n,l,d,x,g){x=Jv(x),d.context===null?d.context=x:d.pendingContext=x,d=Wn(n),d.payload={element:l},g=g===void 0?null:g,g!==null&&(d.callback=g),l=Vn(a,d,n),l!==null&&(Sa(l,a,n),Gl(l,a,n))}function ty(a,n){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var l=a.retryLane;a.retryLane=l!==0&&l<n?l:n}}function px(a,n){ty(a,n),(a=a.alternate)&&ty(a,n)}function ay(a){if(a.tag===13||a.tag===31){var n=Mc(a,67108864);n!==null&&Sa(n,a,67108864),px(a,67108864)}}function sy(a){if(a.tag===13||a.tag===31){var n=La();n=xr(n);var l=Mc(a,n);l!==null&&Sa(l,a,n),px(a,n)}}var fd=!0;function NT(a,n,l,d){var x=L.T;L.T=null;var g=F.p;try{F.p=2,xx(a,n,l,d)}finally{F.p=g,L.T=x}}function CT(a,n,l,d){var x=L.T;L.T=null;var g=F.p;try{F.p=8,xx(a,n,l,d)}finally{F.p=g,L.T=x}}function xx(a,n,l,d){if(fd){var x=fx(d);if(x===null)ex(a,n,d,gd,l),cy(a,d);else if(ST(x,a,n,l,d))d.stopPropagation();else if(cy(a,d),n&4&&-1<wT.indexOf(a)){for(;x!==null;){var g=hr(x);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var C=Ss(g.pendingLanes);if(C!==0){var D=g;for(D.pendingLanes|=2,D.entangledLanes|=2;C;){var U=1<<31-ra(C);D.entanglements[1]|=U,C&=~U}Es(g),(nt&6)===0&&(Zo=Ke()+500,ui(0))}}break;case 31:case 13:D=Mc(g,2),D!==null&&Sa(D,g,2),ed(),px(g,2)}if(g=fx(d),g===null&&ex(a,n,d,gd,l),g===x)break;x=g}x!==null&&d.stopPropagation()}else ex(a,n,d,null,l)}}function fx(a){return a=hm(a),gx(a)}var gd=null;function gx(a){if(gd=null,a=gr(a),a!==null){var n=o(a);if(n===null)a=null;else{var l=n.tag;if(l===13){if(a=u(n),a!==null)return a;a=null}else if(l===31){if(a=m(n),a!==null)return a;a=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;a=null}else n!==a&&(a=null)}}return gd=a,null}function ny(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(lm()){case wc:return 2;case lo:return 8;case Sc:case _l:return 32;case qs:return 268435456;default:return 32}default:return 32}}var hx=!1,sc=null,nc=null,cc=null,bi=new Map,vi=new Map,rc=[],wT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function cy(a,n){switch(a){case"focusin":case"focusout":sc=null;break;case"dragenter":case"dragleave":nc=null;break;case"mouseover":case"mouseout":cc=null;break;case"pointerover":case"pointerout":bi.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":vi.delete(n.pointerId)}}function yi(a,n,l,d,x,g){return a===null||a.nativeEvent!==g?(a={blockedOn:n,domEventName:l,eventSystemFlags:d,nativeEvent:g,targetContainers:[x]},n!==null&&(n=hr(n),n!==null&&ay(n)),a):(a.eventSystemFlags|=d,n=a.targetContainers,x!==null&&n.indexOf(x)===-1&&n.push(x),a)}function ST(a,n,l,d,x){switch(n){case"focusin":return sc=yi(sc,a,n,l,d,x),!0;case"dragenter":return nc=yi(nc,a,n,l,d,x),!0;case"mouseover":return cc=yi(cc,a,n,l,d,x),!0;case"pointerover":var g=x.pointerId;return bi.set(g,yi(bi.get(g)||null,a,n,l,d,x)),!0;case"gotpointercapture":return g=x.pointerId,vi.set(g,yi(vi.get(g)||null,a,n,l,d,x)),!0}return!1}function ry(a){var n=gr(a.target);if(n!==null){var l=o(n);if(l!==null){if(n=l.tag,n===13){if(n=u(l),n!==null){a.blockedOn=n,yh(a.priority,function(){sy(l)});return}}else if(n===31){if(n=m(l),n!==null){a.blockedOn=n,yh(a.priority,function(){sy(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){a.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}a.blockedOn=null}function hd(a){if(a.blockedOn!==null)return!1;for(var n=a.targetContainers;0<n.length;){var l=fx(a.nativeEvent);if(l===null){l=a.nativeEvent;var d=new l.constructor(l.type,l);gm=d,l.target.dispatchEvent(d),gm=null}else return n=hr(l),n!==null&&ay(n),a.blockedOn=l,!1;n.shift()}return!0}function ly(a,n,l){hd(a)&&l.delete(n)}function TT(){hx=!1,sc!==null&&hd(sc)&&(sc=null),nc!==null&&hd(nc)&&(nc=null),cc!==null&&hd(cc)&&(cc=null),bi.forEach(ly),vi.forEach(ly)}function bd(a,n){a.blockedOn===n&&(a.blockedOn=null,hx||(hx=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,TT)))}var vd=null;function iy(a){vd!==a&&(vd=a,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){vd===a&&(vd=null);for(var n=0;n<a.length;n+=3){var l=a[n],d=a[n+1],x=a[n+2];if(typeof d!="function"){if(gx(d||l)===null)continue;break}var g=hr(l);g!==null&&(a.splice(n,3),n-=3,fp(g,{pending:!0,data:x,method:l.method,action:d},d,x))}}))}function Zr(a){function n(U){return bd(U,a)}sc!==null&&bd(sc,a),nc!==null&&bd(nc,a),cc!==null&&bd(cc,a),bi.forEach(n),vi.forEach(n);for(var l=0;l<rc.length;l++){var d=rc[l];d.blockedOn===a&&(d.blockedOn=null)}for(;0<rc.length&&(l=rc[0],l.blockedOn===null);)ry(l),l.blockedOn===null&&rc.shift();if(l=(a.ownerDocument||a).$$reactFormReplay,l!=null)for(d=0;d<l.length;d+=3){var x=l[d],g=l[d+1],C=x[va]||null;if(typeof g=="function")C||iy(l);else if(C){var D=null;if(g&&g.hasAttribute("formAction")){if(x=g,C=g[va]||null)D=C.formAction;else if(gx(x)!==null)continue}else D=C.action;typeof D=="function"?l[d+1]=D:(l.splice(d,3),d-=3),iy(l)}}}function oy(){function a(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(C){return x=C})},focusReset:"manual",scroll:"manual"})}function n(){x!==null&&(x(),x=null),d||setTimeout(l,20)}function l(){if(!d&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,x=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){d=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),x!==null&&(x(),x=null)}}}function bx(a){this._internalRoot=a}yd.prototype.render=bx.prototype.render=function(a){var n=this._internalRoot;if(n===null)throw Error(r(409));var l=n.current,d=La();ey(l,d,a,n,null,null)},yd.prototype.unmount=bx.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var n=a.containerInfo;ey(a.current,2,null,a,null,null),ed(),n[fr]=null}};function yd(a){this._internalRoot=a}yd.prototype.unstable_scheduleHydration=function(a){if(a){var n=om();a={blockedOn:null,target:a,priority:n};for(var l=0;l<rc.length&&n!==0&&n<rc[l].priority;l++);rc.splice(l,0,a),l===0&&ry(a)}};var dy=s.version;if(dy!=="19.2.1")throw Error(r(527,dy,"19.2.1"));F.findDOMNode=function(a){var n=a._reactInternals;if(n===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=f(n),a=a!==null?b(a):null,a=a===null?null:a.stateNode,a};var kT={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var jd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jd.isDisabled&&jd.supportsFiber)try{Tc=jd.inject(kT),ua=jd}catch{}}return Ci.createRoot=function(a,n){if(!i(a))throw Error(r(299));var l=!1,d="",x=h0,g=b0,C=v0;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(d=n.identifierPrefix),n.onUncaughtError!==void 0&&(x=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(C=n.onRecoverableError)),n=Zv(a,1,!1,null,null,l,d,null,x,g,C,oy),a[fr]=n.current,Jp(a),new bx(n)},Ci.hydrateRoot=function(a,n,l){if(!i(a))throw Error(r(299));var d=!1,x="",g=h0,C=b0,D=v0,U=null;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(x=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(C=l.onCaughtError),l.onRecoverableError!==void 0&&(D=l.onRecoverableError),l.formState!==void 0&&(U=l.formState)),n=Zv(a,1,!0,n,l??null,d,x,U,g,C,D,oy),n.context=Jv(null),l=n.current,d=La(),d=xr(d),x=Wn(d),x.callback=null,Vn(l,x,d),l=d,n.current.lanes=l,yt(n,l),Es(n),a[fr]=n.current,Jp(a),new yd(n)},Ci.version="19.2.1",Ci}var zy;function Wk(){if(zy)return Sx.exports;zy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(s){console.error(s)}}return t(),Sx.exports=Qk(),Sx.exports}var Vk=Wk(),Fk=(function(){function t(){this.keyToValue=new Map,this.valueToKey=new Map}return t.prototype.set=function(s,c){this.keyToValue.set(s,c),this.valueToKey.set(c,s)},t.prototype.getByKey=function(s){return this.keyToValue.get(s)},t.prototype.getByValue=function(s){return this.valueToKey.get(s)},t.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},t})(),rj=(function(){function t(s){this.generateIdentifier=s,this.kv=new Fk}return t.prototype.register=function(s,c){this.kv.getByValue(s)||(c||(c=this.generateIdentifier(s)),this.kv.set(c,s))},t.prototype.clear=function(){this.kv.clear()},t.prototype.getIdentifier=function(s){return this.kv.getByValue(s)},t.prototype.getValue=function(s){return this.kv.getByKey(s)},t})(),Kk=(function(){var t=function(s,c){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(s,c)};return function(s,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");
49t(s,c);function r(){this.constructor=s}s.prototype=c===null?Object.create(c):(r.prototype=c.prototype,new r)}})(),Gk=(function(t){Kk(s,t);function s(){var c=t.call(this,function(r){return r.name})||this;return c.classToAllowedProps=new Map,c}return s.prototype.register=function(c,r){typeof r=="object"?(r.allowProps&&this.classToAllowedProps.set(c,r.allowProps),t.prototype.register.call(this,c,r.identifier)):t.prototype.register.call(this,c,r)},s.prototype.getAllowedProps=function(c){return this.classToAllowedProps.get(c)},s})(rj),Yk=function(t,s){var c=typeof Symbol=="function"&&t[Symbol.iterator];if(!c)return t;var r=c.call(t),i,o=[],u;try{for(;(s===void 0||s-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(m){u={error:m}}finally{try{i&&!i.done&&(c=r.return)&&c.call(r)}finally{if(u)throw u.error}}return o};function Xk(t){if("values"in Object)return Object.values(t);var s=[];for(var c in t)t.hasOwnProperty(c)&&s.push(t[c]);return s}function Zk(t,s){var c=Xk(t);if("find"in c)return c.find(s);for(var r=c,i=0;i<r.length;i++){var o=r[i];if(s(o))return o}}function fl(t,s){Object.entries(t).forEach(function(c){var r=Yk(c,2),i=r[0],o=r[1];return s(o,i)})}function Vd(t,s){return t.indexOf(s)!==-1}function Ly(t,s){for(var c=0;c<t.length;c++){var r=t[c];if(s(r))return r}}var Jk=(function(){function t(){this.transfomers={}}return t.prototype.register=function(s){this.transfomers[s.name]=s},t.prototype.findApplicable=function(s){return Zk(this.transfomers,function(c){return c.isApplicable(s)})},t.prototype.findByName=function(s){return this.transfomers[s]},t})(),eD=function(t){return Object.prototype.toString.call(t).slice(8,-1)},lj=function(t){return typeof t>"u"},tD=function(t){return t===null},Pi=function(t){return typeof t!="object"||t===null||t===Object.prototype?!1:Object.getPrototypeOf(t)===null?!0:Object.getPrototypeOf(t)===Object.prototype},xf=function(t){return Pi(t)&&Object.keys(t).length===0},hc=function(t){return Array.isArray(t)},aD=function(t){return typeof t=="string"},sD=function(t){return typeof t=="number"&&!isNaN(t)},nD=function(t){return typeof t=="boolean"},cD=function(t){return t instanceof RegExp},Mi=function(t){return t instanceof Map},Ri=function(t){return t instanceof Set},ij=function(t){return eD(t)==="Symbol"},rD=function(t){return t instanceof Date&&!isNaN(t.valueOf())},lD=function(t){return t instanceof Error},By=function(t){return typeof t=="number"&&isNaN(t)},iD=function(t){return nD(t)||tD(t)||lj(t)||sD(t)||aD(t)||ij(t)},oD=function(t){return typeof t=="bigint"},dD=function(t){return t===1/0||t===-1/0},uD=function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},mD=function(t){return t instanceof URL},oj=function(t){return t.replace(/\./g,"\\.")},Ex=function(t){return t.map(String).map(oj).join(".")},Ei=function(t){for(var s=[],c="",r=0;r<t.length;r++){var i=t.charAt(r),o=i==="\\"&&t.charAt(r+1)===".";if(o){c+=".",r++;continue}var u=i===".";if(u){s.push(c),c="";continue}c+=i}var m=c;return s.push(m),s},ff=function(){return ff=Object.assign||function(t){for(var s,c=1,r=arguments.length;c<r;c++){s=arguments[c];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=s[i])}return t},ff.apply(this,arguments)},gf=function(t,s){var c=typeof Symbol=="function"&&t[Symbol.iterator];if(!c)return t;var r=c.call(t),i,o=[],u;try{for(;(s===void 0||s-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(m){u={error:m}}finally{try{i&&!i.done&&(c=r.return)&&c.call(r)}finally{if(u)throw u.error}}return o},hf=function(t,s){for(var c=0,r=s.length,i=t.length;c<r;c++,i++)t[i]=s[c];return t};function _s(t,s,c,r){return{isApplicable:t,annotation:s,transform:c,untransform:r}}var dj=[_s(lj,"undefined",function(){return null},function(){}),_s(oD,"bigint",function(t){return t.toString()},function(t){return typeof BigInt<"u"?BigInt(t):(console.error("Please add a BigInt polyfill."),t)}),_s(rD,"Date",function(t){return t.toISOString()},function(t){return new Date(t)}),_s(lD,"Error",function(t,s){var c={name:t.name,message:t.message};return s.allowedErrorProps.forEach(function(r){c[r]=t[r]}),c},function(t,s){var c=new Error(t.message);return c.name=t.name,c.stack=t.stack,s.allowedErrorProps.forEach(function(r){c[r]=t[r]}),c}),_s(cD,"regexp",function(t){return""+t},function(t){var s=t.slice(1,t.lastIndexOf("/")),c=t.slice(t.lastIndexOf("/")+1);return new RegExp(s,c)}
49),_s(Ri,"set",function(t){return hf([],gf(t.values()))},function(t){return new Set(t)}),_s(Mi,"map",function(t){return hf([],gf(t.entries()))},function(t){return new Map(t)}),_s(function(t){return By(t)||dD(t)},"number",function(t){return By(t)?"NaN":t>0?"Infinity":"-Infinity"},Number),_s(function(t){return t===0&&1/t===-1/0},"number",function(){return"-0"},Number),_s(mD,"URL",function(t){return t.toString()},function(t){return new URL(t)})];function ku(t,s,c,r){return{isApplicable:t,annotation:s,transform:c,untransform:r}}var uj=ku(function(t,s){if(ij(t)){var c=!!s.symbolRegistry.getIdentifier(t);return c}return!1},function(t,s){var c=s.symbolRegistry.getIdentifier(t);return["symbol",c]},function(t){return t.description},function(t,s,c){var r=c.symbolRegistry.getValue(s[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),pD=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(t,s){return t[s.name]=s,t},{}),mj=ku(uD,function(t){return["typed-array",t.constructor.name]},function(t){return hf([],gf(t))},function(t,s){var c=pD[s[1]];if(!c)throw new Error("Trying to deserialize unknown typed array");return new c(t)});function pj(t,s){if(t?.constructor){var c=!!s.classRegistry.getIdentifier(t.constructor);return c}return!1}var xj=ku(pj,function(t,s){var c=s.classRegistry.getIdentifier(t.constructor);return["class",c]},function(t,s){var c=s.classRegistry.getAllowedProps(t.constructor);if(!c)return ff({},t);var r={};return c.forEach(function(i){r[i]=t[i]}),r},function(t,s,c){var r=c.classRegistry.getValue(s[1]);if(!r)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(r.prototype),t)}),fj=ku(function(t,s){return!!s.customTransformerRegistry.findApplicable(t)},function(t,s){var c=s.customTransformerRegistry.findApplicable(t);return["custom",c.name]},function(t,s){var c=s.customTransformerRegistry.findApplicable(t);return c.serialize(t)},function(t,s,c){var r=c.customTransformerRegistry.findByName(s[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(t)}),xD=[xj,uj,fj,mj],Uy=function(t,s){var c=Ly(xD,function(i){return i.isApplicable(t,s)});if(c)return{value:c.transform(t,s),type:c.annotation(t,s)};var r=Ly(dj,function(i){return i.isApplicable(t,s)});if(r)return{value:r.transform(t,s),type:r.annotation}},gj={};dj.forEach(function(t){gj[t.annotation]=t});var fD=function(t,s,c){if(hc(s))switch(s[0]){case"symbol":return uj.untransform(t,s,c);case"class":return xj.untransform(t,s,c);case"custom":return fj.untransform(t,s,c);case"typed-array":return mj.untransform(t,s,c);default:throw new Error("Unknown transformation: "+s)}else{var r=gj[s];if(!r)throw new Error("Unknown transformation: "+s);return r.untransform(t,c)}},dl=function(t,s){for(var c=t.keys();s>0;)c.next(),s--;return c.next().value};function hj(t){if(Vd(t,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Vd(t,"prototype"))throw new Error("prototype is not allowed as a property");if(Vd(t,"constructor"))throw new Error("constructor is not allowed as a property")}var gD=function(t,s){hj(s);for(var c=0;c<s.length;c++){var r=s[c];if(Ri(t))t=dl(t,+r);else if(Mi(t)){var i=+r,o=+s[++c]==0?"key":"value",u=dl(t,i);switch(o){case"key":t=u;break;case"value":t=t.get(u);break}}else t=t[r]}return t},bf=function(t,s,c){if(hj(s),s.length===0)return c(t);for(var r=t,i=0;i<s.length-1;i++){var o=s[i];if(hc(r)){var u=+o;r=r[u]}else if(Pi(r))r=r[o];else if(Ri(r)){var m=+o;r=dl(r,m)}else if(Mi(r)){var p=i===s.length-2;if(p)break;var m=+o,f=+s[++i]==0?"key":"value",b=dl(r,m);switch(f){case"key":r=b;break;case"value":r=r.get(b);break}}}var h=s[s.length-1];if(hc(r)?r[+h]=c(r[+h]):Pi(r)&&(r[h]=c(r[h])),Ri(r)){var y=dl(r,+h),j=c(y);y!==j&&(r.delete(y),r.add(j))}if(Mi(r)){var m=+s[s.length-2],S=dl(r,m),f=+h==0?"key":"value";switch(f){case"key":{var N=c(S);r.set(N,r.get(S)),N!==S&&r.delete(S);break}case"value":{r.set(S,c(r.get(S)));break}}}return t},gn=function(t,s){var c=typeof Symbol=="function"&&t[Symbol.iterator];if(!c)return t;var r=c.call(t),i,o=[],u;try{for(;(s===void 0||s-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(m){u={error:m}}finally{try{i&&!i.done&&(c=r.return)&&c.call(r)}finally{if(u)throw u.error}}return o},pc=function(t,s){for(var c=0,r=s.length,i=t.length;c<r;c++,i++)t[i]=s[c];return t};function vf(t,s,c){if(c===void 0&&(c=[]),!!t){if(!hc(t)){fl(t,function(u,m){return vf(u,s,pc(pc([],gn(c)),gn(Ei(m))))});return}var r=gn(t,2),i=r[0],o=r[1];o&&fl(o,function(u,m){vf(u,s,pc(pc([],gn(c)),gn(Ei(m))))}),s(i,c)}}function hD(t,s,c){return vf(s,function(r,i){t=bf(t,i,function(o){return fD(o,r,c)})}),t}function bD(t,s){function c(u,m){var p=gD(t,Ei(m));
49u.map(Ei).forEach(function(f){t=bf(t,f,function(){return p})})}if(hc(s)){var r=gn(s,2),i=r[0],o=r[1];i.forEach(function(u){t=bf(t,Ei(u),function(){return t})}),o&&fl(o,c)}else fl(s,c);return t}var vD=function(t,s){return Pi(t)||hc(t)||Mi(t)||Ri(t)||pj(t,s)};function yD(t,s,c){var r=c.get(t);r?r.push(s):c.set(t,[s])}function jD(t,s){var c={},r=void 0;return t.forEach(function(i){if(!(i.length<=1)){s||(i=i.map(function(p){return p.map(String)}).sort(function(p,f){return p.length-f.length}));var o=gn(i),u=o[0],m=o.slice(1);u.length===0?r=m.map(Ex):c[Ex(u)]=m.map(Ex)}}),r?xf(c)?[r]:[r,c]:xf(c)?void 0:c}var bj=function(t,s,c,r,i,o,u){var m;i===void 0&&(i=[]),o===void 0&&(o=[]),u===void 0&&(u=new Map);var p=iD(t);if(!p){yD(t,i,s);var f=u.get(t);if(f)return r?{transformedValue:null}:f}if(!vD(t,c)){var b=Uy(t,c),h=b?{transformedValue:b.value,annotations:[b.type]}:{transformedValue:t};return p||u.set(t,h),h}if(Vd(o,t))return{transformedValue:null};var y=Uy(t,c),j=(m=y?.value)!==null&&m!==void 0?m:t,S=hc(j)?[]:{},N={};fl(j,function(T,k){var E=bj(T,s,c,r,pc(pc([],gn(i)),[k]),pc(pc([],gn(o)),[t]),u);S[k]=E.transformedValue,hc(E.annotations)?N[k]=E.annotations:Pi(E.annotations)&&fl(E.annotations,function(z,_){N[oj(k)+"."+_]=z})});var w=xf(N)?{transformedValue:S,annotations:y?[y.type]:void 0}:{transformedValue:S,annotations:y?[y.type,N]:N};return p||u.set(t,w),w};function vj(t){return Object.prototype.toString.call(t).slice(8,-1)}function Iy(t){return vj(t)==="Array"}function ND(t){if(vj(t)!=="Object")return!1;const s=Object.getPrototypeOf(t);return!!s&&s.constructor===Object&&s===Object.prototype}function CD(t,s,c,r,i){const o={}.propertyIsEnumerable.call(r,s)?"enumerable":"nonenumerable";o==="enumerable"&&(t[s]=c),i&&o==="nonenumerable"&&Object.defineProperty(t,s,{value:c,enumerable:!1,writable:!0,configurable:!0})}function yf(t,s={}){if(Iy(t))return t.map(i=>yf(i,s));if(!ND(t))return t;const c=Object.getOwnPropertyNames(t),r=Object.getOwnPropertySymbols(t);return[...c,...r].reduce((i,o)=>
49{if(Iy(s.props)&&!s.props.includes(o))return i;const u=t[o],m=yf(u,s);return CD(i,o,m,t,s.nonenumerable),i},{})}var Gc=function(){return Gc=Object.assign||function(t){for(var s,c=1,r=arguments.length;c<r;c++){s=arguments[c];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=s[i])}return t},Gc.apply(this,arguments)},wD=function(t,s){var c=typeof Symbol=="function"&&t[Symbol.iterator];if(!c)return t;var r=c.call(t),i,o=[],u;try{for(;(s===void 0||s-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(m){u={error:m}}finally{try{i&&!i.done&&(c=r.return)&&c.call(r)}finally{if(u)throw u.error}}return o},SD=function(t,s){for(var c=0,r=s.length,i=t.length;c<r;c++,i++)t[i]=s[c];return t},_n=(function(){function t(s){var c=s===void 0?{}:s,r=c.dedupe,i=r===void 0?!1:r;this.classRegistry=new Gk,this.symbolRegistry=new rj(function(o){var u;return(u=o.description)!==null&&u!==void 0?u:""}),this.customTransformerRegistry=new Jk,this.allowedErrorProps=[],this.dedupe=i}return t.prototype.serialize=function(s){var c=new Map,r=bj(s,c,this,this.dedupe),i={json:r.transformedValue};r.annotations&&(i.meta=Gc(Gc({},i.meta),{values:r.annotations}));var o=jD(c,this.dedupe);return o&&(i.meta=Gc(Gc({},i.meta),{referentialEqualities:o})),i},t.prototype.deserialize=function(s){var c=s.json,r=s.meta,i=yf(c);return r?.values&&(i=hD(i,r.values,this)),r?.referentialEqualities&&(i=bD(i,r.referentialEqualities)),i},t.prototype.stringify=function(s){return JSON.stringify(this.serialize(s))},t.prototype.parse=function(s){return this.deserialize(JSON.parse(s))},t.prototype.registerClass=function(s,c){this.classRegistry.register(s,c)},t.prototype.registerSymbol=function(s,c){this.symbolRegistry.register(s,c)},t.prototype.registerCustom=function(s,c){this.customTransformerRegistry.register(Gc({name:c},s))},t.prototype.allowErrorProps=function(){for(var s,c=[],r=0;r<arguments.length;r++)c[r]=arguments[r];(s=this.allowedErrorProps).push.apply(s,SD([],wD(c)))},t.defaultInstance=new t,t.serialize=t.defaultInstance.serialize.bind(t.defaultInstance),t.deserialize=t.defaultInstance.deserialize.bind(t.defaultInstance),t.stringify=t.defaultInstance.stringify.bind(t.defaultInstance),t.parse=t.defaultInstance.parse.bind(t.defaultInstance),t.registerClass=t.defaultInstance.registerClass.bind(t.defaultInstance),t.registerSymbol=t.defaultInstance.registerSymbol.bind(t.defaultInstance),t.registerCustom=t.defaultInstance.registerCustom.bind(t.defaultInstance),t.allowErrorProps=t.defaultInstance.allowErrorProps.bind(t.defaultInstance),t})();_n.serialize;_n.deserialize;_n.stringify;_n.parse;_n.registerClass;_n.registerCustom;_n.registerSymbol;_n.allowErrorProps;var TD=(t,s,c,r,i,o,u,m)=>{let p=document.documentElement,f=["light","dark"];function b(j){(Array.isArray(t)?t:[t]).forEach(S=>{let N=S==="class",w=N&&o?i.map(T=>o[T]||T):i;N?(p.classList.remove(...w),p.classList.add(o&&o[j]?o[j]:j)):p.setAttribute(S,j)}),h(j)}function h(j){m&&f.includes(j)&&(p.style.colorScheme=j)}function y(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)b(r);else try{let j=localStorage.getItem(s)||c,S=u&&j==="system"?y():j;b(S)}catch{}},kD=v.createContext(void 0),DD={setTheme:t=>{},themes:[]},ED=()=>{var t;return(t=v.useContext(kD))!=null?t:DD};v.memo(({forcedTheme:t,storageKey:s,attribute:c,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:u,themes:m,nonce:p,scriptProps:f})=>{let b=JSON.stringify([c,s,o,t,m,u,r,i]).slice(1,-1);return v.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?p:"",dangerouslySetInnerHTML:{__html:`(${TD.toString()})(${b})`}})});var Gi=cj();const yj=b2(Gi);function _D(t){if(typeof document>"u")return;let s=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css",s.appendChild(c),c.styleSheet?c.styleSheet.cssText=t:c.appendChild(document.createTextNode(t))}const AD=t=>{switch(t){case"success":return RD;case"info":return zD;case"warning":return OD;case"error":return LD;default:return null}},PD=Array(12).fill(0),MD=({visible:t,className:s})=>fe.createElement("div",{className:["sonner-loading-wrapper",s].filter(
vendor: 6,039 bytes, line 49
49Boolean).join(" "),"data-visible":t},fe.createElement("div",{className:"sonner-spinner"},PD.map((c,r)=>fe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),RD=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),OD=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),zD=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),LD=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),BD=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},fe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),fe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),UD=()=>{const[t,s]=fe.useState(document.hidden);return fe.useEffect(()=>{const c=()=>{s(document.hidden)};return document.addEventListener("visibilitychange",c),()=>window.removeEventListener("visibilitychange",c)},[]),t};let jf=1;class ID{constructor(){this.subscribe=s=>(this.subscribers.push(s),()=>{const c=this.subscribers.indexOf(s);this.subscribers.splice(c,1)}),this.publish=s=>{this.subscribers.forEach(c=>c(s))},this.addToast=s=>{this.publish(s),this.toasts=[...this.toasts,s]},this.create=s=>{var c;const{message:r,...i}=s,o=typeof s?.id=="number"||((c=s.id)==null?void 0:c.length)>0?s.id:jf++,u=this.toasts.find(p=>p.id===o),m=s.dismissible===void 0?!0:s.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),u?this.toasts=this.toasts.map(p=>p.id===o?(this.publish({...p,...s,id:o,title:r}),{...p,...s,id:o,dismissible:m,title:r}):p):this.addToast({title:r,...i,dismissible:m,id:o}),o},this.dismiss=s=>(s?(this.dismissedToasts.add(s),requestAnimationFrame(()=>this.subscribers.forEach(c=>c({id:s,dismiss:!0})))):this.toasts.forEach(c=>{this.subscribers.forEach(r=>r({id:c.id,dismiss:!0}))}),s),this.message=(s,c)=>this.create({...c,message:s}),this.error=(s,c)=>this.create({...c,message:s,type:"error"}),this.success=(s,c)=>this.create({...c,type:"success",message:s}),this.info=(s,c)=>this.create({...c,type:"info",message:s}),this.warning=(s,c)=>this.create({...c,type:"warning",message:s}),this.loading=(s,c)=>this.create({...c,type:"loading",message:s}),this.promise=(s,c)=>{if(!c)return;let r;c.loading!==void 0&&(r=this.create({...c,promise:s,type:"loading",message:c.loading,description:typeof c.description!="function"?c.description:void 0}));const i=Promise.resolve(s instanceof Function?s():s);let o=r!==void 0,u;const m=i.then(async f=>{if(u=["resolve",f],fe.isValidElement(f))o=!1,this.create({id:r,type:"default",message:f});else if($D(f)&&!f.ok){o=!1;const h=typeof c.error=="function"?await c.error(`HTTP error! status: ${f.status}`):c.error,y=typeof c.description=="function"?await c.description(`HTTP error! status: ${f.status}`):c.description,S=typeof h=="object"&&!fe.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:y,...S})}else if(f instanceof Error){o=!1;const h=typeof c.error=="function"?await c.error(f):c.error,y=typeof c.description=="function"?await c.description(f):c.description,S=typeof h=="object"&&!fe.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:y,...S})}else if(c.success!==void 0){o=!1;const h=typeof c.success=="function"?await c.success(f):c.success,y=typeof c.description=="function"?await c.description(f):c.description,S=typeof h=="object"&&!fe.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:y,...S})}}).catch(async f=>{if(u=["reject",f],c.error!==void 0){o=!1;const b=typeof c.error=="function"?await c.error(f):c.error,h=typeof c.description=="function"?await c.description(f):c.description,j=typeof b=="object"&&!fe.isValidElement(b)?b:{message:b};this.create({id:r,type:"error",description:h,...j})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),c.finally==null||c.finally.call(c)}),p=()=>new Promise((f,b)=>m.then(()=>u[0]==="reject"?b(u[1]):f(u[1])).catch(b));return typeof r!="string"&&typeof r!="number"?{unwrap:p}:Object.assign(r,{unwrap:p})},this.custom=(s,c)=>{const r=c?.id||jf++;return this.create({jsx:s(r),id:r,...c}),r},this.getActiveToasts=()=>this.toasts.filter(s=>!this.dismissedToasts.has(s.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ka=new ID,HD=(t,s)=>{const c=s?.id||jf++;return ka.addToast({title:t,...s,id:c}),c},$D=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",qD=HD,QD=()=>ka.toasts,WD=()=>ka.getActiveToasts(),X=Object.assign(qD,{success:ka.success,info:ka.info,warning:ka.warning,error:ka.error,custom:ka.custom,message:ka.message,promise:ka.promise,dismiss:ka.dismiss,loading:ka.loading},{getHistory:QD,getToasts:WD});_D
vendor: 4,787 bytes, line 49
49("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,086 bytes, line 49
49left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function 
vendor: 944 bytes, line 49
49Td(t){return t.label!==void 0}const VD=3,FD="24px",KD="16px",Hy=4e3,GD=356,YD=14,XD=45,ZD=200;function As(...t){return t.filter(Boolean).join(" ")}function JD(t){const[s,c]=t.split("-"),r=[];return s&&r.push(s),c&&r.push(c),r}const e6=t=>{var s,c,r,i,o,u,m,p,f;const{invert:b,toast:h,unstyled:y,interacting:j,setHeights:S,visibleToasts:N,heights:w,index:T,toasts:k,expanded:E,removeToast:z,defaultRichColors:_,closeButton:R,style:P,cancelButtonStyle:A,actionButtonStyle:V,className:H="",descriptionClassName:M="",duration:B,position:I,gap:ie,expandByDefault:se,classNames:L,icons:F,closeButtonAriaLabel:W="Close toast"}=t,[ce,ge]=fe.useState(null),[O,te]=fe.useState(null),[Y,ne]=fe.useState(!1),[pe,be]=fe.useState(!1),[le,he]=fe.useState(!1),[Pe,Re]=fe.useState(!1),[Q,xe]=fe.useState(!1),[Le,Ue]=fe.useState(0),[Ye,Z]=fe.useState(0),Se=fe.useRef(h.duration||B||Hy),Ft=fe.useRef(null),ht=fe.useRef(null),qa=T===0,On=T+1<=N,Ut=h.type,Cs=h.dism
vendor: 19,544 bytes, line 49
49issible!==!1,Ke=h.className||"",lm=h.descriptionClassName||"",wc=fe.useMemo(()=>w.findIndex(ze=>ze.toastId===h.id)||0,[w,h.id]),lo=fe.useMemo(()=>{var ze;return(ze=h.closeButton)!=null?ze:R},[h.closeButton,R]),Sc=fe.useMemo(()=>h.duration||B||Hy,[h.duration,B]),_l=fe.useRef(0),qs=fe.useRef(0),io=fe.useRef(0),zn=fe.useRef(null),[Tc,ua]=I.split("-"),is=fe.useMemo(()=>w.reduce((ze,bt,qt)=>qt>=wc?ze:ze+bt.height,0),[w,wc]),ra=UD(),im=h.invert||b,Al=Ut==="loading";qs.current=fe.useMemo(()=>wc*ie+is,[wc,is]),fe.useEffect(()=>{Se.current=Sc},[Sc]),fe.useEffect(()=>{ne(!0)},[]),fe.useEffect(()=>{const ze=ht.current;if(ze){const bt=ze.getBoundingClientRect().height;return Z(bt),S(qt=>[{toastId:h.id,height:bt,position:h.position},...qt]),()=>S(qt=>qt.filter(la=>la.toastId!==h.id))}},[S,h.id]),fe.useLayoutEffect(()=>{if(!Y)return;const ze=ht.current,bt=ze.style.height;ze.style.height="auto";const qt=ze.getBoundingClientRect().height;ze.style.height=bt,Z(qt),S(la=>la.find(yt=>yt.toastId===h.id)?la.map(yt=>yt.toastId===h.id?{...yt,height:qt}:yt):[{toastId:h.id,height:qt,position:h.position},...la])},[Y,h.title,h.description,S,h.id,h.jsx,h.action,h.cancel]);const ws=fe.useCallback(()=>{be(!0),Ue(qs.current),S(ze=>ze.filter(bt=>bt.toastId!==h.id)),setTimeout(()=>{z(h)},ZD)},[h,z,S,qs]);fe.useEffect(()=>{if(h.promise&&Ut==="loading"||h.duration===1/0||h.type==="loading")return;let ze;return E||j||ra?(()=>{if(io.current<_l.current){const la=new Date().getTime()-_l.current;Se.current=Se.current-la}io.current=new Date().getTime()})():(()=>{Se.current!==1/0&&(_l.current=new Date().getTime(),ze=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ws()},Se.current))})(),()=>clearTimeout(ze)},[E,j,h,Ut,ra,ws]),fe.useEffect(()=>{h.delete&&(ws(),h.onDismiss==null||h.onDismiss.call(h,h))},[ws,h.delete]);function mr(){var ze;if(F?.loading){var bt;return fe.createElement("div",{className:As(L?.loader,h==null||(bt=h.classNames)==null?void 0:bt.loader,"sonner-loader"),"data-visible":Ut==="loading"},F.loading)}return fe.createElement(MD,{className:As(L?.loader,h==null||(ze=h.classNames)==null?void 0:ze.loader),visible:Ut==="loading"})}const pr=h.icon||F?.[Ut]||AD(Ut);var kc,Ss;return fe.createElement("li",{tabIndex:0,ref:ht,className:As(H,Ke,L?.toast,h==null||(s=h.classNames)==null?void 0:s.toast,L?.default,L?.[Ut],h==null||(c=h.classNames)==null?void 0:c[Ut]),"data-sonner-toast":"","data-rich-colors":(kc=h.richColors)!=null?kc:_,"data-styled":!(h.jsx||h.unstyled||y),"data-mounted":Y,"data-promise":!!h.promise,"data-swiped":Q,"data-removed":pe,"data-visible":On,"data-y-position":Tc,"data-x-position":ua,"data-index":T,"data-front":qa,"data-swiping":le,"data-dismissible":Cs,"data-type":Ut,"data-invert":im,"data-swipe-out":Pe,"data-swipe-direction":O,"data-expanded":!!(E||se&&Y),"data-testid":h.testId,style:{"--index":T,"--toasts-before":T,"--z-index":k.length-T,"--offset":`${pe?Le:qs.current}px`,"--initial-height":se?"auto":`${Ye}px`,...P,...h.style},onDragEnd:()=>{he(!1),ge(null),zn.current=null},onPointerDown:ze=>{ze.button!==2&&(Al||!Cs||(Ft.current=new Date,Ue(qs.current),ze.target.setPointerCapture(ze.pointerId),ze.target.tagName!=="BUTTON"&&(he(!0),zn.current={x:ze.clientX,y:ze.clientY})))},onPointerUp:()=>{var ze,bt,qt;if(Pe||!Cs)return;zn.current=null;const la=Number(((ze=ht.current)==null?void 0:ze.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ln=Number(((bt=ht.current)==null?void 0:bt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),yt=new Date().getTime()-((qt=Ft.current)==null?void 0:qt.getTime()),ga=ce==="x"?la:Ln,Dc=Math.abs(ga)/yt;if(Math.abs(ga)>=XD||Dc>.11){Ue(qs.current),h.onDismiss==null||h.onDismiss.call(h,h),te(ce==="x"?la>0?"right":"left":Ln>0?"down":"up"),ws(),Re(!0);return}else{var ha,ba;(ha=ht.current)==null||ha.style.setProperty("--swipe-amount-x","0px"),(ba=ht.current)==null||ba.style.setProperty("--swipe-amount-y","0px")}xe(!1),he(!1),ge(null)},onPointerMove:ze=>{var bt,qt,la;if(!zn.current||!Cs||((bt=window.getSelection())==null?void 0:bt.toString().length)>0)return;const yt=ze.clientY-zn.current.y,ga=ze.clientX-zn.current.x;var Dc;const ha=(Dc=t.swipeDirections)!=null?Dc:JD(I);!ce&&(Math.abs(ga)>1||Math.abs(yt)>1)&&ge(Math.abs(ga)>Math.abs(yt)?"x":"y");let ba={x:0,y:0};const xr=os=>1/(1.5+Math.abs(os)/20);if(ce==="y"){if(ha.includes("top")||ha.includes("bottom"))if(ha.includes("top")&&yt<0||ha.includes("bottom")&&yt>0)ba.y=yt;else{const os=yt*xr(yt);ba.y=Math.abs(os)<Math.abs(yt)?os:yt}}else if(ce==="x"&&(ha.includes("left")||ha.includes("right")))if(ha.includes("left")&&ga<0||ha.includes("right")&&ga>0)ba.x=ga;else{const os=ga*xr(ga);ba.x=Math.abs(os)<Math.abs(ga)?os:ga}(Math.abs(ba.x)>0||Math.abs(ba.y)>0)&&xe(!0),(qt=ht.current)==null||qt.style.setProperty("--swipe-amount-x",`${ba.x}px`),(la=ht.current)==null||la.style.setProperty("--swipe-amount-y",`${ba.y}px`)}},lo&&!h.jsx&&Ut!=="loading"?fe.createElement("button",{"aria-label":W,"data-disabled":Al,"data-close-button":!0,onClick:Al||!Cs?()=>{}:()=>{ws(),h.onDismiss==null||h.onDismiss.call(h,h)},className:As(L?.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(Ss=F?.close)!=null?Ss:BD):null,(Ut||h.icon||h.promise)&&h.icon!==null&&(F?.[Ut]!==null||h.icon)?fe.createElement("div",{"data-icon":"",className:As(L?.icon,h==null||(i=h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||mr():null,h.type!=="loading"?pr:null):null,fe.createElement("div",{"data-content":"",className:As(L?.content,h==null||(o=h.classNames)==null?void 0:o.content)},fe.createElement("div",{"data-title":"",className:As(L?.title,h==null||(u=h.classNames)==null?void 0:u.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?fe.createElement("div",{"data-description":"",className:As(M,lm,L?.description,h==null||(m=h.classNames)==null?void 0:m.description)},typeof h.description=="function"?h.description():h.description):null),fe.isValidElement(h.cancel)?h.cancel:h.cancel&&Td(h.cancel)?fe.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||A,onClick:ze=>{Td(h.cancel)&&Cs&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,ze),ws())},className:As(L?.cancelButton,h==null||(p=h.classNames)==null?void 0:p.cancelButton)},h.cancel.label):null,fe.isValidElement(h.action)?h.action:h.action&&Td(h.action)?fe.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||V,onClick:ze=>{Td(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,ze),!ze.defaultPrevented&&ws())},className:As(L?.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function $y(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function t6(t,s){const c={};return[t,s].forEach((r,i)=>{const o=i===1,u=o?"--mobile-offset":"--offset",m=o?KD:FD;function p(f){["top","right","bottom","left"].forEach(b=>{c[`${u}-${b}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?p(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?c[`${u}-${f}`]=m:c[`${u}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):p(m)}),c}const a6=fe.forwardRef(function(s,c){const{id:r,invert:i,position:o="bottom-right",hotkey:u=["altKey","KeyT"],expand:m,closeButton:p,className:f,offset:b,mobileOffset:h,theme:y="light",richColors:j,duration:S,style:N,visibleToasts:w=VD,toastOptions:T,dir:k=$y(),gap:E=YD,icons:z,containerAriaLabel:_="Notifications"}=s,[R,P]=fe.useState([]),A=fe.useMemo(()=>r?R.filter(Y=>Y.toasterId===r):R.filter(Y=>!Y.toasterId),[R,r]),V=fe.useMemo(()=>Array.from(new Set([o].concat(A.filter(Y=>Y.position).map(Y=>Y.position)))),[A,o]),[H,M]=fe.useState([]),[B,I]=fe.useState(!1),[ie,se]=fe.useState(!1),[L,F]=fe.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=fe.useRef(null),ce=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ge=fe.useRef(null),O=fe.useRef(!1),te=fe.useCallback(Y=>{P(ne=>{var pe;return(pe=ne.find(be=>be.id===Y.id))!=null&&pe.delete||ka.dismiss(Y.id),ne.filter(({id:be})=>be!==Y.id)})},[]);return fe.useEffect(()=>ka.subscribe(Y=>{if(Y.dismiss){requestAnimationFrame(()=>{P(ne=>ne.map(pe=>pe.id===Y.id?{...pe,delete:!0}:pe))});return}setTimeout(()=>{yj.flushSync(()=>{P(ne=>{const pe=ne.findIndex(be=>be.id===Y.id);return pe!==-1?[...ne.slice(0,pe),{...ne[pe],...Y},...ne.slice(pe+1)]:[Y,...ne]})})})}),[R]),fe.useEffect(()=>{if(y!=="system"){F(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const Y=window.matchMedia("(prefers-color-scheme: dark)");try{Y.addEventListener("change",({matches:ne})=>{F(ne?"dark":"light")})}catch{Y.addListener(({matches:pe})=>{try{F(pe?"dark":"light")}catch(be){console.error(be)}})}},[y]),fe.useEffect(()=>{R.length<=1&&I(!1)},[R]),fe.useEffect(()=>{const Y=ne=>{var pe;if(u.every(he=>ne[he]||ne.code===he)){var le;I(!0),(le=W.current)==null||le.focus()}ne.code==="Escape"&&(document.activeElement===W.current||(pe=W.current)!=null&&pe.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[u]),fe.useEffect(()=>{if(W.current)return()=>{ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null,O.current=!1)}},[W.current]),fe.createElement("section",{ref:c,"aria-label":`${_} ${ce}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},V.map((Y,ne)=>{var pe;const[be,le]=Y.split("-");return A.length?fe.createElement("ol",{key:Y,dir:k==="auto"?$y():k,tabIndex:-1,ref:W,className:f,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":be,"data-x-position":le,style:{"--front-toast-height":`${((pe=H[0])==null?void 0:pe.height)||0}px`,"--width":`${GD}px`,"--gap":`${E}px`,...N,...t6(b,h)},onBlur:he=>{O.current&&!he.currentTarget.contains(he.relatedTarget)&&(O.current=!1,ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null))},onFocus:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||O.current||(O.current=!0,ge.current=he.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{ie||I(!1)},onDragEnd:()=>I(!1),onPointerDown:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||se(!0)},onPointerUp:()=>se(!1)},A.filter(he=>!he.position&&ne===0||he.position===Y).map((he,Pe)=>{var Re,Q;return fe.createElement(e6,{key:he.id,icons:z,index:Pe,toast:he,defaultRichColors:j,duration:(Re=T?.duration)!=null?Re:S,className:T?.className,descriptionClassName:T?.descriptionClassName,invert:i,visibleToasts:w,closeButton:(Q=T?.closeButton)!=null?Q:p,interacting:ie,position:Y,style:T?.style,unstyled:T?.unstyled,classNames:T?.classNames,cancelButtonStyle:T?.cancelButtonStyle,actionButtonStyle:T?.actionButtonStyle,closeButtonAriaLabel:T?.closeButtonAriaLabel,removeToast:te,toasts:A.filter(xe=>xe.position==he.position),heights:H.filter(xe=>xe.position==he.position),setHeights:M,expandByDefault:m,gap:E,expanded:B,swipeDirections:s.swipeDirections})})):null}))}),s6=({...t})=>{const{theme:s="system"}=ED();return e.jsx(a6,{"data-loc":"client/src/components/ui/sonner.tsx:8",theme:s,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})},n6="bottom-center",c6=4e3;function r6(t){const s=t.campaignName.trim();return{title:s?`"${s}" 캠페인을 삭제했습니다`:"캠페인을 삭제했습니다",...t.cleaned.length>0?{description:`함께 정리됨: ${t.cleaned.join(" · ")}`}:{}}}function ye(t,s,{checkForDefaultPrevented:c=!0}={}){return function(i){if(t?.(i),c===!1||!i.defaultPrevented)return s?.(i)}}function qy(t,s){if(typeof t=="function")return t(s);t!=null&&(t.current=s)}function Du(...t){return s=>{let c=!1;const r=t.map(i=>{const o=qy(i,s);return!c&&typeof o=="function"&&(c=!0),o});if(c)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():qy(t[i],null)}}}}function He(...t){return v.useCallback(Du(...t),t)}function l6(t,s){const c=v.createContext(s),r=o=>{const{children:u,...m}=o,p=v.useMemo(()=>m,Object.values(m));return e.jsx(c.Provider,{value:p,children:u})};r.displayName=t+"Provider";function i(o){const u=v.useContext(c);if(u)return u;if(s!==void 0)return s;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[r,i]}function da(t,s=[]){let c=[];function r(o,u){const m=v.createContext(u),p=c.length;c=[...c,u];const f=h=>{const{scope:y,children:j,...S}=h,N=y?.[t]?.[p]||m,w=v.useMemo(()=>S,Object.values(S));return e.jsx(N.Provider,{value:w,children:j})};f.displayName=o+"Provider";function b(h,y){const j=y?.[t]?.[p]||m,S=v.useContext(j);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[f,b]}const i=()=>{const o=c.map(u=>v.createContext(u));return function(m){const p=m?.[t]||o;return v.useMemo(()=>({[`__scope${t}`]:{...m,[t]:p}}),[m,p])}};return i.scopeName=t,[r,i6(i,...s)]}function i6(...t){const s=t[0];if(t.length===1)return s;const c=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const u=r.reduce((m,{useScope:p,scopeName:f})=>{const h=p(o)[`__scope${f}`];return{...m,...h}},{});return v.useMemo(()=>({[`__scope${s.scopeName}`]:u}),[u])}};return c.scopeName=s.scopeName,c}function Jc(t){const s=o6(t),c=v.forwardRef((r,i)=>{const{children:o,...u}=r,m=v.Children.toArray(o),p=m.find(d6);if(p){const f=p.props.children,b=m.map(h=>h===p?v.Children.count(f)>1?v.Children.only(null):v.isValidElement(f)?f.props.children:null:h);return e.jsx(s,{...u,ref:i,children:v.isValidElement(f)?v.cloneElement(f,void 0,b):null})}return e.jsx(s,{...u,ref:i,children:o})});return c.displayName=`${t}.Slot`,c}var cg=Jc("Slot");function o6(t){const s=v.forwardRef((c,r)=>{const{children:i,...o}=c;if(v.isValidElement(i)){const u=m6(i),m=u6(o,i.props);return i.type!==v.Fragment&&(m.ref=r?Du(r,u):u),v.cloneElement(i,m)}return v.Children.count(i)>1?v.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var jj=Symbol("radix.slottable");function Nj(t){const s=({children:c})=>e.jsx(e.Fragment,{children:c});return s.displayName=`${t}.Slottable`,s.__radixId=jj,s}function d6(t){return v.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===jj}function u6(t,s){const c={...s};for(const r in s){const i=t[r],o=s[r];/^on[A-Z]/.test(r)?i&&o?c[r]=(...m)=>{const p=o(...m);return i(...m),p}:i&&(c[r]=i):r==="style"?c[r]={...i,...o}:r==="className"&&(c[r]=[i,o].filter(Boolean).join(" "))}return{...t,...c}}function m6(t){let s=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,c=s&&"isReactWarning"in s&&s.isReactWarning;return c?t.ref:(s=Object.getOwnPropertyDescriptor(t,"ref")?.get,c=s&&"isReactWarning"in s&&s.isReactWarning,c?t.props.ref:t.props.ref||t.ref)}var p6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=p6.reduce((t,s)=>{const c=Jc(`Primitive.${s}`),r=v.forwardRef((i,o)=>{const{asChild:u,...m}=i,p=u?c:s;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(p,{...m,ref:o})});return r.displayName=`Primitive.${s}`,{...t,[s]:r}},{});function Cj(t,s){t&&Gi.flushSync(()=>t.dispatchEvent(s))}function Vt(t){const s=v.useRef(t);return v.useEffect(()=>{s.current=t}),v.useMemo(()=>(...c)=>s.current?.(...c),[])}function x6(t,s=globalThis?.document){const c=Vt(t);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&c(i)};return s.addEventListener("keydown",r,{capture:!0}),()=>s.removeEventListener("keydown",r,{capture:!0})},[c,s])}var f6="DismissableLayer",Nf="dismissableLayer.update",g6="dismissableLayer.pointerDownOutside",h6="dismissableLayer.focusOutside",Qy,wj=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yi=v.forwardRef((t,s)=>{const{disableOutsidePointerEvents:c=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:u,onDismiss:m,...p}=t,f=v.useContext(wj),[b,h]=v.useState(null),y=b?.ownerDocument??globalThis?.document,[,j]=v.useState({}),S=He(s,P=>h(P)),N=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),T=N.indexOf(w),k=b?N.indexOf(b):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,z=k>=T,_=y6(P=>{const A=P.target,V=[...f.branches].some(H=>H.contains(A));!z||V||(i?.(P),u?.(P),P.defaultPrevented||m?.())},y),R=j6(P=>{const A=P.target;[...f.branches].some(H=>H.contains(A))||(o?.(P),u?.(P),P.defaultPrevented||m?.())},y);return x6(P=>{k===f.layers.size-1&&(r?.(P),!P.defaultPrevented&&m&&(P.preventDefault(),m()))},y),v.useEffect(()=>{if(b)return c&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Qy=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(b)),f.layers.add(b),Wy(),()=>{c&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=Qy)}},[b,y,c,f]),v.useEffect(()=>()=>{b&&(f.layers.delete(b),f.layersWithOutsidePointerEventsDisabled.delete(b),Wy())},[b,f]),v.useEffect(()=>{const P=()=>j({});return document.addEventListener(Nf,P),()=>document.removeEventListener(Nf,P)},[]),e.jsx(Ae.div,{...p,ref:S,style:{pointerEvents:E?z?"auto":"none":void 0,...t.style},onFocusCapture:ye(t.onFocusCapture,R.onFocusCapture),onBlurCapture:ye(t.onBlurCapture,R.onBlurCapture),onPointerDownCapture:ye(t.onPointerDownCapture,_.onPointerDownCapture)})});Yi.displayName=f6;var b6="DismissableLayerBranch",v6=v.forwardRef((t,s)=>{const c=v.useContext(wj),r=v.useRef(null),i=He(s,r);return v.useEffect(()=>{const o=r.current;if(o)return c.branches.add(o),()=>{c.branches.delete(o)}},[c.branches]),e.jsx(Ae.div,{...t,ref:i})});v6.displayName=b6;function y6(t,s=globalThis?.document){const c=Vt(t),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const o=m=>{if(m.target&&!r.current){let p=function(){Sj(g6,c,f,{discrete:!0})};const f={originalEvent:m};m.pointerType==="touch"?(s.removeEventListener("click",i.current),i.current=p,s.addEventListener("click",i.current,{once:!0})):p()}else s.removeEventListener("click",i.current);r.current=!1},u=window.setTimeout(()=>{s.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(u),s.removeEventListener("pointerdown",o),s.removeEventListener("click",i.current)}},[s,c]),{onPointerDownCapture:()=>r.current=!0}}function j6(t,s=globalThis?.document){const c=Vt(t),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&Sj(h6,c,{originalEvent:o},{discrete:!1})};return s.addEventListener("focusin",i),()=>s.removeEventListener("focusin",i)},[s,c]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Wy(){const t=new CustomEvent(Nf);document.dispatchEvent(t)}function Sj(t,s,c,{discrete:r}){const i=c.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:c});s&&i.addEventListener(t,s,{once:!0}),r?Cj(i,o):i.dispatchEvent(o)}var _t=globalThis?.document?v.useLayoutEffect:()=>{},N6=ju[" useId ".trim().toString()]||(()=>{}),C6=0;function cs(t){const[s,c]=v.useState(N6());return _t(()=>{c(r=>r??String(C6++))},[t]),t||(s?`radix-${s}`:"")}const w6=["top","right","bottom","left"],bc=Math.min,Ba=Math.max,tu=Math.round,kd=Math.floor,zs=t=>({x:t,y:t}
vendor: 16,109 bytes, line 49
49),S6={left:"right",right:"left",bottom:"top",top:"bottom"},T6={start:"end",end:"start"};function Cf(t,s,c){return Ba(t,bc(s,c))}function Tn(t,s){return typeof t=="function"?t(s):t}function kn(t){return t.split("-")[0]}function Cl(t){return t.split("-")[1]}function rg(t){return t==="x"?"y":"x"}function lg(t){return t==="y"?"height":"width"}const k6=new Set(["top","bottom"]);function Rs(t){return k6.has(kn(t))?"y":"x"}function ig(t){return rg(Rs(t))}function D6(t,s,c){c===void 0&&(c=!1);const r=Cl(t),i=ig(t),o=lg(i);let u=i==="x"?r===(c?"end":"start")?"right":"left":r==="start"?"bottom":"top";return s.reference[o]>s.floating[o]&&(u=au(u)),[u,au(u)]}function E6(t){const s=au(t);return[wf(t),s,wf(s)]}function wf(t){return t.replace(/start|end/g,s=>T6[s])}const Vy=["left","right"],Fy=["right","left"],_6=["top","bottom"],A6=["bottom","top"];function P6(t,s,c){switch(t){case"top":case"bottom":return c?s?Fy:Vy:s?Vy:Fy;case"left":case"right":return s?_6:A6;default:return[]}}function M6(t,s,c,r){const i=Cl(t);let o=P6(kn(t),c==="start",r);return i&&(o=o.map(u=>u+"-"+i),s&&(o=o.concat(o.map(wf)))),o}function au(t){return t.replace(/left|right|bottom|top/g,s=>S6[s])}function R6(t){return{top:0,right:0,bottom:0,left:0,...t}}function Tj(t){return typeof t!="number"?R6(t):{top:t,right:t,bottom:t,left:t}}function su(t){const{x:s,y:c,width:r,height:i}=t;return{width:r,height:i,top:c,left:s,right:s+r,bottom:c+i,x:s,y:c}}function Ky(t,s,c){let{reference:r,floating:i}=t;const o=Rs(s),u=ig(s),m=lg(u),p=kn(s),f=o==="y",b=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,y=r[m]/2-i[m]/2;let j;switch(p){case"top":j={x:b,y:r.y-i.height};break;case"bottom":j={x:b,y:r.y+r.height};break;case"right":j={x:r.x+r.width,y:h};break;case"left":j={x:r.x-i.width,y:h};break;default:j={x:r.x,y:r.y}}switch(Cl(s)){case"start":j[u]-=y*(c&&f?-1:1);break;case"end":j[u]+=y*(c&&f?-1:1);break}return j}const O6=async(t,s,c)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:u}=c,m=o.filter(Boolean),p=await(u.isRTL==null?void 0:u.isRTL(s));let f=await u.getElementRects({reference:t,floating:s,strategy:i}),{x:b,y:h}=Ky(f,r,p),y=r,j={},S=0;for(let N=0;N<m.length;N++){const{name:w,fn:T}=m[N],{x:k,y:E,data:z,reset:_}=await T({x:b,y:h,initialPlacement:r,placement:y,strategy:i,middlewareData:j,rects:f,platform:u,elements:{reference:t,floating:s}});b=k??b,h=E??h,j={...j,[w]:{...j[w],...z}},_&&S<=50&&(S++,typeof _=="object"&&(_.placement&&(y=_.placement),_.rects&&(f=_.rects===!0?await u.getElementRects({reference:t,floating:s,strategy:i}):_.rects),{x:b,y:h}=Ky(f,y,p)),N=-1)}return{x:b,y:h,placement:y,strategy:i,middlewareData:j}};async function Oi(t,s){var c;s===void 0&&(s={});const{x:r,y:i,platform:o,rects:u,elements:m,strategy:p}=t,{boundary:f="clippingAncestors",rootBoundary:b="viewport",elementContext:h="floating",altBoundary:y=!1,padding:j=0}=Tn(s,t),S=Tj(j),w=m[y?h==="floating"?"reference":"floating":h],T=su(await o.getClippingRect({element:(c=await(o.isElement==null?void 0:o.isElement(w)))==null||c?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(m.floating)),boundary:f,rootBoundary:b,strategy:p})),k=h==="floating"?{x:r,y:i,width:u.floating.width,height:u.floating.height}:u.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(m.floating)),z=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},_=su(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:k,offsetParent:E,strategy:p}):k);return{top:(T.top-_.top+S.top)/z.y,bottom:(_.bottom-T.bottom+S.bottom)/z.y,left:(T.left-_.left+S.left)/z.x,right:(_.right-T.right+S.right)/z.x}}const z6=t=>({name:"arrow",options:t,async fn(s){const{x:c,y:r,placement:i,rects:o,platform:u,elements:m,middlewareData:p}=s,{element:f,padding:b=0}=Tn(t,s)||{};if(f==null)return{};const h=Tj(b),y={x:c,y:r},j=ig(i),S=lg(j),N=await u.getDimensions(f),w=j==="y",T=w?"top":"left",k=w?"bottom":"right",E=w?"clientHeight":"clientWidth",z=o.reference[S]+o.reference[j]-y[j]-o.floating[S],_=y[j]-o.reference[j],R=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f));let P=R?R[E]:0;(!P||!await(u.isElement==null?void 0:u.isElement(R)))&&(P=m.floating[E]||o.floating[S]);const A=z/2-_/2,V=P/2-N[S]/2-1,H=bc(h[T],V),M=bc(h[k],V),B=H,I=P-N[S]-M,ie=P/2-N[S]/2+A,se=Cf(B,ie,I),L=!p.arrow&&Cl(i)!=null&&ie!==se&&o.reference[S]/2-(ie<B?H:M)-N[S]/2<0,F=L?ie<B?ie-B:ie-I:0;return{[j]:y[j]+F,data:{[j]:se,centerOffset:ie-se-F,...L&&{alignmentOffset:F}},reset:L}}}),L6=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(s){var c,r;const{placement:i,middlewareData:o,rects:u,initialPlacement:m,platform:p,elements:f}=s,{mainAxis:b=!0,crossAxis:h=!0,fallbackPlacements:y,fallbackStrategy:j="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:N=!0,...w}=Tn(t,s);if((c=o.arrow)!=null&&c.alignmentOffset)return{};const T=kn(i),k=Rs(m),E=kn(m)===m,z=await(p.isRTL==null?void 0:p.isRTL(f.floating)),_=y||(E||!N?[au(m)]:E6(m)),R=S!=="none";!y&&R&&_.push(...M6(m,N,S,z));const P=[m,..._],A=await Oi(s,w),V=[];let H=((r=o.flip)==null?void 0:r.overflows)||[];if(b&&V.push(A[T]),h){const ie=D6(i,u,z);V.push(A[ie[0]],A[ie[1]])}if(H=[...H,{placement:i,overflows:V}],!V.every(ie=>ie<=0)){var M,B;const ie=(((M=o.flip)==null?void 0:M.index)||0)+1,se=P[ie];if(se&&(!(h==="alignment"?k!==Rs(se):!1)||H.every(W=>Rs(W.placement)===k?W.overflows[0]>0:!0)))return{data:{index:ie,overflows:H},reset:{placement:se}};let L=(B=H.filter(F=>F.overflows[0]<=0).sort((F,W)=>F.overflows[1]-W.overflows[1])[0])==null?void 0:B.placement;if(!L)switch(j){case"bestFit":{var I;const F=(I=H.filter(W=>{if(R){const ce=Rs(W.placement);return ce===k||ce==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ce=>ce>0).reduce((ce,ge)=>ce+ge,0)]).sort((W,ce)=>W[1]-ce[1])[0])==null?void 0:I[0];F&&(L=F);break}case"initialPlacement":L=m;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function Gy(t,s){return{top:t.top-s.height,right:t.right-s.width,bottom:t.bottom-s.height,left:t.left-s.width}}function Yy(t){return w6.some(s=>t[s]>=0)}const B6=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(s){const{rects:c}=s,{strategy:r="referenceHidden",...i}=Tn(t,s);switch(r){case"referenceHidden":{const o=await Oi(s,{...i,elementContext:"reference"}),u=Gy(o,c.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Yy(u)}}}case"escaped":{const o=await Oi(s,{...i,altBoundary:!0}),u=Gy(o,c.floating);return{data:{escapedOffsets:u,escaped:Yy(u)}}}default:return{}}}}},kj=new Set(["left","top"]);async function U6(t,s){const{placement:c,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),u=kn(c),m=Cl(c),p=Rs(c)==="y",f=kj.has(u)?-1:1,b=o&&p?-1:1,h=Tn(s,t);let{mainAxis:y,crossAxis:j,alignmentAxis:S}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return m&&typeof S=="number"&&(j=m==="end"?S*-1:S),p?{x:j*b,y:y*f}:{x:y*f,y:j*b}}const I6=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(s){var c,r;const{x:i,y:o,placement:u,middlewareData:m}=s,p=await U6(s,t);return u===((c=m.offset)==null?void 0:c.placement)&&(r=m.arrow)!=null&&r.alignmentOffset?{}:{x:i+p.x,y:o+p.y,data:{...p,placement:u}}}}},H6=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(s){const{x:c,y:r,placement:i}=s,{mainAxis:o=!0,crossAxis:u=!1,limiter:m={fn:w=>{let{x:T,y:k}=w;return{x:T,y:k}}},...p}=Tn(t,s),f={x:c,y:r},b=await Oi(s,p),h=Rs(kn(i)),y=rg(h);let j=f[y],S=f[h];if(o){const w=y==="y"?"top":"left",T=y==="y"?"bottom":"right",k=j+b[w],E=j-b[T];j=Cf(k,j,E)}if(u){const w=h==="y"?"top":"left",T=h==="y"?"bottom":"right",k=S+b[w],E=S-b[T];S=Cf(k,S,E)}const N=m.fn({...s,[y]:j,[h]:S});return{...N,data:{x:N.x-c,y:N.y-r,enabled:{[y]:o,[h]:u}}}}}},$6=function(t){return t===void 0&&(t={}),{options:t,fn(s){const{x:c,y:r,placement:i,rects:o,middlewareData:u}=s,{offset:m=0,mainAxis:p=!0,crossAxis:f=!0}=Tn(t,s),b={x:c,y:r},h=Rs(i),y=rg(h);let j=b[y],S=b[h];const N=Tn(m,s),w=typeof N=="number"?{mainAxis:N,crossAxis:0}:{mainAxis:0,crossAxis:0,...N};if(p){const E=y==="y"?"height":"width",z=o.reference[y]-o.floating[E]+w.mainAxis,_=o.reference[y]+o.reference[E]-w.mainAxis;j<z?j=z:j>_&&(j=_)}if(f){var T,k;const E=y==="y"?"width":"height",z=kj.has(kn(i)),_=o.reference[h]-o.floating[E]+(z&&((T=u.offset)==null?void 0:T[h])||0)+(z?0:w.crossAxis),R=o.reference[h]+o.reference[E]+(z?0:((k=u.offset)==null?void 0:k[h])||0)-(z?w.crossAxis:0);S<_?S=_:S>R&&(S=R)}return{[y]:j,[h]:S}}}},q6=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(s){var c,r;const{placement:i,rects:o,platform:u,elements:m}=s,{apply:p=()=>{},...f}=Tn(t,s),b=await Oi(s,f),h=kn(i),y=Cl(i),j=Rs(i)==="y",{width:S,height:N}=o.floating;let w,T;h==="top"||h==="bottom"?(w=h,T=y===(await(u.isRTL==null?void 0:u.isRTL(m.floating))?"start":"end")?"left":"right"):(T=h,w=y==="end"?"top":"bottom");const k=N-b.top-b.bottom,E=S-b.left-b.right,z=bc(N-b[w],k),_=bc(S-b[T],E),R=!s.middlewareData.shift;let P=z,A=_;if((c=s.middlewareData.shift)!=null&&c.enabled.x&&(A=E),(r=s.middlewareData.shift)!=null&&r.enabled.y&&(P=k),R&&!y){const H=Ba(b.left,0),M=Ba(b.right,0),B=Ba(b.top,0),I=Ba(b.bottom,0);j?A=S-2*(H!==0||M!==0?H+M:Ba(b.left,b.right)):P=N-2*(B!==0||I!==0?B+I:Ba(b.top,b.bottom))}await p({...s,availableWidth:A,availableHeight:P});const V=await u.getDimensions(m.floating);return S!==V.width||N!==V.height?{reset:{rects:!0}}:{}}}};function Eu(){return typeof window<"u"}function wl(t){return Dj(t)?(t.nodeName||"").toLowerCase():"#document"}function Ia(t){var s;return(t==null||(s=t.ownerDocument)==null?void 0:s.defaultView)||window}function Is(t){var s;return(s=(Dj(t)?t.ownerDocument:t.document)||window.document)==null?void 0:s.documentElement}function Dj(t){return Eu()?t instanceof Node||t instanceof Ia(t).Node:!1}function hs(t){return Eu()?t instanceof Element||t instanceof Ia(t).Element:!1}function Ls(t){return Eu()?t instanceof HTMLElement||t instanceof Ia(t).HTMLElement:!1}function Xy(t){return!Eu()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ia(t).ShadowRoot}const Q6=new Set(["inline","contents"]);function Xi(t){const{overflow:s,overflowX:c,overflowY:r,display:i}=bs(t);return/auto|scroll|overlay|hidden|clip/.test(s+r+c)&&!Q6.has(i)}const W6=new Set(["table","td","th"]);function V6(t){return W6.has(wl(t))}const F6=[":popover-open",":modal"];function _u(t){return F6.some(s=>{try{return t.matches(s)}catch{return!1}})}const K6=["transform","translate","scale","rotate","perspective"],G6=["transform","translate","scale","rotate","perspective","filter"],Y6=["paint","layout","strict","content"];function og(t){const s=dg(),c=hs(t)?bs(t):t;return K6.some(r=>c[r]?c[r]!=="none":!1)||(c.containerType?c.containerType!=="normal":!1)||!s&&(c.backdropFilter?c.backdropFilter!=="none":!1)||!s&&(c.filter?c.filter!=="none":!1)||G6.some(r=>(c.willChange||"").includes(r))||Y6.some(r=>(c.contain||"").includes(r))}function X6(t){let s=vc(t);for(;Ls(s)&&!gl(s);){if(og(s))return s;if(_u(s))return null;s=vc(s)}return null}function dg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Z6=new Set(["html","body","#document"]);function gl(t){return Z6.has(wl(t))}function bs(t){return Ia(t).getComputedStyle(t)}function Au(t){return hs(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function vc(t){if(wl(t)==="html")return t;const s=t.assignedSlot||t.parentNode||Xy(t)&&t.host||Is(t);return Xy(s)?s.host:s}function Ej(t){const s=vc(t);return gl(s)?t.ownerDocument?t.ownerDocument.body:t.body:Ls(s)&&Xi(s)?s:Ej(s)}function zi(t,s,c){var r;s===void 0&&(s=[]),c===void 0&&(c=!0);const i=Ej(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),u=Ia(i);if(o){const m=Sf(u);return s.concat(u,u.visualViewport||[],Xi(i)?i:[],m&&c?zi(m):[])}return s.concat(i,zi(i,[],c))}function Sf(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function _j(t){const s=bs(t);let c=parseFloat(s.width)||0,r=parseFloat(s.height)||0;const i=Ls(t),o=i?t.offsetWidth:c,u=i?t.offsetHeight:r,m=tu(c)!==o||tu(r)!==u;return m&&(c=o,r=u),{width:c,height:r,$:m}}function ug(t){return hs(t)?t:t.contextElement}function ul(t){const s=ug(t);if(!Ls(s))return zs(1);const c=s.getBoundingClientRect(),{width:r,height:i,$:o}=_j(s);let u=(o?tu(c.width):c.width)/r,m=(o?tu(c.height):c.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!m||!Number.isFinite(m))&&(m=1),{x:u,y:m}}const J6=zs(0);function Aj(t){const s=Ia(t);return!dg()||!s.visualViewport?J6:{x:s.visualViewport.offsetLeft,y:s.visualViewport.offsetTop}}function eE(t,s,c){return s===void 0&&(s=!1),!c||s&&c!==Ia(t)?!1:s}function er(t,s,c,r){s===void 0&&(s=!1),c===void 0&&(c=!1);const i=t.getBoundingClientRect(),o=ug(t);let u=zs(1);s&&(r?hs(r)&&(u=ul(r)):u=ul(t));const m=eE(o,c,r)?Aj(o):zs(0);let p=(i.left+m.x)/u.x,f=(i.top+m.y)/u.y,b=i.width/u.x,h=i.height/u.y;if(o){const y=Ia(o),j=r&&hs(r)?Ia(r):r;let S=y,N=Sf(S);for(;N&&r&&j!==S;){const w=ul(N),T=N.getBoundingClientRect(),k=bs(N),E=T.left+(N.clientLeft+parseFloat(k.paddingLeft))*w.x,z=T.top+(N.clientTop+parseFloat(k.paddingTop))*w.y;p*=w.x,f*=w.y,b*=w.x,h*=w.y,p+=E,f+=z,S=Ia(N),N=Sf(S)}}return su({width:b,height:h,x:p,y:f})}function Pu(t,s){const c=Au(t).scrollLeft;return s?s.left+c:er(Is(t)).left+c}function Pj(t,s){const c=t.getBoundingClientRect(),r=c.left+s.scrollLeft-Pu(t,c),i=c.top+s.scrollTop;return{x:r,y:i}}function tE(t){let{elements:s,rect:c,offsetParent:r,strategy:i}=t;const o=i==="fixed",u=Is(r),m=s?_u(s.floating):!1;if(r===u||m&&o)return c;let p={scrollLeft:0,scrollTop:0},f=zs(1);const b=zs(0),h=Ls(r);if((h||!h&&!o)&&((wl(r)!=="body"||Xi(u))&&(p=Au(r)),Ls(r))){const j=er(r);f=ul(r),b.x=j.x+r.clientLeft,b.y=j.y+r.clientTop}const y=u&&!h&&!o?Pj(u,p):zs(0);return{width:c.width*f.x,height:c.height*f.y,x:c.x*f.x-p.scrollLeft*f.x+b.x+y.x,y:c.y*f.y-p.scrollTop*f.y+b.y+y.y}}function aE(t){return Array.from(t.getClientRects())}function sE(t){const s=Is(t),c=Au(t),r=t.ownerDocument.body,i=Ba(s.scrollWidth,s.clientWidth,r.scrollWidth,r.clientWidth),o=Ba(s.scrollHeight,s.clientHeight,r.scrollHeight,r.clientHeight);let u=-c.scrollLeft+Pu(t);const m=-c.scrollTop;return bs(r).direction==="rtl"&&(u+=Ba(s.clientWidth,r.clientWidth)-i),{width:i,height:o,x:u,y:m}}const Zy=25;function nE(t,s){const c=Ia(t),r=Is(t),i=c.visualViewport;let o=r.clientWidth,u=r.clientHeight,m=0,p=0;if(i){o=i.width,u=i.height;const b=dg();(!b||b&&s==="fixed")&&(m=i.offsetLeft,p=i.offsetTop)}const f=Pu(r);if(f<=0){const b=r.ownerDocument,h=b.body,y=getComputedStyle(h),j=b.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,S=Math.abs(r.clientWidth-h.clientWidth-j);S<=Zy&&(o-=S)}else f<=Zy&&(o+=f);return{width:o,height:u,x:m,y:p}}const cE=new Set(["absolute","fixed"]);function rE(t,s){const c=er(t,!0,s==="fixed"),r=c.top+t.clientTop,i=c.left+t.clientLeft,o=Ls(t)?ul(t):zs(1),u=t.clientWidth*o.x,m=t.clientHeight*o.y,p=i*o.x,f=r*o.y;return{width:u,height:m,x:p,y:f}}function Jy(t,s,c){let r;if(s==="viewport")r=nE(t,c);else if(s==="document")r=sE(Is(t));else if(hs(s))r=rE(s,c);else{const i=Aj(t);r={x:s.x-i.x,y:s.y-i.y,width:s.width,height:s.height}}return su(r)}function Mj(t,s){const c=vc(t);return c===s||!hs(c)||gl(c)?!1:bs(c).position==="fixed"||Mj(c,s)}function lE(t,s){const c=s.get(t);if(c)return c;let r=zi(t,[],!1).filter(m=>hs(m)&&wl(m)!=="body"),i=null;const o=bs(t).position==="fixed";let u=o?vc(t):t;for(;hs(u)&&!gl(u);){const m=bs(u),p=og(u);!p&&m.position==="fixed"&&(i=null),(o?!p&&!i:!p&&m.position==="static"&&!!i&&cE.has(i.position)||Xi(u)&&!p&&Mj(t,u))?r=r.filter(b=>b!==u):i=m,u=vc(u)}return s.set(t,r),r}function iE(t){let{element:s,boundary:c,rootBoundary:r,strategy:i}=t;const u=[...c==="clippingAncestors"?_u(s)?[]:lE(s,this._c):[].concat(c),r],m=u[0],p=u.reduce((f,b)=>{const h=Jy(s,b,i);return f.top=Ba(h.top,f.top),f.right=bc(h.right,f.right),f.bottom=bc(
vendor: 9,871 bytes, line 49
49h.bottom,f.bottom),f.left=Ba(h.left,f.left),f},Jy(s,m,i));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function oE(t){const{width:s,height:c}=_j(t);return{width:s,height:c}}function dE(t,s,c){const r=Ls(s),i=Is(s),o=c==="fixed",u=er(t,!0,o,s);let m={scrollLeft:0,scrollTop:0};const p=zs(0);function f(){p.x=Pu(i)}if(r||!r&&!o)if((wl(s)!=="body"||Xi(i))&&(m=Au(s)),r){const j=er(s,!0,o,s);p.x=j.x+s.clientLeft,p.y=j.y+s.clientTop}else i&&f();o&&!r&&i&&f();const b=i&&!r&&!o?Pj(i,m):zs(0),h=u.left+m.scrollLeft-p.x-b.x,y=u.top+m.scrollTop-p.y-b.y;return{x:h,y,width:u.width,height:u.height}}function _x(t){return bs(t).position==="static"}function e1(t,s){if(!Ls(t)||bs(t).position==="fixed")return null;if(s)return s(t);let c=t.offsetParent;return Is(t)===c&&(c=c.ownerDocument.body),c}function Rj(t,s){const c=Ia(t);if(_u(t))return c;if(!Ls(t)){let i=vc(t);for(;i&&!gl(i);){if(hs(i)&&!_x(i))return i;i=vc(i)}return c}let r=e1(t,s);for(;r&&V6(r)&&_x(r);)r=e1(r,s);return r&&gl(r)&&_x(r)&&!og(r)?c:r||X6(t)||c}const uE=async function(t){const s=this.getOffsetParent||Rj,c=this.getDimensions,r=await c(t.floating);return{reference:dE(t.reference,await s(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mE(t){return bs(t).direction==="rtl"}const pE={convertOffsetParentRelativeRectToViewportRelativeRect:tE,getDocumentElement:Is,getClippingRect:iE,getOffsetParent:Rj,getElementRects:uE,getClientRects:aE,getDimensions:oE,getScale:ul,isElement:hs,isRTL:mE};function Oj(t,s){return t.x===s.x&&t.y===s.y&&t.width===s.width&&t.height===s.height}function xE(t,s){let c=null,r;const i=Is(t);function o(){var m;clearTimeout(r),(m=c)==null||m.disconnect(),c=null}function u(m,p){m===void 0&&(m=!1),p===void 0&&(p=1),o();const f=t.getBoundingClientRect(),{left:b,top:h,width:y,height:j}=f;if(m||s(),!y||!j)return;const S=kd(h),N=kd(i.clientWidth-(b+y)),w=kd(i.clientHeight-(h+j)),T=kd(b),E={rootMargin:-S+"px "+-N+"px "+-w+"px "+-T+"px",threshold:Ba(0,bc(1,p))||1};let z=!0;function _(R){const P=R[0].intersectionRatio;if(P!==p){if(!z)return u();P?u(!1,P):r=setTimeout(()=>{u(!1,1e-7)},1e3)}P===1&&!Oj(f,t.getBoundingClientRect())&&u(),z=!1}try{c=new IntersectionObserver(_,{...E,root:i.ownerDocument})}catch{c=new IntersectionObserver(_,E)}c.observe(t)}return u(!0),o}function fE(t,s,c,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,f=ug(t),b=i||o?[...f?zi(f):[],...zi(s)]:[];b.forEach(T=>{i&&T.addEventListener("scroll",c,{passive:!0}),o&&T.addEventListener("resize",c)});const h=f&&m?xE(f,c):null;let y=-1,j=null;u&&(j=new ResizeObserver(T=>{let[k]=T;k&&k.target===f&&j&&(j.unobserve(s),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var E;(E=j)==null||E.observe(s)})),c()}),f&&!p&&j.observe(f),j.observe(s));let S,N=p?er(t):null;p&&w();function w(){const T=er(t);N&&!Oj(N,T)&&c(),N=T,S=requestAnimationFrame(w)}return c(),()=>{var T;b.forEach(k=>{i&&k.removeEventListener("scroll",c),o&&k.removeEventListener("resize",c)}),h?.(),(T=j)==null||T.disconnect(),j=null,p&&cancelAnimationFrame(S)}}const gE=I6,hE=H6,bE=L6,vE=q6,yE=B6,t1=z6,jE=$6,NE=(t,s,c)=>{const r=new Map,i={platform:pE,...c},o={...i.platform,_c:r};return O6(t,s,{...i,platform:o})};var CE=typeof document<"u",wE=function(){},Fd=CE?v.useLayoutEffect:wE;function nu(t,s){if(t===s)return!0;if(typeof t!=typeof s)return!1;if(typeof t=="function"&&t.toString()===s.toString())return!0;let c,r,i;if(t&&s&&typeof t=="object"){if(Array.isArray(t)){if(c=t.length,c!==s.length)return!1;for(r=c;r--!==0;)if(!nu(t[r],s[r]))return!1;return!0}if(i=Object.keys(t),c=i.length,c!==Object.keys(s).length)return!1;for(r=c;r--!==0;)if(!{}.hasOwnProperty.call(s,i[r]))return!1;for(r=c;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!nu(t[o],s[o]))return!1}return!0}return t!==t&&s!==s}function zj(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function a1(t,s){const c=zj(t);return Math.round(s*c)/c}function Ax(t){const s=v.useRef(t);return Fd(()=>{s.current=t}),s}function SE(t){t===void 0&&(t={});const{placement:s="bottom",strategy:c="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:u}={},transform:m=!0,whileElementsMounted:p,open:f}=t,[b,h]=v.useState({x:0,y:0,strategy:c,placement:s,middlewareData:{},isPositioned:!1}),[y,j]=v.useState(r);nu(y,r)||j(r);const[S,N]=v.useState(null),[w,T]=v.useState(null),k=v.useCallback(W=>{W!==R.current&&(R.current=W,N(W))},[]),E=v.useCallback(W=>{W!==P.current&&(P.current=W,T(W))},[]),z=o||S,_=u||w,R=v.useRef(null),P=v.useRef(null),A=v.useRef(b),V=p!=null,H=Ax(p),M=Ax(i),B=Ax(f),I=v.useCallback(()=>{if(!R.current||!P.current)return;const W={placement:s,strategy:c,middleware:y};M.current&&(W.platform=M.current),NE(R.current,P.current,W).then(ce=>{const ge={...ce,isPositioned:B.current!==!1};ie.current&&!nu(A.current,ge)&&(A.current=ge,Gi.flushSync(()=>{h(ge)}))})},[y,s,c,M,B]);Fd(()=>{f===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,h(W=>({...W,isPositioned:!1})))},[f]);const ie=v.useRef(!1);Fd(()=>(ie.current=!0,()=>{ie.current=!1}),[]),Fd(()=>{if(z&&(R.current=z),_&&(P.current=_),z&&_){if(H.current)return H.current(z,_,I);I()}},[z,_,I,H,V]);const se=v.useMemo(()=>({reference:R,floating:P,setReference:k,setFloating:E}),[k,E]),L=v.useMemo(()=>({reference:z,floating:_}),[z,_]),F=v.useMemo(()=>{const W={position:c,left:0,top:0};if(!L.floating)return W;const ce=a1(L.floating,b.x),ge=a1(L.floating,b.y);return m?{...W,transform:"translate("+ce+"px, "+ge+"px)",...zj(L.floating)>=1.5&&{willChange:"transform"}}:{position:c,left:ce,top:ge}},[c,m,L.floating,b.x,b.y]);return v.useMemo(()=>({...b,update:I,refs:se,elements:L,floatingStyles:F}),[b,I,se,L,F])}const TE=t=>{function s(c){return{}.hasOwnProperty.call(c,"current")}return{name:"arrow",options:t,fn(c){const{element:r,padding:i}=typeof t=="function"?t(c):t;return r&&s(r)?r.current!=null?t1({element:r.current,padding:i}).fn(c):{}:r?t1({element:r,padding:i}).fn(c):{}}}},kE=(t,s)=>({...gE(t),options:[t,s]}),DE=(t,s)=>({...hE(t),options:[t,s]}),EE=(t,s)=>({...jE(t),options:[t,s]}),_E=(t,s)=>({...bE(t),options:[t,s]}),AE=(t,s)=>({...vE(t),options:[t,s]}),PE=(t,s)=>({...yE(t),options:[t,s]}),ME=(t,s)=>({...TE(t),options:[t,s]});var RE="Arrow",Lj=v.forwardRef((t,s)=>{const{children:c,width:r=10,height:i=5,...o}=t;return e.jsx(Ae.svg,{...o,ref:s,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?c:e.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lj.displayName=RE;var OE=Lj;function mg(t){const[s,c]=v.useState(void 0);return _t(()=>{if(t){c({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let u,m;if("borderBoxSize"in o){const p=o.borderBoxSize,f=Array.isArray(p)?p[0]:p;u=f.inlineSize,m=f.blockSize}else u=t.offsetWidth,m=t.offsetHeight;c({width:u,height:m})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else c(void 0)},[t]),s}var pg="Popper",[Bj,Sl]=da(pg),[zE,Uj]=Bj(pg),Ij=t=>{const{__scopePopper:s,children:c}=t,[r,i]=v.useState(null);return e.jsx(zE,{scope:s,anchor:r,onAnchorChange:i,children:c})};Ij.displayName=pg;var Hj="PopperAnchor",$j=v.forwardRef((t,s)=>{const{__scopePopper:c,virtualRef:r,...i}=t,o=Uj(Hj,c),u=v.useRef(null),m=He(s,u),p=v.useRef(null);return v.useEffect(()=>{const f=p.current;p.current=r?.current||u.current,f!==p.current&&o.onAnchorChange(p.current)}),r?null:e.jsx(Ae.div,{...i,ref:m})});$j.displayName=Hj;var xg="PopperContent",[LE,BE]=Bj(xg),qj=v.forwardRef((t,s)=>{const{__scopePopper:c,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:u=0,arrowPadding:m=0,avoidCollisions:p=!0,collisionBoundary:f=[],collisionPadding:b=0,sticky:h="partial",hideWhenDetached:y=!1,updatePositionStrategy:j="optimized",onPlaced:S,...N}=t,w=Uj(xg,c),[T,k]=v.useState(null),E=He(s,le=>k(le)),[z,_]=v.useState(null),R=mg(z),P=R?.width??0,A=R?.height??0,V=r+(o!=="center"?"-"+o:""),H=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},M=Array.isArray(f)?f:[f],B=M.length>0,I={padding:H,boundary:M.filter(IE),altBoundary:B},{refs:ie,floatingStyles:se,placement:L,isPositioned:F,middlewareData:W}=SE({strategy:"fixed",placement:V,whileElementsMounted:(...le)=>fE(...le,{animationFrame:j==="always"}),elements:{reference:w.anchor},middleware:[kE({mainAxis:i+A,alignmentAxis:u}),p&&DE({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?EE():void 0,...I}),p&&_E({...I}),AE({...I,apply:({elements:le,rects:he,availableWidth:Pe,availableHeight:Re})=>{const{width:Q,height:xe}=he.reference,Le=le.floating.style;Le.setProperty("--radix-popper-available-width",`${Pe}px`),Le.setProperty("--radix-popper-available-height",`${Re}px`),Le.setProperty("--radix-popper-anchor-width",`${Q}px`),Le.setProperty("--radix-popper-anchor-height",`${xe}px`)}}),z&&ME({element:z,padding:m}),HE({arrowWidth:P,arrowHeight:A}),y&&PE({strategy:"referenceHidden",...I})]}),[ce,ge]=Vj(L),O=Vt(S);_t(()=>{F&&O?.()},[F,O]);const te=W.arrow?.x,Y=W.arrow?.y,ne=W.arrow?.centerOffset!==0,[pe,be]=v.useState();return _t(()=>{T&&be(window.getComputedStyle(T).zIndex)},[T]),e.jsx("div",{ref:ie.setFloating,"data-radix-popper-content-wrapper":"",style:{...se,transform:F?se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[W.transformOrigin?.x,W.transformOrigin?.y].join(" "),...W.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e.jsx(LE,{scope:c,placedSide:ce,onArrowChange:_,arrowX:te,arrowY:Y,shouldHideArrow:ne,children:e.jsx(Ae.div,{"data-side":ce,"data-align":ge,...N,ref:E,style:{...N.style,animation:F?void 0:"none"}})})})});qj.displayName=xg;var Qj="PopperArrow",UE={top:"bottom",right:"left",bottom:"top",left:"r
49ight"},Wj=v.forwardRef(function(s,c){const{__scopePopper:r,...i}=s,o=BE(Qj,r),u=UE[o.placedSide];return e.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:e.jsx(OE,{...i,ref:c,style:{...i.style,display:"block"}})})});Wj.displayName=Qj;function IE(t){return t!==null}var HE=t=>({name:"transformOrigin",options:t,fn(s){const{placement:c,rects:r,middlewareData:i}=s,u=i.arrow?.centerOffset!==0,m=u?0:t.arrowWidth,p=u?0:t.arrowHeight,[f,b]=Vj(c),h={start:"0%",center:"50%",end:"100%"}[b],y=(i.arrow?.x??0)+m/2,j=(i.arrow?.y??0)+p/2;let S="",N="";return f==="bottom"?(S=u?h:`${y}px`,N=`${-p}px`):f==="top"?(S=u?h:`${y}px`,N=`${r.floating.height+p}px`):f==="right"?(S=`${-p}px`,N=u?h:`${j}px`):f==="left"&&(S=`${r.floating.width+p}px`,N=u?h:`${j}px`),{data:{x:S,y:N}}}});function Vj(t){const[s,c="center"]=t.split("-");return[s,c]}var fg=Ij,gg=$j,hg=qj,bg=Wj,$E="Portal",Zi=v.forwardRef((t,s)=>{const{container:c,...r}=t,[i,o]=v.useState(!1);_t(()=>o(!0),[]);const u=c||i&&globalThis?.document?.body;return u?yj.createPortal(e.jsx(Ae.div,{...r,ref:s}),u):null});Zi.displayName=$E;function qE(t,s){return v.useReducer((c,r)=>s[c][r]??c,t)}var ea=t=>{const{present:s,children:c}=t,r=QE(s),i=typeof c=="function"?c({present:r.isPresent}):v.Children.only(c),o=He(r.ref,WE(i));return typeof c=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};ea.displayName="Presence";function QE(t){const[s,c]=v.useState(),r=v.useRef(null),i=v.useRef(t),o=v.useRef("none"),u=t?"mounted":"unmounted",[m,p]=qE(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const f=Dd(r.current);o.current=m==="mounted"?f:"none"},[m]),_t(()=>{const f=r.current,b=i.current;if(b!==t){const y=o.current,j=Dd(f);t?p("MOUNT"):j==="none"||f?.display==="none"?p("UNMOUNT"):p(b&&y!==j?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,p]),_t(()=>{if(s){let f;const b=s.ownerDocument.defaultView??window,h=j=>{const N=Dd(r.current).includes(CSS.escape(j.animationName));if(j.target===s&&N&&(p("ANIMATION_END"),!i.current)){const w=s.style.animationFillMode;s.style.animationFillMode="forwards",f=b.setTimeout(()=>{s.style.animationFillMode==="forwards"&&(s.style.animationFillMode=w)})}},y=j=>{j.target===s&&(o.current=Dd(r.current))};return s.addEventListener("animationstart",y),s.addEventListener("animationcancel",h),s.addEventListener("animationend",h),()=>{b.clearTimeout(f),s.removeEventListener("animationstart",y),s.removeEventListener("animationcancel",h),s.removeEventListener("animationend",h)}}else p("ANIMATION_END")},[s,p]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:v.useCallback(f=>{r.current=f?getComputedStyle(f):null,c(f)},[])}}function Dd(t){return t?.animationName||"none"}function WE(t){let s=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,c=s&&"isReactWarning"in s&&s.isReactWarning;return c?t.ref:(s=Object.getOwnPropertyDescriptor(t,"ref")?.get,c=s&&"isReactWarning"in s&&s.isReactWarning,c?t.props.ref:t.props.ref||t.ref)}var VE=ju[" useInsertionEffect ".trim().toString()]||_t;function Bs({prop:t,defaultProp:s,onChange:c=()=>{},caller:r}){const[i,o,u]=FE({defaultProp:s,onChange:c}),m=t!==void 0,p=m?t:i;{const b=v.useRef(t!==void 0);v.useEffect(()=>{const h=b.current;h!==m&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),b.current=m},[m,r])}const f=v.useCallback(b=>{if(m){const h=KE(b)?b(t):b;h!==t&&u.current?.(h)}else o(b)},[m,t,o,u]);return[p,f]}function FE({defaultProp:t,onChange:s}){const[c,r]=v.useState(t),i=v.useRef(c),o=v.useRef(s);return VE(()=>{o.current=s},[s]),v.useEffect(()=>{i.current!==c&&(o.current?.(c),i.current=c)},[c,i]),[c,r,o]}function KE(t){return typeof t=="function"}var Fj=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),GE="VisuallyHidden",Kj=v.forwardRef((t,s)=>
vendor: 1,233 bytes, line 49
49e.jsx(Ae.span,{...t,ref:s,style:{...Fj,...t.style}}));Kj.displayName=GE;var YE=Kj,[Mu]=da("Tooltip",[Sl]),Ru=Sl(),Gj="TooltipProvider",XE=700,Tf="tooltip.open",[ZE,vg]=Mu(Gj),Yj=t=>{const{__scopeTooltip:s,delayDuration:c=XE,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=t,u=v.useRef(!0),m=v.useRef(!1),p=v.useRef(0);return v.useEffect(()=>{const f=p.current;return()=>window.clearTimeout(f)},[]),e.jsx(ZE,{scope:s,isOpenDelayedRef:u,delayDuration:c,onOpen:v.useCallback(()=>{window.clearTimeout(p.current),u.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>u.current=!0,r)},[r]),isPointerInTransitRef:m,onPointerInTransitChange:v.useCallback(f=>{m.current=f},[]),disableHoverableContent:i,children:o})};Yj.displayName=Gj;var Li="Tooltip",[JE,Ji]=Mu(Li),Xj=t=>{const{__scopeTooltip:s,children:c,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:u,delayDuration:m}=t,p=vg(Li,t.__scopeTooltip),f=Ru(s),[b,h]=v.useState(null),y=cs(),j=v.useRef(0),S=u??p.disableHoverableContent,N=m??p.delayDuration,w=v.useRef(!1),[T,k]=Bs({prop:r,defaultProp:i??!1,onChange:P=>{P?(p.onOpen(),document.dispatchEvent(new CustomEvent(Tf))):p.onClose(),o?.(P)},caller:Li}
vendor: 14,052 bytes, line 49
49),E=v.useMemo(()=>T?w.current?"delayed-open":"instant-open":"closed",[T]),z=v.useCallback(()=>{window.clearTimeout(j.current),j.current=0,w.current=!1,k(!0)},[k]),_=v.useCallback(()=>{window.clearTimeout(j.current),j.current=0,k(!1)},[k]),R=v.useCallback(()=>{window.clearTimeout(j.current),j.current=window.setTimeout(()=>{w.current=!0,k(!0),j.current=0},N)},[N,k]);return v.useEffect(()=>()=>{j.current&&(window.clearTimeout(j.current),j.current=0)},[]),e.jsx(fg,{...f,children:e.jsx(JE,{scope:s,contentId:y,open:T,stateAttribute:E,trigger:b,onTriggerChange:h,onTriggerEnter:v.useCallback(()=>{p.isOpenDelayedRef.current?R():z()},[p.isOpenDelayedRef,R,z]),onTriggerLeave:v.useCallback(()=>{S?_():(window.clearTimeout(j.current),j.current=0)},[_,S]),onOpen:z,onClose:_,disableHoverableContent:S,children:c})})};Xj.displayName=Li;var kf="TooltipTrigger",Zj=v.forwardRef((t,s)=>{const{__scopeTooltip:c,...r}=t,i=Ji(kf,c),o=vg(kf,c),u=Ru(c),m=v.useRef(null),p=He(s,m,i.onTriggerChange),f=v.useRef(!1),b=v.useRef(!1),h=v.useCallback(()=>f.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),e.jsx(gg,{asChild:!0,...u,children:e.jsx(Ae.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:p,onPointerMove:ye(t.onPointerMove,y=>{y.pointerType!=="touch"&&!b.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),b.current=!0)}),onPointerLeave:ye(t.onPointerLeave,()=>{i.onTriggerLeave(),b.current=!1}),onPointerDown:ye(t.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ye(t.onFocus,()=>{f.current||i.onOpen()}),onBlur:ye(t.onBlur,i.onClose),onClick:ye(t.onClick,i.onClose)})})});Zj.displayName=kf;var yg="TooltipPortal",[e_,t_]=Mu(yg,{forceMount:void 0}),Jj=t=>{const{__scopeTooltip:s,forceMount:c,children:r,container:i}=t,o=Ji(yg,s);return e.jsx(e_,{scope:s,forceMount:c,children:e.jsx(ea,{present:c||o.open,children:e.jsx(Zi,{asChild:!0,container:i,children:r})})})};Jj.displayName=yg;var hl="TooltipContent",eN=v.forwardRef((t,s)=>{const c=t_(hl,t.__scopeTooltip),{forceMount:r=c.forceMount,side:i="top",...o}=t,u=Ji(hl,t.__scopeTooltip);return e.jsx(ea,{present:r||u.open,children:u.disableHoverableContent?e.jsx(tN,{side:i,...o,ref:s}):e.jsx(a_,{side:i,...o,ref:s})})}),a_=v.forwardRef((t,s)=>{const c=Ji(hl,t.__scopeTooltip),r=vg(hl,t.__scopeTooltip),i=v.useRef(null),o=He(s,i),[u,m]=v.useState(null),{trigger:p,onClose:f}=c,b=i.current,{onPointerInTransitChange:h}=r,y=v.useCallback(()=>{m(null),h(!1)},[h]),j=v.useCallback((S,N)=>{const w=S.currentTarget,T={x:S.clientX,y:S.clientY},k=r_(T,w.getBoundingClientRect()),E=l_(T,k),z=i_(N.getBoundingClientRect()),_=d_([...E,...z]);m(_),h(!0)},[h]);return v.useEffect(()=>()=>y(),[y]),v.useEffect(()=>{if(p&&b){const S=w=>j(w,b),N=w=>j(w,p);return p.addEventListener("pointerleave",S),b.addEventListener("pointerleave",N),()=>{p.removeEventListener("pointerleave",S),b.removeEventListener("pointerleave",N)}}},[p,b,j,y]),v.useEffect(()=>{if(u){const S=N=>{const w=N.target,T={x:N.clientX,y:N.clientY},k=p?.contains(w)||b?.contains(w),E=!o_(T,u);k?y():E&&(y(),f())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[p,b,u,f,y]),e.jsx(tN,{...t,ref:o})}),[s_,n_]=Mu(Li,{isInside:!1}),c_=Nj("TooltipContent"),tN=v.forwardRef((t,s)=>{const{__scopeTooltip:c,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:u,...m}=t,p=Ji(hl,c),f=Ru(c),{onClose:b}=p;return v.useEffect(()=>(document.addEventListener(Tf,b),()=>document.removeEventListener(Tf,b)),[b]),v.useEffect(()=>{if(p.trigger){const h=y=>{y.target?.contains(p.trigger)&&b()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[p.trigger,b]),e.jsx(Yi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:h=>h.preventDefault(),onDismiss:b,children:e.jsxs(hg,{"data-state":p.stateAttribute,...f,...m,ref:s,style:{...m.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e.jsx(c_,{children:r}),e.jsx(s_,{scope:c,isInside:!0,children:e.jsx(YE,{id:p.contentId,role:"tooltip",children:i||r})})]})})});eN.displayName=hl;var aN="TooltipArrow",sN=v.forwardRef((t,s)=>{const{__scopeTooltip:c,...r}=t,i=Ru(c);return n_(aN,c).isInside?null:e.jsx(bg,{...i,...r,ref:s})});sN.displayName=aN;function r_(t,s){const c=Math.abs(s.top-t.y),r=Math.abs(s.bottom-t.y),i=Math.abs(s.right-t.x),o=Math.abs(s.left-t.x);switch(Math.min(c,r,i,o)){case o:return"left";case i:return"right";case c:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function l_(t,s,c=5){const r=[];switch(s){case"top":r.push({x:t.x-c,y:t.y+c},{x:t.x+c,y:t.y+c});break;case"bottom":r.push({x:t.x-c,y:t.y-c},{x:t.x+c,y:t.y-c});break;case"left":r.push({x:t.x+c,y:t.y-c},{x:t.x+c,y:t.y+c});break;case"right":r.push({x:t.x-c,y:t.y-c},{x:t.x-c,y:t.y+c});break}return r}function i_(t){const{top:s,right:c,bottom:r,left:i}=t;return[{x:i,y:s},{x:c,y:s},{x:c,y:r},{x:i,y:r}]}function o_(t,s){const{x:c,y:r}=t;let i=!1;for(let o=0,u=s.length-1;o<s.length;u=o++){const m=s[o],p=s[u],f=m.x,b=m.y,h=p.x,y=p.y;b>r!=y>r&&c<(h-f)*(r-b)/(y-b)+f&&(i=!i)}return i}function d_(t){const s=t.slice();return s.sort((c,r)=>c.x<r.x?-1:c.x>r.x?1:c.y<r.y?-1:c.y>r.y?1:0),u_(s)}function u_(t){if(t.length<=1)return t.slice();const s=[];for(let r=0;r<t.length;r++){const i=t[r];for(;s.length>=2;){const o=s[s.length-1],u=s[s.length-2];if((o.x-u.x)*(i.y-u.y)>=(o.y-u.y)*(i.x-u.x))s.pop();else break}s.push(i)}s.pop();const c=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;c.length>=2;){const o=c[c.length-1],u=c[c.length-2];if((o.x-u.x)*(i.y-u.y)>=(o.y-u.y)*(i.x-u.x))c.pop();else break}c.push(i)}return c.pop(),s.length===1&&c.length===1&&s[0].x===c[0].x&&s[0].y===c[0].y?s:s.concat(c)}var m_=Yj,p_=Xj,x_=Zj,f_=Jj,g_=eN,h_=sN;function nN(t){var s,c,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(s=0;s<i;s++)t[s]&&(c=nN(t[s]))&&(r&&(r+=" "),r+=c)}else for(c in t)t[c]&&(r&&(r+=" "),r+=c);return r}function cN(){for(var t,s,c=0,r="",i=arguments.length;c<i;c++)(t=arguments[c])&&(s=nN(t))&&(r&&(r+=" "),r+=s);return r}const jg="-",b_=t=>{const s=y_(t),{conflictingClassGroups:c,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:u=>{const m=u.split(jg);return m[0]===""&&m.length!==1&&m.shift(),rN(m,s)||v_(u)},getConflictingClassGroupIds:(u,m)=>{const p=c[u]||[];return m&&r[u]?[...p,...r[u]]:p}}},rN=(t,s)=>{if(t.length===0)return s.classGroupId;const c=t[0],r=s.nextPart.get(c),i=r?rN(t.slice(1),r):void 0;if(i)return i;if(s.validators.length===0)return;const o=t.join(jg);return s.validators.find(({validator:u})=>u(o))?.classGroupId},s1=/^\[(.+)\]$/,v_=t=>{if(s1.test(t)){const s=s1.exec(t)[1],c=s?.substring(0,s.indexOf(":"));if(c)return"arbitrary.."+c}},y_=t=>{const{theme:s,classGroups:c}=t,r={nextPart:new Map,validators:[]};for(const i in c)Df(c[i],r,i,s);return r},Df=(t,s,c,r)=>{t.forEach(i=>{if(typeof i=="string"){const o=i===""?s:n1(s,i);o.classGroupId=c;return}if(typeof i=="function"){if(j_(i)){Df(i(r),s,c,r);return}s.validators.push({validator:i,classGroupId:c});return}Object.entries(i).forEach(([o,u])=>{Df(u,n1(s,o),c,r)})})},n1=(t,s)=>{let c=t;return s.split(jg).forEach(r=>{c.nextPart.has(r)||c.nextPart.set(r,{nextPart:new Map,validators:[]}),c=c.nextPart.get(r)}),c},j_=t=>t.isThemeGetter,N_=t=>{if(t<1)return{get:()=>{},set:()=>{}};let s=0,c=new Map,r=new Map;const i=(o,u)=>{c.set(o,u),s++,s>t&&(s=0,r=c,c=new Map)};return{get(o){let u=c.get(o);if(u!==void 0)return u;if((u=r.get(o))!==void 0)return i(o,u),u},set(o,u){c.has(o)?c.set(o,u):i(o,u)}}},Ef="!",_f=":",C_=_f.length,w_=t=>{const{prefix:s,experimentalParseClassName:c}=t;let r=i=>{const o=[];let u=0,m=0,p=0,f;for(let S=0;S<i.length;S++){let N=i[S];if(u===0&&m===0){if(N===_f){o.push(i.slice(p,S)),p=S+C_;continue}if(N==="/"){f=S;continue}}N==="["?u++:N==="]"?u--:N==="("?m++:N===")"&&m--}const b=o.length===0?i:i.substring(p),h=S_(b),y=h!==b,j=f&&f>p?f-p:void 0;return{modifiers:o,hasImportantModifier:y,baseClassName:h,maybePostfixModifierPosition:j}};if(s){const i=s+_f,o=r;r=u=>u.startsWith(i)?o(u.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:u,maybePostfixModifierPosition:void 0}}if(c){const i=r;r=o=>c({className:o,parseClassName:i})}return r},S_=t=>t.endsWith(Ef)?t.substring(0,t.length-1):t.startsWith(Ef)?t.substring(1):t,T_=t=>{const s=Object.fromEntries(t.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let o=[];return r.forEach(u=>{u[0]==="["||s[u]?(i.push(...o.sort(),u),o=[]):o.push(u)}),i.push(...o.sort()),i}},k_=t=>({cache:N_(t.cacheSize),parseClassName:w_(t),sortModifiers:T_(t),...b_(t)}),D_=/\s+/,E_=(t,s)=>{const{parseClassName:c,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=s,u=[],m=t.trim().split(D_);let p="";for(let f=m.length-1;f>=0;f-=1){const b=m[f],{isExternal:h,modifiers:y,hasImportantModifier:j,baseClassName:S,maybePostfixModifierPosition:N}=c(b);if(h){p=b+(p.length>0?" "+p:p);continue}let w=!!N,T=r(w?S.substring(0,N):S);if(!T){if(!w){p=b+(p.length>0?" "+p:p);continue}if(T=r(S),!T){p=b+(p.length>0?" "+p:p);continue}w=!1}const k=o(y).join(":"),E=j?k+Ef:k,z=E+T;if(u.includes(z))continue;u.push(z);const _=i(T,w);for(let R=0;R<_.length;++R){const P=_[R];u.push(E+P)}p=b+(p.length>0?" "+p:p)}return p};function __(){let t=0,s,c,r="";for(;t<arguments.length;)(s=arguments[t++])&&(c=lN(s))&&(r&&(r+=" "),r+=c);return r}const lN=t=>{if(typeof t=="string")return t;let s,c="";for(let r=0;r<t.length;r++)t[r]&&(s=lN(t[r]))&&(c&&(c+=" "),c+=s);return c};function A_(t,...s){let c,r,i,o=u;function u(p){const f=s.reduce((b,h)=>h(b),t());return c=k_(f),r=c.cache.get,i=c.cache.set,o=m,m(p)}function m(p){const f=r(p);if(f)return f;const b=E_(p,c);return i(p,b),b}return function(){return o(__.apply(null,arguments))}}const Ht=t=>{const s=c=>c[t]||[];return s.isThemeGetter=!0,s},iN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,oN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,P_=/^\d+\/\d+$/,M_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,R_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,O_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,z_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,L_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,el=t=>P_.test(t),qe=t=>!!t&&!Number.isNaN(Number(t)),ic=t=>!!t&&Number.isInteger(Number(t)),Px=t=>t.endsWith("%")&&qe(t.slice(0,-1)),on=t=>M_.test(t),B_=()=>!0,U_=t=>R_.test(t)&&!O_.test(t),dN=()=>!1,I_=t=>z_.test(t),H_=t=>L_.test(t),$_=t=>!ke(t)&&!De(t),q_=t=>Tl(t,pN,dN),ke=t=>iN.test(t),Vc=t=>Tl(t,xN,U_),Mx=t=>Tl(t,K_,qe),c1=t=>Tl(t,uN,dN),Q_=t=>Tl(t,mN,H_),Ed=t=>Tl(t,fN,I_),De=t=>oN.test(t),wi=t=>kl(t,xN),W_=t=>kl(t,G_),r1=t=>kl(t,uN),V_=t=>kl(t,pN),F_=t=>kl(t,mN),_d=t=>kl(t,fN,!0),Tl=(t,s,c)=>{const r=iN.exec(t);return r?r[1]?s(r[1]):c(r[2]):!1},kl=(t,s,c=!1)=>{const r=oN.exec(t);return r?r[1]?s(r[1]):c:!1},uN=t=>t==="position"||t==="percentage",mN=t=>t==="image"||t==="url",pN=t=>t==="length"||t==="size"||t==="bg-size",xN=t=>t==="length",K_=t=>t==="number",G_=t=>t==="family-name",fN=t=>t==="shadow",Y_=()=>{const t=Ht("color"),s=Ht("font"),c=Ht("text"),r=Ht("font-weight"),i=Ht("tracking"),o=Ht("leading"),u=Ht("breakpoint"),m=Ht("container"),p=Ht("spacing"),f=Ht("radius"),b=Ht("shadow"),h=Ht("inset-shadow"),y=Ht("text-shadow"),j=Ht("drop-shadow"),S=Ht("blur"),N=Ht("perspective"),w=Ht("aspect"),T=Ht("ease"),k=Ht("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...z(),De,ke],R=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],A=()=>[De,ke,p],V=()=>[el,"full","auto",...A()],H=()=>[ic,"none","subgrid",De,ke],M=()=>["auto",{span:["full",ic,De,ke]},ic,De,ke],B=()=>[ic,"auto",De,ke],I=()=>["auto","min","max","fr",De,ke],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...A()],F=()=>[el,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],W=()=>[t,De,ke],ce=()=>[...z(),r1,c1,{position:[De,ke]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",V_,q_,{size:[De,ke]}],te=()=>[Px,wi,Vc],Y=()=>["","none","full",f,De,ke],ne=()=>["",qe,wi,Vc],pe=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>[qe,Px,r1,c1],he=()=>["","none",S,De,ke],Pe=()=>["none",qe,De,ke],Re=()=>["none",qe,De,ke],Q=()=>[qe,De,ke],xe=()=>[el,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[on],breakpoint:[on],color:[B_],container:[on],"drop-shadow":[on],ease:["in","out","in-out"],font:[$_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[on],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[on],shadow:[on],spacing:["px",qe],text:[on],"text-shadow":[on],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",el,ke,De,w]}
vendor: 12,870 bytes, line 49
49],container:["container"],columns:[{columns:[qe,ke,De,m]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[ic,"auto",De,ke]}],basis:[{basis:[el,"full","auto",m,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,el,"auto","initial","none",ke]}],grow:[{grow:["",qe,De,ke]}],shrink:[{shrink:["",qe,De,ke]}],order:[{order:[ic,"first","last","none",De,ke]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[m,"screen",...F()]}],"min-w":[{"min-w":[m,"screen","none",...F()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[u]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",c,wi,Vc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,De,Mx]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Px,ke]}],"font-family":[{font:[W_,ke,s]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,De,ke]}],"line-clamp":[{"line-clamp":[qe,"none",De,Mx]}],leading:[{leading:[o,...A()]}],"list-image":[{"list-image":["none",De,ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",De,Vc]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[qe,"auto",De,ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",De,ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:ge()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ic,De,ke],radial:["",De,ke],conic:[ic,De,ke]},F_,Q_]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,De,ke]}],"outline-w":[{outline:["",qe,wi,Vc]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",b,_d,Ed]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",h,_d,Ed]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[qe,Vc]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",y,_d,Ed]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[qe,De,ke]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[De,ke]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":z()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:ge()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,ke]}],filter:[{filter:["","none",De,ke]}],blur:[{blur:he()}],brightness:[{brightness:[qe,De,ke]}],contrast:[{contrast:[qe,De,ke]}],"drop-shadow":[{"drop-shadow":["","none",j,_d,Ed]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",qe,De,ke]}],"hue-rotate":[{"hue-rotate":[qe,De,ke]}],invert:[{invert:["",qe,De,ke]}],saturate:[{saturate:[qe,De,ke]}],sepia:[{sepia:["",qe,De,ke]}],"backdrop-filter":[{"backdrop-filter":["","none",De,ke]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[qe,De,ke]}],"backdrop-contrast":[{"backdrop-contrast":[qe,De,ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,De,ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,De,ke]}],"backdrop-invert":[{"backdrop-invert":["",qe,De,ke]}],"backdrop-opacity":[{"backdrop-opacity":[qe,De,ke]}],"backdrop-saturate":[{"backdrop-saturate":[qe,De,ke]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,De,ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",De,ke]}],ease:[{ease:["linear","initial",T,De,ke]}],delay:[{delay:[qe,De,ke]}],animate:[{animate:["none",k,De,ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,De,ke]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:Pe()}],"rotate-x":[{"rotate-x":Pe()}],"rotate-y":[{"rotate-y":Pe()}],"rotate-z":[{"rotate-z":Pe()}],scale:[{scale:Re()}],"scale-x":[{"scale-x":Re()}],"scale-y":[{"scale-y":Re()}],"scale-z":[{"scale-z":Re()}],"scale-3d":["scale-3d"],skew:[{skew:Q()}],"skew-x":[{"skew-x":Q()}],"skew-y":[{"skew-y":Q()}],transform:[{transform:[De,ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}
vendor: 5,466 bytes, line 49
49],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",De,ke]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",De,ke]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[qe,wi,Vc,Mx]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},X_=A_(Y_);function Ne(...t){return X_(cN(t))}function Ng({delayDuration:t=0,...s}){return e.jsx(m_,{"data-loc":"client/src/components/ui/tooltip.tsx:11","data-slot":"tooltip-provider",delayDuration:t,...s})}function yn({...t}){return e.jsx(Ng,{"data-loc":"client/src/components/ui/tooltip.tsx:23",children:e.jsx(p_,{"data-loc":"client/src/components/ui/tooltip.tsx:24","data-slot":"tooltip",...t})})}function jn({...t}){return e.jsx(x_,{"data-loc":"client/src/components/ui/tooltip.tsx:32","data-slot":"tooltip-trigger",...t})}function Nn({className:t,sideOffset:s=0,children:c,...r}){return e.jsx(f_,{"data-loc":"client/src/components/ui/tooltip.tsx:42",children:e.jsxs(g_,{"data-loc":"client/src/components/ui/tooltip.tsx:43","data-slot":"tooltip-content",sideOffset:s,className:Ne("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
49de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...r,children:[c,e.jsx(h_,{"data-loc":"client/src/components/ui/tooltip.tsx:53",className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const l1=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,i1=cN,Ou=(t,s)=>c=>{var r;if(s?.variants==null)return i1(t,c?.class,c?.className);const{variants:i,defaultVariants:o}=s,u=Object.keys(i).map(f=>{const b=c?.[f],h=o?.[f];if(b===null)return null;const y=l1(b)||l1(h);return i[f][y]}),m=c&&Object.entries(c).reduce((f,b)=>{let[h,y]=b;return y===void 0||(f[h]=y),f},{}),p=s==null||(r=s.compoundVariants)===null||r===void 0?void 0:r.reduce((f,b)=>{let{class:h,className:y,...j}=b;return Object.entries(j).every(S=>{let[N,w]=S;return Array.isArray(w)?w.includes({...o,...m}[N]):{...o,...m}[N]===w})?[...f,h,y]:f},[]);return i1(t,u,p,c?.class,c?.className)},Cg=Ou("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-semibold transition-[transform,background-color,border-color,color,box-shadow,opacity] duration-150 active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/40 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-[0_10px_24px_-14px_rgba(37,99,235,0.9)] hover:bg-primary/92 hover:shadow-[0_12px_28px_-14px_rgba(37,99,235,0.95)]",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-white/72 shadow-[0_1px_2px_rgba(18,35,61,0.04)] hover:border-primary/35 hover:bg-accent dark:bg-transparent dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-[0_1px_2px_rgba(18,35,61,0.04)] hover:bg-secondary/80",ghost:"hover:bg-accent dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3.5",sm:"h-8 rounded-lg gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-11 rounded-xl px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function G({className:t,variant:s,size:c,asChild:r=!1,...i}){const o=r?cg:"button";return e.jsx(o,{"data-loc":"client/src/components/ui/button.tsx:52","data-slot":"button",className:Ne(Cg({variant:s,size:c,className:t})),...i})}function Bt({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:7","data-slot":"card",className:Ne("bg-card/96 text-card-foreground flex flex-col gap-6 rounded-2xl border border-border/80 py-6 shadow-[0_18px_45px_-30px_rgba(18,35,61,0.42)] backdrop-blur-sm",t),...s})}function xs({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:20","data-slot":"card-header",className:Ne("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...s})}function fs({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:33","data-slot":"card-title",className:Ne("leading-none font-semibold",t),...s})}function gs({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:43","data-slot":"card-description",className:Ne("text-muted-foreground text-sm",t),...s})}function $t({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:66","data-slot":"card-content",className:Ne("px-6",t),...s})}/**
50 * @license lucide-react v0.453.0 - ISC
51 *
52 * This source code is licensed under the ISC license.
53 * See the LICENSE file in the root directory of this source tree.
54 */const Z_=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gN=(...t)=>t.filter((s,c,r)=>!!s&&r.indexOf(s)===c).join(" ");/**
55 * @license lucide-react v0.453.0 - ISC
56 *
57 * This source code is licensed under the ISC license.
58 * See the LICENSE file in the root directory of this source tree.
59 */var J_={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
60 * @license lucide-react v0.453.0 - ISC
61 *
62 * This source code is licensed under the ISC license.
63 * See the LICENSE file in the root directory of this source tree.
64 */const eA=v.forwardRef(({color:t="currentColor",size:s=24,strokeWidth:c=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:u,...m},p)=>v.createElement("svg",{ref:p,...J_,width:s,height:s,stroke:t,strokeWidth:r?Number(c)*24/Number(s):c,className:gN("lucide",i),...m},[...u.map(([f,b])=>v.createElement(f,b)),...Array.isArray(o)?o:[o]]));/**
65 * @license lucide-react v0.453.0 - ISC
66 *
67 * This source code is licensed under the ISC license.
68 * See the LICENSE file in the root directory of this source tree.
69 */const me=(t,s)=>{const c=v.forwardRef(({className:r,...i},o)=>v.createElement(eA,{ref:o,iconNode:s,className:gN(`lucide-${Z_(t)}`,r),...i}));return c.displayName=`${t}`,c};/**
70 * @license lucide-react v0.453.0 - ISC
71 *
72 * This source code is licensed under the ISC license.
73 * See the LICENSE file in the root directory of this source tree.
74 */const tA=me("AlarmClock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);/**
75 * @license lucide-react v0.453.0 - ISC
76 *
77 * This source code is licensed under the ISC license.
78 * See the LICENSE file in the root directory of this source tree.
79 */const eo=me("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
80 * @license lucide-react v0.453.0 - ISC
81 *
82 * This source code is licensed under the ISC license.
83 * See the LICENSE file in the root directory of this source tree.
84 */const ss=me("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
85 * @license lucide-react v0.453.0 - ISC
86 *
87 * This source code is licensed under the ISC license.
88 * See the LICENSE file in the root directory of this source tree.
89 */const cu=me("BadgeCheck",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
90 * @license lucide-react v0.453.0 - ISC
91 *
92 * This source code is licensed under the ISC license.
93 * See the LICENSE file in the root directory of this source tree.
94 */const Ea=me("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
95 * @license lucide-react v0.453.0 - ISC
96 *
97 * This source code is licensed under the ISC license.
98 * See the LICENSE file in the root directory of this source tree.
99 */const Af=me("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/**
100 * @license lucide-react v0.453.0 - ISC
101 *
102 * This source code is licensed under the ISC license.
103 * See the LICENSE file in the root directory of this source tree.
104 */const Bi=me("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/**
105 * @license lucide-react v0.453.0 - ISC
106 *
107 * This source code is licensed under the ISC license.
108 * See the LICENSE file in the root directory of this source tree.
109 */const aA=me("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
110 * @license lucide-react v0.453.0 - ISC
111 *
112 * This source code is licensed under the ISC license.
113 * See the LICENSE file in the root directory of this source tree.
114 */const sA=me("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
115 * @license lucide-react v0.453.0 - ISC
116 *
117 * This source code is licensed under the ISC license.
118 * See the LICENSE file in the root directory of this source tree.
119 */const Ui=me("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
120 * @license lucide-react v0.453.0 - ISC
121 *
122 * This source code is licensed under the ISC license.
123 * See the LICENSE file in the root directory of this source tree.
124 */const wg=me("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
125 * @license lucide-react v0.453.0 - ISC
126 *
127 * This source code is licensed under the ISC license.
128 * See the LICENSE file in the root directory of this source tree.
129 */const zu=me("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
130 * @license lucide-react v0.453.0 - ISC
131 *
132 * This source code is licensed under the ISC license.
133 * See the LICENSE file in the root directory of this source tree.
134 */const ru=me("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/**
135 * @license lucide-react v0.453.0 - ISC
136 *
137 * This source code is licensed under the ISC license.
138 * See the LICENSE file in the root directory of this source tree.
139 */const Sg=me("CalendarX",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m14 14-4 4",key:"rymu2i"}],["path",{d:"m10 14 4 4",key:"3sz06r"}]]);/**
140 * @license lucide-react v0.453.0 - ISC
141 *
142 * This source code is licensed under the ISC license.
143 * See the LICENSE file in the root directory of this source tree.
144 */const hN=me("ChartNoAxesCombined",[["path",{d:"M12 16v5",key:"zza2cw"}],["path",{d:"M16 14v7",key:"1g90b9"}],["path",{d:"M20 10v11",key:"1iqoj0"}
144],["path",{d:"m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15",key:"1fw8x9"}],["path",{d:"M4 18v3",key:"1yp0dc"}],["path",{d:"M8 14v7",key:"n3cwzv"}]]);/**
145 * @license lucide-react v0.453.0 - ISC
146 *
147 * This source code is licensed under the ISC license.
148 * See the LICENSE file in the root directory of this source tree.
149 */const Et=me("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
150 * @license lucide-react v0.453.0 - ISC
151 *
152 * This source code is licensed under the ISC license.
153 * See the LICENSE file in the root directory of this source tree.
154 */const ns=me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
155 * @license lucide-react v0.453.0 - ISC
156 *
157 * This source code is licensed under the ISC license.
158 * See the LICENSE file in the root directory of this source tree.
159 */const nA=me("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
160 * @license lucide-react v0.453.0 - ISC
161 *
162 * This source code is licensed under the ISC license.
163 * See the LICENSE file in the root directory of this source tree.
164 */const bN=me("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
165 * @license lucide-react v0.453.0 - ISC
166 *
167 * This source code is licensed under the ISC license.
168 * See the LICENSE file in the root directory of this source tree.
169 */const cA=me("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
170 * @license lucide-react v0.453.0 - ISC
171 *
172 * This source code is licensed under the ISC license.
173 * See the LICENSE file in the root directory of this source tree.
174 */const js=me("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
175 * @license lucide-react v0.453.0 - ISC
176 *
177 * This source code is licensed under the ISC license.
178 * See the LICENSE file in the root directory of this source tree.
179 */const Dn=me("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
180 * @license lucide-react v0.453.0 - ISC
181 *
182 * This source code is licensed under the ISC license.
183 * See the LICENSE file in the root directory of this source tree.
184 */const o1=me("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
185 * @license lucide-react v0.453.0 - ISC
186 *
187 * This source code is licensed under the ISC license.
188 * See the LICENSE file in the root directory of this source tree.
189 */const Tg=me("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
190 * @license lucide-react v0.453.0 - ISC
191 *
192 * This source code is licensed under the ISC license.
193 * See the LICENSE file in the root directory of this source tree.
194 */const vN=me("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
195 * @license lucide-react v0.453.0 - ISC
196 *
197 * This source code is licensed under the ISC license.
198 * See the LICENSE file in the root directory of this source tree.
199 */const rA=me("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
200 * @license lucide-react v0.453.0 - ISC
201 *
202 * This source code is licensed under the ISC license.
203 * See the LICENSE file in the root directory of this source tree.
204 */const lA=me("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
205 * @license lucide-react v0.453.0 - ISC
206 *
207 * This source code is licensed under the ISC license.
208 * See the LICENSE file in the root directory of this source tree.
209 */const kg=me("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
210 * @license lucide-react v0.453.0 - ISC
211 *
212 * This source code is licensed under the ISC license.
213 * See the LICENSE file in the root directory of this source tree.
214 */const Pf=me("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
215 * @license lucide-react v0.453.0 - ISC
216 *
217 * This source code is licensed under the ISC license.
218 * See the LICENSE file in the root directory of this source tree.
219 */const iA=me("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);/**
220 * @license lucide-react v0.453.0 - ISC
221 *
222 * This source code is licensed under the ISC license.
223 * See the LICENSE file in the root directory of this source tree.
224 */const oA=me("CopyPlus",[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
225 * @license lucide-react v0.453.0 - ISC
226 *
227 * This source code is licensed under the ISC license.
228 * See the LICENSE file in the root directory of this source tree.
229 */const Lu=me("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
230 * @license lucide-react v0.453.0 - ISC
231 *
232 * This source code is licensed under the ISC license.
233 * See the LICENSE file in the root directory of this source tree.
234 */const Kd=me("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
235 * @license lucide-react v0.453.0 - ISC
236 *
237 * This source code is licensed under the ISC license.
238 * See the LICENSE file in the root directory of this source tree.
239 */const to=me("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
240 * @license lucide-react v0.453.0 - ISC
241 *
242 * This source code is licensed under the ISC license.
243 * See the LICENSE file in the root directory of this source tree.
244 */const Ha=me("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
245 * @license lucide-react v0.453.0 - ISC
246 *
247 * This source code is licensed under the ISC license.
248 * See the LICENSE file in the root directory of this source tree.
249 */const yN=me("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
250 * @license lucide-react v0.453.0 - ISC
251 *
252 * This source code is licensed under the ISC license.
253 * See the LICENSE file in the root directory of this source tree.
254 */const yc=me("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
255 * @license lucide-react v0.453.0 - ISC
256 *
257 * This source code is licensed under the ISC license.
258 * See the LICENSE file in the root directory of this source tree.
259 */const jN=me("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
260 * @license lucide-react v0.453.0 - ISC
261 *
262 * This source code is licensed under the ISC license.
263 * See the LICENSE file in the root directory of this source tree.
264 */const Mf=me("FileArchive",[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]]);/**
265 * @license lucide-react v0.453.0 - ISC
266 *
267 * This source code is licensed under the ISC license.
268 * See the LICENSE file in the root directory of this source tree.
269 */const Dg=me("FileCheck2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m3 15 2 2 4-4",key:"1lhrkk"}]]);/**
270 * @license lucide-react v0.453.0 - ISC
271 *
272 * This source code is licensed under the ISC license.
273 * See the LICENSE file in the root directory of this source tree.
274 */const dA=me("FileImage",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]);/**
275 * @license lucide-react v0.453.0 - ISC
276 *
277 * This source code is licensed under the ISC license.
278 * See the LICENSE file in the root directory of this source tree.
279 */const NN=me("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/**
280 * @license lucide-react v0.453.0 - ISC
281 *
282 * This source code is licensed under the ISC license.
283 * See the LICENSE file in the root directory of this source tree.
284 */const uA=me("FileSpreadsheet",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]);/**
285 * @license lucide-react v0.453.0 - ISC
286 *
287 * This source code is licensed under the ISC license.
288 * See the LICENSE file in the root directory of this source tree.
289 */const Cn=me("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
290 * @license lucide-react v0.453.0 - ISC
291 *
292 * This source code is licensed under the ISC license.
293 * See the LICENSE file in the root directory of this source tree.
294 */const Eg=me("FileUp",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]]);/**
295 * @license lucide-react v0.453.0 - ISC
296 *
297 * This source code is licensed under the ISC license.
298 * See the LICENSE file in the root directory of this source tree.
299 */const bl=me("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
300 * @license lucide-react v0.453.0 - ISC
301 *
302 * This source code is licensed under the ISC license.
303 * See the LICENSE file in the root directory of this source tree.
304 */const mA=me("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
305 * @license lucide-react v0.453.0 - ISC
306 *
307 * This source code is licensed under the ISC license.
308 * See the LICENSE file in the root directory of this source tree.
309 */const CN=me("Gavel",[["path",{d:"m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8",key:"15492f"}],["path",{d:"m16 16 6-6",key:"vzrcl6"}],["path",{d:"m8 8 6-6",key:"18bi4p"}],["path",{d:"m9 7 8 8",key:"5jnvq1"}],["path",{d:"m21 11-8-8",key:"z4y7zo"}]]);/**
310 * @license lucide-react v0.453.0 - ISC
311 *
312 * This source code is licensed under the ISC license.
313 * See the LICENSE file in the root directory of this source tree.
314 */const pA=me("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/**
315 * @license lucide-react v0.453.0 - ISC
316 *
317 * This source code is licensed under the ISC license.
318 * See the LICENSE file in the root directory of this source tree.
319 */const xA=me("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
320 * @license lucide-react v0.453.0 - ISC
321 *
322 * This source code is licensed under the ISC license.
323 * See the LICENSE file in the root directory of this source tree.
324 */const fA=me("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]);/**
325 * @license lucide-react v0.453.0 - ISC
326 *
327 * This source code is licensed under the ISC license.
328 * See the LICENSE file in the root directory of this source tree.
329 */const gA=me("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
330 * @license lucide-react v0.453.0 - ISC
331 *
332 * This source code is licensed under the ISC license.
333 * See the LICENSE file in the root directory of this source tree.
334 */const hA=me("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
335 * @license lucide-react v0.453.0 - ISC
336 *
337 * This source code is licensed under the ISC license.
338 * See the LICENSE file in the root directory of this source tree.
339 */const lu=me("IdCard",[["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["path",{d:"M6.17 15a3 3 0 0 1 5.66 0",key:"n6f512"}],["circle",{cx:"9",cy:"11",r:"2",key:"yxgjnd"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]]);/**
340 * @license lucide-react v0.453.0 - ISC
341 *
342 * This source code is licensed under the ISC license.
343 * See the LICENSE file in the root directory of this source tree.
344 */const Bu=me("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
345 * @license lucide-react v0.453.0 - ISC
346 *
347 * This source code is licensed under the ISC license.
348 * See the LICENSE file in the root directory of this source tree.
349 */const tr=me("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
350 * @license lucide-react v0.453.0 - ISC
351 *
352 * This source code is licensed under the ISC license.
353 * See the LICENSE file in the root directory of this source tree.
354 */const bA=me("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
355 * @license lucide-react v0.453.0 - ISC
356 *
357 * This source code is licensed under the ISC license.
358 * See the LICENSE file in the root directory of this source tree.
359 */const vA=me("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);/**
360 * @license lucide-react v0.453.0 - ISC
361 *
362 * This source code is licensed under the ISC license.
363 * See the LICENSE file in the root directory of this source tree.
364 */const ao=me("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
365 * @license lucide-react v0.453.0 - ISC
366 *
367 * This source code is licensed under the ISC license.
368 * See the LICENSE file in the root directory of this source tree.
369 */const yA=me("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
370 * @license lucide-react v0.453.0 - ISC
371 *
372 * This source code is licensed under the ISC license.
373 * See the LICENSE file in the root directory of this source tree.
374 */const Ii=me("LibraryBig",[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]]);/**
375 * @license lucide-react v0.453.0 - ISC
376 *
377 * This source code is licensed under the ISC license.
378 * See the LICENSE file in the root directory of this source tree.
379 */const wN=me("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
380 * @license lucide-react v0.453.0 - ISC
381 *
382 * This source code is licensed under the ISC license.
383 * See the LICENSE file in the root directory of this source tree.
384 */const jA=me("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
385 * @license lucide-react v0.453.0 - ISC
386 *
387 * This source code is licensed under the ISC license.
388 * See the LICENSE file in the root directory of this source tree.
389 */const SN=me("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
390 * @license lucide-react v0.453.0 - ISC
391 *
392 * This source code is licensed under the ISC license.
393 * See the LICENSE file in the root directory of this source tree.
394 */const d1=me("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
395 * @license lucide-react v0.453.0 - ISC
396 *
397 * This source code is licensed under the ISC license.
398 * See the LICENSE file in the root directory of this source tree.
399 */const jt=me("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
400 * @license lucide-react v0.453.0 - ISC
401 *
402 * This source code is licensed under the ISC license.
403 * See the LICENSE file in the root directory of this source tree.
404 */const _g=me("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
405 * @license lucide-react v0.453.0 - ISC
406 *
407 * This source code is licensed under the ISC license.
408 * See the LICENSE file in the root directory of this source tree.
409 */const NA=me("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
410 * @license lucide-react v0.453.0 - ISC
411 *
412 * This source code is licensed under the ISC license.
413 * See the LICENSE file in the root directory of this source tree.
414 */const TN=me("MailCheck",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);/**
415 * @license lucide-react v0.453.0 - ISC
416 *
417 * This source code is licensed under the ISC license.
418 * See the LICENSE file in the root directory of this source tree.
419 */const CA=me("MailQuestion",[["path",{d:"M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5",key:"e61zoh"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M18 15.28c.2-.4.5-.8.9-1a2.1 2.1 0 0 1 2.6.4c.3.4.5.8.5 1.3 0 1.3-2 2-2 2",key:"7z9rxb"}],["path",{d:"M20 22v.01",key:"12bgn6"}]]);/**
420 * @license lucide-react v0.453.0 - ISC
421 *
422 * This source code is licensed under the ISC license.
423 * See the LICENSE file in the root directory of this source tree.
424 */const kN=me("MailWarning",[["path",{d:"M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5",key:"e61zoh"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M20 14v4",key:"1hm744"}],["path",{d:"M20 22v.01",key:"12bgn6"}]]);/**
425 * @license lucide-react v0.453.0 - ISC
426 *
427 * This source code is licensed under the ISC license.
428 * See the LICENSE file in the root directory of this source tree.
429 */const ar=me("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
430 * @license lucide-react v0.453.0 - ISC
431 *
432 * This source code is licensed under the ISC license.
433 * See the LICENSE file in the root directory of this source tree.
434 */const wA=me("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
435 * @license lucide-react v0.453.0 - ISC
436 *
437 * This source code is licensed under the ISC license.
438 * See the LICENSE file in the root directory of this source tree.
439 */const Ag=me("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
440 * @license lucide-react v0.453.0 - ISC
441 *
442 * This source code is licensed under the ISC license.
443 * See the LICENSE file in the root directory of this source tree.
444 */const SA=me("MessageSquarePlus",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]);/**
445 * @license lucide-react v0.453.0 - ISC
446 *
447 * This source code is licensed under the ISC license.
448 * See the LICENSE file in the root directory of this source tree.
449 */const DN=me("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
450 * @license lucide-react v0.453.0 - ISC
451 *
452 * This source code is licensed under the ISC license.
453 * See the LICENSE file in the root directory of this source tree.
454 */const TA=me("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
455 * @license lucide-react v0.453.0 - ISC
456 *
457 * This source code is licensed under the ISC license.
458 * See the LICENSE file in the root directory of this source tree.
459 */const Rf=me("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
460 * @license lucide-react v0.453.0 - ISC
461 *
462 * This source code is licensed under the ISC license.
463 * See the LICENSE file in the root directory of this source tree.
464 */const EN=me("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
465 * @license lucide-react v0.453.0 - ISC
466 *
467 * This source code is licensed under the ISC license.
468 * See the LICENSE file in the root directory of this source tree.
469 */const _N=me("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
470 * @license lucide-react v0.453.0 - ISC
471 *
472 * This source code is licensed under the ISC license.
473 * See the LICENSE file in the root directory of this source tree.
474 */const Pg=me("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
475 * @license lucide-react v0.453.0 - ISC
476 *
477 * This source code is licensed under the ISC license.
478 * See the LICENSE file in the root directory of this source tree.
479 */const kA=me("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
480 * @license lucide-react v0.453.0 - ISC
481 *
482 * This source code is licensed under the ISC license.
483 * See the LICENSE file in the root directory of this source tree.
484 */const DA=me("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
485 * @license lucide-react v0.453.0 - ISC
486 *
487 * This source code is licensed under the ISC license.
488 * See the LICENSE file in the root directory of this source tree.
489 */const vs=me("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
490 * @license lucide-react v0.453.0 - ISC
491 *
492 * This source code is licensed under the ISC license.
493 * See the LICENSE file in the root directory of this source tree.
494 */const vl=me("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
495 * @license lucide-react v0.453.0 - ISC
496 *
497 * This source code is licensed under the ISC license.
498 * See the LICENSE file in the root directory of this source tree.
499 */const AN=me("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/**
500 * @license lucide-react v0.453.0 - ISC
501 *
502 * This source code is licensed under the ISC license.
503 * See the LICENSE file in the root directory of this source tree.
504 */const EA=me("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}
504],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
505 * @license lucide-react v0.453.0 - ISC
506 *
507 * This source code is licensed under the ISC license.
508 * See the LICENSE file in the root directory of this source tree.
509 */const _A=me("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
510 * @license lucide-react v0.453.0 - ISC
511 *
512 * This source code is licensed under the ISC license.
513 * See the LICENSE file in the root directory of this source tree.
514 */const Mg=me("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
515 * @license lucide-react v0.453.0 - ISC
516 *
517 * This source code is licensed under the ISC license.
518 * See the LICENSE file in the root directory of this source tree.
519 */const AA=me("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
520 * @license lucide-react v0.453.0 - ISC
521 *
522 * This source code is licensed under the ISC license.
523 * See the LICENSE file in the root directory of this source tree.
524 */const iu=me("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
525 * @license lucide-react v0.453.0 - ISC
526 *
527 * This source code is licensed under the ISC license.
528 * See the LICENSE file in the root directory of this source tree.
529 */const An=me("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
530 * @license lucide-react v0.453.0 - ISC
531 *
532 * This source code is licensed under the ISC license.
533 * See the LICENSE file in the root directory of this source tree.
534 */const wn=me("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
535 * @license lucide-react v0.453.0 - ISC
536 *
537 * This source code is licensed under the ISC license.
538 * See the LICENSE file in the root directory of this source tree.
539 */const PA=me("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
540 * @license lucide-react v0.453.0 - ISC
541 *
542 * This source code is licensed under the ISC license.
543 * See the LICENSE file in the root directory of this source tree.
544 */const MA=me("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
545 * @license lucide-react v0.453.0 - ISC
546 *
547 * This source code is licensed under the ISC license.
548 * See the LICENSE file in the root directory of this source tree.
549 */const Jt=me("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
550 * @license lucide-react v0.453.0 - ISC
551 *
552 * This source code is licensed under the ISC license.
553 * See the LICENSE file in the root directory of this source tree.
554 */const Dt=me("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
555 * @license lucide-react v0.453.0 - ISC
556 *
557 * This source code is licensed under the ISC license.
558 * See the LICENSE file in the root directory of this source tree.
559 */const Rg=me("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);/**
560 * @license lucide-react v0.453.0 - ISC
561 *
562 * This source code is licensed under the ISC license.
563 * See the LICENSE file in the root directory of this source tree.
564 */const Og=me("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
565 * @license lucide-react v0.453.0 - ISC
566 *
567 * This source code is licensed under the ISC license.
568 * See the LICENSE file in the root directory of this source tree.
569 */const Hs=me("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
570 * @license lucide-react v0.453.0 - ISC
571 *
572 * This source code is licensed under the ISC license.
573 * See the LICENSE file in the root directory of this source tree.
574 */const St=me("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
575 * @license lucide-react v0.453.0 - ISC
576 *
577 * This source code is licensed under the ISC license.
578 * See the LICENSE file in the root directory of this source tree.
579 */const u1=me("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
580 * @license lucide-react v0.453.0 - ISC
581 *
582 * This source code is licensed under the ISC license.
583 * See the LICENSE file in the root directory of this source tree.
584 */const RA=me("UserMinus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
585 * @license lucide-react v0.453.0 - ISC
586 *
587 * This source code is licensed under the ISC license.
588 * See the LICENSE file in the root directory of this source tree.
589 */const OA=me("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
590 * @license lucide-react v0.453.0 - ISC
591 *
592 * This source code is licensed under the ISC license.
593 * See the LICENSE file in the root directory of this source tree.
594 */const zA=me("UserRoundCheck",[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);/**
595 * @license lucide-react v0.453.0 - ISC
596 *
597 * This source code is licensed under the ISC license.
598 * See the LICENSE file in the root directory of this source tree.
599 */const PN=me("UserRoundX",[["path",{d:"M2 21a8 8 0 0 1 11.873-7",key:"74fkxq"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"m17 17 5 5",key:"p7ous7"}],["path",{d:"m22 17-5 5",key:"gqnmv0"}]]);/**
600 * @license lucide-react v0.453.0 - ISC
601 *
602 * This source code is licensed under the ISC license.
603 * See the LICENSE file in the root directory of this source tree.
604 */const sr=me("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
605 * @license lucide-react v0.453.0 - ISC
606 *
607 * This source code is licensed under the ISC license.
608 * See the LICENSE file in the root directory of this source tree.
609 */const LA=me("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
610 * @license lucide-react v0.453.0 - ISC
611 *
612 * This source code is licensed under the ISC license.
613 * See the LICENSE file in the root directory of this source tree.
614 */const yl=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function BA(t,s){if(t instanceof RegExp)return{keys:!1,pattern:t};var c,r,i,o,u=[],m="",p=t.split("/");for(p[0]||p.shift();i=p.shift();)c=i[0],c==="*"?(u.push(c),m+=i[1]==="?"?"(?:/(.*))?":"/(.*)"):c===":"?(r=i.indexOf("?",1),o=i.indexOf(".",1),u.push(i.substring(1,~r?r:~o?o:i.length)),m+=~r&&!~o?"(?:/([^/]+?))?":"/([^/]+?)",~o&&(m+=(~r?"?":"")+"\\"+i.substring(o))):m+="/"+i;return{keys:u,pattern:new RegExp("^"+m+(s?"(?=$|/)":"/?$"),"i")}}
614var Rx={exports:{}},Ox={};/**
615 * @license React
616 * use-sync-external-store-shim.production.js
617 *
618 * Copyright (c) Meta Platforms, Inc. and affiliates.
619 *
620 * This source code is licensed under the MIT license found in the
621 * LICENSE file in the root directory of this source tree.
622 */var m1;function UA(){if(m1)return Ox;m1=1;var t=yu();function s(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var c=typeof Object.is=="function"?Object.is:s,r=t.useState,i=t.useEffect,o=t.useLayoutEffect,u=t.useDebugValue;function m(h,y){var j=y(),S=r({inst:{value:j,getSnapshot:y}}),N=S[0].inst,w=S[1];return o(function(){N.value=j,N.getSnapshot=y,p(N)&&w({inst:N})},[h,j,y]),i(function(){return p(N)&&w({inst:N}),h(function(){p(N)&&w({inst:N})})},[h]),u(j),j}function p(h){var y=h.getSnapshot;h=h.value;try{var j=y();return!c(h,j)}catch{return!0}}function f(h,y){return y()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:m;return Ox.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:b,Ox}var p1;function IA(){return p1||(p1=1,Rx.exports=UA()),Rx.exports}var MN=IA();const HA=ju.useInsertionEffect,$A=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qA=$A?v.useLayoutEffect:v.useEffect,QA=HA||qA,RN=t=>{const s=v.useRef([t,(...c)=>s[0](...c)]).current;return QA(()=>{s[0]=t}),s[1]},WA="popstate",zg="pushState",Lg="replaceState",VA="hashchange",x1=[WA,zg,Lg,VA],FA=t=>{for(const s of x1)addEventListener(s,t);return()=>{for(const s of x1)removeEventListener(s,t)}},ON=(t,s)=>MN.useSyncExternalStore(FA,t,s),KA=()=>location.search,GA=({ssrSearch:t=""}={})=>ON(KA,()=>t),f1=()=>location.pathname,YA=({ssrPath:t}={})=>ON(f1,t?()=>t:f1),XA=(t,{replace:s=!1,state:c=null}={})=>history[s?Lg:zg](c,"",t),ZA=(t={})=>[YA(t),XA],g1=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[g1]>"u"){for(const t of[zg,Lg]){const s=history[t];history[t]=function(){const c=s.apply(this,arguments),r=new Event(t);return r.arguments=arguments,dispatchEvent(r),c}}Object.defineProperty(window,g1,{value:!0})}const JA=(t,s)=>s.toLowerCase().indexOf(t.toLowerCase())?"~"+s:s.slice(t.length)||"/",zN=(t="")=>t==="/"?"":t,eP=(t,s)=>t[0]==="~"?t.slice(1):zN(s)+t,tP=(t="",s)=>JA(Of(zN(t)),Of(s)),aP=t=>t[0]==="?"?t.slice(1):t,Of=t=>{try{return decodeURI(t)}catch{return t}},sP=t=>Of(aP(t)),LN={hook:ZA,searchHook:GA,parser:BA,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t},BN=v.createContext(LN),Dl=()=>v.useContext(BN),UN={},IN=v.createContext(UN),Uu=()=>v.useContext(IN),Iu=t=>{const[s,c]=t.hook(t);return[tP(t.base,s),RN((r,i)=>c(eP(r,t.base),i))]},Pn=()=>Iu(Dl()),HN=()=>{const t=Dl();return sP(t.searchHook(t))},$N=(t,s,c,r)=>{const{pattern:i,keys:o}=s instanceof RegExp?{keys:!1,pattern:s}:t(s||"*",r),u=i.exec(c)||[],[m,...p]=u;return m!==void 0?[!0,(()=>{const f=o!==!1?Object.fromEntries(o.map((h,y)=>[h,p[y]])):u.groups;let b={...p};return f&&Object.assign(b,f),b})(),...r?[m]:[]]:[!1,null]},nP=({children:t,...s})=>{const c=Dl(),r=s.hook?LN:c;let i=r;const[o,u]=s.ssrPath?.split("?")??[];u&&(s.ssrSearch=u,s.ssrPath=o),s.hrefs=s.hrefs??s.hook?.hrefs;let m=v.useRef({}),p=m.current,f=p;for(let b in r){const h=b==="base"?r[b]+(s[b]||""):s[b]||r[b];p===f&&h!==f[b]&&(m.current=f={...f}),f[b]=h,(h!==r[b]||h!==i[b])&&(i=f)}return v.createElement(BN.Provider,{value:i,children:t})},h1=({children:t,component:s},c)=>s?v.createElement(s,{params:c}):typeof t=="function"?t(c):t,cP=t=>{let s=v.useRef(UN);const c=s.current;return s.current=Object.keys(t).length!==Object.keys(c).length||Object.entries(t).some(([r,i])=>i!==c[r])?t:c},zt=({path:t,nest:s,match:c,...r})=>{const i=Dl(),[o]=Iu(i),[u,m,p]=c??$N(i.parser,t,o,s),f=cP({...Uu(),...m});if(!u)return null;const b=p?v.createElement(nP,{base:p},h1(r,f)):h1(r,f);return v.createElement(IN.Provider,{value:f,children:b})},rt=v.forwardRef((t,s)=>{const c=Dl(),[r,i]=Iu(c),{to:o="",href:u=o,onClick:m,asChild:p,children:f,className:b,replace:h,state:y,...j}=t,S=RN(w=>{w.ctrlKey||w.metaKey||w.altKey||w.shiftKey||w.button!==0||(m?.(w),w.defaultPrevented||(w.preventDefault(),i(u,t)))}),N=c.hrefs(u[0]==="~"?u.slice(1):c.base+u,c);return p&&v.isValidElement(f)?v.cloneElement(f,{onClick:S,href:N}):v.createElement("a",{...j,onClick:S,href:N,className:b?.call?b(r===u):b,children:f,ref:s})}),zf=t=>Array.isArray(t)?t.flatMap(s=>zf(s&&s.type===v.Fragment?s.props.children:s)):[t],rP=({children:t,location:s})=>{const c=Dl(),[r]=Iu(c);typeof window<"u"&&(window.__WOUTER_ROUTES__||(window.__WOUTER_ROUTES__=[]),zf(t).forEach(o=>{if(v.isValidElement(o)&&o.props.path){const u=o.props.path;window.__WOUTER_ROUTES__.includes(u)||window.__WOUTER_ROUTES__.push(u)}}));for(const i of zf(t)){let o=0;if(v.isValidElement(i)&&(o=$N(c.parser,i.props.path,s||r,i.props.nest))[0])return v.cloneElement(i,{match:o})}return null};function b1(){const[,t]=Pn(),s=()=>{t("/")};return e.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:14",className:"min-h-screen w-full flex items-center justify-center bg-gradient-to-br from-slate-50 to-slate-100",children:e.jsx(Bt,{"data-loc":"client/src/pages/NotFound.tsx:15",className:"w-full max-w-lg mx-4 shadow-lg border-0 bg-white/80 backdrop-blur-sm",children:e.jsxs($t,{"data-loc":"client/src/pages/NotFound.tsx:16",className:"pt-8 pb-8 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:17",className:"flex justify-center mb-6",children:e.jsxs("div",{"data-loc":"client/src/pages/NotFound.tsx:18",className:"relative",children:[e.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:19",className:"absolute inset-0 bg-red-100 rounded-full animate-pulse"}),e.jsx(js,{"data-loc":"client/src/pages/NotFound.tsx:20",className:"relative h-16 w-16 text-red-500"})]})}),e.jsx("h1",{"data-loc":"client/src/pages/NotFound.tsx:24",className:"text-4xl font-bold text-slate-900 mb-2",children:"404"}),e.jsx("h2",{"data-loc":"client/src/pages/NotFound.tsx:26",className:"text-xl font-semibold text-slate-700 mb-4",children:"Page Not Found"}),e.jsxs("p",{"data-loc":"client/src/pages/NotFound.tsx:30",className:"text-slate-600 mb-8 leading-relaxed",children:["Sorry, the page you are looking for doesn't exist.",e.jsx("br",{"data-loc":"client/src/pages/NotFound.tsx:32"}),"It may have been moved or deleted."]}),e.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:36",id:"not-found-button-group",className:"flex flex-col sm:flex-row gap-3 justify-center",children:e.jsxs(G,{"data-loc":"client/src/pages/NotFound.tsx:40",onClick:s,className:"bg-blue-600 hover:bg-blue-700 text-white px-6 py-2.5 rounded-lg transition-all duration-200 shadow-md hover:shadow-lg",children:[e.jsx(hA,{"data-loc":"client/src/pages/NotFound.tsx:44",className:"w-4 h-4 mr-2"}),"Go Home"]})})]})})})}const Bg=()=>{const t="https://manus.im",s="4MeE37bkpPiX8gbkvrbJAg",c=`${window.location.origin}/api/oauth/callback`,r=crypto.randomUUID();document.cookie=`${Uk}=${r}; Path=/; Max-Age=600; SameSite=None; Secure`;const i=Ik({redirectUri:c,nonce:r}),o=new URL(`${t}/app-auth`);o.searchParams.set("appId",s),o.searchParams.set("redirectUri",c),o.searchParams.set("state",i),o.searchParams.set("type","signIn"),window.location.href=o.toString()};function qN(t){const{redirectOnUnauthenticated:s=!1,redirectPath:c}={},r=q.useUtils(),i=q.auth.me.useQuery(void 0,{retry:!1,refetchOnWindowFocus:!1}),o=q.auth.logout.useMutation({onSuccess:()=>{r.auth.me.setData(void 0,null)}}),u=v.useCallback(async()=>{try{await o.mutateAsync()}catch(p){if(p instanceof xl&&p.data?.code==="UNAUTHORIZED")return;throw p}finally{try{sessionStorage.removeItem("manus-cookie")}catch{}
vendor: 11,403 bytes, line 622
622r.auth.me.setData(void 0,null),await r.auth.me.invalidate()}},[o,r]),m=v.useMemo(()=>(localStorage.setItem("manus-runtime-user-info",JSON.stringify(i.data)),{user:i.data??null,loading:i.isLoading||o.isPending,error:i.error??o.error??null,isAuthenticated:!!i.data}),[i.data,i.error,i.isLoading,o.error,o.isPending]);return v.useEffect(()=>{s&&(i.isLoading||o.isPending||m.user||typeof window>"u"||c&&window.location.pathname===c||(c?window.location.href=c:Bg()))},[s,c,o.isPending,i.isLoading,m.user]),{...m,refresh:()=>i.refetch(),logout:u}}function lP(){return MN.useSyncExternalStore(iP,()=>!0,()=>!1)}function iP(){return()=>{}}var Ug="Avatar",[oP]=da(Ug),[dP,QN]=oP(Ug),WN=v.forwardRef((t,s)=>{const{__scopeAvatar:c,...r}=t,[i,o]=v.useState("idle");return e.jsx(dP,{scope:c,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:e.jsx(Ae.span,{...r,ref:s})})});WN.displayName=Ug;var VN="AvatarImage",uP=v.forwardRef((t,s)=>{const{__scopeAvatar:c,src:r,onLoadingStatusChange:i=()=>{},...o}=t,u=QN(VN,c),m=mP(r,o),p=Vt(f=>{i(f),u.onImageLoadingStatusChange(f)});return _t(()=>{m!=="idle"&&p(m)},[m,p]),m==="loaded"?e.jsx(Ae.img,{...o,ref:s,src:r}):null});uP.displayName=VN;var FN="AvatarFallback",KN=v.forwardRef((t,s)=>{const{__scopeAvatar:c,delayMs:r,...i}=t,o=QN(FN,c),[u,m]=v.useState(r===void 0);return v.useEffect(()=>{if(r!==void 0){const p=window.setTimeout(()=>m(!0),r);return()=>window.clearTimeout(p)}},[r]),u&&o.imageLoadingStatus!=="loaded"?e.jsx(Ae.span,{...i,ref:s}):null});KN.displayName=FN;function v1(t,s){return t?s?(t.src!==s&&(t.src=s),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function mP(t,{referrerPolicy:s,crossOrigin:c}){const r=lP(),i=v.useRef(null),o=r?(i.current||(i.current=new window.Image),i.current):null,[u,m]=v.useState(()=>v1(o,t));return _t(()=>{m(v1(o,t))},[o,t]),_t(()=>{const p=h=>()=>{m(h)};if(!o)return;const f=p("loaded"),b=p("error");return o.addEventListener("load",f),o.addEventListener("error",b),s&&(o.referrerPolicy=s),typeof c=="string"&&(o.crossOrigin=c),()=>{o.removeEventListener("load",f),o.removeEventListener("error",b)}},[o,c,s]),u}var pP=WN,xP=KN;function fP({className:t,...s}){return e.jsx(pP,{"data-loc":"client/src/components/ui/avatar.tsx:11","data-slot":"avatar",className:Ne("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...s})}function gP({className:t,...s}){return e.jsx(xP,{"data-loc":"client/src/components/ui/avatar.tsx:40","data-slot":"avatar-fallback",className:Ne("bg-muted flex size-full items-center justify-center rounded-full",t),...s})}function Ig(t){const s=t+"CollectionProvider",[c,r]=da(s),[i,o]=c(s,{collectionRef:{current:null},itemMap:new Map}),u=N=>{const{scope:w,children:T}=N,k=fe.useRef(null),E=fe.useRef(new Map).current;return e.jsx(i,{scope:w,itemMap:E,collectionRef:k,children:T})};u.displayName=s;const m=t+"CollectionSlot",p=Jc(m),f=fe.forwardRef((N,w)=>{const{scope:T,children:k}=N,E=o(m,T),z=He(w,E.collectionRef);return e.jsx(p,{ref:z,children:k})});f.displayName=m;const b=t+"CollectionItemSlot",h="data-radix-collection-item",y=Jc(b),j=fe.forwardRef((N,w)=>{const{scope:T,children:k,...E}=N,z=fe.useRef(null),_=He(w,z),R=o(b,T);return fe.useEffect(()=>(R.itemMap.set(z,{ref:z,...E}),()=>void R.itemMap.delete(z))),e.jsx(y,{[h]:"",ref:_,children:k})});j.displayName=b;function S(N){const w=o(t+"CollectionConsumer",N);return fe.useCallback(()=>{const k=w.collectionRef.current;if(!k)return[];const E=Array.from(k.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((R,P)=>E.indexOf(R.ref.current)-E.indexOf(P.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:u,Slot:f,ItemSlot:j},S,r]}var hP=v.createContext(void 0);function so(t){const s=v.useContext(hP);return t||s||"ltr"}var zx=0;function Hg(){v.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??y1()),document.body.insertAdjacentElement("beforeend",t[1]??y1()),zx++,()=>{zx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(s=>s.remove()),zx--}},[])}function y1(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Lx="focusScope.autoFocusOnMount",Bx="focusScope.autoFocusOnUnmount",j1={bubbles:!1,cancelable:!0},bP="FocusScope",Hu=v.forwardRef((t,s)=>{const{loop:c=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...u}=t,[m,p]=v.useState(null),f=Vt(i),b=Vt(o),h=v.useRef(null),y=He(s,N=>p(N)),j=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let N=function(E){if(j.paused||!m)return;const z=E.target;m.contains(z)?h.current=z:mc(h.current,{select:!0})},w=function(E){if(j.paused||!m)return;const z=E.relatedTarget;z!==null&&(m.contains(z)||mc(h.current,{select:!0}))},T=function(E){if(document.activeElement===document.body)for(const _ of E)_.removedNodes.length>0&&mc(m)};document.addEventListener("focusin",N),document.addEventListener("focusout",w);const k=new MutationObserver(T);return m&&k.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",N),document.removeEventListener("focusout",w),k.disconnect()}}},[r,m,j.paused]),v.useEffect(()=>{if(m){C1.add(j);const N=document.activeElement;if(!m.contains(N)){const T=new CustomEvent(Lx,j1);m.addEventListener(Lx,f),m.dispatchEvent(T),T.defaultPrevented||(vP(wP(GN(m)),{select:!0}),document.activeElement===N&&mc(m))}return()=>{m.removeEventListener(Lx,f),setTimeout(()=>{const T=new CustomEvent(Bx,j1);m.addEventListener(Bx,b),m.dispatchEvent(T),T.defaultPrevented||mc(N??document.body,{select:!0}),m.removeEventListener(Bx,b),C1.remove(j)},0)}}},[m,f,b,j]);const S=v.useCallback(N=>{if(!c&&!r||j.paused)return;const w=N.key==="Tab"&&!N.altKey&&!N.ctrlKey&&!N.metaKey,T=document.activeElement;if(w&&T){const k=N.currentTarget,[E,z]=yP(k);E&&z?!N.shiftKey&&T===z?(N.preventDefault(),c&&mc(E,{select:!0})):N.shiftKey&&T===E&&(N.preventDefault(),c&&mc(z,{select:!0})):T===k&&N.preventDefault()}},[c,r,j.paused]);return e.jsx(Ae.div,{tabIndex:-1,...u,ref:y,onKeyDown:S})});Hu.displayName=bP;function vP(t,{select:s=!1}={}){const c=document.activeElement;for(const r of t)if(mc(r,{select:s}),document.activeElement!==c)return}function yP(t){const s=GN(t),c=N1(s,t),r=N1(s.reverse(),t);return[c,r]}function GN(t){const s=[],c=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;c.nextNode();)s.push(c.currentNode);return s}function N1(t,s){for(const c of t)if(!jP(c,{upTo:s}))return c}function jP(t,{upTo:s}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(s!==void 0&&t===s)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function NP(t){return t instanceof HTMLInputElement&&"select"in t}function mc(t,{select:s=!1}={}){if(t&&t.focus){const c=document.activeElement;t.focus({preventScroll:!0}),t!==c&&NP(t)&&s&&t.select()}}var C1=CP();function CP(){let t=[];return{add(s){const c=t[0];s!==c&&c?.pause(),t=w1(t,s),t.unshift(s)},remove(s){t=w1(t,s),t[0]?.resume()}}}function w1(t,s){const c=[...t],r=c.indexOf(s);return r!==-1&&c.splice(r,1),c}function wP(t){return t.filter(s=>s.tagName!=="A")}var Ux="rovingFocusGroup.onEntryFocus",SP={bubbles:!1,cancelable:!0},no="RovingFocusGroup",[Lf,YN,TP]=Ig(no),[kP,$u]=da(no,[TP]),[DP,EP]=kP(no),XN=v.forwardRef((t,s)=>e.jsx(Lf.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(Lf.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(_P,{...t,ref:s})})}));XN.displayName=no;var _P=v.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:c,orientation:r,loop:i=!1,dir:o,currentTabStopId:u,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:p,onEntryFocus:f,preventScrollOnEntryFocus:b=!1,...h}=t,y=v.useRef(null),j=He(s,y),S=so(o),[N,w]=Bs({prop:u,defaultProp:m??null,onChange:p,caller:no}),[T,k]=v.useState(!1),E=Vt(f),z=YN(c),_=v.useRef(!1),[R,P]=v.useState(0);return v.useEffect(()=>{const A=y.current;if(A)return A.addEventListener(Ux,E),()=>A.removeEventListener(Ux,E)},[E]),e.jsx(DP,{scope:c,orientation:r,dir:S,loop:i,currentTabStopId:N,onItemFocus:v.useCallback(A=>w(A),[w]),onItemShiftTab:v.useCallback(()=>k(!0),[]),onFocusableItemAdd:v.useCallback(()=>P(A=>A+1),[]),onFocusableItemRemove:v.useCallback(()=>P(A=>A-1),[]),children:e.jsx(Ae.div,{tabIndex:T||R===0?-1:0,"data-orientation":r,...h,ref:j,style:{outline:"none",...t.style},onMouseDown:ye(t.onMouseDown,()=>{_.current=!0}),onFocus:ye(t.onFocus,A=>{const V=!_.current;if(A.target===A.currentTarget&&V&&!T){const H=new CustomEvent(Ux,SP);if(A.currentTarget.dispatchEvent(H),!H.defaultPrevented){const M=z().filter(L=>L.focusable),B=M.find(L=>L.active),I=M.find(L=>L.id===N),se=[B,I,...M].filter(Boolean).map(L=>L.ref.current);eC(se,b)}}_.current=!1}),onBlur:ye(t.onBlur,()=>k(!1))})})}),ZN="RovingFocusGroupItem",JN=v.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:c,focusable:r=!0,active:i=!1,tabStopId:o,children:u,...m}=t,p=cs(),f=o||p,b=EP(ZN,c),h=b.currentTabStopId===f,y=YN(c),{onFocusableItemAdd:j,onFocusableItemRemove:S,currentTabStopId:N}=b;return v.useEffect(()=>{if(r)return j(),()=>S()},[r,j,S]),e.jsx(Lf.ItemSlot,{scope:c,id:f,focusable:r,active:i,children:e.jsx(Ae.span,{tabIndex:h?0:-1,"data-orientation":b.orientation,...m,ref:s,onMouseDown:ye(t.onMouseDown,w=>{r?b.onItemFocus(f):w.preventDefault()}),onFocus:ye(t.onFocus,()=>b.onItemFocus(f)),onKeyDown:ye(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){b.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const T=MP(w,b.orientation,b.dir);if(T!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let E=y().filter(z=>z.focusable).map(z=>z.ref.current);if(T==="last")E.reverse();else if(T==="prev"||T==="next"){T==="prev"&&E.reverse();const z=E.indexOf(w.currentTarget);E=b.loop?RP(E,z+1):E.slice(z+1)}setTimeout(()=>eC(E))}}),children:typeof u=="function"?u({isCurrentTabStop:h,hasTabStop:N!=null}):u})})});JN.displayName=ZN;var AP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function PP(t,s){return s!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function MP(t,s,c){const r=PP(t.key,c);if(!(s==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(s==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return AP[r]}function eC(t,s=!1){const c=document.activeElement;for(const r of t)if(r===c||(r.focus({preventScroll:s}),document.activeElement!==c))return}function RP(t,s){return t.map((c,r)=>t[(s+r)%t.length])}var tC=XN,aC=JN,OP=function(t){if(typeof document>"u")return null;var s=Array.isArray(t)?t[0]:t;return s.ownerDocument.body},tl=new WeakMap,Ad=new WeakMap,Pd={},Ix=0,sC=function(t){return t&&(t.host||sC(t.parentNode))},zP=function(t,s){return s.map(function(c){if(t.contains(c))return c;var r=sC(c);return r&&t.contains(r)?r:(console.error("aria-hidden",c,"in not contained inside",t,". Doing nothing"),null)}).filter(function(c){return!!c})},LP=function(t,s,c,r){var i=zP(s,Array.isArray(t)?t:[t]);Pd[c]||(Pd[c]=new WeakMap);var o=Pd[c],u=[],m=new Set,p=new Set(i),f=function(h){!h||m.has(h
vendor: 6,501 bytes, lines 622-637
622)||(m.add(h),f(h.parentNode))};i.forEach(f);var b=function(h){!h||p.has(h)||Array.prototype.forEach.call(h.children,function(y){if(m.has(y))b(y);else try{var j=y.getAttribute(r),S=j!==null&&j!=="false",N=(tl.get(y)||0)+1,w=(o.get(y)||0)+1;tl.set(y,N),o.set(y,w),u.push(y),N===1&&S&&Ad.set(y,!0),w===1&&y.setAttribute(c,"true"),S||y.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",y,T)}})};return b(s),m.clear(),Ix++,function(){u.forEach(function(h){var y=tl.get(h)-1,j=o.get(h)-1;tl.set(h,y),o.set(h,j),y||(Ad.has(h)||h.removeAttribute(r),Ad.delete(h)),j||h.removeAttribute(c)}),Ix--,Ix||(tl=new WeakMap,tl=new WeakMap,Ad=new WeakMap,Pd={})}},$g=function(t,s,c){c===void 0&&(c="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=OP(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),LP(r,i,c,"aria-hidden")):function(){return null}},Ms=function(){return Ms=Object.assign||function(s){for(var c,r=1,i=arguments.length;r<i;r++){c=arguments[r];for(var o in c)Object.prototype.hasOwnProperty.call(c,o)&&(s[o]=c[o])}return s},Ms.apply(this,arguments)};function nC(t,s){var c={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&s.indexOf(r)<0&&(c[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)s.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(c[r[i]]=t[r[i]]);return c}function BP(t,s,c){if(c||arguments.length===2)for(var r=0,i=s.length,o;r<i;r++)(o||!(r in s))&&(o||(o=Array.prototype.slice.call(s,0,r)),o[r]=s[r]);return t.concat(o||Array.prototype.slice.call(s))}var Gd="right-scroll-bar-position",Yd="width-before-scroll-bar",UP="with-scroll-bars-hidden",IP="--removed-body-scroll-bar-size";function Hx(t,s){return typeof t=="function"?t(s):t&&(t.current=s),t}function HP(t,s){var c=v.useState(function(){return{value:t,callback:s,facade:{get current(){return c.value},set current(r){var i=c.value;i!==r&&(c.value=r,c.callback(r,i))}}}})[0];return c.callback=s,c.facade}var $P=typeof window<"u"?v.useLayoutEffect:v.useEffect,S1=new WeakMap;function qP(t,s){var c=HP(null,function(r){return t.forEach(function(i){return Hx(i,r)})});return $P(function(){var r=S1.get(c);if(r){var i=new Set(r),o=new Set(t),u=c.current;i.forEach(function(m){o.has(m)||Hx(m,null)}),o.forEach(function(m){i.has(m)||Hx(m,u)})}S1.set(c,t)},[t]),c}function QP(t){return t}function WP(t,s){s===void 0&&(s=QP);var c=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return c.length?c[c.length-1]:t},useMedium:function(o){var u=s(o,r);return c.push(u),function(){c=c.filter(function(m){return m!==u})}},assignSyncMedium:function(o){for(r=!0;c.length;){var u=c;c=[],u.forEach(o)}c={push:function(m){return o(m)},filter:function(){return c}}},assignMedium:function(o){r=!0;var u=[];if(c.length){var m=c;c=[],m.forEach(o),u=c}var p=function(){var b=u;u=[],b.forEach(o)},f=function(){return Promise.resolve().then(p)};f(),c={push:function(b){u.push(b),f()},filter:function(b){return u=u.filter(b),c}}}};return i}function VP(t){t===void 0&&(t={});var s=WP(null);return s.options=Ms({async:!0,ssr:!1},t),s}var cC=function(t){var s=t.sideCar,c=nC(t,["sideCar"]);if(!s)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=s.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Ms({},c))};cC.isSideCarExport=!0;function FP(t,s){return t.useMedium(s),cC}var rC=VP(),$x=function(){},qu=v.forwardRef(function(t,s){var c=v.useRef(null),r=v.useState({onScrollCapture:$x,onWheelCapture:$x,onTouchMoveCapture:$x}),i=r[0],o=r[1],u=t.forwardProps,m=t.children,p=t.className,f=t.removeScrollBar,b=t.enabled,h=t.shards,y=t.sideCar,j=t.noRelative,S=t.noIsolation,N=t.inert,w=t.allowPinchZoom,T=t.as,k=T===void 0?"div":T,E=t.gapMode,z=nC(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=y,R=qP([c,s]),P=Ms(Ms({},z),i);return v.createElement(v.Fragment,null,b&&v.createElement(_,{sideCar:rC,removeScrollBar:f,shards:h,noRelative:j,noIsolation:S,inert:N,setCallbacks:o,allowPinchZoom:!!w,lockRef:c,gapMode:E}),u?v.cloneElement(v.Children.only(m),Ms(Ms({},P),{ref:R})):v.createElement(k,Ms({},P,{className:p,ref:R}),m))});qu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qu.classNames={fullWidth:Yd,zeroRight:Gd};var KP=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function GP(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var s=KP();return s&&t.setAttribute("nonce",s),t}function YP(t,s){t.styleSheet?t.styleSheet.cssText=s:t.appendChild(document.createTextNode(s))}function XP(t){var s=document.head||document.getElementsByTagName("head")[0];s.appendChild(t)}var ZP=function(){var t=0,s=null;return{add:function(c){t==0&&(s=GP())&&(YP(s,c),XP(s)),t++},remove:function(){t--,!t&&s&&(s.parentNode&&s.parentNode.removeChild(s),s=null)}}},JP=function(){var t=ZP();return function(s,c){v.useEffect(function(){return t.add(s),function(){t.remove()}},[s&&c])}},lC=function(){var t=JP(),s=function(c){var r=c.styles,i=c.dynamic;return t(r,i),null};return s},e8={left:0,top:0,right:0,gap:0},qx=function(t){return parseInt(t||"",10)||0},t8=function(t){var s=window.getComputedStyle(document.body),c=s[t==="padding"?"paddingLeft":"marginLeft"],r=s[t==="padding"?"paddingTop":"marginTop"],i=s[t==="padding"?"paddingRight":"marginRight"];return[qx(c),qx(r),qx(i)]},a8=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return e8;var s=t8(t),c=document.documentElement.clientWidth,r=window.innerWidth;return{left:s[0],top:s[1],right:s[2],gap:Math.max(0,r-c+s[2]-s[0])}},s8=lC(),ml="data-scroll-locked",n8=function(t,s,c,r){var i=t.left,o=t.top,u=t.right,m=t.gap;return c===void 0&&(c="margin"),`
623  .`.concat(UP,` {
624   overflow: hidden `).concat(r,`;
625   padding-right: `).concat(m,"px ").concat(r,`;
626  }
627  body[`).concat(ml,`] {
628    overflow: hidden `).concat(r,`;
629    overscroll-behavior: contain;
630    `).concat([s&&"position: relative ".concat(r,";"),c==="margin"&&`
631    padding-left: `.concat(i,`px;
632    padding-top: `).concat(o,`px;
633    padding-right: `).concat(u,`px;
634    margin-left:0;
635    margin-top:0;
636    margin-right: `).concat(m,"px ").concat(r,`;
637    `),c==="padding"&&"padding-right: ".concat(m,"px ").concat(r,";
637")].filter(Boolean).join(""),`
638  }
639  
640  .`).concat(Gd,` {
641    right: `).concat(m,"px ").concat(r,`;
642  }
643  
644  .`).concat(Yd,` {
645    margin-right: `).concat(m,"px ").concat(r,`;
646  }
647  
648  .`).concat(Gd," .").concat(Gd,` {
649    right: 0 `).concat(r,`;
650  }
651  
652  .`).concat(Yd," .").concat(Yd,` {
653    margin-right: 0 `).concat(r,`;
654  }
655  
656  body[`).concat(ml,`] {
657    `).concat(IP,": ").concat(m,`px;
658  }
659`)},T1=function(){var t=parseInt(document.body.getAttribute(ml)||"0",10);return isFinite(t)?t:0},c8=function(){v.useEffect(function(){return document.body.setAttribute(ml,(T1()+1).toString()),function(){var t=T1()-1;t<=0?document.body.removeAttribute(ml):document.body.setAttribute(ml,t.toString())}},[])},r8=function(t){var s=t.noRelative,c=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;c8();var o=v.useMemo(function(){return a8(i)},[i]);return v.createElement(s8,{styles:n8(o,!s,i,c?"":"!important")})},Bf=!1;if(typeof window<"u")try{var Md=Object.defineProperty({},"passive",{get:function(){return Bf=!0,!0}});window.addEventListener("test",Md,Md),window.removeEventListener("test",Md,Md)}catch{Bf=!1}var al=Bf?{passive:!1}:!1,l8=function(t){return t.tagName==="TEXTAREA"},iC=function(t,s){if(!(t instanceof Element))return!1;var c=window.getComputedStyle(t);return c[s]!=="hidden"&&!(c.overflowY===c.overflowX&&!l8(t)&&c[s]==="visible")},i8=function(t){return iC(t,"overflowY")},o8=function(t){return iC(t,"overflowX")},k1=function(t,s){var c=s.ownerDocument,r=s;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=oC(t,r);if(i){var o=dC(t,r),u=o[1],m=o[2];if(u>m)return!0}r=r.parentNode}while(r&&r!==c.body);return!1},d8=function(t){var s=t.scrollTop,c=t.scrollHeight,r=t.clientHeight;return[s,c,r]},u8=function(t){var s=t.scrollLeft,c=t.scrollWidth,r=t.clientWidth;return[s,c,r]},oC=function(t,s){return t==="v"?i8(s):o8(s)},dC=function(t,s){return t==="v"?d8(s):u8(s)},m8=function(t,s){return t==="h"&&s==="rtl"?-1:1},p8=function(t,s,c,r,i){var o=m8(t,window.getComputedStyle(s).direction),u=o*r,m=c.target,p=s.contains(m),f=!1,b=u>0,h=0,y=0;do{if(!m)break;var j=dC(t,m),S=j[0],N=j[1],w=j[2],T=N-w-o*S;(S||T)&&oC(t,m)&&(h+=T,y+=S);var k=m.parentNode;m=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!p&&m!==document.body||p&&(s.contains(m)||s===m));return(b&&Math.abs(h)<1||!b&&Math.abs(y)<1)&&(f=!0),f},Rd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},D1=function(t){return[t.deltaX,t.deltaY]},E1=function(t){return t&&"current"in t?t.current:t},x8=function(t,s){return t[0]===s[0]&&t[1]===s[1]},f8=function(t){return`
660  .block-interactivity-`.concat(t,` {pointer-events: none;}
661  .allow-interactivity-`).concat(t,` {pointer-events: all;}
662`)},g8=0,sl=[];function h8(t){var s=v.useRef([]),c=v.useRef([0,0]),r=v.useRef(),i=v.useState(g8++)[0],o=v.useState(lC)[0],u=v.useRef(t);v.useEffect(function(){u.current=t},[t]),v.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var N=BP([t.lockRef.current],(t.shards||[]).map(E1),!0).filter(Boolean);return N.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),N.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var m=v.useCallback(function(N,w){if("touches"in N&&N.touches.length===2||N.type==="wheel"&&N.ctrlKey)return!u.current.allowPinchZoom;var T=Rd(N),k=c.current,E="deltaX"in N?N.deltaX:k[0]-T[0],z="deltaY"in N?N.deltaY:k[1]-T[1],_,R=N.target,P=Math.abs(E)>Math.abs(z)?"h":"v";if("touches"in N&&P==="h"&&R.type==="range")return!1;var A=k1(P,R);if(!A)return!0;if(A?_=P:(_=P==="v"?"h":"v",A=k1(P,R)),!A)return!1;if(!r.current&&"changedTouches"in N&&(E||z)&&(r.current=_),!_)return!0;var V=r.current||_;return p8(V,w,N,V==="h"?E:z)},[]),p=v.useCallback(function(N){var w=N;if(!(!sl.length||sl[sl.length-1]!==o)){var T="deltaY"in w?D1(w):Rd(w),k=s.current.filter(function(_){return _.name===w.type&&(_.target===w.target||w.target===_.shadowParent)&&x8(_.delta,T)})[0];if(k&&k.should){w.cancelable&&w.preventDefault();return}
vendor: 27,524 bytes, lines 662-666
662if(!k){var E=(u.current.shards||[]).map(E1).filter(Boolean).filter(function(_){return _.contains(w.target)}),z=E.length>0?m(w,E[0]):!u.current.noIsolation;z&&w.cancelable&&w.preventDefault()}}},[]),f=v.useCallback(function(N,w,T,k){var E={name:N,delta:w,target:T,should:k,shadowParent:b8(T)};s.current.push(E),setTimeout(function(){s.current=s.current.filter(function(z){return z!==E})},1)},[]),b=v.useCallback(function(N){c.current=Rd(N),r.current=void 0},[]),h=v.useCallback(function(N){f(N.type,D1(N),N.target,m(N,t.lockRef.current))},[]),y=v.useCallback(function(N){f(N.type,Rd(N),N.target,m(N,t.lockRef.current))},[]);v.useEffect(function(){return sl.push(o),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:y}),document.addEventListener("wheel",p,al),document.addEventListener("touchmove",p,al),document.addEventListener("touchstart",b,al),function(){sl=sl.filter(function(N){return N!==o}),document.removeEventListener("wheel",p,al),document.removeEventListener("touchmove",p,al),document.removeEventListener("touchstart",b,al)}},[]);var j=t.removeScrollBar,S=t.inert;return v.createElement(v.Fragment,null,S?v.createElement(o,{styles:f8(i)}):null,j?v.createElement(r8,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function b8(t){for(var s=null;t!==null;)t instanceof ShadowRoot&&(s=t.host,t=t.host),t=t.parentNode;return s}const v8=FP(rC,h8);var Qu=v.forwardRef(function(t,s){return v.createElement(qu,Ms({},t,{ref:s,sideCar:v8}))});Qu.classNames=qu.classNames;var Uf=["Enter"," "],y8=["ArrowDown","PageUp","Home"],uC=["ArrowUp","PageDown","End"],j8=[...y8,...uC],N8={ltr:[...Uf,"ArrowRight"],rtl:[...Uf,"ArrowLeft"]},C8={ltr:["ArrowLeft"],rtl:["ArrowRight"]},co="Menu",[Hi,w8,S8]=Ig(co),[dr,mC]=da(co,[S8,Sl,$u]),Wu=Sl(),pC=$u(),[T8,ur]=dr(co),[k8,ro]=dr(co),xC=t=>{const{__scopeMenu:s,open:c=!1,children:r,dir:i,onOpenChange:o,modal:u=!0}=t,m=Wu(s),[p,f]=v.useState(null),b=v.useRef(!1),h=Vt(o),y=so(i);return v.useEffect(()=>{const j=()=>{b.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>b.current=!1;return document.addEventListener("keydown",j,{capture:!0}),()=>{document.removeEventListener("keydown",j,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),e.jsx(fg,{...m,children:e.jsx(T8,{scope:s,open:c,onOpenChange:h,content:p,onContentChange:f,children:e.jsx(k8,{scope:s,onClose:v.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:b,dir:y,modal:u,children:r})})})};xC.displayName=co;var D8="MenuAnchor",qg=v.forwardRef((t,s)=>{const{__scopeMenu:c,...r}=t,i=Wu(c);return e.jsx(gg,{...i,...r,ref:s})});qg.displayName=D8;var Qg="MenuPortal",[E8,fC]=dr(Qg,{forceMount:void 0}),gC=t=>{const{__scopeMenu:s,forceMount:c,children:r,container:i}=t,o=ur(Qg,s);return e.jsx(E8,{scope:s,forceMount:c,children:e.jsx(ea,{present:c||o.open,children:e.jsx(Zi,{asChild:!0,container:i,children:r})})})};gC.displayName=Qg;var rs="MenuContent",[_8,Wg]=dr(rs),hC=v.forwardRef((t,s)=>{const c=fC(rs,t.__scopeMenu),{forceMount:r=c.forceMount,...i}=t,o=ur(rs,t.__scopeMenu),u=ro(rs,t.__scopeMenu);return e.jsx(Hi.Provider,{scope:t.__scopeMenu,children:e.jsx(ea,{present:r||o.open,children:e.jsx(Hi.Slot,{scope:t.__scopeMenu,children:u.modal?e.jsx(A8,{...i,ref:s}):e.jsx(P8,{...i,ref:s})})})})}),A8=v.forwardRef((t,s)=>{const c=ur(rs,t.__scopeMenu),r=v.useRef(null),i=He(s,r);return v.useEffect(()=>{const o=r.current;if(o)return $g(o)},[]),e.jsx(Vg,{...t,ref:i,trapFocus:c.open,disableOutsidePointerEvents:c.open,disableOutsideScroll:!0,onFocusOutside:ye(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>c.onOpenChange(!1)})}),P8=v.forwardRef((t,s)=>{const c=ur(rs,t.__scopeMenu);return e.jsx(Vg,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>c.onOpenChange(!1)})}),M8=Jc("MenuContent.ScrollLock"),Vg=v.forwardRef((t,s)=>{const{__scopeMenu:c,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:u,disableOutsidePointerEvents:m,onEntryFocus:p,onEscapeKeyDown:f,onPointerDownOutside:b,onFocusOutside:h,onInteractOutside:y,onDismiss:j,disableOutsideScroll:S,...N}=t,w=ur(rs,c),T=ro(rs,c),k=Wu(c),E=pC(c),z=w8(c),[_,R]=v.useState(null),P=v.useRef(null),A=He(s,P,w.onContentChange),V=v.useRef(0),H=v.useRef(""),M=v.useRef(0),B=v.useRef(null),I=v.useRef("right"),ie=v.useRef(0),se=S?Qu:v.Fragment,L=S?{as:M8,allowPinchZoom:!0}:void 0,F=ce=>{const ge=H.current+ce,O=z().filter(le=>!le.disabled),te=document.activeElement,Y=O.find(le=>le.ref.current===te)?.textValue,ne=O.map(le=>le.textValue),pe=W8(ne,ge,Y),be=O.find(le=>le.textValue===pe)?.ref.current;(function le(he){H.current=he,window.clearTimeout(V.current),he!==""&&(V.current=window.setTimeout(()=>le(""),1e3))})(ge),be&&setTimeout(()=>be.focus())};v.useEffect(()=>()=>window.clearTimeout(V.current),[]),Hg();const W=v.useCallback(ce=>I.current===B.current?.side&&F8(ce,B.current?.area),[]);return e.jsx(_8,{scope:c,searchRef:H,onItemEnter:v.useCallback(ce=>{W(ce)&&ce.preventDefault()},[W]),onItemLeave:v.useCallback(ce=>{W(ce)||(P.current?.focus(),R(null))},[W]),onTriggerLeave:v.useCallback(ce=>{W(ce)&&ce.preventDefault()},[W]),pointerGraceTimerRef:M,onPointerGraceIntentChange:v.useCallback(ce=>{B.current=ce},[]),children:e.jsx(se,{...L,children:e.jsx(Hu,{asChild:!0,trapped:i,onMountAutoFocus:ye(o,ce=>{ce.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:e.jsx(Yi,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:f,onPointerDownOutside:b,onFocusOutside:h,onInteractOutside:y,onDismiss:j,children:e.jsx(tC,{asChild:!0,...E,dir:T.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:R,onEntryFocus:ye(p,ce=>{T.isUsingKeyboardRef.current||ce.preventDefault()}),preventScrollOnEntryFocus:!0,children:e.jsx(hg,{role:"menu","aria-orientation":"vertical","data-state":MC(w.open),"data-radix-menu-content":"",dir:T.dir,...k,...N,ref:A,style:{outline:"none",...N.style},onKeyDown:ye(N.onKeyDown,ce=>{const O=ce.target.closest("[data-radix-menu-content]")===ce.currentTarget,te=ce.ctrlKey||ce.altKey||ce.metaKey,Y=ce.key.length===1;O&&(ce.key==="Tab"&&ce.preventDefault(),!te&&Y&&F(ce.key));const ne=P.current;if(ce.target!==ne||!j8.includes(ce.key))return;ce.preventDefault();const be=z().filter(le=>!le.disabled).map(le=>le.ref.current);uC.includes(ce.key)&&be.reverse(),q8(be)}),onBlur:ye(t.onBlur,ce=>{ce.currentTarget.contains(ce.target)||(window.clearTimeout(V.current),H.current="")}),onPointerMove:ye(t.onPointerMove,$i(ce=>{const ge=ce.target,O=ie.current!==ce.clientX;if(ce.currentTarget.contains(ge)&&O){const te=ce.clientX>ie.current?"right":"left";I.current=te,ie.current=ce.clientX}}))})})})})})})});hC.displayName=rs;var R8="MenuGroup",Fg=v.forwardRef((t,s)=>{const{__scopeMenu:c,...r}=t;return e.jsx(Ae.div,{role:"group",...r,ref:s})});Fg.displayName=R8;var O8="MenuLabel",bC=v.forwardRef((t,s)=>{const{__scopeMenu:c,...r}=t;return e.jsx(Ae.div,{...r,ref:s})});bC.displayName=O8;var ou="MenuItem",_1="menu.itemSelect",Vu=v.forwardRef((t,s)=>{const{disabled:c=!1,onSelect:r,...i}=t,o=v.useRef(null),u=ro(ou,t.__scopeMenu),m=Wg(ou,t.__scopeMenu),p=He(s,o),f=v.useRef(!1),b=()=>{const h=o.current;if(!c&&h){const y=new CustomEvent(_1,{bubbles:!0,cancelable:!0});h.addEventListener(_1,j=>r?.(j),{once:!0}),Cj(h,y),y.defaultPrevented?f.current=!1:u.onClose()}};return e.jsx(vC,{...i,ref:p,disabled:c,onClick:ye(t.onClick,b),onPointerDown:h=>{t.onPointerDown?.(h),f.current=!0},onPointerUp:ye(t.onPointerUp,h=>{f.current||h.currentTarget?.click()}),onKeyDown:ye(t.onKeyDown,h=>{const y=m.searchRef.current!=="";c||y&&h.key===" "||Uf.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Vu.displayName=ou;var vC=v.forwardRef((t,s)=>{const{__scopeMenu:c,disabled:r=!1,textValue:i,...o}=t,u=Wg(ou,c),m=pC(c),p=v.useRef(null),f=He(s,p),[b,h]=v.useState(!1),[y,j]=v.useState("");return v.useEffect(()=>{const S=p.current;S&&j((S.textContent??"").trim())},[o.children]),e.jsx(Hi.ItemSlot,{scope:c,disabled:r,textValue:i??y,children:e.jsx(aC,{asChild:!0,...m,focusable:!r,children:e.jsx(Ae.div,{role:"menuitem","data-highlighted":b?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:f,onPointerMove:ye(t.onPointerMove,$i(S=>{r?u.onItemLeave(S):(u.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ye(t.onPointerLeave,$i(S=>u.onItemLeave(S))),onFocus:ye(t.onFocus,()=>h(!0)),onBlur:ye(t.onBlur,()=>h(!1))})})})}),z8="MenuCheckboxItem",yC=v.forwardRef((t,s)=>{const{checked:c=!1,onCheckedChange:r,...i}=t;return e.jsx(SC,{scope:t.__scopeMenu,checked:c,children:e.jsx(Vu,{role:"menuitemcheckbox","aria-checked":du(c)?"mixed":c,...i,ref:s,"data-state":Gg(c),onSelect:ye(i.onSelect,()=>r?.(du(c)?!0:!c),{checkForDefaultPrevented:!1})})})});yC.displayName=z8;var jC="MenuRadioGroup",[L8,B8]=dr(jC,{value:void 0,onValueChange:()=>{}}),NC=v.forwardRef((t,s)=>{const{value:c,onValueChange:r,...i}=t,o=Vt(r);return e.jsx(L8,{scope:t.__scopeMenu,value:c,onValueChange:o,children:e.jsx(Fg,{...i,ref:s})})});NC.displayName=jC;var CC="MenuRadioItem",wC=v.forwardRef((t,s)=>{const{value:c,...r}=t,i=B8(CC,t.__scopeMenu),o=c===i.value;return e.jsx(SC,{scope:t.__scopeMenu,checked:o,children:e.jsx(Vu,{role:"menuitemradio","aria-checked":o,...r,ref:s,"data-state":Gg(o),onSelect:ye(r.onSelect,()=>i.onValueChange?.(c),{checkForDefaultPrevented:!1})})})});wC.displayName=CC;var Kg="MenuItemIndicator",[SC,U8]=dr(Kg,{checked:!1}),TC=v.forwardRef((t,s)=>{const{__scopeMenu:c,forceMount:r,...i}=t,o=U8(Kg,c);return e.jsx(ea,{present:r||du(o.checked)||o.checked===!0,children:e.jsx(Ae.span,{...i,ref:s,"data-state":Gg(o.checked)})})});TC.displayName=Kg;var I8="MenuSeparator",kC=v.forwardRef((t,s)=>{const{__scopeMenu:c,...r}=t;return e.jsx(Ae.div,{role:"separator","aria-orientation":"horizontal",...r,ref:s})});kC.displayName=I8;var H8="MenuArrow",DC=v.forwardRef((t,s)=>{const{__scopeMenu:c,...r}=t,i=Wu(c);return e.jsx(bg,{...i,...r,ref:s})});DC.displayName=H8;var $8="MenuSub",[zL,EC]=dr($8),Ti="MenuSubTrigger",_C=v.forwardRef((t,s)=>{const c=ur(Ti,t.__scopeMenu),r=ro(Ti,t.__scopeMenu),i=EC(Ti,t.__scopeMenu),o=Wg(Ti,t.__scopeMenu),u=v.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:p}=o,f={__scopeMenu:t.__scopeMenu},b=v.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return v.useEffect(()=>b,[b]),v.useEffect(()=>{const h=m.current;return()=>{window.clearTimeout(h),p(null)}},[m,p]),e.jsx(qg,{asChild:!0,...f,children:e.jsx(vC,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":i.contentId,"data-state":MC(c.open),...t,ref:Du(s,i.onTriggerChange),onClick:h=>{t.onClick?.(h),!(t.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),c.open||c.onOpenChange(!0))},onPointerMove:ye(t.onPointerMove,$i(h=>{o.onItemEnter(h),!h.defaultPrevented&&!t.disabled&&!c.open&&!u.current&&(o.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{c.onOpenChange(!0),b()},100))})),onPointerLeave:ye(t.onPointerLeave,$i(h=>{b();const y=c.content?.getBoundingClientRect();if(y){const j=c.content?.dataset.side,S=j==="right",N=S?-5:5,w=y[S?"left":"right"],T=y[S?"right":"left"];o.onPointerGraceIntentChange({area:[{x:h.clientX+N,y:h.clientY},{x:w,y:y.top},{x:T,y:y.top},{x:T,y:y.bottom},{x:w,y:y.bottom}],side:j}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(h),h.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ye(t.onKeyDown,h=>{const y=o.searchRef.current!=="";t.disabled||y&&h.key===" "||N8[r.dir].includes(h.key)&&(c.onOpenChange(!0),c.content?.focus(),h.preventDefault())})})})});_C.displayName=Ti;var AC="MenuSubContent",PC=v.forwardRef((t,s)=>{const c=fC(rs,t.__scopeMenu),{forceMount:r=c.forceMount,...i}=t,o=ur(rs,t.__scopeMenu),u=ro(rs,t.__scopeMenu),m=EC(AC,t.__scopeMenu),p=v.useRef(null),f=He(s,p);return e.jsx(Hi.Provider,{scope:t.__scopeMenu,children:e.jsx(ea,{present:r||o.open,children:e.jsx(Hi.Slot,{scope:t.__scopeMenu,children:e.jsx(Vg,{id:m.contentId,"aria-labelledby":m.triggerId,...i,ref:f,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:b=>{u.isUsingKeyboardRef.current&&p.current?.focus(),b.preventDefault()},onCloseAutoFocus:b=>b.preventDefault(),onFocusOutside:ye(t.onFocusOutside,b=>{b.target!==m.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ye(t.onEscapeKeyDown,b=>{u.onClose(),b.preventDefault()}),onKeyDown:ye(t.onKeyDown,b=>{const h=b.currentTarget.contains(b.target),y=C8[u.dir].includes(b.key);h&&y&&(o.onOpenChange(!1),m.trigger?.focus(),b.preventDefault())})})})})})});PC.displayName=AC;function MC(t){return t?"open":"closed"}function du(t){return t==="indeterminate"}function Gg(t){return du(t)?"indeterminate":t?"checked":"unchecked"}function q8(t){const s=document.activeElement;for(const c of t)if(c===s||(c.focus(),document.activeElement!==s))return}function Q8(t,s){return t.map((c,r)=>t[(s+r)%t.length])}function W8(t,s,c){const i=s.length>1&&Array.from(s).every(f=>f===s[0])?s[0]:s,o=c?t.indexOf(c):-1;let u=Q8(t,Math.max(o,0));i.length===1&&(u=u.filter(f=>f!==c));const p=u.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return p!==c?p:void 0}function V8(t,s){const{x:c,y:r}=t;let i=!1;for(let o=0,u=s.length-1;o<s.length;u=o++){const m=s[o],p=s[u],f=m.x,b=m.y,h=p.x,y=p.y;b>r!=y>r&&c<(h-f)*(r-b)/(y-b)+f&&(i=!i)}return i}function F8(t,s){if(!s)return!1;const c={x:t.clientX,y:t.clientY};return V8(c,s)}function $i(t){return s=>s.pointerType==="mouse"?t(s):void 0}var K8=xC,G8=qg,Y8=gC,X8=hC,Z8=Fg,J8=bC,e7=Vu,t7=yC,a7=NC,s7=wC,n7=TC,c7=kC,r7=DC,l7=_C,i7=PC,Fu="DropdownMenu",[o7]=da(Fu,[mC]),fa=mC(),[d7,RC]=o7(Fu),OC=t=>{const{__scopeDropdownMenu:s,children:c,dir:r,open:i,defaultOpen:o,onOpenChange:u,modal:m=!0}=t,p=fa(s),f=v.useRef(null),[b,h]=Bs({prop:i,defaultProp:o??!1,onChange:u,caller:Fu});return e.jsx(d7,{scope:s,triggerId:cs(),triggerRef:f,contentId:cs(),open:b,onOpenChange:h,onOpenToggle:v.useCallback(()=>h(y=>!y),[h]),modal:m,children:e.jsx(K8,{...p,open:b,onOpenChange:h,dir:r,modal:m,children:c})})};OC.displayName=Fu;var zC="DropdownMenuTrigger",LC=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,disabled:r=!1,...i}=t,o=RC(zC,c),u=fa(c);return e.jsx(G8,{asChild:!0,...u,children:e.jsx(Ae.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Du(s,o.triggerRef),onPointerDown:ye(t.onPointerDown,m=>{!r&&m.button===0&&m.ctrlKey===!1&&(o.onOpenToggle(),o.open||m.preventDefault())}),onKeyDown:ye(t.onKeyDown,m=>{r||(["Enter"," "].includes(m.key)&&o.onOpenToggle(),m.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})});LC.displayName=zC;var u7="DropdownMenuPortal",BC=t=>{const{__scopeDropdownMenu:s,...c}=t,r=fa(s);return e.jsx(Y8,{...r,...c})};BC.displayName=u7;var UC="DropdownMenuContent",IC=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=RC(UC,c),o=fa(c),u=v.useRef(!1);return e.jsx(X8,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:s,onCloseAutoFocus:ye(t.onCloseAutoFocus,m=>{u.current||i.triggerRef.current?.focus(),u.current=!1,m.preventDefault()}),onInteractOutside:ye(t.onInteractOutside,m=>{const p=m.detail.originalEvent,f=p.button===0&&p.ctrlKey===!0,b=p.button===2||f;(!i.modal||b)&&(u.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});IC.displayName=UC;var m7="DropdownMenuGroup",p7=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=fa(c);return e.jsx(Z8,{...i,...r,ref:s})});p7.displayName=m7;var x7="DropdownMenuLabel",HC=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=fa(c);return e.jsx(J8,{...i,...r,ref:s})});HC.displayName=x7;var f7="DropdownMenuItem",$C=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=fa(c);return e.jsx(e7,{...i,...r,ref:s})});$C.displayName=f7;var g7="DropdownMenuCheckboxItem",h7=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=fa(c);return e.jsx(t7,{...i,...r,ref:s})});h7.displayName=g7;var b7="DropdownMenuRadioGroup",v7=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=fa(c);return e.jsx(a7,{...i,...r,ref:s})});v7.displayName=b7;var y7="DropdownMenuRadioItem",j7=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=fa(c);return e.jsx(s7,{...i,...r,ref:s})});j7.displayName=y7;var N7="DropdownMenuItemIndicator",C7=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=fa(c);return e.jsx(n7,{...i,...r,ref:s})});C7.displayName=N7;var w7="DropdownMenuSeparator",qC=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=fa(c);return e.jsx(c7,{...i,...r,ref:s})});qC.displayName=w7;var S7="DropdownMenuArrow",T7=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=fa(c);return e.jsx(r7,{...i,...r,ref:s})});T7.displayName=S7;var k7="DropdownMenuSubTrigger",D7=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=fa(c);return e.jsx(l7,{...i,...r,ref:s})});D7.displayName=k7;var E7="DropdownMenuSubContent",_7=v.forwardRef((t,s)=>{const{__scopeDropdownMenu:c,...r}=t,i=fa(c);return e.jsx(i7,{...i,...r,ref:s,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});_7.displayName=E7;var A7=OC,P7=LC,M7=BC,R7=IC,O7=HC,z7=$C,L7=qC;function hn({...t}){return e.jsx(A7,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:10","data-slot":"dropdown-menu",...t})}function bn({...t}){return e.jsx(P7,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:25","data-slot":"dropdown-menu-trigger",...t})}function vn({className:t,sideOffset:s=4,...c}){return e.jsx(M7,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:38",children:e.jsx(R7,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:39","data-slot":"dropdown-menu-content",sideOffset:s,className:Ne("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...c})})}function Da({className:t,inset:s,variant:c="default",...r}){return e.jsx(z7,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:70","data-slot":"dropdown-menu-item","data-inset":s,"data-variant":c,className:Ne("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r})}function B7({className:t,inset:s,...c}){return e.jsx(O7,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:152","data-slot":"dropdown-menu-label","data-inset":s,className:Ne("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...c})}function U7({className:t,...s}){return e.jsx(L7,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:169","data-slot":"dropdown-menu-separator",className:Ne("bg-border -mx-1 my-1 h-px",t),...s})}var Ku="Dialog",[QC,WC]=da(Ku),[I7,Ns]=QC(Ku),VC=t=>{const{__scopeDialog:s,children:c,open:r,defaultOpen:i,onOpenChange:o,modal:u=!0}=t,m=v.useRef(null),p=v.useRef(null),[f,b]=Bs({prop:r,defaultProp:i??!1,onChange:o,caller:Ku});return e.jsx(I7,{scope:s,triggerRef:m,contentRef:p,contentId:cs(),titleId:cs(),descriptionId:cs(),open:f,onOpenChange:b,onOpenToggle:v.useCallback(()=>b(h=>!h),[b]),modal:u,children:c})};VC.displayName=Ku;var FC="DialogTrigger",KC=v.forwardRef((t,s)=>{const{__scopeDialog:c,...r}=t,i=Ns(FC,c),o=He(s,i.triggerRef);return e.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Zg(i.open),...r,ref:o,onClick:ye(t.onClick,i.onOpenToggle)})});KC.displayName=FC;var Yg="DialogPortal",[H7,GC]=QC(Yg,{forceMount:void 0}),YC=t=>{const{__scopeDialog:s,forceMount:c,children:r,container:i}=t,o=Ns(Yg,s);return e.jsx(H7,{scope:s,forceMount:c,children:v.Children.map(r,u=>e.jsx(ea,{present:c||o.open,children:e.jsx(Zi,{asChild:!0,container:i,children:u})}))})};YC.displayName=Yg;var uu="DialogOverlay",XC=v.forwardRef((t,s)=>{const c=GC(uu,t.__scopeDialog),{forceMount:r=c.forceMount,...i}=t,o=Ns(uu,t.__scopeDialog);return o.modal?e.jsx(ea,{present:r||o.open,children:e.jsx(q7,{...i,ref:s})}):null});XC.displayName=uu;var $7=Jc("DialogOverlay.RemoveScroll"),q7=v.forwardRef((t,s)=>{const{__scopeDialog:c,...r}=t,i=Ns(uu,c);return e.jsx(Qu,{as:$7,allowPinchZoom:!0,shards:[i.contentRef],children:e.jsx(Ae.div,{"data-state":Zg(i.open),...r,ref:s,style:{pointerEvents:"auto",...r.style}})})}),nr="DialogContent",ZC=v.forwardRef((t,s)=>{const c=GC(nr,t.__scopeDialog),{forceMount:r=c.forceMount,...i}=t,o=Ns(nr,t.__scopeDialog);return e.jsx(ea,{present:r||o.open,children:o.modal?e.jsx(Q7,{...i,ref:s}):e.jsx(W7,{...i,ref:s})})});ZC.displayName=nr;var Q7=v.forwardRef((t,s)=>{const c=Ns(nr,t.__scopeDialog),r=v.useRef(null),i=He(s,c.contentRef,r);return v.useEffect(()=>{const o=r.current;if(o)return $g(o)},[]),e.jsx(JC,{...t,ref:i,trapFocus:c.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(t.onCloseAutoFocus,o=>{o.preventDefault(),c.triggerRef.current?.focus()}),onPointerDownOutside:ye(t.onPointerDownOutside,o=>{const u=o.detail.originalEvent,m=u.button===0&&u.ctrlKey===!0;(u.button===2||m)&&o.preventDefault()}),onFocusOutside:ye(t.onFocusOutside,o=>o.preventDefault())})}),W7=v.forwardRef((t,s)=>{const c=Ns(nr,t.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return e.jsx(JC,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{t.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||c.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{t.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=o.target;c.triggerRef.current?.contains(u)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),JC=v.forwardRef((t,s)=>{const{__scopeDialog:c,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...u}=t,m=Ns(nr,c),p=v.useRef(null),f=He(s,p);return Hg(),e.jsxs(e.Fragment,{children:[e.jsx(Hu,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:e.jsx(Yi,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Zg(m.open),...u,ref:f,onDismiss:()=>m.onOpenChange(!1)})}),e.jsxs(e.Fragment,{children:[e.jsx(F7,{titleId:m.titleId}),e.jsx(G7,{contentRef:p,descriptionId:m.descriptionId})]})]})}),Xg="DialogTitle",ew=v.forwardRef((t,s)=>{const{__scopeDialog:c,...r}=t,i=Ns(Xg,c);return e.jsx(Ae.h2,{id:i.titleId,...r,ref:s})});ew.displayName=Xg;var tw="DialogDescription",aw=v.forwardRef((t,s)=>{const{__scopeDialog:c,...r}=t,i=Ns(tw,c);return e.jsx(Ae.p,{id:i.descriptionId,...r,ref:s})});aw.displayName=tw;var sw="DialogClose",nw=v.forwardRef((t,s)=>{const{__scopeDialog:c,...r}=t,i=Ns(sw,c);return e.jsx(Ae.button,{type:"button",...r,ref:s,onClick:ye(t.onClick,()=>i.onOpenChange(!1))})});nw.displayName=sw;function Zg(t){return t?"open":"closed"}var cw="DialogTitleWarning",[V7,rw]=l6(cw,{contentName:nr,titleName:Xg,docsSlug:"dialog"}),F7=({titleId:t})=>{const s=rw(cw),c=`\`${s.contentName}\` requires a \`${s.titleName}\` for the component to be accessible for screen reader users.
663
664If you want to hide the \`${s.titleName}\`, you can wrap it with our VisuallyHidden component.
665
666For more information, see https://radix-ui.com/primitives/docs/components/${s.docsSlug}`;return v.useEffect(()=>{t&&(document.getElementById(t)||console.error(c))},[c,t]),null},K7="DialogDescriptionWarning",G7=({contentRef:t,descriptionId:s})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rw(K7).contentName}}.`;return v.useEffect(()=>{const i=t.current?.getAttribute("aria-describedby");s&&i&&(document.getElementById(s)||console.warn(r))},[r,t,s]),null},Jg=VC,Y7=KC,eh=YC,th=XC,ah=ZC,sh=ew,nh=aw,Gu=nw;const lw=v.createContext({isComposing:()=>!1,setComposing:()=>{},justEndedComposing:()=>!1,markCompositionEnd:()=>{}}),ch=()=>v.useContext(lw);function ta({...t}){const s=v.useRef(!1),c=v.useRef(!1),r=v.useRef(null),i=v.useMemo(()=>({isComposing:()=>s.current,setComposing:o=>{s.current=o},justEndedComposing:()=>c.current,markCompositionEnd:()=>{c.current=!0,r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{c.current=!1},150)}}),[]);return e.jsx(lw.Provider,{"data-loc":"client/src/components/ui/dialog.tsx:50",value:i,children:e.jsx(Jg,{"data-loc":"client/src/components/ui/dialog.tsx:51","data-slot":"dialog",...t})})}function X7({...t}){return e.jsx(eh,{"data-loc":"client/src/components/ui/dialog.tsx:65","data-slot":"dialog-portal",...t})}function iw({className:t,...s}){return e.jsx(th,{"data-loc":"client/src/components/ui/dialog.tsx:79","data-slot":"dialog-overlay",className:Ne("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...s})}iw.displayName="DialogOverlay";function aa({className:t,children:s,showCloseButton:c=!0,onEscapeKeyDown:r,...i}){const{isComposing:o}=ch(),u=v.useCallback(m=>{if(m.isComposing||o()){m.preventDefault();return}r?.(m)},[o,r]);return e.jsxs(X7,{"data-loc":"client/src/components/ui/dialog.tsx:122","data-slot":"dialog-portal",children:[e.jsx(iw,{"data-loc":"client/src/components/ui/dialog.tsx:123"}),e.jsxs(ah,{"data-loc":"client/src/components/ui/dialog.tsx:124","data-slot":"dialog-content",className:Ne("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 roun
666ded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),onEscapeKeyDown:u,...i,children:[s,c&&e.jsxs(Gu,{"data-loc":"client/src/components/ui/dialog.tsx:135","data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(yl,{"data-loc":"client/src/components/ui/dialog.tsx:139"}),e.jsx("span",{"data-loc":"client/src/components/ui/dialog.tsx:140",className:"sr-only",children:"Close"})]})]})]})}function sa({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/dialog.tsx:150","data-slot":"dialog-header",className:Ne("flex flex-col gap-2 text-center sm:text-left",t),...s})}function _a({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/dialog.tsx:160","data-slot":"dialog-footer",className:Ne("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...s})}function na({className:t,...s}){return e.jsx(sh,{"data-loc":"client/src/components/ui/dialog.tsx:176","data-slot":"dialog-title",className:Ne("text-lg leading-none font-semibold",t),...s})}function ca({className:t,...s}){return e.jsx(nh,{"data-loc":"client/src/components/ui/dialog.tsx:189","data-slot":"dialog-description",className:Ne("text-muted-foreground text-sm",t),...s})}function Od(t){const s=v.useRef(t);s.current=t;const c=v.useRef(null);return c.current||(c.current=function(...r){return s.current.apply(this,r)}),c.current}function ow(t={}){const{onKeyDown:s,onCompositionStart:c,onCompositionEnd:r}=t,i=v.useRef(!1),o=v.useRef(null),u=v.useRef(null),m=Od(h=>{o.current&&(clearTimeout(o.current),o.current=null),u.current&&(clearTimeout(u.current),u.current=null),i.current=!0,c?.(h)}),p=Od(h=>{o.current=setTimeout(()=>{u.current=setTimeout(()=>{i.current=!1})}),r?.(h)}),f=Od(h=>{if(i.current&&(h.key==="Escape"||h.key==="Enter"&&!h.shiftKey)){h.stopPropagation();return}s?.(h)}),b=Od(()=>i.current);return{onCompositionStart:m,onCompositionEnd:p,onKeyDown:f,isComposing:b}}function Ce({className:t,type:s,onKeyDown:c,onCompositionStart:r,onCompositionEnd:i,...o}){const u=ch(),{onCompositionStart:m,onCompositionEnd:p,onKeyDown:f}=ow({onKeyDown:b=>{const h=b.nativeEvent.isComposing||u.justEndedComposing();b.key==="Enter"&&h||c?.(b)},onCompositionStart:b=>{u.setComposing(!0),r?.(b)},onCompositionEnd:b=>{u.markCompositionEnd(),setTimeout(()=>{u.setComposing(!1)},100),i?.(b)}});return e.jsx("input",{"data-loc":"client/src/components/ui/input.tsx:53",type:s,"data-slot":"input",className:Ne("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),onCompositionStart:m,onCompositionEnd:p,onKeyDown:f,...o})}function dw({...t}){return e.jsx(Jg,{"data-loc":"client/src/components/ui/sheet.tsx:10","data-slot":"sheet",...t})}function Z7({...t}){return e.jsx(eh,{"data-loc":"client/src/components/ui/sheet.tsx:28","data-slot":"sheet-portal",...t})}function J7({className:t,...s}){return e.jsx(th,{"data-loc":"client/src/components/ui/sheet.tsx:36","data-slot":"sheet-overlay",className:Ne("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...s})}function uw({className:t,children:s,side:c="right",...r}){return e.jsxs(Z7,{"data-loc":"client/src/components/ui/sheet.tsx:56",children:[e.jsx(J7,{"data-loc":"client/src/components/ui/sheet.tsx:57"}),e.jsxs(ah,{"data-loc":"client/src/components/ui/sheet.tsx:58","data-slot":"sheet-content",className:Ne("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",c==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",c==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",c==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",c==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...r,children:[s,e.jsxs(Gu,{"data-loc":"client/src/components/ui/sheet.tsx:75",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(yl,{"data-loc":"client/src/components/ui/sheet.tsx:76",className:"size-4"}),e.jsx("span",{"data-loc":"client/src/components/ui/sheet.tsx:77",className:"sr-only",children:"Close"})]})]})]})}function mw({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/sheet.tsx:86","data-slot":"sheet-header",className:Ne("flex flex-col gap-1.5 p-4",t),...s})}function pw({className:t,...s}){return e.jsx(sh,{"data-loc":"client/src/components/ui/sheet.tsx:109","data-slot":"sheet-title",className:Ne("text-foreground font-semibold",t),...s})}function xw({className:t,...s}){return e.jsx(nh,{"data-loc":"client/src/components/ui/sheet.tsx:122","data-slot":"sheet-
666description",className:Ne("text-muted-foreground text-sm",t),...s})}function we({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/skeleton.tsx:5","data-slot":"skeleton",className:Ne("skeleton-shimmer rounded-md",t),...s})}const Qx=768;function fw(){const[t,s]=v.useState(void 0);return v.useEffect(()=>{const c=window.matchMedia(`(max-width: ${Qx-1}px)`),r=()=>{s(window.innerWidth<Qx)};return c.addEventListener("change",r),s(window.innerWidth<Qx),()=>c.removeEventListener("change",r)},[]),!!t}const eM="sidebar_state",tM=3600*24*7,aM="16rem",sM="18rem",nM="3rem",cM="b",gw=v.createContext(null);function Yu(){const t=v.useContext(gw);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function rM({defaultOpen:t=!0,open:s,onOpenChange:c,className:r,style:i,children:o,...u}){const m=fw(),[p,f]=v.useState(!1),[b,h]=v.useState(t),y=s??b,j=v.useCallback(T=>{const k=typeof T=="function"?T(y):T;c?c(k):h(k),document.cookie=`${eM}=${k}; path=/; max-age=${tM}`},[c,y]),S=v.useCallback(()=>m?f(T=>!T):j(T=>!T),[m,j,f]);v.useEffect(()=>{const T=k=>{k.key===cM&&(k.metaKey||k.ctrlKey)&&(k.preventDefault(),S())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[S]);const N=y?"expanded":"collapsed",w=v.useMemo(()=>({state:N,open:y,setOpen:j,isMobile:m,openMobile:p,setOpenMobile:f,toggleSidebar:S}),[N,y,j,m,p,f,S]);return e.jsx(gw.Provider,{"data-loc":"client/src/components/ui/sidebar.tsx:129",value:w,children:e.jsx(Ng,{"data-loc":"client/src/components/ui/sidebar.tsx:130",delayDuration:0,children:e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:131","data-slot":"sidebar-wrapper",style:{"--sidebar-width":aM,"--sidebar-width-icon":nM,...i},className:Ne("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...u,children:o})})})}function lM({side:t="left",variant:s="sidebar",collapsible:c="offcanvas",disableTransition:r=!1,className:i,children:o,...u}){const{isMobile:m,state:p,openMobile:f,setOpenMobile:b}=Yu();return c==="none"?e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:171","data-slot":"sidebar",className:Ne("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",i),...u,children:o}):m?e.jsx(dw,{"data-loc":"client/src/components/ui/sidebar.tsx:186",open:f,onOpenChange:b,...u,children:e.jsxs(uw,{"data-loc":"client/src/components/ui/sidebar.tsx:187","data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":sM},side:t,children:[e.jsxs(mw,{"data-loc":"client/src/components/ui/sidebar.tsx:199",className:"sr-only",children:[e.jsx(pw,{"data-loc":"client/src/components/ui/sidebar.tsx:200",children:"Sidebar"}),e.jsx(xw,{"data-loc":"client/src/components/ui/sidebar.tsx:201",children:"Displays the mobile sidebar."})]}),e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:203",className:"flex h-full w-full flex-col",children:o})]})}):e.jsxs("div",{"data-loc":"client/src/components/ui/sidebar.tsx:210",className:"group peer text-sidebar-foreground hidden md:block","data-state":p,"data-collapsible":p==="collapsed"?c:"","data-variant":s,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:219","data-slot":"sidebar-gap",className:Ne("relative w-(--sidebar-width) bg-transparent",r?"transition-none":"transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",s==="floating"||s==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:233","data-slot":"sidebar-container",className:Ne("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) md:flex",r?"transition-none":"transition-[left,right,width] duration-200 ease-linear",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",s==="floating"||s==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...u,children:e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:251","data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function iM({className:t,onClick:s,...c}){const{toggleSidebar:r}=Yu();return e.jsxs(G,{"data-loc":"client/src/components/ui/sidebar.tsx:271","data-sidebar":"trigger","data-slot":"sidebar-tr
666igger",variant:"ghost",size:"icon",className:Ne("size-7",t),onClick:i=>{s?.(i),r()},...c,children:[e.jsx(EN,{"data-loc":"client/src/components/ui/sidebar.tsx:283"}),e.jsx("span",{"data-loc":"client/src/components/ui/sidebar.tsx:284",className:"sr-only",children:"Toggle Sidebar"})]})}function oM({className:t,...s}){return e.jsx("main",{"data-loc":"client/src/components/ui/sidebar.tsx:316","data-slot":"sidebar-inset",className:Ne("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),...s})}function dM({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:344","data-slot":"sidebar-header","data-sidebar":"header",className:Ne("flex flex-col gap-2 p-2",t),...s})}function uM({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:355","data-slot":"sidebar-footer","data-sidebar":"footer",className:Ne("flex flex-col gap-2 p-2",t),...s})}function mM({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:380","data-slot":"sidebar-content","data-sidebar":"content",className:Ne("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...s})}function pM({className:t,...s}){return e.jsx("ul",{"data-loc":"client/src/components/ui/sidebar.tsx:463","data-slot":"sidebar-menu","data-sidebar":"menu",className:Ne("flex w-full min-w-0 flex-col gap-1",t),...s})}function Wx({className:t,...s}){return e.jsx("li",{"data-loc":"client/src/components/ui/sidebar.tsx:474","data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Ne("group/menu-item relative",t),...s})}const xM=Ou("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function fM({asChild:t=!1,isActive:s=!1,variant:c="default",size:r="default",tooltip:i,className:o,...u}){const m=t?cg:"button",{isMobile:p,state:f}=Yu(),b=e.jsx(m,{"data-loc":"client/src/components/ui/sidebar.tsx:522","data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":s,className:Ne(xM({variant:c,size:r}),o),...u});return i?(typeof i=="string"&&(i={children:i}),e.jsxs(yn,{"data-loc":"client/src/components/ui/sidebar.tsx:543",children:[e.jsx(jn,{"data-loc":"client/src/components/ui/sidebar.tsx:544",asChild:!0,children:b}),e.jsx(Nn,{"data-loc":"client/src/components/ui/sidebar.tsx:545",side:"right",align:"center",hidden:f!=="collapsed"||p,...i})]})):b}function gM(){return e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:5",className:"flex min-h-screen bg-background",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:7",className:"w-[280px] border-r border-border bg-background p-4 space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:9",className:"flex items-center gap-3 px-2",children:[e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:10",className:"h-8 w-8 rounded-md"}),e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:11",className:"h-4 w-24"})]}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:15",className:"space-y-2 px-2",children:[e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:16",className:"h-10 w-full rounded-lg"}),e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:17",className:"h-10 w-full rounded-lg"}),e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:18",className:"h-10 w-full rounded-lg"})]}),e.jsx("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:22",className:"absolute bottom-4 left-4 right-4",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:23",className:"flex items-center gap-3 px-1",children:[e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:24",className:"h-9 w-9 rounded-full"}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:25",className:"flex-1 space-y-2",children:[e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:26",className:"h-3 w-20"}),e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:27",className:"h-2 w-32"})]})]})})]}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:34",className:"flex-1 p-4 space-y-4",children:[e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:36",className:"h-12 w-48 rounded-lg"}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:37",className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:38",className:"h-32 rounded-xl"}),e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:39",className:"h-32 rounded-xl"}),e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:40",className:"h-32 rounded-xl"})]}),e.jsx(we,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:42",className:"h-64 roun
666ded-xl"})]})]})}const zd="gateway-active-product",hw=v.createContext({activeProductId:null,setActiveProductId:()=>{},products:[],activeProduct:null,isLoading:!1});function hM({children:t}){const[s,c]=v.useState(()=>{const p=localStorage.getItem(zd);return p?Number(p):null}),{data:r,isLoading:i}=q.gateway.products.list.useQuery(void 0,{retry:!1}),o=v.useMemo(()=>(r??[]).map(p=>({id:p.id,name:p.name,category:p.category})),[r]);v.useEffect(()=>{if(o.length===0)return;o.some(f=>f.id===s)||(c(o[0].id),localStorage.setItem(zd,String(o[0].id)))},[o,s]);const u=p=>{c(p),p===null?localStorage.removeItem(zd):localStorage.setItem(zd,String(p))},m=o.find(p=>p.id===s)??null;return e.jsx(hw.Provider,{"data-loc":"client/src/contexts/ProductContext.tsx:61",value:{activeProductId:s,setActiveProductId:u,products:o,activeProduct:m,isLoading:i},children:t})}function Mn(){return v.useContext(hw)}function bM(){const{products:t,activeProduct:s,setActiveProductId:c,isLoading:r}=Mn(),[,i]=Pn();return r?e.jsx("div",{"data-loc":"client/src/components/ProductSwitcher.tsx:18",className:"h-11 animate-pulse rounded-lg bg-muted"}):t.length===0?e.jsxs("button",{"data-loc":"client/src/components/ProductSwitcher.tsx:23",onClick:()=>i("/products"),className:"flex w-full items-center gap-2.5 rounded-lg border border-dashed px-2.5 py-2 text-left transition-colors hover:bg-accent/50 active:scale-[0.98]",children:[e.jsx("span",{"data-loc":"client/src/components/ProductSwitcher.tsx:27",className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-muted",children:e.jsx(vs,{"data-loc":"client/src/components/ProductSwitcher.tsx:28",className:"size-3.5 text-muted-foreground"})}),e.jsxs("span",{"data-loc":"client/src/components/ProductSwitcher.tsx:30",className:"min-w-0 flex-1",children:[e.jsx("span",{"data-loc":"client/src/components/ProductSwitcher.tsx:31",className:"block truncate text-sm font-medium",children:"제품 등록"}),e.jsx("span",{"data-loc":"client/src/components/ProductSwitcher.tsx:32",className:"block truncate text-xs text-muted-foreground",children:"먼저 팔 제품을 등록하세요"})]})]}):e.jsxs(hn,{"data-loc":"client/src/components/ProductSwitcher.tsx:41",children:[e.jsx(bn,{"data-loc":"client/src/components/ProductSwitcher.tsx:42",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/components/ProductSwitcher.tsx:43",className:"flex w-full items-center gap-2.5 rounded-lg border bg-background px-2.5 py-2 text-left transition-colors hover:bg-accent/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.98]",children:[e.jsx("span",{"data-loc":"client/src/components/ProductSwitcher.tsx:44",className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-primary/10",children:e.jsx(Ui,{"data-loc":"client/src/components/ProductSwitcher.tsx:45",className:"size-3.5 text-primary"})}),e.jsxs("span",{"data-loc":"client/src/components/ProductSwitcher.tsx:47",className:"min-w-0 flex-1",children:[e.jsx("span",{"data-loc":"client/src/components/ProductSwitcher.tsx:48",className:"block truncate text-sm font-semibold",children:s?.name??"제품 선택"}),e.jsx("span",{"data-loc":"client/src/components/ProductSwitcher.tsx:51",className:"block truncate text-xs text-muted-foreground",children:s?.category??"작업할 제품"})]}),e.jsx(cA,{"data-loc":"client/src/components/ProductSwitcher.tsx:55",className:"size-3.5 shrink-0 text-muted-foreground"})]})}),e.jsxs(vn,{"data-loc":"client/src/components/ProductSwitcher.tsx:58",align:"start",className:"w-64",children:[e.jsx(B7,{"data-loc":"client/src/components/ProductSwitcher.tsx:59",className:"text-xs text-muted-foreground",children:"작업할 제품"}),t.map(o=>e.jsxs(Da,{"data-loc":"client/src/components/ProductSwitcher.tsx:63",onClick:()=>c(o.id),className:"cursor-pointer",children:[e.jsx("span",{"data-loc":"client/src/components/ProductSwitcher.tsx:68",className:"min-w-0 flex-1 truncate",children:o.name}),s?.id===o.id&&e.jsx(Et,{"data-loc":"client/src/components/ProductSwitcher.tsx:69",className:"ml-2 size-4 text-primary"})]},o.id)),e.jsx(U7,{"data-loc":"client/src/components/ProductSwitcher.tsx:72"}),e.jsxs(Da,{"data-loc":"client/src/components/ProductSwitcher.tsx:73",onClick:()=>i("/products"),className:"cursor-pointer",children:[e.jsx(vs,{"data-loc":"client/src/components/ProductSwitcher.tsx:74",className:"mr-2 size-4"}),"제품 추가·관리"]})]})]})}const vM=[{label:"제품 준비",items:[{label:"제품 관리",path:"/products"},{label:"제품 자료실",path:"/product-assets"},{label:"인증 관리",path:"/certification-map"}]},{label:"서명 관리",items:[{label:"서명 관리",path:"/signature-management"}]},{label:"시장 · 후보 기반",items:[{label:"국가 신호등",path:"/countries"},{label:"글로벌 DB",path:"/base-leads"}]},{label:"실행 · 운영",items:[{label:"캠페인",path:"/campaigns"}]}],mu={primaryGoal:"1차 회신과 테이블 미팅 확보",defaultMessageUnit:"쎄라필 프로그램"};function bw(t){return vM.find(s=>s.label===t)?.items??[]}const A1={icon:yA,label:"대시보드",path:"/"},yM={"/products":wg,"/product-assets":bl,"/certification-map":Jt,"/signature-management":lu,"/countries":Ha,"/base-leads":Kd,"/campaigns":wn,"/smtp-settings":ar},Xu=t=>bw(t).map(s=>({...s,icon:yM[s.path]??wg})),P1=Xu("제품 준비"),M1=Xu("서명 관리"),R1=Xu("시장 · 후보 기반"),O1=Xu("실행 · 운영"),z1=[{icon:hN,label:"자동화 운영",path:"/delivery-dashboard"},{icon:Bu,label:"수신함 동기화",path:"/inbox-sync"},{icon:Ii,label:"문안 보관함",path:"/templates"},{icon:ar,label:"SMTP 발송 설정",path:"/smtp-settings"}],L1="sidebar-width",jM=280,NM=200,CM=480;function wM({children:t}){const[s,c]=v.useState(()=>{const o=localStorage.getItem(L1);return o?parseInt(o,10):jM}),{loading:r,user:i}=qN();return v.useEffect(()=>{localStorage.setItem(L1,s.toString())},[s]),r?e.jsx(gM,{"data-loc":"client/src/components/DashboardLayout.t
666sx:103"}):i?e.jsx(rM,{"data-loc":"client/src/components/DashboardLayout.tsx:135",style:{"--sidebar-width":`${s}px`},children:e.jsx(SM,{"data-loc":"client/src/components/DashboardLayout.tsx:142",setSidebarWidth:c,children:t})}):e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:108",className:"flex min-h-screen items-center justify-center bg-muted/20 px-4",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:109",className:"w-full max-w-md rounded-2xl border bg-card p-8 shadow-sm",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:110",className:"mb-6 flex items-center gap-2.5",children:[e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:111",className:"flex size-9 items-center justify-center rounded-lg bg-primary text-primary-foreground",children:e.jsx(Ha,{"data-loc":"client/src/components/DashboardLayout.tsx:112",className:"size-5"})}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:114",children:[e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:115",className:"text-lg font-bold tracking-tight",children:"GATEWAY"}),e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:116",className:"text-xs text-muted-foreground",children:"해외 바이어 발굴 · 콜드메일"})]})]}),e.jsx("h1",{"data-loc":"client/src/components/DashboardLayout.tsx:121",className:"text-xl font-semibold tracking-tight",children:"로그인이 필요합니다"}),e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:122",className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:"국가별 발송 규칙과 캠페인 기록은 계정에 연결됩니다. 회사 계정으로 로그인하세요."}),e.jsx(G,{"data-loc":"client/src/components/DashboardLayout.tsx:126",onClick:()=>Bg(),size:"lg",className:"mt-6 w-full",children:"로그인"})]})})}function SM({children:t,setSidebarWidth:s}){const{user:c,logout:r}=qN(),[i,o]=Pn(),{state:u,toggleSidebar:m}=Yu(),p=u==="collapsed",[f,b]=v.useState(!1),h=v.useRef(null),j=[A1,...P1,...M1,...R1,...O1,...z1].find(T=>T.path===i),S=fw(),N=(T,k)=>T.map(E=>{const z=E.path==="/"?i==="/":i.startsWith(E.path),_=k==="setup";return e.jsx(Wx,{"data-loc":"client/src/components/DashboardLayout.tsx:179",children:e.jsxs(fM,{"data-loc":"client/src/components/DashboardLayout.tsx:180",isActive:z,onClick:()=>o(E.path),tooltip:E.label,className:`h-10 rounded-xl px-3 font-medium transition-all data-[active=true]:shadow-[0_10px_24px_-18px_rgba(22,184,199,0.9)] ${_?"bg-indigo-500/[0.045] hover:bg-indigo-500/[0.09] data-[active=true]:bg-indigo-500/[0.14]":"hover:bg-sidebar-accent/75"}`,children:[e.jsx(E.icon,{"data-loc":"client/src/components/DashboardLayout.tsx:186",className:`h-4 w-4 ${z?"text-sidebar-accent-foreground":_?"text-indigo-500":"text-sidebar-foreground/65"}`}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:189",children:E.label})]})},E.path)}),w=(T,k,E)=>e.jsxs(e.Fragment,{children:[p?e.jsx(Wx,{"data-loc":"client/src/components/DashboardLayout.tsx:208",className:"my-1 px-3","aria-hidden":"true",children:e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:209",className:"h-px bg-sidebar-border/70"})}):e.jsx(Wx,{"data-loc":"client/src/components/DashboardLayout.tsx:202",className:"px-3 pb-0.5 pt-2",children:e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:203",className:`text-[10px] font-bold tracking-[0.14em] ${E==="setup"?"text-indigo-600/85":"text-sidebar-foreground/55"}`,children:T})}),N(k,E)]});return v.useEffect(()=>{p&&b(!1)},[p]),v.useEffect(()=>{const T=E=>{if(!f)return;const z=h.current?.getBoundingClientRect().left??0,_=E.clientX-z;_>=NM&&_<=CM&&s(_)},k=()=>{b(!1)};return f&&(document.addEventListener("mousemove",T),document.addEventListener("mouseup",k),document.body.style.cursor="col-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",k),document.body.style.cursor="",document.body.style.userSelect=""}},[f,s]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.t
666sx:254",className:"relative",ref:h,children:[e.jsxs(lM,{"data-loc":"client/src/components/DashboardLayout.tsx:255",collapsible:"icon",className:"border-r-0",disableTransition:f,children:[e.jsx(dM,{"data-loc":"client/src/components/DashboardLayout.tsx:260",className:"h-[4.5rem] justify-center border-b border-sidebar-border/80",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:261",className:"flex items-center gap-3 px-2 transition-all w-full",children:[e.jsx("button",{"data-loc":"client/src/components/DashboardLayout.tsx:262",onClick:m,className:"h-9 w-9 flex items-center justify-center hover:bg-sidebar-accent rounded-xl transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring shrink-0","aria-label":"사이드바 접기",children:e.jsx(EN,{"data-loc":"client/src/components/DashboardLayout.tsx:267",className:"h-4 w-4 text-sidebar-foreground/70"})}),p?null:e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:270",className:"flex min-w-0 items-center gap-2",children:e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:271",className:"truncate text-base font-extrabold tracking-[0.08em] text-sidebar-foreground",children:"GATEWAY"})})]})}),e.jsx(mM,{"data-loc":"client/src/components/DashboardLayout.tsx:279",className:"gap-0 py-3",children:e.jsxs(pM,{"data-loc":"client/src/components/DashboardLayout.tsx:280",className:"px-2.5 py-1","aria-label":"주요 메뉴",children:[N([A1],"operation"),w("제품 준비",P1,"setup"),w("서명 관리",M1,"setup"),w("시장 · 후보 기반",R1,"operation"),w("실행 · 운영",[...O1,...z1],"operation")]})}),e.jsxs(uM,{"data-loc":"client/src/components/DashboardLayout.tsx:289",className:"gap-2 border-t border-sidebar-border/80 p-3",children:[!p&&e.jsx(bM,{"data-loc":"client/src/components/DashboardLayout.tsx:290"}),e.jsxs(hn,{"data-loc":"client/src/components/DashboardLayout.tsx:291",children:[e.jsx(bn,{"data-loc":"client/src/components/DashboardLayout.tsx:292",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/components/DashboardLayout.tsx:293",className:"flex items-center gap-3 rounded-xl px-1.5 py-1.5 hover:bg-sidebar-accent transition-colors w-full text-left group-data-[collapsible=icon]:justify-center focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",children:[e.jsx(fP,{"data-loc":"client/src/components/DashboardLayout.tsx:294",className:"h-9 w-9 border border-sidebar-border bg-sidebar-accent shrink-0",children:e.jsx(gP,{"data-loc":"client/src/components/DashboardLayout.tsx:295",className:"bg-sidebar-accent text-xs font-semibold text-sidebar-accent-foreground",children:c?.name?.charAt(0).toUpperCase()})}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:299",className:"flex-1 min-w-0 group-data-[collapsible=icon]:hidden",children:[e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:300",className:"text-sm font-semibold text-sidebar-foreground truncate leading-none",children:c?.name||"-"}),e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:303",className:"text-xs text-sidebar-foreground/55 truncate mt-1.5",children:c?.email||"-"})]})]})}),e.jsx(vn,{"data-loc":"client/src/components/DashboardLayout.tsx:309",align:"end",className:"w-48",children:e.jsxs(Da,{"data-loc":"client/src/components/DashboardLayout.tsx:310",onClick:r,className:"cursor-pointer text-destructive focus:text-destructive",children:[e.jsx(NA,{"data-loc":"client/src/components/DashboardLayout.tsx:314",className:"mr-2 h-4 w-4"}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:315",children:"로그아웃"})]})})]})]})]}),e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:321",className:`absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-primary/20 transition-colors ${p?"hidden":""}`,onMouseDown:()=>{p||b(!0)},style:{zIndex:50}})]}),e.jsxs(oM,{"data-loc":"client/src/components/DashboardLayout.tsx:331",className:"bg-transparent",children:[S&&e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:333",className:"flex border-b h-14 items-center justify-between bg-background/95 px-2 backdrop-blur supports-[backdrop-filter]:backdrop-blur sticky top-0 z-40",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.t
666sx:334",className:"flex items-center gap-2",children:[e.jsx(iM,{"data-loc":"client/src/components/DashboardLayout.tsx:335",className:"h-9 w-9 rounded-lg bg-background"}),e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:336",className:"flex items-center gap-3",children:e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:337",className:"flex flex-col gap-1",children:e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:338",className:"tracking-tight text-foreground",children:j?.label??"GATEWAY"})})})]})}),e.jsx("main",{"data-loc":"client/src/components/DashboardLayout.tsx:346",className:"flex-1 p-4 md:p-6 lg:p-8 xl:p-10",children:t})]})]})}class TM extends v.Component{constructor(s){super(s),this.state={hasError:!1,error:null}}static getDerivedStateFromError(s){return{hasError:!0,error:s}}render(){return this.state.hasError?e.jsx("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:27",className:"flex items-center justify-center min-h-screen p-8 bg-background",children:e.jsxs("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:28",className:"flex flex-col items-center w-full max-w-2xl p-8",children:[e.jsx(St,{"data-loc":"client/src/components/ErrorBoundary.tsx:29",size:48,className:"text-destructive mb-6 flex-shrink-0"}),e.jsx("h2",{"data-loc":"client/src/components/ErrorBoundary.tsx:34",className:"text-xl mb-4",children:"An unexpected error occurred."}),e.jsx("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:36",className:"p-4 w-full rounded bg-muted overflow-auto mb-6",children:e.jsx("pre",{"data-loc":"client/src/components/ErrorBoundary.tsx:37",className:"text-sm text-muted-foreground whitespace-break-spaces",children:this.state.error?.stack})}),e.jsxs("button",{"data-loc":"client/src/components/ErrorBoundary.tsx:42",onClick:()=>window.location.reload(),className:Ne("flex items-center gap-2 px-4 py-2 rounded-lg","bg-primary text-primary-foreground","hover:opacity-90 cursor-pointer"),children:[e.jsx(Mg,{"data-loc":"client/src/components/ErrorBoundary.tsx:50",size:16}),"Reload Page"]})]})}):this.props.children}}const kM=v.createContext(void 0);function DM({children:t,defaultTheme:s="light",switchable:c=!1}){const[r,i]=v.useState(()=>c&&localStorage.getItem("theme")||s);v.useEffect(()=>{const u=document.documentElement;r==="dark"?u.classList.add("dark"):u.classList.remove("dark"),c&&localStorage.setItem("theme",r)},[r,c]);const o=c?()=>{i(u=>u==="light"?"dark":"light")}:void 0;return e.jsx(kM.Provider,{"data-loc":"client/src/contexts/ThemeContext.tsx:52",value:{theme:r,toggleTheme:o,switchable:c},children:t})}const pu={GREEN:0,YELLOW_LIA:1,YELLOW_COND:2,RED:3,BLOCK:4},Os={GREEN:{key:"GREEN",label:"자유 발송 가능",short:"발송 가능",plain:"미리 허락을 받지 않아도 보낼 수 있습니다. 거부 의사만 존중하면 됩니다.",canSend:!0,needsApproval:!1,badgeClass:"bg-emerald-50 text-emerald-700 border-emerald-200",dotClass:"bg-emerald-500",cardClass:"border-emerald-200 hover:border-emerald-300"},YELLOW_LIA:{key:"YELLOW_LIA",label:"업무 관련성 필요",short:"조건부 가능",plain:"받는 사람의 업무와 직접 관련된 내용이어야 합니다. 회사 대표 주소로만 보내세요.",canSend:!0,needsApproval:!1,badgeClass:"bg-amber-50 text-amber-700 border-amber-200",dotClass:"bg-amber-400",cardClass:"border-amber-200 hover:border-amber-300"},YELLOW_COND:{key:"YELLOW_COND",label:"추가 조건 충족 시 가능",short:"조건부 가능",plain:"제목 태그나 사후 처리 같은 추가 의무가 있습니다. 체크리스트를 모두 통과해야 발송됩니다.",canSend:!0,needsApproval:!1,badgeClass:"bg-orange-50 text-orange-700 border-orange-200",dotClass:"bg-orange-400",cardClass:"border-orange-200 hover:border-orange-300"},RED:{key:"RED",label:"사전 동의 필요",short:"제한적",plain:"원칙적으로 미리 허락을 받아야 합니다. 홈페이지에 문의용으로 공개된 주소만 예외적으로 사용하세요.",canSend:!1,needsApproval:!0,badgeClass:"bg-rose-50 text-rose-700 border-rose-200",dotClass:"bg-rose-500",cardClass:"border-rose-200 hover:border-rose-300"},BLOCK:{key:"BLOCK",label:"발송 금지",short:"금지",plain:"이 나라에는 콜드메일을 보내지 마세요. 다른 경로로 접촉해야 합니다.",canSend:!1,needsApproval:!1,badgeClass:"bg-slate-800 text-slate-100 border-slate-700",dotClass:"bg-slate-800",cardClass:"border-slate-300 hover:border-slate-400"}};function Sn({signal:t,short:s,className:c}){const r=Os[t];return e.jsxs("span",{"data-loc":"client/src/components/SignalBadge.tsx:14",className:Ne("inl
666ine-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-semibold whitespace-nowrap",r.badgeClass,c),children:[e.jsx("span",{"data-loc":"client/src/components/SignalBadge.tsx:21",className:Ne("size-1.5 rounded-full",r.dotClass)}),s?r.short:r.label]})}var EM="Label",vw=v.forwardRef((t,s)=>e.jsx(Ae.label,{...t,ref:s,onMouseDown:c=>{c.target.closest("button, input, select, textarea")||(t.onMouseDown?.(c),!c.defaultPrevented&&c.detail>1&&c.preventDefault())}}));vw.displayName=EM;var _M=vw;function _e({className:t,...s}){return e.jsx(_M,{"data-loc":"client/src/components/ui/label.tsx:11","data-slot":"label",className:Ne("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...s})}function If(t,[s,c]){return Math.min(c,Math.max(s,t))}function rh(t){const s=v.useRef({value:t,previous:t});return v.useMemo(()=>(s.current.value!==t&&(s.current.previous=s.current.value,s.current.value=t),s.current.previous),[t])}var AM=[" ","Enter","ArrowUp","ArrowDown"],PM=[" ","Enter"],cr="Select",[Zu,Ju,MM]=Ig(cr),[El]=da(cr,[MM,Sl]),em=Sl(),[RM,Nc]=El(cr),[OM,zM]=El(cr),yw=t=>{const{__scopeSelect:s,children:c,open:r,defaultOpen:i,onOpenChange:o,value:u,defaultValue:m,onValueChange:p,dir:f,name:b,autoComplete:h,disabled:y,required:j,form:S}=t,N=em(s),[w,T]=v.useState(null),[k,E]=v.useState(null),[z,_]=v.useState(!1),R=so(f),[P,A]=Bs({prop:r,defaultProp:i??!1,onChange:o,caller:cr}),[V,H]=Bs({prop:u,defaultProp:m,onChange:p,caller:cr}),M=v.useRef(null),B=w?S||!!w.closest("form"):!0,[I,ie]=v.useState(new Set),se=Array.from(I).map(L=>L.props.value).join(";");return e.jsx(fg,{...N,children:e.jsxs(RM,{required:j,scope:s,trigger:w,onTriggerChange:T,valueNode:k,onValueNodeChange:E,valueNodeHasChildren:z,onValueNodeHasChildrenChange:_,contentId:cs(),value:V,onValueChange:H,open:P,onOpenChange:A,dir:R,triggerPointerDownPosRef:M,disabled:y,children:[e.jsx(Zu.Provider,{scope:s,children:e.jsx(OM,{scope:t.__scopeSelect,onNativeOptionAdd:v.useCallback(L=>{ie(F=>new Set(F).add(L))},[]),onNativeOptionRemove:v.useCallback(L=>{ie(F=>{const W=new Set(F);return W.delete(L),W})},[]),children:c})}),B?e.jsxs($w,{"aria-hidden":!0,required:j,tabIndex:-1,name:b,autoComplete:h,value:V,onChange:L=>H(L.target.value),disabled:y,form:S,children:[V===void 0?e.jsx("option",{value:""}):null,Array.from(I)]},se):null]})})};yw.displayName=cr;var jw="SelectTrigger",Nw=v.forwardRef((t,s)=>{const{__scopeSelect:c,disabled:r=!1,...i}=t,o=em(c),u=Nc(jw,c),m=u.disabled||r,p=He(s,u.onTriggerChange),f=Ju(c),b=v.useRef("touch"),[h,y,j]=Qw(N=>{const w=f().filter(E=>!E.disabled),T=w.find(E=>E.value===u.value),k=Ww(w,N,T);k!==void 0&&u.onValueChange(k.value)}),S=N=>{m||(u.onOpenChange(!0),j()),N&&(u.triggerPointerDownPosRef.current={x:Math.round(N.pageX),y:Math.round(N.pageY)})};return e.jsx(gg,{asChild:!0,...o,children:e.jsx(Ae.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":qw(u.value)?"":void 0,...i,ref:p,onClick:ye(i.onClick,N=>{N.currentTarget.focus(),b.current!=="mouse"&&S(N)}),onPointerDown:ye(i.onPointerDown,N=>{b.current=N.pointerType;const w=N.target;w.hasPointerCapture(N.pointerId)&&w.releasePointerCapture(N.pointerId),N.button===0&&N.ctrlKey===!1&&N.pointerType==="mouse"&&(S(N),N.preventDefault())}),onKeyDown:ye(i.onKeyDown,N=>{const w=h.current!=="";!(N.ctrlKey||N.altKey||N.metaKey)&&N.key.length===1&&y(N.key),!(w&&N.key===" ")&&AM.includes(N.key)&&(S(),N.preventDefault())})})})});Nw.displayName=jw;var Cw="SelectValue",ww=v.forwardRef((t,s)=>{const{__scopeSelect:c,className:r,style:i,children:o,placeholder:u="",...m}=t,p=Nc(Cw,c),{onValueNodeHasChildrenChange:f}=p,b=o!==void 0,h=He(s,p.onValueNodeChange);return _t(()=>{f(b)},[f,b]),e.jsx(Ae.span,{...m,ref:h,style:{pointerEvents:"none"},children:qw(p.value)?e.jsx(e.Fragment,{children:u}):o})});ww.displayName=Cw;var LM="SelectIcon",Sw=v.forwardRef((t,s)=>{const{__scopeSelect:c,children:r,...i}=t;
vendor: 14,362 bytes, line 666
666return e.jsx(Ae.span,{"aria-hidden":!0,...i,ref:s,children:r||"▼"})});Sw.displayName=LM;var BM="SelectPortal",Tw=t=>e.jsx(Zi,{asChild:!0,...t});Tw.displayName=BM;var rr="SelectContent",kw=v.forwardRef((t,s)=>{const c=Nc(rr,t.__scopeSelect),[r,i]=v.useState();if(_t(()=>{i(new DocumentFragment)},[]),!c.open){const o=r;return o?Gi.createPortal(e.jsx(Dw,{scope:t.__scopeSelect,children:e.jsx(Zu.Slot,{scope:t.__scopeSelect,children:e.jsx("div",{children:t.children})})}),o):null}return e.jsx(Ew,{...t,ref:s})});kw.displayName=rr;var ps=10,[Dw,Cc]=El(rr),UM="SelectContentImpl",IM=Jc("SelectContent.RemoveScroll"),Ew=v.forwardRef((t,s)=>{const{__scopeSelect:c,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:u,side:m,sideOffset:p,align:f,alignOffset:b,arrowPadding:h,collisionBoundary:y,collisionPadding:j,sticky:S,hideWhenDetached:N,avoidCollisions:w,...T}=t,k=Nc(rr,c),[E,z]=v.useState(null),[_,R]=v.useState(null),P=He(s,le=>z(le)),[A,V]=v.useState(null),[H,M]=v.useState(null),B=Ju(c),[I,ie]=v.useState(!1),se=v.useRef(!1);v.useEffect(()=>{if(E)return $g(E)},[E]),Hg();const L=v.useCallback(le=>{const[he,...Pe]=B().map(xe=>xe.ref.current),[Re]=Pe.slice(-1),Q=document.activeElement;for(const xe of le)if(xe===Q||(xe?.scrollIntoView({block:"nearest"}),xe===he&&_&&(_.scrollTop=0),xe===Re&&_&&(_.scrollTop=_.scrollHeight),xe?.focus(),document.activeElement!==Q))return},[B,_]),F=v.useCallback(()=>L([A,E]),[L,A,E]);v.useEffect(()=>{I&&F()},[I,F]);const{onOpenChange:W,triggerPointerDownPosRef:ce}=k;v.useEffect(()=>{if(E){let le={x:0,y:0};const he=Re=>{le={x:Math.abs(Math.round(Re.pageX)-(ce.current?.x??0)),y:Math.abs(Math.round(Re.pageY)-(ce.current?.y??0))}},Pe=Re=>{le.x<=10&&le.y<=10?Re.preventDefault():E.contains(Re.target)||W(!1),document.removeEventListener("pointermove",he),ce.current=null};return ce.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",Pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",Pe,{capture:!0})}}},[E,W,ce]),v.useEffect(()=>{const le=()=>W(!1);return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[W]);const[ge,O]=Qw(le=>{const he=B().filter(Q=>!Q.disabled),Pe=he.find(Q=>Q.ref.current===document.activeElement),Re=Ww(he,le,Pe);Re&&setTimeout(()=>Re.ref.current.focus())}),te=v.useCallback((le,he,Pe)=>{const Re=!se.current&&!Pe;(k.value!==void 0&&k.value===he||Re)&&(V(le),Re&&(se.current=!0))},[k.value]),Y=v.useCallback(()=>E?.focus(),[E]),ne=v.useCallback((le,he,Pe)=>{const Re=!se.current&&!Pe;(k.value!==void 0&&k.value===he||Re)&&M(le)},[k.value]),pe=r==="popper"?Hf:_w,be=pe===Hf?{side:m,sideOffset:p,align:f,alignOffset:b,arrowPadding:h,collisionBoundary:y,collisionPadding:j,sticky:S,hideWhenDetached:N,avoidCollisions:w}:{};return e.jsx(Dw,{scope:c,content:E,viewport:_,onViewportChange:R,itemRefCallback:te,selectedItem:A,onItemLeave:Y,itemTextRefCallback:ne,focusSelectedItem:F,selectedItemText:H,position:r,isPositioned:I,searchRef:ge,children:e.jsx(Qu,{as:IM,allowPinchZoom:!0,children:e.jsx(Hu,{asChild:!0,trapped:k.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:ye(i,le=>{k.trigger?.focus({preventScroll:!0}),le.preventDefault()}),children:e.jsx(Yi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:e.jsx(pe,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:le=>le.preventDefault(),...T,...be,onPlaced:()=>ie(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:ye(T.onKeyDown,le=>{const he=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!he&&le.key.length===1&&O(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let Re=B().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(le.key)&&(Re=Re.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const Q=le.target,xe=Re.indexOf(Q);Re=Re.slice(xe+1)}setTimeout(()=>L(Re)),le.preventDefault()}})})})})})})});Ew.displayName=UM;var HM="SelectItemAlignedPosition",_w=v.forwardRef((t,s)=>{const{__scopeSelect:c,onPlaced:r,...i}=t,o=Nc(rr,c),u=Cc(rr,c),[m,p]=v.useState(null),[f,b]=v.useState(null),h=He(s,P=>b(P)),y=Ju(c),j=v.useRef(!1),S=v.useRef(!0),{viewport:N,selectedItem:w,selectedItemText:T,focusSelectedItem:k}=u,E=v.useCallback(()=>{if(o.trigger&&o.valueNode&&m&&f&&N&&w&&T){const P=o.trigger.getBoundingClientRect(),A=f.getBoundingClientRect(),V=o.valueNode.getBoundingClientRect(),H=T.getBoundingClientRect();if(o.dir!=="rtl"){const Q=H.left-A.left,xe=V.left-Q,Le=P.left-xe,Ue=P.width+Le,Ye=Math.max(Ue,A.width),Z=window.innerWidth-ps,Se=If(xe,[ps,Math.max(ps,Z-Ye)]);m.style.minWidth=Ue+"px",m.style.left=Se+"px"}else{const Q=A.right-H.right,xe=window.innerWidth-V.right-Q,Le=window.innerWidth-P.right-xe,Ue=P.width+Le,Ye=Math.max(Ue,A.width),Z=window.innerWidth-ps,Se=If(xe,[ps,Math.max(ps,Z-Ye)]);m.style.minWidth=Ue+"px",m.style.right=Se+"px"}const M=y(),B=window.innerHeight-ps*2,I=N.scrollHeight,ie=window.getComputedStyle(f),se=parseInt(ie.borderTopWidth,10),L=parseInt(ie.paddingTop,10),F=parseInt(ie.borderBottomWidth,10),W=parseInt(ie.paddingBottom,10),ce=se+L+I+W+F,ge=Math.min(w.offsetHeight*5,ce),O=window.getComputedStyle(N),te=parseInt(O.paddingTop,10),Y=parseInt(O.paddingBottom,10),ne=P.top+P.height/2-ps,pe=B-ne,be=w.offsetHeight/2,le=w.offsetTop+be,he=se+L+le,Pe=ce-he;if(he<=ne){const Q=M.length>0&&w===M[M.length-1].ref.current;m.style.bottom="0px";const xe=f.clientHeight-N.offsetTop-N.offsetHeight,Le=Math.max(pe,be+(Q?Y:0)+xe+F),Ue=he+Le;m.style.height=Ue+"px"}else{const Q=M.length>0&&w===M[0].ref.current;m.style.top="0px";const Le=Math.max(ne,se+N.offsetTop+(Q?te:0)+be)+Pe;m.style.height=Le+"px",N.scrollTop=he-ne+N.offsetTop}m.style.margin=`${ps}px 0`,m.style.minHeight=ge+"px",m.style.maxHeight=B+"px",r?.(),requestAnimationFrame(()=>j.current=!0)}},[y,o.trigger,o.valueNode,m,f,N,w,T,o.dir,r]);_t(()=>E(),[E]);const[z,_]=v.useState();_t(()=>{f&&_(window.getComputedStyle(f).zIndex)},[f]);const R=v.useCallback(P=>{P&&S.current===!0&&(E(),k?.(),S.current=!1)},[E,k]);return e.jsx(qM,{scope:c,contentWrapper:m,shouldExpandOnScrollRef:j,onScrollButtonChange:R,children:e.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:e.jsx(Ae.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});_w.displayName=HM;var $M="SelectPopperPosition",Hf=v.forwardRef((t,s)=>{const{__scopeSelect:c,align:r="start",collisionPadding:i=ps,...o}=t,u=em(c);return e.jsx(hg,{...u,...o,ref:s,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Hf.displayName=$M;var[qM,lh]=El(rr,{}),$f="SelectViewport",Aw=v.forwardRef((t,s)=>{const{__scopeSelect:c,nonce:r,...i}=t,o=Cc($f,c),u=lh($f,c),m=He(s,o.onViewportChange),p=v.useRef(0);return e.jsxs(e.Fragment,{children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),e.jsx(Zu.Slot,{scope:c,children:e.jsx(Ae.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ye(i.onScroll,f=>{const b=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:y}=u;if(y?.current&&h){const j=Math.abs(p.current-b.scrollTop);if(j>0){const S=window.innerHeight-ps*2,N=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),T=Math.max(N,w);if(T<S){const k=T+j,E=Math.min(S,k),z=k-E;h.style.height=E+"px",h.style.bottom==="0px"&&(b.scrollTop=z>0?z:0,h.style.justifyContent="flex-end")}}}p.current=b.scrollTop})})})]})});Aw.displayName=$f;var Pw="SelectGroup",[QM,WM]=El(Pw),VM=v.forwardRef((t,s)=>{const{__scopeSelect:c,...r}=t,i=cs();return e.jsx(QM,{scope:c,id:i,children:e.jsx(Ae.div,{role:"group","aria-labelledby":i,...r,ref:s})})});VM.displayName=Pw;var Mw="SelectLabel",FM=v.forwardRef((t,s)=>{const{__scopeSelect:c,...r}=t,i=WM(Mw,c);return e.jsx(Ae.div,{id:i.id,...r,ref:s})});FM.displayName=Mw;var xu="SelectItem",[KM,Rw]=El(xu),Ow=v.forwardRef((t,s)=>{const{__scopeSelect:c,value:r,disabled:i=!1,textValue:o,...u}=t,m=Nc(xu,c),p=Cc(xu,c),f=m.value===r,[b,h]=v.useState(o??""),[y,j]=v.useState(!1),S=He(s,k=>p.itemRefCallback?.(k,r,i)),N=cs(),w=v.useRef("touch"),T=()=>{i||(m.onValueChange(r),m.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return e.jsx(KM,{scope:c,value:r,disabled:i,textId:N,isSelected:f,onItemTextChange:v.useCallback(k=>{h(E=>E||(k?.textContent??"").trim())},[]),children:e.jsx(Zu.ItemSlot,{scope:c,value:r,disabled:i,textValue:b,children:e.jsx(Ae.div,{role:"option","aria-labelledby":N,"data-highlighted":y?"":void 0,"aria-selected":f&&y,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...u,ref:S,onFocus:ye(u.onFocus,()=>j(!0)),onBlur:ye(u.onBlur,()=>j(!1)),onClick:ye(u.onClick,()=>{w.current!=="mouse"&&T()}),onPointerUp:ye(u.onPointerUp,()=>{w.current==="mouse"&&T()}),onPointerDown:ye(u.onPointerDown,k=>{w.current=k.pointerType}),onPointerMove:ye(u.onPointerMove,k=>{w.current=k.pointerType,i?p.onItemLeave?.():w.current==="mouse"&&k.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ye(u.onPointerLeave,k=>{k.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:ye(u.onKeyDown,k=>{p.searchRef?.current!==""&&k.key===" "||(PM.includes(k.key)&&T(),k.key===" "&&k.preventDefault())})})})})});Ow.displayName=xu;var ki="SelectItemText",zw=v.forwardRef((t,s)=>{const{__scopeSelect:c,className:r,style:i,...o}=t,u=Nc(ki,c),m=Cc(ki,c),p=Rw(ki,c),f=zM(ki,c),[b,h]=v.useState(null),y=He(s,T=>h(T),p.onItemTextChange,T=>m.itemTextRefCallback?.(T,p.value,p.disabled)),j=b?.textContent,S=v.useMemo(()=>e.jsx("option",{value:p.value,disabled:p.disabled,children:j},p.value),[p.disabled,p.value,j]),{onNativeOptionAdd:N,onNativeOptionRemove:w}=f;return _t(()=>(N(S),()=>w(S)),[N,w,S]),e.jsxs(e.Fragment,{children:[e.jsx(Ae.span,{id:p.textId,...o,ref:y}),p.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Gi.createPortal(o.children,u.valueNode):null]})});zw.displayName=ki;var Lw="SelectItemIndicator",Bw=v.forwardRef((t,s)=>{const{__scopeSelect:c,...r}=t;return Rw(Lw,c).isSelected?e.jsx(Ae.span,{"aria-hidden":!0,...r,ref:s}):null});Bw.displayName=Lw;var qf="SelectScrollUpButton",Uw=v.forwardRef((t,s)=>{const c=Cc(qf,t.__scopeSelect),r=lh(qf,t.__scopeSelect),[i,o]=v.useState(!1),u=He(s,r.onScrollButtonChange);return _t(()=>{if(c.viewport&&c.isPositioned){let m=function(){const f=p.scrollTop>0;o(f)};const p=c.viewport;return m(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[c.viewport,c.isPositioned]),i?e.jsx(Hw,{...t,ref:u,onAutoScroll:()=>{const{viewport:m,selectedItem:p}=c;m&&p&&(m.scrollTop=m.scrollTop-p.offsetHeight)}}):null});Uw.displayName=qf;var Qf="SelectScrollDownButton",Iw=v.forwardRef((t,s)=>{const c=Cc(Qf,t.__scopeSelect),r=lh(Qf,t.__scopeSelect),[i,o]=v.useState(!1),u=He(s,r.onScrollButtonChange);return _t(()=>{if(c.viewport&&c.isPositioned){let m=function(){const f=p.scrollHeight-p.clientHeight,b=Math.ceil(p.scrollTop)<f;o(b)};const p=c.viewport;return m(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[c.viewport,c.isPositioned]),i?e.jsx(Hw,{...t,ref:u,onAutoScroll:()=>{const{viewport:m,selectedItem:p}=c;m&&p&&(m.scrollTop=m.scrollTop+p.offsetHeight)}}):null});Iw.displayName=Qf;var Hw=v.forwardRef((t,s)=>{const{__scopeSelect:c,onAutoScroll:r,...i}=t,o=Cc("SelectScrollButton",c),u=v.useRef(null),m=Ju(c),p=v.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return v.useEffect(()=>()=>p(),[p]),_t(()=>{m().find(b=>b.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[m]),e.jsx(Ae.div,{"aria-hidden":!0,...i,ref:s,style:{flexShrink:0,...i.style},onPointerDown:ye(i.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(r,50))}),onPointerMove:ye(i.onPointerMove,()=>{o.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(r,50))}),onPointerLeave:ye(i.onPointerLeave,()=>{p()})})}),GM="SelectSeparator",YM=v.forwardRef((t,s)=>{const{__scopeSelect:c,...r}=t;return e.jsx(Ae.div,{"aria-hidden":!0,...r,ref:s})});YM.displayName=GM;var Wf="SelectArrow",XM=v.forwardRef((t,s)=>{const{__scopeSelect:c,...r}=t,i=em(c),o=Nc(Wf,c),u=Cc(Wf,c);return o.open&&u.position==="popper"?e.jsx(bg,{...i,...r,ref:s}):null});XM.displayName=Wf;var ZM="SelectBubbleInput",$w=v.forwardRef(({__scopeSelect:t,value:s,...c},r)=>{const i=v.useRef(null),o=He(r,i),u=rh(s);return v.useEffect(()=>{const m=i.current;if(!m)return;const p=window.HTMLSelectElement.prototype,b=Object.getOwnPropertyDescriptor(p,"value").set;if(u!==s&&b){const h=new Event("change",{bubbles:!0});b.call(m,s),m.dispatchEvent(h)}},[u,s]),e.jsx(Ae.select,{...c,style:{...Fj,...c.style},ref:o,defaultValue:s})});$w.displayName=ZM;function qw(t){return t===""||t===void 0}function Qw(t){const s=Vt(t),c=v.useRef(""),r=v.useRef(0),i=v.useCallback(u=>{const m=c.current+u;s(m),(function p(f){c.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>p(""),1e3))})(m)},[s]),o=v.useCallback(()=>{c.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[c,i,o]}function Ww(t,s,c){const i=s.length>1&&Array.from(s).every(f=>f===s[0])?s[0]:s,o=c?t.indexOf(c):-1;let u=JM(t,Math.max(o,0));i.length===1&&(u=u.filter(f=>f!==c));
666const p=u.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return p!==c?p:void 0}function JM(t,s){return t.map((c,r)=>t[(s+r)%t.length])}var eR=yw,tR=Nw,aR=ww,sR=Sw,nR=Tw,cR=kw,rR=Aw,lR=Ow,iR=zw,oR=Bw,dR=Uw,uR=Iw;function et({...t}){return e.jsx(eR,{"data-loc":"client/src/components/ui/select.tsx:10","data-slot":"select",...t})}function tt({...t}){return e.jsx(aR,{"data-loc":"client/src/components/ui/select.tsx:22","data-slot":"select-value",...t})}function at({className:t,size:s="default",children:c,...r}){return e.jsxs(tR,{"data-loc":"client/src/components/ui/select.tsx:34","data-slot":"select-trigger","data-size":s,className:Ne("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r,children:[c,e.jsx(sR,{"data-loc":"client/src/components/ui/select.tsx:44",asChild:!0,children:e.jsx(ns,{"data-loc":"client/src/components/ui/select.tsx:45",className:"size-4 opacity-50"})})]})}function st({className:t,children:s,position:c="popper",align:r="center",...i}){return e.jsx(nR,{"data-loc":"client/src/components/ui/select.tsx:59",children:e.jsxs(cR,{"data-loc":"client/src/components/ui/select.tsx:60","data-slot":"select-content",className:Ne("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",c==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:c,align:r,...i,children:[e.jsx(mR,{"data-loc":"client/src/components/ui/select.tsx:72"}),e.jsx(rR,{"data-loc":"client/src/components/ui/select.tsx:73",className:Ne("p-1",c==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:s}),e.jsx(pR,{"data-loc":"client/src/components/ui/select.tsx:82"})]})})}function ve({className:t,children:s,...c}){return e.jsxs(lR,{"data-loc":"client/src/components/ui/select.tsx:107","data-slot":"select-item",className:Ne("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...c,children:[e.jsx("span",{"data-loc":"client/src/components/ui/select.tsx:115",className:"absolute right-2 flex size-3.5 items-center justify-center",children:e.jsx(oR,{"data-loc":"client/src/components/ui/select.tsx:116",children:e.jsx(Et,{"data-loc":"client/src/components/ui/select.tsx:117",className:"size-4"})})}),e.jsx(iR,{"data-loc":"client/src/components/ui/select.tsx:120",children:s})]})}function mR({className:t,...s}){return e.jsx(dR,{"data-loc":"client/src/components/ui/select.tsx:143","data-slot":"select-scroll-up-button",className:Ne("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(bN,{"data-loc":"client/src/components/ui/select.tsx:151",className:"size-4"})})}function pR({className:t,...s}){return e.jsx(uR,{"data-loc":"client/src/components/ui/select.tsx:161","data-slot":"select-scroll-down-button",className:Ne("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(ns,{"data-loc":"client/src/components/ui/select.tsx:169",className:"size-4"})})}const xR={owner:"담당자",sender:"발송자",editor:"편집자",viewer:"열람자"};function fR(t){return t!=="viewer"}function gR({campaignId:t,data:s,myRole:c}){const{campaign:r,rule:i,product:o}=s,u=q.useUtils(),{data:m}=q.gateway.campaigns.members.useQuery({id:t}),p=c==="owner",[f,b]=v.useState(!1),[h,y]=v.useState(""),[j,S]=v.useState("editor"),N=q.gateway.campaigns.invite.useMutation({onSuccess:_=>{u.gateway.campaigns.members.invalidate({id:t}),u.gateway.campaigns.activity.invalidate({id:t}),X.success(`${_.name} 을 팀에 추가했습니다.`),b(!1),y("")},onError:_=>X.error(_.message)}),w=q.gateway.campaigns.setMemberRole.useMutation({onSuccess:()=>{u.gateway.campaigns.members.invalidate({id:t}),X.success("권한을 바꿨습니다.")},onError:_=>X.error(_.message)}),T=q.gateway.campaigns.removeMember.useMutation({onSuccess:()=>{u.gateway.campaigns.members.invalidate({id:t}),X.success("팀에서 제외했습니다.")},onError:_=>X.error(_.message)}),k=q.gateway.campaigns.rejudge.useMutation({onSuccess:()=>{u.gateway.campaigns.get.invalidate({id:t}
666),u.gateway.campaigns.list.invalidate(),X.success("판정을 다시 계산했습니다.")},onError:_=>X.error(_.message)}),E=_=>(_??"").split(",").map(R=>R.trim()).filter(Boolean),z=r.effectiveSignal;return e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:147",className:"space-y-5",children:[e.jsxs("section",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:149",className:"rounded-xl border bg-card p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:150",className:"flex items-start justify-between gap-3",children:[e.jsx("h2",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:151",className:"font-semibold",children:"이 캠페인의 판정"}),e.jsxs(G,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:152",variant:"ghost",size:"sm",className:"gap-1.5",disabled:k.isPending,onClick:()=>k.mutate({id:t}),children:[e.jsx(vl,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:159",className:`size-3.5 ${k.isPending?"animate-spin":""}`}),"다시 판정"]})]}),e.jsx("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:163",className:"mt-2 text-sm leading-relaxed",children:Os[z].plain}),r.signalReason&&e.jsx("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:165",className:"mt-3 space-y-1.5 rounded-lg bg-muted/50 p-3.5",children:r.signalReason.split(`
667`).map((_,R)=>e.jsx("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:167",className:"text-sm leading-relaxed",children:_},R))}),e.jsx("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:173",className:"mt-2.5 text-xs text-muted-foreground",children:'제품 인증 상태를 바꾸면 판정이 달라집니다. 변경 후 "다시 판정"을 누르세요.'})]}),i&&e.jsxs("section",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:180",className:"space-y-3",children:[e.jsxs("h2",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:181",className:"text-sm font-semibold text-muted-foreground",children:[i.countryNameKo," 발송 규칙"]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:184",className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(nl,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:185",icon:e.jsx(ar,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:185",className:"size-4"}),title:"쓸 수 있는 주소",children:i.emailType==="role"?"회사 대표 주소(info@, sales@)만":i.emailType==="both"?"회사 대표 주소 + 담당자 업무 주소":"콜드메일용 주소 확보 불가"}),e.jsx(nl,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:192",icon:e.jsx(AN,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:192",className:"size-4"}),title:"팔로업",children:i.followupLimit===0?"최초 1통만 — 재발송 불가":`팔로업 ${i.followupLimit}회까지`}),e.jsx(nl,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:197",icon:e.jsx(Og,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:197",className:"size-4"}),title:"제목",children:i.subjectTag?`${i.subjectTag} 표시 필수`:"필수 표시 없음"}),e.jsx(nl,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:202",icon:e.jsx(ao,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:202",className:"size-4"}),title:"언어·채널",children:[i.language,i.channel].filter(
667Boolean).join(" · ")||"미확인"}),(i.weekend||i.blackout)&&e.jsx(nl,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:206",icon:e.jsx(Sg,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:206",className:"size-4"}),title:"피할 시기",children:hR(i.weekend,i.blackout)}),i.law&&e.jsxs(nl,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:211",icon:e.jsx(CN,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:211",className:"size-4"}),title:"근거 법령",children:[i.law,i.penalty?` — ${i.penalty}`:""]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:218",className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(B1,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:219",tone:"ok",icon:e.jsx(Jt,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:221",className:"size-4"}),title:"본문 필수 요소",items:E(i.requiredElements),empty:"추가 필수 항목 없음"}),e.jsx(B1,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:226",tone:"bad",icon:e.jsx(Ea,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:228",className:"size-4"}),title:"금지 사항",items:E(i.forbidden),empty:"확인된 금지 항목 없음"})]}),i.medicalClaimRisk&&e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:236",className:"rounded-xl border border-rose-200 bg-rose-50 p-4",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:237",className:"flex items-center gap-2 text-sm font-semibold text-rose-900",children:[e.jsx(Rg,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:238",className:"size-4"}),"의학적 효능 표현 금지 국가"]}),e.jsx("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:241",className:"mt-1.5 text-sm leading-relaxed text-rose-900",children:'"치료·재생·의료용" 계열 표현을 쓰면 화장품이 의약품으로 재분류될 수 있습니다. 문안 탭의 교정기가 자동으로 잡습니다.'})]}),i.certLockin&&e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:249",className:"rounded-xl border border-amber-200 bg-amber-50 p-4",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:250",className:"flex items-center gap-2 text-sm font-semibold text-amber-900",children:[e.jsx(_g,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:251",className:"size-4"}),"인증 등록 명의가 현지 유통사에 귀속됩니다"]}),e.jsxs("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:254",className:"mt-1.5 text-sm leading-relaxed text-amber-900",children:[i.certOwner??"파트너를 바꾸면 등록을 다시 해야 합니다."," ","계약서에 등록 권리 이전 조항을 반드시 넣으세요."]})]}),i.b2bNote&&e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:263",className:"rounded-xl border bg-card p-4",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:264",className:"text-sm font-semibold",children:"B2B 예외 범위"}),e.jsx("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:265",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:i.b2bNote})]})]}),o&&e.jsxs("section",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:275",className:"rounded-xl border bg-card p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:276",className:"flex items-start justify-between gap-3",children:[e.jsx("h2",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:277",className:"font-semibold",children:"문안에 쓸 제품 사실"}),e.jsx(G,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:278",variant:"ghost",size:"sm",asChild:!0,children:e.jsx(rt,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:279",href:`/products/${o.id}`,children:"수정"})})]}),e.jsx("dl",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:282",className:"mt-3 space-y-3",children:[["한 줄 소개",o.tagline],["핵심 성분",o.keyIngredients],["차별점",o.differentiators],["특허·시험",o.patents],["팩트시트",o.factsheet],["링크",o.brandUrl]].filter(([,_])=>!!_).map(([_,R])=>e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:293",children:[e.jsx("dt",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:294",className:"text-xs font-medium text-muted-foreground",children:_}),e.jsx("dd",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:295",className:"mt-0.5 text-sm leading-relaxed whitespace-pre-line",children:R})]},_))}),!o.tagline&&!o.factsheet&&e.jsx("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:302",className:"mt-2 text-sm text-muted-foreground",children:"제품 정보가 비어 있습니다. 문안을 쓰기 전에 채우면 근거 없는 표현을 줄일 수 있습니다."})]}),e.jsxs("section",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:311",className:"rounded-xl border bg-card p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:312",className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("h2",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:313",className:"flex items-center gap-2 font-semibold",children:[e.jsx(sr,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:314",className:"size-4 text-muted-foreground"}),"참여 팀원"]}),p&&e.jsxs(G,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:318",variant:"outline",size:"sm",className:"gap-1.5 bg-background",onClick:()=>b(!0),children:[e.jsx(OA,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:324",className:"size-3.5"}),"팀원 초대"]})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:329",className:"mt-3 space-y-2",children:(m??[]).map(_=>e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:331",className:"flex items-center gap-3 rounded-lg border bg-background p-3",children:[e.jsxs("span",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:335",className:"min-w-0 flex-1",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:336",className:"block truncate text-sm font-medium",children:_.userName??"이름 없음"}),_.userEmail&&e.jsx("span",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:340",className:"block truncate text-xs text-muted-foreground",children:_.userEmail})]}),p&&_.member.role!=="owner"?e.jsxs(et,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:346",value:_.member.role,onValueChange:R=>w.mutate({id:t,userId:_.member.userId,role:R}),children:[e.jsx(at,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:356",className:"h-8 w-28 text-xs",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:357"})}),e.jsxs(st,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:359",children:[e.jsx(ve,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:360",value:"sender",children:"발송자"}),e.jsx(ve,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:361",value:"editor",children:"편집자"}),e.jsx(ve,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:362",value:"viewer",children:"열람자"})]})]}):e.jsx("span",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:366",className:"rounded-md bg-muted px-2 py-0.5 text-xs font-medium",children:xR[_.member.role]??_.member.role}),p&&_.member.role!=="owner"&&e.jsx(G,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:371",variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:text-destructive",onClick:()=>T.mutate({id:t,userId:_.member.userId}),children:e.jsx(RA,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:379",className:"size-3.5"})})]},_.member.id))}),e.jsx("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:385",className:"mt-3 text-xs leading-relaxed text-muted-foreground",children:"발송 권한은 담당자(owner)ì
667™€ 발송자(sender)에게만 있습니다. 편집자와 열람자는 문안을 ë³´ê³  ê³ ì¹  수 있지만 보낼 수는 없습니다."}),e.jsx(ta,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:390",open:f,onOpenChange:b,children:e.jsxs(aa,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:391",className:"sm:max-w-md",children:[e.jsxs(sa,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:392",children:[e.jsx(na,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:393",children:"팀원 초대"}),e.jsx(ca,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:394",children:"초대할 사람이 먼저 이 서비스에 한 번 로그인해야 합니다. 로그인한 계정의 이메일 주소를 넣으세요."})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:399",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:400",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:401",className:"text-sm",children:"이메일"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:402",value:h,onChange:_=>y(_.target.value),placeholder:"[email protected]"})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:408",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:409",className:"text-sm",children:"권한"}),e.jsxs(et,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:410",value:j,onValueChange:_=>S(_),children:[e.jsx(at,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:414",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:415"})}),e.jsxs(st,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:417",children:[e.jsx(ve,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:418",value:"sender",children:"발송자 — 문안 수정과 발송 가능"}),e.jsx(ve,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:419",value:"editor",children:"편집자 — 수정만 가능"}),e.jsx(ve,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:420",value:"viewer",children:"열람자 — 보기만 가능"})]})]})]})]}),e.jsxs(_a,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:425",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:426",variant:"outline",className:"bg-background",onClick:()=>b(!1),children:"취소"}),e.jsx(G,{"data-loc":"client/src/components/campaign/BriefingTab.tsx:433",disabled:!h.trim()||N.isPending,onClick:()=>N.mutate({id:t,email:h.trim(),role:j}),children:N.isPending?"초대 중":"초대"})]})]})})]})]})}function hR(t,s){const c=[];if(t&&c.push(t.trim()),s){const o=s.trim();(!t||!t.includes(o))&&c.push(o)}const r=new Set,i=[];for(const o of c.join(" · ").split(/\s*·\s*|\s*\+\s*/)){const u=o.trim();!u||r.has(u)||(r.add(u),i.push(u))}return i.join(" · ")||"특별히 피할 시기 없음"}function nl({icon:t,title:s,children:c}){return e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:487",className:"rounded-xl border bg-card p-4",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:488",className:"flex items-center gap-2 text-sm font-semibold",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:489",className:"text-muted-foreground",children:t}),s]}),e.jsx("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:492",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:c})]})}function B1({icon:t,title:s,items:c,empty:r,tone:i}){const o=i==="ok"?"border-emerald-200 bg-emerald-50/60 text-emerald-900":"border-rose-200 bg-rose-50/60 text-rose-900";return e.jsxs("div",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:515",className:`rounded-xl border p-4 ${o}`,children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:516",className:"flex items-center gap-2 text-sm font-semibold",children:[t,s]}),c.length===0?e.jsx("p",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:521",className:"mt-1.5 text-sm opacity-70",children:r}):e.jsx("ul",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:523",className:"mt-2 space-y-1",children:c.map((u,m)=>e.jsxs("li",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:525",className:"flex gap-2 text-sm leading-relaxed",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/BriefingTab.tsx:526",className:"mt-2 size-1 shrink-0 rounded-full bg-current opacity-60"}),u]},m))})]})}function En({icon:t,title:s,description:c,action:r,className:i}){return e.jsxs("div",{"data-loc":"client/src/components/EmptyState.tsx:14",className:Ne("flex flex-col items-center justify-center rounded-xl border border-dashed bg-muted/30 px-6 py-14 text-center",i),children:[t&&e.jsx("div",{"data-loc":"client/src/components/EmptyState.tsx:20",className:"mb-3 text-muted-foreground",children:t}),e.jsx("p",{"data-loc":"client/src/components/EmptyState.tsx:21",className:"text-sm font-semibold",children:s}),c&&e.jsx("p",{"data-loc":"client/src/components/EmptyState.tsx:23",className:"mt-1.5 max-w-md text-sm leading-relaxed text-muted-foreground",children:c}),r&&e.jsx("div",{"data-loc":"client/src/components/EmptyState.tsx:27",className:"mt-5",children:r})]})}var tm="Checkbox",[bR]=da(tm),[vR,ih]=bR(tm);function yR(t){const{__scopeCheckbox:s,checked:c,children:r,defaultChecked:i,disabled:o,form:u,name:m,onCheckedChange:p,required:f,value:b="on",internal_do_not_use_render:h}=t,[y,j]=Bs({prop:c,defaultProp:i??!1,onChange:p,caller:tm}),[S,N]=v.useState(null),[w,T]=v.useState(null),k=v.useRef(!1),E=S?!!u||!!S.closest("form"):!0,z={checked:y,disabled:o,setChecked:j,control:S,setControl:N,name:m,form:u,value:b,hasConsumerStoppedPropagationRef:k,required:f,defaultChecked:fc(i)?!1:i,isFormControl:E,bubbleInput:w,setBubbleInput:T};return e.jsx(vR,{scope:s,...z,children:jR(h)?h(z):r})}var Vw="CheckboxTrigger",Fw=v.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:c,...r},i)=>{const{control:o,value:u,disabled:m,checked:p,required:f,setControl:b,setChecked:h,hasConsumerStoppedPropagationRef:y,isFormControl:j,bubbleInput:S}=ih(Vw,t),N=He(i,b),w=v.useRef(p);return v.useEffect(()=>{const T=o?.form;if(T){const k=()=>h(w.current);return T.addEventListener("reset",k),()=>T.removeEventListener("reset",k)}},[o,h]),e.jsx(Ae.button,{type:"button",role:"checkbox","aria-checked":fc(p)?"mixed":p,"aria-required":f,"data-state":Jw(p),"data-disabled":m?"":void 0,disabled:m,value:u,...r,ref:N,onKeyDown:ye(s,T=>{T.key==="Enter"&&T.preventDefault()}),onClick:ye(c,T=>{h(k=>fc(k)?!0:!k),S&&j&&(y.current=T.isPropagationStopped(),y.current||T.stopPropagation())})})});Fw.displayName=Vw;var Kw=v.forwardRef((t,s)=>{const{__scopeCheckbox:c,name:r,checked:i,defaultChecked:o,required:u,disabled:m,value:p,onCheckedChange:f,form:b,...h}=t;return e.jsx(yR,{__scopeCheckbox:c,checked:i,defaultChecked:o,disabled:m,required:u,onCheckedChange:f,name:r,form:b,value:p,internal_do_not_use_render:({isFormControl:y})=>e.jsxs(e.Fragment,{children:[e.jsx(Fw,{...h,ref:s,__scopeCheckbox:c}),y&&e.jsx(Zw,{__scopeCheckbox:c})]})})});Kw.displayName=tm;var Gw="CheckboxIndicator",Yw=v.forwardRef((t,s)=>{const{__scopeCheckbox:c,forceMount:r,...i}=t,o=ih(Gw,c);return e.jsx(ea,{present:r||fc(o.checked)||o.checked===!0,children:e.jsx(Ae.
667span,{"data-state":Jw(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:s,style:{pointerEvents:"none",...t.style}})})});Yw.displayName=Gw;var Xw="CheckboxBubbleInput",Zw=v.forwardRef(({__scopeCheckbox:t,...s},c)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:o,defaultChecked:u,required:m,disabled:p,name:f,value:b,form:h,bubbleInput:y,setBubbleInput:j}=ih(Xw,t),S=He(c,j),N=rh(o),w=mg(r);v.useEffect(()=>{const k=y;if(!k)return;const E=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(E,"checked").set,R=!i.current;if(N!==o&&_){const P=new Event("click",{bubbles:R});k.indeterminate=fc(o),_.call(k,fc(o)?!1:o),k.dispatchEvent(P)}},[y,N,o,i]);const T=v.useRef(fc(o)?!1:o);return e.jsx(Ae.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??T.current,required:m,disabled:p,name:f,value:b,form:h,...s,tabIndex:-1,ref:S,style:{...s.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Zw.displayName=Xw;function jR(t){return typeof t=="function"}function fc(t){return t==="indeterminate"}function Jw(t){return fc(t)?"indeterminate":t?"checked":"unchecked"}function $a({className:t,...s}){return e.jsx(Kw,{"data-loc":"client/src/components/ui/checkbox.tsx:12","data-slot":"checkbox",className:Ne("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(Yw,{"data-loc":"client/src/components/ui/checkbox.tsx:20","data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:e.jsx(Et,{"data-loc":"client/src/components/ui/checkbox.tsx:24",className:"size-3.5"})})})}function pt({className:t,onKeyDown:s,onCompositionStart:c,onCompositionEnd:r,...i}){const o=ch(),{onCompositionStart:u,onCompositionEnd:m,onKeyDown:p}=ow({onKeyDown:f=>{const b=f.nativeEvent.isComposing||o.justEndedComposing();f.key==="Enter"&&!f.shiftKey&&b||s?.(f)},onCompositionStart:f=>{o.setComposing(!0),c?.(f)},onCompositionEnd:f=>{o.markCompositionEnd(),setTimeout(()=>{o.setComposing(!1)},100),r?.(f)}});return e.jsx("textarea",{"data-loc":"client/src/components/ui/textarea.tsx:53","data-slot":"textarea",className:Ne("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),onCompositionStart:u,onCompositionEnd:m,onKeyDown:p,...i})}function NR(t){const s=new Map;for(const c of t){const r=c.email?.trim().toLowerCase();if(!r)continue;const i=c.campaignName?.trim()||"다른 캠페인",o=s.get(r)??[];o.includes(i)||o.push(i),s.set(r,o)}return s}function CR(t){const s=t.trim().slice(-1);if(!s)return!1;const c=s.charCodeAt(0);return c>=44032&&c<=55203?(c-44032)%28!==0:/[0-9]/.test(s)?["1","3","6","7","8","0"].includes(s):/[a-zA-Z]/.test(s)?!"aeiouAEIOU".includes(s):!1}function wR(t){return`${t}${CR(t)?"은":"는"}`}function SR(t){return t?t.trim().toLowerCase().replace(/^https?:\/\//,"").replace(/^www\./,"").split(/[/?#]/)[0]??"":""}function eS(t){return SR(t)||(t??"").trim()}const qi={large:{label:"규모 상",short:"상",tone:"bg-emerald-50 text-emerald-700 border-emerald-200",hint:"전국 총판을 맡길 수 있는 규모입니다."},mid:{label:"규모 중",short:"중",tone:"bg-sky-50 text-sky-700 border-sky-200",hint:"지역 대리점이나 특정 채널 총판에 적합합니다."},small:{label:"규모 하",short:"하",tone:"bg-slate-50 text-slate-600 border-slate-200",hint:"총판보다는 소규모 거래처로 보는 것이 안전합니다."},unknown:{label:"확인 필요",short:"—",tone:"bg-amber-50 text-amber-700 border-amber-200",hint:"홈페이지에서 규모를 확인할 수 없었습니다. 직접 확인하세요."}},U1={clean:{label:"통과",className:"bg-emerald-50 text-emerald-700 border-emerald-200",hint:"자동 검수에서 걸린 항목이 없습니다. 그래도 홈페이지를 한 번 열어보고 승인하세요."},attention:{label:"확인 필요",className:"bg-amber-50 text-amber-700 border-amber-200",hint:"사람이 확인해야 하는 사유가 있습니다. 아래 사유를 읽고 판단하세요."},blocked:{label:"자동 차단",className:"bg-rose-50 text-rose-700 border-rose-200",hint:"그대로 발송하면 문제가 되는 항목입니다. 승인하지 않는 것을 권합니다."}}
667,TR={unchecked:"미확인",reachable:"접속 확인",unreachable:"접속 불가"};function kR({campaignId:t}){const{data:s,isLoading:c}=q.gateway.prospect.items.useQuery({campaignId:t,decision:"pending"}),[r,i]=v.useState(new Set),o=q.useUtils(),u=()=>{o.gateway.prospect.items.invalidate({campaignId:t,decision:"pending"}),o.gateway.prospect.status.invalidate({campaignId:t}),o.gateway.candidates.list.invalidate({campaignId:t}),o.gateway.campaigns.activity.invalidate({id:t}),o.gateway.send.preflight.invalidate(),i(new Set)},m=q.gateway.prospect.approve.useMutation({onSuccess:j=>{u(),j.approved===0&&(j.duplicates??0)>0?X.warning(`${j.duplicates}건은 이미 후보로 등록된 곳이어서 추가하지 않았습니다.`):X.success(`${j.approved}건을 후보로 등록했습니다.`+((j.duplicates??0)>0?` 이미 등록된 ${j.duplicates}건은 제외했습니다.`:""))},onError:j=>X.error(j.message)}),p=q.gateway.prospect.reject.useMutation({onSuccess:j=>{u(),X.success(`${j.rejected}건을 반려했습니다.`)},onError:j=>X.error(j.message)}),f=s??[],b=v.useMemo(()=>{const j={clean:0,attention:0,blocked:0};for(const S of f)j[S.reviewFlag]+=1;return j},[f]),h=j=>i(S=>{const N=new Set(S);return N.has(j)?N.delete(j):N.add(j),N});if(c)return e.jsx("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:108",className:"space-y-2",children:Array.from({length:3}).map((j,S)=>e.jsx(we,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:110",className:"h-20 rounded-lg"},S))});if(f.length===0)return null;const y=m.isPending||p.isPending;return e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:121",className:"rounded-xl border border-primary/30 bg-primary/[0.03]",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:122",className:"flex flex-wrap items-center justify-between gap-3 border-b border-primary/20 px-4 py-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:123",className:"flex items-center gap-2",children:[e.jsx(Dt,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:124",className:"size-4 text-primary"}),e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:125",className:"text-sm font-semibold",children:["자동 발굴 검수 대기 ",e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:126",className:"tnum",children:f.length}),"건"]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:128",className:"flex gap-1.5 text-xs",children:[b.clean>0&&e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:130",className:"rounded-full border border-emerald-200 bg-emerald-50 px-2 py-0.5 text-emerald-700",children:["통과 ",b.clean]}),b.attention>0&&e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:135",className:"rounded-full border border-amber-200 bg-amber-50 px-2 py-0.5 text-amber-700",children:["확인 필요 ",b.attention]}),b.blocked>0&&e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:140",className:"rounded-full border border-rose-200 bg-rose-50 px-2 py-0.5 text-rose-700",children:["자동 차단 ",b.blocked]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:146",className:"flex flex-wrap gap-2",children:[e.jsxs(G,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:147",variant:"outline",size:"sm",className:"gap-1.5 bg-background",disabled:y||b.clean===0,onClick:()=>m.mutate({campaignId:t,ids:f.filter(j=>j.reviewFlag==="clean").map(j=>j.id)}),children:[e.jsx(Et,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:159",className:"size-3.5"}),"통과한 ",b.clean,"건 모두 승인"]}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsxs(G,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:164",size:"sm",className:"gap-1.5",disabled:y,onClick:()=>m.mutate({campaignId:t,ids:Array.from(r)}),children:[e.jsx(Et,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:172",className:"size-3.5"}),"선택 ",r.size,"건 승인"]}
667),e.jsxs(G,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:175",variant:"ghost",size:"sm",className:"gap-1.5 text-destructive",disabled:y,onClick:()=>p.mutate({campaignId:t,ids:Array.from(r)}),children:[e.jsx(yl,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:184",className:"size-3.5"}),"반려"]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:192",className:"flex items-start gap-2 border-b border-primary/20 bg-amber-50/60 px-4 py-2.5 text-xs text-amber-900",children:[e.jsx(tr,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:193",className:"mt-0.5 size-3.5 shrink-0"}),e.jsx("p",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:194",children:"자동 발굴은 회사 존재와 홈페이지 응답까지만 확인합니다. 이메일이 지금도 유효한 담당자 주소인지는 보장하지 않으므로, 승인 전 홈페이지를 한 번 열어 확인하는 것이 안전합니다."})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:201",className:"divide-y divide-primary/10",children:f.map(j=>{const S=U1[j.reviewFlag]??U1.attention,N=(j.reviewNotes??"").split(`
668`).filter(Boolean);return e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:206",className:"flex gap-3 px-4 py-3",children:[e.jsx($a,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:207",className:"mt-1",checked:r.has(j.id),onCheckedChange:()=>h(j.id),"aria-label":`${j.companyName} 선택`}),e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:213",className:"min-w-0 flex-1 space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:214",className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:215",className:"font-medium",children:j.companyName}),e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:216",className:`rounded-full border px-2 py-0.5 text-[11px] font-medium ${S.className}`,children:S.label}),e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:221",className:"rounded-full border bg-background px-2 py-0.5 text-[11px] font-medium",children:j.tier}),e.jsxs(yn,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:224",children:[e.jsx(jn,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:225",asChild:!0,children:e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:226",className:"cursor-help text-[11px] text-muted-foreground",children:["확신도 ",e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:227",className:"tnum",children:j.confidence})]})}),e.jsx(Nn,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:230",className:"max-w-xs",children:"자동 판단이 스스로 매긴 확신도입니다. 낮으면 실제로 존재하지 않는 회사일 수 있습니다."})]}),e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:235",className:`text-[11px] ${j.siteCheck==="unreachable"?"text-rose-600":j.siteCheck==="reachable"?"text-emerald-600":"text-muted-foreground"}`,children:["홈페이지 ",TR[j.siteCheck]??j.siteCheck]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:248",className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[j.email?e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:250",className:"font-mono",children:j.email}):e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:252",children:"이메일 없음"}),j.website?e.jsxs("a",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:255",href:j.website.startsWith("http")?j.website:`https://${j.website}`,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",title:j.website,children:[eS(j.website),e.jsx(yc,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:263",className:"size-3"})]}):e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:266",children:"홈페이지 없음"}),j.city&&e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:268",children:j.city}),j.channel&&e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:269",children:j.channel}),j.categories&&e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:270",children:j.categories}),j.sizeTier&&j.sizeTier!=="unknown"?e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:276",className:`rounded-full border px-1.5 py-0.5 text-[11px] font-medium ${qi[j.sizeTier]?.tone??""}`,children:["규모 ",qi[j.sizeTier]?.short,j.sizeEvidence?` · ${j.sizeEvidence}`:""]}):e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:285",className:"text-[11px] text-amber-700",children:"규모 확인 필요"})]}),j.reason&&e.jsx("p",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:289",className:"text-xs text-foreground
668/80",children:j.reason}),N.length>0&&e.jsx("ul",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:292",className:"space-y-1",children:N.map((w,T)=>e.jsxs("li",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:294",className:`flex items-start gap-1.5 text-xs ${j.reviewFlag==="blocked"?"text-rose-700":"text-amber-800"}`,children:[e.jsx(St,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:300",className:"mt-0.5 size-3 shrink-0"}),w]},T))})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectReview.tsx:308",className:"flex shrink-0 gap-1",children:[e.jsxs(yn,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:309",children:[e.jsx(jn,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:310",asChild:!0,children:e.jsx(G,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:311",variant:"ghost",size:"icon",className:"size-8",disabled:y,onClick:()=>m.mutate({campaignId:t,ids:[j.id]}),children:e.jsx(Et,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:318",className:"size-4 text-emerald-600"})})}),e.jsx(Nn,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:321",children:"후보로 등록"})]}),e.jsxs(yn,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:323",children:[e.jsx(jn,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:324",asChild:!0,children:e.jsx(G,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:325",variant:"ghost",size:"icon",className:"size-8",disabled:y,onClick:()=>p.mutate({campaignId:t,ids:[j.id]}),children:e.jsx(yl,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:332",className:"size-4 text-muted-foreground"})})}),e.jsx(Nn,{"data-loc":"client/src/components/campaign/ProspectReview.tsx:335",children:"반려"})]})]})]},j.id)})})]})}const DR=5,ER=100,oh=15;function tS(t,s){return t!==""?t:String(s??oh)}function aS(t,s){const c=s??oh,r=Number(tS(t,s));return!Number.isFinite(r)||r<=0?I1(c):I1(Math.floor(r))}function I1(t){return Number.isFinite(t)?Math.min(ER,Math.max(DR,Math.floor(t))):oh}const H1=4;function _R(t){const s=Math.max(0,Math.round(t));if(s<60)return`${s}초`;const c=Math.floor(s/60),r=s%60;if(c<60)return r===0?`${c}분`:`${c}분 ${r}초`;const i=Math.floor(c/60),o=c%60;return o===0?`${i}시간`:`${i}시간 ${o}분`}function sS(t){if(t<60)return"1분 안";
668const s=Math.ceil(t/60);return s<=10?`약 ${s}분`:`약 ${Math.ceil(s/5)*5}분`}function nS(t){const{status:s,trackTotal:c,trackDone:r,startedAt:i,now:o,lastTickAt:u}=t,m=Math.max(0,(o-i)/1e3),p=`${_R(m)}째`;if(s!=="running")return{percent:100,elapsedText:p,remainText:null,hintText:null,overdue:!1};if(c<=0)return{percent:0,elapsedText:p,remainText:null,hintText:"조사 범위를 나누는 중입니다",overdue:!1};const f=Math.min(r,c),b=Math.ceil(f/H1),h=Math.ceil(c/H1),y=b/h*100,j=Math.min(b+1,h)/h*100,N=(u&&u>i?(u-i)/1e3:m)/Math.max(1,b),w=u&&u>i?Math.max(0,(o-u)/1e3):0,T=N>0?Math.min(.95,w/N):0,E=f>=c?100:Math.min(99,Math.round(y+(j-y)*T));if(f===0)return{percent:0,elapsedText:p,remainText:null,hintText:"첫 조사가 끝나면 남은 시간을 알려드립니다",overdue:!1};const z=h-b,_=Math.max(0,N*z-w),R=c*cS;return{percent:E,elapsedText:p,remainText:_<=0?"곧 완료":`${sS(_)} 남음`,hintText:null,overdue:m>R*1.5}}const cS=55;function AR(t){return t<=0?"":sS(t*cS).replace(/^약 /,"약 ")}const PR=12,MR=3,RR=60,OR=4;function zR(t){if(!Number.isFinite(t)||t<=0)return PR;const s=Math.ceil(t/OR);return Math.max(MR,Math.min(RR,s))}function LR({status:t,trackTotal:s,trackDone:c,marketTotal:r=0,marketDone:i=0,trackFailures:o=0,startedAt:u,now:m,lastTickAt:p,foundCount:f}){const b=nS({status:t,trackTotal:s,trackDone:c,startedAt:u,now:m,lastTickAt:p});return e.jsx("div",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:52",className:"rounded-xl border border-primary/30 bg-primary/[0.03] px-4 py-4",children:e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:53",className:"flex items-start gap-3",children:[e.jsx(Dt,{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:54",className:"mt-0.5 size-4 shrink-0 animate-pulse text-primary"}),e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:55",className:"flex-1",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:56",className:"flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:57",className:"text-sm font-medium",children:["현지 유통사를 찾고 있습니다",s>0&&e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:60",className:"ml-1.5 text-xs font-normal text-muted-foreground tnum",children:[Math.min(c,s),"/",s,"갈래"]})]}),e.jsxs("p",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:65",className:"flex items-center gap-1.5 text-xs text-muted-foreground tnum",children:[e.jsx(kg,{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:66",className:"size-3"}),b.elapsedText,b.remainText&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:70",className:"text-muted-foreground/40",children:"·"}),e.jsx("span",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:71",className:"font-medium text-foreground",children:b.remainText})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:78",className:"mt-2.5 flex items-center gap-2.5",children:[e.jsx("div",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:79",className:"h-1.5 flex-1 overflow-hidden rounded-full bg-primary/10",role:"progressbar","aria-valuenow":b.percent,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"발굴 예상 진행률",children:e.jsx("div",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:87",className:"h-full rounded-full bg-primary transition-[width] duration-500",style:{width:`${b.percent}%`,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"}})}),e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:95",className:"w-20 shrink-0 text-right text-xs font-medium tabular-nums text-primary",children:["예상 ",b.percent,"%"]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:100",className:"mt-2 flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[r>0&&e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:102",className:"tnum",children:["도시·권역 ",Math.min(i,r),"/",r]}),e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:104",className:"tnum",children:["조사 갈래 ",Math.min(c,s),"/",s]}),typeof f=="number"&&e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:106",className:"tnum",children:["발견 ",f,"곳(검수 전)"]}),o>0&&e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:109",className:"font-medium text-amber-700 tnum",children:["부분 실패 ",o,"갈래"]})]}),e.jsxs("p",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:113",className:"mt-2 text-xs leading-relaxed text-muted-foreground",children:[b.hintText?e.jsxs("span",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:115",className:"text-foreground
668/70",children:[b.hintText,". "]}):null,"지역과 업종을 여러 갈래로 나눠 조사하고, 홈페이지가 실제로 열리는지 확인합니다. 다른 탭으로 옮기거나 창을 닫아도 계속 진행됩니다. 퍼센티지는 완료 갈래와 지금까지의 처리 속도로 계산한 예상치이며 최종 후보 확보율이 아닙니다."]}),b.overdue&&e.jsxs("p",{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:124",className:"mt-2 flex items-start gap-1.5 text-xs text-amber-700",children:[e.jsx(St,{"data-loc":"client/src/components/campaign/ProspectProgress.tsx:125",className:"mt-0.5 size-3 shrink-0"}),"예상보다 오래 걸리고 있습니다. 조사량이 많거나 상대 홈페이지 응답이 느린 경우입니다. 그대로 두면 끝까지 진행됩니다."]})]})]})})}function BR({campaignId:t,disabled:s}){const[c,r]=v.useState(!1),[i,o]=v.useState(new Set),u=q.useUtils(),{data:m,isLoading:p}=q.gateway.baseLeads.listForCampaign.useQuery({campaignId:t},{enabled:c}),f=v.useMemo(()=>(m??[]).filter(S=>!S.alreadyImported),[m]),b=(m?.length??0)-f.length;v.useEffect(()=>{c&&o(new Set(f.map(S=>S.lead.id)))},[c,m]);const h=q.gateway.baseLeads.importToCampaign.useMutation({onSuccess:S=>{u.gateway.candidates.list.invalidate({campaignId:t}),u.gateway.candidates.duplicates.invalidate({campaignId:t}),u.gateway.campaigns.activity.invalidate({id:t}),u.gateway.send.preflight.invalidate(),u.gateway.baseLeads.listForCampaign.invalidate({campaignId:t}),r(!1),o(new Set),S.count>0?X.success(`공용 글로벌 DB에서 ${S.count}곳을 후보로 추가했습니다.`):X.info("새로 추가할 후보가 없습니다. 이미 이 캠페인에 등록되어 있습니다."),S.skippedDuplicate>0&&X.info(`중복 ${S.skippedDuplicate}곳은 다시 넣지 않았습니다.`)},onError:S=>X.error(S.message)}),y=i.size,j=f.length>0&&y===f.length;return e.jsxs(ta,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:64",open:c,onOpenChange:r,children:[e.jsxs(G,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:65",variant:"outline",size:"sm",className:"gap-1.5 bg-background",disabled:s,onClick:()=>r(!0),children:[e.jsx(Ii,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:72",className:"size-3.5"}),"기본 DB 불러오기"]}),e.jsxs(aa,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:75",className:"max-h-[min(720px,calc(100vh-2rem))] max-w-3xl overflow-hidden p-0",children:[e.jsxs(sa,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:76",className:"border-b px-6 py-5",children:[e.jsxs(na,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:77",className:"flex items-center gap-2 text-base",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:78",className:"flex size-8 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e.jsx(Ii,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:79",className:"size-4"})}),"공용 글로벌 유통사 DB"]}),e.jsx(ca,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:83",className:"pt-1 text-xs leading-relaxed",children:"이 국가에서 바로 활용할 수 있는 검수 완료 원시 후보입니다. 이미 등록한 회사는 자동으로 제외하며, 추가 후에도 T1/T2/T3 기준으로 다시 판정합니다."})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:89",className:"max-h-[440px] overflow-y-auto px-6 py-4",children:p?e.jsxs("div",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:91",className:"space-y-2",children:[e.jsx(we,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:92",className:"h-12 w-full"}),e.jsx(we,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:93",className:"h-12 w-full"}),e.jsx(we,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:94",className:"h-12 w-full"})]}):f.length===0?e.jsxs("div",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:97",className:"rounded-xl border border-dashed px-5 py-10 text-center",children:[e.jsx(zu,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:98",className:"mx-auto 
668size-5 text-muted-foreground"}),e.jsx("p",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:99",className:"mt-3 text-sm font-medium",children:"새로 가져올 후보가 없습니다"}),e.jsx("p",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:100",className:"mt-1 text-xs text-muted-foreground",children:b>0?`${b}곳은 이미 이 캠페인에 등록되어 있습니다.`:"이 국가의 발송 가능 공용 DB 후보가 아직 없습니다."})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:108",className:"mb-3 flex items-center justify-between text-xs",children:[e.jsxs("label",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:109",className:"flex cursor-pointer items-center gap-2 font-medium",children:[e.jsx($a,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:110",checked:j,onCheckedChange:S=>o(S?new Set(f.map(N=>N.lead.id)):new Set)}),"전체 선택 (",f.length,"곳)"]}),b>0&&e.jsxs("span",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:119",className:"text-muted-foreground",children:["이미 등록 ",b,"곳 제외"]})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:122",className:"overflow-hidden rounded-xl border",children:f.map(S=>{const N=i.has(S.lead.id),w=[S.market.city,S.market.commercialZone].filter(Boolean).join(" · ");return e.jsxs("label",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:127",className:"flex cursor-pointer items-start gap-3 border-b px-3 py-3 last:border-b-0 hover:bg-muted/30",children:[e.jsx($a,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:131",className:"mt-0.5",checked:N,onCheckedChange:T=>{const k=new Set(i);T?k.add(S.lead.id):k.delete(S.lead.id),o(k)}}),e.jsxs("div",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:141",className:"min-w-0 flex-1",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:142",className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:143",className:"font-medium text-sm",children:S.lead.companyName}),S.market.category&&e.jsx("span",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:145",className:"rounded-full bg-muted px-2 py-0.5 text-[11px] text-muted-foreground",children:S.market.category})]}),e.jsx("p",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:150",className:"mt-1 truncate text-xs text-muted-foreground",children:S.lead.email||"이메일은 후보 탭에서 다시 확인"}),w&&e.jsxs("p",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:154",className:"mt-1 flex items-center gap-1 text-[11px] text-muted-foreground",children:[e.jsx(wA,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:155",className:"size-3"}),w]})]})]},`${S.market.id}-${S.lead.id}`)})})]})}),e.jsxs(_a,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:168",className:"border-t bg-muted/20 px-6 py-4 sm:justify-between",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:169",className:"text-xs text-muted-foreground",children:["선택 ",y,"곳"]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:170",className:"flex gap-2",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:171",variant:"outline",onClick:()=>r(!1),disabled:h.isPending,children:"취소"}),e.jsxs(G,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:174",className:"gap-1.5",disabled:y===0||h.isPending,onClick:()=>h.mutate({campaignId:t,baseLeadIds:Array.from(i)}),children:[e.jsx(to,{"data-loc":"client/src/components/campaign/BaseLeadImportDialog.tsx:181",className:"size-3.5"}),h.isPending?"추가 중…":`${y}곳 후보로 추가`]})]})]})]})]})}function UR({tier:t,evidence:s}){const c=qi[t]??qi.unknown;return e.jsxs(yn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:88",children:[e.jsx(jn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:89",asChild:!0,children:e.jsxs("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:90",className:"inline-flex flex-col items-start gap-0.5",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:91",className:`inline-block rounded-full border px-2 py-0.5 text-xs font-medium ${c.tone}`,children:t==="unknown"?"확인 필요":c.short}),s&&e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:97",className:"max-w-[9rem] truncate text-[11px] text-muted-foreground",children:s})]})}),e.jsx(Nn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:103",className:"max-w-xs",children:c.hint})]})}const $1={verified:{label:"확인됨",className:"bg-emerald-50 text-emerald-700 border-emerald-200"},role_ok:{label:"대표 주소",className:"bg-emerald-50 text-emerald-700 border-emerald-200"},personal:{label:"개인 주소",className:"bg-amber-50 text-amber-700 border-amber-200"},invalid:{label:"형식 오류",className:"bg-rose-50 text-rose-700 border-rose-200"},template_junk:{label:"템플릿 예시",className:"bg-rose-50 text-rose-700 border-rose-200"},missing:{label:"이메일 없음",className:"bg-muted text-muted-foreground"}},IR={T1:"border-emerald-200 bg-emerald-50 text-emerald-700",T2:"border-sky-200 bg-sky-50 text-sky-700",T3:"border-amber-200 bg-amber-50 text-amber-700"},q1={T1:"담당자 이메일까지 확인됨 — 바로 보낼 수 있습니다",T2:"대표 주소(info@ 등)로 보낼 수 있음 — 담당자는 회신에서 확인하세요",T3:"이메일이 없거나 업종이 불확실 — 사람이 확인해야 합니다"},Q1={pending:"미발송",sent:"발송됨",replied:"회신",bounced:"반송",skipped:"제외"};function HR({campaignId:t,myRole:s="owner"}){const c=s==="owner"||s==="sender"||s==="editor",{data:r,isLoading:i}=q.gateway.candidates.list.useQuery({campaignId:t}),{data:o}=q.gateway.candidates.duplicates.useQuery({campaignId:t}),{data:u}=q.gateway.prospect.status.useQuery({campaignId:t},{refetchInterval:Z=>Z.state.data?.latest?.status==="running"?5e3:!1}),{data:m}=q.gateway.prospect.items.useQuery({campaignId:t,decision:"all"},{enabled:u?.latest?.status!=="running"}),[p,f]=v.useState(!1),[b,h]=v.useState(!1),[y,j]=v.useState(null),[S,N]=v.useState("all"),[w,T]=v.useState("ALL"),[k,E]=v.useState(new Set),[z,_]=v.useState(""),{data:R}=q.gateway.campaigns.autoSetupStatus.useQuery({id:t}),P=R?.targetCount??null,A=tS(z,P),V=aS(z,P),H=q.useUtils(),M=q.gateway.candidates.remove.useMutation({onSuccess:()=>
668H.gateway.candidates.list.invalidate({campaignId:t}),onError:Z=>X.error(Z.message)}),B=q.gateway.candidates.update.useMutation({onSuccess:()=>{H.gateway.candidates.list.invalidate({campaignId:t}),H.gateway.send.preflight.invalidate()},onError:Z=>X.error(Z.message)}),I=q.gateway.candidates.bulkUpdate.useMutation({onSuccess:Z=>{H.gateway.candidates.list.invalidate({campaignId:t}),H.gateway.campaigns.activity.invalidate({id:t}),H.gateway.send.preflight.invalidate(),E(new Set),X.success(`${Z.updated}건을 수정했습니다.`)},onError:Z=>X.error(Z.message)}),ie=q.gateway.candidates.bulkRemove.useMutation({onSuccess:Z=>{H.gateway.candidates.list.invalidate({campaignId:t}),H.gateway.campaigns.activity.invalidate({id:t}),E(new Set),X.success(`${Z.removed}건을 삭제했습니다.`)},onError:Z=>X.error(Z.message)}),se=q.gateway.candidates.revalidate.useMutation({onSuccess:Z=>{H.gateway.candidates.list.invalidate({campaignId:t}),H.gateway.send.preflight.invalidate(),X.success(Z.changed===0?`${Z.checked}건을 다시 확인했습니다. 바뀐 판정은 없습니다.`:`${Z.checked}건 중 ${Z.changed}건의 판정이 바뀌었습니다.`),Z.unreachable>0&&X.warning(`${Z.unreachable}건은 도메인이 없어져 보내면 반송됩니다. 확인 필요 목록에서 확인하세요.`)},onError:Z=>X.error(Z.message)}),L=q.gateway.candidates.fillEmails.useMutation({onSuccess:Z=>{H.gateway.candidates.list.invalidate({campaignId:t}),H.gateway.campaigns.activity.invalidate({id:t}),H.gateway.send.preflight.invalidate(),Z.tried===0?X.info(Z.noSite>0?`이메일이 빈 후보 ${Z.noSite}건은 홈페이지 주소도 없어 찾을 수 없습니다.`:"이메일이 비어 있는 후보가 없습니다."):Z.filled===0?X.warning(`${Z.tried}곳의 홈페이지를 열어봤지만 공개된 이메일이 없었습니다. 문의폼을 이용하세요.`):X.success(`${Z.tried}곳 중 ${Z.filled}곳에서 이메일을 찾았습니다.`)},onError:Z=>X.error(Z.message)}),F=q.gateway.prospect.run.useMutation({onSuccess:Z=>{H.gateway.prospect.items.invalidate({campaignId:t,decision:"pending"}),H.gateway.prospect.status.invalidate({campaignId:t}),H.gateway.campaigns.activity.invalidate({id:t}),X.success(`${Z.tracks}갈래로 나눠 조사를 시작했습니다. 창을 닫아도 계속 진행되며, 공식 홈페이지·뷰티·이메일을 검증한 뒤 글로벌 DB와 이 캠페인에 자동 반영합니다.`)},onMutate:()=>{H.gateway.prospect.status.invalidate({campaignId:t})},onError:Z=>X.error(Z.message)}),W=F.isPending||u?.latest?.status==="running",ce=u?.latest?.trackTotal??0,ge=u?.latest?.trackDone??0,[O,te]=v.useState(()=>Date.now()),Y=u?.latest?.status==="running";v.useEffect(()=>{if(!Y)return;te(Date.now());const Z=setInterval(()=>te(Date.now()),1e3);return()=>clearInterval(Z)},[Y]);const ne=u?.latest?.createdAt?new Date(u.latest.createdAt).getTime():O,pe=AR(zR(V)),be=v.useRef(!1),le=u?.latest?.status==="running";v.useEffect(()=>{if(be.current&&!le){const Z=u?.latest;if(Z?.status==="failed")X.error(`조사가 중간에 멈췄습니다. ${Z.note??""}`.trim());else if(Z){const Se=Z.keptCount??0;if(Se===0)X.warning("새로 찾은 후보가 없습니다. 이미 등록된 곳이거나 조건에 맞는 곳을 찾지 못했습니다.");else{const Ft=Z.campaignAddedCount??0,ht=Z.autoRejectedCount??0,qa=Z.autoFailedCount??0;X.success(`조사 ${Se}곳 · 캠페인 자동 추가 ${Ft}곳 · 제외 ${ht}곳`+(qa>0?` · 실패 ${qa}곳`:""))}}H.gateway.prospect.items.invalidate({campaignId:t,decision:"pending"}),H.gateway.prospect.items.invalidate({campaignId:t,decision:"all"}),H.gateway.candidates.list.invalidate({campaignId:t})}be.current=le},[le,u?.latest,t,H]);const he=(r??[]).reduce((Z,Se)=>(Se.emailCheck.allowed&&(Z.sendable+=1),Se.emailCheck.verdict==="template_junk"&&(Z.junk+=1),Se.email||(Z.noEmail+=1),Z),{sendable:0,junk:0,noEmail:0}),Pe=v.useMemo(()=>{const Z=u?.latest?.id;return Z?(m??[]).filter(Se=>Se.runId===Z&&Se.automationStatus!=="pending").slice(0,8):[]},[m,u?.latest?.id]),Re=v.useMemo(()=>{let Z=r??[];return S==="sendable"?Z=Z.filter(Se=>Se.emailCheck.allowed&&Se.sendStatus==="pending"):S==="problem"?Z=Z.filter(Se=>!Se.emailCheck.allowed):S==="sent"&&(Z=Z.filter(Se=>Se.sendStatus!=="pending")),w==="READY"?Z=Z.filter(Se=>Se.tier==="T1"||Se.tier==="T2"):w!=="ALL"&&(Z=Z.filter(Se=>Se.tier===w)),Z},[r,S,w]),Q=v.useMemo(()=>{const Z={};for(const Se of r??[])Z[Se.tier]=(Z[Se.tier]??0)+1;return Z},[r]),xe=v.useMemo(()=>NR(o??[]),[o]),Le=Z=>E(Se=>{const Ft=new Set(Se);return Ft.has(Z)?Ft.delete(Z):Ft.add(Z),Ft}),Ue=Re.length>0&&Re.every(Z=>k.has(Z.id)),Ye=()=>{const Z=["등급","등급 뜻","회사명","홈페이지","이메일","이메일 판정","담당자","카테고리","규모","규모 근거","도시","진행 상태","선택 이유"],Se=Ke=>`"${(Ke??"").replace(/"/g,'""')}"`,Ft=Ke=>Ke.sizeTier==="unknown"?"확인 필요":qi[Ke.sizeTier].short,ht=[Z.join(","),...Re.map(Ke=>[Se(Ke.tier),Se(q1[Ke.tier]??""),Se(Ke.companyName),Se(Ke.website),Se(Ke.email),Se($1[Ke.emailCheck.verdict].label),Se(Ke.contactPerson),Se(Ke.categories),Se(Ft(Ke)),Se(Ke.sizeEvidence),Se(Ke.city),Se(Q1[Ke.sendStatus]??Ke.sendStatus),Se(Ke.reason)].join(","))],qa=new Blob(["\uFEFF"+ht.join(`
669`)],{type:"text/csv;charset=utf-8;"}),On=URL.createObjectURL(qa),Ut=document.createElement("a");Ut.href=On;const Cs=new Date().toISOString().slice(0,10);Ut.download=`유통사후보_${t}_${Cs}.csv`,Ut.click(),URL.revokeObjectURL(On)};return e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:472",className:"space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:473",className:"flex flex-wrap items-center justify-between gap-4 roun
669ded-2xl border border-border/80 bg-white/92 p-4 shadow-[0_16px_40px_-34px_rgba(18,35,61,.5)] backdrop-blur-sm",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:474",className:"flex flex-wrap gap-2 text-xs",children:[e.jsx(dn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:475",label:"전체",value:r?.length??0}),e.jsx(dn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:476",label:"발송 가능",value:he.sendable,tone:"ok"}),he.junk>0&&e.jsx(dn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:477",label:"템플릿 예시",value:he.junk,tone:"bad"}),he.noEmail>0&&e.jsx(dn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:478",label:"이메일 없음",value:he.noEmail})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:480",className:"flex flex-wrap gap-2",children:[e.jsx(BR,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:481",campaignId:t,disabled:!c}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:486",className:"flex items-center rounded-xl border border-primary/20 bg-white shadow-[0_8px_24px_-20px_rgba(37,99,235,.65)]",children:[e.jsxs(yn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:491",children:[e.jsx(jn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:492",asChild:!0,children:e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:493",className:"flex items-center gap-1 pl-2.5 pr-1",children:[e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:494",type:"number",min:5,max:300,value:A,disabled:W,onChange:Z=>_(Z.target.value),onBlur:()=>{_(String(V))},className:"h-8 w-[58px] border-0 px-1 text-center text-xs shadow-none focus-visible:ring-0","aria-label":"찾을 개수"}),e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:508",className:"text-xs text-muted-foreground",children:"ê³³"})]})}),e.jsxs(Nn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:511",className:"max-w-xs",children:["찾을 개수 (5~300). 이 숫자에 맞춰 지역·업종을 여러 갈래로 나눠 동시에 조사합니다. 많이 요청하면 갈래가 늘어 시간이 더 걸립니다.",pe?` 지금 값이면 ${pe} 걸립니다.`:"",R?.targetCount?` 캠페인을 만들 때 ${R.targetCount}곳으로 정했으니 ê·¸ 값을 그대로 씁니다.`:" ê·¸ 나라에 실제로 존재하는 회사 수가 상한이므로, 요청보다 적게 나올 수 있습니다."]})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:520",className:"h-5 w-px bg-border"}),e.jsxs(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:521",size:"sm",className:"gap-1.5 rounded-l-none border-0",disabled:W,onClick:()=>F.mutate({campaignId:t,targetCount:V}),children:[e.jsx(Dt,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:529",className:`size-3.5 ${W?"animate-pulse":""}`}),W?"찾는 중…":"유통사 찾기"]})]}),e.jsxs(hn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:533",children:[e.jsx(bn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:534",asChild:!0,children:e.jsxs(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:535",variant:"outline",size:"sm",className:"gap-1 bg-background",children:["더보기",e.jsx(ns,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:537",className:"size-3.5"})]})}),e.jsxs(vn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:540",align:"end",className:"w-56",children:[e.jsxs(Da,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:541",disabled:L.isPending||he.noEmail===0,onClick:()=>L.mutate({campaignId:t}),children:[e.jsx(An,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:545",className:"mr-2 size-3.5"}),"이메일 없는 ê³³ 홈페이지 확인",he.noEmail>0&&e.jsxs("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:548",className:"ml-auto text-xs text-muted-foreground",children:[he.noEmail,"ê³³"]})]}),e.jsxs(Da,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:553",disabled:se.isPending||(r?.length??0)===0,onClick:()=>se.mutate({campaignId:t}),children:[e.jsx(vl,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:557",className:"mr-2 size-3.5"}),"이메일 다시 검사"]}),e.jsxs(Da,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:560",onClick:()=>f(!0),children:[e.jsx(vs,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:561",className:"mr-2 size-3.5"}),"직접 한 ê³³ 추가"]}),e.jsxs(Da,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:564",onClick:()=>h(!0),children:[e.jsx(u1,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:565",className:"mr-2 size-3.5"}),"엑셀에서 붙여넣기"]}),e.jsxs(Da,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:568",disabled:Re.length===0,onClick:Ye,children:[e.jsx(to,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:569",className:"mr-2 size-3.5"}),"CSV로 내보내기"]})]})]})]})]}),F.isPending||u?.latest?.status==="running"?e.jsx(LR,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:579",status:"running",trackTotal:ce,trackDone:ge,marketTotal:u?.latest?.marketTotal??0,marketDone:u?.latest?.marketDone??0,trackFailures:u?.latest?.trackFailures??0,startedAt:ne,now:O,lastTickAt:u?.latest?.lastTickAt?new Date(u.latest.lastTickAt).getTime():null,foundCount:u?.latest?.foundCount}):e.jsxs(e.Fragment,{children:[u?.latest?.status==="done"&&(u.latest.keptCount??0)>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:599",className:"rounded-2xl border border-emerald-200 bg-emerald-50/70 p-4 text-sm text-emerald-950",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:600",className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:601",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:602",className:"font-semibold",children:"자동 검증과 반영이 끝났습니다"}),e.jsx("p",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:603",className:"mt-1 text-xs leading-relaxed text-emerald-800",children:"공식 홈페이지·회사 일치·뷰티 관련성·공개 이메일/MX를 모두 확인한 곳만 글로벌 DB와 이 캠페인에 넣었습니다. 제외·실패 항목은 조사 이력에 근거와 함께 남습니다."})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:608",className:"flex flex-wrap gap-2 text-xs",children:[e.jsx(dn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:609",label:"DB 신규",value:u.latest.globalDbCreatedCount??0,tone:"ok"}),e.jsx(dn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:610",label:"기존 통합",value:u.latest.globalDbMatchedCount??0}),e.jsx(dn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:611",label:"캠페인 추가",value:u.latest.campaignAddedCount??0,tone:"ok"}),e.jsx(dn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:612",label:"제ì
669™¸",value:u.latest.autoRejectedCount??0}),(u.latest.autoFailedCount??0)>0&&e.jsx(dn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:614",label:"실패",value:u.latest.autoFailedCount??0,tone:"bad"})]})]}),Pe.length>0&&e.jsxs("details",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:619",className:"mt-3 border-t border-emerald-200/80 pt-3",children:[e.jsxs("summary",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:620",className:"cursor-pointer text-xs font-semibold text-emerald-900",children:["최근 자동 처리 근거 보기 (",Pe.length,"ê±´)"]}),e.jsx("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:623",className:"mt-2 space-y-2",children:Pe.map(Z=>e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:625",className:"rounded-lg bg-white/75 px-3 py-2 text-xs",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:626",className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:627",className:"font-medium",children:Z.companyName}),e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:628",className:"rounded-full border border-emerald-200 px-2 py-0.5 text-[11px]",children:Z.automationStatus==="added"?"DB 신규":Z.automationStatus==="duplicate"?"기존 통합":Z.automationStatus==="rejected"?"제외":"실패"})]}),e.jsx("p",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:638",className:"mt-1 leading-relaxed text-emerald-800",children:Z.automationNote||Z.reviewNotes||"처리 근거가 없습니다."})]},Z.id))})]})]}),u?.latest&&(u.pendingCount??0)===0&&u.latest.keptCount===0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:652",className:"flex items-start gap-3 rounded-xl border border-amber-200 bg-amber-50 px-4 py-3.5",children:[e.jsx(St,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:653",className:"mt-0.5 size-4 shrink-0 text-amber-600"}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:654",className:"text-sm",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:655",className:"font-medium text-amber-900",children:u.latest.status==="failed"?"발굴이 중간에 멈췄습니다":"쓸 만한 후보를 찾지 못했습니다"}),e.jsx("p",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:660",className:"mt-0.5 text-xs leading-relaxed text-amber-800",children:u.latest.note??"검색 결과가 조건에 맞지 않았습니다. 제품 정보(카테고리·납품 채널)를 채우면 검색 질의가 정확해집니다."})]})]}),e.jsx(kR,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:667",campaignId:t})]}),(r?.length??0)>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:673",className:"flex flex-wrap items-center gap-1.5 rounded-2xl border border-border/70 bg-white/75 p-3 shadow-[0_12px_34px_-30px_rgba(18,35,61,.45)]",children:[[["all","전체"],["sendable","발송 가능"],["problem","확인 필요"],["sent","발송 완료"]].map(([Z,Se])=>e.jsx("button",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:682",onClick:()=>N(Z),className:`rounded-full border px-3 py-1.5 text-xs font-medium transition-all active:scale-[0.97] ${S===Z?"border-primary bg-primary text-primary-foreground":"bg-background hover:bg-accent"}`,children:Se},Z)),e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:694",className:"mx-1 h-5 w-px bg-border"}),[["ALL","등급 전체"],["READY","보낼 수 있는 ê³³"],["T1","T1 담당자 확인"],["T2","T2 대표 주소"],["T3","T3 확인 필요"]].map(([Z,Se])=>e.jsxs("button",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:704",onClick:()=>T(Z),className:`flex items-center gap-1 rounded-full border px-3 py-1.5 text-xs font-medium transition-all active:scale-[0.97] ${w===Z?"border-primary bg-primary text-primary-foreground":"bg-background hover:bg-accent"}`,children:[Se,Z!=="ALL"&&e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:715",className:"tnum opacity-70",children:Z==="READY"?(Q.T1??0)+(Q.T2??0):Q[Z]??0})]},Z))]}),(r?.length??0)>0&&(Q.T1??0)===0&&(Q.T2??0)>0&&e.jsxs("p",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:732",className:"text-xs leading-relaxed text-muted-foreground",children:["T1(담당자 확인)이 없는 것은 정상입니다. 담당자 이름을 홈페이지에 공개하는 회사는 드물기 때문입니다. 대표 주소로 보내는 T2"," ",e.jsxs("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:735",className:"tnum font-medium text-foreground",children:[Q.T2??0,"ê³³"]}),"이 실제 발송 대상이고, 회신이 오면 담당자를 알게 됩니다."]}),k.size>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:742",className:"flex flex-wrap items-center gap-2 rounded-xl border border-primary/40 bg-primary/5 p-3",children:[e.jsxs("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:743",className:"text-sm font-medium",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:744",className:"tnum",children:k.size}),"ê±´ 선택됨"]}),e.jsxs(hn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:746",children:[e.jsx(bn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:747",asChild:!0,children:e.jsxs(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:748",variant:"outline",size:"sm",className:"gap-1 bg-background",children:["등급 변경",e.jsx(ns,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:750",className:"size-3.5"})]})}),e.jsx(vn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:753",align:"start",children:["T1","T2","T3"].map(Z=>e.jsxs(Da,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:755",onClick:()=>I.mutate({campaignId:t,ids:Array.from(k),tier:Z}),children:[Z,"로 변경"]},Z))})]}),e.jsxs(hn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:770",children:[e.jsx(bn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:771",asChild:!0,children:e.jsxs(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:772",variant:"outline",size:"sm",className:"gap-1 bg-background",children:["상태 변경",e.jsx(ns,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:774",className:"size-3.5"})]})}),e.jsx(vn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:777",align:"start",children:[["pending","미발송으로"],["sent","발송됨으로"],["replied","회신 받음으로"],["bounced","반송으로"],["skipped","제외로"]].map(([Z,Se])=>e.jsx(Da,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:787",onClick:()=>I.mutate({campaignId:t,ids:Array.from(k),sendStatus:Z}),children:Se},Z))})]}),e.jsx(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:802",variant:"ghost",size:"sm",className:"text-destructive",onClick:()=>{confirm(`선택한 ${k.size}건을 삭제할까요?`)&&ie.mutate({campaignId:t,ids:Array.from(k)})},children:"삭제"}),e.jsx(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:814",variant:"ghost",size:"sm",className:"ml-auto",onClick:()=>E(new Set),children:"선택 해제"})]}),i?e.jsx("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:826",className:"space-y-2",children:Array.from({length:4}).map((Z,Se)=>e.jsx(we,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:828",className:"h-16 rounded-lg"},Se))}):(r?.length??0)===0?e.jsx(En,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:832",icon:e.jsx(zu,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:833",className:"size-8"}),title:"후보가 없습니다",description:(u?.pendingCount??0)>0?"위 검수 대기 목록에서 승인하면 후보로 등록됩니다.":"자동 발굴을 누르면 현지 유통사를 찾고 공식 홈페이지·뷰티 관련성·공개 이메일을 검증해 글로벌 DB와 현재 캠페인에 자동 추가합니다. 검증되지 않은 곳은 조사 이력에만 남습니다.",action:(u?.pendingCount??0)>0?void 0:e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:842",className:"flex flex-wrap justify-center gap-2",children:[e.jsxs(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:843",className:"gap-1.5",disabled:F.isPending,onClick:()=>F.mutate({campaignId:t}),children:[e.jsx(Dt,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:848",className:"size-4"}),"자동으로 후보 찾기"]}),e.jsxs(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:851",variant:"outline",className:"gap-1.5 bg-background",onClick:()=>h(!0),children:[e.jsx(u1,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:856",className:"size-4"}),"엑셀에서 붙여넣기"]})]})}):e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:864",className:"overflow-x-auto rounded-2xl border border-border/80 bg-white/96 shadow-[0_18px_48px_-34px_rgba(18,35,61,.55)]",children:[e.jsxs("table",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:865",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:866",className:"sticky top-0 z-10 bg-slate-50/95 backdrop-blur-sm",children:e.jsxs("tr",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:867",className:"text-left",children:[e.jsx("th",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:868",className:"w-10 px-3 py-2.5",children:e.jsx($a,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:869",checked:Ue,onCheckedChange:Z=>E(Z?new Set(Re.map(Se=>Se.id)):new Set),"aria-label":"전체 선택"})}),e.jsx(oc,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:879",children:"회사"}),e.jsx(oc,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:880",children:"이메일"}),e.jsx(oc,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:881",children:"판정"}),e.jsx(oc,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:882",children:"카테고리"}),e.jsx(oc,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:883",children:"규모"}),e.jsx(oc,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:884",children:"등급"}),e.jsx(oc,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:885",children:"발송"}),e.jsx(oc,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:886"})]})}),e.jsx("tbody",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:889",children:Re.map(Z=>{const Se=$1[Z.emailCheck.verdict],Ft=Z.email?xe.get(Z.email.trim().toLowerCase()):void 0;return e.jsxs("tr",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:896",className:"border-t border-border/70 transition-colors hover:bg-primary/[0.035]",children:[e.jsx("td",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:897",className:"px-3 py-2.5",children:e.jsx($a,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:898",checked:k.has(Z.id),onCheckedChange:()=>Le(Z.id),"aria-label":`${Z.companyName} 선택`})}),e.jsxs("td",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:904",className:"px-3 py-2.5",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:905",className:"flex items-center gap-1.5 font-medium",children:[Z.companyName,Ft&&e.jsxs(yn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:908",children:[e.jsx(jn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:909",asChild:!0,children:e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:910",className:"text-amber-600",children:e.jsx(St,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:911",className:"size-3.5"})})}),e.jsxs(Nn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:914",className:"max-w-xs",children:["이미 접촉한 이메일입니다: ",Ft.join(", ")
669]})]})]}),Z.city&&e.jsx("p",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:921",className:"text-xs text-muted-foreground",children:Z.city}),Z.website?e.jsxs("a",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:924",href:Z.website.startsWith("http")?Z.website:`https://${Z.website}`,target:"_blank",rel:"noreferrer",className:"mt-0.5 inline-flex max-w-[16rem] items-center gap-1 text-xs text-primary hover:underline",title:Z.website,children:[e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:935",className:"truncate",children:eS(Z.website)}),e.jsx(yc,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:936",className:"size-3 shrink-0"})]}):e.jsx("p",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:939",className:"mt-0.5 text-xs text-muted-foreground",children:"홈페이지 없음"})]}),e.jsx("td",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:944",className:"px-3 py-2.5",children:e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:945",className:"font-mono text-xs",children:Z.email||"—"})}),e.jsx("td",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:947",className:"px-3 py-2.5",children:e.jsxs(yn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:948",children:[e.jsx(jn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:949",asChild:!0,children:e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:950",className:`inline-block rounded-full border px-2 py-0.5 text-xs font-medium ${Se.className}`,children:Se.label})}),e.jsx(Nn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:956",className:"max-w-xs",children:Z.emailCheck.message})]})}),e.jsx("td",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:961",className:"px-3 py-2.5",children:Z.categories?e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:963",className:"line-clamp-2 max-w-[11rem] text-xs text-muted-foreground",title:Z.categories,children:Z.categories}):e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:970",className:"text-xs text-muted-foreground",children:"—"})}),e.jsx("td",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:973",className:"px-3 py-2.5",children:e.jsx(UR,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:974",tier:Z.sizeTier,evidence:Z.sizeEvidence})}),e.jsx("td",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:979",className:"px-3 py-2.5",children:e.jsxs(hn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:980",children:[e.jsx(bn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:981",asChild:!0,children:e.jsx("button",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:982",className:`tnum rounded-md border px-2 py-0.5 text-xs font-medium transition-colors hover:opacity-80 ${IR[Z.tier]??"bg-background"}`,title:q1[Z.tier]??"",children:Z.tier})}),e.jsx(vn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:991",align:"start",children:["T1","T2","T3"].map(ht=>e.jsx(Da,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:993",onClick:()=>B.mutate({id:Z.id,campaignId:t,tier:ht}),children:ht},ht))})]})}),e.jsx("td",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1009",className:"px-3 py-2.5",children:e.jsxs(hn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1010",children:[e.jsx(bn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1011",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1012",className:"flex items-center gap-1 rounded-md border bg-background px-2 py-0.5 text-xs font-medium transition-colors hover:bg-accent",children:[Q1[Z.sendStatus]??Z.sendStatus,e.jsx(ns,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1014",className:"size-3 opacity-60"})]})}),e.jsx(vn,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1017",align:"start",children:[["pending","미발송"],["sent","발송됨"],["replied","회신 받음"],["bounced","반송"],["skipped","제외"]].map(([ht,qa]
669)=>e.jsx(Da,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1027",onClick:()=>B.mutate({id:Z.id,campaignId:t,sendStatus:ht}),children:qa},ht))})]})}),e.jsxs("td",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1043",className:"px-3 py-2.5",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1044",variant:"ghost",size:"icon",className:"size-7 text-muted-foreground",onClick:()=>j(Z),children:e.jsx(Pg,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1050",className:"size-3.5"})}),e.jsx(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1052",variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:text-destructive",onClick:()=>M.mutate({id:Z.id,campaignId:t}),children:e.jsx(Hs,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1058",className:"size-3.5"})})]})]},Z.id)})})]}),Re.length===0&&e.jsx("p",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1067",className:"px-3 py-8 text-center text-sm text-muted-foreground",children:"이 조건에 맞는 후보가 없습니다."})]}),e.jsx(qR,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1074",campaignId:t,open:p,onOpenChange:f}),e.jsx(QR,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1075",campaignId:t,open:b,onOpenChange:h}),e.jsx($R,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1076",campaignId:t,candidate:y,onOpenChange:Z=>!Z&&j(null)})]})}function $R({campaignId:t,candidate:s,onOpenChange:c}){const r=q.useUtils(),[i,o]=v.useState({companyName:"",website:"",email:"",contactPerson:"",city:"",reason:"",categories:"",channel:"",tier:"T3",sendStatus:"pending"});v.useEffect(()=>{s&&o({companyName:s.companyName??"",website:s.website??"",email:s.email??"",contactPerson:s.contactPerson??"",city:s.city??"",reason:s.reason??"",categories:s.categories??"",channel:s.channel??"",tier:s.tier??"T3",sendStatus:s.sendStatus??"pending"})},[s]);const u=q.gateway.candidates.update.useMutation({onSuccess:()=>{r.gateway.candidates.list.invalidate({campaignId:t}),X.success("후보 정보를 수정했습니다."),c(!1)},onError:p=>X.error(p.message)}),m=p=>f=>o(b=>({...b,[p]:f}));return e.jsx(ta,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1138",open:!!s,onOpenChange:c,children:e.jsxs(aa,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1139",className:"max-h-[85vh] overflow-y-auto sm:max-w-lg",children:[e.jsxs(sa,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1140",children:[e.jsx(na,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1141",children:"후보 수정"}),e.jsx(ca,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1142",children:"이메일을 바꾸면 저장할 때 그 나라 규칙으로 다시 검증합니다. 회신이 오면 상태를 바꿔 두면 발송 대상에서 자동으로 빠집니다."})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1147",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1148",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1149",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1150",className:"text-sm",children:"등급"}),e.jsxs(et,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1151",value:i.tier,onValueChange:p=>o(f=>({...f,tier:p})),children:[e.jsx(at,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1155",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1156"})}),e.jsxs(st,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1158",children:[e.jsx(ve,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1159",value:"T1",children:"T1 — 최우선"}),e.jsx(ve,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1160",value:"T2",children:"T2 — 가능성 있음"}),e.jsx(ve,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1161",value:"T3",children:"T3 — 보류"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1165",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1166",className:"text-sm",children:"진행 상태"}),e.jsxs(et,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1167",value:i.sendStatus,onValueChange:p=>o(f=>({...f,sendStatus:p})),children:[e.jsx(at,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1171",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1172"})}),e.jsxs(st,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1174",children:[e.jsx(ve,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1175",value:"pending",children:"미발송"}),e.jsx(ve,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1176",value:"sent",children:"발송됨"}),e.jsx(ve,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1177",value:"replied",children:"회신 받음"}),e.jsx(ve,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1178",value:"bounced",children:"반송"}),e.jsx(ve,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1179",value:"skipped",children:"제외"})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1184",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1185",className:"text-sm",children:"회사명"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1186",value:i.companyName,onChange:p=>m("companyName")(p.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1191",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1192",className:"text-sm",children:"홈페이지"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1193",value:i.website,onChange:p=>m("website")(p.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1195",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1196",className:"text-sm",children:"이메일"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1197",value:i.email,onChange:p=>m("email")(p.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1199",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1200",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1201",className:"text-sm",children:"담당자"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1202",value:i.contactPerson,onChange:p=>m("contactPerson")(p.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1207",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1208",className:"text-sm",children:"도시"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1209",value:i.city,onChange:p=>m("city")(p.target.value)})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1212",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1213",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1214",className:"text-sm",children:"취급 카테고리"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1215",value:i.categories,onChange:p=>m("categories")(p.target.value),placeholder:"예: 필링, 더마코스메틱"})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1221",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1222",className:"text-sm",children:"납품 채널"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1223",value:i.channel,onChange:p=>m("channel")(p.target.value),placeholder:"예: 피부과 클리닉"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1230",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1231",className:"text-sm",children:"선택 이유"}),e.jsx(pt,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1232",rows:2,value:i.reason,onChange:p=>m("reason")(p.target.value)})]})]}),e.jsxs(_a,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1239",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1240",variant:"outline",className:"bg-background",onClick:()=>c(!1),children:"취소"}),e.jsx(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1247",disabled:!s||!i.companyName.trim()||u.isPending,onClick:()=>s&&u.mutate({id:s.id,campaignId:t,companyName:i.companyName.trim(),website:i.website.trim(),email:i.email.trim(),contactPerson:i.contactPerson.trim(),city:i.city.trim(),reason:i.reason,categories:i.categories.trim(),channel:i.channel.trim(),tier:i.tier,sendStatus:i.sendStatus}),children:"저장"})]})]})})}function oc({children:t}){return e.jsx("th",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1282",className:"px-3 py-3 text-[0.68rem] font-bold uppercase tracking-[0.06em] text-muted-foreground",children:t})}function dn({label:t,value:s,tone:c}){const r=c==="ok"?"bg-emerald-50 text-emerald-700":c==="bad"?"bg-rose-50 text-rose-700":"bg-muted text-muted-foreground";return e.jsxs("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1304",className:`rounded-lg border border-current/10 px-2.5 py-1.5 font-semibold shadow-[0_1px_2px_rgba(18,35,61,.04)] ${r}`,children:[t," ",e.jsx("span",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1305",className:"tnum font-bold",children:s})]})}function qR({campaignId:t,open:s,onOpenChange:c}){const r=q.useUtils(),[i,o]=v.useState({companyName:"",website:"",email:"",contactPerson:"",city:"",reason:""}),u=q.gateway.candidates.create.useMutation({onSuccess:p=>
669{r.gateway.candidates.list.invalidate({campaignId:t}),p.emailCheck.allowed?X.success("후보를 추가했습니다."):X.warning(p.emailCheck.message),c(!1),o({companyName:"",website:"",email:"",contactPerson:"",city:"",reason:""})},onError:p=>X.error(p.message)}),m=p=>f=>o(b=>({...b,[p]:f}));return e.jsx(ta,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1354",open:s,onOpenChange:c,children:e.jsxs(aa,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1355",className:"sm:max-w-md",children:[e.jsxs(sa,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1356",children:[e.jsx(na,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1357",children:"후보 추가"}),e.jsx(ca,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1358",children:"회사명만 있어도 저장됩니다. 이메일을 넣으면 즉시 검증합니다."})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1362",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1363",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1364",className:"text-sm",children:"회사명 *"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1365",value:i.companyName,onChange:p=>m("companyName")(p.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1370",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1371",className:"text-sm",children:"홈페이지"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1372",value:i.website,onChange:p=>m("website")(p.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1374",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1375",className:"text-sm",children:"이메일"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1376",value:i.email,onChange:p=>m("email")(p.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1378",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1379",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1380",className:"text-sm",children:"담당자"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1381",value:i.contactPerson,onChange:p=>m("contactPerson")(p.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1386",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1387",className:"text-sm",children:"도시"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1388",value:i.city,onChange:p=>m("city")(p.target.value)})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1391",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1392",className:"text-sm",children:"선택 이유"}),e.jsx(pt,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1393",rows:2,value:i.reason,onChange:p=>m("reason")(p.target.value),placeholder:"예: 에스테틱 전용 유통, 필링 라인 이미 취급"})]})]}),e.jsxs(_a,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1401",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1402",variant:"outline",className:"bg-background",onClick:()=>c(!1),children:"취소"}),e.jsx(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1409",disabled:!i.companyName.trim()||u.isPending,onClick:()=>u.mutate({campaignId:t,companyName:i.companyName.trim(),website:i.website.trim()||void 0,email:i.email.trim()||void 0,contactPerson:i.contactPerson.trim()||void 0,city:i.city.trim()||void 0,reason:i.reason.trim()||void 0}),children:"추가"})]})]})})}function QR({campaignId:t,open:s,onOpenChange:c}){const r=q.useUtils(),[i,o]=v.useState(""),u=v.useRef(null),m=q.gateway.candidates.importBulk.useMutation({onSuccess:b=>
669{r.gateway.candidates.list.invalidate({campaignId:t}),X.success(`${b.count}건 추가${b.junk>0?` · 템플릿 예시 주소 ${b.junk}건 발견`:""}`),c(!1),o("")},onError:b=>X.error(b.message)}),f=i.split(`
670`).map(h=>h.trim()).filter(Boolean).map(h=>{const y=h.split(/\t|,(?=(?:[^"]*"[^"]*")*[^"]*$)/).map(j=>j.trim().replace(/^"|"$/g,""));return{companyName:y[0]??"",website:y[1]||void 0,email:y[2]||void 0,city:y[3]||void 0,reason:y[4]||void 0}}).filter(h=>h.companyName);return e.jsx(ta,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1480",open:s,onOpenChange:c,children:e.jsxs(aa,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1481",className:"sm:max-w-lg",children:[e.jsxs(sa,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1482",children:[e.jsx(na,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1483",children:"후보 일괄 등록"}),e.jsx(ca,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1484",children:"엑셀에서 복사해 붙이거나 CSV 파일을 올리세요. 한 줄에 한 회사, 열 순서는 회사명 · 홈페이지 · 이메일 · 도시 · 선택이유입니다."})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1489",children:[e.jsx("input",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1490",ref:u,type:"file",accept:".csv,.tsv,.txt",className:"hidden",onChange:b=>{const h=b.target.files?.[0];if(!h)return;const y=new FileReader;y.onload=()=>{const S=String(y.result??"").split(`
671`),N=(S[0]??"").toLowerCase(),w=N.includes("company")||N.includes("회사")||N.includes("email");o((w?S.slice(1):S).join(`
672`)),X.success(`${h.name} 을 불러왔습니다. 내용을 확인하세요.`)},y.readAsText(h),b.target.value=""}}),e.jsxs(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1515",variant:"outline",size:"sm",className:"gap-1.5 bg-background",onClick:()=>u.current?.click(),children:[e.jsx(Eg,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1521",className:"size-3.5"}),"CSV 파일 올리기"]})]}),e.jsx(pt,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1525",rows:10,value:i,onChange:b=>o(b.target.value),className:"font-mono text-xs",placeholder:"Bella Estetica	https://bella.com.br	[email protected]	São Paulo	에스테틱 전용 유통"}),f.length>0&&e.jsxs("p",{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1533",className:"text-xs text-muted-foreground",children:[f.length,"건이 인식되었습니다. 이메일은 저장 시 자동 검증됩니다."]}),e.jsxs(_a,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1537",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1538",variant:"outline",className:"bg-background",onClick:()=>c(!1),children:"취소"}),e.jsxs(G,{"data-loc":"client/src/components/campaign/CandidatesTab.tsx:1545",disabled:f.length===0||m.isPending,onClick:()=>m.mutate({campaignId:t,rows:f}),children:[f.length,"ê±´ 추가"]})]})]})})}const WR={done:{dot:"bg-emerald-500 text-white",label:"text-foreground",value:"text-emerald-700",bar:"bg-emerald-500"},current:{dot:"bg-primary text-primary-foreground ring-4 ring-primary/15",label:"text-foreground font-semibold",value:"text-primary font-semibold",bar:"bg-border"},todo:{dot:"bg-muted text-muted-foreground",label:"text-muted-foreground",value:"text-muted-foreground",bar:"bg-border"},blocked:{dot:"bg-slate-700 text-slate-300",label:"text-slate-400",value:"text-slate-500",bar:"bg-slate-700"}};function VR({campaignId:t,onJump:s}){const{data:c,isPending:r,isError:i}=q.gateway.campaigns.progress.useQuery({id:t},{retry:(o,u)=>u?.data?.code==="UNAUTHORIZED"?!1:o<2});return i?e.jsx("div",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:62",className:"rounded-xl border border-dashed bg-muted/30 px-4 py-3 text-xs leading-relaxed text-muted-foreground",children:"진행 상황을 불러오지 못했습니다. 로그인 상태를 확인하거나 새로고침해 주세요."}):r?e.jsx(we,{"data-loc":"client/src/components/campaign/ProgressBar.tsx:67",className:"h-20 rounded-xl"}):c?e.jsxs("div",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:71",className:"rounded-xl border bg-card p-4",children:[e.jsx("div",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:72",className:"flex items-stretch",children:c.stages.map((o,u)=>{const m=WR[o.state],p=u===c.stages.length-1;return e.jsx("div",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:77",className:"flex min-w-0 flex-1 items-start",children:e.jsxs("button",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:78",onClick:()=>s(o.tab),className:"group min-w-0 flex-1 text-left transition-opacity hover:opacity-80 active:scale-[0.98]",children:[e.jsxs("span",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:82",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:83",className:`tnum flex size-6 shrink-0 items-center justify-center rounded-full text-[11px] font-bold transition-all ${m.dot}`,children:o.state==="done"?e.jsx(Et,{"data-loc":"client/src/components/campaign/ProgressBar.tsx:86",className:"size-3.5"}):u+1}),!p&&e.jsx("span",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:89",className:`h-px flex-1 ${m.bar}`,"aria-hidden":!0})]}),e.jsxs("span",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:92",className:"mt-2 block pr-2",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:93",className:`block truncate text-xs ${m.label}`,children:o.label}),e.jsx("span",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:96",className:`tnum block truncate text-xs ${m.value}`,children:o.value})]})]})},o.key)})}),e.jsxs("button",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:106",onClick:()=>{const o=c.stages.find(u=>u.state==="current");o&&s(o.tab)},disabled:!c.currentKey,className:"mt-3 flex w-full items-center gap-2 rounded-lg border border-dashed bg-muted/30 px-3 py-2.5 text-left text-xs leading-relaxed text-muted-foreground transition-colors hover:bg-muted/60 disabled:cursor-default disabled:hover:bg-muted/30",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/ProgressBar.tsx:114",className:"min-w-0 flex-1",children:c.nextHint}),c.currentKey&&e.jsx(ss,{"data-loc":"client/src/components/campaign/ProgressBar.tsx:115",className:"size-3.5 shrink-0"})]})]}):null}var dh="Progress",uh=100,[FR]=da(dh),[KR,GR]=FR(dh),rS=v.forwardRef((t,s)=>{const{__scopeProgress:c,value:r=null,max:i,getValueLabel:o=YR,...u}=t;(i||i===0)&&!W1(i)&&console.error(XR(`${i}`,"Progress"));const m=W1(i)?i:uh;r!==null&&!V1(r,m)&&console.error(ZR(`${r}`,"Progress"));const p=V1(r,m)?r:null,f=fu(p)?o(p,m):void 0;return e.jsx(KR,{scope:c,value:p,max:m,children:e.jsx(Ae.div,{"aria-valuemax":m,"aria-valuemin":0,"aria-valuenow":fu(p)?p:void 0,"aria-valuetext":f,role:"progressbar","data-state":oS(p,m),"data-value":p??void 0,"data-max":m,...u,ref:s})})});rS.displayName=dh;var lS="ProgressIndicator",iS=v.forwardRef((t,s)=>{const{__scopeProgress:c,...r}=t,i=GR(lS,c);return e.jsx(Ae.div,{"data-state":oS(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:s})});iS.displayName=lS;function YR(t,s){return`${Math.round(t/s*100)}%`}function oS(t,s){return t==null?"indeterminate":t===s?"complete":"loading"}function fu(t){return typeof t=="number"}function W1(t){return fu(t)&&!isNaN(t)&&t>0}function V1(t,s){return fu(t)&&!isNaN(t)&&t<=s&&t>=0}function XR(t,s){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${s}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${uh}\`.`}function ZR(t,s){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${s}\`. The \`value\` prop must be:
673  - a positive number
674  - less than the value passed to \`max\` (or ${uh} if no \`max\` prop is set)
675  - \`null\` or \`undefined\` if the progress is indeterminate.
676
677Defaulting to \`null\`.`}var JR=rS,e9=iS;function dS({className:t,value:s,...c}){return e.jsx(JR,{"data-loc":"client/src/components/ui/progress.tsx:12","data-slot":"progress",className:Ne("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",t),...c,children:e.jsx(e9,{"data-loc":"client/src/components/ui/progress.tsx:20","data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(s||0)}%)`}})})}const jl=["prospect","culture","draft"],t9={prospect:"유통사 찾기",culture:"현지 문화 조사",draft:"1차 문안 작성"},a9={prospect:"회사를 모으고 홈페이지에서 연락처를 찾고 있습니다",culture:"그 나라의 상관례와 조심할 점을 조사하고 있습니다",draft:"국가 규칙과 제품 사실에 맞춰 문안을 쓰고 있습니다"};function F1(t){return!t||t.finishedAt?!1:jl.some(s=>t.steps[s].state==="waiting"||t.steps[s].state==="running")}function s9(t){return t?jl.every(s=>{const c=t.steps[s].state;return c==="done"||c==="skipped"}):!1}function n9(t){if(!t)return 0;const s=jl.filter(c=>{const r=t.steps[c].state;return r==="done"||r==="skipped"||r==="failed"}).length;return Math.round(s/jl.length*100)}function c9(t){return t?jl.filter(s=>t.steps[s].state==="failed"):[]}const r9={waiting:e.jsx(kg,{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:37",className:"size-4 text-muted-foreground"}),running:e.jsx(jt,{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:38",className:"size-4 animate-spin text-primary"}),done:e.jsx(Et,{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:39",className:"size-4 text-emerald-600"}),failed:e.jsx(yl,{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:40",className:"size-4 text-rose-600"}),skipped:e.jsx(TA,{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:41",className:"size-4 text-muted-foreground"})};function l9({campaignId:t,onFinished:s}){const c=q.useUtils(),{data:r}=q.gateway.campaigns.autoSetupStatus.useQuery({id:t},{refetchInterval:S=>F1(S.state.data??null)?4e3:!1}),i=F1(r??null),o=r?.steps?.prospect?.state==="running",{data:u}=q.gateway.prospect.status.useQuery({campaignId:t},{enabled:!!o,refetchInterval:o?5e3:!1});v.useEffect(()=>{const S=u?.latest?.status;o&&S&&S!=="running"&&c.gateway.campaigns.autoSetupStatus.invalidate({id:t})},[t,o,u?.latest?.status,c]);const[m,p]=v.useState(()=>Date.now());v.useEffect(()=>{if(!o)return;p(Date.now());const S=setInterval(()=>p(Date.now()),1e3);return()=>clearInterval(S)},[o]);const f=u?.latest,b=o&&f?nS({status:"running",trackTotal:f.trackTotal??0,trackDone:f.trackDone??0,startedAt:f.createdAt?new Date(f.createdAt).getTime():m,now:m,lastTickAt:f.lastTickAt?new Date(f.lastTickAt).getTime():null}):null;v.useEffect(()=>
677{r&&!i&&(c.gateway.candidates.list.invalidate(),c.gateway.drafts.list.invalidate(),c.gateway.campaigns.progress.invalidate(),s?.())},[r?.finishedAt,i]);const h=q.gateway.campaigns.retryAutoSetup.useMutation({onSuccess:()=>{X.success("준비를 다시 시작했습니다."),c.gateway.campaigns.autoSetupStatus.invalidate({id:t})},onError:S=>X.error(S.message)});if(!r)return null;const y=c9(r);if(!i&&s9(r)&&y.length===0)return null;const j=n9(r);return e.jsx(Bt,{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:135",className:"border-primary/30 bg-primary/[0.03]",children:e.jsxs($t,{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:136",className:"space-y-4 py-5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:137",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:138",className:"flex items-start gap-3",children:[e.jsx("div",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:139",className:"mt-0.5 rounded-md bg-primary/10 p-1.5",children:e.jsx(Dt,{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:140",className:"size-4 text-primary"})}),e.jsxs("div",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:142",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:143",className:"font-medium",children:i?"캠페인을 준비하고 있습니다":"준비가 끝났습니다"}),e.jsx("p",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:146",className:"text-sm text-muted-foreground",children:i?"유통사를 찾고, 그 나라 상관례를 조사해 1차 문안까지 씁니다. 창을 닫아도 계속 진행됩니다.":y.length>0?"일부 단계가 실패했습니다. 아래를 확인하고 다시 시도하세요.":"각 탭에서 결과를 확인하세요."})]})]}),!i&&y.length>0&&e.jsxs(G,{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:156",variant:"outline",size:"sm",onClick:()=>h.mutate({id:t}),disabled:h.isPending,children:[e.jsx(AA,{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:162",className:"mr-1.5 size-3.5"}),"다시 시도"]})]}),e.jsx(dS,{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:168",value:j,className:"h-1.5"}),e.jsx("ul",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:170",className:"space-y-2.5",children:jl.map(S=>{const N=r.steps[S];return e.jsxs("li",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:174",className:"flex items-start gap-2.5 text-sm",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:175",className:"mt-0.5 shrink-0",children:r9[N.state]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:176",className:"min-w-0",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:177",className:N.state==="running"?"font-medium":N.state==="waiting"?"text-muted-foreground":"",children:t9[S]}),N.state==="running"&&e.jsx("span",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:189",className:"ml-2 text-muted-foreground",children:a9[S]}),S==="prospect"&&b&&f&&e.jsxs("div",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:194",className:"mt-1.5 space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:195",className:"flex items-center gap-2.5",children:[e.jsx("div",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:196",className:"h-1 w-32 overflow-hidden rounded-full bg-primary/10",children:e.jsx("div",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:197",className:"h-full rounded-full bg-primary transition-[width] duration-500",style:{width:`${b.percent}%`,transitionTimingFunction:"cubic-bezier(0.23, 1, 0.32, 1)"}})}),e.jsxs("span",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:206",className:"text-xs text-muted-foreground tnum",children:["예상 ",b.percent,"%",b.remainText?` · ${b.remainText}`:b.hintText?` · ${b.hintText}`:""]})]}),e.jsxs("p",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:215",className:"text-xs text-muted-foreground tnum",children:[(f.marketTotal??0)>0?`도시·권역 ${f.marketDone??0}/${f.marketTotal} · `:"","조사 갈래 ",f.trackDone??0,"/",f.trackTotal??0," · 발견 ",f.foundCount??0,"곳(검수 전)",(f.trackFailures??0)>0?` · 부분 실패 ${f.trackFailures}갈래`:""]})]}),N.message&&e.jsx("p",{"data-loc":"client/src/components/campaign/AutoSetupPanel.tsx:227",className:`mt-0.5 text-xs ${N.state==="failed"?"text-rose-600":"text-muted-foreground"}`,children:N.message})]})]},S)})})]})})}function K1({card:t}){const s=t.icon;return e.jsx("div",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:34",className:`rounded-xl border p-3.5 ${t.ready?"border-emerald-200 bg-emerald-50/65":t.required?"border-amber-200 bg-amber-50/75":"border-slate-200 bg-slate-50/70"}`,children:e.jsxs("div",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:35",className:"flex items-start gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:36",className:`mt-0.5 grid size-7 shrink-0 place-items-center rounded-lg ${t.ready?"bg-emerald-100 text-emerald-700":t.required?"bg-amber-100 text-amber-700":"bg-slate-100 text-slate-600"}`,children:e.jsx(s,{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:37",className:"size-3.5"})}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:39",className:"min-w-0 flex-1",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:40",className:"flex items-center gap-1.5",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:41",className:"text-sm font-semibold",children:t.title}),e.jsx("span",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:42",className:`rounded-full px-1.5 py-0.5 text-[10px] font-semibold ${t.ready?"bg-emerald-100 text-emerald-800":t.required?"bg-amber-100 text-amber-800":"bg-slate-100 text-slate-600"}`,children:t.ready?"완료":t.required?"필수 확인":"권장 확인"})]}),e.jsx("p",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:46",className:"mt-1 min-h-9 text-xs leading-relaxed text-muted-foreground",children:t.detail}),t.ready?null:e.jsx(G,{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:47",variant:"ghost",size:"sm",className:"mt-1 h-7 px-1.5 text-xs",onClick:t.onClick,children:t.action})]})]})})}function i9({campaignId:t,productId:s,iso2:c,onMoveToTab:r}){const{data:i,isLoading:o}=q.gateway.automation.approvalPreview.useQuery({campaignId:t}),{data:u,isLoading:m}=q.gateway.certificationProcedures.workspace.useQuery({productId:s});if(o||m)return e.jsx(we,{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:72",className:"h-64 roun
677ded-2xl"});const p=u?.countries.find(_=>_.iso2===c),f=p?.summary.documentCount??0,b=(p?.summary.reviewCount??0)>0,h=i?.blockers??[],y=_=>h.some(R=>_.test(R)),j=!!i?.signature.values&&(i?.signature.validReplyTo.length??0)>0&&(i?.signature.invalidReplyTo.length??0)===0,S=i?.policy.signal!=="BLOCK"&&!y(/발송 금지 국가/),N=(i?.candidateCount??0)>0,w=!!i?.draft&&!y(/문안/),T=!y(/SMTP 연결 검증/),k=[{title:"제품 관리",detail:`${mu.defaultMessageUnit}의 공통 가치와 선택 국가에 필요한 근거를 연결합니다.`,ready:s>0,required:!0,icon:wg,action:"제품 관리 열기",onClick:()=>{window.location.href="/products"}},{title:"국가 규칙·컬처핏",detail:S?`${i?.campaign.countryNameKo??c} 발송 규칙을 적용합니다.`:"이 국가의 발송 가능 여부와 필수 문구를 먼저 확인하세요.",ready:S,required:!0,icon:Ha,action:"국가 신호등 열기",onClick:()=>{window.location.href="/countries"}},{title:"글로벌 DB·후보",detail:N?`이 캠페인에 발송 가능한 후보 ${i?.candidateCount??0}곳이 연결됐습니다.`:"글로벌 DB 또는 후보 조사에서 발송 가능한 회사를 먼저 확보하세요.",ready:N,required:!0,icon:zA,action:"후보 확인",onClick:()=>r("candidates")},{title:"1차 문안·교정",detail:w?`교정 통과 문안 “${i?.draft?.title??"1차 문안"}”이 선택됐습니다.`:`${mu.primaryGoal}을 위한 1차 문안을 국가 규칙·컬처핏에 맞춰 교정하세요.`,ready:w,required:!0,icon:Dg,action:"문안 작성",onClick:()=>r("drafts")},{title:"서명·회신 주소",detail:j?`${i?.signature.profileName??"적용 서명"}의 유효한 회신 주소를 사용합니다.`:"국가별 또는 기본 서명과 유효한 회신 이메일을 등록하세요.",ready:j,required:!0,icon:cu,action:"서명 관리 열기",onClick:()=>{window.location.href="/signature-management"}},{title:"SMTP 발송 설정",detail:T?"SMTP 연결 검증과 현재 발송 한도를 통과했습니다.":"SMTP 연결 검증과 현재 발송 한도를 확인하세요.",ready:T,required:!0,icon:ar,action:"SMTP 설정 열기",onClick:()=>{window.location.href="/smtp-settings"}}],E=[{title:"제품 자료실",detail:(i?.assets.length??0)>0?`승인·접근 가능 자료 ${i?.assets.length??0}개가 추천됩니다.`:"카탈로그·영상·인증·임상 자료를 등록하면 승인 시 발송 자료로 사용할 수 있습니다.",ready:(i?.assets.length??0)>0,required:!1,icon:bl,action:"제품 자료실 열기",onClick:()=>{window.location.href="/product-assets"}},{title:"인증 관리",detail:f>0?`${i?.campaign.countryNameKo??c} 등록 문서 ${f}개${b?" — 검토 대기 포함":"를 연결했습니다."}`:"보유 인증이 있다면 국가·제품 기준으로 등록해 두세요.",ready:f>0&&!b,required:!1,icon:Jt,action:"인증 관리 열기",onClick:()=>{window.location.href="/certification-map"}}],z=k.every(_=>_.ready);return e.jsxs("section",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:165",className:"rounded-2xl border border-indigo-200/80 bg-[linear-gradient(135deg,rgba(238,242,255,.88),rgba(255,255,255,.94))] p-4 shadow-[0_18px_44px_-34px_rgba(67,56,202,.5)] md:p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:166",className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:167",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:168",className:"page-kicker text-indigo-700",children:"Automation Setup"}),e.jsx("h2",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:169",className:"mt-1 text-base font-bold tracking-tight",children:"1차 회신·미팅을 위한 발송 준비"}),e.jsx("p",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:170",className:"mt-1 text-sm leading-relaxed text-muted-foreground",children:"필수 항목을 먼저 끝낸 뒤 사장님이 1차 문안을 최종 승인하면 예약 발송 준비가 시작됩니다."})]}),e.jsxs("span",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:172",className:`inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-semibold ${z?"bg-emerald-100 text-emerald-800":"bg-amber-100 text-amber-900"}`,children:[z?e.jsx(cu,{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:173",className:"size-3.5"}):e.jsx(js,{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:173",className:"size-3.5"}),z?"필수 세팅 완료":`필수 ${k.filter(_=>!_.ready).length}개 확인 필요`]}
vendor: 6,048 bytes, line 677
677)]}),e.jsx("div",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:178",className:"mt-4 grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:k.map(_=>e.jsx(K1,{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:179",card:_},_.title))}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:182",className:"mt-4 border-t border-indigo-100 pt-4",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:183",className:"text-xs font-bold tracking-[0.08em] text-slate-600",children:"발송 전 권장 준비"}),e.jsx("div",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:184",className:"mt-2 grid gap-3 md:grid-cols-2",children:E.map(_=>e.jsx(K1,{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:185",card:_},_.title))})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:189",className:"mt-4 flex flex-wrap items-center justify-between gap-3 rounded-xl border border-indigo-200/80 bg-white/80 px-3.5 py-3",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:190",className:"text-xs leading-relaxed text-muted-foreground",children:"자동 발송은 이 안내만으로 실행되지 않습니다. 사장님이 발송 탭에서 후보·문안·서명·자료를 최종 확인하고 승인해야 합니다."}),e.jsxs(G,{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:191",size:"sm",variant:z?"default":"outline",onClick:()=>r("send"),children:[e.jsx(wn,{"data-loc":"client/src/components/campaign/CampaignSetupChecklist.tsx:192",className:"mr-1.5 size-3.5"}),"발송 최종 확인"]})]})]})}var am="Collapsible",[o9]=da(am),[d9,mh]=o9(am),uS=v.forwardRef((t,s)=>{const{__scopeCollapsible:c,open:r,defaultOpen:i,disabled:o,onOpenChange:u,...m}=t,[p,f]=Bs({prop:r,defaultProp:i??!1,onChange:u,caller:am});return e.jsx(d9,{scope:c,disabled:o,contentId:cs(),open:p,onOpenToggle:v.useCallback(()=>f(b=>!b),[f]),children:e.jsx(Ae.div,{"data-state":xh(p),"data-disabled":o?"":void 0,...m,ref:s})})});uS.displayName=am;var mS="CollapsibleTrigger",pS=v.forwardRef((t,s)=>{const{__scopeCollapsible:c,...r}=t,i=mh(mS,c);return e.jsx(Ae.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":xh(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:s,onClick:ye(t.onClick,i.onOpenToggle)})});pS.displayName=mS;var ph="CollapsibleContent",xS=v.forwardRef((t,s)=>{const{forceMount:c,...r}=t,i=mh(ph,t.__scopeCollapsible);return e.jsx(ea,{present:c||i.open,children:({present:o})=>e.jsx(u9,{...r,ref:s,present:o})})});xS.displayName=ph;var u9=v.forwardRef((t,s)=>{const{__scopeCollapsible:c,present:r,children:i,...o}=t,u=mh(ph,c),[m,p]=v.useState(r),f=v.useRef(null),b=He(s,f),h=v.useRef(0),y=h.current,j=v.useRef(0),S=j.current,N=u.open||m,w=v.useRef(N),T=v.useRef(void 0);return v.useEffect(()=>{const k=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(k)},[]),_t(()=>{const k=f.current;if(k){T.current=T.current||{transitionDuration:k.style.transitionDuration,animationName:k.style.animationName},k.style.transitionDuration="0s",k.style.animationName="none";const E=k.getBoundingClientRect();h.current=E.height,j.current=E.width,w.current||(k.style.transitionDuration=T.current.transitionDuration,k.style.animationName=T.current.animationName),p(r)}},[u.open,r]),e.jsx(Ae.div,{"data-state":xh(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!N,...o,ref:b,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":S?`${S}px`:void 0,...t.style},children:N&&i})});function xh(t){return t?"open":"closed"}var m9=uS;function fS({...t}){return e.jsx(m9,{"data-loc":"client/src/components/ui/collapsible.tsx:6","data-slot":"collapsible",...t})}function gS({...t}){return e.jsx(pS,{"data-loc":"client/src/components/ui/collapsible.tsx:13","data-slot":"collapsible-trigger",...t})}function hS({...t}){return e.jsx(xS,{"data-loc":"client/src/components/ui/collapsible.tsx:24","data-slot":"collapsible-content",...t})}const p9=Ou("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function ct({className:t,variant:s,asChild:c=!1,...r}){const i=c?cg:"span";return e.jsx(i,{"data-loc":"client/src/components/ui/badge.tsx:38","data-slot":"badge",className:Ne(p9({variant:s}),t),...r})}function x9(t,s){return v.useReducer((c,r)=>s[c][r]??c,t)}var fh="ScrollArea",[bS]=da(fh),[f9,ls]=bS(fh),vS=v.forwardRef((t,s)=>{const{__scopeScrollArea:c,type:r="hover",dir:i,scrollHideDelay:o=600,...u}=t,[m,p]=v.useState(null),[f,b]=v.useState(null),[h,y]=v.useState(null),[j,S]=v.useState(null),[N,w]=v.useState(null),[T,k]=v.useState(0),[E,z]=v.useState(0),[_,R]=v.useState(!1),[P,A]=v.useState(!1),V=He(s,M=>p(M)),H=so(i);return e.jsx(f9,{scope:c,type:r,dir:H,scrollHideDelay:o,scrollArea:m,viewport:f,onViewportChange:b,content:h,onContentChange:y,scrollbarX:j,onScrollbarXChange:S,scrollbarXEnabled:_,onScrollbarXEnabledChange:R,scrollbarY:N,onScrollbarYChange:w,scrollbarYEnabled:P,onScrollbarYEnabledChange:A,onCornerWidthChange:k,onCornerHeight
vendor: 9,151 bytes, line 677
677Change:z,children:e.jsx(Ae.div,{dir:H,...u,ref:V,style:{position:"relative","--radix-scroll-area-corner-width":T+"px","--radix-scroll-area-corner-height":E+"px",...t.style}})})});vS.displayName=fh;var yS="ScrollAreaViewport",jS=v.forwardRef((t,s)=>{const{__scopeScrollArea:c,children:r,nonce:i,...o}=t,u=ls(yS,c),m=v.useRef(null),p=He(s,m,u.onViewportChange);return e.jsxs(e.Fragment,{children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),e.jsx(Ae.div,{"data-radix-scroll-area-viewport":"",...o,ref:p,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...t.style},children:e.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});jS.displayName=yS;var $s="ScrollAreaScrollbar",NS=v.forwardRef((t,s)=>{const{forceMount:c,...r}=t,i=ls($s,t.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:u}=i,m=t.orientation==="horizontal";return v.useEffect(()=>(m?o(!0):u(!0),()=>{m?o(!1):u(!1)}),[m,o,u]),i.type==="hover"?e.jsx(g9,{...r,ref:s,forceMount:c}):i.type==="scroll"?e.jsx(h9,{...r,ref:s,forceMount:c}):i.type==="auto"?e.jsx(CS,{...r,ref:s,forceMount:c}):i.type==="always"?e.jsx(gh,{...r,ref:s}):null});NS.displayName=$s;var g9=v.forwardRef((t,s)=>{const{forceMount:c,...r}=t,i=ls($s,t.__scopeScrollArea),[o,u]=v.useState(!1);return v.useEffect(()=>{const m=i.scrollArea;let p=0;if(m){const f=()=>{window.clearTimeout(p),u(!0)},b=()=>{p=window.setTimeout(()=>u(!1),i.scrollHideDelay)};return m.addEventListener("pointerenter",f),m.addEventListener("pointerleave",b),()=>{window.clearTimeout(p),m.removeEventListener("pointerenter",f),m.removeEventListener("pointerleave",b)}}},[i.scrollArea,i.scrollHideDelay]),e.jsx(ea,{present:c||o,children:e.jsx(CS,{"data-state":o?"visible":"hidden",...r,ref:s})})}),h9=v.forwardRef((t,s)=>{const{forceMount:c,...r}=t,i=ls($s,t.__scopeScrollArea),o=t.orientation==="horizontal",u=nm(()=>p("SCROLL_END"),100),[m,p]=x9("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return v.useEffect(()=>{if(m==="idle"){const f=window.setTimeout(()=>p("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[m,i.scrollHideDelay,p]),v.useEffect(()=>{const f=i.viewport,b=o?"scrollLeft":"scrollTop";if(f){let h=f[b];const y=()=>{const j=f[b];h!==j&&(p("SCROLL"),u()),h=j};return f.addEventListener("scroll",y),()=>f.removeEventListener("scroll",y)}},[i.viewport,o,p,u]),e.jsx(ea,{present:c||m!=="hidden",children:e.jsx(gh,{"data-state":m==="hidden"?"hidden":"visible",...r,ref:s,onPointerEnter:ye(t.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:ye(t.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),CS=v.forwardRef((t,s)=>{const c=ls($s,t.__scopeScrollArea),{forceMount:r,...i}=t,[o,u]=v.useState(!1),m=t.orientation==="horizontal",p=nm(()=>{if(c.viewport){const f=c.viewport.offsetWidth<c.viewport.scrollWidth,b=c.viewport.offsetHeight<c.viewport.scrollHeight;u(m?f:b)}},10);return Nl(c.viewport,p),Nl(c.content,p),e.jsx(ea,{present:r||o,children:e.jsx(gh,{"data-state":o?"visible":"hidden",...i,ref:s})})}),gh=v.forwardRef((t,s)=>{const{orientation:c="vertical",...r}=t,i=ls($s,t.__scopeScrollArea),o=v.useRef(null),u=v.useRef(0),[m,p]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=DS(m.viewport,m.content),b={...r,sizes:m,onSizesChange:p,hasThumb:f>0&&f<1,onThumbChange:y=>o.current=y,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:y=>u.current=y};function h(y,j){return C9(y,u.current,m,j)}return c==="horizontal"?e.jsx(b9,{...b,ref:s,onThumbPositionChange:()=>{if(i.viewport&&o.current){const y=i.viewport.scrollLeft,j=G1(y,m,i.dir);o.current.style.transform=`translate3d(${j}px, 0, 0)`}},onWheelScroll:y=>{i.viewport&&(i.viewport.scrollLeft=y)},onDragScroll:y=>{i.viewport&&(i.viewport.scrollLeft=h(y,i.dir))}}):c==="vertical"?e.jsx(v9,{...b,ref:s,onThumbPositionChange:()=>{if(i.viewport&&o.current){const y=i.viewport.scrollTop,j=G1(y,m);o.current.style.transform=`translate3d(0, ${j}px, 0)`}},onWheelScroll:y=>{i.viewport&&(i.viewport.scrollTop=y)},onDragScroll:y=>{i.viewport&&(i.viewport.scrollTop=h(y))}}):null}),b9=v.forwardRef((t,s)=>{const{sizes:c,onSizesChange:r,...i}=t,o=ls($s,t.__scopeScrollArea),[u,m]=v.useState(),p=v.useRef(null),f=He(s,p,o.onScrollbarXChange);return v.useEffect(()=>{p.current&&m(getComputedStyle(p.current))},[p]),e.jsx(SS,{"data-orientation":"horizontal",...i,ref:f,sizes:c,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":sm(c)+"px",...t.style},onThumbPointerDown:b=>t.onThumbPointerDown(b.x),onDragScroll:b=>t.onDragScroll(b.x),onWheelScroll:(b,h)=>{if(o.viewport){const y=o.viewport.scrollLeft+b.deltaX;t.onWheelScroll(y),_S(y,h)&&b.preventDefault()}},onResize:()=>{p.current&&o.viewport&&u&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:hu(u.paddingLeft),paddingEnd:hu(u.paddingRight)}})}})}),v9=v.forwardRef((t,s)=>{const{sizes:c,onSizesChange:r,...i}=t,o=ls($s,t.__scopeScrollArea),[u,m]=v.useState(),p=v.useRef(null),f=He(s,p,o.onScrollbarYChange);return v.useEffect(()=>{p.current&&m(getComputedStyle(p.current))},[p]),e.jsx(SS,{"data-orientation":"vertical",...i,ref:f,sizes:c,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":sm(c)+"px",...t.style},onThumbPointerDown:b=>t.onThumbPointerDown(b.y),onDragScroll:b=>t.onDragScroll(b.y),onWheelScroll:(b,h)=>{if(o.viewport){const y=o.viewport.scrollTop+b.deltaY;t.onWheelScroll(y),_S(y,h)&&b.preventDefault()}},onResize:()=>{p.current&&o.viewport&&u&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:hu(u.paddingTop),paddingEnd:hu(u.paddingBottom)}})}})}),[y9,wS]=bS($s),SS=v.forwardRef((t,s)=>{const{__scopeScrollArea:c,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:u,onThumbPointerDown:m,onThumbPositionChange:p,onDragScroll:f,onWheelScroll:b,onResize:h,...y}=t,j=ls($s,c),[S,N]=v.useState(null),w=He(s,V=>N(V)),T=v.useRef(null),k=v.useRef(""),E=j.viewport,z=r.content-r.viewport,_=Vt(b),R=Vt(p),P=nm(h,10);function A(V){if(T.current){const H=V.clientX-T.current.left,M=V.clientY-T.current.top;f({x:H,y:M})}}return v.useEffect(()=>{const V=H=>{const M=H.target;S?.contains(M)&&_(H,z)};return document.addEventListener("wheel",V,{passive:!1}),()=>document.removeEventListener("wheel",V,{passive:!1})},[E,S,z,_]),v.useEffect(R,[r,R]),Nl(S,P),Nl(j.content,P),e.jsx(y9,{scope:c,scrollbar:S,hasThumb:i,onThumbChange:Vt(o),onThumbPointerUp:Vt(u),onThumbPositionChange:R,onThumbPointerDown:Vt(m),children:e.jsx(Ae.div,{...y,ref:w,style:{position:"absolute",...y.style},onPointerDown:ye(t.onPointerDown,V=>{V.button===0&&(V.target.setPointerCapture(V.pointerId),T.current=S.getBoundingClientRect(),k.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",j.viewport&&(j.viewport.style.scrollBehavior="auto"),A(V))}),onPointerMove:ye(t.onPointerMove,A),onPointerUp:ye(t.onPointerUp,V=>{const H=V.target;H.hasPointerCapture(V.pointerId)&&H.releasePointerCapture(V.pointerId),document.body.style.webkitUserSelect=k.current,j.viewport&&(j.viewport.style.scrollBehavior=""),T.current=null})})})}),gu="ScrollAreaThumb",TS=v.forwardRef((t,s)=>{const{forceMount:c,...r}=t,i=wS(gu,t.__scopeScrollArea);return e.jsx(ea,{present:c||i.hasThumb,children:e.jsx(j9,{ref:s,...r})})}),j9=v.forwardRef((t,s)=>{const{__scopeScrollArea:c,style:r,...i}=t,o=ls(gu,c),u=wS(gu,c),{onThumbPositionChange:m}=u,p=He(s,h=>u.onThumbChange(h)),f=v.useRef(void 0),b=nm(()=>{f.current&&(f.current(),f.current=void 0)},100);return v.useEffect(()=>{const h=o.viewport;if(h){const y=()=>{if(b(),!f.current){const j=w9(h,m);f.current=j,m()}};return m(),h.addEventListener("scroll",y),()=>h.removeEventListener("scroll",y)}},[o.viewport,b,m]),e.jsx(Ae.div,{"data-state":u.hasThumb?"visible":"hidden",...i,ref:p,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ye(t.onPointerDownCapture,h=>{const j=h.target.getBoundingClientRect(),S=h.clientX-j.left,N=h.clientY-j.top;u.onThumbPointerDown({x:S,y:N})}),onPointerUp:ye(t.onPointerUp,u.onThumbPointerUp)})});TS.displayName=gu;var hh="ScrollAreaCorner",kS=v.forwardRef((t,s)=>{const c=ls(hh,t.__scopeScrollArea),r=!!(c.scrollbarX&&c.scrollbarY);return c.type!=="scroll"&&r?e.jsx(N9,{...t,ref:s}):null});kS.displayName=hh;var N9=v.forwardRef((t,s)=>{const{__scopeScrollArea:c,...r}=t,i=ls(hh,c),[o,u]=v.useState(0),[m,p]=v.useState(0),f=!!(o&&m);return Nl(i.scrollbarX,()=>{const b=i.scrollbarX?.offsetHeight||0;
677i.onCornerHeightChange(b),p(b)}),Nl(i.scrollbarY,()=>{const b=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(b),u(b)}),f?e.jsx(Ae.div,{...r,ref:s,style:{width:o,height:m,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function hu(t){return t?parseInt(t,10):0}function DS(t,s){const c=t/s;return isNaN(c)?0:c}function sm(t){const s=DS(t.viewport,t.content),c=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-c)*s;return Math.max(r,18)}function C9(t,s,c,r="ltr"){const i=sm(c),o=i/2,u=s||o,m=i-u,p=c.scrollbar.paddingStart+u,f=c.scrollbar.size-c.scrollbar.paddingEnd-m,b=c.content-c.viewport,h=r==="ltr"?[0,b]:[b*-1,0];return ES([p,f],h)(t)}function G1(t,s,c="ltr"){const r=sm(s),i=s.scrollbar.paddingStart+s.scrollbar.paddingEnd,o=s.scrollbar.size-i,u=s.content-s.viewport,m=o-r,p=c==="ltr"?[0,u]:[u*-1,0],f=If(t,p);return ES([0,u],[0,m])(f)}function ES(t,s){return c=>{if(t[0]===t[1]||s[0]===s[1])return s[0];const r=(s[1]-s[0])/(t[1]-t[0]);return s[0]+r*(c-t[0])}}function _S(t,s){return t>0&&t<s}var w9=(t,s=()=>{})=>{let c={left:t.scrollLeft,top:t.scrollTop},r=0;return(function i(){const o={left:t.scrollLeft,top:t.scrollTop},u=c.left!==o.left,m=c.top!==o.top;(u||m)&&s(),c=o,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function nm(t,s){const c=Vt(t),r=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),v.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(c,s)},[c,s])}function Nl(t,s){const c=Vt(s);_t(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(c)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t,c])}var S9=vS,T9=jS,k9=kS;function Y1({className:t,children:s,...c}){return e.jsxs(S9,{"data-loc":"client/src/components/ui/scroll-area.tsx:12","data-slot":"scroll-area",className:Ne("relative",t),...c,children:[e.jsx(T9,{"data-loc":"client/src/components/ui/scroll-area.tsx:17","data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:s}),e.jsx(D9,{"data-loc":"client/src/components/ui/scroll-area.tsx:23"}),e.jsx(k9,{"data-loc":"client/src/components/ui/scroll-area.tsx:24"})]})}function D9({className:t,orientation:s="vertical",...c}){return e.jsx(NS,{"data-loc":"client/src/components/ui/scroll-area.tsx:35","data-slot":"scroll-area-scrollbar",orientation:s,className:Ne("flex touch-none p-px transition-colors select-none",s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t),...c,children:e.jsx(TS,{"data-loc":"client/src/components/ui/scroll-area.tsx:48","data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function E9({open:t,onOpenChange:s,campaignId:c,draftId:r,defaultName:i}){const[o,u]=v.useState(i),[m,p]=v.useState(""),[f,b]=v.useState(null),h=q.useUtils();v.useEffect(()=>{t&&(u(i),p(""),b(null))},[t,i]);const y=q.gateway.templates.saveFromDraft.useMutation({onSuccess:S=>{if(S.conflict){b({id:S.existingId,at:S.updatedAt??null});return}X.success(`보관함에 저장했습니다 — ${S.name}`),h.gateway.templates.list.invalidate(),s(!1)},onError:S=>X.error(S.message)}),j=S=>{y.mutate({draftId:r,campaignId:c,name:o.trim()||void 0,note:m.trim()||void 0,overwrite:S})};return e.jsx(ta,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:99",open:t,onOpenChange:s,children:e.jsxs(aa,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:100",className:"sm:max-w-lg",children:[e.jsxs(sa,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:101",children:[e.jsxs(na,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:102",className:"flex items-center gap-2",children:[e.jsx(Bi,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:103",className:"size-4"}),"보관함에 저장"]}),e.jsx(ca,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:106",children:"이 문안을 보관해 두면 다른 캠페인에서 그대로 불러 쓸 수 있습니다."})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:111",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:112",className:"space-y-2",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:113",htmlFor:"tpl-name",children:"템플릿 이름"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:114",id:"tpl-name",value:o,onChange:S=>u(S.target.value),placeholder:i})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:121",className:"space-y-2",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:122",htmlFor:"tpl-note",children:"메모 (선택)"}),e.jsx(pt,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:123",id:"tpl-note",value:m,onChange:S=>p(S.target.value),rows:3,placeholder:"어떤 상황에 쓰는 문안인지 적어두면 나중에 찾기 쉽습니다. 예: 클리닉 대상, 가격 문의 후 재발송"})]}),f&&e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:133",className:"rounded-lg border border-amber-300 bg-amber-50 p-3 text-sm",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:134",className:"flex items-center gap-1.5 font-medium text-amber-900",children:[e.jsx(St,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:135",className:"size-4"}),"같은 이름의 템플릿이 이미 있습니다"]}),e.jsxs("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:138",className:"mt-1 text-amber-800",children:[f.at?`${new Date(f.at).toLocaleStr
677ing()}에 저장된 문안이 있습니다. `:"","덮어쓰면 기존 내용은 복구할 수 없습니다. 다른 이름으로 저장하려면 이름을 바꿔 주세요."]})]})]}),e.jsxs(_a,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:149",className:"gap-2",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:150",variant:"outline",onClick:()=>s(!1),children:"취소"}),f?e.jsxs(G,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:154",variant:"destructive",onClick:()=>j(!0),disabled:y.isPending,children:[y.isPending?e.jsx(jt,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:160",className:"size-4 animate-spin"}):e.jsx(iu,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:162",className:"size-4"}),"덮어쓰기"]}):e.jsxs(G,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:167",onClick:()=>j(!1),disabled:y.isPending||!o.trim(),children:[y.isPending?e.jsx(jt,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:169",className:"size-4 animate-spin"}):e.jsx(iu,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:171",className:"size-4"}),"저장"]})]})]})})}function AS({open:t,onOpenChange:s,campaignId:c,targetDraftId:r,onApplied:i}){const[o,u]=v.useState(""),[m,p]=v.useState("all"),[f,b]=v.useState("all"),[h,y]=v.useState("all"),[j,S]=v.useState(null),N=q.useUtils();v.useEffect(()=>{t&&(u(""),p("all"),b("all"),y("all"),S(null))},[t]);const w=v.useMemo(()=>({...o.trim()?{keyword:o.trim()}:{},...m!=="all"?{countryIso2:m}:{},...f!=="all"?{productId:Number(f)}:{},...h!=="all"?{sequenceStep:Number(h)}:{}}),[o,m,f,h]),{data:T,isLoading:k}=q.gateway.templates.list.useQuery(w,{enabled:t}),{data:E}=q.gateway.templates.list.useQuery({},{enabled:t}),z=v.useMemo(()=>{const B=new Map;return(E??[]).forEach(I=>{B.set(I.countryIso2,I.countryNameKo??I.countryIso2)}),Array.from(B,([I,ie])=>({iso2:I,name:ie})).sort((I,ie)=>I.name.localeCompare(ie.name,"ko"))},[E]),_=v.useMemo(()=>{const B=new Map;return(E??[]).forEach(I=>{B.set(I.productId,I.productName??`제품 ${I.productId}`)}),Array.from(B,([I,ie])=>({id:I,name:ie}))},[E]),R=v.useMemo(()=>{const B=new Set;return(E??[]).forEach(I=>B.add(I.sequenceStep)),Array.from(B).sort((I,ie)=>I-ie)},[E]),{data:P,isFetching:A}=q.gateway.templates.preview.useQuery({id:j??0,campaignId:c},{enabled:t&&j!==null}),V=q.gateway.templates.applyToDraft.useMutation({onSuccess:B=>{X.success(B.lint.passed?"문안을 불러왔습니다":"문안을 불러왔습니다 — 교정에서 확인할 항목이 있습니다"),N.gateway.drafts.list.invalidate({campaignId:c}),N.gateway.templates.list.invalidate(),i?.(B.draftId),s(!1)},onError:B=>X.error(B.message)}),H=q.gateway.templates.remove.useMutation({onSuccess:()=>{X.success("템플릿을 지웠습니다"),S(null),N.gateway.templates.list.invalidate()},onError:B=>X.error(B.message)}),M=(P?.diffs??[]).some(B=>B.level==="block");return e.jsx(ta,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:285",open:t,onOpenChange:s,children:e.jsxs(aa,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:286",className:"max-h-[85vh] sm:max-w-4xl",children:[e.jsxs(sa,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:287",children:[e.jsxs(na,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:288",className:"flex items-center gap-2",children:[e.jsx(Bi,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:289",className:"size-4"}),"보관함에서 불러오기"]}),e.jsx(ca,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:292",children:r?"선택한 템플릿으로 현재 문안을 덮어씁니다.":"선택한 템플릿을 새 문안으로 추가합니다."})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:299",className:"grid gap-4 lg:grid-cols-[320px_1fr]",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:301",className:"flex flex-col gap-2",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:302",className:"relative",children:[e.jsx(An,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:303",className:"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:304",value:o,onChange:B=>u(B.target.value),placeholder:"이름·메모 검색",className:"pl-8"})]}),(z.length>1||_.length>1)&&e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:314",className:"grid grid-cols-2 gap-1.5",children:[z.length>1&&e.jsxs(et,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:316",value:m,onValueChange:p,children:[e.jsx(at,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:317",className:"h-8 text-xs",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:318",placeholder:"국가"})}),e.jsxs(st,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:320",children:[e.jsx(ve,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:321",value:"all",children:"모든 국가"}),z.map(B=>e.jsx(ve,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:323",value:B.iso2,children:B.name},B.iso2))]})]}),_.length>1&&e.jsxs(et,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:331",value:f,onValueChange:b,children:[e.jsx(at,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:332",className:"h-8 text-xs",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:333",placeholder:"제품"})}),e.jsxs(st,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:335",children:[e.jsx(ve,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:336",value:"all",children:"모든 제품"}),_.map(B=>e.jsx(ve,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:338",value:String(B.id),children:B.name},B.id))]})]}),R.length>1&&e.jsxs(et,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:346",value:h,onValueChange:y,children:[e.jsx(at,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:347",className:"h-8 text-xs",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:348",placeholder:"순번"})}),e.jsxs(st,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:350",children:[e.jsx(ve,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:351",value:"all",children:"모든 순번"}),R.map(B=>e.jsx(ve,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:353",value:String(B),children:B===0?"1ì°¨ 메일":`팔로업 ${B}`},B))]})]})]}),e.jsx(Y1,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:363",className:"h-[46vh] rounded-lg border",children:k?e.jsx("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:365",className:"space-y-2 p-3",children:[0,1,2].map(B=>e.jsx("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:367",className:"h-16 animate-pulse rounded-md bg-muted"},B))}):!T||T.length===0?e.jsx("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:371",className:"p-6 text-center text-sm text-muted-foreground",children:o.trim()?e.jsx(e.Fragment,{children:"검색 ê²°ê
677³¼ê°€ 없습니다."}):e.jsxs(e.Fragment,{children:["저장된 템플릿이 없습니다.",e.jsx("br",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:377"}),"문안을 완성한 뒤 ",e.jsx("span",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:378",className:"font-medium",children:"보관함에 저장"}),"을 누르면 여기에 쌓입니다."]})}):e.jsx("ul",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:384",className:"divide-y",children:T.map(B=>{const I=j===B.id;return e.jsx("li",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:388",children:e.jsxs("button",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:389",type:"button",onClick:()=>S(B.id),className:`w-full px-3 py-2.5 text-left transition-colors ${I?"bg-primary/8":"hover:bg-muted/60"}`,children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:396",className:"flex items-start justify-between gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:397",className:"text-sm font-medium leading-snug",children:B.name}),I&&e.jsx(Et,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:398",className:"mt-0.5 size-4 shrink-0 text-primary"})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:400",className:"mt-1 flex flex-wrap items-center gap-1.5 text-[11px] text-muted-foreground",children:[e.jsx(ct,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:401",variant:"secondary",className:"px-1.5 py-0 font-normal",children:B.countryNameKo??B.countryIso2}),e.jsx("span",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:404",children:B.productName??"제품 미상"}),e.jsx("span",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:405",children:"·"}),e.jsx("span",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:406",children:B.sequenceStep===0?"1ì°¨":`팔로업 ${B.sequenceStep}`}),B.useCount>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:411",children:"·"}),e.jsxs("span",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:412",children:[B.useCount,"회 사용"]})]})]})]})},B.id)})})})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:426",className:"min-h-[46vh] rounded-lg border bg-muted/20 p-3",children:j===null?e.jsxs("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:428",className:"flex h-full items-center justify-center text-center text-sm text-muted-foreground",children:["왼쪽에서 템플릿을 고르면",e.jsx("br",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:430"}),"내용과 이 나라에서의 주의점을 보여줍니다."]}):A&&!P?e.jsx("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:434",className:"flex h-full items-center justify-center",children:e.jsx(jt,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:435",className:"size-5 animate-spin text-muted-foreground"})}):P?e.jsx(Y1,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:438",className:"h-[46vh] pr-2",children:e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:439",className:"space-y-3",children:[P.diffs.length>0&&e.jsx("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:442",className:"space-y-2",children:P.diffs.map((B,I)=>e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:444",className:`rounded-md border p-2.5 text-xs ${B.level==="block"?"border-rose-300 bg-rose-50":B.level==="warn"?"border-amber-300 bg-amber-50":"border-border bg-background"}`,children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:454",className:`flex items-center gap-1.5 font-medium ${B.level==="block"?"text-rose-900":B.level==="warn"?"text-amber-900":"text-foreground"}`,children:[B.level==="block"?e.jsx(Ea,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:464",className:"size-3.5"}):B.level==="warn"?e.jsx(St,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:466",className:"size-3.5"}):e.jsx(tr,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:468",className:"size-3.5"}),B.title]}),e.jsx("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:472",className:`mt-1 leading-relaxed ${B.level==="block"?"text-rose-800":B.level==="warn"?"text-amber-800":"text-muted-foreground"}`,children:B.detail})]},I))}),P.diffs.length===0&&e.jsxs("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:489",className:"rounded-md border border-emerald-300 bg-emerald-50 p-2.5 text-xs text-emerald-900",children:[e.jsx(Et,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:490",className:"mr-1 inline size-3.5"}),P.sameCountry?`같은 나라(${P.toCountryKo}) 문안입니다. 그대로 쓸 수 있습니다.`:`${P.fromCountryKo} 문안이지만 ${P.toCountryKo} 규칙과 충돌하지 않습니다.`]}),(()=>{const B=P.lint.issues.filter(ie=>ie.level==="block"),I=P.lint.issues.filter(ie=>ie.level==="warn");return B.length===0&&I.length===0?e.jsxs("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:503",className:"rounded-md border bg-background p-2.5 text-xs text-muted-foreground",children:[e.jsx(Jt,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:504",className:"mr-1 inline size-3.5 text-emerald-600"}),P.toCountryKo," 규칙으로 검사했습니다 — 금지 표현과 필수 문구 문제는 없습니다."]}):e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:511",className:"rounded-md border border-border bg-background p-2.5",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:512",className:"mb-1.5 flex items-center gap-1.5 text-xs font-medium",children:[e.jsx(Jt,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:513",className:"size-3.5"}),P.toCountryKo," 규칙 검사 ê²°ê³¼"]}),e.jsx("ul",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:516",className:"space-y-1",children:[...B,...I].slice(0,6).map((ie,se)=>e.jsxs("li",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:518",className:"flex gap-1.5 text-[11px] leading-relaxed",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:519",className:ie.level==="block"?"shrink-0 font-medium text-rose-700":"shrink-0 font-medium text-amber-700",children:ie.level==="block"?"차단":"주의"}),e.jsxs("span",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:528",className:"text-muted-foreground",children:[ie.title,ie.fix?` — ${ie.fix}`:""]})]},se))}),B.length+I.length>6&&e.jsxs("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:536",className:"mt-1.5 text-[11px] text-muted-foreground",children:["ê·¸ 외 ",B.length+I.length-6,"건은 불러온 뒤 교정기에서 확인할 수 있습니다."]})]})})(),e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:546",className:"space-y-1",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:547",className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"제목"}),e.jsx("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:550",className:"rounded-md border bg-background p-2 text-sm",children:P.template.subject||e.jsx("span",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:552",className:"text-muted-foreground",children:"(제목 없음)"})})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:556",className:"space-y-1",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:557",className:"flex items-center justify-between",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:558",className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"본문"}),P.openSlots>0&&e.jsxs(ct,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:562",variant:"outline",className:"text-[10px]",children:["채울 ê³³ ",P.openSlots]})]}),e.jsx("pre",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:567",className:"max-h-56 overflow-auto whitespace-pre-wrap rounded-md border bg-background p-2 font-sans text-xs leading-relaxed",children:P.template.body||"(본문 없음)"})]}),P.template.bodyKo&&e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:572",className:"space-y-1",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:573",className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"한국어 대역"}),e.jsx("pre",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:576",className:"max-h-40 overflow-auto whitespace-pre-wrap rounded-md border bg-background p-2 font-sans text-xs leading-relaxed text-muted-foreground",children:P.template.bodyKo})]}),P.template.note&&e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:582",className:"space-y-1",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:583",className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"메모"}),e.jsx("p",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:586",className:"rounded-md border bg-background p-2 text-xs text-muted-foreground",children:P.template.note})]})]})}):null})]}),e.jsxs(_a,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:597",className:"gap-2 sm:justify-between",children:[e.jsx("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:598",children:j!==null&&e.jsxs(G,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:600",variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:()=>H.mutate({id:j}),disabled:H.isPending,children:[e.jsx(Hs,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:607",className:"size-4"}),"이 템플릿 지우기"]})}),e.jsxs("div",{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:612",className:"flex gap-2",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:613",variant:"outline",onClick:()=>s(!1),children:"취소"}),e.jsxs(G,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:616",onClick:()=>j!==null&&V.mutate({id:j,campaignId:c,targetDraftId:r}),disabled:j===null||V.isPending||M,children:[V.isPending?e.jsx(jt,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:624",className:"size-4 animate-spin"}):e.jsx(Bi,{"data-loc":"client/src/components/campaign/TemplateDialogs.tsx:626",className:"size-4"}),M?"이 나라에는 쓸 수 없습니다":"불러오기"]})]})]})]})})}function _9({campaignId:t}){const{data:s,isLoading:c}=q.gateway.drafts.list.useQuery({campaignId:t}),{data:r}=q.gateway.campaigns.get.useQuery({id:t}),{data:i}=q.gateway.signatures.list.useQuery(),{data:o}=q.gateway.signatures.forCampaign.useQuery({campaignId:t}),[u,m]=v.useState(null),{data:p,isPending:f}=q.gateway.send.previews.useQuery({campaignId:t,draftId:u??0,onlyGaps:!1},{enabled:u!==null}),[b,h]=v.useState(!1),y=q.useUtils(),j=q.gateway.drafts.create.useMutation({onSuccess:k=>
677{y.gateway.drafts.list.invalidate({campaignId:t}),m(k.id)},onError:k=>X.error(k.message)}),S=q.gateway.drafts.generate.useMutation({onSuccess:k=>{y.gateway.drafts.list.invalidate({campaignId:t}),m(k.draftId??null),X.success(`${k.language} 문안을 만들었습니다. 서명까지 적용된 발송용 본문을 확인하세요.`)},onError:k=>X.error(k.message)}),N=q.gateway.signatures.selectForCampaign.useMutation({onSuccess:()=>{y.gateway.signatures.forCampaign.invalidate({campaignId:t}),y.gateway.send.preflight.invalidate({campaignId:t}),y.gateway.send.previews.invalidate(),X.success("이 캠페인 문안에 적용할 서명을 바꿨습니다.")},onError:k=>X.error(k.message)});if(v.useEffect(()=>{u===null&&s&&s.length>0&&m(s[0].id)},[s,u]),c)return e.jsx(we,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:92",className:"h-96 rounded-xl"});if((s?.length??0)===0)return e.jsx(En,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:97",icon:e.jsx(Cn,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:98",className:"size-8"}),title:"문안이 없습니다",description:"자동 작성을 누르면 이 나라의 법규와 상관례에 맞춘 현지어 문안과 한국어 대역을 함께 만듭니다. 담당자 이름처럼 사람이 확인해야 하는 부분은 대괄호로 남겨 둡니다.",action:e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:102",className:"flex flex-wrap items-center justify-center gap-2",children:[e.jsxs(G,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:103",className:"gap-1.5",disabled:S.isPending,onClick:()=>S.mutate({campaignId:t,sequenceStep:0}),children:[e.jsx(Dt,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:108",className:"size-4"}),S.isPending?"작성 중 (약 2분)":"1ì°¨ 메일 자동 작성"]}),e.jsxs(G,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:111",variant:"outline",className:"gap-1.5 bg-background",onClick:()=>j.mutate({campaignId:t,title:"1ì°¨ 메일",sequenceStep:0}),children:[e.jsx(vs,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:116",className:"size-4"}),"빈 문안으로 직접 쓰기"]})]})});const w=s?.find(k=>k.id===u)??s?.[0],T=r?.rule?.followupLimit??0;return e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:129",className:"space-y-6",children:[r?.rule&&e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:131",className:"rounded-xl border border-primary/15 bg-[linear-gradient(135deg,rgba(255,255,255,.9),rgba(239,247,255,.72))] px-4 py-3 text-xs leading-relaxed text-muted-foreground shadow-[0_12px_32px_-30px_rgba(37,99,235,.5)]",children:["권장 작성 언어:"," ",e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:133",className:"font-semibold text-foreground",children:r.rule.language??"확인되지 않음"}),r.rule.subjectTag?` · 제목에 ${r.rule.subjectTag} 필수`:"",r.rule.followupLimit===0?" · 팔로업 불가 (최초 1통)":` · 팔로업 ${r.rule.followupLimit}회까지`]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:144",className:"flex flex-wrap items-center gap-2 rounded-2xl border border-border/70 bg-white/78 p-3 shadow-[0_12px_34px_-30px_rgba(18,35,61,.45)]",children:[s?.map(k=>e.jsxs("button",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:146",onClick:()=>m(k.id),className:`flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-all active:scale-[0.97] ${k.id===w?.id?"border-primary bg-primary text-primary-foreground":"bg-background hover:bg-accent"}`,children:[k.lintPassed?e.jsx(Et,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:155",className:"size-3"}):e.jsx(js,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:155",className:"size-3"}),(()=>{const E=k.sequenceStep===0?"1ì°¨ 메일":`팔로업 ${k.sequenceStep}`,z=k.title.trim();return z&&z!==E?`${E} · ${z}`:E})()]},k.id)),e.jsxs(G,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:164",variant:"outline",size:"sm",className:"gap-1.5 bg-background",disabled:(s?.length??0)>T,onClick:()=>{const k=new Set((s??[]).map(z=>z.sequenceStep));let E=0;for(;k.has(E);)E+=1;j.mutate({campaignId:t,title:E===0?"1ì°¨ 메일":`팔로업 ${E}`,sequenceStep:E})},children:[e.jsx(vs,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:181",className:"size-3.5"}),(s?.length??0)>T?"팔로업 한도 도달":"문안 추가"]}),e.jsxs(G,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:185",size:"sm",className:"gap-1.5",disabled:S.isPending||(s?.length??0)>T,onClick:()=>{const k=new Set((s??[]).map(z=>z.sequenceStep));let E=0;for(;k.has(E);)E+=1;S.mutate({campaignId:t,sequenceStep:E})},children:[e.jsx(Dt,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:196",className:"size-3.5"}),S.isPending?"작성 중":"자동 작성"]}),e.jsxs(G,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:200",variant:"outline",size:"sm",className:"gap-1.5 bg-background",onClick:()=>h(!0),children:[e.jsx(Bi,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:206",className:"size-3.5"}),"보관함"]})]}),w&&e.jsx(A9,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:212",isLoading:f,preview:p,draft:w,signature:o,profiles:i,isChangingSignature:N.isPending,onSelectSignature:k=>N.mutate({campaignId:t,signatureProfileId:k})}),w&&e.jsxs(fS,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:226",className:"rounded-2xl border border-border/80 bg-card/96 shadow-[0_20px_50px_-36px_rgba(18,35,61,.44)]",children:[e.jsxs(gS,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:227",className:"flex w-full items-center justify-between gap-3 px-5 py-4 text-left transition-colors hover:bg-muted/35",children:[e.jsxs("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:228",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:229",className:"block text-sm font-semibold text-foreground",children:"AI 원문 편집·저장·보관함"}),e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:230",className:"mt-1 block text-xs leading-relaxed text-muted-foreground",children:"공통 메시지만 수정하고 저장하거나 문안 보관함에서 불러옵니다."})]}),e.jsx(ns,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:234",className:"size-4 shrink-0 text-muted-foreground"})]}),e.jsx(hS,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:236",className:"border-t border-border/70",children:e.jsx(P9,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:237",campaignId:t,draft:w,followupLimit:T,isGenerating:S.isPending,onRegenerate:k=>S.mutate({campaignId:t,sequenceStep:w.sequenceStep,draftId:w.id,extraInstruction:k})},w.id)})]}),e.jsx(AS,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:256",open:b,onOpenChange:h,campaignId:t,onApplied:k=>m(k)})]})}function A9({isLoading:t,preview:s,draft:c,signature:r,profiles:i,isChangingSignature:o,onSelectSignature:u}){const m=s?.items[0];return e.jsxs("section",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:317",className:"overflow-hidden rounded-2xl border border-emerald-200 bg-emerald-50/35 shadow-[0_18px_44px_-36px_rgba(5,150,105,.45)]",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:318",className:"flex flex-wrap items-start justify-between gap-3 border-b border-emerald-200/75 bg-emerald-50/80 px-4 py-3.5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:319",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:320",className:"flex items-center gap-2",children:[e.jsx(Jt,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:321",className:"size-4 text-emerald-700"}),e.jsx("h3",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:322",className:"text-sm font-bold text-emerald-950",children:"발송용 현지어 본문"})]}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:324",className:"mt-1 text-xs leading-relaxed text-emerald-900/80",children:"AI가 국가 규칙·현지 가이드·제품 기준서를 반영한 문안에 후보 정보와 서명을 자동 적용했습니다."})]}),s&&e.jsxs("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:329",className:"rounded-full border border-emerald-200 bg-white px-2.5 py-1 text-[11px] font-semibold text-emerald-800",children:["전체 ",s.totalCount,"ê³³ · 빈칸 ",s.gapCount,"ê³³"]})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:334",className:"border-b border-emerald-200/75 bg-white/75 px-4 py-3",children:e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:335",className:"grid gap-3 sm:grid-cols-[minmax(0,1fr)_260px] sm:items-end",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:336",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:337",className:"text-[11px] font-medium text-muted-foreground",children:"발신 서명"}),e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:338",className:"mt-1 truncate text-sm font-semibold text-foreground",children:[String(r?.profileName??"기본 서명"),r?.selected?.company?` · ${r.selected.company}`:""]}),e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:342",className:"mt-1 text-xs text-muted-foreground",children:[r?.selectionSource==="manual"?"직접 선택":"국가 기준 자동 선택"," · 변경하면 아래 발송ë
677³¸ì— 바로 반영됩니다."]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:346",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:347",className:"text-xs font-semibold",children:"발신 서명 변경"}),e.jsxs(et,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:348",value:r?.configuredId?String(r.configuredId):"_auto",onValueChange:p=>u(p==="_auto"?null:Number(p)),disabled:o,children:[e.jsx(at,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:353",className:"w-full bg-background","aria-label":"발송용 본문에 사용할 서명 변경",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:354",placeholder:"서명 선택"})}),e.jsxs(st,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:356",children:[e.jsxs(ve,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:357",value:"_auto",children:["자동 선택 · ",String(r?.profileName??"기본 서명")]}),(i??[]).map(p=>e.jsxs(ve,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:361",value:String(p.id),children:[p.name,p.iso2?` · ${p.iso2}`:" · 모든 국가"]},p.id))]})]}),e.jsx("a",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:367",href:"/signatures",className:"block text-right text-[11px] font-medium text-primary underline-offset-4 hover:underline",children:"서명 관리는 여기서 수정"})]})]})}),e.jsx("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:373",className:"p-4",children:t?e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:375",className:"space-y-2",children:[e.jsx(we,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:376",className:"h-4 w-1/3"}),e.jsx(we,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:377",className:"h-28 w-full"})]}):m?e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:384",className:"space-y-4 rounded-xl border border-emerald-200/80 bg-white/90 p-4",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:385",className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:386",className:"text-sm font-semibold text-foreground",children:["수신처 · ",m.companyName]}),e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:387",className:"text-xs text-muted-foreground",children:m.email??"이메일 없음"})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:389",className:"grid gap-3 lg:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:390",className:"space-y-3 rounded-lg bg-slate-50 px-3 py-3",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:391",className:"text-[11px] font-semibold text-muted-foreground",children:"발송용 현지어 본문"}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:392",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:393",className:"text-[11px] font-medium text-muted-foreground",children:"제목"}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:394",className:"mt-1 text-sm font-medium text-foreground",children:m.subject})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:396",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:397",className:"text-[11px] font-medium text-muted-foreground",children:"본문"}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:398",className:"mt-1.5 max-h-72 overflow-y-auto whitespace-pre-wrap text-sm leading-relaxed text-foreground",children:m.body})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:403",className:"space-y-3 rounded-lg border border-sky-100 bg-sky-50/60 px-3 py-3",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:404",className:"text-[11px] font-semibold text-sky-900",children:"한국어 대역 (발송본 확인용)"}),m.bodyKo?e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:407",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:408",className:"text-[11px] font-medium text-muted-foreground",children:"제목"}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:409",className:"mt-1 text-sm font-medium text-foreground",children:m.subjectKo??c.subjectKo??"-"})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:411",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:412",className:"text-[11px] font-medium text-muted-foreground",children:"본문"}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:413",className:"mt-1.5 max-h-72 overflow-y-auto whitespace-pre-wrap text-sm leading-relaxed text-foreground",children:m.bodyKo})]})]}):e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:419",className:"text-sm leading-relaxed text-muted-foreground",children:"AI가 한국어 대역을 만들면 현지어 발송본과 같은 자동 병합값으로 여기에 표시됩니다."})]})]}),m.remaining.length>0?e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:426",className:"text-xs text-amber-800",children:["이 후보에 직접 확인할 항목: ",m.remaining.join(", ")
677]}):e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:430",className:"flex items-center gap-1.5 text-xs font-medium text-emerald-700",children:[e.jsx(Et,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:431",className:"size-3.5"})," 후보 정보와 선택 서명이 모두 적용되었습니다."]})]}):e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:380",className:"rounded-xl border border-dashed border-emerald-200 bg-white/80 px-4 py-5 text-sm text-emerald-900/75",children:"발송 가능한 후보가 생기면 후보별 자동 조합본을 여기에서 먼저 확인합니다."})})]})}function P9({campaignId:t,draft:s,followupLimit:c,isGenerating:r,onRegenerate:i}){const o=q.useUtils(),[u,m]=v.useState(s.title),[p,f]=v.useState(s.subject??""),[b,h]=v.useState(s.body??""),[y,j]=v.useState(s.sequenceStep),[S,N]=v.useState({subject:p,body:b,step:y}),[w,T]=v.useState(""),[k,E]=v.useState(!1),[z,_]=v.useState(!1),{data:R}=q.gateway.campaigns.get.useQuery({id:t}),P=v.useMemo(()=>{const O=R?.rule?.countryNameKo??"",te=y===0?"1차 메일":`팔로업 ${y}`,Y=u.trim(),ne=O?`${O} · ${te}`:te;return Y&&Y!==te?`${ne} · ${Y}`:ne},[R?.rule?.countryNameKo,y,u]),A=!!(s.subjectKo||s.bodyKo),[V,H]=v.useState(A?"compare":"edit"),M=v.useRef(!0);v.useEffect(()=>{if(M.current){M.current=!1,N({subject:p,body:b,step:y});return}const O=setTimeout(()=>N({subject:p,body:b,step:y}),450);return()=>clearTimeout(O)},[p,b,y]);const{data:B,isFetching:I}=q.gateway.drafts.lint.useQuery({campaignId:t,subject:S.subject,body:S.body,sequenceStep:S.step}),ie=q.gateway.drafts.update.useMutation({onSuccess:O=>{o.gateway.drafts.list.invalidate({campaignId:t}),X.success(O.lintPassed?"저장 완료 — 발송 조건을 통과했습니다.":"저장했습니다. 아직 해결하지 못한 항목이 있어 발송은 잠겨 있습니다.")},onError:O=>X.error(O.message)}),se=(B?.issues??[]).filter(O=>O.level==="block"),L=(B?.issues??[]).filter(O=>O.level==="warn"),F=(B?.issues??[]).filter(O=>O.level==="info"),W=p.trim().length===0&&b.trim().length===0,ce=v.useMemo(()=>B?.unresolvedPlaceholders.length??R9(`${p}
678${b}`),[B?.unresolvedPlaceholders.length,p,b]),ge=B?.autoFilledPlaceholders??[];return e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:538",className:"grid items-start gap-5 xl:grid-cols-[minmax(0,1fr)_360px]",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:539",className:"space-y-5 rounded-2xl border border-border/80 bg-card/96 p-5 shadow-[0_20px_50px_-36px_rgba(18,35,61,.58)] md:p-6",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:540",className:"grid gap-3 sm:grid-cols-[1fr_150px]",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:541",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:542",className:"text-sm",children:"문안 이름"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:543",value:u,onChange:O=>m(O.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:545",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:546",className:"text-sm",children:"순번"}),e.jsxs(et,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:547",value:String(y),onValueChange:O=>j(Number(O)),children:[e.jsx(at,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:548",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:549"})}),e.jsxs(st,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:551",children:[e.jsx(ve,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:552",value:"0",children:"최초 발송"}),[1,2,3,4].map(O=>e.jsxs(ve,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:554",value:String(O),disabled:O>c,children:["팔로업 ",O,O>c?" (이 국가는 불가)":""]},O))]})]}),y>c&&e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:562",className:"text-xs text-rose-600",children:c===0?"이 국가는 팔로업이 허용되지 않습니다.":`이 국가의 팔로업 한도는 ${c}회입니다.`})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:571",className:"border-b border-border/70 pb-3",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:572",className:"text-sm font-semibold text-foreground",children:"원문 편집·한국어 대역·교정 결과"}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:573",className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:"여기서는 AI 공통 원문만 수정합니다. 후보 정보와 국가별 서명은 위 발송용 본문 미리보기에서 자동 적용된 결과를 확인하세요."})]}),A&&e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:580",className:"flex items-center gap-1 rounded-xl border border-border/70 bg-muted/55 p-1",children:[e.jsx(X1,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:581",active:V==="compare",onClick:()=>H("compare"),icon:e.jsx(iA,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:584",className:"size-3.5"}),label:"현지어 · 한국어 나란히"}),e.jsx(X1,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:587",active:V==="edit",onClick:()=>H("edit"),icon:e.jsx(Pg,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:590",className:"size-3.5"}),label:"넓게 편집"})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:597",className:"space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:598",className:"flex items-center justify-between",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:599",className:"text-sm",children:"제목"}),e.jsx(Vx,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:600",text:p,label:"제목 복사"})]}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:602",value:p,onChange:O=>f(O.target.value),placeholder:"받는 사람이 열어볼 이유가 첫 6단어에 있어야 합니다"}),V==="compare"&&s.subjectKo&&e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:608",className:"flex gap-1.5 rounded-md bg-muted/50 px-2.5 py-1.5 text-xs leading-relaxed text-muted-foreground",children:[e.jsx(ao,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:609",className:"mt-px size-3.5 shrink-0 text-primary/70"}),e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:610",children:s.subjectKo})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:616",className:"space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:617",className:"flex items-center justify-between",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:618",className:"text-sm",children:"본문"}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:619",className:"flex items-center gap-1",children:[ce>0&&e.jsxs("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:621",className:"rounded-full bg-amber-100 px-2 py-0.5 text-[11px] font-medium text-amber-900",children:["직접 확인 ",ce]}),ge.length>0&&e.jsxs("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:626",className:"rounded-full bg-cyan-100 px-2 py-0.5 text-[11px] font-medium text-cyan-900",children:["자동 병합 ",ge.length]}),e.jsx(Vx,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:630",text:b,label:"본문 복사"})]})]}),V==="compare"&&s.bodyKo?e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:635",className:"grid gap-3 lg:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:636",className:"flex flex-col gap-1.5",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:637",className:"text-[11px] font-medium text-muted-foreground",children:"AI 공통 원문 (후보·서명 자동 병합 전)"}),e.jsx(pt,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:640",rows:22,value:b,onChange:O=>h(O.target.value),className:"min-h-[20rem] flex-1 leading-relaxed lg:min-h-[34rem]",placeholder:"첨부파일 없이, 링크 하나로 자료를 전달하는 구조로 쓰세요."})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:648",className:"flex flex-col gap-1.5",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:649",className:"text-[11px] font-medium text-muted-foreground",children:"한국어 대역 (내용 확인용)"}),e.jsx("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:652",className:"max-h-[20rem] min-h-[12rem] flex-1 overflow-y-auto rounded-xl border border-border/80 bg-slate-50/80 px-4 py-3 text-sm leading-relaxed lg:max-h-none lg:min-h-[34rem]",children:e.jsx(M9,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:653",text:s.bodyKo,muted:!0}
678)})]})]}):e.jsx(pt,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:658",rows:20,value:b,onChange:O=>h(O.target.value),className:"leading-relaxed",placeholder:"첨부파일 없이, 링크 하나로 자료를 전달하는 구조로 쓰세요."}),ce>0&&e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:668",className:"text-[11px] leading-relaxed text-amber-700",children:["자동으로 채워지지 않는 항목이 ",ce,"개 있습니다. 실제 발송 전에는 후보별 완성본에서 확인하세요."]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:674",className:"flex flex-wrap items-center gap-2",children:[e.jsxs(G,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:675",className:"gap-1.5",disabled:ie.isPending,onClick:()=>ie.mutate({id:s.id,campaignId:t,title:u.trim()||"문안",subject:p,body:b,sequenceStep:y}),children:[e.jsx(iu,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:689",className:"size-4"}),ie.isPending?"저장 중":"저장"]}),e.jsxs(G,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:692",variant:"outline",className:"gap-1.5 bg-background",disabled:r,onClick:()=>i(w.trim()||void 0),children:[e.jsx(Dt,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:698",className:"size-4"}),r?"다시 쓰는 중 (약 2분)":"AI로 다시 쓰기"]}),e.jsx(Vx,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:701",text:p?`${p}
679
680${b}`:b,label:"제목+본문 복사",variant:"outline"})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:708",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:709",className:"text-xs text-muted-foreground",children:"다시 쓸 때 반영할 요청 (선택)"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:712",value:w,onChange:O=>T(O.target.value),placeholder:"예: 더 짧게, 가격 이야기는 빼고, 첫 문장을 질문으로",className:"text-sm"}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:718",className:"text-[11px] text-muted-foreground",children:"내용을 덮어씁니다. 직접 고친 부분이 있으면 먼저 저장하세요."})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:724",className:"flex flex-wrap items-center gap-2 border-t pt-3",children:[e.jsxs(G,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:725",variant:"outline",size:"sm",className:"gap-1.5 bg-background",disabled:!p.trim()&&!b.trim(),onClick:()=>E(!0),children:[e.jsx(Bi,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:732",className:"size-3.5"}),"보관함에 저장"]}),e.jsxs(G,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:735",variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground",onClick:()=>_(!0),children:[e.jsx(Cn,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:741",className:"size-3.5"}),"보관함에서 덮어쓰기"]}),e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:744",className:"text-[11px] text-muted-foreground",children:"저장한 문안은 다른 캠페인에서도 불러 쓸 수 있습니다."})]}),e.jsx(E9,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:749",open:k,onOpenChange:E,campaignId:t,draftId:s.id,defaultName:P}),e.jsx(AS,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:756",open:z,onOpenChange:_,campaignId:t,targetDraftId:s.id})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:765",className:"space-y-3 xl:sticky xl:top-6",children:[e.jsx(O9,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:766",isEmptyDraft:W,isFetching:I&&!B,blockers:se.length,warns:L.length,infos:F.length,rechecking:I&&!!B}),e.jsx(Kx,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:777",issues:se,tone:"block"}),e.jsx(Kx,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:778",issues:L,tone:"warn"}),e.jsx(Kx,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:779",issues:F,tone:"info"}),e.jsx(z9,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:781",note:s.generationNote,generatedBy:s.generatedBy,body:`${p}
681${b}`})]})]})}function X1({active:t,onClick:s,icon:c,label:r}){return e.jsxs("button",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:803",type:"button",onClick:s,className:`flex flex-1 items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all active:scale-[0.98] ${t?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:[c,r]})}function Vx({text:t,label:s,variant:c="ghost"}){const[r,i]=v.useState(!1);return e.jsxs(G,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:831",type:"button",variant:c,size:"sm",className:`h-7 ga
681p-1.5 px-2 text-xs ${c==="outline"?"bg-background":""}`,disabled:!t.trim(),onClick:async()=>{try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),1600)}catch{X.error("복사할 수 없습니다. 직접 선택해 복사하세요.")}},children:[r?e.jsx(Et,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:847",className:"size-3.5"}):e.jsx(Lu,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:847",className:"size-3.5"}),r?"복사됨":s]})}function M9({text:t,muted:s=!1}){const c=t.split(/(\[[^\]\n]{1,60}\])/g);return e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:857",className:`whitespace-pre-wrap ${s?"text-muted-foreground":""}`,children:c.map((r,i)=>/^\[[^\]\n]{1,60}\]$/.test(r)?e.jsx("mark",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:860",className:"rounded bg-amber-200/70 px-1 font-medium text-amber-950",children:r},i):e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:867",children:r},i))})}function R9(t){const s=t.match(/\[[^\]\n]{1,60}\]/g)??[],c=r=>r.slice(1,-1).trim().replace(/\s+/g," ").toLowerCase();return new Set(s.map(c)).size}function O9({isEmptyDraft:t,isFetching:s,blockers:c,warns:r,infos:i,rechecking:o=!1}){const u=t?"idle":s?"checking":c>0?"block":"pass",m={idle:{wrap:"border-border bg-muted/40",head:"text-foreground",sub:"text-muted-foreground"},checking:{wrap:"border-border bg-muted/40",head:"text-foreground",sub:"text-muted-foreground"},block:{wrap:"border-rose-200 bg-rose-50",head:"text-rose-900",sub:"text-rose-800"},pass:{wrap:"border-emerald-200 bg-emerald-50",head:"text-emerald-900",sub:"text-emerald-800"}}[u];return e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:918",className:`rounded-xl border p-4 ${m.wrap}`,children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:919",className:`flex items-center gap-2 text-sm font-semibold ${m.head}`,children:u==="idle"?e.jsxs(e.Fragment,{children:[e.jsx(tr,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:922",className:"size-4"}),"아직 검사할 내용이 없습니다"]}):u==="checking"?e.jsxs(e.Fragment,{children:[e.jsx(tr,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:927",className:"size-4"}),"이 나라 규칙으로 검사하고 있습니다"]}):u==="block"?e.jsxs(e.Fragment,{children:[e.jsx(Ea,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:932",className:"size-4"}),"해결해야 할 항목 ",c,"건"]}):e.jsxs(e.Fragment,{children:[e.jsx(Jt,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:937",className:"size-4"}),"문안 기준 통과"]})}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:942",className:`mt-1.5 text-xs leading-relaxed ${m.sub}`,children:u==="idle"?"제목과 본문을 쓰면 이 나라의 금지 표현·필수 문구·팔로업 한도를 실시간으로 검사합니다.":u==="checking"?"금지 표현·필수 문구·팔로업 한도를 확인하는 중입니다.":o?"고친 내용을 다시 검사하고 있습니다. 아래는 직전 결과입니다.":u==="pass"?"국가 규칙과 문안 기준을 통과했습니다. 실제 발송 전에는 발송 탭에서 후보·서명·SMTP·사장님 승인을 모두 확인하세요.":"아래 항목을 차단·경고·참고 순으로 정리했습니다."}),(u==="block"||u==="pass")&&e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:955",className:"mt-3 flex flex-wrap gap-1.5",children:[e.jsx(Fx,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:956",n:c,label:"차단",tone:"block"}),e.jsx(Fx,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:957",n:r,label:"경고",tone:"warn"}),e.jsx(Fx,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:958",n:i,label:"참고",tone:"info"})]})]})}function Fx({n:t,label:s,tone:c}){const r={block:t>0?"bg-rose-200/80 text-rose-900":"bg-background/70 text-muted-foreground",warn:t>0?"bg-amber-200/80 text-amber-900":"bg-background/70 text-muted-foreground",info:t>0?"bg-slate-200/80 text-slate-800":"bg-background/70 text-muted-foreground"}[c];return e.jsxs("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:981",className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-medium ${r}`,children:[t===0&&e.jsx(vN,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:984",className:"size-2.5"}),s," ",t]})}function z9({note:t,generatedBy:s,body:c}){if(s!=="ai"||!t)return null;let r;try{r=JSON.parse(t)}catch{return null}const i=r.placeholders??[],o=r.channelTips??[],u=r.rationale??[],m=i.filter(f=>c.includes(f.token)).length,p=i.length-m;return e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1022",className:"space-y-3",children:[i.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1024",className:"overflow-hidden rounded-xl border border-amber-200 bg-amber-50/70",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1025",className:"flex items-center gap-2 border-b border-amber-200/70 px-4 py-3",children:[e.jsx(js,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1026",className:"size-4 shrink-0 text-amber-700"}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1027",className:"text-sm font-semibold text-amber-950",children:"발송 전에 채울 항목"}),e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1028",className:"ml-auto rounded-full bg-amber-200/70 px-2 py-0.5 text-xs font-medium text-amber-900",children:m===0?"모두 채웠습니다":`${m}개 남음`})]}),p>0&&m>0&&e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1033",className:"border-b border-amber-200/50 bg-amber-100/40 px-4 py-2 text-[11px] text-amber-800",children:[i.length,"개 중 ",p,"개를 채웠습니다."]}),e.jsx("ul",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1037",className:"divide-y divide-amber-200/50",children:i.map(f=>{const b=!c.includes(f.token);return e.jsx("li",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1041",className:"px-4 py-2.5",children:e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1042",className:"flex items-start gap-2",children:[b?e.jsx(Et,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1044",className:"mt-0.5 size-3.5 shrink-0 text-emerald-600"}):e.jsx(vN,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1046",className:"mt-0.5 size-3.5 shrink-0 text-amber-500"}),e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1048",className:"space-y-0.5",children:[e.jsx("code",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1049",className:`rounded px-1 py-0.5 font-mono text-[11px] ${b?"bg-emerald-100 text-emerald-900 line-through":"bg-amber-100 text-amber-950"}`,children:f.token}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1058",className:"text-xs leading-relaxed text-amber-900",children:f.why})]})]})},f.token)})}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1065",className:"border-t border-amber-200/70 px-4 py-2.5 text-[11px] leading-relaxed text-amber-800",children:"대괄호가 남아 있으면 발송이 잠깁니다. 담당자 이름과 연락처는 사람이 확인해서 넣으세요."})]}),o.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1073",className:"rounded-xl border bg-card p-4",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1074",className:"flex items-center gap-2 text-sm font-semibold",children:[e.jsx(Ag,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1075",className:"size-4 text-primary"}),"현지 연락 방식과 시기"]}),e.jsx("ul",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1078",className:"mt-2.5 space-y-2",children:o.map((f,b)=>e.jsxs("li",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1080",className:"flex gap-2 text-xs leading-relaxed text-muted-foreground",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1081",className:"mt-1.5 size-1.5 shrink-0 rounded-full bg-primary/40"}),e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1082",children:f})]},b))})]}),u.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1090",className:"rounded-xl border border-dashed p-4",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1091",className:"text-sm font-semibold",children:"이렇게 쓴 이유"}),e.jsx("ul",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1092",className:"mt-2.5 space-y-2",children:u.map((f,b)=>e.jsxs("li",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1094",className:"flex gap-2 text-xs leading-relaxed text-muted-foreground",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1095",className:"mt-1.5 size-1.5 shrink-0 rounded-full bg-muted-foreground
681/30"}),e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1096",children:f})]},b))})]})]})}function Kx({issues:t,tone:s}){if(t.length===0)return null;const c={block:{wrap:"border-rose-200 bg-rose-50/70",text:"text-rose-900",icon:e.jsx(Ea,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1119",className:"size-3.5"})},warn:{wrap:"border-amber-200 bg-amber-50/70",text:"text-amber-900",icon:e.jsx(js,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1124",className:"size-3.5"})},info:{wrap:"border-border bg-muted/40",text:"text-foreground",icon:e.jsx(tr,{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1129",className:"size-3.5"})}}[s];return e.jsx("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1134",className:"space-y-2",children:t.map((r,i)=>e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1136",className:`rounded-lg border p-3.5 ${c.wrap}`,children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1137",className:`flex items-start gap-2 text-sm font-semibold ${c.text}`,children:[e.jsx("span",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1138",className:"mt-0.5 shrink-0",children:c.icon}),r.title]}),e.jsx("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1141",className:`mt-1.5 text-xs leading-relaxed ${c.text} opacity-90`,children:r.fix}),r.basis&&e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftsTab.tsx:1145",className:`mt-1.5 text-[11px] ${c.text} opacity-60`,children:["근거: ",r.basis]})]},i))})}function L9({campaignId:t,draftId:s}){const[c,r]=v.useState(!1),[i,o]=v.useState(!1),[u,m]=v.useState(null),{data:p,isPending:f}=q.gateway.send.previews.useQuery({campaignId:t,draftId:s,onlyGaps:i},{enabled:c});return e.jsxs("div",{"data-loc":"client/src/components/campaign/SendPreview.tsx:32",className:"rounded-xl border bg-card",children:[e.jsxs("button",{"data-loc":"client/src/components/campaign/SendPreview.tsx:33",onClick:()=>r(b=>!b),className:"flex w-full items-center justify-between gap-3 p-4 text-left transition-colors hover:bg-muted/40",children:[e.jsxs("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:37",className:"min-w-0",children:[e.jsxs("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:38",className:"flex items-center gap-2 text-sm font-semibold",children:[e.jsx(jN,{"data-loc":"client/src/components/campaign/SendPreview.tsx:39",className:"size-4 text-muted-foreground"}),"후보별로 실제 나갈 모습 확인"]}),e.jsx("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:42",className:"mt-1 block text-xs leading-relaxed text-muted-foreground",children:"회사명·담당자명·도시를 후보 정보로 채워 보여줍니다. 채울 수 없는 항목은 대괄호로 남습니다."})]}),e.jsx(ns,{"data-loc":"client/src/components/campaign/SendPreview.tsx:47",className:`size-4 shrink-0 text-muted-foreground transition-transform duration-200 ${c?"rotate-180":""}`})]}),c&&e.jsx("div",{"data-loc":"client/src/components/campaign/SendPreview.tsx:55",className:"border-t p-4",children:f?e.jsxs("div",{"data-loc":"client/src/components/campaign/SendPreview.tsx:57",className:"space-y-2",children:[e.jsx(we,{"data-loc":"client/src/components/campaign/SendPreview.tsx:58",className:"h-16 rounded-lg"}),e.jsx(we,{"data-loc":"client/src/components/campaign/SendPreview.tsx:59",className:"h-16 rounded-lg"})]}):p?e.jsxs("div",{"data-loc":"client/src/components/campaign/SendPreview.tsx:64",className:"space-y-3",children:[p.coverage.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/SendPreview.tsx:67",className:"space-y-1.5 rounded-lg bg-muted/40 p-3",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendPreview.tsx:68",className:"text-xs font-semibold",children:"자리표시 채움 현황"}),p.coverage.map(b=>e.jsxs("p",{"data-loc":"client/src/components/campaign/SendPreview.tsx:70",className:"flex items-center justify-between gap-3 text-xs",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:74",className:"min-w-0 truncate font-mono text-muted-foreground",children:b.token}),e.jsxs("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:77",className:`tnum shrink-0 font-semibold ${b.missing===0?"text-emerald-700":"text-amber-700"}`,children:[b.filled," / ",p.totalCount,"곳 채움",b.field===null&&" (직접 입력)"]})]},b.token))]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendPreview.tsx:90",className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/SendPreview.tsx:91",className:"text-xs text-muted-foreground",children:["전체 ",e.jsx("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:92",className:"tnum font-semibold",children:p.totalCount}),"곳",p.gapCount>0&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:96",className:"tnum font-semibold text-amber-700",children:[p.gapCount,"곳"]}),"에 빈칸 남음"]})]}),p.gapCount>0&&e.jsx(G,{"data-loc":"client/src/components/campaign/SendPreview.tsx:104",size:"sm",variant:i?"default":"outline",className:i?"":"bg-background",onClick:()=>o(b=>
681!b),children:"빈칸 남은 곳만"})]}),p.items.length===0?e.jsx("p",{"data-loc":"client/src/components/campaign/SendPreview.tsx:116",className:"rounded-lg border border-dashed py-8 text-center text-sm text-muted-foreground",children:i?"빈칸이 남은 후보가 없습니다.":"발송 대상 후보가 없습니다."}):e.jsx("ul",{"data-loc":"client/src/components/campaign/SendPreview.tsx:122",className:"space-y-2",children:p.items.map(b=>e.jsxs("li",{"data-loc":"client/src/components/campaign/SendPreview.tsx:124",className:"rounded-lg border",children:[e.jsxs("button",{"data-loc":"client/src/components/campaign/SendPreview.tsx:125",onClick:()=>m(h=>h===b.candidateId?null:b.candidateId),className:"flex w-full items-start justify-between gap-3 p-3 text-left transition-colors hover:bg-muted/40",children:[e.jsxs("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:131",className:"min-w-0",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:132",className:"block truncate text-sm font-medium",children:b.companyName}),e.jsx("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:135",className:"mt-0.5 block truncate text-xs text-muted-foreground",children:b.email??"이메일 없음"})]}),e.jsx("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:139",className:"shrink-0",children:b.remaining.length===0?e.jsxs("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:141",className:"inline-flex items-center gap-1 rounded-full bg-emerald-50 px-2 py-0.5 text-xs font-medium text-emerald-700",children:[e.jsx(Et,{"data-loc":"client/src/components/campaign/SendPreview.tsx:142",className:"size-3"}),"빈칸 없음"]}):e.jsxs("span",{"data-loc":"client/src/components/campaign/SendPreview.tsx:146",className:"inline-flex items-center gap-1 rounded-full bg-amber-50 px-2 py-0.5 text-xs font-medium text-amber-800",children:[e.jsx(St,{"data-loc":"client/src/components/campaign/SendPreview.tsx:147",className:"size-3"}),"빈칸 ",b.remaining.length,"개"]})})]}),u===b.candidateId&&e.jsxs("div",{"data-loc":"client/src/components/campaign/SendPreview.tsx:155",className:"space-y-2 border-t p-3",children:[b.remaining.length>0&&e.jsxs("p",{"data-loc":"client/src/components/campaign/SendPreview.tsx:157",className:"rounded bg-amber-50 px-2 py-1.5 text-xs leading-relaxed text-amber-900",children:["직접 채워야 함: ",b.remaining.join(", ")]}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendPreview.tsx:161",className:"text-xs font-semibold text-muted-foreground",children:"제목"}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendPreview.tsx:164",className:"text-sm leading-relaxed",children:b.subject}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendPreview.tsx:165",className:"pt-1 text-xs font-semibold text-muted-foreground",children:"본문"}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendPreview.tsx:168",className:"whitespace-pre-wrap text-sm leading-relaxed",children:b.body}),e.jsxs(G,{"data-loc":"client/src/components/campaign/SendPreview.tsx:171",size:"sm",variant:"outline",className:"gap-1.5 bg-background",onClick:()=>{navigator.clipboard.writeText(`${b.subject}
682
683${b.body}`),X.success("제목과 본문을 복사했습니다.")},children:[e.jsx(Lu,{"data-loc":"client/src/components/campaign/SendPreview.tsx:182",className:"size-3.5"}),"이 후보용 복사"]})]})]},b.candidateId))})]}):e.jsx("p",{"data-loc":"client/src/components/campaign/SendPreview.tsx:62",className:"text-sm text-muted-foreground",children:"불러올 수 없습니다."})})]})}function B9(t){const s=t.candidates.eligibleBeforeMerge>0,c=t.draft.exists&&t.draft.belongsToCampaign&&t.draft.lintPassed,r=t.signature.replyToValid&&(t.placeholders.readyCandidates>0||!s);return{candidates:s,draft:c,signature:r,all:s&&c&&r}}function U9(t){return t.candidates.total===0?"후보가 아직 없습니다.":t.candidates.eligibleBeforeMerge===0?`전체 ${t.candidates.total}곳 · 이메일 없음 ${t.candidates.missingEmail} · 주소 오류 ${t.candidates.invalidEmail} · 등급/상태 제외 ${t.candidates.statusOrTierExcluded}`:t.draft.exists?t.draft.lintPassed?t.signature.replyToValid?t.placeholders.blockedCandidates>0?`${t.placeholders.blockedCandidates}곳은 [자리표시]가 남아 자동 제외됩니다.`:"발송 대상 계산을 다시 확인하세요.":"국가별 서명의 회신 이메일을 확인하세요.":"문안 교정에서 해결할 항목이 남아 있습니다.":"저장된 문안이 없습니다."}function I9({campaignId:t,isBlock:s,onMoveToTab:c}){const{data:r,isPending:i,isError:o}=q.gateway.drafts.list.useQuery({campaignId:t}),[u,m]=v.useState(null),[p,f]=v.useState(!1),[b,h]=v.useState(!1);v.useEffect(()=>{u===null&&r&&r.length>0&&m(r[0].id)},[r,u]);const{data:y,isLoading:j}=q.gateway.send.preflight.useQuery({campaignId:t,draftId:u??0}),{data:S}=q.gateway.send.attempts.useQuery({campaignId:t}),{data:N}=q.gateway.schedule.list.useQuery({campaignId:t}),{data:w,isLoading:T}=q.gateway.automation.approvalPreview.useQuery({campaignId:t,...u?{draftId:u}:{}}),k=q.useUtils(),E=q.gateway.automation.approveAndSchedule.useMutation({onSuccess:_=>
683{k.gateway.schedule.list.invalidate({campaignId:t}),k.gateway.automation.approvalPreview.invalidate({campaignId:t}),k.gateway.campaigns.get.invalidate({id:t}),k.gateway.campaigns.activity.invalidate({id:t}),f(!1),h(!1),X.success(`${_.targetCount}곳 자동 발송을 최종 승인했습니다.`)},onError:_=>X.error(_.message)}),z=q.gateway.schedule.setStatus.useMutation({onSuccess:()=>k.gateway.schedule.list.invalidate({campaignId:t}),onError:_=>X.error(_.message)});return s?e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:90",className:"rounded-xl border border-slate-800 bg-slate-900 p-6 text-slate-100",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:91",className:"flex items-center gap-2 font-semibold",children:[e.jsx(Ea,{"data-loc":"client/src/components/campaign/SendTab.tsx:92",className:"size-4"}),"발송할 수 없습니다"]}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:95",className:"mt-2 text-sm leading-relaxed text-slate-300",children:"이 국가는 콜드메일이 금지되어 있습니다. 브리핑 탭의 대안 경로를 확인하세요."})]}):i?e.jsx(we,{"data-loc":"client/src/components/campaign/SendTab.tsx:105",className:"h-48 rounded-xl"}):o?e.jsx("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:110",className:"rounded-xl border border-amber-200 bg-amber-50 px-4 py-3.5 text-sm leading-relaxed text-amber-900",children:"문안 목록을 불러오지 못했습니다. 새로고침해도 같으면 알려주세요."}):(r?.length??0)===0?e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:118",className:"space-y-4",children:[e.jsx(Z1,{"data-loc":"client/src/components/campaign/SendTab.tsx:119",pre:y,onMoveToTab:c}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:120",className:"rounded-xl border border-dashed py-12 text-center",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:121",className:"text-sm font-medium",children:"발송할 문안이 아직 없습니다"}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:122",className:"mx-auto mt-1.5 max-w-md text-sm leading-relaxed text-muted-foreground",children:"문안 탭에서 제목과 본문을 저장하면 교정기가 이 나라의 규칙으로 검사합니다. 검사를 통과한 문안만 여기서 고를 수 있습니다."}),e.jsx(G,{"data-loc":"client/src/components/campaign/SendTab.tsx:126",className:"mt-4",variant:"outline",onClick:()=>c?.("drafts"),children:"문안 작성하러 가기"})]})]}):e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:133",className:"space-y-6",children:[e.jsx(Z1,{"data-loc":"client/src/components/campaign/SendTab.tsx:134",pre:y,onMoveToTab:c}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:135",className:"space-y-2 rounded-2xl border border-border/80 bg-card/96 p-4 shadow-[0_16px_40px_-34px_rgba(18,35,61,.5)]",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:136",className:"page-kicker",children:"Selected Draft"}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:137",className:"text-sm font-semibold",children:"보낼 문안"}),e.jsxs(et,{"data-loc":"client/src/components/campaign/SendTab.tsx:138",value:u?String(u):void 0,onValueChange:_=>m(Number(_)),children:[e.jsx(at,{"data-loc":"client/src/components/campaign/SendTab.tsx:142",className:"max-w-sm",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/SendTab.tsx:143",placeholder:"문안 선택"})}),e.jsx(st,{"data-loc":"client/src/components/campaign/SendTab.tsx:145",children:r?.map(_=>e.jsxs(ve,{"data-loc":"client/src/components/campaign/SendTab.tsx:147",value:String(_.id),children:[_.title,_.lintPassed?"":" (교정 미통과)"]},_.id))})]})]}),j?e.jsx(we,{"data-loc":"client/src/components/campaign/SendTab.tsx:157",className:"h-48 rounded-xl"}):y?e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:160",className:`rounded-2xl border p-5 shadow-[0_16px_40px_-34px_rgba(18,35,61,.48)] ${y.canSend?"border-emerald-200 bg-emerald-50":"border-rose-200 bg-rose-50"}`,children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:167",className:`flex items-center gap-2 font-semibold ${y.canSend?"text-emerald-900":"text-rose-900"}`,children:y.canSend?e.jsxs(e.Fragment,{children:[e.jsx(Jt,{"data-loc":"client/src/components/campaign/SendTab.tsx:174",className:"size-4"}),"발송 조건을 모두 통과했습니다"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ea,{"data-loc":"client/src/components/campaign/SendTab.tsx:179",className:"size-4"}),"아직 보낼 수 없습니다"]})}),e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:184",className:`mt-1.5 text-sm ${y.canSend?"text-emerald-800":"text-rose-800"}`,children:["발송 대상 ",e.jsx("span",{"data-loc":"client/src/components/campaign/SendTab.tsx:187",className:"tnum font-bold",children:y.sendableCount}),"건 / 전체 후보 ",e.jsx("span",{"data-loc":"client/src/components/campaign/SendTab.tsx:188",className:"tnum font-bold",children:y.totalCount}),"건"]}),y.blockers.length>0&&e.jsx("ul",{"data-loc":"client/src/components/campaign/SendTab.tsx:192",className:"mt-3 space-y-1.5",children:y.blockers.map((_,R)=>e.jsxs("li",{"data-loc":"client/src/components/campaign/SendTab.tsx:194",className:"flex gap-2 text-sm leading-relaxed text-rose-900",children:[e.jsx(Ea,{"data-loc":"client/src/components/campaign/SendTab.tsx:198",className:"mt-0.5 size-3.5 shrink-0"}),_]},R))})]}),y.warnings.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:207",className:"rounded-xl border border-amber-200 bg-amber-50 p-4",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:208",className:"flex items-center gap-2 text-sm font-semibold text-amber-900",children:[e.jsx(js,{"data-loc":"client/src/components/campaign/SendTab.tsx:209",className:"size-4"}),"확인하고 진행하세요"]}),e.jsx("ul",{"data-loc":"client/src/components/campaign/SendTab.tsx:212",className:"mt-2 space-y-1.5",children:y.warnings.map((_,R)=>e.jsx("li",{"data-loc":"client/src/components/campaign/SendTab.tsx:214",className:"text-sm leading-relaxed text-amber-900",children:_},R))})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:223",className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:224",className:"rounded-2xl border border-border/80 bg-card/96 p-4 shadow-[0_12px_34px_-30px_rgba(18,35,61,.42)]",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:225",className:"flex items-center gap-2 text-sm font-semibold",children:[e.jsx(tr,{"data-loc":"client/src/components/campaign/SendTab.tsx:226",className:"size-4 text-muted-foreground"}),"팔로업 한도"]}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:229",className:"mt-1.5 text-sm text-muted-foreground",children:y.followupLimit===0?"최초 1통만 허용됩니다.":`팔로업 ${y.followupLimit}회까지 허용됩니다.`})]}),(y.weekend||y.blackout)&&e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:236",className:"rounded-2xl border border-border/80 bg-card/96 p-4 shadow-[0_12px_34px_-30px_rgba(18,35,61,.42)]",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:237",className:"flex items-center gap-2 text-sm font-semibold",children:[e.jsx(Sg,{"data-loc":"client/src/components/campaign/SendTab.tsx:238",className:"size-4 text-muted-foreground"}),"피할 시기"]}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:241",className:"mt-1.5 text-sm text-muted-foreground",children:[y.weekend,y.blackout].filter(
683Boolean).join(" · ")})]})]}),u!==null&&e.jsx(L9,{"data-loc":"client/src/components/campaign/SendTab.tsx:250",campaignId:t,draftId:u}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:253",className:"rounded-2xl border border-primary/20 bg-[linear-gradient(135deg,rgba(255,255,255,.92),rgba(239,246,255,.78))] p-4 shadow-[0_14px_36px_-32px_rgba(37,99,235,.42)]",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:254",className:"text-sm font-semibold",children:"발송 방식 안내"}),e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:255",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:[e.jsx("strong",{"data-loc":"client/src/components/campaign/SendTab.tsx:256",className:"font-medium text-foreground",children:y.smtpFrom??"설정된 SMTP 계정"}),"에서 수신자별로 한 통씩 실제 발송합니다. 답장은 내 서명 정보의 회신 주소 모두에게 오며, 채워지지 않은 [자리표시]가 있는 후보는 보내지 않습니다. 한 번에 최대 ",y.batchLimit,"곳, 오늘은 ",y.dailyRemaining,"곳까지 발송할 수 있습니다."]})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:262",className:"rounded-2xl border border-sky-200 bg-[linear-gradient(135deg,rgba(240,249,255,.96),rgba(236,254,255,.8))] p-4 shadow-[0_16px_38px_-32px_rgba(14,165,233,.48)]",children:e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:263",className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:264",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:265",className:"flex items-center gap-2 text-sm font-semibold text-sky-950",children:[e.jsx(ru,{"data-loc":"client/src/components/campaign/SendTab.tsx:266",className:"size-4"}),"예약 발송·간격 분산"]}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:269",className:"mt-1 text-sm leading-relaxed text-sky-900",children:"후보·1차 문안·자동 상속 서명·제품 자료·국가 규칙·발송 일정을 한 번 확인하세요. 사장님이 최종 승인한 뒤부터 현지 업무시간에 한 통씩 자동 발송하며, 하루 한도에 닿으면 다음 영업일로 이월합니다."})]}),e.jsxs(G,{"data-loc":"client/src/components/campaign/SendTab.tsx:274",variant:"outline",className:"border-sky-300 bg-white text-sky-950",disabled:!y.canSend||T||!w?.canApprove||E.isPending,onClick:()=>{h(!1),f(!0)},children:[e.jsx(ru,{"data-loc":"client/src/components/campaign/SendTab.tsx:283",className:"mr-2 size-4"}),"1차 문안 최종 승인"]})]})}),(N?.length??0)>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:290",className:"overflow-hidden rounded-2xl border border-border/80 bg-card/96 shadow-[0_16px_40px_-34px_rgba(18,35,61,.48)]",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:291",className:"flex items-center justify-between border-b px-4 py-3",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:292",className:"text-sm font-semibold",children:"예약 발송 현황"}),e.jsx("span",{"data-loc":"client/src/components/campaign/SendTab.tsx:293",className:"text-xs text-muted-foreground",children:"한 번에 한 통씩만 처리합니다"})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:295",className:"divide-y",children:N.slice(0,5).map(_=>e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:297",className:"flex flex-wrap items-center justify-between gap-3 px-4 py-3 text-sm",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:298",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:299",className:"font-medium",children:[_.targetCount,"곳 · ",_.minIntervalMinutes,"~",_.maxIntervalMinutes,"분 간격"]}),e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:300",className:"mt-0.5 text-xs text-muted-foreground",children:[_.sentCount,"건 발송 · ",_.failedCount,"건 실패 · ",_.skippedCount,"건 제외 · 다음 ",new Date(_.nextRunAt).toLocaleStr
683ing("ko-KR")]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:304",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/SendTab.tsx:305",className:_.status==="completed"?"text-xs font-medium text-emerald-700":_.status==="failed"?"text-xs font-medium text-rose-700":"text-xs font-medium text-sky-700",children:_.status==="scheduled"?"대기":_.status==="running"?"발송 중":_.status==="paused"?"일시정지":_.status==="completed"?"완료":_.status==="cancelled"?"취소":"실패"}),(_.status==="scheduled"||_.status==="running")&&e.jsx(G,{"data-loc":"client/src/components/campaign/SendTab.tsx:309",size:"icon",variant:"outline",title:"일시정지",onClick:()=>z.mutate({campaignId:t,jobId:_.id,action:"pause"}),children:e.jsx(_N,{"data-loc":"client/src/components/campaign/SendTab.tsx:309",className:"size-3.5"})}),_.status==="paused"&&e.jsx(G,{"data-loc":"client/src/components/campaign/SendTab.tsx:312",size:"icon",variant:"outline",title:"재개",onClick:()=>z.mutate({campaignId:t,jobId:_.id,action:"resume"}),children:e.jsx(DA,{"data-loc":"client/src/components/campaign/SendTab.tsx:312",className:"size-3.5"})}),!["completed","cancelled"].includes(_.status)&&e.jsx(G,{"data-loc":"client/src/components/campaign/SendTab.tsx:315",size:"icon",variant:"outline",title:"취소",onClick:()=>z.mutate({campaignId:t,jobId:_.id,action:"cancel"}),children:e.jsx(yl,{"data-loc":"client/src/components/campaign/SendTab.tsx:315",className:"size-3.5"})})]})]},_.id))})]}),(S?.length??0)>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:325",className:"overflow-hidden rounded-2xl border border-border/80 bg-card/96 shadow-[0_16px_40px_-34px_rgba(18,35,61,.48)]",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:326",className:"flex items-center justify-between border-b px-4 py-3",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:327",className:"text-sm font-semibold",children:"최근 SMTP 발송 이력"}),e.jsx("span",{"data-loc":"client/src/components/campaign/SendTab.tsx:328",className:"text-xs text-muted-foreground",children:"성공과 실패를 모두 보관합니다"})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:330",className:"divide-y",children:S.slice(0,10).map(_=>e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:332",className:"flex flex-wrap items-center justify-between gap-2 px-4 py-2.5 text-xs",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:333",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:334",className:"truncate font-medium",children:_.recipient}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:335",className:"mt-0.5 text-muted-foreground",children:new Date(_.attemptedAt).toLocaleString("ko-KR")})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:337",className:"text-right",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/SendTab.tsx:338",className:_.status==="accepted"?"font-medium text-emerald-700":"font-medium text-rose-700",children:_.status==="accepted"?"SMTP 수락":"전송 실패"}),_.status==="failed"&&_.errorMessage&&e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:342",className:"mt-0.5 max-w-64 truncate text-muted-foreground",title:_.errorMessage,children:_.errorMessage})]})]},_.id))})]}),e.jsx(ta,{"data-loc":"client/src/components/campaign/SendTab.tsx:351",open:p,onOpenChange:f,children:e.jsxs(aa,{"data-loc":"client/src/components/campaign/SendTab.tsx:352",className:"max-h-[90vh] overflow-y-auto sm:max-w-xl",children:[e.jsxs(sa,{"data-loc":"client/src/components/campaign/SendTab.tsx:353",children:[e.jsx(na,{"data-loc":"client/src/components/campaign/SendTab.tsx:354",children:"1차 문안 최종 승인"}),e.jsx(ca,{"data-loc":"client/src/components/campaign/SendTab.tsx:355",children:"이 승인 이후에는 아래 스냅샷만 사용해 현지 업무시간에 자동 발송합니다. 문안·후보·서명·자료를 바꾸려면 기존 예약을 취소하고 다시 승인해야 합니다."})]}),w&&e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:359",className:"grid gap-3 text-sm",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:360",className:"grid grid-cols-2 gap-3 rounded-xl bg-muted/60 p-4",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:361",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:361",className:"text-xs text-muted-foreground",children:"후보"}),e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:361",className:"mt-1 font-semibold",children:[w.candidateCount,"곳"]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:362",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:362",className:"text-xs text-muted-foreground",children:"1차 문안"}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:362",className:"mt-1 font-semibold",children:w.draft?.title??"-"})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:363",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:363",className:"text-xs text-muted-foreground",children:"적용 서명"}),e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:363",className:"mt-1 font-semibold",children:[w.signature.profileName," · ",w.signature.source==="country"?"국가 자동 선택":w.signature.source==="default"?"기본 서명 상속":w.signature.source==="campaign"?"캠페인 수동 선택":"기존 기본 정보"]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:364",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:364",className:"text-xs text-muted-foreground",children:"회신 주소"}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:364",className:"mt-1 truncate font-semibold",children:w.signature.validReplyTo.join(", ")||"-"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:366",className:"rounded-xl border border-sky-200 bg-sky-50 p-3.5 text-sky-950",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:367",className:"font-semibold",children:[w.campaign.countryNameKo," 현지 ",w.schedule.localLabel,"부터"]}),e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:368",className:"mt-1 text-xs leading-relaxed",children:[w.schedule.reason," · ",w.schedule.minIntervalMinutes,"~",w.schedule.maxIntervalMinutes,"분 간격 · 일일 최대 ",w.schedule.effectiveDailyLimit,"통"]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:370",className:"rounded-xl border p-3.5",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:371",className:"font-semibold",children:["자동 포함 제품 자료 ",w.assets.length,"개"]}),w.assets.length>0?e.jsx("ul",{"data-loc":"client/src/components/campaign/SendTab.tsx:372",className:"mt-2 space-y-1 text-xs text-muted-foreground",children:w.assets.map(_=>e.jsxs("li",{"data-loc":"client/src/components/campaign/SendTab.tsx:372",children:["• ",_.title," · ",_.sourceType.includes("drive")?"Drive 링크":_.sourceType==="upload"?"소용량 첨부":"외부 링크"]},_.id))}):e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:372",className:"mt-1 text-xs text-muted-foreground",children:"포함할 자료가 없습니다. 제품 자료실에 등록하면 다음 승인부터 자동 추천합니다."})]}),(w.policy.requiredElements||w.policy.forbidden||w.policy.blackout)&&e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:374",className:"rounded-xl border border-amber-200 bg-amber-50 p-3.5 text-xs leading-relaxed text-amber-950",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:375",className:"font-semibold",children:"국가 규칙·컬쳐핏 최종 점검"}),w.policy.requiredElements&&e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:376",className:"mt-1",children:["필수: ",w.policy.requiredElements]}),w.policy.forbidden&&e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:377",className:"mt-1",children:["금지: ",w.policy.forbidden]}),w.policy.blackout&&e.jsxs("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:378",className:"mt-1",children:["피할 시기: ",w.policy.blackout]})]}),w.blockers.length>0&&e.jsx("ul",{"data-loc":"client/src/components/campaign/SendTab.tsx:380",className:"rounded-xl border border-rose-200 bg-rose-50 p-3.5 text-xs text-rose-900",children:w.blockers.map(_=>e.jsxs("li",{"data-loc":"client/src/components/campaign/SendTab.tsx:380",children:["• ",_]},_))}),e.jsxs("label",{"data-loc":"client/src/components/campaign/SendTab.tsx:381",className:"flex cursor-pointer items-start gap-2 rounded-lg border bg-card p-3 text-sm leading-relaxed",children:[e.jsx($a,{"data-loc":"client/src/components/campaign/SendTab.tsx:382",checked:b,onCheckedChange:_=>h(!!_)}),e.jsx("span",{"data-loc":"client/src/components/campaign/SendTab.tsx:383",children:"이 1차 문안·후보·서명·자료·국가 규칙으로 자동 발송을 시작하며, 플랫폼은 회신을 읽어 Slack으로 알릴 뿐 자동 회신하지 않음을 확인했습니다."})]})]}),e.jsxs(_a,{"data-loc":"client/src/components/campaign/SendTab.tsx:386",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/SendTab.tsx:387",variant:"outline",className:"bg-background",onClick:()=>f(!1),children:"취소"}),e.jsx(G,{"data-loc":"client/src/components/campaign/SendTab.tsx:388",disabled:E.isPending||!b||!w?.canApprove||!w.draft,onClick:()=>w?.draft&&E.mutate({campaignId:t,draftId:w.draft.id,candidateIds:w.candidateIds,assetIds:w.assets.map(_=>_.id)}),children:E.isPending?"승인 저장 중":"최종 승인하고 자동화 시작"})]})]})})]}):null]})}function Z1({pre:t,onMoveToTab:s}){const c=t?.readiness,r=c?B9(c):{candidates:!1,draft:!1,signature:!1},i=r.candidates,o=r.draft,u=r.signature,m=[{step:"1",title:"보낼 후보",ready:i,detail:c?i?`${c.candidates.eligibleBeforeMerge}곳이 이메일·등급 검사를 통과했습니다.`:U9(c):"후보 상태를 확인하고 있습니다.",action:"후보 탭으로",onClick:()=>
683s?.("candidates")},{step:"2",title:"문안·교정",ready:o,detail:c?c.draft.exists?c.draft.belongsToCampaign?c.draft.lintPassed?"선택 문안이 국가 규칙 교정을 통과했습니다.":"교정에서 해결할 항목이 남아 있습니다.":"다른 캠페인의 문안입니다.":"저장된 문안이 없습니다.":"문안 상태를 확인하고 있습니다.",action:"문안 탭으로",onClick:()=>s?.("drafts")},{step:"3",title:"서명·완성본",ready:u,detail:c?c.signature.configured?c.signature.replyToValid?c.placeholders.blockedCandidates>0?`${c.placeholders.blockedCandidates}곳은 [자리표시]가 남아 자동 제외됩니다. 후보 정보로 채우거나 문안에서 직접 고치세요.`:"선택 서명과 후보 정보가 완성본에 적용됐습니다.":"서명의 회신 이메일을 확인하세요.":"국가별 서명을 먼저 등록하세요.":"서명과 자리표시를 확인하고 있습니다.",action:c?.signature.replyToValid?"문안 탭으로":"국가별 서명으로",onClick:()=>c?.signature.replyToValid?s?.("drafts"):window.location.href="/signatures"}];return e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:429",className:"rounded-2xl border border-border/80 bg-card/96 p-4 shadow-[0_18px_44px_-34px_rgba(18,35,61,.5)] md:p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:430",className:"mb-3",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:431",className:"page-kicker",children:"Send Readiness"}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:432",className:"mt-1 font-bold tracking-tight",children:"발송 준비 3단계"}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:433",className:"mt-1 text-sm text-muted-foreground",children:"아래 세 칸이 모두 완료되면 실제 발송 버튼이 열립니다."})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:435",className:"grid gap-3 lg:grid-cols-3",children:m.map(p=>e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:436",className:`rounded-xl border p-3.5 transition-colors ${p.ready?"border-emerald-200 bg-emerald-50/75":"border-amber-200 bg-amber-50/75"}`,children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/SendTab.tsx:437",className:"flex items-center gap-2",children:[p.ready?e.jsx(Dn,{"data-loc":"client/src/components/campaign/SendTab.tsx:438",className:"size-4 text-emerald-700"}):e.jsx("span",{"data-loc":"client/src/components/campaign/SendTab.tsx:438",className:"grid size-5 place-items-center rounded-full bg-amber-200 text-[11px] font-bold text-amber-900",children:p.step}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:439",className:"text-sm font-semibold",children:p.title}),e.jsx("span",{"data-loc":"client/src/components/campaign/SendTab.tsx:440",className:`ml-auto text-xs font-medium ${p.ready?"text-emerald-700":"text-amber-800"}`,children:p.ready?"완료":"확인 필요"})]}),e.jsx("p",{"data-loc":"client/src/components/campaign/SendTab.tsx:442",className:"mt-2 min-h-10 text-xs leading-relaxed text-muted-foreground",children:p.detail}),!p.ready&&e.jsxs(G,{"data-loc":"client/src/components/campaign/SendTab.tsx:443",variant:"ghost",size:"sm",className:"mt-1 h-7 px-1.5 text-xs",onClick:p.onClick,children:[p.action,e.jsx(nA,{"data-loc":"client/src/components/campaign/SendTab.tsx:443",className:"ml-1 size-3"})]})]},p.step))})]})}const H9={campaign_created:{label:"캠페인 생성",className:"bg-muted text-muted-foreground"},candidate_added:{label:"후보 추가",className:"bg-blue-50 text-blue-700"},candidate_imported:{label:"후보 일괄 추가",className:"bg-blue-50 text-blue-700"},draft_created:{label:"문안 생성",className:"bg-indigo-50 text-indigo-700"},sent:{label:"발송 기록",className:"bg-emerald-50 text-emerald-700"},send_blocked:{label:"발송 차단",className:"bg-rose-50 text-rose-700"},comment:{label:"메모",className:"bg-muted text-muted-foreground"}};function $9({campaignId:t}){const{data:s,isLoading:c}=q.gateway.campaigns.activity.useQuery({id:t}),r=q.useUtils(),[i,o]=v.useState(""),u=q.gateway.campaigns.comment.useMutation({onSuccess:()=>{r.gateway.campaigns.activity.invalidate({id:t}),o("")},onError:m=>X.error(m.message)});return e.jsxs("div",{"data-loc":"client/src/components/campaign/ActivityTab.tsx:34",className:"space-y-5",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/ActivityTab.tsx:35",className:"rounded-xl border bg-card p-4",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/ActivityTab.tsx:36",className:"flex items-center gap-2 text-sm font-semibold",children:[e.jsx(SA,{"data-loc":"client/src/components/campaign/ActivityTab.tsx:37",className:"size-4 text-muted-foreground"}),"메모 남기기"]}),e.jsx(pt,{"data-loc":"client/src/components/campaign/ActivityTab.tsx:40",className:"mt-2.5",rows:2,value:i,onChange:m=>o(m.target.value),placeholder:"팀원에게 공유할 내용을 적으세요. 예: 전시회에서 만난 업체라 담당자 이름 확인됨"}),e.jsx(G,{"data-loc":"client/src/components/campaign/ActivityTab.tsx:47",size:"sm",className:"mt-2.5",disabled:!i.trim()||u.isPending,onClick:()=>u.mutate({id:t,message:i.trim()}),children:"기록"})]}),c?e.jsx("div",{"data-loc":"client/src/components/campaign/ActivityTab.tsx:58",className:"space-y-2",children:Array.from({length:3}).map((m,p)=>e.jsx(we,{"data-loc":"client/src/components/campaign/ActivityTab.tsx:60",className:"h-14 roun
683ded-lg"},p))}):(s?.length??0)===0?e.jsx(En,{"data-loc":"client/src/components/campaign/ActivityTab.tsx:64",icon:e.jsx(gA,{"data-loc":"client/src/components/campaign/ActivityTab.tsx:65",className:"size-8"}),title:"기록이 없습니다",description:"후보 추가, 문안 작성, 발송 시도가 모두 여기에 남습니다. 팀원이 무엇을 했는지 확인할 수 있습니다."}):e.jsx("ol",{"data-loc":"client/src/components/campaign/ActivityTab.tsx:70",className:"space-y-2",children:s?.map(m=>{const p=H9[m.log.type]??{label:m.log.type,className:"bg-muted text-muted-foreground"};return e.jsxs("li",{"data-loc":"client/src/components/campaign/ActivityTab.tsx:77",className:"flex items-start gap-3 rounded-lg border bg-card p-3.5",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/ActivityTab.tsx:81",className:`shrink-0 rounded-md px-2 py-0.5 text-xs font-medium ${p.className}`,children:p.label}),e.jsxs("div",{"data-loc":"client/src/components/campaign/ActivityTab.tsx:86",className:"min-w-0 flex-1",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/ActivityTab.tsx:87",className:"text-sm leading-relaxed",children:m.log.message}),e.jsxs("p",{"data-loc":"client/src/components/campaign/ActivityTab.tsx:88",className:"mt-1 text-xs text-muted-foreground",children:[m.actorName??"알 수 없음"," ·"," ",new Date(m.log.createdAt).toLocaleString("ko-KR")]})]})]},m.log.id)})})]})}var cm="Tabs",[q9]=da(cm,[$u]),PS=$u(),[Q9,bh]=q9(cm),MS=v.forwardRef((t,s)=>{const{__scopeTabs:c,value:r,onValueChange:i,defaultValue:o,orientation:u="horizontal",dir:m,activationMode:p="automatic",...f}=t,b=so(m),[h,y]=Bs({prop:r,onChange:i,defaultProp:o??"",caller:cm});return e.jsx(Q9,{scope:c,baseId:cs(),value:h,onValueChange:y,orientation:u,dir:b,activationMode:p,children:e.jsx(Ae.div,{dir:b,"data-orientation":u,...f,ref:s})})});MS.displayName=cm;var RS="TabsList",OS=v.forwardRef((t,s)=>{const{__scopeTabs:c,loop:r=!0,...i}=t,o=bh(RS,c),u=PS(c);return e.jsx(tC,{asChild:!0,...u,orientation:o.orientation,dir:o.dir,loop:r,children:e.jsx(Ae.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:s})})});OS.displayName=RS;var zS="TabsTrigger",LS=v.forwardRef((t,s)=>{const{__scopeTabs:c,value:r,disabled:i=!1,...o}=t,u=bh(zS,c),m=PS(c),p=IS(u.baseId,r),f=HS(u.baseId,r),b=r===u.value;return e.jsx(aC,{asChild:!0,...m,focusable:!i,active:b,children:e.jsx(Ae.button,{type:"button",role:"tab","aria-selected":b,"aria-controls":f,"data-state":b?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:p,...o,ref:s,onMouseDown:ye(t.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?u.onValueChange(r):h.preventDefault()}),onKeyDown:ye(t.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&u.onValueChange(r)}),onFocus:ye(t.onFocus,()=>{const h=u.activationMode!=="manual";!b&&!i&&h&&u.onValueChange(r)})})})});LS.displayName=zS;var BS="TabsContent",US=v.forwardRef((t,s)=>{const{__scopeTabs:c,value:r,forceMount:i,children:o,...u}=t,m=bh(BS,c),p=IS(m.baseId,r),f=HS(m.baseId,r),b=r===m.value,h=v.useRef(b);return v.useEffect(()=>{const y=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(y)},[]),e.jsx(ea,{present:i||b,children:({present:y})=>e.jsx(Ae.div,{"data-state":b?"active":"inactive","data-orientation":m.orientation,role:"tabpanel","aria-labelledby":p,hidden:!y,id:f,tabIndex:0,...u,ref:s,style:{...t.style,animationDuration:h.current?"0s":void 0},children:y&&o})})});US.displayName=BS;function IS(t,s){return`${t}-trigger-${s}`}function HS(t,s){return`${t}-content-${s}`}var W9=MS,V9=OS,F9=LS,K9=US;function $S({className:t,...s}){return e.jsx(W9,{"data-loc":"client/src/components/ui/tabs.tsx:11","data-slot":"tabs",className:Ne("flex flex-col gap-2",t),...s})}function qS({className:t,...s}){return e.jsx(V9,{"data-loc":"client/src/components/ui/tabs.tsx:24","data-slot":"tabs-list",className:Ne("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t),...s})}function xn({className:t,...s}){return e.jsx(F9,{"data-loc":"client/src/components/ui/tabs.tsx:40","data-slot":"tabs-trigger",className:Ne("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focu
683s-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...s})}function fn({className:t,...s}){return e.jsx(K9,{"data-loc":"client/src/components/ui/tabs.tsx:56","data-slot":"tabs-content",className:Ne("flex-1 outline-none",t),...s})}function G9(t){const s=[];let c="",r=0;for(let i=0;i<t.length;i++){const o=t[i];if((o==="("||o==="(")&&r++,(o===")"||o===")")&&(r=Math.max(0,r-1)),c+=o,!(o==="."||o==="。"||o==="!"||o==="?")||r>0)continue;const m=t[i+1],p=t[i-1];o==="."&&/\d/.test(p??"")&&/\d/.test(m??"")||o==="."&&/[A-Z]/.test(p??"")&&(m??"")===""||m&&!/[\s]/.test(m)||(s.push(c.trim()),c="")}return c.trim()&&s.push(c.trim()),s.filter(i=>i.length>0)}function J1(t){const s=t.match(/[((]\s*(대안|대신|해결|권장)\s*[::]?\s*([\s\S]+?)[))]\s*[.。]?\s*$/);if(s)return{text:t.slice(0,s.index).trim().replace(/[,、]\s*$/,""),remedy:s[2].trim()};const c=t.split(/\s*[;;]\s*/);return c.length===2&&c[1].length>8?{text:c[0].trim(),remedy:c[1].trim()}:{text:t.trim()}}function QS(t){if(!t?.trim())return[];const s=t.trim(),r=s.split(/\r?\n/).map(u=>u.trim()).filter(Boolean).filter(u=>/^[-•·*]\s+/.test(u));if(r.length>=2)return r.map(u=>u.replace(/^[-•·*]\s+/,"").trim()).filter(Boolean).map(J1);const i=G9(s),o=[];for(const u of i)o.length>0&&u.length<12?o[o.length-1]=`${o[o.length-1]} ${u}`:o.push(u);return o.map(J1)}const Y9=/(?:[A-Za-zÀ-ÿ][A-Za-zÀ-ÿ0-9'’\-]*(?:\s*\/\s*[A-Za-zÀ-ÿ][A-Za-zÀ-ÿ0-9'’\-]*)*(?:\s+[a-zà-ÿ][A-Za-zÀ-ÿ0-9'’\-]*){0,3}|[\u3040-\u30ff]{2,}[\u4e00-\u9fff\u3040-\u30ff]*|[\u4e00-\u9fff]{2,}[\u3040-\u30ff]*)/g,X9=new Set(["a","an","the","and","or","of","to","in","on","for","with","is","are","be","no","not","vs","e","de","da","do","em","ok","etc","AI"]);function Z9(t){return!!(t.length<2||X9.has(t.toLowerCase())||/^[A-Za-z]$/.test(t)||/^(Dra|Dr|Sr|Sra|Mr|Ms|Mrs|Prof)$/i.test(t))}const J9=/[“"']([^“”"']{2,80})[”"']/g;function eO(t){const s=[];{const m=new RegExp(J9.source,"g");let p;for(;(p=m.exec(t))!==null;)s.push({start:p.index,end:p.index+p[0].length})}const c=(m,p)=>s.some(f=>m>=f.start&&p<=f.end),r=[];let i=0;const o=new RegExp(Y9.source,"g");let u;for(;(u=o.exec(t))!==null;){const m=u[0].trimEnd(),p=u.index;m.length!==0&&(Z9(m)||p<i||c(p,p+m.length)||(p>i&&r.push({text:t.slice(i,p),isTerm:!1}),r.push({text:m,isTerm:!0}),i=p+m.length))}return i<t.length&&r.push({text:t.slice(i),isTerm:!1}),r.length>0?r:[{text:t,isTerm:!1}]}const bu=3;function WS({iso2:t,countryNameKo:s}){const c=q.useUtils(),{data:r,isLoading:i}=q.gateway.culture.get.useQuery({iso2:t}),o=q.gateway.culture.research.useMutation({onSuccess:f=>{c.gateway.culture.get.invalidate({iso2:t}),X.success(f.reused?"이미 조사된 내용을 불러왔습니다.":`${s} 문화 조사를 마쳤습니다.`)},onError:f=>X.error(f.message)});if(i)return e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:50",className:"space-y-4",children:[e.jsx(we,{"data-loc":"client/src/components/campaign/CultureTab.tsx:51",className:"h-32 rounded-xl"}),e.jsx(we,{"data-loc":"client/src/components/campaign/CultureTab.tsx:52",className:"h-64 rounded-xl"})]});if(!r)return e.jsx(En,{"data-loc":"client/src/components/campaign/CultureTab.tsx:59",icon:e.jsx(aA,{"data-loc":"client/src/components/campaign/CultureTab.tsx:60",className:"size-8"}),title:`${s}의 문화를 아직 조사하지 않았습니다`,description:"메일을 보낸 뒤에는 통화하고 만나고 협상해야 합니다. 그때 필요한 현지 문화, 비즈니스 관행, 조심해야 할 것을 조사해 정리합니다. 한 번 조사하면 같은 나라의 다른 캠페인에서도 그대로 씁니다.",action:e.jsxs(G,{"data-loc":"client/src/components/campaign/CultureTab.tsx:64",className:"gap-1.5",disabled:o.isPending,onClick:()=>o.mutate({iso2:t}),children:[e.jsx(Dt,{"data-loc":"client/src/components/campaign/CultureTab.tsx:69",className:"size-4"}),o.isPending?"조사 중 (약 2분)":"문화 조사 시작"]})});const u=r.updatedAt?new Date(r.updatedAt):null,m=QS(r.cautions),p=[{icon:e.jsx(vA,{"data-loc":"client/src/components/campaign/CultureTab.tsx:81",className:"size-4"}),title:"현지 문화",body:r.localCulture},{icon:e.jsx(sr,{"data-loc":"client/src/components/campaign/CultureTab.tsx:82",className:"size-4"}),title:"비즈니스 문화",body:r.businessCulture},{icon:e.jsx(DN,{"data-loc":"client/src/components/campaign/CultureTab.tsx:83",className:"size-4"}),title:"소통 방식",body:r.communicationStyle},{icon:e.jsx(fA,{"data-loc":"client/src/components/campaign/CultureTab.tsx:84",className:"size-4"}),title:"협상과 가격 논의",body:r.negotiationStyle},{icon:e.jsx(sr,{"data-loc":"client/src/components/campaign/CultureTab.tsx:85",className:"size-4"}),title:"미팅과 인사 예절",body:r.meetingEtiquette},{icon:e.jsx(pA,{"data-loc":"client/src/components/campaign/CultureTab.tsx:86",className:"size-4"}),title:"선물과 식사",body:r.giftAndDining},{icon:e.jsx(kg,{"data-loc":"client/src/components/campaign/CultureTab.tsx:87",className:"size-4"}),title:"시간 개념과 피할 시기",body:r.timeAndCalendar}].filter(f=>f.body?.trim());return e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:91",className:"space-y-5",children:[m.length>0&&e.jsx(tO,{"data-loc":"client/src/components/campaign/CultureTab.tsx:93",items:m}),e.jsx("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:95",className:"grid gap-4 lg:grid-cols-2",children:p.map(f=>e.jsx(aO,{"data-loc":"client/src/components/campaign/CultureTab.tsx:97",icon:f.icon,title:f.title,body:f.body},f.title))}
683),r.sources.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:102",className:"rounded-xl border border-dashed p-4",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/CultureTab.tsx:103",className:"text-sm font-semibold",children:"조사 근거"}),e.jsx("ul",{"data-loc":"client/src/components/campaign/CultureTab.tsx:104",className:"mt-2 grid gap-1.5 sm:grid-cols-2",children:r.sources.map((f,b)=>e.jsxs("li",{"data-loc":"client/src/components/campaign/CultureTab.tsx:106",className:"text-xs leading-relaxed text-muted-foreground",children:["· ",e.jsx(Qi,{"data-loc":"client/src/components/campaign/CultureTab.tsx:107",text:f,muted:!0})]},b))})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:114",className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border bg-muted/30 px-4 py-3",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/CultureTab.tsx:115",className:"text-xs leading-relaxed text-muted-foreground",children:[u?`${u.toLocaleDateString()} 조사 · AI 정리`:"AI가 정리한 내용","입니다. 지역·업종·세대에 따라 다를 수 있으니, 실제 상담 전에 현지 파트너에게 확인하세요."]}),e.jsxs(G,{"data-loc":"client/src/components/campaign/CultureTab.tsx:120",variant:"outline",size:"sm",className:"gap-1.5 bg-background",disabled:o.isPending,onClick:()=>o.mutate({iso2:t,force:!0}),children:[e.jsx(vl,{"data-loc":"client/src/components/campaign/CultureTab.tsx:127",className:"size-3.5"}),o.isPending?"다시 조사 중":"다시 조사"]})]})]})}function tO({items:t}){const[s,c]=v.useState(!1),r=s?t:t.slice(0,bu),i=t.length-r.length;return e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:142",className:"overflow-hidden rounded-xl border border-amber-200 bg-amber-50/60",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:143",className:"flex items-center gap-2 border-b border-amber-200/70 px-5 py-3.5",children:[e.jsx(St,{"data-loc":"client/src/components/campaign/CultureTab.tsx:144",className:"size-4 shrink-0 text-amber-700"}),e.jsx("p",{"data-loc":"client/src/components/campaign/CultureTab.tsx:145",className:"text-sm font-semibold text-amber-950",children:"조심해야 할 것"}),e.jsxs("span",{"data-loc":"client/src/components/campaign/CultureTab.tsx:146",className:"ml-auto rounded-full bg-amber-200/70 px-2 py-0.5 text-xs font-medium text-amber-900",children:[t.length,"건"]})]}),e.jsx("ul",{"data-loc":"client/src/components/campaign/CultureTab.tsx:151",className:"divide-y divide-amber-200/60",children:r.map((o,u)=>e.jsx("li",{"data-loc":"client/src/components/campaign/CultureTab.tsx:153",className:"px-5 py-3.5",children:e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:154",className:"flex gap-3",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/CultureTab.tsx:155",className:"mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full bg-amber-200/80 text-[11px] font-semibold text-amber-900",children:u+1}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:158",className:"space-y-2",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/CultureTab.tsx:159",className:"text-sm leading-relaxed text-amber-950",children:e.jsx(Qi,{"data-loc":"client/src/components/campaign/CultureTab.tsx:160",text:o.text,tone:"warn"})}),o.remedy&&e.jsxs("p",{"data-loc":"client/src/components/campaign/CultureTab.tsx:163",className:"flex gap-1.5 rounded-md bg-white/70 px-2.5 py-2 text-xs leading-relaxed text-amber-900",children:[e.jsx(wN,{"data-loc":"client/src/components/campaign/CultureTab.tsx:164",className:"mt-px size-3.5 shrink-0 text-amber-600"}),e.jsxs("span",{"data-loc":"client/src/components/campaign/CultureTab.tsx:165",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/CultureTab.tsx:166",className:"font-medium",children:"이렇게 피한다"})," ",e.jsx(Qi,{"data-loc":"client/src/components/campaign/CultureTab.tsx:167",text:o.remedy,tone:"warn"})]})]})]})]})},u))}),t.length>bu&&e.jsxs("button",{"data-loc":"client/src/components/campaign/CultureTab.tsx:178",type:"button",onClick:()=>c(o=>!o),className:"flex w-full items-center justify-center gap-1.5 border-t border-amber-200/70 py-2.5 text-xs font-medium text-amber-800 transition-colors hover:bg-amber-100/60",children:[s?"접기":`${i}건 더 보기`,e.jsx(ns,{"data-loc":"client/src/components/campaign/CultureTab.tsx:184",className:`size-3.5 transition-transform duration-200 ${s?"rotate-180":""}`})]})]})}function aO({icon:t,title:s,body:c}){const[r,i]=v.useState(!1),o=QS(c);if(o.length===0)return null;const u=r?o:o.slice(0,bu),m=o.length-u.length;return e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:211",className:"flex flex-col overflow-hidden rounded-xl border bg-card",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:212",className:"flex items-center gap-2 border-b px-5 py-3.5",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/CultureTab.tsx:213",className:"text-primary",children:t}),e.jsx("p",{"data-loc":"client/src/components/campaign/CultureTab.tsx:214",className:"text-sm font-semibold",children:s}),e.jsxs("span",{"data-loc":"client/src/components/campaign/CultureTab.tsx:215",className:"ml-auto text-xs text-muted-foreground",children:[o.length,"개"]})]}),e.jsx("ul",{"data-loc":"client/src/components/campaign/CultureTab.tsx:218",className:"flex-1 divide-y",children:u.map((p,f)=>e.jsx("li",{"data-loc":"client/src/components/campaign/CultureTab.tsx:220",className:"px-5 py-3",children:e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:221",className:"flex gap-2.5",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/CultureTab.tsx:222",className:"mt-1.5 size-1.5 shrink-0 rounded-full bg-primary/40"}),e.jsxs("div",{"data-loc":"client/src/components/campaign/CultureTab.tsx:223",className:"space-y-1.5",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/CultureTab.tsx:224",className:"text-sm leading-relaxed text-foreground
683/90",children:e.jsx(Qi,{"data-loc":"client/src/components/campaign/CultureTab.tsx:225",text:p.text})}),p.remedy&&e.jsxs("p",{"data-loc":"client/src/components/campaign/CultureTab.tsx:228",className:"flex gap-1.5 text-xs leading-relaxed text-muted-foreground",children:[e.jsx(wN,{"data-loc":"client/src/components/campaign/CultureTab.tsx:229",className:"mt-px size-3.5 shrink-0 text-primary/60"}),e.jsx(Qi,{"data-loc":"client/src/components/campaign/CultureTab.tsx:230",text:p.remedy,muted:!0})]})]})]})},f))}),o.length>bu&&e.jsxs("button",{"data-loc":"client/src/components/campaign/CultureTab.tsx:240",type:"button",onClick:()=>i(p=>!p),className:"flex w-full items-center justify-center gap-1.5 border-t py-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted/50",children:[r?"접기":`${m}개 더 보기`,e.jsx(ns,{"data-loc":"client/src/components/campaign/CultureTab.tsx:246",className:`size-3.5 transition-transform duration-200 ${r?"rotate-180":""}`})]})]})}function Qi({text:t,tone:s="default",muted:c=!1}){const r=eO(t),i=s==="warn"?"rounded bg-amber-200/60 px-1 font-medium text-amber-950":c?"font-medium text-foreground/70":"rounded bg-muted px-1 font-medium text-foreground";return e.jsx(e.Fragment,{children:r.map((o,u)=>o.isTerm?e.jsx("span",{"data-loc":"client/src/components/campaign/CultureTab.tsx:280",className:i,children:o.text},u):e.jsx("span",{"data-loc":"client/src/components/campaign/CultureTab.tsx:284",children:o.text},u))})}function sO({campaignId:t}){const{data:s,isPending:c,isError:r}=q.gateway.stats.byDraft.useQuery({campaignId:t},{retry:!1});if(c)return e.jsx(we,{"data-loc":"client/src/components/campaign/DraftStats.tsx:16",className:"h-28 rounded-xl"});if(r||!s)return null;const i=s.rows.filter(o=>o.sent>0);return i.length===0&&s.untracked===0?null:e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftStats.tsx:23",className:"rounded-xl border bg-card p-4",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DraftStats.tsx:24",className:"text-sm font-semibold",children:"문안별 성과"}),i.length===0?e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftStats.tsx:26",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:["어느 문안으로 보냈는지 기록되지 않은 발송이 ",s.untracked,"ê±´ 있습니다. 지금부터 보내는 건은 문안별로 집계됩니다."]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/components/campaign/DraftStats.tsx:32",className:"mt-2.5 space-y-2.5",children:i.map(o=>e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftStats.tsx:34",className:"space-y-1",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DraftStats.tsx:35",className:"flex items-baseline justify-between gap-3 text-sm",children:[e.jsxs("span",{"data-loc":"client/src/components/campaign/DraftStats.tsx:36",className:"min-w-0 truncate font-medium",children:[o.sequenceStep>0?`${o.sequenceStep}ì°¨ · `:"",o.title]}),e.jsxs("span",{"data-loc":"client/src/components/campaign/DraftStats.tsx:40",className:"shrink-0 tabular-nums text-muted-foreground",children:["발송 ",o.sent,"ê³³ · 회신 ",o.replied,"ê³³ (",o.replyRate,"%)"]})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/DraftStats.tsx:44",className:"h-2 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{"data-loc":"client/src/components/campaign/DraftStats.tsx:45",className:"h-full rounded-full bg-emerald-500",style:{width:`${Math.min(100,o.replyRate)}%`}})}),o.sent<10&&e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftStats.tsx:51",className:"text-xs text-muted-foreground",children:["발송 ",o.sent,"곳으로는 비율이 흔들립니다. 판단은 표본이 쌓인 뒤에 하세요."]})]},o.draftId))}),s.untracked>0&&e.jsxs("p",{"data-loc":"client/src/components/campaign/DraftStats.tsx:60",className:"mt-3 text-xs text-muted-foreground",children:["문안 정보가 없는 과거 발송 ",s.untracked,"건은 위 집계에서 빠졌습니다."]})]})]})}const es={interested:{label:"관심 있음",hint:"가장 좋은 신호입니다. 통화 일정을 먼저 잡고, 컬쳐핏 탭에서 ê·¸ 나라 미팅 예절을 확인하세요.",tone:"good",stage:"talking",stopSending:!1},info_request:{label:"자료 요청",hint:"요청한 자료만 보내세요. 묻지 않은 자료를 얹으면 검토가 늦어집니다.",tone:"good",stage:"talking",stopSending:!1},price_request:{label:"가격 문의",hint:"가격만 단독으로 보내지 마세요. ì
683µœì†Œ 주문량·결제 조건·독점 범위를 함께 묶어 제시해야 협상 여지가 남습니다.",tone:"good",stage:"quoted",stopSending:!1},meeting_request:{label:"미팅 요청",hint:"상대 시간대로 후보 시간 2~3개를 제시하세요. 컬쳐핏 탭의 연락 가능 시간대를 확인하세요.",tone:"good",stage:"talking",stopSending:!1},referral:{label:"다른 담당자 안내",hint:"안내받은 담당자를 새 후보로 등록하고, 소개해 준 사람에게 짧게 감사 회신을 보내세요.",tone:"neutral",stage:"replied",stopSending:!1},rejected:{label:"거절",hint:"이유를 기록해 두세요. 시기 문제라면 6개월 뒤 재접촉이 가능하지만, 지금 더 보내면 관계가 상합니다.",tone:"bad",stage:"closed",stopSending:!0},absent:{label:"부재·자동응답",hint:"사람이 읽은 게 아닙니다. 복귀 예정일 이후로 다음 할 일을 미루세요.",tone:"neutral",stage:null,stopSending:!1},unsubscribe:{label:"수신거부",hint:"즉시 발송을 멈춥니다. 국가에 따라 처리 기한이 정해져 있어 이를 넘기면 과징금 대상입니다.",tone:"bad",stage:"closed",stopSending:!0},bounced:{label:"반송",hint:"주소가 잘못됐습니다. 반송이 쌓이면 도메인 평판이 떨어지니 이 주소는 즉시 제외하세요.",tone:"bad",stage:"closed",stopSending:!0},other:{label:"기타",hint:"내용을 읽고 다음 할 일을 직접 적어 두세요.",tone:"neutral",stage:"replied",stopSending:!1}},vh={contacted:{label:"접촉",order:1,description:"메일을 보냈고 아직 회신이 없습니다."},replied:{label:"회신",order:2,description:"회신이 왔고 다음 행동을 정해야 합니다."},talking:{label:"상담",order:3,description:"통화·미팅·자료 교환이 진행 중입니다."},quoted:{label:"견적",order:4,description:"가격과 조건을 제시했습니다."},contracted:{label:"계약",order:5,description:"계약이 성립했습니다."},closed:{label:"종료",order:6,description:"거절·수신거부·반송으로 끝났습니다."}},nO=["contacted","replied","talking","quoted","contracted","closed"];function cO(t,s=new Date){if(!t)return!1;const c=t instanceof Date?t:new Date(t);return Number.isNaN(c.getTime())?!1:c.getTime()<s.getTime()}const rO=Object.keys(es);function Vf(t){switch(t){case"good":return"border-emerald-200 bg-emerald-50 text-emerald-800";case"bad":return"border-rose-200 bg-rose-50 text-rose-800";case"warn":return"border-amber-200 bg-amber-50 text-amber-800";default:return"border-slate-200 bg-slate-50 text-slate-700"}}function lO({byStage:t,total:s}){return s===0?null:e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:73",className:"rounded-lg border bg-card p-4",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:74",className:"mb-3 flex items-baseline justify-between",children:[e.jsx("h3",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:75",className:"text-sm font-semibold",children:"거래 진행 단계"}),e.jsxs("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:76",className:"text-xs text-muted-foreground",children:["후보 ",s,"ê³³"]})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:78",className:"grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-6",children:nO.map(c=>{const r=t[c]??0,i=vh[c];return e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:83",className:`rounded-md border p-3 ${r>0?"bg-background":"bg-muted/40"}`,children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:89",className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:90",className:"text-xs font-medium text-muted-foreground",children:i.label}),e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:93",className:`font-mono text-lg font-semibold ${r>0?"":"text-muted-foreground/50"}`,children:r})]}),e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:101",className:"mt-1 text-[11px] leading-snug text-muted-foreground",children:i.description})]},c)})})]})}function iO({campaignId:t,candidates:s,open:c,onOpenChange:r,onDone:i}){const[o,u]=v.useState(""),[m,p]=v.useState(""),[f,b]=v.useState("other"),[h,y]=v.useState(""),[j,S]=v.useState(""),[N,w]=v.useState(""),[T,k]=v.useState(""),[E,z]=v.useState(!1),[_,R]=v.useState([]),[P,A]=v.useState([]),V=()=>{u(""),p(""),b("other"),y(""),S(""),w(""),k(""),z(!1),R([]),A([])},H=q.gateway.replies.analyze.useMutation({onSuccess:I=>{b(I.kind),y(I.summary),S(I.language),w(I.nextAction),R(I.cautions),A(I.requests),z(!0),es[I.kind].stopSending&&X.warning(`${es[I.kind].label} 회신입니다`,{description:es[I.kind].hint})},onError:I=>X.error(I.message)}),M=q.gateway.replies.create.useMutation({onSuccess:I=>{I.corrected?X.warning("원문 검사로 유형을 고쳤습니다",{description:`${es[I.kind].label}으로 저장했습니다. ${es[I.kind].hint}`}):I.stopSending?X.warning("이 후보에는 더 보내지 않습니다",{description:es[I.kind].hint}):X.success(`회신을 기록했습니다 (${vh[I.stage].label} 단계)`),V(),r(!1),i()},onError:I=>X.error(I.message)}),B=o&&m.trim().length>=5;return e.jsx(ta,{"data-loc":"client/src/components/campaign/Repl
683iesTab.tsx:191",open:c,onOpenChange:I=>{I||V(),r(I)},children:e.jsxs(aa,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:198",className:"max-h-[90vh] max-w-2xl overflow-y-auto",children:[e.jsxs(sa,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:199",children:[e.jsx(na,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:200",children:"회신 기록"}),e.jsx(ca,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:201",children:"받은 회신을 그대로 붙여넣으면 유형과 다음 할 일을 정리해 드립니다. 현지어로 와도 한국어 요약을 만듭니다."})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:207",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:208",className:"space-y-2",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:209",children:"어느 곳에서 온 회신인가요"}),e.jsxs(et,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:210",value:o,onValueChange:u,children:[e.jsx(at,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:211",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:212",placeholder:"후보를 고르세요"})}),e.jsx(st,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:214",children:s.map(I=>e.jsxs(ve,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:216",value:String(I.id),children:[I.companyName,I.email?` · ${I.email}`:""]},I.id))})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:225",className:"space-y-2",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:226",children:"회신 원문"}),e.jsx(pt,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:227",value:m,onChange:I=>p(I.target.value),placeholder:"받은 메일 본문을 그대로 붙여넣으세요. 번역하지 않아도 됩니다.",className:"min-h-32 font-mono text-xs"}),e.jsx(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:233",type:"button",variant:"outline",size:"sm",disabled:!B||H.isPending,onClick:()=>H.mutate({campaignId:t,candidateId:Number(o),rawBody:m}),children:H.isPending?e.jsxs(e.Fragment,{children:[e.jsx(jt,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:248",className:"size-3.5 animate-spin"})," 읽는 중"]}):e.jsxs(e.Fragment,{children:[e.jsx(Dt,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:252",className:"size-3.5"})," 내용 분석"]})})]}),E&&e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:259",className:"space-y-3 rounded-lg border bg-muted/30 p-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:260",className:`rounded-md border px-3 py-2 text-xs ${Vf(es[f].tone)}`,children:[e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:265",className:"font-semibold",children:es[f].label}),e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:266",className:"mt-1 leading-relaxed",children:es[f].hint})]}),P.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:270",className:"text-xs",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:271",className:"mb-1 font-medium",children:"상대가 요구한 것"}),e.jsx("ul",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:272",className:"space-y-1 text-muted-foreground",children:P.map((I,ie)=>e.jsxs("li",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:274",children:["· ",I]},ie))})]}),_.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:281",className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:282",className:"mb-1 flex items-center gap-1 font-medium",children:[e.jsx(St,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:283",className:"size-3.5"})," 놓치면 안 되는 것"]}),e.jsx("ul",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:285",className:"space-y-1",children:_.map((I,ie)=>
683e.jsxs("li",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:287",children:["· ",I]},ie))})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:295",className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:296",className:"space-y-2",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:297",children:"회신 유형"}),e.jsxs(et,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:298",value:f,onValueChange:I=>b(I),children:[e.jsx(at,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:299",children:e.jsx(tt,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:300"})}),e.jsx(st,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:302",children:rO.map(I=>e.jsx(ve,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:304",value:I,children:es[I].label},I))})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:311",className:"space-y-2",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:312",children:"회신 언어"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:313",value:j,onChange:I=>S(I.target.value),placeholder:"예: 포르투갈어"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:321",className:"space-y-2",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:322",children:"한국어 요약"}),e.jsx(pt,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:323",value:h,onChange:I=>y(I.target.value),placeholder:"상대가 무엇을 원하는지 적어 두세요. 나중에 다른 담당자가 맥락을 이어받습니다.",className:"min-h-20"})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:331",className:"grid gap-3 sm:grid-cols-[1fr_180px]",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:332",className:"space-y-2",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:333",children:"다음에 할 일"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:334",value:N,onChange:I=>w(I.target.value),placeholder:"예: 인증서 사본과 성분표를 오늘 중 회신"})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:340",className:"space-y-2",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:341",children:"기한"}),e.jsx(Ce,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:342",type:"date",value:T,onChange:I=>k(I.target.value)})]})]})]}),e.jsxs(_a,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:347",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:348",variant:"ghost",onClick:()=>r(!1),children:"취소"}),e.jsxs(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:351",disabled:!o||M.isPending,onClick:()=>M.mutate({campaignId:t,candidateId:Number(o),kind:f,summary:h||void 0,rawBody:m||void 0,language:j||void 0,nextAction:N||void 0,nextActionDue:T?new Date(T):null,analyzedBy:E?"ai":"manual"}),children:[M.isPending?e.jsx(jt,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:367",className:"size-4 animate-spin"}):null,"기록"]})]})]})})}function oO({campaignId:t,replyId:s,open:c,onOpenChange:r}){const[i,o]=v.useState(!1),u=q.gateway.replies.draftReply.useMutation({onError:p=>X.error(p.message)}),m=u.data;return e.jsx(ta,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:396",open:c,onOpenChange:p=>{p||(u.reset(),o(!1)),r(p)},children:e.jsxs(aa,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:406",className:"max-h-[90vh] max-w-2xl overflow-y-auto",children:[e.jsxs(sa,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:407",children:[e.jsx(na,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:408",children:"답장 초안"}),e.jsx(ca,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:409",children:"받은 회신에 맞춰 답장을 만듭니다. 대괄호로 남은 부분은 직접 채운 뒤 보내세요."})]}),!m&&e.jsxs("div",{"data-loc":"client/src/components/campaign/Repl
683iesTab.tsx:415",className:"py-6 text-center",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:416",disabled:!s||u.isPending,onClick:()=>s&&u.mutate({campaignId:t,replyId:s}),children:u.isPending?e.jsxs(e.Fragment,{children:[e.jsx(jt,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:422",className:"size-4 animate-spin"})," 쓰는 중"]}):e.jsxs(e.Fragment,{children:[e.jsx(Dt,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:426",className:"size-4"})," 답장 만들기"]})}),e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:430",className:"mt-3 text-xs text-muted-foreground",children:"이 나라 협상 관행과 금지 표현을 반영합니다. 30초 정도 걸립니다."})]}),m&&e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:437",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:438",className:"space-y-1",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:439",className:"text-xs text-muted-foreground",children:"제목"}),e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:440",className:"rounded-md border bg-muted/30 px-3 py-2 text-sm",children:m.subject})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:445",className:"space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:446",className:"flex items-center justify-between",children:[e.jsx(_e,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:447",className:"text-xs text-muted-foreground",children:i?"한국어 대역":"현지어 본문"}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:450",className:"flex gap-1",children:[e.jsxs(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:451",variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>o(p=>!p),children:[e.jsx(ao,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:457",className:"size-3.5"}),i?"현지어 보기":"한국어 보기"]}),e.jsxs(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:460",variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>{navigator.clipboard.writeText(`${m.subject}
684
685${i?m.bodyKo:m.body}`),X.success("복사했습니다")},children:[e.jsx(Lu,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:471",className:"size-3.5"})," 복사"]})]})]}),e.jsx("pre",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:475",className:"max-h-72 overflow-y-auto whitespace-pre-wrap rounded-md border bg-background p-3 text-xs leading-relaxed",children:i?m.bodyKo:m.body})]}),m.placeholders.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:481",className:"rounded-md border border-amber-200 bg-amber-50 p-3 text-xs text-amber-900",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:482",className:"mb-2 font-medium",children:"보내기 전에 채울 항목"}),e.jsx("ul",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:483",className:"space-y-1.5",children:m.placeholders.map((p,f)=>e.jsxs("li",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:485",children:[e.jsx("code",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:486",className:"rounded bg-amber-100 px-1 font-mono",children:p.token})," ",p.why]},f))})]}),m.notes.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:495",className:"rounded-md border bg-muted/30 p-3 text-xs",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:496",className:"mb-1 font-medium",children:"확인할 것"}),e.jsx("ul",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:497",className:"space-y-1 text-muted-foreground",children:m.notes.map((p,f)=>e.jsxs("li",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:499",children:["· ",p]},f))})]}),m.lint&&m.lint.issues.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:506",className:"rounded-md border border-rose-200 bg-rose-50 p-3 text-xs text-rose-900",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/Repl
685iesTab.tsx:507",className:"mb-2 flex items-center gap-1 font-medium",children:[e.jsx(St,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:508",className:"size-3.5"})," 이 나라 규칙 검사에서 걸린 것"]}),e.jsx("ul",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:510",className:"space-y-1.5",children:m.lint.issues.map((p,f)=>e.jsxs("li",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:512",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:513",className:"font-medium",children:p.title}),e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:514",className:"block text-rose-800",children:p.fix})]},f))})]}),m.lint&&m.lint.issues.length===0&&e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:522",className:"text-xs text-emerald-700",children:"이 나라 금지 표현·필수 요소 검사를 통과했습니다."})]})]})})}function dO({campaignId:t,canEdit:s}){const c=q.useUtils(),r=q.gateway.replies.list.useQuery({campaignId:t}),i=q.gateway.replies.pipeline.useQuery({campaignId:t}),o=q.gateway.candidates.list.useQuery({campaignId:t}),[u,m]=v.useState(!1),[p,f]=v.useState(null),b=q.gateway.replies.remove.useMutation({onSuccess:()=>{X.success("회신 기록을 지웠습니다"),c.gateway.replies.list.invalidate({campaignId:t}),c.gateway.replies.pipeline.invalidate({campaignId:t})},onError:T=>X.error(T.message)}),h=q.gateway.replies.setNextAction.useMutation({onSuccess:()=>{X.success("할 일을 완료 처리했습니다"),c.gateway.replies.pipeline.invalidate({campaignId:t}),c.gateway.candidates.list.invalidate({campaignId:t})},onError:T=>X.error(T.message)}),y=()=>{c.gateway.replies.list.invalidate({campaignId:t}),c.gateway.replies.pipeline.invalidate({campaignId:t}),c.gateway.candidates.list.invalidate({campaignId:t})},j=v.useMemo(()=>(o.data??[]).map(T=>({id:T.id,companyName:T.companyName,email:T.email})),[o.data]),S=i.data?.overdue??[],N=(i.data?.actions??[]).filter(T=>!cO(T.nextActionDue));if(r.isLoading||i.isLoading)return e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:589",className:"space-y-3",children:[e.jsx(we,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:590",className:"h-28 w-full"}),e.jsx(we,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:591",className:"h-40 w-full"})]});const w=r.data??[];return e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:599",className:"space-y-4",children:[e.jsx(sO,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:601",campaignId:t}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:603",className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:604",children:[e.jsx("h2",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:605",className:"text-sm font-semibold",children:"회신 관리"}),e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:606",className:"text-xs text-muted-foreground",children:"받은 회신을 기록하면 거래 단계가 움직이고, 다음에 할 일이 남습니다."})]}),s&&e.jsxs(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:611",size:"sm",onClick:()=>m(!0),children:[e.jsx(vs,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:612",className:"size-4"})," 회신 기록"]})]}),e.jsx(lO,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:617",byStage:i.data?.byStage??{},total:i.data?.total??0}),S.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:623",className:"rounded-lg border border-rose-200 bg-rose-50 p-4",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:624",className:"mb-2 flex items-center gap-1.5 text-sm font-semibold text-rose-900",children:[e.jsx(js,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:625",className:"size-4"})," 기한이 지난 할 일 ",S.length,"건"]}),e.jsx("ul",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:627",className:"space-y-2",children:S.map(T=>
685e.jsxs("li",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:629",className:"flex flex-wrap items-center justify-between gap-2 rounded-md bg-background/70 px-3 py-2 text-xs",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:633",className:"min-w-0",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:634",className:"font-medium",children:T.companyName}),e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:635",className:"ml-2 text-muted-foreground",children:T.nextAction})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:637",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:638",className:"font-mono text-[11px] text-rose-700",children:T.nextActionDue?new Date(T.nextActionDue).toLocaleDateString():""}),s&&e.jsx(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:644",variant:"ghost",size:"sm",className:"h-6 text-[11px]",onClick:()=>h.mutate({campaignId:t,candidateId:T.id,nextAction:null,nextActionDue:null}),children:"완료"})]})]},T.id))})]}),N.length>0&&e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:668",className:"rounded-lg border bg-card p-4",children:[e.jsxs("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:669",className:"mb-2 flex items-center gap-1.5 text-sm font-semibold",children:[e.jsx(ru,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:670",className:"size-4"})," 예정된 할 일 ",N.length,"건"]}),e.jsx("ul",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:672",className:"space-y-1.5",children:N.map(T=>e.jsxs("li",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:674",className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:678",className:"min-w-0",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:679",className:"font-medium",children:T.companyName}),e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:680",className:"ml-2 text-muted-foreground",children:T.nextAction})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:682",className:"flex items-center gap-2",children:[T.nextActionDue&&e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:684",className:"font-mono text-[11px] text-muted-foreground",children:new Date(T.nextActionDue).toLocaleDateString()}),s&&e.jsx(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:689",variant:"ghost",size:"sm",className:"h-6 text-[11px]",onClick:()=>h.mutate({campaignId:t,candidateId:T.id,nextAction:null,nextActionDue:null}),children:"완료"})]})]},T.id))})]}),w.length===0?e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:713",className:"rounded-lg border border-dashed p-8 text-center",children:[e.jsx(Bu,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:714",className:"mx-auto size-8 text-muted-foreground/40"}),e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:715",className:"mt-3 text-sm font-medium",children:"아직 기록된 회신이 없습니다"}),e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:716",className:"mx-auto mt-1 max-w-md text-xs leading-relaxed text-muted-foreground",children:"메일을 보낸 뒤 회신이 오면 원문을 여기에 붙여넣으세요. 유형을 가려내고 다음에 할 일을 정리합니다. 수신거부나 반송이면 그 후보에는 더 보내지 않도록 자동으로 막습니다."}),s&&e.jsxs(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:722",size:"sm",variant:"outline",className:"mt-4",onClick:()=>m(!0),children:[e.jsx(vs,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:723",className:"size-4"})," 첫 회신 기록"]})]}):e.jsx("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:728",className:"space-y-3",children:w.map(({reply:T,candidate:k})=>{const E=es[T.kind];return e.jsxs("div",{"data-loc":"client/src/components/campaign/Repl
685iesTab.tsx:732",className:"rounded-lg border bg-card p-4",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:733",className:"flex flex-wrap items-start justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:734",className:"min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:735",className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:736",className:"text-sm font-semibold",children:k?.companyName??"삭제된 후보"}),e.jsx(ct,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:739",variant:"outline",className:`text-[11px] ${Vf(E.tone)}`,children:E.label}),k?.stage&&e.jsx(ct,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:743",variant:"secondary",className:"text-[11px]",children:vh[k.stage].label}),T.language&&e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:748",className:"text-[11px] text-muted-foreground",children:T.language})]}),e.jsxs("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:753",className:"mt-0.5 text-[11px] text-muted-foreground",children:[T.receivedAt?new Date(T.receivedAt).toLocaleString():"",T.analyzedBy==="ai"?" · 자동 분석":" · 직접 입력"]})]}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:760",className:"flex items-center gap-1",children:[s&&!E.stopSending&&e.jsxs(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:762",variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>f(T.id),children:[e.jsx(Dt,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:768",className:"size-3.5"})," 답장 쓰기"]}),s&&e.jsx(G,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:772",variant:"ghost",size:"icon",className:"size-7",onClick:()=>b.mutate({campaignId:t,id:T.id}),children:e.jsx(Hs,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:778",className:"size-3.5"})})]})]}),T.summary&&e.jsx("p",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:785",className:"mt-2 text-sm leading-relaxed",children:T.summary}),e.jsxs("div",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:788",className:`mt-2 rounded-md border px-3 py-2 text-xs leading-relaxed ${Vf(E.tone)}`,children:[E.stopSending&&e.jsx("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:794",className:"mr-1 inline-flex items-center",children:e.jsx(Ea,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:795",className:"size-3.5"})}),T.nextAction||E.hint,T.nextActionDue&&e.jsxs("span",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:800",className:"ml-2 font-mono text-[11px]",children:["기한 ",new Date(T.nextActionDue).toLocaleDateString()]})]}),T.rawBody&&e.jsxs("details",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:807",className:"mt-2",children:[e.jsx("summary",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:808",className:"cursor-pointer text-xs text-muted-foreground hover:text-foreground",children:"원문 보기"}),e.jsx("pre",{"data-loc":"client/src/components/campaign/RepliesTab.tsx:811",className:"mt-2 max-h-48 overflow-y-auto whitespace-pre-wrap rounded-md border bg-muted/30 p-3 text-[11px] leading-relaxed",children:T.rawBody})]})]},T.id)})}),e.jsx(iO,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:822",campaignId:t,candidates:j,open:u,onOpenChange:m,onDone:y}),e.jsx(oO,{"data-loc":"client/src/components/campaign/RepliesTab.tsx:829",campaignId:t,replyId:p,open:p!==null,onOpenChange:T=>!T&&f(null)})]})}var VS="AlertDialog",[uO]=da(VS,[WC]),Rn=WC(),FS=t=>{const{__scopeAlertDialog:s,...c}=t,r=Rn(s);return e.jsx(Jg,{...r,...c,modal:!0})};FS.displayName=VS;var mO="AlertDialogTrigger",pO=v.forwardRef((t,s)=>{const{__scopeAlertDialog:c,...r}=t,i=Rn(c);return e.jsx(Y7,{...i,...r,ref:s})});pO.displayName=mO;var xO="AlertDialogPortal",KS=t=>{const{__scopeAlertDialog:s,...c}=t,r=Rn(s);return e.jsx(eh,{...r,...c})};KS.displayName=xO;var fO="AlertDialogOverlay",GS=v.forwardRef((t,s)=>{const{__scopeAlertDialog:c,...r}=t,i=Rn(c);return e.jsx(th,{...i,...r,ref:s})});GS.displayName=fO;
vendor: 1,173 bytes, line 685
685var pl="AlertDialogContent",[gO,hO]=uO(pl),bO=Nj("AlertDialogContent"),YS=v.forwardRef((t,s)=>{const{__scopeAlertDialog:c,children:r,...i}=t,o=Rn(c),u=v.useRef(null),m=He(s,u),p=v.useRef(null);return e.jsx(V7,{contentName:pl,titleName:XS,docsSlug:"alert-dialog",children:e.jsx(gO,{scope:c,cancelRef:p,children:e.jsxs(ah,{role:"alertdialog",...o,...i,ref:m,onOpenAutoFocus:ye(i.onOpenAutoFocus,f=>{f.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[e.jsx(bO,{children:r}),e.jsx(yO,{contentRef:u})]})})})});YS.displayName=pl;var XS="AlertDialogTitle",ZS=v.forwardRef((t,s)=>{const{__scopeAlertDialog:c,...r}=t,i=Rn(c);return e.jsx(sh,{...i,...r,ref:s})});ZS.displayName=XS;var JS="AlertDialogDescription",e3=v.forwardRef((t,s)=>{const{__scopeAlertDialog:c,...r}=t,i=Rn(c);return e.jsx(nh,{...i,...r,ref:s})});e3.displayName=JS;var vO="AlertDialogAction",t3=v.forwardRef((t,s)=>{const{__scopeAlertDialog:c,...r}=t,i=Rn(c);return e.jsx(Gu,{...i,...r,ref:s})});t3.displayName=vO;var a3="AlertDialogCancel",s3=v.forwardRef((t,s)=>{const{__scopeAlertDialog:c,...r}=t,{cancelRef:i}
685=hO(a3,c),o=Rn(c),u=He(s,i);return e.jsx(Gu,{...o,...r,ref:u})});s3.displayName=a3;var yO=({contentRef:t})=>{const s=`\`${pl}\` requires a description for the component to be accessible for screen reader users.
686
687You can add a description to the \`${pl}\` by passing a \`${JS}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
688
689Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${pl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
690
691For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{document.getElementById(t.current?.getAttribute("aria-describedby"))||console.warn(s)},[s,t]),null},jO=FS,NO=KS,CO=GS,wO=YS,SO=t3,TO=s3,kO=ZS,DO=e3;function EO({...t}){return e.jsx(jO,{"data-loc":"client/src/components/ui/alert-dialog.tsx:10","data-slot":"alert-dialog",...t})}function _O({...t}){return e.jsx(NO,{"data-loc":"client/src/components/ui/alert-dialog.tsx:25","data-slot":"alert-dialog-portal",...t})}function AO({className:t,...s}){return e.jsx(CO,{"data-loc":"client/src/components/ui/alert-dialog.tsx:34","data-slot":"alert-dialog-overlay",className:Ne("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...s})}function PO({className:t,...s}){return e.jsxs(_O,{"data-loc":"client/src/components/ui/alert-dialog.tsx:50",children:[e.jsx(AO,{"data-loc":"client/src/components/ui/alert-dialog.tsx:51"}),e.jsx(wO,{"data-loc":"client/src/components/ui/alert-dialog.tsx:52","data-slot":"alert-dialog-content",className:Ne("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...s})]})}function MO({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/alert-dialog.tsx:69","data-slot":"alert-dialog-header",className:Ne("flex flex-col gap-2 text-center sm:text-left",t),...s})}function RO({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/alert-dialog.tsx:82","data-slot":"alert-dialog-footer",className:Ne("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...s})}function OO({className:t,...s}){return e.jsx(kO,{"data-loc":"client/src/components/ui/alert-dialog.tsx:98","data-slot":"alert-dialog-title",className:Ne("text-lg font-semibold",t),...s})}function zO({className:t,...s}){return e.jsx(DO,{"data-loc":"client/src/components/ui/alert-dialog.tsx:111","data-slot":"alert-dialog-description",className:Ne("text-muted-foreground text-sm",t),...s})}function LO({className:t,...s}){return e.jsx(SO,{"data-loc":"client/src/components/ui/alert-dialog.tsx:124",className:Ne(Cg(),t),...s})}function BO({className:t,...s}){return e.jsx(TO,{"data-loc":"client/src/components/ui/alert-dialog.tsx:136",className:Ne(Cg({variant:"outline"}),t),...s})}function e2(t){const s=[],c=(r,i)=>{r>0&&s.push(`${i} ${r}건`)};return c(t.candidateCount,"후보"),c(t.prospectItemCount,"검수 대기"),c(t.prospectRunCount,"발굴 실행 기록"),c(t.draftCount,"문안"),c(t.replyCount,"회신"),c(t.activityCount,"활동 기록"),c(t.sendAttemptCount??0,"SMTP 발송 감사 기록"),c(t.scheduledJobCount??0,"예약 발송 작업"),c(t.inboxLinkedCount??0,"수신함 연결 해제"),c(t.memberCount,"참여자"),s}function n3(t){return t.sentCount>0||t.replyCount>0}function UO(t){if(!n3(t))return null;const s=[];return t.sentCount>0&&s.push(`이미 메일이 나간 곳 ${t.sentCount}곳`),t.replyCount>0&&s.push(`받은 회신 ${t.replyCount}건`),`${s.join("과 ")}이 함께 사라집니다. 성과 집계에서 이 캠페인의 회신율을 다시 볼 수 없습니다.`}
691function t2(t,s,c,r=!1){return r?t:s==="cancel-final"?"details":t==="details"&&c?"final":t}function IO(t,s,c=!1){return t==="final"&&s&&!c}function HO(t,s,c){return t&&(!s||c)}function c3({campaignId:t,campaignName:s,open:c,onOpenChange:r,onDeleted:i}){const[o,u]=v.useState(!1),[m,p]=v.useState(!1),[f,b]=v.useState("details"),h=v.useRef(!1),y=q.useUtils();v.useEffect(()=>{c||(u(!1),p(!1),b("details"))},[c]);const{data:j,isLoading:S}=q.gateway.campaigns.deletePreview.useQuery({id:t},{enabled:c}),N=q.gateway.campaigns.delete.useMutation({onSuccess:A=>{h.current=!1,y.gateway.campaigns.list.invalidate(),y.gateway.worklist.today.invalidate(),y.gateway.stats.overview.invalidate();const V=r6({campaignName:A.name,cleaned:e2(A.counts)});X.success(V.title,{description:V.description}),b("details"),r(!1),i?.()},onError:A=>{h.current=!1,X.error(A.message)}}),w=j?.counts,T=w?e2(w):[],k=w?UO(w):null,E=w?n3(w):!1,z=HO(o,E,m),_=A=>{N.isPending||(A||b("details"),r(A))},R=()=>{b(A=>t2(A,"request-final",z,N.isPending))},P=()=>{h.current||!IO(f,z,N.isPending)||(h.current=!0,N.mutate({id:t,confirmName:s.trim()}))};return e.jsxs(e.Fragment,{children:[e.jsx(ta,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:127",open:c,onOpenChange:_,children:e.jsxs(aa,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:128",className:"sm:max-w-md",onEscapeKeyDown:A=>N.isPending&&A.preventDefault(),onPointerDownOutside:A=>N.isPending&&A.preventDefault(),children:[e.jsxs(sa,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:129",children:[e.jsxs(na,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:130",className:"flex items-center gap-2",children:[e.jsx(Hs,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:131",className:"size-4 text-destructive"}),"캠페인 삭제"]}),e.jsx(ca,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:134",children:"되돌릴 수 없습니다. 이 캠페인의 작업만 정리하며 글로벌 유통사 DB 원본은 삭제하지 않습니다."})]}),S?e.jsx(we,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:140",className:"h-20 rounded-lg"}):e.jsxs("div",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:142",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:143",className:"rounded-lg bg-muted/50 p-3.5",children:[e.jsx("p",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:144",className:"text-sm font-semibold",children:s}),T.length===0?e.jsx("p",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:146",className:"mt-1.5 text-xs text-muted-foreground",children:"아직 모은 자료가 없습니다."}):e.jsxs("p",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:150",className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:["함께 사라짐: ",T.join(" · ")]})]}),k&&e.jsxs("div",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:157",className:"flex gap-2 rounded-lg border border-amber-200 bg-amber-50 p-3.5",children:[e.jsx(St,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:158",className:"mt-0.5 size-4 shrink-0 text-amber-700"}),e.jsx("p",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:159",className:"text-xs leading-relaxed text-amber-900",children:k})]}),e.jsx("div",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:163",className:"rounded-lg border border-emerald-200 bg-emerald-50 p-3.5 text-xs leading-relaxed text-emerald-900",children:"글로벌 유통사 DB의 회사·국가 시장·담당자 원본은 계속 누적되어 다른 캠페인에서도 사용할 수 있습니다. 예약 발송은 먼저 중지하고, 수신함 원문은 보존한 채 이 캠페인 연결만 해제합니다."}),E&&e.jsxs("label",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:169",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3.5",children:[e.jsx($a,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:170",className:"mt-0.5",checked:m,onCheckedChange:A=>p(A===!0)}),e.jsx("span",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:175",className:"text-xs leading-relaxed",children:"발송·회신 기록이 사라지는 것을 확인했습니다. 이 캠페인의 성과는 다시 집계할 수 없습니다."})]}),e.jsxs("label",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:182",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3.5",children:[e.jsx($a,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:183",className:"mt-0.5",checked:o,onCheckedChange:A=>u(A===!0)}),e.jsx("span",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:188",className:"text-xs leading-relaxed",children:"위에 표시된 캠페인과 관련 자료가 영구 삭제되며 되돌릴 수 없음을 확인했습니다."})]})]}),e.jsxs(_a,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:195",children:[e.jsx(G,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:196",variant:"outline",className:"bg-background",disabled:N.isPending,onClick:()=>_(!1),children:"취소"}),e.jsx(G,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:204",variant:"destructive",disabled:!z||N.isPending,onClick:R,children:N.isPending?"삭제 ì
691¤‘…":"삭제"})]})]})}),e.jsx(EO,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:214",open:c&&f==="final",onOpenChange:A=>{!A&&!N.isPending&&b(V=>t2(V,"cancel-final",z))},children:e.jsxs(PO,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:222",className:"sm:max-w-sm",children:[e.jsxs(MO,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:223",children:[e.jsxs(OO,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:224",className:"flex items-center gap-2",children:[e.jsx(St,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:225",className:"size-5 text-destructive"}),"정말 삭제할까요?"]}),e.jsxs(zO,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:228",className:"leading-relaxed",children:[e.jsx("strong",{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:229",className:"font-semibold text-foreground",children:s})," 캠페인과 위에 표시된 캠페인 자료가 영구 삭제됩니다. 글로벌 유통사 DB와 수신함 원문은 보존됩니다. 이 작업은 되돌릴 수 없습니다."]})]}),e.jsxs(RO,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:232",children:[e.jsx(BO,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:233",disabled:N.isPending,children:"아니요, 돌아가기"}),e.jsx(LO,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:234",asChild:!0,children:e.jsx(G,{"data-loc":"client/src/components/campaign/DeleteCampaignDialog.tsx:235",variant:"destructive",disabled:N.isPending,onClick:P,children:N.isPending?"삭제 ì
691¤‘…":"네, 정말 삭제"})})]})]})})]})}const ts="__all__";function cl(t){return t?new Date(t).getTime():0}function $O(t,s){return[...t.filter(r=>{const i=s.status===ts||r.campaign.status===s.status,o=s.country===ts||r.campaign.iso2===s.country;return i&&o})].sort((r,i)=>s.sort==="created_desc"?cl(i.campaign.createdAt)-cl(r.campaign.createdAt):s.sort==="created_asc"?cl(r.campaign.createdAt)-cl(i.campaign.createdAt):s.sort==="name_asc"?r.campaign.name.localeCompare(i.campaign.name,"ko"):s.sort==="country_asc"?(r.countryNameKo??r.campaign.iso2).localeCompare(i.countryNameKo??i.campaign.iso2,"ko"):s.sort==="candidates_desc"?i.candidateCount-r.candidateCount||r.campaign.name.localeCompare(i.campaign.name,"ko"):cl(i.campaign.updatedAt)-cl(r.campaign.updatedAt))}function qO(t){const s=new Map;for(const c of t)s.set(c.campaign.iso2,c.countryNameKo??c.campaign.iso2);return Array.from(s.entries()).sort((c,r)=>c[1].localeCompare(r[1],"ko"))}const Ff={draft:{label:"준비 중",className:"bg-muted text-muted-foreground"},researching:{label:"바이어 발굴 중",className:"bg-blue-50 text-blue-700"},ready:{label:"발송 대기",className:"bg-emerald-50 text-emerald-700"},sending:{label:"발송 진행",className:"bg-indigo-50 text-indigo-700"},done:{label:"완료",className:"bg-muted text-muted-foreground"},blocked:{label:"발송 차단",className:"bg-slate-800 text-slate-100"}};function QO(){const{data:t,isLoading:s}=q.gateway.campaigns.list.useQuery(),[c,r]=v.useState(null),[i,o]=v.useState(ts),[u,m]=v.useState(ts),[p,f]=v.useState("updated_desc"),b=v.useMemo(()=>qO(t??[]),[t]),h=v.useMemo(()=>$O(t??[],{status:i,country:u,sort:p}),[t,i,u,p]),y=i!==ts||u!==ts;return e.jsxs("div",{"data-loc":"client/src/pages/Campaigns.tsx:56",className:"page-shell max-w-6xl",children:[e.jsxs("header",{"data-loc":"client/src/pages/Campaigns.tsx:57",className:"flex flex-wrap items-end justify-between gap-4 rounded-2xl border border-border/70 bg-white/80 p-5 shadow-[0_18px_45px_-34px_rgba(18,35,61,.5)] backdrop-blur-sm md:p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Campaigns.tsx:58",className:"max-w-2xl",children:[e.jsx("p",{"data-loc":"client/src/pages/Campaigns.tsx:59",className:"page-kicker",children:"Campaign Workspace"}),e.jsx("h1",{"data-loc":"client/src/pages/Campaigns.tsx:60",className:"page-heading mt-1",children:"캠페인"}),e.jsxs("p",{"data-loc":"client/src/pages/Campaigns.tsx:61",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:["캠페인은 ",mu.defaultMessageUnit,"ê³¼ 국가 하나의 조합입니다. 1ì°¨ 목표는"," ",mu.primaryGoal,"이며, 국가별 규칙·컬처핏에 맞춘 문안을 사장님 승인 후 실행합니다."]})]}),e.jsx(G,{"data-loc":"client/src/pages/Campaigns.tsx:66",className:"gap-1.5",size:"lg",asChild:!0,children:e.jsxs(rt,{"data-loc":"client/src/pages/Campaigns.tsx:67",href:"/campaigns/new",children:[e.jsx(vs,{"data-loc":"client/src/pages/Campaigns.tsx:68",className:"size-4"}),"캠페인 만들기"]})})]}),!s&&(t?.length??0)>0&&e.jsxs("section",{"data-loc":"client/src/pages/Campaigns.tsx:75",className:"filter-bar rounded-2xl border border-border/80 bg-card/96 p-4 shadow-[0_16px_40px_-34px_rgba(18,35,61,.5)]",children:[e.jsxs("div",{"data-loc":"client/src/pages/Campaigns.tsx:76",className:"flex shrink-0 items-center gap-2 text-sm font-semibold",children:[e.jsx("span",{"data-loc":"client/src/pages/Campaigns.tsx:77",className:"flex size-8 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e.jsx(d1,{"data-loc":"client/src/pages/Campaigns.tsx:78",className:"size-4"})}),"캠페인 찾기"]}),e.jsxs("div",{"data-loc":"client/src/pages/Campaigns.tsx:82",className:"grid w-full gap-2 sm:grid-cols-3 lg:w-auto",children:[e.jsxs(et,{"data-loc":"client/src/pages/Campaigns.tsx:83",value:i,onValueChange:o,children:[e.jsx(at,{"data-loc":"client/src/pages/Campaigns.tsx:84",className:"w-full sm:w-40","aria-label":"캠페인 상태 필터",children:e.jsx(tt,{"data-loc":"client/src/pages/Campaigns.tsx:84"})}),e.jsxs(st,{"data-loc":"client/src/pages/Campaigns.tsx:85",children:[e.jsx(ve,{"data-loc":"client/src/pages/Campaigns.tsx:86",value:ts,children:"모든 상태"}),Object.entries(Ff).map(([j,S])=>e.jsx(ve,{"data-loc":"client/src/pages/Campaigns.tsx:88",value:j,children:S.label},j))]})]}),e.jsxs(et,{"data-loc":"client/src/pages/Campaigns.tsx:92",value:u,onValueChange:m,children:[e.jsx(at,{"data-loc":"client/src/pages/Campaigns.tsx:93",className:"w-full sm:w-44","aria-label":"캠페인 국가 필터",children:e.jsx(tt,{"data-loc":"client/src/pages/Campaigns.tsx:93"})}),e.jsxs(st,{"data-loc":"client/src/pages/Campaigns.tsx:94",children:[e.jsx(ve,{"data-loc":"client/src/pages/Campaigns.tsx:95",value:ts,children:"모든 국가"}),b.map(([j,S])=>e.jsx(ve,{"data-loc":"client/src/pages/Campaigns.tsx:97",value:j,children:S},j))]})]}),e.jsxs(et,{"data-loc":"client/src/pages/Campaigns.tsx:101",value:p,onValueChange:j=>
691f(j),children:[e.jsx(at,{"data-loc":"client/src/pages/Campaigns.tsx:102",className:"w-full sm:w-48","aria-label":"캠페인 정렬",children:e.jsx(tt,{"data-loc":"client/src/pages/Campaigns.tsx:102"})}),e.jsxs(st,{"data-loc":"client/src/pages/Campaigns.tsx:103",children:[e.jsx(ve,{"data-loc":"client/src/pages/Campaigns.tsx:104",value:"updated_desc",children:"최근 작업 순"}),e.jsx(ve,{"data-loc":"client/src/pages/Campaigns.tsx:105",value:"created_desc",children:"최근 생성 순"}),e.jsx(ve,{"data-loc":"client/src/pages/Campaigns.tsx:106",value:"created_asc",children:"오래된 생성 순"}),e.jsx(ve,{"data-loc":"client/src/pages/Campaigns.tsx:107",value:"name_asc",children:"이름 가나다 순"}),e.jsx(ve,{"data-loc":"client/src/pages/Campaigns.tsx:108",value:"country_asc",children:"국가 가나다 순"}),e.jsx(ve,{"data-loc":"client/src/pages/Campaigns.tsx:109",value:"candidates_desc",children:"후보 많은 순"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Campaigns.tsx:113",className:"flex w-full items-center justify-between gap-2 lg:ml-auto lg:w-auto lg:justify-end",children:[e.jsxs("span",{"data-loc":"client/src/pages/Campaigns.tsx:114",className:"text-xs text-muted-foreground",children:[h.length," / ",t?.length??0,"개"]}),y&&e.jsxs(G,{"data-loc":"client/src/pages/Campaigns.tsx:118",size:"sm",variant:"ghost",className:"gap-1",onClick:()=>{o(ts),m(ts)},children:[e.jsx(Mg,{"data-loc":"client/src/pages/Campaigns.tsx:127",className:"size-3.5"})," 초기화"]})]})]}),s?e.jsx("div",{"data-loc":"client/src/pages/Campaigns.tsx:135",className:"space-y-2",children:Array.from({length:3}).map((j,S)=>e.jsx(we,{"data-loc":"client/src/pages/Campaigns.tsx:137",className:"h-20 rounded-xl"},S))}):(t?.length??0)===0?e.jsx(En,{"data-loc":"client/src/pages/Campaigns.tsx:141",icon:e.jsx(wn,{"data-loc":"client/src/pages/Campaigns.tsx:142",className:"size-8"}),title:"캠페인이 없습니다",description:"쎄라필 프로그램과 국가를 고르면 규칙 판정을 거쳐 캠페인이 만들어집니다. 검증 후보를 모아 1차 회신·미팅용 문안을 준비하세요.",action:e.jsx(G,{"data-loc":"client/src/pages/Campaigns.tsx:146",className:"gap-1.5",asChild:!0,children:e.jsxs(rt,{"data-loc":"client/src/pages/Campaigns.tsx:147",href:"/campaigns/new",children:[e.jsx(vs,{"data-loc":"client/src/pages/Campaigns.tsx:148",className:"size-4"}),"캠페인 만들기"]})})}):h.length===0?e.jsx(En,{"data-loc":"client/src/pages/Campaigns.tsx:155",icon:e.jsx(d1,{"data-loc":"client/src/pages/Campaigns.tsx:156",className:"size-8"}),title:"조건에 맞는 캠페인이 없습니다",description:"상태나 국가 필터를 바꾸거나 초기화해 다시 찾아보세요.",action:e.jsx(G,{"data-loc":"client/src/pages/Campaigns.tsx:160",variant:"outline",onClick:()=>{o(ts),m(ts)},children:"필터 초기화"})}):e.jsx("div",{"data-loc":"client/src/pages/Campaigns.tsx:172",className:"grid gap-3",children:h.map(({campaign:j,productName:S,countryNameKo:N,candidateCount:w},T)=>{const k=Ff[j.status]??{label:j.status,className:"bg-muted text-muted-foreground"};return e.jsxs("div",{"data-loc":"client/src/pages/Campaigns.tsx:179",className:"rise group flex items-center gap-2 rounded-2xl border border-border/80 bg-card/96 pr-2 shadow-[0_15px_38px_-32px_rgba(18,35,61,.55)] transition-all hover:-translate-y-0.5 hover:border-primary/35 hover:shadow-[0_20px_46px_-30px_rgba(37,99,235,.38)]",style:{animationDelay:`${Math.min(T,10)*30}ms`},children:[e.jsxs(rt,{"data-loc":"client/src/pages/Campaigns.tsx:184",href:`/campaigns/${j.id}`,className:"flex min-w-0 flex-1 items-center gap-4 p-4 md:p-5 active:scale-[0.995]",children:[e.jsxs("div",{"data-loc":"client/src/pages/Campaigns.tsx:188",className:"min-w-0 flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/Campaigns.tsx:189",className:"truncate text-[0.95rem] font-bold tracking-[-0.01em] group-hover:text-primary",children:j.name}),e.jsxs("p",{"data-loc":"client/src/pages/Campaigns.tsx:190",className:"mt-0.5 truncate text-xs text-muted-foreground",children:[S??"제품 삭제됨"," · ",N??j.iso2]})]}),e.jsx("span",{"data-loc":"client/src/pages/Campaigns.tsx:194",className:`shrink-0 rounded-full px-2.5 py-1 text-xs font-semibold ${k.className}`,children:k.label}),e.jsxs("span",{"data-loc":"client/src/pages/Campaigns.tsx:199",className:"hidden shrink-0 items-center gap-1 text-xs text-muted-foreground sm:flex",children:[e.jsx(sr,{"data-loc":"client/src/pages/Campaigns.tsx:200",className:"size-3.5"})," 후보 ",w]}),e.jsx(Sn,{"data-loc":"client/src/pages/Campaigns.tsx:202",signal:j.effectiveSignal,short:!0}),e.jsx(ss,{"data-loc":"client/src/pages/Campaigns.tsx:203",className:"size-4 shrink-0 text-muted-foreground"})]}),e.jsxs(hn,{"data-loc":"client/src/pages/Campaigns.tsx:205",children:[e.jsx(bn,{"data-loc":"client/src/pages/Campaigns.tsx:206",asChild:!0,children:e.jsx(G,{"data-loc":"client/src/pages/Campaigns.tsx:207",variant:"ghost",size:"icon",className:"size-8 shrink-0 text-muted-foreground","aria-label":`${j.name} 관리`,children:e.jsx(yN,{"data-loc":"client/src/pages/Campaigns.tsx:213",className:"size-4"})})}),e.jsx(vn,{"data-loc":"client/src/pages/Campaigns.tsx:216",align:"end",children:e.jsxs(Da,{"data-loc":"client/src/pages/Campaigns.tsx:217",className:"text-destructive focus:text-destructive",onClick:()=>r({id:j.id,name:j.name}),children:[e.jsx(Hs,{"data-loc":"client/src/pages/Campaigns.tsx:223",className:"size-3.5"}),"삭제"]})})]})]},j.id)})}),c&&e.jsx(c3,{"data-loc":"client/src/pages/Campaigns.tsx:235",campaignId:c.id,campaignName:c.name,open:!0,onOpenChange:j=>{j||r(null)}})]})}const WO=["briefing","culture","candidates","drafts","send","replies","activity"];function VO(){const{id:t=""}=Uu(),s=Number(t),c=HN(),[,r]=Pn(),[i,o]=v.useState(!1),u=new URLSearchParams(c).get("tab")??"",m=WO.includes(u)?u:"briefing",{data:p,isLoading:f}=q.gateway.campaigns.get.useQuery({id:s},{enabled:Number.isFinite(s)}),[b,h]=v.useState(m);if(v.useEffect(()=>{h(m)},[m]),f)return e.jsxs("div",{"data-loc":"client/src/pages/CampaignDetail.tsx:65",className:"page-shell max-w-7xl",children:[e.jsx(we,{"data-loc":"client/src/pages/CampaignDetail.tsx:66",className:"h-8 w-52"}),e.jsx(we,{"data-loc":"client/src/pages/CampaignDetail.tsx:67",className:"h-24 rounded-xl"}),e.jsx(we,{"data-loc":"client/src/pages/CampaignDetail.tsx:68",className:"h-96 rounded-xl"})]});if(!p?.campaign)return e.jsxs("div",{"data-loc":"client/src/pages/CampaignDetail.tsx:75",className:"page-shell max-w-7xl py-16 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/CampaignDetail.tsx:76",className:"text-sm text-muted-foreground",children:"캠페인을 찾을 수 없습니다."}),e.jsx(G,{"data-loc":"client/src/pages/CampaignDetail.tsx:77",variant:"outline",className:"mt-4 bg-background",asChild:!0,children:e.jsx(rt,{"data-loc":"client/src/pages/CampaignDetail.tsx:78",href:"/campaigns",children:"캠페인 목록으로"})})]});const{campaign:y,rule:j,product:S}=p,N=y.effectiveSignal,w=N==="BLOCK",T=Ff[y.status]??{label:y.status,className:"bg-muted text-muted-foreground"};return e.jsxs("div",{"data-loc":"client/src/pages/CampaignDetail.tsx:93",className:"page-shell max-w-7xl",children:[e.jsxs(rt,{"data-loc":"client/src/pages/CampaignDetail.tsx:94",href:"/campaigns",className:"inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground transition-colors hover:text-primary",children:[e.jsx(eo,{"data-loc":"client/src/pages/CampaignDetail.tsx:98",className:"size-4"}),"캠페인 목록"]}),e.jsxs("div",{"data-loc":"client/src/pages/CampaignDetail.tsx:103",className:`relative overflow-hidden rounded-2xl border p-5 shadow-[0_18px_46px_-34px_rgba(18,35,61,.55)] md:p-6 ${w?"border-slate-800 bg-slate-900 text-slate-100":"border-border/80 bg-card/96"}`,children:[!w&&e.jsx("span",{"data-loc":"client/src/pages/CampaignDetail.tsx:109",className:"pointer-events-none absolute inset-x-0 top-0 h-1 bg-[linear-gradient(90deg,#2563eb,#16b8c7,#7c5ce7)]"}),e.jsxs("div",{"data-loc":"client/src/pages/CampaignDetail.tsx:111",className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/CampaignDetail.tsx:112",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/pages/CampaignDetail.tsx:113",className:`text-[0.68rem] font-bold uppercase tracking-[0.15em] ${w?"text-slate-400":"text-primary"}`,children:"Campaign Workspace"}),e.jsx("h1",{"data-loc":"client/src/pages/CampaignDetail.tsx:116",className:"mt-1 truncate text-xl font-bold tracking-[-0.025em] md:text-2xl",children:y.name}),e.jsxs("p",{"data-loc":"client/src/pages/CampaignDetail.tsx:119",className:`mt-1 text-sm ${w?"text-slate-400":"text-muted-foreground"}`,children:[S?.name??"제품 삭제됨"," · ",j?.countryNameKo??y.iso2,j?.language?` · ${j.language}`:""]})]}),e.jsxs("div",{"data-loc":"client/src/pages/CampaignDetail.tsx:126",className:"flex shrink-0 items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/CampaignDetail.tsx:127",className:`rounded-full px-2.5 py-1 text-xs font-semibold ${T.className}`,children:T.label}),w?e.jsxs("span",{"data-loc":"client/src/pages/CampaignDetail.tsx:133",className:"inline-flex items-center gap-1.5 rounded-full border border-slate-700 bg-slate-800 px-2.5 py-0.5 text-xs font-semibold",children:[e.jsx(Ea,{"data-loc":"client/src/pages/CampaignDetail.tsx:134",className:"size-3"}),"발송 금지"]}):e.jsx(Sn,{"data-loc":"client/src/pages/CampaignDetail.tsx:138",signal:N,short:!0}),p.myRole==="owner"&&e.jsxs(hn,{"data-loc":"client/src/pages/CampaignDetail.tsx:141",children:[e.jsx(bn,{"data-loc":"client/src/pages/CampaignDetail.tsx:142",asChild:!0,children:e.jsx(G,{"data-loc":"client/src/pages/CampaignDetail.tsx:143",variant:"ghost",size:"icon",className:`size-8 ${w?"text-slate-300 hover:bg-slate-800":"text-muted-foreground"}`,"aria-label":"캠페인 관리",children:e.jsx(yN,{"data-loc":"client/src/pages/CampaignDetail.tsx:149",className:"size-4"})})}),e.jsx(vn,{"data-loc":"client/src/pages/CampaignDetail.tsx:152",align:"end",children:e.jsxs(Da,{"data-loc":"client/src/pages/CampaignDetail.tsx:153",className:"text-destructive focus:text-destructive",onClick:()=>o(!0),children:[e.jsx(Hs,{"data-loc":"client/src/pages/CampaignDetail.tsx:157",className:"size-3.5"}),"캠페인 삭제"]})})]})]})]}),w&&e.jsxs("div",{"data-loc":"client/src/pages/CampaignDetail.tsx:167",className:"mt-4 rounded-lg border border-slate-700 bg-slate-800/60 p-4",children:[e.jsx("p",{"data-loc":"client/src/pages/CampaignDetail.tsx:168",className:"text-sm font-semibold",children:"이 캠페인에서는 발송할 수 없습니다"}),e.jsxs("p",{"data-loc":"client/src/pages/CampaignDetail.tsx:169",className:"mt-1.5 text-sm leading-relaxed text-slate-300",children:[wR(j?.countryNameKo??"이 나라")," 콜드메일이 금지된 국가입니다. 후보 정리와 조사는 계속 할 수 있지만, 발송 버튼은 열리지 않습니다.",j?.channel?` 대안: ${j.channel}`:""]})]})]}),e.jsx(l9,{"data-loc":"client/src/pages/CampaignDetail.tsx:179",campaignId:s}),e.jsx(i9,{"data-loc":"client/src/pages/CampaignDetail.tsx:181",campaignId:s,productId:y.productId,iso2:y.iso2,onMoveToTab:k=>{h(k),window.history.replaceState(null,"",`/campaigns/${t}?tab=${k}`)}}),e.jsx(VR,{"data-loc":"client/src/pages/CampaignDetail.tsx:192",campaignId:s,onJump:k=>{h(k);const E=k==="briefing"?`/campaigns/${t}`:`/campaigns/${t}?tab=${k}`;window.history.replaceState(null,"",E)}}),e.jsxs($S,{"data-loc":"client/src/pages/CampaignDetail.tsx:202",value:b,onValueChange:k=>{h(k);const E=k==="briefing"?`/campaigns/${t}`:`/campaigns/${t}?tab=${k}`;window.history.replaceState(null,"",E)},children:[e.jsxs(qS,{"data-loc":"client/src/pages/CampaignDetail.tsx:210",className:"w-full justify-start gap-1 overflow-x-auto rounded-2xl border border-border/80 bg-white/88 p-1.5 
691shadow-[0_12px_34px_-30px_rgba(18,35,61,.5)] backdrop-blur-sm",children:[e.jsx(xn,{"data-loc":"client/src/pages/CampaignDetail.tsx:211",className:"rounded-xl px-4",value:"briefing",children:"브리핑"}),e.jsx(xn,{"data-loc":"client/src/pages/CampaignDetail.tsx:212",className:"rounded-xl px-4",value:"culture",children:"컬쳐핏"}),e.jsx(xn,{"data-loc":"client/src/pages/CampaignDetail.tsx:213",className:"rounded-xl px-4",value:"candidates",children:"후보"}),e.jsx(xn,{"data-loc":"client/src/pages/CampaignDetail.tsx:214",className:"rounded-xl px-4",value:"drafts",children:"문안"}),e.jsx(xn,{"data-loc":"client/src/pages/CampaignDetail.tsx:215",className:"rounded-xl px-4",value:"send",children:"발송"}),e.jsx(xn,{"data-loc":"client/src/pages/CampaignDetail.tsx:216",className:"rounded-xl px-4",value:"replies",children:"회신"}),e.jsx(xn,{"data-loc":"client/src/pages/CampaignDetail.tsx:217",className:"rounded-xl px-4",value:"activity",children:"기록"})]}),e.jsx(fn,{"data-loc":"client/src/pages/CampaignDetail.tsx:220",value:"briefing",className:"mt-5",children:e.jsx(gR,{"data-loc":"client/src/pages/CampaignDetail.tsx:221",campaignId:s,data:p,myRole:p.myRole})}),e.jsx(fn,{"data-loc":"client/src/pages/CampaignDetail.tsx:223",value:"culture",className:"mt-5",children:e.jsx(WS,{"data-loc":"client/src/pages/CampaignDetail.tsx:224",iso2:p.campaign.iso2,countryNameKo:p.rule?.countryNameKo??p.campaign.iso2})}),e.jsx(fn,{"data-loc":"client/src/pages/CampaignDetail.tsx:229",value:"candidates",className:"mt-5",children:e.jsx(HR,{"data-loc":"client/src/pages/CampaignDetail.tsx:230",campaignId:s,myRole:p.myRole})}),e.jsx(fn,{"data-loc":"client/src/pages/CampaignDetail.tsx:232",value:"drafts",className:"mt-5",children:e.jsx(_9,{"data-loc":"client/src/pages/CampaignDetail.tsx:233",campaignId:s})}),e.jsx(fn,{"data-loc":"client/src/pages/CampaignDetail.tsx:235",value:"send",className:"mt-5",children:e.jsx(I9,{"data-loc":"client/src/pages/CampaignDetail.tsx:236",campaignId:s,isBlock:w,onMoveToTab:k=>{h(k),window.history.replaceState(null,"",`/campaigns/${t}?tab=${k}`)}})}),e.jsx(fn,{"data-loc":"client/src/pages/CampaignDetail.tsx:245",value:"replies",className:"mt-5",children:e.jsx(dO,{"data-loc":"client/src/pages/CampaignDetail.tsx:246",campaignId:s,canEdit:fR(p.myRole??"viewer")})}),e.jsx(fn,{"data-loc":"client/src/pages/CampaignDetail.tsx:251",value:"activity",className:"mt-5",children:e.jsx($9,{"data-loc":"client/src/pages/CampaignDetail.tsx:252",campaignId:s})})]}),e.jsx(c3,{"data-loc":"client/src/pages/CampaignDetail.tsx:256",campaignId:s,campaignName:y.name,open:i,onOpenChange:o,onDeleted:()=>r("/campaigns")})]})}const a2=["제품","국가","판정 확인","생성"];function FO(){const[,t]=Pn(),{activeProductId:s,setActiveProductId:c}=Mn(),{data:r,isLoading:i}=q.gateway.products.list.useQuery(),{data:o,isLoading:u}=q.gateway.countries.list.useQuery(),[m,p]=v.useState(0),[f,b]=v.useState(s),[h,y]=v.useState(null),[j,S]=v.useState(""),[N,w]=v.useState(""),[T,k]=v.useState(!0),[E,z]=v.useState("15"),_=aS(E,null),{data:R,isLoading:P}=q.gateway.countries.judge.useQuery({iso2:h??"",...f?{productId:f}:{}},{enabled:!!h&&m>=2}),A=q.useUtils(),V=q.gateway.campaigns.create.useMutation({onSuccess:se=>{A.gateway.campaigns.list.invalidate(),T?X.info(se.signal==="BLOCK"?"캠페인을 만들었습니다. 발송 금지 국가라 문화 조사만 진행합니다.":se.baseCandidateCount>0?`캠페인을 만들었습니다. 공용 글로벌 DB 후보 ${se.baseCandidateCount}곳을 먼저 넣고, 추가 발굴·문화 조사·1차 문안을 준비합니다.`:"캠페인을 만들었습니다. 유통사 찾기·문화 조사·1차 문안을 준비합니다."):se.baseCandidateCount>0&&X.success(`공용 글로벌 DB 후보 ${se.baseCandidateCount}곳을 캠페인에 미리 추가했습니다.`),t(se.signal==="BLOCK"?`/campaigns/${se.id}`:`/campaigns/${se.id}?tab=candidates`)},onError:se=>X.error(se.message)}),H=v.useMemo(()=>{let se=o??[];if(N.trim()){const L=N.trim().toLowerCase();
691se=se.filter(F=>F.countryNameKo.includes(L)||F.countryName.toLowerCase().includes(L))}return[...se].sort((L,F)=>{const W=pu[L.signal]-pu[F.signal];return W!==0?W:L.gdpRank-F.gdpRank})},[o,N]),M=r?.find(se=>se.id===f),B=o?.find(se=>se.iso2===h),I=(R?.signal??B?.signal)==="BLOCK",ie=m===0?!!f:m===1?!!h:m===2?!I:!0;return e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:99",className:"page-shell max-w-4xl",children:[e.jsxs(rt,{"data-loc":"client/src/pages/CampaignNew.tsx:100",href:"/campaigns",className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(eo,{"data-loc":"client/src/pages/CampaignNew.tsx:104",className:"size-4"}),"캠페인 목록"]}),e.jsxs("header",{"data-loc":"client/src/pages/CampaignNew.tsx:108",children:[e.jsx("p",{"data-loc":"client/src/pages/CampaignNew.tsx:109",className:"page-kicker",children:"New Campaign"}),e.jsx("h1",{"data-loc":"client/src/pages/CampaignNew.tsx:110",className:"page-heading mt-1",children:"캠페인 만들기"}),e.jsx("p",{"data-loc":"client/src/pages/CampaignNew.tsx:111",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:"제품과 국가를 고르면 규칙을 판정합니다. 보낼 수 없는 조합이면 여기서 멈춥니다."})]}),e.jsx("ol",{"data-loc":"client/src/pages/CampaignNew.tsx:117",className:"flex items-center gap-2",children:a2.map((se,L)=>e.jsxs("li",{"data-loc":"client/src/pages/CampaignNew.tsx:119",className:"flex flex-1 items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/CampaignNew.tsx:120",className:`flex size-6 shrink-0 items-center justify-center rounded-full text-xs font-bold transition-colors ${L<m||L===m?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,children:L<m?e.jsx(Et,{"data-loc":"client/src/pages/CampaignNew.tsx:129",className:"size-3.5"}):L+1}),e.jsx("span",{"data-loc":"client/src/pages/CampaignNew.tsx:131",className:`hidden text-xs font-medium sm:inline ${L===m?"":"text-muted-foreground"}`,children:se}),L<a2.length-1&&e.jsx("span",{"data-loc":"client/src/pages/CampaignNew.tsx:138",className:"h-px flex-1 bg-border"})]},se))}),m===0&&e.jsx("section",{"data-loc":"client/src/pages/CampaignNew.tsx:145",className:"space-y-3",children:i?e.jsx(we,{"data-loc":"client/src/pages/CampaignNew.tsx:147",className:"h-20 rounded-xl"}):(r?.length??0)===0?e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:149",className:"rounded-xl border border-dashed py-12 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/CampaignNew.tsx:150",className:"text-sm text-muted-foreground",children:"등록된 제품이 없습니다. 먼저 제품을 등록하세요."}),e.jsx(G,{"data-loc":"client/src/pages/CampaignNew.tsx:153",className:"mt-4",asChild:!0,children:e.jsx(rt,{"data-loc":"client/src/pages/CampaignNew.tsx:154",href:"/products",children:"제품 등록"})})]}):r?.map(se=>e.jsxs("button",{"data-loc":"client/src/pages/CampaignNew.tsx:159",onClick:()=>{b(se.id),c(se.id)},className:`flex w-full items-center gap-3 rounded-xl border p-4 text-left transition-all active:scale-[0.99] ${f===se.id?"border-primary bg-primary/5":"bg-card hover:border-primary/30"}`,children:[e.jsx("span",{"data-loc":"client/src/pages/CampaignNew.tsx:171",className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:e.jsx(Ui,{"data-loc":"client/src/pages/CampaignNew.tsx:172",className:"size-4 text-primary"})}),e.jsxs("span",{"data-loc":"client/src/pages/CampaignNew.tsx:174",className:"min-w-0 flex-1",children:[e.jsx("span",{"data-loc":"client/src/pages/CampaignNew.tsx:175",className:"block truncate font-semibold",children:se.name}),e.jsx("span",{"data-loc":"client/src/pages/CampaignNew.tsx:176",className:"block truncate text-xs text-muted-foreground",children:se.category??"분류 미지정"})]}),f===se.id&&e.jsx(Et,{"data-loc":"client/src/pages/CampaignNew.tsx:180",className:"size-4 text-primary"})]},se.id))}),m===1&&e.jsxs("section",{"data-loc":"client/src/pages/CampaignNew.tsx:189",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:190",className:"relative",children:[e.jsx(An,{"data-loc":"client/src/pages/CampaignNew.tsx:191",className:"absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground"}),e.jsx(Ce,{"data-loc":"client/src/pages/CampaignNew.tsx:192",value:N,onChange:se=>w(se.target.value),placeholder:"국가 검색",className:"h-9 pl-8 text-sm"})]}),u?e.jsx(we,{"data-loc":"client/src/pages/CampaignNew.tsx:200",className:"h-64 roun
691ded-xl"}):e.jsx("div",{"data-loc":"client/src/pages/CampaignNew.tsx:202",className:"max-h-[420px] space-y-2 overflow-y-auto rounded-xl border p-2",children:H.map(se=>{const L=se.signal,F=h===se.iso2;return e.jsxs("button",{"data-loc":"client/src/pages/CampaignNew.tsx:207",onClick:()=>y(se.iso2),className:`flex w-full items-center gap-3 rounded-lg border p-3 text-left transition-all active:scale-[0.99] ${F?"border-primary bg-primary/5":"bg-card hover:border-primary/30"}`,children:[e.jsxs("span",{"data-loc":"client/src/pages/CampaignNew.tsx:216",className:"min-w-0 flex-1",children:[e.jsx("span",{"data-loc":"client/src/pages/CampaignNew.tsx:217",className:"block truncate text-sm font-medium",children:se.countryNameKo}),e.jsxs("span",{"data-loc":"client/src/pages/CampaignNew.tsx:220",className:"block truncate text-xs text-muted-foreground",children:["GDP ",se.gdpRank,"위 · ",se.language??"언어 미확인"]})]}),e.jsx(Sn,{"data-loc":"client/src/pages/CampaignNew.tsx:224",signal:L,short:!0})]},se.iso2)})})]}),m===2&&e.jsx("section",{"data-loc":"client/src/pages/CampaignNew.tsx:235",children:P||!R?e.jsx(we,{"data-loc":"client/src/pages/CampaignNew.tsx:237",className:"h-48 rounded-xl"}):e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:239",className:`rounded-xl border p-5 ${I?"border-slate-800 bg-slate-900 text-slate-100":"bg-card"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:244",className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("p",{"data-loc":"client/src/pages/CampaignNew.tsx:245",className:"font-semibold",children:[M?.name," × ",R.rule.countryNameKo]}),I?e.jsxs("span",{"data-loc":"client/src/pages/CampaignNew.tsx:249",className:"inline-flex items-center gap-1.5 rounded-full border border-slate-700 bg-slate-800 px-2.5 py-0.5 text-xs font-semibold",children:[e.jsx(Ea,{"data-loc":"client/src/pages/CampaignNew.tsx:250",className:"size-3"}),"발송 금지"]}):e.jsx(Sn,{"data-loc":"client/src/pages/CampaignNew.tsx:254",signal:R.signal})]}),e.jsx("p",{"data-loc":"client/src/pages/CampaignNew.tsx:257",className:`mt-3 text-sm leading-relaxed ${I?"text-slate-200":""}`,children:Os[R.signal].plain}),e.jsx("div",{"data-loc":"client/src/pages/CampaignNew.tsx:260",className:`mt-3 space-y-1.5 rounded-lg p-3.5 ${I?"bg-slate-800/60":"bg-muted/50"}`,children:(I?R.reasons.slice(0,1):R.reasons).map((se,L)=>e.jsx("p",{"data-loc":"client/src/pages/CampaignNew.tsx:266",className:`text-sm leading-relaxed ${I?"text-slate-200":""}`,children:se},L))}),R.warnings.length>0&&!I&&e.jsx("div",{"data-loc":"client/src/pages/CampaignNew.tsx:275",className:"mt-3 rounded-lg border border-amber-200 bg-amber-50 p-3.5",children:R.warnings.map((se,L)=>e.jsxs("p",{"data-loc":"client/src/pages/CampaignNew.tsx:277",className:"flex gap-2 text-sm leading-relaxed text-amber-900",children:[e.jsx(js,{"data-loc":"client/src/pages/CampaignNew.tsx:281",className:"mt-0.5 size-4 shrink-0"}),se]},L))}),I&&e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:288",className:"mt-3 rounded-lg border border-slate-700 bg-slate-800/60 p-3.5",children:[e.jsx("p",{"data-loc":"client/src/pages/CampaignNew.tsx:289",className:"text-sm font-semibold",children:"캠페인을 만들 수 없습니다"}),e.jsx("p",{"data-loc":"client/src/pages/CampaignNew.tsx:290",className:"mt-1.5 text-sm leading-relaxed text-slate-300",children:R.rule.channel??"전시회 대면, 기존 거래처 소개 등 사전 접점을 만든 뒤 접촉하세요."})]})]})}),m===3&&e.jsxs("section",{"data-loc":"client/src/pages/CampaignNew.tsx:303",className:"space-y-4 rounded-xl border bg-card p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:304",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/CampaignNew.tsx:305",className:"text-sm",children:"캠페인 이름"}),e.jsx(Ce,{"data-loc":"client/src/pages/CampaignNew.tsx:306",value:j,onChange:se=>S(se.target.value),placeholder:`${M?.name??"제품"} · ${B?.countryNameKo??"국가"}`}),e.jsx("p",{"data-loc":"client/src/pages/CampaignNew.tsx:311",className:"text-xs text-muted-foreground",children:'비워 두면 "제품 · 국가" 형식으로 자동 지정됩니다.'})]}),e.jsxs("dl",{"data-loc":"client/src/pages/CampaignNew.tsx:315",className:"space-y-2 rounded-lg bg-muted/50 p-4 text-sm",children:[e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:316",className:"flex justify-between gap-3",children:[e.jsx("dt",{"data-loc":"client/src/pages/CampaignNew.tsx:317",className:"text-muted-foreground",children:"제품"}),e.jsx("dd",{"data-loc":"client/src/pages/CampaignNew.tsx:318",className:"font-semibold",children:M?.name})]}),e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:320",className:"flex justify-between gap-3",children:[e.jsx("dt",{"data-loc":"client/src/pages/CampaignNew.tsx:321",className:"text-muted-foreground",children:"국가"}),e.jsx("dd",{"data-loc":"client/src/pages/CampaignNew.tsx:322",className:"font-semibold",children:B?.countryNameKo})]}),e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:324",className:"flex items-center justify-between gap-3",children:[e.jsx("dt",{"data-loc":"client/src/pages/CampaignNew.tsx:325",className:"text-muted-foreground",children:"판정"}),e.jsx("dd",{"data-loc":"client/src/pages/CampaignNew.tsx:326",children:R&&e.jsx(Sn,{"data-loc":"client/src/pages/CampaignNew.tsx:327",signal:R.signal,short:!0})})]})]}),R?.signal!=="BLOCK"&&e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:333",className:"space-y-3 rounded-lg border border-primary/30 bg-primary/[0.03] p-4",children:[e.jsxs("label",{"data-loc":"client/src/pages/CampaignNew.tsx:334",className:"flex cursor-pointer items-start gap-3",children:[e.jsx($a,{"data-loc":"client/src/pages/CampaignNew.tsx:335",className:"mt-0.5",checked:T,onCheckedChange:se=>k(se===!0)}),e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:340",className:"space-y-1",children:[e.jsxs("p",{"data-loc":"client/src/pages/CampaignNew.tsx:341",className:"flex items-center gap-1.5 text-sm font-medium",children:[e.jsx(Dt,{"data-loc":"client/src/pages/CampaignNew.tsx:342",className:"size-3.5 text-primary"}),"캠페인을 자동으로 준비해 주세요"]}),e.jsxs("p",{"data-loc":"client/src/pages/CampaignNew.tsx:345",className:"text-xs text-muted-foreground",children:["① ",B?.countryNameKo??"해당 국가","의 유통사를 모아 홈페이지와 이메일을 확인하고 등급·규모를 매깁니다. ② 그 나라 상관례와 조심할 점을 조사합니다. ③ 조사 내용에 맞춰 현지어 1차 문안과 한국어 대역을 씁니다. 창을 닫아도 계속 진행됩니다."]})]})]}),T&&e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:354",className:"flex items-center gap-2 border-t border-primary/20 pt-3 pl-7",children:[e.jsx(_e,{"data-loc":"client/src/pages/CampaignNew.tsx:355",htmlFor:"cn-count",className:"text-xs",children:"몇 곳 찾을까요"}),e.jsx(Ce,{"data-loc":"client/src/pages/CampaignNew.tsx:358",id:"cn-count",type:"number",min:5,max:100,value:E,onChange:se=>z(se.target.value),onBlur:()=>{z(String(_))},className:"h-8 w-20 bg-background text-center text-sm"}),e.jsx("span",{"data-loc":"client/src/pages/CampaignNew.tsx:371",className:"text-xs text-muted-foreground",children:"곳 · 15곳이면 보낼 수 있는 곳이 8~10곳 나옵니다"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/CampaignNew.tsx:382",className:"flex items-center justify-between gap-3",children:[e.jsx(G,{"data-loc":"client/src/pages/CampaignNew.tsx:383",variant:"outline",className:"bg-background",disabled:m===0,onClick:()=>p(se=>Math.max(0,se-1)),children:"이전"}),m<3?e.jsxs(G,{"data-loc":"client/src/pages/CampaignNew.tsx:392",className:"gap-1.5",disabled:!ie,onClick:()=>p(se=>
691se+1),children:["다음",e.jsx(ss,{"data-loc":"client/src/pages/CampaignNew.tsx:398",className:"size-4"})]}):e.jsxs(G,{"data-loc":"client/src/pages/CampaignNew.tsx:401",className:"gap-1.5",disabled:!f||!h||V.isPending,onClick:()=>f&&h&&V.mutate({productId:f,iso2:h,name:j.trim()||void 0,targetCount:_,autoSetup:T}),children:[e.jsx(Ha,{"data-loc":"client/src/pages/CampaignNew.tsx:416",className:"size-4"}),V.isPending?"생성 중":"캠페인 생성"]})]})]})}const pn="__all__";function KO(t,s){const c=s.query.trim().toLowerCase();return t.filter(r=>{const i=!c||[r.lead.companyName,r.market.countryRaw,r.lead.email,r.market.city,r.market.category].filter(Boolean).some(m=>m.toLowerCase().includes(c)),o=s.country===pn,u=s.recontactSignal==="all"||r.history.recontact.signal===s.recontactSignal;return i&&o&&u})}function GO(t){return`"${(t==null?"":String(t)).replaceAll('"','""')}"`}function YO(t){const s=["국가","도시","상업 권역","회사명","홈페이지","이메일","전화번호","카테고리","발송 신호","실제 발송 수","마지막 발송일","국가 규칙 상태","원본 검수 상태"],c=t.map(r=>[r.market.countryRaw,r.market.city,r.market.commercialZone,r.lead.companyName,r.lead.website,r.lead.email,r.lead.phone,r.market.category,r.history.recontact.signal,r.history.acceptedCount,r.history.lastSentAt?new Date(r.history.lastSentAt).toLocaleDateString("ko-KR"):"",r.market.countryRuleStatus,r.market.sourceStatus]);return`\uFEFF${[s,...c].map(r=>r.map(GO).join(",")).join(`\r
692`)}`}function XO(t){const s=t?.trim();if(!s)return null;const c=s.startsWith("//")?`https:${s}`:/^https?:\/\//i.test(s)?s:`https://${s}`;try{const r=new URL(c);return["http:","https:"].includes(r.protocol)?r:null}catch{return null}}function dc(t,...s){const c=t.hostname.toLowerCase().replace(/^www\./,"");return s.some(r=>c===r||c.endsWith(`.${r}`))}function rl(t,s){const c=t.pathname.toLowerCase().replace(/^\/+/,"");return s.some(r=>c===r||c.startsWith(`${r}/`))}function Fc(t){return t.pathname.split("/").filter(Boolean).length>0}function Gx(t){const s=new URL(t.toString());return s.search="",s.hash="",s.toString()}function un(t,s){const c=s?.trim();if(!c)return null;if(t==="whatsapp"&&!/^https?:\/\//i.test(c)&&!c.startsWith("//")){if(!c.startsWith("+"))return null;const o=c.replace(/\D/g,"");return o.length>=8&&o.length<=15?`https://wa.me/${o}`:null}const r=XO(c);if(!r)return null;const i=["login","signin","search","redirect","share","sharer.php","dialog","authwall"];switch(t){case"facebook":return!dc(r,"facebook.com","fb.com")||!Fc(r)||rl(r,[...i,"sharer","l.php","plugins","profile.php"])||r.searchParams.has("u")&&rl(r,["share","sharer.php","dialog"])?null:Gx(r);case"instagram":return!dc(r,"instagram.com")||!Fc(r)||rl(r,[...i,"accounts","explore","direct","p","reel","reels","stories","tv"])?null:Gx(r);case"linkedin":return!dc(r,"linkedin.com")||rl(r,i)||rl(r,["feed","jobs","learning","pulse"])?null:/\/(company|in|school|showcase)\/[^/]+/i.test(r.pathname)?Gx(r):null;case"whatsapp":return dc(r,"wa.me","whatsapp.com")&&Fc(r)?r.toString():null;case"telegram":return dc(r,"t.me","telegram.me")&&Fc(r)&&!rl(r,i)?r.toString():null;case"zalo":return dc(r,"zalo.me")&&Fc(r)?r.toString():null;case"line":return dc(r,"line.me")&&Fc(r)?r.toString():null;case"kakao":return dc(r,"pf.kakao.com","open.kakao.com")&&Fc(r)?r.toString():null}}function ZO(t){const s=t?.trim();return s&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)?`mailto:${s}`:null}const JO={never_sent:{label:"첫 발송 가능",tone:"bg-sky-50 text-sky-700 border-sky-200"},waiting:{label:"재접촉 대기",tone:"bg-amber-50 text-amber-800 border-amber-200"},ready:{label:"오늘 재접촉 가능",tone:"bg-emerald-50 text-emerald-700 border-emerald-200"},blocked:{label:"발송 금지",tone:"bg-rose-50 text-rose-700 border-rose-200"},replied:{label:"회신 검토",tone:"bg-violet-50 text-violet-700 border-violet-200"},limit_reached:{label:"재접촉 한도",tone:"bg-muted text-muted-foreground border-border"}};function ez(){const[t,s]=v.useState(""),[c,r]=v.useState(pn),[i,o]=v.useState("all"),[u,m]=v.useState(!1),[p,f]=v.useState(!1),[b,h]=v.useState(1),y=v.useDeferredValue(t),{data:j,isLoading:S}=q.gateway.baseLeads.stats.useQuery({}),{data:N,isLoading:w,isFetching:T}=q.gateway.baseLeads.list.useQuery({includeHeld:!1,countryRaw:c===pn?void 0:c,query:y.trim()||void 0,hasKoreanProduct:u,hasLinkedIn:p,page:b,pageSize:100}),{data:k}=q.gateway.baseLeads.featureCounts.useQuery({countryRaw:c===pn?void 0:c,query:y.trim()||void 0}),E=q.gateway.baseLeads.exportExcel.useMutation({onSuccess:M=>{const B=document.createElement("a");B.href=M.url,B.download=M.fileName,document.body.appendChild(B),B.click(),B.remove(),X.success("전체 글로벌 DB Excel을 생성했습니다.",{description:`회사 ${M.counts.companies.toLocaleStr
692ing()}개 · 시장 ${M.counts.markets.toLocaleString()}개 · 담당자 ${M.counts.contacts.toLocaleString()}명`})},onError:M=>X.error("Excel 내보내기에 실패했습니다.",{description:M.message})}),z=N?.items??[];v.useEffect(()=>{h(1)},[c,y,u,p]);const _=v.useMemo(()=>{const M=new Map;for(const B of j??[])M.set(B.countryRaw,(M.get(B.countryRaw)??0)+Number(B.count));return Array.from(M,([B,I])=>({country:B,total:I})).sort((B,I)=>I.total-B.total||B.country.localeCompare(I.country,"ko"))},[j]),R=v.useMemo(()=>KO(z,{query:"",country:pn,recontactSignal:i}),[z,i]),P=(j??[]).reduce((M,B)=>M+Number(B.count),0),A=v.useMemo(()=>z.reduce((M,B)=>(M[B.history.recontact.signal]+=1,M),{all:z.length,never_sent:0,waiting:0,ready:0,blocked:0,replied:0,limit_reached:0}),[z]),V=()=>{const M=new Blob([YO(R)],{type:"text/csv;charset=utf-8"}),B=URL.createObjectURL(M),I=document.createElement("a");I.href=B,I.download=`글로벌-유통사-DB-${c===pn?"전체":c}-${new Date().toISOString().slice(0,10)}.csv`,document.body.appendChild(I),I.click(),I.remove(),URL.revokeObjectURL(B)},H=u||p;return e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:124",className:"page-shell",children:[e.jsxs("section",{"data-loc":"client/src/pages/BaseLeads.tsx:125",className:"flex flex-col gap-4 roun
692ded-2xl border border-border/80 bg-card/96 p-5 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)] md:flex-row md:items-end md:justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:126",className:"min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:127",className:"flex items-center gap-2 text-primary",children:[e.jsx(Ii,{"data-loc":"client/src/pages/BaseLeads.tsx:128",className:"size-4"}),e.jsx("span",{"data-loc":"client/src/pages/BaseLeads.tsx:129",className:"text-xs font-semibold tracking-wide",children:"GLOBAL DISTRIBUTOR DATABASE"})]}),e.jsx("h1",{"data-loc":"client/src/pages/BaseLeads.tsx:131",className:"mt-2 text-2xl font-bold tracking-tight",children:"글로벌 유통사 DB"}),e.jsx("p",{"data-loc":"client/src/pages/BaseLeads.tsx:132",className:"mt-1 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:"제품과 독립적으로 누적되는 검증 완료 유통사입니다. 공식 홈페이지·뷰티 관련성·유효 이메일을 확인한 회사만 표시하며, 확인되지 않은 보조 정보는 추정하지 않고 비워 둡니다."})]}),e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:136",className:"grid grid-cols-2 gap-2 text-center",children:[e.jsx(s2,{"data-loc":"client/src/pages/BaseLeads.tsx:137",label:"발송 가능 시장",value:P,loading:S,tone:"text-emerald-700"}),e.jsx(s2,{"data-loc":"client/src/pages/BaseLeads.tsx:138",label:"운영 국가",value:_.length,loading:S})]})]}),e.jsxs("section",{"data-loc":"client/src/pages/BaseLeads.tsx:142",className:"rounded-2xl border border-border/80 bg-card/96 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)]",children:[e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:143",className:"flex flex-col gap-3 border-b p-4 lg:flex-row lg:items-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:144",className:"relative w-full lg:max-w-md lg:flex-1",children:[e.jsx(An,{"data-loc":"client/src/pages/BaseLeads.tsx:145",className:"absolute left-3 top-2.5 size-4 text-muted-foreground"}),e.jsx(Ce,{"data-loc":"client/src/pages/BaseLeads.tsx:146",value:t,onChange:M=>s(M.target.value),className:"pl-9",placeholder:"회사명 · 국가 · 이메일로 찾기"})]}),e.jsxs(et,{"data-loc":"client/src/pages/BaseLeads.tsx:153",value:c,onValueChange:r,children:[e.jsx(at,{"data-loc":"client/src/pages/BaseLeads.tsx:154",className:"w-full lg:w-56","aria-label":"국가별 유통사 필터",children:e.jsx(tt,{"data-loc":"client/src/pages/BaseLeads.tsx:155",placeholder:"국가 선택"})}),e.jsxs(st,{"data-loc":"client/src/pages/BaseLeads.tsx:157",children:[e.jsxs(ve,{"data-loc":"client/src/pages/BaseLeads.tsx:158",value:pn,children:["모든 국가 (",P.toLocaleString(),")"]}),_.map(M=>e.jsxs(ve,{"data-loc":"client/src/pages/BaseLeads.tsx:160",value:M.country,children:[M.country," (",M.total,")"]},M.country))]})]}),e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:166",className:"flex flex-col gap-2 sm:flex-row lg:ml-auto",children:[e.jsxs(G,{"data-loc":"client/src/pages/BaseLeads.tsx:167",className:"w-full gap-1.5 sm:w-auto",onClick:()=>E.mutate({countryRaw:c===pn?void 0:c,query:y.trim()||void 0,hasKoreanProduct:u,hasLinkedIn:p}),disabled:E.isPending,children:[E.isPending?e.jsx(jt,{"data-loc":"client/src/pages/BaseLeads.tsx:177",className:"size-4 animate-spin"}):e.jsx(uA,{"data-loc":"client/src/pages/BaseLeads.tsx:177",className:"size-4"}),E.isPending?"Excel 만드는 중…":c!==pn||y.trim()||H?"필터 Excel 다운로드":"전체 Excel 다운로드"]}),e.jsxs(G,{"data-loc":"client/src/pages/BaseLeads.tsx:180",variant:"outline",className:"w-full gap-1.5 sm:w-auto",onClick:V,disabled:R.length===0,children:[e.jsx(to,{"data-loc":"client/src/pages/BaseLeads.tsx:181",className:"size-4"}),"현재 페이지 CSV ",R.length.toLocaleString(),"건"]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:186",className:"border-b bg-muted/15 px-4 py-3",children:[e.jsx("div",{"data-loc":"client/src/pages/BaseLeads.tsx:187",className:"-mx-1 flex gap-2 overflow-x-auto px-1 pb-1 sm:flex-wrap sm:overflow-visible sm:pb-0",children:[["all","전체"],["never_sent","첫 발송 가능"],["ready","오늘 재접촉"],["waiting","재접촉 대기"],["replied","회신 검토"],["blocked","발송 금지"]].map(([M,B])=>e.jsxs(G,{"data-loc":"client/src/pages/BaseLeads.tsx:196",size:"sm",variant:i===M?"default":"outline",className:"h-8 shrink-0 rounded-full px-3 text-xs","aria-pressed":i===M,onClick:()=>o(M),children:[B," ",A[M]>0&&e.jsx("span",{"data-loc":"client/src/pages/BaseLeads.tsx:197",className:"ml-1 opacity-70",children:A[M]})]},M))}),e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:201",className:"mt-2 grid grid-cols-2 gap-2 sm:flex sm:justify-end",children:[e.jsxs(G,{"data-loc":"client/src/pages/BaseLeads.tsx:202",size:"sm",variant:u?"default":"outline",className:"h-8 min-w-0 rounded-full px-2 text-xs sm:shrink-0 sm:px-3","aria-pressed":u,onClick:()=>m(M=>!M),children:[e.jsx(cu,{"data-loc":"client/src/pages/BaseLeads.tsx:209",className:"mr-1 size-3.5"})," 한국제품 판매 ",Number(k?.koreanProduct??0).toLocaleStr
692ing()]}),e.jsxs(G,{"data-loc":"client/src/pages/BaseLeads.tsx:211",size:"sm",variant:p?"default":"outline",className:"h-8 min-w-0 rounded-full px-2 text-xs sm:shrink-0 sm:px-3","aria-pressed":p,onClick:()=>f(M=>!M),children:[e.jsx(SN,{"data-loc":"client/src/pages/BaseLeads.tsx:218",className:"mr-1 size-3.5"})," LinkedIn 보유 ",Number(k?.linkedIn??0).toLocaleString()]})]}),e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:221",className:"mt-2 flex items-center justify-between gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{"data-loc":"client/src/pages/BaseLeads.tsx:222",children:["현재 페이지 ",R.length.toLocaleString(),"건 · 선택 조건 전체 ",Number(N?.total??0).toLocaleString(),"건"]}),(H||i!=="all")&&e.jsx(G,{"data-loc":"client/src/pages/BaseLeads.tsx:224",type:"button",variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>{o("all"),m(!1),f(!1)},children:"추가 필터 초기화"})]})]}),w?e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:242",className:"space-y-2 p-4",children:[e.jsx(we,{"data-loc":"client/src/pages/BaseLeads.tsx:242",className:"h-12 w-full"}),e.jsx(we,{"data-loc":"client/src/pages/BaseLeads.tsx:242",className:"h-12 w-full"})]}):R.length===0?e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:244",className:"p-12 text-center text-sm text-muted-foreground",children:[e.jsx(zu,{"data-loc":"client/src/pages/BaseLeads.tsx:245",className:"mx-auto mb-3 size-5"}),"조건에 맞는 발송 가능 유통사가 없습니다."]}):e.jsx("div",{"data-loc":"client/src/pages/BaseLeads.tsx:249",className:"overflow-x-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/BaseLeads.tsx:250",className:"w-full min-w-[1120px] table-fixed text-left text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/BaseLeads.tsx:251",className:"bg-muted/40 text-xs text-muted-foreground",children:e.jsxs("tr",{"data-loc":"client/src/pages/BaseLeads.tsx:252",children:[e.jsx("th",{"data-loc":"client/src/pages/BaseLeads.tsx:253",className:"w-[17%] px-4 py-3 font-medium",children:"국가 · 위치"}),e.jsx("th",{"data-loc":"client/src/pages/BaseLeads.tsx:254",className:"w-[24%] px-4 py-3 font-medium",children:"회사"}),e.jsx("th",{"data-loc":"client/src/pages/BaseLeads.tsx:255",className:"w-[28%] px-4 py-3 font-medium",children:"공식 연락처"}),e.jsx("th",{"data-loc":"client/src/pages/BaseLeads.tsx:256",className:"w-[15%] px-4 py-3 font-medium",children:"업종"}),e.jsx("th",{"data-loc":"client/src/pages/BaseLeads.tsx:257",className:"w-[16%] px-4 py-3 font-medium",children:"발송 이력"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/BaseLeads.tsx:260",className:"divide-y",children:R.map(M=>{const B=M.history.recontact,I=JO[B.signal];return e.jsxs("tr",{"data-loc":"client/src/pages/BaseLeads.tsx:265",className:"align-top hover:bg-muted/20",children:[e.jsxs("td",{"data-loc":"client/src/pages/BaseLeads.tsx:266",className:"px-4 py-3",children:[e.jsx("p",{"data-loc":"client/src/pages/BaseLeads.tsx:267",className:"font-medium",children:M.market.countryRaw}),e.jsx("p",{"data-loc":"client/src/pages/BaseLeads.tsx:268",className:"mt-0.5 max-w-48 text-xs text-muted-foreground",children:[M.market.city,M.market.commercialZone].filter(Boolean).join(" · ")||"위치 근거 확인 필요"})]}),e.jsxs("td",{"data-loc":"client/src/pages/BaseLeads.tsx:272",className:"px-4 py-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:273",className:"flex flex-wrap items-center gap-1.5",children:[e.jsx("p",{"data-loc":"client/src/pages/BaseLeads.tsx:274",className:"font-medium",children:M.lead.companyName}),M.lead.koreanProductStatus==="verified"&&e.jsx("a",{"data-loc":"client/src/pages/BaseLeads.tsx:276",href:M.lead.koreanProductEvidenceUrl||void 0,target:"_blank",rel:"noreferrer",title:"한국제품 판매 공식 근거",children:e.jsxs(ct,{"data-loc":"client/src/pages/BaseLeads.tsx:277",variant:"outline",className:"gap-1 border-violet-200 bg-violet-50 text-violet-700",children:[e.jsx(cu,{"data-loc":"client/src/pages/BaseLeads.tsx:278",className:"size-3"}),"한국제품 판매"]})})]}),M.lead.website&&e.jsxs("a",{"data-loc":"client/src/pages/BaseLeads.tsx:284",href:M.lead.website,target:"_blank",rel:"noreferrer",className:"mt-1 inline-flex max-w-56 items-center gap-1 truncate text-xs text-primary hover:underline",children:[M.lead.website.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,""),e.jsx(yc,{"data-loc":"client/src/pages/BaseLeads.tsx:291",className:"size-3 shrink-0"})]})]}),e.jsx("td",{"data-loc":"client/src/pages/BaseLeads.tsx:295",className:"px-4 py-3 text-xs",children:e.jsx(tz,{"data-loc":"client/src/pages/BaseLeads.tsx:295",record:M})}),e.jsx("td",{"data-loc":"client/src/pages/BaseLeads.tsx:296",className:"px-4 py-3 text-xs leading-relaxed text-foreground",children:e.jsx("span",{"data-loc":"client/src/pages/BaseLeads.tsx:297",className:"inline-flex rounded-lg bg-muted/50 px-2.5 py-1.5 font-medium",children:M.lead.industryKo||"기타"})}),e.jsxs("td",{"data-loc":"client/src/pages/BaseLeads.tsx:299",className:"px-4 py-3",children:[e.jsx(ct,{"data-loc":"client/src/pages/BaseLeads.tsx:300",variant:"outline",className:`whitespace-nowrap ${I.tone}`,children:I.label}),e.jsx("p",{"data-loc":"client/src/pages/BaseLeads.tsx:301",className:"mt-1 text-[11px] leading-relaxed text-muted-foreground",children:M.history.lastSentAt?`${new Date(M.history.lastSentAt).toLocaleDateString("ko-KR")} 발송 · ${M.history.acceptedCount}회`:"아직 실제 발송 이력 없음"}),e.jsx("p",{"data-loc":"client/src/pages/BaseLeads.tsx:304",className:"mt-0.5 max-w-48 text-[11px] leading-relaxed text-muted-foreground",children:B.detail}),M.history.lastCampaignId&&e.jsxs("a",{"data-loc":"client/src/pages/BaseLeads.tsx:305",href:`/campaigns/${M.history.lastCampaignId}?tab=send`,className:"mt-1 inline-flex items-center gap-1 text-[11px] text-primary hover:underline",children:[e.jsx(wn,{"data-loc":"client/src/pages/BaseLeads.tsx:305",className:"size-3"}),"마지막 캠페인"]})]})]},M.market.id)})})]})}),(N?.totalPages??1)>1&&e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:315",className:"flex items-center justify-between gap-3 border-t px-4 py-3",children:[e.jsxs("p",{"data-loc":"client/src/pages/BaseLeads.tsx:316",className:"text-xs text-muted-foreground",children:[N?.page.toLocaleStr
692ing()," / ",N?.totalPages.toLocaleString()," 페이지",T&&!w?" · 불러오는 중":""]}),e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:320",className:"flex gap-2",children:[e.jsx(G,{"data-loc":"client/src/pages/BaseLeads.tsx:321",variant:"outline",size:"sm",disabled:b<=1||T,onClick:()=>h(M=>Math.max(1,M-1)),children:"이전"}),e.jsx(G,{"data-loc":"client/src/pages/BaseLeads.tsx:324",variant:"outline",size:"sm",disabled:b>=(N?.totalPages??1)||T,onClick:()=>h(M=>M+1),children:"다음"})]})]})]})]})}function tz({record:t}){const s=[["WhatsApp",un("whatsapp",t.lead.whatsapp)],["Telegram",un("telegram",t.lead.telegram)],["Zalo",un("zalo",t.lead.zalo)],["LINE",un("line",t.lead.line)],["KakaoTalk",un("kakao",t.lead.kakao)],["Instagram",un("instagram",t.lead.instagramUrl)],["Facebook",un("facebook",t.lead.facebookUrl)]].filter(i=>!!i[1]),c=un("linkedin",t.lead.linkedinUrl)??un("linkedin",t.primaryContactLinkedIn),r=ZO(t.lead.email);return e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:349",className:"space-y-2",children:[r?e.jsxs("a",{"data-loc":"client/src/pages/BaseLeads.tsx:350",href:r,className:"flex items-start gap-2 text-foreground hover:text-primary hover:underline",children:[e.jsx(ar,{"data-loc":"client/src/pages/BaseLeads.tsx:350",className:"mt-0.5 size-3.5 shrink-0 text-primary"}),e.jsx("span",{"data-loc":"client/src/pages/BaseLeads.tsx:350",className:"break-all",children:t.lead.email})]}):e.jsxs("p",{"data-loc":"client/src/pages/BaseLeads.tsx:350",className:"flex items-start gap-2 text-muted-foreground",children:[e.jsx(ar,{"data-loc":"client/src/pages/BaseLeads.tsx:350",className:"mt-0.5 size-3.5 shrink-0"}),e.jsx("span",{"data-loc":"client/src/pages/BaseLeads.tsx:350",className:"break-all",children:t.lead.email})]}),t.lead.phone&&e.jsxs("p",{"data-loc":"client/src/pages/BaseLeads.tsx:352",className:"flex items-start gap-2 text-muted-foreground",children:[e.jsx(kA,{"data-loc":"client/src/pages/BaseLeads.tsx:353",className:"mt-0.5 size-3.5 shrink-0"}),e.jsx("span",{"data-loc":"client/src/pages/BaseLeads.tsx:354",children:t.lead.phone})]}),s.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:358",className:"flex items-start gap-2",children:[e.jsx(Ag,{"data-loc":"client/src/pages/BaseLeads.tsx:359",className:"mt-1 size-3.5 shrink-0 text-muted-foreground"}),e.jsx("div",{"data-loc":"client/src/pages/BaseLeads.tsx:360",className:"flex flex-wrap gap-1",children:s.map(([i,o])=>e.jsxs("a",{"data-loc":"client/src/pages/BaseLeads.tsx:361",href:o,target:"_blank",rel:"noreferrer",className:"rounded-full border bg-background px-2 py-0.5 text-[11px] text-primary hover:bg-primary/5 hover:underline",children:[i,e.jsx(yc,{"data-loc":"client/src/pages/BaseLeads.tsx:361",className:"ml-1 inline size-2.5"})]},`${i}-${o}`))})]}),c&&e.jsxs("a",{"data-loc":"client/src/pages/BaseLeads.tsx:366",href:c,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 font-medium text-[#0A66C2] hover:underline",children:[e.jsx(SN,{"data-loc":"client/src/pages/BaseLeads.tsx:367",className:"size-3.5"}),"LinkedIn 바로가기",e.jsx(yc,{"data-loc":"client/src/pages/BaseLeads.tsx:367",className:"size-3"})]})]})}function s2({label:t,value:s,loading:c,tone:r=""}){return e.jsxs("div",{"data-loc":"client/src/pages/BaseLeads.tsx:376",className:"min-w-24 rounded-xl border bg-background px-3 py-2.5",children:[e.jsx("p",{"data-loc":"client/src/pages/BaseLeads.tsx:377",className:"text-[11px] text-muted-foreground",children:t}),e.jsx("p",{"data-loc":"client/src/pages/BaseLeads.tsx:378",className:`mt-1 text-lg font-bold ${r}`,children:c?"–":s.toLocaleString()})]})}const az=[{key:"ALL",label:"전체"},{key:"GREEN",label:"자유 발송"},{key:"YELLOW_LIA",label:"업무 관련성"},{key:"YELLOW_COND",label:"추가 조건"},{key:"RED",label:"사전 동의"},{key:"BLOCK",label:"발송 금지"}];function sz(){const{activeProduct:t}=Mn(),{data:s,isLoading:c}=q.gateway.countries.list.useQuery(),[r,i]=v.useState("ALL"),[o,u]=v.useState(""),[m,p]=v.useState(!1),f=v.useMemo(()=>{let h=s??[];if(r!=="ALL"&&(h=h.filter(y=>y.signal===r)),o.trim()){const y=o.trim().toLowerCase();h=h.filter(j=>j.countryNameKo.includes(y)||j.countryName.toLowerCase().includes(y)||j.iso2.toLowerCase()===y)}return[...h].sort((y,j)=>{const S=pu[y.signal]-pu[j.signal];
692return S!==0?S:y.gdpRank-j.gdpRank})},[s,r,o]),b=v.useMemo(()=>{const h={};for(const y of s??[])h[y.signal]=(h[y.signal]??0)+1;return h},[s]);return e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:69",className:"page-shell max-w-7xl",children:[e.jsxs("header",{"data-loc":"client/src/pages/Countries.tsx:70",children:[e.jsx("p",{"data-loc":"client/src/pages/Countries.tsx:71",className:"page-kicker",children:"Country Compliance"}),e.jsx("h1",{"data-loc":"client/src/pages/Countries.tsx:72",className:"page-heading mt-1",children:"국가 신호등"}),e.jsxs("p",{"data-loc":"client/src/pages/Countries.tsx:73",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:["나라를 고르면 콜드메일을 보내도 되는지, 어떤 조건을 지켜야 하는지 알려줍니다.",t?` 지금은 "${t.name}" 기준으로 판정합니다.`:" 제품을 등록하면 인증 여부까지 반영해 판정합니다."]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:82",className:"rounded-2xl border border-border/80 bg-card/96 p-3 shadow-[0_16px_40px_-34px_rgba(18,35,61,.5)] sm:p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:83",className:"flex flex-col gap-2.5 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:84",className:"relative w-full sm:max-w-72",children:[e.jsx(An,{"data-loc":"client/src/pages/Countries.tsx:85",className:"absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(Ce,{"data-loc":"client/src/pages/Countries.tsx:86",value:o,onChange:h=>u(h.target.value),placeholder:"국가명·영문명·코드 검색",className:"h-10 pl-9 text-sm"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:93",className:"flex min-h-9 items-center justify-between gap-3 sm:justify-end",children:[e.jsxs("span",{"data-loc":"client/src/pages/Countries.tsx:94",className:"text-xs text-muted-foreground tnum",children:["검색 결과 ",f.length," / 전체 ",s?.length??0,"개"]}),(r!=="ALL"||o)&&e.jsx(G,{"data-loc":"client/src/pages/Countries.tsx:96",variant:"ghost",size:"sm",onClick:()=>{i("ALL"),u("")},children:"초기화"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:102",className:"mt-3 border-t border-border/60 pt-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Countries.tsx:103",className:"mb-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground",children:"발송 법규 상태"}),e.jsx("div",{"data-loc":"client/src/pages/Countries.tsx:104",className:"-mx-1 flex max-w-full gap-1.5 overflow-x-auto px-1 pb-1 sm:flex-wrap sm:overflow-visible sm:pb-0",children:az.map(h=>{const y=r===h.key,j=h.key==="ALL"?s?.length??0:b[h.key]??0;return e.jsxs("button",{"data-loc":"client/src/pages/Countries.tsx:109",onClick:()=>i(h.key),"aria-pressed":y,className:`flex shrink-0 items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-all active:scale-[0.97] ${y?"border-primary bg-primary text-primary-foreground":"bg-background hover:bg-accent"}`,children:[h.key!=="ALL"&&e.jsx("span",{"data-loc":"client/src/pages/Countries.tsx:120",className:`size-1.5 rounded-full ${Os[h.key].dotClass}`}),h.label,!c&&e.jsx("span",{"data-loc":"client/src/pages/Countries.tsx:125",className:"tnum opacity-70",children:j})]},h.key)})})]})]}),c?e.jsx("div",{"data-loc":"client/src/pages/Countries.tsx:135",className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:9}).map((h,y)=>e.jsx(we,{"data-loc":"client/src/pages/Countries.tsx:137",className:"h-32 rounded-xl"},y))}):e.jsx("div",{"data-loc":"client/src/pages/Countries.tsx:141",className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:f.map((h,y)=>{const j=h.signal,S=Os[j],N=j==="BLOCK";return e.jsxs(rt,{"data-loc":"client/src/pages/Countries.tsx:147",href:`/countries/${h.iso2}`,className:`rise group flex flex-col rounded-2xl border p-4 shadow-[0_14px_34px_-30px_rgba(18,35,61,.45)] transition-all hover:-translate-y-0.5 hover:shadow-[0_18px_42px_-30px_rgba(37,99,235,.32)] active:translate-y-0 active:scale-[0.99] ${N?"bg-slate-900 text-slate-100":"bg-card"} ${N?"border-slate-800":S.cardClass}`,style:{animationDelay:`${Math.min(y,12)*25}ms`},children:[e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:155",className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:156",className:"min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:157",className:"flex items-center gap-1.5",children:[e.jsx("h3",{"data-loc":"client/src/pages/Countries.tsx:158",className:"truncate font-semibold",children:h.countryNameKo}),e.jsx("span",{"data-loc":"client/src/pages/Countries.tsx:159",className:`tnum font-mono text-[10px] ${N?"text-slate-400":"text-muted-foreground"}`,children:h.iso2})]}),e.jsxs("p",{"data-loc":"client/src/pages/Countries.tsx:165",className:`mt-0.5 text-xs ${N?"text-slate-400":"text-muted-foreground"}`,children:["GDP ",h.gdpRank,"위 · ",h.language??"언어 미확인"]})]}),N?e.jsxs("span",{"data-loc":"client/src/pages/Countries.tsx:172",className:"inline-flex shrink-0 items-center gap-1.5 rounded-full border border-slate-700 bg-slate-800 px-2.5 py-0.5 text-xs font-semibold text-slate-100",children:[e.jsx(Ea,{"data-loc":"client/src/pages/Countries.tsx:173",className:"size-3"}),"발송 금지"]}):e.jsx(Sn,{"data-loc":"client/src/pages/Countries.tsx:177",signal:j,short:!0})]}),e.jsx("p",{"data-loc":"client/src/pages/Countries.tsx:181",className:`mt-2.5 line-clamp-2 text-xs leading-relaxed ${N?"text-slate-300":"text-muted-foreground"}`,children:cz(h)||S.plain}),e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:190",className:"mt-auto flex flex-wrap items-center gap-1.5 pt-3",children:[h.subjectTag&&e.jsx(Ld,{"data-loc":"client/src/pages/Countries.tsx:192",dark:N,icon:e.jsx(Og,{"data-loc":"client/src/pages/Countries.tsx:194",className:"size-3"}),label:`제목 ${h.subjectTag} 필수`}),h.followupLimit===0&&e.jsx(Ld,{"data-loc":"client/src/pages/Countries.tsx:199",dark:N,icon:e.jsx(Ea,{"data-loc":"client/src/pages/Countries.tsx:201",className:"size-3"}),label:"팔로업 불가"}),h.medicalClaimRisk&&e.jsx(Ld,{"data-loc":"client/src/pages/Countries.tsx:206",dark:N,icon:e.jsx(Rg,{"data-loc":"client/src/pages/Countries.tsx:208",className:"size-3"}),label:"효능 표현 주의"}
692),h.certLockin&&e.jsx(Ld,{"data-loc":"client/src/pages/Countries.tsx:213",dark:N,icon:e.jsx(_g,{"data-loc":"client/src/pages/Countries.tsx:215",className:"size-3"}),label:"인증 명의 귀속"})]})]},h.iso2)})}),!c&&f.length===0&&e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:227",className:"rounded-xl border border-dashed py-12 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/Countries.tsx:228",className:"text-sm text-muted-foreground",children:"조건에 맞는 국가가 없습니다."}),e.jsx(G,{"data-loc":"client/src/pages/Countries.tsx:231",variant:"ghost",size:"sm",className:"mt-2",onClick:()=>{i("ALL"),u("")},children:"필터 초기화"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:246",className:"rounded-xl border border-dashed bg-muted/30 p-4",children:[e.jsx("p",{"data-loc":"client/src/pages/Countries.tsx:247",className:"text-sm font-semibold",children:"목록에 없는 나라를 찾으시나요?"}),e.jsxs("p",{"data-loc":"client/src/pages/Countries.tsx:248",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:[s&&s.length>0?`지금은 GDP 상위 ${s.length}개국의 규칙이 등록되어 있습니다. `:"지금은 GDP 상위 국가의 규칙이 등록되어 있습니다. ","나머지 나라는 규칙을 확인하기 전까지 발송할 수 없습니다. 규칙 없이 보내면 어느 법이 적용되는지 모르는 상태로 발송하게 되기 때문입니다. 필요한 나라가 있으면 관리자에게 조사를 요청하세요."]}),e.jsxs(G,{"data-loc":"client/src/pages/Countries.tsx:256",variant:"outline",size:"sm",className:"mt-3 gap-1.5 bg-background",onClick:()=>p(!0),children:[e.jsx(wn,{"data-loc":"client/src/pages/Countries.tsx:262",className:"size-3.5"}),"국가 조사 요청"]})]}),e.jsx(nz,{"data-loc":"client/src/pages/Countries.tsx:267",open:m,onOpenChange:p})]})}function nz({open:t,onOpenChange:s}){const[c,r]=v.useState(""),[i,o]=v.useState(""),u=q.useUtils(),{data:m}=q.gateway.countries.myRequests.useQuery(),p=q.gateway.countries.requestResearch.useMutation({onSuccess:()=>{u.gateway.countries.myRequests.invalidate(),X.success("조사 요청을 접수했습니다. 규칙이 등록되면 목록에 나타납니다."),r(""),o(""),s(!1)},onError:b=>X.error(b.message)}),f={pending:"접수됨",researching:"조사 중",done:"완료",rejected:"보류"};return e.jsx(ta,{"data-loc":"client/src/pages/Countries.tsx:303",open:t,onOpenChange:s,children:e.jsxs(aa,{"data-loc":"client/src/pages/Countries.tsx:304",className:"sm:max-w-md",children:[e.jsxs(sa,{"data-loc":"client/src/pages/Countries.tsx:305",children:[e.jsx(na,{"data-loc":"client/src/pages/Countries.tsx:306",children:"국가 조사 요청"}),e.jsx(ca,{"data-loc":"client/src/pages/Countries.tsx:307",children:"규칙이 없는 나라는 어느 법이 적용되는지 모르는 상태이므로 발송을 열 수 없습니다. 필요한 나라를 적어 주시면 규칙을 조사해 등록합니다."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:312",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:313",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/Countries.tsx:314",className:"text-sm",children:"국가 이름"}),e.jsx(Ce,{"data-loc":"client/src/pages/Countries.tsx:315",value:c,onChange:b=>r(b.target.value),placeholder:"예: 페루"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:321",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/Countries.tsx:322",className:"text-sm",children:"필요한 이유"}),e.jsx(pt,{"data-loc":"client/src/pages/Countries.tsx:323",rows:3,value:i,onChange:b=>o(b.target.value),placeholder:"예: 현지 유통사에서 먼저 문의가 들어와 회신이 필요합니다."})]})]}),(m?.length??0)>0&&e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:333",className:"space-y-1.5 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Countries.tsx:334",className:"text-xs font-semibold",children:"내가 요청한 나라"}),m?.slice(0,5).map(b=>e.jsxs("div",{"data-loc":"client/src/pages/Countries.tsx:336",className:"flex items-center justify-between gap-2 text-xs",children:[e.jsx("span",{"data-loc":"client/src/pages/Countries.tsx:340",className:"min-w-0 truncate",children:b.request.countryName}),e.jsx("span",{"data-loc":"client/src/pages/Countries.tsx:341",className:"shrink-0 text-muted-foreground",children:f[b.request.status]??b.request.status})]},b.request.id))]}),e.jsxs(_a,{"data-loc":"client/src/pages/Countries.tsx:349",children:[e.jsx(G,{"data-loc":"client/src/pages/Countries.tsx:350",variant:"outline",className:"bg-background",onClick:()=>s(!1),children:"닫기"}),e.jsx(G,{"data-loc":"client/src/pages/Countries.tsx:357",disabled:!c.trim()||p.isPending,onClick:()=>p.mutate({countryName:c.trim(),reason:i.trim()||void 0}),children:p.isPending?"접수 중":"요청 보내기"})]})]})})}function Ld({icon:t,label:s,dark:c}){return e.jsxs(yn,{"data-loc":"client/src/pages/Countries.tsx:384",children:[e.jsx(jn,{"data-loc":"client/src/pages/Countries.tsx:385",asChild:!0,children:e.jsxs("span",{"data-loc":"client/src/pages/Countries.tsx:386",className:`flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[10px] font-medium ${c?"bg-slate-800 text-slate-300":"bg-muted text-muted-foreground"}`,children:[t,s]})}),e.jsx(Nn,{"data-loc":"client/src/pages/Countries.tsx:395",children:s})]})}function cz(t){const s=[];if(t.signal==="BLOCK")return t.channel?`대안 경로: ${t.channel}`:"";if(t.emailType==="role"?s.push("회사 대표 주소만"):t.emailType==="both"&&s.push("담당자 주소도 가능"),s.push(t.followupLimit===0?"팔로업 불가":`팔로업 ${t.followupLimit}
692회`),t.certAuthority&&!/없음/.test(t.certAuthority)){const c=t.certAuthority.match(/\b(FDA|ANVISA|NMPA|CPNP|CPNI|SFDA|MOHAP|NPRA|BPOM|DGDA|EgyCosm|SAHPRA|NSO|VKros|AEMPS|UKSCPN|Thai FDA|NICNAS|AICIS|CDSCO|ÜTS)\b/i);c&&s.push(`${c[0]} 등록`)}return s.join(" · ")}function rz(){const{iso2:t=""}=Uu(),[,s]=Pn(),{activeProductId:c,activeProduct:r}=Mn(),{data:i,isLoading:o}=q.gateway.countries.judge.useQuery({iso2:t.toUpperCase(),...c?{productId:c}:{}}),u=q.useUtils(),m=q.gateway.campaigns.create.useMutation({onSuccess:k=>{u.gateway.campaigns.list.invalidate(),s(`/campaigns/${k.id}`)},onError:k=>X.error(k.message)});if(o)return e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:47",className:"page-shell max-w-5xl",children:[e.jsx(we,{"data-loc":"client/src/pages/CountryDetail.tsx:48",className:"h-8 w-48"}),e.jsx(we,{"data-loc":"client/src/pages/CountryDetail.tsx:49",className:"h-32 rounded-xl"}),e.jsx(we,{"data-loc":"client/src/pages/CountryDetail.tsx:50",className:"h-64 rounded-xl"})]});if(!i)return e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:57",className:"page-shell max-w-5xl py-16 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:58",className:"text-sm text-muted-foreground",children:"이 국가의 규칙은 아직 등록되지 않았습니다."}),e.jsx(G,{"data-loc":"client/src/pages/CountryDetail.tsx:61",variant:"outline",className:"mt-4 bg-background",asChild:!0,children:e.jsx(rt,{"data-loc":"client/src/pages/CountryDetail.tsx:62",href:"/countries",children:"국가 목록으로"})})]});const{rule:p,signal:f,reasons:b,warnings:h,certStatus:y}=i,j=f,S=Os[j],N=j==="BLOCK",w=k=>(k??"").split(",").map(E=>E.trim()).filter(Boolean),T=N?b.slice(0,1):b;return e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:84",className:"page-shell max-w-5xl",children:[e.jsxs(rt,{"data-loc":"client/src/pages/CountryDetail.tsx:85",href:"/countries",className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(eo,{"data-loc":"client/src/pages/CountryDetail.tsx:89",className:"size-4"}),"국가 목록"]}),e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:94",className:`rounded-2xl border p-6 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)] ${N?"border-slate-800 bg-slate-900 text-slate-100":"bg-card"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:99",className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:100",children:[e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:101",className:"flex items-center gap-2",children:[e.jsx("h1",{"data-loc":"client/src/pages/CountryDetail.tsx:102",className:"text-2xl font-bold tracking-tight",children:p.countryNameKo}),e.jsxs("span",{"data-loc":"client/src/pages/CountryDetail.tsx:103",className:`font-mono text-xs ${N?"text-slate-400":"text-muted-foreground"}`,children:[p.countryName," · ",p.iso2]})]}),e.jsxs("p",{"data-loc":"client/src/pages/CountryDetail.tsx:109",className:`mt-1 text-sm ${N?"text-slate-400":"text-muted-foreground"}`,children:["GDP ",p.gdpRank,"위 · ",p.region]})]}),N?e.jsxs("span",{"data-loc":"client/src/pages/CountryDetail.tsx:116",className:"inline-flex items-center gap-1.5 rounded-full border border-slate-700 bg-slate-800 px-3 py-1 text-sm font-semibold",children:[e.jsx(Ea,{"data-loc":"client/src/pages/CountryDetail.tsx:117",className:"size-3.5"}),"발송 금지"]}):e.jsx(Sn,{"data-loc":"client/src/pages/CountryDetail.tsx:121",signal:j,className:"px-3 py-1 text-sm"})]}),e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:125",className:`mt-4 text-sm leading-relaxed ${N?"text-slate-200":""}`,children:S.plain}),e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:132",className:`mt-4 space-y-1.5 rounded-lg p-3.5 ${N?"bg-slate-800/60":"bg-muted/50"}`,children:[e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:137",className:`text-xs font-semibold ${N?"text-slate-300":"text-muted-foreground"}`,children:"이렇게 판정한 이유"}),T.map((k,E)=>e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:143",className:`text-sm leading-relaxed ${N?"text-slate-200":""}`,children:k},E))]}),h.length>0&&e.jsx("div",{"data-loc":"client/src/pages/CountryDetail.tsx:153",className:"mt-3 rounded-lg border border-amber-200 bg-amber-50 p-3.5",children:h.map((k,E)=>e.jsxs("p",{"data-loc":"client/src/pages/CountryDetail.tsx:155",className:"flex gap-2 text-sm leading-relaxed text-amber-900",children:[e.jsx(js,{"data-loc":"client/src/pages/CountryDetail.tsx:159",className:"mt-0.5 size-4 shrink-0"}),k]},E))}),e.jsx("div",{"data-loc":"client/src/pages/CountryDetail.tsx:167",className:"mt-5 flex flex-wrap gap-2",children:N?e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:169",className:"w-full rounded-lg border border-slate-700 bg-slate-800/60 p-4",children:[e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:170",className:"text-sm font-semibold",children:"그럼 어떻게 접촉하나요"}),e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:171",className:"mt-1.5 text-sm leading-relaxed text-slate-300",children:p.channel??"전시회 현장 미팅, 기존 거래처 소개, 현지 에이전트 경유 등 사전 접점을 만든 뒤 접촉하세요."}),e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:175",className:"mt-2 text-sm leading-relaxed text-slate-400",children:"우회해서 보내면 과징금 대상이 됩니다. 이 화면에서는 캠페인을 만들 수 없습니다."})]}):e.jsxs(e.Fragment,{children:[e.jsx(G,{"data-loc":"client/src/pages/CountryDetail.tsx:182",disabled:!c||m.isPending,onClick:()=>c&&m.mutate({productId:c,iso2:p.iso2}),children:r?`${r.name} 캠페인 시작`:"캠페인 시작"}),!c&&e.jsx(G,{"data-loc":"client/src/pages/CountryDetail.tsx:194",variant:"outline",className:"bg-background",asChild:!0,children:e.jsx(rt,{"data-loc":"client/src/pages/CountryDetail.tsx:195",href:"/products",children:"먼저 제품 등록"})})]})})]}),e.jsxs("section",{"data-loc":"client/src/pages/CountryDetail.tsx:204",className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(ll,{"data-loc":"client/src/pages/CountryDetail.tsx:205",icon:e.jsx(ar,{"data-loc":"client/src/pages/CountryDetail.tsx:205",className:"size-4"}),title:"쓸 수 있는 이메일 주소",children:p.emailType==="role"?"info@, sales@ 같은 회사 대표 주소만 사용하세요. 개인 이름 주소는 개인정보 보호 대상입니다.":p.emailType==="both"?"회사 대표 주소와 담당자 개인 업무 주소 모두 사용할 수 있습니다.":"이 나라에서는 콜드메일용 주소 확보 자체가 허용되지 않습니다."}),e.jsx(ll,{"data-loc":"client/src/pages/CountryDetail.tsx:213",icon:e.jsx(AN,{"data-loc":"client/src/pages/CountryDetail.tsx:213",className:"size-4"}),title:"팔로업 허용 횟수",children:p.followupLimit===0?"최초 1통만 보낼 수 있습니다. 답이 없어도 다시 보내지 마세요.":`최초 1통 + 팔로업 ${p.followupLimit}회까지 허용됩니다. 시스템이 초과 발송을 막습니다.`}),e.jsx(ll,{"data-loc":"client/src/pages/CountryDetail.tsx:219",icon:e.jsx(Og,{"data-loc":"client/src/pages/CountryDetail.tsx:219",className:"size-4"}),title:"제목 규칙",children:p.subjectTag?`제목 맨 앞에 ${p.subjectTag} 를 반드시 붙여야 합니다. 빠뜨리면 발송이 막힙니다.`:"특별히 붙여야 하는 표시는 없습니다. 과장·낚시성 제목만 피하세요."}),e.jsxs(ll,{"data-loc":"client/src/pages/CountryDetail.tsx:225",icon:e.jsx(ao,{"data-loc":"client/src/pages/CountryDetail.tsx:225",className:"size-4"}),title:"사용 언어",children:[p.language??"확인되지 않았습니다.",p.channel?` · 권장 채널: ${p.channel}`:""]}),(p.weekend||p.blackout)&&e.jsx(ll,{"data-loc":"client/src/pages/CountryDetail.tsx:231",icon:e.jsx(Sg,{"data-loc":"client/src/pages/CountryDetail.tsx:231",className:"size-4"}),title:"보내면 안 되는 시기",children:[p.weekend?`주말: ${p.weekend}`:null,p.blackout?`피할 기간: ${p.blackout}
692`:null].filter(Boolean).join(" · ")}),e.jsxs(ll,{"data-loc":"client/src/pages/CountryDetail.tsx:241",icon:e.jsx(CN,{"data-loc":"client/src/pages/CountryDetail.tsx:241",className:"size-4"}),title:"근거 법령과 처벌",children:[p.law??"확인되지 않았습니다.",p.penalty?` — ${p.penalty}`:""]})]}),e.jsxs("section",{"data-loc":"client/src/pages/CountryDetail.tsx:248",className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(n2,{"data-loc":"client/src/pages/CountryDetail.tsx:249",tone:"ok",icon:e.jsx(Jt,{"data-loc":"client/src/pages/CountryDetail.tsx:251",className:"size-4"}),title:"본문에 반드시 넣어야 하는 것",items:w(p.requiredElements),empty:"추가로 넣어야 하는 항목은 없습니다."}),e.jsx(n2,{"data-loc":"client/src/pages/CountryDetail.tsx:256",tone:"bad",icon:e.jsx(Ea,{"data-loc":"client/src/pages/CountryDetail.tsx:258",className:"size-4"}),title:"쓰면 안 되는 것",items:w(p.forbidden),empty:"특별히 금지된 표현은 확인되지 않았습니다."})]}),e.jsxs("section",{"data-loc":"client/src/pages/CountryDetail.tsx:266",className:"rounded-xl border bg-card p-5",children:[e.jsxs("h2",{"data-loc":"client/src/pages/CountryDetail.tsx:267",className:"flex items-center gap-2 font-semibold",children:[e.jsx(_g,{"data-loc":"client/src/pages/CountryDetail.tsx:268",className:"size-4 text-muted-foreground"}),"제품 인증·등록"]}),e.jsxs("dl",{"data-loc":"client/src/pages/CountryDetail.tsx:271",className:"mt-3 grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:272",children:[e.jsx("dt",{"data-loc":"client/src/pages/CountryDetail.tsx:273",className:"text-xs font-medium text-muted-foreground",children:"등록 제도"}),e.jsx("dd",{"data-loc":"client/src/pages/CountryDetail.tsx:274",className:"mt-1 text-sm leading-relaxed",children:p.certAuthority??"확인되지 않았습니다."})]}),e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:278",children:[e.jsx("dt",{"data-loc":"client/src/pages/CountryDetail.tsx:279",className:"text-xs font-medium text-muted-foreground",children:"등록 명의 귀속"}),e.jsx("dd",{"data-loc":"client/src/pages/CountryDetail.tsx:280",className:"mt-1 text-sm leading-relaxed",children:p.certOwner??"확인되지 않았습니다."})]})]}),r&&e.jsxs("p",{"data-loc":"client/src/pages/CountryDetail.tsx:286",className:"mt-3 rounded-lg bg-muted/50 p-3 text-sm",children:["현재 ",e.jsx("span",{"data-loc":"client/src/pages/CountryDetail.tsx:287",className:"font-semibold",children:r.name})," 상태:"," ",y==="registered"?"등록 완료":y==="in_progress"?"진행 중":"미등록",e.jsx(rt,{"data-loc":"client/src/pages/CountryDetail.tsx:293",href:"/products",className:"ml-2 text-xs font-medium text-primary hover:underline",children:"변경"})]})]}),p.medicalClaimRisk&&e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:305",className:"rounded-xl border border-rose-200 bg-rose-50 p-5",children:[e.jsxs("h2",{"data-loc":"client/src/pages/CountryDetail.tsx:306",className:"flex items-center gap-2 font-semibold text-rose-900",children:[e.jsx(Rg,{"data-loc":"client/src/pages/CountryDetail.tsx:307",className:"size-4"}),"의학적 효능 표현 금지"]}),e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:310",className:"mt-2 text-sm leading-relaxed text-rose-900",children:'이 나라에서 "치료", "재생", "의료용" 같은 표현을 쓰면 화장품이 의약품으로 재분류될 수 있습니다. 재분류되면 판매 자체가 불법이 되고 파트너가 책임을 지게 됩니다. 문안 교정기가 자동으로 잡아냅니다.'})]}),p.b2bNote&&e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:319",className:"rounded-xl border bg-card p-5",children:[e.jsxs("h2",{"data-loc":"client/src/pages/CountryDetail.tsx:320",className:"flex items-center gap-2 font-semibold",children:[e.jsx(DN,{"data-loc":"client/src/pages/CountryDetail.tsx:321",className:"size-4 text-muted-foreground"}),"B2B 예외 인정 범위"]}),e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:324",className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:p.b2bNote})]}),p.note&&e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:331",className:"rounded-xl border border-dashed bg-muted/30 p-5",children:[e.jsx("h2",{"data-loc":"client/src/pages/CountryDetail.tsx:332",className:"text-sm font-semibold",children:"실무 참고"}),e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:333",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:p.note}),p.source&&e.jsxs("p",{"data-loc":"client/src/pages/CountryDetail.tsx:337",className:"mt-2 text-xs text-muted-foreground",children:["출처: ",p.source]})]}),e.jsxs("section",{"data-loc":"client/src/pages/CountryDetail.tsx:343",children:[e.jsx("h2",{"data-loc":"client/src/pages/CountryDetail.tsx:344",className:"mb-3 font-semibold",children:"회신 이후: 통화·미팅·협상"}),e.jsx(WS,{"data-loc":"client/src/pages/CountryDetail.tsx:345",iso2:p.iso2,countryNameKo:p.countryNameKo})]})]})}function ll({icon:t,title:s,children:c}){return e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:361",className:"rounded-2xl border border-border/80 bg-card/96 p-4 shadow-[0_12px_34px_-30px_rgba(18,35,61,.42)]",children:[e.jsxs("p",{"data-loc":"client/src/pages/CountryDetail.tsx:362",className:"flex items-center gap-2 text-sm font-semibold",children:[e.jsx("span",{"data-loc":"client/src/pages/CountryDetail.tsx:363",className:"text-muted-foreground",children:t}),s]}),e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:366",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:c})]})}function n2({icon:t,title:s,items:c,empty:r,tone:i}){const o=i==="ok"?"border-emerald-200 bg-emerald-50/60":"border-rose-200 bg-rose-50/60",u=i==="ok"?"text-emerald-900":"text-rose-900";return e.jsxs("div",{"data-loc":"client/src/pages/CountryDetail.tsx:391",className:`rounded-xl border p-4 ${o}`,children:[e.jsxs("p",{"data-loc":"client/src/pages/CountryDetail.tsx:392",className:`flex items-center gap-2 text-sm font-semibold ${u}`,children:[t,s]}),c.length===0?e.jsx("p",{"data-loc":"client/src/pages/CountryDetail.tsx:397",className:`mt-1.5 text-sm ${u} opacity-70`,children:r}):e.jsx("ul",{"data-loc":"client/src/pages/CountryDetail.tsx:399",className:"mt-2 space-y-1",children:c.map((m,p)=>e.jsxs("li",{"data-loc":"client/src/pages/CountryDetail.tsx:401",className:`flex gap-2 text-sm leading-relaxed ${u}`,children:[e.jsx("span",{"data-loc":"client/src/pages/CountryDetail.tsx:402",className:"mt-2 size-1 shrink-0 rounded-full bg-current opacity-60"}),m]},p))})]})}const lz={reply_overdue:{label:"기한 지난 후속",tone:"urgent"},followup_due:{label:"팔로업 시점",tone:"due"}
692,review_pending:{label:"검수 대기",tone:"todo"},draft_missing:{label:"문안 필요",tone:"todo"},email_missing:{label:"이메일 없음",tone:"todo"}},iz={reply_overdue:e.jsx(tA,{"data-loc":"client/src/components/TodayQueue.tsx:25",className:"size-4"}),followup_due:e.jsx(wn,{"data-loc":"client/src/components/TodayQueue.tsx:26",className:"size-4"}),review_pending:e.jsx(rA,{"data-loc":"client/src/components/TodayQueue.tsx:27",className:"size-4"}),draft_missing:e.jsx(Cn,{"data-loc":"client/src/components/TodayQueue.tsx:28",className:"size-4"}),email_missing:e.jsx(CA,{"data-loc":"client/src/components/TodayQueue.tsx:29",className:"size-4"})},oz={urgent:{chip:"border-rose-200 bg-rose-50 text-rose-700",icon:"bg-rose-100 text-rose-600",card:"border-rose-200/70 hover:border-rose-300"},due:{chip:"border-amber-200 bg-amber-50 text-amber-800",icon:"bg-amber-100 text-amber-700",card:"border-amber-200/70 hover:border-amber-300"},todo:{chip:"border-slate-200 bg-slate-50 text-slate-600",icon:"bg-slate-100 text-slate-600",card:"hover:border-primary/40"}};function dz(){const{data:t,isPending:s,isError:c,error:r}=q.gateway.worklist.today.useQuery(void 0,{refetchInterval:6e4,retry:(o,u)=>u?.data?.code==="UNAUTHORIZED"?!1:o<2});if(c){const o=r?.data?.code==="UNAUTHORIZED";return e.jsxs("section",{"data-loc":"client/src/components/TodayQueue.tsx:70",children:[e.jsx("h2",{"data-loc":"client/src/components/TodayQueue.tsx:71",className:"mb-3 text-sm font-semibold text-muted-foreground",children:"오늘 할 일"}),e.jsxs("div",{"data-loc":"client/src/components/TodayQueue.tsx:72",className:"flex items-start gap-3 rounded-xl border border-amber-200 bg-amber-50 px-4 py-3.5",children:[e.jsx(St,{"data-loc":"client/src/components/TodayQueue.tsx:73",className:"mt-0.5 size-4 shrink-0 text-amber-700"}),e.jsxs("div",{"data-loc":"client/src/components/TodayQueue.tsx:74",className:"text-sm",children:[e.jsx("p",{"data-loc":"client/src/components/TodayQueue.tsx:75",className:"font-medium text-amber-900",children:o?"로그인이 필요합니다":"할 일을 불러오지 못했습니다"}),e.jsx("p",{"data-loc":"client/src/components/TodayQueue.tsx:78",className:"mt-0.5 text-xs leading-relaxed text-amber-800",children:o?"다시 로그인하면 기한이 지난 후속과 검수 대기를 함께 보여줍니다.":"잠시 후 새로고침해 주세요. 계속 같은 화면이면 알려주세요."})]})]})]})}if(s)return e.jsxs("section",{"data-loc":"client/src/components/TodayQueue.tsx:91",children:[e.jsx("h2",{"data-loc":"client/src/components/TodayQueue.tsx:92",className:"mb-3 text-sm font-semibold text-muted-foreground",children:"오늘 할 일"}),e.jsx("div",{"data-loc":"client/src/components/TodayQueue.tsx:93",className:"space-y-2",children:Array.from({length:2}).map((o,u)=>e.jsx(we,{"data-loc":"client/src/components/TodayQueue.tsx:95",className:"h-16 rounded-xl"},u))})]});if(!t||t.campaignCount===0)return null;const i=t.tasks;return e.jsxs("section",{"data-loc":"client/src/components/TodayQueue.tsx:108",children:[e.jsxs("div",{"data-loc":"client/src/components/TodayQueue.tsx:109",className:"mb-3 flex items-center justify-between",children:[e.jsx("h2",{"data-loc":"client/src/components/TodayQueue.tsx:110",className:"text-sm font-semibold text-muted-foreground",children:"오늘 할 일"}),i.length>0&&e.jsxs("span",{"data-loc":"client/src/components/TodayQueue.tsx:112",className:"tnum text-xs text-muted-foreground",children:[i.length,"ê±´"]})]}),i.length===0?e.jsxs("div",{"data-loc":"client/src/components/TodayQueue.tsx:117",className:"flex items-center gap-3 rounded-xl border border-emerald-200 bg-emerald-50/50 px-4 py-3.5",children:[e.jsx(Dn,{"data-loc":"client/src/components/TodayQueue.tsx:118",className:"size-4 shrink-0 text-emerald-600"}),e.jsxs("div",{"data-loc":"client/src/components/TodayQueue.tsx:119",className:"text-sm",children:[e.jsx("p",{"data-loc":"client/src/components/TodayQueue.tsx:120",className:"font-medium text-emerald-900",children:"지금 급한 일은 없습니다"}),e.jsx("p",{"data-loc":"client/src/components/TodayQueue.tsx:121",className:"mt-0.5 text-xs leading-relaxed text-emerald-800",children:"기한이 지난 후속, 팔로업 시점, 검수 대기를 모두 확인했습니다."})]})]}):e.jsx("div",{"data-loc":"client/src/components/TodayQueue.tsx:127",className:"space-y-2",children:i.map((o,u)=>{const m=lz[o.kind],p=oz[m.tone];return e.jsxs(rt,{"data-loc":"client/src/components/TodayQueue.tsx:132",href:`/campaigns/${o.campaignId}?tab=${o.tab}`,className:`rise flex items-center gap-3.5 rounded-xl border bg-card p-4 transition-all hover:shadow-sm active:scale-[0.995] ${p.card}`,style:{animationDelay:`${u*30}ms`},children:[e.jsx("span",{"data-loc":"client/src/components/TodayQueue.tsx:138",className:`flex size-8 shrink-0 items-center justify-center rounded-lg ${p.icon}`,children:iz[o.kind]}),e.jsxs("div",{"data-loc":"client/src/components/TodayQueue.tsx:143",className:"min-w-0 flex-1",children:[e.jsxs("p",{"data-loc":"client/src/components/TodayQueue.tsx:144",className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/TodayQueue.tsx:145",className:"truncate text-sm font-semibold",children:o.title}),e.jsx("span",{"data-loc":"client/src/components/TodayQueue.tsx:146",className:`shrink-0 rounded-full border px-2 py-0.5 text-[11px] font-medium ${p.chip}`,children:m.label})]}),e.jsxs("p",{"data-loc":"client/src/components/TodayQueue.tsx:152",className:"mt-0.5 truncate text-xs text-muted-foreground",children:[o.campaignName," · ",o.detail]})]}),e.jsx(ss,{"data-loc":"client/src/components/TodayQueue.tsx:156",className:"size-4 shrink-0 text-muted-foreground"})]},`${o.campaignId}-${o.kind}`)})})]})}function uz(){const{data:t,isPending:s,isError:c}=q.gateway.stats.overview.useQuery(void 0,{retry:!1});if(s)return e.jsx("div",{"data-loc":"client/src/components/StatsSummary.tsx:19",className:"grid gap-3 sm:grid-cols-4",children:[0,1,2,3].map(o=>e.jsx(we,{"data-loc":"client/src/components/StatsSummary.tsx:21",className:"h-20 rounded-xl"},o))});if(c||!t)return e.jsx("div",{"data-loc":"client/src/components/StatsSummary.tsx:29",className:"rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900",children:"성과를 불러오지 못했습니다."});const r=t.total;if(r.sent===0)return e.jsxs("div",{"data-loc":"client/src/components/StatsSummary.tsx:39",className:"rounded-xl border border-dashed px-4 py-5 text-center",children:[e.jsx("p",{"data-loc":"client/src/components/StatsSummary.tsx:40",className:"text-sm font-medium",children:"아직 발송 기록이 없습니다"}),e.jsx("p",{"data-loc":"client/src/components/StatsSummary.tsx:41",className:"mt-1 text-sm leading-relaxed text-muted-foreground",children:"후보를 모으고 문안이 교정을 통과하면 발송 탭이 열립니다. 발송 후부터 회신율이 쌓ì
692ž…니다."})]});const i=[{label:"발송",value:`${r.sent}ê³³`,hint:`후보 ${r.total}ê³³ 중`},{label:"회신",value:`${r.replied}ê³³`,hint:`발송 대비 ${r.replyRate}%`,tone:"text-emerald-700"},{label:"관심·문의",value:`${r.positive}ê³³`,hint:`발송 대비 ${r.positiveRate}%`,tone:"text-emerald-700"},{label:"거절·수신거부",value:`${r.negative}ê³³`,hint:`회신 대기 ${r.waiting}ê³³`,tone:r.negative>0?"text-rose-700":void 0}];return e.jsxs("div",{"data-loc":"client/src/components/StatsSummary.tsx:72",className:"space-y-3",children:[e.jsx("div",{"data-loc":"client/src/components/StatsSummary.tsx:73",className:"grid gap-3 sm:grid-cols-4",children:i.map(o=>e.jsxs("div",{"data-loc":"client/src/components/StatsSummary.tsx:75",className:"rounded-xl border bg-card p-4",children:[e.jsx("p",{"data-loc":"client/src/components/StatsSummary.tsx:76",className:"text-xs font-medium text-muted-foreground",children:o.label}),e.jsx("p",{"data-loc":"client/src/components/StatsSummary.tsx:77",className:`mt-1 text-xl font-bold tabular-nums ${o.tone??""}`,children:o.value}),e.jsx("p",{"data-loc":"client/src/components/StatsSummary.tsx:80",className:"mt-0.5 text-xs text-muted-foreground",children:o.hint})]},o.label))}),t.byCountry.filter(o=>o.sent>0).length>1&&e.jsxs("div",{"data-loc":"client/src/components/StatsSummary.tsx:86",className:"rounded-xl border bg-card p-4",children:[e.jsx("p",{"data-loc":"client/src/components/StatsSummary.tsx:87",className:"text-sm font-semibold",children:"나라별 반응"}),e.jsx("div",{"data-loc":"client/src/components/StatsSummary.tsx:88",className:"mt-2.5 space-y-2",children:t.byCountry.filter(o=>o.sent>0).map(o=>e.jsxs("div",{"data-loc":"client/src/components/StatsSummary.tsx:92",className:"flex items-center gap-3 text-sm",children:[e.jsx("span",{"data-loc":"client/src/components/StatsSummary.tsx:93",className:"w-20 shrink-0 font-medium",children:o.countryNameKo}),e.jsx("div",{"data-loc":"client/src/components/StatsSummary.tsx:96",className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{"data-loc":"client/src/components/StatsSummary.tsx:97",className:"h-full rounded-full bg-emerald-500",style:{width:`${Math.min(100,o.replyRate)}%`}})}),e.jsxs("span",{"data-loc":"client/src/components/StatsSummary.tsx:102",className:"w-32 shrink-0 text-right tabular-nums text-muted-foreground",children:[o.replied,"/",o.sent,"ê³³ · ",o.replyRate,"%"]})]},o.iso2))})]}),t.byCampaign.filter(o=>o.sent>0).length>0&&e.jsxs("div",{"data-loc":"client/src/components/StatsSummary.tsx:112",className:"rounded-xl border bg-card p-4",children:[e.jsx("p",{"data-loc":"client/src/components/StatsSummary.tsx:113",className:"text-sm font-semibold",children:"캠페인별"}),e.jsx("div",{"data-loc":"client/src/components/StatsSummary.tsx:114",className:"mt-2 divide-y",children:t.byCampaign.filter(o=>o.sent>0).map(o=>e.jsxs(rt,{"data-loc":"client/src/components/StatsSummary.tsx:118",href:`/campaigns/${o.campaignId}?tab=replies`,className:"flex items-center justify-between gap-3 py-2 text-sm transition-colors hover:text-foreground",children:[e.jsx("span",{"data-loc":"client/src/components/StatsSummary.tsx:123",className:"min-w-0 truncate font-medium",children:o.name}),e.jsxs("span",{"data-loc":"client/src/components/StatsSummary.tsx:124",className:"shrink-0 tabular-nums text-muted-foreground",children:["발송 ",o.sent," · 회신 ",o.replied," (",o.replyRate,"%)"]})]},o.campaignId))})]})]})}function mz(t){const s=Math.max(0,t.accepted)+Math.max(0,t.failed);return{total:s,accepted:Math.max(0,t.accepted),failed:Math.max(0,t.failed),successRate:s>0?Math.round(Math.max(0,t.accepted)/s*1e3)/10:null}}function pz(t,s){const c=new Map;for(const r of t){const i=c.get(r.campaign.iso2)??{iso2:r.campaign.iso2,countryNameKo:r.countryNameKo??r.campaign.iso2,campaignCount:0,candidateCount:0,sent:0};i.campaignCount+=1,i.candidateCount+=Number(r.candidateCount||0),c.set(r.campaign.iso2,i)}for(const r of s){const i=c.get(r.iso2)??{iso2:r.iso2,countryNameKo:r.countryNameKo,campaignCount:0,candidateCount:0,sent:0};i.sent=Number(r.sent||0),c.set(r.iso2,i)}return Array.from(c.values()).sort((r,i)=>i.candidateCount-r.candidateCount||i.sent-r.sent||r.countryNameKo.localeCompare(i.countryNameKo,"ko"))}function xz(){const{data:t,isPending:s}=q.gateway.campaigns.list.useQuery(),{data:c,isPending:r}=q.gateway.stats.overview.useQuery(),{data:i,isPending:o}=q.gateway.stats.delivery.useQuery(),u=mz({accepted:i?.totals.accepted??0,failed:i?.totals.failed??0}),m=v.useMemo(()=>pz(t??[],c?.byCountry??[]).slice(0,7),[t,c]),p=Math.max(1,...m.map(b=>b.candidateCount));return s||r||o?e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:27",className:"grid gap-4 lg:grid-cols-[0.85fr_1.35fr]",children:[e.jsx(we,{"data-loc":"client/src/components/OperationsCharts.tsx:28",className:"h-72 rounded-2xl"}),e.jsx(we,{"data-loc":"client/src/components/OperationsCharts.tsx:29",className:"h-72 rounded-2xl"})]}):e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:35",className:"grid gap-4 lg:grid-cols-[0.85fr_1.35fr]",children:[e.jsxs("article",{"data-loc":"client/src/components/OperationsCharts.tsx:36",className:"metric-surface p-5 md:p-6",children:[e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:37",className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:38",children:[e.jsx("p",{"data-loc":"client/src/components/OperationsCharts.tsx:39",className:"page-kicker",children:"Delivery Health · 30 Days"}),e.jsx("h3",{"data-loc":"client/src/components/OperationsCharts.tsx:40",className:"mt-1 text-base font-bold",children:"발송 성공률"})]}),e.jsx("span",{"data-loc":"client/src/components/OperationsCharts.tsx:42",className:"flex size-9 items-center justify-center rounded-xl bg-emerald-50 text-emerald-700",children:e.jsx(TN,{"data-loc":"client/src/components/OperationsCharts.tsx:43",className:"size-4"})})]}),u.total===0?e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:48",className:"mt-6 flex min-h-40 flex-col items-center justify-center rounded-xl border border-dashed bg-muted/20 p-5 text-center",children:[e.jsx(js,{"data-loc":"client/src/components/OperationsCharts.tsx:49",className:"size-5 text-muted-foreground"}),e.jsx("p",{"data-loc":"client/src/components/OperationsCharts.tsx:50",className:"mt-2 text-sm font-semibold",children:"최근 30일 발송 이력이 없습니다"}),e.jsx("p",{"data-loc":"client/src/components/OperationsCharts.tsx:51",className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:"첫 실제 발송 후 SMTP 수락·실패 기준으로 성공률이 표시됩니다."})]}):e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:56",className:"mt-5 flex items-center gap-6",children:[e.jsx("div",{"data-loc":"client/src/components/OperationsCharts.tsx:57",className:"relative flex size-32 shrink-0 items-center justify-center rounded-full",style:{background:`conic-gradient(#10b981 0 ${u.successRate??0}%, #f43f5e ${u.successRate??0}% 100%)`},role:"img","aria-label":`최근 30일 발송 성공률 ${u.successRate}%`,children:e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:65",className:"flex size-24 flex-col items-center justify-center rounded-full bg-card shadow-inner",children:[e.jsxs("strong",{"data-loc":"client/src/components/OperationsCharts.tsx:66",className:"tnum text-2xl tracking-[-0.04em]",children:[u.successRate,"%"]}),e.jsx("span",{"data-loc":"client/src/components/OperationsCharts.tsx:67",className:"mt-0.5 text-[11px] text-muted-foreground",children:"SMTP 수락률"})]})}),e.jsxs("dl",{"data-loc":"client/src/components/OperationsCharts.tsx:70",className:"min-w-0 flex-1 space-y-3 text-sm",children:[e.jsx(Yx,{"data-loc":"client/src/components/OperationsCharts.tsx:71",label:"수락",value:u.accepted,tone:"bg-emerald-500"}),e.jsx(Yx,{"data-loc":"client/src/components/OperationsCharts.tsx:72",label:"실패",value:u.failed,tone:"bg-rose-500"}),e.jsx(Yx,{"data-loc":"client/src/components/OperationsCharts.tsx:73",label:"대기",value:i?.totals.queuedRecipients??0,tone:"bg-blue-500"})]})]})]}),e.jsxs("article",{"data-loc":"client/src/components/OperationsCharts.tsx:79",className:"metric-surface p-5 md:p-6",children:[e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:80",className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:81",children:[e.jsx("p",{"data-loc":"client/src/components/OperationsCharts.tsx:82",className:"page-kicker",children:"Country Portfolio"}),e.jsx("h3",{"data-loc":"client/src/components/OperationsCharts.tsx:83",className:"mt-1 text-base font-bold",children:"국가별 캠페인·후보·발송"})]}),e.jsxs("span",{"data-loc":"client/src/components/OperationsCharts.tsx:85",className:"flex items-center gap-1.5 rounded-full bg-primary/10 px-2.5 py-1 text-xs font-semibold text-primary",children:[e.jsx(Ha,{"data-loc":"client/src/components/OperationsCharts.tsx:86",className:"size-3.5"})," ",m.length,"개국 표시"]})]}),m.length===0?e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:91",className:"mt-6 flex min-h-40 flex-col items-center justify-center rounded-xl border border-dashed bg-muted/20 p-5 text-center",children:[e.jsx(hN,{"data-loc":"client/src/components/OperationsCharts.tsx:92",className:"size-5 text-muted-foreground"}),e.jsx("p",{"data-loc":"client/src/components/OperationsCharts.tsx:93",className:"mt-2 text-sm font-semibold",children:"아직 비교할 캠페인이 없습니다"}),e.jsx("p",{"data-loc":"client/src/components/OperationsCharts.tsx:94",className:"mt-1 text-xs text-muted-foreground",children:"캠페인을 만들면 국가별 실제 수치가 쌓입니다."})]}):e.jsx("div",{"data-loc":"client/src/components/OperationsCharts.tsx:97",className:"mt-5 space-y-3",children:m.map(b=>e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:99",className:"grid gap-2 sm:grid-cols-[100px_1fr_auto] sm:items-center",children:[e.jsx("span",{"data-loc":"client/src/components/OperationsCharts.tsx:100",className:"truncate text-sm font-semibold",children:b.countryNameKo}),e.jsx("div",{"data-loc":"client/src/components/OperationsCharts.tsx:101",className:"h-2.5 overflow-hidden rounded-full bg-muted","aria-hidden":!0,
692children:e.jsx("div",{"data-loc":"client/src/components/OperationsCharts.tsx:102",className:"h-full rounded-full bg-[linear-gradient(90deg,#2563eb,#16b8c7)] transition-[width] duration-500",style:{width:`${Math.max(4,b.candidateCount/p*100)}%`}})}),e.jsxs("span",{"data-loc":"client/src/components/OperationsCharts.tsx:107",className:"tnum whitespace-nowrap text-[11px] text-muted-foreground",children:["캠페인 ",b.campaignCount," · 후보 ",b.candidateCount," · 발송 ",b.sent]})]},b.iso2))}),e.jsx("p",{"data-loc":"client/src/components/OperationsCharts.tsx:114",className:"mt-4 text-[11px] leading-relaxed text-muted-foreground",children:"막대는 후보 수 기준이며, 발송은 후보 상태에 기록된 실제 발송 수입니다."})]})]})}function Yx({label:t,value:s,tone:c}){return e.jsxs("div",{"data-loc":"client/src/components/OperationsCharts.tsx:124",className:"flex items-center justify-between gap-3",children:[e.jsxs("dt",{"data-loc":"client/src/components/OperationsCharts.tsx:125",className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx("span",{"data-loc":"client/src/components/OperationsCharts.tsx:126",className:`size-2 rounded-full ${c}`})," ",t]}),e.jsx("dd",{"data-loc":"client/src/components/OperationsCharts.tsx:128",className:"tnum font-bold",children:s.toLocaleString()})]})}const fz=/^\d{4}-\d{2}-\d{2}$/,gz=1440*60*1e3;function Kf(t){if(!t||!fz.test(t))return!1;const[s,c,r]=t.split("-").map(Number),i=new Date(Date.UTC(s,c-1,r));return i.getUTCFullYear()===s&&i.getUTCMonth()===c-1&&i.getUTCDate()===r}function hz(t=new Date,s="Asia/Seoul"){return new Intl.DateTimeFormat("en-CA",{timeZone:s,year:"numeric",month:"2-digit",day:"2-digit"}).format(t)}function bz(t,s){if(!Kf(t)||!Kf(s))throw new Error("날짜는 YYYY-MM-DD 형식의 실제 날짜여야 합니다.");const c=r=>{const[i,o,u]=r.split("-").map(Number);return Date.UTC(i,o-1,u)};return Math.round((c(t)-c(s))/gz)}function vz(t){if(t.neverExpires)return{state:"permanent",daysRemaining:null};if(!Kf(t.expiresOn))return{state:"missing",daysRemaining:null};const s=bz(t.expiresOn,hz());return s<0?{state:"expired",daysRemaining:s}:s<=7?{state:"due_7",daysRemaining:s}:s<=30?{state:"due_30",daysRemaining:s}:s<=60?{state:"due_60",daysRemaining:s}:s<=90?{state:"due_90",daysRemaining:s}:{state:"valid",daysRemaining:s}}function yz(t,s){const c=t.filter(m=>["registered","in_progress"].includes(m.status)),r=c.map(m=>{const p=vz({expiresOn:m.expiresOn,neverExpires:m.neverExpires});return{...m,expiryState:p.state,daysRemaining:p.daysRemaining}}),i=m=>r.filter(p=>m.includes(p.expiryState)).length,o={expired:0,due_7:1,due_30:2,due_60:3,due_90:4,missing:5,valid:6,permanent:7},u=r.filter(m=>!["valid","permanent"].includes(m.expiryState)).sort((m,p)=>{const f=o[m.expiryState]-o[p.expiryState];return f!==0?f:(m.daysRemaining??Number.MAX_SAFE_INTEGER)-(p.daysRemaining??Number.MAX_SAFE_INTEGER)});return{managed:c.length,expired:i(["expired"]),due30:i(["due_7","due_30"]),due60:i(["due_60"]),due90:i(["due_90"]),missingExpiry:i(["missing"]),unassigned:c.filter(m=>!m.responsibleUserId).length,urgent:u}}function jz(){const[,t]=Pn(),{products:s,activeProduct:c,isLoading:r}=Mn(),{data:i,isLoading:o}=q.gateway.countries.list.useQuery(),{data:u,isLoading:m}=q.gateway.campaigns.list.useQuery(),p=c?.id??0,{data:f,isLoading:b}=q.gateway.certificationProcedures.workspace.useQuery({productId:p},{enabled:p>0}
692),h=(i??[]).reduce((E,z)=>(E[z.signal]=(E[z.signal]??0)+1,E),{}),y=(h.GREEN??0)+(h.YELLOW_LIA??0)+(h.YELLOW_COND??0),j=u??[],S=f?.countries??[],N=S.flatMap(E=>E.products.flatMap(z=>z.records.map(_=>({id:_.record.id,iso2:E.iso2,countryNameKo:E.countryNameKo,authority:_.definition.authority,status:_.record.status==="active"?"registered":"none",responsibleUserId:_.record.assigneeUserId,responsibleUserName:null,expiresOn:_.record.expiresOn,neverExpires:_.record.neverExpires})))),w={registered:S.filter(E=>E.summary.activeCount>0).length,inProgress:S.filter(E=>E.summary.recordCount>0&&E.summary.activeCount===0&&E.summary.reviewCount===0).length,action:(f?.inbox.reviewCount??0)+(f?.inbox.missingCount??0),expiring:f?.inbox.expiryCount??0},T=yz(N),k=(i??[]).filter(E=>E.signal==="GREEN").sort((E,z)=>E.gdpRank-z.gdpRank).slice(0,7);return e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:89",className:"page-shell",children:[e.jsx(Nz,{"data-loc":"client/src/pages/Home.tsx:90",loading:b||r,productName:c?.name??null,summary:T}),e.jsxs("header",{"data-loc":"client/src/pages/Home.tsx:97",className:"brand-panel relative isolate overflow-hidden rounded-[1.5rem] border border-white/10 px-6 py-7 text-white md:px-8 md:py-9",style:{backgroundImage:"linear-gradient(110deg, rgba(13,31,55,.96) 0%, rgba(22,62,122,.9) 52%, rgba(18,127,146,.74) 100%), url('/manus-storage/gateway-network-hero_e53e6e0a.png')",backgroundPosition:"center",backgroundSize:"cover"},children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:106",className:"pointer-events-none absolute -right-20 -top-24 size-64 rounded-full border border-white/10 bg-white/5 blur-2xl"}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:107",className:"relative flex flex-wrap items-end justify-between gap-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:108",className:"max-w-2xl",children:[e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:109",className:"text-[0.68rem] font-bold uppercase tracking-[0.18em] text-cyan-200",children:"Global Buyer Operations"}),e.jsx("h1",{"data-loc":"client/src/pages/Home.tsx:112",className:"mt-2 text-2xl font-bold tracking-[-0.03em] md:text-[2rem]",children:"어느 나라에 보낼지 먼저 확인하세요"}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:115",className:"mt-2 max-w-xl text-sm leading-relaxed text-white/70",children:"나라마다 콜드메일 규칙이 다릅니다. 보내도 되는 곳을 고른 다음 바이어를 찾는 순서로 진행합니다."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:120",className:"flex flex-wrap gap-2",children:[e.jsxs(G,{"data-loc":"client/src/pages/Home.tsx:121",variant:"outline",className:"gap-1.5 border-white/25 bg-white/10 text-white shadow-none hover:border-white/45 hover:bg-white/15 hover:text-white",onClick:()=>t("/countries"),children:[e.jsx(Ha,{"data-loc":"client/src/pages/Home.tsx:126",className:"size-4"}),"국가 신호등"]}),e.jsxs(G,{"data-loc":"client/src/pages/Home.tsx:129",onClick:()=>t("/campaigns/new"),className:"gap-1.5 bg-white text-slate-900 shadow-[0_12px_30px_-18px_rgba(0,0,0,.65)] hover:bg-cyan-50",children:[e.jsx(wn,{"data-loc":"client/src/pages/Home.tsx:133",className:"size-4"}),"캠페인 만들기"]})]})]})]}),!r&&s.length===0&&e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:142",className:"rise rounded-2xl border border-primary/20 bg-white/80 p-5 shadow-[0_18px_45px_-34px_rgba(37,99,235,.55)] backdrop-blur-sm",children:e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:143",className:"flex items-start gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:144",className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/15",children:e.jsx(Ui,{"data-loc":"client/src/pages/Home.tsx:145",className:"size-4 text-primary"})}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:147",className:"min-w-0 flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:148",className:"text-sm font-semibold",children:"먼저 팔 제품을 등록하세요"}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:149",className:"mt-1 text-sm leading-relaxed text-muted-foreground",children:"제품을 등록하면 나라별로 인증이 필요한지, 어떤 문구를 쓰면 안 되는지 자동으로 판정합니다. 제품 홈페이지 주소만 있으면 됩니다."}),e.jsxs(G,{"data-loc":"client/src/pages/Home.tsx:153",size:"sm",className:"mt-3 gap-1.5",onClick:()=>t("/products"),children:["제품 등록하기",e.jsx(ss,{"data-loc":"client/src/pages/Home.tsx:159",className:"size-3.5"})]})]})]})}),e.jsx(dz,{"data-loc":"client/src/pages/Home.tsx:167"}),e.jsxs("section",{"data-loc":"client/src/pages/Home.tsx:170",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:171",children:[e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:172",className:"page-kicker",children:"Performance"}),e.jsx("h2",{"data-loc":"client/src/pages/Home.tsx:173",className:"mt-1 text-lg font-bold tracking-tight",children:"성과"})]}),e.jsx(uz,{"data-loc":"client/src/pages/Home.tsx:175"})]}),e.jsxs("section",{"data-loc":"client/src/pages/Home.tsx:178",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:179",children:[e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:180",className:"page-kicker",children:"Operations Snapshot"}),e.jsx("h2",{"data-loc":"client/src/pages/Home.tsx:181",className:"mt-1 text-lg font-bold tracking-tight",children:"발송·국가 운영 요약"}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:182",className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:"최근 30일 실제 SMTP 결과와 현재 캠페인·후보 데이터를 함께 봅니다."})]}),e.jsx(xz,{"data-loc":"client/src/pages/Home.tsx:186"})]}),e.jsxs("section",{"data-loc":"client/src/pages/Home.tsx:189",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:190",className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:191",children:[e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:192",className:"page-kicker",children:"Global Beauty Compliance"}),e.jsx("h2",{"data-loc":"client/src/pages/Home.tsx:193",className:"mt-1 text-lg font-bold tracking-tight",children:"제품 인증 관리"}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:194",className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:c?`${c.name}의 등록 인증·만료·담당자 조치 현황을 확인합니다.`:"제품을 선택하면 인증 관리 업무를 요약합니다."})]}),e.jsx(G,{"data-loc":"client/src/pages/Home.tsx:200",asChild:!0,variant:"outline",className:"gap-1.5 bg-background",children:e.jsxs(rt,{"data-loc":"client/src/pages/Home.tsx:201",href:"/certification-map",children:["인증 관리 열기",e.jsx(ss,{"data-loc":"client/src/pages/Home.tsx:203",className:"size-4"})]})})]}),b||o?e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:208",className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:Array.from({length:4}).map((E,z)=>e.jsx(we,{"data-loc":"client/src/pages/Home.tsx:210",className:"h-24 rounded-2xl"},z))}):c?e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:214",className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[e.jsx(uc,{"data-loc":"client/src/pages/Home.tsx:215",label:"등록 완료",value:w.registered,unit:"개국",hint:"현재 제품 등록 근거 있음",icon:e.jsx(Jt,{"data-loc":"client/src/pages/Home.tsx:220",className:"size-4"}),accent:"emerald"}),e.jsx(uc,{"data-loc":"client/src/pages/Home.tsx:223",label:"진행 중",value:w.inProgress,unit:"개국",hint:"등록 절차 진행 상태",icon:e.jsx(Cn,{"data-loc":"client/src/pages/Home.tsx:228",className:"size-4"})}),e.jsx(uc,{"data-loc":"client/src/pages/Home.tsx:230",label:"조치 필요",value:w.action,unit:"건",hint:"등록·근거 확인 필요",icon:e.jsx(St,{"data-loc":"client/src/pages/Home.tsx:235",className:"size-4"}),accent:"rose"}),e.jsx(uc,{"data-loc":"client/src/pages/Home.tsx:238",label:"만료 임박·만료",value:w.expiring,unit:"건",hint:"90일 이내 갱신 확인",icon:e.jsx(sr,{"data-loc":"client/src/pages/Home.tsx:243",className:"size-4"}),accent:"slate"})]}):e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:248",className:"rounded-2xl border border-dashed bg-card p-6 text-sm text-muted-foreground",children:"제품 등록 후 국가별 인증 요약이 표시됩니다."})]}),e.jsxs("section",{"data-loc":"client/src/pages/Home.tsx:255",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:256",className:"mb-3 flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:257",children:[e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:258",className:"page-kicker",children:"Country Rules"}),e.jsx("h2",{"data-loc":"client/src/pages/Home.tsx:259",className:"mt-1 text-lg font-bold tracking-tight",children:"등록된 국가 규칙"})]}),e.jsx(rt,{"data-loc":"client/src/pages/Home.tsx:261",href:"/countries",className:"text-xs font-medium text-primary hover:underline",children:"전체 보기"})]}),o?e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:270",className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:Array.from({length:4}).map((E,z)=>e.jsx(we,{"data-loc":"client/src/pages/Home.tsx:272",className:"h-24 rounded-xl"},z))}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:277",className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[e.jsx(uc,{"data-loc":"client/src/pages/Home.tsx:278",label:"조사 완료 국가",value:i?.length??0,unit:"개국",hint:"GDP 상위 20% — 세계 경제의 91%",icon:e.jsx(Ha,{"data-loc":"client/src/pages/Home.tsx:283",className:"size-4"})}),e.jsx(uc,{"data-loc":"client/src/pages/Home.tsx:285",label:"보낼 수 있는 국가",value:y,unit:"개국",hint:"조건을 지키면 발송 가능",icon:e.jsx(Jt,{"data-loc":"client/src/pages/Home.tsx:290",className:"size-4"}),accent:"emerald"}),e.jsx(uc,{"data-loc":"client/src/pages/Home.tsx:293",label:"사전 동의 필요",value:h.RED??0,unit:"개국",hint:"공개된 문의 주소만 예외",icon:e.jsx(St,{"data-loc":"client/src/pages/Home.tsx:298",className:"size-4"}),accent:"rose"}),e.jsx(uc,{"data-loc":"client/src/pages/Home.tsx:301",label:"발송 금지",value:h.BLOCK??0,unit:"개국",hint:"다른 경로로 접촉해야 함",icon:e.jsx(Bu,{"data-loc":"client/src/pages/Home.tsx:306",className:"size-4"}),accent:"slate"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:312",className:"mt-4 overflow-hidden rounded-2xl border border-border/80 bg-white/90 shadow-[0_16px_40px_-34px_rgba(18,35,61,.5)]",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:313",className:"flex h-2.5 w-full",children:["GREEN","YELLOW_LIA","YELLOW_COND","RED","BLOCK"].map(E=>{const z=h[E]??0,_=i?.length||1;return z===0?null:e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:321",className:`h-full shrink-0 ${Os[E].dotClass}`,style:{width:`${z/_*100}%`}
692,title:`${Os[E].label} ${z}개국`},E)})}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:330",className:"flex flex-wrap gap-x-4 gap-y-1.5 px-3 py-2.5",children:["GREEN","YELLOW_LIA","YELLOW_COND","RED","BLOCK"].map(E=>e.jsxs("span",{"data-loc":"client/src/pages/Home.tsx:334",className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:338",className:`size-2 rounded-full ${Os[E].dotClass}`}),Os[E].label,e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:342",className:"tnum font-semibold text-foreground",children:h[E]??0})]},E))})]})]})]}),!o&&k.length>0&&j.length===0&&e.jsxs("section",{"data-loc":"client/src/pages/Home.tsx:355",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:356",className:"mb-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:357",className:"page-kicker",children:"Recommended Start"}),e.jsx("h2",{"data-loc":"client/src/pages/Home.tsx:358",className:"mt-1 text-lg font-bold tracking-tight",children:"처음이라면 이 나라부터"}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:359",className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:"사전 허락 없이 보낼 수 있어 규칙에 막힐 일이 가장 적은 나라입니다."})]}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:363",className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:k.map((E,z)=>e.jsxs(rt,{"data-loc":"client/src/pages/Home.tsx:365",href:`/countries/${E.iso2}`,className:"rise flex items-center gap-3 rounded-lg border border-emerald-200 bg-emerald-50/50 p-3 transition-all hover:border-emerald-300 hover:shadow-sm active:scale-[0.99]",style:{animationDelay:`${z*30}ms`},children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:371",className:"tnum flex size-5 shrink-0 items-center justify-center rounded-md bg-emerald-500 text-[10px] font-bold text-white",children:z+1}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:374",className:"min-w-0 flex-1 truncate text-sm font-medium",children:E.countryNameKo}),e.jsxs("span",{"data-loc":"client/src/pages/Home.tsx:377",className:"tnum shrink-0 text-xs text-muted-foreground",children:["GDP ",E.gdpRank,"위"]}),e.jsx(ss,{"data-loc":"client/src/pages/Home.tsx:380",className:"size-3.5 shrink-0 text-muted-foreground"})]},E.iso2))})]}),e.jsxs("section",{"data-loc":"client/src/pages/Home.tsx:388",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:389",className:"mb-3 flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:390",children:[e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:391",className:"page-kicker",children:"Active Work"}),e.jsx("h2",{"data-loc":"client/src/pages/Home.tsx:392",className:"mt-1 text-lg font-bold tracking-tight",children:"진행 중인 캠페인"})]}),j.length>0&&e.jsx(rt,{"data-loc":"client/src/pages/Home.tsx:395",href:"/campaigns",className:"text-xs font-medium text-primary hover:underline",children:"전체 보기"})]}),m?e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:405",className:"space-y-2",children:Array.from({length:2}).map((E,z)=>e.jsx(we,{"data-loc":"client/src/pages/Home.tsx:407",className:"h-16 rounded-xl"},z))}):j.length===0?e.jsx(En,{"data-loc":"client/src/pages/Home.tsx:411",icon:e.jsx(wn,{"data-loc":"client/src/pages/Home.tsx:412",className:"size-8"}),title:"아직 캠페인이 없습니다",description:c?`국가 신호등에서 나라를 하나 골라 "${c.name}" 캠페인을 시작하세요.`:"제품을 등록하고 국가를 고르면 캠페인이 만들어집니다.",action:e.jsxs(G,{"data-loc":"client/src/pages/Home.tsx:420",variant:"outline",className:"gap-1.5 bg-background",onClick:()=>t("/campaigns/new"),children:[e.jsx(wn,{"data-loc":"client/src/pages/Home.tsx:425",className:"size-4"}),"캠페인 만들기"]})}):e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:431",className:"space-y-2",children:j.slice(0,5).map(({campaign:E,productName:z,countryNameKo:_})=>e.jsxs(rt,{"data-loc":"client/src/pages/Home.tsx:433",href:`/campaigns/${E.id}
692`,className:"flex items-center gap-4 rounded-2xl border border-border/80 bg-card/95 p-4 shadow-[0_14px_36px_-32px_rgba(18,35,61,.55)] transition-all hover:-translate-y-0.5 hover:border-primary/35 hover:shadow-[0_18px_42px_-30px_rgba(37,99,235,.45)] active:translate-y-0 active:scale-[0.995]",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:438",className:"min-w-0 flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:439",className:"truncate font-semibold",children:E.name}),e.jsxs("p",{"data-loc":"client/src/pages/Home.tsx:440",className:"mt-0.5 truncate text-xs text-muted-foreground",children:[z," · ",_," ·"," ",Cz[E.status]??E.status]})]}),e.jsx(Sn,{"data-loc":"client/src/pages/Home.tsx:445",signal:E.effectiveSignal,short:!0}),e.jsx(ss,{"data-loc":"client/src/pages/Home.tsx:446",className:"size-4 shrink-0 text-muted-foreground"})]},E.id))})]}),e.jsxs("section",{"data-loc":"client/src/pages/Home.tsx:454",className:"rounded-2xl border border-primary/15 bg-[linear-gradient(135deg,rgba(255,255,255,.92),rgba(235,245,255,.72))] p-5 shadow-[0_18px_45px_-36px_rgba(37,99,235,.5)]",children:[e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:455",className:"page-kicker",children:"Getting Started"}),e.jsx("h2",{"data-loc":"client/src/pages/Home.tsx:456",className:"mt-1 text-lg font-bold tracking-tight",children:"진행 순서"}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:457",className:"mt-3 grid gap-4 sm:grid-cols-3",children:[e.jsx(Xx,{"data-loc":"client/src/pages/Home.tsx:458",n:1,icon:e.jsx(Ui,{"data-loc":"client/src/pages/Home.tsx:460",className:"size-4"}),title:"제품 등록",desc:"팔 제품의 사실 정보를 넣습니다. 문안에 쓸 수 있는 근거가 됩니다."}),e.jsx(Xx,{"data-loc":"client/src/pages/Home.tsx:464",n:2,icon:e.jsx(Ha,{"data-loc":"client/src/pages/Home.tsx:466",className:"size-4"}),title:"국가 선택",desc:"보내도 되는 나라를 고릅니다. 규칙과 인증을 함께 판정합니다."}),e.jsx(Xx,{"data-loc":"client/src/pages/Home.tsx:470",n:3,icon:e.jsx(Cn,{"data-loc":"client/src/pages/Home.tsx:472",className:"size-4"}),title:"후보 정리 후 문안",desc:"바이어를 모으고 문안을 씁니다. 교정을 통과하면 발송이 열립니다."})]}),e.jsxs("p",{"data-loc":"client/src/pages/Home.tsx:477",className:"mt-4 flex items-start gap-2 text-xs leading-relaxed text-muted-foreground",children:[e.jsx(sr,{"data-loc":"client/src/pages/Home.tsx:478",className:"mt-0.5 size-3.5 shrink-0"}),"캠페인에 팀원을 초대하면 조사 내용과 문안, 발송 기록을 함께 봅니다. 발송 권한은 담당자와 발송자에게만 열립니다."]})]})]})}function Nz({loading:t,productName:s,summary:c}){if(t)return e.jsx(we,{"data-loc":"client/src/pages/Home.tsx:496",className:"h-32 rounded-2xl"});if(!s)return null;const r=c.expired+c.due30+c.due60+c.due90+c.unassigned+c.missingExpiry,i=c.urgent.slice(0,3);return e.jsxs("section",{"data-loc":"client/src/pages/Home.tsx:503",className:`overflow-hidden rounded-2xl border shadow-[0_18px_48px_-38px_rgba(15,23,42,.65)] ${r>0?"border-amber-200 bg-white":"border-emerald-200 bg-emerald-50/60"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:508",className:"flex flex-wrap items-start justify-between gap-3 border-b border-border/60 px-4 py-3.5 md:px-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:509",className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:510",className:`mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-xl ${r>0?"bg-amber-100 text-amber-800":"bg-emerald-100 text-emerald-700"}`,children:e.jsx(ru,{"data-loc":"client/src/pages/Home.tsx:515",className:"size-4"})}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:517",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:518",className:"text-sm font-bold text-slate-950",children:"인증서 만료·담당자 점검"}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:519",className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:r>0?`${s}에서 확인할 인증 업무 ${r}건이 있습니다.`:`${s}의 만료 임박·담당자 누락 인증이 없습니다.`})]})]}),e.jsx(G,{"data-loc":"client/src/pages/Home.tsx:526",asChild:!0,size:"sm",variant:r>0?"default":"outline",className:"gap-1.5",children:e.jsxs(rt,{"data-loc":"client/src/pages/Home.tsx:527",href:"/certification-map",children:["인증 관리 열기",e.jsx(ss,{"data-loc":"client/src/pages/Home.tsx:529",className:"size-3.5"})]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:533",className:"grid gap-px bg-border/60 sm:grid-cols-3 lg:grid-cols-6",children:[e.jsx(il,{"data-loc":"client/src/pages/Home.tsx:534",label:"이미 만료",value:c.expired,tone:"rose"}),e.jsx(il,{"data-loc":"client/src/pages/Home.tsx:535",label:"30일 이내",value:c.due30,tone:"amber"}),e.jsx(il,{"data-loc":"client/src/pages/Home.tsx:536",label:"60일 이내",value:c.due60}),e.jsx(il,{"data-loc":"client/src/pages/Home.tsx:537",label:"90일 이내",value:c.due90}),e.jsx(il,{"data-loc":"client/src/pages/Home.tsx:538",label:"담당자 없음",value:c.unassigned,icon:e.jsx(PN,{"data-loc":"client/src/pages/Home.tsx:538",className:"size-3.5"})}),e.jsx(il,{"data-loc":"client/src/pages/Home.tsx:539",label:"만료일 없음",value:c.missingExpiry,icon:e.jsx(lA,{"data-loc":"client/src/pages/Home.tsx:539",className:"size-3.5"})})]}),i.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:542",className:"flex flex-wrap items-center gap-2 px-4 py-3 md:px-5",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:543",className:"text-[11px] font-semibold text-muted-foreground",children:"가장 먼저 확인"}),i.map(o=>e.jsxs(rt,{"data-loc":"client/src/pages/Home.tsx:545",href:`/certification-map?iso2=${o.iso2}`,className:"inline-flex items-center gap-1.5 rounded-full border border-amber-200 bg-amber-50 px-2.5 py-1 text-[11px] font-semibold text-amber-950 hover:border-amber-300 hover:bg-amber-100",children:[o.countryNameKo," · ",o.authority||"기관 확인",o.expiryState==="expired"?" · 만료":o.daysRemaining===null?" · 만료일 입력":` · ${o.daysRemaining}일`]},o.id))]})]})}function il({label:t,value:s,tone:c,icon:r}){return e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:576",className:"bg-white px-4 py-3",children:[e.jsxs("p",{"data-loc":"client/src/pages/Home.tsx:577",className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[r,t]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:581",className:`tnum mt-1 text-xl font-bold ${c==="rose"?"text-rose-700":c==="amber"?"text-amber-700":"text-slate-900"}`,children:s})]})}function Xx({n:t,icon:s,title:c,desc:r}){return e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:604",children:[e.jsxs("p",{"data-loc":"client/src/pages/Home.tsx:605",className:"flex items-center gap-2 text-sm font-semibold",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:606",className:"flex size-6 items-center justify-center rounded-md bg-primary/10 text-xs font-bold text-primary",children:t}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:609",className:"text-muted-foreground",children:s}),c]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:612",className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:r})]})}const Cz={draft:"준비 중",researching:"바이어 발굴 중",ready:"발송 대기",sending:"발송 진행",done:"완료",blocked:"발송 차단"};function uc({label:t,value:s,unit:c,hint:r,icon:i,accent:o}){const u=o==="emerald"?"text-emerald-600 bg-emerald-50":o==="rose"?"text-rose-600 bg-rose-50":o==="slate"?"text-slate-600 bg-slate-100":"text-primary bg-primary/10";return e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:651",className:"metric-surface rise p-4 transition-transform duration-200 hover:-translate-y-0.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:652",className:"flex items-center justify-between",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:653",className:"text-xs font-medium text-muted-foreground",children:t}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:654",className:`flex size-7 items-center justify-center rounded-md ${u}`,children:i})]}),e.jsxs("p",{"data-loc":"client/src/pages/Home.tsx:660",className:"mt-2 flex items-baseline gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:661",className:"tnum text-[1.75rem] font-bold tracking-[-0.04em]",children:s}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:662",className:"text-xs text-muted-foreground",children:c})]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:664",className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:r})]})}function wz(){const{id:t=""}=Uu(),s=Number(t),{data:c,isLoading:r}=q.gateway.products.get.useQuery({id:s},{enabled:Number.isFinite(s)}),{data:i=[],isLoading:o}=q.gateway.productAssets.list.useQuery({productId:s},{enabled:Number.isFinite(s)}),{data:u=[],isLoading:m}=q.gateway.baseLeads.stats.useQuery({}),{data:p=[]}=q.gateway.campaigns.list.useQuery(),f=q.useUtils(),b=q.gateway.products.update.useMutation({onSuccess:()=>{f.gateway.products.get.invalidate({id:s}
692),f.gateway.products.list.invalidate(),X.success("제품 기준서를 저장했습니다.")},onError:M=>X.error(M.message)}),[h,y]=v.useState(null),[j,S]=v.useState(!1),[N,w]=v.useState([]),T=q.gateway.campaigns.createBatchFromGlobalDb.useMutation({onSuccess:M=>{f.gateway.campaigns.list.invalidate(),S(!1),w([]);const B=M.created.reduce((I,ie)=>I+ie.baseCandidateCount,0);X.success(`캠페인 초안 ${M.created.length}개와 공용 DB 후보 ${B}곳을 연결했습니다.`),M.skipped.length>0&&X.message(`기존 캠페인 등으로 ${M.skipped.length}개 국가는 건너뛰었습니다.`)},onError:M=>X.error(M.message)}),k=q.gateway.products.applySiteRead.useMutation({onSuccess:M=>{f.gateway.products.get.invalidate({id:s}),f.gateway.products.list.invalidate();const B=[];M.filled.length>0&&B.push(`빈 항목 ${M.filled.length}개를 채웠습니다`),M.skipped.length>0&&B.push(`이미 적혀 있어 그대로 둔 항목 ${M.skipped.length}개`),M.certsSaved>0&&B.push(`인증 ${M.certsSaved}개국 반영`),M.certsSkipped.length>0&&B.push(`국가 규칙에 없어 건너뜀: ${M.certsSkipped.join(", ")}`),y(B.join(" · ")||"새로 채울 내용이 없었습니다."),X.success("홈페이지 내용을 반영했습니다.")},onError:M=>X.error(M.message)}),E=q.gateway.products.readSite.useMutation({onSuccess:M=>{if(!M.ok){X.error(M.reason),y(null);return}const B=M.read,I=[`${B.pagesRead}개 페이지를 읽었습니다`];B.missing.length>0&&I.push(`홈페이지에 없던 항목: ${B.missing.join(", ")}`),B.efficacyFlags.length>0&&I.push(`효능 단정 표현 ${B.efficacyFlags.length}건을 팩트시트에 주의로 표시`),y(I.join(" · ")),k.mutate({productId:s,fields:{category:B.category,tagline:B.tagline,keyIngredients:B.keyIngredients,differentiators:B.differentiators,patents:B.patents,targetChannel:B.targetChannel,factsheet:B.factsheet},certifications:B.certifications.map(ie=>({iso2:ie.iso2,status:ie.status,detail:ie.detail||void 0}))})},onError:M=>X.error(M.message)}),[z,_]=v.useState({name:"",programRole:"",brandUrl:"",category:"",tagline:"",outreachValue:"",outreachCta:"",keyIngredients:"",differentiators:"",patents:"",factsheet:"",targetChannel:"",usageScope:"",claimGuidance:""});if(v.useEffect(()=>{if(!c?.product)return;const M=c.product;_({name:M.name??"",programRole:M.programRole??"",brandUrl:M.brandUrl??"",category:M.category??"",tagline:M.tagline??"",outreachValue:M.outreachValue??"",outreachCta:M.outreachCta??"",keyIngredients:M.keyIngredients??"",differentiators:M.differentiators??"",patents:M.patents??"",factsheet:M.factsheet??"",targetChannel:M.targetChannel??"",usageScope:M.usageScope??"",claimGuidance:M.claimGuidance??""})},[c?.product]),r)return e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:153",className:"page-shell max-w-4xl",children:[e.jsx(we,{"data-loc":"client/src/pages/ProductDetail.tsx:154",className:"h-8 w-40"}),e.jsx(we,{"data-loc":"client/src/pages/ProductDetail.tsx:155",className:"h-72 rounded-xl"})]});if(!c?.product)return e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:162",className:"page-shell max-w-4xl py-16 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:163",className:"text-sm text-muted-foreground",children:"제품을 찾을 수 없습니다."}),e.jsx(G,{"data-loc":"client/src/pages/ProductDetail.tsx:164",variant:"outline",className:"mt-4 bg-background",asChild:!0,children:e.jsx(rt,{"data-loc":"client/src/pages/ProductDetail.tsx:165",href:"/products",children:"제품 목록으로"})})]});const R=M=>B=>_(I=>({...I,[M]:B})),P=i.filter(M=>M.useInOutreach&&M.analysisStatus!=="failed"),A=new Set(p.filter(M=>M.campaign.productId===s).map(M=>M.campaign.iso2)),V=u.filter(M=>M.iso2!==null&&M.sourceStatus==="ready"&&M.countryRuleStatus==="matched"&&!A.has(M.iso2)).sort((M,B)=>(M.countryRaw??M.iso2).localeCompare(B.countryRaw??B.iso2,"ko")),H=M=>w(B=>B.includes(M)?B.filter(I=>I!==M):B.length>=20?B:[...B,M]);return e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:186",className:"page-shell max-w-4xl space-y-5",children:[e.jsxs(rt,{"data-loc":"client/src/pages/ProductDetail.tsx:187",href:"/products",className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(eo,{"data-loc":"client/src/pages/ProductDetail.tsx:191",className:"size-4"}),"제품 목록"]}),e.jsxs("header",{"data-loc":"client/src/pages/ProductDetail.tsx:195",children:[e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:196",className:"page-kicker",children:"Product Intelligence"}),e.jsx("h1",{"data-loc":"client/src/pages/ProductDetail.tsx:197",className:"page-heading mt-1",children:c.product.name}),e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:198",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:"담당자가 최종 수정·저장하는 제품 기준서입니다. 이후 캠페인 문안은 여기의 검증된 사실을 우선 참조합니다."})]}),e.jsxs("section",{"data-loc":"client/src/pages/ProductDetail.tsx:204",className:"space-y-4 rounded-2xl border border-border/80 bg-card/96 p-5 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)]",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:205",className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:206",children:[e.jsx("h2",{"data-loc":"client/src/pages/ProductDetail.tsx:207",className:"font-semibold",children:"제품 기본 정보"}),e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:208",className:"mt-1 text-xs text-muted-foreground",children:"홈페이지는 초안 근거입니다. 담당자가 확정한 값은 자동 분석으로 덮어쓰지 않습니다."})]}),e.jsx(G,{"data-loc":"client/src/pages/ProductDetail.tsx:212",variant:"outline",size:"sm",className:"bg-background",disabled:!z.brandUrl.trim()||E.isPending||k.isPending,onClick:()=>E.mutate({siteUrl:z.brandUrl.trim()}),children:E.isPending?e.jsxs(e.Fragment,{children:[e.jsx(jt,{"data-loc":"client/src/pages/ProductDetail.tsx:220",className:"mr-1.5 size-4 animate-spin"}),"홈페이지 읽는 중"]}):e.jsxs(e.Fragment,{children:[e.jsx(Dt,{"data-loc":"client/src/pages/ProductDetail.tsx:222",className:"mr-1.5 size-4"}
692),"홈페이지에서 다시 가져오기"]})})]}),E.isPending?e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:227",className:"rounded-lg border border-primary/20 bg-primary/5 px-3 py-2 text-xs text-muted-foreground",children:"브랜드·성분·인증 페이지를 읽고 있습니다. 비어 있는 기본 항목만 채웁니다."}):null,h?e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:232",className:"rounded-lg border border-emerald-200 bg-emerald-50 px-3 py-2 text-xs text-emerald-900",children:h}):null,e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:236",className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:237",label:"제품 이름",children:e.jsx(Ce,{"data-loc":"client/src/pages/ProductDetail.tsx:237",value:z.name,onChange:M=>R("name")(M.target.value)})}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:238",label:"프로그램 구성",hint:"메인 상품·연계 상품·프로그램 공통 중 하나를 선택합니다.",children:e.jsxs(et,{"data-loc":"client/src/pages/ProductDetail.tsx:239",value:z.programRole||void 0,onValueChange:R("programRole"),children:[e.jsx(at,{"data-loc":"client/src/pages/ProductDetail.tsx:240",children:e.jsx(tt,{"data-loc":"client/src/pages/ProductDetail.tsx:240",placeholder:"구성을 선택하세요"})}),e.jsxs(st,{"data-loc":"client/src/pages/ProductDetail.tsx:241",children:[e.jsx(ve,{"data-loc":"client/src/pages/ProductDetail.tsx:242",value:"메인 상품",children:"메인 상품"}),e.jsx(ve,{"data-loc":"client/src/pages/ProductDetail.tsx:243",value:"연계 상품",children:"연계 상품"}),e.jsx(ve,{"data-loc":"client/src/pages/ProductDetail.tsx:244",value:"프로그램 공통",children:"프로그램 공통"})]})]})}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:248",label:"홈페이지",children:e.jsx(Ce,{"data-loc":"client/src/pages/ProductDetail.tsx:248",value:z.brandUrl,onChange:M=>R("brandUrl")(M.target.value)})}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:249",label:"분류",children:e.jsx(Ce,{"data-loc":"client/src/pages/ProductDetail.tsx:249",value:z.category,onChange:M=>R("category")(M.target.value)})}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:250",label:"목표 채널",hint:"예: 에스테틱·메디스파·피부과/성형외과",children:e.jsx(Ce,{"data-loc":"client/src/pages/ProductDetail.tsx:250",value:z.targetChannel,onChange:M=>R("targetChannel")(M.target.value)})})]})]}),e.jsxs("section",{"data-loc":"client/src/pages/ProductDetail.tsx:254",className:"space-y-4 rounded-2xl border border-border/80 bg-card/96 p-5 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)]",children:[e.jsx(Si,{"data-loc":"client/src/pages/ProductDetail.tsx:255",title:"문안용 핵심 요약",description:"1차 콜드메일은 제품을 나열하지 않고, 회신과 20–30분 미팅을 이끄는 공통 가치에 집중합니다."}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:256",label:"한 줄 소개",children:e.jsx(Ce,{"data-loc":"client/src/pages/ProductDetail.tsx:256",value:z.tagline,onChange:M=>R("tagline")(M.target.value)})}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:257",label:"1차 핵심 가치",hint:"공식 홈페이지 또는 승인 자료로 확인된 쎄라필 프로그램의 공통 가치만 적습니다.",children:e.jsx(pt,{"data-loc":"client/src/pages/ProductDetail.tsx:258",rows:3,value:z.outreachValue,onChange:M=>R("outreachValue")(M.target.value)})}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:260",label:"미팅 유도 CTA",hint:"제품 구매를 단정하지 않고, 20–30분 테이블 미팅 제안으로 연결합니다.",children:e.jsx(pt,{"data-loc":"client/src/pages/ProductDetail.tsx:261",rows:2,value:z.outreachCta,onChange:M=>R("outreachCta")(M.target.value)})})]}),e.jsxs("section",{"data-loc":"client/src/pages/ProductDetail.tsx:265",className:"space-y-4 rounded-2xl border border-border/80 bg-card/96 p-5 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)]",children:[e.jsx(Si,{"data-loc":"client/src/pages/ProductDetail.tsx:266",title:"성분·기술·차별점",description:"문안에 쓸 수 있는 사실 근거만 담당자가 최종 문장으로 정리합니다."}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:267",label:"핵심 성분·기술",children:e.jsx(pt,{"data-loc":"client/src/pages/ProductDetail.tsx:267",rows:3,value:z.keyIngredients,onChange:M=>R("keyIngredients")(M.target.value)})}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:268",label:"차별점",children:e.jsx(pt,{"data-loc":"client/src/pages/ProductDetail.tsx:268",rows:3,value:z.differentiators,onChange:M=>R("differentiators")(M.target.value)})}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:269",label:"특허·시험·근거",children:e.jsx(pt,{"data-loc":"client/src/pages/ProductDetail.tsx:269",rows:3,value:z.patents,onChange:M=>R("patents")(M.target.value)})}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:270",label:"팩트시트",hint:"문안에 쓸 수 있는 검증된 사실만 적으세요. 여기 없는 내용은 문안에 쓰지 않는 것이 원칙입니다.",children:e.jsx(pt,{"data-loc":"client/src/pages/ProductDetail.tsx:271",rows:5,value:z.factsheet,onCh
692ange:M=>R("factsheet")(M.target.value)})})]}),e.jsxs("section",{"data-loc":"client/src/pages/ProductDetail.tsx:275",className:"space-y-4 rounded-2xl border border-border/80 bg-card/96 p-5 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)]",children:[e.jsx(Si,{"data-loc":"client/src/pages/ProductDetail.tsx:276",title:"사용·유통 적합성",description:"어떤 전문 채널과 운영 방식에 맞는지를 짧고 사실적으로 관리합니다."}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:277",label:"권장 사용·유통 범위",hint:"권장 전문가·적용 범위·납품 채널·제공 가능한 자료/교육 지원을 적습니다.",children:e.jsx(pt,{"data-loc":"client/src/pages/ProductDetail.tsx:278",rows:4,value:z.usageScope,onChange:M=>R("usageScope")(M.target.value)})})]}),e.jsxs("section",{"data-loc":"client/src/pages/ProductDetail.tsx:282",className:"space-y-4 rounded-2xl border border-amber-200/80 bg-amber-50/35 p-5 shadow-[0_18px_46px_-34px_rgba(18,35,61,.36)]",children:[e.jsx(Si,{"data-loc":"client/src/pages/ProductDetail.tsx:283",title:"문안 금지·주의 표현",description:"근거 부족·국가별 별도 확인이 필요한 표현을 적어 문안 생성과 검토에서 놓치지 않습니다."}),e.jsx(Ta,{"data-loc":"client/src/pages/ProductDetail.tsx:284",label:"금지·주의 표현",hint:"의학적 치료, 미확인 인증, 성과 보장, 독점 등은 근거를 확인하기 전에는 사용하지 않습니다.",children:e.jsx(pt,{"data-loc":"client/src/pages/ProductDetail.tsx:285",rows:4,value:z.claimGuidance,onChange:M=>R("claimGuidance")(M.target.value)})})]}),e.jsxs("section",{"data-loc":"client/src/pages/ProductDetail.tsx:289",className:"space-y-4 rounded-2xl border border-border/80 bg-card/96 p-5 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)]",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:290",className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsx(Si,{"data-loc":"client/src/pages/ProductDetail.tsx:291",title:"근거 자료 연결",description:"원본 파일·Drive 동기화·분석 이력은 제품 자료실에서 관리합니다. 이 화면에는 아웃리치에 사용할 수 있는 자료만 연결해 봅니다."}),e.jsx(G,{"data-loc":"client/src/pages/ProductDetail.tsx:292",variant:"outline",size:"sm",className:"bg-background",asChild:!0,children:e.jsxs(rt,{"data-loc":"client/src/pages/ProductDetail.tsx:293",href:"/product-assets",children:[e.jsx(yc,{"data-loc":"client/src/pages/ProductDetail.tsx:293",className:"mr-1.5 size-4"}),"제품 자료실에서 관리"]})})]}),o?e.jsx(we,{"data-loc":"client/src/pages/ProductDetail.tsx:297",className:"h-16 w-full rounded-xl"}):P.length>0?e.jsx("div",{"data-loc":"client/src/pages/ProductDetail.tsx:299",className:"space-y-2",children:P.map(M=>e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:301",className:"flex items-center gap-3 rounded-xl border border-border/70 bg-background/65 px-3 py-2.5",children:[e.jsx(Dg,{"data-loc":"client/src/pages/ProductDetail.tsx:302",className:"size-4 shrink-0 text-primary"}),e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:303",className:"min-w-0 flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:304",className:"truncate text-sm font-medium",children:M.title}),e.jsxs("p",{"data-loc":"client/src/pages/ProductDetail.tsx:305",className:"mt-0.5 text-xs text-muted-foreground",children:[M.assetType," · ",M.analysisStatus==="analyzed"?"분석 완료":"검토 필요"]})]}),e.jsx("span",{"data-loc":"client/src/pages/ProductDetail.tsx:307",className:"rounded-md bg-emerald-500/10 px-2 py-1 text-[11px] font-medium text-emerald-700",children:"아웃리치 사용"})]},M.id))}):e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:312",className:"rounded-xl border border-dashed border-border bg-muted/20 px-3 py-4 text-sm text-muted-foreground",children:"연결된 아웃리치 자료가 없습니다. 제품 자료실에서 파일 또는 Drive 자료를 등록하고 검토해 주세요."})]}),e.jsxs("section",{"data-loc":"client/src/pages/ProductDetail.tsx:318",className:"space-y-3 rounded-2xl border border-primary/20 bg-primary/[0.035] p-5 shadow-[0_18px_46px_-34px_rgba(18,35,61,.42)]",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:319",className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:320",className:"flex gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/ProductDetail.tsx:321",className:"grid size-9 shrink-0 place-items-center rounded-xl bg-primary/10 text-primary",children:e.jsx(Kd,{"data-loc":"client/src/pages/ProductDetail.tsx:321",className:"size-4"})}),e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:322",children:[e.jsx("h2",{"data-loc":"client/src/pages/ProductDetail.tsx:323",className:"font-semibold",children:"공용 글로벌 DB 연결"}),e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:324",className:"mt-1 max-w-2xl text-xs leading-relaxed text-muted-foreground",children:"제품별로 필요한 국가를 골라 캠페인 초안과 후보를 한 번에 준비합니다. 공용 DB 원본은 이동하거나 삭제하지 않습니다."})]})]}),e.jsxs(G,{"data-loc":"client/src/pages/ProductDetail.tsx:329",size:"sm",disabled:m||V.length===0,onClick:()=>S(!0),children:[e.jsx(Kd,{"data-loc":"client/src/pages/ProductDetail.tsx:330",className:"mr-1.5 size-4"}),"국가 선택·일괄 연결"]})]}),e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:333",className:"text-xs text-muted-foreground",children:m?"공용 DB 국가를 확인하고 있습니다.":`연결 가능 국가 ${V.length}개 · 기존 제품 캠페인 ${A.size}개는 제외`})]}),e.jsx("div",{"data-loc":"client/src/pages/ProductDetail.tsx:338",className:"flex justify-end pb-4",children:e.jsxs(G,{"data-loc":"client/src/pages/ProductDetail.tsx:339",className:"gap-1.5 shadow-lg",disabled:b.isPending,onClick:()=>b.mutate({id:s,name:z.name.trim(),programRole:z.programRole,brandUrl:z.brandUrl.trim(),category:z.category.trim(),tagline:z.tagline,outreachValue:z.outreachValue,outreachCta:z.outreachCta,keyIngredients:z.keyIngredients,differentiators:z.differentiators,patents:z.patents,factsheet:z.factsheet,targetChannel:z.targetChannel.trim(),usageScope:z.usageScope,claimGuidance:z.claimGuidance}),children:[e.jsx(iu,{"data-loc":"client/src/pages/ProductDetail.tsx:360",className:"size-4"}),b.isPending?"기준서 저장 중":"기준서 저장"]})}),e.jsx(ta,{"data-loc":"client/src/pages/ProductDetail.tsx:365",open:j,onOpenChange:M=>{S(M),M||w([])},children:e.jsxs(aa,{"data-loc":"client/src/pages/ProductDetail.tsx:366",className:"max-w-2xl",children:[e.jsxs(sa,{"data-loc":"client/src/pages/ProductDetail.tsx:367",children:[e.jsx(na,{"data-loc":"client/src/pages/ProductDetail.tsx:368",children:"공용 글로벌 DB 국가 연결"}),e.jsx(ca,{"data-loc":"client/src/pages/ProductDetail.tsx:369",children:"선택한 국가마다 캠페인 초안이 생성되고 해당 국가의 검증 완료 후보가 복사됩니다. 발굴·예약·외부 발송은 시작되지 않습니다."})]}),e.jsx("div",{"data-loc":"client/src/pages/ProductDetail.tsx:373",className:"max-h-[48vh] space-y-2 overflow-y-auto pr-1",children:V.map(M=>{const B=N.includes(M.iso2);return e.jsxs("button",{"data-loc":"client/src/pages/ProductDetail.tsx:377",type:"button","aria-pressed":B,onClick:()=>H(M.iso2),className:`flex w-full items-center justify-between rounded-xl border px-3 py-3 text-left transition-colors ${B?"border-primary bg-primary/5":"border-border hover:bg-muted/50"}`,children:[e.jsxs("span",{"data-loc":"client/src/pages/ProductDetail.tsx:384",className:"flex items-center gap-2.5",children:[e.jsx("span",{"data-loc":"client/src/pages/ProductDetail.tsx:384",className:`grid size-5 place-items-center rounded-md border ${B?"border-primary bg-primary text-primary-foreground":"border-border"}`,children:B?e.jsx(Et,{"data-loc":"client/src/pages/ProductDetail.tsx:384",className:"size-3.5"}):null}),e.jsx("span",{"data-loc":"client/src/pages/ProductDetail.tsx:384",className:"font-medium",children:M.countryRaw??M.iso2}),e.jsx("span",{"data-loc":"client/src/pages/ProductDetail.tsx:384",className:"text-xs text-muted-foreground",children:M.iso2})]}),e.jsxs("span",{"data-loc":"client/src/pages/ProductDetail.tsx:385",className:"text-sm tabular-nums text-muted-foreground",children:["검증 후보 ",M.count,"곳"]})]},M.iso2)})}),V.length===0?e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:390",className:"rounded-xl bg-muted/50 px-3 py-4 text-sm text-muted-foreground",children:"새로 연결할 공용 DB 국가가 없습니다. 기존 캠페인을 확인해 주세요."}):null,e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:391",className:"flex flex-wrap items-center justify-between gap-3 border-t pt-4",children:[e.jsxs("p",{"data-loc":"client/src/pages/ProductDetail.tsx:392",className:"text-sm text-muted-foreground",children:["선택 ",N.length,"개 국가 · 최대 20개"]}),e.jsxs(G,{"data-loc":"client/src/pages/ProductDetail.tsx:393",disabled:N.length===0||T.isPending,onClick:()=>T.mutate({productId:s,iso2s:N}),children:[T.isPending?e.jsx(jt,{"data-loc":"client/src/pages/ProductDetail.tsx:394",className:"mr-1.5 size-4 animate-spin"}):e.jsx(Kd,{"data-loc":"client/src/pages/ProductDetail.tsx:394",className:"mr-1.5 size-4"}),"선택 국가 캠페인 준비"]})]})]})})]})}function Si({title:t,description:s}){return e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:406",children:[e.jsx("h2",{"data-loc":"client/src/pages/ProductDetail.tsx:407",className:"font-semibold",children:t}),e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:408",className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:s})]})}
692function Ta({label:t,hint:s,children:c}){return e.jsxs("div",{"data-loc":"client/src/pages/ProductDetail.tsx:423",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/ProductDetail.tsx:424",className:"text-sm",children:t}),c,s?e.jsx("p",{"data-loc":"client/src/pages/ProductDetail.tsx:426",className:"text-xs leading-relaxed text-muted-foreground",children:s}):null]})}function Sz(){const{activeProductId:t,setActiveProductId:s}=Mn(),{data:c,isLoading:r}=q.gateway.products.list.useQuery(),[i,o]=v.useState(!1),u=bw("제품 준비").filter(b=>b.path!=="/products"),m=[bl,Jt],p=q.useUtils(),f=q.gateway.products.remove.useMutation({onSuccess:()=>{p.gateway.products.list.invalidate(),X.success("제품을 삭제했습니다.")},onError:b=>X.error(b.message)});return e.jsxs("div",{"data-loc":"client/src/pages/Products.tsx:40",className:"page-shell max-w-5xl",children:[e.jsxs("header",{"data-loc":"client/src/pages/Products.tsx:41",className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Products.tsx:42",children:[e.jsx("p",{"data-loc":"client/src/pages/Products.tsx:43",className:"page-kicker",children:"Product Intelligence"}),e.jsx("h1",{"data-loc":"client/src/pages/Products.tsx:44",className:"page-heading mt-1",children:"제품 관리"}),e.jsx("p",{"data-loc":"client/src/pages/Products.tsx:45",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:"쎄라필 프로그램의 공통 제품 기준을 관리합니다. 여기에 적은 정보가 국가 판정과 1차 회신·미팅용 문안의 근거가 됩니다."})]}),e.jsxs(G,{"data-loc":"client/src/pages/Products.tsx:50",onClick:()=>o(!0),className:"gap-1.5",children:[e.jsx(vs,{"data-loc":"client/src/pages/Products.tsx:51",className:"size-4"}),"제품 등록"]})]}),e.jsx("section",{"data-loc":"client/src/pages/Products.tsx:56",className:"rounded-2xl border border-indigo-200/80 bg-[linear-gradient(135deg,rgba(238,242,255,.82),rgba(255,255,255,.92))] p-4 shadow-[0_16px_38px_-34px_rgba(67,56,202,.48)] md:p-5",children:e.jsxs("div",{"data-loc":"client/src/pages/Products.tsx:57",className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Products.tsx:58",className:"max-w-2xl",children:[e.jsx("p",{"data-loc":"client/src/pages/Products.tsx:59",className:"page-kicker text-indigo-700",children:"쎄라필 프로그램 준비"}),e.jsx("h2",{"data-loc":"client/src/pages/Products.tsx:60",className:"mt-1 text-base font-bold tracking-tight",children:"제품 기준을 확인한 뒤 자료와 인증을 연결하세요."}),e.jsx("p",{"data-loc":"client/src/pages/Products.tsx:61",className:"mt-1 text-sm leading-relaxed text-muted-foreground",children:"자료와 인증은 제품별로 관리하고, 캠페인에서는 준비된 공통 가치를 바탕으로 1차 회신·테이블 미팅을 제안합니다."})]}),e.jsx("div",{"data-loc":"client/src/pages/Products.tsx:63",className:"flex flex-wrap gap-2",children:u.map((b,h)=>{const y=m[h]??Rf;return e.jsx(G,{"data-loc":"client/src/pages/Products.tsx:67",variant:"outline",size:"sm",className:"gap-1.5 bg-white/80",asChild:!0,children:e.jsxs(rt,{"data-loc":"client/src/pages/Products.tsx:68",href:b.path,children:[e.jsx(y,{"data-loc":"client/src/pages/Products.tsx:69",className:"size-3.5"})," ",b.label,e.jsx(ss,{"data-loc":"client/src/pages/Products.tsx:70",className:"size-3.5"})]})},b.path)})})]})}),r?e.jsx("div",{"data-loc":"client/src/pages/Products.tsx:80",className:"space-y-2",children:Array.from({length:2}).map((b,h)=>e.jsx(we,{"data-loc":"client/src/pages/Products.tsx:82",className:"h-20 rounded-xl"},h))}):(c?.length??0)===0?e.jsx(En,{"data-loc":"client/src/pages/Products.tsx:86",icon:e.jsx(Rf,{"data-loc":"client/src/pages/Products.tsx:87",className:"size-8"}),title:"등록된 제품이 없습니다",description:"제품 이름과 홈페이지 주소만 있으면 시작할 수 있습니다. 나머지 정보는 나중에 채워도 됩니다.",action:e.jsxs(G,{"data-loc":"client/src/pages/Products.tsx:91",onClick:()=>o(!0),className:"gap-1.5",children:[e.jsx(vs,{"data-loc":"client/src/pages/Products.tsx:92",className:"size-4"}),"첫 제품 등록"]})}):e.jsx("div",{"data-loc":"client/src/pages/Products.tsx:98",className:"space-y-2",children:c?.map(b=>{const h=b.id===t;return e.jsxs("div",{"data-loc":"client/src/pages/Products.tsx:102",className:`rise flex items-center gap-4 roun
692ded-2xl border p-4 shadow-[0_14px_36px_-30px_rgba(18,35,61,.48)] transition-all hover:-translate-y-0.5 ${h?"border-primary/50 bg-primary/5":"bg-card"}`,children:[e.jsx("span",{"data-loc":"client/src/pages/Products.tsx:108",className:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:e.jsx(Ui,{"data-loc":"client/src/pages/Products.tsx:109",className:"size-5 text-primary"})}),e.jsxs("div",{"data-loc":"client/src/pages/Products.tsx:111",className:"min-w-0 flex-1",children:[e.jsxs("p",{"data-loc":"client/src/pages/Products.tsx:112",className:"flex items-center gap-2 font-semibold",children:[e.jsx("span",{"data-loc":"client/src/pages/Products.tsx:113",className:"truncate",children:b.name}),h&&e.jsx("span",{"data-loc":"client/src/pages/Products.tsx:115",className:"shrink-0 rounded-full bg-primary px-2 py-0.5 text-[10px] font-semibold text-primary-foreground",children:"선택됨"})]}),e.jsx("p",{"data-loc":"client/src/pages/Products.tsx:120",className:"mt-0.5 truncate text-xs text-muted-foreground",children:[b.category,b.brandUrl].filter(Boolean).join(" · ")||"추가 정보 없음"})]}),!h&&e.jsxs(G,{"data-loc":"client/src/pages/Products.tsx:126",variant:"ghost",size:"sm",onClick:()=>s(b.id),children:[e.jsx(Et,{"data-loc":"client/src/pages/Products.tsx:131",className:"mr-1 size-3.5"}),"선택"]}),e.jsx(G,{"data-loc":"client/src/pages/Products.tsx:135",variant:"outline",size:"sm",className:"bg-background",asChild:!0,children:e.jsx(rt,{"data-loc":"client/src/pages/Products.tsx:136",href:`/products/${b.id}`,children:"상세"})}),e.jsx(G,{"data-loc":"client/src/pages/Products.tsx:138",variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive",onClick:()=>{confirm(`"${b.name}"을 삭제하면 연결된 캠페인도 함께 사라집니다. 계속할까요?`)&&f.mutate({id:b.id})},children:e.jsx(Hs,{"data-loc":"client/src/pages/Products.tsx:152",className:"size-4"})})]},b.id)})}),e.jsx(Tz,{"data-loc":"client/src/pages/Products.tsx:160",open:i,onOpenChange:o})]})}function Tz({open:t,onOpenChange:s}){const{setActiveProductId:c}=Mn(),r=q.useUtils(),i=v.useRef([]),[o,u]=v.useState({name:"",brandUrl:"",category:"",tagline:"",keyIngredients:"",differentiators:"",patents:"",factsheet:"",targetChannel:""}),m=q.gateway.products.create.useMutation({onSuccess:w=>{r.gateway.products.list.invalidate(),typeof w=="number"&&c(w),typeof w=="number"&&i.current.length>0?N.mutate({productId:w,fields:{},certifications:i.current.map(T=>({iso2:T.iso2,status:T.status,detail:T.detail||void 0}))},{onSuccess:T=>{T.certsSaved>0?X.success(`제품 등록 완료. 인증 ${T.certsSaved}개국을 함께 반영했습니다.`):X.success("제품을 등록했습니다."),T.certsSkipped.length>0&&X.info(`국가 규칙에 없어 건너뛴 인증: ${T.certsSkipped.join(", ")}`),r.gateway.products.get.invalidate()},onError:()=>X.warning("제품은 등록했지만 인증 현황 반영에 실패했습니다. 제품 상세에서 직접 등록해 주세요.")}):X.success("제품을 등록했습니다."),s(!1),j([]),y(null),u({name:"",brandUrl:"",category:"",tagline:"",keyIngredients:"",differentiators:"",patents:"",factsheet:"",targetChannel:""})},onError:w=>X.error(w.message)}),p=w=>T=>u(k=>({...k,[w]:T})),[f,b]=v.useState([]),[h,y]=v.useState(null),j=w=>{i.current=w,b(w)},S=q.gateway.products.readSite.useMutation({onSuccess:w=>{if(!w.ok){X.error(w.reason);return}const T=w.read;u(E=>({...E,name:E.name.trim()||T.name,category:E.category.trim()||T.category,tagline:E.tagline.trim()||T.tagline,keyIngredients:E.keyIngredients.trim()||T.keyIngredients,differentiators:E.differentiators.trim()||T.differentiators,patents:E.patents.trim()||T.patents,targetChannel:E.targetChannel.trim()||T.targetChannel,factsheet:E.factsheet.trim()||T.factsheet})),j(T.certifications);const k=[`${T.pagesRead}개 페이지를 읽었습니다`];T.certifications.length>0&&k.push(`인증 ${T.certifications.length}개국 발견 (등록 시 함께 반영)`),T.missing.length>0&&k.push(`홈페이지에 없어 비워둔 항목: ${T.missing.join(", ")}`),T.efficacyFlags.length>0&&k.push(`효능 단정 표현 ${T.efficacyFlags.length}건을 팩트시트에 주의로 표시했습니다`),y(k.join(" · ")),X.success("홈페이지에서 정보를 가져왔습니다. 내용을 확인하고 등록하세요.")},onError:w=>X.error(w.message)}),N=q.gateway.products.applySiteRead.useMutation();return e.jsx(ta,{"data-loc":"client/src/pages/Products.tsx:309",open:t,onOpenChange:s,children:e.jsxs(aa,{"data-loc":"client/src/pages/Products.tsx:310",className:"max-h-[85vh] overflow-y-auto sm:max-w-lg",children:[e.jsxs(sa,{"data-loc":"client/src/pages/Products.tsx:311",children:[e.jsx(na,{"data-loc":"client/src/pages/Products.tsx:312",children:"제품 등록"}),e.jsx(ca,{"data-loc":"client/src/pages/Products.tsx:313",children:'홈페이지 주소를 넣고 "홈페이지에서 가져ì˜
692¤ê¸°"를 누르면 나머지를 채워 드립니다. 내용을 확인한 뒤 등록하세요.'})]}),e.jsxs("div",{"data-loc":"client/src/pages/Products.tsx:319",className:"space-y-4",children:[e.jsx(mn,{"data-loc":"client/src/pages/Products.tsx:320",label:"제품 이름",required:!0,children:e.jsx(Ce,{"data-loc":"client/src/pages/Products.tsx:321",value:o.name,onChange:w=>p("name")(w.target.value),placeholder:"예: 쎄라필"})}),e.jsx(mn,{"data-loc":"client/src/pages/Products.tsx:327",label:"제품·브랜드 홈페이지",hint:"파트너에게 보낼 링크로 쓰이고, 아래 항목을 채우는 근거가 됩니다",children:e.jsxs("div",{"data-loc":"client/src/pages/Products.tsx:331",className:"flex gap-2",children:[e.jsx(Ce,{"data-loc":"client/src/pages/Products.tsx:332",value:o.brandUrl,onChange:w=>p("brandUrl")(w.target.value),placeholder:"https://"}),e.jsx(G,{"data-loc":"client/src/pages/Products.tsx:337",type:"button",variant:"outline",className:"shrink-0 bg-background",disabled:!o.brandUrl.trim()||S.isPending,onClick:()=>{y(null),S.mutate({siteUrl:o.brandUrl.trim()})},children:S.isPending?e.jsxs(e.Fragment,{children:[e.jsx(jt,{"data-loc":"client/src/pages/Products.tsx:349",className:"mr-1.5 size-4 animate-spin"}),"읽는 중"]}):e.jsxs(e.Fragment,{children:[e.jsx(Dt,{"data-loc":"client/src/pages/Products.tsx:354",className:"mr-1.5 size-4"}),"홈페이지에서 가져오기"]})})]})}),S.isPending&&e.jsx("p",{"data-loc":"client/src/pages/Products.tsx:363",className:"rounded-lg border border-primary/20 bg-primary/5 px-3 py-2 text-xs text-muted-foreground",children:"홈페이지를 열어 브랜드·성분·인증 페이지를 읽고 있습니다. 1~2분 걸립니다."}),h&&e.jsx("p",{"data-loc":"client/src/pages/Products.tsx:368",className:"rounded-lg border border-emerald-200 bg-emerald-50 px-3 py-2 text-xs text-emerald-900",children:h}),f.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/Products.tsx:373",className:"rounded-lg border bg-muted/40 px-3 py-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Products.tsx:374",className:"mb-1.5 text-xs font-medium",children:"홈페이지에서 찾은 인증 현황"}),e.jsx("div",{"data-loc":"client/src/pages/Products.tsx:375",className:"flex flex-wrap gap-1.5",children:f.map(w=>e.jsxs("span",{"data-loc":"client/src/pages/Products.tsx:377",className:"rounded-md border bg-background px-2 py-0.5 text-xs",children:[w.countryName||w.iso2,w.detail?` · ${w.detail}`:"",w.status==="registered"?" · 등록 완료":w.status==="in_progress"?" · 진행 중":""]},w.iso2))})]}),e.jsx(mn,{"data-loc":"client/src/pages/Products.tsx:389",label:"분류",hint:"국가별 인증 제도를 판단하는 기준",children:e.jsx(Ce,{"data-loc":"client/src/pages/Products.tsx:390",value:o.category,onChange:w=>p("category")(w.target.value),placeholder:"예: 전문가용 화장품 (필링)"})}),e.jsx(mn,{"data-loc":"client/src/pages/Products.tsx:396",label:"한 줄 소개",children:e.jsx(Ce,{"data-loc":"client/src/pages/Products.tsx:397",value:o.tagline,onChange:w=>p("tagline")(w.target.value),placeholder:"예: 각질 제거와 진정을 한 번에"})}),e.jsx(mn,{"data-loc":"client/src/pages/Products.tsx:403",label:"핵심 성분",children:e.jsx(pt,{"data-loc":"client/src/pages/Products.tsx:404",value:o.keyIngredients,onChange:w=>p("keyIngredients")(w.target.value),rows:2,placeholder:"쉼표로 구분"})}),e.jsx(mn,{"data-loc":"client/src/pages/Products.tsx:411",label:"차별점",hint:"경쟁 제품과 다른 점",children:e.jsx(pt,{"data-loc":"client/src/pages/Products.tsx:412",value:o.differentiators,onChange:w=>p("differentiators")(w.target.value),rows:3})}),e.jsx(mn,{"data-loc":"client/src/pages/Products.tsx:418",label:"특허·인증",hint:"보유한 특허나 시험 성적서",children:e.jsx(pt,{"data-loc":"client/src/pages/Products.tsx:419",value:o.patents,onChange:w=>p("patents")(w.target.value),rows:2})}),e.jsx(mn,{"data-loc":"client/src/pages/Products.tsx:425",label:"목표 판매 채널",children:e.jsx(Ce,{"data-loc":"client/src/pages/Products.tsx:426",value:o.targetChannel,onChange:w=>p("targetChannel")(w.target.value),placeholder:"예: 에스테틱, 피부과 클리닉"})}),e.jsx(mn,{"data-loc":"client/src/pages/Products.tsx:432",label:"팩트시트",hint:"문안에 인용할 검증된 사실만 적으세요. 여기 없는 내용은 문안에 쓰지 않는 것이 원칙입니다.",children:e.jsx(pt,{"data-loc":"client/src/pages/Products.tsx:436",value:o.factsheet,onCh
692ange:w=>p("factsheet")(w.target.value),rows:4,placeholder:"예: 저자극 pH 조성, 시술 후 진정 단계 포함, 국내 3천여 에스테틱 공급"})})]}),e.jsxs(_a,{"data-loc":"client/src/pages/Products.tsx:445",children:[e.jsx(G,{"data-loc":"client/src/pages/Products.tsx:446",variant:"outline",className:"bg-background",onClick:()=>s(!1),children:"취소"}),e.jsx(G,{"data-loc":"client/src/pages/Products.tsx:449",disabled:!o.name.trim()||m.isPending||N.isPending,onClick:()=>m.mutate({name:o.name.trim(),brandUrl:o.brandUrl.trim()||void 0,category:o.category.trim()||void 0,tagline:o.tagline.trim()||void 0,keyIngredients:o.keyIngredients.trim()||void 0,differentiators:o.differentiators.trim()||void 0,patents:o.patents.trim()||void 0,factsheet:o.factsheet.trim()||void 0,targetChannel:o.targetChannel.trim()||void 0}),children:m.isPending||N.isPending?"등록 중":"등록"})]})]})})}function mn({label:t,hint:s,required:c,children:r}){return e.jsxs("div",{"data-loc":"client/src/pages/Products.tsx:485",className:"space-y-1.5",children:[e.jsxs(_e,{"data-loc":"client/src/pages/Products.tsx:486",className:"text-sm",children:[t,c&&e.jsx("span",{"data-loc":"client/src/pages/Products.tsx:488",className:"ml-0.5 text-destructive",children:"*"})]}),r,s&&e.jsx("p",{"data-loc":"client/src/pages/Products.tsx:491",className:"text-xs text-muted-foreground",children:s})]})}const kz=/[,;/\n\r|]+|\s{2,}/,Dz=/^[^\s@]+@[^\s@.]+(\.[^\s@.]+)+$/;function r3(t){const s=(t??"").trim();if(!s)return{valid:[],invalid:[]};const c=[],r=s.replace(/<([^>]+)>/g,(p,f)=>(c.push(String(f).trim())," ")),i=[...c,...r.split(kz).flatMap(p=>p.split(/\s+/)).map(p=>p.trim())].filter(Boolean),o=[],u=[],m=new Set;for(const p of i){const f=p.replace(/^[<("']+|[>)"'.,]+$/g,"").trim();if(!f)continue;const b=f.toLowerCase();m.has(b)||(m.add(b),Dz.test(f)?o.push(f):u.push(f))}return{valid:o,invalid:u}}function l3(t){const{invalid:s}=r3(t);if(s.length===0)return null;const c=s.slice(0,3).join(", "),r=s.length>3?` 외 ${s.length-3}ê±´`:"";return`이메일 형식이 아닌 값이 있습니다: ${c}${r}. 주소는 쉼표나 슬래시로 나눠 적으세요.`}const Ez={senderName:"",senderTitle:"",company:"",address:"",email:"",phone:"",whatsapp:"",wechat:"",line:"",telegram:"",zalo:"",viber:"",kakao:"",linkedin:"",xing:""},i3=[{key:"senderName",label:"서명에 쓸 이름",hint:"메일 끝에 들어가는 이름입니다. 현지에서 읽기 쉬운 표기를 함께 적어도 됩니다.",placeholder:"이주희 (Juhee Lee)"},{key:"senderTitle",label:"직함",hint:"나라마다 직함을 중요하게 보는 곳이 있습니다.",placeholder:"팀장"},{key:"company",label:"회사명",hint:"서명란의 회사명 자리에 들어갑니다. 상대 회사명과 섞이지 않습니다.",placeholder:"엑스폴리에이션"},{key:"address",label:"실제 사업장 주소",hint:"미국·브라질 등 물리적 주소가 필요한 국가의 서명에 사용됩니다.",placeholder:"서울특별시 ... (우편번호 포함)"},{key:"email",label:"회신 받을 이메일",hint:"상대가 답장할 주소입니다. 담당자가 여러 명이면 쉼표나 슬래시로 나눠 적으세요. 답장이 모두에게 함께 옵니다.",placeholder:"[email protected] / [email protected]"},{key:"phone",label:"전화번호",hint:"국가번호를 함께 적으세요.",placeholder:"+82 2-000-0000"}],o3=[{key:"whatsapp",label:"WhatsApp",hint:"브라질·중동·동남아에서 회신율이 높은 채널입니다.",placeholder:"+82 10-0000-0000"},{key:"wechat",label:"WeChat",hint:"중국 상대에게는 거의 필수입니다.",placeholder:"wechat_id"},{key:"line",label:"LINE",hint:"일본·대만에서 쓰입니다.",placeholder:"line_id"},{key:"telegram",label:"Telegram",hint:"Telegram 사용자명 또는 연락 ID",placeholder:"@username"},{key:"zalo",label:"Zalo",hint:"베트남에서 사용하는 연락 ID 또는 번호",placeholder:"Zalo ID"},{key:"viber",label:"Viber",hint:"Viber 연락 ID 또는 번호",placeholder:"Viber ID"},{key:"kakao",label:"KakaoTalk",hint:"카카오톡 ID 또는 채널",placeholder:"KakaoTalk ID"},{key:"linkedin",label:"LinkedIn",hint:"개인 또는 회사 프로필 URL",placeholder:"https://linkedin.com/in/..."},{key:"xing",label:"XING",hint:"독일권 비즈니스 프로필 URL",placeholder:"https://xing.com/profile/..."}],_z=[...i3,...o3];function Az({embedded:t=!1}){const{data:s,isPending:c}=q.gateway.profile.get.useQuery(),[r,i]=v.useState(Ez),[o,u]=v.useState(!1);v.useEffect(()=>{!s||o||(i({senderName:s.senderName??"",senderTitle:s.senderTitle??"",company:s.company??"",address:s.address??"",email:s.email??"",phone:s.phone??"",whatsapp:s.whatsapp??"",wechat:s.wechat??"",line:s.line??"",telegram:s.telegram??"",zalo:s.zalo??"",viber:s.viber??"",kakao:s.kakao??"",linkedin:s.linkedin??"",xing:s.xing??""}),u(!0))},[s,o]);const m=q.useUtils(),p=q.gateway.profile.save.useMutation({onSuccess:()=>{m.gateway.profile.get.invalidate(),m.gateway.send.previews.invalidate(),m.gateway.send.preflight.invali
692date(),X.success("저장했습니다. 문안 서명이 자동으로 채워집니다.")},onError:y=>X.error(y.message)}),f=Object.values(r).filter(y=>y.trim()).length,b=r3(r.email),h=l3(r.email);return e.jsxs("div",{"data-loc":"client/src/pages/SenderProfile.tsx:175",className:t?"space-y-5":"page-shell max-w-4xl",children:[!t&&e.jsxs("div",{"data-loc":"client/src/pages/SenderProfile.tsx:176",children:[e.jsx("p",{"data-loc":"client/src/pages/SenderProfile.tsx:177",className:"page-kicker",children:"Sender Identity"}),e.jsxs("h1",{"data-loc":"client/src/pages/SenderProfile.tsx:178",className:"page-heading mt-1 flex items-center gap-2",children:[e.jsx(lu,{"data-loc":"client/src/pages/SenderProfile.tsx:179",className:"size-6 text-muted-foreground"}),"내 서명 정보"]}),e.jsx("p",{"data-loc":"client/src/pages/SenderProfile.tsx:182",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:"메일 끝에 들어가는 내 정보입니다. 한 번 넣어 두면 모든 캠페인의 문안에서 서명 자리가 자동으로 채워집니다. 후보 회사명과 섞이지 않으니 안심하고 넣으세요."})]}),e.jsxs("div",{"data-loc":"client/src/pages/SenderProfile.tsx:189",className:"flex gap-2.5 rounded-2xl border border-sky-200 bg-[linear-gradient(135deg,rgba(240,249,255,.96),rgba(236,254,255,.8))] p-4 shadow-[0_16px_38px_-32px_rgba(14,165,233,.45)]",children:[e.jsx(tr,{"data-loc":"client/src/pages/SenderProfile.tsx:190",className:"mt-0.5 size-4 shrink-0 text-sky-700"}),e.jsxs("p",{"data-loc":"client/src/pages/SenderProfile.tsx:191",className:"text-sm leading-relaxed text-sky-900",children:["AI가 쓴 문안에는 서명 자리가 ",e.jsx("span",{"data-loc":"client/src/pages/SenderProfile.tsx:192",className:"font-mono",children:"[회사명]"}),","," ",e.jsx("span",{"data-loc":"client/src/pages/SenderProfile.tsx:193",className:"font-mono",children:"[E-mail]"})," 처럼 남습니다. 후보 40곳에 모두 같은 값이 들어가는 부분이라 여기서 한 번만 채우면 됩니다. 상대 담당자 이름은 사람이 확인해서 넣어야 하므로 자동으로 채우지 않습니다."]})]}),c?e.jsx(we,{"data-loc":"client/src/pages/SenderProfile.tsx:200",className:"h-96 rounded-xl"}):e.jsxs("div",{"data-loc":"client/src/pages/SenderProfile.tsx:202",className:"space-y-4 rounded-2xl border border-border/80 bg-card/96 p-5 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)] md:p-6",children:[[{title:"기본 신원·회신 정보",description:"모든 국가별 서명이 기본으로 상속합니다.",fields:i3},{title:"연락 채널",description:"국가별 서명에는 그 나라의 권장 채널만 자동 노출됩니다.",fields:o3}].map(y=>e.jsxs("section",{"data-loc":"client/src/pages/SenderProfile.tsx:207",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/SenderProfile.tsx:208",children:[e.jsx("h3",{"data-loc":"client/src/pages/SenderProfile.tsx:209",className:"text-sm font-semibold text-foreground",children:y.title}),e.jsx("p",{"data-loc":"client/src/pages/SenderProfile.tsx:210",className:"mt-0.5 text-xs text-muted-foreground",children:y.description})]}),e.jsx("div",{"data-loc":"client/src/pages/SenderProfile.tsx:212",className:"grid gap-4 sm:grid-cols-2",children:y.fields.map(j=>e.jsxs("div",{"data-loc":"client/src/pages/SenderProfile.tsx:214",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/SenderProfile.tsx:215",htmlFor:j.key,className:"text-sm font-medium",children:j.label}),e.jsx(Ce,{"data-loc":"client/src/pages/SenderProfile.tsx:216",id:j.key,value:r[j.key],placeholder:j.placeholder,"aria-invalid":j.key==="email"&&h?!0:void 0,onChange:S=>i(N=>({...N,[j.key]:S.target.value}))}),j.key==="email"&&h?e.jsxs("p",{"data-loc":"client/src/pages/SenderProfile.tsx:224",className:"flex items-start gap-1.5 text-xs leading-relaxed text-destructive",children:[e.jsx(St,{"data-loc":"client/src/pages/SenderProfile.tsx:225",className:"mt-0.5 size-3.5 shrink-0"}),h]}):j.key==="email"&&b.valid.length>1?e.jsxs("p",{"data-loc":"client/src/pages/SenderProfile.tsx:228",className:"flex items-start gap-1.5 text-xs leading-relaxed text-emerald-700",children:[e.jsx(sr,{"data-loc":"client/src/pages/SenderProfile.tsx:229",className:"mt-0.5 size-3.5 shrink-0"}),"답장이 ",b.valid.length,"곳에 함께 도착합니다 — ",b.valid.join(", ")
692]}):e.jsx("p",{"data-loc":"client/src/pages/SenderProfile.tsx:233",className:"text-xs leading-relaxed text-muted-foreground",children:j.hint})]},j.key))})]},y.title)),e.jsxs("div",{"data-loc":"client/src/pages/SenderProfile.tsx:241",className:"flex flex-wrap items-center justify-between gap-3 border-t pt-4",children:[e.jsxs("p",{"data-loc":"client/src/pages/SenderProfile.tsx:242",className:"text-sm text-muted-foreground",children:["채운 항목 ",e.jsx("span",{"data-loc":"client/src/pages/SenderProfile.tsx:243",className:"tnum font-semibold",children:f})," / ",_z.length]}),e.jsxs(G,{"data-loc":"client/src/pages/SenderProfile.tsx:245",className:"gap-2",disabled:p.isPending||h!==null,onClick:()=>p.mutate(r),children:[e.jsx(Et,{"data-loc":"client/src/pages/SenderProfile.tsx:250",className:"size-4"}),p.isPending?"저장 중":"저장"]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SenderProfile.tsx:257",className:"rounded-2xl border border-dashed border-border/90 bg-white/58 p-4 shadow-[0_12px_34px_-30px_rgba(18,35,61,.38)]",children:[e.jsx("p",{"data-loc":"client/src/pages/SenderProfile.tsx:258",className:"text-sm font-semibold",children:"서명 미리보기"}),e.jsx("pre",{"data-loc":"client/src/pages/SenderProfile.tsx:259",className:"mt-2 whitespace-pre-wrap font-sans text-sm leading-relaxed text-muted-foreground",children:[r.senderName||"[이름]",r.senderTitle||null,r.company||"[회사명]",[(b.valid.length>0?b.valid.join(" / "):r.email)||"[이메일]",r.whatsapp?`WhatsApp: ${r.whatsapp}`:null,r.wechat?`WeChat: ${r.wechat}`:null,r.line?`LINE: ${r.line}`:null,r.telegram?`Telegram: ${r.telegram}`:null,r.zalo?`Zalo: ${r.zalo}`:null,r.viber?`Viber: ${r.viber}`:null,r.kakao?`KakaoTalk: ${r.kakao}`:null,r.linkedin?`LinkedIn: ${r.linkedin}`:null,r.xing?`XING: ${r.xing}`:null,r.phone||null].filter(Boolean).join(" | "),r.address||null].filter(Boolean).join(`
693`)})]})]})}const Gf=[{key:"email",label:"회신 받을 이메일",hint:"실제 회신을 받을 주소 · 발송 필수",match:/email|e-mail|이메일/i},{key:"phone",label:"전화번호",hint:"+82처럼 국가번호 포함",match:/phone|전화|coldcall|콜드콜/i},{key:"whatsapp",label:"WhatsApp",hint:"WhatsApp Business 번호 또는 ID",match:/whatsapp/i},{key:"wechat",label:"WeChat",hint:"WeChat ID",match:/wechat|위챗|微信/i},{key:"line",label:"LINE",hint:"LINE ID",match:/\bline\b|라인/i},{key:"telegram",label:"Telegram",hint:"@username 또는 연락 ID",match:/telegram|텔레그램/i},{key:"zalo",label:"Zalo",hint:"Zalo 번호 또는 ID",match:/zalo/i},{key:"viber",label:"Viber",hint:"Viber 번호 또는 ID",match:/viber/i},{key:"kakao",label:"KakaoTalk",hint:"카카오톡 ID 또는 채널",match:/kakao|카카오/i},{key:"linkedin",label:"LinkedIn",hint:"개인 또는 회사 프로필 URL",match:/linkedin/i},{key:"xing",label:"XING",hint:"독일권 프로필 URL",match:/\bxing\b/i}];function Pz(t){const s=t??"";return["email",...Gf.map((r,i)=>({channel:r,order:i,index:s.search(r.match)})).filter(r=>r.index>=0).sort((r,i)=>r.index-i.index||r.order-i.order).map(r=>r.channel.key).filter(r=>r!=="email")]}function Mz(t,s){return t?Pz(s):["email","phone"]}const c2={name:"",iso2:"_global",language:"",isDefault:!1,senderName:"",senderTitle:"",company:"",address:"",email:"",phone:"",whatsapp:"",wechat:"",line:"",telegram:"",zalo:"",viber:"",kakao:"",linkedin:"",xing:""},Rz=[["senderName","서명 이름","중국용이면 중국어 이름 또는 현지 표기"],["senderTitle","직함","예: Global Business Team Lead"],["company","회사명","예: YS Medi"],["address","실제 사업장 주소","브라질 등 주소 표기가 필요한 국가용"]];function Oz({embedded:t=!1}){const{data:s,isPending:c}=q.gateway.signatures.list.useQuery(),{data:r}=q.gateway.profile.get.useQuery(),{data:i}=q.gateway.countries.list.useQuery(),o=q.useUtils(),[u,m]=v.useState(c2),[p,f]=v.useState("new"),[b,h]=v.useState(!1),[y,j]=v.useState(!1),S=A=>{if(!A){m(c2),f("new"),h(!1);return}m({id:A.id,name:A.name,iso2:A.iso2??"_global",language:A.language??"",isDefault:A.isDefault,senderName:A.senderName??"",senderTitle:A.senderTitle??"",company:A.company??"",address:A.address??"",email:A.email??"",phone:A.phone??"",whatsapp:A.whatsapp??"",wechat:A.wechat??"",line:A.line??"",telegram:A.telegram??"",zalo:A.zalo??"",viber:A.viber??"",kakao:A.kakao??"",linkedin:A.linkedin??"",xing:A.xing??""}),f(A.id),h(!1)};v.useEffect(()=>{!s||y||(s.length>0&&S(s[0]??null),j(!0))},[s,y]);const N=q.gateway.signatures.save.useMutation({onSuccess:A=>
693{o.gateway.signatures.list.invalidate(),o.gateway.signatures.forCampaign.invalidate(),o.gateway.send.preflight.invalidate(),o.gateway.send.previews.invalidate(),S(A),X.success("서명 프로필을 저장했습니다. 해당 국가 문안에 자동으로 적용됩니다.")},onError:A=>X.error(A.message)}),w=q.gateway.signatures.delete.useMutation({onSuccess:()=>{o.gateway.signatures.list.invalidate(),S(null),X.success("서명 프로필을 삭제했습니다.")},onError:A=>X.error(A.message)}),T=l3(u.email),k=(i??[]).find(A=>A.iso2===u.iso2),E=Mz(u.iso2==="_global"?null:u.iso2,k?.channel),z=new Set(E),_=Gf.filter(A=>z.has(A.key)),R=Gf.filter(A=>!z.has(A.key)),P=R.filter(A=>{const V=r?.[A.key];return u[A.key].trim()||typeof V=="string"&&V.trim()}).length;return e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:108",className:t?"space-y-5":"page-shell max-w-6xl",children:[!t&&e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:109",children:[e.jsx("p",{"data-loc":"client/src/pages/SignatureProfiles.tsx:110",className:"page-kicker",children:"Localized Identity"}),e.jsxs("h1",{"data-loc":"client/src/pages/SignatureProfiles.tsx:111",className:"page-heading mt-1 flex items-center gap-2",children:[e.jsx(Ha,{"data-loc":"client/src/pages/SignatureProfiles.tsx:111",className:"size-6 text-primary"})," 국가별 서명"]}),e.jsx("p",{"data-loc":"client/src/pages/SignatureProfiles.tsx:112",className:"mt-1.5 text-sm text-muted-foreground",children:"서명 1·서명 2를 미리 만들어 두면, 캠페인 국가에 맞는 이름·메신저가 문안부터 자동으로 채워집니다."})]}),c?e.jsx(we,{"data-loc":"client/src/pages/SignatureProfiles.tsx:114",className:"h-96 rounded-2xl"}):e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:114",className:"grid items-start gap-5 lg:grid-cols-[260px_minmax(0,1fr)]",children:[e.jsxs("aside",{"data-loc":"client/src/pages/SignatureProfiles.tsx:115",className:"space-y-2 rounded-2xl border border-border/80 bg-card/96 p-3 shadow-[0_16px_40px_-34px_rgba(18,35,61,.5)] lg:sticky lg:top-6",children:[e.jsxs(G,{"data-loc":"client/src/pages/SignatureProfiles.tsx:116",variant:"outline",className:"w-full justify-start gap-2",onClick:()=>S(null),children:[e.jsx(oA,{"data-loc":"client/src/pages/SignatureProfiles.tsx:116",className:"size-4"})," 새 서명 만들기"]}),(s??[]).map(A=>e.jsxs("button",{"data-loc":"client/src/pages/SignatureProfiles.tsx:117",onClick:()=>S(A),className:`w-full rounded-lg border px-3 py-2.5 text-left text-sm transition-colors ${p===A.id?"border-primary bg-primary/5":"border-transparent hover:bg-muted"}`,children:[e.jsx("span",{"data-loc":"client/src/pages/SignatureProfiles.tsx:118",className:"block font-semibold",children:A.name}),e.jsxs("span",{"data-loc":"client/src/pages/SignatureProfiles.tsx:119",className:"mt-0.5 block text-xs text-muted-foreground",children:[A.iso2??"모든 국가",A.language?` · ${A.language}`:"",A.isDefault?" · 기본":""]})]},A.id)),(s?.length??0)===0&&e.jsxs("p",{"data-loc":"client/src/pages/SignatureProfiles.tsx:121",className:"px-2 py-5 text-xs leading-relaxed text-muted-foreground",children:["아직 국가별 서명이 없습니다. 예: ",e.jsx("b",{"data-loc":"client/src/pages/SignatureProfiles.tsx:121",children:"중국용 서명"}),"을 만들고 국가를 중국으로 지정하세요."]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:123",className:"space-y-5 rounded-2xl border border-border/80 bg-card/96 p-5 shadow-[0_20px_50px_-36px_rgba(18,35,61,.56)] md:p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:124",className:"grid gap-4 sm:grid-cols-3",children:[e.jsx(Xd,{"data-loc":"client/src/pages/SignatureProfiles.tsx:125",label:"서명 이름",value:u.name,onChange:A=>m(V=>({...V,name:A})),placeholder:"예: 중국용 서명"}),e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:126",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/SignatureProfiles.tsx:126",children:"적용 국가"}),e.jsxs(et,{"data-loc":"client/src/pages/SignatureProfiles.tsx:126",value:u.iso2,onValueChange:A=>m(V=>({...V,iso2:A})),children:[e.jsx(at,{"data-loc":"client/src/pages/SignatureProfiles.tsx:126",children:e.jsx(tt,{"data-loc":"client/src/pages/SignatureProfiles.tsx:126"})}),e.jsxs(st,{"data-loc":"client/src/pages/SignatureProfiles.tsx:126",children:[e.jsx(ve,{"data-loc":"client/src/pages/SignatureProfiles.tsx:126",value:"_global",children:"모든 국가 (기본)"}),(i??[]).map(A=>e.jsxs(ve,{"data-loc":"client/src/pages/SignatureProfiles.tsx:126",value:A.iso2,children:[A.countryNameKo," (",A.iso2,")"]},A.iso2))]})]})]}),e.jsx(Xd,{"data-loc":"client/src/pages/SignatureProfiles.tsx:127",label:"언어 표기",value:u.language,onChange:A=>m(V=>({...V,language:A})),placeholder:"예: 中文 / English"})]}),e.jsxs("label",{"data-loc":"client/src/pages/SignatureProfiles.tsx:129",className:"flex items-center gap-2 text-sm",children:[e.jsx($a,{"data-loc":"client/src/pages/SignatureProfiles.tsx:129",checked:u.isDefault,onCheckedChange:A=>m(V=>({...V,isDefault:A===!0}
693))})," 국가별 서명이 없을 때 이 서명을 기본으로 사용"]}),e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:130",className:"rounded-xl border border-sky-200 bg-sky-50/80 p-4 text-sm leading-relaxed text-sky-900",children:["비어 있는 항목은 ",e.jsx("b",{"data-loc":"client/src/pages/SignatureProfiles.tsx:131",children:"기본 발신자 정보"}),"를 자동으로 사용합니다. 이 국가에서만 다르게 쓸 값이 있을 때 입력하세요."]}),e.jsx("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:133",className:"grid gap-4 sm:grid-cols-2",children:Rz.map(([A,V,H])=>e.jsx(Xd,{"data-loc":"client/src/pages/SignatureProfiles.tsx:133",label:V,value:u[A],onChange:M=>m(B=>({...B,[A]:M})),hint:H,inheritedValue:typeof r?.[A]=="string"?r[A]??"":""},A))}),e.jsx("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:135",className:"rounded-2xl border border-primary/20 bg-[linear-gradient(135deg,rgba(239,246,255,.94),rgba(236,254,255,.78))] p-4 shadow-[0_14px_36px_-32px_rgba(37,99,235,.42)]",children:e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:136",className:"flex items-start gap-2.5",children:[e.jsx(Ag,{"data-loc":"client/src/pages/SignatureProfiles.tsx:137",className:"mt-0.5 size-4 shrink-0 text-primary"}),e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:138",children:[e.jsx("p",{"data-loc":"client/src/pages/SignatureProfiles.tsx:139",className:"text-sm font-semibold",children:k?`${k.countryNameKo} 권장 연락 수단`:"기본 서명 연락 수단"}),e.jsx("p",{"data-loc":"client/src/pages/SignatureProfiles.tsx:142",className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:k?.channel?k.channel:"국가가 정해지지 않은 기본 서명은 이메일·전화만 먼저 보여줍니다."}),e.jsx("p",{"data-loc":"client/src/pages/SignatureProfiles.tsx:147",className:"mt-1.5 text-xs font-medium text-primary",children:"문안에는 아래 권장 수단 중 실제로 입력한 값만 들어갑니다."})]})]})}),e.jsx("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:152",className:"grid gap-4 sm:grid-cols-2",children:_.map(A=>e.jsx(r2,{"data-loc":"client/src/pages/SignatureProfiles.tsx:153",channelKey:A.key,label:A.label,hint:A.key==="email"?"여러 주소는 / 또는 쉼표로 구분":A.hint,form:u,baseProfile:r,setForm:m,invalid:A.key==="email"&&!!T},A.key))}),e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:156",className:"rounded-lg border border-dashed p-3",children:[e.jsxs(G,{"data-loc":"client/src/pages/SignatureProfiles.tsx:157",type:"button",variant:"ghost",className:"h-auto w-full justify-between px-1 py-1 text-sm",onClick:()=>h(A=>!A),children:[e.jsxs("span",{"data-loc":"client/src/pages/SignatureProfiles.tsx:158",children:["다른 연락 수단 추가",P>0?` · 저장된 값 ${P}개`:""]}),b?e.jsx(bN,{"data-loc":"client/src/pages/SignatureProfiles.tsx:159",className:"size-4"}):e.jsx(ns,{"data-loc":"client/src/pages/SignatureProfiles.tsx:159",className:"size-4"})]}),b&&e.jsx("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:161",className:"mt-3 grid gap-4 border-t pt-4 sm:grid-cols-2",children:R.map(A=>e.jsx(r2,{"data-loc":"client/src/pages/SignatureProfiles.tsx:162",channelKey:A.key,label:A.label,hint:A.hint,form:u,baseProfile:r,setForm:m,invalid:!1},A.key))})]}),T&&e.jsx("p",{"data-loc":"client/src/pages/SignatureProfiles.tsx:165",className:"text-sm text-destructive",children:T}),e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:166",className:"flex flex-wrap justify-between gap-2 border-t pt-4",children:[e.jsx("p",{"data-loc":"client/src/pages/SignatureProfiles.tsx:166",className:"text-xs leading-relaxed text-muted-foreground",children:"문안에서 [WeChat]·[WhatsApp]처럼 필요한 자리만 이 서명 값으로 채워집니다."}),e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:166",className:"flex gap-2",children:[u.id&&e.jsxs(G,{"data-loc":"client/src/pages/SignatureProfiles.tsx:166",variant:"outline",className:"text-destructive",disabled:w.isPending,onClick:()=>w.mutate({id:u.id}),children:[e.jsx(Hs,{"data-loc":"client/src/pages/SignatureProfiles.tsx:166",className:"mr-1.5 size-4"})," 삭제"]}),e.jsxs(G,{"data-loc":"client/src/pages/SignatureProfiles.tsx:166",disabled:!u.name.trim()||!!T||N.isPending,onClick:()=>N.mutate({...u,iso2:u.iso2==="_global"?null:u.iso2,language:u.language||null}),children:[e.jsx(Et,{"data-loc":"client/src/pages/SignatureProfiles.tsx:166",className:"mr-1.5 size-4"})," 저장"]})]})]})]})]})]})}function Xd({label:t,value:s,onChange:c,hint:r,placeholder:i,inheritedValue:o,invalid:u}){const m=!s.trim()&&o?.trim();return e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:174",className:"space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/SignatureProfiles.tsx:174",className:"flex items-center justify-between gap-2",children:[e.jsx(_e,{"data-loc":"client/src/pages/SignatureProfiles.tsx:174",children:t}),m&&e.jsx("span",{"data-loc":"client/src/pages/SignatureProfiles.tsx:174",className:"rounded-full bg-sky-100 px-2 py-0.5 text-[10px] font-semibold text-sky-700",children:"기본값 사용"})]}),e.jsx(Ce,{"data-loc":"client/src/pages/SignatureProfiles.tsx:174",value:s,onChange:p=>c(p.target.value),placeholder:o?.trim()||i||r,"aria-invalid":u}),m?e.jsxs("p",{"data-loc":"client/src/pages/SignatureProfiles.tsx:174",className:"truncate text-xs text-sky-700",children:["적용값: ",o]}):r&&e.jsx("p",{"data-loc":"client/src/pages/SignatureProfiles.tsx:174",className:"text-xs text-muted-foreground",children:r})]})}
693function r2({channelKey:t,label:s,hint:c,form:r,baseProfile:i,setForm:o,invalid:u}){const m=typeof i?.[t]=="string"?i[t]:"";return e.jsx(Xd,{"data-loc":"client/src/pages/SignatureProfiles.tsx:179",label:s,value:r[t],onChange:p=>o(f=>({...f,[t]:p})),hint:c,inheritedValue:m,invalid:u})}function l2(t,s){return new URLSearchParams(s).get("section")==="countries"||t==="/signatures"?"countries":"base"}function zz(){const[t,s]=Pn(),c=HN(),[r,i]=v.useState(()=>l2(t,c));v.useEffect(()=>{i(l2(t,c))},[t,c]);const o=u=>{const m=u;i(m),s(`/signature-management?section=${m}`)};return e.jsxs("div",{"data-loc":"client/src/pages/SignatureManagement.tsx:32",className:"page-shell max-w-6xl",children:[e.jsxs("div",{"data-loc":"client/src/pages/SignatureManagement.tsx:33",children:[e.jsx("p",{"data-loc":"client/src/pages/SignatureManagement.tsx:34",className:"page-kicker",children:"Sender Identity Management"}),e.jsxs("h1",{"data-loc":"client/src/pages/SignatureManagement.tsx:35",className:"page-heading mt-1 flex items-center gap-2",children:[e.jsx(lu,{"data-loc":"client/src/pages/SignatureManagement.tsx:36",className:"size-6 text-primary"}),"서명 관리"]}),e.jsx("p",{"data-loc":"client/src/pages/SignatureManagement.tsx:39",className:"mt-1.5 text-sm leading-relaxed text-muted-foreground",children:"모든 국가에 쓰는 기본 발신자 정보와 캠페인 국가에 자동 적용할 현지 서명을 한곳에서 관리합니다. 저장 구조와 문안·미리보기·발송 연결은 기존과 동일하게 유지됩니다."})]}),e.jsxs($S,{"data-loc":"client/src/pages/SignatureManagement.tsx:45",value:r,onValueChange:o,className:"space-y-5",children:[e.jsxs(qS,{"data-loc":"client/src/pages/SignatureManagement.tsx:46",className:"grid h-auto w-full max-w-xl grid-cols-2 rounded-xl border border-border/80 bg-white/76 p-1.5 shadow-[0_14px_34px_-30px_rgba(18,35,61,.5)]",children:[e.jsxs(xn,{"data-loc":"client/src/pages/SignatureManagement.tsx:47",value:"base",className:"gap-2 rounded-lg py-2.5",children:[e.jsx(lu,{"data-loc":"client/src/pages/SignatureManagement.tsx:48",className:"size-4"})," 기본 발신자 정보"]}),e.jsxs(xn,{"data-loc":"client/src/pages/SignatureManagement.tsx:50",value:"countries",className:"gap-2 rounded-lg py-2.5",children:[e.jsx(Ha,{"data-loc":"client/src/pages/SignatureManagement.tsx:51",className:"size-4"})," 국가별 서명 프로필"]})]}),e.jsx(fn,{"data-loc":"client/src/pages/SignatureManagement.tsx:55",value:"base",className:"mt-0",children:e.jsx(Az,{"data-loc":"client/src/pages/SignatureManagement.tsx:56",embedded:!0})}),e.jsx(fn,{"data-loc":"client/src/pages/SignatureManagement.tsx:58",value:"countries",className:"mt-0",children:e.jsx(Oz,{"data-loc":"client/src/pages/SignatureManagement.tsx:59",embedded:!0})})]})]})}const Lz=Ou("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Bz({className:t,variant:s,...c}){return e.jsx("div",{"data-loc":"client/src/components/ui/alert.tsx:28","data-slot":"alert",role:"alert",className:Ne(Lz({variant:s}),t),...c})}function Uz({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/alert.tsx:39","data-slot":"alert-title",className:Ne("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...s})}function Iz({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/alert.tsx:55","data-slot":"alert-description",className:Ne("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...s})}const Hz={host:"",port:"587",username:"",displayName:""};function $z(){const t=q.useUtils(),{data:s,isLoading:c}=q.gateway.smtp.get.useQuery(),[r,i]=v.useState(Hz),[o,u]=v.useState("40"),[m,p]=v.useState(!1);v.useEffect(()=>{!s||m||(i({host:s.host,port:String(s.port),username:s.username,displayName:s.displayName??""}),u(String(s.dailySendLimit??40)),p(!0))},[s,m]);const f=q.gateway.smtp.save.useMutation({onSuccess:()=>{t.gateway.smtp.get.invalidate(),X.success("SMTP 서버 정보를 저장했습니다. 이제 연결 시험을 실행하세요.")},onError:w=>X.error(w.message)}),b=q.gateway.smtp.verify.useMutation({onSuccess:w=>{t.gateway.smtp.get.invalidate(),w.ok?X.success("SMTP 서버 연결과 인증을 확인했습니다. 실제 메일을 보낼 수 있습니다."):X.error(w.message??"SMTP 연결에 실패했습니다.")},onError:w=>X.error(w.message)}),h=q.gateway.smtp.updateDailyLimit.useMutation({onSuccess:w=>{t.gateway.smtp.get.invalidate(),u(String(w?.dailySendLimit??40)),X.success(`하루 발송 상한을 ${w?.dailySendLimit??40}통으로 저장했습니다.`)},onError:w=>X.error(w.message)}),y=s?.status??"unverified",j=y==="verified",S=r.host.trim().length>=3&&Number(r.port)>=1&&r.username.includes("@"),N=(w,T)=>i(k=>({...k,[w]:T}));return c?e.jsx(we,{"data-loc":"client/src/pages/SMTPSettings.tsx:62",className:"h-72 w-full"}):e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:65",className:"page-shell max-w-4xl",children:[e.jsx("section",{"data-loc":"client/src/pages/SMTPSettings.tsx:66",className:"rounded-2xl border border-border/80 bg-card/96 p-6 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)]",children:e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:67",className:"flex items-start gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/SMTPSettings.tsx:68",className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary",children:e.jsx(PA,{"data-loc":"client/src/pages/SMTPSettings.tsx:69",className:"size-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:71",children:[e.jsx("p",{"data-loc":"client/src/pages/SMTPSettings.tsx:72",className:"text-xs font-semibold tracking-wide text-primary",children:"OUTBOUND MAIL"}),e.jsx("h1",{"data-loc":"client/src/pages/SMTPSettings.tsx:73",className:"mt-1 text-2xl font-bold tracking-tight",children:"SMTP 발송 설정"}),e.jsxs("p",{"data-loc":"client/src/pages/SMTPSettings.tsx:74",className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:["실제 콜드메일은 이 서버를 통해 ",e.jsx("strong",{"data-loc":"client/src/pages/SMTPSettings.tsx:75",className:"font-medium text-foreground",children:"한 수신자씩"})," 나갑니다. 비밀번호는 화면이나 DB에 저장되지 않고, 안전하게 등록된 앱 비밀번호만 사용합니다."]})]})]})}),e.jsxs("section",{"data-loc":"client/src/pages/SMTPSettings.tsx:82",className:"rounded-2xl border border-border/80 bg-card/96 p-6 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)]",children:[e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:83",className:"mb-5 flex items-center justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:84",children:[e.jsx("h2",{"data-loc":"client/src/pages/SMTPSettings.tsx:85",className:"font-semibold",children:"서버 정보"}),e.jsx("p",{"data-loc":"client/src/pages/SMTPSettings.tsx:86",className:"mt-1 text-sm text-muted-foreground",children:"변경하면 연결 상태가 다시 확인 필요로 바뀝니다."})]}),e.jsx(qz,{"data-loc":"client/src/pages/SMTPSettings.tsx:88",status:y})]}),e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:90",className:"grid gap-4 md:grid-cols-3",children:[e.jsx(Bd,{"data-loc":"client/src/pages/SMTPSettings.tsx:91",label:"SMTP 서버",value:r.host,onChange:w=>N("host",w),placeholder:"smtp.gmail.com"}),e.jsx(Bd,{"data-loc":"client/src/pages/SMTPSettings.tsx:92",label:"포트",value:r.port,onChange:w=>N("port",w),placeholder:"587",inputMode:"numeric"}),e.jsx(Bd,{"data-loc":"client/src/pages/SMTPSettings.tsx:93",label:"발신 계정",value:r.username,onChange:w=>N("username",w),placeholder:"[email protected]"}),e.jsx("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:94",className:"md:col-span-3",children:e.jsx(Bd,{"data-loc":"client/src/pages/SMTPSettings.tsx:95",label:"발신 표시 이름 (선택)",value:r.displayName,onChange:w=>N("displayName",w),placeholder:"YS Medi Global Partnership"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:98",className:"mt-5 flex flex-wrap gap-2",children:[e.jsxs(G,{"data-loc":"client/src/pages/SMTPSettings.tsx:99",disabled:!S||f.isPending,onClick:()=>f.mutate({host:r.host.trim(),port:Number(r.port),username:r.username.trim(),displayName:r.displayName.trim()||void 0}),children:[f.isPending&&e.jsx(jt,{"data-loc":"client/src/pages/SMTPSettings.tsx:103",className:"mr-2 size-4 animate-spin"}),"서버 정보 저장"]}),e.jsxs(G,{"data-loc":"client/src/pages/SMTPSettings.tsx:106",variant:"outline",disabled:!s||b.isPending||f.isPending,onClick:()=>b.mutate(),children:[b.isPending?e.jsx(jt,{"data-loc":"client/src/pages/SMTPSettings.tsx:107",className:"mr-2 size-4 animate-spin"}):e.jsx(TN,{"data-loc":"client/src/pages/SMTPSettings.tsx:107",className:"mr-2 size-4"}),"실제 전송 없이 연결 시험"]})]})]}),e.jsx("section",{"data-loc":"client/src/pages/SMTPSettings.tsx:113",className:"rounded-2xl border border-border/80 bg-card/96 p-6 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)]",children:e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:114",className:"flex flex-col justify-between gap-4 sm:flex-row sm:items-end",children:[e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:115",children:[e.jsx("h2",{"data-loc":"client/src/pages/SMTPSettings.tsx:116",className:"font-semibold",children:"하루 발송 상한"}),e.jsxs("p",{"data-loc":"client/src/pages/SMTPSettings.tsx:117",className:"mt-1 max-w-xl text-sm leading-relaxed text-muted-foreground",children:["새 발신 계정은 ",e.jsx("strong",{"data-loc":"client/src/pages/SMTPSettings.tsx:118",className:"font-medium text-foreground",children:"40통/일"}),"이 기본입니다. 100통을 설정해도 한 번에 발송되지 않으며, 발송 탭에서 지정한 3~15분 간격과 업무 시간을 지킵니다. 한도에 닿으면 남은 예약은 다음 영업일로 이월됩니다."]})]}),e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:121",className:"flex w-full gap-2 sm:w-auto",children:[e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:122",className:"min-w-32 space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/SMTPSettings.tsx:122",htmlFor:"daily-limit",children:"하루 최대 통수"}),e.jsx(Ce,{"data-loc":"client/src/pages/SMTPSettings.tsx:122",id:"daily-limit",type:"number",min:20,max:100,value:o,onChange:w=>u(w.target.value)})]}),e.jsxs(G,{"data-loc":"client/src/pages/SMTPSettings.tsx:123",className:"mt-auto",variant:"outline",disabled:!s||h.isPending||Number(o)<20||Number(o)>100,onClick:()=>h.mutate({dailySendLimit:Number(o)}),children:[h.isPending&&e.jsx(jt,{"data-loc":"client/src/pages/SMTPSettings.tsx:124",className:"mr-2 size-4 animate-spin"}),"상한 저장"]})]})]})}),e.jsxs(Bz,{"data-loc":"client/src/pages/SMTPSettings.tsx:130",className:j?"border-emerald-200 bg-emerald-50":"border-amber-200 bg-amber-50",children:[j?e.jsx(Dn,{"data-loc":"client/src/pages/SMTPSettings.tsx:131",className:"size-4 text-emerald-700"}):e.jsx(js,{"data-loc":"client/src/pages/SMTPSettings.tsx:131",className:"size-4 text-amber-700"}),e.jsx(Uz,{"data-loc":"client/src/pages/SMTPSettings.tsx:132",children:j?"SMTP 연결이 확인되었습니다":"SMTP 연결 시험이 필요합니다"}),e.jsx(Iz,{"data-loc":"client/src/pages/SMTPSettings.tsx:133",className:"mt-1 leading-relaxed",children:j?`${s?.lastVerifiedAt?new Date(s.lastVerifiedAt).toLocaleStr
693ing("ko-KR"):"방금"}에 서버 인증을 확인했습니다. 발송 탭에서 최종 확인 후 실제 메일을 보낼 수 있습니다.`:s?.lastError||"서버 정보를 저장한 뒤 '실제 전송 없이 연결 시험'을 누르세요. 수신자에게 메일은 나가지 않습니다."})]}),e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:140",className:"rounded-2xl border border-dashed p-5 text-sm leading-relaxed text-muted-foreground",children:[e.jsxs("p",{"data-loc":"client/src/pages/SMTPSettings.tsx:141",className:"flex items-center gap-2 font-semibold text-foreground",children:[e.jsx(bA,{"data-loc":"client/src/pages/SMTPSettings.tsx:141",className:"size-4"})," 앱 비밀번호 안내"]}),e.jsx("p",{"data-loc":"client/src/pages/SMTPSettings.tsx:142",className:"mt-2",children:"Google Workspace는 일반 로그인 비밀번호 대신 앱 비밀번호를 씁니다. 새 앱 비밀번호가 필요하면 관리 화면의 비밀값 입력란에서 교체할 수 있으며, 이 페이지에는 절대 표시되지 않습니다."})]})]})}function Bd({label:t,value:s,onChange:c,placeholder:r,inputMode:i}){return e.jsxs("div",{"data-loc":"client/src/pages/SMTPSettings.tsx:149",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/SMTPSettings.tsx:149",children:t}),e.jsx(Ce,{"data-loc":"client/src/pages/SMTPSettings.tsx:149",value:s,onChange:o=>c(o.target.value),placeholder:r,inputMode:i})]})}function qz({status:t}){const s=t==="verified"?{label:"연결 확인됨",className:"bg-emerald-50 text-emerald-700 border-emerald-200"}:t==="failed"?{label:"연결 실패",className:"bg-rose-50 text-rose-700 border-rose-200"}:{label:"연결 확인 필요",className:"bg-amber-50 text-amber-800 border-amber-200"};return e.jsxs("span",{"data-loc":"client/src/pages/SMTPSettings.tsx:158",className:`inline-flex items-center gap-1 rounded-full border px-2.5 py-1 text-xs font-medium ${s.className}`,children:[e.jsx(Jt,{"data-loc":"client/src/pages/SMTPSettings.tsx:158",className:"size-3"}),s.label]})}function Ud(t){return t===null?"—":`${t.toFixed(1)}%`}const Qz={insufficient:{icon:St,tone:"border-amber-200 bg-amber-50 text-amber-900",badge:"border-amber-300 bg-amber-100 text-amber-900"},healthy:{icon:Jt,tone:"border-emerald-200 bg-emerald-50 text-emerald-900",badge:"border-emerald-300 bg-emerald-100 text-emerald-900"},caution:{icon:kN,tone:"border-orange-200 bg-orange-50 text-orange-900",badge:"border-orange-300 bg-orange-100 text-orange-900"},risk:{icon:MA,tone:"border-rose-200 bg-rose-50 text-rose-900",badge:"border-rose-300 bg-rose-100 text-rose-900"}},Wz={idle:"대기",preparing:"자동 준비 중",approval_required:"최종 승인 대기",approved:"승인 완료",scheduled:"발송 예약",running:"자동 발송 중",completed:"완료",failed:"확인 필요",cancelled:"취소"};function Vz(){const t=q.gateway.stats.delivery.useQuery(),s=q.gateway.automation.dashboard.useQuery();if(t.isLoading||s.isLoading)return e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:52",className:"page-shell",children:[e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:53",children:[e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:54",className:"page-kicker",children:"Automation Operations"}),e.jsx("h1",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:55",className:"page-heading mt-1",children:"자동화 운영현황"}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:56",className:"mt-1 text-sm text-muted-foreground",children:"후보 조사 → 사장님 승인 → 현지시간 발송 → 회신 Slack 알림 데이터를 불러오고 있습니다."})]}),e.jsx(Bt,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:58",className:"border-sky-200 bg-sky-50/70",children:e.jsxs($t,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:58",className:"flex items-center gap-3 p-4 text-sm text-sky-900",children:[e.jsx(o1,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:58",className:"size-5 animate-spin"}),e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:58",children:[e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:58",className:"font-semibold",children:"운영 상태를 확인하는 중입니다"}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:58",className:"mt-0.5 text-xs text-sky-800/80",children:"발송 작업을 새로 만들지 않고 현재 상태만 읽습니다."})]})]})}),e.jsx("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:59",className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-5",children:Array.from({length:5}).map((p,f)=>e.jsx(we,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:59",className:"h-28 rounded-xl"},f))}),e.jsx(we,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:60",className:"h-64 roun
693ded-xl"})]});if(t.isError||s.isError||!t.data||!s.data)return e.jsx("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:64",className:"rounded-xl border border-rose-200 bg-rose-50 p-5 text-sm text-rose-900",children:"자동화 운영 데이터를 불러오지 못했습니다. 잠시 후 다시 시도해 주세요."});const c=t.data,r=s.data,i=Qz[c.reputation.status],o=i.icon,u=[{label:"자동 준비",value:r.stages.preparing,detail:"후보·컬쳐핏·문안",icon:An,tone:"text-sky-700 bg-sky-50"},{label:"사장님 승인",value:r.stages.approvalRequired,detail:"1차 문안 최종 확인",icon:Dg,tone:"text-amber-700 bg-amber-50"},{label:"예약·발송",value:r.stages.scheduled+r.stages.running,detail:"현지시간 분산 발송",icon:_A,tone:"text-violet-700 bg-violet-50"},{label:"완료",value:r.stages.completed,detail:"회신 감지 계속",icon:Dn,tone:"text-emerald-700 bg-emerald-50"},{label:"확인 필요",value:r.stages.failed,detail:"오류·평판 자동 중지",icon:St,tone:"text-rose-700 bg-rose-50"}],m=[{label:"SMTP 수락",value:c.totals.accepted,icon:Dn,tone:"text-emerald-700"},{label:"전송 실패",value:c.totals.failed,icon:Tg,tone:"text-rose-700"},{label:"반송",value:c.totals.bounced,icon:kN,tone:"text-orange-700"},{label:"수신 거부",value:c.totals.unsubscribed,icon:PN,tone:"text-amber-700"},{label:"일반 회신",value:c.totals.replies,icon:EA,tone:"text-sky-700"},{label:"Slack 전달 대기",value:r.totals.slackPending+r.totals.slackFailed,icon:Af,tone:"text-violet-700"}];return e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:88",className:"page-shell",children:[e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:89",className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:90",children:[e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:91",className:"page-kicker",children:"Automation Operations"}),e.jsx("h1",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:92",className:"page-heading mt-1",children:"자동화 운영현황"}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:93",className:"mt-1 text-sm text-muted-foreground",children:"후보 조사부터 사장님 승인, 현지시간 발송, 회신 Slack 알림까지 한눈에 확인합니다."})]}),e.jsxs(ct,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:95",variant:"outline",className:"bg-card",children:["캠페인 ",r.totals.campaigns,"개 · 자동 회신 없음"]})]}),e.jsxs(Bt,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:98",className:"overflow-hidden border-slate-200 bg-[linear-gradient(135deg,#0f172a,#172554)] text-white shadow-[0_24px_54px_-34px_rgba(15,23,42,.75)]",children:[e.jsxs(xs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:99",className:"pb-3",children:[e.jsxs(fs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:100",className:"flex items-center gap-2 text-base",children:[e.jsx(sA,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:100",className:"size-5 text-sky-300"}),"1회 승인 자동화 흐름"]}),e.jsx(gs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:101",className:"text-slate-300",children:"시스템이 준비하고 사장님은 1차 문안을 한 번 승인합니다. 승인 전에는 발송 작업이 만들어지지 않습니다."})]}),e.jsx($t,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:103",className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-5",children:u.map(p=>{const f=p.icon;return e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:106",className:"rounded-2xl border border-white/10 bg-white/7 p-3.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:106",className:"flex items-center justify-between",children:[e.jsx("span",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:106",className:`rounded-xl p-2 ${p.tone}`,children:e.jsx(f,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:106",className:"size-4"})}),e.jsx("span",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:106",className:"tnum text-2xl font-bold",children:p.value})]}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:106",className:"mt-3 text-sm font-semibold",children:p.label}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:106",className:"mt-1 text-xs text-slate-300",children:p.detail})]},p.label)})})]}),e.jsxs(Bt,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:111",className:r.dynamicQuota.paused?"border-rose-200 bg-rose-50":"border-sky-200 bg-sky-50/70",children:[e.jsxs(xs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:112",className:"pb-3",children:[e.jsxs(fs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:113",className:"flex items-center gap-2 text-base",children:[e.jsx(mA,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:113",className:"size-5"}),"계정별 자동 발송 한도"]}),e.jsx(gs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:114",children:"Google 공급자 최대치가 아니라, 계정 워밍업과 최근 실패·반송·수신거부를 반영한 실제 운영 상한입니다."})]}),e.jsxs($t,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:116",className:"grid gap-4 lg:grid-cols-[auto_1fr] lg:items-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:117",className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[e.jsx(Id,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:118",label:"공급자 설정",value:`${r.dynamicQuota.providerDailyLimit}통`}),e.jsx(Id,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:119",label:"오늘 운영 상한",value:`${r.dynamicQuota.effectiveDailyLimit}통`,highlight:r.dynamicQuota.paused?"text-rose-700":"text-emerald-700"}),e.jsx(Id,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:120",label:"발송 간격",value:`${r.dynamicQuota.minIntervalMinutes}~${r.dynamicQuota.maxIntervalMinutes}분`}),e.jsx(Id,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:121",label:"오늘 남음",value:`${c.totals.dailyRemaining}통`})]}),e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:123",children:[e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:124",className:"flex flex-wrap gap-2",children:[e.jsx(ct,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:125",variant:"outline",className:"bg-white",children:r.dynamicQuota.label}),e.jsxs(ct,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:126",variant:"outline",className:r.smtp?.status==="verified"?"border-emerald-300 bg-emerald-50 text-emerald-800":"border-rose-300 bg-rose-50 text-rose-800",children:["SMTP ",r.smtp?.status==="verified"?"검증 완료":r.smtp?.status==="failed"?"연결 실패":"미등록·미검증"]})]}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:130",className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:r.dynamicQuota.reason}),r.smtp?.status!=="verified"&&e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:131",className:"mt-2 text-xs font-medium text-rose-700",children:"현재는 최종 승인을 눌러도 실제 발송이 시작되지 않습니다. SMTP 설정에서 연결 시험을 먼저 통과해야 합니다."}),r.smtp?.lastVerifiedAt&&e.jsxs("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:132",className:"mt-1 text-xs text-muted-foreground",children:["마지막 연결 확인 ",new Date(r.smtp.lastVerifiedAt).toLocaleStr
693ing()]})]})]})]}),e.jsxs(Bt,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:137",children:[e.jsxs(xs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:138",children:[e.jsx(fs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:138",className:"text-base",children:"캠페인 자동화 진행표"}),e.jsx(gs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:138",children:"오류가 생기면 자동 중지하고 원인을 표시합니다. 후보와 글로벌 DB는 캠페인 삭제와 분리됩니다."})]}),e.jsx($t,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:139",children:r.rows.length===0?e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:140",className:"py-10 text-center",children:[e.jsx(o1,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:140",className:"mx-auto size-6 text-muted-foreground"}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:140",className:"mt-3 text-sm font-medium",children:"진행 중인 캠페인이 없습니다"}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:140",className:"mt-1 text-xs text-muted-foreground",children:"캠페인을 만들면 후보 조사부터 승인 대기까지 자동으로 여기에 표시됩니다."}),e.jsx(G,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:140",className:"mt-4",variant:"outline",onClick:()=>{window.location.href="/campaigns/new"},children:"캠페인 만들기"})]}):e.jsx("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"overflow-x-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"w-full min-w-[920px] text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"border-b text-left text-xs text-muted-foreground",children:e.jsxs("tr",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",children:[e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"pb-2 font-medium",children:"캠페인"}),e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"pb-2 font-medium",children:"상태"}),e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"pb-2 text-right font-medium",children:"후보"}),e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"pb-2 text-right font-medium",children:"발송"}),e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"pb-2 text-right font-medium",children:"회신/Slack"}),e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"pb-2 font-medium",children:"다음 작업"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",children:r.rows.map(p=>e.jsxs("tr",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"border-b last:border-0",children:[e.jsxs("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"py-3",children:[e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"font-medium",children:p.name}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"text-xs text-muted-foreground",children:p.countryNameKo})]}),e.jsxs("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"py-3",children:[e.jsx(ct,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",variant:"outline",children:Wz[p.automationStatus]??p.automationStatus}),p.error&&e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"mt-1 max-w-56 text-xs text-rose-700",children:p.error})]}),e.jsxs("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"py-3 text-right tnum",children:[p.pendingCandidateCount,"/",p.candidateCount]}),e.jsx("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"py-3 text-right tnum",children:p.job?`${p.job.sentCount}/${p.job.targetCount}`:"—"}),e.jsxs("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"py-3 text-right tnum",children:[p.replies,"/",p.slackPending+p.slackFailed]}),e.jsx("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",className:"py-3",children:e.jsx(G,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:141",size:"sm",variant:"ghost",onClick:()=>
693{window.location.href=`/campaigns/${p.campaignId}`},children:"캠페인 열기"})})]},p.campaignId))})]})})})]}),e.jsxs(Bt,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:146",className:`border shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)] ${i.tone}`,children:[e.jsxs(xs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:147",className:"pb-3",children:[e.jsxs(fs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:147",className:"flex items-center gap-2 text-base",children:[e.jsx(o,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:147",className:"size-5"}),"도메인 발송 위험 신호"]}),e.jsx(gs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:147",className:"text-inherit/80",children:"Gmail 등의 공식 평판 점수가 아니라 이 플랫폼의 최근 30일 운영 지표입니다."})]}),e.jsxs($t,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:"grid gap-4 lg:grid-cols-[1fr_auto] lg:items-end",children:[e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",children:[e.jsx(ct,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:i.badge,children:c.reputation.label}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:"mt-3 max-w-2xl text-sm leading-relaxed",children:c.reputation.explanation})]}),e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:"grid grid-cols-2 gap-x-7 gap-y-2 text-sm sm:grid-cols-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",children:[e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:"text-xs opacity-70",children:"실패율"}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:"tnum font-semibold",children:Ud(c.reputation.failureRate)})]}),e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",children:[e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:"text-xs opacity-70",children:"반송률"}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:"tnum font-semibold",children:Ud(c.reputation.bounceRate)})]}),e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",children:[e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:"text-xs opacity-70",children:"수신 거부율"}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:"tnum font-semibold",children:Ud(c.reputation.unsubscribeRate)})]}),e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",children:[e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:"text-xs opacity-70",children:"회신율"}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:148",className:"tnum font-semibold",children:Ud(c.reputation.replyRate)})]})]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:151",className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:m.map(p=>{const f=p.icon;return e.jsx(Bt,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:151",className:"shadow-[0_14px_36px_-30px_rgba(18,35,61,.45)]",children:e.jsxs($t,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:151",className:"flex items-center gap-3 p-4",children:[e.jsx("span",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:151",className:`rounded-xl bg-muted p-2.5 ${p.tone}`,children:e.jsx(f,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:151",className:"size-4"})}),e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:151",children:[e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:151",className:"text-xs text-muted-foreground",children:p.label}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:151",className:"tnum text-xl font-bold",children:p.value})]})]})},p.label)})}),e.jsxs(Bt,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:153",children:[e.jsxs(xs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:154",children:[e.jsx(fs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:154",className:"text-base",children:"캠페인별 발송 이력"}),e.jsx(gs,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:154",children:"실제 SMTP 수락·실패와 회신·반송·수신거부가 있는 캠페인만 표시합니다."})]}),e.jsx($t,{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",children:c.byCampaign.length===0?e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"py-8 text-center text-sm text-muted-foreground",children:"최근 30일 발송 이력이 아직 없습니다."}):e.jsx("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"overflow-x-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"w-full min-w-[680px] text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"border-b text-left text-xs text-muted-foreground",children:e.jsxs("tr",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",children:[e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"pb-2 font-medium",children:"캠페인"}),e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"pb-2 text-right font-medium",children:"수락"}),e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"pb-2 text-right font-medium",children:"실패"}),e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"pb-2 text-right font-medium",children:"반송"}),e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"pb-2 text-right font-medium",children:"수신 거부"}),e.jsx("th",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"pb-2 text-right font-medium",children:"회신"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",children:c.byCampaign.map(p=>e.jsxs("tr",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"border-b last:border-0",children:[e.jsxs("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"py-3",children:[e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"font-medium",children:p.name}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"text-xs text-muted-foreground",children:p.countryNameKo})]}),e.jsx("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"py-3 text-right tnum text-emerald-700",children:p.accepted}),e.jsx("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"py-3 text-right tnum text-rose-700",children:p.failed}),e.jsx("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"py-3 text-right tnum text-orange-700",children:p.bounced}),e.jsx("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"py-3 text-right tnum text-amber-700",children:p.unsubscribed}),e.jsx("td",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:155",className:"py-3 text-right tnum text-sky-700",children:p.replied})]},p.campaignId))})]})})})]})]})}function Id({label:t,value:s,highlight:c=""}){return e.jsxs("div",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:162",className:"rounded-xl border border-sky-100 bg-white/80 p-3",children:[e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:162",className:"text-xs text-muted-foreground",children:t}),e.jsx("p",{"data-loc":"client/src/pages/DeliveryDashboard.tsx:162",className:`mt-1 tnum text-lg font-bold ${c}`,children:s})]})}function Fz(){const{data:t,isLoading:s}=q.gateway.inbox.get.useQuery(),{data:c}=q.gateway.inbox.messages.useQuery(void 0,{refetchInterval:3e4}),r=q.useUtils(),[i,o]=v.useState(""),[u,m]=v.useState("imap.gmail.com"),[p,f]=v.useState("993");v.useEffect(()=>{t&&(o(t.setting?.email??t.suggestedEmail??""),m(t.setting?.host??"imap.gmail.com"),f(String(t.setting?.port??993)))},[t]);const b=()=>{r.gateway.inbox.get.invalidate(),r.gateway.inbox.messages.invalidate()},h=q.gateway.inbox.save.useMutation({onSuccess:()=>{b(),X.success("수신함 설정을 저장했습니다. 이제 연결 시험을 해주세요.")},onError:k=>X.error(k.message)}),y=q.gateway.inbox.verify.useMutation({onSuccess:()=>{b(),X.success("수신함 연결이 확인됐습니다. 5분마다 읽기 전용 동기화합니다.")},onError:k=>X.error(k.message)}),j=q.gateway.inbox.syncNow.useMutation({onSuccess:k=>{b(),X.success(`동기화 완료: 새 메시지 ${k.synced}건, 연결 ${k.matched}건`)},onError:k=>X.error(k.message)}),S=q.gateway.inbox.pause.useMutation({onSuccess:()=>{b(),X.success("수신함 자동 동기화를 일시정지했습니다.")},onError:k=>X.error(k.message)});if(s)return e.jsx(we,{"data-loc":"client/src/pages/InboxSettings.tsx:30",className:"h-64 roun
693ded-xl"});const w=t?.setting?.status==="verified"&&t?.setting?.enabled,T=!!(i&&t?.replyAddresses.includes(i.toLowerCase()));return e.jsxs("div",{"data-loc":"client/src/pages/InboxSettings.tsx:34",className:"page-shell max-w-5xl",children:[e.jsxs("div",{"data-loc":"client/src/pages/InboxSettings.tsx:35",children:[e.jsx("p",{"data-loc":"client/src/pages/InboxSettings.tsx:35",className:"page-kicker",children:"Inbox Operations"}),e.jsx("h1",{"data-loc":"client/src/pages/InboxSettings.tsx:35",className:"page-heading mt-1",children:"수신함 자동 동기화"}),e.jsx("p",{"data-loc":"client/src/pages/InboxSettings.tsx:35",className:"mt-1 text-sm text-muted-foreground",children:"새 회신을 읽어 플랫폼과 Slack에 알리기만 합니다. 자동 답장·자동 팔로업은 실행하지 않습니다."})]}),e.jsx(Bt,{"data-loc":"client/src/pages/InboxSettings.tsx:36",className:"border-sky-200 bg-[linear-gradient(135deg,rgba(240,249,255,.96),rgba(236,254,255,.8))] shadow-[0_18px_46px_-34px_rgba(14,165,233,.45)]",children:e.jsxs(xs,{"data-loc":"client/src/pages/InboxSettings.tsx:36",children:[e.jsxs(fs,{"data-loc":"client/src/pages/InboxSettings.tsx:36",className:"flex items-center gap-2 text-base text-sky-950",children:[e.jsx(Jt,{"data-loc":"client/src/pages/InboxSettings.tsx:36",className:"size-5"}),"읽기 전용 안전 장치"]}),e.jsx(gs,{"data-loc":"client/src/pages/InboxSettings.tsx:36",className:"text-sky-900",children:"첨부 파일은 내려받지 않고, 수신함 메시지에 대해 SMTP 발송 기능을 호출하지 않습니다. 언제든 즉시 일시정지할 수 있습니다."})]})}),e.jsxs(Bt,{"data-loc":"client/src/pages/InboxSettings.tsx:37",children:[e.jsxs(xs,{"data-loc":"client/src/pages/InboxSettings.tsx:37",children:[e.jsx(fs,{"data-loc":"client/src/pages/InboxSettings.tsx:37",className:"text-base",children:"동기화할 공용 수신함"}),e.jsxs(gs,{"data-loc":"client/src/pages/InboxSettings.tsx:37",children:["발신 SMTP와 같은 Google 앱 비밀번호를 사용합니다. 고객 답장이 이 수신함에도 도착하도록 ",e.jsx(rt,{"data-loc":"client/src/pages/InboxSettings.tsx:37",href:"/signature-management?section=base",className:"font-medium text-primary underline underline-offset-2",children:"서명 관리"}),"의 회신 주소에 이 이메일을 포함해야 합니다."]})]}),e.jsxs($t,{"data-loc":"client/src/pages/InboxSettings.tsx:37",className:"grid gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/InboxSettings.tsx:37",className:"grid gap-2",children:[e.jsx(_e,{"data-loc":"client/src/pages/InboxSettings.tsx:37",htmlFor:"inbox-email",children:"수신함 이메일"}),e.jsx(Ce,{"data-loc":"client/src/pages/InboxSettings.tsx:37",id:"inbox-email",type:"email",value:i,onChange:k=>o(k.target.value),placeholder:"[email protected]"})]}),e.jsxs("div",{"data-loc":"client/src/pages/InboxSettings.tsx:37",className:"grid gap-3 sm:grid-cols-[1fr_140px]",children:[e.jsxs("div",{"data-loc":"client/src/pages/InboxSettings.tsx:37",className:"grid gap-2",children:[e.jsx(_e,{"data-loc":"client/src/pages/InboxSettings.tsx:37",htmlFor:"inbox-host",children:"IMAP 서버"}),e.jsx(Ce,{"data-loc":"client/src/pages/InboxSettings.tsx:37",id:"inbox-host",value:u,onChange:k=>m(k.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/pages/InboxSettings.tsx:37",className:"grid gap-2",children:[e.jsx(_e,{"data-loc":"client/src/pages/InboxSettings.tsx:37",htmlFor:"inbox-port",children:"포트"}),e.jsx(Ce,{"data-loc":"client/src/pages/InboxSettings.tsx:37",id:"inbox-port",type:"number",value:p,onChange:k=>f(k.target.value)})]})]}),i&&!T&&e.jsxs("p",{"data-loc":"client/src/pages/InboxSettings.tsx:37",className:"rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-900",children:["아직 이 수신함 주소가 회신 주소에 없습니다. 저장은 가능하지만 연결 시험 전 ",e.jsx(rt,{"data-loc":"client/src/pages/InboxSettings.tsx:37",href:"/signature-management?section=base",className:"font-medium underline",children:"서명 관리"}),"에 추가하세요."]})," ",t?.setting?.lastError&&e.jsxs("p",{"data-loc":"client/src/pages/InboxSettings.tsx:37",className:"rounded-lg border border-rose-200 bg-rose-50 p-3 text-sm text-rose-900",children:["최근 오류: ",t.setting.lastError]}),e.jsxs("div",{"data-loc":"client/src/pages/InboxSettings.tsx:37",className:"flex flex-wrap gap-2",children:[e.jsx(G,{"data-loc":"client/src/pages/InboxSettings.tsx:37",variant:"outline",onClick:()=>h.mutate({email:i,host:u,port:Number(p)}),disabled:h.isPending||!i,children:"설정 저장"}),e.jsx(G,{"data-loc":"client/src/pages/InboxSettings.tsx:37",onClick:()=>y.mutate(),disabled:y.isPending||!T,children:y.isPending?"연결 시험 중":"연결 시험 후 자동 동기화 시작"}),w&&e.jsxs(e.Fragment,{children:[e.jsxs(G,{"data-loc":"client/src/pages/InboxSettings.tsx:37",variant:"outline",onClick:()=>j.mutate(),disabled:j.isPending,children:[e.jsx(vl,{"data-loc":"client/src/pages/InboxSettings.tsx:37",className:"mr-2 size-4"}),"지금 동기화"]}),e.jsxs(G,{"data-loc":"client/src/pages/InboxSettings.tsx:37",variant:"outline",onClick:()=>S.mutate(),disabled:S.isPending,children:[e.jsx(_N,{"data-loc":"client/src/pages/InboxSettings.tsx:37",className:"mr-2 size-4"}),"일시정지"]})]})]})]})]}),e.jsxs(Bt,{"data-loc":"client/src/pages/InboxSettings.tsx:38",children:[e.jsxs(xs,{"data-loc":"client/src/pages/InboxSettings.tsx:38",children:[e.jsxs(fs,{"data-loc":"client/src/pages/InboxSettings.tsx:38",className:"flex items-center gap-2 text-base",children:[e.jsx(Bu,{"data-loc":"client/src/pages/InboxSettings.tsx:38",className:"size-5"}),"최근 수신 메시지"]}),e.jsx(gs,{"data-loc":"client/src/pages/InboxSettings.tsx:38",children:"메시지 ID로 중복을 막고, 발신자·기존 발송 메시지 ID가 맞는 경우에만 후보·캠페인 회신으로 연결합니다."})]}),e.jsx($t,{"data-loc":"client/src/pages/InboxSettings.tsx:38",children:(c?.length??0)===0?e.jsx("p",{"data-loc":"client/src/pages/InboxSettings.tsx:38",className:"py-6 text-center text-sm text-muted-foreground",children:"아직 동기화된 수신 메시지가 없습니다."}):e.jsx("div",{"data-loc":"client/src/pages/InboxSettings.tsx:38",className:"divide-y",children:c.map(k=>e.jsxs("div",{"data-loc":"client/src/pages/InboxSettings.tsx:38",className:"py-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/InboxSettings.tsx:38",className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx("p",{"data-loc":"client/src/pages/InboxSettings.tsx:38",className:"font-medium text-sm",children:k.subject||"(제목 없음)"}),e.jsx("span",{"data-loc":"client/src/pages/InboxSettings.tsx:38",className:k.status==="matched"?"text-xs font-medium text-emerald-700":"text-xs font-medium text-muted-foreground",children:k.status==="matched"?"캠페인 회신 연결":k.status==="unmatched"?"연결 후보 없음":k.status})]}),e.jsxs("p",{"data-loc":"client/src/pages/InboxSettings.tsx:38",className:"mt-1 text-xs text-muted-foreground",children:[k.fromEmail||"발신자 미상"," · ",k.receivedAt?new Date(k.receivedAt).toLocaleStr
693ing("ko-KR"):"수신 시각 없음"," · Slack ",k.slackStatus==="sent"?"알림 완료":k.slackStatus]})]},k.id))})})]})]})}const pa="__all__";function Kz(){const[t,s]=v.useState(""),[c,r]=v.useState(pa),[i,o]=v.useState(pa),[u,m]=v.useState(pa),[p,f]=v.useState(null),[b,h]=v.useState(null),[y,j]=v.useState(null),S=v.useMemo(()=>({keyword:t.trim()||void 0,countryIso2:c===pa?void 0:c,productId:i===pa?void 0:Number(i),sequenceStep:u===pa?void 0:Number(u)}),[t,c,i,u]),{data:N,isPending:w}=q.gateway.templates.list.useQuery(S),{data:T}=q.gateway.products.list.useQuery(),k=N??[],{data:E}=q.gateway.templates.list.useQuery(void 0),z=E??[],_=v.useMemo(()=>{const P=new Map;for(const A of z)P.set(A.countryIso2,A.countryNameKo??A.countryIso2);return Array.from(P.entries()).sort((A,V)=>A[1].localeCompare(V[1],"ko"))},[z]),R=t.trim()||c!==pa||i!==pa||u!==pa;return e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:98",className:"page-shell max-w-6xl",children:[e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:99",className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:100",children:[e.jsx("p",{"data-loc":"client/src/pages/Templates.tsx:101",className:"page-kicker",children:"Draft Library"}),e.jsx("h1",{"data-loc":"client/src/pages/Templates.tsx:102",className:"page-heading mt-1",children:"문안 보관함"}),e.jsx("p",{"data-loc":"client/src/pages/Templates.tsx:103",className:"mt-1 text-sm text-muted-foreground",children:"완성한 문안을 모아 둡니다. 같은 나라에 다시 보낼 때, 또는 비슷한 시장에 처음 보낼 때 여기서 꺼내 쓰면 처음부터 쓰지 않아도 됩니다."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:108",className:"text-sm text-muted-foreground",children:["보관 ",z.length,"건"]})]}),e.jsx("div",{"data-loc":"client/src/pages/Templates.tsx:113",className:"rounded-2xl border border-border/80 bg-card/96 p-3 shadow-[0_16px_40px_-34px_rgba(18,35,61,.5)] sm:p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:114",className:"grid grid-cols-2 gap-2.5 lg:grid-cols-[minmax(260px,1fr)_160px_160px_144px_auto] lg:items-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:115",className:"relative col-span-2 w-full lg:col-span-1",children:[e.jsx(An,{"data-loc":"client/src/pages/Templates.tsx:116",className:"absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(Ce,{"data-loc":"client/src/pages/Templates.tsx:117",value:t,onChange:P=>s(P.target.value),placeholder:"이름이나 메모로 찾기",className:"h-10 pl-8"})]}),e.jsxs(et,{"data-loc":"client/src/pages/Templates.tsx:124",value:c,onValueChange:r,children:[e.jsx(at,{"data-loc":"client/src/pages/Templates.tsx:125",className:"h-10 w-full",children:e.jsx(tt,{"data-loc":"client/src/pages/Templates.tsx:126",placeholder:"국가"})}),e.jsxs(st,{"data-loc":"client/src/pages/Templates.tsx:128",children:[e.jsx(ve,{"data-loc":"client/src/pages/Templates.tsx:129",value:pa,children:"모든 국가"}),_.map(([P,A])=>e.jsx(ve,{"data-loc":"client/src/pages/Templates.tsx:131",value:P,children:A},P))]})]}),e.jsxs(et,{"data-loc":"client/src/pages/Templates.tsx:137",value:i,onValueChange:o,children:[e.jsx(at,{"data-loc":"client/src/pages/Templates.tsx:138",className:"h-10 w-full",children:e.jsx(tt,{"data-loc":"client/src/pages/Templates.tsx:139",placeholder:"제품"})}),e.jsxs(st,{"data-loc":"client/src/pages/Templates.tsx:141",children:[e.jsx(ve,{"data-loc":"client/src/pages/Templates.tsx:142",value:pa,children:"모든 제품"}),(T??[]).map(P=>e.jsx(ve,{"data-loc":"client/src/pages/Templates.tsx:144",value:String(P.id),children:P.name},P.id))]})]}),e.jsxs(et,{"data-loc":"client/src/pages/Templates.tsx:150",value:u,onValueChange:m,children:[e.jsx(at,{"data-loc":"client/src/pages/Templates.tsx:151",className:"col-span-2 h-10 w-full sm:col-span-1",children:e.jsx(tt,{"data-loc":"client/src/pages/Templates.tsx:152",placeholder:"순번"})}),e.jsxs(st,{"data-loc":"client/src/pages/Templates.tsx:154",children:[e.jsx(ve,{"data-loc":"client/src/pages/Templates.tsx:155",value:pa,children:"모든 순번"}),e.jsx(ve,{"data-loc":"client/src/pages/Templates.tsx:156",value:"
6930",children:"1차 메일"}),e.jsx(ve,{"data-loc":"client/src/pages/Templates.tsx:157",value:"1",children:"팔로업 1"}),e.jsx(ve,{"data-loc":"client/src/pages/Templates.tsx:158",value:"2",children:"팔로업 2"}),e.jsx(ve,{"data-loc":"client/src/pages/Templates.tsx:159",value:"3",children:"팔로업 3"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:162",className:"col-span-2 flex min-h-9 items-center justify-between gap-2 border-t border-border/60 pt-2 lg:col-span-1 lg:border-0 lg:pt-0",children:[e.jsxs("span",{"data-loc":"client/src/pages/Templates.tsx:163",className:"whitespace-nowrap text-xs text-muted-foreground tnum",children:["결과 ",k.length," / 전체 ",z.length,"건"]}),R&&e.jsxs(G,{"data-loc":"client/src/pages/Templates.tsx:165",variant:"ghost",size:"sm",className:"gap-1",onClick:()=>{s(""),r(pa),o(pa),m(pa)},children:[e.jsx(Mg,{"data-loc":"client/src/pages/Templates.tsx:176",className:"size-3.5"})," 초기화"]})]})]})}),w?e.jsx("div",{"data-loc":"client/src/pages/Templates.tsx:184",className:"grid gap-3 md:grid-cols-2",children:[0,1,2,3].map(P=>e.jsx(we,{"data-loc":"client/src/pages/Templates.tsx:186",className:"h-32 rounded-xl"},P))}):k.length===0?e.jsx(En,{"data-loc":"client/src/pages/Templates.tsx:190",icon:e.jsx(Ii,{"data-loc":"client/src/pages/Templates.tsx:191",className:"size-5"}),title:R?"조건에 맞는 문안이 없습니다":"아직 보관한 문안이 없습니다",description:R?"필터를 바꿔 다시 찾아보세요.":"캠페인 문안 탭에서 문안을 완성한 뒤 '보관함에 저장'을 누르면 여기에 쌓입니다."}):e.jsx("div",{"data-loc":"client/src/pages/Templates.tsx:200",className:"grid gap-3 md:grid-cols-2",children:k.map(P=>e.jsx(Gz,{"data-loc":"client/src/pages/Templates.tsx:202",row:P,onOpen:()=>f(P),onEdit:()=>h(P),onRemove:()=>j(P)},P.id))}),e.jsx(Yz,{"data-loc":"client/src/pages/Templates.tsx:213",row:p,onClose:()=>f(null)}),e.jsx(Xz,{"data-loc":"client/src/pages/Templates.tsx:214",row:b,onClose:()=>h(null)}),e.jsx(Zz,{"data-loc":"client/src/pages/Templates.tsx:215",row:y,onClose:()=>j(null)})]})}function Gz({row:t,onOpen:s,onEdit:c,onRemove:r}){const i=t.sequenceStep===0?"1차 메일":`팔로업 ${t.sequenceStep}`;return e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:233",className:"flex flex-col justify-between gap-3 rounded-2xl border border-border/80 bg-card/96 p-4 shadow-[0_14px_36px_-30px_rgba(18,35,61,.48)] transition-all hover:-translate-y-0.5 hover:shadow-[0_18px_42px_-30px_rgba(37,99,235,.28)]",children:[e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:234",className:"space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:235",className:"flex items-start justify-between gap-2",children:[e.jsx("button",{"data-loc":"client/src/pages/Templates.tsx:236",onClick:s,className:"text-left text-sm font-semibold leading-snug hover:underline",children:t.name}),t.countrySignal&&e.jsx(Sn,{"data-loc":"client/src/pages/Templates.tsx:242",signal:t.countrySignal,short:!0})]}),e.jsx("p",{"data-loc":"client/src/pages/Templates.tsx:244",className:"line-clamp-2 text-xs text-muted-foreground",children:t.subject})]}),e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:247",className:"space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:248",className:"flex flex-wrap items-center gap-1.5 text-[11px] text-muted-foreground",children:[e.jsx(Hd,{"data-loc":"client/src/pages/Templates.tsx:249",icon:e.jsx(xA,{"data-loc":"client/src/pages/Templates.tsx:249",className:"size-3"}),children:t.countryNameKo??t.countryIso2}),e.jsx(Hd,{"data-loc":"client/src/pages/Templates.tsx:250",icon:e.jsx(Cn,{"data-loc":"client/src/pages/Templates.tsx:250",className:"size-3"}),children:i}),t.language&&e.jsx(Hd,{"data-loc":"client/src/pages/Templates.tsx:252",icon:e.jsx(ao,{"data-loc":"client/src/pages/Templates.tsx:252",className:"size-3"}),children:t.language}),t.bodyKo&&e.jsx(Hd,{"data-loc":"client/src/pages/Templates.tsx:254",children:"한국어 대역 있음"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:256",className:"flex items-center justify-between border-t pt-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Templates.tsx:257",className:"text-[11px] text-muted-foreground",children:t.useCount>0?`${t.useCount}회 사용`:"아직 사용 안 함"}),e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:260",className:"flex gap-1",children:[e.jsx(G,{"data-loc":"client/src/pages/Templates.tsx:261",variant:"ghost",size:"sm",className:"h-7 px-2",onClick:c,children:e.jsx(Pg,{"data-loc":"client/src/pages/Templates.tsx:262",className:"size-3.5"})}),e.jsx(G,{"data-loc":"client/src/pages/Templates.tsx:264",variant:"ghost",size:"sm",className:"h-7 px-2 text-rose-600 hover:text-rose-700",onClick:r,children:e.jsx(Hs,{"data-loc":"client/src/pages/Templates.tsx:270",className:"size-3.5"})})]})]})]})]})}function Hd({icon:t,children:s}){return e.jsxs("span",{"data-loc":"client/src/pages/Templates.tsx:281",className:"inline-flex items-center gap-1 rounded-md bg-muted px-1.5 py-0.5",children:[t,s]})}function Yz({row:t,onClose:s}){const c=(r,i)=>{navigator.clipboard.writeText(r),X.success(`${i}을 복사했습니다.`)};return e.jsx(ta,{"data-loc":"client/src/pages/Templates.tsx:294",open:!!t,onOpenChange:r=>!r&&s(),children:e.jsx(aa,{"data-loc":"client/src/pages/Templates.tsx:295",className:"max-h-[85vh] max-w-3xl overflow-y-auto",children:t&&e.jsxs(e.Fragment,{children:[e.jsxs(sa,{"data-loc":"client/src/pages/Templates.tsx:298",children:[e.jsx(na,{"data-loc":"client/src/pages/Templates.tsx:299",children:t.name}),e.jsxs(ca,{"data-loc":"client/src/pages/Templates.tsx:300",children:[t.countryNameKo??t.countryIso2," ·"," ",t.sequenceStep===0?"1차 메일":`팔로업 ${t.sequenceStep}`,t.language?` · ${t.language}`:""]})]}),t.note&&e.jsx("p",{"data-loc":"client/src/pages/Templates.tsx:308",className:"rounded-lg bg-muted/60 p-3 text-xs text-muted-foreground",children:t.note}),e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:313",className:"space-y-3",children:[e.jsx(Zx,{"data-loc":"client/src/pages/Templates.tsx:314",label:"제목",onCopy:()=>c(t.subject,"제목"),children:e.jsx("p",{"data-loc":"client/src/pages/Templates.tsx:315",className:"text-sm",children:t.subject})}),e.jsx(Zx,{"data-loc":"client/src/pages/Templates.tsx:317",label:"본문",onCopy:()=>c(t.body,"본문"),children:e.jsx("p",{"data-loc":"client/src/pages/Templates.tsx:318",className:"whitespace-pre-wrap text-sm leading-relaxed",children:t.body})}),(t.subjectKo||t.bodyKo)&&e.jsxs(Zx,{"data-loc":"client/src/pages/Templates.tsx:321",label:"한국어 대역 (내용 확인용)",children:[t.subjectKo&&e.jsx("p",{"data-loc":"client/src/pages/Templates.tsx:323",className:"mb-2 text-sm font-medium",children:t.subjectKo}),t.bodyKo&&e.jsx("p",{"data-loc":"client/src/pages/Templates.tsx:326",className:"whitespace-pre-wrap text-sm leading-relaxed text-muted-foreground",children:t.bodyKo})]})]}),e.jsx("p",{"data-loc":"client/src/pages/Templates.tsx:334",className:"text-xs text-muted-foreground",children:'캠페인에 넣으려면 해당 캠페인의 문안 탭에서 "보관함" 버튼을 누르세요. 그때 대상 국가 규칙으로 다시 검사합니다.'})]})})})}function Zx({label:t,onCopy:s,children:c}){return e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:355",className:"space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:356",className:"flex items-center justify-between",children:[e.jsx(_e,{"data-loc":"client/src/pages/Templates.tsx:357",className:"text-xs text-muted-foreground",children:t}),s&&e.jsxs(G,{"data-loc":"client/src/pages/Templates.tsx:359",variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:s,children:[e.jsx(Lu,{"data-loc":"client/src/pages/Templates.tsx:360",className:"mr-1 size-3"}),"복사"]})]}),e.jsx("div",{"data-loc":"client/src/pages/Templates.tsx:365",className:"rounded-lg border bg-muted/30 p-3",children:c})]})}function Xz({row:t,onClose:s}){const c=q.useUtils(),[r,i]=v.useState(""),[o,u]=v.useState("");v.useEffect(()=>{t&&(i(t.name),u(t.note??""))},[t?.id,t?.name,t?.note]);const m=q.gateway.templates.update.useMutation({onSuccess:()=>
693{c.gateway.templates.list.invalidate(),X.success("수정했습니다."),s()},onError:p=>X.error(p.message)});return e.jsx(ta,{"data-loc":"client/src/pages/Templates.tsx:393",open:!!t,onOpenChange:p=>!p&&s(),children:e.jsxs(aa,{"data-loc":"client/src/pages/Templates.tsx:394",children:[e.jsxs(sa,{"data-loc":"client/src/pages/Templates.tsx:395",children:[e.jsx(na,{"data-loc":"client/src/pages/Templates.tsx:396",children:"보관 정보 수정"}),e.jsx(ca,{"data-loc":"client/src/pages/Templates.tsx:397",children:"이름과 메모만 고칩니다. 본문은 캠페인에서 불러온 뒤 고치세요."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:401",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:402",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/Templates.tsx:403",className:"text-sm",children:"이름"}),e.jsx(Ce,{"data-loc":"client/src/pages/Templates.tsx:404",value:r,onChange:p=>i(p.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/pages/Templates.tsx:406",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/Templates.tsx:407",className:"text-sm",children:"메모 (선택)"}),e.jsx(pt,{"data-loc":"client/src/pages/Templates.tsx:408",value:o,onChange:p=>u(p.target.value),rows:3,placeholder:"예: 회신율 높았던 문안. 첫 문장을 질문으로 바꾼 버전"})]})]}),e.jsxs(_a,{"data-loc":"client/src/pages/Templates.tsx:416",children:[e.jsx(G,{"data-loc":"client/src/pages/Templates.tsx:417",variant:"outline",onClick:s,children:"취소"}),e.jsx(G,{"data-loc":"client/src/pages/Templates.tsx:420",disabled:!r.trim()||m.isPending,onClick:()=>t&&m.mutate({id:t.id,name:r.trim(),note:o.trim()}),children:"저장"})]})]})})}function Zz({row:t,onClose:s}){const c=q.useUtils(),r=q.gateway.templates.remove.useMutation({onSuccess:()=>{c.gateway.templates.list.invalidate(),X.success("보관함에서 지웠습니다."),s()},onError:i=>X.error(i.message)});return e.jsx(ta,{"data-loc":"client/src/pages/Templates.tsx:447",open:!!t,onOpenChange:i=>!i&&s(),children:e.jsxs(aa,{"data-loc":"client/src/pages/Templates.tsx:448",className:"max-w-md",children:[e.jsxs(sa,{"data-loc":"client/src/pages/Templates.tsx:449",children:[e.jsx(na,{"data-loc":"client/src/pages/Templates.tsx:450",children:"이 문안을 지울까요?"}),e.jsx(ca,{"data-loc":"client/src/pages/Templates.tsx:451",children:"보관함에서만 사라집니다. 이미 캠페인에 불러 쓴 문안은 그대로 남습니다."})]}),t&&e.jsxs("p",{"data-loc":"client/src/pages/Templates.tsx:456",className:"rounded-lg bg-muted/60 p-3 text-sm",children:[t.name,e.jsxs("span",{"data-loc":"client/src/pages/Templates.tsx:458",className:"ml-1 text-xs text-muted-foreground",children:["(",t.countryNameKo??t.countryIso2,")"]})]}),e.jsxs(_a,{"data-loc":"client/src/pages/Templates.tsx:463",children:[e.jsx(G,{"data-loc":"client/src/pages/Templates.tsx:464",variant:"outline",onClick:s,children:"취소"}),e.jsx(G,{"data-loc":"client/src/pages/Templates.tsx:467",variant:"destructive",disabled:r.isPending,onClick:()=>t&&r.mutate({id:t.id}),children:"지우기"})]})]})})}const Jz=[{name:"CPNP (EU)",pattern:/\bCPNP\b/i},{name:"SCPN (UK)",pattern:/\bSCPN\b/i},{name:"NMPA",pattern:/\bNMPA\b/i},{name:"ANVISA",pattern:/\bANVISA\b/i},{name:"FDA · MoCRA",pattern:/\bFDA\b|\bMoCRA\b/i},{name:"MHLW · PMDA",pattern:/\bMHLW\b|\bPMDA\b/i},{name:"CDSCO",pattern:/\bCDSCO\b/i},{name:"Health Canada · CNF",pattern:/Health Canada|\bCNF\b/i},{name:"EAEU · TR CU 009/2011",pattern:/EAEU|TR CU 009\/2011/i},{name:"ASEAN Cosmetic Directive",pattern:/ASEAN|ACD\b/i},{name:"BPOM",pattern:/\bBPOM\b/i},{name:"TFDA",pattern:/\bTFDA\b/i},{name:"MFDS",pattern:/\bMFDS\b|식품의약품안전처/i}];function Jx(t,s){return s.some(c=>c.test(t))}function eL(t){const s=t?.trim()??"";if(!s)return["인증 기관 확인 필요"];const c=Jz.filter(i=>i.pattern.test(s)).map(i=>i.name);return c.length>0?Array.from(new Set(c)):[(s.split(/[—–-]/)[0]?.trim()||s).slice(0,80)]}function tL(t){const s=[/현지.*(?:수입사|유통사|대리인|파트너)/i,/(?:수입사|유통사|공인 대리인).*명의/i,/authorized agent/i,/marketing authorization holder|\bMAH\b/i],c=[/제조사.*(?:또는|\/).*수입사/i,/제조사.*유통업자/i,/manufacturer.*(?:or|\/).*importer/i],r=[/현지.*책임자/i,/responsible person/i,/domestic responsible person/i];return Jx(t,c)?"manufacturer_or_partner":Jx(t,s)?"local_partner":Jx(t,r)?"local_responsible_person":"rule_review"}function aL(t,s){return s==="registered"?t==="local_partner"?"기존 현지 명의자와 등록 유효성·사용 권한을 확인하세요.":"등록 명의자와 현지 책임 주체의 유효성을 확인하세요.":t==="local_partner"?"현지 총판·수입사·공
693인 대리인이 명의자가 될 수 있지만, 쎄라필 제품 등록 절차는 별도로 필요합니다.":t==="manufacturer_or_partner"?"제조사 또는 현지 수입사 경로가 가능하므로 계약 전에 어느 명의로 등록할지 선택해야 합니다.":t==="local_responsible_person"?"현지 책임자 지정과 쎄라필 제품 등록·통보가 함께 필요합니다.":"쎄라필 제품 등록과 현지 파트너의 명의 가능 여부를 규정 원문으로 확인해야 합니다."}function sL(t,s,c=[]){const r=new Map(s.map(o=>[o.iso2.toUpperCase(),o])),i=new Map(c.map(o=>[o.iso2.toUpperCase(),o]));return t.map(o=>{const u=r.get(o.iso2.toUpperCase()),m=i.get(o.iso2.toUpperCase()),p=m?m.allSatisfied?"registered":m.completed>0||m.inProgress>0?"in_progress":"none":u?.status??"none",f=o.certOwner?.trim()||"등록 명의 규칙 확인 필요",b=tL(f),h=o.certLockin?"high":"not_flagged";m?.completedProcedureNames?.filter(Boolean);const y=m?m.allSatisfied?`전체 필수 절차 충족 (${m.completed}/${m.total})`:m.classificationPending>0?`${m.completed>0?`일부 절차 완료 (${m.completed}/${m.total}) · `:""}제품 분류 확인 후 남은 절차 진행 필요`:m.completed>0||m.inProgress>0?`일부 절차 진행 (${m.completed}/${m.total}) · 남은 조치 ${m.actionRequired}건`:`필수 절차 ${m.total}건 조치 필요`:p==="registered"?"쎄라필 등록 완료":p==="in_progress"?"쎄라필 등록 진행 중":"쎄라필 제품 등록·통보 필요";
693return{iso2:o.iso2,countryNameKo:o.countryNameKo,countryName:o.countryName??o.iso2,region:o.region??"기타",status:p,authority:o.certAuthority?.trim()||"인증 기관 확인 필요",certificationNames:eL(o.certAuthority),ownerRule:f,holder:m?.holders?.map(j=>j.trim()).filter(Boolean).join(" / ")||u?.holder?.trim()||null,detail:u?.detail?.trim()||null,productRequirement:y,partnerRoute:b,partnerGuidance:aL(b,p),lockinRisk:h,lockinGuidance:o.certLockin?"등록 명의가 현지 파트너에 묶일 수 있어 총판 변경 시 명의 이전·재등록 위험을 계약 전에 확인해야 합니다.":"현재 저장 규칙에는 현지 파트너 락인 위험이 별도로 표시되지 않았습니다.",nextAction:m?m.allSatisfied?"완료 절차의 번호·명의자·유효기간과 실제 수입 권한을 정기 확인":m.classificationPending>0?"성분·농도·pH·효능 주장과 사용 방식을 규제 전문가에게 확인한 뒤 적용 절차 확정":m.inProgress>0?"진행 중 절차의 제출 주체·예상 완료일·보완 자료를 확인":b==="local_partner"?"현지 명의·권리 조건을 보호할 파트너를 확정하고 남은 절차 진행":"남은 필수 절차와 현지 책임 주체를 확정":p==="registered"?"등록 번호·명의자·유효기간과 실제 수입 권한을 확인":p==="in_progress"?"진행 주체·예상 완료일·보완 서류를 확인":b==="local_partner"?"등록 명의와 권리를 보호할 수 있는 현지 파트너를 발굴하고 계약 조건을 협의":"필수 등록 경로와 현지 책임 주체를 확정한 뒤 파트너 발굴"}})}function nL(t){const s=new Map;for(const c of t)for(const r of c.certificationNames)s.set(r,[...s.get(r)??[],c]);return Array.from(s,([c,r])=>({name:c,countries:r})).sort((c,r)=>r.countries.length-c.countries.length||c.name.localeCompare(r.name))}const ef={registered:{label:"전체 요건 충족",className:"border-emerald-200 bg-emerald-50 text-emerald-800"},in_progress:{label:"일부 진행",className:"border-sky-200 bg-sky-50 text-sky-800"},none:{label:"조치 필요",className:"border-amber-200 bg-amber-50 text-amber-800"}};function cL({countries:t,certifications:s,procedureCountries:c=[]}){const[r,i]=v.useState(""),[o,u]=v.useState("all"),[m,p]=v.useState(""),f=v.useMemo(()=>sL(t,s,c),[t,s,c]),b=v.useMemo(()=>{const N=r.trim().toLowerCase();return f.filter(w=>o!=="all"&&w.status!==o?!1:N?[w.countryNameKo,w.countryName,w.iso2,w.authority,w.certificationNames.join(" ")].join(" ").toLowerCase().includes(N):!0)},[r,f,o]),h=v.useMemo(()=>{const N=new Map;for(const w of b)N.set(w.region,[...N.get(w.region)??[],w]);return Array.from(N,([w,T])=>({region:w,items:T})).sort((w,T)=>w.region.localeCompare(T.region))},[b]),y=f.find(N=>N.iso2===m)??b[0]??null,j=v.useMemo(()=>nL(f),[f]),S={registered:f.filter(N=>N.status==="registered").length,inProgress:f.filter(N=>N.status==="in_progress").length,none:f.filter(N=>N.status==="none").length,lockin:f.filter(N=>N.lockinRisk==="high").length};return e.jsxs("section",{"data-loc":"client/src/components/CertificationMap.tsx:96",className:"space-y-5 rounded-2xl border border-border/80 bg-card/96 p-5 shadow-[0_18px_46px_-34px_rgba(18,35,61,.52)]",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:97",className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:98",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationMap.tsx:99",className:"page-kicker",children:"Global Beauty Compliance Map"}),e.jsxs("h2",{"data-loc":"client/src/components/CertificationMap.tsx:100",className:"mt-1 flex items-center gap-2 text-lg font-semibold",children:[e.jsx(Ha,{"data-loc":"client/src/components/CertificationMap.tsx:101",className:"size-5 text-primary"}),"글로벌 뷰티 인증 지도"]}),e.jsx("p",{"data-loc":"client/src/components/CertificationMap.tsx:104",className:"mt-1.5 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:"저장된 국가 규칙과 이 제품의 실제 등록 상태만 사용합니다. 현지 총판이 명의자가 될 수 있는 국가도 제품 등록 절차가 자동으로 끝나는 것은 아닙니다."})]}),e.jsxs(ct,{"data-loc":"client/src/components/CertificationMap.tsx:109",variant:"outline",className:"bg-background text-xs",children:["운영 국가 ",f.length,"개"]})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:114",className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[e.jsx($d,{"data-loc":"client/src/components/CertificationMap.tsx:115",label:"전체 요건 충족",value:S.registered,tone:"emerald"}),e.jsx($d,{"data-loc":"client/src/components/CertificationMap.tsx:116",label:"일부 진행",value:S.inProgress,tone:"sky"}),e.jsx($d,{"data-loc":"client/src/components/CertificationMap.tsx:117",label:"조치 필요",value:S.none,tone:"amber"}),e.jsx($d,{"data-loc":"client/src/components/CertificationMap.tsx:118",label:"명의 락인 주의",value:S.lockin,tone:"rose"})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:121",className:"filter-bar",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:122",className:"relative min-w-0 flex-1 sm:max-w-sm",children:[e.jsx(An,{"data-loc":"client/src/components/CertificationMap.tsx:123",className:"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(Ce,{"data-loc":"client/src/components/CertificationMap.tsx:124",value:r,onChange:N=>i(N.target.value),placeholder:"국가·인증 기관 검색",className:"pl-9"})]}),e.jsxs(et,{"data-loc":"client/src/components/CertificationMap.tsx:131",value:o,onValueChange:N=>u(N),children:[e.jsx(at,{"data-loc":"client/src/components/CertificationMap.tsx:132",className:"w-full sm:w-40",children:e.jsx(tt,{"data-loc":"client/src/components/CertificationMap.tsx:133"})}),e.jsxs(st,{"data-loc":"client/src/components/CertificationMap.tsx:135",children:[e.jsx(ve,{"data-loc":"client/src/components/CertificationMap.tsx:136",value:"all",children:"모든 상태"}),e.jsx(ve,{"data-loc":"client/src/components/CertificationMap.tsx:137",value:"registered",children:"전체 요건 충족"}),e.jsx(ve,{"data-loc":"client/src/components/CertificationMap.tsx:138",value:"in_progress",children:"일부 진행"}),e.jsx(ve,{"data-loc":"client/src/components/CertificationMap.tsx:139",value:"none",children:"조치 필요"})]})]}),e.jsxs("span",{"data-loc":"client/src/components/CertificationMap.tsx:142",className:"text-xs text-muted-foreground tnum",children:[b.length,"개 국가"]})]}),b.length===0?e.jsx("div",{"data-loc":"client/src/components/CertificationMap.tsx:146",className:"rounded-xl border border-dashed py-10 text-center text-sm text-muted-foreground",children:"조건에 맞는 국가가 없습니다."}):e.jsx("div",{"data-loc":"client/src/components/CertificationMap.tsx:150",className:"grid gap-3 lg:grid-cols-2",children:h.map(N=>e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:152",className:"rounded-xl border bg-background/80 p-3.5",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:153",className:"mb-2.5 flex items-center justify-between gap-2",children:[e.jsx("h3",{"data-loc":"client/src/components/CertificationMap.tsx:154",className:"text-sm font-semibold",children:N.region}),e.jsxs("span",{"data-loc":"client/src/components/CertificationMap.tsx:155",className:"text-xs text-muted-foreground tnum",children:[N.items.length,"개"]})]}),e.jsx("div",{"data-loc":"client/src/components/CertificationMap.tsx:157",className:"flex flex-wrap gap-2",children:N.items.map(w=>{const T=ef[w.status];return e.jsxs("button",{"data-loc":"client/src/components/CertificationMap.tsx:161",type:"button",onClick:()=>p(w.iso2),className:`rounded-lg border px-2.5 py-1.5 text-left text-xs transition-colors hover:border-primary/50 hover:bg-primary/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${y?.iso2===w.iso2?"border-primary bg-primary/10":"bg-card"}`,"aria-pressed":y?.iso2===w.iso2,children:[e.jsx("span",{"data-loc":"client/src/components/CertificationMap.tsx:170",className:"font-medium",children:w.
693countryNameKo}),e.jsx("span",{"data-loc":"client/src/components/CertificationMap.tsx:171",className:`ml-1.5 ${T.className.split(" ").at(-1)}`,children:"●"})]},w.iso2)})})]},N.region))}),y&&e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:182",className:"rounded-2xl border border-primary/20 bg-primary/[0.025] p-4 sm:p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:183",className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:184",children:[e.jsxs("p",{"data-loc":"client/src/components/CertificationMap.tsx:185",className:"text-xs font-medium uppercase tracking-[0.12em] text-primary",children:[y.iso2," · ",y.region]}),e.jsx("h3",{"data-loc":"client/src/components/CertificationMap.tsx:188",className:"mt-1 text-lg font-semibold",children:y.countryNameKo})]}),e.jsx(ct,{"data-loc":"client/src/components/CertificationMap.tsx:190",variant:"outline",className:ef[y.status].className,children:ef[y.status].label})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:195",className:"mt-4 grid gap-3 md:grid-cols-2",children:[e.jsx(ol,{"data-loc":"client/src/components/CertificationMap.tsx:196",label:"필수 기관·인증",value:`${y.certificationNames.join(" · ")}
694${y.authority}`}),e.jsx(ol,{"data-loc":"client/src/components/CertificationMap.tsx:197",label:"쎄라필 자체 등록",value:y.productRequirement,emphasize:!0}),e.jsx(ol,{"data-loc":"client/src/components/CertificationMap.tsx:198",label:"총판·대리점으로 가능한가",value:y.partnerGuidance}),e.jsx(ol,{"data-loc":"client/src/components/CertificationMap.tsx:199",label:"등록 명의 규칙",value:y.ownerRule}),e.jsx(ol,{"data-loc":"client/src/components/CertificationMap.tsx:200",label:"현재 등록 명의자",value:y.holder??"미입력 — 등록 문서와 파트너 계약에서 확인 필요"}),e.jsx(ol,{"data-loc":"client/src/components/CertificationMap.tsx:204",label:"총판 변경·명의 락인",value:y.lockinGuidance,warning:y.lockinRisk==="high"})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:207",className:"mt-3 flex items-start gap-2 rounded-xl border bg-background p-3 text-sm",children:[e.jsx(ss,{"data-loc":"client/src/components/CertificationMap.tsx:208",className:"mt-0.5 size-4 shrink-0 text-primary"}),e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:209",children:[e.jsx("span",{"data-loc":"client/src/components/CertificationMap.tsx:210",className:"font-semibold",children:"다음 조치"}),e.jsx("p",{"data-loc":"client/src/components/CertificationMap.tsx:211",className:"mt-0.5 text-muted-foreground",children:y.nextAction}),y.detail&&e.jsxs("p",{"data-loc":"client/src/components/CertificationMap.tsx:212",className:"mt-1 text-xs text-muted-foreground",children:["등록 메모: ",y.detail]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:218",className:"space-y-3 border-t pt-5",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:219",children:[e.jsxs("h3",{"data-loc":"client/src/components/CertificationMap.tsx:220",className:"flex items-center gap-2 text-sm font-semibold",children:[e.jsx(Jt,{"data-loc":"client/src/components/CertificationMap.tsx:221",className:"size-4 text-primary"}),"인증별 필요한 국가"]}),e.jsx("p",{"data-loc":"client/src/components/CertificationMap.tsx:224",className:"mt-1 text-xs text-muted-foreground",children:"같은 포털·제도를 쓰더라도 국가별 책임자와 등록 명의 조건은 따로 확인해야 합니다."})]}),e.jsx("div",{"data-loc":"client/src/components/CertificationMap.tsx:228",className:"grid gap-2 md:grid-cols-2",children:j.map(N=>e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:230",className:"rounded-xl border bg-background/75 p-3",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:231",className:"flex items-center justify-between gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/CertificationMap.tsx:232",className:"text-sm font-semibold",children:N.name}),e.jsxs("span",{"data-loc":"client/src/components/CertificationMap.tsx:233",className:"text-xs text-muted-foreground tnum",children:[N.countries.length,"개국"]})]}),e.jsx("p",{"data-loc":"client/src/components/CertificationMap.tsx:235",className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:N.countries.map(w=>w.countryNameKo).join(" · ")})]},N.name))})]})]})}function $d({label:t,value:s,tone:c}){const r={emerald:"border-emerald-200 bg-emerald-50 text-emerald-800",sky:"border-sky-200 bg-sky-50 text-sky-800",amber:"border-amber-200 bg-amber-50 text-amber-800",rose:"border-rose-200 bg-rose-50 text-rose-800"};return e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:254",className:`rounded-xl border p-3 ${r[c]}`,children:[e.jsx("p",{"data-loc":"client/src/components/CertificationMap.tsx:255",className:"text-xs font-medium",children:t}),e.jsx("p",{"data-loc":"client/src/components/CertificationMap.tsx:256",className:"mt-1 text-xl font-semibold tnum",children:s})]})}function ol({label:t,value:s,emphasize:c,warning:r}){return e.jsxs("div",{"data-loc":"client/src/components/CertificationMap.tsx:273",className:"rounded-xl border bg-background p-3.5",children:[e.jsxs("p",{"data-loc":"client/src/components/CertificationMap.tsx:274",className:"flex items-center gap-1.5 text-xs font-medium text-muted-foreground",children:[r?e.jsx(St,{"data-loc":"client/src/components/CertificationMap.tsx:275",className:"size-3.5 text-amber-600"}):e.jsx(zu,{"data-loc":"client/src/components/CertificationMap.tsx:275",className:"size-3.5"}),t]}),e.jsx("p",{"data-loc":"client/src/components/CertificationMap.tsx:278",className:`mt-1.5 whitespace-pre-line text-sm leading-relaxed ${c?"font-semibold text-primary":"text-foreground"}`,children:s})]})}var rm="Switch",[rL]=da(rm),[lL,iL]=rL(rm),d3=v.forwardRef((t,s)=>{const{__scopeSwitch:c,name:r,checked:i,defaultChecked:o,required:u,disabled:m,value:p="on",onCheckedChange:f,form:b,...h}=t,[y,j]=v.useState(null),S=He(s,E=>j(E)),N=v.useRef(!1),w=y?b||!!y.closest("form"):!0,[T,k]=Bs({prop:i,defaultProp:o??!1,onChange:f,caller:rm});return e.jsxs(lL,{scope:c,checked:T,disabled:m,children:[e.jsx(Ae.button,{type:"button",role:"switch","aria-checked":T,"aria-required":u,"data-state":x3(T),"data-disabled":m?"":void 0,disabled:m,value:p,...h,ref:S,onClick:ye(t.onClick,E=>{k(z=>!z),w&&(N.current=E.isPropagationStopped(),N.current||E.stopPropagation())})}),w&&e.jsx(p3,{control:y,bubbles:!N.current,name:r,value:p,checked:T,required:u,disabled:m,form:b,style:{transform:"translateX(-100%)"}})]})});d3.displayName=rm;var u3="SwitchThumb",m3=v.forwardRef((t,s)=>{const{__scopeSwitch:c,...r}=t,i=iL(u3,c);
694return e.jsx(Ae.span,{"data-state":x3(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:s})});m3.displayName=u3;var oL="SwitchBubbleInput",p3=v.forwardRef(({__scopeSwitch:t,control:s,checked:c,bubbles:r=!0,...i},o)=>{const u=v.useRef(null),m=He(u,o),p=rh(c),f=mg(s);return v.useEffect(()=>{const b=u.current;if(!b)return;const h=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(h,"checked").set;if(p!==c&&j){const S=new Event("click",{bubbles:r});j.call(b,c),b.dispatchEvent(S)}},[p,c,r]),e.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:c,...i,tabIndex:-1,ref:m,style:{...i.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});p3.displayName=oL;function x3(t){return t?"checked":"unchecked"}var dL=d3,uL=m3;function Yf({className:t,...s}){return e.jsx(dL,{"data-loc":"client/src/components/ui/switch.tsx:11","data-slot":"switch",className:Ne("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(uL,{"data-loc":"client/src/components/ui/switch.tsx:19","data-slot":"switch-thumb",className:Ne("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const mL=new Set(["filed_or_listed","registered_or_approved","confirmed","not_applicable"]);function pL(t){return mL.has(t)}function xL(t){return t==="approval"||t==="registration"?["registered_or_approved","not_applicable"]:t==="notification"||t==="listing"||t==="facility_registration"?["filed_or_listed","not_applicable"]:t==="importer_license"||t==="conformity_assessment"?["registered_or_approved","confirmed","not_applicable"]:["confirmed","not_applicable"]}const i2={draft:{label:"분석 결과",className:"border-slate-200 bg-slate-50 text-slate-700"},needs_review:{label:"확인 필요",className:"border-amber-200 bg-amber-50 text-amber-800"},active:{label:"확인 완료",className:"border-emerald-200 bg-emerald-50 text-emerald-800"},expired:{label:"만료",className:"border-rose-200 bg-rose-50 text-rose-800"},superseded:{label:"이전 버전",className:"border-slate-200 bg-slate-50 text-slate-600"}};function fL({productId:t,countries:s,certifications:c}){const r=q.useUtils(),{data:i,isLoading:o,isError:u,error:m}=q.gateway.certificationProcedures.workspace.useQuery({productId:t}),{data:p}=q.gateway.certificationProcedures.list.useQuery({productId:t}),[f,b]=v.useState(""),[h,y]=v.useState(null),[j,S]=v.useState(""),[N,w]=v.useState("all"),[T,k]=v.useState(!1),[E,z]=v.useState(null);v.useEffect(()=>{i?.countries.length&&(i.countries.some(H=>H.iso2===f)||(b(i.countries[0].iso2),y(null)))},[i?.countries,f]);const _=v.useMemo(()=>{if(!i)return[];const H=j.trim().toLocaleLowerCase();return i.countries.filter(M=>N==="review"&&M.summary.reviewCount===0||N==="expiry"&&M.summary.expiryCount===0||N==="missing"&&M.summary.missingCount===0||N==="healthy"&&M.summary.activeCount===0?!1:H?[M.countryNameKo,M.iso2,...M.products.flatMap(B=>[B.displayName,B.legalProductName]),...M.products.flatMap(B=>B.records.flatMap(I=>[I.record.registrationName,I.record.identifierNumber,I.record.holder,I.definition.titleKo]))].filter(Boolean).join(" ").toLocaleLowerCase().includes(H):!0)},[i,N,j]),R=i?.countries.find(H=>H.iso2===f)??_[0]??null,P=q.gateway.products.configureCertificationAlerts.useMutation({onSuccess:async()=>{await r.gateway.certificationProcedures.workspace.invalidate({productId:t}),X.success("인증 만료 알림 설정을 저장했습니다.")},onError:H=>X.error(H.message)});if(o)return e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:101",className:"space-y-5",children:[e.jsx(jL,{"data-loc":"client/src/components/CertificationWorkspace.tsx:101"}),e.jsx(m2,{"data-loc":"client/src/components/CertificationWorkspace.tsx:101",productId:t,onReview:z,reviewAnalyses:[]})]});if(u||!i)return e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:103",className:"rounded-2xl border border-rose-200 bg-rose-50 p-5 text-sm text-rose-800",children:["인증 정보를 불러오지 못했습니다. ",m?.message]});const A=H=>{b(H),y(null)},V=H=>{w(H),y(null)};return e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:110",className:"space-y-5",children:[e.jsxs("section",{"data-loc":"client/src/components/CertificationWorkspace.tsx:111",className:"grid grid-cols-2 gap-2 lg:grid-cols-4",children:[e.jsx(qd,{"data-loc":"client/src/components/CertificationWorkspace.tsx:112",label:"확인 필요",value:i.inbox.reviewCount,tone:"amber",icon:NN,active:N==="review",onClick:()=>V("review")}),e.jsx(qd,{"data-loc":"client/src/components/CertificationWorkspace.tsx:113",label:"만료·갱신 예정",value:i.inbox.expiryCount,tone:"rose",icon:Af,active:N==="expiry",onClick:()=>V("expiry")}),e.jsx(qd,{"data-loc":"client/src/components/CertificationWorkspace.tsx:114",label:"정보 누락",value:i.inbox.missingCount,tone:"sky",icon:St,active:N==="missing",onClick:()=>V("missing")}),e.jsx(qd,{"data-loc":"client/src/components/CertificationWorkspace.tsx:115",label:"정상 관리 중",value:i.inbox.healthyCount,tone:"emerald",icon:Jt,active:N==="healthy",onClick:()=>V("healthy")})]}),e.jsx(m2,{"data-loc":"client/src/components/CertificationWorkspace.tsx:118",productId:t,onReview:z,reviewAnalyses:i.reviewAnalyses}),i.reviewAnalyses.length>0&&e.jsx(Bt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:121",className:"border-amber-200 bg-amber-50/45",children:e.jsxs($t,{"data-loc":"client/src/components/CertificationWorkspace.tsx:122",className:"p-4 sm:p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:123",className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:124",children:[e.jsx("h2",{"data-loc":"client/src/components/CertificationWorkspace.tsx:124",className:"font-semibold",children:"확인 필요 문서"}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:124",className:"mt-1 text-xs text-muted-foreground",children:"애매한 값만 확인하고 수정한 뒤 등록하면 됩니다."})]}),e.jsxs(ct,{"data-loc":"client/src/components/CertificationWorkspace.tsx:125",className:"bg-amber-600 text-white",children:[i.reviewAnalyses.length,"건"]})]}),e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:127",className:"mt-3 grid gap-2 md:grid-cols-2",children:i.reviewAnalyses.map(H=>e.jsxs("button",{"data-loc":"client/src/components/CertificationWorkspace.tsx:129",type:"button",onClick:()=>z(H),className:"rounded-xl border bg-background p-3 text-left transition hover:border-amber-300 hover:shadow-sm",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:130",className:"flex items-start justify-between gap-2",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:130",className:"truncate text-sm font-semibold",children:H.fileName}),e.jsx(ct,{"data-loc":"client/src/components/CertificationWorkspace.tsx:130",variant:"outline",children:H.status==="failed"?"분석 실패":"확인 필요"})]}),e.jsxs("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:131",className:"mt-1 text-xs text-muted-foreground",children:[H.extractedCountryName||H.extractedIso2||"국가 미확인"," · ",H.extractedProductName||"제품 미확인"]}),H.reviewReason&&e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:132",className:"mt-2 line-clamp-2 text-xs text-amber-900",children:H.reviewReason})]},H.id))})]})}),e.jsx(Bt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:140",className:"overflow-hidden",children:e.jsxs($t,{"data-loc":"client/src/components/CertificationWorkspace.tsx:141",className:"p-0",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:142",className:"flex flex-wrap items-center justify-between gap-3 border-b px-4 py-4 sm:px-5",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:143",children:[e.jsx("h2",{"data-loc":"client/src/components/CertificationWorkspace.tsx:144",className:"font-semibold",children:"내 인증 관리"}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:145",className:"mt-0.5 text-xs text-muted-foreground",children:"실제 업로드하거나 직접 확인한 인증만 국가→제품 순서로 표시합니다."})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:147",className:"flex items-center gap-2 rounded-xl border px-3 py-2",children:[e.jsx(Af,{"data-loc":"client/src/components/CertificationWorkspace.tsx:148",className:"size-4 text-primary"}),e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:148",className:"text-xs font-medium",children:"만료 알림"}),e.jsx(Yf,{"data-loc":"client/src/components/CertificationWorkspace.tsx:149",checked:!!i.alertSetting?.enabled,disabled:P.isPending,onCheckedChange:H=>P.mutate({enabled:H,slackEnabled:i.alertSetting?.slackEnabled??!0})})]})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:152",className:"flex flex-wrap gap-2 border-b bg-muted/20 px-4 py-3 sm:px-5",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:153",className:"relative min-w-[14rem] flex-1",children:[e.jsx(An,{"data-loc":"client/src/components/CertificationWorkspace.tsx:153",className:"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:153",value:j,onChange:H=>S(H.target.value),placeholder:"국가·제품·등록명·번호 검색",className:"pl-9"})]}),e.jsxs(et,{"data-loc":"client/src/components/CertificationWorkspace.tsx:154",value:N,onValueChange:H=>w(H),children:[e.jsx(at,{"data-loc":"client/src/components/CertificationWorkspace.tsx:154",className:"w-full sm:w-44",children:e.jsx(tt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:154"})}),e.jsxs(st,{"data-loc":"client/src/components/CertificationWorkspace.tsx:154",children:[e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:154",value:"all",children:"보유 인증 전체"}),e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:154",value:"review",children:"확인 필요"}),e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:154",value:"expiry",children:"만료·갱신 예정"}),e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:154",value:"missing",children:"정보 누락"}),e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:154",value:"healthy",children:"정상 관리 중"})]})]}),N!=="all"&&e.jsx(G,{"data-loc":"client/src/components/CertificationWorkspace.tsx:155",variant:"ghost",size:"sm",onClick:()=>w("all"),children:"필터 해제"})]}),i.countries.length===0?e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:159",className:"px-5 py-12 text-center",children:[e.jsx(Eg,{"data-loc":"client/src/components/CertificationWorkspace.tsx:159",className:"mx-auto 
694size-9 text-muted-foreground"}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:159",className:"mt-3 font-semibold",children:"아직 보유 인증이 없습니다"}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:159",className:"mt-1 text-xs text-muted-foreground",children:"위에서 인증서를 올리면 국가와 제품별로 자동 정리됩니다."})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:162",className:"hidden min-h-[36rem] grid-cols-[14rem_minmax(22rem,1fr)_minmax(22rem,.95fr)] lg:grid",children:[e.jsx(o2,{"data-loc":"client/src/components/CertificationWorkspace.tsx:163",countries:_,selectedIso2:R?.iso2??"",onSelect:A}),e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:164",className:"border-r p-4",children:e.jsx(d2,{"data-loc":"client/src/components/CertificationWorkspace.tsx:164",country:R,productId:t,selection:h,onSelect:y})}),e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:165",className:"p-4",children:e.jsx(u2,{"data-loc":"client/src/components/CertificationWorkspace.tsx:165",country:R,selection:h,productId:t,managers:i.managers})})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:167",className:"lg:hidden",children:[e.jsx(o2,{"data-loc":"client/src/components/CertificationWorkspace.tsx:168",countries:_,selectedIso2:R?.iso2??"",onSelect:A,mobile:!0}),e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:169",className:"p-4",children:h?e.jsxs(e.Fragment,{children:[e.jsxs(G,{"data-loc":"client/src/components/CertificationWorkspace.tsx:170",variant:"ghost",size:"sm",className:"mb-3 -ml-2 gap-1",onClick:()=>y(null),children:[e.jsx(eo,{"data-loc":"client/src/components/CertificationWorkspace.tsx:170",className:"size-4"}),"목록으로"]}),e.jsx(u2,{"data-loc":"client/src/components/CertificationWorkspace.tsx:170",country:R,selection:h,productId:t,managers:i.managers})]}):e.jsx(d2,{"data-loc":"client/src/components/CertificationWorkspace.tsx:170",country:R,productId:t,selection:h,onSelect:y})})]})]})]})}),e.jsx(fS,{"data-loc":"client/src/components/CertificationWorkspace.tsx:178",open:T,onOpenChange:k,children:e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:179",className:"rounded-2xl border bg-card",children:[e.jsx(gS,{"data-loc":"client/src/components/CertificationWorkspace.tsx:179",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/components/CertificationWorkspace.tsx:179",type:"button",className:"flex w-full items-center justify-between gap-3 px-5 py-4 text-left",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:179",className:"flex items-center gap-3",children:[e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:179",className:"grid size-9 place-items-center rounded-xl bg-primary/10 text-primary",children:e.jsx(Ha,{"data-loc":"client/src/components/CertificationWorkspace.tsx:179",className:"size-5"})}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:179",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:179",className:"font-semibold",children:"글로벌 뷰티 인증 지도"}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:179",className:"text-xs text-muted-foreground",children:"미보유 국가의 요건은 여기에서만 확인합니다."})]})]}),e.jsx(ns,{"data-loc":"client/src/components/CertificationWorkspace.tsx:179",className:`size-5 transition-transform ${T?"rotate-180":""}`})]})}),e.jsx(hS,{"data-loc":"client/src/components/CertificationWorkspace.tsx:179",className:"border-t p-3 sm:p-5",children:e.jsx(cL,{"data-loc":"client/src/components/CertificationWorkspace.tsx:180",countries:s,certifications:c,procedureCountries:(p?.countries??[]).map(H=>({iso2:H.research.iso2,...H.summary,holders:Array.from(new Set(H.procedures.map(M=>M.procedure.holder).filter(M=>!!M))),completedProcedureNames:H.procedures.filter(M=>pL(M.procedure.status)).map(M=>M.definition.titleKo)}))})})]})}),e.jsx(bL,{"data-loc":"client/src/components/CertificationWorkspace.tsx:184",productId:t,data:i,row:E,onOpenChange:H=>!H&&z(null)})]})}function qd({label:t,value:s,tone:c,icon:r,active:i,onClick:o}){const u={amber:"border-amber-200 bg-amber-50 text-amber-900",rose:"border-rose-200 bg-rose-50 text-rose-900",sky:"border-sky-200 bg-sky-50 text-sky-900",emerald:"border-emerald-200 bg-emerald-50 text-emerald-900"};return e.jsxs("button",{"data-loc":"client/src/components/CertificationWorkspace.tsx:191",type:"button",onClick:o,className:`rounded-2xl border p-4 text-left transition hover:-translate-y-0.5 hover:shadow-sm ${u[c]} ${i?"ring-2 ring-primary/35":""}`,children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:191",className:"flex items-start justify-between",children:[e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:191",className:"text-xs font-semibold",children:t}),e.jsx(r,{"data-loc":"client/src/components/CertificationWorkspace.tsx:191",className:"size-4"})]}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:191",className:"mt-2 text-2xl font-semibold tnum",children:s})]})}function o2({countries:t,selectedIso2:s,onSelect:c,mobile:r=!1}){return t.length===0?e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:195",className:"p-4 text-sm text-muted-foreground",children:"조건에 맞는 보유 인증이 없습니다."}):e.jsx("nav",{"data-loc":"client/src/components/CertificationWorkspace.tsx:196",className:r?"flex gap-2 overflow-x-auto border-b p-3":"space-y-1 border-r bg-muted/10 p-3","aria-label":"보유 인증 국가",children:t.map(i=>{const o=i.summary.reviewCount+i.summary.expiryCount+i.summary.missingCount;return e.jsxs("button",{"data-loc":"client/src/components/CertificationWorkspace.tsx:197",type:"button",onClick:()=>c(i.iso2),className:`${r?"min-w-[10rem]":"w-full"} rounded-xl border p-3 text-left transition ${s===i.iso2?"border-primary bg-primary/5 shadow-sm":"border-transparent hover:border-border hover:bg-background"}`,children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:197",className:"flex items-center justify-between gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:197",className:"font-semibold",children:i.countryNameKo}),e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:197",className:"text-[11px] text-muted-foreground",children:i.iso2})]}),e.jsxs("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:197",className:"mt-1 text-[11px] text-muted-foreground",children:["제품 ",i.summary.productC
694ount," · 완료 ",i.summary.activeCount,"/",i.summary.recordCount]}),e.jsxs("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:197",className:"mt-0.5 text-[11px] text-muted-foreground",children:[i.summary.commonTotal>0?`공통 ${i.summary.commonCompleted}/${i.summary.commonTotal} · `:"","문서 ",i.summary.documentCount]}),o>0&&e.jsxs("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:197",className:"mt-1 text-[11px] font-medium text-amber-700",children:["처리 필요 ",o]})]},i.iso2)})})}function d2({country:t,productId:s,selection:c,onSelect:r}){q.useUtils();const i=q.gateway.certificationProcedures.bundleDownload.useMutation({onError:u=>X.error(u.message)});if(!t)return e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:204",className:"py-12 text-center text-sm text-muted-foreground",children:"국가를 선택해 주세요."});const o=async u=>{const m=await i.mutateAsync({productId:s,iso2:t.iso2,countryProductId:u});window.open(m.url,"_blank","noopener,noreferrer"),X.success(`${m.documentCount}개 문서를 ZIP으로 준비했습니다.`)};return e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:210",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:211",className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:211",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:211",className:"text-xs font-medium text-primary",children:t.iso2}),e.jsx("h3",{"data-loc":"client/src/components/CertificationWorkspace.tsx:211",className:"text-lg font-semibold",children:t.countryNameKo}),e.jsxs("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:211",className:"text-xs text-muted-foreground",children:["제품 ",t.summary.productCount," · 완료 ",t.summary.activeCount,"/",t.summary.recordCount," · 문서 ",t.summary.documentCount,t.summary.commonTotal>0?` · 공통 ${t.summary.commonCompleted}/${t.summary.commonTotal}`:""]})]}),e.jsxs(G,{"data-loc":"client/src/components/CertificationWorkspace.tsx:211",variant:"outline",size:"sm",className:"gap-1.5",disabled:i.isPending,onClick:()=>void o(),children:[i.isPending?e.jsx(jt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:211",className:"size-4 animate-spin"}):e.jsx(Mf,{"data-loc":"client/src/components/CertificationWorkspace.tsx:211",className:"size-4"}),"국가 전체 ZIP"]})]}),t.commonRequirements.length>0&&e.jsxs("section",{"data-loc":"client/src/components/CertificationWorkspace.tsx:212",children:[e.jsx("h4",{"data-loc":"client/src/components/CertificationWorkspace.tsx:212",className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"국가 공통 요건"}),e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:212",className:"space-y-2",children:t.commonRequirements.map(u=>e.jsx("button",{"data-loc":"client/src/components/CertificationWorkspace.tsx:212",type:"button",onClick:()=>r({kind:"common",procedureId:u.procedure.id}),className:`w-full rounded-xl border p-3 text-left transition hover:border-primary/40 ${c?.kind==="common"&&c.procedureId===u.procedure.id?"border-primary bg-primary/5":""}`,children:e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:212",className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:212",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:212",className:"font-semibold",children:u.definition.titleKo}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:212",className:"mt-1 text-xs text-muted-foreground",children:u.definition.authority})]}),e.jsxs(ct,{"data-loc":"client/src/components/CertificationWorkspace.tsx:212",variant:"outline",children:["문서 ",u.documents.length]})]})},u.procedure.id))})]}),e.jsxs("section",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",children:[e.jsx("h4",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"제품별 인증·신고"}),e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"space-y-3",children:t.products.map(u=>e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"rounded-2xl border p-3",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"grid size-8 place-items-center rounded-lg bg-primary/10 text-primary",children:e.jsx(Rf,{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"size-4"})}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"font-semibold",children:u.displayName}),u.legalProductName&&u.legalProductName!==u.displayName&&e.jsxs("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"max-w-md truncate text-[11px] text-muted-foreground",children:["법정명 ",u.legalProductName]})]})]}),e.jsxs(G,{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",variant:"ghost",size:"sm",className:"gap-1",onClick:()=>void o(u.id),children:[e.jsx(to,{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"size-3.5"}),"제품 ZIP"]})]}),e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"mt-3 space-y-2",children:u.records.map(m=>{const p=i2[m.record.status]??i2.needs_review;return e.jsxs("button",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",type:"button",onClick:()=>r({kind:"product",countryProductId:u.id,recordId:m.record.id}),className:`w-full rounded-xl border bg-muted/15 p-3 text-left transition hover:border-primary/40 ${c?.kind==="product"&&c.recordId===m.record.id?"border-primary bg-primary/5":""}`,children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"text-sm font-medium",children:m.definition.titleKo}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"mt-1 truncate text-xs text-muted-foreground",children:m.record.registrationName||m.record.identifierNumber||"상세 정보 확인 필요"})]}),e.jsx(ct,{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",variant:"outline",className:p.className,children:p.label})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",className:"mt-2 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground",children:[e.jsxs("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",children:["번호 ",m.record.identifierNumber||"미입력"]}),e.jsxs("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",children:["명의 ",m.record.holder||"미입력"]}),e.jsxs("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:213",children:["문서 ",m.documents.length]})]})]},m.record.id)})})]},u.id))})]})]})}function u2({country:t,selection:s,productId:c,managers:r}){if(!t||!s)return e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:218",className:"grid min-h-[24rem] place-items-center rounded-2xl border border-dashed bg-muted/10 p-6 text-center",children:e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:218",children:[e.jsx(NN,{"data-loc":"client/src/components/CertificationWorkspace.tsx:218",className:"mx-auto 
694size-9 text-muted-foreground"}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:218",className:"mt-3 text-sm font-semibold",children:"제품 또는 공통 요건을 선택하세요"}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:218",className:"mt-1 text-xs text-muted-foreground",children:"상세 정보 수정과 문서 다운로드를 이곳에서 처리합니다."})]})});if(s.kind==="common"){const u=t.commonRequirements.find(m=>m.procedure.id===s.procedureId);return u?e.jsx(hL,{"data-loc":"client/src/components/CertificationWorkspace.tsx:221",row:u,productId:c,managers:r}):null}const i=t.products.find(u=>u.id===s.countryProductId),o=i?.records.find(u=>u.record.id===s.recordId);return i&&o?e.jsx(gL,{"data-loc":"client/src/components/CertificationWorkspace.tsx:225",product:i,row:o,productId:c,managers:r}):null}function gL({product:t,row:s,productId:c,managers:r}){const i=q.useUtils(),[o,u]=v.useState(()=>x2(s,t));v.useEffect(()=>u(x2(s,t)),[s.record.id,s.record.updatedAt,t.updatedAt]);const m=q.gateway.certificationProcedures.updateProductRecord.useMutation(),p=q.gateway.certificationProcedures.updateCountryProduct.useMutation(),f=q.gateway.certificationProcedures.recordHistory.useQuery({productId:c,recordId:s.record.id}),b=async()=>{try{await Promise.all([p.mutateAsync({id:t.id,displayName:o.displayName.trim(),legalProductName:Lt(o.legalProductName)}),m.mutateAsync({id:s.record.id,status:o.status,registrationName:Lt(o.registrationName),identifierNumber:Lt(o.identifierNumber),holder:Lt(o.holder),authority:Lt(o.authority),issuedOn:Lt(o.issuedOn),expiresOn:o.neverExpires?null:Lt(o.expiresOn),neverExpires:o.neverExpires,assigneeUserId:o.assigneeUserId?Number(o.assigneeUserId):null,notes:Lt(o.notes)})]),await i.gateway.certificationProcedures.workspace.invalidate({productId:c}),X.success("제품과 인증 정보를 저장했습니다.")}catch(y){X.error(y instanceof Error?y.message:"인증 정보를 저장하지 못했습니다.")}},h=m.isPending||p.isPending;return e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:261",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:262",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:262",className:"text-xs font-medium text-primary",children:"제품별 인증·신고"}),e.jsx("h3",{"data-loc":"client/src/components/CertificationWorkspace.tsx:262",className:"mt-1 text-lg font-semibold",children:s.definition.titleKo}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:262",className:"text-xs text-muted-foreground",children:s.definition.authority})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:263",className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:264",label:"내부 제품명",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:264",value:o.displayName,onChange:y=>u(j=>({...j,displayName:y.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:265",label:"문서상 법정 제품명",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:265",value:o.legalProductName,onChange:y=>u(j=>({...j,legalProductName:y.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:266",label:"상태",children:e.jsxs(et,{"data-loc":"client/src/components/CertificationWorkspace.tsx:266",value:o.status,onValueChange:y=>u(j=>({...j,status:y})),children:[e.jsx(at,{"data-loc":"client/src/components/CertificationWorkspace.tsx:266",children:e.jsx(tt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:266"})}),e.jsxs(st,{"data-loc":"client/src/components/CertificationWorkspace.tsx:266",children:[e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:266",value:"draft",children:"분석 결과"}),e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:266",value:"needs_review",children:"확인 필요"}),e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:266",value:"active",children:"확인 완료"}),e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:266",value:"expired",children:"만료"}),e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:266",value:"superseded",children:"이전 버전"})]})]})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:267",label:"담당자",children:e.jsxs(et,{"data-loc":"client/src/components/CertificationWorkspace.tsx:267",value:o.assigneeUserId||"none",onValueChange:y=>u(j=>({...j,assigneeUserId:y==="none"?"":y})),children:[e.jsx(at,{"data-loc":"client/src/components/CertificationWorkspace.tsx:267",children:e.jsx(tt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:267"})}),e.jsxs(st,{"data-loc":"client/src/components/CertificationWorkspace.tsx:267",children:[e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:267",value:"none",children:"미지정"}),r.map(y=>e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:267",value:String(y.id),children:y.name||y.email||`사용자 ${y.id}`},y.id))]})]})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:268",label:"등록·신고번호",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:268",value:o.identifierNumber,onChange:y=>u(j=>({...j,identifierNumber:y.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:269",label:"명의자",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:269",value:o.holder,onChange:y=>u(j=>({...j,holder:y.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:270",label:"기관",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:270",value:o.authority,onChange:y=>u(j=>({...j,authority:y.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:271",label:"발급·신고일",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:271",type:"date",value:o.issuedOn,onChange:y=>u(j=>({...j,issuedOn:y.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:272",label:"만료·갱신일",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:272",type:"date",value:o.expiresOn,disabled:o.neverExpires,onChange:y=>u(j=>({...j,expiresOn:y.target.value}))})}),e.jsxs("label",{"data-loc":"client/src/components/CertificationWorkspace.tsx:273",className:"flex items-center gap-2 rounded-xl border px-3 py-2.5 text-sm",children:[e.jsx($a,{"data-loc":"client/src/components/CertificationWorkspace.tsx:273",checked:o.neverExpires,onCheckedChange:y=>u(j=>({...j,neverExpires:!!y,expiresOn:y?"":j.expiresOn}))}),e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:273",children:"만료 없음"})]})]}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:275",label:"내부 메모",children:e.jsx(pt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:275",value:o.notes,onChange:y=>u(j=>({...j,notes:y.target.value})),rows:3})}),e.jsx(G,{"data-loc":"client/src/components/CertificationWorkspace.tsx:276",className:"w-full",disabled:h||!o.displayName.trim(),onClick:()=>void b(),children:h?e.jsx(jt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:276",className:"size-4 animate-spin"}):"변경사항 저장"}),e.jsx(f3,{"data-loc":"client/src/components/CertificationWorkspace.tsx:277",documents:s.documents}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:278",className:"border-t pt-3",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:278",className:"text-xs font-semibold",children:"변경 이력"}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:278",className:"mt-2 space-y-2",children:[(f.data??[]).slice(0,5).map(y=>e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:278",className:"rounded-lg bg-muted/30 px-3 py-2 text-[11px] text-muted-foreground",children:[new Date(y.log.createdAt).toLocaleStr
694ing()," · ",y.changedByName||"시스템"," · ",y.log.action]},y.log.id)),f.data?.length===0&&e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:278",className:"text-xs text-muted-foreground",children:"아직 변경 이력이 없습니다."})]})]})]})}function hL({row:t,productId:s,managers:c}){const r=q.useUtils(),[i,o]=v.useState(()=>f2(t));v.useEffect(()=>o(f2(t)),[t.procedure.id,t.procedure.updatedAt]);const{data:u=[]}=q.gateway.certificationProcedures.entityHistory.useQuery({productId:s,entityType:"common_procedure",entityId:t.procedure.id}),m=q.gateway.certificationProcedures.update.useMutation({onSuccess:async()=>{await Promise.all([r.gateway.certificationProcedures.workspace.invalidate({productId:s}),r.gateway.certificationProcedures.list.invalidate({productId:s})]),X.success("국가 공통 요건을 저장했습니다.")},onError:f=>X.error(f.message)}),p=xL(t.definition.procedureType);return e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:302",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:303",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:303",className:"text-xs font-medium text-primary",children:"국가 공통 요건"}),e.jsx("h3",{"data-loc":"client/src/components/CertificationWorkspace.tsx:303",className:"mt-1 text-lg font-semibold",children:t.definition.titleKo}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:303",className:"mt-1 text-xs text-muted-foreground",children:t.definition.authority})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:304",className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:305",label:"상태",children:e.jsxs(et,{"data-loc":"client/src/components/CertificationWorkspace.tsx:305",value:i.status,onValueChange:f=>o(b=>({...b,status:f})),children:[e.jsx(at,{"data-loc":"client/src/components/CertificationWorkspace.tsx:305",children:e.jsx(tt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:305"})}),e.jsx(st,{"data-loc":"client/src/components/CertificationWorkspace.tsx:305",children:p.map(f=>e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:305",value:f,children:vL(f)},f))})]})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:306",label:"담당자",children:e.jsxs(et,{"data-loc":"client/src/components/CertificationWorkspace.tsx:306",value:i.assigneeUserId||"none",onValueChange:f=>o(b=>({...b,assigneeUserId:f==="none"?"":f})),children:[e.jsx(at,{"data-loc":"client/src/components/CertificationWorkspace.tsx:306",children:e.jsx(tt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:306"})}),e.jsxs(st,{"data-loc":"client/src/components/CertificationWorkspace.tsx:306",children:[e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:306",value:"none",children:"미지정"}),c.map(f=>e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:306",value:String(f.id),children:f.name||f.email||`사용자 ${f.id}`},f.id))]})]})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:307",label:"시설·책임자 번호",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:307",value:i.identifierNumber,onChange:f=>o(b=>({...b,identifierNumber:f.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:308",label:"명의자",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:308",value:i.holder,onChange:f=>o(b=>({...b,holder:f.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:309",label:"발급·신고일",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:309",type:"date",value:i.issuedOn,onChange:f=>o(b=>({...b,issuedOn:f.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:310",label:"만료·갱신일",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:310",type:"date",value:i.expiresOn,disabled:i.neverExpires,onChange:f=>o(b=>({...b,expiresOn:f.target.value}))})}),e.jsxs("label",{"data-loc":"client/src/components/CertificationWorkspace.tsx:311",className:"flex items-center gap-2 rounded-xl border px-3 py-2.5 text-sm",children:[e.jsx($a,{"data-loc":"client/src/components/CertificationWorkspace.tsx:311",checked:i.neverExpires,onCheckedChange:f=>o(b=>({...b,neverExpires:!!f,expiresOn:f?"":b.expiresOn}))}),e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:311",children:"만료 없음"})]})]}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:313",label:"확인 근거",children:e.jsx(pt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:313",value:i.completionEvidence,onChange:f=>o(b=>({...b,completionEvidence:f.target.value})),rows:2})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:314",label:"내부 메모",children:e.jsx(pt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:314",value:i.notes,onChange:f=>o(b=>({...b,notes:f.target.value})),rows:3})}),e.jsx(G,{"data-loc":"client/src/components/CertificationWorkspace.tsx:315",className:"w-full",disabled:m.isPending,onClick:()=>m.mutate({id:t.procedure.id,status:i.status,holder:Lt(i.holder),assigneeUserId:i.assigneeUserId?Number(i.assigneeUserId):null,identifierNumber:Lt(i.identifierNumber),issuedOn:Lt(i.issuedOn),expiresOn:i.neverExpires?null:Lt(i.expiresOn),neverExpires:i.neverExpires,completionEvidence:Lt(i.completionEvidence),completionSourceUrl:t.procedure.completionSourceUrl,notes:Lt(i.notes)}),children:m.isPending?e.jsx(jt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:315",className:"size-4 animate-spin"}):"변경사항 저장"}),e.jsx(f3,{"data-loc":"client/src/components/CertificationWorkspace.tsx:316",documents:t.documents}),u.length>0&&e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:317",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:317",className:"text-xs font-semibold",children:"최근 변경 이력"}),e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:317",className:"mt-2 space-y-2",children:u.slice(0,5).map(f=>e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:317",className:"rounded-lg border px-3 py-2 text-xs",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:317",children:f.log.action}),e.jsxs("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:317",className:"mt-1 text-muted-foreground",children:[f.changedByName||"시스템"," · ",new Date(f.log.createdAt).toLocaleStr
694ing()]})]},f.log.id))})]})]})}function f3({documents:t}){const s=q.useUtils(),c=async r=>{try{const i=await s.gateway.certificationProcedures.managedDocumentUrl.fetch({linkId:r});window.open(i.url,"_blank","noopener,noreferrer")}catch(i){X.error(i instanceof Error?i.message:"문서를 열지 못했습니다.")}};return e.jsxs("section",{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",className:"flex items-center justify-between",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",className:"text-xs font-semibold",children:"연결 문서"}),e.jsxs(ct,{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",variant:"outline",children:[t.length,"개"]})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",className:"mt-2 space-y-2",children:[t.map(r=>e.jsxs("button",{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",type:"button",onClick:()=>void c(r.id),className:"flex w-full items-center gap-3 rounded-xl border p-3 text-left transition hover:border-primary/40",children:[e.jsx(Eg,{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",className:"size-4 shrink-0 text-primary"}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",className:"min-w-0 flex-1",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",className:"truncate text-xs font-medium",children:r.displayFileName}),e.jsxs("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",className:"mt-0.5 truncate text-[11px] text-muted-foreground",children:["원본 ",r.originalFileName," · v",r.version]})]}),e.jsx(to,{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",className:"size-4 shrink-0"})]},r.id)),t.length===0&&e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:324",className:"rounded-xl border border-dashed p-4 text-center text-xs text-muted-foreground",children:"연결된 문서가 없습니다."})]})]})}function m2({productId:t,reviewAnalyses:s,onReview:c}){const r=q.useUtils(),i=v.useRef(null),[o,u]=v.useState(!1),[m,p]=v.useState([]),f=q.gateway.certificationProcedures.analyzeUpload.useMutation(),b=async h=>{for(const y of h.slice(0,10)){const j=crypto.randomUUID();p(N=>[...N,{id:j,name:y.name,state:"reading",detail:"파일 확인 중"}]);const S=N=>p(w=>w.map(T=>T.id===j?{...T,...N}:T));try{if(!["application/pdf","image/png","image/jpeg","image/webp"].includes(y.type))throw new Error("PDF·PNG·JPG·WebP만 업로드할 수 있습니다.");if(y.size>10*1024*1024)throw new Error("파일은 10MB 이하여야 합니다.");S({state:"analyzing",detail:"국가·제품·인증 정보를 분석 중"});const N=await f.mutateAsync({productId:t,fileName:y.name,mimeType:y.type,base64:await yL(y)});S({state:"done",detail:N.duplicate?"이미 등록된 동일 문서":N.matched?"국가·제품별로 등록됨":"분석 완료 · 확인 필요"})}catch(N){S({state:"error",detail:N instanceof Error?N.message:"분석 실패"})}}await Promise.all([r.gateway.certificationProcedures.workspace.invalidate({productId:t}),r.gateway.certificationProcedures.list.invalidate({productId:t})])};return e.jsx(Bt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"border-sky-200 bg-gradient-to-br from-sky-50/80 via-background to-violet-50/50",children:e.jsxs($t,{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"p-4 sm:p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"flex items-start gap-3",children:[e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"grid size-10 shrink-0 place-items-center rounded-xl bg-sky-600 text-white",children:e.jsx(Dt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"size-5"})}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",children:[e.jsx("h2",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"font-semibold",children:"인증서 업로드"}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"mt-1 text-xs leading-5 text-muted-foreground",children:"국가·제품·번호를 자동 분석해 제안합니다. 내 인증 관리에는 담당자가 최종 확인한 뒤 등록됩니다."})]})]}),e.jsxs("button",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",type:"button",onClick:()=>i.current?.click(),onDragEnter:h=>{h.preventDefault(),u(!0)},onDragOver:h=>h.preventDefault(),onDragLeave:h=>{h.preventDefault(),u(!1)},onDrop:h=>{h.preventDefault(),u(!1),b(Array.from(h.dataTransfer.files))},className:`mt-4 flex w-full flex-col items-center rounded-2xl border-2 border-dashed px-4 py-6 text-center transition ${o?"border-sky-500 bg-sky-100":"border-sky-200 bg-white/70 hover:border-sky-400"}`,children:[e.jsx(Pf,{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"size-7 text-sky-600"}),e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"mt-2 text-sm font-semibold",children:"파일ì
694„ 끌어오거나 눌러서 선택"}),e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"mt-1 text-xs text-muted-foreground",children:"PDF·PNG·JPG·WebP · 파일당 10MB"})]}),e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",ref:i,type:"file",multiple:!0,accept:".pdf,.png,.jpg,.jpeg,.webp",className:"hidden",onChange:h=>{b(Array.from(h.target.files??[])),h.target.value=""}}),m.length>0&&e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"mt-3 grid gap-2 sm:grid-cols-2",children:m.slice(-6).map(h=>e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"flex items-center gap-2 rounded-xl border bg-white/80 px-3 py-2",children:[h.state==="reading"||h.state==="analyzing"?e.jsx(jt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"size-4 animate-spin text-sky-600"}):h.state==="done"?e.jsx(Dn,{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"size-4 text-emerald-600"}):e.jsx(Tg,{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"size-4 text-rose-600"}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"truncate text-xs font-medium",children:h.name}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",className:"truncate text-[11px] text-muted-foreground",children:h.detail})]})]},h.id))}),s.length>0&&e.jsxs("button",{"data-loc":"client/src/components/CertificationWorkspace.tsx:330",type:"button",className:"mt-3 text-xs font-semibold text-amber-700",onClick:()=>c(s[0]),children:["최종 확인 ",s.length,"ê±´ 바로 처리"]})]})})}function bL({productId:t,data:s,row:c,onOpenChange:r}){const i=q.useUtils(),[o,u]=v.useState(""),[m,p]=v.useState(""),[f,b]=v.useState(""),[h,y]=v.useState({productName:"",identifierNumber:"",holder:"",issuedOn:"",expiresOn:""}),[j,S]=v.useState(!1),N=Array.from(new Map(s.procedureOptions.map(R=>[R.iso2,R.countryNameKo])).entries()),w=s.procedureOptions.filter(R=>R.iso2===o),T=w.find(R=>String(R.id)===m),k=s.countries.find(R=>R.iso2===o)?.products??[];v.useEffect(()=>{if(!c)return;const R=c.extractedIso2??"",P=s.procedureOptions.find(H=>H.iso2===R&&H.procedureType===c.extractedProcedureType),A=c.extractedProductName??"",V=s.countries.find(H=>H.iso2===R)?.products.find(H=>[H.displayName,H.legalProductName].some(M=>p2(M)===p2(A)));u(R),p(P?String(P.id):""),b(V?String(V.id):"new"),y({productName:A,identifierNumber:c.extractedIdentifierNumber??"",holder:c.extractedHolder??"",issuedOn:c.extractedIssuedOn??"",expiresOn:c.extractedExpiresOn??""}),S(c.completionState==="completed")},[c?.id,s.countries,s.procedureOptions]);const E=q.gateway.certificationProcedures.confirmAnalysis.useMutation({onSuccess:async()=>{await Promise.all([i.gateway.certificationProcedures.workspace.invalidate({productId:t}),i.gateway.certificationProcedures.list.invalidate({productId:t})]),X.success("문서를 확인하고 인증 관리에 등록했습니다."),r(!1)},onError:R=>X.error(R.message)}),z=async()=>{if(c)try{const R=await i.gateway.certificationProcedures.analysisFileUrl.fetch({id:c.id});window.open(R.url,"_blank","noopener,noreferrer")}catch(R){X.error(R instanceof Error?R.message:"원본 문서를 열지 못했습니다.")}},_=T?.target==="product"&&(!f||f==="new");return e.jsx(dw,{"data-loc":"client/src/components/CertificationWorkspace.tsx:382",open:!!c,onOpenChange:r,children:e.jsxs(uw,{"data-loc":"client/src/components/CertificationWorkspace.tsx:383",className:"w-full overflow-y-auto sm:max-w-xl",children:[e.jsxs(mw,{"data-loc":"client/src/components/CertificationWorkspace.tsx:384",children:[e.jsx(pw,{"data-loc":"client/src/components/CertificationWorkspace.tsx:384",children:"분석 ê²°ê³¼ 확인"}),e.jsx(xw,{"data-loc":"client/src/components/CertificationWorkspace.tsx:384",children:"원본을 확인하고 노란 항목만 수정한 뒤 실제 인증 관리에 확정합니다."})]}),c&&e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:385",className:"space-y-4 px-4 pb-6",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:386",className:"rounded-xl border border-amber-200 bg-amber-50 p-3 text-sm",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:387",className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:387",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:387",className:"truncate font-semibold",children:c.fileName}),e.jsxs("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:387",className:"mt-1 text-xs text-muted-foreground",children:["분석 국가 ",c.extractedCountryName||c.extractedIso2||"미확인"," · 신뢰도 ",c.confidence||"미확인"]})]}),e.jsxs(G,{"data-loc":"client/src/components/CertificationWorkspace.tsx:387",variant:"outline",size:"sm",onClick:()=>void z(),children:[e.jsx(jN,{"data-loc":"client/src/components/CertificationWorkspace.tsx:387",className:"mr-1 size-3.5"}),"원본 보기"]})]}),c.reviewReason&&e.jsxs("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:388",className:"mt-2 rounded-lg bg-white/70 px-2 py-1.5 text-xs text-amber-800",children:["확인 사유 · ",c.reviewReason]}),c.warnings.length>0&&e.jsx("ul",{"data-loc":"client/src/components/CertificationWorkspace.tsx:389",className:"mt-2 list-disc space-y-1 pl-4 text-xs text-amber-800",children:c.warnings.map(R=>e.jsx("li",{"data-loc":"client/src/components/CertificationWorkspace.tsx:389",children:R},R))})]}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:391",className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:392",label:"1. 국가",children:e.jsxs(et,{"data-loc":"client/src/components/CertificationWorkspace.tsx:392",value:o,onValueChange:R=>{u(R),p(""),b("new")},children:[e.jsx(at,{"data-loc":"client/src/components/CertificationWorkspace.tsx:392",children:e.jsx(tt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:392",placeholder:"국가 선택"})}),e.jsx(st,{"data-loc":"client/src/components/CertificationWorkspace.tsx:392",children:N.map(([R,P])=>e.jsxs(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:392",value:R,children:[P," · ",R]},R))})]})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:393",label:"2. 인증·신고 절차",children:e.jsxs(et,{"data-loc":"client/src/components/CertificationWorkspace.tsx:393",value:m,onValueChange:R=>{p(R),b("new")},children:[e.jsx(at,{"data-loc":"client/src/components/CertificationWorkspace.tsx:393",children:e.jsx(tt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:393",placeholder:"절차 선택"})}),e.jsx(st,{"data-loc":"client/src/components/CertificationWorkspace.tsx:393",children:w.map(R=>e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:393",value:String(R.id),children:R.titleKo},R.id))})]})})]}),T?.target==="product"&&e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:395",label:"3. 연결 제품",children:e.jsxs(et,{"data-loc":"client/src/components/CertificationWorkspace.tsx:395",value:f||"new",onValueChange:b,children:[e.jsx(at,{"data-loc":"client/src/components/CertificationWorkspace.tsx:395",children:e.jsx(tt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:395"})}),e.jsxs(st,{"data-loc":"client/src/components/CertificationWorkspace.tsx:395",children:[e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:395",value:"new",children:"분석된 제품명으로 새 항목"}),k.map(R=>e.jsx(ve,{"data-loc":"client/src/components/CertificationWorkspace.tsx:395",value:String(R.id),children:R.displayName},R.id))]})]})}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:396",className:"grid gap-3 sm:grid-cols-2",children:[T?.target==="product"&&e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:397",label:"제품명",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:397",value:h.productName,onChange:R=>y(P=>({...P,productName:R.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:398",label:"등록·신고번호",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:398",value:h.identifierNumber,onChange:R=>y(P=>
694({...P,identifierNumber:R.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:399",label:"명의자",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:399",value:h.holder,onChange:R=>y(P=>({...P,holder:R.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:400",label:"발급·신고일",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:400",type:"date",value:h.issuedOn,onChange:R=>y(P=>({...P,issuedOn:R.target.value}))})}),e.jsx(xt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:401",label:"만료·갱신일",children:e.jsx(Ce,{"data-loc":"client/src/components/CertificationWorkspace.tsx:401",type:"date",value:h.expiresOn,onChange:R=>y(P=>({...P,expiresOn:R.target.value}))})})]}),c.evidence.length>0&&e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:403",className:"rounded-xl border bg-muted/20 p-3",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:403",className:"text-xs font-semibold",children:"문서 근거"}),c.evidence.slice(0,3).map(R=>e.jsxs("blockquote",{"data-loc":"client/src/components/CertificationWorkspace.tsx:403",className:"mt-2 border-l-2 pl-3 text-xs text-muted-foreground",children:["p.",R.page," · ",R.quote]},`${R.page}-${R.quote}`))]}),e.jsxs("label",{"data-loc":"client/src/components/CertificationWorkspace.tsx:404",className:"flex items-start gap-2 rounded-xl border p-3 text-sm",children:[e.jsx($a,{"data-loc":"client/src/components/CertificationWorkspace.tsx:404",checked:j,onCheckedChange:R=>S(!!R)}),e.jsxs("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:404",children:[e.jsx("b",{"data-loc":"client/src/components/CertificationWorkspace.tsx:404",children:"문서 완료 근거까지 확정"}),e.jsx("span",{"data-loc":"client/src/components/CertificationWorkspace.tsx:404",className:"mt-1 block text-xs text-muted-foreground",children:"원본에 완료 사실과 번호가 명확할 때만 선택합니다."})]})]}),e.jsx(G,{"data-loc":"client/src/components/CertificationWorkspace.tsx:405",className:"w-full",disabled:!m||_&&!h.productName.trim()||E.isPending,onClick:()=>E.mutate({analysisId:c.id,procedureId:Number(m),applyCompletion:j,countryProductId:f&&f!=="new"?Number(f):null,productDisplayName:Lt(h.productName),corrections:{productName:Lt(h.productName),identifierNumber:Lt(h.identifierNumber),holder:Lt(h.holder),issuedOn:Lt(h.issuedOn),expiresOn:Lt(h.expiresOn)}}),children:E.isPending?e.jsx(jt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:405",className:"size-4 animate-spin"}):"확정 등록"})]})]})})}function xt({label:t,children:s}){return e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:411",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/components/CertificationWorkspace.tsx:411",className:"text-xs text-muted-foreground",children:t}),s]})}function Lt(t){return t.trim()||null}function p2(t){return(t??"").normalize("NFKC").toLowerCase().replace(/[^a-z0-9가-힣一-龥]+/g,"")}function x2(t,s){return{displayName:s.displayName,legalProductName:s.legalProductName??"",status:t.record.status,registrationName:t.record.registrationName??"",identifierNumber:t.record.identifierNumber??"",holder:t.record.holder??"",authority:t.record.authority??"",issuedOn:t.record.issuedOn??"",expiresOn:t.record.expiresOn??"",neverExpires:!!t.record.neverExpires,assigneeUserId:t.record.assigneeUserId?String(t.record.assigneeUserId):"",notes:t.record.notes??""}}function f2(t){return{status:t.procedure.status,identifierNumber:t.procedure.identifierNumber??"",holder:t.procedure.holder??"",issuedOn:t.procedure.issuedOn??"",expiresOn:t.procedure.expiresOn??"",neverExpires:!!t.procedure.neverExpires,assigneeUserId:t.procedure.assigneeUserId?String(t.procedure.assigneeUserId):"",completionEvidence:t.procedure.completionEvidence??"",notes:t.procedure.notes??""}}function vL(t){return{not_started:"미시작",needs_classification:"분류 확인 필요",needs_action:"조치 필요",in_progress:"진행 중",filed_or_listed:"신고·리스팅 완료",registered_or_approved:"허가·등록 완료",not_applicable:"해당 없음"}[t]??t}function yL(t){return new Promise((s,c)=>{const r=new FileReader;r.onerror=()=>
694c(new Error("파일을 읽지 못했습니다.")),r.onload=()=>s(String(r.result).split(",")[1]??""),r.readAsDataURL(t)})}function jL(){return e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:418",className:"space-y-4",children:[e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:418",className:"grid grid-cols-2 gap-2 lg:grid-cols-4",children:Array.from({length:4},(t,s)=>e.jsx("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:418",className:"h-24 animate-pulse rounded-2xl border bg-muted/35"},s))}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:418",className:"flex items-start gap-3 rounded-2xl border border-sky-200 bg-sky-50 p-5",children:[e.jsx(jt,{"data-loc":"client/src/components/CertificationWorkspace.tsx:418",className:"size-5 animate-spin text-sky-600"}),e.jsxs("div",{"data-loc":"client/src/components/CertificationWorkspace.tsx:418",children:[e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:418",className:"font-semibold",children:"보유 인증을 국가와 제품별로 정리하는 중입니다"}),e.jsx("p",{"data-loc":"client/src/components/CertificationWorkspace.tsx:418",className:"mt-1 text-xs text-muted-foreground",children:"실제 문서와 변경 이력만 불러옵니다."})]})]})]})}function NL(){const{activeProductId:t,activeProduct:s,products:c,setActiveProductId:r,isLoading:i}=Mn(),o=t??0,{data:u}=q.gateway.countries.list.useQuery(),{data:m}=q.gateway.products.get.useQuery({id:o},{enabled:o>0});return i?e.jsxs("div",{"data-loc":"client/src/pages/CertificationMapPage.tsx:34",className:"page-shell",children:[e.jsxs("header",{"data-loc":"client/src/pages/CertificationMapPage.tsx:35",children:[e.jsx("p",{"data-loc":"client/src/pages/CertificationMapPage.tsx:36",className:"page-kicker",children:"Product Certification Operations"}),e.jsx("h1",{"data-loc":"client/src/pages/CertificationMapPage.tsx:37",className:"page-heading mt-1",children:"제품 인증 관리"}),e.jsx("p",{"data-loc":"client/src/pages/CertificationMapPage.tsx:38",className:"mt-1.5 text-sm text-muted-foreground",children:"보유 인증과 등록 문서를 불러오고 있습니다."})]}),e.jsx("div",{"data-loc":"client/src/pages/CertificationMapPage.tsx:40",className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:Array.from({length:4},(p,f)=>e.jsx(we,{"data-loc":"client/src/pages/CertificationMapPage.tsx:41",className:"h-24 rounded-2xl"},f))}),e.jsxs("div",{"data-loc":"client/src/pages/CertificationMapPage.tsx:43",className:"rounded-2xl border border-sky-200 bg-sky-50/70 p-5",children:[e.jsx(we,{"data-loc":"client/src/pages/CertificationMapPage.tsx:44",className:"h-5 w-40"}),e.jsx(we,{"data-loc":"client/src/pages/CertificationMapPage.tsx:45",className:"mt-3 h-4 w-full max-w-xl"})]})]}):c.length===0||!s?e.jsxs("div",{"data-loc":"client/src/pages/CertificationMapPage.tsx:53",className:"page-shell",children:[e.jsxs("header",{"data-loc":"client/src/pages/CertificationMapPage.tsx:54",children:[e.jsx("p",{"data-loc":"client/src/pages/CertificationMapPage.tsx:55",className:"page-kicker",children:"Product Certification Operations"}),e.jsx("h1",{"data-loc":"client/src/pages/CertificationMapPage.tsx:56",className:"page-heading mt-1",children:"제품 인증 관리"})]}),e.jsxs("div",{"data-loc":"client/src/pages/CertificationMapPage.tsx:58",className:"rounded-2xl border border-dashed bg-card p-10 text-center",children:[e.jsx(Ha,{"data-loc":"client/src/pages/CertificationMapPage.tsx:59",className:"mx-auto size-9 text-muted-foreground"}),e.jsx("h2",{"data-loc":"client/src/pages/CertificationMapPage.tsx:60",className:"mt-3 font-semibold",children:"먼저 제품을 등록하세요"}),e.jsx("p",{"data-loc":"client/src/pages/CertificationMapPage.tsx:61",className:"mt-1 text-sm text-muted-foreground",children:"제품 홈페이지 분석 결과와 국가 규칙을 연결해 인증 관리표를 만듭니다."}),e.jsx(G,{"data-loc":"client/src/pages/CertificationMapPage.tsx:64",asChild:!0,className:"mt-4 gap-1.5",children:e.jsxs(rt,{"data-loc":"client/src/pages/CertificationMapPage.tsx:65",href:"/products",children:["제품 등록하기",e.jsx(ss,{"data-loc":"client/src/pages/CertificationMapPage.tsx:67",className:"size-4"})]})})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/CertificationMapPage.tsx:76",className:"page-shell",children:[e.jsxs("header",{"data-loc":"client/src/pages/CertificationMapPage.tsx:77",className:"flex flex-wrap items-end justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/CertificationMapPage.tsx:78",children:[e.jsx("p",{"data-loc":"client/src/pages/CertificationMapPage.tsx:79",className:"page-kicker",children:"Product Certification Operations"}),e.jsx("h1",{"data-loc":"client/src/pages/CertificationMapPage.tsx:80",className:"page-heading mt-1",children:"제품 인증 관리"}),e.jsx("p",{"data-loc":"client/src/pages/CertificationMapPage.tsx:81",className:"mt-1.5 max-w-3xl text-sm leading-relaxed text-muted-foreground",children:"등록된 인증의 담당자·만료일·등록증·다음 조치를 먼저 관리하고, 새 국가 조건은 필요할 때만 펼쳐 봅니다."})]}),e.jsxs("div",{"data-loc":"client/src/pages/CertificationMapPage.tsx:86",className:"w-full sm:w-64",children:[e.jsx(_e,{"data-loc":"client/src/pages/CertificationMapPage.tsx:87",className:"mb-1.5 block text-xs text-muted-foreground",children:"관리할 제품"}),e.jsxs(et,{"data-loc":"client/src/pages/CertificationMapPage.tsx:88",value:String(s.id),onValueChange:p=>r(Number(p)),children:[e.jsx(at,{"data-loc":"client/src/pages/CertificationMapPage.tsx:92",className:"bg-background",children:e.jsx(tt,{"data-loc":"client/src/pages/CertificationMapPage.tsx:93"})}),e.jsx(st,{"data-loc":"client/src/pages/CertificationMapPage.tsx:95",children:c.map(p=>e.jsx(ve,{"data-loc":"client/src/pages/CertificationMapPage.tsx:97",value:String(p.id),children:p.name},p.id))})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/CertificationMapPage.tsx:106",className:"flex items-start gap-2 rounded-xl border border-sky-200 bg-sky-50/80 px-4 py-3 text-sm text-sky-950",children:[e.jsx(Dt,{"data-loc":"client/src/pages/CertificationMapPage.tsx:107",className:"mt-0.5 size-4 shrink-0 text-sky-700"}),e.jsx("p",{"data-loc":"client/src/pages/CertificationMapPage.tsx:108",children:"인증서를 올리면 국가·제품·신고 유형을 분석합니다. 실제 보유 문서만 가운데 작업공간에 표시되며, 미보유 국가 요건은 하단 글로벌 뷰티 지도에서 확인합니다."})]}),e.jsx(fL,{"data-loc":"client/src/pages/CertificationMapPage.tsx:114",productId:o,countries:u??[],certifications:(m?.certs??[]).map(p=>({id:p.id,productId:p.productId,iso2:p.iso2,status:p.status,detail:p.detail,holder:p.holder,registrationNumber:p.registrationNumber,issuedOn:p.issuedOn,expiresOn:p.expiresOn,neverExpires:p.neverExpires,assigneeUserId:p.assigneeUserId,notes:p.notes,updatedAt:p.updatedAt}))})]})}const g2={catalog:"카탈로그·소개서",image:"제품 이미지",video:"영상",brand_guide:"브랜드 가이드",approved_claims:"승인 문구",technical_data:"성분·기술자료",clinical_evidence:"임상·효능 근거",certification:"인증·규제 자료",pricing_moq:"가격·MOQ",other:"기타 자료"},CL={name:"제품명",brandUrl:"브랜드 홈페이지",category:"제품 카테고리",tagline:"한 줄 소개",keyIngredients:"핵심 성분·기술",differentiators:"차별점",patents:"특허",factsheet:"제품 팩트시트",targetChannel:"타겟 채널"};function wL(t){const s=Math.max(0,t.totalFiles),c=Math.min(s,t.anal
694yzedFiles+t.failedFiles);return{collectPercent:s===0?0:Math.round(Math.min(s,t.collectedFiles)/s*100),analyzePercent:s===0?0:Math.round(c/s*100),isFinished:t.status==="review_required"||t.status==="completed"||t.status==="failed"}}const SL={catalog:Cn,image:dA,video:LA,brand_guide:Mf,approved_claims:Dn,technical_data:Cn,clinical_evidence:Dn,certification:Mf,pricing_moq:Cn,other:bl},TL={accessible:{label:"사용 가능",className:"border-emerald-200 bg-emerald-50 text-emerald-700"},unchecked:{label:"확인 전",className:"border-slate-200 bg-slate-50 text-slate-600"},permission_required:{label:"권한 필요",className:"border-amber-200 bg-amber-50 text-amber-700"},unavailable:{label:"접근 불가",className:"border-rose-200 bg-rose-50 text-rose-700"}},tf={pending:{label:"분석 대기",className:"border-slate-200 bg-slate-50 text-slate-600"},processing:{label:"분석 중",className:"border-sky-200 bg-sky-50 text-sky-700"},analyzed:{label:"검토 완료",className:"border-emerald-200 bg-emerald-50 text-emerald-700"},needs_review:{label:"최종 확인 필요",className:"border-amber-200 bg-amber-50 text-amber-700"},failed:{label:"분석 실패",className:"border-rose-200 bg-rose-50 text-rose-700"}},kL={new:{label:"신규값",className:"border-sky-200 bg-sky-50 text-sky-700"},supplement:{label:"보완값",className:"border-violet-200 bg-violet-50 text-violet-700"},same:{label:"동일값",className:"border-slate-200 bg-slate-50 text-slate-600"},conflict:{label:"충돌값",className:"border-rose-200 bg-rose-50 text-rose-700"},insufficient:{label:"근거 부족",className:"border-amber-200 bg-amber-50 text-amber-700"}};function h2(t,s){if(!t)return s;try{return JSON.parse(t)}catch{return s}}function DL(t){return new Promise((s,c)=>{const r=new FileReader;r.onerror=()=>c(new Error("파일을 읽지 못했습니다.")),r.onload=()=>s(String(r.result??"").split(",")[1]??""),r.readAsDataURL(t)})}function af(t){return t?t<1024*1024?`${Math.ceil(t/1024).toLocaleString()}KB`:`${(t/(1024*1024)).toFixed(1)}MB`:null}function EL(){const{activeProductId:t,activeProduct:s,isLoading:c}=Mn(),r=q.useUtils(),i=v.useRef(null),[o,u]=v.useState("upload"),[m,p]=v.useState(!1),[f,b]=v.useState([]),[h,y]=v.useState(""),[j,S]=v.useState(null),[N,w]=v.useState({}),[T,k]=v.useState({}),E=q.gateway.productAssets.list.useQuery({productId:t??0},{enabled:!!t}),z=q.gateway.productAssets.listRuns.useQuery({productId:t??0},{enabled:!!t}),_=j??z.data?.find(Q=>Q.status==="review_required"||Q.status==="analyzing")?.id??null,R=q.gateway.productAssets.runDetail.useQuery({runId:_??0},{enabled:!!_}),P=q.gateway.productAssets.startUploadBatch.useMutation(),A=q.gateway.productAssets.uploadBatchFile.useMutation(),V=q.gateway.productAssets.finishUploadBatch.useMutation(),H=q.gateway.productAssets.analyzeRun.useMutation(),M=q.gateway.productAssets.registerLink.useMutation(),B=q.gateway.productAssets.update.useMutation({onSuccess:()=>E.refetch(),onError:Q=>X.error(Q.message)}),I=q.gateway.productAssets.remove.useMutation({onSuccess:async()=>{X.success("제품 자료 연결을 해제했습니다."),await Promise.all([E.refetch(),z.refetch()])},onError:Q=>X.error(Q.message)}),ie=q.gateway.productAssets.checkAccess.useMutation({onSuccess:async Q=>{X[Q.accessStatus==="accessible"?"success":"warning"](Q.message),await E.refetch()},onError:Q=>X.error(Q.message)}),se=q.gateway.productAssets.syncDrive.useMutation(),L=q.gateway.productAssets.reviewAsset.useMutation(),F=q.gateway.productAssets.reviewProposal.useMutation(),W=q.gateway.productAssets.open.useMutation({onSuccess:Q=>window.open(Q.url,"_blank","noopener,noreferrer"),onError:Q=>X.error(Q.message)}),ce=async()=>{await Promise.all([E.refetch(),z.refetch(),R.refetch(),r.gateway.products.list.invalidate()])},ge=E.data??[],O=v.useMemo(()=>({total:ge.length,outreach:ge.filter(Q=>Q.useInOutreach).length,needsReview:ge.filter(Q=>Q.analysisStatus==="needs_review").length,needsAccess:ge.filter(Q=>Q.accessStatus!=="accessible").length}),[ge]),te=z.data?.[0]?wL(z.data[0]):null,Y=async Q=>{S(Q);const xe=await H.mutateAsync({runId:Q});X[xe.failedFiles>0?"warning":"success"](`자동 분석 완료 · 성공 ${xe.analyzedFiles} · 실패 ${xe.failedFiles} · 사장님 최종 확인 필요`),await ce()},ne=async()=>
694{if(!t||f.length===0)return;const Q=f.find(xe=>xe.size>20*1024*1024);if(Q){X.error(`${Q.name}: 파일은 20MB 이하여야 합니다.`);return}try{const xe=await P.mutateAsync({productId:t,fileCount:f.length});S(xe.runId);for(const Ue of f)await A.mutateAsync({runId:xe.runId,fileName:Ue.name,mimeType:Ue.type,base64:await DL(Ue)});const Le=await V.mutateAsync({runId:xe.runId});X.success(`${f.length}개 파일 수집 완료 · 중복 ${Le.duplicateCount}개 건너뜀`),b([]),await Y(xe.runId)}catch(xe){X.error(xe instanceof Error?xe.message:"일괄 업로드를 완료하지 못했습니다."),await ce()}},pe=async Q=>{try{const xe=await se.mutateAsync({id:Q});X[xe.failed?"warning":"success"](`Drive 업데이트 · 신규 ${xe.created} · 변경 ${xe.changed} · 동일 ${xe.unchanged} · 삭제 ${xe.removed}${xe.failed?` · 실패 ${xe.failed}`:""}`),S(xe.runId),xe.created+xe.changed>0?await Y(xe.runId):await ce()}catch(xe){X.error(xe instanceof Error?xe.message:"Drive 업데이트를 확인하지 못했습니다.")}},be=async()=>{if(!t||!h.trim()){X.error("Google Drive 파일 또는 폴더 공개 링크를 입력해 주세요.");return}const Q=h.trim();try{const xe=await M.mutateAsync({productId:t,sourceUrl:Q});X[xe.accessStatus==="accessible"?"success":"warning"](xe.message),y(""),Q.includes("drive.google.com")&&xe.accessStatus==="accessible"?await pe(xe.id):await ce()}catch(xe){X.error(xe instanceof Error?xe.message:"자료 링크를 등록하지 못했습니다.")}},le=async(Q,xe)=>{const Le=N[Q.id]??{};await L.mutateAsync({id:Q.id,assetType:Le.assetType??Q.assetType,title:Le.title??Q.title,description:Le.description??Q.description??null,language:Le.language??Q.language??null,iso2:(Le.iso2??Q.iso2)||null,useInOutreach:Q.analysisStatus==="failed"?!1:Le.useInOutreach??xe==="approved",decision:xe}),X.success(xe==="approved"?"자료 분류를 승인했습니다.":"이 자료를 제품 반영에서 제외했습니다."),await ce()},he=async(Q,xe)=>{const Le=Q.proposalType==="supplement"&&Q.currentValue?`${Q.currentValue}
695${Q.proposedValue??""}`.trim():Q.proposedValue??"";await F.mutateAsync({id:Q.id,decision:xe,approvedValue:xe==="approved"?T[Q.id]??Le:null}),X.success(xe==="approved"?"승인한 값을 제품 관리 정보에 반영했습니다.":"제품 정보 제안을 제외했습니다."),await ce()};if(c)return e.jsx("div",{"data-loc":"client/src/pages/ProductAssets.tsx:297",className:"page-shell",children:e.jsx("div",{"data-loc":"client/src/pages/ProductAssets.tsx:297",className:"h-40 animate-pulse rounded-2xl border bg-muted/40"})});if(!t||!s)return e.jsx("div",{"data-loc":"client/src/pages/ProductAssets.tsx:301",className:"page-shell",children:e.jsx(Bt,{"data-loc":"client/src/pages/ProductAssets.tsx:302",children:e.jsxs($t,{"data-loc":"client/src/pages/ProductAssets.tsx:302",className:"py-12 text-center",children:[e.jsx(bl,{"data-loc":"client/src/pages/ProductAssets.tsx:303",className:"mx-auto size-10 text-muted-foreground"}),e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:304",className:"mt-3 font-semibold",children:"먼저 제품을 등록해 주세요"}),e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:305",className:"mt-1 text-sm text-muted-foreground",children:"제품 자료는 제품별로 분리해 관리합니다."})]})})});const Pe=R.data?.assets.filter(Q=>Q.analysisStatus==="needs_review"||Q.analysisStatus==="failed")??[],Re=R.data?.proposals.filter(Q=>Q.status==="pending")??[];return e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:315",className:"page-shell max-w-7xl space-y-5",children:[e.jsxs("header",{"data-loc":"client/src/pages/ProductAssets.tsx:316",className:"rounded-2xl border border-border/70 bg-white/85 p-5 shadow-[0_18px_45px_-34px_rgba(18,35,61,.5)] md:p-6",children:[e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:317",className:"page-kicker",children:"Product Asset Library"}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:318",className:"mt-1 flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:319",children:[e.jsx("h1",{"data-loc":"client/src/pages/ProductAssets.tsx:320",className:"page-heading",children:"제품 자료실"}),e.jsxs("p",{"data-loc":"client/src/pages/ProductAssets.tsx:321",className:"mt-1 text-sm text-muted-foreground",children:[e.jsx("strong",{"data-loc":"client/src/pages/ProductAssets.tsx:321",children:s.name}),"의 파일·Drive 폴더를 자동 분류하고, 확인한 값만 제품 정보와 콜드메일에 사용합니다."]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:323",className:"flex flex-wrap gap-2",children:[e.jsxs(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:324",variant:"outline",children:["전체 ",O.total]}),e.jsxs(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:325",variant:"outline",className:"border-emerald-200 bg-emerald-50 text-emerald-700",children:["자동 사용 ",O.outreach]}),O.needsReview>0&&e.jsxs(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:326",variant:"outline",className:"border-amber-200 bg-amber-50 text-amber-700",children:["최종 확인 ",O.needsReview]}),O.needsAccess>0&&e.jsxs(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:327",variant:"outline",className:"border-amber-200 bg-amber-50 text-amber-700",children:["권한 확인 ",O.needsAccess]})]})]})]}),z.data?.[0]&&te&&e.jsx(Bt,{"data-loc":"client/src/pages/ProductAssets.tsx:333",className:"border-sky-200 bg-sky-50/60",children:e.jsxs($t,{"data-loc":"client/src/pages/ProductAssets.tsx:333",className:"flex flex-col gap-3 py-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:334",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:335",className:"flex items-center gap-2",children:[e.jsx(Dt,{"data-loc":"client/src/pages/ProductAssets.tsx:335",className:"size-4 text-sky-700"}),e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:335",className:"font-semibold",children:"최근 자동 정리"}),e.jsx(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:335",variant:"outline",children:z.data[0].status})]}),e.jsxs("p",{"data-loc":"client/src/pages/ProductAssets.tsx:336",className:"mt-1 text-xs text-muted-foreground",children:["수집 ",z.data[0].collectedFiles,"/",z.data[0].totalFiles," · 분석 ",z.data[0].analyzedFiles," · 실패 ",z.data[0].failedFiles," · 동일 ",z.data[0].unchangedFiles]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:338",className:"w-full md:max-w-xs",children:[e.jsx(dS,{"data-loc":"client/src/pages/ProductAssets.tsx:338",value:Math.max(te.collectPercent,te.analyzePercent)}),e.jsxs("p",{"data-loc":"client/src/pages/ProductAssets.tsx:338",className:"mt-1 text-right text-xs text-muted-foreground",children:["분석 ",te.analyzePercent,"%"]})]})]})}),(Pe.length>0||Re.length>0)&&e.jsxs(Bt,{"data-loc":"client/src/pages/ProductAssets.tsx:343",className:"border-amber-200 bg-amber-50/35",children:[e.jsxs(xs,{"data-loc":"client/src/pages/ProductAssets.tsx:344",children:[e.jsxs(fs,{"data-loc":"client/src/pages/ProductAssets.tsx:345",className:"flex items-center gap-2 text-base",children:[e.jsx(Dt,{"data-loc":"client/src/pages/ProductAssets.tsx:345",className:"size-4 text-amber-700"}),"자동 분석 결과 · 사장님 최종 확인"]}),e.jsx(gs,{"data-loc":"client/src/pages/ProductAssets.tsx:346",children:"자동 분류와 제품 정보 후보입니다. 기존 제품 정보는 승인 전까지 바뀌지 않습니다."})]}),e.jsxs($t,{"data-loc":"client/src/pages/ProductAssets.tsx:348",className:"space-y-5",children:[Pe.map(Q=>{const xe=h2(Q.extractedJson,{}),Le=N[Q.id]??{};return e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:353",className:"rounded-2xl border bg-white p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:354",className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:355",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:356",className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:357",className:"font-semibold",children:Q.originalFileName??Q.title}),e.jsx(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:358",variant:"outline",className:tf[Q.analysisStatus].className,children:tf[Q.analysisStatus].label}),xe.productMatched===!1&&e.jsx(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:359",variant:"outline",className:"border-rose-200 bg-rose-50 text-rose-700",children:"제품 불일치 의심"})]}),e.jsxs("p",{"data-loc":"client/src/pages/ProductAssets.tsx:361",className:"mt-1 text-xs text-muted-foreground",children:["문서 제품명: ",xe.productNameInDocument||"확인 필요"," · 모델 신뢰도 ",Q.classificationConfidence??"low"]})]}),e.jsxs(G,{"data-loc":"client/src/pages/ProductAssets.tsx:363",size:"sm",variant:"outline",onClick:()=>W.mutate({id:Q.id}),children:[e.jsx(yc,{"data-loc":"client/src/pages/ProductAssets.tsx:363",className:"mr-1.5 size-4"}),"원본 보기"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:365",className:"mt-4 grid gap-3 md:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:366",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/ProductAssets.tsx:366",children:"자료 종류"}),e.jsxs(et,{"data-loc":"client/src/pages/ProductAssets.tsx:366",value:Le.assetType??Q.assetType,onValueChange:Ue=>w(Ye=>({...Ye,[Q.id]:{...Ye[Q.id],assetType:Ue}})),children:[e.jsx(at,{"data-loc":"client/src/pages/ProductAssets.tsx:366",children:e.jsx(tt,{"data-loc":"client/src/pages/ProductAssets.tsx:366"})}),e.jsx(st,{"data-loc":"client/src/pages/ProductAssets.tsx:366",children:Object.entries(g2).map(([Ue,Ye])=>e.jsx(ve,{"data-loc":"client/src/pages/ProductAssets.tsx:366",value:Ue,children:Ye},Ue))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:367",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/ProductAssets.tsx:367",children:"자료 이름"}),e.jsx(Ce,{"data-loc":"client/src/pages/ProductAssets.tsx:367",value:Le.title??Q.title,onChange:Ue=>w(Ye=>({...Ye,[Q.id]:{...Ye[Q.id],title:Ue.target.value}}))})]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:368",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/ProductAssets.tsx:368",children:"언어"}),e.jsx(Ce,{"data-loc":"client/src/pages/ProductAssets.tsx:368",value:Le.language??Q.language??"",onChange:Ue=>w(Ye=>({...Ye,[Q.id]:{...Ye[Q.id],language:Ue.target.value}})),placeholder:"예: 한국어 / 영어"})]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:369",className:"space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/ProductAssets.tsx:369",children:"적용 국가"}),e.jsx(Ce,{"data-loc":"client/src/pages/ProductAssets.tsx:369",value:Le.iso2??Q.iso2??"",onChange:Ue=>w(Ye=>({...Ye,[Q.id]:{...Ye[Q.id],iso2:Ue.target.value.slice(0,2).toUpperCase()}})),placeholder:"전체"})]})]}),xe.warnings?.length?e.jsx("div",{"data-loc":"client/src/pages/ProductAssets.tsx:371",className:"mt-3 rounded-xl bg-amber-50 p-3 text-xs text-amber-800",children:xe.warnings.join(" · ")}):null,e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:372",className:"mt-4 flex flex-wrap items-center justify-between gap-3 border-t pt-3",children:[Q.analysisStatus==="failed"?e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:373",className:"text-sm text-rose-700",children:"분석 실패 자료는 재분석 통과 전 승인하거나 콜드메일에 사용할 수 없습니다."}):e.jsxs("label",{"data-loc":"client/src/pages/ProductAssets.tsx:373",className:"flex items-center gap-2 text-sm",children:[e.jsx(Yf,{"data-loc":"client/src/pages/ProductAssets.tsx:373",checked:Le.useInOutreach??!0,onCheckedChange:Ue=>w(Ye=>({...Ye,[Q.id]:{...Ye[Q.id],useInOutreach:Ue}}))}),"승인 후 콜드메일 자료로 자동 추천"]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:374",className:"flex gap-2",children:[e.jsxs(G,{"data-loc":"client/src/pages/ProductAssets.tsx:374",variant:"outline",onClick:()=>void le(Q,"rejected"),disabled:L.isPending,children:[e.jsx(Tg,{"data-loc":"client/src/pages/ProductAssets.tsx:374",className:"mr-1.5 size-4"}),"제외"]}),Q.analysisStatus!=="failed"&&e.jsxs(G,{"data-loc":"client/src/pages/ProductAssets.tsx:374",onClick:()=>void le(Q,"approved"),disabled:L.isPending,children:[e.jsx(Dn,{"data-loc":"client/src/pages/ProductAssets.tsx:374",className:"mr-1.5 size-4"}),"분류 승인"]}
695)]})]})]},Q.id)}),Re.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:380",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:381",children:[e.jsx("h3",{"data-loc":"client/src/pages/ProductAssets.tsx:381",className:"font-semibold",children:"제품 관리 정보 업데이트 제안"}),e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:381",className:"text-xs text-muted-foreground",children:"신규·보완·충돌값을 확인하고 실제 저장할 문장을 직접 다듬은 뒤 승인하세요."})]}),Re.map(Q=>{const xe=kL[Q.proposalType],Le=h2(Q.evidenceJson,{}),Ue=Q.proposalType==="supplement"&&Q.currentValue?`${Q.currentValue}
696${Q.proposedValue??""}`.trim():Q.proposedValue??"";return e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:387",className:"rounded-2xl border bg-white p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:388",className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:388",className:"flex items-center gap-2",children:[e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:388",className:"font-semibold",children:CL[Q.fieldKey]}),e.jsx(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:388",variant:"outline",className:xe.className,children:xe.label}),e.jsxs(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:388",variant:"outline",children:["신뢰도 ",Q.confidence]})]}),e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:388",className:"text-xs text-muted-foreground",children:Le.fileName})]}),Q.currentValue&&e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:389",className:"mt-3 rounded-xl bg-slate-50 p-3",children:[e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:389",className:"text-xs font-medium text-slate-500",children:"현재값"}),e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:389",className:"mt-1 whitespace-pre-wrap text-sm",children:Q.currentValue})]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:390",className:"mt-3 space-y-1.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/ProductAssets.tsx:390",children:"승인할 값"}),e.jsx(pt,{"data-loc":"client/src/pages/ProductAssets.tsx:390",value:T[Q.id]??Ue,onChange:Ye=>k(Z=>({...Z,[Q.id]:Ye.target.value})),rows:4,disabled:Q.proposalType==="insufficient"})]}),Le.evidence?.[0]?.quote&&e.jsxs("blockquote",{"data-loc":"client/src/pages/ProductAssets.tsx:391",className:"mt-3 border-l-2 border-sky-300 pl-3 text-xs text-muted-foreground",children:[Le.evidence[0].page?`p.${Le.evidence[0].page} · `:"",Le.evidence[0].quote]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:392",className:"mt-4 flex justify-end gap-2",children:[e.jsx(G,{"data-loc":"client/src/pages/ProductAssets.tsx:392",variant:"outline",onClick:()=>void he(Q,"rejected"),disabled:F.isPending,children:"제외"}),e.jsx(G,{"data-loc":"client/src/pages/ProductAssets.tsx:392",onClick:()=>void he(Q,"approved"),disabled:F.isPending||Q.proposalType==="insufficient",children:"제품 정보에 반영"})]})]},Q.id)})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:401",className:"grid gap-5 xl:grid-cols-[410px_minmax(0,1fr)]",children:[e.jsxs(Bt,{"data-loc":"client/src/pages/ProductAssets.tsx:402",className:"h-fit border-sky-200 bg-gradient-to-br from-sky-50/80 via-white to-violet-50/50",children:[e.jsxs(xs,{"data-loc":"client/src/pages/ProductAssets.tsx:403",children:[e.jsx(fs,{"data-loc":"client/src/pages/ProductAssets.tsx:403",className:"text-base",children:"자료 한 번에 등록"}),e.jsx(gs,{"data-loc":"client/src/pages/ProductAssets.tsx:403",children:"여러 파일 또는 공개 Drive 파일·폴더 링크 하나만 넣으면 자동 업로드·분류·분석 후 확인할 내용만 보여드립니다."})]}),e.jsxs($t,{"data-loc":"client/src/pages/ProductAssets.tsx:404",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:405",className:"grid grid-cols-2 gap-2 rounded-xl bg-slate-100 p-1",children:[e.jsxs(G,{"data-loc":"client/src/pages/ProductAssets.tsx:405",type:"button",size:"sm",variant:o==="upload"?"default":"ghost",onClick:()=>u("upload"),children:[e.jsx(Pf,{"data-loc":"client/src/pages/ProductAssets.tsx:405",className:"mr-1.5 size-4"}),"파일 여러 개"]}),e.jsxs(G,{"data-loc":"client/src/pages/ProductAssets.tsx:405",type:"button",size:"sm",variant:o==="link"?"default":"ghost",onClick:()=>
696u("link"),children:[e.jsx(jA,{"data-loc":"client/src/pages/ProductAssets.tsx:405",className:"mr-1.5 size-4"}),"Drive 파일·폴더"]})]}),o==="upload"?e.jsxs(e.Fragment,{children:[e.jsxs("button",{"data-loc":"client/src/pages/ProductAssets.tsx:408",type:"button",onClick:()=>i.current?.click(),onDragEnter:Q=>{Q.preventDefault(),p(!0)},onDragOver:Q=>Q.preventDefault(),onDragLeave:()=>p(!1),onDrop:Q=>{Q.preventDefault(),p(!1),b(Array.from(Q.dataTransfer.files))},className:`flex w-full flex-col items-center rounded-2xl border-2 border-dashed px-4 py-7 text-center transition ${m?"border-sky-500 bg-sky-100":"border-sky-200 bg-white/70 hover:border-sky-400"}`,children:[e.jsx(Pf,{"data-loc":"client/src/pages/ProductAssets.tsx:409",className:"size-7 text-sky-600"}),e.jsx("span",{"data-loc":"client/src/pages/ProductAssets.tsx:409",className:"mt-2 text-sm font-semibold",children:f.length>0?`${f.length}개 파일 선택됨`:"파일 여러 개를 끌어오거나 눌러서 선택"}),e.jsx("span",{"data-loc":"client/src/pages/ProductAssets.tsx:409",className:"mt-1 text-xs text-muted-foreground",children:"PDF·PNG·JPG·WebP·MP4·WebM · 파일당 20MB"})]}),e.jsx(Ce,{"data-loc":"client/src/pages/ProductAssets.tsx:411",ref:i,type:"file",multiple:!0,accept:".pdf,.png,.jpg,.jpeg,.webp,.mp4,.webm",className:"hidden",onChange:Q=>{b(Array.from(Q.target.files??[])),Q.target.value=""}}),f.length>0&&e.jsx("div",{"data-loc":"client/src/pages/ProductAssets.tsx:412",className:"max-h-36 space-y-1 overflow-y-auto rounded-xl border bg-white p-2",children:f.map((Q,xe)=>e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:412",className:"flex items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-xs",children:[e.jsx("span",{"data-loc":"client/src/pages/ProductAssets.tsx:412",className:"truncate",children:Q.name}),e.jsx("span",{"data-loc":"client/src/pages/ProductAssets.tsx:412",className:"shrink-0 text-muted-foreground",children:af(Q.size)})]},`${Q.name}-${xe}`))}),e.jsxs(G,{"data-loc":"client/src/pages/ProductAssets.tsx:413",className:"w-full",onClick:()=>void ne(),disabled:f.length===0||P.isPending||A.isPending||V.isPending||H.isPending,children:[P.isPending||A.isPending||V.isPending||H.isPending?e.jsx(jt,{"data-loc":"client/src/pages/ProductAssets.tsx:413",className:"mr-2 size-4 animate-spin"}):e.jsx(Dt,{"data-loc":"client/src/pages/ProductAssets.tsx:413",className:"mr-2 size-4"}),"전체 업로드 후 자동 정리"]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:417",className:"space-y-2",children:[e.jsx(_e,{"data-loc":"client/src/pages/ProductAssets.tsx:417",htmlFor:"asset-url",children:"Google Drive 파일·폴더 공유 링크"}),e.jsx(Ce,{"data-loc":"client/src/pages/ProductAssets.tsx:417",id:"asset-url",value:h,onChange:Q=>y(Q.target.value),placeholder:"https://drive.google.com/..."}),e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:417",className:"text-xs leading-5 text-muted-foreground",children:"공개 링크만 입력하면 파일·폴더 안의 지원 자료를 자동 업로드·정리합니다. Drive에서 ‘링크가 있는 사용자에게 보기’를 허용해 주세요. 비공개 자료는 권한 필요로 표시되며 우회하지 않습니다."})]}),e.jsxs(G,{"data-loc":"client/src/pages/ProductAssets.tsx:418",className:"w-full",onClick:()=>void be(),disabled:M.isPending||se.isPending||H.isPending,children:[M.isPending||se.isPending||H.isPending?e.jsx(jt,{"data-loc":"client/src/pages/ProductAssets.tsx:418",className:"mr-2 size-4 animate-spin"}):e.jsx(Dt,{"data-loc":"client/src/pages/ProductAssets.tsx:418",className:"mr-2 size-4"}),"Drive 연결 후 자동 업로드·정리"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:421",className:"rounded-xl border border-sky-100 bg-white/80 p-3 text-xs leading-5 text-slate-600",children:[e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:421",className:"font-semibold text-slate-800",children:"자동 처리"}),e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:421",className:"mt-1",children:"파일 여러 개와 Drive 파일·폴더 모두 자료 유형·언어·적용 국가를 자동 분석해 오른쪽 등록 자료에 추가합니다. 제품 관리 상세에는 근거 기반 보완 제안을 만들며, 승인한 필드만 제품 정보에 반영됩니다. 대용량 영상은 Drive 공유 링크 사용을 권장합니다."})]})]})]}),e.jsxs(Bt,{"data-loc":"client/src/pages/ProductAssets.tsx:425",children:[e.jsxs(xs,{"data-loc":"client/src/pages/ProductAssets.tsx:426",children:[e.jsx(fs,{"data-loc":"client/src/pages/ProductAssets.tsx:426",className:"text-base",children:"등록 자료"}),e.jsx(gs,{"data-loc":"client/src/pages/ProductAssets.tsx:426",children:"사장님이 승인하고 접근 확인을 통과한 자료만 캠페인 최종 승인 화면에 자동 추천됩니다."})]}),e.jsx($t,{"data-loc":"client/src/pages/ProductAssets.tsx:427",children:E.isLoading?e.jsx("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"space-y-3",children:Array.from({length:3},(Q,xe)=>e.jsx("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"h-24 animate-pulse rounded-xl bg-muted/40"},xe))}):ge.length===0?e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"py-14 text-center",children:[e.jsx(bl,{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"mx-auto 
696size-10 text-muted-foreground"}),e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"mt-3 font-semibold",children:"등록된 제품 자료가 없습니다"}),e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"mt-1 text-sm text-muted-foreground",children:"파일 여러 개나 Drive 파일·폴더 링크 하나부터 등록해 보세요."})]}):e.jsx("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"space-y-3",children:ge.map(Q=>{const xe=SL[Q.assetType],Le=TL[Q.accessStatus],Ue=tf[Q.analysisStatus],Ye=(Q.sourceType==="google_drive_file"||Q.sourceType==="google_drive_folder")&&!Q.parentAssetId;return e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"rounded-2xl border bg-card p-4 shadow-[0_12px_30px_-28px_rgba(18,35,61,.6)]",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"flex min-w-0 items-start gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"grid size-10 shrink-0 place-items-center rounded-xl bg-sky-50 text-sky-700",children:e.jsx(xe,{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"size-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"flex flex-wrap items-center gap-1.5",children:[e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"truncate font-semibold",children:Q.title}),e.jsx(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:427",variant:"outline",className:Le.className,children:Le.label}),e.jsx(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:427",variant:"outline",className:Ue.className,children:Ue.label}),e.jsx(ct,{"data-loc":"client/src/pages/ProductAssets.tsx:427",variant:"outline",children:g2[Q.assetType]})]}),e.jsxs("p",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"mt-1 text-xs text-muted-foreground",children:[Q.sourceType==="upload"?Q.originalFileName:Q.sourceType==="google_drive_folder"?"Google Drive 폴더":Q.sourceType==="google_drive_file"?"Google Drive 파일":"외부 링크",af(Q.fileSize)?` · ${af(Q.fileSize)}`:"",Q.language?` · ${Q.language}`:"",Q.iso2?` · ${Q.iso2}`:""," · v",Q.version]}),Q.description&&e.jsx("p",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"mt-2 line-clamp-2 text-sm text-muted-foreground",children:Q.description})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"flex flex-wrap items-center justify-end gap-1",children:[e.jsx(G,{"data-loc":"client/src/pages/ProductAssets.tsx:427",size:"icon",variant:"ghost",title:"자료 열기",onClick:()=>W.mutate({id:Q.id}),children:e.jsx(yc,{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"size-4"})}),Ye?e.jsxs(G,{"data-loc":"client/src/pages/ProductAssets.tsx:427",size:"sm",variant:"outline",title:"Drive의 새 파일·변경·삭제를 다시 확인",disabled:se.isPending||H.isPending,onClick:()=>void pe(Q.id),children:[e.jsx(vl,{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:`mr-1.5 size-4 ${se.isPending||H.isPending?"animate-spin":""}`}),"업데이트 확인"]}):Q.sourceUrl&&e.jsx(G,{"data-loc":"client/src/pages/ProductAssets.tsx:427",size:"icon",variant:"ghost",title:"접근 권한 다시 확인",onClick:()=>ie.mutate({id:Q.id}),children:e.jsx(vl,{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:`size-4 ${ie.isPending?"animate-spin":""}`})}),e.jsx(G,{"data-loc":"client/src/pages/ProductAssets.tsx:427",size:"icon",variant:"ghost",className:"text-muted-foreground hover:text-destructive",title:"자료 연결 해제",onClick:()=>{confirm(`“${Q.title}” 자료 연결을 해제할까요? 원본명과 분석 이력은 감사 기록에 남습니다.`)&&I.mutate({id:Q.id})},children:e.jsx(Hs,{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"size-4"})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"mt-3 flex items-center justify-between border-t pt-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"flex items-center gap-2 text-xs text-muted-foreground",children:[Q.accessStatus!=="accessible"&&e.jsx(St,{"data-loc":"client/src/pages/ProductAssets.tsx:427",className:"size-3.5 text-amber-600"}),"자동 발송 자료 추천"]}),e.jsx(Yf,{"data-loc":"client/src/pages/ProductAssets.tsx:427",checked:Q.useInOutreach,disabled:Q.accessStatus!=="accessible"||Q.analysisStatus!=="analyzed"||B.isPending,onCheckedChange:Z=>B.mutate({id:Q.id,useInOutreach:Z})})]})]},Q.id)})})})]})]})]})}function g3({section:t}){const[,s]=Pn();return v.useEffect(()=>{s(`/signature-management?section=${t}`)},[t,s]),null}function _L(){return e.jsx(g3,{"data-loc":"client/src/App.tsx:40",section:"base"})}function AL(){return e.jsx(g3,{"data-loc":"client/src/App.tsx:44",section:"countries"})}function PL(){return e.jsxs(rP,{"data-loc":"client/src/App.tsx:49",children:[e.jsx(zt,{"data-loc":"client/src/App.tsx:50",path:"/",component:jz}),e.jsx(zt,{"data-loc":"client/src/App.tsx:51",path:"/countries",component:sz}),e.jsx(zt,{"data-loc":"client/src/App.tsx:52",path:"/countries/:iso2",component:rz}),e.jsx(zt,{"data-loc":"client/src/App.tsx:53",path:"/certification-map",component:NL}),e.jsx(zt,{"data-loc":"client/src/App.tsx:54",path:"/products",component:Sz}),e.jsx(zt,{"data-loc":"client/src/App.tsx:55",path:"/products/:id",component:wz}),e.jsx(zt,{"data-loc":"client/src/App.tsx:56",path:"/product-assets",component:EL}),e.jsx(zt,{"data-loc":"client/src/App.tsx:57",path:"/campaigns",component:QO}),e.jsx(zt,{"data-loc":"client/src/App.tsx:58",path:"/campaigns/new",component:FO}),e.jsx(zt,{"data-loc":"client/src/App.tsx:59",path:"/campaigns/:id",component:VO}),e.jsx(zt,{"data-loc":"client/src/App.tsx:60",path:"/base-leads",component:ez}),e.jsx(zt,{"data-loc":"client/src/App.tsx:61",path:"/templates",component:Kz}),e.jsx(zt,{"data-loc":"client/src/App.tsx:62",path:"/signature-management",component:zz}),e.jsx(zt,{"data-loc":"client/src/App.tsx:63",path:"/profile",component:_L}),e.jsx(zt,{"data-loc":"client/src/App.tsx:64",path:"/signatures",component:AL}),e.jsx(zt,{"data-loc":"client/src/App.tsx:65",path:"/smtp-settings",component:$z}),e.jsx(zt,{"data-loc":"client/src/App.tsx:66",path:"/delivery-dashboard",component:Vz}),e.jsx(zt,{"data-loc":"client/src/App.tsx:67",path:"/inbox-sync",component:Fz}),e.jsx(zt,{"data-loc":"client/src/App.tsx:68",path:"/404",component:b1}),e.jsx(zt,{"data-loc":"client/src/App.tsx:69",component:b1})]})}function ML(){return e.jsx(TM,{"data-loc":"client/src/App.tsx:76",children:e.jsx(DM,{"data-loc":"client/src/App.tsx:77",defaultTheme:"light",children:e.jsxs(Ng,{"data-loc":"client/src/App.tsx:78",delayDuration:200,children:[e.jsx(s6,{"data-loc":"client/src/App.tsx:85",position:n6,richColors:!0,closeButton:!0,duration:c6}),e.jsx(hM,{"data-loc":"client/src/App.tsx:91",children:e.jsx(wM,{"data-loc":"client/src/App.tsx:92",children:e.jsx(PL,{"data-loc":"client/src/App.tsx:93"})})})]})})})}const vu=new a4({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),h3=t=>{!(t instanceof xl)||typeof window>"u"||!(t.message===Bk)||Bg()};vu.getQueryCache().subscribe(t=>
696{if(t.type==="updated"&&t.action.type==="error"){const s=t.query.state.error;h3(s),console.error("[API Query Error]",s)}});vu.getMutationCache().subscribe(t=>{if(t.type==="updated"&&t.action.type==="error"){const s=t.mutation.state.error;h3(s),console.error("[API Mutation Error]",s)}});const RL=q.createClient({links:[dk({url:"/api/trpc",transformer:_n,headers(){try{const t=sessionStorage.getItem("manus-cookie");if(t){const s=`${Lk}=`,r=t.split(";").find(i=>i.trim().startsWith(s))?.trim().slice(s.length);if(r)return{Authorization:`Bearer ${r}`}}}catch{}return{}},fetch(t,s){return globalThis.fetch(t,{...s??{},credentials:"include"})}})]});Vk.createRoot(document.getElementById("root")).render(e.jsx(n4,{"data-loc":"client/src/main.tsx:86",client:vu,children:e.jsx(q.Provider,{"data-loc":"client/src/main.tsx:87",client:RL,queryClient:vu,children:e.jsx(ML,{"data-loc":"client/src/main.tsx:88"})})}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.