iobroker.iot 4.1.12 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/admin/assets/{index-Gvs5btlt.js → index-C4_fq7Q6.js} +2 -2
- package/admin/index_m.html +1 -1
- package/build/lib/AlexaSmartHomeV3/Alexa/Properties/Base.js +2 -0
- package/build/lib/AlexaSmartHomeV3/Alexa/Properties/Base.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Alexa/Properties/Brightness.js +16 -12
- package/build/lib/AlexaSmartHomeV3/Alexa/Properties/Brightness.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/Control.js +4 -0
- package/build/lib/AlexaSmartHomeV3/Controls/Control.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/Ct.js +26 -40
- package/build/lib/AlexaSmartHomeV3/Controls/Ct.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/Dimmer.js +33 -4
- package/build/lib/AlexaSmartHomeV3/Controls/Dimmer.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/Hue.js +32 -40
- package/build/lib/AlexaSmartHomeV3/Controls/Hue.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/Rgb.js +33 -43
- package/build/lib/AlexaSmartHomeV3/Controls/Rgb.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/RgbSingle.js +49 -11
- package/build/lib/AlexaSmartHomeV3/Controls/RgbSingle.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/RgbwSingle.js +38 -46
- package/build/lib/AlexaSmartHomeV3/Controls/RgbwSingle.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Helpers/AdapterProvider.js +9 -0
- package/build/lib/AlexaSmartHomeV3/Helpers/AdapterProvider.js.map +1 -1
- package/io-package.json +14 -14
- package/package.json +1 -1
|
@@ -37,7 +37,7 @@ var gI=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var cwt=gI((Yn,Zn
|
|
|
37
37
|
`+S[R].replace(" at new "," at ");return i.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",i.displayName)),V}while(1<=R&&0<=F);break}}}finally{ce=!1,Error.prepareStackTrace=h}return(i=i?i.displayName||i.name:"")?J(i):""}function pe(i){switch(i.tag){case 5:return J(i.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return i=de(i.type,!1),i;case 11:return i=de(i.type.render,!1),i;case 1:return i=de(i.type,!0),i;default:return""}}function me(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case M:return"Fragment";case E:return"Portal";case z:return"Profiler";case j:return"StrictMode";case U:return"Suspense";case H:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case L:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case W:var c=i.render;return i=i.displayName,i||(i=c.displayName||c.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case B:return c=i.displayName||null,c!==null?c:me(i.type)||"Memo";case K:c=i._payload,i=i._init;try{return me(i(c))}catch{}}return null}function Oe(i){var c=i.type;switch(i.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=c.render,i=i.displayName||i.name||"",c.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(c);case 8:return c===j?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function $e(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function De(i){var c=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function Te(i){var c=De(i)?"checked":"value",h=Object.getOwnPropertyDescriptor(i.constructor.prototype,c),v=""+i[c];if(!i.hasOwnProperty(c)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var S=h.get,k=h.set;return Object.defineProperty(i,c,{configurable:!0,get:function(){return S.call(this)},set:function(R){v=""+R,k.call(this,R)}}),Object.defineProperty(i,c,{enumerable:h.enumerable}),{getValue:function(){return v},setValue:function(R){v=""+R},stopTracking:function(){i._valueTracker=null,delete i[c]}}}}function qe(i){i._valueTracker||(i._valueTracker=Te(i))}function Ne(i){if(!i)return!1;var c=i._valueTracker;if(!c)return!0;var h=c.getValue(),v="";return i&&(v=De(i)?i.checked?"true":"false":i.value),i=v,i!==h?(c.setValue(i),!0):!1}function it(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function xe(i,c){var h=c.checked;return ne({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:h??i._wrapperState.initialChecked})}function Ae(i,c){var h=c.defaultValue==null?"":c.defaultValue,v=c.checked!=null?c.checked:c.defaultChecked;h=$e(c.value!=null?c.value:h),i._wrapperState={initialChecked:v,initialValue:h,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function kt(i,c){c=c.checked,c!=null&&O(i,"checked",c,!1)}function we(i,c){kt(i,c);var h=$e(c.value),v=c.type;if(h!=null)v==="number"?(h===0&&i.value===""||i.value!=h)&&(i.value=""+h):i.value!==""+h&&(i.value=""+h);else if(v==="submit"||v==="reset"){i.removeAttribute("value");return}c.hasOwnProperty("value")?ft(i,c.type,h):c.hasOwnProperty("defaultValue")&&ft(i,c.type,$e(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(i.defaultChecked=!!c.defaultChecked)}function Ge(i,c,h){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var v=c.type;if(!(v!=="submit"&&v!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+i._wrapperState.initialValue,h||c===i.value||(i.value=c),i.defaultValue=c}h=i.name,h!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,h!==""&&(i.name=h)}function ft(i,c,h){(c!=="number"||it(i.ownerDocument)!==i)&&(h==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+h&&(i.defaultValue=""+h))}var lt=Array.isArray;function st(i,c,h,v){if(i=i.options,c){c={};for(var S=0;S<h.length;S++)c["$"+h[S]]=!0;for(h=0;h<i.length;h++)S=c.hasOwnProperty("$"+i[h].value),i[h].selected!==S&&(i[h].selected=S),S&&v&&(i[h].defaultSelected=!0)}else{for(h=""+$e(h),c=null,S=0;S<i.length;S++){if(i[S].value===h){i[S].selected=!0,v&&(i[S].defaultSelected=!0);return}c!==null||i[S].disabled||(c=i[S])}c!==null&&(c.selected=!0)}}function Se(i,c){if(c.dangerouslySetInnerHTML!=null)throw Error(r(91));return ne({},c,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function vt(i,c){var h=c.value;if(h==null){if(h=c.children,c=c.defaultValue,h!=null){if(c!=null)throw Error(r(92));if(lt(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),h=c}i._wrapperState={initialValue:$e(h)}}function le(i,c){var h=$e(c.value),v=$e(c.defaultValue);h!=null&&(h=""+h,h!==i.value&&(i.value=h),c.defaultValue==null&&i.defaultValue!==h&&(i.defaultValue=h)),v!=null&&(i.defaultValue=""+v)}function be(i){var c=i.textContent;c===i._wrapperState.initialValue&&c!==""&&c!==null&&(i.value=c)}function Ze(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function nt(i,c){return i==null||i==="http://www.w3.org/1999/xhtml"?Ze(c):i==="http://www.w3.org/2000/svg"&&c==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Qe,Wt=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(c,h,v,S){MSApp.execUnsafeLocalFunction(function(){return i(c,h,v,S)})}:i})(function(i,c){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=c;else{for(Qe=Qe||document.createElement("div"),Qe.innerHTML="<svg>"+c.valueOf().toString()+"</svg>",c=Qe.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;c.firstChild;)i.appendChild(c.firstChild)}});function Lt(i,c){if(c){var h=i.firstChild;if(h&&h===i.lastChild&&h.nodeType===3){h.nodeValue=c;return}}i.textContent=c}var ot={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lr=["Webkit","ms","Moz","O"];Object.keys(ot).forEach(function(i){lr.forEach(function(c){c=c+i.charAt(0).toUpperCase()+i.substring(1),ot[c]=ot[i]})});function It(i,c,h){return c==null||typeof c=="boolean"||c===""?"":h||typeof c!="number"||c===0||ot.hasOwnProperty(i)&&ot[i]?(""+c).trim():c+"px"}function ke(i,c){i=i.style;for(var h in c)if(c.hasOwnProperty(h)){var v=h.indexOf("--")===0,S=It(h,c[h],v);h==="float"&&(h="cssFloat"),v?i.setProperty(h,S):i[h]=S}}var yt=ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Nt(i,c){if(c){if(yt[i]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(r(137,i));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(r(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(r(61))}if(c.style!=null&&typeof c.style!="object")throw Error(r(62))}}function zr(i,c){if(i.indexOf("-")===-1)return typeof c.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Pr=null;function no(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Hs=null,Uo=null,oo=null;function Vi(i){if(i=id(i)){if(typeof Hs!="function")throw Error(r(280));var c=i.stateNode;c&&(c=kp(c),Hs(i.stateNode,i.type,c))}}function qi(i){Uo?oo?oo.push(i):oo=[i]:Uo=i}function Gi(){if(Uo){var i=Uo,c=oo;if(oo=Uo=null,Vi(i),c)for(i=0;i<c.length;i++)Vi(c[i])}}function Ji(i,c){return i(c)}function ht(){}var wn=!1;function je(i,c,h){if(wn)return i(c,h);wn=!0;try{return Ji(i,c,h)}finally{wn=!1,(Uo!==null||oo!==null)&&(ht(),Gi())}}function Ye(i,c){var h=i.stateNode;if(h===null)return null;var v=kp(h);if(v===null)return null;h=v[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(i=i.type,v=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!v;break e;default:i=!1}if(i)return null;if(h&&typeof h!="function")throw Error(r(231,c,typeof h));return h}var Ot=!1;if(l)try{var St={};Object.defineProperty(St,"passive",{get:function(){Ot=!0}}),window.addEventListener("test",St,St),window.removeEventListener("test",St,St)}catch{Ot=!1}function _r(i,c,h,v,S,k,R,F,V){var te=Array.prototype.slice.call(arguments,3);try{c.apply(h,te)}catch(he){this.onError(he)}}var Yr=!1,ao=null,Vo=!1,Xi=null,Wc={onError:function(i){Yr=!0,ao=i}};function kD(i,c,h,v,S,k,R,F,V){Yr=!1,ao=null,_r.apply(Wc,arguments)}function CD(i,c,h,v,S,k,R,F,V){if(kD.apply(this,arguments),Yr){if(Yr){var te=ao;Yr=!1,ao=null}else throw Error(r(198));Vo||(Vo=!0,Xi=te)}}function Us(i){var c=i,h=i;if(i.alternate)for(;c.return;)c=c.return;else{i=c;do c=i,(c.flags&4098)!==0&&(h=c.return),i=c.return;while(i)}return c.tag===3?h:null}function Qw(i){if(i.tag===13){var c=i.memoizedState;if(c===null&&(i=i.alternate,i!==null&&(c=i.memoizedState)),c!==null)return c.dehydrated}return null}function eS(i){if(Us(i)!==i)throw Error(r(188))}function $D(i){var c=i.alternate;if(!c){if(c=Us(i),c===null)throw Error(r(188));return c!==i?null:i}for(var h=i,v=c;;){var S=h.return;if(S===null)break;var k=S.alternate;if(k===null){if(v=S.return,v!==null){h=v;continue}break}if(S.child===k.child){for(k=S.child;k;){if(k===h)return eS(S),i;if(k===v)return eS(S),c;k=k.sibling}throw Error(r(188))}if(h.return!==v.return)h=S,v=k;else{for(var R=!1,F=S.child;F;){if(F===h){R=!0,h=S,v=k;break}if(F===v){R=!0,v=S,h=k;break}F=F.sibling}if(!R){for(F=k.child;F;){if(F===h){R=!0,h=k,v=S;break}if(F===v){R=!0,v=k,h=S;break}F=F.sibling}if(!R)throw Error(r(189))}}if(h.alternate!==v)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?i:c}function tS(i){return i=$D(i),i!==null?rS(i):null}function rS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var c=rS(i);if(c!==null)return c;i=i.sibling}return null}var nS=e.unstable_scheduleCallback,oS=e.unstable_cancelCallback,TD=e.unstable_shouldYield,ED=e.unstable_requestPaint,xr=e.unstable_now,OD=e.unstable_getCurrentPriorityLevel,Gm=e.unstable_ImmediatePriority,aS=e.unstable_UserBlockingPriority,op=e.unstable_NormalPriority,DD=e.unstable_LowPriority,sS=e.unstable_IdlePriority,ap=null,qo=null;function AD(i){if(qo&&typeof qo.onCommitFiberRoot=="function")try{qo.onCommitFiberRoot(ap,i,void 0,(i.current.flags&128)===128)}catch{}}var xo=Math.clz32?Math.clz32:MD,ID=Math.log,ND=Math.LN2;function MD(i){return i>>>=0,i===0?32:31-(ID(i)/ND|0)|0}var sp=64,ip=4194304;function Hc(i){switch(i&-i){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: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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function lp(i,c){var h=i.pendingLanes;if(h===0)return 0;var v=0,S=i.suspendedLanes,k=i.pingedLanes,R=h&268435455;if(R!==0){var F=R&~S;F!==0?v=Hc(F):(k&=R,k!==0&&(v=Hc(k)))}else R=h&~S,R!==0?v=Hc(R):k!==0&&(v=Hc(k));if(v===0)return 0;if(c!==0&&c!==v&&(c&S)===0&&(S=v&-v,k=c&-c,S>=k||S===16&&(k&4194240)!==0))return c;if((v&4)!==0&&(v|=h&16),c=i.entangledLanes,c!==0)for(i=i.entanglements,c&=v;0<c;)h=31-xo(c),S=1<<h,v|=i[h],c&=~S;return v}function RD(i,c){switch(i){case 1:case 2:case 4:return c+250;case 8:case 16:case 32:case 64: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 c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jD(i,c){for(var h=i.suspendedLanes,v=i.pingedLanes,S=i.expirationTimes,k=i.pendingLanes;0<k;){var R=31-xo(k),F=1<<R,V=S[R];V===-1?((F&h)===0||(F&v)!==0)&&(S[R]=RD(F,c)):V<=c&&(i.expiredLanes|=F),k&=~F}}function Jm(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function iS(){var i=sp;return sp<<=1,(sp&4194240)===0&&(sp=64),i}function Xm(i){for(var c=[],h=0;31>h;h++)c.push(i);return c}function Uc(i,c,h){i.pendingLanes|=c,c!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,c=31-xo(c),i[c]=h}function zD(i,c){var h=i.pendingLanes&~c;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=c,i.mutableReadLanes&=c,i.entangledLanes&=c,c=i.entanglements;var v=i.eventTimes;for(i=i.expirationTimes;0<h;){var S=31-xo(h),k=1<<S;c[S]=0,v[S]=-1,i[S]=-1,h&=~k}}function Km(i,c){var h=i.entangledLanes|=c;for(i=i.entanglements;h;){var v=31-xo(h),S=1<<v;S&c|i[v]&c&&(i[v]|=c),h&=~S}}var Ft=0;function lS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var cS,Ym,dS,uS,pS,Zm=!1,cp=[],Ga=null,Ja=null,Xa=null,Vc=new Map,qc=new Map,Ka=[],PD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function hS(i,c){switch(i){case"focusin":case"focusout":Ga=null;break;case"dragenter":case"dragleave":Ja=null;break;case"mouseover":case"mouseout":Xa=null;break;case"pointerover":case"pointerout":Vc.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":qc.delete(c.pointerId)}}function Gc(i,c,h,v,S,k){return i===null||i.nativeEvent!==k?(i={blockedOn:c,domEventName:h,eventSystemFlags:v,nativeEvent:k,targetContainers:[S]},c!==null&&(c=id(c),c!==null&&Ym(c)),i):(i.eventSystemFlags|=v,c=i.targetContainers,S!==null&&c.indexOf(S)===-1&&c.push(S),i)}function LD(i,c,h,v,S){switch(c){case"focusin":return Ga=Gc(Ga,i,c,h,v,S),!0;case"dragenter":return Ja=Gc(Ja,i,c,h,v,S),!0;case"mouseover":return Xa=Gc(Xa,i,c,h,v,S),!0;case"pointerover":var k=S.pointerId;return Vc.set(k,Gc(Vc.get(k)||null,i,c,h,v,S)),!0;case"gotpointercapture":return k=S.pointerId,qc.set(k,Gc(qc.get(k)||null,i,c,h,v,S)),!0}return!1}function fS(i){var c=Vs(i.target);if(c!==null){var h=Us(c);if(h!==null){if(c=h.tag,c===13){if(c=Qw(h),c!==null){i.blockedOn=c,pS(i.priority,function(){dS(h)});return}}else if(c===3&&h.stateNode.current.memoizedState.isDehydrated){i.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}i.blockedOn=null}function dp(i){if(i.blockedOn!==null)return!1;for(var c=i.targetContainers;0<c.length;){var h=eg(i.domEventName,i.eventSystemFlags,c[0],i.nativeEvent);if(h===null){h=i.nativeEvent;var v=new h.constructor(h.type,h);Pr=v,h.target.dispatchEvent(v),Pr=null}else return c=id(h),c!==null&&Ym(c),i.blockedOn=h,!1;c.shift()}return!0}function mS(i,c,h){dp(i)&&h.delete(c)}function FD(){Zm=!1,Ga!==null&&dp(Ga)&&(Ga=null),Ja!==null&&dp(Ja)&&(Ja=null),Xa!==null&&dp(Xa)&&(Xa=null),Vc.forEach(mS),qc.forEach(mS)}function Jc(i,c){i.blockedOn===c&&(i.blockedOn=null,Zm||(Zm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,FD)))}function Xc(i){function c(S){return Jc(S,i)}if(0<cp.length){Jc(cp[0],i);for(var h=1;h<cp.length;h++){var v=cp[h];v.blockedOn===i&&(v.blockedOn=null)}}for(Ga!==null&&Jc(Ga,i),Ja!==null&&Jc(Ja,i),Xa!==null&&Jc(Xa,i),Vc.forEach(c),qc.forEach(c),h=0;h<Ka.length;h++)v=Ka[h],v.blockedOn===i&&(v.blockedOn=null);for(;0<Ka.length&&(h=Ka[0],h.blockedOn===null);)fS(h),h.blockedOn===null&&Ka.shift()}var Ki=I.ReactCurrentBatchConfig,up=!0;function BD(i,c,h,v){var S=Ft,k=Ki.transition;Ki.transition=null;try{Ft=1,Qm(i,c,h,v)}finally{Ft=S,Ki.transition=k}}function WD(i,c,h,v){var S=Ft,k=Ki.transition;Ki.transition=null;try{Ft=4,Qm(i,c,h,v)}finally{Ft=S,Ki.transition=k}}function Qm(i,c,h,v){if(up){var S=eg(i,c,h,v);if(S===null)_g(i,c,v,pp,h),hS(i,v);else if(LD(S,i,c,h,v))v.stopPropagation();else if(hS(i,v),c&4&&-1<PD.indexOf(i)){for(;S!==null;){var k=id(S);if(k!==null&&cS(k),k=eg(i,c,h,v),k===null&&_g(i,c,v,pp,h),k===S)break;S=k}S!==null&&v.stopPropagation()}else _g(i,c,v,null,h)}}var pp=null;function eg(i,c,h,v){if(pp=null,i=no(v),i=Vs(i),i!==null)if(c=Us(i),c===null)i=null;else if(h=c.tag,h===13){if(i=Qw(c),i!==null)return i;i=null}else if(h===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;i=null}else c!==i&&(i=null);return pp=i,null}function gS(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(OD()){case Gm:return 1;case aS:return 4;case op:case DD:return 16;case sS:return 536870912;default:return 16}default:return 16}}var Ya=null,tg=null,hp=null;function _S(){if(hp)return hp;var i,c=tg,h=c.length,v,S="value"in Ya?Ya.value:Ya.textContent,k=S.length;for(i=0;i<h&&c[i]===S[i];i++);var R=h-i;for(v=1;v<=R&&c[h-v]===S[k-v];v++);return hp=S.slice(i,1<v?1-v:void 0)}function fp(i){var c=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&c===13&&(i=13)):i=c,i===10&&(i=13),32<=i||i===13?i:0}function mp(){return!0}function vS(){return!1}function Bn(i){function c(h,v,S,k,R){this._reactName=h,this._targetInst=S,this.type=v,this.nativeEvent=k,this.target=R,this.currentTarget=null;for(var F in i)i.hasOwnProperty(F)&&(h=i[F],this[F]=h?h(k):k[F]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?mp:vS,this.isPropagationStopped=vS,this}return ne(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=mp)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=mp)},persist:function(){},isPersistent:mp}),c}var Yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rg=Bn(Yi),Kc=ne({},Yi,{view:0,detail:0}),HD=Bn(Kc),ng,og,Yc,gp=ne({},Kc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sg,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Yc&&(Yc&&i.type==="mousemove"?(ng=i.screenX-Yc.screenX,og=i.screenY-Yc.screenY):og=ng=0,Yc=i),ng)},movementY:function(i){return"movementY"in i?i.movementY:og}}),yS=Bn(gp),UD=ne({},gp,{dataTransfer:0}),VD=Bn(UD),qD=ne({},Kc,{relatedTarget:0}),ag=Bn(qD),GD=ne({},Yi,{animationName:0,elapsedTime:0,pseudoElement:0}),JD=Bn(GD),XD=ne({},Yi,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),KD=Bn(XD),YD=ne({},Yi,{data:0}),bS=Bn(YD),ZD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},QD={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},eA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tA(i){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(i):(i=eA[i])?!!c[i]:!1}function sg(){return tA}var rA=ne({},Kc,{key:function(i){if(i.key){var c=ZD[i.key]||i.key;if(c!=="Unidentified")return c}return i.type==="keypress"?(i=fp(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?QD[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sg,charCode:function(i){return i.type==="keypress"?fp(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?fp(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),nA=Bn(rA),oA=ne({},gp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wS=Bn(oA),aA=ne({},Kc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sg}),sA=Bn(aA),iA=ne({},Yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),lA=Bn(iA),cA=ne({},gp,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),dA=Bn(cA),uA=[9,13,27,32],ig=l&&"CompositionEvent"in window,Zc=null;l&&"documentMode"in document&&(Zc=document.documentMode);var pA=l&&"TextEvent"in window&&!Zc,SS=l&&(!ig||Zc&&8<Zc&&11>=Zc),xS=" ",kS=!1;function CS(i,c){switch(i){case"keyup":return uA.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $S(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Zi=!1;function hA(i,c){switch(i){case"compositionend":return $S(c);case"keypress":return c.which!==32?null:(kS=!0,xS);case"textInput":return i=c.data,i===xS&&kS?null:i;default:return null}}function fA(i,c){if(Zi)return i==="compositionend"||!ig&&CS(i,c)?(i=_S(),hp=tg=Ya=null,Zi=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return SS&&c.locale!=="ko"?null:c.data;default:return null}}var mA={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function TS(i){var c=i&&i.nodeName&&i.nodeName.toLowerCase();return c==="input"?!!mA[i.type]:c==="textarea"}function ES(i,c,h,v){qi(v),c=wp(c,"onChange"),0<c.length&&(h=new rg("onChange","change",null,h,v),i.push({event:h,listeners:c}))}var Qc=null,ed=null;function gA(i){qS(i,0)}function _p(i){var c=nl(i);if(Ne(c))return i}function _A(i,c){if(i==="change")return c}var OS=!1;if(l){var lg;if(l){var cg="oninput"in document;if(!cg){var DS=document.createElement("div");DS.setAttribute("oninput","return;"),cg=typeof DS.oninput=="function"}lg=cg}else lg=!1;OS=lg&&(!document.documentMode||9<document.documentMode)}function AS(){Qc&&(Qc.detachEvent("onpropertychange",IS),ed=Qc=null)}function IS(i){if(i.propertyName==="value"&&_p(ed)){var c=[];ES(c,ed,i,no(i)),je(gA,c)}}function vA(i,c,h){i==="focusin"?(AS(),Qc=c,ed=h,Qc.attachEvent("onpropertychange",IS)):i==="focusout"&&AS()}function yA(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return _p(ed)}function bA(i,c){if(i==="click")return _p(c)}function wA(i,c){if(i==="input"||i==="change")return _p(c)}function SA(i,c){return i===c&&(i!==0||1/i===1/c)||i!==i&&c!==c}var ko=typeof Object.is=="function"?Object.is:SA;function td(i,c){if(ko(i,c))return!0;if(typeof i!="object"||i===null||typeof c!="object"||c===null)return!1;var h=Object.keys(i),v=Object.keys(c);if(h.length!==v.length)return!1;for(v=0;v<h.length;v++){var S=h[v];if(!d.call(c,S)||!ko(i[S],c[S]))return!1}return!0}function NS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function MS(i,c){var h=NS(i);i=0;for(var v;h;){if(h.nodeType===3){if(v=i+h.textContent.length,i<=c&&v>=c)return{node:h,offset:c-i};i=v}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=NS(h)}}function RS(i,c){return i&&c?i===c?!0:i&&i.nodeType===3?!1:c&&c.nodeType===3?RS(i,c.parentNode):"contains"in i?i.contains(c):i.compareDocumentPosition?!!(i.compareDocumentPosition(c)&16):!1:!1}function jS(){for(var i=window,c=it();c instanceof i.HTMLIFrameElement;){try{var h=typeof c.contentWindow.location.href=="string"}catch{h=!1}if(h)i=c.contentWindow;else break;c=it(i.document)}return c}function dg(i){var c=i&&i.nodeName&&i.nodeName.toLowerCase();return c&&(c==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||c==="textarea"||i.contentEditable==="true")}function xA(i){var c=jS(),h=i.focusedElem,v=i.selectionRange;if(c!==h&&h&&h.ownerDocument&&RS(h.ownerDocument.documentElement,h)){if(v!==null&&dg(h)){if(c=v.start,i=v.end,i===void 0&&(i=c),"selectionStart"in h)h.selectionStart=c,h.selectionEnd=Math.min(i,h.value.length);else if(i=(c=h.ownerDocument||document)&&c.defaultView||window,i.getSelection){i=i.getSelection();var S=h.textContent.length,k=Math.min(v.start,S);v=v.end===void 0?k:Math.min(v.end,S),!i.extend&&k>v&&(S=v,v=k,k=S),S=MS(h,k);var R=MS(h,v);S&&R&&(i.rangeCount!==1||i.anchorNode!==S.node||i.anchorOffset!==S.offset||i.focusNode!==R.node||i.focusOffset!==R.offset)&&(c=c.createRange(),c.setStart(S.node,S.offset),i.removeAllRanges(),k>v?(i.addRange(c),i.extend(R.node,R.offset)):(c.setEnd(R.node,R.offset),i.addRange(c)))}}for(c=[],i=h;i=i.parentNode;)i.nodeType===1&&c.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<c.length;h++)i=c[h],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var kA=l&&"documentMode"in document&&11>=document.documentMode,Qi=null,ug=null,rd=null,pg=!1;function zS(i,c,h){var v=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;pg||Qi==null||Qi!==it(v)||(v=Qi,"selectionStart"in v&&dg(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),rd&&td(rd,v)||(rd=v,v=wp(ug,"onSelect"),0<v.length&&(c=new rg("onSelect","select",null,c,h),i.push({event:c,listeners:v}),c.target=Qi)))}function vp(i,c){var h={};return h[i.toLowerCase()]=c.toLowerCase(),h["Webkit"+i]="webkit"+c,h["Moz"+i]="moz"+c,h}var el={animationend:vp("Animation","AnimationEnd"),animationiteration:vp("Animation","AnimationIteration"),animationstart:vp("Animation","AnimationStart"),transitionend:vp("Transition","TransitionEnd")},hg={},PS={};l&&(PS=document.createElement("div").style,"AnimationEvent"in window||(delete el.animationend.animation,delete el.animationiteration.animation,delete el.animationstart.animation),"TransitionEvent"in window||delete el.transitionend.transition);function yp(i){if(hg[i])return hg[i];if(!el[i])return i;var c=el[i],h;for(h in c)if(c.hasOwnProperty(h)&&h in PS)return hg[i]=c[h];return i}var LS=yp("animationend"),FS=yp("animationiteration"),BS=yp("animationstart"),WS=yp("transitionend"),HS=new Map,US="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Za(i,c){HS.set(i,c),a(c,[i])}for(var fg=0;fg<US.length;fg++){var mg=US[fg],CA=mg.toLowerCase(),$A=mg[0].toUpperCase()+mg.slice(1);Za(CA,"on"+$A)}Za(LS,"onAnimationEnd"),Za(FS,"onAnimationIteration"),Za(BS,"onAnimationStart"),Za("dblclick","onDoubleClick"),Za("focusin","onFocus"),Za("focusout","onBlur"),Za(WS,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nd="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),TA=new Set("cancel close invalid load scroll toggle".split(" ").concat(nd));function VS(i,c,h){var v=i.type||"unknown-event";i.currentTarget=h,CD(v,c,void 0,i),i.currentTarget=null}function qS(i,c){c=(c&4)!==0;for(var h=0;h<i.length;h++){var v=i[h],S=v.event;v=v.listeners;e:{var k=void 0;if(c)for(var R=v.length-1;0<=R;R--){var F=v[R],V=F.instance,te=F.currentTarget;if(F=F.listener,V!==k&&S.isPropagationStopped())break e;VS(S,F,te),k=V}else for(R=0;R<v.length;R++){if(F=v[R],V=F.instance,te=F.currentTarget,F=F.listener,V!==k&&S.isPropagationStopped())break e;VS(S,F,te),k=V}}}if(Vo)throw i=Xi,Vo=!1,Xi=null,i}function ar(i,c){var h=c[xg];h===void 0&&(h=c[xg]=new Set);var v=i+"__bubble";h.has(v)||(GS(c,i,2,!1),h.add(v))}function gg(i,c,h){var v=0;c&&(v|=4),GS(h,i,v,c)}var bp="_reactListening"+Math.random().toString(36).slice(2);function od(i){if(!i[bp]){i[bp]=!0,n.forEach(function(h){h!=="selectionchange"&&(TA.has(h)||gg(h,!1,i),gg(h,!0,i))});var c=i.nodeType===9?i:i.ownerDocument;c===null||c[bp]||(c[bp]=!0,gg("selectionchange",!1,c))}}function GS(i,c,h,v){switch(gS(c)){case 1:var S=BD;break;case 4:S=WD;break;default:S=Qm}h=S.bind(null,c,h,i),S=void 0,!Ot||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(S=!0),v?S!==void 0?i.addEventListener(c,h,{capture:!0,passive:S}):i.addEventListener(c,h,!0):S!==void 0?i.addEventListener(c,h,{passive:S}):i.addEventListener(c,h,!1)}function _g(i,c,h,v,S){var k=v;if((c&1)===0&&(c&2)===0&&v!==null)e:for(;;){if(v===null)return;var R=v.tag;if(R===3||R===4){var F=v.stateNode.containerInfo;if(F===S||F.nodeType===8&&F.parentNode===S)break;if(R===4)for(R=v.return;R!==null;){var V=R.tag;if((V===3||V===4)&&(V=R.stateNode.containerInfo,V===S||V.nodeType===8&&V.parentNode===S))return;R=R.return}for(;F!==null;){if(R=Vs(F),R===null)return;if(V=R.tag,V===5||V===6){v=k=R;continue e}F=F.parentNode}}v=v.return}je(function(){var te=k,he=no(h),_e=[];e:{var ue=HS.get(i);if(ue!==void 0){var Ee=rg,Be=i;switch(i){case"keypress":if(fp(h)===0)break e;case"keydown":case"keyup":Ee=nA;break;case"focusin":Be="focus",Ee=ag;break;case"focusout":Be="blur",Ee=ag;break;case"beforeblur":case"afterblur":Ee=ag;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ee=yS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ee=VD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ee=sA;break;case LS:case FS:case BS:Ee=JD;break;case WS:Ee=lA;break;case"scroll":Ee=HD;break;case"wheel":Ee=dA;break;case"copy":case"cut":case"paste":Ee=KD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ee=wS}var He=(c&4)!==0,kr=!He&&i==="scroll",Y=He?ue!==null?ue+"Capture":null:ue;He=[];for(var G=te,Q;G!==null;){Q=G;var ve=Q.stateNode;if(Q.tag===5&&ve!==null&&(Q=ve,Y!==null&&(ve=Ye(G,Y),ve!=null&&He.push(ad(G,ve,Q)))),kr)break;G=G.return}0<He.length&&(ue=new Ee(ue,Be,null,h,he),_e.push({event:ue,listeners:He}))}}if((c&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",Ee=i==="mouseout"||i==="pointerout",ue&&h!==Pr&&(Be=h.relatedTarget||h.fromElement)&&(Vs(Be)||Be[ba]))break e;if((Ee||ue)&&(ue=he.window===he?he:(ue=he.ownerDocument)?ue.defaultView||ue.parentWindow:window,Ee?(Be=h.relatedTarget||h.toElement,Ee=te,Be=Be?Vs(Be):null,Be!==null&&(kr=Us(Be),Be!==kr||Be.tag!==5&&Be.tag!==6)&&(Be=null)):(Ee=null,Be=te),Ee!==Be)){if(He=yS,ve="onMouseLeave",Y="onMouseEnter",G="mouse",(i==="pointerout"||i==="pointerover")&&(He=wS,ve="onPointerLeave",Y="onPointerEnter",G="pointer"),kr=Ee==null?ue:nl(Ee),Q=Be==null?ue:nl(Be),ue=new He(ve,G+"leave",Ee,h,he),ue.target=kr,ue.relatedTarget=Q,ve=null,Vs(he)===te&&(He=new He(Y,G+"enter",Be,h,he),He.target=Q,He.relatedTarget=kr,ve=He),kr=ve,Ee&&Be)t:{for(He=Ee,Y=Be,G=0,Q=He;Q;Q=tl(Q))G++;for(Q=0,ve=Y;ve;ve=tl(ve))Q++;for(;0<G-Q;)He=tl(He),G--;for(;0<Q-G;)Y=tl(Y),Q--;for(;G--;){if(He===Y||Y!==null&&He===Y.alternate)break t;He=tl(He),Y=tl(Y)}He=null}else He=null;Ee!==null&&JS(_e,ue,Ee,He,!1),Be!==null&&kr!==null&&JS(_e,kr,Be,He,!0)}}e:{if(ue=te?nl(te):window,Ee=ue.nodeName&&ue.nodeName.toLowerCase(),Ee==="select"||Ee==="input"&&ue.type==="file")var Je=_A;else if(TS(ue))if(OS)Je=wA;else{Je=yA;var et=vA}else(Ee=ue.nodeName)&&Ee.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(Je=bA);if(Je&&(Je=Je(i,te))){ES(_e,Je,h,he);break e}et&&et(i,ue,te),i==="focusout"&&(et=ue._wrapperState)&&et.controlled&&ue.type==="number"&&ft(ue,"number",ue.value)}switch(et=te?nl(te):window,i){case"focusin":(TS(et)||et.contentEditable==="true")&&(Qi=et,ug=te,rd=null);break;case"focusout":rd=ug=Qi=null;break;case"mousedown":pg=!0;break;case"contextmenu":case"mouseup":case"dragend":pg=!1,zS(_e,h,he);break;case"selectionchange":if(kA)break;case"keydown":case"keyup":zS(_e,h,he)}var tt;if(ig)e:{switch(i){case"compositionstart":var ct="onCompositionStart";break e;case"compositionend":ct="onCompositionEnd";break e;case"compositionupdate":ct="onCompositionUpdate";break e}ct=void 0}else Zi?CS(i,h)&&(ct="onCompositionEnd"):i==="keydown"&&h.keyCode===229&&(ct="onCompositionStart");ct&&(SS&&h.locale!=="ko"&&(Zi||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&Zi&&(tt=_S()):(Ya=he,tg="value"in Ya?Ya.value:Ya.textContent,Zi=!0)),et=wp(te,ct),0<et.length&&(ct=new bS(ct,i,null,h,he),_e.push({event:ct,listeners:et}),tt?ct.data=tt:(tt=$S(h),tt!==null&&(ct.data=tt)))),(tt=pA?hA(i,h):fA(i,h))&&(te=wp(te,"onBeforeInput"),0<te.length&&(he=new bS("onBeforeInput","beforeinput",null,h,he),_e.push({event:he,listeners:te}),he.data=tt))}qS(_e,c)})}function ad(i,c,h){return{instance:i,listener:c,currentTarget:h}}function wp(i,c){for(var h=c+"Capture",v=[];i!==null;){var S=i,k=S.stateNode;S.tag===5&&k!==null&&(S=k,k=Ye(i,h),k!=null&&v.unshift(ad(i,k,S)),k=Ye(i,c),k!=null&&v.push(ad(i,k,S))),i=i.return}return v}function tl(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function JS(i,c,h,v,S){for(var k=c._reactName,R=[];h!==null&&h!==v;){var F=h,V=F.alternate,te=F.stateNode;if(V!==null&&V===v)break;F.tag===5&&te!==null&&(F=te,S?(V=Ye(h,k),V!=null&&R.unshift(ad(h,V,F))):S||(V=Ye(h,k),V!=null&&R.push(ad(h,V,F)))),h=h.return}R.length!==0&&i.push({event:c,listeners:R})}var EA=/\r\n?/g,OA=/\u0000|\uFFFD/g;function XS(i){return(typeof i=="string"?i:""+i).replace(EA,`
|
|
38
38
|
`).replace(OA,"")}function Sp(i,c,h){if(c=XS(c),XS(i)!==c&&h)throw Error(r(425))}function xp(){}var vg=null,yg=null;function bg(i,c){return i==="textarea"||i==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var wg=typeof setTimeout=="function"?setTimeout:void 0,DA=typeof clearTimeout=="function"?clearTimeout:void 0,KS=typeof Promise=="function"?Promise:void 0,AA=typeof queueMicrotask=="function"?queueMicrotask:typeof KS<"u"?function(i){return KS.resolve(null).then(i).catch(IA)}:wg;function IA(i){setTimeout(function(){throw i})}function Sg(i,c){var h=c,v=0;do{var S=h.nextSibling;if(i.removeChild(h),S&&S.nodeType===8)if(h=S.data,h==="/$"){if(v===0){i.removeChild(S),Xc(c);return}v--}else h!=="$"&&h!=="$?"&&h!=="$!"||v++;h=S}while(h);Xc(c)}function Qa(i){for(;i!=null;i=i.nextSibling){var c=i.nodeType;if(c===1||c===3)break;if(c===8){if(c=i.data,c==="$"||c==="$!"||c==="$?")break;if(c==="/$")return null}}return i}function YS(i){i=i.previousSibling;for(var c=0;i;){if(i.nodeType===8){var h=i.data;if(h==="$"||h==="$!"||h==="$?"){if(c===0)return i;c--}else h==="/$"&&c++}i=i.previousSibling}return null}var rl=Math.random().toString(36).slice(2),Go="__reactFiber$"+rl,sd="__reactProps$"+rl,ba="__reactContainer$"+rl,xg="__reactEvents$"+rl,NA="__reactListeners$"+rl,MA="__reactHandles$"+rl;function Vs(i){var c=i[Go];if(c)return c;for(var h=i.parentNode;h;){if(c=h[ba]||h[Go]){if(h=c.alternate,c.child!==null||h!==null&&h.child!==null)for(i=YS(i);i!==null;){if(h=i[Go])return h;i=YS(i)}return c}i=h,h=i.parentNode}return null}function id(i){return i=i[Go]||i[ba],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function nl(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(r(33))}function kp(i){return i[sd]||null}var kg=[],ol=-1;function es(i){return{current:i}}function sr(i){0>ol||(i.current=kg[ol],kg[ol]=null,ol--)}function tr(i,c){ol++,kg[ol]=i.current,i.current=c}var ts={},Zr=es(ts),Sn=es(!1),qs=ts;function al(i,c){var h=i.type.contextTypes;if(!h)return ts;var v=i.stateNode;if(v&&v.__reactInternalMemoizedUnmaskedChildContext===c)return v.__reactInternalMemoizedMaskedChildContext;var S={},k;for(k in h)S[k]=c[k];return v&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=c,i.__reactInternalMemoizedMaskedChildContext=S),S}function xn(i){return i=i.childContextTypes,i!=null}function Cp(){sr(Sn),sr(Zr)}function ZS(i,c,h){if(Zr.current!==ts)throw Error(r(168));tr(Zr,c),tr(Sn,h)}function QS(i,c,h){var v=i.stateNode;if(c=c.childContextTypes,typeof v.getChildContext!="function")return h;v=v.getChildContext();for(var S in v)if(!(S in c))throw Error(r(108,Oe(i)||"Unknown",S));return ne({},h,v)}function $p(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||ts,qs=Zr.current,tr(Zr,i),tr(Sn,Sn.current),!0}function ex(i,c,h){var v=i.stateNode;if(!v)throw Error(r(169));h?(i=QS(i,c,qs),v.__reactInternalMemoizedMergedChildContext=i,sr(Sn),sr(Zr),tr(Zr,i)):sr(Sn),tr(Sn,h)}var wa=null,Tp=!1,Cg=!1;function tx(i){wa===null?wa=[i]:wa.push(i)}function RA(i){Tp=!0,tx(i)}function rs(){if(!Cg&&wa!==null){Cg=!0;var i=0,c=Ft;try{var h=wa;for(Ft=1;i<h.length;i++){var v=h[i];do v=v(!0);while(v!==null)}wa=null,Tp=!1}catch(S){throw wa!==null&&(wa=wa.slice(i+1)),nS(Gm,rs),S}finally{Ft=c,Cg=!1}}return null}var sl=[],il=0,Ep=null,Op=0,so=[],io=0,Gs=null,Sa=1,xa="";function Js(i,c){sl[il++]=Op,sl[il++]=Ep,Ep=i,Op=c}function rx(i,c,h){so[io++]=Sa,so[io++]=xa,so[io++]=Gs,Gs=i;var v=Sa;i=xa;var S=32-xo(v)-1;v&=~(1<<S),h+=1;var k=32-xo(c)+S;if(30<k){var R=S-S%5;k=(v&(1<<R)-1).toString(32),v>>=R,S-=R,Sa=1<<32-xo(c)+S|h<<S|v,xa=k+i}else Sa=1<<k|h<<S|v,xa=i}function $g(i){i.return!==null&&(Js(i,1),rx(i,1,0))}function Tg(i){for(;i===Ep;)Ep=sl[--il],sl[il]=null,Op=sl[--il],sl[il]=null;for(;i===Gs;)Gs=so[--io],so[io]=null,xa=so[--io],so[io]=null,Sa=so[--io],so[io]=null}var Wn=null,Hn=null,cr=!1,Co=null;function nx(i,c){var h=po(5,null,null,0);h.elementType="DELETED",h.stateNode=c,h.return=i,c=i.deletions,c===null?(i.deletions=[h],i.flags|=16):c.push(h)}function ox(i,c){switch(i.tag){case 5:var h=i.type;return c=c.nodeType!==1||h.toLowerCase()!==c.nodeName.toLowerCase()?null:c,c!==null?(i.stateNode=c,Wn=i,Hn=Qa(c.firstChild),!0):!1;case 6:return c=i.pendingProps===""||c.nodeType!==3?null:c,c!==null?(i.stateNode=c,Wn=i,Hn=null,!0):!1;case 13:return c=c.nodeType!==8?null:c,c!==null?(h=Gs!==null?{id:Sa,overflow:xa}:null,i.memoizedState={dehydrated:c,treeContext:h,retryLane:1073741824},h=po(18,null,null,0),h.stateNode=c,h.return=i,i.child=h,Wn=i,Hn=null,!0):!1;default:return!1}}function Eg(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Og(i){if(cr){var c=Hn;if(c){var h=c;if(!ox(i,c)){if(Eg(i))throw Error(r(418));c=Qa(h.nextSibling);var v=Wn;c&&ox(i,c)?nx(v,h):(i.flags=i.flags&-4097|2,cr=!1,Wn=i)}}else{if(Eg(i))throw Error(r(418));i.flags=i.flags&-4097|2,cr=!1,Wn=i}}}function ax(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Wn=i}function Dp(i){if(i!==Wn)return!1;if(!cr)return ax(i),cr=!0,!1;var c;if((c=i.tag!==3)&&!(c=i.tag!==5)&&(c=i.type,c=c!=="head"&&c!=="body"&&!bg(i.type,i.memoizedProps)),c&&(c=Hn)){if(Eg(i))throw sx(),Error(r(418));for(;c;)nx(i,c),c=Qa(c.nextSibling)}if(ax(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,c=0;i;){if(i.nodeType===8){var h=i.data;if(h==="/$"){if(c===0){Hn=Qa(i.nextSibling);break e}c--}else h!=="$"&&h!=="$!"&&h!=="$?"||c++}i=i.nextSibling}Hn=null}}else Hn=Wn?Qa(i.stateNode.nextSibling):null;return!0}function sx(){for(var i=Hn;i;)i=Qa(i.nextSibling)}function ll(){Hn=Wn=null,cr=!1}function Dg(i){Co===null?Co=[i]:Co.push(i)}var jA=I.ReactCurrentBatchConfig;function ld(i,c,h){if(i=h.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(h._owner){if(h=h._owner,h){if(h.tag!==1)throw Error(r(309));var v=h.stateNode}if(!v)throw Error(r(147,i));var S=v,k=""+i;return c!==null&&c.ref!==null&&typeof c.ref=="function"&&c.ref._stringRef===k?c.ref:(c=function(R){var F=S.refs;R===null?delete F[k]:F[k]=R},c._stringRef=k,c)}if(typeof i!="string")throw Error(r(284));if(!h._owner)throw Error(r(290,i))}return i}function Ap(i,c){throw i=Object.prototype.toString.call(c),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":i))}function ix(i){var c=i._init;return c(i._payload)}function lx(i){function c(Y,G){if(i){var Q=Y.deletions;Q===null?(Y.deletions=[G],Y.flags|=16):Q.push(G)}}function h(Y,G){if(!i)return null;for(;G!==null;)c(Y,G),G=G.sibling;return null}function v(Y,G){for(Y=new Map;G!==null;)G.key!==null?Y.set(G.key,G):Y.set(G.index,G),G=G.sibling;return Y}function S(Y,G){return Y=ds(Y,G),Y.index=0,Y.sibling=null,Y}function k(Y,G,Q){return Y.index=Q,i?(Q=Y.alternate,Q!==null?(Q=Q.index,Q<G?(Y.flags|=2,G):Q):(Y.flags|=2,G)):(Y.flags|=1048576,G)}function R(Y){return i&&Y.alternate===null&&(Y.flags|=2),Y}function F(Y,G,Q,ve){return G===null||G.tag!==6?(G=w_(Q,Y.mode,ve),G.return=Y,G):(G=S(G,Q),G.return=Y,G)}function V(Y,G,Q,ve){var Je=Q.type;return Je===M?he(Y,G,Q.props.children,ve,Q.key):G!==null&&(G.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===K&&ix(Je)===G.type)?(ve=S(G,Q.props),ve.ref=ld(Y,G,Q),ve.return=Y,ve):(ve=th(Q.type,Q.key,Q.props,null,Y.mode,ve),ve.ref=ld(Y,G,Q),ve.return=Y,ve)}function te(Y,G,Q,ve){return G===null||G.tag!==4||G.stateNode.containerInfo!==Q.containerInfo||G.stateNode.implementation!==Q.implementation?(G=S_(Q,Y.mode,ve),G.return=Y,G):(G=S(G,Q.children||[]),G.return=Y,G)}function he(Y,G,Q,ve,Je){return G===null||G.tag!==7?(G=ri(Q,Y.mode,ve,Je),G.return=Y,G):(G=S(G,Q),G.return=Y,G)}function _e(Y,G,Q){if(typeof G=="string"&&G!==""||typeof G=="number")return G=w_(""+G,Y.mode,Q),G.return=Y,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case N:return Q=th(G.type,G.key,G.props,null,Y.mode,Q),Q.ref=ld(Y,null,G),Q.return=Y,Q;case E:return G=S_(G,Y.mode,Q),G.return=Y,G;case K:var ve=G._init;return _e(Y,ve(G._payload),Q)}if(lt(G)||q(G))return G=ri(G,Y.mode,Q,null),G.return=Y,G;Ap(Y,G)}return null}function ue(Y,G,Q,ve){var Je=G!==null?G.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Je!==null?null:F(Y,G,""+Q,ve);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case N:return Q.key===Je?V(Y,G,Q,ve):null;case E:return Q.key===Je?te(Y,G,Q,ve):null;case K:return Je=Q._init,ue(Y,G,Je(Q._payload),ve)}if(lt(Q)||q(Q))return Je!==null?null:he(Y,G,Q,ve,null);Ap(Y,Q)}return null}function Ee(Y,G,Q,ve,Je){if(typeof ve=="string"&&ve!==""||typeof ve=="number")return Y=Y.get(Q)||null,F(G,Y,""+ve,Je);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case N:return Y=Y.get(ve.key===null?Q:ve.key)||null,V(G,Y,ve,Je);case E:return Y=Y.get(ve.key===null?Q:ve.key)||null,te(G,Y,ve,Je);case K:var et=ve._init;return Ee(Y,G,Q,et(ve._payload),Je)}if(lt(ve)||q(ve))return Y=Y.get(Q)||null,he(G,Y,ve,Je,null);Ap(G,ve)}return null}function Be(Y,G,Q,ve){for(var Je=null,et=null,tt=G,ct=G=0,Br=null;tt!==null&&ct<Q.length;ct++){tt.index>ct?(Br=tt,tt=null):Br=tt.sibling;var At=ue(Y,tt,Q[ct],ve);if(At===null){tt===null&&(tt=Br);break}i&&tt&&At.alternate===null&&c(Y,tt),G=k(At,G,ct),et===null?Je=At:et.sibling=At,et=At,tt=Br}if(ct===Q.length)return h(Y,tt),cr&&Js(Y,ct),Je;if(tt===null){for(;ct<Q.length;ct++)tt=_e(Y,Q[ct],ve),tt!==null&&(G=k(tt,G,ct),et===null?Je=tt:et.sibling=tt,et=tt);return cr&&Js(Y,ct),Je}for(tt=v(Y,tt);ct<Q.length;ct++)Br=Ee(tt,Y,ct,Q[ct],ve),Br!==null&&(i&&Br.alternate!==null&&tt.delete(Br.key===null?ct:Br.key),G=k(Br,G,ct),et===null?Je=Br:et.sibling=Br,et=Br);return i&&tt.forEach(function(us){return c(Y,us)}),cr&&Js(Y,ct),Je}function He(Y,G,Q,ve){var Je=q(Q);if(typeof Je!="function")throw Error(r(150));if(Q=Je.call(Q),Q==null)throw Error(r(151));for(var et=Je=null,tt=G,ct=G=0,Br=null,At=Q.next();tt!==null&&!At.done;ct++,At=Q.next()){tt.index>ct?(Br=tt,tt=null):Br=tt.sibling;var us=ue(Y,tt,At.value,ve);if(us===null){tt===null&&(tt=Br);break}i&&tt&&us.alternate===null&&c(Y,tt),G=k(us,G,ct),et===null?Je=us:et.sibling=us,et=us,tt=Br}if(At.done)return h(Y,tt),cr&&Js(Y,ct),Je;if(tt===null){for(;!At.done;ct++,At=Q.next())At=_e(Y,At.value,ve),At!==null&&(G=k(At,G,ct),et===null?Je=At:et.sibling=At,et=At);return cr&&Js(Y,ct),Je}for(tt=v(Y,tt);!At.done;ct++,At=Q.next())At=Ee(tt,Y,ct,At.value,ve),At!==null&&(i&&At.alternate!==null&&tt.delete(At.key===null?ct:At.key),G=k(At,G,ct),et===null?Je=At:et.sibling=At,et=At);return i&&tt.forEach(function(mI){return c(Y,mI)}),cr&&Js(Y,ct),Je}function kr(Y,G,Q,ve){if(typeof Q=="object"&&Q!==null&&Q.type===M&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case N:e:{for(var Je=Q.key,et=G;et!==null;){if(et.key===Je){if(Je=Q.type,Je===M){if(et.tag===7){h(Y,et.sibling),G=S(et,Q.props.children),G.return=Y,Y=G;break e}}else if(et.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===K&&ix(Je)===et.type){h(Y,et.sibling),G=S(et,Q.props),G.ref=ld(Y,et,Q),G.return=Y,Y=G;break e}h(Y,et);break}else c(Y,et);et=et.sibling}Q.type===M?(G=ri(Q.props.children,Y.mode,ve,Q.key),G.return=Y,Y=G):(ve=th(Q.type,Q.key,Q.props,null,Y.mode,ve),ve.ref=ld(Y,G,Q),ve.return=Y,Y=ve)}return R(Y);case E:e:{for(et=Q.key;G!==null;){if(G.key===et)if(G.tag===4&&G.stateNode.containerInfo===Q.containerInfo&&G.stateNode.implementation===Q.implementation){h(Y,G.sibling),G=S(G,Q.children||[]),G.return=Y,Y=G;break e}else{h(Y,G);break}else c(Y,G);G=G.sibling}G=S_(Q,Y.mode,ve),G.return=Y,Y=G}return R(Y);case K:return et=Q._init,kr(Y,G,et(Q._payload),ve)}if(lt(Q))return Be(Y,G,Q,ve);if(q(Q))return He(Y,G,Q,ve);Ap(Y,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,G!==null&&G.tag===6?(h(Y,G.sibling),G=S(G,Q),G.return=Y,Y=G):(h(Y,G),G=w_(Q,Y.mode,ve),G.return=Y,Y=G),R(Y)):h(Y,G)}return kr}var cl=lx(!0),cx=lx(!1),Ip=es(null),Np=null,dl=null,Ag=null;function Ig(){Ag=dl=Np=null}function Ng(i){var c=Ip.current;sr(Ip),i._currentValue=c}function Mg(i,c,h){for(;i!==null;){var v=i.alternate;if((i.childLanes&c)!==c?(i.childLanes|=c,v!==null&&(v.childLanes|=c)):v!==null&&(v.childLanes&c)!==c&&(v.childLanes|=c),i===h)break;i=i.return}}function ul(i,c){Np=i,Ag=dl=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&c)!==0&&(kn=!0),i.firstContext=null)}function lo(i){var c=i._currentValue;if(Ag!==i)if(i={context:i,memoizedValue:c,next:null},dl===null){if(Np===null)throw Error(r(308));dl=i,Np.dependencies={lanes:0,firstContext:i}}else dl=dl.next=i;return c}var Xs=null;function Rg(i){Xs===null?Xs=[i]:Xs.push(i)}function dx(i,c,h,v){var S=c.interleaved;return S===null?(h.next=h,Rg(c)):(h.next=S.next,S.next=h),c.interleaved=h,ka(i,v)}function ka(i,c){i.lanes|=c;var h=i.alternate;for(h!==null&&(h.lanes|=c),h=i,i=i.return;i!==null;)i.childLanes|=c,h=i.alternate,h!==null&&(h.childLanes|=c),h=i,i=i.return;return h.tag===3?h.stateNode:null}var ns=!1;function jg(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ux(i,c){i=i.updateQueue,c.updateQueue===i&&(c.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Ca(i,c){return{eventTime:i,lane:c,tag:0,payload:null,callback:null,next:null}}function os(i,c,h){var v=i.updateQueue;if(v===null)return null;if(v=v.shared,(Dt&2)!==0){var S=v.pending;return S===null?c.next=c:(c.next=S.next,S.next=c),v.pending=c,ka(i,h)}return S=v.interleaved,S===null?(c.next=c,Rg(v)):(c.next=S.next,S.next=c),v.interleaved=c,ka(i,h)}function Mp(i,c,h){if(c=c.updateQueue,c!==null&&(c=c.shared,(h&4194240)!==0)){var v=c.lanes;v&=i.pendingLanes,h|=v,c.lanes=h,Km(i,h)}}function px(i,c){var h=i.updateQueue,v=i.alternate;if(v!==null&&(v=v.updateQueue,h===v)){var S=null,k=null;if(h=h.firstBaseUpdate,h!==null){do{var R={eventTime:h.eventTime,lane:h.lane,tag:h.tag,payload:h.payload,callback:h.callback,next:null};k===null?S=k=R:k=k.next=R,h=h.next}while(h!==null);k===null?S=k=c:k=k.next=c}else S=k=c;h={baseState:v.baseState,firstBaseUpdate:S,lastBaseUpdate:k,shared:v.shared,effects:v.effects},i.updateQueue=h;return}i=h.lastBaseUpdate,i===null?h.firstBaseUpdate=c:i.next=c,h.lastBaseUpdate=c}function Rp(i,c,h,v){var S=i.updateQueue;ns=!1;var k=S.firstBaseUpdate,R=S.lastBaseUpdate,F=S.shared.pending;if(F!==null){S.shared.pending=null;var V=F,te=V.next;V.next=null,R===null?k=te:R.next=te,R=V;var he=i.alternate;he!==null&&(he=he.updateQueue,F=he.lastBaseUpdate,F!==R&&(F===null?he.firstBaseUpdate=te:F.next=te,he.lastBaseUpdate=V))}if(k!==null){var _e=S.baseState;R=0,he=te=V=null,F=k;do{var ue=F.lane,Ee=F.eventTime;if((v&ue)===ue){he!==null&&(he=he.next={eventTime:Ee,lane:0,tag:F.tag,payload:F.payload,callback:F.callback,next:null});e:{var Be=i,He=F;switch(ue=c,Ee=h,He.tag){case 1:if(Be=He.payload,typeof Be=="function"){_e=Be.call(Ee,_e,ue);break e}_e=Be;break e;case 3:Be.flags=Be.flags&-65537|128;case 0:if(Be=He.payload,ue=typeof Be=="function"?Be.call(Ee,_e,ue):Be,ue==null)break e;_e=ne({},_e,ue);break e;case 2:ns=!0}}F.callback!==null&&F.lane!==0&&(i.flags|=64,ue=S.effects,ue===null?S.effects=[F]:ue.push(F))}else Ee={eventTime:Ee,lane:ue,tag:F.tag,payload:F.payload,callback:F.callback,next:null},he===null?(te=he=Ee,V=_e):he=he.next=Ee,R|=ue;if(F=F.next,F===null){if(F=S.shared.pending,F===null)break;ue=F,F=ue.next,ue.next=null,S.lastBaseUpdate=ue,S.shared.pending=null}}while(!0);if(he===null&&(V=_e),S.baseState=V,S.firstBaseUpdate=te,S.lastBaseUpdate=he,c=S.shared.interleaved,c!==null){S=c;do R|=S.lane,S=S.next;while(S!==c)}else k===null&&(S.shared.lanes=0);Zs|=R,i.lanes=R,i.memoizedState=_e}}function hx(i,c,h){if(i=c.effects,c.effects=null,i!==null)for(c=0;c<i.length;c++){var v=i[c],S=v.callback;if(S!==null){if(v.callback=null,v=h,typeof S!="function")throw Error(r(191,S));S.call(v)}}}var cd={},Jo=es(cd),dd=es(cd),ud=es(cd);function Ks(i){if(i===cd)throw Error(r(174));return i}function zg(i,c){switch(tr(ud,c),tr(dd,i),tr(Jo,cd),i=c.nodeType,i){case 9:case 11:c=(c=c.documentElement)?c.namespaceURI:nt(null,"");break;default:i=i===8?c.parentNode:c,c=i.namespaceURI||null,i=i.tagName,c=nt(c,i)}sr(Jo),tr(Jo,c)}function pl(){sr(Jo),sr(dd),sr(ud)}function fx(i){Ks(ud.current);var c=Ks(Jo.current),h=nt(c,i.type);c!==h&&(tr(dd,i),tr(Jo,h))}function Pg(i){dd.current===i&&(sr(Jo),sr(dd))}var fr=es(0);function jp(i){for(var c=i;c!==null;){if(c.tag===13){var h=c.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||h.data==="$?"||h.data==="$!"))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===i)break;for(;c.sibling===null;){if(c.return===null||c.return===i)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Lg=[];function Fg(){for(var i=0;i<Lg.length;i++)Lg[i]._workInProgressVersionPrimary=null;Lg.length=0}var zp=I.ReactCurrentDispatcher,Bg=I.ReactCurrentBatchConfig,Ys=0,mr=null,Mr=null,Lr=null,Pp=!1,pd=!1,hd=0,zA=0;function Qr(){throw Error(r(321))}function Wg(i,c){if(c===null)return!1;for(var h=0;h<c.length&&h<i.length;h++)if(!ko(i[h],c[h]))return!1;return!0}function Hg(i,c,h,v,S,k){if(Ys=k,mr=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,zp.current=i===null||i.memoizedState===null?BA:WA,i=h(v,S),pd){k=0;do{if(pd=!1,hd=0,25<=k)throw Error(r(301));k+=1,Lr=Mr=null,c.updateQueue=null,zp.current=HA,i=h(v,S)}while(pd)}if(zp.current=Bp,c=Mr!==null&&Mr.next!==null,Ys=0,Lr=Mr=mr=null,Pp=!1,c)throw Error(r(300));return i}function Ug(){var i=hd!==0;return hd=0,i}function Xo(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lr===null?mr.memoizedState=Lr=i:Lr=Lr.next=i,Lr}function co(){if(Mr===null){var i=mr.alternate;i=i!==null?i.memoizedState:null}else i=Mr.next;var c=Lr===null?mr.memoizedState:Lr.next;if(c!==null)Lr=c,Mr=i;else{if(i===null)throw Error(r(310));Mr=i,i={memoizedState:Mr.memoizedState,baseState:Mr.baseState,baseQueue:Mr.baseQueue,queue:Mr.queue,next:null},Lr===null?mr.memoizedState=Lr=i:Lr=Lr.next=i}return Lr}function fd(i,c){return typeof c=="function"?c(i):c}function Vg(i){var c=co(),h=c.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=i;var v=Mr,S=v.baseQueue,k=h.pending;if(k!==null){if(S!==null){var R=S.next;S.next=k.next,k.next=R}v.baseQueue=S=k,h.pending=null}if(S!==null){k=S.next,v=v.baseState;var F=R=null,V=null,te=k;do{var he=te.lane;if((Ys&he)===he)V!==null&&(V=V.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),v=te.hasEagerState?te.eagerState:i(v,te.action);else{var _e={lane:he,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};V===null?(F=V=_e,R=v):V=V.next=_e,mr.lanes|=he,Zs|=he}te=te.next}while(te!==null&&te!==k);V===null?R=v:V.next=F,ko(v,c.memoizedState)||(kn=!0),c.memoizedState=v,c.baseState=R,c.baseQueue=V,h.lastRenderedState=v}if(i=h.interleaved,i!==null){S=i;do k=S.lane,mr.lanes|=k,Zs|=k,S=S.next;while(S!==i)}else S===null&&(h.lanes=0);return[c.memoizedState,h.dispatch]}function qg(i){var c=co(),h=c.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=i;var v=h.dispatch,S=h.pending,k=c.memoizedState;if(S!==null){h.pending=null;var R=S=S.next;do k=i(k,R.action),R=R.next;while(R!==S);ko(k,c.memoizedState)||(kn=!0),c.memoizedState=k,c.baseQueue===null&&(c.baseState=k),h.lastRenderedState=k}return[k,v]}function mx(){}function gx(i,c){var h=mr,v=co(),S=c(),k=!ko(v.memoizedState,S);if(k&&(v.memoizedState=S,kn=!0),v=v.queue,Gg(yx.bind(null,h,v,i),[i]),v.getSnapshot!==c||k||Lr!==null&&Lr.memoizedState.tag&1){if(h.flags|=2048,md(9,vx.bind(null,h,v,S,c),void 0,null),Fr===null)throw Error(r(349));(Ys&30)!==0||_x(h,c,S)}return S}function _x(i,c,h){i.flags|=16384,i={getSnapshot:c,value:h},c=mr.updateQueue,c===null?(c={lastEffect:null,stores:null},mr.updateQueue=c,c.stores=[i]):(h=c.stores,h===null?c.stores=[i]:h.push(i))}function vx(i,c,h,v){c.value=h,c.getSnapshot=v,bx(c)&&wx(i)}function yx(i,c,h){return h(function(){bx(c)&&wx(i)})}function bx(i){var c=i.getSnapshot;i=i.value;try{var h=c();return!ko(i,h)}catch{return!0}}function wx(i){var c=ka(i,1);c!==null&&Oo(c,i,1,-1)}function Sx(i){var c=Xo();return typeof i=="function"&&(i=i()),c.memoizedState=c.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fd,lastRenderedState:i},c.queue=i,i=i.dispatch=FA.bind(null,mr,i),[c.memoizedState,i]}function md(i,c,h,v){return i={tag:i,create:c,destroy:h,deps:v,next:null},c=mr.updateQueue,c===null?(c={lastEffect:null,stores:null},mr.updateQueue=c,c.lastEffect=i.next=i):(h=c.lastEffect,h===null?c.lastEffect=i.next=i:(v=h.next,h.next=i,i.next=v,c.lastEffect=i)),i}function xx(){return co().memoizedState}function Lp(i,c,h,v){var S=Xo();mr.flags|=i,S.memoizedState=md(1|c,h,void 0,v===void 0?null:v)}function Fp(i,c,h,v){var S=co();v=v===void 0?null:v;var k=void 0;if(Mr!==null){var R=Mr.memoizedState;if(k=R.destroy,v!==null&&Wg(v,R.deps)){S.memoizedState=md(c,h,k,v);return}}mr.flags|=i,S.memoizedState=md(1|c,h,k,v)}function kx(i,c){return Lp(8390656,8,i,c)}function Gg(i,c){return Fp(2048,8,i,c)}function Cx(i,c){return Fp(4,2,i,c)}function $x(i,c){return Fp(4,4,i,c)}function Tx(i,c){if(typeof c=="function")return i=i(),c(i),function(){c(null)};if(c!=null)return i=i(),c.current=i,function(){c.current=null}}function Ex(i,c,h){return h=h!=null?h.concat([i]):null,Fp(4,4,Tx.bind(null,c,i),h)}function Jg(){}function Ox(i,c){var h=co();c=c===void 0?null:c;var v=h.memoizedState;return v!==null&&c!==null&&Wg(c,v[1])?v[0]:(h.memoizedState=[i,c],i)}function Dx(i,c){var h=co();c=c===void 0?null:c;var v=h.memoizedState;return v!==null&&c!==null&&Wg(c,v[1])?v[0]:(i=i(),h.memoizedState=[i,c],i)}function Ax(i,c,h){return(Ys&21)===0?(i.baseState&&(i.baseState=!1,kn=!0),i.memoizedState=h):(ko(h,c)||(h=iS(),mr.lanes|=h,Zs|=h,i.baseState=!0),c)}function PA(i,c){var h=Ft;Ft=h!==0&&4>h?h:4,i(!0);var v=Bg.transition;Bg.transition={};try{i(!1),c()}finally{Ft=h,Bg.transition=v}}function Ix(){return co().memoizedState}function LA(i,c,h){var v=ls(i);if(h={lane:v,action:h,hasEagerState:!1,eagerState:null,next:null},Nx(i))Mx(c,h);else if(h=dx(i,c,h,v),h!==null){var S=pn();Oo(h,i,v,S),Rx(h,c,v)}}function FA(i,c,h){var v=ls(i),S={lane:v,action:h,hasEagerState:!1,eagerState:null,next:null};if(Nx(i))Mx(c,S);else{var k=i.alternate;if(i.lanes===0&&(k===null||k.lanes===0)&&(k=c.lastRenderedReducer,k!==null))try{var R=c.lastRenderedState,F=k(R,h);if(S.hasEagerState=!0,S.eagerState=F,ko(F,R)){var V=c.interleaved;V===null?(S.next=S,Rg(c)):(S.next=V.next,V.next=S),c.interleaved=S;return}}catch{}finally{}h=dx(i,c,S,v),h!==null&&(S=pn(),Oo(h,i,v,S),Rx(h,c,v))}}function Nx(i){var c=i.alternate;return i===mr||c!==null&&c===mr}function Mx(i,c){pd=Pp=!0;var h=i.pending;h===null?c.next=c:(c.next=h.next,h.next=c),i.pending=c}function Rx(i,c,h){if((h&4194240)!==0){var v=c.lanes;v&=i.pendingLanes,h|=v,c.lanes=h,Km(i,h)}}var Bp={readContext:lo,useCallback:Qr,useContext:Qr,useEffect:Qr,useImperativeHandle:Qr,useInsertionEffect:Qr,useLayoutEffect:Qr,useMemo:Qr,useReducer:Qr,useRef:Qr,useState:Qr,useDebugValue:Qr,useDeferredValue:Qr,useTransition:Qr,useMutableSource:Qr,useSyncExternalStore:Qr,useId:Qr,unstable_isNewReconciler:!1},BA={readContext:lo,useCallback:function(i,c){return Xo().memoizedState=[i,c===void 0?null:c],i},useContext:lo,useEffect:kx,useImperativeHandle:function(i,c,h){return h=h!=null?h.concat([i]):null,Lp(4194308,4,Tx.bind(null,c,i),h)},useLayoutEffect:function(i,c){return Lp(4194308,4,i,c)},useInsertionEffect:function(i,c){return Lp(4,2,i,c)},useMemo:function(i,c){var h=Xo();return c=c===void 0?null:c,i=i(),h.memoizedState=[i,c],i},useReducer:function(i,c,h){var v=Xo();return c=h!==void 0?h(c):c,v.memoizedState=v.baseState=c,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:c},v.queue=i,i=i.dispatch=LA.bind(null,mr,i),[v.memoizedState,i]},useRef:function(i){var c=Xo();return i={current:i},c.memoizedState=i},useState:Sx,useDebugValue:Jg,useDeferredValue:function(i){return Xo().memoizedState=i},useTransition:function(){var i=Sx(!1),c=i[0];return i=PA.bind(null,i[1]),Xo().memoizedState=i,[c,i]},useMutableSource:function(){},useSyncExternalStore:function(i,c,h){var v=mr,S=Xo();if(cr){if(h===void 0)throw Error(r(407));h=h()}else{if(h=c(),Fr===null)throw Error(r(349));(Ys&30)!==0||_x(v,c,h)}S.memoizedState=h;var k={value:h,getSnapshot:c};return S.queue=k,kx(yx.bind(null,v,k,i),[i]),v.flags|=2048,md(9,vx.bind(null,v,k,h,c),void 0,null),h},useId:function(){var i=Xo(),c=Fr.identifierPrefix;if(cr){var h=xa,v=Sa;h=(v&~(1<<32-xo(v)-1)).toString(32)+h,c=":"+c+"R"+h,h=hd++,0<h&&(c+="H"+h.toString(32)),c+=":"}else h=zA++,c=":"+c+"r"+h.toString(32)+":";return i.memoizedState=c},unstable_isNewReconciler:!1},WA={readContext:lo,useCallback:Ox,useContext:lo,useEffect:Gg,useImperativeHandle:Ex,useInsertionEffect:Cx,useLayoutEffect:$x,useMemo:Dx,useReducer:Vg,useRef:xx,useState:function(){return Vg(fd)},useDebugValue:Jg,useDeferredValue:function(i){var c=co();return Ax(c,Mr.memoizedState,i)},useTransition:function(){var i=Vg(fd)[0],c=co().memoizedState;return[i,c]},useMutableSource:mx,useSyncExternalStore:gx,useId:Ix,unstable_isNewReconciler:!1},HA={readContext:lo,useCallback:Ox,useContext:lo,useEffect:Gg,useImperativeHandle:Ex,useInsertionEffect:Cx,useLayoutEffect:$x,useMemo:Dx,useReducer:qg,useRef:xx,useState:function(){return qg(fd)},useDebugValue:Jg,useDeferredValue:function(i){var c=co();return Mr===null?c.memoizedState=i:Ax(c,Mr.memoizedState,i)},useTransition:function(){var i=qg(fd)[0],c=co().memoizedState;return[i,c]},useMutableSource:mx,useSyncExternalStore:gx,useId:Ix,unstable_isNewReconciler:!1};function $o(i,c){if(i&&i.defaultProps){c=ne({},c),i=i.defaultProps;for(var h in i)c[h]===void 0&&(c[h]=i[h]);return c}return c}function Xg(i,c,h,v){c=i.memoizedState,h=h(v,c),h=h==null?c:ne({},c,h),i.memoizedState=h,i.lanes===0&&(i.updateQueue.baseState=h)}var Wp={isMounted:function(i){return(i=i._reactInternals)?Us(i)===i:!1},enqueueSetState:function(i,c,h){i=i._reactInternals;var v=pn(),S=ls(i),k=Ca(v,S);k.payload=c,h!=null&&(k.callback=h),c=os(i,k,S),c!==null&&(Oo(c,i,S,v),Mp(c,i,S))},enqueueReplaceState:function(i,c,h){i=i._reactInternals;var v=pn(),S=ls(i),k=Ca(v,S);k.tag=1,k.payload=c,h!=null&&(k.callback=h),c=os(i,k,S),c!==null&&(Oo(c,i,S,v),Mp(c,i,S))},enqueueForceUpdate:function(i,c){i=i._reactInternals;var h=pn(),v=ls(i),S=Ca(h,v);S.tag=2,c!=null&&(S.callback=c),c=os(i,S,v),c!==null&&(Oo(c,i,v,h),Mp(c,i,v))}};function jx(i,c,h,v,S,k,R){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(v,k,R):c.prototype&&c.prototype.isPureReactComponent?!td(h,v)||!td(S,k):!0}function zx(i,c,h){var v=!1,S=ts,k=c.contextType;return typeof k=="object"&&k!==null?k=lo(k):(S=xn(c)?qs:Zr.current,v=c.contextTypes,k=(v=v!=null)?al(i,S):ts),c=new c(h,k),i.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Wp,i.stateNode=c,c._reactInternals=i,v&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=S,i.__reactInternalMemoizedMaskedChildContext=k),c}function Px(i,c,h,v){i=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(h,v),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(h,v),c.state!==i&&Wp.enqueueReplaceState(c,c.state,null)}function Kg(i,c,h,v){var S=i.stateNode;S.props=h,S.state=i.memoizedState,S.refs={},jg(i);var k=c.contextType;typeof k=="object"&&k!==null?S.context=lo(k):(k=xn(c)?qs:Zr.current,S.context=al(i,k)),S.state=i.memoizedState,k=c.getDerivedStateFromProps,typeof k=="function"&&(Xg(i,c,k,h),S.state=i.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(c=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),c!==S.state&&Wp.enqueueReplaceState(S,S.state,null),Rp(i,h,S,v),S.state=i.memoizedState),typeof S.componentDidMount=="function"&&(i.flags|=4194308)}function hl(i,c){try{var h="",v=c;do h+=pe(v),v=v.return;while(v);var S=h}catch(k){S=`
|
|
39
39
|
Error generating stack: `+k.message+`
|
|
40
|
-
`+k.stack}return{value:i,source:c,stack:S,digest:null}}function Yg(i,c,h){return{value:i,source:null,stack:h??null,digest:c??null}}function Zg(i,c){try{console.error(c.value)}catch(h){setTimeout(function(){throw h})}}var UA=typeof WeakMap=="function"?WeakMap:Map;function Lx(i,c,h){h=Ca(-1,h),h.tag=3,h.payload={element:null};var v=c.value;return h.callback=function(){Xp||(Xp=!0,h_=v),Zg(i,c)},h}function Fx(i,c,h){h=Ca(-1,h),h.tag=3;var v=i.type.getDerivedStateFromError;if(typeof v=="function"){var S=c.value;h.payload=function(){return v(S)},h.callback=function(){Zg(i,c)}}var k=i.stateNode;return k!==null&&typeof k.componentDidCatch=="function"&&(h.callback=function(){Zg(i,c),typeof v!="function"&&(ss===null?ss=new Set([this]):ss.add(this));var R=c.stack;this.componentDidCatch(c.value,{componentStack:R!==null?R:""})}),h}function Bx(i,c,h){var v=i.pingCache;if(v===null){v=i.pingCache=new UA;var S=new Set;v.set(c,S)}else S=v.get(c),S===void 0&&(S=new Set,v.set(c,S));S.has(h)||(S.add(h),i=oI.bind(null,i,c,h),c.then(i,i))}function Wx(i){do{var c;if((c=i.tag===13)&&(c=i.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return i;i=i.return}while(i!==null);return null}function Hx(i,c,h,v,S){return(i.mode&1)===0?(i===c?i.flags|=65536:(i.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(c=Ca(-1,1),c.tag=2,os(h,c,1))),h.lanes|=1),i):(i.flags|=65536,i.lanes=S,i)}var VA=I.ReactCurrentOwner,kn=!1;function un(i,c,h,v){c.child=i===null?cx(c,null,h,v):cl(c,i.child,h,v)}function Ux(i,c,h,v,S){h=h.render;var k=c.ref;return ul(c,S),v=Hg(i,c,h,v,k,S),h=Ug(),i!==null&&!kn?(c.updateQueue=i.updateQueue,c.flags&=-2053,i.lanes&=~S,$a(i,c,S)):(cr&&h&&$g(c),c.flags|=1,un(i,c,v,S),c.child)}function Vx(i,c,h,v,S){if(i===null){var k=h.type;return typeof k=="function"&&!b_(k)&&k.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(c.tag=15,c.type=k,qx(i,c,k,v,S)):(i=th(h.type,null,v,c,c.mode,S),i.ref=c.ref,i.return=c,c.child=i)}if(k=i.child,(i.lanes&S)===0){var R=k.memoizedProps;if(h=h.compare,h=h!==null?h:td,h(R,v)&&i.ref===c.ref)return $a(i,c,S)}return c.flags|=1,i=ds(k,v),i.ref=c.ref,i.return=c,c.child=i}function qx(i,c,h,v,S){if(i!==null){var k=i.memoizedProps;if(td(k,v)&&i.ref===c.ref)if(kn=!1,c.pendingProps=v=k,(i.lanes&S)!==0)(i.flags&131072)!==0&&(kn=!0);else return c.lanes=i.lanes,$a(i,c,S)}return Qg(i,c,h,v,S)}function Gx(i,c,h){var v=c.pendingProps,S=v.children,k=i!==null?i.memoizedState:null;if(v.mode==="hidden")if((c.mode&1)===0)c.memoizedState={baseLanes:0,cachePool:null,transitions:null},tr(ml,Un),Un|=h;else{if((h&1073741824)===0)return i=k!==null?k.baseLanes|h:h,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:i,cachePool:null,transitions:null},c.updateQueue=null,tr(ml,Un),Un|=i,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},v=k!==null?k.baseLanes:h,tr(ml,Un),Un|=v}else k!==null?(v=k.baseLanes|h,c.memoizedState=null):v=h,tr(ml,Un),Un|=v;return un(i,c,S,h),c.child}function Jx(i,c){var h=c.ref;(i===null&&h!==null||i!==null&&i.ref!==h)&&(c.flags|=512,c.flags|=2097152)}function Qg(i,c,h,v,S){var k=xn(h)?qs:Zr.current;return k=al(c,k),ul(c,S),h=Hg(i,c,h,v,k,S),v=Ug(),i!==null&&!kn?(c.updateQueue=i.updateQueue,c.flags&=-2053,i.lanes&=~S,$a(i,c,S)):(cr&&v&&$g(c),c.flags|=1,un(i,c,h,S),c.child)}function Xx(i,c,h,v,S){if(xn(h)){var k=!0;$p(c)}else k=!1;if(ul(c,S),c.stateNode===null)Up(i,c),zx(c,h,v),Kg(c,h,v,S),v=!0;else if(i===null){var R=c.stateNode,F=c.memoizedProps;R.props=F;var V=R.context,te=h.contextType;typeof te=="object"&&te!==null?te=lo(te):(te=xn(h)?qs:Zr.current,te=al(c,te));var he=h.getDerivedStateFromProps,_e=typeof he=="function"||typeof R.getSnapshotBeforeUpdate=="function";_e||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(F!==v||V!==te)&&Px(c,R,v,te),ns=!1;var ue=c.memoizedState;R.state=ue,Rp(c,v,R,S),V=c.memoizedState,F!==v||ue!==V||Sn.current||ns?(typeof he=="function"&&(Xg(c,h,he,v),V=c.memoizedState),(F=ns||jx(c,h,F,v,ue,V,te))?(_e||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(c.flags|=4194308)):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=v,c.memoizedState=V),R.props=v,R.state=V,R.context=te,v=F):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),v=!1)}else{R=c.stateNode,ux(i,c),F=c.memoizedProps,te=c.type===c.elementType?F:$o(c.type,F),R.props=te,_e=c.pendingProps,ue=R.context,V=h.contextType,typeof V=="object"&&V!==null?V=lo(V):(V=xn(h)?qs:Zr.current,V=al(c,V));var Ee=h.getDerivedStateFromProps;(he=typeof Ee=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(F!==_e||ue!==V)&&Px(c,R,v,V),ns=!1,ue=c.memoizedState,R.state=ue,Rp(c,v,R,S);var Be=c.memoizedState;F!==_e||ue!==Be||Sn.current||ns?(typeof Ee=="function"&&(Xg(c,h,Ee,v),Be=c.memoizedState),(te=ns||jx(c,h,te,v,ue,Be,V)||!1)?(he||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(v,Be,V),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(v,Be,V)),typeof R.componentDidUpdate=="function"&&(c.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof R.componentDidUpdate!="function"||F===i.memoizedProps&&ue===i.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||F===i.memoizedProps&&ue===i.memoizedState||(c.flags|=1024),c.memoizedProps=v,c.memoizedState=Be),R.props=v,R.state=Be,R.context=V,v=te):(typeof R.componentDidUpdate!="function"||F===i.memoizedProps&&ue===i.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||F===i.memoizedProps&&ue===i.memoizedState||(c.flags|=1024),v=!1)}return e_(i,c,h,v,k,S)}function e_(i,c,h,v,S,k){Jx(i,c);var R=(c.flags&128)!==0;if(!v&&!R)return S&&ex(c,h,!1),$a(i,c,k);v=c.stateNode,VA.current=c;var F=R&&typeof h.getDerivedStateFromError!="function"?null:v.render();return c.flags|=1,i!==null&&R?(c.child=cl(c,i.child,null,k),c.child=cl(c,null,F,k)):un(i,c,F,k),c.memoizedState=v.state,S&&ex(c,h,!0),c.child}function Kx(i){var c=i.stateNode;c.pendingContext?ZS(i,c.pendingContext,c.pendingContext!==c.context):c.context&&ZS(i,c.context,!1),zg(i,c.containerInfo)}function Yx(i,c,h,v,S){return ll(),Dg(S),c.flags|=256,un(i,c,h,v),c.child}var t_={dehydrated:null,treeContext:null,retryLane:0};function r_(i){return{baseLanes:i,cachePool:null,transitions:null}}function Zx(i,c,h){var v=c.pendingProps,S=fr.current,k=!1,R=(c.flags&128)!==0,F;if((F=R)||(F=i!==null&&i.memoizedState===null?!1:(S&2)!==0),F?(k=!0,c.flags&=-129):(i===null||i.memoizedState!==null)&&(S|=1),tr(fr,S&1),i===null)return Og(c),i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((c.mode&1)===0?c.lanes=1:i.data==="$!"?c.lanes=8:c.lanes=1073741824,null):(R=v.children,i=v.fallback,k?(v=c.mode,k=c.child,R={mode:"hidden",children:R},(v&1)===0&&k!==null?(k.childLanes=0,k.pendingProps=R):k=rh(R,v,0,null),i=ri(i,v,h,null),k.return=c,i.return=c,k.sibling=i,c.child=k,c.child.memoizedState=r_(h),c.memoizedState=t_,i):n_(c,R));if(S=i.memoizedState,S!==null&&(F=S.dehydrated,F!==null))return qA(i,c,R,v,F,S,h);if(k){k=v.fallback,R=c.mode,S=i.child,F=S.sibling;var V={mode:"hidden",children:v.children};return(R&1)===0&&c.child!==S?(v=c.child,v.childLanes=0,v.pendingProps=V,c.deletions=null):(v=ds(S,V),v.subtreeFlags=S.subtreeFlags&14680064),F!==null?k=ds(F,k):(k=ri(k,R,h,null),k.flags|=2),k.return=c,v.return=c,v.sibling=k,c.child=v,v=k,k=c.child,R=i.child.memoizedState,R=R===null?r_(h):{baseLanes:R.baseLanes|h,cachePool:null,transitions:R.transitions},k.memoizedState=R,k.childLanes=i.childLanes&~h,c.memoizedState=t_,v}return k=i.child,i=k.sibling,v=ds(k,{mode:"visible",children:v.children}),(c.mode&1)===0&&(v.lanes=h),v.return=c,v.sibling=null,i!==null&&(h=c.deletions,h===null?(c.deletions=[i],c.flags|=16):h.push(i)),c.child=v,c.memoizedState=null,v}function n_(i,c){return c=rh({mode:"visible",children:c},i.mode,0,null),c.return=i,i.child=c}function Hp(i,c,h,v){return v!==null&&Dg(v),cl(c,i.child,null,h),i=n_(c,c.pendingProps.children),i.flags|=2,c.memoizedState=null,i}function qA(i,c,h,v,S,k,R){if(h)return c.flags&256?(c.flags&=-257,v=Yg(Error(r(422))),Hp(i,c,R,v)):c.memoizedState!==null?(c.child=i.child,c.flags|=128,null):(k=v.fallback,S=c.mode,v=rh({mode:"visible",children:v.children},S,0,null),k=ri(k,S,R,null),k.flags|=2,v.return=c,k.return=c,v.sibling=k,c.child=v,(c.mode&1)!==0&&cl(c,i.child,null,R),c.child.memoizedState=r_(R),c.memoizedState=t_,k);if((c.mode&1)===0)return Hp(i,c,R,null);if(S.data==="$!"){if(v=S.nextSibling&&S.nextSibling.dataset,v)var F=v.dgst;return v=F,k=Error(r(419)),v=Yg(k,v,void 0),Hp(i,c,R,v)}if(F=(R&i.childLanes)!==0,kn||F){if(v=Fr,v!==null){switch(R&-R){case 4:S=2;break;case 16:S=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:S=32;break;case 536870912:S=268435456;break;default:S=0}S=(S&(v.suspendedLanes|R))!==0?0:S,S!==0&&S!==k.retryLane&&(k.retryLane=S,ka(i,S),Oo(v,i,S,-1))}return y_(),v=Yg(Error(r(421))),Hp(i,c,R,v)}return S.data==="$?"?(c.flags|=128,c.child=i.child,c=aI.bind(null,i),S._reactRetry=c,null):(i=k.treeContext,Hn=Qa(S.nextSibling),Wn=c,cr=!0,Co=null,i!==null&&(so[io++]=Sa,so[io++]=xa,so[io++]=Gs,Sa=i.id,xa=i.overflow,Gs=c),c=n_(c,v.children),c.flags|=4096,c)}function Qx(i,c,h){i.lanes|=c;var v=i.alternate;v!==null&&(v.lanes|=c),Mg(i.return,c,h)}function o_(i,c,h,v,S){var k=i.memoizedState;k===null?i.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:v,tail:h,tailMode:S}:(k.isBackwards=c,k.rendering=null,k.renderingStartTime=0,k.last=v,k.tail=h,k.tailMode=S)}function ek(i,c,h){var v=c.pendingProps,S=v.revealOrder,k=v.tail;if(un(i,c,v.children,h),v=fr.current,(v&2)!==0)v=v&1|2,c.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=c.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Qx(i,h,c);else if(i.tag===19)Qx(i,h,c);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===c)break e;for(;i.sibling===null;){if(i.return===null||i.return===c)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}v&=1}if(tr(fr,v),(c.mode&1)===0)c.memoizedState=null;else switch(S){case"forwards":for(h=c.child,S=null;h!==null;)i=h.alternate,i!==null&&jp(i)===null&&(S=h),h=h.sibling;h=S,h===null?(S=c.child,c.child=null):(S=h.sibling,h.sibling=null),o_(c,!1,S,h,k);break;case"backwards":for(h=null,S=c.child,c.child=null;S!==null;){if(i=S.alternate,i!==null&&jp(i)===null){c.child=S;break}i=S.sibling,S.sibling=h,h=S,S=i}o_(c,!0,h,null,k);break;case"together":o_(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function Up(i,c){(c.mode&1)===0&&i!==null&&(i.alternate=null,c.alternate=null,c.flags|=2)}function $a(i,c,h){if(i!==null&&(c.dependencies=i.dependencies),Zs|=c.lanes,(h&c.childLanes)===0)return null;if(i!==null&&c.child!==i.child)throw Error(r(153));if(c.child!==null){for(i=c.child,h=ds(i,i.pendingProps),c.child=h,h.return=c;i.sibling!==null;)i=i.sibling,h=h.sibling=ds(i,i.pendingProps),h.return=c;h.sibling=null}return c.child}function GA(i,c,h){switch(c.tag){case 3:Kx(c),ll();break;case 5:fx(c);break;case 1:xn(c.type)&&$p(c);break;case 4:zg(c,c.stateNode.containerInfo);break;case 10:var v=c.type._context,S=c.memoizedProps.value;tr(Ip,v._currentValue),v._currentValue=S;break;case 13:if(v=c.memoizedState,v!==null)return v.dehydrated!==null?(tr(fr,fr.current&1),c.flags|=128,null):(h&c.child.childLanes)!==0?Zx(i,c,h):(tr(fr,fr.current&1),i=$a(i,c,h),i!==null?i.sibling:null);tr(fr,fr.current&1);break;case 19:if(v=(h&c.childLanes)!==0,(i.flags&128)!==0){if(v)return ek(i,c,h);c.flags|=128}if(S=c.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),tr(fr,fr.current),v)break;return null;case 22:case 23:return c.lanes=0,Gx(i,c,h)}return $a(i,c,h)}var tk,a_,rk,nk;tk=function(i,c){for(var h=c.child;h!==null;){if(h.tag===5||h.tag===6)i.appendChild(h.stateNode);else if(h.tag!==4&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===c)break;for(;h.sibling===null;){if(h.return===null||h.return===c)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},a_=function(){},rk=function(i,c,h,v){var S=i.memoizedProps;if(S!==v){i=c.stateNode,Ks(Jo.current);var k=null;switch(h){case"input":S=xe(i,S),v=xe(i,v),k=[];break;case"select":S=ne({},S,{value:void 0}),v=ne({},v,{value:void 0}),k=[];break;case"textarea":S=Se(i,S),v=Se(i,v),k=[];break;default:typeof S.onClick!="function"&&typeof v.onClick=="function"&&(i.onclick=xp)}Nt(h,v);var R;h=null;for(te in S)if(!v.hasOwnProperty(te)&&S.hasOwnProperty(te)&&S[te]!=null)if(te==="style"){var F=S[te];for(R in F)F.hasOwnProperty(R)&&(h||(h={}),h[R]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(o.hasOwnProperty(te)?k||(k=[]):(k=k||[]).push(te,null));for(te in v){var V=v[te];if(F=S?.[te],v.hasOwnProperty(te)&&V!==F&&(V!=null||F!=null))if(te==="style")if(F){for(R in F)!F.hasOwnProperty(R)||V&&V.hasOwnProperty(R)||(h||(h={}),h[R]="");for(R in V)V.hasOwnProperty(R)&&F[R]!==V[R]&&(h||(h={}),h[R]=V[R])}else h||(k||(k=[]),k.push(te,h)),h=V;else te==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,F=F?F.__html:void 0,V!=null&&F!==V&&(k=k||[]).push(te,V)):te==="children"?typeof V!="string"&&typeof V!="number"||(k=k||[]).push(te,""+V):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(o.hasOwnProperty(te)?(V!=null&&te==="onScroll"&&ar("scroll",i),k||F===V||(k=[])):(k=k||[]).push(te,V))}h&&(k=k||[]).push("style",h);var te=k;(c.updateQueue=te)&&(c.flags|=4)}},nk=function(i,c,h,v){h!==v&&(c.flags|=4)};function gd(i,c){if(!cr)switch(i.tailMode){case"hidden":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?i.tail=null:h.sibling=null;break;case"collapsed":h=i.tail;for(var v=null;h!==null;)h.alternate!==null&&(v=h),h=h.sibling;v===null?c||i.tail===null?i.tail=null:i.tail.sibling=null:v.sibling=null}}function en(i){var c=i.alternate!==null&&i.alternate.child===i.child,h=0,v=0;if(c)for(var S=i.child;S!==null;)h|=S.lanes|S.childLanes,v|=S.subtreeFlags&14680064,v|=S.flags&14680064,S.return=i,S=S.sibling;else for(S=i.child;S!==null;)h|=S.lanes|S.childLanes,v|=S.subtreeFlags,v|=S.flags,S.return=i,S=S.sibling;return i.subtreeFlags|=v,i.childLanes=h,c}function JA(i,c,h){var v=c.pendingProps;switch(Tg(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return en(c),null;case 1:return xn(c.type)&&Cp(),en(c),null;case 3:return v=c.stateNode,pl(),sr(Sn),sr(Zr),Fg(),v.pendingContext&&(v.context=v.pendingContext,v.pendingContext=null),(i===null||i.child===null)&&(Dp(c)?c.flags|=4:i===null||i.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,Co!==null&&(g_(Co),Co=null))),a_(i,c),en(c),null;case 5:Pg(c);var S=Ks(ud.current);if(h=c.type,i!==null&&c.stateNode!=null)rk(i,c,h,v,S),i.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!v){if(c.stateNode===null)throw Error(r(166));return en(c),null}if(i=Ks(Jo.current),Dp(c)){v=c.stateNode,h=c.type;var k=c.memoizedProps;switch(v[Go]=c,v[sd]=k,i=(c.mode&1)!==0,h){case"dialog":ar("cancel",v),ar("close",v);break;case"iframe":case"object":case"embed":ar("load",v);break;case"video":case"audio":for(S=0;S<nd.length;S++)ar(nd[S],v);break;case"source":ar("error",v);break;case"img":case"image":case"link":ar("error",v),ar("load",v);break;case"details":ar("toggle",v);break;case"input":Ae(v,k),ar("invalid",v);break;case"select":v._wrapperState={wasMultiple:!!k.multiple},ar("invalid",v);break;case"textarea":vt(v,k),ar("invalid",v)}Nt(h,k),S=null;for(var R in k)if(k.hasOwnProperty(R)){var F=k[R];R==="children"?typeof F=="string"?v.textContent!==F&&(k.suppressHydrationWarning!==!0&&Sp(v.textContent,F,i),S=["children",F]):typeof F=="number"&&v.textContent!==""+F&&(k.suppressHydrationWarning!==!0&&Sp(v.textContent,F,i),S=["children",""+F]):o.hasOwnProperty(R)&&F!=null&&R==="onScroll"&&ar("scroll",v)}switch(h){case"input":qe(v),Ge(v,k,!0);break;case"textarea":qe(v),be(v);break;case"select":case"option":break;default:typeof k.onClick=="function"&&(v.onclick=xp)}v=S,c.updateQueue=v,v!==null&&(c.flags|=4)}else{R=S.nodeType===9?S:S.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Ze(h)),i==="http://www.w3.org/1999/xhtml"?h==="script"?(i=R.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof v.is=="string"?i=R.createElement(h,{is:v.is}):(i=R.createElement(h),h==="select"&&(R=i,v.multiple?R.multiple=!0:v.size&&(R.size=v.size))):i=R.createElementNS(i,h),i[Go]=c,i[sd]=v,tk(i,c,!1,!1),c.stateNode=i;e:{switch(R=zr(h,v),h){case"dialog":ar("cancel",i),ar("close",i),S=v;break;case"iframe":case"object":case"embed":ar("load",i),S=v;break;case"video":case"audio":for(S=0;S<nd.length;S++)ar(nd[S],i);S=v;break;case"source":ar("error",i),S=v;break;case"img":case"image":case"link":ar("error",i),ar("load",i),S=v;break;case"details":ar("toggle",i),S=v;break;case"input":Ae(i,v),S=xe(i,v),ar("invalid",i);break;case"option":S=v;break;case"select":i._wrapperState={wasMultiple:!!v.multiple},S=ne({},v,{value:void 0}),ar("invalid",i);break;case"textarea":vt(i,v),S=Se(i,v),ar("invalid",i);break;default:S=v}Nt(h,S),F=S;for(k in F)if(F.hasOwnProperty(k)){var V=F[k];k==="style"?ke(i,V):k==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,V!=null&&Wt(i,V)):k==="children"?typeof V=="string"?(h!=="textarea"||V!=="")&&Lt(i,V):typeof V=="number"&&Lt(i,""+V):k!=="suppressContentEditableWarning"&&k!=="suppressHydrationWarning"&&k!=="autoFocus"&&(o.hasOwnProperty(k)?V!=null&&k==="onScroll"&&ar("scroll",i):V!=null&&O(i,k,V,R))}switch(h){case"input":qe(i),Ge(i,v,!1);break;case"textarea":qe(i),be(i);break;case"option":v.value!=null&&i.setAttribute("value",""+$e(v.value));break;case"select":i.multiple=!!v.multiple,k=v.value,k!=null?st(i,!!v.multiple,k,!1):v.defaultValue!=null&&st(i,!!v.multiple,v.defaultValue,!0);break;default:typeof S.onClick=="function"&&(i.onclick=xp)}switch(h){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}}v&&(c.flags|=4)}c.ref!==null&&(c.flags|=512,c.flags|=2097152)}return en(c),null;case 6:if(i&&c.stateNode!=null)nk(i,c,i.memoizedProps,v);else{if(typeof v!="string"&&c.stateNode===null)throw Error(r(166));if(h=Ks(ud.current),Ks(Jo.current),Dp(c)){if(v=c.stateNode,h=c.memoizedProps,v[Go]=c,(k=v.nodeValue!==h)&&(i=Wn,i!==null))switch(i.tag){case 3:Sp(v.nodeValue,h,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Sp(v.nodeValue,h,(i.mode&1)!==0)}k&&(c.flags|=4)}else v=(h.nodeType===9?h:h.ownerDocument).createTextNode(v),v[Go]=c,c.stateNode=v}return en(c),null;case 13:if(sr(fr),v=c.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(cr&&Hn!==null&&(c.mode&1)!==0&&(c.flags&128)===0)sx(),ll(),c.flags|=98560,k=!1;else if(k=Dp(c),v!==null&&v.dehydrated!==null){if(i===null){if(!k)throw Error(r(318));if(k=c.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(r(317));k[Go]=c}else ll(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;en(c),k=!1}else Co!==null&&(g_(Co),Co=null),k=!0;if(!k)return c.flags&65536?c:null}return(c.flags&128)!==0?(c.lanes=h,c):(v=v!==null,v!==(i!==null&&i.memoizedState!==null)&&v&&(c.child.flags|=8192,(c.mode&1)!==0&&(i===null||(fr.current&1)!==0?Rr===0&&(Rr=3):y_())),c.updateQueue!==null&&(c.flags|=4),en(c),null);case 4:return pl(),a_(i,c),i===null&&od(c.stateNode.containerInfo),en(c),null;case 10:return Ng(c.type._context),en(c),null;case 17:return xn(c.type)&&Cp(),en(c),null;case 19:if(sr(fr),k=c.memoizedState,k===null)return en(c),null;if(v=(c.flags&128)!==0,R=k.rendering,R===null)if(v)gd(k,!1);else{if(Rr!==0||i!==null&&(i.flags&128)!==0)for(i=c.child;i!==null;){if(R=jp(i),R!==null){for(c.flags|=128,gd(k,!1),v=R.updateQueue,v!==null&&(c.updateQueue=v,c.flags|=4),c.subtreeFlags=0,v=h,h=c.child;h!==null;)k=h,i=v,k.flags&=14680066,R=k.alternate,R===null?(k.childLanes=0,k.lanes=i,k.child=null,k.subtreeFlags=0,k.memoizedProps=null,k.memoizedState=null,k.updateQueue=null,k.dependencies=null,k.stateNode=null):(k.childLanes=R.childLanes,k.lanes=R.lanes,k.child=R.child,k.subtreeFlags=0,k.deletions=null,k.memoizedProps=R.memoizedProps,k.memoizedState=R.memoizedState,k.updateQueue=R.updateQueue,k.type=R.type,i=R.dependencies,k.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),h=h.sibling;return tr(fr,fr.current&1|2),c.child}i=i.sibling}k.tail!==null&&xr()>gl&&(c.flags|=128,v=!0,gd(k,!1),c.lanes=4194304)}else{if(!v)if(i=jp(R),i!==null){if(c.flags|=128,v=!0,h=i.updateQueue,h!==null&&(c.updateQueue=h,c.flags|=4),gd(k,!0),k.tail===null&&k.tailMode==="hidden"&&!R.alternate&&!cr)return en(c),null}else 2*xr()-k.renderingStartTime>gl&&h!==1073741824&&(c.flags|=128,v=!0,gd(k,!1),c.lanes=4194304);k.isBackwards?(R.sibling=c.child,c.child=R):(h=k.last,h!==null?h.sibling=R:c.child=R,k.last=R)}return k.tail!==null?(c=k.tail,k.rendering=c,k.tail=c.sibling,k.renderingStartTime=xr(),c.sibling=null,h=fr.current,tr(fr,v?h&1|2:h&1),c):(en(c),null);case 22:case 23:return v_(),v=c.memoizedState!==null,i!==null&&i.memoizedState!==null!==v&&(c.flags|=8192),v&&(c.mode&1)!==0?(Un&1073741824)!==0&&(en(c),c.subtreeFlags&6&&(c.flags|=8192)):en(c),null;case 24:return null;case 25:return null}throw Error(r(156,c.tag))}function XA(i,c){switch(Tg(c),c.tag){case 1:return xn(c.type)&&Cp(),i=c.flags,i&65536?(c.flags=i&-65537|128,c):null;case 3:return pl(),sr(Sn),sr(Zr),Fg(),i=c.flags,(i&65536)!==0&&(i&128)===0?(c.flags=i&-65537|128,c):null;case 5:return Pg(c),null;case 13:if(sr(fr),i=c.memoizedState,i!==null&&i.dehydrated!==null){if(c.alternate===null)throw Error(r(340));ll()}return i=c.flags,i&65536?(c.flags=i&-65537|128,c):null;case 19:return sr(fr),null;case 4:return pl(),null;case 10:return Ng(c.type._context),null;case 22:case 23:return v_(),null;case 24:return null;default:return null}}var Vp=!1,tn=!1,KA=typeof WeakSet=="function"?WeakSet:Set,ze=null;function fl(i,c){var h=i.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(v){vr(i,c,v)}else h.current=null}function s_(i,c,h){try{h()}catch(v){vr(i,c,v)}}var ok=!1;function YA(i,c){if(vg=up,i=jS(),dg(i)){if("selectionStart"in i)var h={start:i.selectionStart,end:i.selectionEnd};else e:{h=(h=i.ownerDocument)&&h.defaultView||window;var v=h.getSelection&&h.getSelection();if(v&&v.rangeCount!==0){h=v.anchorNode;var S=v.anchorOffset,k=v.focusNode;v=v.focusOffset;try{h.nodeType,k.nodeType}catch{h=null;break e}var R=0,F=-1,V=-1,te=0,he=0,_e=i,ue=null;t:for(;;){for(var Ee;_e!==h||S!==0&&_e.nodeType!==3||(F=R+S),_e!==k||v!==0&&_e.nodeType!==3||(V=R+v),_e.nodeType===3&&(R+=_e.nodeValue.length),(Ee=_e.firstChild)!==null;)ue=_e,_e=Ee;for(;;){if(_e===i)break t;if(ue===h&&++te===S&&(F=R),ue===k&&++he===v&&(V=R),(Ee=_e.nextSibling)!==null)break;_e=ue,ue=_e.parentNode}_e=Ee}h=F===-1||V===-1?null:{start:F,end:V}}else h=null}h=h||{start:0,end:0}}else h=null;for(yg={focusedElem:i,selectionRange:h},up=!1,ze=c;ze!==null;)if(c=ze,i=c.child,(c.subtreeFlags&1028)!==0&&i!==null)i.return=c,ze=i;else for(;ze!==null;){c=ze;try{var Be=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if(Be!==null){var He=Be.memoizedProps,kr=Be.memoizedState,Y=c.stateNode,G=Y.getSnapshotBeforeUpdate(c.elementType===c.type?He:$o(c.type,He),kr);Y.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var Q=c.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ve){vr(c,c.return,ve)}if(i=c.sibling,i!==null){i.return=c.return,ze=i;break}ze=c.return}return Be=ok,ok=!1,Be}function _d(i,c,h){var v=c.updateQueue;if(v=v!==null?v.lastEffect:null,v!==null){var S=v=v.next;do{if((S.tag&i)===i){var k=S.destroy;S.destroy=void 0,k!==void 0&&s_(c,h,k)}S=S.next}while(S!==v)}}function qp(i,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&i)===i){var v=h.create;h.destroy=v()}h=h.next}while(h!==c)}}function i_(i){var c=i.ref;if(c!==null){var h=i.stateNode;switch(i.tag){case 5:i=h;break;default:i=h}typeof c=="function"?c(i):c.current=i}}function ak(i){var c=i.alternate;c!==null&&(i.alternate=null,ak(c)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(c=i.stateNode,c!==null&&(delete c[Go],delete c[sd],delete c[xg],delete c[NA],delete c[MA])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function sk(i){return i.tag===5||i.tag===3||i.tag===4}function ik(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||sk(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function l_(i,c,h){var v=i.tag;if(v===5||v===6)i=i.stateNode,c?h.nodeType===8?h.parentNode.insertBefore(i,c):h.insertBefore(i,c):(h.nodeType===8?(c=h.parentNode,c.insertBefore(i,h)):(c=h,c.appendChild(i)),h=h._reactRootContainer,h!=null||c.onclick!==null||(c.onclick=xp));else if(v!==4&&(i=i.child,i!==null))for(l_(i,c,h),i=i.sibling;i!==null;)l_(i,c,h),i=i.sibling}function c_(i,c,h){var v=i.tag;if(v===5||v===6)i=i.stateNode,c?h.insertBefore(i,c):h.appendChild(i);else if(v!==4&&(i=i.child,i!==null))for(c_(i,c,h),i=i.sibling;i!==null;)c_(i,c,h),i=i.sibling}var Hr=null,To=!1;function as(i,c,h){for(h=h.child;h!==null;)lk(i,c,h),h=h.sibling}function lk(i,c,h){if(qo&&typeof qo.onCommitFiberUnmount=="function")try{qo.onCommitFiberUnmount(ap,h)}catch{}switch(h.tag){case 5:tn||fl(h,c);case 6:var v=Hr,S=To;Hr=null,as(i,c,h),Hr=v,To=S,Hr!==null&&(To?(i=Hr,h=h.stateNode,i.nodeType===8?i.parentNode.removeChild(h):i.removeChild(h)):Hr.removeChild(h.stateNode));break;case 18:Hr!==null&&(To?(i=Hr,h=h.stateNode,i.nodeType===8?Sg(i.parentNode,h):i.nodeType===1&&Sg(i,h),Xc(i)):Sg(Hr,h.stateNode));break;case 4:v=Hr,S=To,Hr=h.stateNode.containerInfo,To=!0,as(i,c,h),Hr=v,To=S;break;case 0:case 11:case 14:case 15:if(!tn&&(v=h.updateQueue,v!==null&&(v=v.lastEffect,v!==null))){S=v=v.next;do{var k=S,R=k.destroy;k=k.tag,R!==void 0&&((k&2)!==0||(k&4)!==0)&&s_(h,c,R),S=S.next}while(S!==v)}as(i,c,h);break;case 1:if(!tn&&(fl(h,c),v=h.stateNode,typeof v.componentWillUnmount=="function"))try{v.props=h.memoizedProps,v.state=h.memoizedState,v.componentWillUnmount()}catch(F){vr(h,c,F)}as(i,c,h);break;case 21:as(i,c,h);break;case 22:h.mode&1?(tn=(v=tn)||h.memoizedState!==null,as(i,c,h),tn=v):as(i,c,h);break;default:as(i,c,h)}}function ck(i){var c=i.updateQueue;if(c!==null){i.updateQueue=null;var h=i.stateNode;h===null&&(h=i.stateNode=new KA),c.forEach(function(v){var S=sI.bind(null,i,v);h.has(v)||(h.add(v),v.then(S,S))})}}function Eo(i,c){var h=c.deletions;if(h!==null)for(var v=0;v<h.length;v++){var S=h[v];try{var k=i,R=c,F=R;e:for(;F!==null;){switch(F.tag){case 5:Hr=F.stateNode,To=!1;break e;case 3:Hr=F.stateNode.containerInfo,To=!0;break e;case 4:Hr=F.stateNode.containerInfo,To=!0;break e}F=F.return}if(Hr===null)throw Error(r(160));lk(k,R,S),Hr=null,To=!1;var V=S.alternate;V!==null&&(V.return=null),S.return=null}catch(te){vr(S,c,te)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)dk(c,i),c=c.sibling}function dk(i,c){var h=i.alternate,v=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Eo(c,i),Ko(i),v&4){try{_d(3,i,i.return),qp(3,i)}catch(He){vr(i,i.return,He)}try{_d(5,i,i.return)}catch(He){vr(i,i.return,He)}}break;case 1:Eo(c,i),Ko(i),v&512&&h!==null&&fl(h,h.return);break;case 5:if(Eo(c,i),Ko(i),v&512&&h!==null&&fl(h,h.return),i.flags&32){var S=i.stateNode;try{Lt(S,"")}catch(He){vr(i,i.return,He)}}if(v&4&&(S=i.stateNode,S!=null)){var k=i.memoizedProps,R=h!==null?h.memoizedProps:k,F=i.type,V=i.updateQueue;if(i.updateQueue=null,V!==null)try{F==="input"&&k.type==="radio"&&k.name!=null&&kt(S,k),zr(F,R);var te=zr(F,k);for(R=0;R<V.length;R+=2){var he=V[R],_e=V[R+1];he==="style"?ke(S,_e):he==="dangerouslySetInnerHTML"?Wt(S,_e):he==="children"?Lt(S,_e):O(S,he,_e,te)}switch(F){case"input":we(S,k);break;case"textarea":le(S,k);break;case"select":var ue=S._wrapperState.wasMultiple;S._wrapperState.wasMultiple=!!k.multiple;var Ee=k.value;Ee!=null?st(S,!!k.multiple,Ee,!1):ue!==!!k.multiple&&(k.defaultValue!=null?st(S,!!k.multiple,k.defaultValue,!0):st(S,!!k.multiple,k.multiple?[]:"",!1))}S[sd]=k}catch(He){vr(i,i.return,He)}}break;case 6:if(Eo(c,i),Ko(i),v&4){if(i.stateNode===null)throw Error(r(162));S=i.stateNode,k=i.memoizedProps;try{S.nodeValue=k}catch(He){vr(i,i.return,He)}}break;case 3:if(Eo(c,i),Ko(i),v&4&&h!==null&&h.memoizedState.isDehydrated)try{Xc(c.containerInfo)}catch(He){vr(i,i.return,He)}break;case 4:Eo(c,i),Ko(i);break;case 13:Eo(c,i),Ko(i),S=i.child,S.flags&8192&&(k=S.memoizedState!==null,S.stateNode.isHidden=k,!k||S.alternate!==null&&S.alternate.memoizedState!==null||(p_=xr())),v&4&&ck(i);break;case 22:if(he=h!==null&&h.memoizedState!==null,i.mode&1?(tn=(te=tn)||he,Eo(c,i),tn=te):Eo(c,i),Ko(i),v&8192){if(te=i.memoizedState!==null,(i.stateNode.isHidden=te)&&!he&&(i.mode&1)!==0)for(ze=i,he=i.child;he!==null;){for(_e=ze=he;ze!==null;){switch(ue=ze,Ee=ue.child,ue.tag){case 0:case 11:case 14:case 15:_d(4,ue,ue.return);break;case 1:fl(ue,ue.return);var Be=ue.stateNode;if(typeof Be.componentWillUnmount=="function"){v=ue,h=ue.return;try{c=v,Be.props=c.memoizedProps,Be.state=c.memoizedState,Be.componentWillUnmount()}catch(He){vr(v,h,He)}}break;case 5:fl(ue,ue.return);break;case 22:if(ue.memoizedState!==null){hk(_e);continue}}Ee!==null?(Ee.return=ue,ze=Ee):hk(_e)}he=he.sibling}e:for(he=null,_e=i;;){if(_e.tag===5){if(he===null){he=_e;try{S=_e.stateNode,te?(k=S.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none"):(F=_e.stateNode,V=_e.memoizedProps.style,R=V!=null&&V.hasOwnProperty("display")?V.display:null,F.style.display=It("display",R))}catch(He){vr(i,i.return,He)}}}else if(_e.tag===6){if(he===null)try{_e.stateNode.nodeValue=te?"":_e.memoizedProps}catch(He){vr(i,i.return,He)}}else if((_e.tag!==22&&_e.tag!==23||_e.memoizedState===null||_e===i)&&_e.child!==null){_e.child.return=_e,_e=_e.child;continue}if(_e===i)break e;for(;_e.sibling===null;){if(_e.return===null||_e.return===i)break e;he===_e&&(he=null),_e=_e.return}he===_e&&(he=null),_e.sibling.return=_e.return,_e=_e.sibling}}break;case 19:Eo(c,i),Ko(i),v&4&&ck(i);break;case 21:break;default:Eo(c,i),Ko(i)}}function Ko(i){var c=i.flags;if(c&2){try{e:{for(var h=i.return;h!==null;){if(sk(h)){var v=h;break e}h=h.return}throw Error(r(160))}switch(v.tag){case 5:var S=v.stateNode;v.flags&32&&(Lt(S,""),v.flags&=-33);var k=ik(i);c_(i,k,S);break;case 3:case 4:var R=v.stateNode.containerInfo,F=ik(i);l_(i,F,R);break;default:throw Error(r(161))}}catch(V){vr(i,i.return,V)}i.flags&=-3}c&4096&&(i.flags&=-4097)}function ZA(i,c,h){ze=i,uk(i)}function uk(i,c,h){for(var v=(i.mode&1)!==0;ze!==null;){var S=ze,k=S.child;if(S.tag===22&&v){var R=S.memoizedState!==null||Vp;if(!R){var F=S.alternate,V=F!==null&&F.memoizedState!==null||tn;F=Vp;var te=tn;if(Vp=R,(tn=V)&&!te)for(ze=S;ze!==null;)R=ze,V=R.child,R.tag===22&&R.memoizedState!==null?fk(S):V!==null?(V.return=R,ze=V):fk(S);for(;k!==null;)ze=k,uk(k),k=k.sibling;ze=S,Vp=F,tn=te}pk(i)}else(S.subtreeFlags&8772)!==0&&k!==null?(k.return=S,ze=k):pk(i)}}function pk(i){for(;ze!==null;){var c=ze;if((c.flags&8772)!==0){var h=c.alternate;try{if((c.flags&8772)!==0)switch(c.tag){case 0:case 11:case 15:tn||qp(5,c);break;case 1:var v=c.stateNode;if(c.flags&4&&!tn)if(h===null)v.componentDidMount();else{var S=c.elementType===c.type?h.memoizedProps:$o(c.type,h.memoizedProps);v.componentDidUpdate(S,h.memoizedState,v.__reactInternalSnapshotBeforeUpdate)}var k=c.updateQueue;k!==null&&hx(c,k,v);break;case 3:var R=c.updateQueue;if(R!==null){if(h=null,c.child!==null)switch(c.child.tag){case 5:h=c.child.stateNode;break;case 1:h=c.child.stateNode}hx(c,R,h)}break;case 5:var F=c.stateNode;if(h===null&&c.flags&4){h=F;var V=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":V.autoFocus&&h.focus();break;case"img":V.src&&(h.src=V.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var te=c.alternate;if(te!==null){var he=te.memoizedState;if(he!==null){var _e=he.dehydrated;_e!==null&&Xc(_e)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}tn||c.flags&512&&i_(c)}catch(ue){vr(c,c.return,ue)}}if(c===i){ze=null;break}if(h=c.sibling,h!==null){h.return=c.return,ze=h;break}ze=c.return}}function hk(i){for(;ze!==null;){var c=ze;if(c===i){ze=null;break}var h=c.sibling;if(h!==null){h.return=c.return,ze=h;break}ze=c.return}}function fk(i){for(;ze!==null;){var c=ze;try{switch(c.tag){case 0:case 11:case 15:var h=c.return;try{qp(4,c)}catch(V){vr(c,h,V)}break;case 1:var v=c.stateNode;if(typeof v.componentDidMount=="function"){var S=c.return;try{v.componentDidMount()}catch(V){vr(c,S,V)}}var k=c.return;try{i_(c)}catch(V){vr(c,k,V)}break;case 5:var R=c.return;try{i_(c)}catch(V){vr(c,R,V)}}}catch(V){vr(c,c.return,V)}if(c===i){ze=null;break}var F=c.sibling;if(F!==null){F.return=c.return,ze=F;break}ze=c.return}}var QA=Math.ceil,Gp=I.ReactCurrentDispatcher,d_=I.ReactCurrentOwner,uo=I.ReactCurrentBatchConfig,Dt=0,Fr=null,Er=null,Ur=0,Un=0,ml=es(0),Rr=0,vd=null,Zs=0,Jp=0,u_=0,yd=null,Cn=null,p_=0,gl=1/0,Ta=null,Xp=!1,h_=null,ss=null,Kp=!1,is=null,Yp=0,bd=0,f_=null,Zp=-1,Qp=0;function pn(){return(Dt&6)!==0?xr():Zp!==-1?Zp:Zp=xr()}function ls(i){return(i.mode&1)===0?1:(Dt&2)!==0&&Ur!==0?Ur&-Ur:jA.transition!==null?(Qp===0&&(Qp=iS()),Qp):(i=Ft,i!==0||(i=window.event,i=i===void 0?16:gS(i.type)),i)}function Oo(i,c,h,v){if(50<bd)throw bd=0,f_=null,Error(r(185));Uc(i,h,v),((Dt&2)===0||i!==Fr)&&(i===Fr&&((Dt&2)===0&&(Jp|=h),Rr===4&&cs(i,Ur)),$n(i,v),h===1&&Dt===0&&(c.mode&1)===0&&(gl=xr()+500,Tp&&rs()))}function $n(i,c){var h=i.callbackNode;jD(i,c);var v=lp(i,i===Fr?Ur:0);if(v===0)h!==null&&oS(h),i.callbackNode=null,i.callbackPriority=0;else if(c=v&-v,i.callbackPriority!==c){if(h!=null&&oS(h),c===1)i.tag===0?RA(gk.bind(null,i)):tx(gk.bind(null,i)),AA(function(){(Dt&6)===0&&rs()}),h=null;else{switch(lS(v)){case 1:h=Gm;break;case 4:h=aS;break;case 16:h=op;break;case 536870912:h=sS;break;default:h=op}h=kk(h,mk.bind(null,i))}i.callbackPriority=c,i.callbackNode=h}}function mk(i,c){if(Zp=-1,Qp=0,(Dt&6)!==0)throw Error(r(327));var h=i.callbackNode;if(_l()&&i.callbackNode!==h)return null;var v=lp(i,i===Fr?Ur:0);if(v===0)return null;if((v&30)!==0||(v&i.expiredLanes)!==0||c)c=eh(i,v);else{c=v;var S=Dt;Dt|=2;var k=vk();(Fr!==i||Ur!==c)&&(Ta=null,gl=xr()+500,ei(i,c));do try{rI();break}catch(F){_k(i,F)}while(!0);Ig(),Gp.current=k,Dt=S,Er!==null?c=0:(Fr=null,Ur=0,c=Rr)}if(c!==0){if(c===2&&(S=Jm(i),S!==0&&(v=S,c=m_(i,S))),c===1)throw h=vd,ei(i,0),cs(i,v),$n(i,xr()),h;if(c===6)cs(i,v);else{if(S=i.current.alternate,(v&30)===0&&!eI(S)&&(c=eh(i,v),c===2&&(k=Jm(i),k!==0&&(v=k,c=m_(i,k))),c===1))throw h=vd,ei(i,0),cs(i,v),$n(i,xr()),h;switch(i.finishedWork=S,i.finishedLanes=v,c){case 0:case 1:throw Error(r(345));case 2:ti(i,Cn,Ta);break;case 3:if(cs(i,v),(v&130023424)===v&&(c=p_+500-xr(),10<c)){if(lp(i,0)!==0)break;if(S=i.suspendedLanes,(S&v)!==v){pn(),i.pingedLanes|=i.suspendedLanes&S;break}i.timeoutHandle=wg(ti.bind(null,i,Cn,Ta),c);break}ti(i,Cn,Ta);break;case 4:if(cs(i,v),(v&4194240)===v)break;for(c=i.eventTimes,S=-1;0<v;){var R=31-xo(v);k=1<<R,R=c[R],R>S&&(S=R),v&=~k}if(v=S,v=xr()-v,v=(120>v?120:480>v?480:1080>v?1080:1920>v?1920:3e3>v?3e3:4320>v?4320:1960*QA(v/1960))-v,10<v){i.timeoutHandle=wg(ti.bind(null,i,Cn,Ta),v);break}ti(i,Cn,Ta);break;case 5:ti(i,Cn,Ta);break;default:throw Error(r(329))}}}return $n(i,xr()),i.callbackNode===h?mk.bind(null,i):null}function m_(i,c){var h=yd;return i.current.memoizedState.isDehydrated&&(ei(i,c).flags|=256),i=eh(i,c),i!==2&&(c=Cn,Cn=h,c!==null&&g_(c)),i}function g_(i){Cn===null?Cn=i:Cn.push.apply(Cn,i)}function eI(i){for(var c=i;;){if(c.flags&16384){var h=c.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var v=0;v<h.length;v++){var S=h[v],k=S.getSnapshot;S=S.value;try{if(!ko(k(),S))return!1}catch{return!1}}}if(h=c.child,c.subtreeFlags&16384&&h!==null)h.return=c,c=h;else{if(c===i)break;for(;c.sibling===null;){if(c.return===null||c.return===i)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function cs(i,c){for(c&=~u_,c&=~Jp,i.suspendedLanes|=c,i.pingedLanes&=~c,i=i.expirationTimes;0<c;){var h=31-xo(c),v=1<<h;i[h]=-1,c&=~v}}function gk(i){if((Dt&6)!==0)throw Error(r(327));_l();var c=lp(i,0);if((c&1)===0)return $n(i,xr()),null;var h=eh(i,c);if(i.tag!==0&&h===2){var v=Jm(i);v!==0&&(c=v,h=m_(i,v))}if(h===1)throw h=vd,ei(i,0),cs(i,c),$n(i,xr()),h;if(h===6)throw Error(r(345));return i.finishedWork=i.current.alternate,i.finishedLanes=c,ti(i,Cn,Ta),$n(i,xr()),null}function __(i,c){var h=Dt;Dt|=1;try{return i(c)}finally{Dt=h,Dt===0&&(gl=xr()+500,Tp&&rs())}}function Qs(i){is!==null&&is.tag===0&&(Dt&6)===0&&_l();var c=Dt;Dt|=1;var h=uo.transition,v=Ft;try{if(uo.transition=null,Ft=1,i)return i()}finally{Ft=v,uo.transition=h,Dt=c,(Dt&6)===0&&rs()}}function v_(){Un=ml.current,sr(ml)}function ei(i,c){i.finishedWork=null,i.finishedLanes=0;var h=i.timeoutHandle;if(h!==-1&&(i.timeoutHandle=-1,DA(h)),Er!==null)for(h=Er.return;h!==null;){var v=h;switch(Tg(v),v.tag){case 1:v=v.type.childContextTypes,v!=null&&Cp();break;case 3:pl(),sr(Sn),sr(Zr),Fg();break;case 5:Pg(v);break;case 4:pl();break;case 13:sr(fr);break;case 19:sr(fr);break;case 10:Ng(v.type._context);break;case 22:case 23:v_()}h=h.return}if(Fr=i,Er=i=ds(i.current,null),Ur=Un=c,Rr=0,vd=null,u_=Jp=Zs=0,Cn=yd=null,Xs!==null){for(c=0;c<Xs.length;c++)if(h=Xs[c],v=h.interleaved,v!==null){h.interleaved=null;var S=v.next,k=h.pending;if(k!==null){var R=k.next;k.next=S,v.next=R}h.pending=v}Xs=null}return i}function _k(i,c){do{var h=Er;try{if(Ig(),zp.current=Bp,Pp){for(var v=mr.memoizedState;v!==null;){var S=v.queue;S!==null&&(S.pending=null),v=v.next}Pp=!1}if(Ys=0,Lr=Mr=mr=null,pd=!1,hd=0,d_.current=null,h===null||h.return===null){Rr=1,vd=c,Er=null;break}e:{var k=i,R=h.return,F=h,V=c;if(c=Ur,F.flags|=32768,V!==null&&typeof V=="object"&&typeof V.then=="function"){var te=V,he=F,_e=he.tag;if((he.mode&1)===0&&(_e===0||_e===11||_e===15)){var ue=he.alternate;ue?(he.updateQueue=ue.updateQueue,he.memoizedState=ue.memoizedState,he.lanes=ue.lanes):(he.updateQueue=null,he.memoizedState=null)}var Ee=Wx(R);if(Ee!==null){Ee.flags&=-257,Hx(Ee,R,F,k,c),Ee.mode&1&&Bx(k,te,c),c=Ee,V=te;var Be=c.updateQueue;if(Be===null){var He=new Set;He.add(V),c.updateQueue=He}else Be.add(V);break e}else{if((c&1)===0){Bx(k,te,c),y_();break e}V=Error(r(426))}}else if(cr&&F.mode&1){var kr=Wx(R);if(kr!==null){(kr.flags&65536)===0&&(kr.flags|=256),Hx(kr,R,F,k,c),Dg(hl(V,F));break e}}k=V=hl(V,F),Rr!==4&&(Rr=2),yd===null?yd=[k]:yd.push(k),k=R;do{switch(k.tag){case 3:k.flags|=65536,c&=-c,k.lanes|=c;var Y=Lx(k,V,c);px(k,Y);break e;case 1:F=V;var G=k.type,Q=k.stateNode;if((k.flags&128)===0&&(typeof G.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(ss===null||!ss.has(Q)))){k.flags|=65536,c&=-c,k.lanes|=c;var ve=Fx(k,F,c);px(k,ve);break e}}k=k.return}while(k!==null)}bk(h)}catch(Je){c=Je,Er===h&&h!==null&&(Er=h=h.return);continue}break}while(!0)}function vk(){var i=Gp.current;return Gp.current=Bp,i===null?Bp:i}function y_(){(Rr===0||Rr===3||Rr===2)&&(Rr=4),Fr===null||(Zs&268435455)===0&&(Jp&268435455)===0||cs(Fr,Ur)}function eh(i,c){var h=Dt;Dt|=2;var v=vk();(Fr!==i||Ur!==c)&&(Ta=null,ei(i,c));do try{tI();break}catch(S){_k(i,S)}while(!0);if(Ig(),Dt=h,Gp.current=v,Er!==null)throw Error(r(261));return Fr=null,Ur=0,Rr}function tI(){for(;Er!==null;)yk(Er)}function rI(){for(;Er!==null&&!TD();)yk(Er)}function yk(i){var c=xk(i.alternate,i,Un);i.memoizedProps=i.pendingProps,c===null?bk(i):Er=c,d_.current=null}function bk(i){var c=i;do{var h=c.alternate;if(i=c.return,(c.flags&32768)===0){if(h=JA(h,c,Un),h!==null){Er=h;return}}else{if(h=XA(h,c),h!==null){h.flags&=32767,Er=h;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Rr=6,Er=null;return}}if(c=c.sibling,c!==null){Er=c;return}Er=c=i}while(c!==null);Rr===0&&(Rr=5)}function ti(i,c,h){var v=Ft,S=uo.transition;try{uo.transition=null,Ft=1,nI(i,c,h,v)}finally{uo.transition=S,Ft=v}return null}function nI(i,c,h,v){do _l();while(is!==null);if((Dt&6)!==0)throw Error(r(327));h=i.finishedWork;var S=i.finishedLanes;if(h===null)return null;if(i.finishedWork=null,i.finishedLanes=0,h===i.current)throw Error(r(177));i.callbackNode=null,i.callbackPriority=0;var k=h.lanes|h.childLanes;if(zD(i,k),i===Fr&&(Er=Fr=null,Ur=0),(h.subtreeFlags&2064)===0&&(h.flags&2064)===0||Kp||(Kp=!0,kk(op,function(){return _l(),null})),k=(h.flags&15990)!==0,(h.subtreeFlags&15990)!==0||k){k=uo.transition,uo.transition=null;var R=Ft;Ft=1;var F=Dt;Dt|=4,d_.current=null,YA(i,h),dk(h,i),xA(yg),up=!!vg,yg=vg=null,i.current=h,ZA(h),ED(),Dt=F,Ft=R,uo.transition=k}else i.current=h;if(Kp&&(Kp=!1,is=i,Yp=S),k=i.pendingLanes,k===0&&(ss=null),AD(h.stateNode),$n(i,xr()),c!==null)for(v=i.onRecoverableError,h=0;h<c.length;h++)S=c[h],v(S.value,{componentStack:S.stack,digest:S.digest});if(Xp)throw Xp=!1,i=h_,h_=null,i;return(Yp&1)!==0&&i.tag!==0&&_l(),k=i.pendingLanes,(k&1)!==0?i===f_?bd++:(bd=0,f_=i):bd=0,rs(),null}function _l(){if(is!==null){var i=lS(Yp),c=uo.transition,h=Ft;try{if(uo.transition=null,Ft=16>i?16:i,is===null)var v=!1;else{if(i=is,is=null,Yp=0,(Dt&6)!==0)throw Error(r(331));var S=Dt;for(Dt|=4,ze=i.current;ze!==null;){var k=ze,R=k.child;if((ze.flags&16)!==0){var F=k.deletions;if(F!==null){for(var V=0;V<F.length;V++){var te=F[V];for(ze=te;ze!==null;){var he=ze;switch(he.tag){case 0:case 11:case 15:_d(8,he,k)}var _e=he.child;if(_e!==null)_e.return=he,ze=_e;else for(;ze!==null;){he=ze;var ue=he.sibling,Ee=he.return;if(ak(he),he===te){ze=null;break}if(ue!==null){ue.return=Ee,ze=ue;break}ze=Ee}}}var Be=k.alternate;if(Be!==null){var He=Be.child;if(He!==null){Be.child=null;do{var kr=He.sibling;He.sibling=null,He=kr}while(He!==null)}}ze=k}}if((k.subtreeFlags&2064)!==0&&R!==null)R.return=k,ze=R;else e:for(;ze!==null;){if(k=ze,(k.flags&2048)!==0)switch(k.tag){case 0:case 11:case 15:_d(9,k,k.return)}var Y=k.sibling;if(Y!==null){Y.return=k.return,ze=Y;break e}ze=k.return}}var G=i.current;for(ze=G;ze!==null;){R=ze;var Q=R.child;if((R.subtreeFlags&2064)!==0&&Q!==null)Q.return=R,ze=Q;else e:for(R=G;ze!==null;){if(F=ze,(F.flags&2048)!==0)try{switch(F.tag){case 0:case 11:case 15:qp(9,F)}}catch(Je){vr(F,F.return,Je)}if(F===R){ze=null;break e}var ve=F.sibling;if(ve!==null){ve.return=F.return,ze=ve;break e}ze=F.return}}if(Dt=S,rs(),qo&&typeof qo.onPostCommitFiberRoot=="function")try{qo.onPostCommitFiberRoot(ap,i)}catch{}v=!0}return v}finally{Ft=h,uo.transition=c}}return!1}function wk(i,c,h){c=hl(h,c),c=Lx(i,c,1),i=os(i,c,1),c=pn(),i!==null&&(Uc(i,1,c),$n(i,c))}function vr(i,c,h){if(i.tag===3)wk(i,i,h);else for(;c!==null;){if(c.tag===3){wk(c,i,h);break}else if(c.tag===1){var v=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(ss===null||!ss.has(v))){i=hl(h,i),i=Fx(c,i,1),c=os(c,i,1),i=pn(),c!==null&&(Uc(c,1,i),$n(c,i));break}}c=c.return}}function oI(i,c,h){var v=i.pingCache;v!==null&&v.delete(c),c=pn(),i.pingedLanes|=i.suspendedLanes&h,Fr===i&&(Ur&h)===h&&(Rr===4||Rr===3&&(Ur&130023424)===Ur&&500>xr()-p_?ei(i,0):u_|=h),$n(i,c)}function Sk(i,c){c===0&&((i.mode&1)===0?c=1:(c=ip,ip<<=1,(ip&130023424)===0&&(ip=4194304)));var h=pn();i=ka(i,c),i!==null&&(Uc(i,c,h),$n(i,h))}function aI(i){var c=i.memoizedState,h=0;c!==null&&(h=c.retryLane),Sk(i,h)}function sI(i,c){var h=0;switch(i.tag){case 13:var v=i.stateNode,S=i.memoizedState;S!==null&&(h=S.retryLane);break;case 19:v=i.stateNode;break;default:throw Error(r(314))}v!==null&&v.delete(c),Sk(i,h)}var xk;xk=function(i,c,h){if(i!==null)if(i.memoizedProps!==c.pendingProps||Sn.current)kn=!0;else{if((i.lanes&h)===0&&(c.flags&128)===0)return kn=!1,GA(i,c,h);kn=(i.flags&131072)!==0}else kn=!1,cr&&(c.flags&1048576)!==0&&rx(c,Op,c.index);switch(c.lanes=0,c.tag){case 2:var v=c.type;Up(i,c),i=c.pendingProps;var S=al(c,Zr.current);ul(c,h),S=Hg(null,c,v,i,S,h);var k=Ug();return c.flags|=1,typeof S=="object"&&S!==null&&typeof S.render=="function"&&S.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,xn(v)?(k=!0,$p(c)):k=!1,c.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,jg(c),S.updater=Wp,c.stateNode=S,S._reactInternals=c,Kg(c,v,i,h),c=e_(null,c,v,!0,k,h)):(c.tag=0,cr&&k&&$g(c),un(null,c,S,h),c=c.child),c;case 16:v=c.elementType;e:{switch(Up(i,c),i=c.pendingProps,S=v._init,v=S(v._payload),c.type=v,S=c.tag=lI(v),i=$o(v,i),S){case 0:c=Qg(null,c,v,i,h);break e;case 1:c=Xx(null,c,v,i,h);break e;case 11:c=Ux(null,c,v,i,h);break e;case 14:c=Vx(null,c,v,$o(v.type,i),h);break e}throw Error(r(306,v,""))}return c;case 0:return v=c.type,S=c.pendingProps,S=c.elementType===v?S:$o(v,S),Qg(i,c,v,S,h);case 1:return v=c.type,S=c.pendingProps,S=c.elementType===v?S:$o(v,S),Xx(i,c,v,S,h);case 3:e:{if(Kx(c),i===null)throw Error(r(387));v=c.pendingProps,k=c.memoizedState,S=k.element,ux(i,c),Rp(c,v,null,h);var R=c.memoizedState;if(v=R.element,k.isDehydrated)if(k={element:v,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},c.updateQueue.baseState=k,c.memoizedState=k,c.flags&256){S=hl(Error(r(423)),c),c=Yx(i,c,v,h,S);break e}else if(v!==S){S=hl(Error(r(424)),c),c=Yx(i,c,v,h,S);break e}else for(Hn=Qa(c.stateNode.containerInfo.firstChild),Wn=c,cr=!0,Co=null,h=cx(c,null,v,h),c.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(ll(),v===S){c=$a(i,c,h);break e}un(i,c,v,h)}c=c.child}return c;case 5:return fx(c),i===null&&Og(c),v=c.type,S=c.pendingProps,k=i!==null?i.memoizedProps:null,R=S.children,bg(v,S)?R=null:k!==null&&bg(v,k)&&(c.flags|=32),Jx(i,c),un(i,c,R,h),c.child;case 6:return i===null&&Og(c),null;case 13:return Zx(i,c,h);case 4:return zg(c,c.stateNode.containerInfo),v=c.pendingProps,i===null?c.child=cl(c,null,v,h):un(i,c,v,h),c.child;case 11:return v=c.type,S=c.pendingProps,S=c.elementType===v?S:$o(v,S),Ux(i,c,v,S,h);case 7:return un(i,c,c.pendingProps,h),c.child;case 8:return un(i,c,c.pendingProps.children,h),c.child;case 12:return un(i,c,c.pendingProps.children,h),c.child;case 10:e:{if(v=c.type._context,S=c.pendingProps,k=c.memoizedProps,R=S.value,tr(Ip,v._currentValue),v._currentValue=R,k!==null)if(ko(k.value,R)){if(k.children===S.children&&!Sn.current){c=$a(i,c,h);break e}}else for(k=c.child,k!==null&&(k.return=c);k!==null;){var F=k.dependencies;if(F!==null){R=k.child;for(var V=F.firstContext;V!==null;){if(V.context===v){if(k.tag===1){V=Ca(-1,h&-h),V.tag=2;var te=k.updateQueue;if(te!==null){te=te.shared;var he=te.pending;he===null?V.next=V:(V.next=he.next,he.next=V),te.pending=V}}k.lanes|=h,V=k.alternate,V!==null&&(V.lanes|=h),Mg(k.return,h,c),F.lanes|=h;break}V=V.next}}else if(k.tag===10)R=k.type===c.type?null:k.child;else if(k.tag===18){if(R=k.return,R===null)throw Error(r(341));R.lanes|=h,F=R.alternate,F!==null&&(F.lanes|=h),Mg(R,h,c),R=k.sibling}else R=k.child;if(R!==null)R.return=k;else for(R=k;R!==null;){if(R===c){R=null;break}if(k=R.sibling,k!==null){k.return=R.return,R=k;break}R=R.return}k=R}un(i,c,S.children,h),c=c.child}return c;case 9:return S=c.type,v=c.pendingProps.children,ul(c,h),S=lo(S),v=v(S),c.flags|=1,un(i,c,v,h),c.child;case 14:return v=c.type,S=$o(v,c.pendingProps),S=$o(v.type,S),Vx(i,c,v,S,h);case 15:return qx(i,c,c.type,c.pendingProps,h);case 17:return v=c.type,S=c.pendingProps,S=c.elementType===v?S:$o(v,S),Up(i,c),c.tag=1,xn(v)?(i=!0,$p(c)):i=!1,ul(c,h),zx(c,v,S),Kg(c,v,S,h),e_(null,c,v,!0,i,h);case 19:return ek(i,c,h);case 22:return Gx(i,c,h)}throw Error(r(156,c.tag))};function kk(i,c){return nS(i,c)}function iI(i,c,h,v){this.tag=i,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function po(i,c,h,v){return new iI(i,c,h,v)}function b_(i){return i=i.prototype,!(!i||!i.isReactComponent)}function lI(i){if(typeof i=="function")return b_(i)?1:0;if(i!=null){if(i=i.$$typeof,i===W)return 11;if(i===B)return 14}return 2}function ds(i,c){var h=i.alternate;return h===null?(h=po(i.tag,c,i.key,i.mode),h.elementType=i.elementType,h.type=i.type,h.stateNode=i.stateNode,h.alternate=i,i.alternate=h):(h.pendingProps=c,h.type=i.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=i.flags&14680064,h.childLanes=i.childLanes,h.lanes=i.lanes,h.child=i.child,h.memoizedProps=i.memoizedProps,h.memoizedState=i.memoizedState,h.updateQueue=i.updateQueue,c=i.dependencies,h.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},h.sibling=i.sibling,h.index=i.index,h.ref=i.ref,h}function th(i,c,h,v,S,k){var R=2;if(v=i,typeof i=="function")b_(i)&&(R=1);else if(typeof i=="string")R=5;else e:switch(i){case M:return ri(h.children,S,k,c);case j:R=8,S|=8;break;case z:return i=po(12,h,c,S|2),i.elementType=z,i.lanes=k,i;case U:return i=po(13,h,c,S),i.elementType=U,i.lanes=k,i;case H:return i=po(19,h,c,S),i.elementType=H,i.lanes=k,i;case oe:return rh(h,S,k,c);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:R=10;break e;case L:R=9;break e;case W:R=11;break e;case B:R=14;break e;case K:R=16,v=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return c=po(R,h,c,S),c.elementType=i,c.type=v,c.lanes=k,c}function ri(i,c,h,v){return i=po(7,i,v,c),i.lanes=h,i}function rh(i,c,h,v){return i=po(22,i,v,c),i.elementType=oe,i.lanes=h,i.stateNode={isHidden:!1},i}function w_(i,c,h){return i=po(6,i,null,c),i.lanes=h,i}function S_(i,c,h){return c=po(4,i.children!==null?i.children:[],i.key,c),c.lanes=h,c.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},c}function cI(i,c,h,v,S){this.tag=c,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xm(0),this.expirationTimes=Xm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xm(0),this.identifierPrefix=v,this.onRecoverableError=S,this.mutableSourceEagerHydrationData=null}function x_(i,c,h,v,S,k,R,F,V){return i=new cI(i,c,h,F,V),c===1?(c=1,k===!0&&(c|=8)):c=0,k=po(3,null,null,c),i.current=k,k.stateNode=i,k.memoizedState={element:v,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},jg(k),i}function dI(i,c,h){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:E,key:v==null?null:""+v,children:i,containerInfo:c,implementation:h}}function Ck(i){if(!i)return ts;i=i._reactInternals;e:{if(Us(i)!==i||i.tag!==1)throw Error(r(170));var c=i;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(xn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(r(171))}if(i.tag===1){var h=i.type;if(xn(h))return QS(i,h,c)}return c}function $k(i,c,h,v,S,k,R,F,V){return i=x_(h,v,!0,i,S,k,R,F,V),i.context=Ck(null),h=i.current,v=pn(),S=ls(h),k=Ca(v,S),k.callback=c??null,os(h,k,S),i.current.lanes=S,Uc(i,S,v),$n(i,v),i}function nh(i,c,h,v){var S=c.current,k=pn(),R=ls(S);return h=Ck(h),c.context===null?c.context=h:c.pendingContext=h,c=Ca(k,R),c.payload={element:i},v=v===void 0?null:v,v!==null&&(c.callback=v),i=os(S,c,R),i!==null&&(Oo(i,S,R,k),Mp(i,S,R)),R}function oh(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function Tk(i,c){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var h=i.retryLane;i.retryLane=h!==0&&h<c?h:c}}function k_(i,c){Tk(i,c),(i=i.alternate)&&Tk(i,c)}function uI(){return null}var Ek=typeof reportError=="function"?reportError:function(i){console.error(i)};function C_(i){this._internalRoot=i}ah.prototype.render=C_.prototype.render=function(i){var c=this._internalRoot;if(c===null)throw Error(r(409));nh(i,c,null,null)},ah.prototype.unmount=C_.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var c=i.containerInfo;Qs(function(){nh(null,i,null,null)}),c[ba]=null}};function ah(i){this._internalRoot=i}ah.prototype.unstable_scheduleHydration=function(i){if(i){var c=uS();i={blockedOn:null,target:i,priority:c};for(var h=0;h<Ka.length&&c!==0&&c<Ka[h].priority;h++);Ka.splice(h,0,i),h===0&&fS(i)}};function $_(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function sh(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Ok(){}function pI(i,c,h,v,S){if(S){if(typeof v=="function"){var k=v;v=function(){var te=oh(R);k.call(te)}}var R=$k(c,v,i,0,null,!1,!1,"",Ok);return i._reactRootContainer=R,i[ba]=R.current,od(i.nodeType===8?i.parentNode:i),Qs(),R}for(;S=i.lastChild;)i.removeChild(S);if(typeof v=="function"){var F=v;v=function(){var te=oh(V);F.call(te)}}var V=x_(i,0,!1,null,null,!1,!1,"",Ok);return i._reactRootContainer=V,i[ba]=V.current,od(i.nodeType===8?i.parentNode:i),Qs(function(){nh(c,V,h,v)}),V}function ih(i,c,h,v,S){var k=h._reactRootContainer;if(k){var R=k;if(typeof S=="function"){var F=S;S=function(){var V=oh(R);F.call(V)}}nh(c,R,i,S)}else R=pI(h,c,i,S,v);return oh(R)}cS=function(i){switch(i.tag){case 3:var c=i.stateNode;if(c.current.memoizedState.isDehydrated){var h=Hc(c.pendingLanes);h!==0&&(Km(c,h|1),$n(c,xr()),(Dt&6)===0&&(gl=xr()+500,rs()))}break;case 13:Qs(function(){var v=ka(i,1);if(v!==null){var S=pn();Oo(v,i,1,S)}}),k_(i,1)}},Ym=function(i){if(i.tag===13){var c=ka(i,134217728);if(c!==null){var h=pn();Oo(c,i,134217728,h)}k_(i,134217728)}},dS=function(i){if(i.tag===13){var c=ls(i),h=ka(i,c);if(h!==null){var v=pn();Oo(h,i,c,v)}k_(i,c)}},uS=function(){return Ft},pS=function(i,c){var h=Ft;try{return Ft=i,c()}finally{Ft=h}},Hs=function(i,c,h){switch(c){case"input":if(we(i,h),c=h.name,h.type==="radio"&&c!=null){for(h=i;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+c)+'][type="radio"]'),c=0;c<h.length;c++){var v=h[c];if(v!==i&&v.form===i.form){var S=kp(v);if(!S)throw Error(r(90));Ne(v),we(v,S)}}}break;case"textarea":le(i,h);break;case"select":c=h.value,c!=null&&st(i,!!h.multiple,c,!1)}},Ji=__,ht=Qs;var hI={usingClientEntryPoint:!1,Events:[id,nl,kp,qi,Gi,__]},wd={findFiberByHostInstance:Vs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fI={bundleType:wd.bundleType,version:wd.version,rendererPackageName:wd.rendererPackageName,rendererConfig:wd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=tS(i),i===null?null:i.stateNode},findFiberByHostInstance:wd.findFiberByHostInstance||uI,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lh.isDisabled&&lh.supportsFiber)try{ap=lh.inject(fI),qo=lh}catch{}}return Tn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hI,Tn.createPortal=function(i,c){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$_(c))throw Error(r(200));return dI(i,c,null,h)},Tn.createRoot=function(i,c){if(!$_(i))throw Error(r(299));var h=!1,v="",S=Ek;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),c=x_(i,1,!1,null,null,h,!1,v,S),i[ba]=c.current,od(i.nodeType===8?i.parentNode:i),new C_(c)},Tn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var c=i._reactInternals;if(c===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=tS(c),i=i===null?null:i.stateNode,i},Tn.flushSync=function(i){return Qs(i)},Tn.hydrate=function(i,c,h){if(!sh(c))throw Error(r(200));return ih(null,i,c,!0,h)},Tn.hydrateRoot=function(i,c,h){if(!$_(i))throw Error(r(405));var v=h!=null&&h.hydratedSources||null,S=!1,k="",R=Ek;if(h!=null&&(h.unstable_strictMode===!0&&(S=!0),h.identifierPrefix!==void 0&&(k=h.identifierPrefix),h.onRecoverableError!==void 0&&(R=h.onRecoverableError)),c=$k(c,null,i,1,h??null,S,!1,k,R),i[ba]=c.current,od(i),v)for(i=0;i<v.length;i++)h=v[i],S=h._getVersion,S=S(h._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[h,S]:c.mutableSourceEagerHydrationData.push(h,S);return new ah(c)},Tn.render=function(i,c,h){if(!sh(c))throw Error(r(200));return ih(null,i,c,!1,h)},Tn.unmountComponentAtNode=function(i){if(!sh(i))throw Error(r(40));return i._reactRootContainer?(Qs(function(){ih(null,null,i,!1,function(){i._reactRootContainer=null,i[ba]=null})}),!0):!1},Tn.unstable_batchedUpdates=__,Tn.unstable_renderSubtreeIntoContainer=function(i,c,h,v){if(!sh(h))throw Error(r(200));if(i==null||i._reactInternals===void 0)throw Error(r(38));return ih(i,c,h,!1,v)},Tn.version="18.3.1-next-f1338f8080-20240426",Tn}var zk;function X6(){if(zk)return O_.exports;zk=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),O_.exports=xI(),O_.exports}var Pk;function kI(){if(Pk)return dh;Pk=1;var t=X6();return dh.createRoot=t.createRoot,dh.hydrateRoot=t.hydrateRoot,dh}var CI=kI();const $I="4.1.12",TI={version:$I};function Pa(t,...e){const r=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${t}; visit ${r} for the full message.`}const zo="$$material";function ff(){return ff=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ff.apply(null,arguments)}function EI(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function OI(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var K6=(function(){function t(r){var n=this;this._insertTag=function(o){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,a),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(OI(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=EI(o);try{a.insertRule(n,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},t})(),on="-ms-",mf="-moz-",Mt="-webkit-",Y6="comm",o2="rule",a2="decl",DI="@import",Z6="@keyframes",AI="@layer",II=Math.abs,Jf=String.fromCharCode,NI=Object.assign;function MI(t,e){return Gr(t,0)^45?(((e<<2^Gr(t,0))<<2^Gr(t,1))<<2^Gr(t,2))<<2^Gr(t,3):0}function Q6(t){return t.trim()}function RI(t,e){return(t=e.exec(t))?t[0]:t}function Rt(t,e,r){return t.replace(e,r)}function B1(t,e){return t.indexOf(e)}function Gr(t,e){return t.charCodeAt(e)|0}function mu(t,e,r){return t.slice(e,r)}function oa(t){return t.length}function s2(t){return t.length}function uh(t,e){return e.push(t),t}function jI(t,e){return t.map(e).join("")}var Xf=1,fc=1,e8=0,Pn=0,Ar=0,Tc="";function Kf(t,e,r,n,o,a,s){return{value:t,root:e,parent:r,type:n,props:o,children:a,line:Xf,column:fc,length:s,return:""}}function xd(t,e){return NI(Kf("",null,null,"",null,null,0),t,{length:-t.length},e)}function zI(){return Ar}function PI(){return Ar=Pn>0?Gr(Tc,--Pn):0,fc--,Ar===10&&(fc=1,Xf--),Ar}function Qn(){return Ar=Pn<e8?Gr(Tc,Pn++):0,fc++,Ar===10&&(fc=1,Xf++),Ar}function da(){return Gr(Tc,Pn)}function Zh(){return Pn}function Pu(t,e){return mu(Tc,t,e)}function gu(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function t8(t){return Xf=fc=1,e8=oa(Tc=t),Pn=0,[]}function r8(t){return Tc="",t}function Qh(t){return Q6(Pu(Pn-1,W1(t===91?t+2:t===40?t+1:t)))}function LI(t){for(;(Ar=da())&&Ar<33;)Qn();return gu(t)>2||gu(Ar)>3?"":" "}function FI(t,e){for(;--e&&Qn()&&!(Ar<48||Ar>102||Ar>57&&Ar<65||Ar>70&&Ar<97););return Pu(t,Zh()+(e<6&&da()==32&&Qn()==32))}function W1(t){for(;Qn();)switch(Ar){case t:return Pn;case 34:case 39:t!==34&&t!==39&&W1(Ar);break;case 40:t===41&&W1(t);break;case 92:Qn();break}return Pn}function BI(t,e){for(;Qn()&&t+Ar!==57;)if(t+Ar===84&&da()===47)break;return"/*"+Pu(e,Pn-1)+"*"+Jf(t===47?t:Qn())}function WI(t){for(;!gu(da());)Qn();return Pu(t,Pn)}function HI(t){return r8(ef("",null,null,null,[""],t=t8(t),0,[0],t))}function ef(t,e,r,n,o,a,s,l,d){for(var p=0,m=0,u=s,g=0,_=0,b=0,w=1,x=1,C=1,A=0,O="",I=o,N=a,E=n,M=O;x;)switch(b=A,A=Qn()){case 40:if(b!=108&&Gr(M,u-1)==58){B1(M+=Rt(Qh(A),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:M+=Qh(A);break;case 9:case 10:case 13:case 32:M+=LI(b);break;case 92:M+=FI(Zh()-1,7);continue;case 47:switch(da()){case 42:case 47:uh(UI(BI(Qn(),Zh()),e,r),d);break;default:M+="/"}break;case 123*w:l[p++]=oa(M)*C;case 125*w:case 59:case 0:switch(A){case 0:case 125:x=0;case 59+m:C==-1&&(M=Rt(M,/\f/g,"")),_>0&&oa(M)-u&&uh(_>32?Fk(M+";",n,r,u-1):Fk(Rt(M," ","")+";",n,r,u-2),d);break;case 59:M+=";";default:if(uh(E=Lk(M,e,r,p,m,o,l,O,I=[],N=[],u),a),A===123)if(m===0)ef(M,e,E,E,I,a,u,l,N);else switch(g===99&&Gr(M,3)===110?100:g){case 100:case 108:case 109:case 115:ef(t,E,E,n&&uh(Lk(t,E,E,0,0,o,l,O,o,I=[],u),N),o,N,u,l,n?I:N);break;default:ef(M,E,E,E,[""],N,0,l,N)}}p=m=_=0,w=C=1,O=M="",u=s;break;case 58:u=1+oa(M),_=b;default:if(w<1){if(A==123)--w;else if(A==125&&w++==0&&PI()==125)continue}switch(M+=Jf(A),A*w){case 38:C=m>0?1:(M+="\f",-1);break;case 44:l[p++]=(oa(M)-1)*C,C=1;break;case 64:da()===45&&(M+=Qh(Qn())),g=da(),m=u=oa(O=M+=WI(Zh())),A++;break;case 45:b===45&&oa(M)==2&&(w=0)}}return a}function Lk(t,e,r,n,o,a,s,l,d,p,m){for(var u=o-1,g=o===0?a:[""],_=s2(g),b=0,w=0,x=0;b<n;++b)for(var C=0,A=mu(t,u+1,u=II(w=s[b])),O=t;C<_;++C)(O=Q6(w>0?g[C]+" "+A:Rt(A,/&\f/g,g[C])))&&(d[x++]=O);return Kf(t,e,r,o===0?o2:l,d,p,m)}function UI(t,e,r){return Kf(t,e,r,Y6,Jf(zI()),mu(t,2,-2),0)}function Fk(t,e,r,n){return Kf(t,e,r,a2,mu(t,0,n),mu(t,n+1,-1),n)}function oc(t,e){for(var r="",n=s2(t),o=0;o<n;o++)r+=e(t[o],o,t,e)||"";return r}function VI(t,e,r,n){switch(t.type){case AI:if(t.children.length)break;case DI:case a2:return t.return=t.return||t.value;case Y6:return"";case Z6:return t.return=t.value+"{"+oc(t.children,n)+"}";case o2:t.value=t.props.join(",")}return oa(r=oc(t.children,n))?t.return=t.value+"{"+r+"}":""}function qI(t){var e=s2(t);return function(r,n,o,a){for(var s="",l=0;l<e;l++)s+=t[l](r,n,o,a)||"";return s}}function GI(t){return function(e){e.root||(e=e.return)&&t(e)}}function n8(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var JI=function(e,r,n){for(var o=0,a=0;o=a,a=da(),o===38&&a===12&&(r[n]=1),!gu(a);)Qn();return Pu(e,Pn)},XI=function(e,r){var n=-1,o=44;do switch(gu(o)){case 0:o===38&&da()===12&&(r[n]=1),e[n]+=JI(Pn-1,r,n);break;case 2:e[n]+=Qh(o);break;case 4:if(o===44){e[++n]=da()===58?"&\f":"",r[n]=e[n].length;break}default:e[n]+=Jf(o)}while(o=Qn());return e},KI=function(e,r){return r8(XI(t8(e),r))},Bk=new WeakMap,YI=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!Bk.get(n))&&!o){Bk.set(e,!0);for(var a=[],s=KI(r,a),l=n.props,d=0,p=0;d<s.length;d++)for(var m=0;m<l.length;m++,p++)e.props[p]=a[d]?s[d].replace(/&\f/g,l[m]):l[m]+" "+s[d]}}},ZI=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};function o8(t,e){switch(MI(t,e)){case 5103:return Mt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Mt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Mt+t+mf+t+on+t+t;case 6828:case 4268:return Mt+t+on+t+t;case 6165:return Mt+t+on+"flex-"+t+t;case 5187:return Mt+t+Rt(t,/(\w+).+(:[^]+)/,Mt+"box-$1$2"+on+"flex-$1$2")+t;case 5443:return Mt+t+on+"flex-item-"+Rt(t,/flex-|-self/,"")+t;case 4675:return Mt+t+on+"flex-line-pack"+Rt(t,/align-content|flex-|-self/,"")+t;case 5548:return Mt+t+on+Rt(t,"shrink","negative")+t;case 5292:return Mt+t+on+Rt(t,"basis","preferred-size")+t;case 6060:return Mt+"box-"+Rt(t,"-grow","")+Mt+t+on+Rt(t,"grow","positive")+t;case 4554:return Mt+Rt(t,/([^-])(transform)/g,"$1"+Mt+"$2")+t;case 6187:return Rt(Rt(Rt(t,/(zoom-|grab)/,Mt+"$1"),/(image-set)/,Mt+"$1"),t,"")+t;case 5495:case 3959:return Rt(t,/(image-set\([^]*)/,Mt+"$1$`$1");case 4968:return Rt(Rt(t,/(.+:)(flex-)?(.*)/,Mt+"box-pack:$3"+on+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Mt+t+t;case 4095:case 3583:case 4068:case 2532:return Rt(t,/(.+)-inline(.+)/,Mt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(oa(t)-1-e>6)switch(Gr(t,e+1)){case 109:if(Gr(t,e+4)!==45)break;case 102:return Rt(t,/(.+:)(.+)-([^]+)/,"$1"+Mt+"$2-$3$1"+mf+(Gr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~B1(t,"stretch")?o8(Rt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Gr(t,e+1)!==115)break;case 6444:switch(Gr(t,oa(t)-3-(~B1(t,"!important")&&10))){case 107:return Rt(t,":",":"+Mt)+t;case 101:return Rt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Mt+(Gr(t,14)===45?"inline-":"")+"box$3$1"+Mt+"$2$3$1"+on+"$2box$3")+t}break;case 5936:switch(Gr(t,e+11)){case 114:return Mt+t+on+Rt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Mt+t+on+Rt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Mt+t+on+Rt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Mt+t+on+t+t}return t}var QI=function(e,r,n,o){if(e.length>-1&&!e.return)switch(e.type){case a2:e.return=o8(e.value,e.length);break;case Z6:return oc([xd(e,{value:Rt(e.value,"@","@"+Mt)})],o);case o2:if(e.length)return jI(e.props,function(a){switch(RI(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return oc([xd(e,{props:[Rt(a,/:(read-\w+)/,":"+mf+"$1")]})],o);case"::placeholder":return oc([xd(e,{props:[Rt(a,/:(plac\w+)/,":"+Mt+"input-$1")]}),xd(e,{props:[Rt(a,/:(plac\w+)/,":"+mf+"$1")]}),xd(e,{props:[Rt(a,/:(plac\w+)/,on+"input-$1")]})],o)}return""})}},eN=[QI],a8=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(w){var x=w.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var o=e.stylisPlugins||eN,a={},s,l=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(w){for(var x=w.getAttribute("data-emotion").split(" "),C=1;C<x.length;C++)a[x[C]]=!0;l.push(w)});var d,p=[YI,ZI];{var m,u=[VI,GI(function(w){m.insert(w)})],g=qI(p.concat(o,u)),_=function(x){return oc(HI(x),g)};d=function(x,C,A,O){m=A,_(x?x+"{"+C.styles+"}":C.styles),O&&(b.inserted[C.name]=!0)}}var b={key:r,sheet:new K6({key:r,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:d};return b.sheet.hydrate(l),b},I_={exports:{}},jt={};/** @license React v16.13.1
|
|
40
|
+
`+k.stack}return{value:i,source:c,stack:S,digest:null}}function Yg(i,c,h){return{value:i,source:null,stack:h??null,digest:c??null}}function Zg(i,c){try{console.error(c.value)}catch(h){setTimeout(function(){throw h})}}var UA=typeof WeakMap=="function"?WeakMap:Map;function Lx(i,c,h){h=Ca(-1,h),h.tag=3,h.payload={element:null};var v=c.value;return h.callback=function(){Xp||(Xp=!0,h_=v),Zg(i,c)},h}function Fx(i,c,h){h=Ca(-1,h),h.tag=3;var v=i.type.getDerivedStateFromError;if(typeof v=="function"){var S=c.value;h.payload=function(){return v(S)},h.callback=function(){Zg(i,c)}}var k=i.stateNode;return k!==null&&typeof k.componentDidCatch=="function"&&(h.callback=function(){Zg(i,c),typeof v!="function"&&(ss===null?ss=new Set([this]):ss.add(this));var R=c.stack;this.componentDidCatch(c.value,{componentStack:R!==null?R:""})}),h}function Bx(i,c,h){var v=i.pingCache;if(v===null){v=i.pingCache=new UA;var S=new Set;v.set(c,S)}else S=v.get(c),S===void 0&&(S=new Set,v.set(c,S));S.has(h)||(S.add(h),i=oI.bind(null,i,c,h),c.then(i,i))}function Wx(i){do{var c;if((c=i.tag===13)&&(c=i.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return i;i=i.return}while(i!==null);return null}function Hx(i,c,h,v,S){return(i.mode&1)===0?(i===c?i.flags|=65536:(i.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(c=Ca(-1,1),c.tag=2,os(h,c,1))),h.lanes|=1),i):(i.flags|=65536,i.lanes=S,i)}var VA=I.ReactCurrentOwner,kn=!1;function un(i,c,h,v){c.child=i===null?cx(c,null,h,v):cl(c,i.child,h,v)}function Ux(i,c,h,v,S){h=h.render;var k=c.ref;return ul(c,S),v=Hg(i,c,h,v,k,S),h=Ug(),i!==null&&!kn?(c.updateQueue=i.updateQueue,c.flags&=-2053,i.lanes&=~S,$a(i,c,S)):(cr&&h&&$g(c),c.flags|=1,un(i,c,v,S),c.child)}function Vx(i,c,h,v,S){if(i===null){var k=h.type;return typeof k=="function"&&!b_(k)&&k.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(c.tag=15,c.type=k,qx(i,c,k,v,S)):(i=th(h.type,null,v,c,c.mode,S),i.ref=c.ref,i.return=c,c.child=i)}if(k=i.child,(i.lanes&S)===0){var R=k.memoizedProps;if(h=h.compare,h=h!==null?h:td,h(R,v)&&i.ref===c.ref)return $a(i,c,S)}return c.flags|=1,i=ds(k,v),i.ref=c.ref,i.return=c,c.child=i}function qx(i,c,h,v,S){if(i!==null){var k=i.memoizedProps;if(td(k,v)&&i.ref===c.ref)if(kn=!1,c.pendingProps=v=k,(i.lanes&S)!==0)(i.flags&131072)!==0&&(kn=!0);else return c.lanes=i.lanes,$a(i,c,S)}return Qg(i,c,h,v,S)}function Gx(i,c,h){var v=c.pendingProps,S=v.children,k=i!==null?i.memoizedState:null;if(v.mode==="hidden")if((c.mode&1)===0)c.memoizedState={baseLanes:0,cachePool:null,transitions:null},tr(ml,Un),Un|=h;else{if((h&1073741824)===0)return i=k!==null?k.baseLanes|h:h,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:i,cachePool:null,transitions:null},c.updateQueue=null,tr(ml,Un),Un|=i,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},v=k!==null?k.baseLanes:h,tr(ml,Un),Un|=v}else k!==null?(v=k.baseLanes|h,c.memoizedState=null):v=h,tr(ml,Un),Un|=v;return un(i,c,S,h),c.child}function Jx(i,c){var h=c.ref;(i===null&&h!==null||i!==null&&i.ref!==h)&&(c.flags|=512,c.flags|=2097152)}function Qg(i,c,h,v,S){var k=xn(h)?qs:Zr.current;return k=al(c,k),ul(c,S),h=Hg(i,c,h,v,k,S),v=Ug(),i!==null&&!kn?(c.updateQueue=i.updateQueue,c.flags&=-2053,i.lanes&=~S,$a(i,c,S)):(cr&&v&&$g(c),c.flags|=1,un(i,c,h,S),c.child)}function Xx(i,c,h,v,S){if(xn(h)){var k=!0;$p(c)}else k=!1;if(ul(c,S),c.stateNode===null)Up(i,c),zx(c,h,v),Kg(c,h,v,S),v=!0;else if(i===null){var R=c.stateNode,F=c.memoizedProps;R.props=F;var V=R.context,te=h.contextType;typeof te=="object"&&te!==null?te=lo(te):(te=xn(h)?qs:Zr.current,te=al(c,te));var he=h.getDerivedStateFromProps,_e=typeof he=="function"||typeof R.getSnapshotBeforeUpdate=="function";_e||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(F!==v||V!==te)&&Px(c,R,v,te),ns=!1;var ue=c.memoizedState;R.state=ue,Rp(c,v,R,S),V=c.memoizedState,F!==v||ue!==V||Sn.current||ns?(typeof he=="function"&&(Xg(c,h,he,v),V=c.memoizedState),(F=ns||jx(c,h,F,v,ue,V,te))?(_e||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(c.flags|=4194308)):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=v,c.memoizedState=V),R.props=v,R.state=V,R.context=te,v=F):(typeof R.componentDidMount=="function"&&(c.flags|=4194308),v=!1)}else{R=c.stateNode,ux(i,c),F=c.memoizedProps,te=c.type===c.elementType?F:$o(c.type,F),R.props=te,_e=c.pendingProps,ue=R.context,V=h.contextType,typeof V=="object"&&V!==null?V=lo(V):(V=xn(h)?qs:Zr.current,V=al(c,V));var Ee=h.getDerivedStateFromProps;(he=typeof Ee=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(F!==_e||ue!==V)&&Px(c,R,v,V),ns=!1,ue=c.memoizedState,R.state=ue,Rp(c,v,R,S);var Be=c.memoizedState;F!==_e||ue!==Be||Sn.current||ns?(typeof Ee=="function"&&(Xg(c,h,Ee,v),Be=c.memoizedState),(te=ns||jx(c,h,te,v,ue,Be,V)||!1)?(he||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(v,Be,V),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(v,Be,V)),typeof R.componentDidUpdate=="function"&&(c.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof R.componentDidUpdate!="function"||F===i.memoizedProps&&ue===i.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||F===i.memoizedProps&&ue===i.memoizedState||(c.flags|=1024),c.memoizedProps=v,c.memoizedState=Be),R.props=v,R.state=Be,R.context=V,v=te):(typeof R.componentDidUpdate!="function"||F===i.memoizedProps&&ue===i.memoizedState||(c.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||F===i.memoizedProps&&ue===i.memoizedState||(c.flags|=1024),v=!1)}return e_(i,c,h,v,k,S)}function e_(i,c,h,v,S,k){Jx(i,c);var R=(c.flags&128)!==0;if(!v&&!R)return S&&ex(c,h,!1),$a(i,c,k);v=c.stateNode,VA.current=c;var F=R&&typeof h.getDerivedStateFromError!="function"?null:v.render();return c.flags|=1,i!==null&&R?(c.child=cl(c,i.child,null,k),c.child=cl(c,null,F,k)):un(i,c,F,k),c.memoizedState=v.state,S&&ex(c,h,!0),c.child}function Kx(i){var c=i.stateNode;c.pendingContext?ZS(i,c.pendingContext,c.pendingContext!==c.context):c.context&&ZS(i,c.context,!1),zg(i,c.containerInfo)}function Yx(i,c,h,v,S){return ll(),Dg(S),c.flags|=256,un(i,c,h,v),c.child}var t_={dehydrated:null,treeContext:null,retryLane:0};function r_(i){return{baseLanes:i,cachePool:null,transitions:null}}function Zx(i,c,h){var v=c.pendingProps,S=fr.current,k=!1,R=(c.flags&128)!==0,F;if((F=R)||(F=i!==null&&i.memoizedState===null?!1:(S&2)!==0),F?(k=!0,c.flags&=-129):(i===null||i.memoizedState!==null)&&(S|=1),tr(fr,S&1),i===null)return Og(c),i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((c.mode&1)===0?c.lanes=1:i.data==="$!"?c.lanes=8:c.lanes=1073741824,null):(R=v.children,i=v.fallback,k?(v=c.mode,k=c.child,R={mode:"hidden",children:R},(v&1)===0&&k!==null?(k.childLanes=0,k.pendingProps=R):k=rh(R,v,0,null),i=ri(i,v,h,null),k.return=c,i.return=c,k.sibling=i,c.child=k,c.child.memoizedState=r_(h),c.memoizedState=t_,i):n_(c,R));if(S=i.memoizedState,S!==null&&(F=S.dehydrated,F!==null))return qA(i,c,R,v,F,S,h);if(k){k=v.fallback,R=c.mode,S=i.child,F=S.sibling;var V={mode:"hidden",children:v.children};return(R&1)===0&&c.child!==S?(v=c.child,v.childLanes=0,v.pendingProps=V,c.deletions=null):(v=ds(S,V),v.subtreeFlags=S.subtreeFlags&14680064),F!==null?k=ds(F,k):(k=ri(k,R,h,null),k.flags|=2),k.return=c,v.return=c,v.sibling=k,c.child=v,v=k,k=c.child,R=i.child.memoizedState,R=R===null?r_(h):{baseLanes:R.baseLanes|h,cachePool:null,transitions:R.transitions},k.memoizedState=R,k.childLanes=i.childLanes&~h,c.memoizedState=t_,v}return k=i.child,i=k.sibling,v=ds(k,{mode:"visible",children:v.children}),(c.mode&1)===0&&(v.lanes=h),v.return=c,v.sibling=null,i!==null&&(h=c.deletions,h===null?(c.deletions=[i],c.flags|=16):h.push(i)),c.child=v,c.memoizedState=null,v}function n_(i,c){return c=rh({mode:"visible",children:c},i.mode,0,null),c.return=i,i.child=c}function Hp(i,c,h,v){return v!==null&&Dg(v),cl(c,i.child,null,h),i=n_(c,c.pendingProps.children),i.flags|=2,c.memoizedState=null,i}function qA(i,c,h,v,S,k,R){if(h)return c.flags&256?(c.flags&=-257,v=Yg(Error(r(422))),Hp(i,c,R,v)):c.memoizedState!==null?(c.child=i.child,c.flags|=128,null):(k=v.fallback,S=c.mode,v=rh({mode:"visible",children:v.children},S,0,null),k=ri(k,S,R,null),k.flags|=2,v.return=c,k.return=c,v.sibling=k,c.child=v,(c.mode&1)!==0&&cl(c,i.child,null,R),c.child.memoizedState=r_(R),c.memoizedState=t_,k);if((c.mode&1)===0)return Hp(i,c,R,null);if(S.data==="$!"){if(v=S.nextSibling&&S.nextSibling.dataset,v)var F=v.dgst;return v=F,k=Error(r(419)),v=Yg(k,v,void 0),Hp(i,c,R,v)}if(F=(R&i.childLanes)!==0,kn||F){if(v=Fr,v!==null){switch(R&-R){case 4:S=2;break;case 16:S=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:S=32;break;case 536870912:S=268435456;break;default:S=0}S=(S&(v.suspendedLanes|R))!==0?0:S,S!==0&&S!==k.retryLane&&(k.retryLane=S,ka(i,S),Oo(v,i,S,-1))}return y_(),v=Yg(Error(r(421))),Hp(i,c,R,v)}return S.data==="$?"?(c.flags|=128,c.child=i.child,c=aI.bind(null,i),S._reactRetry=c,null):(i=k.treeContext,Hn=Qa(S.nextSibling),Wn=c,cr=!0,Co=null,i!==null&&(so[io++]=Sa,so[io++]=xa,so[io++]=Gs,Sa=i.id,xa=i.overflow,Gs=c),c=n_(c,v.children),c.flags|=4096,c)}function Qx(i,c,h){i.lanes|=c;var v=i.alternate;v!==null&&(v.lanes|=c),Mg(i.return,c,h)}function o_(i,c,h,v,S){var k=i.memoizedState;k===null?i.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:v,tail:h,tailMode:S}:(k.isBackwards=c,k.rendering=null,k.renderingStartTime=0,k.last=v,k.tail=h,k.tailMode=S)}function ek(i,c,h){var v=c.pendingProps,S=v.revealOrder,k=v.tail;if(un(i,c,v.children,h),v=fr.current,(v&2)!==0)v=v&1|2,c.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=c.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Qx(i,h,c);else if(i.tag===19)Qx(i,h,c);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===c)break e;for(;i.sibling===null;){if(i.return===null||i.return===c)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}v&=1}if(tr(fr,v),(c.mode&1)===0)c.memoizedState=null;else switch(S){case"forwards":for(h=c.child,S=null;h!==null;)i=h.alternate,i!==null&&jp(i)===null&&(S=h),h=h.sibling;h=S,h===null?(S=c.child,c.child=null):(S=h.sibling,h.sibling=null),o_(c,!1,S,h,k);break;case"backwards":for(h=null,S=c.child,c.child=null;S!==null;){if(i=S.alternate,i!==null&&jp(i)===null){c.child=S;break}i=S.sibling,S.sibling=h,h=S,S=i}o_(c,!0,h,null,k);break;case"together":o_(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function Up(i,c){(c.mode&1)===0&&i!==null&&(i.alternate=null,c.alternate=null,c.flags|=2)}function $a(i,c,h){if(i!==null&&(c.dependencies=i.dependencies),Zs|=c.lanes,(h&c.childLanes)===0)return null;if(i!==null&&c.child!==i.child)throw Error(r(153));if(c.child!==null){for(i=c.child,h=ds(i,i.pendingProps),c.child=h,h.return=c;i.sibling!==null;)i=i.sibling,h=h.sibling=ds(i,i.pendingProps),h.return=c;h.sibling=null}return c.child}function GA(i,c,h){switch(c.tag){case 3:Kx(c),ll();break;case 5:fx(c);break;case 1:xn(c.type)&&$p(c);break;case 4:zg(c,c.stateNode.containerInfo);break;case 10:var v=c.type._context,S=c.memoizedProps.value;tr(Ip,v._currentValue),v._currentValue=S;break;case 13:if(v=c.memoizedState,v!==null)return v.dehydrated!==null?(tr(fr,fr.current&1),c.flags|=128,null):(h&c.child.childLanes)!==0?Zx(i,c,h):(tr(fr,fr.current&1),i=$a(i,c,h),i!==null?i.sibling:null);tr(fr,fr.current&1);break;case 19:if(v=(h&c.childLanes)!==0,(i.flags&128)!==0){if(v)return ek(i,c,h);c.flags|=128}if(S=c.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),tr(fr,fr.current),v)break;return null;case 22:case 23:return c.lanes=0,Gx(i,c,h)}return $a(i,c,h)}var tk,a_,rk,nk;tk=function(i,c){for(var h=c.child;h!==null;){if(h.tag===5||h.tag===6)i.appendChild(h.stateNode);else if(h.tag!==4&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===c)break;for(;h.sibling===null;){if(h.return===null||h.return===c)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},a_=function(){},rk=function(i,c,h,v){var S=i.memoizedProps;if(S!==v){i=c.stateNode,Ks(Jo.current);var k=null;switch(h){case"input":S=xe(i,S),v=xe(i,v),k=[];break;case"select":S=ne({},S,{value:void 0}),v=ne({},v,{value:void 0}),k=[];break;case"textarea":S=Se(i,S),v=Se(i,v),k=[];break;default:typeof S.onClick!="function"&&typeof v.onClick=="function"&&(i.onclick=xp)}Nt(h,v);var R;h=null;for(te in S)if(!v.hasOwnProperty(te)&&S.hasOwnProperty(te)&&S[te]!=null)if(te==="style"){var F=S[te];for(R in F)F.hasOwnProperty(R)&&(h||(h={}),h[R]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(o.hasOwnProperty(te)?k||(k=[]):(k=k||[]).push(te,null));for(te in v){var V=v[te];if(F=S?.[te],v.hasOwnProperty(te)&&V!==F&&(V!=null||F!=null))if(te==="style")if(F){for(R in F)!F.hasOwnProperty(R)||V&&V.hasOwnProperty(R)||(h||(h={}),h[R]="");for(R in V)V.hasOwnProperty(R)&&F[R]!==V[R]&&(h||(h={}),h[R]=V[R])}else h||(k||(k=[]),k.push(te,h)),h=V;else te==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,F=F?F.__html:void 0,V!=null&&F!==V&&(k=k||[]).push(te,V)):te==="children"?typeof V!="string"&&typeof V!="number"||(k=k||[]).push(te,""+V):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(o.hasOwnProperty(te)?(V!=null&&te==="onScroll"&&ar("scroll",i),k||F===V||(k=[])):(k=k||[]).push(te,V))}h&&(k=k||[]).push("style",h);var te=k;(c.updateQueue=te)&&(c.flags|=4)}},nk=function(i,c,h,v){h!==v&&(c.flags|=4)};function gd(i,c){if(!cr)switch(i.tailMode){case"hidden":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?i.tail=null:h.sibling=null;break;case"collapsed":h=i.tail;for(var v=null;h!==null;)h.alternate!==null&&(v=h),h=h.sibling;v===null?c||i.tail===null?i.tail=null:i.tail.sibling=null:v.sibling=null}}function en(i){var c=i.alternate!==null&&i.alternate.child===i.child,h=0,v=0;if(c)for(var S=i.child;S!==null;)h|=S.lanes|S.childLanes,v|=S.subtreeFlags&14680064,v|=S.flags&14680064,S.return=i,S=S.sibling;else for(S=i.child;S!==null;)h|=S.lanes|S.childLanes,v|=S.subtreeFlags,v|=S.flags,S.return=i,S=S.sibling;return i.subtreeFlags|=v,i.childLanes=h,c}function JA(i,c,h){var v=c.pendingProps;switch(Tg(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return en(c),null;case 1:return xn(c.type)&&Cp(),en(c),null;case 3:return v=c.stateNode,pl(),sr(Sn),sr(Zr),Fg(),v.pendingContext&&(v.context=v.pendingContext,v.pendingContext=null),(i===null||i.child===null)&&(Dp(c)?c.flags|=4:i===null||i.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,Co!==null&&(g_(Co),Co=null))),a_(i,c),en(c),null;case 5:Pg(c);var S=Ks(ud.current);if(h=c.type,i!==null&&c.stateNode!=null)rk(i,c,h,v,S),i.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!v){if(c.stateNode===null)throw Error(r(166));return en(c),null}if(i=Ks(Jo.current),Dp(c)){v=c.stateNode,h=c.type;var k=c.memoizedProps;switch(v[Go]=c,v[sd]=k,i=(c.mode&1)!==0,h){case"dialog":ar("cancel",v),ar("close",v);break;case"iframe":case"object":case"embed":ar("load",v);break;case"video":case"audio":for(S=0;S<nd.length;S++)ar(nd[S],v);break;case"source":ar("error",v);break;case"img":case"image":case"link":ar("error",v),ar("load",v);break;case"details":ar("toggle",v);break;case"input":Ae(v,k),ar("invalid",v);break;case"select":v._wrapperState={wasMultiple:!!k.multiple},ar("invalid",v);break;case"textarea":vt(v,k),ar("invalid",v)}Nt(h,k),S=null;for(var R in k)if(k.hasOwnProperty(R)){var F=k[R];R==="children"?typeof F=="string"?v.textContent!==F&&(k.suppressHydrationWarning!==!0&&Sp(v.textContent,F,i),S=["children",F]):typeof F=="number"&&v.textContent!==""+F&&(k.suppressHydrationWarning!==!0&&Sp(v.textContent,F,i),S=["children",""+F]):o.hasOwnProperty(R)&&F!=null&&R==="onScroll"&&ar("scroll",v)}switch(h){case"input":qe(v),Ge(v,k,!0);break;case"textarea":qe(v),be(v);break;case"select":case"option":break;default:typeof k.onClick=="function"&&(v.onclick=xp)}v=S,c.updateQueue=v,v!==null&&(c.flags|=4)}else{R=S.nodeType===9?S:S.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Ze(h)),i==="http://www.w3.org/1999/xhtml"?h==="script"?(i=R.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof v.is=="string"?i=R.createElement(h,{is:v.is}):(i=R.createElement(h),h==="select"&&(R=i,v.multiple?R.multiple=!0:v.size&&(R.size=v.size))):i=R.createElementNS(i,h),i[Go]=c,i[sd]=v,tk(i,c,!1,!1),c.stateNode=i;e:{switch(R=zr(h,v),h){case"dialog":ar("cancel",i),ar("close",i),S=v;break;case"iframe":case"object":case"embed":ar("load",i),S=v;break;case"video":case"audio":for(S=0;S<nd.length;S++)ar(nd[S],i);S=v;break;case"source":ar("error",i),S=v;break;case"img":case"image":case"link":ar("error",i),ar("load",i),S=v;break;case"details":ar("toggle",i),S=v;break;case"input":Ae(i,v),S=xe(i,v),ar("invalid",i);break;case"option":S=v;break;case"select":i._wrapperState={wasMultiple:!!v.multiple},S=ne({},v,{value:void 0}),ar("invalid",i);break;case"textarea":vt(i,v),S=Se(i,v),ar("invalid",i);break;default:S=v}Nt(h,S),F=S;for(k in F)if(F.hasOwnProperty(k)){var V=F[k];k==="style"?ke(i,V):k==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,V!=null&&Wt(i,V)):k==="children"?typeof V=="string"?(h!=="textarea"||V!=="")&&Lt(i,V):typeof V=="number"&&Lt(i,""+V):k!=="suppressContentEditableWarning"&&k!=="suppressHydrationWarning"&&k!=="autoFocus"&&(o.hasOwnProperty(k)?V!=null&&k==="onScroll"&&ar("scroll",i):V!=null&&O(i,k,V,R))}switch(h){case"input":qe(i),Ge(i,v,!1);break;case"textarea":qe(i),be(i);break;case"option":v.value!=null&&i.setAttribute("value",""+$e(v.value));break;case"select":i.multiple=!!v.multiple,k=v.value,k!=null?st(i,!!v.multiple,k,!1):v.defaultValue!=null&&st(i,!!v.multiple,v.defaultValue,!0);break;default:typeof S.onClick=="function"&&(i.onclick=xp)}switch(h){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}}v&&(c.flags|=4)}c.ref!==null&&(c.flags|=512,c.flags|=2097152)}return en(c),null;case 6:if(i&&c.stateNode!=null)nk(i,c,i.memoizedProps,v);else{if(typeof v!="string"&&c.stateNode===null)throw Error(r(166));if(h=Ks(ud.current),Ks(Jo.current),Dp(c)){if(v=c.stateNode,h=c.memoizedProps,v[Go]=c,(k=v.nodeValue!==h)&&(i=Wn,i!==null))switch(i.tag){case 3:Sp(v.nodeValue,h,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Sp(v.nodeValue,h,(i.mode&1)!==0)}k&&(c.flags|=4)}else v=(h.nodeType===9?h:h.ownerDocument).createTextNode(v),v[Go]=c,c.stateNode=v}return en(c),null;case 13:if(sr(fr),v=c.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(cr&&Hn!==null&&(c.mode&1)!==0&&(c.flags&128)===0)sx(),ll(),c.flags|=98560,k=!1;else if(k=Dp(c),v!==null&&v.dehydrated!==null){if(i===null){if(!k)throw Error(r(318));if(k=c.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(r(317));k[Go]=c}else ll(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;en(c),k=!1}else Co!==null&&(g_(Co),Co=null),k=!0;if(!k)return c.flags&65536?c:null}return(c.flags&128)!==0?(c.lanes=h,c):(v=v!==null,v!==(i!==null&&i.memoizedState!==null)&&v&&(c.child.flags|=8192,(c.mode&1)!==0&&(i===null||(fr.current&1)!==0?Rr===0&&(Rr=3):y_())),c.updateQueue!==null&&(c.flags|=4),en(c),null);case 4:return pl(),a_(i,c),i===null&&od(c.stateNode.containerInfo),en(c),null;case 10:return Ng(c.type._context),en(c),null;case 17:return xn(c.type)&&Cp(),en(c),null;case 19:if(sr(fr),k=c.memoizedState,k===null)return en(c),null;if(v=(c.flags&128)!==0,R=k.rendering,R===null)if(v)gd(k,!1);else{if(Rr!==0||i!==null&&(i.flags&128)!==0)for(i=c.child;i!==null;){if(R=jp(i),R!==null){for(c.flags|=128,gd(k,!1),v=R.updateQueue,v!==null&&(c.updateQueue=v,c.flags|=4),c.subtreeFlags=0,v=h,h=c.child;h!==null;)k=h,i=v,k.flags&=14680066,R=k.alternate,R===null?(k.childLanes=0,k.lanes=i,k.child=null,k.subtreeFlags=0,k.memoizedProps=null,k.memoizedState=null,k.updateQueue=null,k.dependencies=null,k.stateNode=null):(k.childLanes=R.childLanes,k.lanes=R.lanes,k.child=R.child,k.subtreeFlags=0,k.deletions=null,k.memoizedProps=R.memoizedProps,k.memoizedState=R.memoizedState,k.updateQueue=R.updateQueue,k.type=R.type,i=R.dependencies,k.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),h=h.sibling;return tr(fr,fr.current&1|2),c.child}i=i.sibling}k.tail!==null&&xr()>gl&&(c.flags|=128,v=!0,gd(k,!1),c.lanes=4194304)}else{if(!v)if(i=jp(R),i!==null){if(c.flags|=128,v=!0,h=i.updateQueue,h!==null&&(c.updateQueue=h,c.flags|=4),gd(k,!0),k.tail===null&&k.tailMode==="hidden"&&!R.alternate&&!cr)return en(c),null}else 2*xr()-k.renderingStartTime>gl&&h!==1073741824&&(c.flags|=128,v=!0,gd(k,!1),c.lanes=4194304);k.isBackwards?(R.sibling=c.child,c.child=R):(h=k.last,h!==null?h.sibling=R:c.child=R,k.last=R)}return k.tail!==null?(c=k.tail,k.rendering=c,k.tail=c.sibling,k.renderingStartTime=xr(),c.sibling=null,h=fr.current,tr(fr,v?h&1|2:h&1),c):(en(c),null);case 22:case 23:return v_(),v=c.memoizedState!==null,i!==null&&i.memoizedState!==null!==v&&(c.flags|=8192),v&&(c.mode&1)!==0?(Un&1073741824)!==0&&(en(c),c.subtreeFlags&6&&(c.flags|=8192)):en(c),null;case 24:return null;case 25:return null}throw Error(r(156,c.tag))}function XA(i,c){switch(Tg(c),c.tag){case 1:return xn(c.type)&&Cp(),i=c.flags,i&65536?(c.flags=i&-65537|128,c):null;case 3:return pl(),sr(Sn),sr(Zr),Fg(),i=c.flags,(i&65536)!==0&&(i&128)===0?(c.flags=i&-65537|128,c):null;case 5:return Pg(c),null;case 13:if(sr(fr),i=c.memoizedState,i!==null&&i.dehydrated!==null){if(c.alternate===null)throw Error(r(340));ll()}return i=c.flags,i&65536?(c.flags=i&-65537|128,c):null;case 19:return sr(fr),null;case 4:return pl(),null;case 10:return Ng(c.type._context),null;case 22:case 23:return v_(),null;case 24:return null;default:return null}}var Vp=!1,tn=!1,KA=typeof WeakSet=="function"?WeakSet:Set,ze=null;function fl(i,c){var h=i.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(v){vr(i,c,v)}else h.current=null}function s_(i,c,h){try{h()}catch(v){vr(i,c,v)}}var ok=!1;function YA(i,c){if(vg=up,i=jS(),dg(i)){if("selectionStart"in i)var h={start:i.selectionStart,end:i.selectionEnd};else e:{h=(h=i.ownerDocument)&&h.defaultView||window;var v=h.getSelection&&h.getSelection();if(v&&v.rangeCount!==0){h=v.anchorNode;var S=v.anchorOffset,k=v.focusNode;v=v.focusOffset;try{h.nodeType,k.nodeType}catch{h=null;break e}var R=0,F=-1,V=-1,te=0,he=0,_e=i,ue=null;t:for(;;){for(var Ee;_e!==h||S!==0&&_e.nodeType!==3||(F=R+S),_e!==k||v!==0&&_e.nodeType!==3||(V=R+v),_e.nodeType===3&&(R+=_e.nodeValue.length),(Ee=_e.firstChild)!==null;)ue=_e,_e=Ee;for(;;){if(_e===i)break t;if(ue===h&&++te===S&&(F=R),ue===k&&++he===v&&(V=R),(Ee=_e.nextSibling)!==null)break;_e=ue,ue=_e.parentNode}_e=Ee}h=F===-1||V===-1?null:{start:F,end:V}}else h=null}h=h||{start:0,end:0}}else h=null;for(yg={focusedElem:i,selectionRange:h},up=!1,ze=c;ze!==null;)if(c=ze,i=c.child,(c.subtreeFlags&1028)!==0&&i!==null)i.return=c,ze=i;else for(;ze!==null;){c=ze;try{var Be=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if(Be!==null){var He=Be.memoizedProps,kr=Be.memoizedState,Y=c.stateNode,G=Y.getSnapshotBeforeUpdate(c.elementType===c.type?He:$o(c.type,He),kr);Y.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var Q=c.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ve){vr(c,c.return,ve)}if(i=c.sibling,i!==null){i.return=c.return,ze=i;break}ze=c.return}return Be=ok,ok=!1,Be}function _d(i,c,h){var v=c.updateQueue;if(v=v!==null?v.lastEffect:null,v!==null){var S=v=v.next;do{if((S.tag&i)===i){var k=S.destroy;S.destroy=void 0,k!==void 0&&s_(c,h,k)}S=S.next}while(S!==v)}}function qp(i,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&i)===i){var v=h.create;h.destroy=v()}h=h.next}while(h!==c)}}function i_(i){var c=i.ref;if(c!==null){var h=i.stateNode;switch(i.tag){case 5:i=h;break;default:i=h}typeof c=="function"?c(i):c.current=i}}function ak(i){var c=i.alternate;c!==null&&(i.alternate=null,ak(c)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(c=i.stateNode,c!==null&&(delete c[Go],delete c[sd],delete c[xg],delete c[NA],delete c[MA])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function sk(i){return i.tag===5||i.tag===3||i.tag===4}function ik(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||sk(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function l_(i,c,h){var v=i.tag;if(v===5||v===6)i=i.stateNode,c?h.nodeType===8?h.parentNode.insertBefore(i,c):h.insertBefore(i,c):(h.nodeType===8?(c=h.parentNode,c.insertBefore(i,h)):(c=h,c.appendChild(i)),h=h._reactRootContainer,h!=null||c.onclick!==null||(c.onclick=xp));else if(v!==4&&(i=i.child,i!==null))for(l_(i,c,h),i=i.sibling;i!==null;)l_(i,c,h),i=i.sibling}function c_(i,c,h){var v=i.tag;if(v===5||v===6)i=i.stateNode,c?h.insertBefore(i,c):h.appendChild(i);else if(v!==4&&(i=i.child,i!==null))for(c_(i,c,h),i=i.sibling;i!==null;)c_(i,c,h),i=i.sibling}var Hr=null,To=!1;function as(i,c,h){for(h=h.child;h!==null;)lk(i,c,h),h=h.sibling}function lk(i,c,h){if(qo&&typeof qo.onCommitFiberUnmount=="function")try{qo.onCommitFiberUnmount(ap,h)}catch{}switch(h.tag){case 5:tn||fl(h,c);case 6:var v=Hr,S=To;Hr=null,as(i,c,h),Hr=v,To=S,Hr!==null&&(To?(i=Hr,h=h.stateNode,i.nodeType===8?i.parentNode.removeChild(h):i.removeChild(h)):Hr.removeChild(h.stateNode));break;case 18:Hr!==null&&(To?(i=Hr,h=h.stateNode,i.nodeType===8?Sg(i.parentNode,h):i.nodeType===1&&Sg(i,h),Xc(i)):Sg(Hr,h.stateNode));break;case 4:v=Hr,S=To,Hr=h.stateNode.containerInfo,To=!0,as(i,c,h),Hr=v,To=S;break;case 0:case 11:case 14:case 15:if(!tn&&(v=h.updateQueue,v!==null&&(v=v.lastEffect,v!==null))){S=v=v.next;do{var k=S,R=k.destroy;k=k.tag,R!==void 0&&((k&2)!==0||(k&4)!==0)&&s_(h,c,R),S=S.next}while(S!==v)}as(i,c,h);break;case 1:if(!tn&&(fl(h,c),v=h.stateNode,typeof v.componentWillUnmount=="function"))try{v.props=h.memoizedProps,v.state=h.memoizedState,v.componentWillUnmount()}catch(F){vr(h,c,F)}as(i,c,h);break;case 21:as(i,c,h);break;case 22:h.mode&1?(tn=(v=tn)||h.memoizedState!==null,as(i,c,h),tn=v):as(i,c,h);break;default:as(i,c,h)}}function ck(i){var c=i.updateQueue;if(c!==null){i.updateQueue=null;var h=i.stateNode;h===null&&(h=i.stateNode=new KA),c.forEach(function(v){var S=sI.bind(null,i,v);h.has(v)||(h.add(v),v.then(S,S))})}}function Eo(i,c){var h=c.deletions;if(h!==null)for(var v=0;v<h.length;v++){var S=h[v];try{var k=i,R=c,F=R;e:for(;F!==null;){switch(F.tag){case 5:Hr=F.stateNode,To=!1;break e;case 3:Hr=F.stateNode.containerInfo,To=!0;break e;case 4:Hr=F.stateNode.containerInfo,To=!0;break e}F=F.return}if(Hr===null)throw Error(r(160));lk(k,R,S),Hr=null,To=!1;var V=S.alternate;V!==null&&(V.return=null),S.return=null}catch(te){vr(S,c,te)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)dk(c,i),c=c.sibling}function dk(i,c){var h=i.alternate,v=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Eo(c,i),Ko(i),v&4){try{_d(3,i,i.return),qp(3,i)}catch(He){vr(i,i.return,He)}try{_d(5,i,i.return)}catch(He){vr(i,i.return,He)}}break;case 1:Eo(c,i),Ko(i),v&512&&h!==null&&fl(h,h.return);break;case 5:if(Eo(c,i),Ko(i),v&512&&h!==null&&fl(h,h.return),i.flags&32){var S=i.stateNode;try{Lt(S,"")}catch(He){vr(i,i.return,He)}}if(v&4&&(S=i.stateNode,S!=null)){var k=i.memoizedProps,R=h!==null?h.memoizedProps:k,F=i.type,V=i.updateQueue;if(i.updateQueue=null,V!==null)try{F==="input"&&k.type==="radio"&&k.name!=null&&kt(S,k),zr(F,R);var te=zr(F,k);for(R=0;R<V.length;R+=2){var he=V[R],_e=V[R+1];he==="style"?ke(S,_e):he==="dangerouslySetInnerHTML"?Wt(S,_e):he==="children"?Lt(S,_e):O(S,he,_e,te)}switch(F){case"input":we(S,k);break;case"textarea":le(S,k);break;case"select":var ue=S._wrapperState.wasMultiple;S._wrapperState.wasMultiple=!!k.multiple;var Ee=k.value;Ee!=null?st(S,!!k.multiple,Ee,!1):ue!==!!k.multiple&&(k.defaultValue!=null?st(S,!!k.multiple,k.defaultValue,!0):st(S,!!k.multiple,k.multiple?[]:"",!1))}S[sd]=k}catch(He){vr(i,i.return,He)}}break;case 6:if(Eo(c,i),Ko(i),v&4){if(i.stateNode===null)throw Error(r(162));S=i.stateNode,k=i.memoizedProps;try{S.nodeValue=k}catch(He){vr(i,i.return,He)}}break;case 3:if(Eo(c,i),Ko(i),v&4&&h!==null&&h.memoizedState.isDehydrated)try{Xc(c.containerInfo)}catch(He){vr(i,i.return,He)}break;case 4:Eo(c,i),Ko(i);break;case 13:Eo(c,i),Ko(i),S=i.child,S.flags&8192&&(k=S.memoizedState!==null,S.stateNode.isHidden=k,!k||S.alternate!==null&&S.alternate.memoizedState!==null||(p_=xr())),v&4&&ck(i);break;case 22:if(he=h!==null&&h.memoizedState!==null,i.mode&1?(tn=(te=tn)||he,Eo(c,i),tn=te):Eo(c,i),Ko(i),v&8192){if(te=i.memoizedState!==null,(i.stateNode.isHidden=te)&&!he&&(i.mode&1)!==0)for(ze=i,he=i.child;he!==null;){for(_e=ze=he;ze!==null;){switch(ue=ze,Ee=ue.child,ue.tag){case 0:case 11:case 14:case 15:_d(4,ue,ue.return);break;case 1:fl(ue,ue.return);var Be=ue.stateNode;if(typeof Be.componentWillUnmount=="function"){v=ue,h=ue.return;try{c=v,Be.props=c.memoizedProps,Be.state=c.memoizedState,Be.componentWillUnmount()}catch(He){vr(v,h,He)}}break;case 5:fl(ue,ue.return);break;case 22:if(ue.memoizedState!==null){hk(_e);continue}}Ee!==null?(Ee.return=ue,ze=Ee):hk(_e)}he=he.sibling}e:for(he=null,_e=i;;){if(_e.tag===5){if(he===null){he=_e;try{S=_e.stateNode,te?(k=S.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none"):(F=_e.stateNode,V=_e.memoizedProps.style,R=V!=null&&V.hasOwnProperty("display")?V.display:null,F.style.display=It("display",R))}catch(He){vr(i,i.return,He)}}}else if(_e.tag===6){if(he===null)try{_e.stateNode.nodeValue=te?"":_e.memoizedProps}catch(He){vr(i,i.return,He)}}else if((_e.tag!==22&&_e.tag!==23||_e.memoizedState===null||_e===i)&&_e.child!==null){_e.child.return=_e,_e=_e.child;continue}if(_e===i)break e;for(;_e.sibling===null;){if(_e.return===null||_e.return===i)break e;he===_e&&(he=null),_e=_e.return}he===_e&&(he=null),_e.sibling.return=_e.return,_e=_e.sibling}}break;case 19:Eo(c,i),Ko(i),v&4&&ck(i);break;case 21:break;default:Eo(c,i),Ko(i)}}function Ko(i){var c=i.flags;if(c&2){try{e:{for(var h=i.return;h!==null;){if(sk(h)){var v=h;break e}h=h.return}throw Error(r(160))}switch(v.tag){case 5:var S=v.stateNode;v.flags&32&&(Lt(S,""),v.flags&=-33);var k=ik(i);c_(i,k,S);break;case 3:case 4:var R=v.stateNode.containerInfo,F=ik(i);l_(i,F,R);break;default:throw Error(r(161))}}catch(V){vr(i,i.return,V)}i.flags&=-3}c&4096&&(i.flags&=-4097)}function ZA(i,c,h){ze=i,uk(i)}function uk(i,c,h){for(var v=(i.mode&1)!==0;ze!==null;){var S=ze,k=S.child;if(S.tag===22&&v){var R=S.memoizedState!==null||Vp;if(!R){var F=S.alternate,V=F!==null&&F.memoizedState!==null||tn;F=Vp;var te=tn;if(Vp=R,(tn=V)&&!te)for(ze=S;ze!==null;)R=ze,V=R.child,R.tag===22&&R.memoizedState!==null?fk(S):V!==null?(V.return=R,ze=V):fk(S);for(;k!==null;)ze=k,uk(k),k=k.sibling;ze=S,Vp=F,tn=te}pk(i)}else(S.subtreeFlags&8772)!==0&&k!==null?(k.return=S,ze=k):pk(i)}}function pk(i){for(;ze!==null;){var c=ze;if((c.flags&8772)!==0){var h=c.alternate;try{if((c.flags&8772)!==0)switch(c.tag){case 0:case 11:case 15:tn||qp(5,c);break;case 1:var v=c.stateNode;if(c.flags&4&&!tn)if(h===null)v.componentDidMount();else{var S=c.elementType===c.type?h.memoizedProps:$o(c.type,h.memoizedProps);v.componentDidUpdate(S,h.memoizedState,v.__reactInternalSnapshotBeforeUpdate)}var k=c.updateQueue;k!==null&&hx(c,k,v);break;case 3:var R=c.updateQueue;if(R!==null){if(h=null,c.child!==null)switch(c.child.tag){case 5:h=c.child.stateNode;break;case 1:h=c.child.stateNode}hx(c,R,h)}break;case 5:var F=c.stateNode;if(h===null&&c.flags&4){h=F;var V=c.memoizedProps;switch(c.type){case"button":case"input":case"select":case"textarea":V.autoFocus&&h.focus();break;case"img":V.src&&(h.src=V.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(c.memoizedState===null){var te=c.alternate;if(te!==null){var he=te.memoizedState;if(he!==null){var _e=he.dehydrated;_e!==null&&Xc(_e)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}tn||c.flags&512&&i_(c)}catch(ue){vr(c,c.return,ue)}}if(c===i){ze=null;break}if(h=c.sibling,h!==null){h.return=c.return,ze=h;break}ze=c.return}}function hk(i){for(;ze!==null;){var c=ze;if(c===i){ze=null;break}var h=c.sibling;if(h!==null){h.return=c.return,ze=h;break}ze=c.return}}function fk(i){for(;ze!==null;){var c=ze;try{switch(c.tag){case 0:case 11:case 15:var h=c.return;try{qp(4,c)}catch(V){vr(c,h,V)}break;case 1:var v=c.stateNode;if(typeof v.componentDidMount=="function"){var S=c.return;try{v.componentDidMount()}catch(V){vr(c,S,V)}}var k=c.return;try{i_(c)}catch(V){vr(c,k,V)}break;case 5:var R=c.return;try{i_(c)}catch(V){vr(c,R,V)}}}catch(V){vr(c,c.return,V)}if(c===i){ze=null;break}var F=c.sibling;if(F!==null){F.return=c.return,ze=F;break}ze=c.return}}var QA=Math.ceil,Gp=I.ReactCurrentDispatcher,d_=I.ReactCurrentOwner,uo=I.ReactCurrentBatchConfig,Dt=0,Fr=null,Er=null,Ur=0,Un=0,ml=es(0),Rr=0,vd=null,Zs=0,Jp=0,u_=0,yd=null,Cn=null,p_=0,gl=1/0,Ta=null,Xp=!1,h_=null,ss=null,Kp=!1,is=null,Yp=0,bd=0,f_=null,Zp=-1,Qp=0;function pn(){return(Dt&6)!==0?xr():Zp!==-1?Zp:Zp=xr()}function ls(i){return(i.mode&1)===0?1:(Dt&2)!==0&&Ur!==0?Ur&-Ur:jA.transition!==null?(Qp===0&&(Qp=iS()),Qp):(i=Ft,i!==0||(i=window.event,i=i===void 0?16:gS(i.type)),i)}function Oo(i,c,h,v){if(50<bd)throw bd=0,f_=null,Error(r(185));Uc(i,h,v),((Dt&2)===0||i!==Fr)&&(i===Fr&&((Dt&2)===0&&(Jp|=h),Rr===4&&cs(i,Ur)),$n(i,v),h===1&&Dt===0&&(c.mode&1)===0&&(gl=xr()+500,Tp&&rs()))}function $n(i,c){var h=i.callbackNode;jD(i,c);var v=lp(i,i===Fr?Ur:0);if(v===0)h!==null&&oS(h),i.callbackNode=null,i.callbackPriority=0;else if(c=v&-v,i.callbackPriority!==c){if(h!=null&&oS(h),c===1)i.tag===0?RA(gk.bind(null,i)):tx(gk.bind(null,i)),AA(function(){(Dt&6)===0&&rs()}),h=null;else{switch(lS(v)){case 1:h=Gm;break;case 4:h=aS;break;case 16:h=op;break;case 536870912:h=sS;break;default:h=op}h=kk(h,mk.bind(null,i))}i.callbackPriority=c,i.callbackNode=h}}function mk(i,c){if(Zp=-1,Qp=0,(Dt&6)!==0)throw Error(r(327));var h=i.callbackNode;if(_l()&&i.callbackNode!==h)return null;var v=lp(i,i===Fr?Ur:0);if(v===0)return null;if((v&30)!==0||(v&i.expiredLanes)!==0||c)c=eh(i,v);else{c=v;var S=Dt;Dt|=2;var k=vk();(Fr!==i||Ur!==c)&&(Ta=null,gl=xr()+500,ei(i,c));do try{rI();break}catch(F){_k(i,F)}while(!0);Ig(),Gp.current=k,Dt=S,Er!==null?c=0:(Fr=null,Ur=0,c=Rr)}if(c!==0){if(c===2&&(S=Jm(i),S!==0&&(v=S,c=m_(i,S))),c===1)throw h=vd,ei(i,0),cs(i,v),$n(i,xr()),h;if(c===6)cs(i,v);else{if(S=i.current.alternate,(v&30)===0&&!eI(S)&&(c=eh(i,v),c===2&&(k=Jm(i),k!==0&&(v=k,c=m_(i,k))),c===1))throw h=vd,ei(i,0),cs(i,v),$n(i,xr()),h;switch(i.finishedWork=S,i.finishedLanes=v,c){case 0:case 1:throw Error(r(345));case 2:ti(i,Cn,Ta);break;case 3:if(cs(i,v),(v&130023424)===v&&(c=p_+500-xr(),10<c)){if(lp(i,0)!==0)break;if(S=i.suspendedLanes,(S&v)!==v){pn(),i.pingedLanes|=i.suspendedLanes&S;break}i.timeoutHandle=wg(ti.bind(null,i,Cn,Ta),c);break}ti(i,Cn,Ta);break;case 4:if(cs(i,v),(v&4194240)===v)break;for(c=i.eventTimes,S=-1;0<v;){var R=31-xo(v);k=1<<R,R=c[R],R>S&&(S=R),v&=~k}if(v=S,v=xr()-v,v=(120>v?120:480>v?480:1080>v?1080:1920>v?1920:3e3>v?3e3:4320>v?4320:1960*QA(v/1960))-v,10<v){i.timeoutHandle=wg(ti.bind(null,i,Cn,Ta),v);break}ti(i,Cn,Ta);break;case 5:ti(i,Cn,Ta);break;default:throw Error(r(329))}}}return $n(i,xr()),i.callbackNode===h?mk.bind(null,i):null}function m_(i,c){var h=yd;return i.current.memoizedState.isDehydrated&&(ei(i,c).flags|=256),i=eh(i,c),i!==2&&(c=Cn,Cn=h,c!==null&&g_(c)),i}function g_(i){Cn===null?Cn=i:Cn.push.apply(Cn,i)}function eI(i){for(var c=i;;){if(c.flags&16384){var h=c.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var v=0;v<h.length;v++){var S=h[v],k=S.getSnapshot;S=S.value;try{if(!ko(k(),S))return!1}catch{return!1}}}if(h=c.child,c.subtreeFlags&16384&&h!==null)h.return=c,c=h;else{if(c===i)break;for(;c.sibling===null;){if(c.return===null||c.return===i)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function cs(i,c){for(c&=~u_,c&=~Jp,i.suspendedLanes|=c,i.pingedLanes&=~c,i=i.expirationTimes;0<c;){var h=31-xo(c),v=1<<h;i[h]=-1,c&=~v}}function gk(i){if((Dt&6)!==0)throw Error(r(327));_l();var c=lp(i,0);if((c&1)===0)return $n(i,xr()),null;var h=eh(i,c);if(i.tag!==0&&h===2){var v=Jm(i);v!==0&&(c=v,h=m_(i,v))}if(h===1)throw h=vd,ei(i,0),cs(i,c),$n(i,xr()),h;if(h===6)throw Error(r(345));return i.finishedWork=i.current.alternate,i.finishedLanes=c,ti(i,Cn,Ta),$n(i,xr()),null}function __(i,c){var h=Dt;Dt|=1;try{return i(c)}finally{Dt=h,Dt===0&&(gl=xr()+500,Tp&&rs())}}function Qs(i){is!==null&&is.tag===0&&(Dt&6)===0&&_l();var c=Dt;Dt|=1;var h=uo.transition,v=Ft;try{if(uo.transition=null,Ft=1,i)return i()}finally{Ft=v,uo.transition=h,Dt=c,(Dt&6)===0&&rs()}}function v_(){Un=ml.current,sr(ml)}function ei(i,c){i.finishedWork=null,i.finishedLanes=0;var h=i.timeoutHandle;if(h!==-1&&(i.timeoutHandle=-1,DA(h)),Er!==null)for(h=Er.return;h!==null;){var v=h;switch(Tg(v),v.tag){case 1:v=v.type.childContextTypes,v!=null&&Cp();break;case 3:pl(),sr(Sn),sr(Zr),Fg();break;case 5:Pg(v);break;case 4:pl();break;case 13:sr(fr);break;case 19:sr(fr);break;case 10:Ng(v.type._context);break;case 22:case 23:v_()}h=h.return}if(Fr=i,Er=i=ds(i.current,null),Ur=Un=c,Rr=0,vd=null,u_=Jp=Zs=0,Cn=yd=null,Xs!==null){for(c=0;c<Xs.length;c++)if(h=Xs[c],v=h.interleaved,v!==null){h.interleaved=null;var S=v.next,k=h.pending;if(k!==null){var R=k.next;k.next=S,v.next=R}h.pending=v}Xs=null}return i}function _k(i,c){do{var h=Er;try{if(Ig(),zp.current=Bp,Pp){for(var v=mr.memoizedState;v!==null;){var S=v.queue;S!==null&&(S.pending=null),v=v.next}Pp=!1}if(Ys=0,Lr=Mr=mr=null,pd=!1,hd=0,d_.current=null,h===null||h.return===null){Rr=1,vd=c,Er=null;break}e:{var k=i,R=h.return,F=h,V=c;if(c=Ur,F.flags|=32768,V!==null&&typeof V=="object"&&typeof V.then=="function"){var te=V,he=F,_e=he.tag;if((he.mode&1)===0&&(_e===0||_e===11||_e===15)){var ue=he.alternate;ue?(he.updateQueue=ue.updateQueue,he.memoizedState=ue.memoizedState,he.lanes=ue.lanes):(he.updateQueue=null,he.memoizedState=null)}var Ee=Wx(R);if(Ee!==null){Ee.flags&=-257,Hx(Ee,R,F,k,c),Ee.mode&1&&Bx(k,te,c),c=Ee,V=te;var Be=c.updateQueue;if(Be===null){var He=new Set;He.add(V),c.updateQueue=He}else Be.add(V);break e}else{if((c&1)===0){Bx(k,te,c),y_();break e}V=Error(r(426))}}else if(cr&&F.mode&1){var kr=Wx(R);if(kr!==null){(kr.flags&65536)===0&&(kr.flags|=256),Hx(kr,R,F,k,c),Dg(hl(V,F));break e}}k=V=hl(V,F),Rr!==4&&(Rr=2),yd===null?yd=[k]:yd.push(k),k=R;do{switch(k.tag){case 3:k.flags|=65536,c&=-c,k.lanes|=c;var Y=Lx(k,V,c);px(k,Y);break e;case 1:F=V;var G=k.type,Q=k.stateNode;if((k.flags&128)===0&&(typeof G.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(ss===null||!ss.has(Q)))){k.flags|=65536,c&=-c,k.lanes|=c;var ve=Fx(k,F,c);px(k,ve);break e}}k=k.return}while(k!==null)}bk(h)}catch(Je){c=Je,Er===h&&h!==null&&(Er=h=h.return);continue}break}while(!0)}function vk(){var i=Gp.current;return Gp.current=Bp,i===null?Bp:i}function y_(){(Rr===0||Rr===3||Rr===2)&&(Rr=4),Fr===null||(Zs&268435455)===0&&(Jp&268435455)===0||cs(Fr,Ur)}function eh(i,c){var h=Dt;Dt|=2;var v=vk();(Fr!==i||Ur!==c)&&(Ta=null,ei(i,c));do try{tI();break}catch(S){_k(i,S)}while(!0);if(Ig(),Dt=h,Gp.current=v,Er!==null)throw Error(r(261));return Fr=null,Ur=0,Rr}function tI(){for(;Er!==null;)yk(Er)}function rI(){for(;Er!==null&&!TD();)yk(Er)}function yk(i){var c=xk(i.alternate,i,Un);i.memoizedProps=i.pendingProps,c===null?bk(i):Er=c,d_.current=null}function bk(i){var c=i;do{var h=c.alternate;if(i=c.return,(c.flags&32768)===0){if(h=JA(h,c,Un),h!==null){Er=h;return}}else{if(h=XA(h,c),h!==null){h.flags&=32767,Er=h;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Rr=6,Er=null;return}}if(c=c.sibling,c!==null){Er=c;return}Er=c=i}while(c!==null);Rr===0&&(Rr=5)}function ti(i,c,h){var v=Ft,S=uo.transition;try{uo.transition=null,Ft=1,nI(i,c,h,v)}finally{uo.transition=S,Ft=v}return null}function nI(i,c,h,v){do _l();while(is!==null);if((Dt&6)!==0)throw Error(r(327));h=i.finishedWork;var S=i.finishedLanes;if(h===null)return null;if(i.finishedWork=null,i.finishedLanes=0,h===i.current)throw Error(r(177));i.callbackNode=null,i.callbackPriority=0;var k=h.lanes|h.childLanes;if(zD(i,k),i===Fr&&(Er=Fr=null,Ur=0),(h.subtreeFlags&2064)===0&&(h.flags&2064)===0||Kp||(Kp=!0,kk(op,function(){return _l(),null})),k=(h.flags&15990)!==0,(h.subtreeFlags&15990)!==0||k){k=uo.transition,uo.transition=null;var R=Ft;Ft=1;var F=Dt;Dt|=4,d_.current=null,YA(i,h),dk(h,i),xA(yg),up=!!vg,yg=vg=null,i.current=h,ZA(h),ED(),Dt=F,Ft=R,uo.transition=k}else i.current=h;if(Kp&&(Kp=!1,is=i,Yp=S),k=i.pendingLanes,k===0&&(ss=null),AD(h.stateNode),$n(i,xr()),c!==null)for(v=i.onRecoverableError,h=0;h<c.length;h++)S=c[h],v(S.value,{componentStack:S.stack,digest:S.digest});if(Xp)throw Xp=!1,i=h_,h_=null,i;return(Yp&1)!==0&&i.tag!==0&&_l(),k=i.pendingLanes,(k&1)!==0?i===f_?bd++:(bd=0,f_=i):bd=0,rs(),null}function _l(){if(is!==null){var i=lS(Yp),c=uo.transition,h=Ft;try{if(uo.transition=null,Ft=16>i?16:i,is===null)var v=!1;else{if(i=is,is=null,Yp=0,(Dt&6)!==0)throw Error(r(331));var S=Dt;for(Dt|=4,ze=i.current;ze!==null;){var k=ze,R=k.child;if((ze.flags&16)!==0){var F=k.deletions;if(F!==null){for(var V=0;V<F.length;V++){var te=F[V];for(ze=te;ze!==null;){var he=ze;switch(he.tag){case 0:case 11:case 15:_d(8,he,k)}var _e=he.child;if(_e!==null)_e.return=he,ze=_e;else for(;ze!==null;){he=ze;var ue=he.sibling,Ee=he.return;if(ak(he),he===te){ze=null;break}if(ue!==null){ue.return=Ee,ze=ue;break}ze=Ee}}}var Be=k.alternate;if(Be!==null){var He=Be.child;if(He!==null){Be.child=null;do{var kr=He.sibling;He.sibling=null,He=kr}while(He!==null)}}ze=k}}if((k.subtreeFlags&2064)!==0&&R!==null)R.return=k,ze=R;else e:for(;ze!==null;){if(k=ze,(k.flags&2048)!==0)switch(k.tag){case 0:case 11:case 15:_d(9,k,k.return)}var Y=k.sibling;if(Y!==null){Y.return=k.return,ze=Y;break e}ze=k.return}}var G=i.current;for(ze=G;ze!==null;){R=ze;var Q=R.child;if((R.subtreeFlags&2064)!==0&&Q!==null)Q.return=R,ze=Q;else e:for(R=G;ze!==null;){if(F=ze,(F.flags&2048)!==0)try{switch(F.tag){case 0:case 11:case 15:qp(9,F)}}catch(Je){vr(F,F.return,Je)}if(F===R){ze=null;break e}var ve=F.sibling;if(ve!==null){ve.return=F.return,ze=ve;break e}ze=F.return}}if(Dt=S,rs(),qo&&typeof qo.onPostCommitFiberRoot=="function")try{qo.onPostCommitFiberRoot(ap,i)}catch{}v=!0}return v}finally{Ft=h,uo.transition=c}}return!1}function wk(i,c,h){c=hl(h,c),c=Lx(i,c,1),i=os(i,c,1),c=pn(),i!==null&&(Uc(i,1,c),$n(i,c))}function vr(i,c,h){if(i.tag===3)wk(i,i,h);else for(;c!==null;){if(c.tag===3){wk(c,i,h);break}else if(c.tag===1){var v=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(ss===null||!ss.has(v))){i=hl(h,i),i=Fx(c,i,1),c=os(c,i,1),i=pn(),c!==null&&(Uc(c,1,i),$n(c,i));break}}c=c.return}}function oI(i,c,h){var v=i.pingCache;v!==null&&v.delete(c),c=pn(),i.pingedLanes|=i.suspendedLanes&h,Fr===i&&(Ur&h)===h&&(Rr===4||Rr===3&&(Ur&130023424)===Ur&&500>xr()-p_?ei(i,0):u_|=h),$n(i,c)}function Sk(i,c){c===0&&((i.mode&1)===0?c=1:(c=ip,ip<<=1,(ip&130023424)===0&&(ip=4194304)));var h=pn();i=ka(i,c),i!==null&&(Uc(i,c,h),$n(i,h))}function aI(i){var c=i.memoizedState,h=0;c!==null&&(h=c.retryLane),Sk(i,h)}function sI(i,c){var h=0;switch(i.tag){case 13:var v=i.stateNode,S=i.memoizedState;S!==null&&(h=S.retryLane);break;case 19:v=i.stateNode;break;default:throw Error(r(314))}v!==null&&v.delete(c),Sk(i,h)}var xk;xk=function(i,c,h){if(i!==null)if(i.memoizedProps!==c.pendingProps||Sn.current)kn=!0;else{if((i.lanes&h)===0&&(c.flags&128)===0)return kn=!1,GA(i,c,h);kn=(i.flags&131072)!==0}else kn=!1,cr&&(c.flags&1048576)!==0&&rx(c,Op,c.index);switch(c.lanes=0,c.tag){case 2:var v=c.type;Up(i,c),i=c.pendingProps;var S=al(c,Zr.current);ul(c,h),S=Hg(null,c,v,i,S,h);var k=Ug();return c.flags|=1,typeof S=="object"&&S!==null&&typeof S.render=="function"&&S.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,xn(v)?(k=!0,$p(c)):k=!1,c.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,jg(c),S.updater=Wp,c.stateNode=S,S._reactInternals=c,Kg(c,v,i,h),c=e_(null,c,v,!0,k,h)):(c.tag=0,cr&&k&&$g(c),un(null,c,S,h),c=c.child),c;case 16:v=c.elementType;e:{switch(Up(i,c),i=c.pendingProps,S=v._init,v=S(v._payload),c.type=v,S=c.tag=lI(v),i=$o(v,i),S){case 0:c=Qg(null,c,v,i,h);break e;case 1:c=Xx(null,c,v,i,h);break e;case 11:c=Ux(null,c,v,i,h);break e;case 14:c=Vx(null,c,v,$o(v.type,i),h);break e}throw Error(r(306,v,""))}return c;case 0:return v=c.type,S=c.pendingProps,S=c.elementType===v?S:$o(v,S),Qg(i,c,v,S,h);case 1:return v=c.type,S=c.pendingProps,S=c.elementType===v?S:$o(v,S),Xx(i,c,v,S,h);case 3:e:{if(Kx(c),i===null)throw Error(r(387));v=c.pendingProps,k=c.memoizedState,S=k.element,ux(i,c),Rp(c,v,null,h);var R=c.memoizedState;if(v=R.element,k.isDehydrated)if(k={element:v,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},c.updateQueue.baseState=k,c.memoizedState=k,c.flags&256){S=hl(Error(r(423)),c),c=Yx(i,c,v,h,S);break e}else if(v!==S){S=hl(Error(r(424)),c),c=Yx(i,c,v,h,S);break e}else for(Hn=Qa(c.stateNode.containerInfo.firstChild),Wn=c,cr=!0,Co=null,h=cx(c,null,v,h),c.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(ll(),v===S){c=$a(i,c,h);break e}un(i,c,v,h)}c=c.child}return c;case 5:return fx(c),i===null&&Og(c),v=c.type,S=c.pendingProps,k=i!==null?i.memoizedProps:null,R=S.children,bg(v,S)?R=null:k!==null&&bg(v,k)&&(c.flags|=32),Jx(i,c),un(i,c,R,h),c.child;case 6:return i===null&&Og(c),null;case 13:return Zx(i,c,h);case 4:return zg(c,c.stateNode.containerInfo),v=c.pendingProps,i===null?c.child=cl(c,null,v,h):un(i,c,v,h),c.child;case 11:return v=c.type,S=c.pendingProps,S=c.elementType===v?S:$o(v,S),Ux(i,c,v,S,h);case 7:return un(i,c,c.pendingProps,h),c.child;case 8:return un(i,c,c.pendingProps.children,h),c.child;case 12:return un(i,c,c.pendingProps.children,h),c.child;case 10:e:{if(v=c.type._context,S=c.pendingProps,k=c.memoizedProps,R=S.value,tr(Ip,v._currentValue),v._currentValue=R,k!==null)if(ko(k.value,R)){if(k.children===S.children&&!Sn.current){c=$a(i,c,h);break e}}else for(k=c.child,k!==null&&(k.return=c);k!==null;){var F=k.dependencies;if(F!==null){R=k.child;for(var V=F.firstContext;V!==null;){if(V.context===v){if(k.tag===1){V=Ca(-1,h&-h),V.tag=2;var te=k.updateQueue;if(te!==null){te=te.shared;var he=te.pending;he===null?V.next=V:(V.next=he.next,he.next=V),te.pending=V}}k.lanes|=h,V=k.alternate,V!==null&&(V.lanes|=h),Mg(k.return,h,c),F.lanes|=h;break}V=V.next}}else if(k.tag===10)R=k.type===c.type?null:k.child;else if(k.tag===18){if(R=k.return,R===null)throw Error(r(341));R.lanes|=h,F=R.alternate,F!==null&&(F.lanes|=h),Mg(R,h,c),R=k.sibling}else R=k.child;if(R!==null)R.return=k;else for(R=k;R!==null;){if(R===c){R=null;break}if(k=R.sibling,k!==null){k.return=R.return,R=k;break}R=R.return}k=R}un(i,c,S.children,h),c=c.child}return c;case 9:return S=c.type,v=c.pendingProps.children,ul(c,h),S=lo(S),v=v(S),c.flags|=1,un(i,c,v,h),c.child;case 14:return v=c.type,S=$o(v,c.pendingProps),S=$o(v.type,S),Vx(i,c,v,S,h);case 15:return qx(i,c,c.type,c.pendingProps,h);case 17:return v=c.type,S=c.pendingProps,S=c.elementType===v?S:$o(v,S),Up(i,c),c.tag=1,xn(v)?(i=!0,$p(c)):i=!1,ul(c,h),zx(c,v,S),Kg(c,v,S,h),e_(null,c,v,!0,i,h);case 19:return ek(i,c,h);case 22:return Gx(i,c,h)}throw Error(r(156,c.tag))};function kk(i,c){return nS(i,c)}function iI(i,c,h,v){this.tag=i,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function po(i,c,h,v){return new iI(i,c,h,v)}function b_(i){return i=i.prototype,!(!i||!i.isReactComponent)}function lI(i){if(typeof i=="function")return b_(i)?1:0;if(i!=null){if(i=i.$$typeof,i===W)return 11;if(i===B)return 14}return 2}function ds(i,c){var h=i.alternate;return h===null?(h=po(i.tag,c,i.key,i.mode),h.elementType=i.elementType,h.type=i.type,h.stateNode=i.stateNode,h.alternate=i,i.alternate=h):(h.pendingProps=c,h.type=i.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=i.flags&14680064,h.childLanes=i.childLanes,h.lanes=i.lanes,h.child=i.child,h.memoizedProps=i.memoizedProps,h.memoizedState=i.memoizedState,h.updateQueue=i.updateQueue,c=i.dependencies,h.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},h.sibling=i.sibling,h.index=i.index,h.ref=i.ref,h}function th(i,c,h,v,S,k){var R=2;if(v=i,typeof i=="function")b_(i)&&(R=1);else if(typeof i=="string")R=5;else e:switch(i){case M:return ri(h.children,S,k,c);case j:R=8,S|=8;break;case z:return i=po(12,h,c,S|2),i.elementType=z,i.lanes=k,i;case U:return i=po(13,h,c,S),i.elementType=U,i.lanes=k,i;case H:return i=po(19,h,c,S),i.elementType=H,i.lanes=k,i;case oe:return rh(h,S,k,c);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:R=10;break e;case L:R=9;break e;case W:R=11;break e;case B:R=14;break e;case K:R=16,v=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return c=po(R,h,c,S),c.elementType=i,c.type=v,c.lanes=k,c}function ri(i,c,h,v){return i=po(7,i,v,c),i.lanes=h,i}function rh(i,c,h,v){return i=po(22,i,v,c),i.elementType=oe,i.lanes=h,i.stateNode={isHidden:!1},i}function w_(i,c,h){return i=po(6,i,null,c),i.lanes=h,i}function S_(i,c,h){return c=po(4,i.children!==null?i.children:[],i.key,c),c.lanes=h,c.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},c}function cI(i,c,h,v,S){this.tag=c,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xm(0),this.expirationTimes=Xm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xm(0),this.identifierPrefix=v,this.onRecoverableError=S,this.mutableSourceEagerHydrationData=null}function x_(i,c,h,v,S,k,R,F,V){return i=new cI(i,c,h,F,V),c===1?(c=1,k===!0&&(c|=8)):c=0,k=po(3,null,null,c),i.current=k,k.stateNode=i,k.memoizedState={element:v,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},jg(k),i}function dI(i,c,h){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:E,key:v==null?null:""+v,children:i,containerInfo:c,implementation:h}}function Ck(i){if(!i)return ts;i=i._reactInternals;e:{if(Us(i)!==i||i.tag!==1)throw Error(r(170));var c=i;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(xn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(r(171))}if(i.tag===1){var h=i.type;if(xn(h))return QS(i,h,c)}return c}function $k(i,c,h,v,S,k,R,F,V){return i=x_(h,v,!0,i,S,k,R,F,V),i.context=Ck(null),h=i.current,v=pn(),S=ls(h),k=Ca(v,S),k.callback=c??null,os(h,k,S),i.current.lanes=S,Uc(i,S,v),$n(i,v),i}function nh(i,c,h,v){var S=c.current,k=pn(),R=ls(S);return h=Ck(h),c.context===null?c.context=h:c.pendingContext=h,c=Ca(k,R),c.payload={element:i},v=v===void 0?null:v,v!==null&&(c.callback=v),i=os(S,c,R),i!==null&&(Oo(i,S,R,k),Mp(i,S,R)),R}function oh(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function Tk(i,c){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var h=i.retryLane;i.retryLane=h!==0&&h<c?h:c}}function k_(i,c){Tk(i,c),(i=i.alternate)&&Tk(i,c)}function uI(){return null}var Ek=typeof reportError=="function"?reportError:function(i){console.error(i)};function C_(i){this._internalRoot=i}ah.prototype.render=C_.prototype.render=function(i){var c=this._internalRoot;if(c===null)throw Error(r(409));nh(i,c,null,null)},ah.prototype.unmount=C_.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var c=i.containerInfo;Qs(function(){nh(null,i,null,null)}),c[ba]=null}};function ah(i){this._internalRoot=i}ah.prototype.unstable_scheduleHydration=function(i){if(i){var c=uS();i={blockedOn:null,target:i,priority:c};for(var h=0;h<Ka.length&&c!==0&&c<Ka[h].priority;h++);Ka.splice(h,0,i),h===0&&fS(i)}};function $_(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function sh(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Ok(){}function pI(i,c,h,v,S){if(S){if(typeof v=="function"){var k=v;v=function(){var te=oh(R);k.call(te)}}var R=$k(c,v,i,0,null,!1,!1,"",Ok);return i._reactRootContainer=R,i[ba]=R.current,od(i.nodeType===8?i.parentNode:i),Qs(),R}for(;S=i.lastChild;)i.removeChild(S);if(typeof v=="function"){var F=v;v=function(){var te=oh(V);F.call(te)}}var V=x_(i,0,!1,null,null,!1,!1,"",Ok);return i._reactRootContainer=V,i[ba]=V.current,od(i.nodeType===8?i.parentNode:i),Qs(function(){nh(c,V,h,v)}),V}function ih(i,c,h,v,S){var k=h._reactRootContainer;if(k){var R=k;if(typeof S=="function"){var F=S;S=function(){var V=oh(R);F.call(V)}}nh(c,R,i,S)}else R=pI(h,c,i,S,v);return oh(R)}cS=function(i){switch(i.tag){case 3:var c=i.stateNode;if(c.current.memoizedState.isDehydrated){var h=Hc(c.pendingLanes);h!==0&&(Km(c,h|1),$n(c,xr()),(Dt&6)===0&&(gl=xr()+500,rs()))}break;case 13:Qs(function(){var v=ka(i,1);if(v!==null){var S=pn();Oo(v,i,1,S)}}),k_(i,1)}},Ym=function(i){if(i.tag===13){var c=ka(i,134217728);if(c!==null){var h=pn();Oo(c,i,134217728,h)}k_(i,134217728)}},dS=function(i){if(i.tag===13){var c=ls(i),h=ka(i,c);if(h!==null){var v=pn();Oo(h,i,c,v)}k_(i,c)}},uS=function(){return Ft},pS=function(i,c){var h=Ft;try{return Ft=i,c()}finally{Ft=h}},Hs=function(i,c,h){switch(c){case"input":if(we(i,h),c=h.name,h.type==="radio"&&c!=null){for(h=i;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+c)+'][type="radio"]'),c=0;c<h.length;c++){var v=h[c];if(v!==i&&v.form===i.form){var S=kp(v);if(!S)throw Error(r(90));Ne(v),we(v,S)}}}break;case"textarea":le(i,h);break;case"select":c=h.value,c!=null&&st(i,!!h.multiple,c,!1)}},Ji=__,ht=Qs;var hI={usingClientEntryPoint:!1,Events:[id,nl,kp,qi,Gi,__]},wd={findFiberByHostInstance:Vs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fI={bundleType:wd.bundleType,version:wd.version,rendererPackageName:wd.rendererPackageName,rendererConfig:wd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=tS(i),i===null?null:i.stateNode},findFiberByHostInstance:wd.findFiberByHostInstance||uI,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lh.isDisabled&&lh.supportsFiber)try{ap=lh.inject(fI),qo=lh}catch{}}return Tn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hI,Tn.createPortal=function(i,c){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$_(c))throw Error(r(200));return dI(i,c,null,h)},Tn.createRoot=function(i,c){if(!$_(i))throw Error(r(299));var h=!1,v="",S=Ek;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),c=x_(i,1,!1,null,null,h,!1,v,S),i[ba]=c.current,od(i.nodeType===8?i.parentNode:i),new C_(c)},Tn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var c=i._reactInternals;if(c===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=tS(c),i=i===null?null:i.stateNode,i},Tn.flushSync=function(i){return Qs(i)},Tn.hydrate=function(i,c,h){if(!sh(c))throw Error(r(200));return ih(null,i,c,!0,h)},Tn.hydrateRoot=function(i,c,h){if(!$_(i))throw Error(r(405));var v=h!=null&&h.hydratedSources||null,S=!1,k="",R=Ek;if(h!=null&&(h.unstable_strictMode===!0&&(S=!0),h.identifierPrefix!==void 0&&(k=h.identifierPrefix),h.onRecoverableError!==void 0&&(R=h.onRecoverableError)),c=$k(c,null,i,1,h??null,S,!1,k,R),i[ba]=c.current,od(i),v)for(i=0;i<v.length;i++)h=v[i],S=h._getVersion,S=S(h._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[h,S]:c.mutableSourceEagerHydrationData.push(h,S);return new ah(c)},Tn.render=function(i,c,h){if(!sh(c))throw Error(r(200));return ih(null,i,c,!1,h)},Tn.unmountComponentAtNode=function(i){if(!sh(i))throw Error(r(40));return i._reactRootContainer?(Qs(function(){ih(null,null,i,!1,function(){i._reactRootContainer=null,i[ba]=null})}),!0):!1},Tn.unstable_batchedUpdates=__,Tn.unstable_renderSubtreeIntoContainer=function(i,c,h,v){if(!sh(h))throw Error(r(200));if(i==null||i._reactInternals===void 0)throw Error(r(38));return ih(i,c,h,!1,v)},Tn.version="18.3.1-next-f1338f8080-20240426",Tn}var zk;function X6(){if(zk)return O_.exports;zk=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),O_.exports=xI(),O_.exports}var Pk;function kI(){if(Pk)return dh;Pk=1;var t=X6();return dh.createRoot=t.createRoot,dh.hydrateRoot=t.hydrateRoot,dh}var CI=kI();const $I="4.2.0",TI={version:$I};function Pa(t,...e){const r=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${t}; visit ${r} for the full message.`}const zo="$$material";function ff(){return ff=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ff.apply(null,arguments)}function EI(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function OI(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var K6=(function(){function t(r){var n=this;this._insertTag=function(o){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,a),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(OI(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=EI(o);try{a.insertRule(n,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},t})(),on="-ms-",mf="-moz-",Mt="-webkit-",Y6="comm",o2="rule",a2="decl",DI="@import",Z6="@keyframes",AI="@layer",II=Math.abs,Jf=String.fromCharCode,NI=Object.assign;function MI(t,e){return Gr(t,0)^45?(((e<<2^Gr(t,0))<<2^Gr(t,1))<<2^Gr(t,2))<<2^Gr(t,3):0}function Q6(t){return t.trim()}function RI(t,e){return(t=e.exec(t))?t[0]:t}function Rt(t,e,r){return t.replace(e,r)}function B1(t,e){return t.indexOf(e)}function Gr(t,e){return t.charCodeAt(e)|0}function mu(t,e,r){return t.slice(e,r)}function oa(t){return t.length}function s2(t){return t.length}function uh(t,e){return e.push(t),t}function jI(t,e){return t.map(e).join("")}var Xf=1,fc=1,e8=0,Pn=0,Ar=0,Tc="";function Kf(t,e,r,n,o,a,s){return{value:t,root:e,parent:r,type:n,props:o,children:a,line:Xf,column:fc,length:s,return:""}}function xd(t,e){return NI(Kf("",null,null,"",null,null,0),t,{length:-t.length},e)}function zI(){return Ar}function PI(){return Ar=Pn>0?Gr(Tc,--Pn):0,fc--,Ar===10&&(fc=1,Xf--),Ar}function Qn(){return Ar=Pn<e8?Gr(Tc,Pn++):0,fc++,Ar===10&&(fc=1,Xf++),Ar}function da(){return Gr(Tc,Pn)}function Zh(){return Pn}function Pu(t,e){return mu(Tc,t,e)}function gu(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function t8(t){return Xf=fc=1,e8=oa(Tc=t),Pn=0,[]}function r8(t){return Tc="",t}function Qh(t){return Q6(Pu(Pn-1,W1(t===91?t+2:t===40?t+1:t)))}function LI(t){for(;(Ar=da())&&Ar<33;)Qn();return gu(t)>2||gu(Ar)>3?"":" "}function FI(t,e){for(;--e&&Qn()&&!(Ar<48||Ar>102||Ar>57&&Ar<65||Ar>70&&Ar<97););return Pu(t,Zh()+(e<6&&da()==32&&Qn()==32))}function W1(t){for(;Qn();)switch(Ar){case t:return Pn;case 34:case 39:t!==34&&t!==39&&W1(Ar);break;case 40:t===41&&W1(t);break;case 92:Qn();break}return Pn}function BI(t,e){for(;Qn()&&t+Ar!==57;)if(t+Ar===84&&da()===47)break;return"/*"+Pu(e,Pn-1)+"*"+Jf(t===47?t:Qn())}function WI(t){for(;!gu(da());)Qn();return Pu(t,Pn)}function HI(t){return r8(ef("",null,null,null,[""],t=t8(t),0,[0],t))}function ef(t,e,r,n,o,a,s,l,d){for(var p=0,m=0,u=s,g=0,_=0,b=0,w=1,x=1,C=1,A=0,O="",I=o,N=a,E=n,M=O;x;)switch(b=A,A=Qn()){case 40:if(b!=108&&Gr(M,u-1)==58){B1(M+=Rt(Qh(A),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:M+=Qh(A);break;case 9:case 10:case 13:case 32:M+=LI(b);break;case 92:M+=FI(Zh()-1,7);continue;case 47:switch(da()){case 42:case 47:uh(UI(BI(Qn(),Zh()),e,r),d);break;default:M+="/"}break;case 123*w:l[p++]=oa(M)*C;case 125*w:case 59:case 0:switch(A){case 0:case 125:x=0;case 59+m:C==-1&&(M=Rt(M,/\f/g,"")),_>0&&oa(M)-u&&uh(_>32?Fk(M+";",n,r,u-1):Fk(Rt(M," ","")+";",n,r,u-2),d);break;case 59:M+=";";default:if(uh(E=Lk(M,e,r,p,m,o,l,O,I=[],N=[],u),a),A===123)if(m===0)ef(M,e,E,E,I,a,u,l,N);else switch(g===99&&Gr(M,3)===110?100:g){case 100:case 108:case 109:case 115:ef(t,E,E,n&&uh(Lk(t,E,E,0,0,o,l,O,o,I=[],u),N),o,N,u,l,n?I:N);break;default:ef(M,E,E,E,[""],N,0,l,N)}}p=m=_=0,w=C=1,O=M="",u=s;break;case 58:u=1+oa(M),_=b;default:if(w<1){if(A==123)--w;else if(A==125&&w++==0&&PI()==125)continue}switch(M+=Jf(A),A*w){case 38:C=m>0?1:(M+="\f",-1);break;case 44:l[p++]=(oa(M)-1)*C,C=1;break;case 64:da()===45&&(M+=Qh(Qn())),g=da(),m=u=oa(O=M+=WI(Zh())),A++;break;case 45:b===45&&oa(M)==2&&(w=0)}}return a}function Lk(t,e,r,n,o,a,s,l,d,p,m){for(var u=o-1,g=o===0?a:[""],_=s2(g),b=0,w=0,x=0;b<n;++b)for(var C=0,A=mu(t,u+1,u=II(w=s[b])),O=t;C<_;++C)(O=Q6(w>0?g[C]+" "+A:Rt(A,/&\f/g,g[C])))&&(d[x++]=O);return Kf(t,e,r,o===0?o2:l,d,p,m)}function UI(t,e,r){return Kf(t,e,r,Y6,Jf(zI()),mu(t,2,-2),0)}function Fk(t,e,r,n){return Kf(t,e,r,a2,mu(t,0,n),mu(t,n+1,-1),n)}function oc(t,e){for(var r="",n=s2(t),o=0;o<n;o++)r+=e(t[o],o,t,e)||"";return r}function VI(t,e,r,n){switch(t.type){case AI:if(t.children.length)break;case DI:case a2:return t.return=t.return||t.value;case Y6:return"";case Z6:return t.return=t.value+"{"+oc(t.children,n)+"}";case o2:t.value=t.props.join(",")}return oa(r=oc(t.children,n))?t.return=t.value+"{"+r+"}":""}function qI(t){var e=s2(t);return function(r,n,o,a){for(var s="",l=0;l<e;l++)s+=t[l](r,n,o,a)||"";return s}}function GI(t){return function(e){e.root||(e=e.return)&&t(e)}}function n8(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var JI=function(e,r,n){for(var o=0,a=0;o=a,a=da(),o===38&&a===12&&(r[n]=1),!gu(a);)Qn();return Pu(e,Pn)},XI=function(e,r){var n=-1,o=44;do switch(gu(o)){case 0:o===38&&da()===12&&(r[n]=1),e[n]+=JI(Pn-1,r,n);break;case 2:e[n]+=Qh(o);break;case 4:if(o===44){e[++n]=da()===58?"&\f":"",r[n]=e[n].length;break}default:e[n]+=Jf(o)}while(o=Qn());return e},KI=function(e,r){return r8(XI(t8(e),r))},Bk=new WeakMap,YI=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!Bk.get(n))&&!o){Bk.set(e,!0);for(var a=[],s=KI(r,a),l=n.props,d=0,p=0;d<s.length;d++)for(var m=0;m<l.length;m++,p++)e.props[p]=a[d]?s[d].replace(/&\f/g,l[m]):l[m]+" "+s[d]}}},ZI=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};function o8(t,e){switch(MI(t,e)){case 5103:return Mt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Mt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Mt+t+mf+t+on+t+t;case 6828:case 4268:return Mt+t+on+t+t;case 6165:return Mt+t+on+"flex-"+t+t;case 5187:return Mt+t+Rt(t,/(\w+).+(:[^]+)/,Mt+"box-$1$2"+on+"flex-$1$2")+t;case 5443:return Mt+t+on+"flex-item-"+Rt(t,/flex-|-self/,"")+t;case 4675:return Mt+t+on+"flex-line-pack"+Rt(t,/align-content|flex-|-self/,"")+t;case 5548:return Mt+t+on+Rt(t,"shrink","negative")+t;case 5292:return Mt+t+on+Rt(t,"basis","preferred-size")+t;case 6060:return Mt+"box-"+Rt(t,"-grow","")+Mt+t+on+Rt(t,"grow","positive")+t;case 4554:return Mt+Rt(t,/([^-])(transform)/g,"$1"+Mt+"$2")+t;case 6187:return Rt(Rt(Rt(t,/(zoom-|grab)/,Mt+"$1"),/(image-set)/,Mt+"$1"),t,"")+t;case 5495:case 3959:return Rt(t,/(image-set\([^]*)/,Mt+"$1$`$1");case 4968:return Rt(Rt(t,/(.+:)(flex-)?(.*)/,Mt+"box-pack:$3"+on+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Mt+t+t;case 4095:case 3583:case 4068:case 2532:return Rt(t,/(.+)-inline(.+)/,Mt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(oa(t)-1-e>6)switch(Gr(t,e+1)){case 109:if(Gr(t,e+4)!==45)break;case 102:return Rt(t,/(.+:)(.+)-([^]+)/,"$1"+Mt+"$2-$3$1"+mf+(Gr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~B1(t,"stretch")?o8(Rt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Gr(t,e+1)!==115)break;case 6444:switch(Gr(t,oa(t)-3-(~B1(t,"!important")&&10))){case 107:return Rt(t,":",":"+Mt)+t;case 101:return Rt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Mt+(Gr(t,14)===45?"inline-":"")+"box$3$1"+Mt+"$2$3$1"+on+"$2box$3")+t}break;case 5936:switch(Gr(t,e+11)){case 114:return Mt+t+on+Rt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Mt+t+on+Rt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Mt+t+on+Rt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Mt+t+on+t+t}return t}var QI=function(e,r,n,o){if(e.length>-1&&!e.return)switch(e.type){case a2:e.return=o8(e.value,e.length);break;case Z6:return oc([xd(e,{value:Rt(e.value,"@","@"+Mt)})],o);case o2:if(e.length)return jI(e.props,function(a){switch(RI(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return oc([xd(e,{props:[Rt(a,/:(read-\w+)/,":"+mf+"$1")]})],o);case"::placeholder":return oc([xd(e,{props:[Rt(a,/:(plac\w+)/,":"+Mt+"input-$1")]}),xd(e,{props:[Rt(a,/:(plac\w+)/,":"+mf+"$1")]}),xd(e,{props:[Rt(a,/:(plac\w+)/,on+"input-$1")]})],o)}return""})}},eN=[QI],a8=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(w){var x=w.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var o=e.stylisPlugins||eN,a={},s,l=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(w){for(var x=w.getAttribute("data-emotion").split(" "),C=1;C<x.length;C++)a[x[C]]=!0;l.push(w)});var d,p=[YI,ZI];{var m,u=[VI,GI(function(w){m.insert(w)})],g=qI(p.concat(o,u)),_=function(x){return oc(HI(x),g)};d=function(x,C,A,O){m=A,_(x?x+"{"+C.styles+"}":C.styles),O&&(b.inserted[C.name]=!0)}}var b={key:r,sheet:new K6({key:r,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:d};return b.sheet.hydrate(l),b},I_={exports:{}},jt={};/** @license React v16.13.1
|
|
41
41
|
* react-is.production.min.js
|
|
42
42
|
*
|
|
43
43
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -681,7 +681,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
681
681
|
* Date: 2024-04-21T07:43:05.335Z
|
|
682
682
|
*/function g6(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function aD(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?g6(Object(r),!0).forEach(function(n){Ret(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g6(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Iet(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function sD(t){var e=Iet(t,"string");return typeof e=="symbol"?e:e+""}function Jb(t){"@babel/helpers - typeof";return Jb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jb(t)}function Net(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _6(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,sD(n.key),n)}}function Met(t,e,r){return e&&_6(t.prototype,e),r&&_6(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ret(t,e,r){return e=sD(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iD(t){return jet(t)||zet(t)||Pet(t)||Let()}function jet(t){if(Array.isArray(t))return Xb(t)}function zet(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Pet(t,e){if(t){if(typeof t=="string")return Xb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xb(t,e)}}function Xb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Let(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
683
683
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Vm=typeof window<"u"&&typeof window.document<"u",ma=Vm?window:{},Jw=Vm&&ma.document.documentElement?"ontouchstart"in ma.document.documentElement:!1,Xw=Vm?"PointerEvent"in ma:!1,ur="cropper",Kw="all",lD="crop",cD="move",dD="zoom",li="e",ci="w",Nl="s",gs="n",zd="ne",Pd="nw",Ld="se",Fd="sw",Kb="".concat(ur,"-crop"),v6="".concat(ur,"-disabled"),Nn="".concat(ur,"-hidden"),y6="".concat(ur,"-hide"),Fet="".concat(ur,"-invisible"),Gf="".concat(ur,"-modal"),Yb="".concat(ur,"-move"),Ru="".concat(ur,"Action"),Fh="".concat(ur,"Preview"),Yw="crop",uD="move",pD="none",Zb="crop",Qb="cropend",e2="cropmove",t2="cropstart",b6="dblclick",Bet=Jw?"touchstart":"mousedown",Wet=Jw?"touchmove":"mousemove",Het=Jw?"touchend touchcancel":"mouseup",w6=Xw?"pointerdown":Bet,S6=Xw?"pointermove":Wet,x6=Xw?"pointerup pointercancel":Het,k6="ready",C6="resize",$6="wheel",r2="zoom",T6="image/jpeg",Uet=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Vet=/^data:/,qet=/^data:image\/jpeg;base64,/,Get=/^img|canvas$/i,hD=200,fD=100,E6={viewMode:0,dragMode:Yw,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:hD,minContainerHeight:fD,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Jet='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',Xet=Number.isNaN||ma.isNaN;function $t(t){return typeof t=="number"&&!Xet(t)}var O6=function(e){return e>0&&e<1/0};function N1(t){return typeof t>"u"}function Ai(t){return Jb(t)==="object"&&t!==null}var Ket=Object.prototype.hasOwnProperty;function rc(t){if(!Ai(t))return!1;try{var e=t.constructor,r=e.prototype;return e&&r&&Ket.call(r,"isPrototypeOf")}catch{return!1}}function An(t){return typeof t=="function"}var Yet=Array.prototype.slice;function mD(t){return Array.from?Array.from(t):Yet.call(t)}function Ir(t,e){return t&&An(e)&&(Array.isArray(t)||$t(t.length)?mD(t).forEach(function(r,n){e.call(t,r,n,t)}):Ai(t)&&Object.keys(t).forEach(function(r){e.call(t,t[r],r,t)})),t}var hr=Object.assign||function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return Ai(e)&&n.length>0&&n.forEach(function(a){Ai(a)&&Object.keys(a).forEach(function(s){e[s]=a[s]})}),e},Zet=/\.\d*(?:0|9){12}\d*$/;function dc(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Zet.test(t)?Math.round(t*e)/e:t}var Qet=/^width|height|left|top|marginLeft|marginTop$/;function Ts(t,e){var r=t.style;Ir(e,function(n,o){Qet.test(o)&&$t(n)&&(n="".concat(n,"px")),r[o]=n})}function ett(t,e){return t.classList?t.classList.contains(e):t.className.indexOf(e)>-1}function Wr(t,e){if(e){if($t(t.length)){Ir(t,function(n){Wr(n,e)});return}if(t.classList){t.classList.add(e);return}var r=t.className.trim();r?r.indexOf(e)<0&&(t.className="".concat(r," ").concat(e)):t.className=e}}function ha(t,e){if(e){if($t(t.length)){Ir(t,function(r){ha(r,e)});return}if(t.classList){t.classList.remove(e);return}t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,""))}}function nc(t,e,r){if(e){if($t(t.length)){Ir(t,function(n){nc(n,e,r)});return}r?Wr(t,e):ha(t,e)}}var ttt=/([a-z\d])([A-Z])/g;function Zw(t){return t.replace(ttt,"$1-$2").toLowerCase()}function n2(t,e){return Ai(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Zw(e)))}function ju(t,e,r){Ai(r)?t[e]=r:t.dataset?t.dataset[e]=r:t.setAttribute("data-".concat(Zw(e)),r)}function rtt(t,e){if(Ai(t[e]))try{delete t[e]}catch{t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch{t.dataset[e]=void 0}else t.removeAttribute("data-".concat(Zw(e)))}var gD=/\s\s*/,_D=(function(){var t=!1;if(Vm){var e=!1,r=function(){},n=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(a){e=a}});ma.addEventListener("test",r,n),ma.removeEventListener("test",r,n)}return t})();function Ao(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=r;e.trim().split(gD).forEach(function(a){if(!_D){var s=t.listeners;s&&s[a]&&s[a][r]&&(o=s[a][r],delete s[a][r],Object.keys(s[a]).length===0&&delete s[a],Object.keys(s).length===0&&delete t.listeners)}t.removeEventListener(a,o,n)})}function fo(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=r;e.trim().split(gD).forEach(function(a){if(n.once&&!_D){var s=t.listeners,l=s===void 0?{}:s;o=function(){delete l[a][r],t.removeEventListener(a,o,n);for(var p=arguments.length,m=new Array(p),u=0;u<p;u++)m[u]=arguments[u];r.apply(t,m)},l[a]||(l[a]={}),l[a][r]&&t.removeEventListener(a,l[a][r],n),l[a][r]=o,t.listeners=l}t.addEventListener(a,o,n)})}function uc(t,e,r){var n;return An(Event)&&An(CustomEvent)?n=new CustomEvent(e,{detail:r,bubbles:!0,cancelable:!0}):(n=document.createEvent("CustomEvent"),n.initCustomEvent(e,!0,!0,r)),t.dispatchEvent(n)}function vD(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var M1=ma.location,ntt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function D6(t){var e=t.match(ntt);return e!==null&&(e[1]!==M1.protocol||e[2]!==M1.hostname||e[3]!==M1.port)}function A6(t){var e="timestamp=".concat(new Date().getTime());return t+(t.indexOf("?")===-1?"?":"&")+e}function fu(t){var e=t.rotate,r=t.scaleX,n=t.scaleY,o=t.translateX,a=t.translateY,s=[];$t(o)&&o!==0&&s.push("translateX(".concat(o,"px)")),$t(a)&&a!==0&&s.push("translateY(".concat(a,"px)")),$t(e)&&e!==0&&s.push("rotate(".concat(e,"deg)")),$t(r)&&r!==1&&s.push("scaleX(".concat(r,")")),$t(n)&&n!==1&&s.push("scaleY(".concat(n,")"));var l=s.length?s.join(" "):"none";return{WebkitTransform:l,msTransform:l,transform:l}}function ott(t){var e=aD({},t),r=0;return Ir(t,function(n,o){delete e[o],Ir(e,function(a){var s=Math.abs(n.startX-a.startX),l=Math.abs(n.startY-a.startY),d=Math.abs(n.endX-a.endX),p=Math.abs(n.endY-a.endY),m=Math.sqrt(s*s+l*l),u=Math.sqrt(d*d+p*p),g=(u-m)/m;Math.abs(g)>Math.abs(r)&&(r=g)})}),r}function Bh(t,e){var r=t.pageX,n=t.pageY,o={endX:r,endY:n};return e?o:aD({startX:r,startY:n},o)}function att(t){var e=0,r=0,n=0;return Ir(t,function(o){var a=o.startX,s=o.startY;e+=a,r+=s,n+=1}),e/=n,r/=n,{pageX:e,pageY:r}}function Es(t){var e=t.aspectRatio,r=t.height,n=t.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",a=O6(n),s=O6(r);if(a&&s){var l=r*e;o==="contain"&&l>n||o==="cover"&&l<n?r=n/e:n=r*e}else a?r=n/e:s&&(n=r*e);return{width:n,height:r}}function stt(t){var e=t.width,r=t.height,n=t.degree;if(n=Math.abs(n)%180,n===90)return{width:r,height:e};var o=n%90*Math.PI/180,a=Math.sin(o),s=Math.cos(o),l=e*s+r*a,d=e*a+r*s;return n>90?{width:d,height:l}:{width:l,height:d}}function itt(t,e,r,n){var o=e.aspectRatio,a=e.naturalWidth,s=e.naturalHeight,l=e.rotate,d=l===void 0?0:l,p=e.scaleX,m=p===void 0?1:p,u=e.scaleY,g=u===void 0?1:u,_=r.aspectRatio,b=r.naturalWidth,w=r.naturalHeight,x=n.fillColor,C=x===void 0?"transparent":x,A=n.imageSmoothingEnabled,O=A===void 0?!0:A,I=n.imageSmoothingQuality,N=I===void 0?"low":I,E=n.maxWidth,M=E===void 0?1/0:E,j=n.maxHeight,z=j===void 0?1/0:j,$=n.minWidth,L=$===void 0?0:$,W=n.minHeight,U=W===void 0?0:W,H=document.createElement("canvas"),B=H.getContext("2d"),K=Es({aspectRatio:_,width:M,height:z}),oe=Es({aspectRatio:_,width:L,height:U},"cover"),Z=Math.min(K.width,Math.max(oe.width,b)),q=Math.min(K.height,Math.max(oe.height,w)),ne=Es({aspectRatio:o,width:M,height:z}),P=Es({aspectRatio:o,width:L,height:U},"cover"),J=Math.min(ne.width,Math.max(P.width,a)),ce=Math.min(ne.height,Math.max(P.height,s)),de=[-J/2,-ce/2,J,ce];return H.width=dc(Z),H.height=dc(q),B.fillStyle=C,B.fillRect(0,0,Z,q),B.save(),B.translate(Z/2,q/2),B.rotate(d*Math.PI/180),B.scale(m,g),B.imageSmoothingEnabled=O,B.imageSmoothingQuality=N,B.drawImage.apply(B,[t].concat(iD(de.map(function(pe){return Math.floor(dc(pe))})))),B.restore(),H}var yD=String.fromCharCode;function ltt(t,e,r){var n="";r+=e;for(var o=e;o<r;o+=1)n+=yD(t.getUint8(o));return n}var ctt=/^data:.*,/;function dtt(t){var e=t.replace(ctt,""),r=atob(e),n=new ArrayBuffer(r.length),o=new Uint8Array(n);return Ir(o,function(a,s){o[s]=r.charCodeAt(s)}),n}function utt(t,e){for(var r=[],n=8192,o=new Uint8Array(t);o.length>0;)r.push(yD.apply(null,mD(o.subarray(0,n)))),o=o.subarray(n);return"data:".concat(e,";base64,").concat(btoa(r.join("")))}function ptt(t){var e=new DataView(t),r;try{var n,o,a;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(var s=e.byteLength,l=2;l+1<s;){if(e.getUint8(l)===255&&e.getUint8(l+1)===225){o=l;break}l+=1}if(o){var d=o+4,p=o+10;if(ltt(e,d,4)==="Exif"){var m=e.getUint16(p);if(n=m===18761,(n||m===19789)&&e.getUint16(p+2,n)===42){var u=e.getUint32(p+4,n);u>=8&&(a=p+u)}}}if(a){var g=e.getUint16(a,n),_,b;for(b=0;b<g;b+=1)if(_=a+b*12+2,e.getUint16(_,n)===274){_+=8,r=e.getUint16(_,n),e.setUint16(_,1,n);break}}}catch{r=1}return r}function htt(t){var e=0,r=1,n=1;switch(t){case 2:r=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,r=-1;break;case 8:e=-90;break}return{rotate:e,scaleX:r,scaleY:n}}var ftt={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,r=this.options,n=this.container,o=this.cropper,a=Number(r.minContainerWidth),s=Number(r.minContainerHeight);Wr(o,Nn),ha(e,Nn);var l={width:Math.max(n.offsetWidth,a>=0?a:hD),height:Math.max(n.offsetHeight,s>=0?s:fD)};this.containerData=l,Ts(o,{width:l.width,height:l.height}),Wr(e,Nn),ha(o,Nn)},initCanvas:function(){var e=this.containerData,r=this.imageData,n=this.options.viewMode,o=Math.abs(r.rotate)%180===90,a=o?r.naturalHeight:r.naturalWidth,s=o?r.naturalWidth:r.naturalHeight,l=a/s,d=e.width,p=e.height;e.height*l>e.width?n===3?d=e.height*l:p=e.width/l:n===3?p=e.width/l:d=e.height*l;var m={aspectRatio:l,naturalWidth:a,naturalHeight:s,width:d,height:p};this.canvasData=m,this.limited=n===1||n===2,this.limitCanvas(!0,!0),m.width=Math.min(Math.max(m.width,m.minWidth),m.maxWidth),m.height=Math.min(Math.max(m.height,m.minHeight),m.maxHeight),m.left=(e.width-m.width)/2,m.top=(e.height-m.height)/2,m.oldLeft=m.left,m.oldTop=m.top,this.initialCanvasData=hr({},m)},limitCanvas:function(e,r){var n=this.options,o=this.containerData,a=this.canvasData,s=this.cropBoxData,l=n.viewMode,d=a.aspectRatio,p=this.cropped&&s;if(e){var m=Number(n.minCanvasWidth)||0,u=Number(n.minCanvasHeight)||0;l>1?(m=Math.max(m,o.width),u=Math.max(u,o.height),l===3&&(u*d>m?m=u*d:u=m/d)):l>0&&(m?m=Math.max(m,p?s.width:0):u?u=Math.max(u,p?s.height:0):p&&(m=s.width,u=s.height,u*d>m?m=u*d:u=m/d));var g=Es({aspectRatio:d,width:m,height:u});m=g.width,u=g.height,a.minWidth=m,a.minHeight=u,a.maxWidth=1/0,a.maxHeight=1/0}if(r)if(l>(p?0:1)){var _=o.width-a.width,b=o.height-a.height;a.minLeft=Math.min(0,_),a.minTop=Math.min(0,b),a.maxLeft=Math.max(0,_),a.maxTop=Math.max(0,b),p&&this.limited&&(a.minLeft=Math.min(s.left,s.left+(s.width-a.width)),a.minTop=Math.min(s.top,s.top+(s.height-a.height)),a.maxLeft=s.left,a.maxTop=s.top,l===2&&(a.width>=o.width&&(a.minLeft=Math.min(0,_),a.maxLeft=Math.max(0,_)),a.height>=o.height&&(a.minTop=Math.min(0,b),a.maxTop=Math.max(0,b))))}else a.minLeft=-a.width,a.minTop=-a.height,a.maxLeft=o.width,a.maxTop=o.height},renderCanvas:function(e,r){var n=this.canvasData,o=this.imageData;if(r){var a=stt({width:o.naturalWidth*Math.abs(o.scaleX||1),height:o.naturalHeight*Math.abs(o.scaleY||1),degree:o.rotate||0}),s=a.width,l=a.height,d=n.width*(s/n.naturalWidth),p=n.height*(l/n.naturalHeight);n.left-=(d-n.width)/2,n.top-=(p-n.height)/2,n.width=d,n.height=p,n.aspectRatio=s/l,n.naturalWidth=s,n.naturalHeight=l,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCanvas(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,Ts(this.canvas,hr({width:n.width,height:n.height},fu({translateX:n.left,translateY:n.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var r=this.canvasData,n=this.imageData,o=n.naturalWidth*(r.width/r.naturalWidth),a=n.naturalHeight*(r.height/r.naturalHeight);hr(n,{width:o,height:a,left:(r.width-o)/2,top:(r.height-a)/2}),Ts(this.image,hr({width:n.width,height:n.height},fu(hr({translateX:n.left,translateY:n.top},n)))),e&&this.output()},initCropBox:function(){var e=this.options,r=this.canvasData,n=e.aspectRatio||e.initialAspectRatio,o=Number(e.autoCropArea)||.8,a={width:r.width,height:r.height};n&&(r.height*n>r.width?a.height=a.width/n:a.width=a.height*n),this.cropBoxData=a,this.limitCropBox(!0,!0),a.width=Math.min(Math.max(a.width,a.minWidth),a.maxWidth),a.height=Math.min(Math.max(a.height,a.minHeight),a.maxHeight),a.width=Math.max(a.minWidth,a.width*o),a.height=Math.max(a.minHeight,a.height*o),a.left=r.left+(r.width-a.width)/2,a.top=r.top+(r.height-a.height)/2,a.oldLeft=a.left,a.oldTop=a.top,this.initialCropBoxData=hr({},a)},limitCropBox:function(e,r){var n=this.options,o=this.containerData,a=this.canvasData,s=this.cropBoxData,l=this.limited,d=n.aspectRatio;if(e){var p=Number(n.minCropBoxWidth)||0,m=Number(n.minCropBoxHeight)||0,u=l?Math.min(o.width,a.width,a.width+a.left,o.width-a.left):o.width,g=l?Math.min(o.height,a.height,a.height+a.top,o.height-a.top):o.height;p=Math.min(p,o.width),m=Math.min(m,o.height),d&&(p&&m?m*d>p?m=p/d:p=m*d:p?m=p/d:m&&(p=m*d),g*d>u?g=u/d:u=g*d),s.minWidth=Math.min(p,u),s.minHeight=Math.min(m,g),s.maxWidth=u,s.maxHeight=g}r&&(l?(s.minLeft=Math.max(0,a.left),s.minTop=Math.max(0,a.top),s.maxLeft=Math.min(o.width,a.left+a.width)-s.width,s.maxTop=Math.min(o.height,a.top+a.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=o.width-s.width,s.maxTop=o.height-s.height))},renderCropBox:function(){var e=this.options,r=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,e.movable&&e.cropBoxMovable&&ju(this.face,Ru,n.width>=r.width&&n.height>=r.height?cD:Kw),Ts(this.cropBox,hr({width:n.width,height:n.height},fu({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),uc(this.element,Zb,this.getData())}},mtt={initPreview:function(){var e=this.element,r=this.crossOrigin,n=this.options.preview,o=r?this.crossOriginUrl:this.url,a=e.alt||"The image to preview",s=document.createElement("img");if(r&&(s.crossOrigin=r),s.src=o,s.alt=a,this.viewBox.appendChild(s),this.viewBoxImage=s,!!n){var l=n;typeof n=="string"?l=e.ownerDocument.querySelectorAll(n):n.querySelector&&(l=[n]),this.previews=l,Ir(l,function(d){var p=document.createElement("img");ju(d,Fh,{width:d.offsetWidth,height:d.offsetHeight,html:d.innerHTML}),r&&(p.crossOrigin=r),p.src=o,p.alt=a,p.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',d.innerHTML="",d.appendChild(p)})}},resetPreview:function(){Ir(this.previews,function(e){var r=n2(e,Fh);Ts(e,{width:r.width,height:r.height}),e.innerHTML=r.html,rtt(e,Fh)})},preview:function(){var e=this.imageData,r=this.canvasData,n=this.cropBoxData,o=n.width,a=n.height,s=e.width,l=e.height,d=n.left-r.left-e.left,p=n.top-r.top-e.top;!this.cropped||this.disabled||(Ts(this.viewBoxImage,hr({width:s,height:l},fu(hr({translateX:-d,translateY:-p},e)))),Ir(this.previews,function(m){var u=n2(m,Fh),g=u.width,_=u.height,b=g,w=_,x=1;o&&(x=g/o,w=a*x),a&&w>_&&(x=_/a,b=o*x,w=_),Ts(m,{width:b,height:w}),Ts(m.getElementsByTagName("img")[0],hr({width:s*x,height:l*x},fu(hr({translateX:-d*x,translateY:-p*x},e))))}))}},gtt={bind:function(){var e=this.element,r=this.options,n=this.cropper;An(r.cropstart)&&fo(e,t2,r.cropstart),An(r.cropmove)&&fo(e,e2,r.cropmove),An(r.cropend)&&fo(e,Qb,r.cropend),An(r.crop)&&fo(e,Zb,r.crop),An(r.zoom)&&fo(e,r2,r.zoom),fo(n,w6,this.onCropStart=this.cropStart.bind(this)),r.zoomable&&r.zoomOnWheel&&fo(n,$6,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&fo(n,b6,this.onDblclick=this.dblclick.bind(this)),fo(e.ownerDocument,S6,this.onCropMove=this.cropMove.bind(this)),fo(e.ownerDocument,x6,this.onCropEnd=this.cropEnd.bind(this)),r.responsive&&fo(window,C6,this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,r=this.options,n=this.cropper;An(r.cropstart)&&Ao(e,t2,r.cropstart),An(r.cropmove)&&Ao(e,e2,r.cropmove),An(r.cropend)&&Ao(e,Qb,r.cropend),An(r.crop)&&Ao(e,Zb,r.crop),An(r.zoom)&&Ao(e,r2,r.zoom),Ao(n,w6,this.onCropStart),r.zoomable&&r.zoomOnWheel&&Ao(n,$6,this.onWheel,{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&Ao(n,b6,this.onDblclick),Ao(e.ownerDocument,S6,this.onCropMove),Ao(e.ownerDocument,x6,this.onCropEnd),r.responsive&&Ao(window,C6,this.onResize)}},_tt={resize:function(){if(!this.disabled){var e=this.options,r=this.container,n=this.containerData,o=r.offsetWidth/n.width,a=r.offsetHeight/n.height,s=Math.abs(o-1)>Math.abs(a-1)?o:a;if(s!==1){var l,d;e.restore&&(l=this.getCanvasData(),d=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(Ir(l,function(p,m){l[m]=p*s})),this.setCropBoxData(Ir(d,function(p,m){d[m]=p*s})))}}},dblclick:function(){this.disabled||this.options.dragMode===pD||this.setDragMode(ett(this.dragBox,Kb)?uD:Yw)},wheel:function(e){var r=this,n=Number(this.options.wheelZoomRatio)||.1,o=1;this.disabled||(e.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){r.wheeling=!1},50),e.deltaY?o=e.deltaY>0?1:-1:e.wheelDelta?o=-e.wheelDelta/120:e.detail&&(o=e.detail>0?1:-1),this.zoom(-o*n,e)))},cropStart:function(e){var r=e.buttons,n=e.button;if(!(this.disabled||(e.type==="mousedown"||e.type==="pointerdown"&&e.pointerType==="mouse")&&($t(r)&&r!==1||$t(n)&&n!==0||e.ctrlKey))){var o=this.options,a=this.pointers,s;e.changedTouches?Ir(e.changedTouches,function(l){a[l.identifier]=Bh(l)}):a[e.pointerId||0]=Bh(e),Object.keys(a).length>1&&o.zoomable&&o.zoomOnTouch?s=dD:s=n2(e.target,Ru),Uet.test(s)&&uc(this.element,t2,{originalEvent:e,action:s})!==!1&&(e.preventDefault(),this.action=s,this.cropping=!1,s===lD&&(this.cropping=!0,Wr(this.dragBox,Gf)))}},cropMove:function(e){var r=this.action;if(!(this.disabled||!r)){var n=this.pointers;e.preventDefault(),uc(this.element,e2,{originalEvent:e,action:r})!==!1&&(e.changedTouches?Ir(e.changedTouches,function(o){hr(n[o.identifier]||{},Bh(o,!0))}):hr(n[e.pointerId||0]||{},Bh(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var r=this.action,n=this.pointers;e.changedTouches?Ir(e.changedTouches,function(o){delete n[o.identifier]}):delete n[e.pointerId||0],r&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,nc(this.dragBox,Gf,this.cropped&&this.options.modal)),uc(this.element,Qb,{originalEvent:e,action:r}))}}},vtt={change:function(e){var r=this.options,n=this.canvasData,o=this.containerData,a=this.cropBoxData,s=this.pointers,l=this.action,d=r.aspectRatio,p=a.left,m=a.top,u=a.width,g=a.height,_=p+u,b=m+g,w=0,x=0,C=o.width,A=o.height,O=!0,I;!d&&e.shiftKey&&(d=u&&g?u/g:1),this.limited&&(w=a.minLeft,x=a.minTop,C=w+Math.min(o.width,n.width,n.left+n.width),A=x+Math.min(o.height,n.height,n.top+n.height));var N=s[Object.keys(s)[0]],E={x:N.endX-N.startX,y:N.endY-N.startY},M=function(z){switch(z){case li:_+E.x>C&&(E.x=C-_);break;case ci:p+E.x<w&&(E.x=w-p);break;case gs:m+E.y<x&&(E.y=x-m);break;case Nl:b+E.y>A&&(E.y=A-b);break}};switch(l){case Kw:p+=E.x,m+=E.y;break;case li:if(E.x>=0&&(_>=C||d&&(m<=x||b>=A))){O=!1;break}M(li),u+=E.x,u<0&&(l=ci,u=-u,p-=u),d&&(g=u/d,m+=(a.height-g)/2);break;case gs:if(E.y<=0&&(m<=x||d&&(p<=w||_>=C))){O=!1;break}M(gs),g-=E.y,m+=E.y,g<0&&(l=Nl,g=-g,m-=g),d&&(u=g*d,p+=(a.width-u)/2);break;case ci:if(E.x<=0&&(p<=w||d&&(m<=x||b>=A))){O=!1;break}M(ci),u-=E.x,p+=E.x,u<0&&(l=li,u=-u,p-=u),d&&(g=u/d,m+=(a.height-g)/2);break;case Nl:if(E.y>=0&&(b>=A||d&&(p<=w||_>=C))){O=!1;break}M(Nl),g+=E.y,g<0&&(l=gs,g=-g,m-=g),d&&(u=g*d,p+=(a.width-u)/2);break;case zd:if(d){if(E.y<=0&&(m<=x||_>=C)){O=!1;break}M(gs),g-=E.y,m+=E.y,u=g*d}else M(gs),M(li),E.x>=0?_<C?u+=E.x:E.y<=0&&m<=x&&(O=!1):u+=E.x,E.y<=0?m>x&&(g-=E.y,m+=E.y):(g-=E.y,m+=E.y);u<0&&g<0?(l=Fd,g=-g,u=-u,m-=g,p-=u):u<0?(l=Pd,u=-u,p-=u):g<0&&(l=Ld,g=-g,m-=g);break;case Pd:if(d){if(E.y<=0&&(m<=x||p<=w)){O=!1;break}M(gs),g-=E.y,m+=E.y,u=g*d,p+=a.width-u}else M(gs),M(ci),E.x<=0?p>w?(u-=E.x,p+=E.x):E.y<=0&&m<=x&&(O=!1):(u-=E.x,p+=E.x),E.y<=0?m>x&&(g-=E.y,m+=E.y):(g-=E.y,m+=E.y);u<0&&g<0?(l=Ld,g=-g,u=-u,m-=g,p-=u):u<0?(l=zd,u=-u,p-=u):g<0&&(l=Fd,g=-g,m-=g);break;case Fd:if(d){if(E.x<=0&&(p<=w||b>=A)){O=!1;break}M(ci),u-=E.x,p+=E.x,g=u/d}else M(Nl),M(ci),E.x<=0?p>w?(u-=E.x,p+=E.x):E.y>=0&&b>=A&&(O=!1):(u-=E.x,p+=E.x),E.y>=0?b<A&&(g+=E.y):g+=E.y;u<0&&g<0?(l=zd,g=-g,u=-u,m-=g,p-=u):u<0?(l=Ld,u=-u,p-=u):g<0&&(l=Pd,g=-g,m-=g);break;case Ld:if(d){if(E.x>=0&&(_>=C||b>=A)){O=!1;break}M(li),u+=E.x,g=u/d}else M(Nl),M(li),E.x>=0?_<C?u+=E.x:E.y>=0&&b>=A&&(O=!1):u+=E.x,E.y>=0?b<A&&(g+=E.y):g+=E.y;u<0&&g<0?(l=Pd,g=-g,u=-u,m-=g,p-=u):u<0?(l=Fd,u=-u,p-=u):g<0&&(l=zd,g=-g,m-=g);break;case cD:this.move(E.x,E.y),O=!1;break;case dD:this.zoom(ott(s),e),O=!1;break;case lD:if(!E.x||!E.y){O=!1;break}I=vD(this.cropper),p=N.startX-I.left,m=N.startY-I.top,u=a.minWidth,g=a.minHeight,E.x>0?l=E.y>0?Ld:zd:E.x<0&&(p-=u,l=E.y>0?Fd:Pd),E.y<0&&(m-=g),this.cropped||(ha(this.cropBox,Nn),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}O&&(a.width=u,a.height=g,a.left=p,a.top=m,this.action=l,this.renderCropBox()),Ir(s,function(j){j.startX=j.endX,j.startY=j.endY})}},ytt={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Wr(this.dragBox,Gf),ha(this.cropBox,Nn),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=hr({},this.initialImageData),this.canvasData=hr({},this.initialCanvasData),this.cropBoxData=hr({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(hr(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),ha(this.dragBox,Gf),Wr(this.cropBox,Nn)),this},replace:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&e&&(this.isImg&&(this.element.src=e),r?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,Ir(this.previews,function(n){n.getElementsByTagName("img")[0].src=e}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,ha(this.cropper,v6)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Wr(this.cropper,v6)),this},destroy:function(){var e=this.element;return e[ur]?(e[ur]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=this.canvasData,o=n.left,a=n.top;return this.moveTo(N1(e)?e:o+Number(e),N1(r)?r:a+Number(r))},moveTo:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=this.canvasData,o=!1;return e=Number(e),r=Number(r),this.ready&&!this.disabled&&this.options.movable&&($t(e)&&(n.left=e,o=!0),$t(r)&&(n.top=r,o=!0),o&&this.renderCanvas(!0)),this},zoom:function(e,r){var n=this.canvasData;return e=Number(e),e<0?e=1/(1-e):e=1+e,this.zoomTo(n.width*e/n.naturalWidth,null,r)},zoomTo:function(e,r,n){var o=this.options,a=this.canvasData,s=a.width,l=a.height,d=a.naturalWidth,p=a.naturalHeight;if(e=Number(e),e>=0&&this.ready&&!this.disabled&&o.zoomable){var m=d*e,u=p*e;if(uc(this.element,r2,{ratio:e,oldRatio:s/d,originalEvent:n})===!1)return this;if(n){var g=this.pointers,_=vD(this.cropper),b=g&&Object.keys(g).length?att(g):{pageX:n.pageX,pageY:n.pageY};a.left-=(m-s)*((b.pageX-_.left-a.left)/s),a.top-=(u-l)*((b.pageY-_.top-a.top)/l)}else rc(r)&&$t(r.x)&&$t(r.y)?(a.left-=(m-s)*((r.x-a.left)/s),a.top-=(u-l)*((r.y-a.top)/l)):(a.left-=(m-s)/2,a.top-=(u-l)/2);a.width=m,a.height=u,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return e=Number(e),$t(e)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var r=this.imageData.scaleY;return this.scale(e,$t(r)?r:1)},scaleY:function(e){var r=this.imageData.scaleX;return this.scale($t(r)?r:1,e)},scale:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=this.imageData,o=!1;return e=Number(e),r=Number(r),this.ready&&!this.disabled&&this.options.scalable&&($t(e)&&(n.scaleX=e,o=!0),$t(r)&&(n.scaleY=r,o=!0),o&&this.renderCanvas(!0,!0)),this},getData:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.options,n=this.imageData,o=this.canvasData,a=this.cropBoxData,s;if(this.ready&&this.cropped){s={x:a.left-o.left,y:a.top-o.top,width:a.width,height:a.height};var l=n.width/n.naturalWidth;if(Ir(s,function(m,u){s[u]=m/l}),e){var d=Math.round(s.y+s.height),p=Math.round(s.x+s.width);s.x=Math.round(s.x),s.y=Math.round(s.y),s.width=p-s.x,s.height=d-s.y}}else s={x:0,y:0,width:0,height:0};return r.rotatable&&(s.rotate=n.rotate||0),r.scalable&&(s.scaleX=n.scaleX||1,s.scaleY=n.scaleY||1),s},setData:function(e){var r=this.options,n=this.imageData,o=this.canvasData,a={};if(this.ready&&!this.disabled&&rc(e)){var s=!1;r.rotatable&&$t(e.rotate)&&e.rotate!==n.rotate&&(n.rotate=e.rotate,s=!0),r.scalable&&($t(e.scaleX)&&e.scaleX!==n.scaleX&&(n.scaleX=e.scaleX,s=!0),$t(e.scaleY)&&e.scaleY!==n.scaleY&&(n.scaleY=e.scaleY,s=!0)),s&&this.renderCanvas(!0,!0);var l=n.width/n.naturalWidth;$t(e.x)&&(a.left=e.x*l+o.left),$t(e.y)&&(a.top=e.y*l+o.top),$t(e.width)&&(a.width=e.width*l),$t(e.height)&&(a.height=e.height*l),this.setCropBoxData(a)}return this},getContainerData:function(){return this.ready?hr({},this.containerData):{}},getImageData:function(){return this.sized?hr({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,r={};return this.ready&&Ir(["left","top","width","height","naturalWidth","naturalHeight"],function(n){r[n]=e[n]}),r},setCanvasData:function(e){var r=this.canvasData,n=r.aspectRatio;return this.ready&&!this.disabled&&rc(e)&&($t(e.left)&&(r.left=e.left),$t(e.top)&&(r.top=e.top),$t(e.width)?(r.width=e.width,r.height=e.width/n):$t(e.height)&&(r.height=e.height,r.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e=this.cropBoxData,r;return this.ready&&this.cropped&&(r={left:e.left,top:e.top,width:e.width,height:e.height}),r||{}},setCropBoxData:function(e){var r=this.cropBoxData,n=this.options.aspectRatio,o,a;return this.ready&&this.cropped&&!this.disabled&&rc(e)&&($t(e.left)&&(r.left=e.left),$t(e.top)&&(r.top=e.top),$t(e.width)&&e.width!==r.width&&(o=!0,r.width=e.width),$t(e.height)&&e.height!==r.height&&(a=!0,r.height=e.height),n&&(o?r.height=r.width/n:a&&(r.width=r.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var r=this.canvasData,n=itt(this.image,this.imageData,r,e);if(!this.cropped)return n;var o=this.getData(e.rounded),a=o.x,s=o.y,l=o.width,d=o.height,p=n.width/Math.floor(r.naturalWidth);p!==1&&(a*=p,s*=p,l*=p,d*=p);var m=l/d,u=Es({aspectRatio:m,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),g=Es({aspectRatio:m,width:e.minWidth||0,height:e.minHeight||0},"cover"),_=Es({aspectRatio:m,width:e.width||(p!==1?n.width:l),height:e.height||(p!==1?n.height:d)}),b=_.width,w=_.height;b=Math.min(u.width,Math.max(g.width,b)),w=Math.min(u.height,Math.max(g.height,w));var x=document.createElement("canvas"),C=x.getContext("2d");x.width=dc(b),x.height=dc(w),C.fillStyle=e.fillColor||"transparent",C.fillRect(0,0,b,w);var A=e.imageSmoothingEnabled,O=A===void 0?!0:A,I=e.imageSmoothingQuality;C.imageSmoothingEnabled=O,I&&(C.imageSmoothingQuality=I);var N=n.width,E=n.height,M=a,j=s,z,$,L,W,U,H;M<=-l||M>N?(M=0,z=0,L=0,U=0):M<=0?(L=-M,M=0,z=Math.min(N,l+M),U=z):M<=N&&(L=0,z=Math.min(l,N-M),U=z),z<=0||j<=-d||j>E?(j=0,$=0,W=0,H=0):j<=0?(W=-j,j=0,$=Math.min(E,d+j),H=$):j<=E&&(W=0,$=Math.min(d,E-j),H=$);var B=[M,j,z,$];if(U>0&&H>0){var K=b/l;B.push(L*K,W*K,U*K,H*K)}return C.drawImage.apply(C,[n].concat(iD(B.map(function(oe){return Math.floor(dc(oe))})))),x},setAspectRatio:function(e){var r=this.options;return!this.disabled&&!N1(e)&&(r.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var r=this.options,n=this.dragBox,o=this.face;if(this.ready&&!this.disabled){var a=e===Yw,s=r.movable&&e===uD;e=a||s?e:pD,r.dragMode=e,ju(n,Ru,e),nc(n,Kb,a),nc(n,Yb,s),r.cropBoxMovable||(ju(o,Ru,e),nc(o,Kb,a),nc(o,Yb,s))}return this}},btt=ma.Cropper,bD=(function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Net(this,t),!e||!Get.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=hr({},E6,rc(r)&&r),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Met(t,[{key:"init",value:function(){var r=this.element,n=r.tagName.toLowerCase(),o;if(!r[ur]){if(r[ur]=this,n==="img"){if(this.isImg=!0,o=r.getAttribute("src")||"",this.originalUrl=o,!o)return;o=r.src}else n==="canvas"&&window.HTMLCanvasElement&&(o=r.toDataURL());this.load(o)}}},{key:"load",value:function(r){var n=this;if(r){this.url=r,this.imageData={};var o=this.element,a=this.options;if(!a.rotatable&&!a.scalable&&(a.checkOrientation=!1),!a.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Vet.test(r)){qet.test(r)?this.read(dtt(r)):this.clone();return}var s=new XMLHttpRequest,l=this.clone.bind(this);this.reloading=!0,this.xhr=s,s.onabort=l,s.onerror=l,s.ontimeout=l,s.onprogress=function(){s.getResponseHeader("content-type")!==T6&&s.abort()},s.onload=function(){n.read(s.response)},s.onloadend=function(){n.reloading=!1,n.xhr=null},a.checkCrossOrigin&&D6(r)&&o.crossOrigin&&(r=A6(r)),s.open("GET",r,!0),s.responseType="arraybuffer",s.withCredentials=o.crossOrigin==="use-credentials",s.send()}}},{key:"read",value:function(r){var n=this.options,o=this.imageData,a=ptt(r),s=0,l=1,d=1;if(a>1){this.url=utt(r,T6);var p=htt(a);s=p.rotate,l=p.scaleX,d=p.scaleY}n.rotatable&&(o.rotate=s),n.scalable&&(o.scaleX=l,o.scaleY=d),this.clone()}},{key:"clone",value:function(){var r=this.element,n=this.url,o=r.crossOrigin,a=n;this.options.checkCrossOrigin&&D6(n)&&(o||(o="anonymous"),a=A6(n)),this.crossOrigin=o,this.crossOriginUrl=a;var s=document.createElement("img");o&&(s.crossOrigin=o),s.src=a||n,s.alt=r.alt||"The image to crop",this.image=s,s.onload=this.start.bind(this),s.onerror=this.stop.bind(this),Wr(s,y6),r.parentNode.insertBefore(s,r.nextSibling)}},{key:"start",value:function(){var r=this,n=this.image;n.onload=null,n.onerror=null,this.sizing=!0;var o=ma.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ma.navigator.userAgent),a=function(p,m){hr(r.imageData,{naturalWidth:p,naturalHeight:m,aspectRatio:p/m}),r.initialImageData=hr({},r.imageData),r.sizing=!1,r.sized=!0,r.build()};if(n.naturalWidth&&!o){a(n.naturalWidth,n.naturalHeight);return}var s=document.createElement("img"),l=document.body||document.documentElement;this.sizingImage=s,s.onload=function(){a(s.width,s.height),o||l.removeChild(s)},s.src=n.src,o||(s.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",l.appendChild(s))}},{key:"stop",value:function(){var r=this.image;r.onload=null,r.onerror=null,r.parentNode.removeChild(r),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var r=this.element,n=this.options,o=this.image,a=r.parentNode,s=document.createElement("div");s.innerHTML=Jet;var l=s.querySelector(".".concat(ur,"-container")),d=l.querySelector(".".concat(ur,"-canvas")),p=l.querySelector(".".concat(ur,"-drag-box")),m=l.querySelector(".".concat(ur,"-crop-box")),u=m.querySelector(".".concat(ur,"-face"));this.container=a,this.cropper=l,this.canvas=d,this.dragBox=p,this.cropBox=m,this.viewBox=l.querySelector(".".concat(ur,"-view-box")),this.face=u,d.appendChild(o),Wr(r,Nn),a.insertBefore(l,r.nextSibling),ha(o,y6),this.initPreview(),this.bind(),n.initialAspectRatio=Math.max(0,n.initialAspectRatio)||NaN,n.aspectRatio=Math.max(0,n.aspectRatio)||NaN,n.viewMode=Math.max(0,Math.min(3,Math.round(n.viewMode)))||0,Wr(m,Nn),n.guides||Wr(m.getElementsByClassName("".concat(ur,"-dashed")),Nn),n.center||Wr(m.getElementsByClassName("".concat(ur,"-center")),Nn),n.background&&Wr(l,"".concat(ur,"-bg")),n.highlight||Wr(u,Fet),n.cropBoxMovable&&(Wr(u,Yb),ju(u,Ru,Kw)),n.cropBoxResizable||(Wr(m.getElementsByClassName("".concat(ur,"-line")),Nn),Wr(m.getElementsByClassName("".concat(ur,"-point")),Nn)),this.render(),this.ready=!0,this.setDragMode(n.dragMode),n.autoCrop&&this.crop(),this.setData(n.data),An(n.ready)&&fo(r,k6,n.ready,{once:!0}),uc(r,k6)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var r=this.cropper.parentNode;r&&r.removeChild(this.cropper),ha(this.element,Nn)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=btt,t}},{key:"setDefaults",value:function(r){hr(E6,rc(r)&&r)}}])})();hr(bD.prototype,ftt,mtt,gtt,_tt,vtt,ytt);var gi=function(){return gi=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},gi.apply(this,arguments)};function R1(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}var wtt=["aspectRatio","autoCrop","autoCropArea","background","center","checkCrossOrigin","checkOrientation","cropBoxMovable","cropBoxResizable","data","dragMode","guides","highlight","initialAspectRatio","minCanvasHeight","minCanvasWidth","minContainerHeight","minContainerWidth","minCropBoxHeight","minCropBoxWidth","modal","movable","preview","responsive","restore","rotatable","scalable","toggleDragModeOnDblclick","viewMode","wheelZoomRatio","zoomOnTouch","zoomOnWheel","zoomable","cropstart","cropmove","cropend","crop","zoom","ready"],Stt={opacity:0,maxWidth:"100%"};f.forwardRef((function(t,e){var r=R1(t,[]),n=r.dragMode,o=n===void 0?"crop":n,a=r.src,s=r.style,l=r.className,d=r.crossOrigin,p=r.scaleX,m=r.scaleY,u=r.enable,g=r.zoomTo,_=r.rotateTo,b=r.alt,w=b===void 0?"picture":b,x=r.ready,C=r.onInitialized,A=R1(r,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),O={scaleY:m,scaleX:p,enable:u,zoomTo:g,rotateTo:_},I=(function(){for(var E=[],M=0;M<arguments.length;M++)E[M]=arguments[M];var j=T.useRef(null);return f.useEffect((function(){E.forEach((function(z){z&&(typeof z=="function"?z(j.current):z.current=j.current)}))}),[E]),j})(e,T.useRef(null));T.useEffect((function(){var E;!((E=I.current)===null||E===void 0)&&E.cropper&&typeof g=="number"&&I.current.cropper.zoomTo(g)}),[r.zoomTo]),T.useEffect((function(){var E;!((E=I.current)===null||E===void 0)&&E.cropper&&a!==void 0&&I.current.cropper.reset().clear().replace(a)}),[a]),T.useEffect((function(){if(I.current!==null){var E=new bD(I.current,gi(gi({dragMode:o},A),{ready:function(M){M.currentTarget!==null&&(function(j,z){z===void 0&&(z={});var $=z.enable,L=$===void 0||$,W=z.scaleX,U=W===void 0?1:W,H=z.scaleY,B=H===void 0?1:H,K=z.zoomTo,oe=K===void 0?0:K,Z=z.rotateTo;L?j.enable():j.disable(),j.scaleX(U),j.scaleY(B),Z!==void 0&&j.rotateTo(Z),oe>0&&j.zoomTo(oe)})(M.currentTarget.cropper,O),x&&x(M)}}));C&&C(E)}return function(){var M,j;(j=(M=I.current)===null||M===void 0?void 0:M.cropper)===null||j===void 0||j.destroy()}}),[I]);var N=(function(E){return wtt.reduce((function(M,j){var z=M,$=j;return z[$],R1(z,[typeof $=="symbol"?$:$+""])}),E)})(gi(gi({},A),{crossOrigin:d,src:a,alt:w}));return f.createElement("div",{style:s,className:l},f.createElement("img",gi({},N,{style:Stt,ref:I})))}));const _s={mainDiv:{width:"100%",height:"100%",overflow:"auto"},formControl:{margin:0,minWidth:120},formControlMarginRight:{marginRight:5},formControlPaddingTop:{paddingTop:6.2}},xtt={once:"once"},ln={seconds:"seconds",minutes:"minutes"},I6=["ra_Sunday","ra_Monday","ra_Tuesday","ra_Wednesday","ra_Thursday","ra_Friday","ra_Saturday","ra_Sunday"];function ia(t){return t<10?`0${t}`:`${t}`}const ktt={mode:"interval",interval:{period:1,unit:ln.minutes}};function uf(t){if(t==="*")return[0,1,2,3,4,5,6];const e=t.split(","),r=[];return e.forEach(n=>{const o=n.split("-");if(o.length===2){const a=parseInt(o[0],10),s=parseInt(o[1],10);for(let l=a;l<=s;l++)r.includes(l===7?0:l)||r.push(l===7?0:l)}else{n==="7"&&(n="0");const a=parseInt(n,10);r.includes(a)||r.push(a)}}),r.sort(),r}function wD(t,e){t=t.replace(/['"]/g,"").trim();const r=t.split(" ");let n,o=null;return r.length===6?n={seconds:r[0]||"*",minutes:r[1]||"*",hours:r[2]||"*",date:r[3]||"*",months:r[4]||"*",dow:r[5]||"*"}:n={seconds:null,minutes:r[0]||"*",hours:r[1]||"*",date:r[2]||"*",months:r[3]||"*",dow:r[4]||"*"},n.seconds===null&&n.minutes==="*"&&n.hours==="*"&&n.date==="*"&&n.months==="*"&&(n.dow==="*"||e)&&(o={mode:"interval",interval:{period:1,unit:ln.minutes}}),n.seconds==="*"&&n.minutes==="*"&&n.hours==="*"&&n.date==="*"&&n.months==="*"&&(n.dow==="*"||e)?o={mode:"interval",interval:{period:1,unit:ln.seconds}}:n.seconds===null&&n.minutes.includes("/")&&n.hours==="*"&&n.date==="*"&&n.months==="*"&&(n.dow==="*"||e)?o={mode:"interval",interval:{period:parseInt(n.minutes.split("/")[1],10),unit:ln.minutes}}:n.seconds!==null&&n.seconds.includes("/")&&n.minutes==="*"&&n.hours==="*"&&n.date==="*"&&n.months==="*"&&(n.dow==="*"||e)?o={mode:"interval",interval:{period:parseInt(n.seconds.split("/")[1],10),unit:ln.seconds}}:n.seconds!==null&&n.seconds.includes("/")&&n.minutes==="*"&&n.hours.includes("-")&&n.date==="*"&&n.months==="*"&&(n.dow==="*"||e)?o={mode:"intervalBetween",intervalBetween:{period:parseInt(n.seconds.split("/")[1],10),unit:ln.seconds,timeFrom:parseInt(n.hours.split("-")[0],10),timeTo:parseInt(n.hours.split("-")[1],10),weekdays:uf(n.dow)}}:n.seconds===null&&n.minutes.includes("/")&&n.hours.includes("-")&&n.date==="*"&&n.months==="*"&&(n.dow==="*"||e)?o={mode:"intervalBetween",intervalBetween:{period:parseInt(n.minutes.split("/")[1],10),unit:ln.minutes,timeFrom:parseInt(n.hours.split("-")[0],10),timeTo:parseInt(n.hours.split("-")[1],10),weekdays:uf(n.dow)}}:n.seconds===null&&parseInt(n.minutes,10).toString()===n.minutes&&parseInt(n.hours,10).toString()===n.hours&&n.date==="*"&&n.months==="*"&&(n.dow==="*"||e)?o={mode:"specific",specific:{time:`${ia(parseInt(n.hours,10))}:${ia(parseInt(n.minutes,10))}`,weekdays:uf(n.dow)}}:n.seconds===null&&parseInt(n.minutes,10).toString()===n.minutes&&parseInt(n.hours,10).toString()===n.hours&&parseInt(n.date,10).toString()===n.date&&parseInt(n.months,10).toString()===n.months&&(n.dow==="*"||e)&&(o={mode:"once",once:{time:`${ia(parseInt(n.hours,10))}:${ia(parseInt(n.minutes,10))}`,date:`${ia(parseInt(n.date,10))}.${ia(parseInt(n.months,10))}`}}),o}class zu extends f.Component{constructor(e){super(e);let r=typeof e.cronExpression=="string"?e.cronExpression.replace(/^["']/,"").replace(/["']\n?$/,""):"";r[0]==="{"&&(r="");const n=wD(r||"* * * * *",!0)||ktt;this.state={extended:!1,cron:zu.state2cron(n),mode:"interval",once:{time:"00:00",date:""},interval:{period:1,unit:ln.minutes},intervalBetween:{period:1,unit:ln.minutes,timeFrom:0,timeTo:23,weekdays:[0,1,2,3,4,5,6]},specific:{time:"00:00",weekdays:[0,1,2,3,4,5,6]}},Object.assign(this.state,n),this.state.cron!==e.cronExpression&&setTimeout(()=>e.onChange&&e.onChange(this.state.cron),100)}static periodArray2text(e,r=7){if(r=r||7,e.length===r)return"*";const n=[];let o=null,a=null;if(!e.length)return"_";for(let s=0;s<e.length;s++)o===null?(o=e[s],a=e[s]):(e[s-1]+1===e[s]||(o!==a?n.push(`${o}-${a}`):n.push(o),o=e[s]),a=e[s]);return o!==a?n.push(`${o}-${a}`):n.push(o),n.join(",")}static text2weekdays(e){return uf(e)}static state2cron(e){let r="* * * * *";if(e.mode==="interval"){const n=e.interval||{period:1,unit:ln.minutes};if(n.period!==void 0&&n.period>60&&(n.period=60),n.period!==void 0&&n.period<1&&(n.period=1),n.minutes!==void 0&&n.minutes!==null&&n.minutes>60&&(n.minutes=60),n.minutes!==void 0&&n.minutes!==null&&n.minutes<1&&(n.minutes=1),n.hours!==void 0&&n.hours!==null&&n.hours>24&&(n.hours=24),n.hours!==void 0&&n.hours!==null&&n.hours<1&&(n.hours=1),e.extended)r=`${n.minutes!==void 0&&n.minutes!==null&&n.minutes>1?`*/${n.minutes}`:"*"} ${n.hours!==void 0&&n.hours!==null&&n.hours>1?`*/${n.hours}`:"*"} * * *`;else switch(n.unit){case ln.seconds:r=`${n.period>1?`*/${n.period}`:"*"} * * * * *`;break;case ln.minutes:r=`${n.period>1?`*/${n.period}`:"*"} * * * *`;break}}else if(e.mode==="intervalBetween"){const n=e.intervalBetween||{period:1,unit:ln.minutes,timeFrom:0,timeTo:24,weekdays:[0,1,2,3,4,5,6]};let o;switch(n.timeFrom=n.timeFrom||0,n.timeTo=n.timeTo===void 0?24:n.timeTo,n.timeFrom!==0&&n.timeTo===24&&(n.timeTo=23),n.timeFrom===0&&n.timeTo===24?o="*":o=n.timeFrom!==n.timeTo?`${n.timeFrom}-${n.timeTo}`:"*",n.period>60&&(n.period=60),n.period<1&&(n.period=1),n.unit=n.unit||ln.minutes,n.unit){case ln.seconds:r=`${n.period>1?`*/${n.period}`:"*"} * ${o} * * ${this.periodArray2text(n.weekdays)}`;break;case ln.minutes:r=`${n.period>1?`*/${n.period}`:"*"} ${o} * * ${this.periodArray2text(n.weekdays)}`;break}}else if(e.mode==="specific"){const n=e.specific||{time:"00:00",weekdays:[0,1,2,3,4,5,6]},o=(n.time||"00:00").split(":");let a=parseInt(o[1],10)||0;a>59&&(a=59),a<0&&(a=0);let s=parseInt(o[0],10)||0;s>23&&(s=59),s<0&&(s=0),r=`${a} ${s} * * ${this.periodArray2text(n.weekdays||[])}`}else if(e.mode==="once"){const n=e.once||{time:"00:00",date:""};n.date||(n.date=`${new Date().getDate()}.${ia(new Date().getMonth()+1)}`);const o=(n.time||"00:00").split(":"),a=n.date.split(".");let s=parseInt(o[1],10)||0;s>59&&(s=59),s<0&&(s=0);let l=parseInt(o[0],10)||0;l>23&&(l=59),l<0&&(l=0);let d=parseInt(a[0],10)||1;d>31&&(d=31),d<1&&(l=1);let p=parseInt(a[1],10)||1;p>12&&(p=12),p<1&&(p=1),r=`${s} ${l} ${d} ${p} *`}return r}recalcCron(){this.onChange(zu.state2cron(this.state))}getControlsWeekdaysElements(e){const r=e==="intervalBetween"?this.state.intervalBetween:this.state.specific;return f.createElement("div",{key:"weekdays",style:{paddingLeft:8,width:"calc(100% - 8px)",maxWidth:600}},f.createElement("h5",null,D.t("ra_On weekdays")),[1,2,3,4,5,6,0].map(n=>f.createElement(at,{key:I6[n],control:f.createElement(Ut,{checked:r.weekdays.includes(n),onChange:o=>{const a=JSON.parse(JSON.stringify(this.state[e])),s=a.weekdays.indexOf(n);o.target.checked?s===-1&&a.weekdays.push(n):s!==-1&&a.weekdays.splice(s,1),a.weekdays.sort(),e==="intervalBetween"?this.setState({intervalBetween:a},()=>this.recalcCron()):this.setState({specific:a},()=>this.recalcCron())},value:n.toString()}),label:D.t(I6[n])})))}getControlsPeriodElements(e){const r=e==="interval"?this.state.interval:this.state.intervalBetween;return this.state.extended?f.createElement("div",{key:"period",style:{paddingLeft:8,display:"inline-block"}},f.createElement("h5",{style:{marginBottom:5}},D.t("sc_period")),f.createElement(Et,{variant:"standard",style:{marginTop:0,marginBottom:0,verticalAlign:"bottom"},key:"value",label:D.t("sc_minutes"),value:r.minutes,onChange:n=>{const o=JSON.parse(JSON.stringify(this.state[e]));o.minutes=parseInt(n.target.value,10),o.minutes<1&&(o.minutes=1),e==="interval"?this.setState({interval:o},()=>this.recalcCron()):this.setState({intervalBetween:o},()=>this.recalcCron())},slotProps:{htmlInput:{min:1,max:60},inputLabel:{shrink:!0}},type:"number",margin:"normal"}),f.createElement(Et,{variant:"standard",style:{marginTop:0,marginBottom:0,verticalAlign:"bottom"},key:"value",label:D.t("sc_hours"),value:r.hours,onChange:n=>{const o=JSON.parse(JSON.stringify(this.state[e]));o.hours=parseInt(n.target.value,10),o.hours<1&&(o.hours=1),e==="interval"?this.setState({interval:o},()=>this.recalcCron()):this.setState({intervalBetween:o},()=>this.recalcCron())},slotProps:{htmlInput:{min:1,max:24},inputLabel:{shrink:!0}},type:"number",margin:"normal"})):f.createElement("div",{key:"period",style:{paddingLeft:8,display:"inline-block"}},f.createElement("h5",{style:{marginBottom:5}},D.t("sc_period")),f.createElement(Et,{variant:"standard",style:{marginTop:0,marginBottom:0,verticalAlign:"bottom"},key:"value",label:D.t("sc_every"),value:r.period,onChange:n=>{const o=JSON.parse(JSON.stringify(this.state[e]));o.period=parseInt(n.target.value,10),o.period<1&&(o.period=1),e==="interval"?this.setState({interval:o},()=>this.recalcCron()):this.setState({intervalBetween:o},()=>this.recalcCron())},slotProps:{htmlInput:{min:1,max:60},inputLabel:{shrink:!0}},type:"number",margin:"normal"}),f.createElement(Nr,{variant:"standard",style:{verticalAlign:"bottom"},value:r.unit,onChange:n=>{const o=JSON.parse(JSON.stringify(this.state[e]));o.unit=n.target.value,e==="interval"?this.setState({interval:o},()=>this.recalcCron()):this.setState({intervalBetween:o},()=>this.recalcCron())}},f.createElement(pt,{value:"seconds"},D.t("sc_seconds")),")",f.createElement(pt,{value:"minutes"},D.t("sc_minutes")),")"))}getControlsTime(e){const r=e==="once"?this.state.once:this.state.specific;return f.createElement(gn,{variant:"standard",sx:{..._s.formControl,"&.MuiFormControl-root":_s.formControlMarginRight}},f.createElement(Et,{variant:"standard",key:"at",label:D.t("sc_time"),value:r.time,type:"time",sx:n=>({'& input[type="time"]::-webkit-calendar-picker-indicator':{filter:n.palette.mode==="dark"?"invert(80%)":void 0}}),onChange:n=>{const o=JSON.parse(JSON.stringify(this.state[e]));o.time=n.target.value,e==="once"?this.setState({once:o},()=>this.recalcCron()):this.setState({specific:o},()=>this.recalcCron())},slotProps:{inputLabel:{shrink:!0}},margin:"normal"}))}getControlsDate(){const e=this.state.once;if(!e.date){const r=new Date;e.date=`${r.getDate()}.${ia(r.getMonth()+1)}`}return f.createElement(gn,{variant:"standard",style:_s.formControl},f.createElement(Et,{variant:"standard",key:"date",label:D.t("sc_date"),value:e.date,type:"text",slotProps:{htmlInput:{style:_s.formControlPaddingTop},inputLabel:{shrink:!0}},onChange:r=>{const n=JSON.parse(JSON.stringify(this.state.once));n.date=r.target.value,this.setState({once:n},()=>this.recalcCron())},margin:"normal"}))}getOnceElements(){return f.createElement("div",{style:{marginLeft:8}},this.getControlsTime("once"),this.getControlsDate())}getIntervalElements(){return this.getControlsPeriodElements("interval")}getIntervalBetweenElements(){const e=this.state.intervalBetween;return[this.getControlsPeriodElements("intervalBetween"),f.createElement("div",{key:"between",style:{paddingLeft:8,display:"inline-block",verticalAlign:"top"}},f.createElement("h5",{style:{marginBottom:5}},D.t("sc_hours")),f.createElement(gn,{variant:"standard",style:_s.formControl},f.createElement(nf,{shrink:!0,htmlFor:"age-label-placeholder"},D.t("sc_from")),f.createElement(Nr,{variant:"standard",style:{width:100},value:e.timeFrom,onChange:r=>{const n=JSON.parse(JSON.stringify(this.state.intervalBetween));n.timeFrom=parseInt(r.target.value,10),n.timeTo===24&&(n.timeTo=23),this.setState({intervalBetween:n},()=>this.recalcCron())}},[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23].map(r=>f.createElement(pt,{key:`B_${r}`,value:r},`${ia(r)}:00`)))),f.createElement(gn,{variant:"standard",style:_s.formControl},f.createElement(nf,{shrink:!0,htmlFor:"age-label-placeholder"},D.t("sc_to")),f.createElement(Nr,{variant:"standard",style:{width:100},value:e.timeTo,onChange:r=>{const n=JSON.parse(JSON.stringify(this.state.intervalBetween));n.timeTo=parseInt(r.target.value,10),this.setState({intervalBetween:n},()=>this.recalcCron())}},[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23].map(r=>f.createElement(pt,{key:`A_${r}`,value:r},`${ia(r)}:00`)),!e.timeFrom&&f.createElement(pt,{value:24},"00:00")))),this.getControlsWeekdaysElements("intervalBetween")]}getSpecificTimeElements(){return[f.createElement("div",{key:"time",style:{marginLeft:8}},this.getControlsTime("specific")),this.getControlsWeekdaysElements("specific")]}onModeChange(e){e!==this.state.mode&&this.setState({mode:e},()=>this.recalcCron())}onChange(e){e!==this.state.cron&&(this.setState({cron:e}),this.props.onChange&&this.props.onChange(e))}render(){return f.createElement("div",{style:_s.mainDiv},f.createElement("div",{style:{paddingLeft:8,width:"calc(100% - 8px)"}},f.createElement(Et,{variant:"standard",style:{width:"100%"},value:this.state.cron,disabled:!0,error:this.state.cron.includes("_")})),f.createElement("div",{style:{paddingLeft:8,width:"calc(100% - 8px)",height:60}},this.state.cron.includes("_")?D.t("sc_invalid_cron"):k7(this.state.cron,this.props.language||"en")),f.createElement("div",null,f.createElement(gn,{variant:"standard",style:{..._s.formControl,marginLeft:8,marginTop:8}},f.createElement(nf,null,D.t("ra_Repeat")),f.createElement(Nr,{variant:"standard",value:this.state.mode,onChange:e=>this.onModeChange(e.target.value),inputProps:{name:"mode",id:"mode"}},f.createElement(pt,{value:"once"},D.t("sc_once")),f.createElement(pt,{value:"interval"},D.t("sc_interval")),f.createElement(pt,{value:"intervalBetween"},D.t("sc_intervalBetween")),f.createElement(pt,{value:"specific"},D.t("sc_specific"))))),this.state.mode===xtt.once&&this.getOnceElements(),this.state.mode==="interval"&&this.getIntervalElements(),this.state.mode==="intervalBetween"&&this.getIntervalBetweenElements(),this.state.mode==="specific"&&this.getSpecificTimeElements())}}const Ctt={dialogPaper:{height:"calc(100% - 96px)"}};class pwt extends f.Component{constructor(e){super(e);let r;this.props.cron&&typeof this.props.cron=="string"&&this.props.cron.replace(/^["']/,"")[0]!=="{"?r=this.props.cron.replace(/['"]/g,"").trim():(r=this.props.cron||"{}",typeof r=="string"&&(r=r.replace(/^["']/,"").replace(/["']\n?$/,""))),this.state={showWarning:"",cron:r}}handleCancel(){this.props.onClose()}handleOk(e){if(!e){const r=Cs.cron2state(this.state.cron);if(r.seconds==="*"||r.seconds==="*/1"){this.setState({showWarning:"everySecond"});return}if(r.minutes==="*"||r.minutes==="*/1"){this.setState({showWarning:"everyMinute"});return}}this.props.onOk(this.state.cron),this.props.onClose()}renderWarningDialog(){return this.state.showWarning?f.createElement(S9,{title:D.t("ra_Please confirm"),text:D.t(this.state.showWarning==="everySecond"?"ra_The schedule will be executed every second. Are you sure?":"ra_The schedule will be executed every minute. Are you sure?"),onClose:e=>this.setState({showWarning:""},()=>{e&&this.handleOk(!0)})}):null}handleClear(){this.props.onOk(!1),this.props.onClose()}render(){return f.createElement(qt,{onClose:()=>{},maxWidth:"md",fullWidth:!0,sx:{"& .MuiDialog-paper":Ctt.dialogPaper},open:!0,"aria-labelledby":"cron-dialog-title"},this.renderWarningDialog(),f.createElement(Gt,{id:"cron-dialog-title"},this.props.title||D.t("ra_Define schedule...")),f.createElement(er,{style:{height:"100%",overflow:"hidden"}},f.createElement(Cs,{cronExpression:this.state.cron,onChange:e=>this.setState({cron:e}),language:D.getLanguage()})),f.createElement(Qt,null,!!this.props.clearButton&&f.createElement(Ue,{color:"grey",variant:"contained",onClick:()=>this.handleClear(),startIcon:f.createElement(Ds,null)},this.props.clear||D.t("ra_Clear")),f.createElement(Ue,{variant:"contained",onClick:()=>this.handleOk(),color:"primary",startIcon:f.createElement(Kr,null)},this.props.ok||D.t("ra_Ok")),f.createElement(Ue,{color:"grey",variant:"contained",onClick:()=>this.handleCancel(),startIcon:f.createElement(Zu,null)},this.props.cancel||D.t("ra_Cancel"))))}}const $tt={dialogPaper:{height:"calc(100% - 96px)"}};class hwt extends f.Component{constructor(e){super(e);let r;this.props.cron&&typeof this.props.cron=="string"&&this.props.cron.replace(/^["']/,"")[0]!=="{"?r=this.props.cron.replace(/['"]/g,"").trim():(r=this.props.cron||"{}",typeof r=="string"&&(r=r.replace(/^["']/,"").replace(/["']\n?$/,""))),this.state={cron:r,mode:this.props.simple?"simple":this.props.complex?"complex":(typeof r=="object"||r[0]==="{")&&!this.props.noWizard?"wizard":wD(this.props.cron||"* * * * *")?"simple":"complex"}}handleCancel(){this.props.onClose()}handleOk(){this.props.onOk(this.state.cron),this.props.onClose()}setMode(e){this.setState({mode:e})}render(){return f.createElement(qt,{onClose:()=>{},maxWidth:"md",fullWidth:!0,sx:{"& .MuiDialog-paper":$tt.dialogPaper},open:!0,"aria-labelledby":"cron-dialog-title"},f.createElement(Gt,{id:"cron-dialog-title"},this.props.title||D.t("ra_Define schedule...")),f.createElement(er,{style:{height:"100%",overflow:"hidden"}},this.props.simple&&this.props.complex||!this.props.simple&&!this.props.complex?f.createElement("div",null,!this.props.simple&&!this.props.complex&&!this.props.noWizard&&f.createElement(f.Fragment,null,f.createElement(rr,{key:"wizard",checked:this.state.mode==="wizard",onChange:()=>this.setMode("wizard")}),f.createElement("label",{onClick:()=>this.setMode("wizard"),style:this.state.mode!=="wizard"?{color:"lightgrey"}:{}},D.t("sc_wizard"))),(!this.props.simple&&!this.props.complex||this.props.simple)&&f.createElement(f.Fragment,null,f.createElement(rr,{key:"simple",checked:this.state.mode==="simple",onChange:()=>this.setMode("simple")}),f.createElement("label",{onClick:()=>this.setMode("simple"),style:this.state.mode!=="simple"?{color:"lightgrey"}:{}},D.t("sc_simple"))),(!this.props.simple&&!this.props.complex||this.props.complex)&&f.createElement(f.Fragment,null,f.createElement(rr,{key:"complex",checked:this.state.mode==="complex",onChange:()=>this.setMode("complex")}),f.createElement("label",{onClick:()=>this.setMode("complex"),style:this.state.mode!=="complex"?{color:"lightgrey"}:{}},D.t("sc_cron")))):null,this.state.mode==="simple"&&f.createElement(zu,{cronExpression:this.state.cron,onChange:e=>this.setState({cron:e}),language:D.getLanguage()}),this.state.mode==="wizard"&&f.createElement(Vr,{theme:this.props.theme,schedule:this.state.cron,onChange:e=>this.setState({cron:e})}),this.state.mode==="complex"&&f.createElement(Cs,{cronExpression:this.state.cron,onChange:e=>this.setState({cron:e}),language:D.getLanguage()})),f.createElement(Qt,null,f.createElement(Ue,{variant:"contained",onClick:()=>this.handleOk(),color:"primary",startIcon:f.createElement(Kr,null)},this.props.ok||D.t("ra_Ok")),f.createElement(Ue,{variant:"contained",onClick:()=>this.handleCancel(),color:"grey",startIcon:f.createElement(Zu,null)},this.props.cancel||D.t("ra_Cancel"))))}}class np extends T.Component{handleOk(){this.props.onClose&&this.props.onClose()}render(){return f.createElement(qt,{open:!0,maxWidth:"sm",fullWidth:this.props.fullWidth!==void 0?this.props.fullWidth:!0,onClose:()=>this.handleOk(),"aria-labelledby":"ar_dialog_message_title","aria-describedby":"ar_dialog_message_description"},f.createElement(Gt,{id:"ar_dialog_message_title"},this.props.title||D.t("ra_Message")),f.createElement(er,null,f.createElement(Ra,{id:"ar_dialog_message_description"},f.createElement("span",{style:{marginRight:this.props.icon?8:0}},this.props.icon||null),this.props.text)),f.createElement(Qt,null,f.createElement(Ue,{id:"ar_dialog_message_ok",variant:"contained",onClick:()=>this.handleOk(),color:"primary",autoFocus:!0,startIcon:f.createElement(Vt,null)},this.props.ok||D.t("ra_Close"))))}}const di={headerID:{fontWeight:"bold",fontStyle:"italic"},dialog:{height:"95%"},dialogMobile:{padding:"4px",width:"100%",maxWidth:"100%",maxHeight:"calc(100% - 16px)",height:"100%"},content:{height:"100%",overflow:"hidden"},contentMobile:{padding:"8px 4px"},titleRoot:{whiteSpace:"nowrap",width:"calc(100% - 72px)",overflow:"hidden",display:"inline-block",textOverflow:"ellipsis"}};class fwt extends f.Component{dialogName;filters;constructor(e){super(e),this.dialogName=this.props.dialogName||"default",this.dialogName=`SelectFile.${this.dialogName}`;const r=(window._localStorage||window.localStorage).getItem(this.dialogName)||"{}";try{this.filters=JSON.parse(r)}catch{this.filters={}}e.filters&&(this.filters={...this.filters,...e.filters});let n=this.props.selected||[];typeof n!="object"?n=[n]:n=[...n],n=n.filter(o=>o),this.state={selected:n}}handleCancel(){this.props.onClose()}handleOk(){this.props.onOk(this.props.multiSelect||!Array.isArray(this.state.selected)?this.state.selected:this.state.selected[0]||""),this.props.onClose()}render(){let e;return this.state.selected.length?!Array.isArray(this.state.selected)||this.state.selected.length===1?e=[f.createElement("span",{key:"selected"},D.t("ra_Selected")," "),f.createElement("span",{key:"id",style:di.headerID},this.state.selected)]:e=[f.createElement("span",{key:"selected"},D.t("ra_Selected")," "),f.createElement("span",{key:"id",style:di.headerID},D.t("%s items",this.state.selected.length))]:e=this.props.title||D.t("ra_Please select file..."),f.createElement(qt,{onClose:()=>{},maxWidth:!1,style:{zIndex:this.props.zIndex||void 0},sx:{"& .MuiDialog-paper":{...di.dialog,...di.dialogMobile}},fullWidth:!0,open:!0,"aria-labelledby":"ar_dialog_selectfile_title"},f.createElement(Gt,{id:"ar_dialog_selectfile_title",sx:{"&.MuiDialogTitle-root":di.titleRoot}},e),f.createElement(er,{style:{...di.content,...di.contentMobile}},f.createElement(sQe,{ready:!0,imagePrefix:this.props.imagePrefix||this.props.prefix||"../",allowUpload:!!this.props.allowUpload,allowDownload:this.props.allowDownload!==!1,allowCreateFolder:!!this.props.allowCreateFolder,allowDelete:!!this.props.allowDelete,allowView:this.props.allowView!==!1,showViewTypeButton:this.props.showViewTypeButton!==!1,showToolbar:this.props.showToolbar!==!1,limitPath:this.props.limitPath,filterFiles:this.props.filterFiles,filterByType:this.props.filterByType,selected:this.props.selected,restrictToFolder:this.props.restrictToFolder,allowNonRestricted:this.props.allowNonRestricted,onSelect:(r,n,o)=>{this.setState({selected:Array.isArray(r)?r:[r]},()=>n&&(!this.props.selectOnlyFolders||o)&&this.handleOk())},t:this.props.t||D.t,lang:this.props.lang||D.getLanguage(),socket:this.props.socket,themeType:this.props.themeType,themeName:this.props.themeName,theme:this.props.theme,showExpertButton:this.props.showExpertButton,expertMode:this.props.expertMode,showTypeSelector:this.props.showTypeSelector})),f.createElement(Qt,null,f.createElement(Ue,{variant:"contained",onClick:()=>this.handleOk(),startIcon:f.createElement(Kr,null),disabled:!this.state.selected.length,color:"primary"},this.props.ok||D.t("ra_Ok")),f.createElement(Ue,{color:"grey",variant:"contained",onClick:()=>this.handleCancel(),startIcon:f.createElement(Zu,null)},this.props.cancel||D.t("ra_Cancel"))))}}const Ttt={dialogPaper:{height:"calc(100% - 96px)"}};class mwt extends f.Component{constructor(e){super(e);let r;this.props.cron&&typeof this.props.cron=="string"&&this.props.cron.replace(/^["']/,"")[0]!=="{"?r=this.props.cron.replace(/['"]/g,"").trim():(r=this.props.cron||"{}",typeof r=="string"&&(r=r.replace(/^["']/,"").replace(/["']\n?$/,""))),this.state={cron:r}}handleCancel(){this.props.onClose()}handleOk(){this.props.onOk(this.state.cron),this.props.onClose()}render(){return f.createElement(qt,{onClose:()=>{},maxWidth:"md",fullWidth:!0,sx:{"& .MuiDialog-paper":Ttt.dialogPaper},open:!0,"aria-labelledby":"cron-dialog-title"},f.createElement(Gt,{id:"cron-dialog-title"},this.props.title||D.t("ra_Define CRON...")),f.createElement(er,{style:{height:"100%",overflow:"hidden"}},f.createElement(zu,{cronExpression:this.state.cron,onChange:e=>this.setState({cron:e}),language:D.getLanguage()})),f.createElement(Qt,null,f.createElement(Ue,{variant:"contained",disabled:!this.state.cron||this.state.cron.includes("_"),onClick:()=>this.handleOk(),color:"primary",startIcon:f.createElement(Kr,null)},this.props.ok||D.t("ra_Ok")),f.createElement(Ue,{variant:"contained",onClick:()=>this.handleCancel(),color:"grey",startIcon:f.createElement(Zu,null)},this.props.cancel||D.t("ra_Cancel"))))}}const hn={tab:{width:"100%",minHeight:"100%"},input:{minWidth:300},button:{marginRight:20,marginBottom:40},card:{maxWidth:345,textAlign:"center"},media:{height:180},column:{display:"inline-block",verticalAlign:"top",marginRight:20},columnLogo:{width:350,marginRight:0},columnSettings:{width:"calc(100% - 370px)"},hintUnsaved:{fontSize:12,color:"red",fontStyle:"italic"}};let Ett=class SD extends T.Component{constructor(e){super(e),this.state={inAction:!1,toast:"",isInstanceAlive:!1},this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`).then(r=>this.setState({isInstanceAlive:!!r?.val}))}componentDidMount(){this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAliveChanged)}componentWillUnmount(){this.props.socket.unsubscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAliveChanged)}onAliveChanged=(e,r)=>{e===`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`&&this.setState({isInstanceAlive:!!r?.val})};static checkPassword(e){return e=(e||"").toString(),e.length<8||!e.match(/[a-z]/)||!e.match(/[A-Z]/)||!e.match(/\d/)?D.t("invalid_password_warning"):!1}renderInput(e,r,n,o){const a=r==="pass"&&SD.checkPassword(this.props.native[r]);return y.jsx(Et,{variant:"standard",label:D.t(e),error:!!a,autoComplete:o||"",style:hn.input,value:this.props.native[r],type:n||"text",helperText:a||"",onChange:s=>this.props.onChange(r,s.target.value),margin:"normal"})}renderCard(){return y.jsxs($L,{style:hn.card,children:[y.jsxs(AL,{children:[y.jsx(VL,{style:hn.media,image:"alexalogo.png",title:"Alexa logo"}),y.jsx(LL,{children:ee.renderTextWithA(D.t("amazon link"))})]}),y.jsxs(RL,{style:{textAlign:"center"},children:[y.jsx(Ue,{variant:"outlined",size:"small",color:"primary",style:{textAlign:"center"},onClick:()=>{window.open("https://alexa.amazon.de/spa/index.html#skills/dp/B07L66BFF9/reviews","_blank")?.focus()},children:D.t("Review")}),this.props.native.amazonAlexa?y.jsx(Ue,{color:"grey",title:"Debug",onClick:()=>this.onDebug(),style:{opacity:this.state.debugVisible?1:0},onMouseEnter:()=>this.setState({debugVisible:!0}),onMouseLeave:()=>this.setState({debugVisible:!1}),children:D.t("Debug")}):null]})]})}onDebug(){this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"debug",null).then(e=>{const r=new Blob([JSON.stringify(e,null,2)],{type:"application/json"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(r,"debug.json");else{const n=document.createElement("a"),o=URL.createObjectURL(r);n.href=o,n.download="debug.json",document.body.appendChild(n),n.click(),setTimeout(()=>{document.body.removeChild(n),window.URL.revokeObjectURL(o)},0)}})}async resetCerts(e){this.setState({inAction:!0});const r={inAction:!1};try{const n=`iot.${this.props.instance}.certs.`;await this.props.socket.setState(`${n}private`,{val:"",ack:!0}),await this.props.socket.setState(`${n}id`,{val:"",ack:!0}),await this.props.socket.setState(`${n}public`,{val:"",ack:!0}),await this.props.socket.setState(`${n}certificate`,{val:"",ack:!0}),e&&await this.props.socket.setState(`${n}forceUserCreate`,{val:!0,ack:!0});const o=await this.props.socket.getObject(`system.adapter.iot.${this.props.instance}`);o?.common?.enabled&&await this.props.socket.setObject(o._id,o),r.toast=D.t("Certificates will be updated after start")}catch(n){this.props.onError(n)}this.setState(r)}renderToast(){return this.state.toast?y.jsx($u,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:!0,autoHideDuration:6e3,onClose:()=>this.setState({toast:""}),slotProps:{content:{"aria-describedby":"message-id"}},message:y.jsx("span",{id:"message-id",children:this.state.toast}),action:[y.jsx(Le,{"aria-label":"Close",color:"inherit",style:hn.close,onClick:()=>this.setState({toast:""}),children:y.jsx(U7,{})},"close")]}):null}renderCheckbox(e,r,n){return y.jsx(at,{style:{...hn.controlElement,paddingTop:5,...n},control:y.jsx(Ut,{checked:!!this.props.native[r],onChange:()=>this.props.onChange(r,!this.props.native[r]),color:"primary"}),label:D.t(e)},r)}render(){return y.jsxs("form",{style:hn.tab,children:[y.jsx(Gw,{instance:this.props.instance,common:this.props.common,native:this.props.native,onError:e=>window.alert(e),onLoad:this.props.onLoad}),y.jsxs("div",{style:{...hn.column,...hn.columnSettings},children:[this.renderInput("ioBroker.pro Login","login","text","username"),y.jsx("br",{}),this.renderInput("ioBroker.pro Password","pass","password","current-password"),y.jsx("br",{}),this.renderCheckbox("Amazon AlexaV3","amazonAlexaV3"),this.renderCheckbox("Amazon Alexa (deprecated)","amazonAlexa"),this.renderCheckbox("Amazon Alexa Custom","amazonCustom"),y.jsx(at,{style:{...hn.controlElement,marginTop:5},control:y.jsx(Ut,{checked:this.props.native.googleHome,onChange:()=>{const e=!this.props.native.googleHome;this.props.onChange("googleHome",e)},color:"primary"}),label:D.t("Google Home")},"googleHome"),this.renderCheckbox("Yandex Алиса","yandexAlisa"),y.jsx("br",{}),y.jsx("p",{children:D.t("new_certs_tip")}),this.props.changed?y.jsx("div",{style:hn.hintUnsaved,children:D.t("Save settings before pressing this button")}):null,y.jsx(Ue,{variant:"outlined",style:hn.button,disabled:this.props.changed||this.state.inAction||!this.state.isInstanceAlive,title:this.state.isInstanceAlive?"":D.t("Instance must be enabled"),onClick:()=>this.resetCerts(),startIcon:y.jsx(Di,{}),color:"grey",children:D.t("Get new connection certificates")}),y.jsx("p",{children:D.t("new_credentials_tip")}),this.props.changed?y.jsx("div",{style:hn.hintUnsaved,children:D.t("Save settings before pressing this button")}):null,y.jsx(Ue,{variant:"outlined",color:"grey",style:hn.button,disabled:this.props.changed||this.state.inAction||!this.state.isInstanceAlive,title:this.state.isInstanceAlive?"":D.t("Instance must be enabled"),onClick:()=>this.resetCerts(!0),startIcon:y.jsx(Di,{}),children:D.t("Create IoT credentials anew")}),y.jsx("p",{children:ee.renderTextWithA(D.t("forum_tip"))}),y.jsx("p",{style:{fontWeight:"bold"},children:ee.renderTextWithA(D.t("help_tip"))}),y.jsx("p",{style:{fontWeight:"bold",paddingTop:20},children:ee.renderTextWithA(D.t("help_link_tip1"))}),y.jsx("p",{style:{fontWeight:"bold"},children:ee.renderTextWithA(D.t("help_link_tip2"))}),y.jsx("p",{style:{fontWeight:"bold",color:"red"},children:ee.renderTextWithA(D.t("help_link_tip3"))})]}),y.jsx("div",{style:{...hn.column,...hn.columnLogo},children:this.renderCard()}),this.renderToast()]})}};const Io={tab:{display:"flex",flexDirection:"column",gap:8},input:{marginTop:0,minWidth:300,maxWidth:500},controlElement:{marginBottom:5}};class Ott extends T.Component{constructor(e){super(e),this.state={showSelectId:!1,adminInstances:[],webInstances:[]}}componentDidMount(){this.props.socket.getAdapterInstances("admin").then(e=>{const r=e.filter(n=>!n.native.auth).map(n=>({title:`${n.common.name}.${n._id.split(".").pop()}`,value:`${n.common.name}.${n._id.split(".").pop()}`,noTranslation:!0}));return r.unshift({title:"disabled",value:""}),this.props.socket.getAdapterInstances("web").then(n=>{const o=n.filter(a=>!a.native.auth).map(a=>({title:`${a.common.name}.${a._id.split(".").pop()}`,value:`${a.common.name}.${a._id.split(".").pop()}`,noTranslation:!0}));o.unshift({title:"disabled",value:""}),this.setState({adminInstances:r,webInstances:o})})})}renderInput(e,r,n,o,a){return y.jsx(Et,{variant:"standard",label:D.t(e),disabled:o,style:{...Io.input,...Io.controlElement},value:this.props.native[r],type:n||"text",helperText:a?D.t(a):"",onChange:s=>this.props.onChange(r,s.target.value),margin:"normal"})}renderSelect(e,r,n,o){return y.jsxs(gn,{style:{...Io.input,...Io.controlElement,paddingTop:5,paddingRight:8,...o},variant:"standard",children:[y.jsx(Nr,{variant:"standard",value:this.props.native[r]||"_",onChange:a=>this.props.onChange(r,a.target.value==="_"?"":a.target.value),input:y.jsx(Mn,{name:r,id:`${r}-helper`}),children:n.map(a=>y.jsx(pt,{value:a.value||"_",children:a.noTranslation?a.title:D.t(a.title)},`key-${a.value}`))}),y.jsx(Po,{children:D.t(e)})]})}renderCheckbox(e,r,n){return y.jsx(at,{style:{...Io.controlElement,paddingTop:5,...n},control:y.jsx(Ut,{checked:!!this.props.native[r],onChange:()=>this.props.onChange(r,!this.props.native[r]),color:"primary"}),label:D.t(e)},r)}getSelectIdDialog(e){return this.state.showSelectId?y.jsx(Bc,{theme:this.props.theme,imagePrefix:"../..",socket:this.props.socket,selected:this.props.native[e],types:["state"],onClose:()=>this.setState({showSelectId:!1}),onOk:r=>{this.setState({showSelectId:!1}),this.props.onChange(e,r)}},"dialogSelectID2"):null}render(){return y.jsxs("form",{style:Io.tab,children:[this.renderSelect("Language","language",[{title:"default",value:""},{title:"english",value:"en",noTranslation:!0},{title:"Deutsch",value:"de",noTranslation:!0},{title:"русский",value:"ru",noTranslation:!0}]),this.renderCheckbox("Place function in names first","functionFirst"),this.renderInput("Concatenate words with","concatWord"),this.props.native.amazonAlexaV3?y.jsxs(gn,{style:{...Io.input,...Io.controlElement,paddingTop:5,paddingRight:8},variant:"standard",children:[y.jsxs(Nr,{variant:"standard",value:this.props.native.defaultToggle?"true":"false",onChange:e=>this.props.onChange("defaultToggle",e.target.value==="true"),children:[y.jsx(pt,{value:"false",children:D.t("Do not toggle")}),y.jsx(pt,{value:"true",children:D.t("Toggle")})]}),y.jsx(Po,{children:D.t("Default toggle behaviour (Only alexa v3)")})]}):null,this.renderInput("OFF level for switches in %","deviceOffLevel","text",!1,"(Set to 0 if behavior not desired)"),y.jsxs("div",{style:Io.controlElement,children:[this.renderInput("Write response to","responseOID"),y.jsx(Zt,{size:"small",color:"secondary",onClick:()=>this.setState({showSelectId:!0}),"aria-label":"Add",style:{marginLeft:5,marginTop:10},children:y.jsx(Oi,{})})]}),y.jsxs("div",{style:Io.controlElement,children:[this.renderCheckbox("Personal settings (only pro)","noCommon"),y.jsx(Po,{children:ee.renderTextWithA(D.t("help_tip"))})]}),this.renderCheckbox("Debug outputs","debug"),y.jsxs("div",{style:Io.controlElement,children:[this.renderCheckbox("Allow remote access","remote"),this.props.native.remote?this.renderSelect("Admin instance","remoteAdminInstance",this.state.adminInstances,{width:120,minWidth:120}):null,this.props.native.remote?this.renderSelect("Web instance","remoteWebInstance",this.state.webInstances,{width:120,minWidth:120}):null]}),this.getSelectIdDialog("responseOID")]})}}const Yt={tab:{width:"100%",minHeight:"100%"},input:{marginTop:0,minWidth:400},fullSize:{width:"calc(100% - 64px)"},normalSize:{width:"calc(30% - 64px)",marginLeft:10},controlElement:{marginBottom:5},chips:{border:"1px solid #DDD",borderRadius:1,width:"calc(100% - 250px)",display:"inline-block",padding:5,minHeight:32,marginLeft:10,marginTop:20},chip:{marginRight:5}};class Dtt extends T.Component{constructor(e){super(e),this.state={running:!1,toast:"",showSelectId:!1,text2commandList:[],nightscoutList:[],addValue:"",isInstanceAlive:!1},this.props.socket.getAdapterInstances("text2command").then(r=>this.props.socket.getAdapterInstances("nightscout").then(n=>this.setState({nightscoutList:n.map(o=>o._id.replace("system.adapter.nightscout.","")),text2commandList:r.map(o=>o._id.replace("system.adapter.text2command.",""))})))}componentDidMount(){this.props.socket.subscribeState(`iot.${this.props.instance}.certs.urlKey`,this.onKeyChanged),this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`).then(e=>this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`).then(r=>this.setState({isInstanceAlive:!!e?.common&&!!r?.val})))}componentWillUnmount(){this.props.socket.unsubscribeState(`iot.${this.props.instance}.certs.urlKey`,this.onKeyChanged)}onKeyChanged=(e,r)=>{r&&this.setState({key:r.val})};renderInput(e,r,n){return y.jsx(Et,{variant:"standard",label:D.t(e),style:{...Yt.input,...Yt.controlElement},value:this.props.native[r],type:n||"text",onChange:o=>this.props.onChange(r,o.target.value),margin:"normal"})}reissueUrlKey(){return this.setState({running:!0}),this.props.socket.setState(`iot.${this.props.instance}.certs.urlKey`,{val:"",ack:!0}).then(()=>this.props.socket.getObject(`system.adapter.iot.${this.props.instance}`)).then(e=>{!e||!e.common||!e.common.enabled?this.setState({running:!1,toast:D.t("Key will be updated after start")}):this.props.socket.setObject(`system.adapter.iot.${this.props.instance}`,e)}).then(()=>this.setState({running:!1,toast:D.t("Certificates will be updated after initiated restart")})).catch(e=>{this.setState({running:!1}),this.props.onError(e)})}renderToast(){return this.state.toast?y.jsx($u,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:!0,autoHideDuration:6e3,onClose:()=>this.setState({toast:""}),slotProps:{content:{"aria-describedby":"message-id"}},message:y.jsx("span",{id:"message-id",children:this.state.toast}),action:[y.jsx(Le,{"aria-label":"Close",color:"inherit",style:Yt.close,onClick:()=>this.setState({toast:""}),children:y.jsx(U7,{})},"close")]}):null}onChipsDelete(e,r){const n=(this.props.native[e]||"").split(/[,;\s]/).filter(a=>!!a),o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.props.onChange(e,n.join(" ")))}onChipsAdd(e){const r=(this.props.native[e]||"").split(/[,;\s]/).filter(n=>!!n);this.state.addValue==="visu"?(this.props.onError(D.t("This service is reserved for the ioBroker.visu app. Please use another service name.")),this.setState({addValue:""})):!r.includes(this.state.addValue)&&this.state.addValue&&(r.push(this.state.addValue),this.setState({addValue:""},()=>this.props.onChange(e,r.join(" "))))}calcNightscoutSecret(){const e=this.props.native.login.replace(/[^\w\d-_]/g,"_"),r=this.props.native.nightscoutPass;return e+(r?`-${r}`:"")}getSelectIdDialog(e){return this.state.showSelectId?y.jsx(Bc,{theme:this.props.theme,imagePrefix:"../..",socket:this.props.socket,selected:this.props.native[e],types:["state"],onClose:()=>this.setState({showSelectId:!1}),onOk:r=>{this.setState({showSelectId:!1}),this.props.onChange(e,r)}},"dialogSelectID3"):null}renderChips(e,r){return y.jsxs("div",{style:Yt.chipsDiv,children:[y.jsx(Po,{children:ee.renderTextWithA(D.t(e))}),y.jsx(Et,{variant:"standard",label:D.t("Add service"),style:{width:150},type:"text",value:this.state.addValue,onKeyUp:n=>n.key==="Enter"&&this.onChipsAdd(r),onChange:n=>this.setState({addValue:n.target.value.trim()}),margin:"normal"}),y.jsx(Zt,{size:"small",color:"secondary",disabled:!this.state.addValue,onClick:()=>this.onChipsAdd(r),style:{marginLeft:5,marginTop:-15},children:y.jsx(Oi,{})}),y.jsx("div",{style:Yt.chips,children:(this.props.native[r]||"").split(/[,;\s]/).filter(n=>!!n).map(n=>y.jsx(RP,{size:"small",label:n,onDelete:()=>this.onChipsDelete(r,n),style:Yt.chip},n))})]})}render(){return y.jsxs("form",{style:Yt.tab,children:[y.jsx(Ue,{variant:"outlined",disabled:!this.state.isInstanceAlive||this.state.running,color:"primary",title:this.state.isInstanceAlive?"":D.t("Instance must be enabled"),onClick:()=>this.reissueUrlKey(),startIcon:y.jsx(Di,{}),children:D.t("Get new service URL key")}),y.jsx("br",{}),this.renderInput("IFTTT key","iftttKey"),y.jsx("br",{}),y.jsx(Et,{variant:"standard",label:D.t("Use following link for IFTTT"),style:{...Yt.input,...Yt.controlElement,...Yt.fullSize,marginTop:10},value:`https://service.iobroker.in/v1/iotService?service=ifttt&key=${this.state.key}&user=${encodeURIComponent(this.props.native.login)}`,type:"text",slotProps:{htmlInput:{readOnly:!0}},margin:"normal"}),y.jsx(Zt,{size:"small",style:{marginTop:10,marginLeft:5},onClick:()=>ee.copyToClipboard(`https://service.iobroker.in/v1/iotService?service=ifttt&key=${this.state.key}&user=${encodeURIComponent(this.props.native.login)}`),children:y.jsx(Ss,{})}),y.jsx("br",{}),y.jsx("br",{}),this.renderChips("White list for services","allowedServices"),y.jsx("br",{}),y.jsx(Et,{variant:"standard",label:D.t("Use following link for custom service"),style:{...Yt.input,...Yt.controlElement,...Yt.fullSize,marginTop:10},value:`https://service.iobroker.in/v1/iotService?service=custom_<SERVICE_NAME>&key=${this.state.key}&user=${encodeURIComponent(this.props.native.login)}&data=<SOME_TEXT>`,type:"text",slotProps:{htmlInput:{readOnly:!0}},margin:"normal"}),y.jsx(Zt,{size:"small",style:{marginTop:10,marginLeft:5},onClick:()=>ee.copyToClipboard(`https://service.iobroker.in/v1/iotService?service=custom_<SERVICE_NAME>&key=${this.state.key}&user=${encodeURIComponent(this.props.native.login)}&data=<SOME_TEXT>`),children:y.jsx(Ss,{})}),y.jsx("br",{}),y.jsxs(gn,{style:{...Yt.input,...Yt.controlElement,paddingTop:20},variant:"standard",children:[y.jsxs(Nr,{variant:"standard",value:this.props.native.text2command||"_",onChange:e=>this.props.onChange("text2command",e.target.value==="_"?"":e.target.value),input:y.jsx(Mn,{name:"text2command",id:"text2command-helper"}),children:[y.jsx(pt,{value:"_",children:D.t("disabled")},"key-default"),this.state.text2commandList.map(e=>y.jsxs(pt,{value:e,children:["text2command.",e]},`key-${e}`))]}),y.jsx(Po,{children:D.t("Use text2command instance")})]}),y.jsx("br",{}),y.jsxs(gn,{style:{...Yt.input,...Yt.controlElement,paddingTop:20},variant:"standard",children:[y.jsxs(Nr,{variant:"standard",value:this.props.native.nightscout||"_",onChange:e=>this.props.onChange("nightscout",e.target.value==="_"?"":e.target.value),input:y.jsx(Mn,{name:"nightscout",id:"nightscout-helper"}),children:[y.jsx(pt,{value:"_",children:D.t("disabled")},"key-default"),this.state.nightscoutList.map(e=>y.jsxs(pt,{value:e,children:["nightscout.",e]},`key-${e}`))]}),y.jsx(Po,{children:D.t("Use Nightscout instance")})]}),this.props.native.nightscout?y.jsx(Et,{variant:"standard",label:D.t("Nightscout password"),onChange:e=>this.props.onChange("nightscoutPass",e.target.value.replace(/[^\w\d-_]/g,"_")),style:{...Yt.input,...Yt.controlElement,...Yt.normalSize,marginTop:3.5},value:this.props.native.nightscoutPass,type:"text",margin:"normal"}):null,this.props.native.nightscout?y.jsx(Et,{variant:"standard",label:D.t("Nightscout api-secret"),style:{...Yt.input,...Yt.controlElement,...Yt.normalSize,marginTop:3.5},value:this.calcNightscoutSecret(),type:"text",slotProps:{htmlInput:{readOnly:!0}},margin:"normal"}):null,y.jsx("br",{}),y.jsx("br",{}),y.jsxs("div",{style:Yt.controlElement,children:[y.jsx(Et,{variant:"standard",label:D.t("Read blood sugar from"),style:{...Yt.input,...Yt.controlElement},value:this.props.native.amazonAlexaBlood||"",type:"text",onChange:e=>this.props.onChange("amazonAlexaBlood",e.target.value),margin:"normal"}),y.jsx(Zt,{size:"small",color:"secondary",onClick:()=>this.setState({showSelectId:!0}),"aria-label":"Add",style:{marginLeft:5,marginTop:10},children:y.jsx(Oi,{})}),y.jsx(at,{style:Yt.controlElement,control:y.jsx(Ut,{style:{paddingLeft:30},checked:this.props.native.amazonAlexaBloodShortAnswer||!1,onChange:e=>this.props.onChange("amazonAlexaBloodShortAnswer",e.target.checked),color:"primary"}),label:D.t("Short answer for blood sugar")})]}),y.jsx("br",{}),this.renderToast(),this.getSelectIdDialog("amazonAlexaBlood")]})}}const Att="#e7000040",Vn={tab:{width:"100%",height:"100%"},column:{display:"inline-block",verticalAlign:"top",marginRight:10,height:"100%",overflow:"hidden",width:"calc(50% - 20px)",minWidth:300,maxWidth:450},columnDiv:{height:"calc(100% - 40px)",overflow:"auto",minWidth:300},enumLineEnabled:{},enumLineEdit:{},enumLineName:{},enumLineSubName:{fontStyle:"italic"},enumLine:{height:48,width:"100%",position:"relative",display:"flex",alignItems:"center"},enumLineId:{display:"block",fontStyle:"italic",fontSize:12},columnHeader:t=>({background:t.palette.primary.light,padding:"10px",color:t.palette.primary.contrastText,marginTop:0,marginBottom:0})};class Itt extends T.Component{constructor(e){super(e),this.state={inAction:!1,editId:"",editedSmartName:"",funcs:[],rooms:[],changed:[],message:"",loading:!0},this.props.socket.getEnums().then(r=>{const n=[],o=[];return r&&Object.keys(r).forEach(a=>{a.match(/^enum\.rooms\./)?o.push(r[a]):a.match(/^enum\.functions\./)&&n.push(r[a])}),this.setState({funcs:n,rooms:o,loading:!1}),this.props.socket.subscribeObject("enum.*",this.onEnumUpdate)})}componentWillUnmount(){this.props.socket.unsubscribeObject("enum.*",this.onEnumUpdate).then(()=>{})}onEnumUpdate=(e,r)=>{this.removeChanged(e),this.updateObjInState(e,r)};informInstance(e){this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"update",e)}addChanged(e){const r=JSON.parse(JSON.stringify(this.state.changed));r.includes(e)||(r.push(e),this.setState({changed:r}))}removeChanged(e){const r=JSON.parse(JSON.stringify(this.state.changed)),n=r.indexOf(e);n!==-1&&(r.splice(n,1),this.setState({changed:r}))}updateObjInState(e,r){if(e.match(/^enum\.functions\./)){for(let n=this.state.funcs.length-1;n>=0;n--)if(this.state.funcs[n]._id===e){const o=JSON.parse(JSON.stringify(this.state.funcs));r?o[n]=r:o.splice(n,1),this.setState({funcs:o});break}}else if(e.match(/^enum\.rooms\./)){for(let n=this.state.rooms.length-1;n>=0;n--)if(this.state.rooms[n]._id===e){const o=JSON.parse(JSON.stringify(this.state.rooms));r?o[n]=r:o.splice(n,1),this.setState({rooms:o});break}}}onToggleEnum(e){let r=this.state.funcs.find(o=>o._id===e)||this.state.rooms.find(o=>o._id===e);if(!r)return;const n=ee.getSmartNameFromObj(r,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon);r=JSON.parse(JSON.stringify(r)),n!==!1?ee.disableSmartName(r,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon):ee.removeSmartName(r,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.addChanged(e),this.props.socket.setObject(e,r).then(()=>{this.updateObjInState(e,r),this.informInstance(e),setTimeout(()=>this.removeChanged(e),500)})}onEdit(e){const r=this.state.funcs.find(o=>o._id===e)||this.state.rooms.find(o=>o._id===e);if(!r)return;let n=ee.getSmartNameFromObj(r,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon);typeof n=="object"&&n&&(n=n[D.getLanguage()]||n.en),n||=ee.getObjectNameFromObj(r,null,{language:D.getLanguage()}),this.setState({editId:e,editedSmartName:n})}renderEnum(e){let r=ee.getSmartNameFromObj(e,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon);r&&typeof r=="object"&&(r=r[D.getLanguage()]||r.en||"");const n=ee.getObjectNameFromObj(e,null,{language:D.getLanguage()});return y.jsxs("div",{style:{...Vn.enumLine,background:this.state.changed.indexOf(e._id)!==-1?Att:"inherit"},children:[y.jsxs("div",{style:{marginLeft:8},children:[y.jsxs("span",{style:{...Vn.enumLineName,opacity:r===!1?.5:1},children:[r||null,r?y.jsxs("span",{style:Vn.enumLineSubName,children:[" (",n,")"]}):n]}),y.jsx("span",{style:{...Vn.enumLineId,opacity:r===!1?.5:1},children:e._id})]}),y.jsx("div",{style:{flex:1}}),y.jsx(Le,{"aria-label":"Edit",style:Vn.enumLineEdit,onClick:()=>this.onEdit(e._id),children:y.jsx(Um,{fontSize:"large"})}),y.jsx(qd,{style:Vn.enumLineEnabled,checked:r!==!1,onChange:()=>this.onToggleEnum(e._id)})]},e._id)}renderEnums(e){return this.state[e].map(r=>this.renderEnum(r))}renderMessage(){return this.state.message?y.jsx(np,{text:this.state.message,onClose:()=>this.setState({message:""})}):null}changeSmartName(){if((this.state.editId.startsWith("enum.functions.")?this.state.funcs:this.state.rooms).find(r=>this.state.editId!==r._id&&(this.state.editedSmartName===ee.getObjectNameFromObj(r,D.getLanguage())||this.state.editedSmartName===ee.getSmartNameFromObj(r,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon))))this.setState({message:D.t("Duplicate name")});else{this.addChanged(this.state.editId),setTimeout(()=>this.removeChanged(this.state.editId),500);const r=this.state.editId;this.setState({editId:""});let n;this.props.socket.getObject(r).then(o=>{if(o)return ee.updateSmartName(o,this.state.editedSmartName,void 0,void 0,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),n=o,this.props.socket.setObject(r,o)}).then(()=>{this.updateObjInState(r,n),this.informInstance(r)}).catch(o=>this.props.onError(o))}}renderEditDialog(){if(this.state.editId){const e=this.state.funcs.find(r=>r._id===this.state.editId)||this.state.rooms.find(r=>r._id===this.state.editId);return y.jsxs(qt,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({editId:""}),"aria-labelledby":"message-dialog-title","aria-describedby":"message-dialog-description",children:[y.jsx(Gt,{id:"message-dialog-title",children:this.props.title||D.t("Smart name for %s",ee.getObjectNameFromObj(e,D.getLanguage()))}),y.jsx(er,{children:y.jsx(Et,{variant:"standard",autoFocus:!0,style:{width:"100%"},label:D.t("Smart name"),onChange:r=>this.setState({editedSmartName:r.target.value}),value:this.state.editedSmartName,helperText:D.t("You can enter several names divided by comma"),margin:"normal"})}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"contained",onClick:()=>this.changeSmartName(),color:"primary",startIcon:y.jsx(Kr,{}),children:D.t("Ok")}),y.jsx(Ue,{color:"grey",variant:"contained",onClick:()=>this.setState({editId:""}),startIcon:y.jsx(Vt,{}),children:D.t("Cancel")})]})]})}return null}render(){return this.state.loading?y.jsx(Jr,{}):y.jsxs("form",{style:Vn.tab,children:[y.jsxs("div",{style:Vn.column,children:[y.jsx(Ke,{component:"h5",sx:Vn.columnHeader,children:D.t("Rooms")}),y.jsx("div",{style:Vn.columnDiv,children:this.renderEnums("rooms")})]}),y.jsxs("div",{style:Vn.column,children:[y.jsx(Ke,{component:"h5",sx:Vn.columnHeader,children:D.t("Functions")}),y.jsx("div",{style:Vn.columnDiv,children:this.renderEnums("funcs")})]}),this.renderMessage(),this.renderEditDialog()]})}}const Wh="#aba613",Hh="#444",Bd="#00c6ff",j1="#00bc00",Uh="#e7000040",Vh="#4f4f4f",qh="#e9e9e9",Gh="#5c8f65",Jh="#b4ffbe",ta={turnOn:{color:Wh,icon:Bb,desc:"Turn on",v2:!0},turnOff:{color:Hh,icon:Bb,desc:"Turn off",v2:!0},setTargetTemperature:{color:Bd,icon:H7,desc:"Set target temperature",v2:!0},incrementTargetTemperature:{color:Wh,icon:cc,desc:"Increment target temperature",v2:!0},decrementTargetTemperature:{color:Hh,icon:lc,desc:"Decrement target temperature",v2:!0},setPercentage:{color:Bd,icon:W7,desc:"Set percentage",v2:!0},incrementPercentage:{color:Wh,icon:cc,desc:"Increment percentage",v2:!0},decrementPercentage:{color:Hh,icon:lc,desc:"Decrement percentage",v2:!0},setColor:{color:Bd,icon:B7,desc:"Set color",v2:!0},setColorTemperature:{color:Bd,icon:Nu,desc:"Set color temperature",v2:!0},incrementColorTemperature:{color:Wh,icon:cc,desc:"Increment color temperature",v2:!0},decrementColorTemperature:{color:Hh,icon:lc,desc:"Decrement color temperature",v2:!0},getTargetTemperature:{color:j1,icon:hu,desc:"Get target temperature",v2:!0},getTemperatureReading:{color:j1,icon:hu,desc:"Get actual temperature",v2:!0},setLockState:{color:Bd,icon:Vf,desc:"Set lock state",v2:!0},getLockState:{color:j1,icon:Vf,desc:"Read lock state",v2:!0}},Xh=["LIGHT","SWITCH","THERMOSTAT","ACTIVITY_TRIGGER","SCENE_TRIGGER","SMARTPLUG","SMARTLOCK","CAMERA"],Ct={tab:{width:"100%",height:"100%"},columnDiv:{height:"calc(100% - 40px)",overflow:"auto",minWidth:300},button:{marginRight:20},devLineExpand:{marginRight:10},devLineEdit:{position:"absolute",top:5,right:50},devLineDelete:{position:"absolute",top:5,right:0},devLineName:{},devLineNumber:{display:"inline-block",verticalAlign:"middle",width:15},editedId:{fontStyle:"italic"},devLine:{height:48,width:"100%",position:"relative"},devLineDescription:{display:"block",fontStyle:"italic",fontSize:12},devLineActions:{fontStyle:"italic",fontSize:12,paddingLeft:50,display:"inline-block"},devLineProgress:{position:"absolute",top:0,left:0},channelLineActions:{width:80},devLineNameBlock:{display:"inline-block",width:"calc(100% - 350px)"},devModified:{fontStyle:"italic"},actionIcon:{width:16},devSubLine:{position:"relative",height:48},devSubLineName:{marginLeft:5,marginTop:14,display:"inline-block",fontSize:13,width:"calc(100% - 400px)"},devSubSubLineName:{fontSize:8,fontStyle:"italic",display:"block"},devSubLineByOn:{marginLeft:5},devSubLineDelete:{position:"absolute",top:12,right:12,padding:0},devSubLineTypeTitle:{marginTop:0},headerRow:t=>({pl:1,background:t.palette.primary.main}),headerCell:{display:"inline-block",verticalAlign:"top",width:"100%"},tableCell:{display:"inline-block",verticalAlign:"top",width:"100%"}};class ks extends T.Component{constructor(e){super(e),ta.translated||(Object.keys(ta).forEach(r=>ta[r].desc=D.t(ta[r].desc)),ta.translated=!0),this.state={edit:null,deleteId:"",showListOfDevices:!1,showSelectId:!1,showConfirmation:"",changed:[],devices:[],message:"",filter:"",loading:!0,browse:!1,expanded:[],lastChanged:""},this.timerChanged=null,this.browseTimer=null,this.browseTimerCount=0,this.waitForUpdateID=null,this.onReadyUpdateBound=this.onReadyUpdate.bind(this),this.onResultUpdateBound=this.onResultUpdate.bind(this),this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`).then(r=>this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`).then(n=>{!r||!r.common||!r.common.enabled&&(!n||!n.val)?this.setState({message:D.t("Instance must be enabled"),loading:!1,devices:[]}):this.browse()}))}browse(e){Date.now()-this.lastBrowse<500||(this.lastBrowse=Date.now(),e?this.setState({loading:!0,browse:!0}):this.setState({browse:!0}),console.log("Send BROWSE!"),this.browseTimer=setTimeout(()=>{console.log("Browse timeout!"),this.browseTimer=null,this.browseTimerCount++,this.browseTimerCount<5?this.browse(e):this.setState({message:D.t("Cannot read devices!")})},1e4),this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"browse",null).then(r=>{this.browseTimer&&clearTimeout(this.browseTimer),this.browseTimerCount=0,this.browseTimer=null,r&&r.error?this.setState({message:D.t(r.error)}):(this.waitForUpdateID&&(this.onEdit(this.waitForUpdateID,r)||this.setState({message:D.t("Device %s was not added",this.waitForUpdateID)}),this.waitForUpdateID=null),console.log("BROWSE received."),this.setState({devices:r,loading:!1,changed:[],browse:!1}),r.length>300&&this.props.onError(D.t("Too many devices (%s) configured. Max number is 300",r.length)))}).catch(r=>this.setState({message:D.t("Error %s",r),browse:!1})))}onReadyUpdate(e,r){console.log(`Update ${e} ${r?`${r.val}/${r.ack}`:"null"}`),r&&r.ack===!0&&r.val===!0&&(this.devTimer&&clearTimeout(this.devTimer),this.devTimer=setTimeout(()=>{this.devTimer=null,this.browse()},300))}onResultUpdate(e,r){r&&r.ack===!0&&r.val&&this.setState({message:r.val})}componentDidMount(){this.props.socket.subscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updates`,this.onReadyUpdateBound),this.props.socket.subscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesResult`,this.onResultUpdateBound)}componentWillUnmount(){this.props.socket.unsubscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updates`,this.onReadyUpdateBound),this.props.socket.unsubscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesResult`,this.onResultUpdateBound),this.timerChanged&&(clearTimeout(this.timerChanged),this.timerChanged=null)}informInstance(e){this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"update",e)}addChanged(e,r){const n=JSON.parse(JSON.stringify(this.state.changed));n.includes(e)?r&&r():(n.push(e),this.setState({changed:n},()=>r&&r()))}onEdit(e,r){r=r||this.state.devices;const n=r.find(o=>o.additionalApplianceDetails.id===e);return n?(this.props.socket.getObject(e).then(o=>{let a=n.additionalApplianceDetails.friendlyNames?n.additionalApplianceDetails.friendlyNames:n.friendlyName;typeof a=="object"&&a&&(a=a[D.getLanguage()]||a.en);let s=null;n.additionalApplianceDetails.group||(s=n.additionalApplianceDetails.smartType),this.setState({edit:{id:e,type:s,name:a,objectName:ee.getObjectNameFromObj(o,null,{language:D.getLanguage()}),originalName:a,originalType:s}})}),!0):!1}onAskDelete(e){this.setState({deleteId:e,showConfirmation:!0})}onDelete(){const e=this.state.deleteId;this.addChanged(e,()=>{this.props.socket.getObject(e).then(r=>(ee.disableSmartName(r,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.props.socket.setObject(e,r))).then(()=>{this.setState({deleteId:"",showConfirmation:!1,lastChanged:e}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4),this.informInstance(e)}).catch(r=>this.props.onError(r))})}static renderActions(e){const r=[];if(!e.actions)return console.log("Something went wrong"),null;e.actions.sort((n,o)=>n===o?0:n==="turnOn"?-1:o==="turnOn"?1:n==="turnOff"?-1:o==="turnOff"?1:0),Object.keys(ta).forEach(n=>{if(e.actions.includes(n)){const o=ta[n].icon;r.push(y.jsx("span",{title:ta[n].desc,children:y.jsx(o,{style:{...Ct.actionIcon,color:ta[n].color}})},n))}});for(let n=0;n<e.actions.length;n++)ta[e.actions[n]]||r.push(y.jsx("span",{children:e.actions[n]},e.actions[n]));return r}onExpand(e){const r=JSON.parse(JSON.stringify(this.state.expanded)),n=r.indexOf(this.state.devices[e].friendlyName);n===-1?r.push(this.state.devices[e].friendlyName):r.splice(n,1),this.setState({expanded:r})}renderSelectByOn(e,r,n,o){if(o!==!1){const a=[y.jsx(pt,{value:"",children:y.jsx("em",{children:D.t("Default")})},"_"),y.jsx(pt,{value:"stored",children:D.t("last value")},"last"),y.jsx(pt,{value:"omit",children:D.t("omit value")},"omit")];for(let s=5;s<=100;s+=5)a.push(y.jsxs(pt,{value:s.toString(),children:[s,"%"]},s.toString()));return y.jsxs(gn,{style:Ct.devSubLineByOn,variant:"standard",children:[y.jsx(Nr,{variant:"standard",style:Ct.devSubLineByOnSelect,value:(o||"").toString(),onChange:s=>this.onParamsChange(n,s.target.value),children:a}),y.jsx(Po,{style:Ct.devSubLineTypeTitle,children:D.t("by ON")})]})}return null}onParamsChange(e,r,n){this.addChanged(e,()=>{this.props.socket.getObject(e).then(o=>(ee.updateSmartName(o,void 0,r,n,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.state.lastChanged!==e&&(this.setState({lastChanged:e}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4)),this.props.socket.setObject(e,o))).then(()=>{this.informInstance(e)}).catch(o=>this.props.onError(o))})}static renderSelectTypeSelector(e,r){if(e!==!1){const n=[y.jsx(pt,{value:"_",children:y.jsx("em",{children:D.t("no type")})},"_")];for(let o=0;o<Xh.length;o++)n.push(y.jsx(pt,{value:Xh[o],children:y.jsx("em",{children:D.t(Xh[o])})},Xh[o]));return y.jsxs(gn,{variant:"standard",children:[y.jsx(Nr,{variant:"standard",value:e||"_",onChange:o=>r(o.target.value==="_"?"":o.target.value),children:n}),y.jsx(Po,{style:Ct.devSubLineTypeTitle,children:D.t("Types")})]})}return""}renderSelectType(e,r,n,o){return ks.renderSelectTypeSelector(o,a=>this.onParamsChange(n,void 0,a))}renderChannels(e,r){const n=[];if(e.additionalApplianceDetails.group){const o=e.additionalApplianceDetails.channels,a=e.additionalApplianceDetails.names,s=e.additionalApplianceDetails.byONs,l=e.additionalApplianceDetails.smartTypes;let d=0;o&&Object.keys(o).forEach(p=>{for(let m=0;m<o[p].length;m++){const u=o[p][m].id;let g=this.state.changed.includes(u)?Uh:this.props.themeType==="dark"?Vh:qh;this.state.lastChanged===u&&(g===Vh||g===qh)&&(g=this.props.themeType==="dark"?Gh:Jh),n.push(y.jsxs("div",{style:{...Ct.devSubLine,...d%2?void 0:{background:g}},children:[y.jsx("div",{style:{...Ct.devLineActions,...Ct.channelLineActions},children:ks.renderActions(o[p][m])}),y.jsxs("div",{style:Ct.devSubLineName,title:u,children:[a[u]||u,u!==a[u]?y.jsx("span",{style:Ct.devSubSubLineName,children:u}):null]}),this.renderSelectType(e,r,u,l[u]),this.renderSelectByOn(e,r,u,s[u]),y.jsx(Le,{"aria-label":"Delete",style:Ct.devSubLineDelete,onClick:()=>this.onAskDelete(u,r),children:y.jsx(Si,{fontSize:"middle"})})]},`sub${u}`)),d++}})}else{const o=e.additionalApplianceDetails.id,a=e.additionalApplianceDetails.name||o;let s=this.state.changed.includes(o)?Uh:this.props.themeType==="dark"?Vh:qh;this.state.lastChanged===o&&(s===Vh||s===qh)&&(s=this.props.themeType==="dark"?Gh:Jh),n.push(y.jsxs("div",{style:{...Ct.devSubLine,background:s},children:[y.jsx("div",{style:{...Ct.devLineActions,...Ct.channelLineActions,width:80},children:ks.renderActions(e)}),y.jsx("div",{style:Ct.devSubLineName,title:o||"",children:a}),this.renderSelectType(e,r,o,e.additionalApplianceDetails.smartType),this.renderSelectByOn(e,r,o,e.additionalApplianceDetails.byON)]},`sub${o}`))}return n}renderDevice(e,r){const n=e.friendlyName;let o;!e.additionalApplianceDetails.group&&e.additionalApplianceDetails.nameModified?o=n:o=y.jsx("span",{style:Ct.devModified,title:D.t("modified"),children:n});let a=0;e.additionalApplianceDetails.channels&&Object.keys(e.additionalApplianceDetails.channels).forEach(m=>a+=e.additionalApplianceDetails.channels[m].length),a=a||1;const s=this.state.expanded.includes(n),l=e.additionalApplianceDetails?.id;let d=r%2?this.props.themeType==="dark"?"#272727":"#f1f1f1":"inherit";const p=this.state.changed.includes(l);if(p?d=Uh:l===this.state.lastChanged&&(d=this.props.themeType==="dark"?Gh:Jh),e.additionalApplianceDetails.group&&!p&&l!==this.state.lastChanged){const m=e.additionalApplianceDetails.channels;try{m&&Object.keys(m).forEach(u=>u&&m[u].forEach(g=>{this.state.changed.includes(g.id)?d=Uh:this.state.lastChanged===g.id&&(d=this.props.themeType==="dark"?Gh:Jh)}))}catch(u){console.log(u)}}return[y.jsxs("div",{style:{...Ct.devLine,background:d},children:[y.jsxs("div",{style:Ct.devLineNumber,children:[r+1,"."]}),y.jsx(Le,{style:Ct.devLineExpand,onClick:()=>this.onExpand(r),children:a>1?y.jsx(ku,{badgeContent:a,color:"primary",children:s?y.jsx(Cc,{}):y.jsx($c,{})}):s?y.jsx(Cc,{}):y.jsx($c,{})}),y.jsxs("div",{style:{...Ct.devLineNameBlock,display:"inline-block",position:"relative"},children:[y.jsx("span",{style:Ct.devLineName,children:o}),y.jsx("span",{style:Ct.devLineDescription,children:e.friendlyDescription}),p?y.jsx(Jr,{style:Ct.devLineProgress,size:20}):null]}),y.jsx("span",{style:Ct.devLineActions,children:ks.renderActions(e)}),e.additionalApplianceDetails.group?null:y.jsx(Le,{"aria-label":"Edit",style:Ct.devLineEdit,onClick:()=>this.onEdit(l),children:y.jsx(Um,{fontSize:"middle"})}),e.additionalApplianceDetails.group?null:y.jsx(Le,{"aria-label":"Delete",style:Ct.devLineDelete,onClick:()=>this.onAskDelete(l),children:y.jsx(Si,{fontSize:"middle"})})]},`line${r}`),s?this.renderChannels(e,r):null]}renderMessage(){return this.state.message?y.jsx(np,{text:this.state.message,onClose:()=>this.setState({message:""})}):null}changeSmartName(e){e?.preventDefault(),this.addChanged(this.state.edit.id,()=>{const r=this.state.edit.id,n=this.state.edit.type,o=this.state.edit.name.trim();this.setState({edit:null,lastChanged:r}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4),this.props.socket.getObject(r).then(a=>(ee.updateSmartName(a,o,void 0,n===null?void 0:n,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.props.socket.setObject(r,a))).then(()=>this.informInstance(r)).catch(a=>this.props.onError(a))})}renderEditDialog(){return this.state.edit?y.jsxs(qt,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({edit:null}),"aria-labelledby":"message-dialog-title","aria-describedby":"message-dialog-description",children:[y.jsx(Gt,{id:"message-dialog-title",children:this.props.title||D.t("Smart name for %s",this.state.edit.objectName)}),y.jsxs(er,{children:[y.jsxs("p",{children:[y.jsx("span",{children:"ID:"})," ",y.jsx("span",{style:Ct.editedId,children:this.state.edit.id})]}),y.jsx(Et,{variant:"standard",style:{width:"100%"},label:D.t("Smart name"),autoFocus:!0,onKeyDown:e=>e.key==="Enter"&&this.changeSmartName(e),value:this.state.edit.name,onChange:e=>{const r=JSON.parse(JSON.stringify(this.state.edit));r.name=e.target.value,this.setState({edit:r})},helperText:D.t("You can enter several names divided by comma"),margin:"normal"}),this.state.edit.type!==null?ks.renderSelectTypeSelector(this.state.edit.type,e=>{const r=JSON.parse(JSON.stringify(this.state.edit));r.type=e,this.setState({edit:r})}):null]}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"contained",disabled:!this.state.edit.name||this.state.edit.originalName===this.state.edit.name&&(this.state.edit.type||null)===(this.state.edit.originalType||null),onClick:()=>this.changeSmartName(),color:"primary",startIcon:y.jsx(Kr,{}),children:D.t("Ok")}),y.jsx(Ue,{variant:"contained",onClick:()=>{this.setState({edit:null})},startIcon:y.jsx(Vt,{}),color:"grey",children:D.t("Cancel")})]})]}):null}renderConfirmDialog(){return this.state.showConfirmation?y.jsxs(qt,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({showConfirmation:""}),"aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[y.jsx(Gt,{id:"confirmation-dialog-title",children:this.props.title||D.t("Device %s will be disabled.",this.state.deleteId)}),y.jsx(er,{children:y.jsx("p",{children:D.t("Are you sure?")})}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"contained",onClick:()=>this.onDelete(),color:"primary",autoFocus:!0,startIcon:y.jsx(Si,{}),children:D.t("Delete")}),y.jsx(Ue,{color:"grey",variant:"contained",startIcon:y.jsx(Vt,{}),onClick:()=>this.setState({showConfirmation:""}),children:D.t("Cancel")})]})]}):null}getSelectIdDialog(){return this.state.showSelectId?y.jsx(Bc,{theme:this.props.theme,imagePrefix:"../..",socket:this.props.socket,selected:"",types:["state"],onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{this.setState({showSelectId:!1}),this.props.socket.getObject(e).then(r=>{if(r){const n=ee.getObjectNameFromObj(r,null,{language:D.getLanguage()});ee.updateSmartName(r,(n||D.t("Device name")).replace(/[-_.]+/g," "),void 0,void 0,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.addChanged(r._id),this.waitForUpdateID=r._id,this.state.lastChanged!==r._id&&(this.setState({lastChanged:r._id}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4)),this.props.socket.setObject(r._id,r).then(()=>this.informInstance(r._id)).catch(o=>this.setState({message:o}))}else this.setState({message:D.t("Invalid ID")})})}},"dialogSelectID1"):null}renderDevices(){const e=this.state.filter.toLowerCase(),r=[];for(let n=0;n<this.state.devices.length;n++)this.state.filter&&!this.state.devices[n].friendlyName.toLowerCase().includes(e)||r.push(this.renderDevice(this.state.devices[n],n));return y.jsx("div",{style:Ct.columnDiv,children:r},"listDevices")}renderListOfDevices(){return this.state.showListOfDevices?y.jsxs(qt,{open:!0,maxWidth:"xl",fullWidth:!0,onClose:()=>this.setState({showListOfDevices:!1}),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[y.jsxs(Gt,{id:"alert-dialog-title",children:[D.t("List of devices to print out, e.g. to give all device names to your partner.")," ",y.jsx("span",{role:"img","aria-label":"smile",children:"😄"})]}),y.jsxs(er,{children:[y.jsx(Ke,{sx:Ct.headerRow,children:y.jsx("div",{style:Ct.headerCell,children:D.t("Name")})}),y.jsx("div",{style:Ct.tableDiv,children:this.state.devices.map((e,r)=>y.jsx("div",{children:y.jsx("div",{style:Ct.tableCell,children:e.friendlyName})},r))})]}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"outlined",onClick:()=>{this.setState({showListOfDevices:!1});const e=this.state.devices.map(r=>r.friendlyName);ee.copyToClipboard(e.join(`
|
|
684
|
-
`))},color:"primary",startIcon:y.jsx(xm,{}),children:D.t("Copy to clipboard")}),y.jsx(Ue,{variant:"contained",startIcon:y.jsx(Vt,{}),onClick:()=>this.setState({showListOfDevices:!1}),autoFocus:!0,color:"grey",children:D.t("Close")})]})]}):null}render(){return this.state.loading?y.jsx(Jr,{},"alexaProgress"):y.jsxs("form",{style:Ct.tab,children:[y.jsx(Zt,{size:"small",color:"secondary","aria-label":"Add",style:Ct.button,onClick:()=>this.setState({showSelectId:!0}),children:y.jsx(Oi,{})}),y.jsx(Zt,{size:"small",color:"primary","aria-label":"Refresh",style:Ct.button,onClick:()=>this.browse(!0),disabled:this.state.browse,children:this.state.browse?y.jsx(Jr,{size:20}):y.jsx(Di,{})}),y.jsx(Zt,{style:{...Ct.button,marginLeft:"1rem"},title:D.t("Show all devices for print out"),size:"small","aria-label":"List of devices",onClick:()=>this.setState({showListOfDevices:!0}),disabled:this.state.browse,children:y.jsx(Wm,{})}),y.jsx(Et,{variant:"standard",placeholder:D.t("Filter"),className:this.state.filter,value:this.state.filter,onChange:e=>this.setState({filter:e.target.value}),slotProps:{input:{endAdornment:this.state.filter?y.jsx(Le,{onClick:()=>this.setState({filter:""}),children:y.jsx(Hm,{})}):void 0}}}),this.renderDevices(),this.renderMessage(),this.renderEditDialog(),this.getSelectIdDialog(),this.renderConfirmDialog(),this.renderListOfDevices()]},"alexa")}}ks.propTypes={native:ae.object.isRequired,instance:ae.number.isRequired,adapterName:ae.string.isRequired,onError:ae.func,socket:ae.object.isRequired,themeType:ae.string,theme:ae.object};function Ntt(t){return Ve({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M1.5 15a.5.5 0 0 0 0 1h13a.5.5 0 0 0 0-1H13V2.5A1.5 1.5 0 0 0 11.5 1H11V.5a.5.5 0 0 0-.57-.495l-7 1A.5.5 0 0 0 3 1.5V15zM11 2h.5a.5.5 0 0 1 .5.5V15h-1zm-2.5 8c-.276 0-.5-.448-.5-1s.224-1 .5-1 .5.448.5 1-.224 1-.5 1"},child:[]}]})(t)}function N6(t){return Ve({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M11.536 14.01A8.47 8.47 0 0 0 14.026 8a8.47 8.47 0 0 0-2.49-6.01l-.708.707A7.48 7.48 0 0 1 13.025 8c0 2.071-.84 3.946-2.197 5.303z"},child:[]},{tag:"path",attr:{d:"M10.121 12.596A6.48 6.48 0 0 0 12.025 8a6.48 6.48 0 0 0-1.904-4.596l-.707.707A5.48 5.48 0 0 1 11.025 8a5.48 5.48 0 0 1-1.61 3.89z"},child:[]},{tag:"path",attr:{d:"M8.707 11.182A4.5 4.5 0 0 0 10.025 8a4.5 4.5 0 0 0-1.318-3.182L8 5.525A3.5 3.5 0 0 1 9.025 8 3.5 3.5 0 0 1 8 10.475zM6.717 3.55A.5.5 0 0 1 7 4v8a.5.5 0 0 1-.812.39L3.825 10.5H1.5A.5.5 0 0 1 1 10V6a.5.5 0 0 1 .5-.5h2.325l2.363-1.89a.5.5 0 0 1 .529-.06"},child:[]}]})(t)}function Mtt(t){return Ve({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M12 5C11.4477 5 11 5.44772 11 6C11 6.55228 11.4477 7 12 7H20C20.5523 7 21 6.55228 21 6C21 5.44772 20.5523 5 20 5H12Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M7 12C7 11.4477 7.44772 11 8 11H16C16.5523 11 17 11.4477 17 12C17 12.5523 16.5523 13 16 13H8C7.44772 13 7 12.5523 7 12Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M3 18C3 17.4477 3.44772 17 4 17H12C12.5523 17 13 17.4477 13 18C13 18.5523 12.5523 19 12 19H4C3.44772 19 3 18.5523 3 18Z",fill:"currentColor"},child:[]}]})(t)}function Rtt(t){return Ve({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3004 7.49991C10.3004 8.4943 9.49426 9.30041 8.49988 9.30041C7.50549 9.30041 6.69938 8.4943 6.69938 7.49991C6.69938 6.50553 7.50549 5.69942 8.49988 5.69942C9.49426 5.69942 10.3004 6.50553 10.3004 7.49991ZM11.205 8C10.9699 9.28029 9.84816 10.2504 8.49988 10.2504C7.1516 10.2504 6.0299 9.28029 5.79473 8H0.5C0.223858 8 0 7.77614 0 7.5C0 7.22386 0.223858 7 0.5 7H5.7947C6.0298 5.71962 7.15154 4.74942 8.49988 4.74942C9.84822 4.74942 10.97 5.71962 11.2051 7H14.5C14.7761 7 15 7.22386 15 7.5C15 7.77614 14.7761 8 14.5 8H11.205Z",fill:"currentColor"},child:[]}]})(t)}var nr=Bm();const M6="#e7000040",R6="#4f4f4f",jtt="#313131",j6="#e9e9e9",ztt="#bbbbbb",z6="#5c8f65",P6="#b4ffbe",L6="#6e6e6e",F6="#d0d0d0",z1=[nr.Types.socket,nr.Types.light,nr.Types.dimmer,nr.Types.thermostat,nr.Types.blind,nr.Types.gate,nr.Types.lock,nr.Types.hue,nr.Types.rgb,nr.Types.rgbSingle,nr.Types.rgbwSingle,nr.Types.ct,nr.Types.motion,nr.Types.slider,nr.Types.temperature,nr.Types.humidity,nr.Types.button,nr.Types.window],B6={LIGHT:nr.Types.light,SWITCH:nr.Types.socket,THERMOSTAT:nr.Types.thermostat,SMARTPLUG:nr.Types.socket,SMARTLOCK:nr.Types.lock,CAMERA:nr.Types.camera,blinds:nr.Types.blind,levelSlider:nr.Types.slider},qn={brightness:{label:"Brightness",icon:yX,color:"#c9b803"},connectivity:{label:"Connectivity",icon:KX,color:"#989898"},color:{label:"Color",icon:GX,color:"#a20030"},colorTemperatureInKelvin:{label:"Color temperature",icon:RX,color:"#019bb6"},detectionState:{label:"Detection",icon:qX,color:"#913c01"},lockState:{label:"Lock",icon:BX,color:"#00519b"},mode:{label:"Mode",icon:HX,color:"#112233"},muted:{label:"Muted",icon:cK,color:"#9701af"},percentage:{label:"Percentage",icon:W7,color:"#009870"},powerState:{label:"Power",icon:eK,color:"#70bd00"},relativeHumidity:{label:"Humidity",icon:V7,color:"#3c58ca",style:{width:24,height:24}},targetSetpoint:{label:"Set point",icon:ZX,color:"#813600"},temperature:{label:"Temperature",icon:$X,color:"#9f1300"},thermostatMode:{label:"Thermostat mode",icon:QX,color:"#800048"},volume:{label:"Volume",icon:dK,color:"#006702"}};let W6=!1;const Dn={AirCondition:{label:"AirCondition",icon:OQe,color:"#001fb9",controllable:!0},Blind:{label:"Blinds",icon:WQe,color:"#00a28f",controllable:!0},Button:{label:"Button/Scene",icon:BQe,color:"#00a28f",controllable:!0},ContactSensor:{label:"Sensor",icon:HQe,color:"#c9b803",controllable:!1},Ct:{label:"Color temperature",icon:s6,color:"#5a9600"},Dimmer:{label:"Dimmer",icon:het,color:"#cb8500",controllable:!0},Door:{label:"Door sensor",icon:Ntt,color:"#ad002a",controllable:!1},Gate:{label:"Gate",icon:uet,color:"#9d02af"},Humidity:{label:"Humidity",icon:V7,color:"#8ca102"},Hue:{label:"Color HUE",icon:s6,color:"#007a96"},Light:{label:"Light",icon:Nu,color:"#c9b803",controllable:!0},Lock:{label:"Lock",icon:yQe,color:"#c9030a"},Motion:{label:"Motion",icon:Mtt,color:"#149100"},Rgb:{label:"RGB(W)",icon:$1,color:"#5a9600"},RgbSingle:{label:"RGB single",icon:$1,color:"#5a9600"},RgbwSingle:{label:"RGBW single",icon:$1,color:"#5a9600"},Slider:{label:"Slider",icon:Rtt,color:"#029a7f"},Socket:{label:"Socket",icon:det,color:"#834303"},Temperature:{label:"Temperature",icon:IQe,color:"#8ca102"},Thermostat:{label:"Thermostat",icon:UQe,color:"#8c4800"},VacuumCleaner:{label:"Vacuum cleaner",icon:JQe,color:"#9e03c9"},Volume:{label:"Volume",icon:N6,color:"#c903c6"},VolumeGroup:{label:"Volume group",icon:N6,color:"#c903c6"},Window:{label:"Window sensor",icon:pet,color:"#27c903"}};let H6=!1;const Pe={tab:{width:"100%",height:"100%"},columnDiv:{height:"calc(100% - 40px)",overflow:"auto",minWidth:300},button:{marginRight:20},devLineExpand:{width:40},devLineEdit:{width:40,marginLeft:5},devLineDelete:{width:40},devLineName:{},devLineNumber:{width:15},editedId:{fontStyle:"italic"},devLine:{height:48,width:"100%",position:"relative",display:"flex",alignItems:"center"},devLineDescription:{display:"block",fontStyle:"italic",fontSize:12},devLineActions:{fontStyle:"italic",fontSize:12,paddingRight:5,display:"flex"},devLineProgress:{position:"absolute",top:0,left:0},devLineNameBlock:{flexGrow:1},actionSpan:{marginRight:5,display:"flex",alignItems:"center"},deviceOff:{filter:"grayscale(0.9)"},actionIcon:{width:16},deviceIcon:{width:24,height:24},deviceSmallIcon:{width:20,height:20},devSubLine:{position:"relative",display:"flex",width:"100%",alignItems:"center"},devSubLineExpand:{marginLeft:15},devSubLineExpanded:{transition:"transform 0.3s",transform:"rotate(90deg)"},devSubLineName:{flexGrow:1,fontSize:13,fontWeight:"bold",marginLeft:5},devSubLineName1:{minWidth:100,marginRight:5,display:"inline-block"},devSubLineName2:{fontWeight:"normal",display:"inline-block"},devSubLineName2Div:{display:"flex",alignItems:"center",gap:5},devSubSubLineName:{fontSize:11,fontStyle:"italic",paddingLeft:10,flexGrow:1},devSubSubLineStateName:{minWidth:121,display:"inline-block",fontWeight:"bold"},devSubSubLineStateId:{marginLeft:5},devSubLineDelete:{},devSubLineTypeTitle:{marginTop:0},statesLine:{position:"relative",width:"calc(100% - 50px)",paddingLeft:50,paddingBottom:5},devSubSubLine:{position:"relative",display:"flex",alignItems:"center",paddingTop:2,paddingBottom:2},headerRow:t=>({pl:1,background:t.palette.primary.main}),headerCell:{display:"inline-block",verticalAlign:"top",width:"100%"},tableCell:{display:"inline-block",verticalAlign:"top",width:"100%"},selectType:{width:130,marginLeft:8},stateValueAck:{},stateValueNoAck:{color:"#ff0000"}};function pf(t,e){return t&&typeof t=="object"?t[e]||t.en:t||""}function Ptt(t,e,r,n){r||=".";let o="";const a=t?.common;if(a){const s=a.icon;if(s)if(s.startsWith("data:image/"))o=s;else if(s.includes(".")){let l;t.type==="instance"||t.type==="adapter"?o=`${r}/adapter/${pf(a.name,n)}/${s}`:e&&e.startsWith("system.adapter.")?(l=e.split(".",3),s[0]==="/"?l[2]+=s:l[2]+=`/${s}`,o=`${r}/adapter/${l[2]}`):(l=e.split(".",2),s[0]==="/"?l[0]+=s:l[0]+=`/${s}`,o=`${r}/adapter/${l[0]}`)}else return null}return o||null}function P1(t){return t.toString(16).padStart(2,"0")}function L1(t){return Math.round(t*255)}function U6(t){const e=t.hue,r=t.saturation,n=t.brightness;let o,a,s;const l=Math.floor(e/60)%6,d=e/60-l,p=n*(1-r),m=n*(1-d*r),u=n*(1-(1-d)*r);switch(l){case 0:o=n,a=u,s=p;break;case 1:o=m,a=n,s=p;break;case 2:o=p,a=n,s=u;break;case 3:o=p,a=m,s=n;break;case 4:o=u,a=p,s=n;break;case 5:o=n,a=p,s=m;break;default:o=0,a=0,s=0}return`#${P1(L1(o))}${P1(L1(a))}${P1(L1(s))}`}class Jn extends T.Component{requesting={};timerChanged=null;devTimer=null;browseTimer=null;browseTimerCount=0;lastBrowse=0;waitForUpdateID=null;language=D.getLanguage();editedSmartName;subscribedStates={};tempStates=null;updateValuesTimeout=null;objects={};collectSubscribes=null;collectSubscribesTimer=null;collectUnsubscribes=null;collectUnsubscribesTimer=null;constructor(e){super(e),W6||(Object.keys(qn).forEach(o=>qn[o].label=D.t(qn[o].label)),W6=!0),H6||(Object.keys(Dn).forEach(o=>Dn[o].label=D.t(Dn[o].label)),H6=!0);const r=window.localStorage.getItem("v3.expanded")||"[]";let n;try{n=JSON.parse(r)}catch{n=[]}this.state={edit:null,deleteId:"",showListOfDevices:!1,showSelectId:!1,showConfirmation:"",changed:[],devices:[],message:"",filter:"",loading:!0,browse:!1,expanded:n,lastChanged:"",objects:{},alive:!1,values:{}}}subscribe(e){if(this.subscribedStates[e])this.subscribedStates[e]++;else{this.subscribedStates[e]=1,this.collectSubscribes||=[],this.collectSubscribes.push(e);const r=this.collectUnsubscribes?.indexOf(e);r!==-1&&r!==void 0&&(this.collectUnsubscribes?.splice(r),this.collectUnsubscribes?.length||(this.collectUnsubscribes=null,this.collectUnsubscribesTimer&&(clearTimeout(this.collectUnsubscribesTimer),this.collectUnsubscribesTimer=null))),this.collectSubscribesTimer&&clearTimeout(this.collectSubscribesTimer),this.collectSubscribesTimer=setTimeout(async()=>{if(this.collectSubscribesTimer=null,this.collectSubscribes?.length){const n=this.collectSubscribes;this.collectSubscribes=null;const o=n.filter(s=>!this.objects[s]),a=await this.props.socket.getObjectsById(o);a&&Object.keys(a).forEach(s=>this.objects[s]=a[s]),this.props.socket.subscribeState(n,this.onStateChange)}},200)}}unsubscribe(e){if(this.subscribedStates[e]&&(this.subscribedStates[e]--,!this.subscribedStates[e])){delete this.subscribedStates[e],this.collectUnsubscribes||=[],this.collectUnsubscribes.push(e);const r=this.collectSubscribes?.indexOf(e);r!==-1&&r!==void 0&&(this.collectSubscribes?.splice(r),this.collectSubscribes?.length||(this.collectSubscribes=null,this.collectSubscribesTimer&&(clearTimeout(this.collectSubscribesTimer),this.collectSubscribesTimer=null))),this.collectUnsubscribesTimer&&clearTimeout(this.collectUnsubscribesTimer),this.collectUnsubscribesTimer=setTimeout(()=>{this.collectUnsubscribesTimer=null,this.collectUnsubscribes?.length&&(this.props.socket.unsubscribeState(this.collectUnsubscribes,this.onStateChange),this.collectUnsubscribes=null)},200)}}unsubscribeAll(){Object.keys(this.subscribedStates).forEach(e=>{this.props.socket.unsubscribeState(e,this.onStateChange),delete this.subscribedStates[e]}),this.state.devices.forEach(e=>{e.controls.forEach(r=>{r.states&&Object.keys(r.states).forEach(n=>{r.states[n]&&(r.states[n].subscribed=!1)})})})}onStateChange=(e,r)=>{this.tempStates||={},this.tempStates[e]=r,this.updateValuesTimeout&&clearTimeout(this.updateValuesTimeout),this.updateValuesTimeout=setTimeout(()=>{if(this.updateValuesTimeout=null,this.tempStates){const n=this.tempStates;this.tempStates=null;const o=JSON.parse(JSON.stringify(this.state.values));let a=!1;Object.keys(n).forEach(s=>{const l=n[s];(o[s]?.val!==l?.val||o[s]?.ack!==l?.ack)&&(a=!0,o[s]=l)}),a&&this.setState({values:o})}},200)};onAliveChanged=(e,r)=>{!!r?.val!==this.state.alive&&this.setState({alive:!!r?.val},()=>{this.state.alive&&setTimeout(()=>this.browse(),1e4)})};browse(e){Date.now()-this.lastBrowse<500||(this.lastBrowse=Date.now(),e?this.setState({loading:!0,browse:!0}):this.setState({browse:!0}),console.log("Send BROWSE!"),this.browseTimer=setTimeout(()=>{console.log("Browse timeout!"),this.browseTimer=null,this.browseTimerCount++,this.browseTimerCount<5?this.browse(e):this.setState({message:D.t("Cannot read devices!")})},1e4),this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"browse3",null).then(r=>{if(this.browseTimer&&(clearTimeout(this.browseTimer),this.browseTimer=null),this.browseTimerCount=0,r?.error)this.setState({message:D.t(r.error)});else if(r){const n=r;this.waitForUpdateID&&(this.onEdit(this.waitForUpdateID,n)||this.setState({message:D.t("Device %s was not added",this.waitForUpdateID)}),this.waitForUpdateID=null),console.log("BROWSE received."),n.sort((o,a)=>o.friendlyName>a.friendlyName?1:o.friendlyName<a.friendlyName?-1:0),this.setState({devices:n,loading:!1,changed:[],browse:!1}),n.length>300&&this.props.onError(D.t("Too many devices (%s) configured. Max number is 300",n.length))}}).catch(r=>this.setState({message:D.t("Error %s",r),browse:!1})))}onReadyUpdate=(e,r)=>{console.log(`Update ${e} ${r?`${r.val}/${r.ack}`:"null"}`),r?.ack===!0&&r.val===!0&&(this.devTimer&&clearTimeout(this.devTimer),this.devTimer=setTimeout(()=>{this.devTimer=null,this.browse()},300))};onResultUpdate=(e,r)=>{r?.ack===!0&&r.val&&this.setState({message:r.val})};componentDidMount(){this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`).then(e=>this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`).then(r=>{!e||!e.common||!e.common.enabled&&(!r||!r.val)?this.setState({message:D.t("Instance must be enabled"),loading:!1,devices:[],alive:!1}):this.setState({alive:!0},()=>this.browse())})),this.props.socket.subscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updates3`,this.onReadyUpdate),this.props.socket.subscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesResult`,this.onResultUpdate),this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAliveChanged)}componentWillUnmount(){this.props.socket.unsubscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updates3`,this.onReadyUpdate),this.updateValuesTimeout&&(clearTimeout(this.updateValuesTimeout),this.updateValuesTimeout=null),this.props.socket.unsubscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesResult`,this.onResultUpdate),this.props.socket.unsubscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAliveChanged),this.unsubscribeAll(),this.timerChanged&&(clearTimeout(this.timerChanged),this.timerChanged=null)}informInstance(e){this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"update",e)}addChanged(e,r){const n=JSON.parse(JSON.stringify(this.state.changed));n.includes(e)?r&&r():(n.push(e),this.setState({changed:n},()=>r?.()))}onEdit(e,r){const n=!!r;r||=this.state.devices;const o=r.find(a=>a.controls.find(s=>Object.values(s.states).find(l=>l.id===e)));return o?(this.props.socket.getObject(e).then(a=>{if(this.objects[e]=a,a){let s=ee.getSmartNameFromObj(a,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon);typeof s=="object"&&s&&(s=s[D.getLanguage()]||s.en),this.editedSmartName=s||"",this.setState({edit:{id:e,type:null,name:this.editedSmartName,typeWasDetected:o.typeWasDetected,possibleTypes:o.possibleTypes,originalType:null,originalName:this.editedSmartName,objectName:ee.getObjectNameFromObj(a,null,{language:D.getLanguage()}),isAfterAdd:n}})}}),!0):!1}onAskDelete(e){this.setState({deleteId:e,showConfirmation:!0})}onDelete(){const e=this.state.deleteId;this.addChanged(e,()=>{this.props.socket.getObject(e).then(r=>{if(this.objects[e]=r,r)return ee.disableSmartName(r,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.props.socket.setObject(e,r)}).then(()=>{this.setState({deleteId:"",showConfirmation:!1,lastChanged:e}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.timerChanged=null,this.setState({lastChanged:""})},3e4),this.informInstance(e)}).catch(r=>this.props.onError(r))})}static renderChannelActions(e){const r=[];return Object.keys(qn).forEach(n=>{if(e.supported.includes(n)){let o;const a=qn[n].icon;let s=Pe.actionIcon,l=null,d=null;if(e.state){if(o=e.state.find(m=>n===m.name),o?.name==="color"&&o?.value&&typeof o.value=="object")o.value=U6(o.value),d=o.value;else if(o?.name==="powerState")(o?.value==="OFF"||o?.value===!1)&&(s={...s,...Pe.deviceOff});else if(o?.name==="detectionState")o?.value==="NOT_DETECTED"&&(s={...s,...Pe.deviceOff});else if(o?.name==="percentage"||o?.name==="relativeHumidity")l=`${o.value===null?"--":Math.round(o.value*100)/100}%`;else if(o?.name==="brightness")l=o.value===null?"--":Math.round(o.value*100)/100;else if(o?.name==="temperature")if(typeof o.value=="object"){const m=o.value?.value;l=(m==null?"--":Math.round(m*100)/100)+(o.value?.scale==="CELSIUS"?"°C":o.value.scale)}else l=o.value;o?.value&&typeof o.value=="object"&&o.value.value!==void 0&&(o.value=`${Math.round(o.value.value*100)/100} ${o.value.scale==="CELSIUS"?"°C":o.value.scale}`)}const p=o?` - ${o.value===null||o.value===void 0?"--":o.value}`:"";r.push(y.jsxs("span",{title:qn[n].label+p,style:Pe.actionSpan,children:[y.jsx(a,{style:{...s,...qn[n]?.style,color:qn[n]?.color,backgroundColor:d}}),l!==null?y.jsx("span",{style:{color:Dn[e.type]?.color},children:l}):null]},n))}else if(e.enforced.includes(n)){const o=qn[n].icon;r.push(y.jsx("span",{title:qn[n].label,style:{...Pe.actionSpan,opacity:.7},children:y.jsx(o,{style:{...Pe.actionIcon,color:qn[n].color}})},n))}}),e.supported.forEach(n=>{qn[n]||r.push(y.jsx("span",{title:n,style:Pe.actionSpan,children:n},n))}),e.enforced.forEach(n=>{qn[n]||r.push(y.jsx("span",{title:n,style:{...Pe.actionSpan,opacity:.7},children:n},n))}),r}static renderDevTypes(e){const r=[];if(!e.controls)return console.log("Something went wrong"),null;const n=[];return e.controls.forEach((o,a)=>{if(!n.includes(o.type)&&(n.push(o.type),Dn[o.type])){const s=Dn[o.type].icon;let l=Pe.actionSpan,d=null,p=null,m=null,u;e.state&&(u=e.state.find(b=>o.supported.includes(b.name)),u?.name==="color"&&u?.value&&typeof u.value=="object"?(m=U6(u.value),u.value=m):u?.name==="powerState"?(u?.value==="OFF"||u?.value===!1)&&(l={...l,...Pe.deviceOff}):u?.name==="detectionState"?u?.value==="NOT_DETECTED"&&(l={...l,...Pe.deviceOff}):u?.name==="percentage"?d=`${u.value===null?"--":Math.round(u.value*100)/100}%`:u?.name==="brightness"&&(p=u.value===null?"--":Math.round(u.value*100)/100),u?.value&&typeof u.value=="object"&&u.value.value!==void 0&&(u.value=`${Math.round(u.value.value*100)/100}} ${u.value.scale==="CELSIUS"?"°C":u.value.scale}`));const g=u?` - ${u.value===null||u.value===void 0?"--":u.value}`:"",_=y.jsxs("span",{title:Dn[o.type].label+g,style:l,children:[y.jsx(s,{style:{...Pe.deviceIcon,color:Dn[o.type].color,backgroundColor:m}}),d!==null?y.jsx("span",{style:{color:Dn[o.type].color},children:d}):null,p!==null?y.jsx("span",{style:{color:Dn[o.type].color},children:p}):null]},`${o.type}_${a}`);o.type!=="Blind"&&o.type!=="Light"&&o.type!=="Socket"?r.unshift(_):r.push(_)}}),r}getControlId(e,r){return r===void 0?this.state.devices[e].friendlyName:`${this.state.devices[e].friendlyName}_${r}`}onExpand(e,r){const n=[...this.state.expanded],o=this.getControlId(e,r),a=n.indexOf(o);if(a===-1)n.push(o);else if(n.splice(a,1),r!==void 0){const s=this.state.devices[e].controls[r];Object.values(s.states).forEach(l=>{l.subscribed=!1,this.unsubscribe(l.id)})}else this.state.devices[e].controls.forEach(l=>{Object.values(l.states).forEach(d=>{d.subscribed=!1,this.unsubscribe(d.id)})});window.localStorage.setItem("v3.expanded",JSON.stringify(n)),this.setState({expanded:n})}renderSelectByOn(e){const r=e.supported.concat(e.enforced);if(r.includes("brightness")&&r.includes("powerState")||r.includes("percentage")&&r.includes("powerState")){const n=Jn.takeIdForSmartName(e),o=typeof n?.smartName=="object"&&n.smartName?.byON||void 0,a=[y.jsx(pt,{value:"",children:y.jsx("em",{children:D.t("Default")})},"_"),y.jsx(pt,{value:"stored",children:D.t("last value")},"last"),y.jsx(pt,{value:"omit",children:D.t("omit value")},"omit")];for(let s=5;s<=100;s+=5)a.push(y.jsxs(pt,{value:s.toString(),children:[s,"%"]},s.toString()));return y.jsxs(gn,{style:Pe.selectType,variant:"standard",children:[y.jsx(Nr,{variant:"standard",style:Pe.devSubLineByOnSelect,value:(o||"").toString(),onChange:s=>n?.id&&this.onParamsChange(n.id,s.target.value),children:a}),y.jsx(Po,{style:Pe.devSubLineTypeTitle,children:D.t("by ON")})]})}return y.jsx("div",{style:Pe.selectType})}onParamsChange(e,r,n){this.addChanged(e,()=>this.props.socket.getObject(e).then(o=>{if(this.objects[e]=o,o)return ee.updateSmartName(o,void 0,r,n,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.state.lastChanged!==e&&(this.setState({lastChanged:e}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4)),this.props.socket.setObject(e,o)}).then(()=>this.informInstance(e)).catch(o=>this.props.onError(o)))}static renderSelectTypeSelector(e,r,n,o){if(e!==!1){const a=[y.jsx(pt,{value:"_",style:{opacity:.5,fontStyle:"normal"},children:y.jsx("em",{children:D.t("Auto-detection")})},"_")];n.length||(n=z1);const s={};Object.keys(Dn).forEach(l=>s[l.toLowerCase()]=l);for(let l=0;l<n.length;l++){const d=Dn[s[n[l].toLowerCase()]],p=d?.icon||null;a.push(y.jsxs(pt,{value:n[l],children:[p?y.jsx(p,{style:{width:20,height:20,marginRight:4,color:d?.color}}):null,D.t(n[l]),r&&e===n[l]?y.jsx("span",{style:{marginLeft:4,color:"orange"},children:"(Auto)"}):null]},n[l]))}return e&&!z1.includes(e)&&(z1.includes(e.toLowerCase())?e=e.toLowerCase():B6[e]&&(e=B6[e])),y.jsxs(gn,{variant:"standard",style:Pe.selectType,children:[y.jsx(Nr,{variant:"standard",value:e||"_",onChange:l=>o(l.target.value==="_"?"":l.target.value),children:a}),y.jsx(Po,{style:Pe.devSubLineTypeTitle,children:D.t("Types")})]})}return null}static takeIdForSmartName(e){const r=Object.values(e.states).find(n=>!!(n?.smartName||!1));return r||Object.values(e.states)[0]}renderSelectType(e,r){if(r.autoDetected)return y.jsx("div",{style:Pe.selectType});const n=Jn.takeIdForSmartName(e),o=n?.smartName?.smartType||!1;return Jn.renderSelectTypeSelector(o,r.typeWasDetected,r.possibleTypes,a=>this.onParamsChange(n.id,void 0,a))}renderStates(e,r){return y.jsx("div",{style:{...Pe.statesLine,background:r},children:Object.keys(e.states).map((n,o)=>{const a=e.states[n].id;a&&!e.states[n].subscribed&&(this.subscribe(a),e.states[n].subscribed=!0);const s=this.objects[a]?.common?.unit||"";let l=this.objects[a]?.common?.states;if(Array.isArray(l)){const u={};l.forEach((g,_)=>u[_]=g),l=u,this.objects[a].common.states=l}let d=null;const p=this.state.values[a];p?l?l[String(p.val)]!==void 0?d=y.jsxs("span",{style:p.ack?Pe.stateValueAck:Pe.stateValueNoAck,children:[l[String(p.val)],"(",String(p.val),")"]}):d=y.jsx("span",{style:p.ack?Pe.stateValueAck:Pe.stateValueNoAck,children:String(p.val)}):s?d=y.jsxs("span",{children:[y.jsx("span",{style:p.ack?Pe.stateValueAck:Pe.stateValueNoAck,children:String(typeof p.val=="number"?Math.round(p.val*1e3)/1e3:p.val)}),y.jsx("span",{style:{opacity:.7,fontSize:"smaller"},children:s})]}):d=y.jsx("span",{style:p.ack?Pe.stateValueAck:Pe.stateValueNoAck,children:String(typeof p.val=="number"?Math.round(p.val*1e3)/1e3:p.val)}):d=y.jsxs("span",{children:["--",s]});let m=null;if(this.objects[a]?.common){let u=ee.getSmartNameFromObj(this.objects[a],`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon);typeof u!="object"&&u&&(u={[this.language]:m}),u&&(m=y.jsxs("div",{children:[y.jsx("div",{style:{fontWeight:"bold"},children:D.t("Content of the smart name structure (for debug)")}),Object.keys(u).map(g=>y.jsxs("div",{children:[y.jsxs("span",{style:{fontWeight:"bold"},children:[g,":"]})," ",u[g].toString()]},g))]}))}return y.jsxs("div",{style:{...Pe.devSubSubLine,...o%2?{background:this.props.themeType==="dark"?`${L6}80`:`${F6}80`}:{background:this.props.themeType==="dark"?L6:F6}},children:[y.jsxs("div",{style:Pe.devSubSubLineName,children:[m?y.jsx(Dr,{title:m,children:y.jsxs("div",{style:Pe.devSubSubLineStateName,children:[n," *",":"]})}):y.jsx("div",{style:Pe.devSubSubLineStateName,children:n}),y.jsx("span",{style:Pe.devSubSubLineStateId,children:a})]}),y.jsx("div",{children:d}),y.jsx("div",{style:{width:370}})]},o)})},"states")}static getParentId(e){const r=e.split(".");return r.pop(),r.join(".")}async findDeviceForState(e){const r=Jn.getParentId(e),n=await this.props.socket.getObject(r);if(this.objects[r]=n,n?.type==="device")return n;if(n&&(n.type==="channel"||n.type==="folder")){let a=Jn.getParentId(r),s=await this.props.socket.getObject(a);return this.objects[a]=s,s?.type==="device"||s?.type==="folder"&&(a=Jn.getParentId(r),s=await this.props.socket.getObject(a),this.objects[a]=s,s?.type==="device")?s:n}const o=await this.props.socket.getObject(e);return this.objects[e]=o,o}getControlProps(e){const r=Jn.takeIdForSmartName(e).id;return this.state.objects[r]===void 0&&!this.requesting[r]&&(this.requesting[r]=!0,setTimeout(()=>{this.findDeviceForState(r).then(n=>{delete this.requesting[r];const o=JSON.parse(JSON.stringify(this.state.objects));n?.common?(o[r]={name:n.common?.name||null,icon:Ptt(n,r,"../..",this.language)},o[r].name=pf(o[r].name,this.language)):o[r]={name:r},this.setState({objects:o})})},50)),this.state.objects[r]?this.state.objects[r]:{name:r}}renderChannels(e,r){return e.controls.map((n,o)=>{if(!n.states||!Object.keys(n.states).length)return null;const a=Jn.takeIdForSmartName(n).id;let s=this.state.changed.includes(a)?M6:this.props.themeType==="dark"?o%2?R6:jtt:o%2?j6:ztt;this.state.lastChanged===a&&(s===R6||s===j6)&&(s=this.props.themeType==="dark"?z6:P6);const l=Dn[n.type]?.icon||null,d=this.state.expanded.includes(this.getControlId(r,o)),p=this.getControlProps(n);return[y.jsxs("div",{style:{...Pe.devSubLine,background:s},children:[y.jsx(Le,{style:Pe.devSubLineExpand,onClick:()=>this.onExpand(r,o),children:y.jsx(SX,{style:d?Pe.devSubLineExpanded:void 0})}),l?y.jsx(l,{style:{...Pe.deviceSmallIcon,color:Dn[n.type]?.color}}):null,y.jsxs("div",{style:Pe.devSubLineName,children:[y.jsx("div",{style:Pe.devSubLineName1,children:D.t(n.type)}),y.jsx("div",{style:Pe.devSubLineName2,children:y.jsxs("div",{style:Pe.devSubLineName2Div,children:[p.icon?p.icon.startsWith("data:image/svg")?y.jsx(Wf,{style:Pe.devSubLineName2Icon,src:p.icon,width:20,height:20}):y.jsx($s,{src:p.icon,style:{...Pe.devSubLineName2Icon,width:20,height:20}}):null,p.name]})})]}),y.jsx("div",{style:Pe.devLineActions,children:Jn.renderChannelActions(n)}),this.renderSelectByOn(n),this.renderSelectType(n,e),e.autoDetected?y.jsx("div",{style:Pe.devLineEdit}):y.jsx(Le,{"aria-label":"Edit",style:Pe.devLineEdit,onClick:()=>this.onEdit(a),children:y.jsx(Um,{fontSize:"middle"})}),y.jsx(Le,{"aria-label":"Delete",style:e.autoDetected?Pe.devLineDelete:Pe.devSubLineDelete,onClick:()=>this.onAskDelete(a),children:y.jsx(Si,{fontSize:"middle"})})]},`channel_${o}`),d?this.renderStates(n,s):null,e.controls.length-1===o?y.jsx("div",{style:{marginBottom:10}},`margin_${o}`):null]})}renderDevice(e,r){const n=e.friendlyName,o=this.state.expanded.includes(n),a=Object.values(e.controls[0].states)[0].id;let s=r%2?this.props.themeType==="dark"?"#272727":"#f1f1f1":"inherit";const l=this.state.changed.includes(a);return l?s=M6:a===this.state.lastChanged&&(s=this.props.themeType==="dark"?z6:P6),[y.jsxs("div",{style:{...Pe.devLine,background:s},children:[y.jsxs("div",{style:Pe.devLineNumber,children:[r+1,"."]}),y.jsx(Le,{style:Pe.devLineExpand,onClick:()=>this.onExpand(r),children:e.controls.length>1?y.jsx(ku,{badgeContent:e.controls.length,color:"primary",children:o?y.jsx(Cc,{}):y.jsx($c,{})}):o?y.jsx(Cc,{}):y.jsx($c,{})}),y.jsxs("div",{style:Pe.devLineNameBlock,children:[e.autoDetected?y.jsxs(y.Fragment,{children:[y.jsx("span",{style:Pe.devLineName,children:n}),y.jsx("span",{style:Pe.devLineDescription,children:D.t("Grouped from %s and %s",pf(e.roomName,this.language),pf(e.funcName,this.language))})]}):n,l?y.jsx(Jr,{style:Pe.devLineProgress,size:20}):null]}),y.jsx("span",{style:Pe.devLineActions,children:Jn.renderDevTypes(e)})]},`line${r}`),o?this.renderChannels(e,r):null]}renderMessage(){return this.state.message?y.jsx(np,{text:this.state.message,onClose:()=>this.setState({message:""})}):null}changeSmartName(e){e?.preventDefault(),this.state.edit&&this.addChanged(this.state.edit.id,()=>{const r=this.state.edit.id,n=this.state.edit.type,o=this.state.edit.name;this.setState({edit:null,lastChanged:r}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.timerChanged=null,this.setState({lastChanged:""})},3e4),this.props.socket.getObject(r).then(a=>{if(this.objects[r]=a,a)return ee.updateSmartName(a,o,void 0,n,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.props.socket.setObject(r,a)}).then(()=>this.informInstance(r)).catch(a=>this.props.onError(a))})}renderEditDialog(){return this.state.edit?y.jsxs(qt,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({edit:null}),"aria-labelledby":"message-dialog-title","aria-describedby":"message-dialog-description",children:[y.jsxs(Gt,{id:"message-dialog-title",children:[this.state.edit.isAfterAdd?y.jsx("div",{children:D.t("The device was added. You can set a smart name now or just keep the current.")}):null,this.props.title||D.t("Smart name for %s",this.state.edit.objectName)]}),y.jsxs(er,{children:[y.jsxs("p",{children:[y.jsx("span",{children:"ID:"})," ",y.jsx("span",{style:Pe.editedId,children:this.state.edit.id})]}),y.jsx(Et,{variant:"standard",style:{width:"100%"},label:D.t("Smart name"),autoFocus:!0,onKeyDown:e=>e.key==="Enter"&&this.changeSmartName(e),onChange:e=>{const r=JSON.parse(JSON.stringify(this.state.edit));r.name=e.target.value,this.setState({edit:r})},value:this.state.edit.name,helperText:D.t("You can enter several names divided by comma"),margin:"normal"}),this.state.edit.type!==null?Jn.renderSelectTypeSelector(this.state.edit.type,this.state.edit.typeWasDetected,this.state.edit.possibleTypes,e=>{const r=JSON.parse(JSON.stringify(this.state.edit));r.type=e,this.setState({edit:r})}):null]}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"contained",disabled:!this.state.edit.name||this.state.edit.originalName===this.state.edit.name&&(this.state.edit.type||null)===(this.state.edit.originalType||null),onClick:()=>this.changeSmartName(),color:"primary",startIcon:y.jsx(Kr,{}),children:D.t("Ok")}),y.jsx(Ue,{variant:"contained",onClick:()=>this.setState({edit:null}),startIcon:y.jsx(Vt,{}),color:"grey",children:this.state.edit.originalName===this.state.edit.name&&(this.state.edit.type||null)===(this.state.edit.originalType||null)?D.t("Close"):D.t("Cancel")})]})]}):null}renderConfirmDialog(){return this.state.showConfirmation?y.jsxs(qt,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({showConfirmation:""}),"aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[y.jsx(Gt,{id:"confirmation-dialog-title",children:this.props.title||D.t("Device %s will be disabled.",this.state.deleteId)}),y.jsx(er,{children:y.jsx("p",{children:D.t("Are you sure?")})}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"contained",onClick:()=>this.onDelete(),color:"primary",autoFocus:!0,startIcon:y.jsx(Si,{}),children:D.t("Delete")}),y.jsx(Ue,{color:"grey",variant:"contained",startIcon:y.jsx(Vt,{}),onClick:()=>this.setState({showConfirmation:""}),children:D.t("Cancel")})]})]}):null}getSelectIdDialog(){return this.state.showSelectId?y.jsx(Bc,{imagePrefix:"../..",theme:this.props.theme,socket:this.props.socket,selected:"",types:["state"],onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{this.setState({showSelectId:!1});const r=Array.isArray(e)?e[0]:e;if(!r){this.setState({message:D.t("Invalid ID")});return}this.props.socket.getObject(r).then(n=>{if(this.objects[r]=n,n){const o=ee.getObjectNameFromObj(n,null,{language:this.language});n.common.role?.includes("button")?this.props.native.noCommon?(n.common.custom||={},n.common.custom[`${this.props.adapterName}.${this.props.instance}`]||={},n.common.custom[`${this.props.adapterName}.${this.props.instance}`].smartName={smartType:"button",[this.language]:o||D.t("Button")}):n.common.smartName={smartType:"button",[this.language]:o||D.t("Button")}:ee.updateSmartName(n,(o||D.t("Device name")).replace(/[-_.]+/g," "),void 0,void 0,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.addChanged(n._id),this.waitForUpdateID=n._id,this.state.lastChanged!==n._id&&(this.setState({lastChanged:n._id}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4)),this.props.socket.setObject(n._id,n).then(()=>this.informInstance(n._id)).catch(a=>this.setState({message:a}))}else this.setState({message:D.t("Invalid ID")})})}},"dialogSelectID1"):null}renderDevices(){const e=this.state.filter.toLowerCase(),r=[];for(let n=0;n<this.state.devices.length;n++)this.state.filter&&!this.state.devices[n].friendlyName.toLowerCase().includes(e)||r.push(this.renderDevice(this.state.devices[n],n));return y.jsx("div",{style:Pe.columnDiv,children:r},"listDevices")}renderListOfDevices(){return this.state.showListOfDevices?y.jsxs(qt,{open:!0,maxWidth:"xl",fullWidth:!0,onClose:()=>this.setState({showListOfDevices:!1}),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[y.jsxs(Gt,{id:"alert-dialog-title",children:[D.t("List of devices to print out, e.g. to give all device names to your partner.")," ",y.jsx("span",{role:"img","aria-label":"smile",children:"😄"})]}),y.jsxs(er,{children:[y.jsx(Ke,{sx:Pe.headerRow,children:y.jsx("div",{style:Pe.headerCell,children:D.t("Name")})}),y.jsx("div",{style:Pe.tableDiv,children:this.state.devices.map((e,r)=>y.jsx("div",{children:y.jsx("div",{style:Pe.tableCell,children:e.friendlyName})},r))})]}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"outlined",onClick:()=>{this.setState({showListOfDevices:!1});const e=this.state.devices.map(r=>r.friendlyName);ee.copyToClipboard(e.join(`
|
|
684
|
+
`))},color:"primary",startIcon:y.jsx(xm,{}),children:D.t("Copy to clipboard")}),y.jsx(Ue,{variant:"contained",startIcon:y.jsx(Vt,{}),onClick:()=>this.setState({showListOfDevices:!1}),autoFocus:!0,color:"grey",children:D.t("Close")})]})]}):null}render(){return this.state.loading?y.jsx(Jr,{},"alexaProgress"):y.jsxs("form",{style:Ct.tab,children:[y.jsx(Zt,{size:"small",color:"secondary","aria-label":"Add",style:Ct.button,onClick:()=>this.setState({showSelectId:!0}),children:y.jsx(Oi,{})}),y.jsx(Zt,{size:"small",color:"primary","aria-label":"Refresh",style:Ct.button,onClick:()=>this.browse(!0),disabled:this.state.browse,children:this.state.browse?y.jsx(Jr,{size:20}):y.jsx(Di,{})}),y.jsx(Zt,{style:{...Ct.button,marginLeft:"1rem"},title:D.t("Show all devices for print out"),size:"small","aria-label":"List of devices",onClick:()=>this.setState({showListOfDevices:!0}),disabled:this.state.browse,children:y.jsx(Wm,{})}),y.jsx(Et,{variant:"standard",placeholder:D.t("Filter"),className:this.state.filter,value:this.state.filter,onChange:e=>this.setState({filter:e.target.value}),slotProps:{input:{endAdornment:this.state.filter?y.jsx(Le,{onClick:()=>this.setState({filter:""}),children:y.jsx(Hm,{})}):void 0}}}),this.renderDevices(),this.renderMessage(),this.renderEditDialog(),this.getSelectIdDialog(),this.renderConfirmDialog(),this.renderListOfDevices()]},"alexa")}}ks.propTypes={native:ae.object.isRequired,instance:ae.number.isRequired,adapterName:ae.string.isRequired,onError:ae.func,socket:ae.object.isRequired,themeType:ae.string,theme:ae.object};function Ntt(t){return Ve({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M1.5 15a.5.5 0 0 0 0 1h13a.5.5 0 0 0 0-1H13V2.5A1.5 1.5 0 0 0 11.5 1H11V.5a.5.5 0 0 0-.57-.495l-7 1A.5.5 0 0 0 3 1.5V15zM11 2h.5a.5.5 0 0 1 .5.5V15h-1zm-2.5 8c-.276 0-.5-.448-.5-1s.224-1 .5-1 .5.448.5 1-.224 1-.5 1"},child:[]}]})(t)}function N6(t){return Ve({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M11.536 14.01A8.47 8.47 0 0 0 14.026 8a8.47 8.47 0 0 0-2.49-6.01l-.708.707A7.48 7.48 0 0 1 13.025 8c0 2.071-.84 3.946-2.197 5.303z"},child:[]},{tag:"path",attr:{d:"M10.121 12.596A6.48 6.48 0 0 0 12.025 8a6.48 6.48 0 0 0-1.904-4.596l-.707.707A5.48 5.48 0 0 1 11.025 8a5.48 5.48 0 0 1-1.61 3.89z"},child:[]},{tag:"path",attr:{d:"M8.707 11.182A4.5 4.5 0 0 0 10.025 8a4.5 4.5 0 0 0-1.318-3.182L8 5.525A3.5 3.5 0 0 1 9.025 8 3.5 3.5 0 0 1 8 10.475zM6.717 3.55A.5.5 0 0 1 7 4v8a.5.5 0 0 1-.812.39L3.825 10.5H1.5A.5.5 0 0 1 1 10V6a.5.5 0 0 1 .5-.5h2.325l2.363-1.89a.5.5 0 0 1 .529-.06"},child:[]}]})(t)}function Mtt(t){return Ve({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M12 5C11.4477 5 11 5.44772 11 6C11 6.55228 11.4477 7 12 7H20C20.5523 7 21 6.55228 21 6C21 5.44772 20.5523 5 20 5H12Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M7 12C7 11.4477 7.44772 11 8 11H16C16.5523 11 17 11.4477 17 12C17 12.5523 16.5523 13 16 13H8C7.44772 13 7 12.5523 7 12Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M3 18C3 17.4477 3.44772 17 4 17H12C12.5523 17 13 17.4477 13 18C13 18.5523 12.5523 19 12 19H4C3.44772 19 3 18.5523 3 18Z",fill:"currentColor"},child:[]}]})(t)}function Rtt(t){return Ve({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3004 7.49991C10.3004 8.4943 9.49426 9.30041 8.49988 9.30041C7.50549 9.30041 6.69938 8.4943 6.69938 7.49991C6.69938 6.50553 7.50549 5.69942 8.49988 5.69942C9.49426 5.69942 10.3004 6.50553 10.3004 7.49991ZM11.205 8C10.9699 9.28029 9.84816 10.2504 8.49988 10.2504C7.1516 10.2504 6.0299 9.28029 5.79473 8H0.5C0.223858 8 0 7.77614 0 7.5C0 7.22386 0.223858 7 0.5 7H5.7947C6.0298 5.71962 7.15154 4.74942 8.49988 4.74942C9.84822 4.74942 10.97 5.71962 11.2051 7H14.5C14.7761 7 15 7.22386 15 7.5C15 7.77614 14.7761 8 14.5 8H11.205Z",fill:"currentColor"},child:[]}]})(t)}var nr=Bm();const M6="#e7000040",R6="#4f4f4f",jtt="#313131",j6="#e9e9e9",ztt="#bbbbbb",z6="#5c8f65",P6="#b4ffbe",L6="#6e6e6e",F6="#d0d0d0",z1=[nr.Types.socket,nr.Types.light,nr.Types.dimmer,nr.Types.thermostat,nr.Types.blind,nr.Types.gate,nr.Types.lock,nr.Types.hue,nr.Types.rgb,nr.Types.rgbSingle,nr.Types.rgbwSingle,nr.Types.ct,nr.Types.motion,nr.Types.slider,nr.Types.temperature,nr.Types.humidity,nr.Types.button,nr.Types.window],B6={LIGHT:nr.Types.light,SWITCH:nr.Types.socket,THERMOSTAT:nr.Types.thermostat,SMARTPLUG:nr.Types.socket,SMARTLOCK:nr.Types.lock,CAMERA:nr.Types.camera,blinds:nr.Types.blind,levelSlider:nr.Types.slider},qn={brightness:{label:"Brightness",icon:yX,color:"#c9b803"},connectivity:{label:"Connectivity",icon:KX,color:"#989898"},color:{label:"Color",icon:GX,color:"#a20030"},colorTemperatureInKelvin:{label:"Color temperature",icon:RX,color:"#019bb6"},detectionState:{label:"Detection",icon:qX,color:"#913c01"},lockState:{label:"Lock",icon:BX,color:"#00519b"},mode:{label:"Mode",icon:HX,color:"#112233"},muted:{label:"Muted",icon:cK,color:"#9701af"},percentage:{label:"Percentage",icon:W7,color:"#009870"},powerState:{label:"Power",icon:eK,color:"#70bd00"},relativeHumidity:{label:"Humidity",icon:V7,color:"#3c58ca",style:{width:24,height:24}},targetSetpoint:{label:"Set point",icon:ZX,color:"#813600"},temperature:{label:"Temperature",icon:$X,color:"#9f1300"},thermostatMode:{label:"Thermostat mode",icon:QX,color:"#800048"},volume:{label:"Volume",icon:dK,color:"#006702"}};let W6=!1;const Dn={AirCondition:{label:"AirCondition",icon:OQe,color:"#001fb9",controllable:!0},Blind:{label:"Blinds",icon:WQe,color:"#00a28f",controllable:!0},Button:{label:"Button/Scene",icon:BQe,color:"#00a28f",controllable:!0},ContactSensor:{label:"Sensor",icon:HQe,color:"#c9b803",controllable:!1},Ct:{label:"Color temperature",icon:s6,color:"#5a9600"},Dimmer:{label:"Dimmer",icon:het,color:"#cb8500",controllable:!0},Door:{label:"Door sensor",icon:Ntt,color:"#ad002a",controllable:!1},Gate:{label:"Gate",icon:uet,color:"#9d02af"},Humidity:{label:"Humidity",icon:V7,color:"#8ca102"},Hue:{label:"Color HUE",icon:s6,color:"#007a96"},Light:{label:"Light",icon:Nu,color:"#c9b803",controllable:!0},Lock:{label:"Lock",icon:yQe,color:"#c9030a"},Motion:{label:"Motion",icon:Mtt,color:"#149100"},Rgb:{label:"RGB(W)",icon:$1,color:"#5a9600"},RgbSingle:{label:"RGB single",icon:$1,color:"#5a9600"},RgbwSingle:{label:"RGBW single",icon:$1,color:"#5a9600"},Slider:{label:"Slider",icon:Rtt,color:"#029a7f"},Socket:{label:"Socket",icon:det,color:"#834303"},Temperature:{label:"Temperature",icon:IQe,color:"#8ca102"},Thermostat:{label:"Thermostat",icon:UQe,color:"#8c4800"},VacuumCleaner:{label:"Vacuum cleaner",icon:JQe,color:"#9e03c9"},Volume:{label:"Volume",icon:N6,color:"#c903c6"},VolumeGroup:{label:"Volume group",icon:N6,color:"#c903c6"},Window:{label:"Window sensor",icon:pet,color:"#27c903"}};let H6=!1;const Pe={tab:{width:"100%",height:"100%"},columnDiv:{height:"calc(100% - 40px)",overflow:"auto",minWidth:300},button:{marginRight:20},devLineExpand:{width:40},devLineEdit:{width:40,marginLeft:5},devLineDelete:{width:40},devLineName:{},devLineNumber:{width:15},editedId:{fontStyle:"italic"},devLine:{height:48,width:"100%",position:"relative",display:"flex",alignItems:"center"},devLineDescription:{display:"block",fontStyle:"italic",fontSize:12},devLineActions:{fontStyle:"italic",fontSize:12,paddingRight:5,display:"flex"},devLineProgress:{position:"absolute",top:0,left:0},devLineNameBlock:{flexGrow:1},actionSpan:{marginRight:5,display:"flex",alignItems:"center"},deviceOff:{filter:"grayscale(0.9)"},actionIcon:{width:16},deviceIcon:{width:24,height:24},deviceSmallIcon:{width:20,height:20},devSubLine:{position:"relative",display:"flex",width:"100%",alignItems:"center"},devSubLineExpand:{marginLeft:15},devSubLineExpanded:{transition:"transform 0.3s",transform:"rotate(90deg)"},devSubLineName:{flexGrow:1,fontSize:13,fontWeight:"bold",marginLeft:5},devSubLineName1:{minWidth:100,marginRight:5,display:"inline-block"},devSubLineName2:{fontWeight:"normal",display:"inline-block"},devSubLineName2Div:{display:"flex",alignItems:"center",gap:5},devSubSubLineName:{fontSize:11,fontStyle:"italic",paddingLeft:10,flexGrow:1},devSubSubLineStateName:{minWidth:121,display:"inline-block",fontWeight:"bold"},devSubSubLineStateId:{marginLeft:5},devSubLineDelete:{},devSubLineTypeTitle:{marginTop:0},statesLine:{position:"relative",width:"calc(100% - 50px)",paddingLeft:50,paddingBottom:5},devSubSubLine:{position:"relative",display:"flex",alignItems:"center",paddingTop:2,paddingBottom:2},headerRow:t=>({pl:1,background:t.palette.primary.main}),headerCell:{display:"inline-block",verticalAlign:"top",width:"100%"},tableCell:{display:"inline-block",verticalAlign:"top",width:"100%"},selectType:{width:130,marginLeft:8},stateValueAck:{},stateValueNoAck:{color:"#ff0000"}};function pf(t,e){return t&&typeof t=="object"?t[e]||t.en:t||""}function Ptt(t,e,r,n){r||=".";let o="";const a=t?.common;if(a){const s=a.icon;if(s)if(s.startsWith("data:image/"))o=s;else if(s.includes(".")){let l;t.type==="instance"||t.type==="adapter"?o=`${r}/adapter/${pf(a.name,n)}/${s}`:e&&e.startsWith("system.adapter.")?(l=e.split(".",3),s[0]==="/"?l[2]+=s:l[2]+=`/${s}`,o=`${r}/adapter/${l[2]}`):(l=e.split(".",2),s[0]==="/"?l[0]+=s:l[0]+=`/${s}`,o=`${r}/adapter/${l[0]}`)}else return null}return o||null}function P1(t){return t.toString(16).padStart(2,"0")}function L1(t){return Math.round(t*255)}function U6(t){const e=t.hue,r=t.saturation,n=t.brightness;let o,a,s;const l=Math.floor(e/60)%6,d=e/60-l,p=n*(1-r),m=n*(1-d*r),u=n*(1-(1-d)*r);switch(l){case 0:o=n,a=u,s=p;break;case 1:o=m,a=n,s=p;break;case 2:o=p,a=n,s=u;break;case 3:o=p,a=m,s=n;break;case 4:o=u,a=p,s=n;break;case 5:o=n,a=p,s=m;break;default:o=0,a=0,s=0}return`#${P1(L1(o))}${P1(L1(a))}${P1(L1(s))}`}class Jn extends T.Component{requesting={};timerChanged=null;devTimer=null;browseTimer=null;browseTimerCount=0;lastBrowse=0;waitForUpdateID=null;language=D.getLanguage();editedSmartName;subscribedStates={};tempStates=null;updateValuesTimeout=null;objects={};collectSubscribes=null;collectSubscribesTimer=null;collectUnsubscribes=null;collectUnsubscribesTimer=null;constructor(e){super(e),W6||(Object.keys(qn).forEach(o=>qn[o].label=D.t(qn[o].label)),W6=!0),H6||(Object.keys(Dn).forEach(o=>Dn[o].label=D.t(Dn[o].label)),H6=!0);const r=window.localStorage.getItem("v3.expanded")||"[]";let n;try{n=JSON.parse(r)}catch{n=[]}this.state={edit:null,deleteId:"",showListOfDevices:!1,showSelectId:!1,showConfirmation:"",changed:[],devices:[],message:"",filter:"",loading:!0,browse:!1,expanded:n,lastChanged:"",objects:{},alive:!1,values:{}}}subscribe(e){if(this.subscribedStates[e])this.subscribedStates[e]++;else{this.subscribedStates[e]=1,this.collectSubscribes||=[],this.collectSubscribes.push(e);const r=this.collectUnsubscribes?.indexOf(e);r!==-1&&r!==void 0&&(this.collectUnsubscribes?.splice(r),this.collectUnsubscribes?.length||(this.collectUnsubscribes=null,this.collectUnsubscribesTimer&&(clearTimeout(this.collectUnsubscribesTimer),this.collectUnsubscribesTimer=null))),this.collectSubscribesTimer&&clearTimeout(this.collectSubscribesTimer),this.collectSubscribesTimer=setTimeout(async()=>{if(this.collectSubscribesTimer=null,this.collectSubscribes?.length){const n=this.collectSubscribes;this.collectSubscribes=null;const o=n.filter(s=>!this.objects[s]),a=await this.props.socket.getObjectsById(o);a&&Object.keys(a).forEach(s=>this.objects[s]=a[s]),this.props.socket.subscribeState(n,this.onStateChange)}},200)}}unsubscribe(e){if(this.subscribedStates[e]&&(this.subscribedStates[e]--,!this.subscribedStates[e])){delete this.subscribedStates[e],this.collectUnsubscribes||=[],this.collectUnsubscribes.push(e);const r=this.collectSubscribes?.indexOf(e);r!==-1&&r!==void 0&&(this.collectSubscribes?.splice(r),this.collectSubscribes?.length||(this.collectSubscribes=null,this.collectSubscribesTimer&&(clearTimeout(this.collectSubscribesTimer),this.collectSubscribesTimer=null))),this.collectUnsubscribesTimer&&clearTimeout(this.collectUnsubscribesTimer),this.collectUnsubscribesTimer=setTimeout(()=>{this.collectUnsubscribesTimer=null,this.collectUnsubscribes?.length&&(this.props.socket.unsubscribeState(this.collectUnsubscribes,this.onStateChange),this.collectUnsubscribes=null)},200)}}unsubscribeAll(){Object.keys(this.subscribedStates).forEach(e=>{this.props.socket.unsubscribeState(e,this.onStateChange),delete this.subscribedStates[e]}),this.state.devices.forEach(e=>{e.controls.forEach(r=>{r.states&&Object.keys(r.states).forEach(n=>{r.states[n]&&(r.states[n].subscribed=!1)})})})}onStateChange=(e,r)=>{this.tempStates||={},this.tempStates[e]=r,this.updateValuesTimeout&&clearTimeout(this.updateValuesTimeout),this.updateValuesTimeout=setTimeout(()=>{if(this.updateValuesTimeout=null,this.tempStates){const n=this.tempStates;this.tempStates=null;const o=JSON.parse(JSON.stringify(this.state.values));let a=!1;Object.keys(n).forEach(s=>{const l=n[s];(o[s]?.val!==l?.val||o[s]?.ack!==l?.ack)&&(a=!0,o[s]=l)}),a&&this.setState({values:o})}},200)};onAliveChanged=(e,r)=>{!!r?.val!==this.state.alive&&this.setState({alive:!!r?.val},()=>{this.state.alive&&setTimeout(()=>this.browse(),1e4)})};browse(e){Date.now()-this.lastBrowse<500||(this.lastBrowse=Date.now(),e?this.setState({loading:!0,browse:!0}):this.setState({browse:!0}),console.log("Send BROWSE!"),this.browseTimer=setTimeout(()=>{console.log("Browse timeout!"),this.browseTimer=null,this.browseTimerCount++,this.browseTimerCount<5?this.browse(e):this.setState({message:D.t("Cannot read devices!")})},1e4),this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"browse3",null).then(r=>{if(this.browseTimer&&(clearTimeout(this.browseTimer),this.browseTimer=null),this.browseTimerCount=0,r?.error)this.setState({message:D.t(r.error)});else if(r){const n=r;this.waitForUpdateID&&(this.onEdit(this.waitForUpdateID,n)||this.setState({message:D.t("Device %s was not added",this.waitForUpdateID)}),this.waitForUpdateID=null),console.log("BROWSE received."),n.sort((o,a)=>o.friendlyName>a.friendlyName?1:o.friendlyName<a.friendlyName?-1:0),this.setState({devices:n,loading:!1,changed:[],browse:!1}),n.length>300&&this.props.onError(D.t("Too many devices (%s) configured. Max number is 300",n.length))}}).catch(r=>this.setState({message:D.t("Error %s",r),browse:!1})))}onReadyUpdate=(e,r)=>{console.log(`Update ${e} ${r?`${r.val}/${r.ack}`:"null"}`),r?.ack===!0&&r.val===!0&&(this.devTimer&&clearTimeout(this.devTimer),this.devTimer=setTimeout(()=>{this.devTimer=null,this.browse()},300))};onResultUpdate=(e,r)=>{r?.ack===!0&&r.val&&this.setState({message:r.val})};componentDidMount(){this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`).then(e=>this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`).then(r=>{!e||!e.common||!e.common.enabled&&(!r||!r.val)?this.setState({message:D.t("Instance must be enabled"),loading:!1,devices:[],alive:!1}):this.setState({alive:!0},()=>this.browse())})),this.props.socket.subscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updates3`,this.onReadyUpdate),this.props.socket.subscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesResult`,this.onResultUpdate),this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAliveChanged)}componentWillUnmount(){this.props.socket.unsubscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updates3`,this.onReadyUpdate),this.updateValuesTimeout&&(clearTimeout(this.updateValuesTimeout),this.updateValuesTimeout=null),this.props.socket.unsubscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesResult`,this.onResultUpdate),this.props.socket.unsubscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAliveChanged),this.unsubscribeAll(),this.timerChanged&&(clearTimeout(this.timerChanged),this.timerChanged=null)}informInstance(e){this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"update",e)}addChanged(e,r){const n=JSON.parse(JSON.stringify(this.state.changed));n.includes(e)?r&&r():(n.push(e),this.setState({changed:n},()=>r?.()))}onEdit(e,r){const n=!!r;r||=this.state.devices;const o=r.find(a=>a.controls.find(s=>Object.values(s.states).find(l=>l.id===e)));return o?(this.props.socket.getObject(e).then(a=>{if(this.objects[e]=a,a){let s=ee.getSmartNameFromObj(a,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon);typeof s=="object"&&s&&(s=s[D.getLanguage()]||s.en),this.editedSmartName=s||"",this.setState({edit:{id:e,type:null,name:this.editedSmartName,typeWasDetected:o.typeWasDetected,possibleTypes:o.possibleTypes,originalType:null,originalName:this.editedSmartName,objectName:ee.getObjectNameFromObj(a,null,{language:D.getLanguage()}),isAfterAdd:n}})}}),!0):!1}onAskDelete(e){this.setState({deleteId:e,showConfirmation:!0})}onDelete(){const e=this.state.deleteId;this.addChanged(e,()=>{this.props.socket.getObject(e).then(r=>{if(this.objects[e]=r,r)return ee.disableSmartName(r,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.props.socket.setObject(e,r)}).then(()=>{this.setState({deleteId:"",showConfirmation:!1,lastChanged:e}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.timerChanged=null,this.setState({lastChanged:""})},3e4),this.informInstance(e)}).catch(r=>this.props.onError(r))})}static renderChannelActions(e){const r=[];return Object.keys(qn).forEach(n=>{if(e.supported.includes(n)){let o;const a=qn[n].icon;let s=Pe.actionIcon,l=null,d=null;if(e.state){if(o=e.state.find(m=>n===m.name),o?.name==="color"&&o?.value&&typeof o.value=="object")o.value=U6(o.value),d=o.value;else if(o?.name==="powerState")(o?.value==="OFF"||o?.value===!1)&&(s={...s,...Pe.deviceOff});else if(o?.name==="detectionState")o?.value==="NOT_DETECTED"&&(s={...s,...Pe.deviceOff});else if(o?.name==="percentage"||o?.name==="relativeHumidity")l=`${o.value===null?"--":Math.round(o.value*100)/100}%`;else if(o?.name==="brightness")l=o.value===null?"--":Math.round(o.value*100)/100;else if(o?.name==="temperature")if(typeof o.value=="object"){const m=o.value?.value;l=(m==null?"--":Math.round(m*100)/100)+(o.value?.scale==="CELSIUS"?"°C":o.value.scale)}else l=o.value;o?.value&&typeof o.value=="object"&&o.value.value!==void 0&&(o.value=`${Math.round(o.value.value*100)/100} ${o.value.scale==="CELSIUS"?"°C":o.value.scale}`)}const p=o?` - ${o.value===null||o.value===void 0?"--":o.value}`:"";r.push(y.jsxs("span",{title:qn[n].label+p,style:Pe.actionSpan,children:[y.jsx(a,{style:{...s,...qn[n]?.style,color:qn[n]?.color,backgroundColor:d}}),l!==null?y.jsx("span",{style:{color:Dn[e.type]?.color},children:l}):null]},n))}else if(e.enforced.includes(n)){const o=qn[n].icon;r.push(y.jsx("span",{title:qn[n].label,style:{...Pe.actionSpan,opacity:.7},children:y.jsx(o,{style:{...Pe.actionIcon,color:qn[n].color}})},n))}}),e.supported.forEach(n=>{qn[n]||r.push(y.jsx("span",{title:n,style:Pe.actionSpan,children:n},n))}),e.enforced.forEach(n=>{qn[n]||r.push(y.jsx("span",{title:n,style:{...Pe.actionSpan,opacity:.7},children:n},n))}),r}static renderDevTypes(e){const r=[];if(!e.controls)return console.log("Something went wrong"),null;const n=[];return e.controls.forEach((o,a)=>{if(!n.includes(o.type)&&(n.push(o.type),Dn[o.type])){const s=Dn[o.type].icon;let l=Pe.actionSpan,d=null,p=null,m=null,u;e.state&&(u=e.state.find(b=>o.supported.includes(b.name)),u?.name==="color"&&u?.value&&typeof u.value=="object"?(m=U6(u.value),u.value=m):u?.name==="powerState"?(u?.value==="OFF"||u?.value===!1)&&(l={...l,...Pe.deviceOff}):u?.name==="detectionState"?u?.value==="NOT_DETECTED"&&(l={...l,...Pe.deviceOff}):u?.name==="percentage"?d=`${u.value===null?"--":Math.round(u.value*100)/100}%`:u?.name==="brightness"&&(p=u.value===null?"--":Math.round(u.value*100)/100),u?.value&&typeof u.value=="object"&&u.value.value!==void 0&&(u.value=`${Math.round(u.value.value*100)/100}} ${u.value.scale==="CELSIUS"?"°C":u.value.scale}`));const g=u?` - ${u.value===null||u.value===void 0?"--":u.value}`:"",_=y.jsxs("span",{title:Dn[o.type].label+g,style:l,children:[y.jsx(s,{style:{...Pe.deviceIcon,color:Dn[o.type].color,backgroundColor:m}}),d!==null?y.jsx("span",{style:{color:Dn[o.type].color},children:d}):null,p!==null?y.jsx("span",{style:{color:Dn[o.type].color},children:p}):null]},`${o.type}_${a}`);o.type!=="Blind"&&o.type!=="Light"&&o.type!=="Socket"?r.unshift(_):r.push(_)}}),r}getControlId(e,r){return r===void 0?this.state.devices[e].friendlyName:`${this.state.devices[e].friendlyName}_${r}`}onExpand(e,r){const n=[...this.state.expanded],o=this.getControlId(e,r),a=n.indexOf(o);if(a===-1)n.push(o);else if(n.splice(a,1),r!==void 0){const s=this.state.devices[e].controls[r];Object.values(s.states).forEach(l=>{l.subscribed=!1,this.unsubscribe(l.id)})}else this.state.devices[e].controls.forEach(l=>{Object.values(l.states).forEach(d=>{d.subscribed=!1,this.unsubscribe(d.id)})});window.localStorage.setItem("v3.expanded",JSON.stringify(n)),this.setState({expanded:n})}renderSelectByOn(e){const r=e.supported.concat(e.enforced);if(r.includes("brightness")&&r.includes("powerState")||r.includes("percentage")&&r.includes("powerState")){const n=Jn.takeIdForSmartName(e),o=typeof n?.smartName=="object"&&n.smartName?.byON||void 0,a=[y.jsx(pt,{value:"",children:y.jsx("em",{children:D.t("Default")})},"_"),y.jsx(pt,{value:"stored",children:D.t("last value")},"last"),y.jsx(pt,{value:"omit",children:D.t("omit value")},"omit")];let s=this.props.native.deviceOffLevel?parseInt(this.props.native.deviceOffLevel,10):0;s<5&&(s=5),s=Math.ceil(s/5)*5;for(let l=s;l<=100;l+=5)a.push(y.jsxs(pt,{value:l.toString(),children:[l,"%"]},l.toString()));return y.jsxs(gn,{style:Pe.selectType,variant:"standard",children:[y.jsx(Nr,{variant:"standard",style:Pe.devSubLineByOnSelect,value:(o||"").toString(),onChange:l=>n?.id&&this.onParamsChange(n.id,l.target.value),children:a}),y.jsx(Po,{style:Pe.devSubLineTypeTitle,children:D.t("by ON")})]})}return y.jsx("div",{style:Pe.selectType})}onParamsChange(e,r,n){this.addChanged(e,()=>this.props.socket.getObject(e).then(o=>{if(this.objects[e]=o,o)return ee.updateSmartName(o,void 0,r,n,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.state.lastChanged!==e&&(this.setState({lastChanged:e}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4)),this.props.socket.setObject(e,o)}).then(()=>this.informInstance(e)).catch(o=>this.props.onError(o)))}static renderSelectTypeSelector(e,r,n,o){if(e!==!1){const a=[y.jsx(pt,{value:"_",style:{opacity:.5,fontStyle:"normal"},children:y.jsx("em",{children:D.t("Auto-detection")})},"_")];n.length||(n=z1);const s={};Object.keys(Dn).forEach(l=>s[l.toLowerCase()]=l);for(let l=0;l<n.length;l++){const d=Dn[s[n[l].toLowerCase()]],p=d?.icon||null;a.push(y.jsxs(pt,{value:n[l],children:[p?y.jsx(p,{style:{width:20,height:20,marginRight:4,color:d?.color}}):null,D.t(n[l]),r&&e===n[l]?y.jsx("span",{style:{marginLeft:4,color:"orange"},children:"(Auto)"}):null]},n[l]))}return e&&!z1.includes(e)&&(z1.includes(e.toLowerCase())?e=e.toLowerCase():B6[e]&&(e=B6[e])),y.jsxs(gn,{variant:"standard",style:Pe.selectType,children:[y.jsx(Nr,{variant:"standard",value:e||"_",onChange:l=>o(l.target.value==="_"?"":l.target.value),children:a}),y.jsx(Po,{style:Pe.devSubLineTypeTitle,children:D.t("Types")})]})}return null}static takeIdForSmartName(e){const r=Object.values(e.states).find(n=>!!(n?.smartName||!1));return r||Object.values(e.states)[0]}renderSelectType(e,r){if(r.autoDetected)return y.jsx("div",{style:Pe.selectType});const n=Jn.takeIdForSmartName(e),o=n?.smartName?.smartType||!1;return Jn.renderSelectTypeSelector(o,r.typeWasDetected,r.possibleTypes,a=>this.onParamsChange(n.id,void 0,a))}renderStates(e,r){return y.jsx("div",{style:{...Pe.statesLine,background:r},children:Object.keys(e.states).map((n,o)=>{const a=e.states[n].id;a&&!e.states[n].subscribed&&(this.subscribe(a),e.states[n].subscribed=!0);const s=this.objects[a]?.common?.unit||"";let l=this.objects[a]?.common?.states;if(Array.isArray(l)){const u={};l.forEach((g,_)=>u[_]=g),l=u,this.objects[a].common.states=l}let d=null;const p=this.state.values[a];p?l?l[String(p.val)]!==void 0?d=y.jsxs("span",{style:p.ack?Pe.stateValueAck:Pe.stateValueNoAck,children:[l[String(p.val)],"(",String(p.val),")"]}):d=y.jsx("span",{style:p.ack?Pe.stateValueAck:Pe.stateValueNoAck,children:String(p.val)}):s?d=y.jsxs("span",{children:[y.jsx("span",{style:p.ack?Pe.stateValueAck:Pe.stateValueNoAck,children:String(typeof p.val=="number"?Math.round(p.val*1e3)/1e3:p.val)}),y.jsx("span",{style:{opacity:.7,fontSize:"smaller"},children:s})]}):d=y.jsx("span",{style:p.ack?Pe.stateValueAck:Pe.stateValueNoAck,children:String(typeof p.val=="number"?Math.round(p.val*1e3)/1e3:p.val)}):d=y.jsxs("span",{children:["--",s]});let m=null;if(this.objects[a]?.common){let u=ee.getSmartNameFromObj(this.objects[a],`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon);typeof u!="object"&&u&&(u={[this.language]:m}),u&&(m=y.jsxs("div",{children:[y.jsx("div",{style:{fontWeight:"bold"},children:D.t("Content of the smart name structure (for debug)")}),Object.keys(u).map(g=>y.jsxs("div",{children:[y.jsxs("span",{style:{fontWeight:"bold"},children:[g,":"]})," ",u[g].toString()]},g))]}))}return y.jsxs("div",{style:{...Pe.devSubSubLine,...o%2?{background:this.props.themeType==="dark"?`${L6}80`:`${F6}80`}:{background:this.props.themeType==="dark"?L6:F6}},children:[y.jsxs("div",{style:Pe.devSubSubLineName,children:[m?y.jsx(Dr,{title:m,children:y.jsxs("div",{style:Pe.devSubSubLineStateName,children:[n," *",":"]})}):y.jsx("div",{style:Pe.devSubSubLineStateName,children:n}),y.jsx("span",{style:Pe.devSubSubLineStateId,children:a})]}),y.jsx("div",{children:d}),y.jsx("div",{style:{width:370}})]},o)})},"states")}static getParentId(e){const r=e.split(".");return r.pop(),r.join(".")}async findDeviceForState(e){const r=Jn.getParentId(e),n=await this.props.socket.getObject(r);if(this.objects[r]=n,n?.type==="device")return n;if(n&&(n.type==="channel"||n.type==="folder")){let a=Jn.getParentId(r),s=await this.props.socket.getObject(a);return this.objects[a]=s,s?.type==="device"||s?.type==="folder"&&(a=Jn.getParentId(r),s=await this.props.socket.getObject(a),this.objects[a]=s,s?.type==="device")?s:n}const o=await this.props.socket.getObject(e);return this.objects[e]=o,o}getControlProps(e){const r=Jn.takeIdForSmartName(e).id;return this.state.objects[r]===void 0&&!this.requesting[r]&&(this.requesting[r]=!0,setTimeout(()=>{this.findDeviceForState(r).then(n=>{delete this.requesting[r];const o=JSON.parse(JSON.stringify(this.state.objects));n?.common?(o[r]={name:n.common?.name||null,icon:Ptt(n,r,"../..",this.language)},o[r].name=pf(o[r].name,this.language)):o[r]={name:r},this.setState({objects:o})})},50)),this.state.objects[r]?this.state.objects[r]:{name:r}}renderChannels(e,r){return e.controls.map((n,o)=>{if(!n.states||!Object.keys(n.states).length)return null;const a=Jn.takeIdForSmartName(n).id;let s=this.state.changed.includes(a)?M6:this.props.themeType==="dark"?o%2?R6:jtt:o%2?j6:ztt;this.state.lastChanged===a&&(s===R6||s===j6)&&(s=this.props.themeType==="dark"?z6:P6);const l=Dn[n.type]?.icon||null,d=this.state.expanded.includes(this.getControlId(r,o)),p=this.getControlProps(n);return[y.jsxs("div",{style:{...Pe.devSubLine,background:s},children:[y.jsx(Le,{style:Pe.devSubLineExpand,onClick:()=>this.onExpand(r,o),children:y.jsx(SX,{style:d?Pe.devSubLineExpanded:void 0})}),l?y.jsx(l,{style:{...Pe.deviceSmallIcon,color:Dn[n.type]?.color}}):null,y.jsxs("div",{style:Pe.devSubLineName,children:[y.jsx("div",{style:Pe.devSubLineName1,children:D.t(n.type)}),y.jsx("div",{style:Pe.devSubLineName2,children:y.jsxs("div",{style:Pe.devSubLineName2Div,children:[p.icon?p.icon.startsWith("data:image/svg")?y.jsx(Wf,{style:Pe.devSubLineName2Icon,src:p.icon,width:20,height:20}):y.jsx($s,{src:p.icon,style:{...Pe.devSubLineName2Icon,width:20,height:20}}):null,p.name]})})]}),y.jsx("div",{style:Pe.devLineActions,children:Jn.renderChannelActions(n)}),this.renderSelectByOn(n),this.renderSelectType(n,e),e.autoDetected?y.jsx("div",{style:Pe.devLineEdit}):y.jsx(Le,{"aria-label":"Edit",style:Pe.devLineEdit,onClick:()=>this.onEdit(a),children:y.jsx(Um,{fontSize:"middle"})}),y.jsx(Le,{"aria-label":"Delete",style:e.autoDetected?Pe.devLineDelete:Pe.devSubLineDelete,onClick:()=>this.onAskDelete(a),children:y.jsx(Si,{fontSize:"middle"})})]},`channel_${o}`),d?this.renderStates(n,s):null,e.controls.length-1===o?y.jsx("div",{style:{marginBottom:10}},`margin_${o}`):null]})}renderDevice(e,r){const n=e.friendlyName,o=this.state.expanded.includes(n),a=Object.values(e.controls[0].states)[0].id;let s=r%2?this.props.themeType==="dark"?"#272727":"#f1f1f1":"inherit";const l=this.state.changed.includes(a);return l?s=M6:a===this.state.lastChanged&&(s=this.props.themeType==="dark"?z6:P6),[y.jsxs("div",{style:{...Pe.devLine,background:s},children:[y.jsxs("div",{style:Pe.devLineNumber,children:[r+1,"."]}),y.jsx(Le,{style:Pe.devLineExpand,onClick:()=>this.onExpand(r),children:e.controls.length>1?y.jsx(ku,{badgeContent:e.controls.length,color:"primary",children:o?y.jsx(Cc,{}):y.jsx($c,{})}):o?y.jsx(Cc,{}):y.jsx($c,{})}),y.jsxs("div",{style:Pe.devLineNameBlock,children:[e.autoDetected?y.jsxs(y.Fragment,{children:[y.jsx("span",{style:Pe.devLineName,children:n}),y.jsx("span",{style:Pe.devLineDescription,children:D.t("Grouped from %s and %s",pf(e.roomName,this.language),pf(e.funcName,this.language))})]}):n,l?y.jsx(Jr,{style:Pe.devLineProgress,size:20}):null]}),y.jsx("span",{style:Pe.devLineActions,children:Jn.renderDevTypes(e)})]},`line${r}`),o?this.renderChannels(e,r):null]}renderMessage(){return this.state.message?y.jsx(np,{text:this.state.message,onClose:()=>this.setState({message:""})}):null}changeSmartName(e){e?.preventDefault(),this.state.edit&&this.addChanged(this.state.edit.id,()=>{const r=this.state.edit.id,n=this.state.edit.type,o=this.state.edit.name;this.setState({edit:null,lastChanged:r}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.timerChanged=null,this.setState({lastChanged:""})},3e4),this.props.socket.getObject(r).then(a=>{if(this.objects[r]=a,a)return ee.updateSmartName(a,o,void 0,n,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.props.socket.setObject(r,a)}).then(()=>this.informInstance(r)).catch(a=>this.props.onError(a))})}renderEditDialog(){return this.state.edit?y.jsxs(qt,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({edit:null}),"aria-labelledby":"message-dialog-title","aria-describedby":"message-dialog-description",children:[y.jsxs(Gt,{id:"message-dialog-title",children:[this.state.edit.isAfterAdd?y.jsx("div",{children:D.t("The device was added. You can set a smart name now or just keep the current.")}):null,this.props.title||D.t("Smart name for %s",this.state.edit.objectName)]}),y.jsxs(er,{children:[y.jsxs("p",{children:[y.jsx("span",{children:"ID:"})," ",y.jsx("span",{style:Pe.editedId,children:this.state.edit.id})]}),y.jsx(Et,{variant:"standard",style:{width:"100%"},label:D.t("Smart name"),autoFocus:!0,onKeyDown:e=>e.key==="Enter"&&this.changeSmartName(e),onChange:e=>{const r=JSON.parse(JSON.stringify(this.state.edit));r.name=e.target.value,this.setState({edit:r})},value:this.state.edit.name,helperText:D.t("You can enter several names divided by comma"),margin:"normal"}),this.state.edit.type!==null?Jn.renderSelectTypeSelector(this.state.edit.type,this.state.edit.typeWasDetected,this.state.edit.possibleTypes,e=>{const r=JSON.parse(JSON.stringify(this.state.edit));r.type=e,this.setState({edit:r})}):null]}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"contained",disabled:!this.state.edit.name||this.state.edit.originalName===this.state.edit.name&&(this.state.edit.type||null)===(this.state.edit.originalType||null),onClick:()=>this.changeSmartName(),color:"primary",startIcon:y.jsx(Kr,{}),children:D.t("Ok")}),y.jsx(Ue,{variant:"contained",onClick:()=>this.setState({edit:null}),startIcon:y.jsx(Vt,{}),color:"grey",children:this.state.edit.originalName===this.state.edit.name&&(this.state.edit.type||null)===(this.state.edit.originalType||null)?D.t("Close"):D.t("Cancel")})]})]}):null}renderConfirmDialog(){return this.state.showConfirmation?y.jsxs(qt,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({showConfirmation:""}),"aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[y.jsx(Gt,{id:"confirmation-dialog-title",children:this.props.title||D.t("Device %s will be disabled.",this.state.deleteId)}),y.jsx(er,{children:y.jsx("p",{children:D.t("Are you sure?")})}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"contained",onClick:()=>this.onDelete(),color:"primary",autoFocus:!0,startIcon:y.jsx(Si,{}),children:D.t("Delete")}),y.jsx(Ue,{color:"grey",variant:"contained",startIcon:y.jsx(Vt,{}),onClick:()=>this.setState({showConfirmation:""}),children:D.t("Cancel")})]})]}):null}getSelectIdDialog(){return this.state.showSelectId?y.jsx(Bc,{imagePrefix:"../..",theme:this.props.theme,socket:this.props.socket,selected:"",types:["state"],onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{this.setState({showSelectId:!1});const r=Array.isArray(e)?e[0]:e;if(!r){this.setState({message:D.t("Invalid ID")});return}this.props.socket.getObject(r).then(n=>{if(this.objects[r]=n,n){const o=ee.getObjectNameFromObj(n,null,{language:this.language});n.common.role?.includes("button")?this.props.native.noCommon?(n.common.custom||={},n.common.custom[`${this.props.adapterName}.${this.props.instance}`]||={},n.common.custom[`${this.props.adapterName}.${this.props.instance}`].smartName={smartType:"button",[this.language]:o||D.t("Button")}):n.common.smartName={smartType:"button",[this.language]:o||D.t("Button")}:ee.updateSmartName(n,(o||D.t("Device name")).replace(/[-_.]+/g," "),void 0,void 0,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.addChanged(n._id),this.waitForUpdateID=n._id,this.state.lastChanged!==n._id&&(this.setState({lastChanged:n._id}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4)),this.props.socket.setObject(n._id,n).then(()=>this.informInstance(n._id)).catch(a=>this.setState({message:a}))}else this.setState({message:D.t("Invalid ID")})})}},"dialogSelectID1"):null}renderDevices(){const e=this.state.filter.toLowerCase(),r=[];for(let n=0;n<this.state.devices.length;n++)this.state.filter&&!this.state.devices[n].friendlyName.toLowerCase().includes(e)||r.push(this.renderDevice(this.state.devices[n],n));return y.jsx("div",{style:Pe.columnDiv,children:r},"listDevices")}renderListOfDevices(){return this.state.showListOfDevices?y.jsxs(qt,{open:!0,maxWidth:"xl",fullWidth:!0,onClose:()=>this.setState({showListOfDevices:!1}),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[y.jsxs(Gt,{id:"alert-dialog-title",children:[D.t("List of devices to print out, e.g. to give all device names to your partner.")," ",y.jsx("span",{role:"img","aria-label":"smile",children:"😄"})]}),y.jsxs(er,{children:[y.jsx(Ke,{sx:Pe.headerRow,children:y.jsx("div",{style:Pe.headerCell,children:D.t("Name")})}),y.jsx("div",{style:Pe.tableDiv,children:this.state.devices.map((e,r)=>y.jsx("div",{children:y.jsx("div",{style:Pe.tableCell,children:e.friendlyName})},r))})]}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"outlined",onClick:()=>{this.setState({showListOfDevices:!1});const e=this.state.devices.map(r=>r.friendlyName);ee.copyToClipboard(e.join(`
|
|
685
685
|
`))},color:"primary",startIcon:y.jsx(xm,{}),children:D.t("Copy to clipboard")}),y.jsx(Ue,{variant:"contained",startIcon:y.jsx(Vt,{}),onClick:()=>this.setState({showListOfDevices:!1}),autoFocus:!0,color:"grey",children:D.t("Close")})]})]}):null}render(){return this.state.loading?y.jsx(Jr,{},"alexaProgress"):y.jsxs("form",{style:Pe.tab,children:[y.jsx(Zt,{size:"small",color:"secondary","aria-label":"Add",title:D.t("Add new device from state"),disabled:!!this.state.lastChanged&&!!this.waitForUpdateID||!this.state.alive,style:Pe.button,onClick:()=>this.setState({showSelectId:!0}),children:this.state.lastChanged&&this.waitForUpdateID?y.jsx(Jr,{}):y.jsx(Oi,{})}),y.jsx(Zt,{size:"small",color:"primary",title:D.t("Refresh list of devices"),"aria-label":"Refresh",style:Pe.button,onClick:()=>this.browse(!0),disabled:this.state.browse||!this.state.alive,children:this.state.browse?y.jsx(Jr,{size:20}):y.jsx(Di,{})}),y.jsx(Le,{title:D.t("Expand all devices"),onClick:()=>{const e=[];this.state.devices.forEach((r,n)=>{e.push(r.friendlyName),r.controls.forEach((o,a)=>{e.push(this.getControlId(n,a))})}),window.localStorage.setItem("v3.expanded",JSON.stringify(e)),this.setState({expanded:e})},children:y.jsx(rK,{})}),y.jsx(Le,{disabled:!this.state.expanded.length,onClick:()=>{this.setState({expanded:[]}),this.unsubscribeAll(),window.localStorage.removeItem("v3.expanded")},title:D.t("Collapse all devices"),children:y.jsx(tK,{})}),y.jsx(Zt,{style:{...Pe.button,marginLeft:"1rem"},title:D.t("Show all devices for print out"),size:"small","aria-label":"List of devices",onClick:()=>this.setState({showListOfDevices:!0}),disabled:this.state.browse||!this.state.alive,children:y.jsx(Wm,{})}),y.jsx(Et,{variant:"standard",placeholder:D.t("Filter"),value:this.state.filter,onChange:e=>this.setState({filter:e.target.value}),slotProps:{input:{endAdornment:this.state.filter?y.jsx(Le,{onClick:()=>this.setState({filter:""}),children:y.jsx(Hm,{})}):void 0}}}),this.renderDevices(),this.renderMessage(),this.renderEditDialog(),this.getSelectIdDialog(),this.renderConfirmDialog(),this.renderListOfDevices()]},"alexa")}}const Kh="#aba613",F1="#444",Yh="#00c6ff",Ltt="#ff7ee3",ui="#00bc00",Ftt="#e7000040",Btt="#4f4f4f",Wtt="#e9e9e9",Htt="#5c8f65",Utt="#b4ffbe",ra={OnOff:{color:Kh,icon:Bb,desc:"On/Off"},Brightness:{color:Yh,icon:Nu,desc:"Dimmer"},RGB:{color:Ltt,icon:Nu,desc:"Set color"},setTargetTemperature:{color:Yh,icon:H7,desc:"Set target temperature"},incrementTargetTemperature:{color:Kh,icon:cc,desc:"Increment target temperature"},decrementTargetTemperature:{color:F1,icon:lc,desc:"Decrement target temperature"},incrementPercentage:{color:Kh,icon:cc,desc:"Increment percentage"},decrementPercentage:{color:F1,icon:lc,desc:"Decrement percentage"},setColor:{color:Yh,icon:B7,desc:"Set color"},incrementColorTemperature:{color:Kh,icon:cc,desc:"Increment color temperature"},decrementColorTemperature:{color:F1,icon:lc,desc:"Decrement color temperature"},getTargetTemperature:{color:ui,icon:hu,desc:"Get target temperature"},getTemperatureReading:{color:ui,icon:hu,desc:"Get actual temperature"},setLockState:{color:Yh,icon:Vf,desc:"Set lock state"},getLockState:{color:ui,icon:Vf,desc:"Read lock state"},getActualTemperature:{color:ui,icon:hu,desc:"Get actual temperature"},getActualHumidity:{color:ui,icon:NQe,desc:"Get actual humidity"},getMotion:{color:ui,icon:TQe,desc:"Get motion"},getContact:{color:ui,icon:CQe,desc:"Get contact"}},Bt={tab:{width:"100%",height:"100%"},columnDiv:{height:"calc(100% - 40px)",overflow:"auto",minWidth:300},button:{marginRight:20},devLineExpand:{marginRight:10},devLineEdit:{position:"absolute",top:5,right:50},devLineDelete:{position:"absolute",top:5,right:0},devLineName:{},devLineNumber:{display:"inline-block",verticalAlign:"middle",width:15},editedId:{fontStyle:"italic"},devLine:{height:48,width:"100%",position:"relative"},devLineDescription:{display:"block",fontStyle:"italic",fontSize:12},devLineActions:{fontStyle:"italic",fontSize:12,paddingLeft:50,display:"inline-block"},devLineProgress:{position:"absolute",top:0,left:0},devLineNameBlock:{display:"inline-block",width:"calc(100% - 350px)"},actionIcon:{width:16},devSubLine:{position:"relative",height:48},devSubLineName:{marginLeft:5,marginTop:14,minWidth:100,display:"inline-block",fontSize:13,paddingLeft:70},devSubSubLine:{fontSize:10,fontStyle:"italic",display:"inline-block",marginLeft:15},devSubLineSetId:{fontStyle:"italic",display:"block",color:"#999"},headerRow:t=>({paddingLeft:t.spacing(1),background:t.palette.primary.main}),headerCell:{display:"inline-block",verticalAlign:"top",width:"100%"},tableCell:{display:"inline-block",verticalAlign:"top",width:"100%"}};class qm extends T.Component{constructor(e){super(e),ra.translated||(Object.keys(ra).forEach(r=>ra[r].desc=D.t(ra[r].desc)),ra.translated=!0),this.state={editedSmartName:"",editId:"",editObjectName:"",deleteId:"",showSelectId:!1,showConfirmation:"",changed:[],devices:[],message:"",filter:"",loading:!0,browse:!1,expanded:[],lastChanged:""},this.timerChanged=null,this.browseTimer=null,this.browseTimerCount=0,this.editedSmartName="",this.waitForUpdateID=null,this.onReadyUpdateBound=this.onReadyUpdate.bind(this),this.onResultUpdateBound=this.onResultUpdate.bind(this),this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`).then(r=>{this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`).then(n=>{!r||!r.common||!r.common.enabled&&(!n||!n.val)?this.setState({message:D.t("Instance must be enabled"),loading:!1,devices:[]}):this.browse()})})}browse(e){Date.now()-this.lastBrowse<500||(this.lastBrowse=Date.now(),e?this.setState({loading:!0,browse:!0}):this.setState({browse:!0}),this.browseTimer=setTimeout(()=>{this.browseTimer=null,this.browseTimerCount++,this.browseTimerCount<5?this.browse(e):this.setState({message:D.t("Cannot read devices!")})},1e4),this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"browseAlisa",null).then(r=>{this.browseTimer&&clearTimeout(this.browseTimer),this.browseTimerCount=0,this.browseTimer=null,r&&r.error?this.setState({message:D.t(r.error)}):(this.waitForUpdateID&&(this.onEdit(this.waitForUpdateID,r)||this.setState({message:D.t("Device %s was not added",this.waitForUpdateID)}),this.waitForUpdateID=null),this.setState({devices:r,loading:!1,changed:[],browse:!1}))}))}onReadyUpdate(e,r){r&&r.ack===!0&&r.val===!0&&(this.devTimer&&clearTimeout(this.devTimer),this.devTimer=setTimeout(()=>{this.devTimer=null,this.browse()},300))}onResultUpdate(e,r){r&&r.ack===!0&&r.val&&this.setState({message:r.val})}componentDidMount(){this.props.socket.subscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updates`,this.onReadyUpdateBound),this.props.socket.subscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesResult`,this.onResultUpdateBound)}componentWillUnmount(){this.props.socket.unsubscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updates`,this.onReadyUpdateBound),this.props.socket.unsubscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesResult`,this.onResultUpdateBound),this.timerChanged&&(clearTimeout(this.timerChanged),this.timerChanged=null)}informInstance(e){this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"update",e)}addChanged(e,r){const n=JSON.parse(JSON.stringify(this.state.changed));n.includes(e)?r&&r():(n.push(e),this.setState({changed:n},()=>r&&r()))}onEdit(e,r){r=r||this.state.devices;const n=r.find(o=>o.iobID===e);if(n){let o=n.name;return typeof o=="object"&&o&&(o=o[D.getLanguage()]||o.en),this.editedSmartName=o,this.setState({editId:e,editedSmartName:o,editObjectName:o}),!0}return!1}onAskDelete(e){this.setState({deleteId:e,showConfirmation:!0})}onDelete(){const e=this.state.deleteId;this.addChanged(e,()=>{this.props.socket.getObject(e).then(r=>(ee.disableSmartName(r,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.props.socket.setObject(e,r))).then(()=>{this.setState({deleteId:"",showConfirmation:!1,lastChanged:e}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4),this.informInstance(e)}).catch(r=>this.props.onError(r))})}static renderActions(e){const r=[];if(!e.actions)return console.log("Something went wrong"),null;e.actions.sort((n,o)=>n===o?0:n==="OnOff"?-1:o==="OnOff"?1:0),Object.keys(ra).forEach(n=>{if(e.actions.includes(n)){const o=ra[n].icon;r.push(y.jsx("span",{title:ra[n].desc,children:y.jsx(o,{style:{...Bt.actionIcon,color:ra[n].color}})},n))}});for(let n=0;n<e.actions.length;n++)ra[e.actions[n]]||r.push(y.jsx("span",{children:e.actions[n]},e.actions[n]));return r}onExpand(e){const r=JSON.parse(JSON.stringify(this.state.expanded)),n=r.indexOf(this.state.devices[e].name);n===-1?r.push(this.state.devices[e].name):r.splice(n,1),this.setState({expanded:r})}renderChannels(e,r){const n=[],o=e.main.getId||e.iobID,a=e.func,s=this.props.themeType==="dark"?Btt:Wtt;return n.push(y.jsxs("div",{style:{...Bt.devSubLine,background:s},children:[y.jsx("div",{style:Bt.devSubLineName,children:a.toUpperCase()}),y.jsxs("div",{style:Bt.devSubSubLine,children:[y.jsx("div",{children:e.main.getId}),e.main.setId&&e.main.setId!==e.main.getId?y.jsx("div",{style:Bt.devSubLineSetId,children:e.main.setId}):null]})]},`sub${o}_${r}`)),e.attributes.forEach(l=>{n.push(y.jsxs("div",{style:{...Bt.devSubLine,background:s},children:[y.jsx("div",{style:Bt.devSubLineName,children:l.name.toUpperCase()}),y.jsxs("div",{style:Bt.devSubSubLine,children:[y.jsx("div",{children:l.getId}),l.setId&&l.setId!==l.getId?y.jsx("div",{style:Bt.devSubLineSetId,children:l.setId}):null]})]},`sub${l.getId}`))}),n}renderDevice(e,r){const n=this.state.expanded.includes(e.name);let o=r%2?this.props.themeType==="dark"?"#272727":"#f1f1f1":"inherit";const a=this.state.changed.includes(e.iobID);return a?o=Ftt:e.iobID===this.state.lastChanged&&(o=this.props.themeType==="dark"?Htt:Utt),[y.jsxs("div",{style:{...Bt.devLine,background:o},children:[y.jsxs("div",{style:Bt.devLineNumber,children:[r+1,"."]}),y.jsx(Le,{style:Bt.devLineExpand,onClick:()=>this.onExpand(r),children:e.attributes.length?y.jsx(ku,{badgeContent:e.attributes.length,color:"primary",children:n?y.jsx(Cc,{}):y.jsx($c,{})}):n?y.jsx(Cc,{}):y.jsx($c,{})}),y.jsxs("div",{style:{...Bt.devLineNameBlock,display:"inline-block",position:"relative"},children:[y.jsx("span",{style:Bt.devLineName,children:e.name}),y.jsx("span",{style:Bt.devLineDescription,children:e.description}),a?y.jsx(Jr,{style:Bt.devLineProgress,size:20}):null]}),y.jsx("span",{style:Bt.devLineActions,children:qm.renderActions(e)}),y.jsx(Le,{"aria-label":"Edit",style:Bt.devLineEdit,onClick:()=>this.onEdit(e.iobID),children:y.jsx(Um,{fontSize:"middle"})}),y.jsx(Le,{"aria-label":"Delete",style:Bt.devLineDelete,onClick:()=>this.onAskDelete(e.iobID),children:y.jsx(Si,{fontSize:"middle"})})]},`line${r}`),n?this.renderChannels(e,r):null]}renderMessage(){return this.state.message?y.jsx(np,{text:this.state.message,onClose:()=>this.setState({message:""})}):null}changeSmartName(e){e&&e.preventDefault(),this.addChanged(this.state.editId,()=>{const r=this.state.editId;this.setState({editId:"",editObjectName:"",lastChanged:r}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4),this.props.socket.getObject(r).then(n=>(ee.updateSmartName(n,this.editedSmartName,void 0,void 0,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.props.socket.setObject(r,n))).then(()=>this.informInstance(r)).catch(n=>this.props.onError(n))})}renderEditDialog(){return this.state.editId?y.jsxs(qt,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>{this.editedSmartName=null,this.setState({editId:"",editedSmartName:""})},"aria-labelledby":"message-dialog-title","aria-describedby":"message-dialog-description",children:[y.jsx(Gt,{id:"message-dialog-title",children:this.props.title||D.t("Smart name for %s",this.state.editObjectName)}),y.jsxs(er,{children:[y.jsxs("p",{children:[y.jsx("span",{children:"ID:"})," ",y.jsx("span",{style:Bt.editedId,children:this.state.editId})]}),y.jsx(Et,{variant:"standard",style:{width:"100%"},label:D.t("Smart name"),autoFocus:!0,onKeyDown:e=>e.key==="Enter"&&this.changeSmartName(e),onChange:e=>this.editedSmartName=e.target.value,defaultValue:this.state.editedSmartName,helperText:D.t("You can enter several names divided by comma"),margin:"normal"})]}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"contained",onClick:()=>this.changeSmartName(),color:"primary",startIcon:y.jsx(Kr,{}),children:D.t("Ok")}),y.jsx(Ue,{variant:"contained",startIcon:y.jsx(Vt,{}),color:"grey",onClick:()=>{this.editedSmartName=null,this.setState({editId:"",editedSmartName:""})},children:D.t("Cancel")})]})]}):null}renderConfirmDialog(){return this.state.showConfirmation?y.jsxs(qt,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({showConfirmation:""}),"aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[y.jsx(Gt,{id:"confirmation-dialog-title",children:this.props.title||D.t("Device %s will be disabled.",this.state.deleteId)}),y.jsx(er,{children:y.jsx("p",{children:D.t("Are you sure?")})}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"contained",onClick:()=>this.onDelete(),color:"primary",autoFocus:!0,startIcon:y.jsx(Si,{}),children:D.t("Delete")}),y.jsx(Ue,{color:"grey",variant:"contained",onClick:()=>this.setState({showConfirmation:""}),startIcon:y.jsx(Vt,{}),children:D.t("Cancel")})]})]}):null}getSelectIdDialog(){return this.state.showSelectId?y.jsx(Bc,{theme:this.props.theme,imagePrefix:"../..",socket:this.props.socket,selected:"",types:["state"],onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{this.setState({showSelectId:!1}),this.props.socket.getObject(e).then(r=>{if(r){const n=ee.getObjectNameFromObj(r,null,{language:D.getLanguage()});ee.updateSmartName(r,(n||D.t("Device name")).replace(/[-_.]+/g," "),void 0,void 0,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.addChanged(r._id),this.waitForUpdateID=r._id,this.state.lastChanged!==r._id&&(this.setState({lastChanged:r._id}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4)),this.props.socket.setObject(r._id,r).then(()=>this.informInstance(r._id)).catch(o=>this.setState({message:o}))}else this.setState({message:D.t("Invalid ID")})})}},"dialogSelectAlisa"):null}renderDevices(){const e=this.state.filter.toLowerCase(),r=[];for(let n=0;n<this.state.devices.length;n++)this.state.filter&&!this.state.devices[n].name.toLowerCase().includes(e)||r.push(this.renderDevice(this.state.devices[n],n));return y.jsx("div",{style:Bt.columnDiv,children:r},"listDevices")}renderListOfDevices(){return this.state.showListOfDevices?y.jsxs(qt,{open:!0,maxWidth:"xl",fullWidth:!0,onClose:()=>this.setState({showListOfDevices:!1}),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[y.jsxs(Gt,{id:"alert-dialog-title",children:[D.t("List of devices to print out, e.g. to give all device names to your partner.")," ",y.jsx("span",{role:"img","aria-label":"smile",children:"😄"})]}),y.jsxs(er,{children:[y.jsx(Ke,{sx:Bt.headerRow,children:y.jsx("div",{style:Bt.headerCell,children:D.t("Name")})}),y.jsx("div",{style:Bt.tableDiv,children:this.state.devices.map((e,r)=>y.jsx("div",{children:y.jsx("div",{style:Bt.tableCell,children:e.name})},r))})]}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"outlined",onClick:()=>{this.setState({showListOfDevices:!1});const e=this.state.devices.map(r=>r.name);ee.copyToClipboard(e.join(`
|
|
686
686
|
`))},color:"primary",startIcon:y.jsx(xm,{}),children:D.t("Copy to clipboard")}),y.jsx(Ue,{color:"grey",variant:"contained",startIcon:y.jsx(Vt,{}),onClick:()=>this.setState({showListOfDevices:!1}),autoFocus:!0,children:D.t("Close")})]})]}):null}render(){return this.state.loading?y.jsx(Jr,{},"alexaProgress"):y.jsxs("form",{style:Bt.tab,children:[y.jsx(Zt,{size:"small",color:"secondary","aria-label":"Add",style:Bt.button,onClick:()=>this.setState({showSelectId:!0}),children:y.jsx(Oi,{})}),y.jsx(Zt,{size:"small",color:"primary","aria-label":"Refresh",style:Bt.button,onClick:()=>this.browse(!0),disabled:this.state.browse,children:this.state.browse?y.jsx(Jr,{size:20}):y.jsx(Di,{})}),y.jsx(Zt,{style:{...Bt.button,marginLeft:"1rem"},title:D.t("Show all devices for print out"),size:"small","aria-label":"List of devices",onClick:()=>this.setState({showListOfDevices:!0}),disabled:this.state.browse,children:y.jsx(Wm,{})}),y.jsx(Et,{variant:"standard",placeholder:D.t("Filter"),className:this.state.filter,value:this.state.filter,onChange:e=>this.setState({filter:e.target.value}),slotProps:{input:{endAdornment:this.state.filter?y.jsx(Le,{onClick:()=>this.setState({filter:""}),children:y.jsx(Hm,{})}):void 0}}}),this.renderDevices(),this.renderMessage(),this.renderEditDialog(),this.getSelectIdDialog(),this.renderConfirmDialog(),this.renderListOfDevices()]},"alexa")}}qm.propTypes={native:ae.object.isRequired,instance:ae.number.isRequired,adapterName:ae.string.isRequired,onError:ae.func,socket:ae.object.isRequired,themeType:ae.string,theme:ae.object};function pc(t,e,r){if(typeof e=="string"&&(e=e.split(".")),!t)return null;if(e.length===1)return r&&r[t[e[0]]]?r[t[e[0]]]:t[e[0]];const n=e.shift()||"";return pc(t[n],e)}function xD(t,e,r){if(typeof e=="string"&&(e=e.split(".")),e.length===1)return t[e[0]]=r;const n=e.shift()||"";return(t[n]===null||t[n]===void 0)&&(t[n]={}),xD(t[n],e,r)}const wt={tableContainer:{width:"100%",height:"100%",overflow:"auto"},table:{width:"100%",minWidth:800,maxWidth:1920},cell:{paddingTop:0,paddingBottom:0,paddingLeft:4,paddingRight:4},rowMainWithChildren:{},rowMainWithoutChildren:{},rowNoEdit:{opacity:.3},cellExpand:{width:30},cellButton:{width:30},cellHeader:t=>({fontWeight:"bold",background:(t.palette.mode==="dark","#888"),color:t.palette.mode==="dark"?"#EEE":"#111",height:48,wordBreak:"break-word",whiteSpace:"pre"}),width_name_nicknames:{maxWidth:150},width_ioType:{maxWidth:100},width_type:{maxWidth:100},width_displayTraits:{maxWidth:100},width_roomHint:{maxWidth:100},rowSecondary:{fontStyle:"italic"},cellSecondary:{fontSize:10},visuallyHidden:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1}};function V6(t,e,r,n){const o=pc(t,r,n)||"",a=pc(e,r,n)||"";return a<o?-1:a>o?1:0}function Vtt(t,e,r){return t==="desc"?(n,o)=>V6(n,o,e,r):(n,o)=>-V6(n,o,e,r)}function qtt(t,e){const r=t.map((n,o)=>[n,o]);return r.sort((n,o)=>{const a=e(n[0],o[0]);return a||n[1]-o[1]}),r.map(n=>n[0])}class Gtt extends f.Component{constructor(e){super(e);const r=window.localStorage.getItem("iot.ghome.opened")||"[]";let n;try{n=JSON.parse(r)||[]}catch{n=[]}Array.isArray(n)||(n=[]),this.state={opened:n,editMode:!1,deleteMode:!1,editData:null,order:"asc",orderBy:this.props.columns[0].field}}renderCell(e,r,n,o){if(this.state.editMode===o&&r.editable!=="never"){let a=pc(e,r.field);return Array.isArray(a)&&(a=a[0]),y.jsx(Do,{style:{...wt.cell,...n?wt.cellSecondary:void 0,...r.cellStyle},component:"th",children:r.lookup?y.jsx(Nr,{variant:"standard",onChange:s=>{const l=this.state.editData?{...this.state.editData}:{};s.target.value===a?delete l[r.field]:l[r.field]=s.target.value,this.setState({editData:l})},value:this.state.editData&&this.state.editData[r.field]||a,children:Object.keys(r.lookup).map(s=>y.jsx(pt,{value:s,children:r.lookup[s]}))}):y.jsx(Et,{variant:"standard",value:this.state.editData&&this.state.editData[r.field]!==void 0?this.state.editData[r.field]:a,onChange:s=>{const l=this.state.editData?{...this.state.editData}:{};s.target.value===a?delete l[r.field]:l[r.field]=s.target.value,this.setState({editData:l})}})},r.field)}return y.jsx(Do,{style:{...wt.cell,...n?wt.cellSecondary:void 0,...r.cellStyle},component:"th",children:pc(e,r.field,r.lookup)},r.field)}renderLine(e,r){r||=0;const n=this.props.data.indexOf(e);if(!e||!r&&e.parentId||r&&!e.parentId)return null;const o=this.props.data.filter(s=>s.parentId===e.id),a=this.state.opened.includes(e.id);return[y.jsxs(y4,{style:{...wt.row,...r?wt.rowSecondary:void 0,...!r&&o.length?wt.rowMainWithChildren:void 0,...!r&&!o.length?wt.rowMainWithoutChildren:void 0,...this.state.editMode!==!1&&this.state.editMode!==n?wt.rowNoEdit:void 0,...this.state.deleteMode!==!1&&this.state.deleteMode!==n?wt.rowNoEdit:void 0},children:[y.jsx(Do,{style:{...wt.cell,...wt.cellExpand,...r?wt.cellSecondary:void 0},children:o.length?y.jsx(Le,{onClick:()=>{const s=[...this.state.opened],l=s.indexOf(e.id);l===-1?(s.push(e.id),s.sort()):s.splice(l,1),this.setState({opened:s})},children:a?y.jsx(OX,{}):y.jsx(VX,{})}):null}),y.jsx(Do,{scope:"row",style:{...wt.cell,...r?wt.cellSecondary:void 0,...this.props.columns[0].cellStyle},children:pc(e,this.props.columns[0].field,this.props.columns[0].lookup)}),this.props.columns.map((s,l)=>l?this.renderCell(e,s,r,n):null),y.jsx(Do,{style:{...wt.cell,...wt.cellButton},children:this.state.editMode===n||this.state.deleteMode===n?y.jsx(Le,{disabled:this.state.editMode!==!1&&(!this.state.editData||!Object.keys(this.state.editData).length),onClick:()=>{if(this.state.editMode!==!1){const s=JSON.parse(JSON.stringify(e));this.state.editData&&Object.keys(this.state.editData).forEach(l=>xD(s,l,this.state.editData[l])),this.setState({editMode:!1},()=>this.props.onUpdate(s,e))}else this.setState({deleteMode:!1},()=>this.props.onDelete(e))},children:y.jsx(Kr,{})}):y.jsx(Le,{disabled:this.state.editMode!==!1,onClick:()=>this.setState({editMode:n,editData:null}),children:y.jsx(du,{})})}),y.jsx(Do,{style:{...wt.cell,...wt.cellButton},children:this.state.editMode===n||this.state.deleteMode===n?y.jsx(Le,{onClick:()=>this.setState({editMode:!1,deleteMode:!1}),children:y.jsx(Vt,{})}):y.jsx(Le,{disabled:this.state.deleteMode!==!1,onClick:()=>this.setState({deleteMode:n}),children:y.jsx(Ds,{})})})]},e.id),!r&&this.state.opened.includes(e.id)?o.map(s=>this.renderLine(s,r+1)):null]}handleRequestSort(e){const r=this.state.orderBy===e&&this.state.order==="asc";this.setState({order:r?"desc":"asc",orderBy:e})}renderHead(){return y.jsx(LH,{children:y.jsxs(y4,{children:[y.jsx(Do,{component:"th",sx:wt.cellHeader,style:{...wt.cell,...wt.cellExpand}}),y.jsx(Do,{component:"th",sx:wt.cellHeader,style:{...wt.cell,...wt[`width_${this.props.columns[0].field.replace(/\./g,"_")}`],...this.props.columns[0].cellStyle||void 0},sortDirection:this.state.orderBy===this.props.columns[0].field?this.state.order:!1,children:y.jsxs(b4,{active:this.state.orderBy===this.props.columns[0].field,direction:this.state.orderBy===this.props.columns[0].field?this.state.order:"asc",onClick:()=>this.handleRequestSort(this.props.columns[0].field),children:[this.props.columns[0].title,this.state.orderBy===this.props.columns[0].field?y.jsx("span",{style:wt.visuallyHidden,children:this.state.order==="desc"?"sorted descending":"sorted ascending"}):null]})}),this.props.columns.map((e,r)=>r?y.jsx(Do,{sx:wt.cellHeader,style:{...wt.cell,...wt[`width_${e.field.replace(/\./g,"_")}`],...e.cellStyle},component:"th",children:y.jsxs(b4,{active:this.state.orderBy===e.field,direction:this.state.orderBy===e.field?this.state.order:"asc",onClick:()=>this.handleRequestSort(e.field),children:[e.title,this.state.orderBy===e.field?y.jsx("span",{style:wt.visuallyHidden,children:this.state.order==="desc"?"sorted descending":"sorted ascending"}):null]})},e.field):null),y.jsx(Do,{component:"th",sx:wt.cellHeader,style:{...wt.cell,...wt.cellButton}}),y.jsx(Do,{component:"th",sx:wt.cellHeader,style:{...wt.cell,...wt.cellButton}})]})})}render(){const e=this.props.columns?this.props.columns.find(n=>n.field===this.state.orderBy)?.lookup:void 0,r=qtt(this.props.data,Vtt(this.state.order,this.state.orderBy,e));return y.jsx("div",{style:{...wt.tableContainer,...this.props.style||void 0},className:this.props.className,children:y.jsxs(CH,{style:wt.table,"aria-label":"simple table",size:"small",stickyHeader:!0,children:[this.renderHead(),y.jsx(DH,{children:r.map(n=>this.renderLine(n))})]})})}}const nn={tab:{height:"100%",overflow:"hidden"},tableDiv:{width:"100%",overflow:"hidden",height:"calc(100% - 48px)"},searchText:{width:150,marginLeft:8,verticalAlign:"middle"},headerRow:t=>({pl:1,background:t.palette.primary.main}),headerCell:{display:"inline-block",verticalAlign:"top",width:"30%"},tableCell:{display:"inline-block",verticalAlign:"top",width:"30%"}},q6=400,G6=400;class hc extends T.Component{constructor(e){super(e),this.state={editedSmartName:"",editId:"",editObjectName:"",deleteId:"",expertMode:window.localStorage.getItem("App.expertMode")!=="true",helpHidden:window.localStorage.getItem("App.helpHidden")==="true",showSelectId:!1,searchText:"",showConfirmation:"",changed:[],devices:[],message:"",filter:"",loading:!0,browse:!1,expanded:[],lastChanged:"",helpHeight:0},this.columns=[{title:D.t("ID"),field:"id",editable:"never",cellStyle:{maxWidth:"12rem",overflow:"hidden",wordBreak:"break-word"}},{title:D.t("Smart names"),field:"name.nicknames"},{title:D.t("ioBType"),field:"ioType",editable:"never",cellStyle:{maxWidth:"4rem",overflow:"hidden",wordBreak:"break-word"}},{title:D.t("Type"),field:"type",lookup:{"action.devices.types.AC_UNIT":"Air conditioning unit","action.devices.types.AIRFRESHENER":"Air Freshener","action.devices.types.AIRPURIFIER":"Air purifier","action.devices.types.AWNING":"Awning","action.devices.types.BLINDS":"Blinds","action.devices.types.BOILER":"Boiler","action.devices.types.CAMERA":"Camera","action.devices.types.COFFEE_MAKER":"Coffee maker","action.devices.types.CURTAIN":"Curtain","action.devices.types.DISHWASHER":"Dishwasher","action.devices.types.DOOR":"Door","action.devices.types.DRYER":"Dryer","action.devices.types.FAN":"Fan","action.devices.types.FIREPLACE":"Fireplace","action.devices.types.GARAGE":"Garage","action.devices.types.GATE":"Gate","action.devices.types.HEATER":"Heater","action.devices.types.HOOD":"Hood","action.devices.types.KETTLE":"Kettle","action.devices.types.LIGHT":"Light","action.devices.types.LOCK":"Lock","action.devices.types.MOP":"Mop","action.devices.types.MICROWAVE":"Microwave","action.devices.types.OUTLET":"Outlet","action.devices.types.OVEN":"Oven","action.devices.types.PERGOLA":"Pergola","action.devices.types.REFRIGERATOR":"Refrigerator","action.devices.types.SCENE":"Scene","action.devices.types.SECURITYSYSTEM":"Security System","action.devices.types.SENSOR":"Sensor","action.devices.types.SHUTTER":"Shutter","action.devices.types.SHOWER":"Shower","action.devices.types.SPEAKER":"Speaker","action.devices.types.SPRINKLER":"Sprinkler","action.devices.types.SWITCH":"Switch","action.devices.types.THERMOSTAT":"Thermostat","action.devices.types.VACUUM":"Vacuum","action.devices.types.VALVE":"Valve","action.devices.types.WASHER":"Washer","action.devices.types.WATERHEATER":"Water heater","action.devices.types.WINDOW":"Window"}},{title:D.t("Function/Trait"),field:"displayTraits",lookup:{"action.devices.traits.Brightness":"Brightness","action.devices.traits.ColorSetting_temperature":"ColorSetting_Temperature","action.devices.traits.ColorSetting_spectrumRGB":"ColorSetting_RGB","action.devices.traits.FanSpeed":"FanSpeed","action.devices.traits.LockUnlock":"LockUnlock","action.devices.traits.Modes":"Modes","action.devices.traits.OnOff":"OnOff","action.devices.traits.OpenClose":"OpenClose","action.devices.traits.Scene":"Scene","action.devices.traits.StartStop":"StartStop","action.devices.traits.TemperatureControl_temperatureSetpointCelsius":"Oven_SetTemp","action.devices.traits.TemperatureControl_temperatureAmbientCelsius":"Oven_StatusTemp","action.devices.traits.TemperatureSetting_thermostatMode":"Thermostat_Mode","action.devices.traits.TemperatureSetting_thermostatTemperatureSetpoint":"Thermostat_SetTemp","action.devices.traits.TemperatureSetting_thermostatTemperatureAmbient":"Thermostat_StatusTemp","action.devices.traits.TemperatureSetting_thermostatHumidityAmbient":"Thermostat_StatusHumidity","action.devices.traits.Toggles":"Toggles","action.devices.traits.Volume":"Volume"}},{title:D.t("Attributes"),field:"displayAttributes",cellStyle:{maxWidth:"12rem",overflow:"hidden",wordBreak:"break-word"},expertMode:!0,editComponent:hc.editDisplayAttributesComponent},{title:D.t("Room"),field:"roomHint",editable:"never"},{title:D.t("Auto"),field:"smartEnum",editable:"never",cellStyle:{maxWidth:"3rem",overflow:"hidden",wordBreak:"break-word"},expertMode:!0},{title:D.t("Conversation to GH"),field:"displayConv2GH",cellStyle:{maxWidth:"4rem",overflow:"hidden",wordBreak:"break-word"},expertMode:!0,editComponent:hc.editDisplayConv2GH},{title:D.t("Conversation to ioB"),field:"displayConv2iob",cellStyle:{maxWidth:"4rem",overflow:"hidden",wordBreak:"break-word"},expertMode:!0,editComponent:hc.editDisplayConv2iob}],this.timerChanged=null,this.browseTimer=null,this.browseTimerCount=0,this.editedSmartName="",this.waitForUpdateID=null,this.onReadyUpdateBound=this.onReadyUpdate.bind(this),this.onResultUpdateBound=this.onResultUpdate.bind(this),this.helpRef=f.createRef(),this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`).then(r=>this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`).then(n=>{!r||!r.common||!r.common.enabled&&(!n||!n.val)?this.setState({message:D.t("Instance must be enabled"),loading:!1,devices:[]}):this.browse()}))}static editDisplayConv2GH(e){return y.jsxs("div",{children:["Conversation to Google Home = function(value){",y.jsx("br",{}),y.jsx("textarea",{rows:4,style:{width:"100%",resize:"vertical"},value:e.value,onChange:r=>e.onChange(r.target.value)}),"}"]})}static editDisplayConv2iob(e){return y.jsxs("div",{children:["Conversation to ioBroker = function(value){",y.jsx("br",{}),y.jsx("textarea",{rows:4,style:{width:"100%",resize:"vertical"},value:e.value,onChange:r=>e.onChange(r.target.value)}),"}"]})}static editDisplayAttributesComponent(e){return y.jsx("textarea",{rows:4,style:{width:"100%",resize:"vertical"},value:e.value,onChange:r=>e.onChange(r.target.value)})}browse(e){Date.now()-this.lastBrowse<500||(this.lastBrowse=Date.now(),e?this.setState({loading:!0,browse:!0}):this.setState({browse:!0}),this.browseTimer=setTimeout(()=>{console.log("Browse timeout!"),this.browseTimer=null,this.browseTimerCount++,this.browseTimerCount<5?this.browse(e):this.setState({message:D.t("Cannot read devices!")})},1e4),this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"browseGH",null).then(r=>{this.browseTimer&&clearTimeout(this.browseTimer),this.browseTimerCount=0,this.browseTimer=null,r&&r.error?this.setState({message:D.t(r.error)}):(this.waitForUpdateID&&(this.onEdit(this.waitForUpdateID,r)||this.setState({message:D.t("Device %s was not added",this.waitForUpdateID)}),this.waitForUpdateID=null),this.setState({devices:r,loading:!1,changed:[],browse:!1}))}).catch(r=>this.setState({message:D.t(r),browse:!1})))}onReadyUpdate(e,r){console.log(`Update ${e} ${r?`${r.val}/${r.ack}`:"null"}`),r&&r.ack===!0&&r.val===!0&&(this.devTimer&&clearTimeout(this.devTimer),this.devTimer=setTimeout(()=>{this.devTimer=null,this.browse()},10))}onResultUpdate(e){e&&e.ack===!0&&e.val&&this.setState({message:e.val})}componentDidMount(){this.props.socket.subscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesGH`,this.onReadyUpdateBound),this.props.socket.subscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesResult`,this.onResultUpdateBound)}componentWillUnmount(){this.props.socket.unsubscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesGH`,this.onReadyUpdateBound),this.props.socket.unsubscribeState(`${this.props.adapterName}.${this.props.instance}.smart.updatesResult`,this.onResultUpdateBound),this.timerChanged&&(clearTimeout(this.timerChanged),this.timerChanged=null)}informInstance(e){this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`,"update",e)}addChanged(e,r){const n=JSON.parse(JSON.stringify(this.state.changed));n.includes(e)?r&&r():(n.push(e),this.setState({changed:n},()=>r&&r()))}onEdit(e,r){r=r||this.state.devices;const n=r.find(o=>o.id===e);return n?(this.props.socket.getObject(e).then(o=>{let a=n.common&&n.common.smartName?n.common.smartName:n._id;typeof a=="object"&&a&&(a=a[D.getLanguage()]||a.en),this.editedSmartName=a,this.setState({editId:e,editedSmartName:a,editObjectName:ee.getObjectNameFromObj(o,null,{language:D.getLanguage()})})}),!0):!1}onDelete(){const e=this.state.deleteId;this.addChanged(e,()=>{this.props.socket.getObject(e).then(r=>(ee.disableSmartName(r,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.props.socket.setObject(e,r))).then(()=>{this.setState({deleteId:"",showConfirmation:!1,lastChanged:e}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4),this.informInstance(e)}).catch(r=>this.props.onError(r))})}onGHParamsChange(e,r){this.addChanged(e.id,()=>{this.props.socket.getObject(e.id).then(n=>{if(!n||!n.common)return this.setState({message:D.t("Object %s is invalid. No common found.",e.id)});if(ee.updateSmartName(n,this.editedSmartName,void 0,void 0,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),JSON.stringify(e.displayTraits)!==JSON.stringify(r.displayTraits)&&(Array.isArray(e.displayTraits)||(e.displayTraits=[e.displayTraits]),n.common.smartName.ghTraits=e.displayTraits),e.type!==r.type&&(n.common.smartName.ghType=e.type),e.displayAttributes!==r.displayAttributes){n.common.smartName.ghAttributes=e.displayAttributes;try{n.common.smartName.ghAttributes&&JSON.parse(n.common.smartName.ghAttributes)}catch{this.setState({message:D.t("Attributes has not correct JSON format.")})}}return e.conv2GH&&(n.common.smartName.ghConv2GH=e.displayConv2GH),e.conv2iob&&(n.common.smartName.ghConv2iob=e.displayConv2iob),this.props.socket.setObject(e.id,n)}).then(()=>this.informInstance(e.id)).catch(n=>this.props.onError(n))})}renderMessage(){return this.state.message?y.jsx(np,{text:this.state.message,onClose:()=>this.setState({message:""})}):null}getSelectIdDialog(){return this.state.showSelectId?y.jsx(Bc,{theme:this.props.theme,imagePrefix:"../..",socket:this.props.socket,selected:"",types:["state"],onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{this.setState({showSelectId:!1}),this.props.socket.getObject(e).then(r=>{if(r){if(!r.common){this.setState({message:D.t("Object %s is invalid. No common found.",e)});return}const n=ee.getObjectNameFromObj(r,null,{language:D.getLanguage()});ee.updateSmartName(r,(n||D.t("Device name")).replace(/[-_.]+/g," "),void 0,void 0,`${this.props.adapterName}.${this.props.instance}`,this.props.native.noCommon),this.addChanged(r._id),this.waitForUpdateID=r._id,this.state.lastChanged!==r._id&&(this.setState({lastChanged:r._id}),this.timerChanged&&clearTimeout(this.timerChanged),this.timerChanged=setTimeout(()=>{this.setState({lastChanged:""}),this.timerChanged=null},3e4)),r.common.smartName?(r.common.smartName.ghType="action.devices.types.LIGHT",r.common.smartName.ghTraits=["action.devices.traits.OnOff"]):(r.common.smartName={ghType:"action.devices.types.LIGHT"},r.common.smartName={ghTraits:["action.devices.traits.OnOff"]}),this.props.socket.setObject(r._id,r).then(()=>{this.informInstance(r._id),this.setState({message:D.t("Please add type and trait to complete the Google Home state.")})}).catch(o=>this.setState({message:o}))}else this.setState({message:D.t("Invalid ID")})})}},"dialogSelectGoogle"):null}renderListOfDevices(){return this.state.showListOfDevices?y.jsxs(qt,{open:!0,maxWidth:"xl",fullWidth:!0,onClose:()=>this.setState({showListOfDevices:!1}),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[y.jsxs(Gt,{id:"alert-dialog-title",children:[D.t("List of devices to print out, e.g. to give all device names to your partner.")," ",y.jsx("span",{role:"img","aria-label":"smile",children:"😄"})]}),y.jsxs(er,{children:[y.jsxs(Ke,{sx:nn.headerRow,children:[y.jsx("div",{style:nn.headerCell,children:D.t("Name")}),y.jsx("div",{style:nn.headerCell,children:D.t("Function")}),y.jsx("div",{style:nn.headerCell,children:D.t("Room")})]}),y.jsx("div",{style:nn.tableDiv,children:this.state.devices.map((e,r)=>y.jsxs("div",{children:[y.jsx("div",{style:nn.tableCell,children:e.name.nicknames.join(", ")}),y.jsx("div",{style:nn.tableCell,children:e.displayTraits.map(n=>n.replace("action.devices.traits.","")).join(", ")}),y.jsx("div",{style:nn.tableCell,children:e.roomHint})]},r))})]}),y.jsxs(Qt,{children:[y.jsx(Ue,{variant:"outlined",onClick:()=>{this.setState({showListOfDevices:!1});const e=this.state.devices.map(r=>`${r.name.nicknames.join(", ")} ${r.displayTraits} ${r.roomHint}`);ee.copyToClipboard(e.join(`
|
|
687
687
|
`))},color:"primary",startIcon:y.jsx(xm,{}),children:D.t("Copy to clipboard")}),y.jsx(Ue,{color:"grey",startIcon:y.jsx(Vt,{}),variant:"contained",onClick:()=>this.setState({showListOfDevices:!1}),autoFocus:!0,children:D.t("Close")})]})]}):null}renderInstructions(){const e=window.innerHeight>q6&&window.innerWidth>G6;if(this.state.helpHidden||this.props.smallDisplay||!e)return null;const r=D.t("manualModeHint");return y.jsxs("div",{style:{width:"100%"},ref:this.helpRef,children:[y.jsxs("div",{style:{marginTop:"4rem",display:"flex"},children:[y.jsxs("div",{style:{flex:"50%"},children:[y.jsx("div",{style:{fontWeight:"bold"},children:D.t("Auto Mode")}),y.jsx("div",{style:{marginTop:"0.8rem",marginRight:"0.8rem"},children:D.t("To auto detect devices please assign a room and function to the channel if no channel available than assign to a device. Not only to the state or device. And enable them under SmartEnum/Intelligente Aufzählung")})]}),y.jsxs("div",{style:{flex:"50%"},children:[y.jsx("div",{style:{fontWeight:"bold"},children:D.t("Manual Mode")}),y.jsx("span",{children:ee.renderTextWithA(r)})]})]}),y.jsx("br",{}),y.jsx("div",{style:{flex:"100%"},children:y.jsx("div",{style:{fontWeight:"bold"},children:ee.renderTextWithA(D.t("For help use this forum"))})})]})}renderToolbar(){const e=window.innerHeight>q6&&window.innerWidth>G6;return y.jsxs(L2,{variant:"dense",children:[y.jsx(Zt,{size:"small",color:"secondary","aria-label":"Add",style:nn.button,onClick:()=>this.setState({showSelectId:!0}),children:y.jsx(Oi,{})}),y.jsx(Zt,{style:{...nn.button,marginLeft:"1rem"},size:"small",color:"primary","aria-label":"Refresh",onClick:()=>this.browse(!0),disabled:this.state.browse,children:this.state.browse?y.jsx(Jr,{size:20}):y.jsx(Di,{})}),e&&!this.state.hideHelp?y.jsx(Zt,{style:{...nn.button,marginLeft:"1rem"},size:"small",color:this.state.helpHidden?"default":"primary","aria-label":"Help",title:D.t("Show/Hide help"),onClick:()=>{window.localStorage.setItem("App.helpHidden",this.state.helpHidden?"false":"true"),this.setState({helpHidden:!this.state.helpHidden})},disabled:this.state.browse,children:y.jsx(PQe,{})}):null,y.jsx(Zt,{style:{...nn.button,marginLeft:"1rem"},size:"small",color:this.state.expertMode?"primary":"default","aria-label":"Help",title:D.t("Toggle expert mode"),onClick:()=>{window.localStorage.setItem("App.expertMode",this.state.expertMode?"false":"true"),this.setState({expertMode:!this.state.expertMode})},disabled:this.state.browse,children:y.jsx(Ff,{})}),y.jsx(Zt,{style:{...nn.button,marginLeft:"1rem"},title:D.t("Show all devices for print out"),size:"small","aria-label":"List of devices",onClick:()=>this.setState({showListOfDevices:!0}),disabled:this.state.browse,children:y.jsx(Wm,{})}),this.props.smallDisplay?null:y.jsx(Et,{variant:"standard",style:nn.searchText,label:D.t("Filter"),value:this.state.searchText,onChange:r=>this.setState({searchText:r.target.value}),slotProps:{input:{endAdornment:this.state.searchText?y.jsx(Le,{onClick:()=>this.setState({searchText:""}),children:y.jsx(Hm,{})}):void 0}}})]})}componentDidUpdate(){if(this.helpRef.current){const e=this.helpRef.current.clientHeight;this.state.helpHeight!==e&&(!this.state.helpHidden&&e+64+48+200>window.innerHeight?setTimeout(()=>this.setState({helpHeight:e,helpHidden:!0,hideHelp:!0}),50):setTimeout(()=>this.setState({helpHeight:e}),50))}else this.state.helpHeight&&setTimeout(()=>this.setState({helpHeight:0}),50)}render(){if(this.state.loading)return y.jsx(Jr,{},"alexaProgress");const e=this.state.searchText.toLowerCase(),r=this.state.searchText?this.state.devices.filter(n=>n.name?.name?.toLowerCase().includes(e)||n.name?.defaultNames?.find(o=>o.toLowerCase().includes(e))||n.name?.nicknames?.find(o=>o.toLowerCase().includes(e))):this.state.devices;return y.jsxs("form",{style:nn.tab,children:[this.renderToolbar(),this.renderInstructions(),y.jsx("div",{style:{...nn.tableDiv,height:`calc(100% - ${48+(this.state.helpHeight?this.state.helpHeight+64:0)}px)`},children:y.jsx(Gtt,{columns:this.state.expertMode?this.columns:this.columns.filter(n=>!n.expertMode),data:r,onUpdate:(n,o)=>{n.name.nicknames&&Array.isArray(n.name.nicknames)&&(n.name.nicknames=n.name.nicknames.join(",")),this.editedSmartName=n.name.nicknames,this.setState({editId:n.id},()=>{!n.type||!n.displayTraits?this.setState({browse:!0,message:D.t("Please add action and trait to complete the Google Home state.")}):this.setState({browse:!0}),this.onGHParamsChange(n,o);const a=JSON.parse(JSON.stringify(this.state.devices));a[a.indexOf(o)]=n,this.setState({...this.state,devices:a})})},onDelete:n=>(n.smartEnum==="X"?this.setState({deleteId:n.id}):this.props.socket.getObject(n.id).then(o=>(o&&o.common&&o.common.smartName&&(delete o.common.smartName.ghTraits,delete o.common.smartName.ghType,delete o.common.smartName.ghAttributes),this.props.socket.setObject(n.id,o))),new Promise(o=>{setTimeout(()=>{this.state.deleteId?this.onDelete():this.informInstance(n.id),o();const a=JSON.parse(JSON.stringify(this.state.devices));a.splice(a.indexOf(n),1),this.setState({...this.state,devices:a})},600)}))})}),this.renderMessage(),this.getSelectIdDialog(),this.renderListOfDevices()]},"gh")}}hc.propTypes={native:ae.object.isRequired,instance:ae.number.isRequired,adapterName:ae.string.isRequired,onError:ae.func,socket:ae.object.isRequired,theme:ae.object};const Jtt=()=>t=>e=>y.jsx(t,{smallDisplay:pO("(max-width:600px)"),...e}),Xtt=Jtt()(hc),Ktt="Active",Ytt="Addresses",Ztt="Air condition",Qtt="Attributes",ert="Automatically",trt="Window blinds",rrt="Window blinds",nrt="Dimmer",ort="Button",art="Cancel",srt="Close",irt="Color",lrt="Commands",crt="Connectivity",drt="Contact sensor",urt="Control",prt="Default",hrt="Delete",frt="Detection",mrt="Dimmer",grt="Door",_rt="Filter",vrt="Functions",yrt="Gate",brt="Hue",wrt="Humidity",Srt="ID",xrt="Instance",krt="Language",Crt="Light",$rt="Lock",Trt="Message",Ert="Mode",Ort="Motion",Drt="Muted",Art="Name",Irt="off",Nrt="Ok",Mrt="on",Rrt="Options",jrt="Percentage",zrt="On/Off",Prt="Review",Lrt="Room",Frt="Rooms",Brt="Save",Wrt="Search",Hrt="Select",Urt="Sensor",Vrt="Slider",qrt="Socket",Grt="Temperature",Jrt="Thermostat",Xrt="Toggle",Krt="Type",Yrt="Types",Zrt="Vacuum cleaner",Qrt="Value",ent="Volume",tnt="Volume group",rnt="Window",nnt="window blinds",ont="Blinds",ant="Scene (Button)",snt="You cannot use % in password. We are working on the fix.",int="clear",lnt="Color temperature",cnt="dimmer",dnt="disabled",unt='Any questions in any language please ask here in forum: <a href="https://forum.iobroker.net/post/435797" target="_blank">link</a>',pnt="gate",hnt='Before writing to support be sure you have read and understand the instructions of the web page: <a target="_blank" href="https://www.iobroker.net/#en/documentation/cloud/iot.md">https://www.iobroker.net</a>',fnt='If you still have issue with the connection to Iot, you can request support im <a target="_blank" href="https://forum.iobroker.net/category/123/cloud-services">Forum</a>',mnt='and only after that you should write an email to <a target="_blank" href="mailto:support@iobroker.com">support@iobroker.com</a>',gnt='No iobroker.pro account? Buy it on <a href="https://iobroker.pro/accessRemote" target="_blank">https://iobroker.pro</a> for validated access or get for free, but limited access.',_nt="hue",vnt="Humidity",ynt="divided by comma. Use * to allow all services.",bnt="You can find your key <a href='https://ifttt.com/maker_webhooks' target='_blank'>here</a> under 'Documentation'",wnt=`Password must be at least 8 characters long and must have numbers, upper and lower case letters. Please change it in the ioBroker.pro profile
|