var fS=Object.create;var th=Object.defineProperty;var mS=Object.getOwnPropertyDescriptor;var pS=Object.getOwnPropertyNames;var hS=Object.getPrototypeOf,gS=Object.prototype.hasOwnProperty;var xS=(e,t,a)=>()=>{if(a)throw a[0];try{return e&&(t=e(e=0)),t}catch(n){throw a=[n],n}};var oa=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(a){throw t=0,a}};var yS=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of pS(t))!gS.call(e,l)&&l!==a&&th(e,l,{get:()=>t[l],enumerable:!(n=mS(t,l))||n.enumerable});return e};var E=(e,t,a)=>(a=e!=null?fS(hS(e)):{},yS(t||!e||!e.__esModule?th(a,"default",{value:e,enumerable:!0}):a,e));var fh=oa(P=>{"use strict";/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Td=Symbol.for("react.transitional.element"),vS=Symbol.for("react.portal"),LS=Symbol.for("react.fragment"),bS=Symbol.for("react.strict_mode"),SS=Symbol.for("react.profiler"),CS=Symbol.for("react.consumer"),wS=Symbol.for("react.context"),IS=Symbol.for("react.forward_ref"),kS=Symbol.for("react.suspense"),ES=Symbol.for("react.memo"),rh=Symbol.for("react.lazy"),MS=Symbol.for("react.activity"),ah=Symbol.iterator;function AS(e){return e===null||typeof e!="object"?null:(e=ah&&e[ah]||e["@@iterator"],typeof e=="function"?e:null)}var ih={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uh=Object.assign,sh={};function kl(e,t,a){this.props=e,this.context=t,this.refs=sh,this.updater=a||ih}kl.prototype.isReactComponent={};kl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};kl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dh(){}dh.prototype=kl.prototype;function Nd(e,t,a){this.props=e,this.context=t,this.refs=sh,this.updater=a||ih}var Rd=Nd.prototype=new dh;Rd.constructor=Nd;uh(Rd,kl.prototype);Rd.isPureReactComponent=!0;var nh=Array.isArray;function Dd(){}var me={H:null,A:null,T:null,S:null},ch=Object.prototype.hasOwnProperty;function Bd(e,t,a){var n=a.ref;return{$$typeof:Td,type:e,key:t,ref:n!==void 0?n:null,props:a}}function DS(e,t){return Bd(e.type,t,e.props)}function Od(e){return typeof e=="object"&&e!==null&&e.$$typeof===Td}function TS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var lh=/\/+/g;function Ad(e,t){return typeof e=="object"&&e!==null&&e.key!=null?TS(""+e.key):t.toString(36)}function NS(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Dd,Dd):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Il(e,t,a,n,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var r=!1;if(e===null)r=!0;else switch(o){case"bigint":case"string":case"number":r=!0;break;case"object":switch(e.$$typeof){case Td:case vS:r=!0;break;case rh:return r=e._init,Il(r(e._payload),t,a,n,l)}}if(r)return l=l(e),r=n===""?"."+Ad(e,0):n,nh(l)?(a="",r!=null&&(a=r.replace(lh,"$&/")+"/"),Il(l,t,a,"",function(s){return s})):l!=null&&(Od(l)&&(l=DS(l,a+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(lh,"$&/")+"/")+r)),t.push(l)),1;r=0;var i=n===""?".":n+":";if(nh(e))for(var u=0;u{"use strict";mh.exports=fh()});var Ch=oa(xe=>{"use strict";/** * @license React * scheduler.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */function Ud(e,t){var a=e.length;e.push(t);e:for(;0>>1,l=e[n];if(0>>1;nvu(i,a))uvu(s,i)?(e[n]=s,e[u]=a,n=u):(e[n]=i,e[r]=a,n=r);else if(uvu(s,a))e[n]=s,e[u]=a,n=u;else break e}}return t}function vu(e,t){var a=e.sortIndex-t.sortIndex;return a!==0?a:e.id-t.id}xe.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(ph=performance,xe.unstable_now=function(){return ph.now()}):(_d=Date,hh=_d.now(),xe.unstable_now=function(){return _d.now()-hh});var ph,_d,hh,va=[],Va=[],OS=1,zt=null,We=3,Hd=!1,Uo=!1,Ho=!1,Pd=!1,yh=typeof setTimeout=="function"?setTimeout:null,vh=typeof clearTimeout=="function"?clearTimeout:null,gh=typeof setImmediate<"u"?setImmediate:null;function Lu(e){for(var t=ra(Va);t!==null;){if(t.callback===null)bu(Va);else if(t.startTime<=e)bu(Va),t.sortIndex=t.expirationTime,Ud(va,t);else break;t=ra(Va)}}function Fd(e){if(Ho=!1,Lu(e),!Uo)if(ra(va)!==null)Uo=!0,Ml||(Ml=!0,El());else{var t=ra(Va);t!==null&&jd(Fd,t.startTime-e)}}var Ml=!1,Po=-1,Lh=5,bh=-1;function Sh(){return Pd?!0:!(xe.unstable_now()-bhe&&Sh());){var n=zt.callback;if(typeof n=="function"){zt.callback=null,We=zt.priorityLevel;var l=n(zt.expirationTime<=e);if(e=xe.unstable_now(),typeof l=="function"){zt.callback=l,Lu(e),t=!0;break t}zt===ra(va)&&bu(va),Lu(e)}else bu(va);zt=ra(va)}if(zt!==null)t=!0;else{var o=ra(Va);o!==null&&jd(Fd,o.startTime-e),t=!1}}break e}finally{zt=null,We=a,Hd=!1}t=void 0}}finally{t?El():Ml=!1}}}var El;typeof gh=="function"?El=function(){gh(zd)}:typeof MessageChannel<"u"?(qd=new MessageChannel,xh=qd.port2,qd.port1.onmessage=zd,El=function(){xh.postMessage(null)}):El=function(){yh(zd,0)};var qd,xh;function jd(e,t){Po=yh(function(){e(xe.unstable_now())},t)}xe.unstable_IdlePriority=5;xe.unstable_ImmediatePriority=1;xe.unstable_LowPriority=4;xe.unstable_NormalPriority=3;xe.unstable_Profiling=null;xe.unstable_UserBlockingPriority=2;xe.unstable_cancelCallback=function(e){e.callback=null};xe.unstable_forceFrameRate=function(e){0>e||125n?(e.sortIndex=a,Ud(Va,e),ra(va)===null&&e===ra(Va)&&(Ho?(vh(Po),Po=-1):Ho=!0,jd(Fd,a-n))):(e.sortIndex=l,Ud(va,e),Uo||Hd||(Uo=!0,Ml||(Ml=!0,El()))),e};xe.unstable_shouldYield=Sh;xe.unstable_wrapCallback=function(e){var t=We;return function(){var a=We;We=t;try{return e.apply(this,arguments)}finally{We=a}}}});var Ih=oa((KI,wh)=>{"use strict";wh.exports=Ch()});var Eh=oa(nt=>{"use strict";/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var _S=q();function kh(e){var t="https://react.dev/errors/"+e;if(1{"use strict";function Mh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mh)}catch(e){console.error(e)}}Mh(),Ah.exports=Eh()});var Py=oa(Ks=>{"use strict";/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var _e=Ih(),t0=q(),US=Wt();function k(e){var t="https://react.dev/errors/"+e;if(1Ol||(e.current=Mc[Ol],Mc[Ol]=null,Ol--)}function ce(e,t){Ol++,Mc[Ol]=e.current,e.current=t}var da=ca(null),pr=ca(null),ln=ca(null),as=ca(null);function ns(e,t){switch(ce(ln,t),ce(pr,e),ce(da,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qg(t),e=Ey(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Pe(da),ce(da,e)}function Jl(){Pe(da),Pe(pr),Pe(ln)}function Ac(e){e.memoizedState!==null&&ce(as,e);var t=da.current,a=Ey(t,e.type);t!==a&&(ce(pr,e),ce(da,a))}function ls(e){pr.current===e&&(Pe(da),Pe(pr)),as.current===e&&(Pe(as),Ir._currentValue=Xn)}var Gd,Nh;function Fn(e){if(Gd===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Gd=t&&t[1]||"",Nh=-1)":-1l||u[n]!==s[l]){var m=` `+u[n].replace(" at new "," at ");return e.displayName&&m.includes("")&&(m=m.replace("",e.displayName)),m}while(1<=n&&0<=l);break}}}finally{Vd=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Fn(a):""}function GS(e,t){switch(e.tag){case 26:case 27:case 5:return Fn(e.type);case 16:return Fn("Lazy");case 13:return e.child!==t&&t!==null?Fn("Suspense Fallback"):Fn("Suspense");case 19:return Fn("SuspenseList");case 0:case 15:return Xd(e.type,!1);case 11:return Xd(e.type.render,!1);case 1:return Xd(e.type,!0);case 31:return Fn("Activity");default:return""}}function Rh(e){try{var t="",a=null;do t+=GS(e,a),a=e,e=e.return;while(e);return t}catch(n){return` Error generating stack: `+n.message+` `+n.stack}}var Dc=Object.prototype.hasOwnProperty,bf=_e.unstable_scheduleCallback,Kd=_e.unstable_cancelCallback,VS=_e.unstable_shouldYield,XS=_e.unstable_requestPaint,kt=_e.unstable_now,KS=_e.unstable_getCurrentPriorityLevel,u0=_e.unstable_ImmediatePriority,s0=_e.unstable_UserBlockingPriority,os=_e.unstable_NormalPriority,YS=_e.unstable_LowPriority,d0=_e.unstable_IdlePriority,$S=_e.log,ZS=_e.unstable_setDisableYieldValue,Ar=null,Et=null;function Ja(e){if(typeof $S=="function"&&ZS(e),Et&&typeof Et.setStrictMode=="function")try{Et.setStrictMode(Ar,e)}catch{}}var Mt=Math.clz32?Math.clz32:JS,QS=Math.log,WS=Math.LN2;function JS(e){return e>>>=0,e===0?32:31-(QS(e)/WS|0)|0}var wu=256,Iu=262144,ku=4194304;function jn(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ts(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var l=0,o=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var i=n&134217727;return i!==0?(n=i&~o,n!==0?l=jn(n):(r&=i,r!==0?l=jn(r):a||(a=i&~e,a!==0&&(l=jn(a))))):(i=n&~o,i!==0?l=jn(i):r!==0?l=jn(r):a||(a=n&~e,a!==0&&(l=jn(a)))),l===0?0:t!==0&&t!==l&&(t&o)===0&&(o=l&-l,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:l}function Dr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function e1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 c0(){var e=ku;return ku<<=1,(ku&62914560)===0&&(ku=4194304),e}function Yd(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Tr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function t1(e,t,a,n,l,o){var r=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var i=e.entanglements,u=e.expirationTimes,s=e.hiddenUpdates;for(a=r&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var i1=/[\n"\\]/g;function Ft(e){return e.replace(i1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Rc(e,t,a,n,l,o,r,i){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ut(t)):e.value!==""+Ut(t)&&(e.value=""+Ut(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?Bc(e,r,Ut(t)):a!=null?Bc(e,r,Ut(a)):n!=null&&e.removeAttribute("value"),l==null&&o!=null&&(e.defaultChecked=!!o),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.name=""+Ut(i):e.removeAttribute("name")}function L0(e,t,a,n,l,o,r,i){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Nc(e);return}a=a!=null?""+Ut(a):"",t=t!=null?""+Ut(t):a,i||t===e.value||(e.value=t),e.defaultValue=t}n=n??l,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=i?e.checked:!!n,e.defaultChecked=!!n,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),Nc(e)}function Bc(e,t,a){t==="number"&&rs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Kl(e,t,a,n){if(e=e.options,t){t={};for(var l=0;l"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_c=!1;if(Ra)try{Al={},Object.defineProperty(Al,"passive",{get:function(){_c=!0}}),window.addEventListener("test",Al,Al),window.removeEventListener("test",Al,Al)}catch{_c=!1}var Al,en=null,Ef=null,ju=null;function I0(){if(ju)return ju;var e,t=Ef,a=t.length,n,l="value"in en?en.value:en.textContent,o=l.length;for(e=0;e=tr),Gh=" ",Vh=!1;function E0(e,t){switch(e){case"keyup":return O1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function M0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ql=!1;function z1(e,t){switch(e){case"compositionend":return M0(t);case"keypress":return t.which!==32?null:(Vh=!0,Gh);case"textInput":return e=t.data,e===Gh&&Vh?null:e;default:return null}}function q1(e,t){if(ql)return e==="compositionend"||!Af&&E0(e,t)?(e=I0(),ju=Ef=en=null,ql=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=$h(a)}}function N0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?N0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function R0(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=rs(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=rs(e.document)}return t}function Df(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var X1=Ra&&"documentMode"in document&&11>=document.documentMode,Ul=null,zc=null,nr=null,qc=!1;function Qh(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;qc||Ul==null||Ul!==rs(n)||(n=Ul,"selectionStart"in n&&Df(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),nr&&xr(nr,n)||(nr=n,n=ws(zc,"onSelect"),0>=r,l-=r,ia=1<<32-Mt(t)+l|a<N?(T=I,I=null):T=I.sibling;var w=p(x,I,y[N],b);if(w===null){I===null&&(I=T);break}e&&I&&w.alternate===null&&t(x,I),g=o(w,g,N),A===null?M=w:A.sibling=w,A=w,I=T}if(N===y.length)return a(x,I),X&&Ia(x,N),M;if(I===null){for(;NN?(T=I,I=null):T=I.sibling;var O=p(x,I,w.value,b);if(O===null){I===null&&(I=T);break}e&&I&&O.alternate===null&&t(x,I),g=o(O,g,N),A===null?M=O:A.sibling=O,A=O,I=T}if(w.done)return a(x,I),X&&Ia(x,N),M;if(I===null){for(;!w.done;N++,w=y.next())w=c(x,w.value,b),w!==null&&(g=o(w,g,N),A===null?M=w:A.sibling=w,A=w);return X&&Ia(x,N),M}for(I=n(I);!w.done;N++,w=y.next())w=h(I,x,N,w.value,b),w!==null&&(e&&w.alternate!==null&&I.delete(w.key===null?N:w.key),g=o(w,g,N),A===null?M=w:A.sibling=w,A=w);return e&&I.forEach(function(te){return t(x,te)}),X&&Ia(x,N),M}function L(x,g,y,b){if(typeof y=="object"&&y!==null&&y.type===Bl&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Cu:e:{for(var M=y.key;g!==null;){if(g.key===M){if(M=y.type,M===Bl){if(g.tag===7){a(x,g.sibling),b=l(g,y.props.children),b.return=x,x=b;break e}}else if(g.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===Ka&&Gn(M)===g.type){a(x,g.sibling),b=l(g,y.props),Vo(b,y),b.return=x,x=b;break e}a(x,g);break}else t(x,g);g=g.sibling}y.type===Bl?(b=Kn(y.props.children,x.mode,b,y.key),b.return=x,x=b):(b=Vu(y.type,y.key,y.props,null,x.mode,b),Vo(b,y),b.return=x,x=b)}return r(x);case Zo:e:{for(M=y.key;g!==null;){if(g.key===M)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){a(x,g.sibling),b=l(g,y.children||[]),b.return=x,x=b;break e}else{a(x,g);break}else t(x,g);g=g.sibling}b=ac(y,x.mode,b),b.return=x,x=b}return r(x);case Ka:return y=Gn(y),L(x,g,y,b)}if(Qo(y))return v(x,g,y,b);if(jo(y)){if(M=jo(y),typeof M!="function")throw Error(k(150));return y=M.call(y),S(x,g,y,b)}if(typeof y.then=="function")return L(x,g,Nu(y),b);if(y.$$typeof===Ea)return L(x,g,Tu(x,y),b);Ru(x,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,g!==null&&g.tag===6?(a(x,g.sibling),b=l(g,y),b.return=x,x=b):(a(x,g),b=tc(y,x.mode,b),b.return=x,x=b),r(x)):a(x,g)}return function(x,g,y,b){try{Lr=0;var M=L(x,g,y,b);return Zl=null,M}catch(I){if(I===po||I===zs)throw I;var A=wt(29,I,null,x.mode);return A.lanes=b,A.return=x,A}}}var Jn=Y0(!0),$0=Y0(!1),Ya=!1;function Uf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function rn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function un(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,($&2)!==0){var l=n.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),n.pending=t,t=us(e),H0(e,null,a),t}return _s(e,n,t,a),us(e)}function or(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,m0(e,a)}}function lc(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var l=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var r={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?l=o=r:o=o.next=r,a=a.next}while(a!==null);o===null?l=o=t:o=o.next=t}else l=o=t;a={baseState:n.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Xc=!1;function rr(){if(Xc){var e=$l;if(e!==null)throw e}}function ir(e,t,a,n){Xc=!1;var l=e.updateQueue;Ya=!1;var o=l.firstBaseUpdate,r=l.lastBaseUpdate,i=l.shared.pending;if(i!==null){l.shared.pending=null;var u=i,s=u.next;u.next=null,r===null?o=s:r.next=s,r=u;var m=e.alternate;m!==null&&(m=m.updateQueue,i=m.lastBaseUpdate,i!==r&&(i===null?m.firstBaseUpdate=s:i.next=s,m.lastBaseUpdate=u))}if(o!==null){var c=l.baseState;r=0,m=s=u=null,i=o;do{var p=i.lane&-536870913,h=p!==i.lane;if(h?(V&p)===p:(n&p)===p){p!==0&&p===ao&&(Xc=!0),m!==null&&(m=m.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var v=e,S=i;p=t;var L=a;switch(S.tag){case 1:if(v=S.payload,typeof v=="function"){c=v.call(L,c,p);break e}c=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=S.payload,p=typeof v=="function"?v.call(L,c,p):v,p==null)break e;c=ge({},c,p);break e;case 2:Ya=!0}}p=i.callback,p!==null&&(e.flags|=64,h&&(e.flags|=8192),h=l.callbacks,h===null?l.callbacks=[p]:h.push(p))}else h={lane:p,tag:i.tag,payload:i.payload,callback:i.callback,next:null},m===null?(s=m=h,u=c):m=m.next=h,r|=p;if(i=i.next,i===null){if(i=l.shared.pending,i===null)break;h=i,i=h.next,h.next=null,l.lastBaseUpdate=h,l.shared.pending=null}}while(!0);m===null&&(u=c),l.baseState=u,l.firstBaseUpdate=s,l.lastBaseUpdate=m,o===null&&(l.shared.lanes=0),xn|=r,e.lanes=r,e.memoizedState=c}}function Z0(e,t){if(typeof e!="function")throw Error(k(191,e));e.call(t)}function Q0(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eo?o:8;var r=U.T,i={};U.T=i,Wf(e,!1,t,a);try{var u=l(),s=U.S;if(s!==null&&s(i,u),u!==null&&typeof u=="object"&&typeof u.then=="function"){var m=tC(u,n);ur(e,t,m,At(e))}else ur(e,t,n,At(e))}catch(c){ur(e,t,{then:function(){},status:"rejected",reason:c},At())}finally{Z.p=o,r!==null&&i.types!==null&&(r.types=i.types),U.T=r}}function iC(){}function Qc(e,t,a,n){if(e.tag!==5)throw Error(k(476));var l=Sx(e).queue;bx(e,l,t,Xn,a===null?iC:function(){return Cx(e),a(n)})}function Sx(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Xn,baseState:Xn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:Xn},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cx(e){var t=Sx(e);t.next===null&&(t=e.alternate.memoizedState),ur(e,t.next.queue,{},At())}function Qf(){return $e(Ir)}function wx(){return Ee().memoizedState}function Ix(){return Ee().memoizedState}function uC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=At();e=rn(a);var n=un(t,e,a);n!==null&&(ct(n,t,a),or(n,t,a)),t={cache:_f()},e.payload=t;return}t=t.return}}function sC(e,t,a){var n=At();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Ex(t,a):(a=Nf(e,t,a,n),a!==null&&(ct(a,e,n),Mx(a,t,n)))}function kx(e,t,a){var n=At();ur(e,t,a,n)}function ur(e,t,a,n){var l={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Ex(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var r=t.lastRenderedState,i=o(r,a);if(l.hasEagerState=!0,l.eagerState=i,Dt(i,r))return _s(e,t,l,0),re===null&&Os(),!1}catch{}if(a=Nf(e,t,l,n),a!==null)return ct(a,e,n),Mx(a,t,n),!0}return!1}function Wf(e,t,a,n){if(n={lane:2,revertLane:im(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(k(479))}else t=Nf(e,a,n,2),t!==null&&ct(t,e,2)}function Ps(e){var t=e.alternate;return e===F||t!==null&&t===F}function Ex(e,t){Ql=ps=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Mx(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,m0(e,a)}}var Sr={readContext:$e,use:Us,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useLayoutEffect:we,useInsertionEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useSyncExternalStore:we,useId:we,useHostTransitionStatus:we,useFormState:we,useActionState:we,useOptimistic:we,useMemoCache:we,useCacheRefresh:we};Sr.useEffectEvent=we;var Ax={readContext:$e,use:Us,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:$e,useEffect:fg,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Yu(4194308,4,gx.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Yu(4194308,4,e,t)},useInsertionEffect:function(e,t){Yu(4,2,e,t)},useMemo:function(e,t){var a=lt();t=t===void 0?null:t;var n=e();if(el){Ja(!0);try{e()}finally{Ja(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=lt();if(a!==void 0){var l=a(t);if(el){Ja(!0);try{a(t)}finally{Ja(!1)}}}else l=t;return n.memoizedState=n.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},n.queue=e,e=e.dispatch=sC.bind(null,F,e),[n.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:function(e){e=$c(e);var t=e.queue,a=kx.bind(null,F,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:$f,useDeferredValue:function(e,t){var a=lt();return Zf(a,e,t)},useTransition:function(){var e=$c(!1);return e=bx.bind(null,F,e.queue,!0,!1),lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=F,l=lt();if(X){if(a===void 0)throw Error(k(407));a=a()}else{if(a=t(),re===null)throw Error(k(349));(V&127)!==0||ax(n,t,a)}l.memoizedState=a;var o={value:a,getSnapshot:t};return l.queue=o,fg(lx.bind(null,n,o,e),[e]),n.flags|=2048,lo(9,{destroy:void 0},nx.bind(null,n,o,a,t),null),a},useId:function(){var e=lt(),t=re.identifierPrefix;if(X){var a=ua,n=ia;a=(n&~(1<<32-Mt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=hs++,0<\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof n.is=="string"?r.createElement("select",{is:n.is}):r.createElement("select"),n.multiple?o.multiple=!0:n.size&&(o.size=n.size);break;default:o=typeof n.is=="string"?r.createElement(l,{is:n.is}):r.createElement(l)}}o[Ke]=t,o[ft]=n;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)o.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=o;e:switch(Ze(o,l,n),l){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&ba(t)}}return pe(t),fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&ba(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(k(166));if(e=ln.current,Dl(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,l=Ye,l!==null)switch(l.tag){case 27:case 5:n=l.memoizedProps}e[Ke]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||ky(e.nodeValue,a)),e||hn(t,!0)}else e=Is(e).createTextNode(n),e[Ke]=t,t.stateNode=e}return pe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Dl(t),a!==null){if(e===null){if(!n)throw Error(k(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(k(557));e[Ke]=t}else Qn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pe(t),e=!1}else a=nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ct(t),t):(Ct(t),null);if((t.flags&128)!==0)throw Error(k(558))}return pe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Dl(t),n!==null&&n.dehydrated!==null){if(e===null){if(!l)throw Error(k(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(k(317));l[Ke]=t}else Qn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pe(t),l=!1}else l=nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(Ct(t),t):(Ct(t),null)}return Ct(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,l=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(l=n.alternate.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==l&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Bu(t,t.updateQueue),pe(t),null);case 4:return Jl(),e===null&&um(t.stateNode.containerInfo),pe(t),null;case 10:return Ta(t.type),pe(t),null;case 19:if(Pe(ke),n=t.memoizedState,n===null)return pe(t),null;if(l=(t.flags&128)!==0,o=n.rendering,o===null)if(l)Xo(n,!1);else{if(Ie!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=ms(e),o!==null){for(t.flags|=128,Xo(n,!1),e=o.updateQueue,t.updateQueue=e,Bu(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)P0(a,e),a=a.sibling;return ce(ke,ke.current&1|2),X&&Ia(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&kt()>vs&&(t.flags|=128,l=!0,Xo(n,!1),t.lanes=4194304)}else{if(!l)if(e=ms(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Bu(t,e),Xo(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!X)return pe(t),null}else 2*kt()-n.renderingStartTime>vs&&a!==536870912&&(t.flags|=128,l=!0,Xo(n,!1),t.lanes=4194304);n.isBackwards?(o.sibling=t.child,t.child=o):(e=n.last,e!==null?e.sibling=o:t.child=o,n.last=o)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=kt(),e.sibling=null,a=ke.current,ce(ke,l?a&1|2:a&1),X&&Ia(t,n.treeForkCount),e):(pe(t),null);case 22:case 23:return Ct(t),Hf(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(pe(t),t.subtreeFlags&6&&(t.flags|=8192)):pe(t),a=t.updateQueue,a!==null&&Bu(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Pe(Yn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ta(De),pe(t),null;case 25:return null;case 30:return null}throw Error(k(156,t.tag))}function pC(e,t){switch(Of(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ta(De),Jl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ls(t),null;case 31:if(t.memoizedState!==null){if(Ct(t),t.alternate===null)throw Error(k(340));Qn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ct(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(k(340));Qn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(ke),null;case 4:return Jl(),null;case 10:return Ta(t.type),null;case 22:case 23:return Ct(t),Hf(),e!==null&&Pe(Yn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ta(De),null;case 25:return null;default:return null}}function Px(e,t){switch(Of(t),t.tag){case 3:Ta(De),Jl();break;case 26:case 27:case 5:ls(t);break;case 4:Jl();break;case 31:t.memoizedState!==null&&Ct(t);break;case 13:Ct(t);break;case 19:Pe(ke);break;case 10:Ta(t.type);break;case 22:case 23:Ct(t),Hf(),e!==null&&Pe(Yn);break;case 24:Ta(De)}}function _r(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var l=n.next;a=l;do{if((a.tag&e)===e){n=void 0;var o=a.create,r=a.inst;n=o(),r.destroy=n}a=a.next}while(a!==l)}}catch(i){ee(t,t.return,i)}}function gn(e,t,a){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var o=l.next;n=o;do{if((n.tag&e)===e){var r=n.inst,i=r.destroy;if(i!==void 0){r.destroy=void 0,l=t;var u=a,s=i;try{s()}catch(m){ee(l,u,m)}}}n=n.next}while(n!==o)}}catch(m){ee(t,t.return,m)}}function Fx(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Q0(t,a)}catch(n){ee(e,e.return,n)}}}function jx(e,t,a){a.props=tl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){ee(e,t,n)}}function sr(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(l){ee(e,t,l)}}function sa(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(l){ee(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(l){ee(e,t,l)}else a.current=null}function Gx(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(l){ee(e,e.return,l)}}function mc(e,t,a){try{var n=e.stateNode;BC(n,e.type,a,t),n[ft]=t}catch(l){ee(e,e.return,l)}}function Vx(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&vn(e.type)||e.tag===4}function pc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&vn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function af(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ma));else if(n!==4&&(n===27&&vn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(af(e,t,a),e=e.sibling;e!==null;)af(e,t,a),e=e.sibling}function ys(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&vn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ys(e,t,a),e=e.sibling;e!==null;)ys(e,t,a),e=e.sibling}function Xx(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Ze(t,n,a),t[Ke]=e,t[ft]=a}catch(o){ee(e,e.return,o)}}var ka=!1,Ae=!1,hc=!1,Ig=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function hC(e,t){if(e=e.containerInfo,df=As,e=R0(e),Df(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var l=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var r=0,i=-1,u=-1,s=0,m=0,c=e,p=null;t:for(;;){for(var h;c!==a||l!==0&&c.nodeType!==3||(i=r+l),c!==o||n!==0&&c.nodeType!==3||(u=r+n),c.nodeType===3&&(r+=c.nodeValue.length),(h=c.firstChild)!==null;)p=c,c=h;for(;;){if(c===e)break t;if(p===a&&++s===l&&(i=r),p===o&&++m===n&&(u=r),(h=c.nextSibling)!==null)break;c=p,p=c.parentNode}c=h}a=i===-1||u===-1?null:{start:i,end:u}}else a=null}a=a||{start:0,end:0}}else a=null;for(cf={focusedElem:e,selectionRange:a},As=!1,Ue=t;Ue!==null;)if(t=Ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ue=e;else for(;Ue!==null;){switch(t=Ue,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),Ze(o,n,a),o[Ke]=e,He(o),n=o;break e;case"link":var r=Kg("link","href",l).get(n+(a.href||""));if(r){for(var i=0;iL&&(r=L,L=S,S=r);var x=Zh(i,S),g=Zh(i,L);if(x&&g&&(h.rangeCount!==1||h.anchorNode!==x.node||h.anchorOffset!==x.offset||h.focusNode!==g.node||h.focusOffset!==g.offset)){var y=c.createRange();y.setStart(x.node,x.offset),h.removeAllRanges(),S>L?(h.addRange(y),h.extend(g.node,g.offset)):(y.setEnd(g.node,g.offset),h.addRange(y))}}}}for(c=[],h=i;h=h.parentNode;)h.nodeType===1&&c.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;ia?32:a,U.T=null,a=of,of=null;var o=dn,r=Na;if(Oe=0,ro=dn=null,Na=0,($&6)!==0)throw Error(k(331));var i=$;if($|=4,ny(o.current),ey(o,o.current,r,a),$=i,zr(0,!1),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(Ar,o)}catch{}return!0}finally{Z.p=l,U.T=n,yy(e,t)}}function Ag(e,t,a){t=jt(a,t),t=Jc(e.stateNode,t,2),e=un(e,t,2),e!==null&&(Tr(e,2),fa(e))}function ee(e,t,a){if(e.tag===3)Ag(e,e,a);else for(;t!==null;){if(t.tag===3){Ag(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(sn===null||!sn.has(n))){e=jt(a,e),a=Bx(2),n=un(t,a,2),n!==null&&(Ox(a,n,t,e),Tr(n,2),fa(n));break}}t=t.return}}function xc(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new yC;var l=new Set;n.set(t,l)}else l=n.get(t),l===void 0&&(l=new Set,n.set(t,l));l.has(a)||(lm=!0,l.add(a),e=CC.bind(null,e,t,a),t.then(e,e))}function CC(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,re===e&&(V&a)===a&&(Ie===4||Ie===3&&(V&62914560)===V&&300>kt()-Fs?($&2)===0&&io(e,0):om|=a,oo===V&&(oo=0)),fa(e)}function Ly(e,t){t===0&&(t=c0()),e=ol(e,t),e!==null&&(Tr(e,t),fa(e))}function wC(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ly(e,a)}function IC(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,l=e.memoizedState;l!==null&&(a=l.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(k(314))}n!==null&&n.delete(t),Ly(e,a)}function kC(e,t){return bf(e,t)}var Ss=null,Rl=null,uf=!1,Cs=!1,yc=!1,nn=0;function fa(e){e!==Rl&&e.next===null&&(Rl===null?Ss=Rl=e:Rl=Rl.next=e),Cs=!0,uf||(uf=!0,MC())}function zr(e,t){if(!yc&&Cs){yc=!0;do for(var a=!1,n=Ss;n!==null;){if(!t)if(e!==0){var l=n.pendingLanes;if(l===0)var o=0;else{var r=n.suspendedLanes,i=n.pingedLanes;o=(1<<31-Mt(42|e)+1)-1,o&=l&~(r&~i),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,Dg(n,o))}else o=V,o=Ts(n,n===re?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||Dr(n,o)||(a=!0,Dg(n,o));n=n.next}while(a);yc=!1}}function EC(){by()}function by(){Cs=uf=!1;var e=0;nn!==0&&_C()&&(e=nn);for(var t=kt(),a=null,n=Ss;n!==null;){var l=n.next,o=Sy(n,t);o===0?(n.next=null,a===null?Ss=l:a.next=l,l===null&&(Rl=a)):(a=n,(e!==0||(o&3)!==0)&&(Cs=!0)),n=l}Oe!==0&&Oe!==5||zr(e,!1),nn!==0&&(nn=0)}function Sy(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes&-62914561;0i)break;var m=u.transferSize,c=u.initiatorType;m&&zg(c)&&(u=u.responseEnd,r+=m*(u"u"?null:document;function Ty(e,t,a){var n=go;if(n&&typeof t=="string"&&t){var l=Ft(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof a=="string"&&(l+='[crossorigin="'+a+'"]'),Gg.has(l)||(Gg.add(l),e={rel:e,crossOrigin:a,href:t},n.querySelector(l)===null&&(t=n.createElement("link"),Ze(t,"link",e),He(t),n.head.appendChild(t)))}}function VC(e){qa.D(e),Ty("dns-prefetch",e,null)}function XC(e,t){qa.C(e,t),Ty("preconnect",e,t)}function KC(e,t,a){qa.L(e,t,a);var n=go;if(n&&e&&t){var l='link[rel="preload"][as="'+Ft(t)+'"]';t==="image"&&a&&a.imageSrcSet?(l+='[imagesrcset="'+Ft(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(l+='[imagesizes="'+Ft(a.imageSizes)+'"]')):l+='[href="'+Ft(e)+'"]';var o=l;switch(t){case"style":o=uo(e);break;case"script":o=xo(e)}Kt.has(o)||(e=ge({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Kt.set(o,e),n.querySelector(l)!==null||t==="style"&&n.querySelector(qr(o))||t==="script"&&n.querySelector(Ur(o))||(t=n.createElement("link"),Ze(t,"link",e),He(t),n.head.appendChild(t)))}}function YC(e,t){qa.m(e,t);var a=go;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Ft(n)+'"][href="'+Ft(e)+'"]',o=l;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=xo(e)}if(!Kt.has(o)&&(e=ge({rel:"modulepreload",href:e},t),Kt.set(o,e),a.querySelector(l)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ur(o)))return}n=a.createElement("link"),Ze(n,"link",e),He(n),a.head.appendChild(n)}}}function $C(e,t,a){qa.S(e,t,a);var n=go;if(n&&e){var l=Xl(n).hoistableStyles,o=uo(e);t=t||"default";var r=l.get(o);if(!r){var i={loading:0,preload:null};if(r=n.querySelector(qr(o)))i.loading=5;else{e=ge({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Kt.get(o))&&sm(e,a);var u=r=n.createElement("link");He(u),Ze(u,"link",e),u._p=new Promise(function(s,m){u.onload=s,u.onerror=m}),u.addEventListener("load",function(){i.loading|=1}),u.addEventListener("error",function(){i.loading|=2}),i.loading|=4,Wu(r,t,n)}r={type:"stylesheet",instance:r,count:1,state:i},l.set(o,r)}}}function ZC(e,t){qa.X(e,t);var a=go;if(a&&e){var n=Xl(a).hoistableScripts,l=xo(e),o=n.get(l);o||(o=a.querySelector(Ur(l)),o||(e=ge({src:e,async:!0},t),(t=Kt.get(l))&&dm(e,t),o=a.createElement("script"),He(o),Ze(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(l,o))}}function QC(e,t){qa.M(e,t);var a=go;if(a&&e){var n=Xl(a).hoistableScripts,l=xo(e),o=n.get(l);o||(o=a.querySelector(Ur(l)),o||(e=ge({src:e,async:!0,type:"module"},t),(t=Kt.get(l))&&dm(e,t),o=a.createElement("script"),He(o),Ze(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(l,o))}}function Vg(e,t,a,n){var l=(l=ln.current)?ks(l):null;if(!l)throw Error(k(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=uo(a.href),a=Xl(l).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=uo(a.href);var o=Xl(l).hoistableStyles,r=o.get(e);if(r||(l=l.ownerDocument||l,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,r),(o=l.querySelector(qr(e)))&&!o._p&&(r.instance=o,r.state.loading=5),Kt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Kt.set(e,a),o||WC(l,e,a,r.state))),t&&n===null)throw Error(k(528,""));return r}if(t&&n!==null)throw Error(k(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=xo(a),a=Xl(l).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(k(444,e))}}function uo(e){return'href="'+Ft(e)+'"'}function qr(e){return'link[rel="stylesheet"]['+e+"]"}function Ny(e){return ge({},e,{"data-precedence":e.precedence,precedence:null})}function WC(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Ze(t,"link",a),He(t),e.head.appendChild(t))}function xo(e){return'[src="'+Ft(e)+'"]'}function Ur(e){return"script[async]"+e}function Xg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Ft(a.href)+'"]');if(n)return t.instance=n,He(n),n;var l=ge({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),He(n),Ze(n,"style",l),Wu(n,a.precedence,e),t.instance=n;case"stylesheet":l=uo(a.href);var o=e.querySelector(qr(l));if(o)return t.state.loading|=4,t.instance=o,He(o),o;n=Ny(a),(l=Kt.get(l))&&sm(n,l),o=(e.ownerDocument||e).createElement("link"),He(o);var r=o;return r._p=new Promise(function(i,u){r.onload=i,r.onerror=u}),Ze(o,"link",n),t.state.loading|=4,Wu(o,a.precedence,e),t.instance=o;case"script":return o=xo(a.src),(l=e.querySelector(Ur(o)))?(t.instance=l,He(l),l):(n=a,(l=Kt.get(o))&&(n=ge({},a),dm(n,l)),e=e.ownerDocument||e,l=e.createElement("script"),He(l),Ze(l,"link",n),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(k(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Wu(n,a.precedence,e));return t.instance}function Wu(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=n.length?n[n.length-1]:null,o=l,r=0;r title"):null)}function JC(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Ry(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ew(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var l=uo(n.href),o=t.querySelector(qr(l));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Es.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,He(o);return}o=t.ownerDocument||t,n=Ny(n),(l=Kt.get(l))&&sm(n,l),o=o.createElement("link"),He(o);var r=o;r._p=new Promise(function(i,u){r.onload=i,r.onerror=u}),Ze(o,"link",n),a.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Es.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Sc=0;function tw(e,t){return e.stylesheets&&e.count===0&&es(e,e.stylesheets),0Sc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(l)}}:null}function Es(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)es(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ms=null;function es(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ms=new Map,t.forEach(aw,e),Ms=null,Es.call(e))}function aw(e,t){if(!(t.state.loading&4)){var a=Ms.get(e);if(a)var n=a.get(null);else{a=new Map,Ms.set(e,a);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o{"use strict";function Fy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Fy)}catch(e){console.error(e)}}Fy(),jy.exports=Py()});var Vy=oa(Ys=>{"use strict";/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var dw=Symbol.for("react.transitional.element"),cw=Symbol.for("react.fragment");function Gy(e,t,a){var n=null;if(a!==void 0&&(n=""+a),t.key!==void 0&&(n=""+t.key),"key"in t){a={};for(var l in t)l!=="key"&&(a[l]=t[l])}else a=t;return t=a.ref,{$$typeof:dw,type:e,key:n,ref:t!==void 0?t:null,props:a}}Ys.Fragment=cw;Ys.jsx=Gy;Ys.jsxs=Gy});var z=oa((JI,Xy)=>{"use strict";Xy.exports=Vy()});var FI={};function Ve(e,t){return fetch(Ld(e),t)}async function Ip(){let e=await fetch("/api/sites");xd=(await ya(e,"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u0430\u0439\u0442\u044B")).sites;for(let n of[document.querySelector("#site-selector"),document.querySelector("#new-site-source")])n.replaceChildren(...xd.map(l=>{let o=document.createElement("option");return o.value=l.id,o.textContent=l.name,o.selected=l.id===d.projectConfig?.id,o}));let a=document.querySelector("#site-preview");a.href=Ld("index.html")}function JL(){return!(d.dirty||d.projectConfigDirty)||window.confirm("\u0415\u0441\u0442\u044C \u043D\u0435\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F. \u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0434\u0440\u0443\u0433\u043E\u043C\u0443 \u0441\u0430\u0439\u0442\u0443 \u0431\u0435\u0437 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F?")}async function T4(){await Ip(),document.querySelector("#new-site-error").textContent="",document.querySelector("#new-site-dialog").showModal()}async function N4(){await Ip(),document.querySelector("#transfer-site-source").replaceChildren(...xd.filter(t=>t.id!==d.projectConfig.id).map(t=>{let a=document.createElement("option");return a.value=t.id,a.textContent=t.name,a})),document.querySelector("#transfer-site-error").textContent="",document.querySelector("#transfer-site-dialog").showModal()}function No(){try{return JSON.parse(localStorage.getItem(eb)||"{}")}catch{return{}}}function R4(e){try{localStorage.setItem(eb,JSON.stringify(e))}catch{}}function Eo(e){R4({...No(),...e})}function B4(){let e=No().collections||{};return new Map(Object.entries(e).map(([t,a])=>[t,new Set(Array.isArray(a)?a:[])]))}function tb(){return String(No().lastMediaDirectory||"").replace(/^\/+/,"")}function O4(){let e=No().mode;return e==="seo"||e==="knowledge"?e:"content"}function Q(e,t,a="text",n=a==="html"?"html":"text",l=null,o={}){return{path:e,label:t,kind:a,renderAs:n,group:l||pb(e),...o}}function cp(e,t,a,n,l){return{path:e,label:t,kind:"collection",renderAs:"collection",group:a,itemTemplate:n,itemFields:l}}function D(e){f.status.textContent=e}async function ya(e,t="\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u043F\u0440\u043E\u0441\u0430"){let a=await e.json().catch(()=>null);if(e.status===401&&a?.loginUrl)throw D("\u0421\u0435\u0441\u0441\u0438\u044F CMS \u0438\u0441\u0442\u0435\u043A\u043B\u0430. \u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u044B\u0439 \u0432\u0445\u043E\u0434..."),window.location.assign(a.loginUrl),new Error("\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u044B\u0439 \u0432\u0445\u043E\u0434 \u0432 CMS");if(!e.ok||!a)throw new Error(a?.error||t);return a}function Ro(e,t=null){d.dirty=e,f.dirtyState.dataset.dirty=String(e),f.dirtyState.textContent=e?"\u0415\u0441\u0442\u044C \u043D\u0435\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F":"\u0421\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u043E",t&&D(t)}function be(e=null){pp+=1,Ro(!0,e)}function H4(){let e=document.createElement("input");return e.type="file",e.accept=ab,e.className="admin-file-picker-input",e.tabIndex=-1,e.setAttribute("aria-hidden","true"),document.body.append(e),e}function hl(e){d.filePickerActive=e,e?document.body.dataset.filePickerActive="true":delete document.body.dataset.filePickerActive}function na(){Ne()&&(f.knowledgeForm.classList.add("hidden"),f.projectSettingsForm.classList.add("hidden"),f.empty.classList.add("hidden"),f.form.classList.remove("hidden"))}function gt(e){return JSON.parse(JSON.stringify(e))}function ru(e){return String(e??"").replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function Le(e,t){return t.split(".").reduce((a,n)=>a?.[n],e)}function Zt(e,t,a){let n=t.split("."),l=n.pop(),o=e;n.forEach((r,i)=>{let u=n[i+1]??l;(o[r]==null||typeof o[r]!="object")&&(o[r]=/^\d+$/.test(u)?[]:{}),o=o[r]}),o[l]=a}function $t(){return d.selected?.kind==="project-settings"}function Dp(){return d.projectConfig?.name||"NODE.DC"}function ob(){return d.projectConfig?.role||"\u0410\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440 \u0441\u0430\u0439\u0442\u0430"}function hp(){return d.projectConfig?.site||{ready:!1,missingFiles:[]}}function vl(){return!!hp().ready}function Tp(){f.workspaceName&&(f.workspaceName.textContent=Dp()),f.workspaceRole&&!$t()&&(f.workspaceRole.textContent=d.mode==="knowledge"?"\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u043E\u0432":d.mode==="seo"?"SEO-\u0440\u0435\u0436\u0438\u043C \u0441\u0430\u0439\u0442\u0430":ob())}async function su(){let e=await Ve("/api/project/config"),t=await ya(e,"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0440\u043E\u0435\u043A\u0442\u0430");return d.projectConfig=t,d.projectConfigDirty=!1,Tp(),await Ip(),d.publishResumeAttempted||(d.publishResumeAttempted=!0,Q4().catch(()=>{})),t}function P4(e){return Le(d.projectConfig||{},e)}function F4(e,t){d.projectConfig||(d.projectConfig={}),Zt(d.projectConfig,e,t),d.projectConfigDirty=!0}function rb(e){return e.type==="checkbox"?e.checked:e.type==="number"?Number(e.value||0):e.value.trim()}function j4(){if(!(!f.projectSettingsForm||!d.projectConfig))for(let e of f.projectSettingsForm.querySelectorAll("[data-project-path]"))Zt(d.projectConfig,e.dataset.projectPath,rb(e))}async function G4(){j4();let e=await Ve("/api/project/config",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(d.projectConfig)}),t=await e.json().catch(()=>null);if(!e.ok||!t?.ok)throw new Error(t?.error||"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0440\u043E\u0435\u043A\u0442\u0430");d.projectConfig=t.project,d.projectConfigDirty=!1,Ro(!1),Tp(),bl(),D("\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B.")}async function V4(){let[e,t,a]=await Promise.all([Ve("/api/page/home"),Ve("/api/knowledge"),Ve("/api/media/site-size")]);if(!e.ok)throw new Error(`home.json: ${await e.text()}`);if(!t.ok)throw new Error(`knowledge.json: ${await t.text()}`);let n=a.ok?await a.json():null;D(`\u041F\u0440\u043E\u0435\u043A\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u0420\u0430\u0437\u043C\u0435\u0440 \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0441\u0430\u0439\u0442\u0430: ${n?.label||"\u043D\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043D"}.`)}async function X4(){let e=await Ve("/api/project/publish/start",{method:"POST"}),t=await ya(e,"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044E \u043F\u0440\u043E\u0435\u043A\u0442\u0430");if(!t?.ok||!t.job?.id)throw new Error(t?.error||"\u0421\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u0432\u0435\u0440\u043D\u0443\u043B ID \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438");d.publishJob=t.job,du(),await Np(t.job.id)}function ib(e=d.publishJob){return!!(e&&!["completed","failed"].includes(e.state))}function ub(e){return{queued:"\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u043F\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0430 \u0432 \u043E\u0447\u0435\u0440\u0435\u0434\u044C",building:"\u0421\u043E\u0431\u0438\u0440\u0430\u0435\u043C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0441\u0430\u0439\u0442\u0430",scanning:"\u0421\u0447\u0438\u0442\u0430\u0435\u043C \u0444\u0430\u0439\u043B\u044B \u0438 \u043E\u0431\u0449\u0438\u0439 \u043E\u0431\u044A\u0451\u043C",connecting:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F \u043A \u0445\u043E\u0441\u0442\u0438\u043D\u0433\u0443",publishing:"\u041F\u0435\u0440\u0435\u0434\u0430\u0451\u043C \u0444\u0430\u0439\u043B\u044B \u043F\u043E SFTP",completed:"\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430",failed:"\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430 \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439"}[e?.state]||"\u041F\u043E\u0434\u0433\u043E\u0442\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u043C \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044E"}function K4(){if(!f.publish)return;let e=ib(),t=!!d.projectConfig?.deploy?.enabled;f.publish.disabled=e||!t||!vl()||d.projectConfigDirty,f.publish.textContent=e?`${Number(d.publishJob?.percent||0).toLocaleString("ru-RU")}%`:"\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C"}function Y4(){let e=document.createElement("section");return e.className="settings-card publish-progress-card",e.dataset.publishProgress="true",e.innerHTML=`
\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F

`,e}function du(){K4();let e=d.publishJob;if(!e||!f.projectSettingsForm||f.projectSettingsForm.classList.contains("hidden"))return;let t=f.projectSettingsForm.querySelector("[data-publish-progress]");t||(t=Y4(),f.projectSettingsForm.prepend(t));let a=Number(e.percent||0);t.dataset.state=e.state||"queued",t.querySelector("[data-publish-title]").textContent=ub(e),t.querySelector("[data-publish-percent]").textContent=`${a.toLocaleString("ru-RU")}%`,t.querySelector(".publish-progress-track").setAttribute("aria-valuenow",String(a)),t.querySelector("[data-publish-bar]").style.width=`${a}%`,t.querySelector("[data-publish-volume]").textContent=`${e.processedLabel||"0 \u0411"} \u0438\u0437 ${e.totalLabel||"0 \u0411"}`,t.querySelector("[data-publish-files]").textContent=`\u041F\u0440\u043E\u0432\u0435\u0440\u0435\u043D\u043E: ${Number(e.processedFiles||0).toLocaleString("ru-RU")}/${Number(e.totalFiles||0).toLocaleString("ru-RU")}`,t.querySelector("[data-publish-uploaded]").textContent=`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E: ${Number(e.uploadedFiles||0).toLocaleString("ru-RU")}`,t.querySelector("[data-publish-skipped]").textContent=`\u0411\u0435\u0437 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439: ${Number(e.skippedFiles||0).toLocaleString("ru-RU")}`,t.querySelector("[data-publish-current]").textContent=e.currentFile?`\u0421\u0435\u0439\u0447\u0430\u0441: ${e.currentFile}`:e.host?`${e.host}/${e.remoteRoot||""}`:"";let l=t.querySelector("[data-publish-error]");l.textContent=e.error||"",l.classList.toggle("hidden",!e.error)}function $4(e){let t=e.currentFile?` \xB7 ${e.currentFile}`:"";return`${ub(e)}: ${Number(e.percent||0).toLocaleString("ru-RU")}% \xB7 ${e.processedLabel||"0 \u0411"}/${e.totalLabel||"0 \u0411"}${t}`}async function sb(e=""){let t=e?`?jobId=${encodeURIComponent(e)}`:"",a=await Ve(`/api/project/publish/status${t}`);return a.status===404?null:(await ya(a,"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438")).job||null}function Np(e){if(!fd.has(e)){let t=Z4(e).finally(()=>fd.delete(e));fd.set(e,t)}return fd.get(e)}async function Z4(e){for(;;){let t=await sb(e);if(!t)throw new Error("\u0421\u0435\u0440\u0432\u0435\u0440 \u043F\u043E\u0442\u0435\u0440\u044F\u043B \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438");if(d.publishJob=t,du(),D($4(t)),t.state==="completed")return D(W4({publish:t}).trim()||"\u041F\u0440\u043E\u0435\u043A\u0442 \u043E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u043D."),t;if(t.state==="failed")throw new Error(`\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430: ${t.error||"\u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430"}. \u0424\u0430\u0439\u043B: ${t.currentFile||"\u043D\u0435 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0451\u043D"}`);await new Promise(a=>window.setTimeout(a,700))}}async function Q4(){let e=await sb();e&&(d.publishJob=e,du(),ib(e)?await Np(e.id):e.state==="failed"&&D(`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0430\u0441\u044C \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439: ${e.error||"\u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430"}. \u0424\u0430\u0439\u043B: ${e.currentFile||"\u043D\u0435 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0451\u043D"}`))}function W4(e){let t=e?.publish;if(!t)return"";let a=Number(t.uploadedFiles||0).toLocaleString("ru-RU"),n=Number(t.skippedFiles||0).toLocaleString("ru-RU"),l=Number(t.totalFiles||0).toLocaleString("ru-RU"),o=t.uploadedLabel||"0 \u041C\u0411";return` \u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u043D\u043E \u043D\u0430 ${t.host}: \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E ${a}/${l}, \u043F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E ${n}, \u043E\u0431\u044A\u0435\u043C ${o}.`}function db(){d.page&&(d.page.seo={..._4,...d.page.seo||{}})}function J4(e){!e||ot()||(e.seo={...Mp,...e.seo||{}})}function e2(){db();for(let e of d.page?.regions||[])for(let t of e.blocks||[])t.seo={...Mp,...t.seo||{}}}function Rp(e){if(!vl()&&!$t()){d.mode="content",Eo({mode:d.mode}),Sd();return}let t=e==="seo"||e==="knowledge"?e:"content";if(d.mode=t,$t()&&(d.selected=t==="knowledge"?null:{kind:"static"}),Eo({mode:t}),t==="knowledge"&&!d.knowledge){Wp().catch(a=>D(a.message)),Mo();return}d.page?xt():Mo()}function Mo(){let e=d.mode==="seo",t=d.mode==="knowledge",a=vl();document.body.dataset.adminMode=d.mode,f.modeNav?.classList.toggle("hidden",!a),f.modeContent&&(f.modeContent.dataset.active=String(!e&&!t)),f.modeSeo&&(f.modeSeo.dataset.active=String(e)),f.modeKnowledge&&(f.modeKnowledge.dataset.active=String(t)),f.sidebarTitle&&(f.sidebarTitle.textContent=t?"\u0411\u0430\u0437\u0430 \u0437\u043D\u0430\u043D\u0438\u0439":e?"SEO":"\u0410\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435"),f.workspaceRole&&(f.workspaceRole.textContent=t?"\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u043E\u0432":e?"SEO-\u0440\u0435\u0436\u0438\u043C \u0441\u0430\u0439\u0442\u0430":ob()),f.editorHeading&&(f.editorHeading.textContent=t?"\u0411\u0430\u0437\u0430 \u0437\u043D\u0430\u043D\u0438\u0439":e?"SEO \u0441\u0430\u0439\u0442\u0430":"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0441\u0430\u0439\u0442\u0430"),f.panelKicker&&(f.panelKicker.textContent=t?"Knowledge":e?"SEO":"\u041A\u043E\u043D\u0442\u0435\u043D\u0442"),f.panelTitle&&(f.panelTitle.textContent=t?"\u0414\u0435\u0440\u0435\u0432\u043E \u0438 \u0441\u0442\u0430\u0442\u044C\u044F":e?"\u0421\u0435\u043C\u0430\u043D\u0442\u0438\u043A\u0430 \u0438 \u0441\u043D\u0438\u043F\u043F\u0435\u0442\u044B":"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0443\u0435\u043C\u044B\u0435 \u043F\u043E\u043B\u044F"),f.panelNote&&(f.panelNote.textContent=t?"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B \u0433\u0435\u043D\u0435\u0440\u0438\u0440\u0443\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0435 SEO-\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0440\u0430\u0437\u0434\u0435\u043B\u0430 /knowledge/.":e?"\u041F\u043E\u043B\u044F \u0433\u043E\u0442\u043E\u0432\u044F\u0442 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438 \u0441\u0435\u043A\u0446\u0438\u0438 \u043A \u0441\u0435\u043C\u0430\u043D\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0435 \u0438 \u0434\u0430\u043B\u044C\u043D\u0435\u0439\u0448\u0435\u0439 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438.":"\u041F\u043E\u043B\u044F \u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u044B \u043F\u043E \u0441\u043C\u044B\u0441\u043B\u043E\u0432\u044B\u043C \u043F\u043E\u0434\u0431\u043B\u043E\u043A\u0430\u043C \u0432\u0435\u0440\u0441\u0442\u043A\u0438."),f.addBlock&&(f.addBlock.title=t?"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B \u0432 \u043A\u043E\u0440\u0435\u043D\u044C \u0431\u0430\u0437\u044B \u0437\u043D\u0430\u043D\u0438\u0439":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u043B\u043E\u043A",f.addBlock.setAttribute("aria-label",f.addBlock.title),f.addBlock.disabled=!a),f.addProject&&(f.addProject.title="\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0430\u0439\u0442",f.addProject.setAttribute("aria-label","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0430\u0439\u0442")),f.save&&(f.save.textContent="\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C",f.save.title=d.projectConfig?.deploy?.enabled&&d.projectConfig?.deploy?.deployOnRender?"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0438 \u043E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435":"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0438 \u043F\u0435\u0440\u0435\u0441\u043E\u0431\u0440\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B",f.save.disabled=!a&&!$t()),f.render&&(f.render.textContent=d.projectConfig?.deploy?.enabled&&d.projectConfig?.deploy?.deployOnRender?"\u0421\u043E\u0431\u0440\u0430\u0442\u044C \u0438 \u043E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C":"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",f.render.title=t?"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0434\u0435\u0440\u0435\u0432\u043E \u0438 \u043F\u0435\u0440\u0435\u0441\u043E\u0431\u0440\u0430\u0442\u044C \u043F\u0443\u0431\u043B\u0438\u0447\u043D\u044B\u0439 \u0440\u0430\u0437\u0434\u0435\u043B /knowledge/":"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C \u0438 \u043F\u0435\u0440\u0435\u0441\u043E\u0431\u0440\u0430\u0442\u044C \u043F\u0443\u0431\u043B\u0438\u0447\u043D\u044B\u0439 index.html",f.render.disabled=!a&&!$t()),f.publish&&(f.publish.classList.add("hidden"),f.publish.disabled=!0),f.reload&&(f.reload.disabled=!a&&!$t())}function cb(e){return d.mode==="seo"&&ot()?d.page?.seo||{}:e||{}}function t2(e){let t=new Map;for(let a of e){let n=a.group||"SEO";t.has(n)||t.set(n,[]),t.get(n).push(a)}return t}function gp(e){return e==null?"":Array.isArray(e)?e.map(gp).join(" "):typeof e=="object"?Object.values(e).map(gp).join(" "):String(e).replace(/<[^>]*>/g," ").replace(/https?:\/\/\S+/g," ").replace(/\s+/g," ").trim()}function hd(e,t,a){let n=String(e||"").trim().length;return!t&&!a?{status:"info",text:n?`${n} \u0441\u0438\u043C\u0432.`:"\u043F\u0443\u0441\u0442\u043E"}:n?t&&na?{status:"warn",text:`${n} \u0441\u0438\u043C\u0432. \xB7 \u0446\u0435\u043B\u044C ${t||0}-${a||"\u221E"}`}:{status:"good",text:`${n} \u0441\u0438\u043C\u0432.`}:{status:"bad",text:`\u043F\u0443\u0441\u0442\u043E \xB7 \u0446\u0435\u043B\u044C ${t||0}-${a||"\u221E"}`}}function Rn(e,t,a="info"){let n=document.createElement("div"),l=document.createElement("span"),o=document.createElement("strong");return n.className="seo-metric",n.dataset.status=a,l.textContent=e,o.textContent=t,n.append(l,o),n}function a2(e){let t=gp(e?.content||""),a=t?t.split(/\s+/).filter(Boolean).length:0;return{text:t,words:a,chars:t.length}}function n2({targetModel:e,fields:t,isStatic:a}){let n=document.createElement("section"),l=document.createElement("div"),o=document.createElement("h3"),r=document.createElement("p"),i=document.createElement("div");if(n.className="seo-diagnostics",l.className="group-head",o.textContent=a?"\u0414\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B":"\u0414\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0430 \u0431\u043B\u043E\u043A\u0430",r.className="group-desc",r.textContent=a?"\u0411\u0430\u0437\u043E\u0432\u044B\u0435 \u043F\u043E\u043B\u044F, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043F\u043E\u043F\u0430\u0434\u0430\u044E\u0442 \u0432 head, Open Graph, sitemap \u0438 structured data.":"\u0427\u0435\u0440\u043D\u043E\u0432\u043E\u0439 \u0441\u043B\u043E\u0439 \u0434\u043B\u044F \u0441\u0435\u043C\u0430\u043D\u0442\u0438\u043A\u0438 \u0431\u043B\u043E\u043A\u0430. \u041F\u043E\u0437\u0436\u0435 \u0435\u0433\u043E \u0441\u043C\u043E\u0436\u0435\u0442 \u0437\u0430\u043F\u043E\u043B\u043D\u044F\u0442\u044C \u0432\u043D\u0435\u0448\u043D\u0438\u0439 SEO-\u043C\u043E\u0434\u0443\u043B\u044C.",l.append(o,r),i.className="seo-metric-grid",a){let u=hd(Le(e,"seo.title"),35,70),s=hd(Le(e,"seo.description"),110,170),m=String(Le(e,"seo.canonicalUrl")||""),c=String(Le(e,"seo.ogImage")||"");i.append(Rn("Title",u.text,u.status),Rn("Description",s.text,s.status),Rn("Canonical",m.startsWith("https://")?"\u0430\u0431\u0441\u043E\u043B\u044E\u0442\u043D\u044B\u0439":"\u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C",m.startsWith("https://")?"good":"warn"),Rn("OG image",c?"\u0437\u0430\u0434\u0430\u043D":"\u043F\u0443\u0441\u0442\u043E",c?"good":"bad"))}else{let u=a2(e),s=String(Le(e,"seo.primaryQuery")||"").trim(),m=String(Le(e,"seo.secondaryQueries")||"").split(/\n|,/).map(p=>p.trim()).filter(Boolean),c=hd(Le(e,"seo.title"),35,80);i.append(Rn("\u0422\u0435\u043A\u0441\u0442 \u0431\u043B\u043E\u043A\u0430",`${u.words} \u0441\u043B\u043E\u0432`,u.words>=40?"good":"warn"),Rn("\u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u0437\u0430\u043F\u0440\u043E\u0441",s?"\u0437\u0430\u0434\u0430\u043D":"\u043F\u0443\u0441\u0442\u043E",s?"good":"bad"),Rn("\u0421\u043C\u0435\u0436\u043D\u044B\u0435 \u0437\u0430\u043F\u0440\u043E\u0441\u044B",`${m.length}`,m.length?"good":"warn"),Rn("SEO-\u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A",c.text,c.status))}return n.append(l,i),n}function HL(e,t,a){if(!e)return;let n=hd(Id(t),a.min,a.max);e.dataset.status=n.status,e.textContent=n.text}function l2({targetModel:e,seoField:t,grid:a}){let n=document.createElement("label"),l=document.createElement("span"),o=document.createElement("span"),r=document.createElement("span"),i=document.createElement("span"),u=t.kind==="textarea",s=t.kind==="select"?document.createElement("select"):u?document.createElement("textarea"):document.createElement("input"),m=Le(e,t.path)??"",c=t.min||t.max?document.createElement("span"):null;if(n.className=`field-control seo-field${u?" wide":""}`,l.className="field-label-row",o.className="field-label-text",o.textContent=t.label||t.path,r.className="field-kind",r.textContent=t.kind||"text",i.className="field-path",i.textContent=t.path,l.append(o,r),t.kind==="select"){let p=new Set([...t.options||[],m].filter(Boolean));for(let h of p){let v=document.createElement("option");v.value=h,v.textContent=h,s.append(v)}}else u||(s.autocomplete="off",s.type=t.kind==="url"?"url":"text");s.dataset.seoPath=t.path,s.value=m,s.placeholder=t.placeholder||"",HL(c,s,t),s.addEventListener(t.kind==="select"?"change":"input",()=>{Zt(e,t.path,Id(s)),HL(c,s,t),f.json.value=JSON.stringify(cb(Ne()),null,2),be("SEO-\u043F\u043E\u043B\u044F \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u044B \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C\xBB \u0438\u043B\u0438 \xAB\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C index.html\xBB.")}),n.append(l,s),c&&(c.className="seo-field-meter",n.append(c)),n.append(i),a.append(n)}function o2(e){let t=ot(),a=t?d.page:e,n=t?z4:q4;t?db():J4(e),f.contentFields.innerHTML="",f.contentFields.append(n2({targetModel:a,fields:n,isStatic:t}));for(let[l,o]of t2(n)){let r=document.createElement("section"),i=document.createElement("div"),u=document.createElement("div"),s=document.createElement("h3"),m=document.createElement("p"),c=document.createElement("div");r.className="content-group seo-group",i.className="group-head",s.textContent=l,m.className="group-desc",m.textContent=t?"\u041F\u043E\u043B\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0438 \u043F\u043E\u0438\u0441\u043A\u043E\u0432\u043E\u0433\u043E \u0441\u043D\u0438\u043F\u043F\u0435\u0442\u0430.":"\u041F\u043E\u043B\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0441\u0435\u043A\u0446\u0438\u0438 \u0434\u043B\u044F \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u0441\u0435\u043C\u0430\u043D\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u043A\u0430\u0440\u0442\u044B.",u.append(s,m),i.append(u),c.className="group-grid";for(let p of o)l2({targetModel:a,seoField:p,grid:c});r.append(i,c),f.contentFields.append(r)}}function fb(e){return r2.has(String(e||"").trim())}function xp(e){return/^(https?:)?\/\//i.test(String(e||""))||/^(mailto:|tel:)/i.test(String(e||""))}function bd(e){let t=String(e||"").trim();if(!t||/^javascript:/i.test(t)||xp(t))return"";let a=t;return a.includes("#")&&(a=a.slice(a.indexOf("#")+1)),a=a.replace(/^\/+/,"").replace(/^index\.html#?/i,"").replace(/^#+/,"").trim(),!a||a==="/"||a==="index.html"||a.startsWith("knowledge/")||fb(a)?"":a}function gl(){let e=[];for(let t of d.page?.regions||[])for(let a of t.blocks||[]){if(a.enabled===!1)continue;let n=bd(a.anchor);n&&e.push({block:a,id:a.id,label:a.adminLabel||a.id,target:n})}return e.sort((t,a)=>t.target.localeCompare(a.target,"ru"))}function i2(e){let t=String(e||"").trim(),a=bd(t),n=t.toLowerCase(),l=a.toLowerCase();return gl().find(o=>o.target.toLowerCase()===l)||gl().find(o=>o.id.toLowerCase()===n)||gl().find(o=>o.label.toLowerCase()===n)||null}function Bp(e,t=null){let a=new Set(gl().filter(r=>r.block!==t).map(r=>r.target)),n=_p(bd(e)||e||"section"),l=n,o=2;for(;a.has(l);)l=`${n}-${o}`,o+=1;return l}function mb(){let e=new Map,t=[];for(let a of gl()){if(e.has(a.target)){t.push({target:a.target,first:e.get(a.target),second:a});continue}e.set(a.target,a)}return t}function u2(){let e=mb();if(!e.length)return;let t=e.map(({target:a,first:n,second:l})=>`${a}: ${n.label} / ${l.label}`).join("; ");throw new Error(`Target \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u0443\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u043C \u0434\u043B\u044F \u043A\u0430\u0436\u0434\u043E\u0433\u043E \u0431\u043B\u043E\u043A\u0430. \u0414\u0443\u0431\u043B\u0438: ${t}`)}function yp(){if(f.targetOptions){f.targetOptions.innerHTML="";for(let{target:e,label:t}of gl()){let a=document.createElement("option");a.value=e,a.label=t,f.targetOptions.append(a)}}}function s2(e,t={}){if(!e||typeof e!="object")return;let a=e.href??t.href??"",n=e.target??t.target??"",l=e.linkTarget??t.linkTarget??"";fb(n)&&(l||=n,n="");let o=xp(a)?"href":"target",r=e.linkMode==="href"||e.linkMode==="target"?e.linkMode:o;r==="target"&&!n&&a&&!xp(a)&&(n=a,a=""),e.enabled=e.enabled!==!1,e.href=a,e.target=n,e.linkMode=r,e.linkTarget=l}function d2(e,t=[]){Array.isArray(e)&&e.forEach((a,n)=>s2(a,t[n]||t[0]||{}))}function pb(e){return e.startsWith("content.navigation.")?"\u0428\u0430\u043F\u043A\u0430":e.startsWith("content.notifications.")?"\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F":e.startsWith("content.dock.")?"Dock":e.startsWith("content.assets.")?"\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B":e.startsWith("content.cards.")?"\u0422\u0435\u0437\u0438\u0441\u044B \u043F\u0435\u0440\u0432\u043E\u0433\u043E \u044D\u043A\u0440\u0430\u043D\u0430":e.startsWith("content.app.")||e.startsWith("content.accessCard.")?"\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u0430":e.startsWith("content.form.")?"\u0424\u043E\u0440\u043C\u0430":e==="content.legalHtml"||e.startsWith("content.legal.")?"\u042E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0431\u043B\u043E\u043A":e==="content.windowTitle"||e==="content.videoSrc"?"\u0412\u0438\u0434\u0435\u043E-\u043E\u043A\u043D\u043E":e.startsWith("content.features.")?"\u041F\u0443\u043D\u043A\u0442\u044B":e.startsWith("content.scroll.")?"\u0421\u043A\u0440\u043E\u043B\u043B":e.startsWith("content.sliderItems.")?"\u0421\u043B\u0430\u0439\u0434\u0435\u0440":e.startsWith("content.bottomInfo.")?"\u041D\u0438\u0436\u043D\u0438\u0439 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 \u0431\u043B\u043E\u043A":e.startsWith("content.oneClick.")?"\u041E\u0434\u0438\u043D \u043A\u043B\u0438\u043A":e.startsWith("content.mcp.")?"MCP":e.startsWith("content.faq.")?"FAQ":e.startsWith("content.cta.")?"CTA":e.startsWith("content.plans.")||e.startsWith("content.pricing.")?"\u0422\u0430\u0440\u0438\u0444\u044B":e.startsWith("content.pricingCells.")?"\u0421\u0442\u0440\u043E\u043A\u0438 \u0442\u0430\u0440\u0438\u0444\u043E\u0432":e==="content.galleryItems"||e.startsWith("content.galleryItems.")?"\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u0441\u043A\u0440\u0438\u043D\u0448\u043E\u0442\u043E\u0432":e==="content.filesEnabled"||e.startsWith("content.files.")?"TXT-\u0444\u0430\u0439\u043B\u044B":e==="content.footer.policyEnabled"||e==="content.footer.policyHtml"?"\u041F\u043E\u043B\u0438\u0442\u0438\u043A\u0438":e.startsWith("content.footer.navLinks.")?"\u041D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044F \u0444\u0443\u0442\u0435\u0440\u0430":e.startsWith("content.footer.contactLinks.")?"\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438":e.startsWith("content.footer.")?"\u0424\u0443\u0442\u0435\u0440":e.startsWith("content.heading.")||e==="content.introHtml"?"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A":"\u041A\u043E\u043D\u0442\u0435\u043D\u0442"}function c2(e={},t={}){return[{enabled:!0,title:"NODE.DC",href:"javascript:void(0)",linkTarget:"",targetId:e.appTarget||"app-data",iconSrc:t.appIconSrc||Ge.content.assets.appIconSrc,iconAlt:t.appIconAlt||Ge.content.assets.appIconAlt,className:"dock-icon nodedc-app",iconClass:"logo",dividerBefore:!1},{enabled:!0,title:"\u041A\u043E\u0440\u0437\u0438\u043D\u0430",href:"javascript:void(0)",linkTarget:"",targetId:"",iconSrc:"./assets/site/images/69a9ae818a76c773dc3cf7bc_trash.avif",iconAlt:e.trashAlt||"\u0411\u0435\u043B\u0430\u044F \u0438\u043A\u043E\u043D\u043A\u0430 \u043A\u043E\u0440\u0437\u0438\u043D\u044B.",className:"dock-icon no-bg",iconClass:"dock-app-img trash",dividerBefore:!0}]}function f2(e,t={}){let a=c2(e,t);Array.isArray(e.items)?e.items=e.items.map((n,l)=>{let o=a[l]||a[0],r=i=>Object.prototype.hasOwnProperty.call(n,i);return{enabled:n.enabled!==!1,title:n.title||o.title||`\u042D\u043B\u0435\u043C\u0435\u043D\u0442 ${l+1}`,href:n.href??o.href??"",linkTarget:n.linkTarget??o.linkTarget??"",targetId:n.targetId??o.targetId??"",iconSrc:r("iconSrc")?n.iconSrc:o.iconSrc,iconAlt:r("iconAlt")?n.iconAlt:n.alt||o.iconAlt,className:n.className||o.className||"dock-icon nodedc-app",iconClass:r("iconClass")?n.iconClass:o.iconClass||"logo",dividerBefore:!!n.dividerBefore}}):e.items=a,e.demoFileLabel||=Ge.content.dock.demoFileLabel,delete e.appTarget,delete e.trashAlt}function m2(){if(!d.page.staticElements){d.page.staticElements=gt(Ge);return}d.page.staticElements.id||=Ge.id,d.page.staticElements.type||=Ge.type,d.page.staticElements.adminLabel||=Ge.adminLabel,d.page.staticElements.enabled=!0,d.page.staticElements.content||=gt(Ge.content),d.page.staticElements.content.navigation||=gt(Ge.content.navigation),d.page.staticElements.content.navigation.logoSrc||=Ge.content.navigation.logoSrc,d.page.staticElements.content.navigation.links||=gt(Ge.content.navigation.links),d2(d.page.staticElements.content.navigation.links,Ge.content.navigation.links),d.page.staticElements.content.notifications||=gt(Ge.content.notifications),d.page.staticElements.content.notifications.forEach((e,t)=>{e.enabled=e.enabled!==!1,e.eyebrowClass||=Ge.content.notifications[t]?.eyebrowClass||"red-txt gray"}),d.page.staticElements.content.assets||=gt(Ge.content.assets);for(let[e,t]of Object.entries(Ge.content.assets))Object.prototype.hasOwnProperty.call(d.page.staticElements.content.assets,e)||(d.page.staticElements.content.assets[e]=t);d.page.staticElements.content.dock||=gt(Ge.content.dock),f2(d.page.staticElements.content.dock,d.page.staticElements.content.assets),d.page.staticElements.editableFields=gt(Ge.editableFields)}function p2(){let t=(Array.isArray(d.page.regions)?d.page.regions:[]).flatMap(a=>(a.blocks??[]).map(n=>(n.region||=a.id,n)));d.page.regions=[{id:kp,label:Ep,description:"\u0415\u0434\u0438\u043D\u044B\u0439 \u043F\u043E\u0440\u044F\u0434\u043E\u043A \u0441\u0435\u043A\u0446\u0438\u0439 \u0433\u043B\u0430\u0432\u043D\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.",blocks:t}]}function h2(){return Math.max(0,d.page.regions.findIndex(e=>e.id===kp))}function ot(){return d.selected?.kind==="static"}function Ll(){return d.selected?ot()?{id:"static",label:"\u0421\u0442\u0430\u0442\u0438\u0447\u043D\u044B\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",description:"Shell-\u0441\u043B\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B: \u0448\u0430\u043F\u043A\u0430, \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F, dock \u0438 \u0431\u0430\u0437\u043E\u0432\u044B\u0435 \u0430\u0441\u0441\u0435\u0442\u044B."}:d.page.regions[d.selected.regionIndex]:null}function Ne(){if(!d.selected)return null;if(ot())return d.page.staticElements;let e=Ll();return!e||d.selected.blockIndex==null?null:e.blocks[d.selected.blockIndex]}function Op(e){let t=new Set([d.page.staticElements?.id,...d.page.regions.flatMap(l=>l.blocks.map(o=>o.id))]),a=`${e}-copy`,n=2;for(;t.has(a);)a=`${e}-copy-${n}`,n+=1;return a}function g2(e){return Op(_p(e||"block").replace(/-copy(?:-\d+)?$/,""))}function cu(e,t=22){return e?e.length>t?`${e.slice(0,t-1)}\u2026`:e:""}function Ha(e){if(!e)return"\u0424\u0430\u0439\u043B \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D";try{let t=e.split("?")[0].split("#")[0];return decodeURIComponent(t.slice(t.lastIndexOf("/")+1))||e}catch{return e}}function _p(e){return String(e||"site").normalize("NFKD").replace(/[^\w.-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()||"site"}function iu(e){return e?/^(blob:|data:|https?:)/i.test(e)?e:Ld(e):""}function x2(e){return e?/\.(mp4|webm|mov|m4v|avi|mkv)(\?.*)?$/i.test(e)?"video":/\.(png|jpe?g|gif|svg|ico|avif|webp)(\?.*)?$/i.test(e)?"image":/\.(glb|gltf)(\?.*)?$/i.test(e)?"model":/\.(woff2?|ttf|otf)(\?.*)?$/i.test(e)?"font":null:null}function hb(e){let t=Number(e);if(!Number.isFinite(t)||t<0)return"";if(t<1024)return`${t} B`;let a=["KB","MB","GB"],n=t/1024,l=0;for(;n>=1024&&l=10?n.toFixed(0):n.toFixed(1)} ${a[l]}`}function PL(e){let t=Number(e);return Number.isFinite(t)?new Intl.DateTimeFormat("ru-RU",{day:"2-digit",month:"2-digit",year:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(t)):""}function zp(e){return e?.usage?.status||"unused"}function yd(e){return e?.usage?.label||"\u041D\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F"}function FL(e){return[e.kind,e.extension,hb(e.size)].filter(Boolean).join(" \xB7 ")}function fu(){let e=d.mediaLibrary.selectedEntry;return e?.type==="file"?e:null}function y2(e){let t=String(e?.path||"").toLowerCase(),a=String(e?.label||"").toLowerCase();return/logo|icon|wordmark|логотип|икон/.test(`${t} ${a}`)}function qp(e,t){let a=t.path.toLowerCase(),n=String(Le(e,t.path)??"").toLowerCase(),l=_p(e?.id||e?.type||"site"),o="images";return(a.includes("webgl")||n.endsWith(".glb")||n.endsWith(".gltf"))&&(o="models"),(a.includes("video")||a.includes("media")||a.includes("sliders")||a.includes("slideritems"))&&(o="media"),(a.includes("font")||/\.(woff2?|ttf|otf)(\?.*)?$/i.test(n))&&(o="fonts"),a.includes("favicon")?"favicon":`${o}/${l}`}function gb(e){let t=e.id||"",a=e.type||"";return t==="static-elements"?"SE":t.includes("gallery")||t.includes("screenshot")?"SC":t.includes("hero")?"H":t.includes("feature")||t.includes("video")?"V":t.includes("component")?"C":t.includes("modes")?"AI":t.includes("faq")?"Q":t.includes("pricing")?"P":t.includes("waitlist")?"W":t.includes("footer")?"F":a.includes("Cta")?"GO":"B"}function v2(e){return e.id===kp||e.id==="beforeCViz"||e.id==="cViz"?Ep:e.label||e.id}function xb(e){return e.template||e.type||e.id}function Ua(){d.drag=null,d.dragTarget=null,document.querySelectorAll(".dragging, .drag-over, .sorting-source, .sorting-active").forEach(e=>{e.classList.remove("dragging","drag-over","sorting-source","sorting-active")}),document.querySelectorAll(".sortable-ghost, .sortable-placeholder").forEach(e=>e.remove())}function yb(e,t){let a=e.getBoundingClientRect(),n=e.cloneNode(!0);return n.classList.add("sortable-ghost"),n.style.width=`${a.width}px`,n.style.height=`${a.height}px`,n.dataset.dragOffsetX=String(t.clientX-a.left),n.dataset.dragOffsetY=String(t.clientY-a.top),document.body.append(n),Up(n,t),n}function Up(e,t){e.style.left=`${t.clientX-Number(e.dataset.dragOffsetX||0)}px`,e.style.top=`${t.clientY-Number(e.dataset.dragOffsetY||0)}px`}function vb(e){let t=e.getBoundingClientRect(),a=document.createElement("div");return a.className="sortable-placeholder",a.style.height=`${t.height}px`,a}function L2(e,t){return e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>=t.top&&e.clientY<=t.bottom}function Lb({event:e,list:t,source:a,placeholder:n,selector:l}){let o=t.getBoundingClientRect();if(!L2(e,o))return;let r=[...t.querySelectorAll(l)].filter(i=>i!==a&&i!==n);for(let i of r){let u=i.getBoundingClientRect();if(e.clientYl===t||l!==a).indexOf(t)}function b2(e,t,a){let n=d.page.regions[e];if(!n||t===a||a<0){Ua();return}let[l]=n.blocks.splice(t,1);n.blocks.splice(Math.min(a,n.blocks.length),0,l),d.selected={kind:"block",regionIndex:e,blockIndex:Math.min(a,n.blocks.length-1)},Ua(),xt(),be("\u041F\u043E\u0440\u044F\u0434\u043E\u043A \u0431\u043B\u043E\u043A\u043E\u0432 \u0438\u0437\u043C\u0435\u043D\u0451\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C\xBB \u0438\u043B\u0438 \xAB\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C index.html\xBB.")}function S2(e,t,a){if(e.button!==0)return;e.preventDefault(),e.stopPropagation();let n=t.closest(".block-list");if(!n)return;let l=vb(t),o=yb(t,e);d.drag=a,d.dragTarget=a,t.classList.add("dragging","sorting-source"),n.classList.add("sorting-active"),t.after(l);let r=s=>{Up(o,s),Lb({event:s,list:n,source:t,placeholder:l,selector:".block-btn.has-drag-handle"})},i=()=>{document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",i),document.removeEventListener("pointercancel",u);let s=bb({list:n,placeholder:l,source:t,selector:".block-btn.has-drag-handle"});b2(a.regionIndex,a.blockIndex,s)},u=()=>{document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",i),document.removeEventListener("pointercancel",u),Ua()};document.addEventListener("pointermove",r),document.addEventListener("pointerup",i),document.addEventListener("pointercancel",u)}function C2(e,t){if(!e||e.regionIndex!==t.regionIndex||e.blockIndex===t.blockIndex){Ua();return}let a=d.page.regions[e.regionIndex];if(!a){Ua();return}let[n]=a.blocks.splice(e.blockIndex,1),l=t.blockIndex;e.blockIndexv.stopPropagation()),h.addEventListener("pointerdown",v=>S2(v,i,r)),h.addEventListener("dragstart",v=>{d.drag=r,i.classList.add("dragging"),v.dataTransfer.effectAllowed="move",v.dataTransfer.setData("text/plain",`${r.regionIndex}:${r.blockIndex}`)}),h.addEventListener("dragend",Ua),h.addEventListener("keydown",v=>v.stopPropagation()),i.append(h)}p&&(i.addEventListener("dragover",h=>{!d.drag||d.drag.regionIndex!==r.regionIndex||(h.preventDefault(),h.dataTransfer.dropEffect="move",i.classList.add("drag-over"))}),i.addEventListener("dragleave",()=>i.classList.remove("drag-over")),i.addEventListener("drop",h=>{h.preventDefault(),i.classList.remove("drag-over"),C2(d.drag,r)})),i.addEventListener("click",o),i.addEventListener("keydown",h=>{h.key!=="Enter"&&h.key!==" "||(h.preventDefault(),o(h))}),e.append(i)}function vp(){f.regions.innerHTML="";let e=document.createElement("section"),t=document.createElement("h3"),a=document.createElement("div");t.className="region-title",t.textContent="Static",a.className="block-list",jL({list:a,block:d.page.staticElements,meta:"shell \xB7 nav \xB7 notifications \xB7 dock",active:ot(),disabled:!1,onClick:()=>{d.selected={kind:"static"},xt()}}),e.append(t,a),f.regions.append(e),d.page.regions.forEach((n,l)=>{let o=document.createElement("section"),r=document.createElement("h3"),i=document.createElement("div");r.className="region-title",r.textContent=v2(n),i.className="block-list",n.blocks.forEach((u,s)=>{let m=d.selected?.kind==="block"&&d.selected?.regionIndex===l&&d.selected?.blockIndex===s;jL({list:i,block:u,meta:xb(u),active:m,disabled:u.enabled===!1,dragContext:{regionIndex:l,blockIndex:s},onClick:()=>{d.selected={kind:"block",regionIndex:l,blockIndex:s},xt()}})}),o.append(r,i),f.regions.append(o)})}function Sb(){let e=h2();return d.templates.map(t=>({...t,regionIndex:e,regionLabel:Ep}))}function w2(){f.templateList.innerHTML="";for(let e of Sb()){let t=document.createElement("button"),a=document.createElement("span"),n=document.createElement("span"),l=document.createElement("span"),o=document.createElement("span"),r=document.createElement("span");t.type="button",t.className="template-card",a.className="template-card-icon",a.textContent=gb(e.block),n.className="template-card-copy",l.className="template-card-title",l.textContent=e.block.adminLabel||e.block.id,o.className="template-card-meta",o.textContent=xb(e.block),r.className="template-card-region",r.textContent=`\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u0441\u044F \u0432: ${e.regionLabel}`,n.append(l,o,r),t.append(a,n),t.addEventListener("click",()=>k2(e.key)),f.templateList.append(t)}}function I2(){w2(),f.templateModal.classList.remove("hidden"),f.templateList.querySelector("button")?.focus()}function mu(){f.templateModal.classList.add("hidden"),f.addBlock?.focus()}function Ao(e=!1){let t=d.deleteConfirmResolve;d.deleteConfirmResolve=null,f.deleteModal.classList.add("hidden"),t&&t(e)}function Bo({title:e="\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435",body:t="\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430?"}={}){return d.deleteConfirmResolve&&Ao(!1),new Promise(a=>{d.deleteConfirmResolve=a,f.deleteModalTitle.textContent=e,f.deleteModalBody.textContent=t,f.deleteModal.classList.remove("hidden"),f.deleteModalConfirm.focus()})}function Do(e=null){let t=d.mediaActionResolve;d.mediaActionResolve=null,f.mediaActionModal.classList.add("hidden"),t&&t(e)}function Cb({title:e="\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435",body:t="\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043C\u044F.",label:a="\u0418\u043C\u044F",value:n="",confirmLabel:l="\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C"}={}){return d.mediaActionResolve&&Do(null),new Promise(o=>{d.mediaActionResolve=o,f.mediaActionTitle.textContent=e,f.mediaActionBody.textContent=t,f.mediaActionLabel.textContent=a,f.mediaActionConfirm.textContent=l,f.mediaActionInput.value=n,f.mediaActionModal.classList.remove("hidden"),f.mediaActionInput.focus(),f.mediaActionInput.select()})}function k2(e){let t=Sb().find(l=>l.key===e);if(!t)return;let a=d.page.regions[t.regionIndex],n=gt(t.block);n.id=g2(n.id),n.enabled=!0,n.anchor&&(n.anchor=Bp(n.anchor||n.adminLabel||n.id,n)),n.scopeIds=!0,n.seo={...Mp,...n.seo||{}},a.blocks.push(n),d.selected={kind:"block",regionIndex:t.regionIndex,blockIndex:a.blocks.length-1},mu(),xt(),be(`\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D \u0431\u043B\u043E\u043A \xAB${n.adminLabel||n.id}\xBB. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C\xBB \u0438\u043B\u0438 \xAB\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C index.html\xBB.`)}function E2(e){for(let t of[f.moveUp,f.moveDown,f.duplicate,f.copy,f.pasteAfter,f.deleteBlock])t.disabled=e}function M2(e){console.error(e),f.knowledgeForm.classList.add("hidden"),f.projectSettingsForm.classList.add("hidden"),f.empty.classList.add("hidden"),f.form.classList.remove("hidden"),f.contentFields.innerHTML="";let t=document.createElement("div");t.className="empty-note editor-error-note",t.textContent=`\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0435 \u0441\u043C\u043E\u0433 \u043E\u0442\u0440\u0438\u0441\u043E\u0432\u0430\u0442\u044C \u043F\u043E\u043B\u044F \u0431\u043B\u043E\u043A\u0430: ${e.message}`,f.contentFields.append(t),D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430: ${e.message}`)}function xa({path:e,label:t,type:a="text",placeholder:n="",options:l=[],hint:o=""}){let r=document.createElement("label"),i=document.createElement("span"),u=document.createElement("span"),s=l.length?document.createElement("select"):document.createElement("input"),m=P4(e),c=a==="password";if(r.className=a==="checkbox"?"toggle-row":"field-control",i.textContent=t,a==="checkbox")s.type="checkbox",s.checked=!!m,r.append(s,i);else{if(l.length){for(let h of l){let v=document.createElement("option");v.value=h,v.textContent=h,s.append(v)}s.value=m||l[0]||""}else s.type=a,s.value=m??"",s.placeholder=n;if(u.className="field-kind",u.textContent=l.length?"SELECT":a==="number"?"NUMBER":c?"SECRET":"TEXT",r.append(i,u),c){let h=document.createElement("span"),v=document.createElement("button");h.className="secret-input-wrap",v.className="secret-toggle-button",v.type="button",v.innerHTML='',v.setAttribute("aria-label","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"),v.title="\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435",v.addEventListener("click",()=>{let S=s.type==="text";s.type=S?"password":"text",v.setAttribute("aria-label",S?"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435":"\u0421\u043A\u0440\u044B\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"),v.title=S?"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435":"\u0421\u043A\u0440\u044B\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"}),h.append(s,v),r.append(h)}else r.append(s)}s.dataset.projectPath=e;let p=()=>{F4(e,rb(s)),be("\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u044B. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438\xBB."),e==="deploy.enabled"&&bl()};if(s.addEventListener("input",p),s.addEventListener("change",p),o&&a!=="checkbox"){let h=document.createElement("small");h.className="field-hint",h.textContent=o,r.append(h)}return r}function fp({kicker:e,title:t,note:a="",fields:n=[],runtime:l=!1,actions:o=null}){let r=document.createElement("section"),i=document.createElement("div"),u=document.createElement("div"),s=document.createElement("div"),m=document.createElement("h3"),c=document.createElement("div");if(r.className="settings-card",i.className="card-head",u.append(s,m),s.className="section-kicker",s.textContent=e,m.textContent=t,i.append(u),a){let p=document.createElement("p");p.className="project-settings-hint",p.textContent=a,i.append(p)}if(c.className=l?"project-settings-runtime":"field-grid",n.forEach(p=>c.append(p)),r.append(i,c),o){let p=document.createElement("div");p.className="project-settings-actions",p.append(...o),r.append(p)}return r}async function A2(e,t=!0){if(!e)return;let a=new FormData;a.append("file",e,e.name);let n=await new Promise((o,r)=>{let i=new XMLHttpRequest;i.open("POST",Ld(`/api/project/upload-site?backup=${t?"1":"0"}`)),i.responseType="json",i.upload.addEventListener("progress",u=>{if(!u.lengthComputable){D(`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0430\u0440\u0445\u0438\u0432 \u0441\u0430\u0439\u0442\u0430: ${e.name}...`);return}let s=Math.round(u.loaded/u.total*1e3)/10;D(`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0430\u0440\u0445\u0438\u0432 \u0441\u0430\u0439\u0442\u0430: ${s.toLocaleString("ru-RU")}% \xB7 ${e.name}`)}),i.upload.addEventListener("load",()=>{D(`\u0410\u0440\u0445\u0438\u0432 ${e.name} \u043F\u0435\u0440\u0435\u0434\u0430\u043D. \u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u043C \u0438 \u0440\u0430\u0441\u043F\u0430\u043A\u043E\u0432\u044B\u0432\u0430\u0435\u043C \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435...`)}),i.addEventListener("load",()=>{let u=i.response&&typeof i.response=="object"?i.response:(()=>{try{return JSON.parse(i.responseText||"null")}catch{return null}})();if(i.status===401&&u?.loginUrl){window.location.assign(u.loginUrl),r(new Error("\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u044B\u0439 \u0432\u0445\u043E\u0434 \u0432 CMS"));return}if(i.status<200||i.status>=300||!u?.ok){r(new Error(u?.error||"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0430\u0440\u0445\u0438\u0432 \u0441\u0430\u0439\u0442\u0430"));return}o(u)}),i.addEventListener("error",()=>r(new Error("\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043E\u0431\u043E\u0440\u0432\u0430\u043B\u043E\u0441\u044C \u0432\u043E \u0432\u0440\u0435\u043C\u044F \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 \u0430\u0440\u0445\u0438\u0432\u0430"))),i.send(a)});d.projectConfig=await su(),bl();let l=n.backup?.saved?` \u0411\u044D\u043A\u0430\u043F \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D: ${n.backup.fileName} (${n.backup.label}).`:" \u0411\u044D\u043A\u0430\u043F \u043D\u0435 \u0441\u043E\u0437\u0434\u0430\u0432\u0430\u043B\u0441\u044F.";D(`\u0410\u0440\u0445\u0438\u0432 \u0441\u0430\u0439\u0442\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D: ${Number(n.files||0).toLocaleString("ru-RU")} \u0444\u0430\u0439\u043B\u043E\u0432, workspace ${n.size?.label||n.label||"\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D"}.${l}`)}function D2(){let e=document.createElement("div"),t=document.createElement("span"),a=document.createElement("span"),n=document.createElement("div"),l=document.createElement("button"),o=document.createElement("input"),r=document.createElement("label"),i=document.createElement("input"),u=document.createElement("span"),s=document.createElement("small");return e.className="field-control project-archive-field",t.textContent="\u0410\u0440\u0445\u0438\u0432 \u0441\u0430\u0439\u0442\u0430",a.className="field-kind",a.textContent="ZIP",n.className="project-archive-control",l.className="ghost-btn project-archive-button",l.type="button",l.textContent="\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0430\u0440\u0445\u0438\u0432 \u0441\u0430\u0439\u0442\u0430",o.type="file",o.accept=".zip,application/zip",o.className="hidden",r.className="toggle-row project-archive-backup-toggle",i.type="checkbox",i.checked=d.keepSiteArchiveBackup,u.textContent="\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0431\u044D\u043A\u0430\u043F \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435",r.append(i,u),s.className="field-hint",s.textContent="\u041F\u0440\u0438 \u0432\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u043E\u043C \u0431\u044D\u043A\u0430\u043F\u0435 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 ZIP \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0432 .cms-backups. ZIP \u0434\u043E\u043B\u0436\u0435\u043D \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C content/pages/home.json, content/knowledge.json, templates \u0438 tools \u0440\u0435\u043D\u0434\u0435\u0440\u0430.",l.addEventListener("click",()=>o.click()),i.addEventListener("change",()=>{d.keepSiteArchiveBackup=i.checked}),o.addEventListener("change",()=>{let m=o.files?.[0];o.value="",A2(m,i.checked).catch(c=>D(c.message))}),n.append(l,o,r),e.append(t,a,n,s),e}function md(e,t){let a=document.createElement("div"),n=document.createElement("code");return a.append(`${e}: `,n),n.textContent=t||"\u043D\u0435 \u0437\u0430\u0434\u0430\u043D\u043E",a}function wb({icon:e="ND",title:t,body:a,stateName:n=""}){f.empty.dataset.state=n,f.empty.innerHTML=`
${ru(e)}

${ru(t)}

${ru(a)}

`}function Sd(){Mo(),Tp(),f.regions.innerHTML="",f.form.classList.add("hidden"),f.knowledgeForm.classList.add("hidden"),f.projectSettingsForm.classList.add("hidden"),f.empty.classList.remove("hidden");let e=hp().missingFiles||[],t=e.length?` \u0421\u0435\u0439\u0447\u0430\u0441 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442: ${e.join(", ")}.`:"",a=hp().root||d.projectConfig?.runtime?.siteRoot||"",n=a?` \u041B\u043E\u043A\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u0430\u043F\u043A\u0430: ${a}.`:"";wb({icon:"DC",title:"\u0421\u0430\u0439\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D",body:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043A \u0445\u043E\u0441\u0442\u0438\u043D\u0433\u0443 \u0438\u043B\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0430\u0440\u0445\u0438\u0432 \u0441\u0430\u0439\u0442\u0430 \u0432 \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u044B\u0439 workspace CMS.${t}${n}`,stateName:"site-unavailable"}),f.editorHeading&&(f.editorHeading.textContent="DC CMS"),f.selectedRegion.textContent=`DC CMS / ${Dp()} / \u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435`,f.selectedTitle.textContent="\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0441\u0430\u0439\u0442",Ro(!1)}function bl(){if(Mo(),f.empty.classList.add("hidden"),f.form.classList.add("hidden"),f.knowledgeForm.classList.add("hidden"),f.projectSettingsForm.classList.remove("hidden"),f.projectSettingsForm.innerHTML="",!d.projectConfig){f.projectSettingsForm.innerHTML='
\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0440\u043E\u0435\u043A\u0442\u0430...
',su().then(bl).catch(o=>D(o.message));return}if(f.workspaceRole&&(f.workspaceRole.textContent="\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F"),f.editorHeading&&(f.editorHeading.textContent="\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 CMS"),f.selectedRegion.textContent=`DC CMS / ${Dp()} / \u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435`,f.selectedTitle.textContent="\u041F\u0440\u043E\u0435\u043A\u0442 \u0438 \u0434\u0435\u043F\u043B\u043E\u0439",f.save&&(f.save.textContent="\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",f.save.title="\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0441\u0430\u0439\u0442\u0430"),f.render&&(f.render.textContent="\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u043F\u0440\u043E\u0435\u043A\u0442",f.render.title="\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F \u043A \u043C\u043E\u0434\u0435\u043B\u0438, \u0431\u0430\u0437\u0435 \u0437\u043D\u0430\u043D\u0438\u0439 \u0438 \u0444\u0430\u0439\u043B\u0430\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u0430"),f.publish){let o=!!d.projectConfig?.deploy?.enabled;f.publish.classList.toggle("hidden",!o),f.publish.disabled=!o||!vl()||d.projectConfigDirty,f.publish.title=d.projectConfigDirty?"\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0440\u043E\u0435\u043A\u0442\u0430":o?"\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C \u0442\u0435\u043A\u0443\u0449\u0443\u044E \u043A\u043E\u043F\u0438\u044E \u0441\u0430\u0439\u0442\u0430 \u043D\u0430 \u0445\u043E\u0441\u0442\u0438\u043D\u0433":"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0435\u043F\u043B\u043E\u0439 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u043F\u0440\u043E\u0435\u043A\u0442\u0430"}let e=fp({kicker:"\u041F\u0440\u043E\u0435\u043A\u0442",title:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044B\u0439 \u0441\u0430\u0439\u0442",note:"\u041F\u0440\u043E\u0435\u043A\u0442 \u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F \u0432 workspace CMS. \u0410\u0440\u0445\u0438\u0432 \u0441\u0430\u0439\u0442\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F \u043E\u0434\u0438\u043D \u0440\u0430\u0437 \u0438 \u0434\u0430\u043B\u044C\u0448\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u043C\u0438\u043D\u043A\u0443.",fields:[xa({path:"name",label:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u0430"}),xa({path:"publicUrl",label:"\u041F\u0443\u0431\u043B\u0438\u0447\u043D\u044B\u0439 \u0434\u043E\u043C\u0435\u043D",placeholder:"https://nodedc.ru/"}),D2()]}),t=document.createElement("button");t.type="button",t.className="secondary-button",t.textContent="\u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0442\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438 \u0441 \u0434\u0440\u0443\u0433\u043E\u0433\u043E \u0441\u0430\u0439\u0442\u0430",t.disabled=!!d.projectConfig?.deploy?.host||xd.length<2,t.addEventListener("click",()=>N4().catch(o=>D(o.message)));let a=fp({kicker:"\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F",title:"\u0414\u0435\u043F\u043B\u043E\u0439 \u043D\u0430 \u0445\u043E\u0441\u0442\u0438\u043D\u0433",note:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0434\u043E\u0441\u0442\u0443\u043F \u043A \u0445\u043E\u0441\u0442\u0438\u043D\u0433\u0443. \u041F\u0430\u0440\u043E\u043B\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u043C \u0432\u0438\u0434\u0435 \u0438 \u043D\u0435 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044F \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440.",fields:[t,xa({path:"deploy.enabled",label:"\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0434\u0435\u043F\u043B\u043E\u0439",type:"checkbox"}),xa({path:"deploy.deployOnRender",label:"\u041F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C \u043F\u0440\u0438 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0438",type:"checkbox"}),xa({path:"deploy.method",label:"\u041C\u0435\u0442\u043E\u0434",options:["sftp","ftp"]}),xa({path:"deploy.host",label:"FTP / SFTP host",placeholder:"a0000.ftp.mchost.ru"}),xa({path:"deploy.port",label:"\u041F\u043E\u0440\u0442",type:"number",placeholder:"22"}),xa({path:"deploy.username",label:"\u041B\u043E\u0433\u0438\u043D"}),xa({path:"deploy.password",label:"\u041F\u0430\u0440\u043E\u043B\u044C",type:"password",placeholder:d.projectConfig?.deploy?.passwordConfigured?"\u041F\u0430\u0440\u043E\u043B\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D. \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0434\u043B\u044F \u0437\u0430\u043C\u0435\u043D\u044B":"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u0430\u0440\u043E\u043B\u044C",hint:d.projectConfig?.deploy?.passwordConfigured?"\u041F\u0430\u0440\u043E\u043B\u044C \u0443\u0436\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041F\u043E\u043B\u0435 \u043F\u0443\u0441\u0442\u043E\u0435, \u043F\u043E\u0442\u043E\u043C\u0443 \u0447\u0442\u043E \u0441\u0435\u043A\u0440\u0435\u0442 \u043D\u0435 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044F \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440.":"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u0430\u0440\u043E\u043B\u044C \u043E\u0434\u0438\u043D \u0440\u0430\u0437 \u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438\xBB."}),xa({path:"deploy.remotePath",label:"\u041F\u0430\u043F\u043A\u0430 \u0441\u0430\u0439\u0442\u0430 \u043D\u0430 \u0445\u043E\u0441\u0442\u0438\u043D\u0433\u0435",placeholder:"httpdocs"})]}),n=d.projectConfig.runtime||{},l=fp({kicker:"Runtime",title:"\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0441\u0432\u044F\u0437\u043A\u0430",runtime:!0,fields:[md("CMS root",n.cmsRoot),md("Site root",n.siteRoot),md("Config",n.configPath),md("\u0412\u0430\u0436\u043D\u043E",n.siteRootChangesRequireRestart?"\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 siteRoot \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u043A\u0430 CMS":"")]});f.projectSettingsForm.append(e,a,l),du()}function T2(){Mo(),f.knowledgeForm.classList.add("hidden"),f.projectSettingsForm.classList.add("hidden");let e=Ll(),t=Ne(),a=ot(),n=d.mode==="seo";if(!t){f.empty.classList.remove("hidden"),f.form.classList.add("hidden"),wb({icon:"ND",title:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0431\u043B\u043E\u043A \u0441\u043B\u0435\u0432\u0430",body:"\u0421\u0442\u0430\u0442\u0438\u043A\u0430, hero, \u0444\u043E\u0440\u043C\u0430 \u0438 \u0441\u0435\u043A\u0446\u0438\u0438 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u044B \u043D\u0430 \u0440\u0430\u0431\u043E\u0447\u0438\u0435 \u0433\u0440\u0443\u043F\u043F\u044B. \u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0443\u0435\u043C typed-\u043F\u043E\u043B\u044F, \u0441\u044B\u0440\u043E\u0439 JSON \u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D \u043A\u0430\u043A \u0442\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0439 fallback."}),f.selectedRegion.textContent="NODE.DC / \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0431\u043B\u043E\u043A",f.selectedTitle.textContent=n?"SEO-\u0441\u043B\u043E\u0439":"\u041A\u043E\u043D\u0442\u0435\u043D\u0442\u043D\u044B\u0439 \u0441\u043B\u043E\u0439",yp();return}f.empty.classList.add("hidden"),f.form.classList.remove("hidden"),f.form.dataset.static=String(a),f.form.dataset.mode=d.mode,f.selectedRegion.textContent=n?`NODE.DC / SEO / ${a?"\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430":e.label||e.id}`:`NODE.DC / ${e.label||e.id}`,f.selectedTitle.textContent=n?`SEO: ${a?"\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430":t.adminLabel||t.id}`:t.adminLabel||t.id,f.id.value=t.id||"",f.label.value=t.adminLabel||"",f.template.value=t.template||t.type||"",f.anchor.value=t.anchor||"",f.anchor.placeholder="hub-video / engine-video / applied-modules",f.anchor.title="\u041F\u0443\u0431\u043B\u0438\u0447\u043D\u044B\u0439 Target \u043A\u043E\u043D\u043A\u0440\u0435\u0442\u043D\u043E\u0433\u043E \u0431\u043B\u043E\u043A\u0430: \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u043A\u0430\u043A \u044F\u043A\u043E\u0440\u044C \u043B\u0435\u043D\u0434\u0438\u043D\u0433\u0430 \u0438 \u043A\u0430\u043A \u0441\u0441\u044B\u043B\u043A\u0430 \u0438\u0437 Knowledge.",yp(),f.enabled.checked=t.enabled!==!1,f.id.readOnly=a,f.anchor.disabled=a,f.enabled.disabled=a,f.enabled.closest(".toggle-row").hidden=a,E2(a||n);try{n?o2(t):Yb(t)}catch(l){M2(l)}f.json.value=JSON.stringify(cb(t),null,2)}function xt(){try{if(!vl()&&!$t()){Sd();return}if($t()){d.mode==="knowledge"&&d.knowledge?(Yp(),Ed()):vp(),bl();return}if(d.mode==="knowledge"){zo();return}vp(),T2()}catch(e){console.error(e),D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0435\u043D\u0434\u0435\u0440\u0430 \u0430\u0434\u043C\u0438\u043D\u043A\u0438: ${e.message}`)}}function Lp(){let e=Ne();if(e){if(yI(),e.adminLabel=f.label.value.trim()||e.adminLabel||e.id,!ot()){e.id=f.id.value.trim(),e.anchor=bd(f.anchor.value)||null,f.anchor.value=e.anchor||"",e.enabled=f.enabled.checked,yp();let t=mb().find(a=>a.second.block===e||a.first.block===e);t&&D(`Target \xAB${t.target}\xBB \u0443\u0436\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0432 \u0434\u0440\u0443\u0433\u043E\u043C \u0431\u043B\u043E\u043A\u0435. \u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u0443\u0439\u0442\u0435 \u043E\u0434\u0438\u043D \u0438\u0437 target-\u043E\u0432 \u043F\u0435\u0440\u0435\u0434 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435\u043C.`)}f.json.value=JSON.stringify(e,null,2),vp(),be()}}function N2(e){let t=new Map;for(let a of e.editableFields??[]){let n=a.group||pb(a.path);t.has(n)||t.set(n,[]),t.get(n).push(a)}return t}function GL(e,t){e.classList.remove("is-image","is-video","is-solid-dark"),e.innerHTML="",e.title="",t&&(t.textContent="")}function R2(e,t,a,n){if(!(!a||!y2(n)))try{let o=document.createElement("canvas"),r=o.getContext("2d",{willReadFrequently:!0});if(!r)return;o.width=24,o.height=24,r.drawImage(e,0,0,24,24);let i=r.getImageData(0,0,24,24).data,u=0,s=0,m=0;for(let v=0;v<24;v+=1)for(let S=0;S<24;S+=1){let L=(v*24+S)*4;if(i[L+3]<240)continue;u+=1;let g=S<=1||v<=1||S>=22||v>=22,y=i[L]+i[L+1]+i[L+2]<66;g&&(s+=1,y&&(m+=1))}let c=576,p=s?m/s:0;u/c>.92&&p>.82&&(t.classList.add("is-solid-dark"),a.textContent="\u0424\u0430\u0439\u043B \u0441 \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C \u0442\u0451\u043C\u043D\u044B\u043C \u0444\u043E\u043D\u043E\u043C. \u0414\u043B\u044F \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u0430 \u043D\u0430 \u0442\u0451\u043C\u043D\u043E\u043C \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043B\u0443\u0447\u0448\u0435 PNG/SVG \u0441 \u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u043E\u0441\u0442\u044C\u044E.")}catch{}}function Hp(e,t,a=null,n=null){GL(e,a);let l=iu(t),o=x2(t);if(!l){e.textContent="FILE";return}if(o==="video"){let r=document.createElement("video");e.classList.add("is-video"),r.src=l,r.autoplay=!0,r.loop=!0,r.muted=!0,r.playsInline=!0,e.append(r);return}if(o==="image"){let r=document.createElement("img");e.classList.add("is-image"),r.src=l,r.alt="",r.loading="lazy",r.addEventListener("load",()=>R2(r,e,a,n)),r.addEventListener("error",()=>{GL(e,a),e.textContent="FILE",a&&(a.textContent="\u041F\u0440\u0435\u0432\u044C\u044E \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u0443\u0442\u044C \u0438\u043B\u0438 \u0432\u043D\u0435\u0448\u043D\u0438\u0439 URL.")}),e.append(r);return}e.textContent="FILE"}function Pp({block:e,editableField:t,hiddenInput:a,urlInput:n,fileName:l,preview:o,hint:r,value:i}){a.value=i,n.value=i,l.textContent=cu(Ha(i),28),l.title=Ha(i),Zt(e,t.path,i),Hp(o,i,r,t),Ne()===e&&(f.json.value=JSON.stringify(e,null,2)),be()}async function Ib({block:e,editableField:t,hiddenInput:a,urlInput:n,fileName:l,preview:o,hint:r,error:i,setSource:u,afterUpload:s,file:m}){if(m){d.mediaUploadActive=!0,hl(!0),na(),i.textContent="",l.textContent="\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u043C \u0432 assets...";try{let c=new FormData;c.append("file",m,m.name),c.append("fileName",m.name),c.append("mimeType",m.type||"application/octet-stream"),c.append("bucket",qp(e,t));let p=await Ve("/api/upload/asset",{method:"POST",body:c}),h=await p.json().catch(()=>({ok:!1,error:`\u0421\u0435\u0440\u0432\u0435\u0440 \u0432\u0435\u0440\u043D\u0443\u043B ${p.status}`}));if(!p.ok||!h.ok)throw new Error(h.error||"\u0424\u0430\u0439\u043B \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C");return Pp({block:e,editableField:t,hiddenInput:a,urlInput:n,fileName:l,preview:o,hint:r,value:h.url}),u("file"),be(`\u0424\u0430\u0439\u043B \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D: ${h.url}. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C\xBB, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u043F\u0443\u0442\u044C \u0432 content/pages/home.json.`),typeof s=="function"&&await s(h),h}catch(c){return i.textContent=c.message,l.textContent=cu(Ha(a.value),28),D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438: ${c.message}`),null}finally{d.mediaUploadActive=!1,On.value="",hl(!1),na()}}}function B2(e){hl(!0),na(),window.clearTimeout(d.filePickerResetTimer),On.accept=ab,On.value="",On.oncancel=()=>{hl(!1),na()},On.onchange=async()=>{let t=On.files?.[0];if(!t){hl(!1),na();return}await Ib({...e,file:t})},window.addEventListener("focus",()=>{window.setTimeout(()=>{d.mediaUploadActive||On.files?.length||(hl(!1),na())},180)},{once:!0});try{On.click()}catch(t){hl(!1),na(),e.error.textContent=t.message,D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u0432\u044B\u0431\u043E\u0440\u0430 \u0444\u0430\u0439\u043B\u0430: ${t.message}`)}}function O2(e,t,{large:a=!1}={}){if(e.innerHTML="",e.classList.remove("is-image","is-video"),!t){e.textContent="FILE";return}if(t.kind==="image"){let l=document.createElement("img");e.classList.add("is-image"),l.src=iu(t.url),l.alt=t.name||"",l.loading="lazy",l.decoding="async",e.append(l);return}if(t.kind==="video"){let l=document.createElement("video");e.classList.add("is-video"),l.src=iu(t.url),l.muted=!0,l.loop=!0,l.playsInline=!0,l.preload="metadata",a&&(l.controls=!0),e.append(l);return}let n=t.kind==="model"?"3D":t.kind==="font"?"FONT":t.extension?.toUpperCase()||"FILE";e.textContent=n}function _2(){f.mediaKindFilters.innerHTML="",f.mediaRootFilters.innerHTML="";let e=z2();for(let[t,a]of U4){let n=document.createElement("button");n.type="button",n.className="media-filter-button",n.dataset.active=String(d.mediaLibrary.kind===t),n.disabled=d.mediaLibrary.trashMode,n.textContent=a,n.addEventListener("click",()=>{d.mediaLibrary.kind=t,yt()}),f.mediaKindFilters.append(n)}for(let[t,a]of nb){let n=document.createElement("button");n.type="button",n.className="media-filter-button",n.dataset.active=String(e===t),n.disabled=d.mediaLibrary.trashMode,n.textContent=a,n.title=t||"\u041A\u043E\u0440\u0435\u043D\u044C \u043F\u0440\u043E\u0435\u043A\u0442\u0430 NODEDC_SITE",n.addEventListener("click",async()=>{d.mediaLibrary.root=t,d.mediaLibrary.selectedEntry=null,d.mediaLibrary.selectedUrl="",await Je(t).catch(l=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043C\u0435\u0434\u0438\u0430\u0442\u0435\u043A\u0438: ${l.message}`))}),f.mediaRootFilters.append(n)}}function Fp(e){return String(e||"").split("/").filter(Boolean)}function kb(e,t){return t?e===t||e.startsWith(`${t}/`):!e}function z2(){let e=d.mediaLibrary.selectedPath||d.mediaLibrary.root||"",t="";for(let[a]of nb)a&&kb(e,a)&&(t=a);return t}function q2(e){let t=Fp(e),a=[""],n="";for(let l of t)n=n?`${n}/${l}`:l,a.push(n);return a}function Ot(e){let t=Fp(e);return t.pop(),t.join("/")}function Eb(e){let t=String(e||"").replace(/^\/+/,"");t!=="__trash__"&&(d.mediaLibrary.lastPath=t,Eo({lastMediaDirectory:t}))}function Pa(e){let t=String(e||"").split("?")[0].split("#")[0];t.startsWith("./")&&(t=t.slice(2));try{t=decodeURIComponent(t)}catch{}return t}function U2(e){let t=Pa(e);if(!t)return[];let a=t.split("/").map(l=>encodeURIComponent(l)).join("/"),n=[t,`./${t}`,`/${t}`,a,`./${a}`,`/${a}`];return[...new Set(n)].sort((l,o)=>o.length-l.length)}function Mb(e,t){let a=e;for(let n of t){let l=U2(n.fromUrl||n.from),o=Pa(n.toUrl||n.to);if(!l.length||!o)continue;let r=o.split("/").map(i=>encodeURIComponent(i)).join("/");for(let i of l){let u=i.startsWith("./"),s=i.startsWith("/"),m=`${u?"./":s?"/":""}${i.includes("%")?r:o}`;a=a.split(i).join(m)}}return a}function bp(e,t){if(typeof e=="string")return Mb(e,t);if(Array.isArray(e)){let a=!1,n=e.map(l=>{let o=bp(l,t);return a||=o!==l,o});return a?n:e}if(e&&typeof e=="object"){let a=!1,n={...e};for(let[l,o]of Object.entries(e)){let r=bp(o,t);r!==o&&(n[l]=r,a=!0)}return a?n:e}return e}async function H2(e){let t=await Ve(`/api/media/browse?path=${encodeURIComponent(e||"")}`),a=await t.json().catch(()=>({ok:!1,error:`\u0421\u0435\u0440\u0432\u0435\u0440 \u0432\u0435\u0440\u043D\u0443\u043B ${t.status}`}));if(!t.ok||!a.ok)throw new Error(a.error||"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043F\u043A\u0443");return a}async function _n(){if(!f.mediaSiteSize)return;f.mediaSiteSize.textContent="\u0421\u0430\u0439\u0442: \u0441\u0447\u0438\u0442\u0430\u0435\u043C...";let e=await Ve("/api/media/site-size"),t=await e.json().catch(()=>({ok:!1,error:`\u0421\u0435\u0440\u0432\u0435\u0440 \u0432\u0435\u0440\u043D\u0443\u043B ${e.status}`}));if(!e.ok||!t.ok)throw f.mediaSiteSize.textContent="\u0421\u0430\u0439\u0442: --",new Error(t.error||"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0441\u0447\u0438\u0442\u0430\u0442\u044C \u0440\u0430\u0437\u043C\u0435\u0440 \u0441\u0430\u0439\u0442\u0430");f.mediaSiteSize.textContent=`\u0421\u0430\u0439\u0442: ${t.label}`,f.mediaSiteSize.title=`${Number(t.bytes||0).toLocaleString("ru-RU")} \u0431\u0430\u0439\u0442`}async function zn(e,t={}){let a=await Ve(e,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),n=await a.json().catch(()=>({ok:!1,error:`\u0421\u0435\u0440\u0432\u0435\u0440 \u0432\u0435\u0440\u043D\u0443\u043B ${a.status}`}));if(!a.ok||!n.ok)throw new Error(n.error||"\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0430");return n}function Cd(e){return Array.from(e.dataTransfer?.types||[]).includes(Ap)}function Ab(e){let t=e.dataTransfer?.getData(Ap);if(!t)return null;try{return JSON.parse(t)}catch{return null}}function P2(e,t){if(!e||!t)return;let{block:a,editableField:n,hiddenInput:l,urlInput:o,fileName:r,preview:i,hint:u}=e;l.value=t,o.value=t,r.textContent=cu(Ha(t),28),r.title=Ha(t),Zt(a,n.path,t),Hp(i,t,u,n),Ne()===a&&(f.json.value=JSON.stringify(a,null,2)),e.setSource("file")}function Db(e=[]){let t=d.mediaLibrary.context;if(!Array.isArray(e)||!e.length)return!1;let a=!1,n=t?.hiddenInput?Pa(t.hiddenInput.value||""):"",l=bp(d.page,e);if(l!==d.page&&(d.page=l,a=!0),document.querySelectorAll("input.service-media-hidden-input").forEach(r=>{let i=Mb(r.value||"",e);if(i===r.value)return;r.value=i;let u=r.closest(".service-media-field"),s=u?.querySelector(".service-media-file-name"),m=u?.querySelector(".service-media-url-input");m&&(m.value=i),s&&(s.textContent=cu(Ha(i),28),s.title=Ha(i)),a=!0}),Ne()&&(f.json.value=JSON.stringify(Ne(),null,2)),!t?.hiddenInput)return a;let o=e.find(r=>Pa(r.fromUrl||r.from||"")===n);return o?.toUrl?(P2(t,o.toUrl),!0):a}function jp(e,t){if(!e||d.mediaLibrary.trashMode||!e.path)return!1;let a=String(t||"").replace(/^\/+/,""),n=Ot(e.path);return e.type==="directory"&&(a===e.path||a.startsWith(`${e.path}/`))?!1:a!==n}function wd(e,t){if(e){if(t){e.dataset.dropActive="true";return}delete e.dataset.dropActive}}function Tb(e,t){if(!Cd(e))return;let a=Ab(e)||la(d.mediaLibrary.dragEntryPath);e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=jp(a,t)?"move":"none",wd(e.currentTarget,e.dataTransfer.dropEffect==="move")}function Nb(e){e.currentTarget.contains(e.relatedTarget)||wd(e.currentTarget,!1)}async function F2(e,t){if(!jp(e,t))return;let a=await zn("/api/media/move",{path:e.path,targetPath:t});Db(a.replacements);let n=Ot(a.path);await Je(n,{selectedUrl:a.url||""});let l=la(a.path);l&&(d.mediaLibrary.selectedPath=n,d.mediaLibrary.selectedEntry=l,d.mediaLibrary.selectedUrl=l.type==="file"&&l.url||"",yt());let o=Array.isArray(a.updatedFiles)?a.updatedFiles.length:0;D(`\u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0435\u043D\u043E: ${a.path}${o?`. \u0421\u0441\u044B\u043B\u043A\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u044B: ${o}`:""}.`)}function Rb(e,t){if(!Cd(e))return;let a=Ab(e)||la(d.mediaLibrary.dragEntryPath);e.preventDefault(),e.stopPropagation(),wd(e.currentTarget,!1),jp(a,t)&&F2(a,t).catch(n=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0430: ${n.message}`))}async function j2(){let e=await Ve("/api/media/trash"),t=await e.json().catch(()=>({ok:!1,error:`\u0421\u0435\u0440\u0432\u0435\u0440 \u0432\u0435\u0440\u043D\u0443\u043B ${e.status}`}));if(!e.ok||!t.ok)throw new Error(t.error||"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0443\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0435");return{ok:!0,path:"__trash__",breadcrumbs:[{name:"\u0423\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0435",path:"__trash__"}],entries:t.files||[]}}function Bb(e){let t=d.mediaLibrary.query.trim().toLowerCase();return t&&![e.name,e.path,e.url,yd(e)].filter(Boolean).some(n=>String(n).toLowerCase().includes(t))?!1:e.type==="directory"||d.mediaLibrary.kind==="all"?!0:e.kind===d.mediaLibrary.kind}function G2(e){for(let t of d.mediaLibrary.columns){let a=t.entries.find(n=>n.url===e);if(a)return a}return null}function la(e){if(!e)return null;for(let t of d.mediaLibrary.columns){let a=t.entries.find(n=>n.path===e);if(a)return a}return null}function vd(e){if(!e||d.mediaLibrary.trashMode)return!1;if(e.type==="directory")return e.path?.startsWith("assets/")&&!e.path.split("/").includes(".trash");let t=d.mediaLibrary.context?.hiddenInput?.value===e.url;return e.type==="file"&&e.writable&&zp(e)==="unused"&&!t}function Gp(e,t=d.mediaLibrary.selectedPath){e&&(e.type==="file"?(d.mediaLibrary.selectedPath=t,d.mediaLibrary.selectedUrl=e.url||""):d.mediaLibrary.selectedUrl="",d.mediaLibrary.selectedEntry=e,yt())}function Oo(){f.mediaContextMenu.classList.add("hidden"),f.mediaContextMenu.innerHTML="",d.mediaLibrary.contextMenu=null}function ko(e,t,{disabled:a=!1}={}){let n=document.createElement("button");n.type="button",n.setAttribute("role","menuitem"),n.textContent=e,n.disabled=a,n.addEventListener("click",()=>{Oo(),t()}),f.mediaContextMenu.append(n)}function Ob(e,{entry:t=null,columnPath:a=d.mediaLibrary.selectedPath}={}){if(e.preventDefault(),Oo(),d.mediaLibrary.contextMenu={entry:t,columnPath:a},t&&Gp(t,a),d.mediaLibrary.trashMode?t?.type==="file"&&(ko("\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C",()=>Pb().catch(r=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F: ${r.message}`))),ko("\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043D\u0430\u0432\u0441\u0435\u0433\u0434\u0430",()=>Fb().catch(r=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0438\u0437 \u043A\u043E\u0440\u0437\u0438\u043D\u044B: ${r.message}`)))):t?.type==="file"||t?.type==="directory"?(ko("\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C",()=>oI(t).catch(r=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0434\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F: ${r.message}`))),ko("\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C",()=>lI(t).catch(r=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u044F: ${r.message}`))),ko("\u0423\u0434\u0430\u043B\u0438\u0442\u044C",()=>Xp().catch(r=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F: ${r.message}`)),{disabled:!vd(t)})):ko("\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043F\u0430\u043F\u043A\u0443",()=>nI(a).catch(r=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u043F\u0430\u043F\u043A\u0438: ${r.message}`))),!f.mediaContextMenu.children.length)return;f.mediaContextMenu.classList.remove("hidden");let n=f.mediaContextMenu.getBoundingClientRect(),l=Math.min(e.clientX,window.innerWidth-n.width-12),o=Math.min(e.clientY,window.innerHeight-n.height-12);f.mediaContextMenu.style.left=`${Math.max(12,l)}px`,f.mediaContextMenu.style.top=`${Math.max(12,o)}px`}function V2(){window.requestAnimationFrame(()=>{let t=[...f.mediaList.querySelectorAll(".media-column")].at(-1),n=f.mediaList.querySelector('.media-entry[data-exact-active="true"]')||f.mediaList.querySelector('.media-entry[data-active="true"]');if(t){let o=Math.max(0,f.mediaList.scrollWidth-f.mediaList.clientWidth),r=t.offsetLeft+t.offsetWidth+14,i=t.offsetLeft-14,u=f.mediaList.scrollLeft;r>u+f.mediaList.clientWidth&&(u=r-f.mediaList.clientWidth),im+l.clientHeight&&(m=i-l.clientHeight),u{let n=document.createElement("button");n.type="button",n.className="media-breadcrumb-button",n.textContent=t.name,n.dataset.active=String(a===e.length-1),n.addEventListener("click",()=>{d.mediaLibrary.root=t.path,d.mediaLibrary.selectedEntry=null,d.mediaLibrary.selectedUrl="",Je(t.path).catch(l=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043C\u0435\u0434\u0438\u0430\u0442\u0435\u043A\u0438: ${l.message}`))}),f.mediaBreadcrumbs.append(n)})}function K2(e,t){let a=document.createElement("button"),n=document.createElement("span"),l=document.createElement("span"),o=document.createElement("span"),r=document.createElement("span"),i=document.createElement("span"),u=document.createElement("span"),s=d.mediaLibrary.selectedEntry?.path===e.path,m=s||e.type==="directory"&&kb(d.mediaLibrary.selectedPath,e.path);if(a.type="button",a.className="media-entry",a.dataset.type=e.type,a.dataset.path=e.path,a.dataset.active=String(m),a.dataset.exactActive=String(s),a.title=e.url||e.path,a.draggable=!d.mediaLibrary.trashMode,n.className="media-entry-icon",e.type==="file"&&e.url&&e.kind==="image"){let c=document.createElement("img");n.classList.add("is-preview"),c.src=iu(e.url),c.alt="",c.loading="lazy",c.decoding="async",n.append(c)}else if(e.type==="file"&&e.url&&e.kind==="video"){let c=document.createElement("video");n.classList.add("is-preview"),c.src=iu(e.url),c.muted=!0,c.playsInline=!0,c.preload="metadata",n.append(c)}else n.textContent=e.type==="directory"?"DIR":e.kind==="model"?"3D":e.kind==="font"?"Aa":e.extension?.toUpperCase()||"FILE";return l.className="media-entry-copy",o.className="media-entry-name",o.textContent=e.name,r.className="media-entry-meta",r.textContent=e.type==="directory"?e.path||"\u041A\u043E\u0440\u0435\u043D\u044C \u043F\u0440\u043E\u0435\u043A\u0442\u0430":[yd(e),e.extension,hb(e.size)].filter(Boolean).join(" \xB7 "),l.append(o,r),i.className="media-status-dot media-entry-status",i.dataset.status=zp(e),i.title=yd(e),u.className="media-entry-arrow",u.textContent=e.type==="directory"?"\u203A":"",a.append(n,l),e.type==="file"&&a.append(i),a.append(u),a.addEventListener("click",async()=>{if(e.type==="directory"){d.mediaLibrary.root=e.path,d.mediaLibrary.selectedEntry=e,d.mediaLibrary.selectedUrl="",await Je(e.path);return}Gp(e,t)}),a.addEventListener("contextmenu",c=>{c.stopPropagation(),Ob(c,{entry:e,columnPath:t})}),a.addEventListener("dblclick",()=>{e.type==="file"&&e.selectable&&Hb()}),a.addEventListener("dragstart",c=>{if(d.mediaLibrary.trashMode){c.preventDefault();return}let p=JSON.stringify({path:e.path,type:e.type});d.mediaLibrary.dragEntryPath=e.path,a.dataset.dragging="true",c.dataTransfer.effectAllowed="move",c.dataTransfer.setData(Ap,p),c.dataTransfer.setData("text/plain",e.path)}),a.addEventListener("dragend",()=>{d.mediaLibrary.dragEntryPath="",delete a.dataset.dragging,f.mediaList.querySelectorAll("[data-drop-active]").forEach(c=>wd(c,!1))}),e.type==="directory"&&(a.addEventListener("dragover",c=>Tb(c,e.path)),a.addEventListener("dragleave",Nb),a.addEventListener("drop",c=>Rb(c,e.path))),a}function Y2(e){let t=document.createElement("section"),a=document.createElement("div"),n=document.createElement("div"),l=document.createElement("div"),o=document.createElement("div"),r=(e.entries||[]).filter(Bb);t.className="media-column",a.className="media-column-head",n.className="media-column-title",n.textContent=e.path?Fp(e.path).at(-1):"NODEDC_SITE",l.className="media-column-count",l.textContent=`${r.length}`,a.append(n,l),o.className="media-column-list",o.dataset.path=e.path||"",o.addEventListener("dragover",i=>Tb(i,e.path||"")),o.addEventListener("dragleave",Nb),o.addEventListener("drop",i=>Rb(i,e.path||"")),o.addEventListener("contextmenu",i=>{i.target.closest(".media-entry")||Ob(i,{columnPath:e.path||""})});for(let i of r)o.append(K2(i,e.path));if(!r.length){let i=document.createElement("div");i.className="media-column-empty",i.textContent="\u041F\u0443\u0441\u0442\u043E",o.append(i)}return t.append(a,o),t}function _b(e){return d.mediaLibrary.columns.find(t=>t.path===e)||null}function zb(e){if(!e?.path)return"";let t=qb(e)||_b(Ot(e.path));if(!t)return"";let a=Vp(t),n=a.findIndex(o=>o.path===e.path),l=n>=0?a[n+1]||a[n-1]:null;return l||(n=t.entries.findIndex(o=>o.path===e.path),l=n>=0?t.entries[n+1]||t.entries[n-1]:null),l?.path||""}function Vp(e){return(e?.entries||[]).filter(Bb)}function qb(e){return e&&d.mediaLibrary.columns.find(t=>t.entries.some(a=>a.path===e.path))||null}function $2(){return qb(d.mediaLibrary.selectedEntry)||d.mediaLibrary.columns.find(e=>e.path===d.mediaLibrary.selectedPath)||d.mediaLibrary.columns.at(-1)||null}async function VL(e){let t=$2(),a=Vp(t);if(!t||!a.length)return;let n=a.findIndex(i=>i.path===d.mediaLibrary.selectedEntry?.path),l=e>0?0:a.length-1,o=n<0?l:Math.min(Math.max(n+e,0),a.length-1),r=a[o];if(r.type==="directory"&&!d.mediaLibrary.trashMode){d.mediaLibrary.root=r.path,d.mediaLibrary.selectedUrl="",await Je(r.path,{selectedUrl:""});let i=la(r.path);i&&(d.mediaLibrary.selectedPath=t.path,d.mediaLibrary.selectedEntry=i,d.mediaLibrary.selectedUrl="",yt());return}Gp(r,t.path)}async function Z2(){let e=d.mediaLibrary.selectedEntry;if(!e||e.type!=="directory"||d.mediaLibrary.trashMode)return;d.mediaLibrary.root=e.path,d.mediaLibrary.selectedEntry=e,d.mediaLibrary.selectedUrl="",await Je(e.path,{selectedUrl:""});let t=_b(e.path),a=Vp(t)[0];a&&(d.mediaLibrary.selectedPath=e.path,d.mediaLibrary.selectedEntry=a,d.mediaLibrary.selectedUrl=a.type==="file"&&a.url||"",yt())}async function Q2(){if(d.mediaLibrary.trashMode)return;let e=d.mediaLibrary.selectedPath||d.mediaLibrary.selectedEntry?.path||"";if(!e)return;let t=Ot(e);d.mediaLibrary.selectedUrl="",await Je(t,{selectedUrl:""});let a=la(e);a&&(d.mediaLibrary.selectedPath=t,d.mediaLibrary.selectedEntry=a,d.mediaLibrary.selectedUrl="",yt())}function W2(e){return!!e?.closest?.("input, textarea, select, [contenteditable='true']")}function J2(){let e=fu(),t=d.mediaLibrary.selectedEntry,a=f.mediaPreviewUsage.lastElementChild;if(O2(f.mediaPreview,e,{large:!0}),f.mediaSelect.textContent=d.mediaLibrary.trashMode?"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C",f.mediaSelect.disabled=!e,f.mediaDelete.disabled=!0,!t){f.mediaPreviewName.textContent="\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u0438\u043B\u0438 \u043F\u0430\u043F\u043A\u0443",f.mediaPreviewPath.textContent=d.mediaLibrary.selectedPath||"NODEDC_SITE",f.mediaPreviewMeta.textContent="Column view \u043F\u0440\u043E\u0435\u043A\u0442\u0430",f.mediaPreviewUsage.dataset.status="idle",a&&(a.textContent="\u041D\u0435\u0442 \u0432\u044B\u0431\u043E\u0440\u0430");return}if(t.type==="directory"){let l=vd(t);f.mediaPreview.innerHTML="DIR",f.mediaPreviewName.textContent=t.name,f.mediaPreviewPath.textContent=t.path||"NODEDC_SITE",f.mediaPreviewPath.title=t.path||"NODEDC_SITE",f.mediaPreviewMeta.textContent="\u041F\u0430\u043F\u043A\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430",f.mediaPreviewUsage.dataset.status="idle",a&&(a.textContent="\u041F\u0430\u043F\u043A\u0430"),f.mediaDelete.disabled=!l,f.mediaDelete.title=l?"\u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0442\u0438 \u043F\u0430\u043F\u043A\u0443 \u0432 assets/.trash":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u043F\u0430\u043F\u043E\u043A \u0432\u043D\u0443\u0442\u0440\u0438 assets";return}if(d.mediaLibrary.trashMode){f.mediaSelect.disabled=!t.restorable,f.mediaPreviewName.textContent=t.originalName||t.name,f.mediaPreviewPath.textContent=t.originalPath||t.path,f.mediaPreviewPath.title=t.originalPath||t.path,f.mediaPreviewMeta.textContent=[FL(t),PL(t.mtimeMs)].filter(Boolean).join(" \xB7 "),f.mediaPreviewUsage.dataset.status="trash",a&&(a.textContent="\u0423\u0434\u0430\u043B\u0451\u043D"),f.mediaDelete.disabled=!t.trashPath,f.mediaDelete.title="\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0438\u0437 \u043A\u043E\u0440\u0437\u0438\u043D\u044B \u043D\u0430\u0432\u0441\u0435\u0433\u0434\u0430";return}let n=vd(t);f.mediaSelect.disabled=!t.selectable,f.mediaPreviewName.textContent=t.name,f.mediaPreviewPath.textContent=t.url||t.path,f.mediaPreviewPath.title=t.url||t.path,f.mediaPreviewMeta.textContent=[FL(t),PL(t.mtimeMs)].filter(Boolean).join(" \xB7 "),f.mediaPreviewUsage.dataset.status=zp(t),a&&(a.textContent=t.selectable?yd(t):"\u041D\u0435 \u043F\u0443\u0431\u043B\u0438\u0447\u043D\u044B\u0439 asset"),f.mediaDelete.disabled=!n,f.mediaDelete.title=n?"\u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0442\u0438 unused-\u0444\u0430\u0439\u043B \u0432 assets/.trash":"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F unused-\u0444\u0430\u0439\u043B\u043E\u0432 \u0438\u0437 assets"}function yt(){f.mediaTrashToggle.dataset.active=String(d.mediaLibrary.trashMode),f.mediaUpload.textContent=d.mediaLibrary.trashMode?"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043A\u043E\u0440\u0437\u0438\u043D\u0443":"+ \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C",_2(),X2(),f.mediaList.innerHTML="",f.mediaList.classList.add("media-columns");let e=d.mediaLibrary.columns||[];f.mediaEmpty.classList.toggle("hidden",e.length>0);for(let t of e)f.mediaList.append(Y2(t));J2(),V2()}async function eI(){if(await _n().catch(e=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0441\u0430\u0439\u0442\u0430: ${e.message}`)),d.mediaLibrary.trashMode){await pu({selectedTrashPath:d.mediaLibrary.selectedEntry?.trashPath||""});return}await Je(d.mediaLibrary.selectedPath||d.mediaLibrary.root||"")}async function tI(){if(d.mediaLibrary.trashMode){await Je(d.mediaLibrary.previousPath||d.mediaLibrary.root||"");return}d.mediaLibrary.previousPath=d.mediaLibrary.selectedPath||d.mediaLibrary.root||"",d.mediaLibrary.selectedEntry=null,d.mediaLibrary.selectedUrl="",await pu()}async function Ub(e){let t=e.hiddenInput?.value||"",a=Pa(t),n=`assets/uploads/${qp(e.block,e.editableField)}`,o=d.mediaLibrary.lastPath||tb()||(a?Ot(a):n);d.mediaLibrary.context=e,d.mediaLibrary.trashMode=!1,d.mediaLibrary.previousPath="",d.mediaLibrary.selectedUrl=t,d.mediaLibrary.selectedEntry=null,d.mediaLibrary.selectedPath=o,d.mediaLibrary.query="",d.mediaLibrary.root=o,d.mediaLibrary.kind="all",f.mediaSearch.value="",f.mediaModalTitle.textContent=e.editableField.label||"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B",f.mediaModalSubtitle.textContent=`${e.editableField.path} -> ${n}`,f.mediaModal.classList.remove("hidden"),f.mediaSearch.focus(),_n().catch(r=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0441\u0430\u0439\u0442\u0430: ${r.message}`));try{await Je(o,{selectedUrl:t})}catch(r){D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043C\u0435\u0434\u0438\u0430\u0442\u0435\u043A\u0438: ${r.message}`),yt()}}function hu(){Oo(),f.mediaModal.classList.add("hidden"),delete f.mediaDropZone.dataset.dragActive,d.mediaLibrary.context=null,d.mediaLibrary.trashMode=!1,d.mediaLibrary.selectedUrl="",d.mediaLibrary.selectedEntry=null,na()}function Hb(){let e=fu(),t=d.mediaLibrary.context;if(!(!e||!t)){if(d.mediaLibrary.trashMode){Pb().catch(a=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F: ${a.message}`));return}typeof t.onSelect=="function"?t.onSelect(e.url,e):(Pp({...t,value:e.url}),t.setSource("file")),Eb(e.directory||Ot(Pa(e.url))),hu(),be(`\u0412\u044B\u0431\u0440\u0430\u043D \u0444\u0430\u0439\u043B: ${e.url}. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C\xBB, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u043F\u0443\u0442\u044C.`)}}async function Pb(){let e=fu();if(!e?.trashPath)return;let t=await zn("/api/media/restore",{trashPath:e.trashPath});await pu(),await _n().catch(a=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0441\u0430\u0439\u0442\u0430: ${a.message}`)),D(`\u0424\u0430\u0439\u043B \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D: ${t.path}.`)}async function aI(){await Bo({title:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043A\u043E\u0440\u0437\u0438\u043D\u0443?",body:"\u0412\u0441\u0435 \u0444\u0430\u0439\u043B\u044B \u0438\u0437 \u0443\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0445 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u044B \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E."})&&(await zn("/api/media/trash/clear"),await pu(),await _n().catch(t=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0441\u0430\u0439\u0442\u0430: ${t.message}`)),D("\u041A\u043E\u0440\u0437\u0438\u043D\u0430 \u043E\u0447\u0438\u0449\u0435\u043D\u0430."))}async function nI(e){if(d.mediaLibrary.trashMode)return;let t=await Cb({title:"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043F\u0430\u043F\u043A\u0443",body:`\u041D\u043E\u0432\u0430\u044F \u043F\u0430\u043F\u043A\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0437\u0434\u0430\u043D\u0430 \u0432 ${e||"\u043A\u043E\u0440\u043D\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u0430"}.`,label:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043F\u0430\u043F\u043A\u0438",value:"new-folder",confirmLabel:"\u0421\u043E\u0437\u0434\u0430\u0442\u044C"});if(!t)return;let a=await zn("/api/media/folder",{path:e,name:t});await Je(e),d.mediaLibrary.selectedEntry=la(a.path),d.mediaLibrary.selectedUrl="",yt(),D(`\u041F\u0430\u043F\u043A\u0430 \u0441\u043E\u0437\u0434\u0430\u043D\u0430: ${a.path}.`)}async function lI(e){if(!e||d.mediaLibrary.trashMode)return;let t=await Cb({title:"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C",body:e.path,label:"\u041D\u043E\u0432\u043E\u0435 \u0438\u043C\u044F",value:e.name,confirmLabel:"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C"});if(!t||t===e.name)return;let a=await zn("/api/media/rename",{path:e.path,name:t});Db(a.replacements),await Je(Ot(a.path),{selectedUrl:a.url||""});let n=la(a.path);n&&(d.mediaLibrary.selectedPath=Ot(a.path),d.mediaLibrary.selectedEntry=n,d.mediaLibrary.selectedUrl=n.type==="file"&&n.url||"",yt());let l=Array.isArray(a.updatedFiles)?a.updatedFiles.length:0;D(`\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u043E: ${a.path}${l?`. \u0421\u0441\u044B\u043B\u043A\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u044B: ${l}`:""}.`)}async function oI(e){if(!e||d.mediaLibrary.trashMode)return;let t=await zn("/api/media/duplicate",{path:e.path});await Je(Ot(t.path),{selectedUrl:t.url||""}),await _n().catch(a=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0441\u0430\u0439\u0442\u0430: ${a.message}`)),t.url||(d.mediaLibrary.selectedEntry=la(t.path),d.mediaLibrary.selectedUrl="",yt()),D(`${t.type==="directory"?"\u041F\u0430\u043F\u043A\u0430":"\u0424\u0430\u0439\u043B"} \u043F\u0440\u043E\u0434\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u043D: ${t.path}.`)}async function rI(e){let t=d.mediaLibrary.context;!t||!e||await Ib({...t,file:e,afterUpload:async a=>{d.mediaLibrary.selectedUrl=a.url;let n=Pa(a.url);await Je(Ot(n),{selectedUrl:a.url}),await _n().catch(l=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0441\u0430\u0439\u0442\u0430: ${l.message}`))}})}function iI(){let e=d.mediaLibrary.context;e&&B2({...e,afterUpload:async t=>{d.mediaLibrary.selectedUrl=t.url;let a=Pa(t.url);await Je(Ot(a),{selectedUrl:t.url}),await _n().catch(n=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0441\u0430\u0439\u0442\u0430: ${n.message}`))}})}async function Fb(){let e=fu();if(!e?.trashPath)return;let t=zb(e);await Bo({title:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0438\u0437 \u043A\u043E\u0440\u0437\u0438\u043D\u044B \u043D\u0430\u0432\u0441\u0435\u0433\u0434\u0430?",body:"\u042D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043B\u0451\u043D \u043E\u043A\u043E\u043D\u0447\u0430\u0442\u0435\u043B\u044C\u043D\u043E. \u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0435\u0433\u043E \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u043C\u0438\u043D\u043A\u0443 \u0443\u0436\u0435 \u043D\u0435 \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u0441\u044F."})&&(await zn("/api/media/trash/delete",{trashPath:e.trashPath}),await pu({selectedTrashPath:t}),D(`\u0424\u0430\u0439\u043B \u0443\u0434\u0430\u043B\u0451\u043D \u0438\u0437 \u043A\u043E\u0440\u0437\u0438\u043D\u044B \u043D\u0430\u0432\u0441\u0435\u0433\u0434\u0430: ${e.originalPath||e.path}.`))}async function Xp(){let e=d.mediaLibrary.selectedEntry;if(!e||f.mediaDelete.disabled)return;if(d.mediaLibrary.trashMode){await Fb();return}let t=e.type==="file"?d.mediaLibrary.selectedPath||Ot(Pa(e.url)):Ot(e.path),a=zb(e);if(!await Bo({title:e.type==="directory"?"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043F\u0430\u043F\u043A\u0443?":"\u0423\u0434\u0430\u043B\u0438\u0442\u044C unused-\u0444\u0430\u0439\u043B?",body:e.type==="directory"?"\u041F\u0430\u043F\u043A\u0430 \u0431\u0443\u0434\u0435\u0442 \u043F\u0435\u0440\u0435\u043D\u0435\u0441\u0435\u043D\u0430 \u0432 assets/.trash. \u0415\u0441\u043B\u0438 \u0432\u043D\u0443\u0442\u0440\u0438 \u0435\u0441\u0442\u044C \u0444\u0430\u0439\u043B\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044E\u0442\u0441\u044F \u0432 \u043C\u043E\u0434\u0435\u043B\u0438 \u0438\u043B\u0438 \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0442\u043A\u0435, \u0441\u0435\u0440\u0432\u0435\u0440 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435.":"\u0424\u0430\u0439\u043B \u0431\u0443\u0434\u0435\u0442 \u043F\u0435\u0440\u0435\u043D\u0435\u0441\u0451\u043D \u0432 assets/.trash. \u0424\u0430\u0439\u043B\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044E\u0442\u0441\u044F \u0432 \u043C\u043E\u0434\u0435\u043B\u0438 \u0438\u043B\u0438 \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0442\u043A\u0435, \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u0443\u0434\u0430\u043B\u044F\u0435\u0442."}))return;let l=await zn("/api/media/delete-entry",{path:e.path});await Je(t,{selectedUrl:""}),await _n().catch(r=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0441\u0430\u0439\u0442\u0430: ${r.message}`));let o=a?la(a):null;o&&(d.mediaLibrary.selectedPath=t,d.mediaLibrary.selectedEntry=o,d.mediaLibrary.selectedUrl=o.type==="file"&&o.url||"",yt()),D(`${l.type==="directory"?"\u041F\u0430\u043F\u043A\u0430":"\u0424\u0430\u0439\u043B"} \u043F\u0435\u0440\u0435\u043D\u0435\u0441\u0451\u043D \u0432 ${l.trashPath}.`)}function jb({block:e,editableField:t,grid:a}){let n=Le(e,t.path)??"",l=document.createElement("div"),o=document.createElement("div"),r=document.createElement("span"),i=document.createElement("span"),u=document.createElement("input"),s=document.createElement("div"),m=document.createElement("div"),c=document.createElement("button"),p=document.createElement("span"),h=document.createElement("input"),v=document.createElement("div"),S=document.createElement("button"),L=document.createElement("button"),x=document.createElement("div"),g=document.createElement("span"),y=document.createElement("span"),b=document.createElement("span"),M=/^(https?:)?\/\//i.test(n)?"url":"file";function A(I){M=I,m.hidden=M!=="file",h.hidden=M!=="url",S.dataset.active=String(M==="file"),L.dataset.active=String(M==="url")}l.className="field-control wide service-media-field",o.className="field-label-row",r.className="field-label-text",r.textContent=t.label||t.path,i.className="field-kind",i.textContent=t.kind||"media",o.append(r,i),u.className="service-media-hidden-input",u.type="hidden",u.dataset.path=t.path,u.value=n,s.className="service-media-control",m.className="service-media-file-control",c.className="service-media-file-button",c.type="button",c.textContent="\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B",p.className="service-media-file-name",p.textContent=cu(Ha(n),28),p.title=Ha(n),m.append(c,p),h.className="service-media-url-input",h.type="text",h.placeholder="https://...",h.autocomplete="off",h.value=n,v.className="service-media-source-switch",v.setAttribute("aria-label",`${t.label||t.path}: \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A`),S.className="service-media-source-button",S.type="button",S.title="\u0424\u0430\u0439\u043B \u0441 \u0434\u0438\u0441\u043A\u0430",S.setAttribute("aria-label","\u0424\u0430\u0439\u043B \u0441 \u0434\u0438\u0441\u043A\u0430"),S.textContent="HD",L.className="service-media-source-button",L.type="button",L.title="\u0412\u043D\u0435\u0448\u043D\u044F\u044F \u0441\u0441\u044B\u043B\u043A\u0430",L.setAttribute("aria-label","\u0412\u043D\u0435\u0448\u043D\u044F\u044F \u0441\u0441\u044B\u043B\u043A\u0430"),L.textContent="URL",v.append(S,L),x.className="service-media-preview",Hp(x,n,y,t),g.className="field-path",g.textContent=`${t.path} -> assets/uploads/${qp(e,t)}`,y.className="media-upload-hint",b.className="media-upload-error",S.addEventListener("click",()=>A("file")),L.addEventListener("click",()=>{A("url"),h.focus()}),h.addEventListener("input",()=>{Pp({block:e,editableField:t,hiddenInput:u,urlInput:h,fileName:p,preview:x,hint:y,value:h.value})}),c.addEventListener("click",()=>{Ub({block:e,editableField:t,hiddenInput:u,urlInput:h,fileName:p,preview:x,hint:y,error:b,setSource:A}).catch(I=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043C\u0435\u0434\u0438\u0430\u0442\u0435\u043A\u0438: ${I.message}`))}),A(M),s.append(m,h,v,x),l.append(o,u,s,g,y,b),a.append(l)}function uI(e,t){let a=Le(e,t.path);if(Array.isArray(a))return a;let n=[];return Zt(e,t.path,n),n}function sI(e,t){return e?.adminLabel||e?.title||e?.name||e?.label||e?.question||e?.windowTitle||`\u042D\u043B\u0435\u043C\u0435\u043D\u0442 ${t+1}`}function dI(e){if(e.itemTemplate){let a=gt(e.itemTemplate);return e.path==="content.dock.items"&&(a.iconSrc="",a.iconAlt="",a.iconClass=""),a}let t={};for(let a of e.itemFields??[])Zt(t,a.path,a.defaultValue??"");return t}function cI(e,t){let a=String(t||"item").trim()||"item",n=new Set(e.map(o=>o?.id).filter(Boolean));if(!n.has(a))return a;let l=2;for(;n.has(`${a}-${l}`);)l+=1;return`${a}-${l}`}function XL(e,t){let a=gt(t);return Object.prototype.hasOwnProperty.call(a,"id")&&(a.id=cI(e,a.id)),a}function fI(e,t){return`${e?.id||"static-elements"}::${t.path}`}function KL(e){return String(e||"").normalize("NFKD").replace(/[^\w.-]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase().slice(0,80)}function gd(e,t){if(e&&typeof e=="object"){if(e.id)return`id:${e.id}`;let a=e.targetId||e.href||"",n=KL(a);if(n)return`item:${n}`;let l=e.title||e.name||e.label||e.question||e.windowTitle||e.adminLabel||"",o=KL(l);if(o)return`item:${o}`;let r=qL.get(e);return r||(UL+=1,r=`runtime:${UL}`,qL.set(e,r)),r}return`value:${t}:${String(e)}`}function pl(){let e={};for(let[t,a]of d.collectionOpenState.entries())e[t]=[...a];Eo({collections:e})}function mI(e,t,a){let n=fI(e,t),l=d.collectionOpenState.get(n);return l||(l=new Set,a.length>0&&a.length<=8&&l.add(gd(a[0],0)),d.collectionOpenState.set(n,l),pl()),l}function Id(e){if(e.type==="checkbox")return e.checked;if(e.dataset.valueType==="number"||e.type==="range"||e.type==="number"){let t=Number.parseFloat(e.value);return Number.isFinite(t)?t:0}return e.value}function Sl(e,t,a){Zt(e,t,Id(a)),f.json.value=JSON.stringify(e,null,2),be()}function Gb({block:e,editableField:t,grid:a}){let n=document.createElement("label"),l=document.createElement("span"),o=document.createElement("span"),r=document.createElement("span"),i=document.createElement("span"),u=document.createElement("input");n.className="field-control boolean-field",l.className="field-label-row",o.className="field-label-text",o.textContent=t.label||t.path,r.className="field-kind",r.textContent=t.kind||"boolean",i.className="field-path",i.textContent=t.path,l.append(o,r),u.dataset.path=t.path,u.type="checkbox",u.checked=!!Le(e,t.path),u.addEventListener("change",()=>{let s=Ne();s&&Sl(s,t.path,u)}),n.append(l,u,i),a.append(n)}function YL(e,t){let a=Number.parseFloat(t.step??1),n=Number.isFinite(a)&&a>0&&a<1&&String(a).split(".")[1]?.length||0;return`${Number(e).toFixed(n)}${t.suffix||""}`}function Vb({block:e,editableField:t,grid:a}){let n=document.createElement("label"),l=document.createElement("span"),o=document.createElement("span"),r=document.createElement("span"),i=document.createElement("span"),u=document.createElement("span"),s=document.createElement("input"),m=document.createElement("span"),c=Number.parseFloat(t.min??0),p=Number.parseFloat(t.max??1),h=Number.parseFloat(t.step??.01),v=Number.parseFloat(Le(e,t.path)),S=Number.isFinite(v)?v:c;n.className="field-control range-field wide",l.className="field-label-row",o.className="field-label-text",o.textContent=t.label||t.path,r.className="field-kind",r.textContent=t.kind||"range",i.className="field-path",i.textContent=t.path,u.className="range-control",m.className="range-value",l.append(o,r),s.dataset.path=t.path,s.dataset.valueType="number",s.type="range",s.min=Number.isFinite(c)?String(c):"0",s.max=Number.isFinite(p)?String(p):"1",s.step=Number.isFinite(h)?String(h):"0.01",s.value=String(S),m.textContent=YL(S,t),s.addEventListener("input",()=>{let L=Ne();L&&(m.textContent=YL(s.value,t),Sl(L,t.path,s))}),u.append(s,m),n.append(l,u,i),a.append(n)}function Xb({block:e,editableField:t,grid:a}){let n=document.createElement("label"),l=document.createElement("span"),o=document.createElement("span"),r=document.createElement("span"),i=document.createElement("span"),u=document.createElement("span"),s=document.createElement("input"),m=document.createElement("span"),c=Number.parseFloat(Le(e,t.path)),p=Number.parseFloat(t.defaultValue??t.min??0),h=Number.isFinite(c)?c:p;n.className="field-control number-field",l.className="field-label-row",o.className="field-label-text",o.textContent=t.label||t.path,r.className="field-kind",r.textContent=t.kind||"number",i.className="field-path",i.textContent=t.path,u.className="number-control",m.className="number-suffix",m.textContent=t.suffix||"",l.append(o,r),s.dataset.path=t.path,s.dataset.valueType="number",s.type="number",s.value=Number.isFinite(h)?String(h):"0",s.autocomplete="off",t.min!=null&&(s.min=String(t.min)),t.max!=null&&(s.max=String(t.max)),t.step!=null&&(s.step=String(t.step)),s.addEventListener("input",()=>{let v=Ne();v&&Sl(v,t.path,s)}),u.append(s),m.textContent&&u.append(m),n.append(l,u,i),a.append(n)}function $L(e,t){let a=e.split(".");return a[a.length-1]=t,a.join(".")}function Kb({block:e,field:t,grid:a}){let n=document.createElement("div"),l=document.createElement("div"),o=document.createElement("span"),r=document.createElement("span"),i=document.createElement("input"),u=document.createElement("div"),s=document.createElement("span"),m=$L(t.path,t.hrefPath||"href"),c=$L(t.path,t.targetPath||"target"),p=Le(e,t.path)==="href"?"href":"target";function h({mode:v,title:S,inputPath:L,placeholder:x}){let g=document.createElement("label"),y=document.createElement("input"),b=document.createElement("span"),M=document.createElement("input");return g.className="link-mode-row",y.type="checkbox",y.checked=p===v,y.setAttribute("aria-label",`${S}: \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C`),b.textContent=S,M.dataset.path=L,M.type="text",M.autocomplete="off",M.placeholder=x,M.value=Le(e,L)??"",y.addEventListener("change",()=>{if(!y.checked){y.checked=!0;return}let A=Ne();A&&(i.value=v,Zt(A,t.path,v),u.querySelectorAll('input[type="checkbox"]').forEach(I=>{I.checked=I===y}),f.json.value=JSON.stringify(A,null,2),be(v==="href"?"\u0410\u043A\u0442\u0438\u0432\u0435\u043D \u0432\u043D\u0435\u0448\u043D\u0438\u0439 \u0430\u0434\u0440\u0435\u0441.":"\u0410\u043A\u0442\u0438\u0432\u0435\u043D Target."))}),M.addEventListener("input",()=>{let A=Ne();A&&Sl(A,L,M)}),g.append(y,b,M),g}n.className="field-control wide link-mode-field",l.className="field-label-row",o.className="field-label-text",o.textContent=t.label||"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A \u0441\u0441\u044B\u043B\u043A\u0438",r.className="field-kind",r.textContent="link",l.append(o,r),i.type="hidden",i.dataset.path=t.path,i.value=p,u.className="link-mode-grid",u.append(h({mode:"href",title:"\u0410\u0434\u0440\u0435\u0441",inputPath:m,placeholder:"https://..."}),h({mode:"target",title:"Target",inputPath:c,placeholder:"index.html#section"})),s.className="field-path",s.textContent=`${t.path} \xB7 ${m} \xB7 ${c}`,n.append(l,i,u,s),a.append(n)}function pI({block:e,editableField:t,head:a}){let n=document.createElement("label"),l=document.createElement("input"),o=document.createElement("span");n.className="group-head-toggle",l.dataset.path=t.path,l.type="checkbox",l.checked=!!Le(e,t.path),o.textContent="\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435",l.addEventListener("change",()=>{let r=Ne();r&&Sl(r,t.path,l)}),n.append(l,o),a.append(n)}function hI({block:e,field:t,grid:a}){if(t.kind==="link-mode"){Kb({block:e,field:t,grid:a});return}if(t.kind==="boolean"){Gb({block:e,editableField:t,grid:a});return}if(t.kind==="range"){Vb({block:e,editableField:t,grid:a});return}if(t.kind==="number"){Xb({block:e,editableField:t,grid:a});return}let n=document.createElement("label"),l=document.createElement("span"),o=document.createElement("span"),r=document.createElement("span"),i=document.createElement("span"),u=Le(e,t.path)??"",s=t.kind==="html"||t.kind==="textarea",m=s?document.createElement("textarea"):document.createElement("input");n.className=`field-control${s?" wide":""}`,l.className="field-label-row",o.className="field-label-text",o.textContent=t.label||t.path,r.className="field-kind",r.textContent=t.kind||"text",i.className="field-path",i.textContent=t.path,l.append(o,r),m.dataset.path=t.path,m.value=u,s||(m.type="text",m.autocomplete="off"),m.addEventListener("input",()=>{let c=Ne();c&&Sl(c,t.path,m)}),n.append(l,m,i),a.append(n)}function gI(e,t,a,n,l){if(e.button!==0)return;e.preventDefault(),e.stopPropagation();let o=t.closest(".collection-list");if(!o)return;let r=vb(t),i=yb(t,e);t.classList.add("dragging","sorting-source"),o.classList.add("sorting-active"),t.after(r);let u=c=>{Up(i,c),Lb({event:c,list:o,source:t,placeholder:r,selector:".collection-item-card"})},s=()=>{document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",s),document.removeEventListener("pointercancel",m);let c=bb({list:o,placeholder:r,source:t,selector:".collection-item-card"});if(Ua(),c<0||c===n)return;let[p]=a.splice(n,1);a.splice(Math.min(c,a.length),0,p),l("\u041F\u043E\u0440\u044F\u0434\u043E\u043A \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0438 \u0438\u0437\u043C\u0435\u043D\u0451\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E.")},m=()=>{document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",s),document.removeEventListener("pointercancel",m),Ua()};document.addEventListener("pointermove",u),document.addEventListener("pointerup",s),document.addEventListener("pointercancel",m)}function xI({block:e,editableField:t,grid:a}){let n=uI(e,t),l=mI(e,t,n),o=document.createElement("section"),r=document.createElement("div"),i=document.createElement("div"),u=document.createElement("button"),s=document.createElement("div");function m(c=null){f.json.value=JSON.stringify(e,null,2),Yb(e),be(c)}o.className="collection-field",r.className="collection-head",i.className="collection-title",i.textContent=t.label||t.path,u.className="collection-add-btn",u.type="button",u.title=`\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0432 \xAB${t.label||t.path}\xBB`,u.setAttribute("aria-label",u.title),u.textContent="+",u.addEventListener("click",()=>{let c=XL(n,dI(t));n.push(c),l.add(gd(c,n.length-1)),pl(),m(`\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0432 \xAB${t.label||t.path}\xBB.`)}),r.append(i,u),s.className="collection-list",n.forEach((c,p)=>{let h=gd(c,p),v=document.createElement("details"),S=document.createElement("summary"),L=document.createElement("span"),x=document.createElement("span"),g=document.createElement("button"),y=document.createElement("div"),b=document.createElement("div"),M=c&&typeof c=="object"&&(Object.prototype.hasOwnProperty.call(c,"enabled")||Object.prototype.hasOwnProperty.call(t.itemTemplate??{},"enabled"));if(v.className="collection-item-card",v.classList.toggle("is-hidden",c?.enabled===!1),v.open=l.has(h),v.addEventListener("toggle",()=>{v.open?l.add(h):l.delete(h),pl()}),S.className="collection-summary",L.className="collection-summary-title",L.textContent=sI(c,p),x.className="collection-item-actions",g.className="collection-drag-handle",g.type="button",g.title="\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442",g.setAttribute("aria-label","\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442"),g.innerHTML='',g.addEventListener("click",A=>{A.preventDefault(),A.stopPropagation()}),g.addEventListener("pointerdown",A=>gI(A,v,n,p,m)),M){Object.prototype.hasOwnProperty.call(c,"enabled")||(c.enabled=!0);let A=document.createElement("span"),I=document.createElement("input"),N=document.createElement("span");A.className="collection-visibility-toggle",A.title="\u0421\u043A\u0440\u044B\u0442\u044C/\u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C",A.setAttribute("aria-label","\u0421\u043A\u0440\u044B\u0442\u044C/\u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C"),I.type="checkbox",I.checked=c.enabled!==!1,N.textContent="\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C",A.addEventListener("click",T=>T.stopPropagation()),I.addEventListener("click",T=>T.stopPropagation()),I.addEventListener("change",()=>{c.enabled=I.checked,m(I.checked?"\u042D\u043B\u0435\u043C\u0435\u043D\u0442 \u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0438 \u043F\u043E\u043A\u0430\u0437\u0430\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E.":"\u042D\u043B\u0435\u043C\u0435\u043D\u0442 \u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0438 \u0441\u043A\u0440\u044B\u0442 \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E.")}),A.append(I,N),x.append(A)}[["\u2191","\u041F\u043E\u0434\u043D\u044F\u0442\u044C",()=>{if(p===0)return;let[A]=n.splice(p,1);n.splice(p-1,0,A),pl(),m("\u041F\u043E\u0440\u044F\u0434\u043E\u043A \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0438 \u0438\u0437\u043C\u0435\u043D\u0451\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E.")}],["\u2193","\u041E\u043F\u0443\u0441\u0442\u0438\u0442\u044C",()=>{if(p>=n.length-1)return;let[A]=n.splice(p,1);n.splice(p+1,0,A),pl(),m("\u041F\u043E\u0440\u044F\u0434\u043E\u043A \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0438 \u0438\u0437\u043C\u0435\u043D\u0451\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E.")}],["\u29C9","\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C",()=>{let A=XL(n,c);n.splice(p+1,0,A),v.open&&l.add(gd(A,p+1)),pl(),m("\u042D\u043B\u0435\u043C\u0435\u043D\u0442 \u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0438 \u043F\u0440\u043E\u0434\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E.")}],[lb,"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",async()=>{await Bo()&&(l.delete(h),n.splice(p,1),pl(),m("\u042D\u043B\u0435\u043C\u0435\u043D\u0442 \u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0438 \u0443\u0434\u0430\u043B\u0451\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E."))}]].forEach(([A,I,N])=>{let T=document.createElement("button");T.className="collection-icon-btn",T.type="button",T.title=I,T.setAttribute("aria-label",I),I==="\u0423\u0434\u0430\u043B\u0438\u0442\u044C"?T.innerHTML=A:T.textContent=A,T.addEventListener("click",w=>{w.preventDefault(),w.stopPropagation(),Promise.resolve(N()).catch(O=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0438: ${O.message}`))}),x.append(T)}),x.append(g),S.append(L,x),y.className="collection-item-body",b.className="group-grid";for(let A of t.itemFields??[]){let I={...A,path:`${t.path}.${p}.${A.path}`,label:A.label||A.path,group:t.group};I.kind==="media"?jb({block:e,editableField:I,grid:b}):hI({block:e,field:I,grid:b})}y.append(b),v.append(S,y),s.append(v)}),o.append(r,s),a.append(o)}function Yb(e){if(f.contentFields.innerHTML="",!e.editableFields?.length){let t=document.createElement("div");t.className="empty-note",t.textContent="\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0431\u043B\u043E\u043A\u0430 typed-\u043F\u043E\u043B\u044F \u0435\u0449\u0451 \u043D\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u044B. \u041F\u043E\u043A\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 JSON.",f.contentFields.append(t);return}for(let[t,a]of N2(e)){let n=document.createElement("section"),l=document.createElement("div"),o=document.createElement("div"),r=document.createElement("h3"),i=document.createElement("p"),u=document.createElement("div");n.className="content-group",l.className="group-head",r.textContent=t,i.className="group-desc",i.textContent=zL[t]||zL.\u041A\u043E\u043D\u0442\u0435\u043D\u0442,o.append(r,i),l.append(o),u.className="group-grid";let s=a.filter(c=>c.kind==="boolean"&&c.headerToggle),m=a.filter(c=>!s.includes(c));s.forEach(c=>pI({block:e,editableField:c,head:l}));for(let c of m){if(c.kind==="collection"){xI({block:e,editableField:c,grid:u});continue}if(c.kind==="media"){jb({block:e,editableField:c,grid:u});continue}if(c.kind==="link-mode"){Kb({block:e,field:c,grid:u});continue}if(c.kind==="boolean"){Gb({block:e,editableField:c,grid:u});continue}if(c.kind==="range"){Vb({block:e,editableField:c,grid:u});continue}if(c.kind==="number"){Xb({block:e,editableField:c,grid:u});continue}let p=document.createElement("label"),h=document.createElement("span"),v=document.createElement("span"),S=document.createElement("span"),L=document.createElement("span"),x=Le(e,c.path)??"",g=c.kind==="html"||c.kind==="textarea",y=g?document.createElement("textarea"):document.createElement("input");p.className=`field-control${g?" wide":""}`,h.className="field-label-row",v.className="field-label-text",v.textContent=c.label||c.path,S.className="field-kind",S.textContent=c.kind||"text",L.className="field-path",L.textContent=c.path,h.append(v,S),y.dataset.path=c.path,y.value=x,g||(y.type="text",y.autocomplete="off"),y.addEventListener("input",()=>{let b=Ne();b&&Sl(b,c.path,y)}),p.append(h,y,L),u.append(p)}n.append(l,u),f.contentFields.append(n)}}function yI(){let e=Ne();if(e)for(let t of f.contentFields.querySelectorAll("[data-path]"))Zt(e,t.dataset.path,Id(t))}function vI(){if(!d.selected)return!1;try{let e=JSON.parse(f.json.value);if(d.mode==="seo"&&ot())d.page.seo=e;else if(ot())d.page.staticElements=e;else{let t=Ll();if(!t)return!1;t.blocks[d.selected.blockIndex]=e}return xt(),be("JSON \u0431\u043B\u043E\u043A\u0430 \u043F\u0440\u0438\u043C\u0435\u043D\u0451\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C\xBB, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0444\u0430\u0439\u043B."),!0}catch(e){return D(`\u041E\u0448\u0438\u0431\u043A\u0430 JSON: ${e.message}`),!1}}function To(){return d.knowledge?(Array.isArray(d.knowledge.tree)||(d.knowledge.tree=[]),d.knowledge.tree):[]}function Kp(e=To(),t=null,a=()=>{}){e.forEach((n,l)=>{a(n,t,e,l),Kp(Array.isArray(n.children)?n.children:[],n,a)})}function LI(){let e=new Set;return Kp(To(),null,t=>{t.id&&e.add(t.id)}),e}function yl(e){let t=null,a=null,n=null,l=-1;return Kp(To(),null,(o,r,i,u)=>{t||o.id!==e||(t=o,a=r,n=i,l=u)}),t?{node:t,parent:a,siblings:n,index:l}:null}function bI(e){return e===uu}function kd(){return bI(d.knowledgeSelectedId)}function Sp(){return d.knowledge?.title||d.knowledge?.settings?.navTitle||"Knowledge"}function SI(){return kd()?d.knowledge:yl(d.knowledgeSelectedId)?.node||null}function CI(e,t="material"){let a={\u0430:"a",\u0431:"b",\u0432:"v",\u0433:"g",\u0434:"d",\u0435:"e",\u0451:"e",\u0436:"zh",\u0437:"z",\u0438:"i",\u0439:"y",\u043A:"k",\u043B:"l",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"p",\u0440:"r",\u0441:"s",\u0442:"t",\u0443:"u",\u0444:"f",\u0445:"h",\u0446:"c",\u0447:"ch",\u0448:"sh",\u0449:"sch",\u044A:"",\u044B:"y",\u044C:"",\u044D:"e",\u044E:"yu",\u044F:"ya"};return String(e||"").toLowerCase().replace(/[а-яё]/g,l=>a[l]||"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}function ZL(e,t){let a=t||"material";if(!e.has(a))return a;let n=2;for(;e.has(`${a}-${n}`);)n+=1;return`${a}-${n}`}function wI(e="\u041D\u043E\u0432\u044B\u0439 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B",t=[]){let a=LI(),n=new Set(t.map(o=>o.slug).filter(Boolean)),l=ZL(n,CI(e));return{id:ZL(a,l),title:e,slug:l,enabled:!0,useContent:!0,seo:{title:e,description:""},bodyHtml:"

\u041D\u043E\u0432\u044B\u0439 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B \u0431\u0430\u0437\u044B \u0437\u043D\u0430\u043D\u0438\u0439.

",children:[]}}function Yp(){!d.knowledge||kd()||d.knowledgeSelectedId&&yl(d.knowledgeSelectedId)||(d.knowledgeSelectedId=uu)}function $b(e){d.knowledgeSelectedId=e,Eo({knowledgeSelectedId:e}),zo()}function II(){Eo({knowledgeOpenIds:[...d.knowledgeOpenIds]})}function Zb(e,t){e&&(t?d.knowledgeOpenIds.add(e):d.knowledgeOpenIds.delete(e),II())}function $p(e=null){let t=e?yl(e)?.node:null,a=t?t.children||=[]:To(),n=wI(t?"\u041D\u043E\u0432\u044B\u0439 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B":"\u041D\u043E\u0432\u044B\u0439 \u0440\u0430\u0437\u0434\u0435\u043B",a);a.push(n),t&&Zb(t.id,!0),d.knowledgeSelectedId=n.id,zo(),be("\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D \u0432 \u0434\u0435\u0440\u0435\u0432\u043E \u0431\u0430\u0437\u044B \u0437\u043D\u0430\u043D\u0438\u0439.")}function QL(e,t){let a=yl(e);if(!a)return;let n=a.index+t;if(n<0||n>=a.siblings.length)return;let[l]=a.siblings.splice(a.index,1);a.siblings.splice(n,0,l),zo(),be("\u041F\u043E\u0440\u044F\u0434\u043E\u043A \u0434\u0435\u0440\u0435\u0432\u0430 \u0431\u0430\u0437\u044B \u0437\u043D\u0430\u043D\u0438\u0439 \u0438\u0437\u043C\u0435\u043D\u0451\u043D.")}async function kI(e){let t=yl(e);!t||!await Bo({title:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B?",body:`\xAB${t.node.title||t.node.id}\xBB \u0438 \u0432\u0441\u0435 \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u044B \u0438\u0437 \u0434\u0435\u0440\u0435\u0432\u0430.`})||(t.siblings.splice(t.index,1),d.knowledgeSelectedId===e&&(d.knowledgeSelectedId=t.siblings[Math.min(t.index,t.siblings.length-1)]?.id||t.parent?.id||uu),zo(),be("\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B \u0443\u0434\u0430\u043B\u0451\u043D \u0438\u0437 \u0434\u0435\u0440\u0435\u0432\u0430 \u0431\u0430\u0437\u044B \u0437\u043D\u0430\u043D\u0438\u0439."))}function Qb(e,t=0){let a=document.createElement("div"),n=document.createElement("div"),l=document.createElement("button"),o=document.createElement("span"),r=document.createElement("span"),i=document.createElement("span"),u=document.createElement("span"),s=document.createElement("span"),m=Array.isArray(e.children)?e.children:[],c=m.length>0,p=d.knowledgeOpenIds.has(e.id)||e.id===d.knowledgeSelectedId||m.some(h=>h.id===d.knowledgeSelectedId);if(a.className="knowledge-tree-item",a.style.setProperty("--depth",String(t)),n.className="knowledge-tree-row",n.dataset.active=String(e.id===d.knowledgeSelectedId),n.dataset.disabled=String(e.enabled===!1),l.className="knowledge-tree-select",l.type="button",o.className="knowledge-tree-icon",o.textContent=c?p?"\u25BE":"\u203A":e.useContent===!1?"G":"A",r.className="knowledge-tree-copy",i.className="knowledge-tree-title",i.textContent=e.title||e.id,u.className="knowledge-tree-meta",u.textContent=e.useContent===!1?"\u0433\u0440\u0443\u043F\u043F\u0430":c?"\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 + \u0432\u0435\u0442\u043A\u0430":"\u0441\u0442\u0430\u0442\u044C\u044F",r.append(i,u),l.append(o,r),l.addEventListener("click",()=>{c&&Zb(e.id,!p),$b(e.id)}),s.className="knowledge-tree-actions",[["+","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0434\u043E\u0447\u0435\u0440\u043D\u0438\u0439 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B",()=>$p(e.id)],["\u2191","\u041F\u043E\u0434\u043D\u044F\u0442\u044C",()=>QL(e.id,-1)],["\u2193","\u041E\u043F\u0443\u0441\u0442\u0438\u0442\u044C",()=>QL(e.id,1)],[lb,"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",()=>kI(e.id)]].forEach(([h,v,S])=>{let L=document.createElement("button");L.type="button",L.className="knowledge-tree-action",L.title=v,L.setAttribute("aria-label",v),v==="\u0423\u0434\u0430\u043B\u0438\u0442\u044C"?L.innerHTML=h:L.textContent=h,L.addEventListener("click",x=>{x.stopPropagation(),Promise.resolve(S()).catch(g=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0434\u0435\u0440\u0435\u0432\u0430: ${g.message}`))}),s.append(L)}),n.append(l,s),a.append(n),c&&p){let h=document.createElement("div");h.className="knowledge-tree-children",m.forEach(v=>h.append(Qb(v,t+1))),a.append(h)}return a}function EI(){let e=document.createElement("div"),t=document.createElement("div"),a=document.createElement("button"),n=document.createElement("span"),l=document.createElement("span"),o=document.createElement("span"),r=document.createElement("span"),i=document.createElement("span"),u=document.createElement("button");return e.className="knowledge-tree-item knowledge-root-item",e.style.setProperty("--depth","0"),t.className="knowledge-tree-row",t.dataset.active=String(kd()),t.dataset.disabled="false",a.className="knowledge-tree-select",a.type="button",n.className="knowledge-tree-icon",n.textContent="K",l.className="knowledge-tree-copy",o.className="knowledge-tree-title",o.textContent=Sp(),r.className="knowledge-tree-meta",r.textContent="/knowledge/ \u0433\u043B\u0430\u0432\u043D\u0430\u044F",l.append(o,r),a.append(n,l),a.addEventListener("click",()=>$b(uu)),i.className="knowledge-tree-actions",u.type="button",u.className="knowledge-tree-action",u.title="\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B \u0432 \u043A\u043E\u0440\u0435\u043D\u044C",u.setAttribute("aria-label","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B \u0432 \u043A\u043E\u0440\u0435\u043D\u044C"),u.textContent="+",u.addEventListener("click",s=>{s.stopPropagation(),$p(null)}),i.append(u),t.append(a,i),e.append(t),e}function Ed(){f.regions.innerHTML="";let e=document.createElement("section"),t=document.createElement("h2"),a=document.createElement("div");if(e.className="region-group knowledge-region",t.className="region-title",t.textContent="\u0411\u0430\u0437\u0430 \u0437\u043D\u0430\u043D\u0438\u0439",a.className="knowledge-tree",a.append(EI()),To().length)To().forEach(n=>a.append(Qb(n)));else{let n=document.createElement("div");n.className="empty-note knowledge-empty-tree",n.textContent="\u0414\u0435\u0440\u0435\u0432\u043E \u043F\u0443\u0441\u0442\u043E\u0435. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u043F\u043B\u044E\u0441 \u0441\u0432\u0435\u0440\u0445\u0443, \u0447\u0442\u043E\u0431\u044B \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0435\u0440\u0432\u044B\u0439 \u0440\u0430\u0437\u0434\u0435\u043B.",a.append(n)}e.append(t,a),f.regions.append(e)}function Wb(e,t,a,n="\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B \u0431\u0430\u0437\u044B \u0437\u043D\u0430\u043D\u0438\u0439 \u043E\u0431\u043D\u043E\u0432\u043B\u0451\u043D."){Zt(e,t,a),be(n)}function aa({node:e,path:t,label:a,kind:n="text",wide:l=!1,placeholder:o=""}){let r=document.createElement("label"),i=document.createElement("span"),u=document.createElement("span"),s=document.createElement("span"),m=n==="textarea"?document.createElement("textarea"):document.createElement("input"),c=document.createElement("span");return r.className=`field-control${l||n==="textarea"?" wide":""}`,i.className="field-label-row",u.className="field-label-text",u.textContent=a,s.className="field-kind",s.textContent=n,m.value=Le(e,t)??"",m.placeholder=o,m.dataset.knowledgePath=t,m.tagName==="INPUT"&&(m.type=n==="url"?"url":"text",m.autocomplete="off"),m.addEventListener("input",()=>{Wb(e,t,m.value),(t==="title"||t==="settings.navTitle")&&Ed()}),c.className="field-path",c.textContent=t,i.append(u,s),r.append(i,m,c),r}function mp({node:e,path:t,label:a,checkedDefault:n=!0}){let l=document.createElement("label"),o=document.createElement("span"),r=document.createElement("span"),i=document.createElement("span"),u=document.createElement("input"),s=document.createElement("span");l.className="field-control boolean-field",o.className="field-label-row",r.className="field-label-text",r.textContent=a,i.className="field-kind",i.textContent="boolean",u.type="checkbox";let m=Le(e,t);return u.checked=m==null?n:m!==!1,u.addEventListener("change",()=>{Wb(e,t,u.checked),aS(),Ed()}),s.className="field-path",s.textContent=t,o.append(r,i),l.append(o,u,s),l}function Cp(e,t){if(!e||!t)return!1;let a=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;return!!(a&&e.contains(a))}function xl(){let e=window.getSelection();if(!e?.rangeCount)return;let t=f.knowledgeForm.querySelector("[data-knowledge-richtext]");!Cp(t,e.anchorNode)||!Cp(t,e.focusNode)||(d.knowledgeSavedSelection=e.getRangeAt(0).cloneRange())}function Jb(e){e.focus();let t=d.knowledgeSavedSelection;(!t||!Cp(e,t.commonAncestorContainer))&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),d.knowledgeSavedSelection=t.cloneRange());let a=window.getSelection();return a.removeAllRanges(),a.addRange(t),t}function Zp(e,t){Zt(e,t.dataset.knowledgeBodyPath||"bodyHtml",t.innerHTML.trim()),be("\u0422\u0435\u043A\u0441\u0442 \u0441\u0442\u0430\u0442\u044C\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0451\u043D.")}function Bn(e,t,a,n=null){Jb(e),document.execCommand(a,!1,n),Zp(t,e)}function eS(e,t,a){Jb(e),document.execCommand("insertHTML",!1,a),xl(),Zp(t,e)}function pd(e){return String(e??"").replace(/\s+/g," ").trim().replaceAll("&","&").replaceAll('"',""").replaceAll("[","(").replaceAll("]",")")}function tS(e){return String(e||"").trim().replace(/^#+/,"").replace(/^index\.html#/i,"").replace(/^\/?#/,"")}function Md(e){return(String(e??"").trim()||"/").replace(/^\/+(https?:\/\/)/i,"$1").replace(/^\/+((?:mailto|tel):)/i,"$1")}function MI({name:e,link:t,target:a,blockId:n}){let l=pd(e||"\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C"),o=pd(Md(t)),r=tS(a),i=String(n||"").trim(),u=i?` block="${pd(i)}"`:"",s=r?` target="${pd(r)}"`:"";return`[button name="${l}" link="${o}"${u}${s}]`}function AI(){if(!f.knowledgeButtonTargetOptions)return;f.knowledgeButtonTargetOptions.innerHTML="";let e=new Set;for(let{id:t,label:a,target:n}of gl()){let l=n.toLowerCase();if(!e.has(l)){let r=document.createElement("option");r.value=n,r.label=`${a} / ${t}`,f.knowledgeButtonTargetOptions.append(r),e.add(l)}let o=String(t||"").toLowerCase();if(t&&!e.has(o)){let r=document.createElement("option");r.value=t,r.label=`${a} / block id`,f.knowledgeButtonTargetOptions.append(r),e.add(o)}}}function Qp(e=""){f.knowledgeButtonError&&(f.knowledgeButtonError.textContent=e)}function _o(e=null){let t=d.knowledgeButtonResolve;d.knowledgeButtonResolve=null,f.knowledgeButtonModal.classList.add("hidden"),Qp(""),t&&t(e)}function wp(){let e=f.knowledgeButtonName.value.trim();if(!e){Qp("\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043A\u043D\u043E\u043F\u043A\u0438 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E."),f.knowledgeButtonName.focus();return}let t=Md(f.knowledgeButtonLink.value);f.knowledgeButtonLink.value=t,_o({name:e,link:t,targetInput:f.knowledgeButtonTarget.value.trim()})}function DI({name:e="\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0434\u0435\u043C\u043E",link:t="/",target:a=""}={}){return d.knowledgeButtonResolve&&_o(null),new Promise(n=>{d.knowledgeButtonResolve=n,AI(),Qp(""),f.knowledgeButtonName.value=e,f.knowledgeButtonLink.value=Md(t),f.knowledgeButtonTarget.value=tS(a),f.knowledgeButtonModal.classList.remove("hidden"),f.knowledgeButtonName.focus(),f.knowledgeButtonName.select()})}function TI(e,t){xl();let a={value:""},n={textContent:"",title:""},l=document.createElement("div"),o=document.createElement("span"),r=document.createElement("span"),i={value:""};Ub({block:{id:t.id||"knowledge"},editableField:{path:"content.bodyHtml",label:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0441\u0442\u0430\u0442\u044C\u0438"},hiddenInput:a,urlInput:i,fileName:n,preview:l,hint:o,error:r,setSource(){},onSelect(u){let s=String(u||"");s&&eS(e,t,``)}}).catch(u=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043C\u0435\u0434\u0438\u0430\u0442\u0435\u043A\u0438: ${u.message}`))}function NI(e,t){let a=document.createElement("div");return a.className="knowledge-rich-toolbar",[["P","\u0410\u0431\u0437\u0430\u0446",()=>Bn(e,t,"formatBlock","P")],["H2","\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A H2",()=>Bn(e,t,"formatBlock","H2")],["H3","\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A H3",()=>Bn(e,t,"formatBlock","H3")],["B","\u0416\u0438\u0440\u043D\u044B\u0439",()=>Bn(e,t,"bold")],["I","\u041A\u0443\u0440\u0441\u0438\u0432",()=>Bn(e,t,"italic")],["UL","\u0421\u043F\u0438\u0441\u043E\u043A",()=>Bn(e,t,"insertUnorderedList")],["OL","\u041D\u0443\u043C\u0435\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A",()=>Bn(e,t,"insertOrderedList")],["Link","\u0421\u0441\u044B\u043B\u043A\u0430",()=>{let l=window.prompt("\u0410\u0434\u0440\u0435\u0441 \u0441\u0441\u044B\u043B\u043A\u0438","/knowledge/");l&&Bn(e,t,"createLink",l)}],["Button","\u041A\u043D\u043E\u043F\u043A\u0430",async()=>{xl();let l=await DI();if(!l)return;let o=l.targetInput,r=i2(o),i=r?r.target:o,u=r?.id||"";eS(e,t,`

${ru(MI({name:l.name,link:l.link,target:i,blockId:u}))}

`)}],["Image","\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435",()=>TI(e,t)]].forEach(([l,o,r])=>{let i=document.createElement("button");i.type="button",i.textContent=l,i.title=o,i.addEventListener("mousedown",u=>u.preventDefault()),i.addEventListener("click",r),a.append(i)}),a}function aS(){let e=kd(),t=SI();if(f.empty.classList.add("hidden"),f.form.classList.add("hidden"),f.projectSettingsForm.classList.add("hidden"),f.knowledgeForm.classList.remove("hidden"),f.knowledgeForm.innerHTML="",!d.knowledge){f.knowledgeForm.innerHTML='
\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0431\u0430\u0437\u0443 \u0437\u043D\u0430\u043D\u0438\u0439...
';return}if(!t){let y=document.createElement("section");y.className="content-panel",y.innerHTML='

\u0414\u0435\u0440\u0435\u0432\u043E \u0431\u0430\u0437\u044B \u0437\u043D\u0430\u043D\u0438\u0439 \u043F\u0443\u0441\u0442\u043E\u0435

\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u043F\u043B\u044E\u0441 \u0432 \u043B\u0435\u0432\u043E\u043C \u0432\u0435\u0440\u0445\u043D\u0435\u043C \u0443\u0433\u043B\u0443, \u0447\u0442\u043E\u0431\u044B \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u044B\u0439 \u0440\u0430\u0437\u0434\u0435\u043B.

',f.knowledgeForm.append(y);return}d.knowledge.settings||={},d.knowledge.seo||={},d.knowledge.seo.title||(d.knowledge.seo.title=d.knowledge.title||"Knowledge"),!d.knowledge.seo.description&&d.knowledge.settings.description&&(d.knowledge.seo.description=d.knowledge.settings.description);let a=e?"introHtml":"bodyHtml",l=(e?null:yl(t.id))?.parent?.title||d.knowledge.title||"\u0411\u0430\u0437\u0430 \u0437\u043D\u0430\u043D\u0438\u0439";f.selectedRegion.textContent=e?`NODE.DC / ${Sp()} / /knowledge/`:`NODE.DC / ${d.knowledge.title||"\u0411\u0430\u0437\u0430 \u0437\u043D\u0430\u043D\u0438\u0439"} / ${l}`,f.selectedTitle.textContent=e?Sp():t.title||"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B";let o=document.createElement("section"),r=document.createElement("div"),i=document.createElement("h3"),u=document.createElement("div"),s=document.createElement("div");o.className="content-panel",r.className="panel-head",u.className="section-kicker",u.textContent=e?"\u041A\u043E\u0440\u043D\u0435\u0432\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430":"\u0423\u0437\u0435\u043B \u0434\u0435\u0440\u0435\u0432\u0430",i.textContent=e?"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 /knowledge/":"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0430",r.append(Object.assign(document.createElement("div"),{innerHTML:`${u.outerHTML}

${i.textContent}

`})),s.className="group-grid",e?s.append(aa({node:t,path:"title",label:"H1 / \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0432 sidebar",wide:!1}),aa({node:t,path:"settings.navTitle",label:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0432 \u0448\u0430\u043F\u043A\u0435",wide:!1}),aa({node:t,path:"settings.searchPlaceholder",label:"Placeholder \u043F\u043E\u0438\u0441\u043A\u0430",wide:!1}),aa({node:t,path:"settings.homeHref",label:"\u0421\u0441\u044B\u043B\u043A\u0430 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u0430",kind:"url",wide:!1}),aa({node:t,path:"settings.themeDefault",label:"\u0422\u0435\u043C\u0430 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",wide:!1}),mp({node:t,path:"settings.downloadEnabled",label:"\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C Download",checkedDefault:!1})):s.append(aa({node:t,path:"title",label:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",wide:!1}),aa({node:t,path:"slug",label:"Slug",wide:!1}),mp({node:t,path:"enabled",label:"\u041F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C"}),mp({node:t,path:"useContent",label:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043A\u0430\u043A \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443"})),o.append(r,s);let m=document.createElement("section"),c=document.createElement("div"),p=document.createElement("div");m.className="content-panel",c.className="panel-head",c.innerHTML=`
SEO

${e?"\u0421\u043D\u0438\u043F\u043F\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043B\u0430":"\u0421\u043D\u0438\u043F\u043F\u0435\u0442 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B"}

\u041F\u043E\u043B\u044F \u043F\u043E\u043F\u0430\u0434\u0443\u0442 \u0432 title, description, Open Graph \u0438 sitemap.`,p.className="group-grid",e?p.append(aa({node:t,path:"seo.title",label:"SEO title",wide:!0}),aa({node:t,path:"seo.description",label:"SEO description / \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435",kind:"textarea",wide:!0})):(t.seo||={},p.append(aa({node:t,path:"seo.title",label:"SEO title",wide:!0}),aa({node:t,path:"seo.description",label:"SEO description",kind:"textarea",wide:!0}))),m.append(c,p);let h=document.createElement("section"),v=document.createElement("div"),S=document.createElement("div");if(h.className="content-panel knowledge-rich-panel",v.className="panel-head",v.innerHTML=`
\u041A\u043E\u043D\u0442\u0435\u043D\u0442

${e?"\u0422\u0435\u043A\u0441\u0442 \u0433\u043B\u0430\u0432\u043D\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B":"\u0422\u0435\u043A\u0441\u0442 \u0441\u0442\u0430\u0442\u044C\u0438"}

H2/H3 \u0444\u043E\u0440\u043C\u0438\u0440\u0443\u044E\u0442 \u043F\u0440\u0430\u0432\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u201C\u041D\u0430 \u044D\u0442\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435\u201D.`,S.className="knowledge-rich-editor",S.contentEditable=e||t.useContent!==!1?"true":"false",S.dataset.knowledgeRichtext="true",S.dataset.knowledgeBodyPath=a,S.innerHTML=Le(t,a)||"

",S.addEventListener("focusout",()=>xl()),S.addEventListener("keyup",()=>xl()),S.addEventListener("mouseup",()=>xl()),S.addEventListener("input",()=>Zp(t,S)),h.append(v,NI(S,t),S),!e&&t.useContent===!1){let y=document.createElement("p");y.className="group-desc",y.textContent="\u041A\u043E\u043D\u0442\u0435\u043D\u0442 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F \u0432 \u043C\u043E\u0434\u0435\u043B\u0438, \u043D\u043E \u043F\u0443\u0431\u043B\u0438\u0447\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0443\u0437\u043B\u0430 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043D\u0435\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F, \u043F\u043E\u043A\u0430 \u0444\u043B\u0430\u0433 \u0432\u044B\u043A\u043B\u044E\u0447\u0435\u043D.",h.append(y)}let L=document.createElement("details");L.className="json-details knowledge-json",L.innerHTML=`${e?"JSON \u0432\u0441\u0435\u0439 \u0431\u0430\u0437\u044B \u0437\u043D\u0430\u043D\u0438\u0439":"JSON \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0430"}`;let x=document.createElement("label"),g=document.createElement("textarea");x.className="json-field",g.value=JSON.stringify(t,null,2),g.addEventListener("blur",()=>{try{let y=JSON.parse(g.value);if(e)d.knowledge=y,d.knowledgeSelectedId=uu;else{let b=yl(t.id);if(!b)return;b.siblings[b.index]=y,d.knowledgeSelectedId=y.id||t.id}zo(),be(e?"JSON \u0431\u0430\u0437\u044B \u0437\u043D\u0430\u043D\u0438\u0439 \u043F\u0440\u0438\u043C\u0435\u043D\u0451\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E.":"JSON \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0430 \u043F\u0440\u0438\u043C\u0435\u043D\u0451\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E.")}catch(y){D(`\u041E\u0448\u0438\u0431\u043A\u0430 JSON ${e?"\u0431\u0430\u0437\u044B \u0437\u043D\u0430\u043D\u0438\u0439":"\u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0430"}: ${y.message}`)}}),x.innerHTML="\u0422\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0435",x.append(g),L.append(x),f.knowledgeForm.append(o,m,h,L)}function zo(){Mo(),Yp(),Ed(),aS()}async function Wp(){if(!vl()){Sd();return}let e=await Ve("/api/knowledge");d.knowledge=await ya(e,"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0431\u0430\u0437\u0443 \u0437\u043D\u0430\u043D\u0438\u0439"),d.knowledgeSelectedId=No().knowledgeSelectedId||d.knowledgeSelectedId||null,Yp(),xt(),Ro(!1),D("\u041C\u043E\u0434\u0435\u043B\u044C knowledge.json \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u0430.")}async function RI(){let e=await Ve("/api/knowledge",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(d.knowledge)});if(!e.ok)throw new Error(await e.text())}async function BI(){return nS()}async function nS(){return lS(RI,"knowledge")}async function lS(e,t){let a=pp;D("\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u043C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F..."),await e();let n=await Ve(`/api/render/${t}`,{method:"POST"}),l=await ya(n,"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B, \u043D\u043E \u0441\u0431\u043E\u0440\u043A\u0430 \u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0430");if(!l.ok)throw new Error(l.error||"\u041E\u0448\u0438\u0431\u043A\u0430 \u0441\u0431\u043E\u0440\u043A\u0438");a===pp&&Ro(!1),l.publishJob?.id?(d.publishJob=l.publishJob,du(),D("\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B. \u041F\u0443\u0431\u043B\u0438\u043A\u0443\u0435\u043C \u043D\u0430 \u0441\u0430\u0439\u0442\u0435..."),await Np(l.publishJob.id)):D("\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B, \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043F\u0435\u0440\u0435\u0441\u043E\u0431\u0440\u0430\u043D\u044B. \u0410\u0432\u0442\u043E\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0441\u0430\u0439\u0442\u0430 \u0432\u044B\u043A\u043B\u044E\u0447\u0435\u043D\u0430.")}async function oS(){let e=await su();if(d.projectConfig=e,d.knowledge=null,!vl()){d.page=null,d.templates=[],d.selected=null,Sd(),D("\u0421\u0430\u0439\u0442 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D \u0432 \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u044B\u0439 workspace CMS.");return}let[t,a]=await Promise.all([Ve("/api/page/home"),Ve("/api/block-templates/home")]);d.page=await ya(t,"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C home.json"),d.templates=await ya(a,"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u044B \u0431\u043B\u043E\u043A\u043E\u0432"),m2(),p2(),e2(),d.selected={kind:"static"},xt(),Ro(!1),D("\u041C\u043E\u0434\u0435\u043B\u044C home.json \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u0430."),d.mode==="knowledge"&&!d.knowledge&&await Wp()}async function OI(){Ne()&&Lp(),u2();let e=await Ve("/api/page/home",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(d.page)});if(!e.ok)throw new Error(await e.text())}async function _I(){return rS()}async function rS(){return lS(OI,"home")}function iS(e){if(ot())return;let t=Ll(),a=d.selected?.blockIndex;if(!t||a==null)return;let n=a+e;if(n<0||n>=t.blocks.length)return;let[l]=t.blocks.splice(a,1);t.blocks.splice(n,0,l),d.selected.blockIndex=n,xt(),be("\u041F\u043E\u0440\u044F\u0434\u043E\u043A \u0431\u043B\u043E\u043A\u043E\u0432 \u0438\u0437\u043C\u0435\u043D\u0451\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C\xBB \u0438\u043B\u0438 \xAB\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C index.html\xBB.")}function zI(){if(ot())return;let e=Ll(),t=Ne();if(!e||!t)return;let a=gt(t);a.id=Op(t.id),a.adminLabel=`${t.adminLabel||t.id} \u2014 \u043A\u043E\u043F\u0438\u044F`,a.anchor&&(a.anchor=Bp(a.anchor,a)),a.scopeIds=!0,e.blocks.splice(d.selected.blockIndex+1,0,a),d.selected.blockIndex+=1,xt(),be(`\u0411\u043B\u043E\u043A \xAB${a.adminLabel||a.id}\xBB \u043F\u0440\u043E\u0434\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E.`)}function qI(){if(ot())return;let e=Ne();e&&(d.clipboard=gt(e),D(`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D \u0431\u043B\u043E\u043A: ${e.adminLabel||e.id}`))}function UI(){if(ot())return;let e=Ll();if(!e||!d.clipboard)return;let t=gt(d.clipboard);t.id=Op(t.id),t.adminLabel=`${t.adminLabel||t.id} \u2014 \u0432\u0441\u0442\u0430\u0432\u043A\u0430`,t.anchor&&(t.anchor=Bp(t.anchor,t)),t.scopeIds=!0,e.blocks.splice(d.selected.blockIndex+1,0,t),d.selected.blockIndex+=1,xt(),be(`\u0411\u043B\u043E\u043A \xAB${t.adminLabel||t.id}\xBB \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E.`)}async function HI(){if(ot())return;let e=Ll();!e||d.selected.blockIndex==null||!await Bo()||(e.blocks.splice(d.selected.blockIndex,1),d.selected.blockIndex=Math.min(d.selected.blockIndex,e.blocks.length-1),d.selected.blockIndex<0&&(d.selected={kind:"static"}),xt(),be("\u0411\u043B\u043E\u043A \u0443\u0434\u0430\u043B\u0451\u043D \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C\xBB \u0438\u043B\u0438 \xAB\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C index.html\xBB."))}function PI(){d.selected={kind:"project-settings"},xt()}var WL,Ld,xd,eb,uu,d,kp,Ep,_4,Mp,z4,q4,f,Ge,zL,ab,Ap,U4,nb,lb,On,qL,UL,pp,fd,r2,uS=xS(()=>{WL=window.location.pathname.match(/^\/s\/[a-z][a-z0-9-]*/)?.[0]||"",Ld=e=>`${WL}/${String(e).replace(/^\.?\//,"")}`;xd=[];document.querySelector("#site-selector").addEventListener("change",e=>{JL()?window.location.assign(`/s/${e.target.value}/`):e.target.value=d.projectConfig.id});document.querySelectorAll("[data-close-dialog]").forEach(e=>e.addEventListener("click",()=>e.closest("dialog").close()));document.querySelector("#new-site-form").addEventListener("submit",async e=>{e.preventDefault();let t=e.submitter;t.disabled=!0;try{if(!JL())return;let a=Object.fromEntries(new FormData(e.target)),n=await fetch("/api/sites",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(a)}),l=await ya(n,"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0441\u0430\u0439\u0442");window.location.assign(`/s/${l.project.id}/`)}catch(a){document.querySelector("#new-site-error").textContent=a.message}finally{t.disabled=!1}});document.querySelector("#transfer-site-form").addEventListener("submit",async e=>{e.preventDefault();let t=e.submitter;t.disabled=!0;try{if(d.projectConfigDirty)throw new Error("\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430");let a=await fetch(`/api/sites/${d.projectConfig.id}/deploy-transfer`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({fromSiteId:document.querySelector("#transfer-site-source").value})});await ya(a,"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0435\u0440\u0435\u043D\u0435\u0441\u0442\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438"),await su(),bl(),document.querySelector("#transfer-site-dialog").close(),D("\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0435\u0440\u0435\u043D\u0435\u0441\u0435\u043D\u044B. \u041E\u0431\u0430 \u0441\u0430\u0439\u0442\u0430 \u043F\u043E\u043A\u0430 \u043D\u0435 \u043F\u0443\u0431\u043B\u0438\u043A\u0443\u044E\u0442\u0441\u044F. \u0412\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0435\u043F\u043B\u043E\u0439 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F \u043F\u043E\u0441\u043B\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438.")}catch(a){document.querySelector("#transfer-site-error").textContent=a.message}finally{t.disabled=!1}});eb=WL+"nodedc-admin-layout-v1",uu="__knowledge-root__";d={mode:O4(),page:null,projectConfig:null,projectConfigDirty:!1,keepSiteArchiveBackup:!0,publishJob:null,publishResumeAttempted:!1,knowledge:null,knowledgeSelectedId:null,knowledgeSavedSelection:null,knowledgeOpenIds:new Set(No().knowledgeOpenIds||[]),templates:[],selected:null,clipboard:null,drag:null,dragTarget:null,dirty:!1,filePickerActive:!1,mediaUploadActive:!1,filePickerResetTimer:null,deleteConfirmResolve:null,mediaActionResolve:null,knowledgeButtonResolve:null,collectionOpenState:B4(),mediaLibrary:{columns:[],context:null,contextMenu:null,trashMode:!1,previousPath:"",selectedPath:"",selectedEntry:null,selectedUrl:"",root:"",kind:"all",query:"",loaded:!1,dragEntryPath:"",lastPath:tb()}},kp="sections",Ep="\u0421\u0435\u043A\u0446\u0438\u0438",_4={title:"NODE.DC - \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0430 \u0434\u043B\u044F \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u043E\u0432, \u0434\u0430\u043D\u043D\u044B\u0445 \u0438 \u0418\u0418-\u0430\u0433\u0435\u043D\u0442\u043E\u0432",description:"NODE.DC \u043E\u0431\u044A\u0435\u0434\u0438\u043D\u044F\u0435\u0442 Hub, Engine, Ops, \u043F\u0440\u0438\u043A\u043B\u0430\u0434\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438 \u0438 \u0441\u043A\u0432\u043E\u0437\u043D\u043E\u0433\u043E \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447, workflow, \u0434\u0430\u043D\u043D\u044B\u0445, \u0440\u043E\u043B\u0435\u0439, \u0438\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439 \u0438 \u0438\u043D\u0436\u0435\u043D\u0435\u0440\u043D\u044B\u0445 \u043C\u043E\u0434\u0435\u043B\u0435\u0439.",canonicalUrl:"https://nodedc.dctouch.ru/",robots:"index,follow,max-image-preview:large",siteName:"NODE.DC",locale:"ru_RU",ogImage:"https://nodedc.dctouch.ru/assets/site/images/69b6acdde3123ef078e2b7f3_og-img.jpg",imageAlt:"NODE.DC - \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0430 \u0434\u043B\u044F \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u043E\u0432, \u0434\u0430\u043D\u043D\u044B\u0445 \u0438 \u0418\u0418-\u0430\u0433\u0435\u043D\u0442\u043E\u0432",organizationName:"DCTOUCH",organizationUrl:"https://dctouch.ru/",applicationCategory:"BusinessApplication"},Mp={targetCluster:"",searchIntent:"",primaryQuery:"",secondaryQueries:"",title:"",description:"",coverageNotes:"",indexHint:"section"},z4=[{path:"seo.title",label:"Title \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B",kind:"text",group:"\u0421\u043D\u0438\u043F\u043F\u0435\u0442",min:35,max:70},{path:"seo.description",label:"Description \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B",kind:"textarea",group:"\u0421\u043D\u0438\u043F\u043F\u0435\u0442",min:110,max:170},{path:"seo.canonicalUrl",label:"Canonical URL",kind:"url",group:"\u0418\u043D\u0434\u0435\u043A\u0441\u0430\u0446\u0438\u044F"},{path:"seo.robots",label:"Robots meta",kind:"select",group:"\u0418\u043D\u0434\u0435\u043A\u0441\u0430\u0446\u0438\u044F",options:["index,follow,max-image-preview:large","noindex,nofollow","index,follow"]},{path:"seo.siteName",label:"Site name",kind:"text",group:"Open Graph"},{path:"seo.locale",label:"Locale",kind:"text",group:"Open Graph"},{path:"seo.ogImage",label:"OG image",kind:"url",group:"Open Graph"},{path:"seo.imageAlt",label:"OG image alt",kind:"textarea",group:"Open Graph",min:20,max:120},{path:"seo.organizationName",label:"Organization",kind:"text",group:"Schema.org"},{path:"seo.organizationUrl",label:"Organization URL",kind:"url",group:"Schema.org"},{path:"seo.applicationCategory",label:"Application category",kind:"text",group:"Schema.org"}],q4=[{path:"seo.targetCluster",label:"\u041A\u043B\u0430\u0441\u0442\u0435\u0440",kind:"text",group:"\u0421\u0435\u043C\u0430\u043D\u0442\u0438\u043A\u0430"},{path:"seo.searchIntent",label:"\u0418\u043D\u0442\u0435\u043D\u0442",kind:"textarea",group:"\u0421\u0435\u043C\u0430\u043D\u0442\u0438\u043A\u0430",min:20,max:220},{path:"seo.primaryQuery",label:"\u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u0437\u0430\u043F\u0440\u043E\u0441",kind:"text",group:"\u0421\u0435\u043C\u0430\u043D\u0442\u0438\u043A\u0430"},{path:"seo.secondaryQueries",label:"\u0421\u043C\u0435\u0436\u043D\u044B\u0435 \u0437\u0430\u043F\u0440\u043E\u0441\u044B",kind:"textarea",group:"\u0421\u0435\u043C\u0430\u043D\u0442\u0438\u043A\u0430"},{path:"seo.title",label:"SEO-\u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0431\u043B\u043E\u043A\u0430",kind:"text",group:"\u0421\u043D\u0438\u043F\u043F\u0435\u0442 \u0431\u043B\u043E\u043A\u0430",min:35,max:80},{path:"seo.description",label:"SEO-\u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0431\u043B\u043E\u043A\u0430",kind:"textarea",group:"\u0421\u043D\u0438\u043F\u043F\u0435\u0442 \u0431\u043B\u043E\u043A\u0430",min:90,max:180},{path:"seo.indexHint",label:"\u0420\u043E\u043B\u044C \u0432 \u0438\u043D\u0434\u0435\u043A\u0441\u0430\u0446\u0438\u0438",kind:"select",group:"\u0418\u043D\u0434\u0435\u043A\u0441\u0430\u0446\u0438\u044F",options:["section","supporting","conversion","noindex"]},{path:"seo.coverageNotes",label:"\u0417\u0430\u043C\u0435\u0442\u043A\u0438 \u043F\u043E \u043E\u0445\u0432\u0430\u0442\u0443",kind:"textarea",group:"\u0410\u043D\u0430\u043B\u0438\u0442\u0438\u043A\u0430",min:20,max:500}],f={modeContent:document.querySelector("#admin-mode-content"),modeSeo:document.querySelector("#admin-mode-seo"),modeKnowledge:document.querySelector("#admin-mode-knowledge"),modeNav:document.querySelector(".nodedc-expanded-nav-group"),sidebarTitle:document.querySelector("#sidebar-title"),workspaceName:document.querySelector("#workspace-name"),workspaceRole:document.querySelector("#workspace-role"),editorHeading:document.querySelector("#editor-heading"),panelKicker:document.querySelector("#content-panel-kicker"),panelTitle:document.querySelector("#content-panel-title"),panelNote:document.querySelector("#content-panel-note"),regions:document.querySelector("#regions"),addProject:document.querySelector("#add-project"),projectSettings:document.querySelector("#project-settings"),addBlock:document.querySelector("#add-block"),reload:document.querySelector("#reload"),save:document.querySelector("#save"),render:document.querySelector("#render"),publish:document.querySelector("#publish"),dirtyState:document.querySelector("#dirty-state"),status:document.querySelector("#status"),empty:document.querySelector("#empty-state"),form:document.querySelector("#block-form"),knowledgeForm:document.querySelector("#knowledge-form"),projectSettingsForm:document.querySelector("#project-settings-form"),selectedRegion:document.querySelector("#selected-region"),selectedTitle:document.querySelector("#selected-title"),id:document.querySelector("#block-id"),label:document.querySelector("#block-label"),template:document.querySelector("#block-template"),anchor:document.querySelector("#block-anchor"),targetOptions:document.querySelector("#block-target-options"),enabled:document.querySelector("#block-enabled"),contentFields:document.querySelector("#content-fields"),json:document.querySelector("#block-json"),moveUp:document.querySelector("#move-up"),moveDown:document.querySelector("#move-down"),duplicate:document.querySelector("#duplicate"),copy:document.querySelector("#copy"),pasteAfter:document.querySelector("#paste-after"),deleteBlock:document.querySelector("#delete-block"),templateModal:document.querySelector("#template-modal"),templateList:document.querySelector("#template-list"),templateModalClose:document.querySelector("#template-modal-close"),templateModalCancel:document.querySelector("#template-modal-cancel"),deleteModal:document.querySelector("#delete-modal"),deleteModalTitle:document.querySelector("#delete-modal-title"),deleteModalBody:document.querySelector("#delete-modal-body"),deleteModalCancel:document.querySelector("#delete-modal-cancel"),deleteModalConfirm:document.querySelector("#delete-modal-confirm"),mediaModal:document.querySelector("#media-modal"),mediaModalTitle:document.querySelector("#media-modal-title"),mediaModalSubtitle:document.querySelector("#media-modal-subtitle"),mediaSiteSize:document.querySelector("#media-site-size"),mediaModalClose:document.querySelector("#media-modal-close"),mediaModalCancel:document.querySelector("#media-modal-cancel"),mediaTrashToggle:document.querySelector("#media-trash-toggle"),mediaSearch:document.querySelector("#media-search"),mediaKindFilters:document.querySelector("#media-kind-filters"),mediaRootFilters:document.querySelector("#media-root-filters"),mediaUpload:document.querySelector("#media-upload"),mediaRefresh:document.querySelector("#media-refresh"),mediaDropZone:document.querySelector("#media-drop-zone"),mediaBreadcrumbs:document.querySelector("#media-breadcrumbs"),mediaList:document.querySelector("#media-list"),mediaEmpty:document.querySelector("#media-empty"),mediaPreview:document.querySelector("#media-preview"),mediaPreviewName:document.querySelector("#media-preview-name"),mediaPreviewPath:document.querySelector("#media-preview-path"),mediaPreviewMeta:document.querySelector("#media-preview-meta"),mediaPreviewUsage:document.querySelector("#media-preview-usage"),mediaSelect:document.querySelector("#media-select"),mediaDelete:document.querySelector("#media-delete"),mediaContextMenu:document.querySelector("#media-context-menu"),mediaActionModal:document.querySelector("#media-action-modal"),mediaActionTitle:document.querySelector("#media-action-title"),mediaActionBody:document.querySelector("#media-action-body"),mediaActionLabel:document.querySelector("#media-action-label"),mediaActionInput:document.querySelector("#media-action-input"),mediaActionCancel:document.querySelector("#media-action-cancel"),mediaActionConfirm:document.querySelector("#media-action-confirm"),knowledgeButtonModal:document.querySelector("#knowledge-button-modal"),knowledgeButtonClose:document.querySelector("#knowledge-button-close"),knowledgeButtonName:document.querySelector("#knowledge-button-name"),knowledgeButtonLink:document.querySelector("#knowledge-button-link"),knowledgeButtonTarget:document.querySelector("#knowledge-button-target"),knowledgeButtonTargetOptions:document.querySelector("#knowledge-button-target-options"),knowledgeButtonError:document.querySelector("#knowledge-button-error"),knowledgeButtonCancel:document.querySelector("#knowledge-button-cancel"),knowledgeButtonConfirm:document.querySelector("#knowledge-button-confirm")},Ge={id:"static-elements",type:"staticElements",adminLabel:"\u0421\u0442\u0430\u0442\u0438\u0447\u043D\u044B\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",enabled:!0,content:{navigation:{logoSrc:"./assets/site/images/69ad964d951f9d17cc5a919e_logo-app.svg",logoAlt:"\u0433\u043B\u0430\u0432\u043D\u0430\u044F",brandLabel:"NODE.DC",links:[{enabled:!0,label:"\u041E \u043F\u0440\u043E\u0434\u0443\u043A\u0442\u0435",href:"",target:"index.html#platform-composition",linkMode:"target",linkTarget:""},{enabled:!0,label:"\u041B\u0438\u0441\u0442 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F",href:"",target:"index.html#hero",linkMode:"target",linkTarget:""},{enabled:!0,label:"\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044F",href:"https://nodedc.dctouch.ru/",target:"",linkMode:"href",linkTarget:"_blank"},{enabled:!0,label:"\u0422\u0430\u0440\u0438\u0444\u044B",href:"",target:"index.html#pricing-intro",linkMode:"target",linkTarget:""}]},notifications:[{enabled:!0,eyebrowHtml:'\u0414\u0410\u041B\u0415\u0415 \u2014 \u0418\u042E\u041B\u042C 2026',eyebrowClass:"red-txt gray",title:"\u041E\u0442\u043A\u0440\u044B\u0442\u0430\u044F \u0431\u0435\u0442\u0430",body:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u0434\u043E\u0441\u0442\u0443\u043F \u0432\u0441\u0435\u043C. \u0411\u0443\u0434\u0435\u043C \u0441\u043E\u0431\u0438\u0440\u0430\u0442\u044C \u0438 \u043E\u0442\u043B\u0430\u0436\u0438\u0432\u0430\u0442\u044C \u0432\u043C\u0435\u0441\u0442\u0435."},{enabled:!0,eyebrowHtml:'\u0414\u0410\u041B\u0415\u0415 \u2014 \u0418\u042E\u041B\u042C 2026',eyebrowClass:"red-txt gray",title:"\u0410\u043B\u044C\u0444\u0430 \u0434\u043B\u044F Founder-\u0434\u043E\u0441\u0442\u0443\u043F\u0430",body:"\u041D\u0430 \u0432\u0442\u043E\u0440\u043E\u0439 \u0444\u0430\u0437\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0435\u0442\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u0430 \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u043F\u043E\u0434\u043F\u0438\u0441\u0447\u0438\u043A\u043E\u0432 Founder-\u0442\u0430\u0440\u0438\u0444\u0430."},{enabled:!0,eyebrowHtml:"\u0421\u0415\u0419\u0427\u0410\u0421",eyebrowClass:"red-txt",title:"\u0418\u043D\u0432\u0430\u0439\u0442\u044B \u0432 \u0437\u0430\u043A\u0440\u044B\u0442\u0443\u044E \u0431\u0435\u0442\u0443 \u0443\u0436\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u044B.",body:"\u0421\u0435\u0439\u0447\u0430\u0441 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043C \u0431\u0430\u0437\u043E\u0432\u0443\u044E \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0438 \u0418\u0418-\u0438\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044E. "}],dock:{items:[{enabled:!0,title:"NODE.DC",href:"javascript:void(0)",linkTarget:"",targetId:"app-data",iconSrc:"./assets/site/images/69ad964d951f9d17cc5a919e_logo-app.svg",iconAlt:"\u0418\u043A\u043E\u043D\u043A\u0430 NODE.DC",className:"dock-icon nodedc-app",iconClass:"logo",dividerBefore:!1},{enabled:!0,title:"\u041A\u043E\u0440\u0437\u0438\u043D\u0430",href:"javascript:void(0)",linkTarget:"",targetId:"",iconSrc:"./assets/site/images/69a9ae818a76c773dc3cf7bc_trash.avif",iconAlt:"\u0411\u0435\u043B\u0430\u044F \u0438\u043A\u043E\u043D\u043A\u0430 \u043A\u043E\u0440\u0437\u0438\u043D\u044B.",className:"dock-icon no-bg",iconClass:"dock-app-img trash",dividerBefore:!0}],demoFileLabel:"\u0434\u0435\u043C\u043E-\u0432\u0438\u0434\u0435\u043E.txt"},assets:{webglModelSrc:"./assets/custom/icon.glb",logoPng:"./assets/uploads/images/Logo/dclogo_white_alpha-mqus5if2.png",logoPngAlt:"\u041B\u043E\u0433\u043E\u0442\u0438\u043F NODE.DC",appIconSrc:"./assets/site/images/69ad964d951f9d17cc5a919e_logo-app.svg",appIconAlt:"\u0418\u043A\u043E\u043D\u043A\u0430 NODE.DC",appWordmarkSrc:"./assets/site/images/69ad96a28b06b7552a339137_logtype.svg?v=node-dc",appWordmarkAlt:"\u041B\u043E\u0433\u043E\u0442\u0438\u043F NODE.DC",faviconSvg:"./assets/uploads/favicon/icon-adaptive.svg",faviconIco:"./assets/uploads/favicon/favicon.ico",faviconAppleTouchIcon:"./assets/uploads/favicon/apple-touch-icon.png",faviconPng192:"./assets/uploads/favicon/icon-192.png",faviconPng512:"./assets/uploads/favicon/icon-512.png",faviconManifest:"./assets/uploads/favicon/manifest.webmanifest.json"}},editableFields:[Q("content.navigation.logoSrc","\u041B\u043E\u0433\u043E\u0442\u0438\u043F \u0432 \u0448\u0430\u043F\u043A\u0435","media","attr","\u0428\u0430\u043F\u043A\u0430: \u043B\u043E\u0433\u043E\u0442\u0438\u043F"),Q("content.navigation.logoAlt","\u041B\u043E\u0433\u043E\u0442\u0438\u043F \u0432 \u0448\u0430\u043F\u043A\u0435: alt","text","text","\u0428\u0430\u043F\u043A\u0430: \u043B\u043E\u0433\u043E\u0442\u0438\u043F"),Q("content.navigation.brandLabel","\u0411\u0440\u0435\u043D\u0434 \u0432 \u0448\u0430\u043F\u043A\u0435","text","text","\u0428\u0430\u043F\u043A\u0430: \u043B\u043E\u0433\u043E\u0442\u0438\u043F"),cp("content.navigation.links","\u041A\u043D\u043E\u043F\u043A\u0438 \u0448\u0430\u043F\u043A\u0438","\u0428\u0430\u043F\u043A\u0430: \u0441\u0441\u044B\u043B\u043A\u0438",{enabled:!0,label:"\u041D\u043E\u0432\u0430\u044F \u0441\u0441\u044B\u043B\u043A\u0430",href:"",target:"index.html#",linkMode:"target",linkTarget:""},[Q("label","\u0422\u0435\u043A\u0441\u0442 \u043A\u043D\u043E\u043F\u043A\u0438","text","text","\u0428\u0430\u043F\u043A\u0430: \u0441\u0441\u044B\u043B\u043A\u0438"),Q("linkMode","\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A \u0441\u0441\u044B\u043B\u043A\u0438","link-mode","attr","\u0428\u0430\u043F\u043A\u0430: \u0441\u0441\u044B\u043B\u043A\u0438")]),cp("content.notifications","\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F","\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F",{enabled:!0,eyebrowHtml:"\u0421\u0415\u0419\u0427\u0410\u0421",eyebrowClass:"red-txt gray",title:"\u041D\u043E\u0432\u043E\u0435 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435",body:"\u0422\u0435\u043A\u0441\u0442 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F."},[Q("eyebrowHtml","\u0414\u0430\u0442\u0430 / \u0441\u0442\u0430\u0442\u0443\u0441","html","html","\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F"),Q("eyebrowClass","CSS-\u043A\u043B\u0430\u0441\u0441 \u0441\u0442\u0430\u0442\u0443\u0441\u0430","text","attr","\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F"),Q("title","\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A","text","text","\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F"),Q("body","\u0422\u0435\u043A\u0441\u0442","textarea","text","\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F")]),cp("content.dock.items","\u0418\u043A\u043E\u043D\u043A\u0438 dock-\u043F\u0430\u043D\u0435\u043B\u0438","Dock",{enabled:!0,title:"\u041D\u043E\u0432\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435",href:"javascript:void(0)",linkTarget:"",targetId:"",iconSrc:"",iconAlt:"",className:"dock-icon nodedc-app",iconClass:"",dividerBefore:!1},[Q("enabled","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435","boolean","boolean","Dock"),Q("title","\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435","text","text","Dock"),Q("href","\u0421\u0441\u044B\u043B\u043A\u0430 / \u0430\u0434\u0440\u0435\u0441","url","attr","Dock"),Q("linkTarget","Target \u0441\u0441\u044B\u043B\u043A\u0438","text","attr","Dock"),Q("targetId","ID \u043E\u043A\u043D\u0430 / \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F","text","attr","Dock"),Q("iconSrc","\u0418\u043A\u043E\u043D\u043A\u0430","media","attr","Dock"),Q("iconAlt","Alt \u0438\u043A\u043E\u043D\u043A\u0438","text","text","Dock"),Q("dividerBefore","\u0420\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C \u0441\u043B\u0435\u0432\u0430","boolean","boolean","Dock")]),Q("content.dock.demoFileLabel","Dock: \u043F\u043E\u0434\u043F\u0438\u0441\u044C \u0434\u0435\u043C\u043E-\u0444\u0430\u0439\u043B\u0430","text","text","Dock"),Q("content.assets.webglModelSrc","WebGL-\u043C\u043E\u0434\u0435\u043B\u044C \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u0430","media","attr","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.logoPng","PNG-\u043B\u043E\u0433\u043E\u0442\u0438\u043F","media","attr","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.logoPngAlt","PNG-\u043B\u043E\u0433\u043E\u0442\u0438\u043F: alt","text","text","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.appIconSrc","\u0418\u043A\u043E\u043D\u043A\u0430 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F","media","attr","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.appIconAlt","\u0418\u043A\u043E\u043D\u043A\u0430 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F: alt","text","text","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.appWordmarkSrc","Wordmark \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F","media","attr","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.appWordmarkAlt","Wordmark \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F: alt","text","text","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.faviconSvg","Favicon SVG","media","attr","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.faviconIco","Favicon ICO","media","attr","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.faviconAppleTouchIcon","Favicon Apple 180","media","attr","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.faviconPng192","Favicon PNG 192","media","attr","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.faviconPng512","Favicon PNG 512","media","attr","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B"),Q("content.assets.faviconManifest","Favicon manifest","media","attr","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B")]},zL={"\u0428\u0430\u043F\u043A\u0430: \u043B\u043E\u0433\u043E\u0442\u0438\u043F":"\u0421\u0442\u0430\u0442\u0438\u0447\u043D\u044B\u0439 \u0437\u043D\u0430\u043A \u0432\u0435\u0440\u0445\u043D\u0435\u0439 mac-\u043F\u0430\u043D\u0435\u043B\u0438: \u0444\u0430\u0439\u043B \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u0430, alt \u0438 \u0431\u0440\u0435\u043D\u0434\u043E\u0432\u0430\u044F \u043F\u043E\u0434\u043F\u0438\u0441\u044C.","\u0428\u0430\u043F\u043A\u0430: \u0441\u0441\u044B\u043B\u043A\u0438":"\u041F\u0443\u043D\u043A\u0442\u044B \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0432\u0435\u0440\u0445\u043D\u0435\u0439 mac-\u043F\u0430\u043D\u0435\u043B\u0438. \u041A\u0430\u0436\u0434\u044B\u0439 \u043F\u0443\u043D\u043A\u0442 \u043C\u043E\u0436\u043D\u043E \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C, \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0438 \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u0438\u0442\u044C.",\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F:"\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0439 \u0441\u043F\u0440\u0430\u0432\u0430 \u0441\u0432\u0435\u0440\u0445\u0443. \u041F\u043E\u0440\u044F\u0434\u043E\u043A \u0432 \u0430\u0434\u043C\u0438\u043D\u043A\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043F\u043E\u0440\u044F\u0434\u043A\u0443 \u043D\u0430 \u0441\u0430\u0439\u0442\u0435.",Dock:"\u041D\u0438\u0436\u043D\u044F\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u0430\u044F \u043F\u0430\u043D\u0435\u043B\u044C: \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F, \u043A\u043E\u0440\u0437\u0438\u043D\u0430, \u0441\u0441\u044B\u043B\u043A\u0438 \u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u0438 \u0444\u0430\u0439\u043B\u043E\u0432.","\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B":"\u0411\u0430\u0437\u043E\u0432\u044B\u0435 \u0430\u0441\u0441\u0435\u0442\u044B \u0441\u0442\u0430\u0442\u0438\u0447\u043D\u043E\u0433\u043E \u0441\u043B\u043E\u044F: GLB-\u043C\u043E\u0434\u0435\u043B\u044C, PNG/SVG-\u043B\u043E\u0433\u043E\u0442\u0438\u043F\u044B, favicon-\u043A\u043E\u043C\u043F\u043B\u0435\u043A\u0442 \u0438 alt-\u0442\u0435\u043A\u0441\u0442\u044B.",\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A:"\u0413\u043B\u0430\u0432\u043D\u044B\u0439 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438 \u0432\u0432\u043E\u0434\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0439 \u0441\u0435\u043A\u0446\u0438\u0438.","\u0412\u0435\u0440\u0445\u043D\u0438\u0439 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 \u0431\u043B\u043E\u043A":"\u0412\u0435\u0440\u0445\u043D\u044F\u044F \u043F\u0430\u0440\u0430: \u0434\u043B\u0438\u043D\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442 \u0438 \u043A\u0440\u0443\u043F\u043D\u044B\u0439 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043D\u0430\u0434 \u043C\u0435\u0434\u0438\u0430\u0441\u043B\u0430\u0439\u0434\u0435\u0440\u043E\u043C.","\u041D\u0438\u0436\u043D\u0438\u0439 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 \u0431\u043B\u043E\u043A":"\u041D\u0438\u0436\u043D\u044F\u044F \u0437\u0435\u0440\u043A\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u0430\u0440\u0430: \u043A\u0440\u0443\u043F\u043D\u044B\u0439 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438 \u0434\u043B\u0438\u043D\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442 \u043F\u043E\u0434 \u043C\u0435\u0434\u0438\u0430\u0441\u043B\u0430\u0439\u0434\u0435\u0440\u043E\u043C.","\u0422\u0435\u0437\u0438\u0441\u044B \u043F\u0435\u0440\u0432\u043E\u0433\u043E \u044D\u043A\u0440\u0430\u043D\u0430":"\u0427\u0435\u0442\u044B\u0440\u0435 \u0441\u043C\u044B\u0441\u043B\u043E\u0432\u044B\u0445 \u0442\u0435\u0437\u0438\u0441\u0430 \u0432\u043E\u043A\u0440\u0443\u0433 \u0444\u043E\u0440\u043C\u044B \u0440\u0430\u043D\u043D\u0435\u0433\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u0430.","\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u0430":"\u0415\u0434\u0438\u043D\u044B\u0439 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 \u043E\u043A\u043D\u0430 \u0437\u0430\u044F\u0432\u043A\u0438: \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u0437\u0434\u0435\u0441\u044C \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u0435\u0442\u0441\u044F \u0432 \u043D\u0438\u0436\u043D\u0435\u043C \u0431\u043B\u043E\u043A\u0435 \u0437\u0430\u043F\u0440\u043E\u0441\u0430 DEMO.",\u0424\u043E\u0440\u043C\u0430:"\u041F\u043B\u0435\u0439\u0441\u0445\u043E\u043B\u0434\u0435\u0440\u044B, \u043A\u043D\u043E\u043F\u043A\u0438, success/failure \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044F \u0444\u043E\u0440\u043C\u044B.","\u042E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0431\u043B\u043E\u043A":"\u041F\u043E\u043B\u0438\u0442\u0438\u043A\u0438, \u043F\u0440\u0430\u0432\u0430 \u0438 \u043D\u0438\u0436\u043D\u0438\u0439 \u0442\u0435\u043A\u0441\u0442 \u0444\u043E\u0440\u043C\u044B.","\u0412\u0438\u0434\u0435\u043E-\u043E\u043A\u043D\u043E":"\u041E\u043A\u043D\u043E \u0434\u0435\u043C\u043E-\u0432\u0438\u0434\u0435\u043E \u0438 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044B\u0439 \u043C\u0435\u0434\u0438\u0430-\u0444\u0430\u0439\u043B.",\u041F\u0443\u043D\u043A\u0442\u044B:"\u0422\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0435 \u043F\u0443\u043D\u043A\u0442\u044B \u0432\u043D\u0443\u0442\u0440\u0438 \u0441\u0435\u043A\u0446\u0438\u0438.",\u0421\u043B\u0430\u0439\u0434\u0435\u0440:"\u0412\u0438\u0434\u0435\u043E-\u043F\u0440\u0435\u0432\u044C\u044E \u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u0438 \u043A\u0430\u0440\u0442\u043E\u0447\u0435\u043A \u0432\u043D\u0443\u0442\u0440\u0438 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0441\u043B\u0430\u0439\u0434\u0435\u0440\u0430.",\u0421\u043A\u0440\u043E\u043B\u043B:"\u0421\u043A\u043E\u0440\u043E\u0441\u0442\u044C \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E\u0439 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0432\u043D\u0443\u0442\u0440\u0438 \u0431\u043B\u043E\u043A\u0430: \u043C\u0435\u043D\u044C\u0448\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 \u0441\u043F\u043E\u043A\u043E\u0439\u043D\u0435\u0435 \u0448\u0430\u0433, \u0431\u043E\u043B\u044C\u0448\u0435 \u2014 \u0431\u044B\u0441\u0442\u0440\u0435\u0435.","\u041E\u0434\u0438\u043D \u043A\u043B\u0438\u043A":"\u041F\u043E\u0434\u0431\u043B\u043E\u043A \u043F\u0440\u043E \u0431\u044B\u0441\u0442\u0440\u043E\u0435 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0443 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u043E\u0432.",MCP:"\u041F\u043E\u0434\u0431\u043B\u043E\u043A \u043F\u0440\u043E MCP-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 NODE.DC.","\u041E\u043A\u043D\u043E FAQ":"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u043A\u043D\u0430 FAQ \u0438 \u0441\u043B\u0443\u0436\u0435\u0431\u043D\u044B\u0435 \u043F\u043E\u0434\u043F\u0438\u0441\u0438 mail-\u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.",\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C:"\u041F\u0440\u043E\u0444\u0438\u043B\u044C \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044F \u0432 FAQ: \u0430\u0432\u0430\u0442\u0430\u0440, \u0438\u043C\u044F \u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u0438 \u043F\u0438\u0441\u044C\u043C\u0430.",FAQ:"\u0412\u043E\u043F\u0440\u043E\u0441\u044B \u0438 \u043E\u0442\u0432\u0435\u0442\u044B mail-\u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u041A\u0430\u0436\u0434\u044B\u0439 \u043F\u0443\u043D\u043A\u0442 \u043C\u043E\u0436\u043D\u043E \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C, \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0438 \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u0438\u0442\u044C.",CTA:"\u0424\u0438\u043D\u0430\u043B\u044C\u043D\u044B\u0439 \u043F\u0440\u0438\u0437\u044B\u0432 \u043A \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044E: \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A, \u043F\u043E\u044F\u0441\u043D\u0435\u043D\u0438\u0435, \u043A\u043D\u043E\u043F\u043A\u0430 \u0438 \u0441\u0441\u044B\u043B\u043A\u0430.","\u0426\u0435\u043D\u0442\u0440\u0430\u043B\u044C\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442":"\u041E\u0442\u0434\u0435\u043B\u044C\u043D\u044B\u0439 \u0446\u0435\u043D\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0439 \u0431\u043B\u043E\u043A: \u043D\u0430\u0434\u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A, \u043A\u0440\u0443\u043F\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430 \u0438 \u0442\u0440\u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u0438.",\u0422\u0430\u0440\u0438\u0444\u044B:"\u041E\u043A\u043D\u043E \u0442\u0430\u0440\u0438\u0444\u043D\u043E\u0439 \u0442\u0430\u0431\u043B\u0438\u0446\u044B: \u043F\u043B\u0430\u043D\u044B, \u0446\u0435\u043D\u044B, \u043A\u043D\u043E\u043F\u043A\u0438 \u0438 \u043F\u0440\u0438\u043C\u0435\u0447\u0430\u043D\u0438\u044F.","\u0421\u0442\u0440\u043E\u043A\u0438 \u0442\u0430\u0440\u0438\u0444\u043E\u0432":"\u041F\u043E\u0432\u0442\u043E\u0440\u044F\u0435\u043C\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u0442\u0430\u0440\u0438\u0444\u043D\u043E\u0439 \u0442\u0430\u0431\u043B\u0438\u0446\u044B \u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043F\u043E \u043A\u0430\u0436\u0434\u043E\u043C\u0443 \u043F\u043B\u0430\u043D\u0443.","\u041C\u0435\u0434\u0438\u0430-\u0433\u0430\u043B\u0435\u0440\u0435\u044F":"\u041E\u043A\u043D\u0430 \u0441 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F\u043C\u0438, \u043F\u043E\u0434\u043F\u0438\u0441\u0438 \u0444\u0430\u0439\u043B\u043E\u0432 \u0438 \u0441\u0432\u044F\u0437\u0430\u043D\u043D\u044B\u0435 \u0438\u043A\u043E\u043D\u043A\u0438.","\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u0441\u043A\u0440\u0438\u043D\u0448\u043E\u0442\u043E\u0432":"\u0421\u043A\u0440\u0438\u043D\u0448\u043E\u0442\u044B \u0432 \u0432\u0438\u0434\u0435 \u043E\u043A\u043E\u043D \u0438 \u0444\u0430\u0439\u043B\u043E\u0432: \u043A\u0430\u0436\u0434\u044B\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u043C\u043E\u0436\u043D\u043E \u0441\u043A\u0440\u044B\u0442\u044C, \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u0438\u0442\u044C, \u0434\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0438\u0442\u044C.","TXT-\u0444\u0430\u0439\u043B\u044B":"\u0421\u043F\u0438\u0441\u043E\u043A \u0444\u0430\u0439\u043B\u043E\u0432 \u043B\u0438\u0441\u0442\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F: \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u043A\u043D\u0430, \u043F\u043E\u0434\u043F\u0438\u0441\u044C \u0438 \u0442\u0435\u043A\u0441\u0442 \u0432\u043D\u0443\u0442\u0440\u0438 \u0444\u0430\u0439\u043B\u0430.",\u0424\u0443\u0442\u0435\u0440:"\u0411\u0440\u0435\u043D\u0434\u043E\u0432\u044B\u0439 \u0431\u043B\u043E\u043A, \u043A\u043E\u043F\u0438\u0440\u0430\u0439\u0442 \u0438 \u0431\u0430\u0437\u043E\u0432\u044B\u0435 \u0430\u0441\u0441\u0435\u0442\u044B \u0444\u0443\u0442\u0435\u0440\u0430.","\u041D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044F \u0444\u0443\u0442\u0435\u0440\u0430":"\u0421\u0441\u044B\u043B\u043A\u0438 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u0439 \u043A\u043E\u043B\u043E\u043D\u043A\u0438 \u0444\u0443\u0442\u0435\u0440\u0430. \u041A\u0430\u0436\u0434\u044B\u0439 \u043F\u0443\u043D\u043A\u0442 \u043C\u043E\u0436\u043D\u043E \u0441\u043A\u0440\u044B\u0442\u044C, \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u0438\u0442\u044C, \u0434\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0438\u0442\u044C.","\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438":"\u0421\u0441\u044B\u043B\u043A\u0438 \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0439 \u043A\u043E\u043B\u043E\u043D\u043A\u0438 \u0444\u0443\u0442\u0435\u0440\u0430. \u041A\u0430\u0436\u0434\u044B\u0439 \u043F\u0443\u043D\u043A\u0442 \u043C\u043E\u0436\u043D\u043E \u0441\u043A\u0440\u044B\u0442\u044C, \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u0438\u0442\u044C, \u0434\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0438\u0442\u044C.",\u041F\u043E\u043B\u0438\u0442\u0438\u043A\u0438:"\u041D\u0438\u0436\u043D\u044F\u044F \u0441\u0442\u0440\u043E\u043A\u0430 \u043F\u043E\u043B\u0438\u0442\u0438\u043A \u0438 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F.",\u041A\u043E\u043D\u0442\u0435\u043D\u0442:"\u041E\u0441\u0442\u0430\u043B\u044C\u043D\u044B\u0435 typed-\u043F\u043E\u043B\u044F \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0431\u043B\u043E\u043A\u0430."},ab="image/*,video/*,.gif,.webm,.mov,.mp4,.m4v,.avi,.mkv,.glb,.gltf,.svg,.ico,.avif,.webp,.webmanifest,.json,.woff,.woff2",Ap="application/x-nodedc-media-entry",U4=[["all","\u0412\u0441\u0435"],["image","\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F"],["video","\u0412\u0438\u0434\u0435\u043E"],["model","3D"]],nb=[["","\u041F\u0440\u043E\u0435\u043A\u0442"],["assets","Assets"],["assets/uploads","Uploads"],["assets/media","Media"],["assets/site/images","NODE.DC"],["assets/custom","Custom"]],lb='',On=H4(),qL=new WeakMap,UL=0;pp=0;fd=new Map;r2=new Set(["_blank","_self","_parent","_top"]);for(let e of[f.id,f.label,f.anchor,f.enabled])e.addEventListener("input",Lp),e.addEventListener("change",Lp);f.modeContent?.addEventListener("click",()=>Rp("content"));f.modeSeo?.addEventListener("click",()=>Rp("seo"));f.modeKnowledge?.addEventListener("click",()=>Rp("knowledge"));f.addProject?.addEventListener("click",()=>T4().catch(e=>D(e.message)));f.projectSettings?.addEventListener("click",PI);f.json.addEventListener("blur",()=>{if(d.mode!=="knowledge"){if(d.filePickerActive||d.mediaUploadActive){na();return}vI()}});f.addBlock?.addEventListener("click",()=>{if(d.mode==="knowledge"){$p(null);return}I2()});f.templateModalClose.addEventListener("click",mu);f.templateModalCancel.addEventListener("click",mu);f.templateModal.addEventListener("click",e=>{e.target===f.templateModal&&mu()});f.deleteModalCancel.addEventListener("click",()=>Ao(!1));f.deleteModalConfirm.addEventListener("click",()=>Ao(!0));f.deleteModal.addEventListener("click",e=>{e.target===f.deleteModal&&Ao(!1)});f.mediaActionCancel.addEventListener("click",()=>Do(null));f.mediaActionConfirm.addEventListener("click",()=>Do(f.mediaActionInput.value.trim()));f.mediaActionModal.addEventListener("click",e=>{e.target===f.mediaActionModal&&Do(null)});f.knowledgeButtonClose.addEventListener("click",()=>_o(null));f.knowledgeButtonCancel.addEventListener("click",()=>_o(null));f.knowledgeButtonConfirm.addEventListener("click",wp);f.knowledgeButtonLink.addEventListener("blur",()=>{f.knowledgeButtonLink.value=Md(f.knowledgeButtonLink.value)});f.knowledgeButtonModal.addEventListener("click",e=>{e.target===f.knowledgeButtonModal&&_o(null)});f.mediaModalClose.addEventListener("click",hu);f.mediaModalCancel.addEventListener("click",hu);f.mediaModal.addEventListener("click",e=>{e.target===f.mediaModal&&hu()});f.mediaSearch.addEventListener("input",()=>{d.mediaLibrary.query=f.mediaSearch.value,yt()});f.mediaRefresh.addEventListener("click",()=>eI().catch(e=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043C\u0435\u0434\u0438\u0430\u0442\u0435\u043A\u0438: ${e.message}`)));f.mediaUpload.addEventListener("click",()=>{if(d.mediaLibrary.trashMode){aI().catch(e=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043E\u0447\u0438\u0441\u0442\u043A\u0438 \u043A\u043E\u0440\u0437\u0438\u043D\u044B: ${e.message}`));return}iI()});f.mediaSelect.addEventListener("click",Hb);f.mediaDelete.addEventListener("click",()=>Xp().catch(e=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F: ${e.message}`)));f.mediaTrashToggle.addEventListener("click",()=>tI().catch(e=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043A\u043E\u0440\u0437\u0438\u043D\u044B: ${e.message}`)));f.mediaDropZone.addEventListener("dragover",e=>{d.mediaLibrary.context&&(Cd(e)||(e.preventDefault(),f.mediaDropZone.dataset.dragActive="true"))});f.mediaDropZone.addEventListener("dragleave",e=>{f.mediaDropZone.contains(e.relatedTarget)||delete f.mediaDropZone.dataset.dragActive});f.mediaDropZone.addEventListener("drop",e=>{if(!d.mediaLibrary.context||Cd(e))return;e.preventDefault(),delete f.mediaDropZone.dataset.dragActive;let t=e.dataTransfer?.files?.[0];rI(t).catch(a=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438: ${a.message}`))});document.addEventListener("click",e=>{f.mediaContextMenu.classList.contains("hidden")||f.mediaContextMenu.contains(e.target)||Oo()});document.addEventListener("contextmenu",e=>{f.mediaModal.classList.contains("hidden")||f.mediaModal.contains(e.target)||Oo()});document.addEventListener("selectionchange",()=>{d.mode==="knowledge"&&xl()});document.addEventListener("keydown",e=>{if(!f.deleteModal.classList.contains("hidden")){e.key==="Enter"&&(e.preventDefault(),Ao(!0)),e.key==="Escape"&&(e.preventDefault(),Ao(!1));return}if(!f.mediaActionModal.classList.contains("hidden")){e.key==="Enter"&&(e.preventDefault(),Do(f.mediaActionInput.value.trim())),e.key==="Escape"&&(e.preventDefault(),Do(null));return}if(!f.knowledgeButtonModal.classList.contains("hidden")){e.key==="Enter"&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),wp()),e.key==="Enter"&&e.target!==f.knowledgeButtonTarget&&(e.preventDefault(),wp()),e.key==="Escape"&&(e.preventDefault(),_o(null));return}if(!f.mediaModal.classList.contains("hidden")){if(!f.mediaContextMenu.classList.contains("hidden")&&e.key==="Escape"){e.preventDefault(),Oo();return}if(W2(e.target))return;if(e.key==="ArrowDown"){e.preventDefault(),VL(1).catch(t=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438: ${t.message}`));return}if(e.key==="ArrowUp"){e.preventDefault(),VL(-1).catch(t=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438: ${t.message}`));return}if(e.key==="ArrowRight"){e.preventDefault(),Z2().catch(t=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438: ${t.message}`));return}if(e.key==="ArrowLeft"){e.preventDefault(),Q2().catch(t=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438: ${t.message}`));return}if(e.key==="Delete"||e.key==="Backspace"){(d.mediaLibrary.trashMode?fu()?.trashPath:vd(d.mediaLibrary.selectedEntry))&&(e.preventDefault(),Xp().catch(t=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F: ${t.message}`)));return}e.key==="Escape"&&(e.preventDefault(),hu());return}e.key==="Escape"&&!f.templateModal.classList.contains("hidden")&&mu()});f.reload.addEventListener("click",()=>{if($t()){su().then(bl).then(()=>D("\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u043F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u044B.")).catch(t=>D(t.message));return}(d.mode==="knowledge"?Wp:oS)().catch(t=>D(t.message))});f.save.addEventListener("click",()=>{if($t()){G4().catch(t=>D(t.message));return}(d.mode==="knowledge"?BI:_I)().catch(t=>D(t.message))});f.render.addEventListener("click",()=>{if($t()){V4().catch(t=>D(t.message));return}(d.mode==="knowledge"?nS:rS)().catch(t=>D(t.message))});f.publish?.addEventListener("click",()=>{$t()&&X4().catch(e=>D(e.message))});f.moveUp.addEventListener("click",()=>iS(-1));f.moveDown.addEventListener("click",()=>iS(1));f.duplicate.addEventListener("click",zI);f.copy.addEventListener("click",qI);f.pasteAfter.addEventListener("click",UI);f.deleteBlock.addEventListener("click",()=>HI().catch(e=>D(`\u041E\u0448\u0438\u0431\u043A\u0430 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F: ${e.message}`)));window.addEventListener("error",e=>{na(),D(`\u041E\u0448\u0438\u0431\u043A\u0430 JS: ${e.message}`)});window.addEventListener("unhandledrejection",e=>{na();let t=e.reason instanceof Error?e.reason.message:String(e.reason);D(`\u041E\u0448\u0438\u0431\u043A\u0430 JS: ${t}`)});oS().catch(e=>D(e.message))});var BL=E(q(),1),OL=E(hm(),1),Nn=E(Wt(),1);var yo=E(z(),1);function Ky({children:e,ref:t}){return(0,yo.jsx)("div",{ref:t,className:"nodedc-header__profile",children:e})}function Yy({children:e,type:t="button",...a}){return(0,yo.jsx)("button",{type:t,className:"nodedc-header__profile-button",...a,children:e})}function vo({label:e,imageUrl:t}){return(0,yo.jsx)("span",{className:"nodedc-header__avatar",title:e,children:t?(0,yo.jsx)("img",{src:t,alt:""}):e.slice(0,2).toUpperCase()})}var $y=E(z(),1);function B(...e){return e.filter(Boolean).join(" ")}function $s({size:e="default",label:t,className:a,...n}){let l=t?.trim()||void 0;return(0,$y.jsx)("span",{...n,className:B("nodedc-activity-indicator",a),"data-size":e==="default"?void 0:e,role:l?"status":void 0,"aria-label":l,"aria-hidden":l?void 0:"true"})}var Qy=E(z(),1),Hr=E(q(),1);var Zy=E(q(),1),Zs=(0,Zy.createContext)(null);var Wy=E(z(),1);function Jy({className:e,...t}){return(0,Wy.jsx)("p",{...t,className:B("nodedc-description",e)})}var ev=E(z(),1);var Sv=E(z(),1);var xv=E(z(),1),Co=E(q(),1),Ow=E(Wt(),1);var Rt=E(q()),mv=E(Wt());var Pr=E(q());var tv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qs(e){let t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function gm(e){return"nodeType"in e}function Nt(e){var t,a;return e?Qs(e)?e:gm(e)&&(t=(a=e.ownerDocument)==null?void 0:a.defaultView)!=null?t:window:window}function xm(e){let{Document:t}=Nt(e);return e instanceof t}function ym(e){return Qs(e)?!1:e instanceof Nt(e).HTMLElement}function vm(e){return e instanceof Nt(e).SVGElement}function Lo(e){return e?Qs(e)?e.document:gm(e)?xm(e)?e:ym(e)||vm(e)?e.ownerDocument:document:document:document}function av(e){return function(t){for(var a=arguments.length,n=new Array(a>1?a-1:0),l=1;l{let i=Object.entries(r);for(let[u,s]of i){let m=o[u];m!=null&&(o[u]=m+e*s)}return o},{...t})}}var nv=av(1),Fr=av(-1);function fw(e){return"clientX"in e&&"clientY"in e}function Lm(e){if(!e)return!1;let{KeyboardEvent:t}=Nt(e.target);return t&&e instanceof t}function mw(e){if(!e)return!1;let{TouchEvent:t}=Nt(e.target);return t&&e instanceof t}function bm(e){if(mw(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:a}=e.touches[0];return{x:t,y:a}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:a}=e.changedTouches[0];return{x:t,y:a}}}return fw(e)?{x:e.clientX,y:e.clientY}:null}var Sm=E(q());var lv;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(lv||(lv={}));var jr=Object.freeze({x:0,y:0});function gw(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function xw(e,t,a){let n=gw(t);if(!n)return e;let{scaleX:l,scaleY:o,x:r,y:i}=n,u=e.left-r-(1-l)*parseFloat(a),s=e.top-i-(1-o)*parseFloat(a.slice(a.indexOf(" ")+1)),m=l?e.width/l:e.width,c=o?e.height/o:e.height;return{width:m,height:c,top:s,right:u+m,bottom:s+c,left:u}}var yw={ignoreTransform:!1};function Ws(e,t){t===void 0&&(t=yw);let a=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:s,transformOrigin:m}=Nt(e).getComputedStyle(e);s&&(a=xw(a,s,m))}let{top:n,left:l,width:o,height:r,bottom:i,right:u}=a;return{top:n,left:l,width:o,height:r,bottom:i,right:u}}function ov(e){return Ws(e,{ignoreTransform:!0})}function vw(e,t){return t===void 0&&(t=Nt(e).getComputedStyle(e)),t.position==="fixed"}function Lw(e,t){t===void 0&&(t=Nt(e).getComputedStyle(e));let a=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(l=>{let o=t[l];return typeof o=="string"?a.test(o):!1})}function pv(e,t){let a=[];function n(l){if(t!=null&&a.length>=t||!l)return a;if(xm(l)&&l.scrollingElement!=null&&!a.includes(l.scrollingElement))return a.push(l.scrollingElement),a;if(!ym(l)||vm(l)||a.includes(l))return a;let o=Nt(e).getComputedStyle(l);return l!==e&&Lw(l,o)&&a.push(l),vw(l,o)?a:n(l.parentNode)}return e?n(e):a}function bw(e){let[t]=pv(e,1);return t??null}var bo;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(bo||(bo={}));function Sw(e){return!tv||!e?!1:e===document.scrollingElement}function Cw(e){let t={x:0,y:0},a=Sw(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-a.width,y:e.scrollHeight-a.height},l=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,r=e.scrollTop>=n.y,i=e.scrollLeft>=n.x;return{isTop:l,isLeft:o,isBottom:r,isRight:i,maxScroll:n,minScroll:t}}function ww(e){if(e===document.scrollingElement){let{innerWidth:o,innerHeight:r}=window;return{top:0,left:0,right:o,bottom:r,width:o,height:r}}let{top:t,left:a,right:n,bottom:l}=e.getBoundingClientRect();return{top:t,left:a,right:n,bottom:l,width:e.clientWidth,height:e.clientHeight}}function Iw(e,t){if(t===void 0&&(t=Ws),!e)return;let{top:a,left:n,bottom:l,right:o}=t(e);bw(e)&&(l<=0||o<=0||a>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}var il=class{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(a=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...a)})},this.target=t}add(t,a,n){var l;(l=this.target)==null||l.addEventListener(t,a,n),this.listeners.push([t,a,n])}};function kw(e){let{EventTarget:t}=Nt(e);return e instanceof t?e:Lo(e)}function Cm(e,t){let a=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(a**2+n**2)>t:"x"in t&&"y"in t?a>t.x&&n>t.y:"x"in t?a>t.x:"y"in t?n>t.y:!1}var Yt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Yt||(Yt={}));function rv(e){e.preventDefault()}function Ew(e){e.stopPropagation()}var Y;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Y||(Y={}));var hv={start:[Y.Space,Y.Enter],cancel:[Y.Esc],end:[Y.Space,Y.Enter,Y.Tab]},Mw=(e,t)=>{let{currentCoordinates:a}=t;switch(e.code){case Y.Right:return{...a,x:a.x+25};case Y.Left:return{...a,x:a.x-25};case Y.Down:return{...a,y:a.y+25};case Y.Up:return{...a,y:a.y-25}}},Im=class{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;let{event:{target:a}}=t;this.props=t,this.listeners=new il(Lo(a)),this.windowListeners=new il(Nt(a)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Yt.Resize,this.handleCancel),this.windowListeners.add(Yt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Yt.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:a}=this.props,n=t.node.current;n&&Iw(n),a(jr)}handleKeyDown(t){if(Lm(t)){let{active:a,context:n,options:l}=this.props,{keyboardCodes:o=hv,coordinateGetter:r=Mw,scrollBehavior:i="smooth"}=l,{code:u}=t;if(o.end.includes(u)){this.handleEnd(t);return}if(o.cancel.includes(u)){this.handleCancel(t);return}let{collisionRect:s}=n.current,m=s?{x:s.left,y:s.top}:jr;this.referenceCoordinates||(this.referenceCoordinates=m);let c=r(t,{active:a,context:n.current,currentCoordinates:m});if(c){let p=Fr(c,m),h={x:0,y:0},{scrollableAncestors:v}=n.current;for(let S of v){let L=t.code,{isTop:x,isRight:g,isLeft:y,isBottom:b,maxScroll:M,minScroll:A}=Cw(S),I=ww(S),N={x:Math.min(L===Y.Right?I.right-I.width/2:I.right,Math.max(L===Y.Right?I.left:I.left+I.width/2,c.x)),y:Math.min(L===Y.Down?I.bottom-I.height/2:I.bottom,Math.max(L===Y.Down?I.top:I.top+I.height/2,c.y))},T=L===Y.Right&&!g||L===Y.Left&&!y,w=L===Y.Down&&!b||L===Y.Up&&!x;if(T&&N.x!==c.x){let O=S.scrollLeft+p.x,te=L===Y.Right&&O<=M.x||L===Y.Left&&O>=A.x;if(te&&!p.y){S.scrollTo({left:O,behavior:i});return}te?h.x=S.scrollLeft-O:h.x=L===Y.Right?S.scrollLeft-M.x:S.scrollLeft-A.x,h.x&&S.scrollBy({left:-h.x,behavior:i});break}else if(w&&N.y!==c.y){let O=S.scrollTop+p.y,te=L===Y.Down&&O<=M.y||L===Y.Up&&O>=A.y;if(te&&!p.x){S.scrollTo({top:O,behavior:i});return}te?h.y=S.scrollTop-O:h.y=L===Y.Down?S.scrollTop-M.y:S.scrollTop-A.y,h.y&&S.scrollBy({top:-h.y,behavior:i});break}}this.handleMove(t,nv(Fr(c,this.referenceCoordinates),h))}}}handleMove(t,a){let{onMove:n}=this.props;t.preventDefault(),n(a)}handleEnd(t){let{onEnd:a}=this.props;t.preventDefault(),this.detach(),a()}handleCancel(t){let{onCancel:a}=this.props;t.preventDefault(),this.detach(),a()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Im.activators=[{eventName:"onKeyDown",handler:(e,t,a)=>{let{keyboardCodes:n=hv,onActivation:l}=t,{active:o}=a,{code:r}=e.nativeEvent;if(n.start.includes(r)){let i=o.activatorNode.current;return i&&e.target!==i?!1:(e.preventDefault(),l?.({event:e.nativeEvent}),!0)}return!1}}];function iv(e){return!!(e&&"distance"in e)}function uv(e){return!!(e&&"delay"in e)}var Gr=class{constructor(t,a,n){var l;n===void 0&&(n=kw(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=a;let{event:o}=t,{target:r}=o;this.props=t,this.events=a,this.document=Lo(r),this.documentListeners=new il(this.document),this.listeners=new il(n),this.windowListeners=new il(Nt(r)),this.initialCoordinates=(l=bm(o))!=null?l:jr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:t,props:{options:{activationConstraint:a,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Yt.Resize,this.handleCancel),this.windowListeners.add(Yt.DragStart,rv),this.windowListeners.add(Yt.VisibilityChange,this.handleCancel),this.windowListeners.add(Yt.ContextMenu,rv),this.documentListeners.add(Yt.Keydown,this.handleKeydown),a){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(uv(a)){this.timeoutId=setTimeout(this.handleStart,a.delay),this.handlePending(a);return}if(iv(a)){this.handlePending(a);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,a){let{active:n,onPending:l}=this.props;l(n,t,this.initialCoordinates,a)}handleStart(){let{initialCoordinates:t}=this,{onStart:a}=this.props;t&&(this.activated=!0,this.documentListeners.add(Yt.Click,Ew,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Yt.SelectionChange,this.removeTextSelection),a(t))}handleMove(t){var a;let{activated:n,initialCoordinates:l,props:o}=this,{onMove:r,options:{activationConstraint:i}}=o;if(!l)return;let u=(a=bm(t))!=null?a:jr,s=Fr(l,u);if(!n&&i){if(iv(i)){if(i.tolerance!=null&&Cm(s,i.tolerance))return this.handleCancel();if(Cm(s,i.distance))return this.handleStart()}if(uv(i)&&Cm(s,i.tolerance))return this.handleCancel();this.handlePending(i,s);return}t.cancelable&&t.preventDefault(),r(u)}handleEnd(){let{onAbort:t,onEnd:a}=this.props;this.detach(),this.activated||t(this.props.active),a()}handleCancel(){let{onAbort:t,onCancel:a}=this.props;this.detach(),this.activated||t(this.props.active),a()}handleKeydown(t){t.code===Y.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}},Aw={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},Vr=class extends Gr{constructor(t){let{event:a}=t,n=Lo(a.target);super(t,Aw,n)}};Vr.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:n}=t;return!a.isPrimary||a.button!==0?!1:(n?.({event:a}),!0)}}];var Dw={move:{name:"mousemove"},end:{name:"mouseup"}},km;(function(e){e[e.RightClick=2]="RightClick"})(km||(km={}));var Em=class extends Gr{constructor(t){super(t,Dw,Lo(t.event.target))}};Em.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:n}=t;return a.button===km.RightClick?!1:(n?.({event:a}),!0)}}];var wm={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},Mm=class extends Gr{constructor(t){super(t,wm)}static setup(){return window.addEventListener(wm.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(wm.move.name,t)};function t(){}}};Mm.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:n}=t,{touches:l}=a;return l.length>1?!1:(n?.({event:a}),!0)}}];var sv;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(sv||(sv={}));var dv;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(dv||(dv={}));var kk={x:{[bo.Backward]:!1,[bo.Forward]:!1},y:{[bo.Backward]:!1,[bo.Forward]:!1}};var Am;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Am||(Am={}));var Dm;(function(e){e.Optimized="optimized"})(Dm||(Dm={}));var Ek={draggable:{measure:ov},droppable:{measure:ov,strategy:Am.WhileDragging,frequency:Dm.Optimized},dragOverlay:{measure:Ws}};var Mk=(0,Rt.createContext)({...jr,scaleX:1,scaleY:1}),cv;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(cv||(cv={}));var So=E(q());var _k=[Y.Down,Y.Right,Y.Up,Y.Left];var Yk=(0,Co.createContext)(!1);var bv=E(z(),1);var ed=E(q());/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var yv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Js=(...e)=>e.filter((t,a,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===a).join(" ").trim();var Xr=E(q());/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var vv={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"};/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Lv=(0,Xr.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:l="",children:o,iconNode:r,...i},u)=>(0,Xr.createElement)("svg",{ref:u,...vv,width:t,height:t,stroke:e,strokeWidth:n?Number(a)*24/Number(t):a,className:Js("lucide",l),...i},[...r.map(([s,m])=>(0,Xr.createElement)(s,m)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var C=(e,t)=>{let a=(0,ed.forwardRef)(({className:n,...l},o)=>(0,ed.createElement)(Lv,{ref:o,iconNode:t,className:Js(`lucide-${yv(e)}`,n),...l}));return a.displayName=`${e}`,a};/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Kr=C("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Yr=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var $r=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Zr=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Qr=C("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Wr=C("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Jr=C("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ei=C("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ti=C("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ai=C("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ln=C("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var bn=C("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ni=C("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var li=C("ClipboardList",[["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:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Sn=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var oi=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ri=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ii=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Cn=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ui=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var si=C("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var di=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ci=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var fi=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var mi=C("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var pi=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var hi=C("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var gi=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var wn=C("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var xi=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var yi=C("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var vi=C("LocateFixed",[["line",{x1:"2",x2:"5",y1:"12",y2:"12",key:"bvdh0s"}],["line",{x1:"19",x2:"22",y1:"12",y2:"12",key:"1tbv5k"}],["line",{x1:"12",x2:"12",y1:"2",y2:"5",key:"11lu5j"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}],["circle",{cx:"12",cy:"12",r:"7",key:"fim9np"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Li=C("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var bi=C("MailPlus",[["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:"M19 16v6",key:"tddt3s"}],["path",{d:"M16 19h6",key:"xwg31i"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Si=C("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ci=C("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var wi=C("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ii=C("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ki=C("MousePointer2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ei=C("Move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Mi=C("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ai=C("PanelTop",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Di=C("PenTool",[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ti=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ni=C("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ri=C("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Bi=C("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Oi=C("RectangleHorizontal",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var _i=C("Redo2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var zi=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var qi=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ui=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Hi=C("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Pi=C("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Fi=C("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ji=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Gi=C("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Vi=C("Spline",[["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}],["path",{d:"M5 17A12 12 0 0 1 17 5",key:"1okkup"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Xi=C("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ki=C("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Yi=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var In=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var $i=C("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var kn=C("UsersRound",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Zi=C("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"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Qi=C("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var _w={"add-point":Ln,perspective:Yr,orthographic:Hi,select:ki,move:Ei,pen:Di,rectangle:Oi,curve:Vi,undo:$i,redo:_i,activity:Kr,alert:In,apps:$r,building:Zr,camera:Qr,check:Wr,"chevron-down":Jr,"chevron-up":ai,"chevron-left":ei,"chevron-right":ti,circle:ni,clipboard:li,close:Qi,copy:oi,database:ri,download:ii,edit:Ti,eye:di,"eye-off":si,expand:Ci,external:ui,file:ci,folder:fi,globe:Cn,grid:xi,image:mi,inbox:pi,info:hi,key:gi,layers:wn,list:yi,target:vi,lock:Li,mail:bi,minimize:wi,network:Mi,panel:Ai,plan:Si,play:Ni,power:Bi,plus:Ri,minus:Ii,profile:bn,refresh:zi,"rotate-clockwise":qi,save:Ui,search:Pi,settings:Fi,shield:ji,sliders:Gi,stop:Xi,terminal:Ki,trash:Yi,upload:Sn,users:kn,video:Zi};function ie({name:e,label:t,size:a=16,strokeWidth:n=1.6,fill:l,...o}){let r=_w[e],i=e==="play"||e==="stop";return(0,bv.jsx)(r,{size:a,strokeWidth:i?0:n,fill:l??(i?"currentColor":"none"),"aria-hidden":t?void 0:"true","aria-label":t,role:t?"img":void 0,focusable:"false",...o})}var Cv=E(z(),1);var Tm=E(z(),1),ul=E(q(),1),qw=E(Wt(),1),KA=(0,ul.createContext)(null);var wv=E(z(),1);var Iv=E(q(),1);var ma=E(z(),1),qm=E(q(),1);function Ev(e){return Math.max(0,Math.min(255,Math.round(e)))}function Uw(e){let t=Ev(e)/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function Hw(e){let[t,a,n]=e.map(Uw);return t*.2126+a*.7152+n*.0722}function Mv(e){return Hw(e)>.46?[11,17,23]:[247,248,244]}function kv(e){return e.map(Ev).join(" ")}function Wi(e){return{"--nodedc-accent-rgb":kv(e),"--nodedc-on-accent-rgb":kv(Mv(e))}}function Nm({anchor:e,surfaceWidth:t,surfaceHeight:a,placement:n="bottom-start",offset:l=8,flip:o=!0,viewportWidth:r=typeof window>"u"?1920:window.innerWidth,viewportHeight:i=typeof window>"u"?1080:window.innerHeight,viewportPadding:u=8}){let s=Math.max(0,i-u*2);if(n.startsWith("left")||n.startsWith("right")){let A=Math.max(0,e.left-l-u),I=Math.max(0,r-e.right-l-u),N=n.startsWith("left"),w=o&&(N?t>A&&I>A:t>I&&A>I)?!N:N,O=w?A:I,te=Math.min(t,O),se=Math.min(a,s);return{left:w?e.left-l-te:e.right+l,top:Math.max(u,Math.min(e.top,i-u-se)),maxHeight:s,maxWidth:O,resolvedPlacement:w?"left-start":"right-start"}}let m=Math.min(s,Math.max(0,i-e.bottom-l-u)),c=Math.min(s,Math.max(0,e.top-l-u)),p=n.startsWith("top"),v=o&&(p?a>c&&m>c:a>m&&c>m)?`${p?"bottom":"top"}-${n.endsWith("end")?"end":"start"}`:n,S=v.endsWith("end")?e.right-t:e.left,L=Math.min(Math.max(u,S),Math.max(u,r-t-u)),x=v.startsWith("top")?c:m,g=Math.min(s,Math.max(Math.min(96,s),x)),y=Math.min(a,g),b=v.startsWith("top")?e.top-l-y:e.bottom+l;return{top:Math.min(Math.max(u,b),Math.max(u,i-y-u)),left:L,maxHeight:g,resolvedPlacement:v}}var Rm=Object.freeze({theme:"dark",appearance:"mission",edges:"flat"}),Bm=Object.freeze({theme:"light",appearance:"mission",edges:"flat"});function Av([e,t,a]){return`${e} ${t} ${a}`}function td(e){return Math.max(0,Math.min(1,e))}function Om(e,{theme:t="dark",accent:a,material:n,appearance:l="mission",edges:o="flat"}={}){if(e.dataset.nodedcTheme=t,e.dataset.nodedcAppearance=l,e.dataset.nodedcEdges=o,e.dataset.nodedcUi="true",a){let r=Wi(a);Object.entries(r).forEach(([i,u])=>{e.style.setProperty(i,u)})}if(n){if(n.panel&&e.style.setProperty("--nodedc-panel-material-rgb",Av(n.panel)),typeof n.panelOpacity=="number"&&Number.isFinite(n.panelOpacity)){let r=td(n.panelOpacity);e.style.setProperty("--nodedc-panel-material-opacity",String(r)),e.style.setProperty("--nodedc-panel-material-strong-opacity",String(td(r+.12))),e.style.setProperty("--nodedc-panel-material-soft-opacity",String(td(Math.max(.12,r-.2))))}n.field&&e.style.setProperty("--nodedc-field-material-rgb",Av(n.field)),typeof n.fieldOpacity=="number"&&Number.isFinite(n.fieldOpacity)&&e.style.setProperty("--nodedc-field-material-opacity",String(td(n.fieldOpacity)))}}function _m(e){e.style.removeProperty("--nodedc-accent-rgb"),e.style.removeProperty("--nodedc-on-accent-rgb")}var Dv=Object.freeze({background:"#111115",border:"#111117",outline:"#1c1c1c",minSize:25,maxSize:87,lensCount:5,gap:10,padding:6,hideDelay:5e3}),sD=Object.freeze({mass:.1,stiffness:170,damping:12,maxStep:1/240});var pa=(0,qm.forwardRef)(function({variant:t="secondary",tone:a="theme",size:n="default",width:l="auto",shape:o="default",accent:r,icon:i,className:u,children:s,style:m,type:c="button",loading:p=!1,disabled:h,...v},S){let L=r?Wi(r):void 0;return(0,ma.jsxs)("button",{ref:S,type:c,className:B("nodedc-button",u),"data-variant":t,"data-tone":a==="theme"?void 0:a,"data-size":n==="default"?void 0:n,"data-width":l==="auto"?void 0:l,"data-shape":o==="default"?void 0:o,style:L?{...L,...m}:m,...v,disabled:h||p,"aria-busy":p||v["aria-busy"],"data-loading":p||void 0,children:[(0,ma.jsxs)("span",{className:"nodedc-button__content",children:[i?(0,ma.jsx)("span",{className:"nodedc-button__icon","aria-hidden":"true",children:i}):null,s]}),p?(0,ma.jsx)("span",{className:"nodedc-action-loading","aria-hidden":"true",children:(0,ma.jsx)($s,{size:"compact"})}):null]})}),pt=(0,qm.forwardRef)(function({label:t,shape:a="circle",className:n,children:l,type:o="button",loading:r=!1,disabled:i,...u},s){return(0,ma.jsxs)("button",{ref:s,type:o,className:B("nodedc-icon-button",n),"data-shape":a==="circle"?void 0:a,"aria-label":t,title:t,...u,disabled:i||r,"aria-busy":r||u["aria-busy"],"data-loading":r||void 0,children:[l,r?(0,ma.jsx)("span",{className:"nodedc-action-loading","aria-hidden":"true",children:(0,ma.jsx)($s,{size:"compact"})}):null]})});var Hm=E(z(),1),Gw=E(q(),1);var Um=E(z(),1);function Ji({label:e,value:t,valueText:a,className:n,style:l,...o}){let r=typeof t=="number"&&Number.isFinite(t)?Math.max(0,Math.min(1,t)):void 0;return(0,Um.jsx)("div",{...o,className:B("nodedc-progress-bar",n),role:"progressbar","aria-label":e,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r===void 0?void 0:Math.round(r*100),"aria-valuetext":a,"data-indeterminate":r===void 0||void 0,style:{...l,"--nodedc-progress-fraction":r??0},children:(0,Um.jsx)("span",{className:"nodedc-progress-bar__fill"})})}var Bv=E(z(),1);var jm=E(z(),1),Gm=E(q(),1);var ze=E(z(),1),le=E(q(),1),qv=E(Wt(),1);var Ov=E(q(),1),wo=(0,Ov.createContext)(!1);var _v=E(q(),1),Pm=(0,_v.createContext)(null);var Fm=["n","s","e","w","ne","nw","se","sw"],En=(e,t,a)=>Math.max(t,Math.min(a,e));function Mn(e,t){let a=En(e.width,Math.min(320,t.width-16),Math.max(1,t.width-16)),n=En(e.height,Math.min(200,t.height-16),Math.max(1,t.height-16));return{width:a,height:n,left:En(e.left,8,Math.max(8,t.width-a-8)),top:En(e.top,8,Math.max(8,t.height-n-8))}}function ad(e,t,a,n,l){let o=Mn(e,l),r=o.left+o.width,i=o.top+o.height,u=Math.min(320,l.width-16),s=Math.min(200,l.height-16),m=t.includes("w")?En(o.left+a,8,r-u):o.left,c=t.includes("n")?En(o.top+n,8,i-s):o.top,p=t.includes("e")?En(r+a,m+u,l.width-8):r,h=t.includes("s")?En(i+n,c+s,l.height-8):i;return{left:m,top:c,width:p-m,height:h-c}}var zv=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function nd({open:e,title:t,subtitle:a,children:n,footer:l,headerActions:o,size:r="md",placement:i="center",closeLabel:u="\u0417\u0430\u043A\u0440\u044B\u0442\u044C",closeOnBackdrop:s,closeOnEscape:m=!0,lockBodyScroll:c,trapFocus:p,draggable:h=!1,resizable:v=!1,initialRect:S,rect:L,onRectCommit:x,allowFloating:g=!0,onClose:y,className:b,style:M,...A}){let[I,N]=(0,le.useState)(0),T=(0,le.useCallback)(()=>(N(_=>_+1),()=>N(_=>Math.max(0,_-1))),[]),w=I>0,O=(0,le.useId)(),te=(0,le.useId)(),se=(0,le.useRef)(null),et=(0,le.useRef)(y),de=(0,le.useRef)(null),[H,_t]=(0,le.useState)(null),[rt,Re]=(0,le.useState)(!1),[oe,Qt]=(0,le.useState)(null),vt=(0,le.useRef)(null),Fa=(0,le.useRef)(null),ja=(0,le.useRef)(x);ja.current=x;let qn=_=>{vt.current=_,Qt(_)},Cl=(0,le.useRef)(!1),Ga=(0,le.useRef)(null),Lt=rt&&g&&i==="center",bt=Lt||v&&i==="end",gu=h||bt,Jp=!w&&!Lt&&(c??i==="center"),eh=!w&&!Lt&&(p??i==="center"),qo=(0,le.useRef)({shouldTrapFocus:eh,isFloating:Lt,suspended:w});if(qo.current={shouldTrapFocus:eh,isFloating:Lt,suspended:w},et.current=y,(0,le.useEffect)(()=>{if(!e||typeof document>"u")return;let _=document.activeElement instanceof HTMLElement?document.activeElement:null,Se=window.requestAnimationFrame(()=>{(Array.from(se.current?.querySelectorAll(zv)??[]).find(tt=>tt.getClientRects().length>0)??se.current)?.focus()}),Be=Ce=>{if(Ce.defaultPrevented||qo.current.suspended)return;let tt=document.activeElement?.closest('[role="dialog"]');if(tt&&tt!==se.current)return;if(!tt){let wl=Array.from(document.querySelectorAll('[role="dialog"][aria-modal="true"]')).filter(cS=>cS.getClientRects().length>0).at(-1);if(wl&&wl!==se.current)return}if(Ce.key==="Escape"&&m&&(!qo.current.isFloating||se.current?.contains(document.activeElement))){Ce.preventDefault(),et.current();return}if(Ce.key!=="Tab"||!qo.current.shouldTrapFocus||!se.current)return;let Un=Array.from(se.current.querySelectorAll(zv)).filter(wl=>wl.getClientRects().length>0);if(Un.length===0){Ce.preventDefault(),se.current.focus();return}let Hn=Un[0],xu=Un[Un.length-1];Ce.shiftKey&&document.activeElement===Hn?(Ce.preventDefault(),xu.focus()):!Ce.shiftKey&&document.activeElement===xu&&(Ce.preventDefault(),Hn.focus())};return document.addEventListener("keydown",Be),()=>{window.cancelAnimationFrame(Se),document.removeEventListener("keydown",Be),(!qo.current.isFloating||document.activeElement===document.body||se.current?.contains(document.activeElement))&&_?.focus()}},[m,e]),(0,le.useEffect)(()=>{if(!e||!Jp)return;let _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=_}},[e,Jp]),(0,le.useLayoutEffect)(()=>{if(e&&bt&&!de.current&&!Ga.current){if(i==="center"&&!x&&!L&&vt.current)return;let _=se.current?.getBoundingClientRect();_&&(Fa.current??=S??{left:_.left,top:_.top,width:_.width,height:_.height},qn(Mn(L??Fa.current,{width:window.innerWidth,height:window.innerHeight})))}},[e,bt,L?.left,L?.top,L?.width,L?.height]),(0,le.useEffect)(()=>{e||(_t(null),Re(!1),qn(null),Fa.current=null,de.current=null,Ga.current=null)},[e]),(0,le.useEffect)(()=>{if(!gu||!e)return;let _=Be=>{let Ce=Ga.current;if(Ce&&Be.pointerId===Ce.pointerId){Cl.current=!0,qn(ad(Ce.rect,Ce.edge,Be.clientX-Ce.x,Be.clientY-Ce.y,{width:window.innerWidth,height:window.innerHeight}));return}let tt=de.current,Un=se.current;if(!tt||!Un||Be.pointerId!==tt.pointerId)return;let Hn=Un.getBoundingClientRect();if(bt){Cl.current=!0,qn(Mn({left:Be.clientX-tt.offsetX,top:Be.clientY-tt.offsetY,width:Hn.width,height:Hn.height},{width:window.innerWidth,height:window.innerHeight}));return}let xu=Math.max(8,Math.min(window.innerWidth-Hn.width-8,Be.clientX-tt.offsetX)),wl=Math.max(76,Math.min(window.innerHeight-Hn.height-8,Be.clientY-tt.offsetY));_t({left:xu,top:wl})},Se=Be=>{let Ce=de.current?.pointerId===Be.pointerId||Ga.current?.pointerId===Be.pointerId;de.current?.pointerId===Be.pointerId&&(de.current=null),Ga.current?.pointerId===Be.pointerId&&(Ga.current=null),Ce&&Cl.current&&vt.current&&(Cl.current=!1,ja.current?.({...vt.current}))};return window.addEventListener("pointermove",_),window.addEventListener("pointerup",Se),window.addEventListener("pointercancel",Se),()=>{window.removeEventListener("pointermove",_),window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se)}},[gu,bt,e]),(0,le.useEffect)(()=>{if(!bt||!e)return;let _=()=>{vt.current&&qn(Mn(L??vt.current,{width:window.innerWidth,height:window.innerHeight}))};return window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)},[bt,e,L]),!e||typeof document>"u")return null;let sS=!Lt&&(s??i==="center"),dS=_=>{sS&&_.target===_.currentTarget&&y()};return(0,qv.createPortal)((0,ze.jsx)(Zs.Provider,{value:null,children:(0,ze.jsx)(wo.Provider,{value:!1,children:(0,ze.jsx)(Pm.Provider,{value:T,children:(0,ze.jsx)("div",{className:"nodedc-overlay nodedc-ui-root",style:w?{display:"none"}:void 0,"data-placement":i,"data-floating":Lt||void 0,onPointerDown:dS,children:(0,ze.jsxs)("div",{ref:se,className:B("nodedc-window nodedc-glass-material nodedc-material-rim",b),"data-material":"glass-v4","data-size":r==="md"?void 0:r,"data-placement":i,"data-draggable":gu?"true":void 0,"data-resizable":bt||void 0,"data-floating":Lt||void 0,role:"dialog","aria-modal":i==="center"&&!Lt?"true":void 0,"aria-labelledby":O,"aria-describedby":a?te:void 0,tabIndex:-1,style:bt&&oe?{...M,position:"fixed",...oe,right:"auto",bottom:"auto",maxWidth:"none",maxHeight:"none"}:H?{...M,position:"fixed",left:H.left,top:H.top,right:"auto",bottom:"auto"}:M,...A,children:[(0,ze.jsxs)("header",{className:"nodedc-window__head",tabIndex:bt?0:void 0,"aria-label":bt?"\u041F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u0435 \u043E\u043A\u043D\u0430: \u0441\u0442\u0440\u0435\u043B\u043A\u0438; \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u0440\u0430\u0437\u043C\u0435\u0440\u0430: Shift \u0438 \u0441\u0442\u0440\u0435\u043B\u043A\u0438":void 0,onKeyDown:_=>{if(!bt||!oe||_.target!==_.currentTarget||!_.key.startsWith("Arrow"))return;_.preventDefault();let Se=_.key==="ArrowLeft"?-10:_.key==="ArrowRight"?10:0,Be=_.key==="ArrowUp"?-10:_.key==="ArrowDown"?10:0,Ce={width:window.innerWidth,height:window.innerHeight},tt=_.shiftKey?ad(oe,"se",Se,Be,Ce):Mn({...oe,left:oe.left+Se,top:oe.top+Be},Ce);qn(tt),ja.current?.(tt)},onPointerDown:_=>{if(!gu||_.button!==0||_.target.closest("button, input, select, textarea, a"))return;let Se=se.current?.getBoundingClientRect();Se&&(de.current={pointerId:_.pointerId,offsetX:_.clientX-Se.left,offsetY:_.clientY-Se.top},Cl.current=!1,_.currentTarget.setPointerCapture(_.pointerId),_.preventDefault())},children:[(0,ze.jsxs)("div",{className:"nodedc-window__titles",children:[(0,ze.jsx)("h2",{id:O,className:"nodedc-window__title",children:t}),a?(0,ze.jsx)("p",{id:te,className:"nodedc-window__subtitle",children:a}):null]}),(0,ze.jsxs)("div",{className:"nodedc-window__actions",children:[o,g&&i==="center"&&(0,ze.jsx)(pt,{label:Lt?"\u0412\u0435\u0440\u043D\u0443\u0442\u044C \u043C\u043E\u0434\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C":"\u0421\u0432\u043E\u0431\u043E\u0434\u043D\u043E\u0435 \u043E\u043A\u043D\u043E","aria-pressed":Lt,onClick:()=>{if(de.current=null,Ga.current=null,!Lt){let _=se.current?.getBoundingClientRect();_&&qn(Mn(vt.current??{left:_.left,top:_.top,width:_.width,height:_.height},{width:window.innerWidth,height:window.innerHeight}))}Re(!Lt)},children:(0,ze.jsx)(ie,{name:"move"})}),(0,ze.jsx)("button",{type:"button",className:"nodedc-window__close","aria-label":u,onClick:y,children:(0,ze.jsx)(ie,{name:"close",size:16,strokeWidth:1.6})})]})]}),bt&&Fm.map(_=>(0,ze.jsx)("div",{className:"nodedc-window__resize","data-edge":_,"aria-hidden":"true",onPointerDown:Se=>{Se.button!==0||!oe||(Ga.current={pointerId:Se.pointerId,x:Se.clientX,y:Se.clientY,rect:oe,edge:_},Cl.current=!1,Se.currentTarget.setPointerCapture(Se.pointerId),Se.preventDefault(),Se.stopPropagation())}},_)),(0,ze.jsx)("div",{className:"nodedc-window__body",children:n}),l?(0,ze.jsx)("footer",{className:"nodedc-window__footer",children:l}):null]})})})})}),document.fullscreenElement??document.body)}var eu=E(z(),1),fe=E(q(),1),Pv=E(Wt(),1);var Hv=(0,fe.createContext)([]),Vm=new Map;function ha({trigger:e,children:t,placement:a="bottom-start",minWidth:n=180,width:l="anchor",offset:o=8,disabled:r=!1,className:i,surfaceClassName:u,surfaceRole:s="menu",onOpenChange:m,getAnchorRect:c,flip:p=!0,onPointerDownOutside:h}){let v=(0,fe.useId)(),S=(0,fe.useContext)(Hv),L=(0,fe.useMemo)(()=>[...S,v],[S,v]),x=`${v.replaceAll(":","")}-surface`,[g,y]=(0,fe.useState)(!1),[b,M]=(0,fe.useState)(null),[A,I]=(0,fe.useState)(null),N=(0,fe.useRef)(null),[T,w]=(0,fe.useState)({visibility:"hidden"});(0,fe.useEffect)(()=>{m?.(g)},[g,m]);let O=(0,fe.useCallback)(()=>y(!1),[]),te=(0,fe.useCallback)(()=>{r||y(!0)},[r]),se=(0,fe.useCallback)(()=>{r||y(de=>!de)},[r]),et=(0,fe.useCallback)(()=>{let de=b??A;if(!de||!N.current)return;let H=c?.()??de.getBoundingClientRect();if(!(H.bottom>0&&H.top0&&H.leftObject.keys(vt).every(ja=>Fa[ja]===vt[ja])?Fa:vt)},[b,O,n,o,a,A,l,c,p]);return(0,fe.useLayoutEffect)(()=>{g&&et()},[g,et]),(0,fe.useEffect)(()=>{if(!g||!c)return;let de,H=()=>{et(),de=requestAnimationFrame(H)};return de=requestAnimationFrame(H),()=>cancelAnimationFrame(de)},[g,c,et]),(0,fe.useEffect)(()=>{if(!g)return;let de=Re=>{let oe=Re.target;!(oe instanceof Node)||b?.contains(oe)||A?.contains(oe)||N.current?.contains(oe)||(oe instanceof Element?oe:oe.parentElement)?.closest("[data-dropdown-lineage]")?.getAttribute("data-dropdown-lineage")?.split(" ").includes(v)||(O(),h?.(Re))},H=Re=>{if(Re.key==="Escape"&&!Re.defaultPrevented){if([...Vm].some(([oe,Qt])=>oe!==v&&Qt.includes(v)))return;O(),Re.preventDefault(),Re.stopImmediatePropagation(),A?.focus()}},_t=Re=>{let oe=Re.detail;oe.id!==v&&!oe.lineage?.includes(v)&&O()},rt=()=>et();return Vm.set(v,L),window.dispatchEvent(new CustomEvent("nodedc-dropdown-open",{detail:{id:v,lineage:L}})),document.addEventListener("pointerdown",de,!0),document.addEventListener("keydown",H,!0),window.addEventListener("nodedc-dropdown-open",_t),window.addEventListener("resize",rt),window.addEventListener("scroll",rt,!0),()=>{Vm.delete(v),document.removeEventListener("pointerdown",de,!0),document.removeEventListener("keydown",H,!0),window.removeEventListener("nodedc-dropdown-open",_t),window.removeEventListener("resize",rt),window.removeEventListener("scroll",rt,!0)}},[b,O,v,g,A,et,L,h]),(0,eu.jsxs)("span",{className:B("nodedc-dropdown-anchor",i),children:[e({open:g,show:te,close:O,toggle:se,setAnchorRef:M,setTriggerRef:I,surfaceId:x}),g&&typeof document<"u"?(0,Pv.createPortal)((0,eu.jsx)("div",{ref:N,id:x,"data-dropdown-lineage":L.join(" "),className:B("nodedc-dropdown-surface",u),role:s,style:T,children:(0,eu.jsx)(Hv.Provider,{value:L,children:typeof t=="function"?t({close:O}):t})}),document.fullscreenElement??document.body):null]})}var Xv=E(z(),1),sl=E(q(),1);var Fv=E(z(),1),jv=E(q(),1);var fT=(0,sl.createContext)({disabled:!0,onKey:()=>{}});var Kv=E(z(),1),ld=E(q(),1);var Yv=E(z(),1),Io=E(q(),1),Qw=E(Wt(),1);var $v=E(z(),1),Ww=E(q(),1);var Qe=E(z(),1),od=E(q(),1);function Xm({open:e,title:t,subtitle:a,identity:n,sections:l,activeSection:o,onSectionChange:r,onClose:i,children:u,footer:s,headerActions:m}){let c=(0,od.useRef)(null);return(0,od.useLayoutEffect)(()=>{c.current&&(c.current.scrollTop=0)},[o]),(0,Qe.jsx)(nd,{open:e,title:t,subtitle:a,size:"lg",className:"nodedc-feature-settings-window",footer:s,headerActions:m,closeOnBackdrop:!1,onClose:i,children:(0,Qe.jsxs)("div",{className:"nodedc-feature-settings",children:[(0,Qe.jsxs)("aside",{className:"nodedc-feature-settings__navigation","aria-label":"\u0420\u0430\u0437\u0434\u0435\u043B\u044B \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A",tabIndex:0,children:[(0,Qe.jsxs)("div",{className:"nodedc-feature-settings__identity",children:[(0,Qe.jsx)(vo,{label:n.avatarLabel,imageUrl:n.avatarUrl}),(0,Qe.jsxs)("span",{children:[(0,Qe.jsx)("strong",{children:n.title}),n.subtitle?(0,Qe.jsx)("small",{children:n.subtitle}):null]})]}),(0,Qe.jsx)("nav",{children:l.map((p,h)=>{let v=p.group&&p.group!==l[h-1]?.group;return(0,Qe.jsxs)("div",{className:"nodedc-feature-settings__navigation-entry",children:[v?(0,Qe.jsx)("span",{className:"nodedc-feature-settings__group",children:p.group}):null,(0,Qe.jsxs)("button",{type:"button",className:"nodedc-feature-settings__section","data-active":p.id===o?"true":void 0,disabled:p.disabled,onClick:()=>r(p.id),children:[p.icon?(0,Qe.jsx)(ie,{name:p.icon,size:16}):null,(0,Qe.jsx)("span",{children:p.label})]})]},p.id)})})]}),(0,Qe.jsx)("section",{ref:c,className:"nodedc-feature-settings__content","aria-label":"\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A",tabIndex:0,children:u})]})})}var Jw=E(z(),1);var Zv=E(z(),1),Qv=E(q(),1);var K=E(z(),1),An=E(q(),1);function dl({value:e,options:t,label:a,onChange:n,searchable:l=!1,searchPlaceholder:o="\u041F\u043E\u0438\u0441\u043A",emptyLabel:r="\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E",placement:i="bottom-start",minMenuWidth:u=180,menuWidth:s="anchor",disabled:m=!1,variant:c="integrated",shape:p="default",className:h,triggerClassName:v,menuClassName:S}){let x=(0,An.useContext)(wo)?"split":c,[g,y]=(0,An.useState)(""),b=(0,An.useRef)(null),M=t.find(T=>T.value===e)??t[0],A=t.some(T=>T.action),I=A?"dialog":"listbox",N=(0,An.useMemo)(()=>{let T=g.trim().toLocaleLowerCase();return T?t.filter(w=>`${w.label} ${w.description??""}`.toLocaleLowerCase().includes(T)):t},[t,g]);return(0,K.jsx)(ha,{className:B("nodedc-select-anchor",h),placement:i,minWidth:u,width:s,disabled:m,surfaceRole:I,surfaceClassName:B(x==="split"&&"nodedc-select__menu",S),trigger:({open:T,toggle:w,setAnchorRef:O,setTriggerRef:te,surfaceId:se})=>{let et=H=>{b.current=H.currentTarget,w()},de=H=>{b.current=H.currentTarget,(H.key==="ArrowDown"||H.key==="Enter"||H.key===" ")&&(H.preventDefault(),T||w())};return x==="split"?(0,K.jsx)("div",{className:B("nodedc-select",v),"data-shape":p==="pill"?"pill":void 0,"data-disabled":m?"true":void 0,children:(0,K.jsxs)("div",{ref:O,className:"nodedc-select__control",children:[(0,K.jsxs)("div",{className:"nodedc-select__value",children:[M?.icon?(0,K.jsx)("span",{className:"nodedc-select__value-icon",children:M.icon}):null,(0,K.jsx)("span",{children:M?.label??"\u2014"})]}),(0,K.jsx)("button",{ref:te,type:"button",className:"nodedc-select__toggle","aria-label":a,"aria-haspopup":I,"aria-controls":se,"aria-expanded":T,disabled:m,onClick:et,onKeyDown:de,children:(0,K.jsx)("span",{className:"nodedc-select-trigger__chevron","aria-hidden":"true"})})]})}):x==="inline"?(0,K.jsxs)("button",{ref:te,type:"button",className:B("nodedc-select-inline",v),"aria-label":a,"aria-haspopup":I,"aria-controls":se,"aria-expanded":T,disabled:m,onClick:et,onKeyDown:de,children:[M?.icon?(0,K.jsx)("span",{className:"nodedc-select-trigger__icon",children:M.icon}):null,(0,K.jsx)("span",{children:M?.label??"\u2014"})]}):(0,K.jsxs)("button",{ref:te,type:"button",className:B("nodedc-select-trigger",v),"aria-label":a,"aria-haspopup":I,"aria-controls":se,"aria-expanded":T,disabled:m,onClick:et,onKeyDown:de,children:[M?.icon?(0,K.jsx)("span",{className:"nodedc-select-trigger__icon",children:M.icon}):(0,K.jsx)("span",{className:"nodedc-select-trigger__icon","aria-hidden":"true"}),(0,K.jsx)("span",{className:"nodedc-select-trigger__label",children:M?.label??"\u2014"}),(0,K.jsx)("span",{className:"nodedc-select-trigger__chevron","aria-hidden":"true"})]})},children:({close:T})=>(0,K.jsxs)(K.Fragment,{children:[l?(0,K.jsxs)("label",{className:"nodedc-dropdown-search",children:[(0,K.jsx)("span",{"aria-hidden":"true",children:"\u2315"}),(0,K.jsx)("input",{value:g,onChange:w=>y(w.target.value),placeholder:o})]}):null,N.map(w=>(0,K.jsxs)("div",{className:"nodedc-select-option-row",children:[(0,K.jsxs)("button",{type:"button",className:"nodedc-dropdown-option",role:A?void 0:"option","aria-selected":A?void 0:w.value===e,"aria-pressed":A?w.value===e:void 0,"data-selected":w.value===e?"true":void 0,disabled:w.disabled,onClick:()=>{w.disabled||(n(w.value,w),y(""),T())},children:[w.icon?(0,K.jsx)("span",{className:"nodedc-dropdown-option__icon",children:w.icon}):(0,K.jsx)("span",{}),(0,K.jsxs)("span",{className:"nodedc-dropdown-option__body",children:[(0,K.jsx)("span",{className:"nodedc-dropdown-option__label",children:w.label}),w.description?(0,K.jsx)("span",{className:"nodedc-dropdown-option__description",children:w.description}):null]}),w.value===e?(0,K.jsx)("span",{className:"nodedc-dropdown-option__check","aria-hidden":"true",children:"\u2022"}):null]}),w.action?(0,K.jsx)(pt,{label:w.action.label,"data-tone":w.action.tone??"neutral",disabled:w.action.disabled,onClick:()=>{y(""),T(),b.current?.focus(),w.action?.onAction()},children:w.action.icon}):null]},w.value)),N.length===0?(0,K.jsx)("div",{className:"nodedc-empty-state",children:r}):null]})})}var Wv=E(z(),1),e4=E(q(),1);var Jv=E(z(),1),t4=E(q(),1);var W=E(z(),1),Fe=E(q(),1);var cl=E(z(),1),aL=E(q(),1),rd=E(q(),1);var tu=(e,t,a)=>Math.max(t,Math.min(a,e));function Km(e,t,a){let n=tu(e[0],t,a);return[n,tu(e[1],n,a)]}function eL([e,t],a){return a<=(e+t)/2?0:1}function tL(e,t,a,n,l,o=1){let r=Km(e,n,l),i=Number(o),u=tu(a,n,l),s=u===n||u===l||!Number.isFinite(i)||i<=0?u:Number((n+Math.round((u-n)/i)*i).toPrecision(12));return r[t]=t===0?tu(s,n,r[1]):tu(s,r[0],l),r}function nL({label:e,value:t,min:a,max:n,step:l=1,onChange:o,lowerLabel:r=`${e}: \u043D\u0438\u0436\u043D\u044F\u044F \u0433\u0440\u0430\u043D\u0438\u0446\u0430`,upperLabel:i=`${e}: \u0432\u0435\u0440\u0445\u043D\u044F\u044F \u0433\u0440\u0430\u043D\u0438\u0446\u0430`,formatValue:u=String,formatLimit:s=String,limitSide:m="right",disabled:c=!1,className:p,style:h,orientation:v,...S}){let L=n>a?n:a+1,x=Km(t,a,L),g=(0,rd.useRef)(x);g.current=x;let y=(0,rd.useRef)([]),b=(0,rd.useRef)(null),M=x.map(w=>(w-a)/(L-a)*100),A={...h,"--nodedc-range-lower":`${M[0]}%`,"--nodedc-range-upper":`${M[1]}%`},I=(w,O)=>{let te=tL(g.current,w,O,a,L,l);g.current=te,o(te)},N=w=>{let O=w.currentTarget.getBoundingClientRect();return a+Math.max(0,Math.min(1,(O.bottom-w.clientY)/O.height))*(L-a)},T=w=>{b.current?.id===w.pointerId&&(b.current=null,w.currentTarget.hasPointerCapture(w.pointerId)&&w.currentTarget.releasePointerCapture(w.pointerId))};return(0,cl.jsxs)("div",{className:"nodedc-range-scale","data-band":"true","data-limit-side":m,"data-disabled":c||void 0,style:A,children:[(0,cl.jsx)("div",{className:B("nodedc-range",p),"data-orientation":"vertical",children:(0,cl.jsx)("div",{className:"nodedc-range-band__target",onPointerDown:w=>{if(c||w.button!==0||b.current)return;w.preventDefault(),w.stopPropagation();let O=N(w),te=eL(g.current,O);b.current={id:w.pointerId,boundary:te},y.current[te]?.focus({preventScroll:!0}),w.currentTarget.setPointerCapture(w.pointerId),I(te,O)},onPointerMove:w=>{c||b.current?.id!==w.pointerId||(w.preventDefault(),w.stopPropagation(),I(b.current.boundary,N(w)))},onPointerUp:T,onPointerCancel:T,onLostPointerCapture:()=>{b.current=null},children:[0,1].map(w=>(0,aL.createElement)("input",{...S,key:w,ref:O=>{y.current[w]=O},type:"range","data-boundary":w===0?"lower":"upper",min:a,max:L,step:l,value:x[w],disabled:c,"aria-label":w===0?r:i,"aria-orientation":"vertical","aria-valuemin":w===0?a:x[0],"aria-valuemax":w===0?x[1]:L,"aria-valuetext":u(x[w]),onChange:O=>I(w,Number(O.target.value))}))})}),(0,cl.jsx)("span",{className:"nodedc-range-scale__limit nodedc-range-scale__limit--max",children:s(x[1])}),(0,cl.jsx)("span",{className:"nodedc-range-scale__limit nodedc-range-scale__limit--min",children:s(x[0])})]})}var Ym=(e,t,a)=>Math.max(t,Math.min(a,e)),lL=e=>{let[t,a]=String(e).toLowerCase().split("e"),n=t?.split(".")[1]?.length??0;if(a===void 0)return n;let l=Number.parseInt(a,10);return Number.isFinite(l)?Math.max(0,n-l):n},a4=(e,t,a,n,l)=>{let o=l?.min??Number.NEGATIVE_INFINITY,r=l?.max??Number.POSITIVE_INFINITY,i=Ym(e,o,r);if(n==="any")return i;let u=n===void 0?1:Number(n);if(!Number.isFinite(u)||u<=0)return i;let s=Math.min(12,Math.max(lL(t),lL(u))),m=t+Math.round((i-t)/u)*u;return Ym(Number(m.toFixed(s)),o,r)},au=e=>Number.isInteger(e)?String(e):String(Number(e.toFixed(12)));function n4(e){return Array.isArray(e.value)}function Zm(e){return n4(e)?(0,W.jsx)(nL,{...e}):(0,W.jsx)(l4,{...e})}function l4({label:e,orientation:t="horizontal",value:a,min:n,max:l,exactValueBounds:o,step:r,formatValue:i=String,formatLimit:u=String,limitSide:s="right",onChange:m,className:c,disabled:p=!1,tabIndex:h,...v}){let S=(0,Fe.useRef)(null),L=(0,Fe.useRef)(null),x=(0,Fe.useRef)(null),g=(0,Fe.useRef)(!1),[y,b]=(0,Fe.useState)(!1),[M,A]=(0,Fe.useState)(()=>au(a)),[I,N]=(0,Fe.useState)("base"),T=l===n?n+1:l,w=Math.max(0,Math.min(100,(a-n)/(T-n)*100)),O=i(a),te=Math.max(1,Math.min(14,y?M.length||au(a).length:O.length)),se={"--nodedc-range-progress":`${w}%`,"--nodedc-range-editor-characters":te};(0,Fe.useLayoutEffect)(()=>A(au(a)),[a]),(0,Fe.useEffect)(()=>{y||A(au(a))},[y,a]),(0,Fe.useLayoutEffect)(()=>{let H=S.current,_t=x.current;if(!H||!_t)return;let rt=()=>{let oe=H.getBoundingClientRect(),Qt=_t.getBoundingClientRect(),vt=Number.parseFloat(getComputedStyle(_t).paddingRight)||0,Fa=oe.left+oe.width*w/100,ja=Qt.right-vt;N(Fa>=ja?"fill":"base")};rt();let Re=typeof ResizeObserver>"u"?null:new ResizeObserver(rt);return Re?.observe(H),()=>Re?.disconnect()},[te,w]);let et=(H,_t)=>{if(H){let rt=Number(M.trim().replace(",","."));Number.isFinite(rt)&&m(a4(rt,n,l,r,o))}b(!1),_t&&requestAnimationFrame(()=>L.current?.focus())},de=H=>{H.stopPropagation(),H.key==="Enter"&&(H.preventDefault(),H.currentTarget.blur()),H.key==="Escape"&&(H.preventDefault(),g.current=!0,A(au(a)),b(!1),H.currentTarget.blur(),requestAnimationFrame(()=>L.current?.focus()))};return t==="vertical"?(0,W.jsxs)("div",{className:"nodedc-range-scale","data-limit-side":s,style:se,children:[(0,W.jsx)("div",{ref:S,className:B("nodedc-range",c),style:se,"data-orientation":"vertical",children:(0,W.jsx)("input",{ref:L,...v,type:"range",value:a,min:n,max:T,step:r,disabled:p,tabIndex:h,"aria-label":e,"aria-orientation":"vertical","aria-valuetext":O,onChange:H=>m(Number(H.target.value))})}),(0,W.jsx)("span",{className:"nodedc-range-scale__limit nodedc-range-scale__limit--max",children:u(Ym(a,n,T))}),(0,W.jsx)("span",{className:"nodedc-range-scale__limit nodedc-range-scale__limit--min",children:u(n)})]}):(0,W.jsxs)("div",{ref:S,className:B("nodedc-range",c),style:se,"data-editing":y||void 0,children:[(0,W.jsx)("input",{ref:L,...v,type:"range",value:a,min:n,max:T,step:r,disabled:p,tabIndex:y?-1:h,"aria-label":e,"aria-valuetext":O,onChange:H=>m(Number(H.target.value))}),(0,W.jsx)("span",{className:"nodedc-range__label",children:e}),(0,W.jsx)("span",{className:"nodedc-range__value",children:O}),(0,W.jsxs)("span",{className:"nodedc-range__fill-text","aria-hidden":"true",children:[(0,W.jsx)("span",{className:"nodedc-range__label",children:e}),(0,W.jsx)("span",{className:"nodedc-range__value",children:O})]}),(0,W.jsx)("input",{ref:x,className:"nodedc-range__editor",type:"text",inputMode:"decimal",value:M,"aria-label":`${e}: \u0442\u043E\u0447\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435`,disabled:p,spellCheck:!1,"data-active":y||void 0,"data-contrast":I,onFocus:()=>{y||b(!0)},onChange:H=>A(H.target.value),onKeyDown:de,onBlur:()=>{if(g.current){g.current=!1;return}et(!0,!1)}})]})}var o4=["#ff2f92","#ff6caf","#d746ff","#7a3cff","#4ea4ff","#35d7c1","#c3ff66","#ffffff","#404040","#111116"];function nu(e,t,a){return Math.max(t,Math.min(a,e))}function $m(e){let t=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;let a=t[1];return[Number.parseInt(a.slice(0,2),16),Number.parseInt(a.slice(2,4),16),Number.parseInt(a.slice(4,6),16)]}function oL(e){let t=$m(e);if(!t)return null;let[a,n,l]=t.map(s=>s/255),o=Math.max(a,n,l),r=Math.min(a,n,l),i=o-r,u=0;return i&&(o===a?u=60*((n-l)/i%6):o===n?u=60*((l-a)/i+2):u=60*((a-n)/i+4)),{h:(u+360)%360,s:o===0?0:i/o*100,v:o*100}}function fl({h:e,s:t,v:a}){let n=(e%360+360)%360,l=nu(t,0,100)/100,o=nu(a,0,100)/100,r=o*l,i=n/60%2,u=r*(1-Math.abs(i-1)),s=n<60?[r,u,0]:n<120?[u,r,0]:n<180?[0,r,u]:n<240?[0,u,r]:n<300?[u,0,r]:[r,0,u],m=o-r;return`#${s.map(c=>Math.round((c+m)*255).toString(16).padStart(2,"0")).join("")}`}function rL({value:e,onChange:t,label:a="\u0426\u0432\u0435\u0442",className:n,disabled:l=!1,onBlur:o,onKeyDown:r,...i}){let[u,s]=(0,Fe.useState)(e);(0,Fe.useEffect)(()=>s(e),[e]);let m=oL(e),[c,p]=(0,Fe.useState)(()=>m??{h:330,s:82,v:100}),h={"--nodedc-color-value":fl(m||c)};(0,Fe.useEffect)(()=>{m&&p(m)},[e,m?.h,m?.s,m?.v]);let v=L=>{let x={h:nu(L.h,0,360),s:nu(L.s,0,100),v:nu(L.v,0,100)};p(x),s(fl(x)),t(fl(x))},S=L=>{let x=L.currentTarget.getBoundingClientRect();v({...c,s:(L.clientX-x.left)/x.width*100,v:100-(L.clientY-x.top)/x.height*100})};return(0,W.jsxs)("div",{className:B("nodedc-color-field",n),style:h,children:[(0,W.jsx)(ha,{className:"nodedc-color-field__dropdown",placement:"bottom-start",minWidth:296,width:296,disabled:l,surfaceRole:"dialog",surfaceClassName:"nodedc-color-palette-surface",trigger:({open:L,toggle:x,setTriggerRef:g,surfaceId:y})=>(0,W.jsx)("button",{ref:g,type:"button",className:"nodedc-color-field__picker","aria-label":`\u0412\u044B\u0431\u0440\u0430\u0442\u044C ${a}`,"aria-haspopup":"dialog","aria-controls":y,"aria-expanded":L,"data-open":L?"true":void 0,disabled:l,onClick:x,children:(0,W.jsx)("span",{"aria-hidden":"true"})}),children:(0,W.jsxs)("div",{className:"nodedc-color-palette","aria-label":`\u041F\u0430\u043B\u0438\u0442\u0440\u0430: ${a}`,children:[(0,W.jsx)("div",{className:"nodedc-color-palette__spectrum",role:"slider",tabIndex:l?-1:0,"aria-label":`${a}: \u043D\u0430\u0441\u044B\u0449\u0435\u043D\u043D\u043E\u0441\u0442\u044C \u0438 \u044F\u0440\u043A\u043E\u0441\u0442\u044C`,"aria-valuetext":fl(c),style:{"--nodedc-color-hue":fl({h:c.h,s:100,v:100}),"--nodedc-color-s":`${c.s}%`,"--nodedc-color-v":`${100-c.v}%`},onPointerDown:L=>{l||(L.currentTarget.setPointerCapture(L.pointerId),S(L))},onPointerMove:L=>{L.currentTarget.hasPointerCapture(L.pointerId)&&S(L)},onPointerUp:L=>{L.currentTarget.hasPointerCapture(L.pointerId)&&L.currentTarget.releasePointerCapture(L.pointerId)},onKeyDown:L=>{let x=L.shiftKey?10:2;L.key==="ArrowLeft"&&(L.preventDefault(),v({...c,s:c.s-x})),L.key==="ArrowRight"&&(L.preventDefault(),v({...c,s:c.s+x})),L.key==="ArrowDown"&&(L.preventDefault(),v({...c,v:c.v-x})),L.key==="ArrowUp"&&(L.preventDefault(),v({...c,v:c.v+x}))},children:(0,W.jsx)("span",{className:"nodedc-color-palette__marker","aria-hidden":"true"})}),(0,W.jsxs)("label",{className:"nodedc-color-palette__hue",children:[(0,W.jsx)("span",{children:"\u041E\u0442\u0442\u0435\u043D\u043E\u043A"}),(0,W.jsx)("input",{type:"range",min:0,max:360,value:Math.round(c.h),"aria-label":`${a}: \u043E\u0442\u0442\u0435\u043D\u043E\u043A`,disabled:l,onChange:L=>v({...c,h:Number(L.target.value)})})]}),(0,W.jsx)("div",{className:"nodedc-color-palette__presets","aria-label":"\u0411\u044B\u0441\u0442\u0440\u044B\u0435 \u0446\u0432\u0435\u0442\u0430",children:o4.map(L=>(0,W.jsx)("button",{type:"button","aria-label":`\u0412\u044B\u0431\u0440\u0430\u0442\u044C ${L}`,"aria-pressed":fl(c).toLowerCase()===L,style:{"--nodedc-palette-swatch":L},onClick:()=>{let x=oL(L);x&&v(x)}},L))})]})}),(0,W.jsx)("input",{className:"nodedc-color-field__text",...i,value:u,"aria-label":`${a}: HEX`,disabled:l,spellCheck:!1,onChange:L=>{let x=L.target.value;s(x),$m(x)&&t(`#${x.trim().replace(/^#/,"").toLowerCase()}`)},onBlur:L=>{s($m(u)?`#${u.trim().replace(/^#/,"").toLowerCase()}`:e),o?.(L)},onKeyDown:L=>{L.key==="Escape"&&(L.preventDefault(),L.stopPropagation(),s(e)),L.key==="Enter"&&(L.preventDefault(),L.currentTarget.blur()),r?.(L)}})]})}var iL=E(z(),1);var Qm=E(z(),1),uL=E(q(),1);var dN=(0,uL.forwardRef)(function({active:t,className:a,type:n="button",...l},o){return(0,Qm.jsx)("button",{...l,ref:o,type:n,className:B("nodedc-segmented__item",a),"data-active":t?"true":void 0})});var sL=E(z(),1);function dL({tone:e="neutral",variant:t="badge",pulse:a=!1,className:n,children:l,...o}){return(0,sL.jsx)("span",{className:B("nodedc-status",n),"data-tone":e==="neutral"?void 0:e,"data-variant":t==="indicator"?t:void 0,"data-pulse":a?"true":void 0,...o,children:t==="indicator"?null:l})}var ht=E(z(),1);function id({eyebrow:e,title:t,description:a,actions:n,children:l,align:o="start",className:r,...i}){return(0,ht.jsxs)("section",{className:B("nodedc-settings-card",r),"data-align":o==="center"?"center":void 0,...i,children:[(0,ht.jsxs)("header",{className:"nodedc-settings-card__head",children:[(0,ht.jsxs)("div",{className:"nodedc-settings-card__titles",children:[e?(0,ht.jsx)("span",{children:e}):null,(0,ht.jsx)("h2",{children:t}),a?(0,ht.jsx)(Jy,{children:a}):null]}),n?(0,ht.jsx)("div",{className:"nodedc-settings-card__actions",children:n}):null]}),o==="center"&&(l==null||l===!1)?null:(0,ht.jsx)("div",{className:"nodedc-settings-card__body",children:l})]})}function Wm({checked:e,label:t,disabled:a=!1,onChange:n}){return(0,ht.jsxs)("button",{type:"button",className:"nodedc-switch",role:"switch","aria-checked":e,disabled:a,onClick:()=>n(!e),children:[(0,ht.jsx)("span",{className:"nodedc-switch__track","aria-hidden":"true",children:(0,ht.jsx)("span",{})}),(0,ht.jsx)("span",{children:t})]})}var Jm=E(z(),1),ep=E(q(),1);var fL=E(z(),1),ud=E(q(),1);var cL=E(q(),1);var mL=E(z(),1),pL=E(q(),1),d4=E(Wt(),1);var ue=E(z(),1);function hL({displayName:e,variant:t="header",subtitle:a,avatarUrl:n,coverImageUrl:l,triggerLabel:o,triggerIcon:r,actions:i}){let u=e||"NODE.DC";return(0,ue.jsx)(ha,{placement:"bottom-end",width:296,offset:10,surfaceClassName:"nodedc-user-profile-menu",trigger:({open:s,toggle:m,setTriggerRef:c,setAnchorRef:p,surfaceId:h})=>t==="header"?(0,ue.jsxs)(Ky,{ref:p,children:[(0,ue.jsx)(Yy,{"aria-haspopup":"menu","aria-expanded":s,"aria-controls":h,onClick:v=>{c(v.currentTarget),m()},children:o??"\u041F\u0440\u043E\u0444\u0438\u043B\u044C"}),(0,ue.jsx)(pt,{ref:c,label:`\u041C\u0435\u043D\u044E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F ${u}`,"aria-haspopup":"menu","aria-expanded":s,"aria-controls":h,onClick:v=>{c(v.currentTarget),m()},children:(0,ue.jsx)(ie,{name:r??"inbox",size:20,strokeWidth:1.7})}),(0,ue.jsx)("button",{type:"button",className:"nodedc-user-profile-menu__trigger","aria-label":`\u041F\u0440\u043E\u0444\u0438\u043B\u044C ${u}`,"aria-haspopup":"menu","aria-expanded":s,"aria-controls":h,onClick:v=>{c(v.currentTarget),m()},children:(0,ue.jsx)(vo,{label:u,imageUrl:n})})]}):(0,ue.jsxs)("button",{ref:c,type:"button",className:"nodedc-user-profile-menu__trigger",title:u,"aria-label":`\u041C\u0435\u043D\u044E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F ${u}`,"aria-expanded":s,"aria-controls":h,onClick:m,children:[o===null?null:(0,ue.jsx)("span",{className:"nodedc-user-profile-menu__trigger-label",children:o??u}),r?(0,ue.jsx)(ie,{name:r,size:18}):null,(0,ue.jsx)(vo,{label:u,imageUrl:n})]}),children:({close:s})=>(0,ue.jsxs)("div",{className:"nodedc-user-profile-card",children:[(0,ue.jsxs)("div",{className:"nodedc-user-profile-card__cover",style:l?{backgroundImage:`linear-gradient(180deg, rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.52)), url(${JSON.stringify(l)})`}:void 0,children:[(0,ue.jsx)(vo,{label:u,imageUrl:n}),(0,ue.jsx)("strong",{children:u}),a?(0,ue.jsx)("span",{children:a}):null]}),(0,ue.jsx)("div",{className:"nodedc-user-profile-card__actions",children:i.map(m=>{let c=(0,ue.jsxs)(ue.Fragment,{children:[m.icon?(0,ue.jsx)(ie,{name:m.icon,size:16}):(0,ue.jsx)("span",{}),(0,ue.jsx)("span",{children:m.label})]});return m.href&&!m.disabled?(0,ue.jsx)("a",{className:"nodedc-user-profile-card__action","data-tone":m.tone==="danger"?"danger":void 0,href:m.href,onClick:()=>s(),children:c},m.id):(0,ue.jsx)("button",{type:"button",className:"nodedc-user-profile-card__action","data-tone":m.tone==="danger"?"danger":void 0,disabled:m.disabled,onClick:()=>{m.onSelect?.(),s()},children:c},m.id)})})]})})}var gL=E(z(),1),sd=E(q(),1);var xL=E(z(),1),ap=E(q(),1);var tp=E(z(),1),dd=E(q(),1);var QN=["image/png","image/jpeg","image/gif","image/webp","image/avif","video/mp4","video/webm","video/quicktime",".png",".jpg",".jpeg",".gif",".webp",".avif",".mp4",".webm",".mov"].join(",");var c4=E(z(),1),np=E(q(),1);var yL=E(z(),1);var vL=E(z(),1),LL=E(q(),1);var f4=(0,LL.forwardRef)(function({pressed:t=!1,label:a,children:n,className:l,type:o="button",disabled:r,...i},u){return(0,vL.jsx)("button",{...i,ref:u,type:o,disabled:r,"aria-label":a,title:a,"aria-pressed":t&&!r,className:B("nodedc-key-button",l),children:n})});var bL=E(z(),1),lp=E(q(),1);var SL=E(z(),1),m4=E(q(),1);var CL=E(z(),1),wL=E(q(),1);var p4=(0,wL.forwardRef)(function({className:t,...a},n){return(0,CL.jsx)(pa,{...a,ref:n,variant:"ghost",size:"dense",className:B("nodedc-scene-annotation",t)})});var IL=E(z(),1);var ga=E(q(),1),ML=E(hm(),1),AL=E(Wt(),1);function kL({root:e,navigationOpen:t=!1,activeView:a=null,contentExpanded:n=!0,onChange:l}={}){let o={navigationOpen:t||a!==null,activeView:a,contentOpen:a!==null,contentExpanded:n},r=i=>{o={...o,...i},o.contentOpen=o.activeView!==null,e?.toggleAttribute("data-navigation-open",o.navigationOpen),e?.toggleAttribute("data-content-open",o.contentOpen),e?.toggleAttribute("data-content-expanded",o.contentOpen&&o.contentExpanded),l?.({...o})};return r({}),{getState:()=>({...o}),openNavigation:()=>r({navigationOpen:!0}),toggleNavigation:()=>r({navigationOpen:!o.navigationOpen,activeView:o.navigationOpen?null:o.activeView}),closeNavigation:()=>r({navigationOpen:!1,activeView:null}),openView:i=>r({navigationOpen:!0,activeView:i,contentExpanded:!0}),closeView:()=>r({activeView:null}),setContentExpanded:i=>r({contentExpanded:i})}}var EL=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function op({overlay:e,dialog:t,closeControls:a=[],closeOnBackdrop:n=!0,closeOnEscape:l=!0,lockBodyScroll:o=!0,onOpenChange:r}){let i=!1,u=null,s="",m=Array.from(a);e.classList.add("nodedc-overlay","nodedc-ui-root"),t.classList.add("nodedc-window"),t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),t.tabIndex=-1,e.hidden=!0;let c=()=>{(t.querySelector(EL)??t).focus()},p=()=>{i||(i=!0,u=document.activeElement instanceof HTMLElement?document.activeElement:null,s=document.body.style.overflow,o&&(document.body.style.overflow="hidden"),e.hidden=!1,requestAnimationFrame(c),r?.(!0))},h=()=>{i&&(i=!1,e.hidden=!0,o&&(document.body.style.overflow=s),u?.focus(),r?.(!1))},v=L=>{n&&L.target===e&&h()},S=L=>{if(!i)return;if(L.key==="Escape"&&l){L.preventDefault(),h();return}if(L.key!=="Tab")return;let x=Array.from(t.querySelectorAll(EL));if(x.length===0){L.preventDefault(),t.focus();return}let g=x[0],y=x[x.length-1];L.shiftKey&&document.activeElement===g?(L.preventDefault(),y.focus()):!L.shiftKey&&document.activeElement===y&&(L.preventDefault(),g.focus())};return e.addEventListener("pointerdown",v),document.addEventListener("keydown",S),m.forEach(L=>L.addEventListener("click",h)),{open:p,close:h,isOpen:()=>i,destroy:()=>{h(),e.removeEventListener("pointerdown",v),document.removeEventListener("keydown",S),m.forEach(L=>L.removeEventListener("click",h))}}}var Bt=ga.default.createElement,rp="dc-cms.ui-preferences.v1",DL={theme:"dark",accent:null};function TL(e){return{theme:e?.theme==="light"?"light":"dark",accent:/^#[\da-f]{6}$/i.test(e?.accent||"")?e.accent.toLowerCase():null}}function NL(){try{return TL(JSON.parse(localStorage.getItem(rp)))}catch{return{...DL}}}function ip(e){let t=e.accent?.match(/[\da-f]{2}/gi).map(a=>parseInt(a,16));_m(document.documentElement),Om(document.documentElement,{...e.theme==="light"?Bm:Rm,accent:t})}function h4(){return"#"+getComputedStyle(document.documentElement).getPropertyValue("--nodedc-accent-rgb").trim().split(/\s+/).map(e=>Number(e).toString(16).padStart(2,"0")).join("")}function g4({initial:e}){let[t,a]=(0,ga.useState)(e),[n,l]=(0,ga.useState)(!1),[o,r]=(0,ga.useState)(null),[i,u]=(0,ga.useState)(!1);(0,ga.useEffect)(()=>{let h=new AbortController;fetch("/api/me",{credentials:"same-origin",signal:h.signal}).then(S=>S.ok?S.json():null).then(r).catch(()=>{});let v=S=>{if(S.key===rp||S.key===null){let L=NL();ip(L),a(L)}};return window.addEventListener("storage",v),()=>{h.abort(),window.removeEventListener("storage",v)}},[]);function s(h){let v=TL({...t,...h});ip(v),a(v);try{localStorage.setItem(rp,JSON.stringify(v)),u(!1)}catch{u(!0)}}let m=o?.user,c=m?.name||m?.username||"\u041F\u0440\u043E\u0444\u0438\u043B\u044C",p=[{id:"appearance",label:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430",icon:"settings",onSelect:()=>l(!0)}];return o?.authEnabled&&p.push({id:"logout",label:"\u0412\u044B\u0439\u0442\u0438",icon:"external",href:"/auth/logout"}),Bt(ga.default.Fragment,null,Bt(hL,{displayName:c,subtitle:m?.email||void 0,avatarUrl:m?.picture||void 0,triggerLabel:"\u041F\u0440\u043E\u0444\u0438\u043B\u044C",triggerIcon:"inbox",actions:p}),Bt(Xm,{open:n,title:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",subtitle:"\u0418\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441 CMS",identity:{title:c,subtitle:"NODE.DC CMS",avatarLabel:c,avatarUrl:m?.picture||void 0},sections:[{id:"appearance",label:"\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435",icon:"settings",group:"\u041E\u0431\u0449\u0438\u0435"}],activeSection:"appearance",onSectionChange:()=>{},onClose:()=>l(!1),footer:Bt(pa,{onClick:()=>s(DL),tone:"neutral"},"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435")},Bt("div",{className:"cms-preferences-fields"},Bt(id,{title:"\u0422\u0435\u043C\u0430",description:"\u0421\u0432\u0435\u0442\u043B\u044B\u0439 \u0438\u043B\u0438 \u0442\u0451\u043C\u043D\u044B\u0439 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441",actions:Bt("div",{className:"cms-preference-controls"},Bt(dl,{label:"\u0422\u0435\u043C\u0430 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430",value:t.theme,options:[{value:"dark",label:"\u0422\u0451\u043C\u043D\u0430\u044F"},{value:"light",label:"\u0421\u0432\u0435\u0442\u043B\u0430\u044F"}],onChange:h=>s({theme:h})}))}),Bt(id,{title:"\u0410\u043A\u0446\u0435\u043D\u0442\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",description:"\u0426\u0432\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432",actions:Bt("div",{className:"cms-preference-controls"},Bt(rL,{label:"\u0410\u043A\u0446\u0435\u043D\u0442\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",value:t.accent||h4(),onChange:h=>s({accent:h})}))})),Bt("p",{className:"nodedc-description",role:"status"},i?"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044E\u0442 \u0432 \u044D\u0442\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435. \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043B \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438\u0445 \u0434\u043B\u044F \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u0432\u0445\u043E\u0434\u0430.":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u044E\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.")))}function RL(){let e=NL();ip(e),(0,AL.flushSync)(()=>(0,ML.createRoot)(document.querySelector("#cms-profile")).render(Bt(g4,{initial:e})))}var qe=BL.default.createElement,R=(e,t=document)=>t.querySelector(e),ve=(e,t=document)=>[...t.querySelectorAll(e)],Tn=e=>R(`#ds-${e}`).content.firstElementChild.cloneNode(!0);function je(e,t){e&&e.classList.add(...t.split(" "))}var ou=new Map,lu=[],up=!1,sp,x4=0,cd;function Dn(){up||(up=!0,queueMicrotask(()=>{up=!1,dp()}))}function ml(e){let t=ou.get(e);if(!t){let a=document.createElement("span");a.className="cms-ui-island",e.after(a),e.hidden=!0,e.tabIndex=-1,e.setAttribute("aria-hidden","true"),t={host:a,root:(0,OL.createRoot)(a),signature:""},ou.set(e,t)}return t}function y4(){for(let e of ve("select")){let t=ml(e),a=[...e.options].map(r=>({value:r.value,label:e.id==="site-selector"?r.textContent.replace(/^NODE\.?DC\s*[—–-]\s*/i,""):r.textContent,disabled:r.disabled})),n=e.getAttribute("aria-label")||e.closest("label")?.querySelector(".nodedc-field__label")?.textContent||"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435",l=JSON.stringify([e.value,a,e.disabled,n]);if(l===t.signature)continue;t.signature=l,(0,Nn.flushSync)(()=>t.root.render(qe(dl,{variant:e.id==="site-selector"?"split":"integrated",shape:e.id==="site-selector"?"pill":"default",value:e.value,options:a,label:n,disabled:e.disabled,onChange:r=>{e.value=r,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})),Dn()}}))),e.id&&e.closest("label")?.setAttribute("for",e.id+"-trigger");let o=R("button",t.host);o&&e.id&&(o.id=e.id+"-trigger")}}function v4(){for(let e of ve("input[type=checkbox]")){let t=e.closest("label")||e.parentElement,a=ou.get(e);if(!a){let l=t.querySelector(".field-label-text")?.textContent||[...t.childNodes].filter(o=>o!==e).map(o=>o.textContent).join(" ").trim()||e.getAttribute("aria-label")||"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u043E";a=ml(e),a.label=l.replace(/\s+/g," ").trim();for(let o of[...t.childNodes])o!==e&&o!==a.host&&!(o.nodeType===1&&o.matches("input,select,textarea"))&&(o.nodeType===1?o.hidden=!0:o.nodeType===3&&(o.textContent=""));t.classList.contains("link-mode-row")||t.classList.add("cms-switch-binding");for(let o of ve("input:not([type=checkbox])",t))o.setAttribute("aria-label",a.label);t.addEventListener("click",o=>{o.target.closest("button")&&o.preventDefault()})}let n=JSON.stringify([e.checked,e.disabled]);n!==a.signature&&(a.signature=n,(0,Nn.flushSync)(()=>a.root.render(qe(Wm,{checked:e.checked,disabled:e.disabled,label:a.label,onChange:l=>{e.checked=l,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})),Dn()}}))))}}function L4(){for(let e of ve("input[type=range]")){if(e.closest(".cms-ui-island,.nodedc-color-palette-surface"))continue;let t=ml(e),a=e.closest(".range-field"),n=a?.querySelector(".range-value");n&&(n.hidden=!0);let l=a?.querySelector(".field-label-text")?.textContent||"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435",o=JSON.stringify([e.value,e.min,e.max,e.step,e.disabled]);if(o===t.signature)continue;t.signature=o;let r=Number(e.min),i=Number(e.max);(0,Nn.flushSync)(()=>t.root.render(qe(Zm,{label:l,value:Number(e.value),min:r,max:i,step:e.step,exactValueBounds:{min:r,max:i},disabled:e.disabled,onChange:u=>{e.value=String(u),e.dispatchEvent(new Event("input",{bubbles:!0})),Dn()}})))}}function b4(){for(let e of ve(".publish-progress-track")){let t=ml(e),a=Number(e.getAttribute("aria-valuenow")||0);t.signature!==String(a)&&(t.signature=String(a),(0,Nn.flushSync)(()=>t.root.render(qe(Ji,{label:"\u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438",value:a/100}))))}}function S4(){for(let e of ve(".field-control:not(.boolean-field):not(.service-media-field),.json-field,.media-search,.site-dialog label")){if(e.dataset.dsField)continue;e.dataset.dsField="true",je(e,"nodedc-field");let t=R(":scope > .field-label-row",e),a=t?.querySelector(".field-label-text")||R(":scope > span:not(.field-kind):not(.field-path):not(.field-hint)",e);if(!t){if(t=Tn("field").querySelector(".nodedc-field__label-row"),a)t.querySelector(".nodedc-field__label").replaceWith(a);else{a=t.querySelector(".nodedc-field__label"),a.textContent=[...e.childNodes].filter(l=>l.nodeType===3).map(l=>l.textContent).join(" ").trim();for(let l of[...e.childNodes])l.nodeType===3&&(l.textContent="")}e.prepend(t)}je(t,"nodedc-field__label-row"),je(a||R(".field-label-text",t),"nodedc-field__label");let n=R("input:not([type=hidden]):not([type=checkbox]),textarea,select",e);n&&!n.id&&(n.id="cms-field-"+ ++x4),n&&e.tagName==="LABEL"&&(e.htmlFor=n.id);for(let l of ve(".field-hint,.group-desc",e))je(l,"nodedc-field__description")}for(let e of ve("input:not([type=hidden]):not([type=checkbox]):not([type=file]):not([type=range]),textarea"))e.closest(".cms-ui-island")||je(e,"nodedc-field__control")}function C4(){for(let e of ve(".collection-item-card,.json-details")){if(e.dataset.dsSurface)continue;let t=Tn("nestedSurface");for(let a of t.attributes)a.name==="class"?je(e,a.value):e.setAttribute(a.name,a.value);e.dataset.dsSurface="true"}for(let e of ve(".settings-card,.content-group,.content-panel")){if(e.dataset.dsCard)continue;e.dataset.dsCard="true",je(e,e.querySelector(":scope > #content-fields")?"cms-content-section":"nodedc-settings-card");let t=R(":scope > .card-head,:scope > .group-head,:scope > .panel-head,:scope > .publish-progress-head",e),a=Tn("card"),n=R(".nodedc-settings-card__head",a),l=R(".nodedc-settings-card__titles",a),o=R(".nodedc-settings-card__body",a);if(n.replaceChildren(l),l.replaceChildren(),o.replaceChildren(),t){let r=R("h3,h2",t)||t,i=R(".section-kicker",t);if(i&&l.append(i),r?.hasAttribute("data-publish-title"))l.append(r);else if(r===t){let s=document.createElement("h2");for(let m of[...r.childNodes])(m.nodeType===3||m.nodeType===1&&!m.matches("label,button"))&&s.append(m);l.append(s);for(let m of[...r.children])n.append(m)}else if(r){let s=document.createElement("h2");for(let m of r.attributes)s.setAttribute(m.name,m.value);s.append(...r.childNodes),l.append(s)}let u=R(".project-settings-hint,.panel-note,.group-desc",t)||R(":scope > .group-desc",e);if(u){let s=document.createElement("p");for(let m of u.attributes)s.setAttribute(m.name,m.value);s.classList.add("nodedc-description"),s.append(...u.childNodes),u.remove(),l.append(s)}for(let s of ve(":scope > .toggle-row,:scope > .button-row,:scope > .group-head-toggle,:scope > [data-publish-percent]",t))n.append(s);t.remove()}else n.remove();o.append(...e.childNodes),e.append(...a.childNodes)}}var w4={"move-up":"chevron-up","move-down":"chevron-down",duplicate:"copy",copy:"copy","paste-after":"clipboard","delete-block":"trash","template-modal-close":"close","media-modal-close":"close","media-trash-toggle":"trash","media-delete":"trash"};function I4(){for(let e of ve("button")){if(e.closest(".cms-ui-island,.nodedc-color-palette-surface")||e.className.includes("nodedc-")||e.matches(".media-entry,.knowledge-tree-select,.service-media-source-button,.service-media-file-button,.media-breadcrumb-button,.template-card"))continue;let t=e.matches(".icon-action-btn,.collection-icon-btn,.knowledge-tree-action,.secret-toggle-button,.collection-drag-handle,.modal-close-button,.media-header-action"),a=Tn(t?"iconButton":"button");if(je(e,a.className),t){let n=e.getAttribute("aria-label")||e.title||e.textContent;e.setAttribute("aria-label",n),e.title=n;let l=w4[e.id]||(e.classList.contains("secret-toggle-button")?"eye":/удал/i.test(n)?"trash":/добав/i.test(n)?"plus":/выше|вверх|поднять/i.test(n)?"chevron-up":/ниже|вниз|опустить/i.test(n)?"chevron-down":/коп|дублир/i.test(n)?"copy":"move");e.replaceChildren(e.matches(".collection-drag-handle")?Tn("dragHandle").firstElementChild:Tn("icon-"+l))}else{e.dataset.variant=e.matches(".primary-btn,[type=submit]")?"primary":e.matches(".danger-btn")?"danger":"secondary",e.dataset.tone="neutral";let n=a.firstElementChild;n.replaceChildren(...e.childNodes),e.append(n)}}}function k4(){for(let e of ve(".block-btn,.knowledge-tree-select")){je(e,"nodedc-admin-panel__nav-item"),e.dataset.active=String(e.classList.contains("active")||e.closest(".knowledge-tree-row")?.dataset.active==="true");let t=R(".block-name,.knowledge-tree-title",e);t&&(e.title=t.textContent);let a=R(".block-icon,.knowledge-tree-icon",e);a&&!a.dataset.dsIcon&&(a.dataset.dsIcon="true",je(a,"nodedc-admin-panel__nav-icon"),a.replaceChildren(Tn("icon-"+(e.classList.contains("knowledge-tree-select")?"file":"layers"))));let n=R(".block-drag-handle",e);n&&(je(n,"nodedc-drag-handle"),n.dataset.dsIcon||(n.dataset.dsIcon="true",n.replaceChildren(Tn("dragHandle").firstElementChild)))}for(let e of ve(".region-title"))je(e,"nodedc-admin-panel__group-label")}function E4(){for(let e of ve(".knowledge-tree-actions")){let t=ve(":scope > button",e);if(t.length<2)continue;let a=ml(e),n=e.closest(".knowledge-tree-row")?.querySelector(".knowledge-tree-title")?.textContent||"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B",l=t.map(r=>({label:r.title||r.getAttribute("aria-label"),disabled:r.disabled})),o=JSON.stringify([n,l]);o!==a.signature&&(a.signature=o,(0,Nn.flushSync)(()=>a.root.render(qe(ha,{minWidth:240,placement:"bottom-end",trigger:r=>qe(pt,{label:"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F: "+n,ref:i=>{r.setAnchorRef(i),r.setTriggerRef(i)},onClick:r.toggle,"aria-expanded":r.open,"aria-controls":r.surfaceId,"aria-haspopup":"menu"},qe(ie,{name:"chevron-down"}))},({close:r})=>t.map((i,u)=>qe("button",{key:u,type:"button",role:"menuitem",className:"nodedc-dropdown-option",disabled:i.disabled,onClick:()=>{r(),i.click()}},qe("span",null),qe("span",{className:"nodedc-dropdown-option__body"},qe("span",{className:"nodedc-dropdown-option__label"},l[u].label))))))))}}function M4(){let e=matchMedia("(max-width:760px)").matches,t=R("#dirty-state"),a=ml(t),n=t.dataset.dirty==="true"?"warning":"neutral",l=t.textContent,o=JSON.stringify([n,l,e]);a.signature!==o&&(a.signature=o,(0,Nn.flushSync)(()=>a.root.render(qe(dL,{tone:n,variant:e?"indicator":"badge",title:l,"aria-label":l,role:"status"},e?null:l))));let r=R("#cms-mobile-actions-binding");r||(r=document.createElement("span"),r.id="cms-mobile-actions-binding",R(".cms-editor-actions").append(r));let i=ml(r),u=["reload","render","publish"].map(c=>R("#"+c));for(let c of u)c.hidden=e;if(i.host.hidden=!e,!e)return;let s=u.filter(c=>!c.classList.contains("hidden")).map(c=>({button:c,label:c.id==="reload"?"\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435":c.textContent,disabled:c.disabled})),m=JSON.stringify(s.map(({label:c,disabled:p})=>[c,p]));i.signature!==m&&(i.signature=m,(0,Nn.flushSync)(()=>i.root.render(qe(ha,{minWidth:240,placement:"bottom-end",trigger:c=>qe(pt,{label:"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u0441\u0430\u0439\u0442\u043E\u043C",ref:p=>{c.setAnchorRef(p),c.setTriggerRef(p)},onClick:c.toggle,"aria-expanded":c.open,"aria-controls":c.surfaceId,"aria-haspopup":"menu"},qe(ie,{name:"chevron-down"}))},({close:c})=>s.map(({button:p,label:h,disabled:v})=>qe("button",{key:p.id,type:"button",role:"menuitem",className:"nodedc-dropdown-option",disabled:v,onClick:()=>{c(),p.click()}},qe("span",null),qe("span",{className:"nodedc-dropdown-option__body"},qe("span",{className:"nodedc-dropdown-option__label"},h))))))))}function A4(){let e={".service-media-field":"nodedc-media-field",".field-label-row":"nodedc-media-field__label-row",".field-label-text":"nodedc-media-field__label",".service-media-control":"nodedc-media-control",".service-media-file-control":"nodedc-media-file",".service-media-file-button":"nodedc-media-file__button",".service-media-file-name":"nodedc-media-file__name",".service-media-url-input":"nodedc-media-url",".service-media-source-switch":"nodedc-media-source-switch",".service-media-source-button":"nodedc-media-source-button",".service-media-preview":"nodedc-media-preview",".media-upload-hint":"nodedc-media-field__hint",".media-upload-error":"nodedc-media-field__error"};for(let t of ve(".service-media-field")){for(let[n,l]of Object.entries(e))for(let o of t.matches(n)?[t]:ve(n,t))je(o,l);for(let n of ve(".service-media-source-button",t))n.setAttribute("aria-pressed",n.dataset.active);let a=R(".service-media-control",t);a&&(a.dataset.source=R(".service-media-url-input",t).hidden?"file":"url")}}function D4(){for(let e of ve(".template-modal-layer")){let t=R(":scope > article",e),a=R(":scope > header",t),n=R(":scope > footer",t),l=document.createElement("div");l.className="nodedc-window__body";for(let i of[...t.children])i!==a&&i!==n&&l.append(i);a&&(je(a,"nodedc-window__head"),je(R("h2",a),"nodedc-window__title")),n&&je(n,"nodedc-window__footer"),t.replaceChildren(...[a,l,n].filter(Boolean)),t.dataset.size=e.id==="media-modal"||e.id==="template-modal"?"lg":"sm",je(t,"nodedc-glass nodedc-material-rim"),t.dataset.tone="strong";let o=e.getAttribute("aria-labelledby");o&&t.setAttribute("aria-labelledby",o),e.removeAttribute("role"),e.removeAttribute("aria-modal");let r=op({overlay:e,dialog:t,closeOnBackdrop:!1,closeOnEscape:!1,lockBodyScroll:!1});lu.push({overlay:e,dialog:t,controller:r})}for(let e of ve("dialog.site-dialog")){let t=document.createElement("div");t.className="hidden",e.before(t),t.append(e),e.setAttribute("open",""),e.dataset.size="sm",je(e,"nodedc-glass nodedc-material-rim"),e.dataset.tone="strong";let a=R("form",e),n=document.createElement("header"),l=document.createElement("div"),o=R(".site-dialog-actions",a);n.className="nodedc-window__head",l.className="nodedc-window__body";let r=document.createElement("div");r.className="nodedc-window__titles",n.append(r);let i=R("h2",a);i.id=e.id+"-title",e.setAttribute("aria-labelledby",i.id),i.className="nodedc-window__title",r.append(i),l.append(...[...a.childNodes].filter(m=>m!==o)),o.classList.add("nodedc-window__footer"),a.replaceChildren(n,l,o);let u,s=op({overlay:t,dialog:e,closeOnEscape:!0,lockBodyScroll:!1,onOpenChange:m=>{t.classList.toggle("hidden",!m),m||requestAnimationFrame(()=>u?.focus())}});e.showModal=()=>{u=document.activeElement,document.body.append(t),t.classList.remove("hidden"),s.open()},e.close=()=>{t.classList.add("hidden"),s.close()},lu.push({overlay:t,dialog:e,controller:s})}}function dp(){sp?.disconnect();try{for(let[n,l]of ou)n.isConnected||(l.root.unmount(),l.host.remove(),ou.delete(n));C4(),S4(),v4(),y4(),L4(),b4(),I4(),k4(),E4(),M4(),A4(),R("#cms-shell").inert=!1;for(let n of lu)n.dialog.inert=!1;for(let n of lu){let l=!n.overlay.classList.contains("hidden");l&&!n.controller.isOpen()?(document.body.append(n.overlay),n.controller.open()):!l&&n.controller.isOpen()&&n.controller.close()}let e=ve(".nodedc-overlay:not(.hidden):not([hidden])").at(-1);R("#cms-shell").inert=!!e;for(let n of lu)n.dialog.inert=!!(e&&n.overlay!==e);R("#delete-modal-body").textContent==="\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430?"&&(R("#delete-modal-body").textContent="\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442?"),R("#delete-modal-confirm").textContent.trim()==="\u0414\u0430"&&(R("#delete-modal-confirm").textContent="\u0423\u0434\u0430\u043B\u0438\u0442\u044C");let t=R("#regions > section:first-child .block-btn");if(t){let n=t.closest(".cms-static-row");n||(n=document.createElement("div"),n.className="cms-static-row",t.before(n),n.append(t)),n.append(cd)}else cd&&R("#cms-add-block-parking").append(cd);let a=R("#dirty-state");a.dataset.tone=a.dataset.dirty==="true"?"warning":"neutral";for(let n of ve(".nodedc-header__nav-item"))n.dataset.active==="true"?n.setAttribute("aria-current","page"):n.removeAttribute("aria-current")}finally{sp?.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","disabled","data-dirty","data-active","hidden","aria-valuenow"]})}}function _L(){RL(),cd=R("#add-block");for(let a of ve("[data-cms-mode]"))a.closest("button").id="admin-mode-"+a.dataset.cmsMode;R(".nodedc-header-navigation").classList.add("nodedc-expanded-nav-group"),R(".nodedc-admin-panel__nav").id="regions",R(".nodedc-application-panel__titles h1").id="selected-title",R(".nodedc-application-panel__titles p").id="selected-region",R("#status").setAttribute("role","status"),R("#status").setAttribute("aria-live","polite");let e=R("#cms-shell"),t=kL({navigationOpen:!0,activeView:"cms",contentExpanded:!0,onChange:a=>{R(".cms-stage").hidden=a.navigationOpen||a.contentOpen,e.dataset.navigationOpen=String(a.navigationOpen),e.dataset.contentOpen=String(a.contentOpen),e.dataset.contentExpanded=String(a.contentExpanded),R(".nodedc-app-shell__navigation").hidden=!a.navigationOpen,R(".nodedc-app-shell__navigation").inert=matchMedia("(max-width:760px)").matches&&a.contentOpen,R(".nodedc-app-shell__content").hidden=!a.contentOpen}});matchMedia("(max-width:760px)").addEventListener("change",a=>{R(".nodedc-app-shell__navigation").inert=a.matches&&t.getState().contentOpen,Dn()}),R("#toggle-navigation").onclick=()=>{matchMedia("(max-width:760px)").matches&&t.getState().contentOpen&&t.closeView(),t.openNavigation()},R("#open-navigation").onclick=()=>t.openNavigation(),R(".nodedc-admin-panel__close").onclick=()=>t.closeNavigation(),R(".nodedc-application-panel [data-action=close]").onclick=()=>{t.closeView(),t.openNavigation()},document.addEventListener("click",a=>{a.target.closest(".block-btn,.knowledge-tree-select,#project-settings,#admin-mode-content,#admin-mode-seo,#admin-mode-knowledge")&&(t.openView("cms"),queueMicrotask(()=>R(".nodedc-application-panel__body").scrollTop=0)),Dn()}),document.addEventListener("input",Dn),document.addEventListener("change",Dn),D4(),dp(),sp=new MutationObserver(Dn),dp()}_L();await Promise.resolve().then(()=>(uS(),FI));