identity-admin-ui 1.8.7 → 1.8.8
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/lib/cjs/index.js +1 -1
- package/lib/esm/index.js +1 -1
- package/package.json +1 -1
package/lib/cjs/index.js
CHANGED
|
@@ -129,7 +129,7 @@ function It(e,t){const n=i(e,t);return"production"!==process.env.NODE_ENV?(...t)
|
|
|
129
129
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
130
130
|
*/!function(e,t){(function(){var n,r="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",i=16,s=32,l=64,c=128,u=256,d=1/0,p=9007199254740991,f=NaN,m=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",s],["partialRight",l],["rearg",u]],g="[object Arguments]",v="[object Array]",y="[object Boolean]",A="[object Date]",b="[object Error]",x="[object Function]",w="[object GeneratorFunction]",j="[object Map]",M="[object Number]",O="[object Object]",C="[object Promise]",z="[object RegExp]",D="[object Set]",T="[object String]",P="[object Symbol]",N="[object WeakMap]",k="[object ArrayBuffer]",B="[object DataView]",E="[object Float32Array]",L="[object Float64Array]",I="[object Int8Array]",W="[object Int16Array]",H="[object Int32Array]",R="[object Uint8Array]",V="[object Uint8ClampedArray]",Y="[object Uint16Array]",F="[object Uint32Array]",X=/\b__p \+= '';/g,Q=/\b(__p \+=) '' \+/g,Z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,q=RegExp(G.source),K=RegExp(U.source),J=/<%-([\s\S]+?)%>/g,_=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(re.source),ae=/^\s+/,ie=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,Ae=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,we=/['\n\r\u2028\u2029\\]/g,je="\\ud800-\\udfff",Me="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Oe="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",ze="A-Z\\xc0-\\xd6\\xd8-\\xde",De="\\ufe0e\\ufe0f",Te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="['’]",Ne="["+je+"]",ke="["+Te+"]",Be="["+Me+"]",Ee="\\d+",Le="["+Oe+"]",Se="["+Ce+"]",Ie="[^"+je+Te+Ee+Oe+Ce+ze+"]",We="\\ud83c[\\udffb-\\udfff]",He="[^"+je+"]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",Ve="[\\ud800-\\udbff][\\udc00-\\udfff]",Ye="["+ze+"]",Fe="\\u200d",Xe="(?:"+Se+"|"+Ie+")",Qe="(?:"+Ye+"|"+Ie+")",Ze="(?:['’](?:d|ll|m|re|s|t|ve))?",Ge="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ue="(?:"+Be+"|"+We+")"+"?",qe="["+De+"]?",Ke=qe+Ue+("(?:"+Fe+"(?:"+[He,Re,Ve].join("|")+")"+qe+Ue+")*"),Je="(?:"+[Le,Re,Ve].join("|")+")"+Ke,_e="(?:"+[He+Be+"?",Be,Re,Ve,Ne].join("|")+")",$e=RegExp(Pe,"g"),et=RegExp(Be,"g"),tt=RegExp(We+"(?="+We+")|"+_e+Ke,"g"),nt=RegExp([Ye+"?"+Se+"+"+Ze+"(?="+[ke,Ye,"$"].join("|")+")",Qe+"+"+Ge+"(?="+[ke,Ye+Xe,"$"].join("|")+")",Ye+"?"+Xe+"+"+Ze,Ye+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ee,Je].join("|"),"g"),rt=RegExp("["+Fe+je+Me+De+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],it=-1,st={};st[E]=st[L]=st[I]=st[W]=st[H]=st[R]=st[V]=st[Y]=st[F]=!0,st[g]=st[v]=st[k]=st[y]=st[B]=st[A]=st[b]=st[x]=st[j]=st[M]=st[O]=st[z]=st[D]=st[T]=st[N]=!1;var lt={};lt[g]=lt[v]=lt[k]=lt[B]=lt[y]=lt[A]=lt[E]=lt[L]=lt[I]=lt[W]=lt[H]=lt[j]=lt[M]=lt[O]=lt[z]=lt[D]=lt[T]=lt[P]=lt[R]=lt[V]=lt[Y]=lt[F]=!0,lt[b]=lt[x]=lt[N]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,dt=parseInt,pt="object"==typeof S&&S&&S.Object===Object&&S,ft="object"==typeof self&&self&&self.Object===Object&&self,mt=pt||ft||Function("return this")(),ht=t&&!t.nodeType&&t,gt=ht&&e&&!e.nodeType&&e,vt=gt&>.exports===ht,yt=vt&&pt.process,At=function(){try{var e=gt&>.require&>.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),bt=At&&At.isArrayBuffer,xt=At&&At.isDate,wt=At&&At.isMap,jt=At&&At.isRegExp,Mt=At&&At.isSet,Ot=At&&At.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function zt(e,t,n,r){for(var o=-1,a=null==e?0:e.length;++o<a;){var i=e[o];t(r,i,n(i),e)}return r}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function kt(e,t){return!!(null==e?0:e.length)&&Yt(e,t,0)>-1}function Bt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Et(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Lt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function St(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n}function It(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Wt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ht=Zt("length");function Rt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Vt(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function Yt(e,t,n){return t==t?function(e,t,n){var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Vt(e,Xt,n)}function Ft(e,t,n,r){for(var o=n-1,a=e.length;++o<a;)if(r(e[o],t))return o;return-1}function Xt(e){return e!=e}function Qt(e,t){var n=null==e?0:e.length;return n?qt(e,t)/n:f}function Zt(e){return function(t){return null==t?n:t[e]}}function Gt(e){return function(t){return null==e?n:e[t]}}function Ut(e,t,n,r,o){return o(e,(function(e,o,a){n=r?(r=!1,e):t(n,e,o,a)})),n}function qt(e,t){for(var r,o=-1,a=e.length;++o<a;){var i=t(e[o]);i!==n&&(r=r===n?i:r+i)}return r}function Kt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Jt(e){return e?e.slice(0,hn(e)+1).replace(ae,""):e}function _t(e){return function(t){return e(t)}}function $t(e,t){return Et(t,(function(t){return e[t]}))}function en(e,t){return e.has(t)}function tn(e,t){for(var n=-1,r=e.length;++n<r&&Yt(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length;n--&&Yt(t,e[n],0)>-1;);return n}var rn=Gt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),on=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(e){return"\\"+ct[e]}function sn(e){return rt.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function un(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,i[o++]=n)}return i}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function pn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function fn(e){return sn(e)?function(e){var t=tt.lastIndex=0;for(;tt.test(e);)++t;return t}(e):Ht(e)}function mn(e){return sn(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function hn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var gn=Gt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var vn=function e(t){var S,ie=(t=null==t?mt:vn.defaults(mt.Object(),t,vn.pick(mt,at))).Array,je=t.Date,Me=t.Error,Oe=t.Function,Ce=t.Math,ze=t.Object,De=t.RegExp,Te=t.String,Pe=t.TypeError,Ne=ie.prototype,ke=Oe.prototype,Be=ze.prototype,Ee=t["__core-js_shared__"],Le=ke.toString,Se=Be.hasOwnProperty,Ie=0,We=(S=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",He=Be.toString,Re=Le.call(ze),Ve=mt._,Ye=De("^"+Le.call(Se).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=vt?t.Buffer:n,Xe=t.Symbol,Qe=t.Uint8Array,Ze=Fe?Fe.allocUnsafe:n,Ge=cn(ze.getPrototypeOf,ze),Ue=ze.create,qe=Be.propertyIsEnumerable,Ke=Ne.splice,Je=Xe?Xe.isConcatSpreadable:n,_e=Xe?Xe.iterator:n,tt=Xe?Xe.toStringTag:n,rt=function(){try{var e=fa(ze,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,pt=je&&je.now!==mt.Date.now&&je.now,ft=t.setTimeout!==mt.setTimeout&&t.setTimeout,ht=Ce.ceil,gt=Ce.floor,yt=ze.getOwnPropertySymbols,At=Fe?Fe.isBuffer:n,Ht=t.isFinite,Gt=Ne.join,yn=cn(ze.keys,ze),An=Ce.max,bn=Ce.min,xn=je.now,wn=t.parseInt,jn=Ce.random,Mn=Ne.reverse,On=fa(t,"DataView"),Cn=fa(t,"Map"),zn=fa(t,"Promise"),Dn=fa(t,"Set"),Tn=fa(t,"WeakMap"),Pn=fa(ze,"create"),Nn=Tn&&new Tn,kn={},Bn=Ha(On),En=Ha(Cn),Ln=Ha(zn),Sn=Ha(Dn),In=Ha(Tn),Wn=Xe?Xe.prototype:n,Hn=Wn?Wn.valueOf:n,Rn=Wn?Wn.toString:n;function Vn(e){if(ns(e)&&!Qi(e)&&!(e instanceof Qn)){if(e instanceof Xn)return e;if(Se.call(e,"__wrapped__"))return Ra(e)}return new Xn(e)}var Yn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ue)return Ue(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Fn(){}function Xn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Un;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Jn(e,t){var n=Qi(e),r=!n&&Xi(e),o=!n&&!r&&qi(e),a=!n&&!r&&!o&&us(e),i=n||r||o||a,s=i?Kt(e.length,Te):[],l=s.length;for(var c in e)!t&&!Se.call(e,c)||i&&("length"==c||o&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ba(c,l))||s.push(c);return s}function _n(e){var t=e.length;return t?e[qr(0,t-1)]:n}function $n(e,t){return Sa(No(e),lr(t,0,e.length))}function er(e){return Sa(No(e))}function tr(e,t,r){(r!==n&&!Vi(e[t],r)||r===n&&!(t in e))&&ir(e,t,r)}function nr(e,t,r){var o=e[t];Se.call(e,t)&&Vi(o,r)&&(r!==n||t in e)||ir(e,t,r)}function rr(e,t){for(var n=e.length;n--;)if(Vi(e[n][0],t))return n;return-1}function or(e,t,n,r){return fr(e,(function(e,o,a){t(r,e,n(e),a)})),r}function ar(e,t){return e&&ko(t,ks(t),e)}function ir(e,t,n){"__proto__"==t&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function sr(e,t){for(var r=-1,o=t.length,a=ie(o),i=null==e;++r<o;)a[r]=i?n:zs(e,t[r]);return a}function lr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function cr(e,t,r,o,a,i){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=a?r(e,o,a,i):r(e)),s!==n)return s;if(!ts(e))return e;var d=Qi(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Se.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return No(e,s)}else{var p=ga(e),f=p==x||p==w;if(qi(e))return Oo(e,l);if(p==O||p==g||f&&!a){if(s=c||f?{}:ya(e),!l)return c?function(e,t){return ko(e,ha(e),t)}(e,function(e,t){return e&&ko(t,Bs(t),e)}(s,e)):function(e,t){return ko(e,ma(e),t)}(e,ar(s,e))}else{if(!lt[p])return a?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case k:return Co(e);case y:case A:return new r(+e);case B:return function(e,t){var n=t?Co(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case E:case L:case I:case W:case H:case R:case V:case Y:case F:return zo(e,n);case j:return new r;case M:case T:return new r(e);case z:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case D:return new r;case P:return o=e,Hn?ze(Hn.call(o)):{}}var o}(e,p,l)}}i||(i=new Kn);var m=i.get(e);if(m)return m;i.set(e,s),ss(e)?e.forEach((function(n){s.add(cr(n,t,r,n,e,i))})):rs(e)&&e.forEach((function(n,o){s.set(o,cr(n,t,r,o,e,i))}));var h=d?n:(u?c?ia:aa:c?Bs:ks)(e);return Dt(h||e,(function(n,o){h&&(n=e[o=n]),nr(s,o,cr(n,t,r,o,e,i))})),s}function ur(e,t,r){var o=r.length;if(null==e)return!o;for(e=ze(e);o--;){var a=r[o],i=t[a],s=e[a];if(s===n&&!(a in e)||!i(s))return!1}return!0}function dr(e,t,o){if("function"!=typeof e)throw new Pe(r);return ka((function(){e.apply(n,o)}),t)}function pr(e,t,n,r){var o=-1,a=kt,i=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Et(t,_t(n))),r?(a=Bt,i=!1):t.length>=200&&(a=en,i=!1,t=new qn(t));e:for(;++o<s;){var u=e[o],d=null==n?u:n(u);if(u=r||0!==u?u:0,i&&d==d){for(var p=c;p--;)if(t[p]===d)continue e;l.push(u)}else a(t,d,r)||l.push(u)}return l}Vn.templateSettings={escape:J,evaluate:_,interpolate:$,variable:"",imports:{_:Vn}},Vn.prototype=Fn.prototype,Vn.prototype.constructor=Vn,Xn.prototype=Yn(Fn.prototype),Xn.prototype.constructor=Xn,Qn.prototype=Yn(Fn.prototype),Qn.prototype.constructor=Qn,Zn.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Zn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Zn.prototype.get=function(e){var t=this.__data__;if(Pn){var r=t[e];return r===o?n:r}return Se.call(t,e)?t[e]:n},Zn.prototype.has=function(e){var t=this.__data__;return Pn?t[e]!==n:Se.call(t,e)},Zn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pn&&t===n?o:t,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=rr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ke.call(t,n,1),--this.size,!0)},Gn.prototype.get=function(e){var t=this.__data__,r=rr(t,e);return r<0?n:t[r][1]},Gn.prototype.has=function(e){return rr(this.__data__,e)>-1},Gn.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Un.prototype.clear=function(){this.size=0,this.__data__={hash:new Zn,map:new(Cn||Gn),string:new Zn}},Un.prototype.delete=function(e){var t=da(this,e).delete(e);return this.size-=t?1:0,t},Un.prototype.get=function(e){return da(this,e).get(e)},Un.prototype.has=function(e){return da(this,e).has(e)},Un.prototype.set=function(e,t){var n=da(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,o),this},qn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!Cn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Un(r)}return n.set(e,t),this.size=n.size,this};var fr=Lo(xr),mr=Lo(wr,!0);function hr(e,t){var n=!0;return fr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function gr(e,t,r){for(var o=-1,a=e.length;++o<a;){var i=e[o],s=t(i);if(null!=s&&(l===n?s==s&&!cs(s):r(s,l)))var l=s,c=i}return c}function vr(e,t){var n=[];return fr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function yr(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=Aa),o||(o=[]);++a<i;){var s=e[a];t>0&&n(s)?t>1?yr(s,t-1,n,r,o):Lt(o,s):r||(o[o.length]=s)}return o}var Ar=So(),br=So(!0);function xr(e,t){return e&&Ar(e,t,ks)}function wr(e,t){return e&&br(e,t,ks)}function jr(e,t){return Nt(t,(function(t){return _i(e[t])}))}function Mr(e,t){for(var r=0,o=(t=xo(t,e)).length;null!=e&&r<o;)e=e[Wa(t[r++])];return r&&r==o?e:n}function Or(e,t,n){var r=t(e);return Qi(e)?r:Lt(r,n(e))}function Cr(e){return null==e?e===n?"[object Undefined]":"[object Null]":tt&&tt in ze(e)?function(e){var t=Se.call(e,tt),r=e[tt];try{e[tt]=n;var o=!0}catch(e){}var a=He.call(e);o&&(t?e[tt]=r:delete e[tt]);return a}(e):function(e){return He.call(e)}(e)}function zr(e,t){return e>t}function Dr(e,t){return null!=e&&Se.call(e,t)}function Tr(e,t){return null!=e&&t in ze(e)}function Pr(e,t,r){for(var o=r?Bt:kt,a=e[0].length,i=e.length,s=i,l=ie(i),c=1/0,u=[];s--;){var d=e[s];s&&t&&(d=Et(d,_t(t))),c=bn(d.length,c),l[s]=!r&&(t||a>=120&&d.length>=120)?new qn(s&&d):n}d=e[0];var p=-1,f=l[0];e:for(;++p<a&&u.length<c;){var m=d[p],h=t?t(m):m;if(m=r||0!==m?m:0,!(f?en(f,h):o(u,h,r))){for(s=i;--s;){var g=l[s];if(!(g?en(g,h):o(e[s],h,r)))continue e}f&&f.push(h),u.push(m)}}return u}function Nr(e,t,r){var o=null==(e=Ta(e,t=xo(t,e)))?e:e[Wa(Ja(t))];return null==o?n:Ct(o,e,r)}function kr(e){return ns(e)&&Cr(e)==g}function Br(e,t,r,o,a){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!=e&&t!=t:function(e,t,r,o,a,i){var s=Qi(e),l=Qi(t),c=s?v:ga(e),u=l?v:ga(t),d=(c=c==g?O:c)==O,p=(u=u==g?O:u)==O,f=c==u;if(f&&qi(e)){if(!qi(t))return!1;s=!0,d=!1}if(f&&!d)return i||(i=new Kn),s||us(e)?ra(e,t,r,o,a,i):function(e,t,n,r,o,a,i){switch(n){case B:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!a(new Qe(e),new Qe(t)));case y:case A:case M:return Vi(+e,+t);case b:return e.name==t.name&&e.message==t.message;case z:case T:return e==t+"";case j:var s=ln;case D:var l=1&r;if(s||(s=dn),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;r|=2,i.set(e,t);var u=ra(s(e),s(t),r,o,a,i);return i.delete(e),u;case P:if(Hn)return Hn.call(e)==Hn.call(t)}return!1}(e,t,c,r,o,a,i);if(!(1&r)){var m=d&&Se.call(e,"__wrapped__"),h=p&&Se.call(t,"__wrapped__");if(m||h){var x=m?e.value():e,w=h?t.value():t;return i||(i=new Kn),a(x,w,r,o,i)}}if(!f)return!1;return i||(i=new Kn),function(e,t,r,o,a,i){var s=1&r,l=aa(e),c=l.length,u=aa(t),d=u.length;if(c!=d&&!s)return!1;var p=c;for(;p--;){var f=l[p];if(!(s?f in t:Se.call(t,f)))return!1}var m=i.get(e),h=i.get(t);if(m&&h)return m==t&&h==e;var g=!0;i.set(e,t),i.set(t,e);var v=s;for(;++p<c;){var y=e[f=l[p]],A=t[f];if(o)var b=s?o(A,y,f,t,e,i):o(y,A,f,e,t,i);if(!(b===n?y===A||a(y,A,r,o,i):b)){g=!1;break}v||(v="constructor"==f)}if(g&&!v){var x=e.constructor,w=t.constructor;x==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w||(g=!1)}return i.delete(e),i.delete(t),g}(e,t,r,o,a,i)}(e,t,r,o,Br,a))}function Er(e,t,r,o){var a=r.length,i=a,s=!o;if(null==e)return!i;for(e=ze(e);a--;){var l=r[a];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<i;){var c=(l=r[a])[0],u=e[c],d=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var p=new Kn;if(o)var f=o(u,d,c,e,t,p);if(!(f===n?Br(d,u,3,o,p):f))return!1}}return!0}function Lr(e){return!(!ts(e)||(t=e,We&&We in t))&&(_i(e)?Ye:ve).test(Ha(e));var t}function Sr(e){return"function"==typeof e?e:null==e?ol:"object"==typeof e?Qi(e)?Yr(e[0],e[1]):Vr(e):fl(e)}function Ir(e){if(!Oa(e))return yn(e);var t=[];for(var n in ze(e))Se.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Wr(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in ze(e))t.push(n);return t}(e);var t=Oa(e),n=[];for(var r in e)("constructor"!=r||!t&&Se.call(e,r))&&n.push(r);return n}function Hr(e,t){return e<t}function Rr(e,t){var n=-1,r=Gi(e)?ie(e.length):[];return fr(e,(function(e,o,a){r[++n]=t(e,o,a)})),r}function Vr(e){var t=pa(e);return 1==t.length&&t[0][2]?za(t[0][0],t[0][1]):function(n){return n===e||Er(n,e,t)}}function Yr(e,t){return wa(e)&&Ca(t)?za(Wa(e),t):function(r){var o=zs(r,e);return o===n&&o===t?Ds(r,e):Br(t,o,3)}}function Fr(e,t,r,o,a){e!==t&&Ar(t,(function(i,s){if(a||(a=new Kn),ts(i))!function(e,t,r,o,a,i,s){var l=Pa(e,r),c=Pa(t,r),u=s.get(c);if(u)return void tr(e,r,u);var d=i?i(l,c,r+"",e,t,s):n,p=d===n;if(p){var f=Qi(c),m=!f&&qi(c),h=!f&&!m&&us(c);d=c,f||m||h?Qi(l)?d=l:Ui(l)?d=No(l):m?(p=!1,d=Oo(c,!0)):h?(p=!1,d=zo(c,!0)):d=[]:as(c)||Xi(c)?(d=l,Xi(l)?d=ys(l):ts(l)&&!_i(l)||(d=ya(c))):p=!1}p&&(s.set(c,d),a(d,c,o,i,s),s.delete(c));tr(e,r,d)}(e,t,s,r,Fr,o,a);else{var l=o?o(Pa(e,s),i,s+"",e,t,a):n;l===n&&(l=i),tr(e,s,l)}}),Bs)}function Xr(e,t){var r=e.length;if(r)return ba(t+=t<0?r:0,r)?e[t]:n}function Qr(e,t,n){t=t.length?Et(t,(function(e){return Qi(e)?function(t){return Mr(t,1===e.length?e[0]:e)}:e})):[ol];var r=-1;t=Et(t,_t(ua()));var o=Rr(e,(function(e,n,o){var a=Et(t,(function(t){return t(e)}));return{criteria:a,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,(function(e,t){return function(e,t,n){var r=-1,o=e.criteria,a=t.criteria,i=o.length,s=n.length;for(;++r<i;){var l=Do(o[r],a[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Zr(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],s=Mr(e,i);n(s,i)&&eo(a,xo(i,e),s)}return a}function Gr(e,t,n,r){var o=r?Ft:Yt,a=-1,i=t.length,s=e;for(e===t&&(t=No(t)),n&&(s=Et(e,_t(n)));++a<i;)for(var l=0,c=t[a],u=n?n(c):c;(l=o(s,u,l,r))>-1;)s!==e&&Ke.call(s,l,1),Ke.call(e,l,1);return e}function Ur(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==a){var a=o;ba(o)?Ke.call(e,o,1):fo(e,o)}}return e}function qr(e,t){return e+gt(jn()*(t-e+1))}function Kr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Jr(e,t){return Ba(Da(e,t,ol),e+"")}function _r(e){return _n(Vs(e))}function $r(e,t){var n=Vs(e);return Sa(n,lr(t,0,n.length))}function eo(e,t,r,o){if(!ts(e))return e;for(var a=-1,i=(t=xo(t,e)).length,s=i-1,l=e;null!=l&&++a<i;){var c=Wa(t[a]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(a!=s){var d=l[c];(u=o?o(d,c,l):n)===n&&(u=ts(d)?d:ba(t[a+1])?[]:{})}nr(l,c,u),l=l[c]}return e}var to=Nn?function(e,t){return Nn.set(e,t),e}:ol,no=rt?function(e,t){return rt(e,"toString",{configurable:!0,enumerable:!1,value:tl(t),writable:!0})}:ol;function ro(e){return Sa(Vs(e))}function oo(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=ie(o);++r<o;)a[r]=e[r+t];return a}function ao(e,t){var n;return fr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function io(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var a=r+o>>>1,i=e[a];null!==i&&!cs(i)&&(n?i<=t:i<t)?r=a+1:o=a}return o}return so(e,t,ol,n)}function so(e,t,r,o){var a=0,i=null==e?0:e.length;if(0===i)return 0;for(var s=(t=r(t))!=t,l=null===t,c=cs(t),u=t===n;a<i;){var d=gt((a+i)/2),p=r(e[d]),f=p!==n,m=null===p,h=p==p,g=cs(p);if(s)var v=o||h;else v=u?h&&(o||f):l?h&&f&&(o||!m):c?h&&f&&!m&&(o||!g):!m&&!g&&(o?p<=t:p<t);v?a=d+1:i=d}return bn(i,4294967294)}function lo(e,t){for(var n=-1,r=e.length,o=0,a=[];++n<r;){var i=e[n],s=t?t(i):i;if(!n||!Vi(s,l)){var l=s;a[o++]=0===i?0:i}}return a}function co(e){return"number"==typeof e?e:cs(e)?f:+e}function uo(e){if("string"==typeof e)return e;if(Qi(e))return Et(e,uo)+"";if(cs(e))return Rn?Rn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function po(e,t,n){var r=-1,o=kt,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=Bt;else if(a>=200){var c=t?null:Jo(e);if(c)return dn(c);i=!1,o=en,l=new qn}else l=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,i&&d==d){for(var p=l.length;p--;)if(l[p]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}function fo(e,t){return null==(e=Ta(e,t=xo(t,e)))||delete e[Wa(Ja(t))]}function mo(e,t,n,r){return eo(e,t,n(Mr(e,t)),r)}function ho(e,t,n,r){for(var o=e.length,a=r?o:-1;(r?a--:++a<o)&&t(e[a],a,e););return n?oo(e,r?0:a,r?a+1:o):oo(e,r?a+1:0,r?o:a)}function go(e,t){var n=e;return n instanceof Qn&&(n=n.value()),St(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),n)}function vo(e,t,n){var r=e.length;if(r<2)return r?po(e[0]):[];for(var o=-1,a=ie(r);++o<r;)for(var i=e[o],s=-1;++s<r;)s!=o&&(a[o]=pr(a[o]||i,e[s],t,n));return po(yr(a,1),t,n)}function yo(e,t,r){for(var o=-1,a=e.length,i=t.length,s={};++o<a;){var l=o<i?t[o]:n;r(s,e[o],l)}return s}function Ao(e){return Ui(e)?e:[]}function bo(e){return"function"==typeof e?e:ol}function xo(e,t){return Qi(e)?e:wa(e,t)?[e]:Ia(As(e))}var wo=Jr;function jo(e,t,r){var o=e.length;return r=r===n?o:r,!t&&r>=o?e:oo(e,t,r)}var Mo=ct||function(e){return mt.clearTimeout(e)};function Oo(e,t){if(t)return e.slice();var n=e.length,r=Ze?Ze(n):new e.constructor(n);return e.copy(r),r}function Co(e){var t=new e.constructor(e.byteLength);return new Qe(t).set(new Qe(e)),t}function zo(e,t){var n=t?Co(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Do(e,t){if(e!==t){var r=e!==n,o=null===e,a=e==e,i=cs(e),s=t!==n,l=null===t,c=t==t,u=cs(t);if(!l&&!u&&!i&&e>t||i&&s&&c&&!l&&!u||o&&s&&c||!r&&c||!a)return 1;if(!o&&!i&&!u&&e<t||u&&r&&a&&!o&&!i||l&&r&&a||!s&&a||!c)return-1}return 0}function To(e,t,n,r){for(var o=-1,a=e.length,i=n.length,s=-1,l=t.length,c=An(a-i,0),u=ie(l+c),d=!r;++s<l;)u[s]=t[s];for(;++o<i;)(d||o<a)&&(u[n[o]]=e[o]);for(;c--;)u[s++]=e[o++];return u}function Po(e,t,n,r){for(var o=-1,a=e.length,i=-1,s=n.length,l=-1,c=t.length,u=An(a-s,0),d=ie(u+c),p=!r;++o<u;)d[o]=e[o];for(var f=o;++l<c;)d[f+l]=t[l];for(;++i<s;)(p||o<a)&&(d[f+n[i]]=e[o++]);return d}function No(e,t){var n=-1,r=e.length;for(t||(t=ie(r));++n<r;)t[n]=e[n];return t}function ko(e,t,r,o){var a=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var l=t[i],c=o?o(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),a?ir(r,l,c):nr(r,l,c)}return r}function Bo(e,t){return function(n,r){var o=Qi(n)?zt:or,a=t?t():{};return o(n,e,ua(r,2),a)}}function Eo(e){return Jr((function(t,r){var o=-1,a=r.length,i=a>1?r[a-1]:n,s=a>2?r[2]:n;for(i=e.length>3&&"function"==typeof i?(a--,i):n,s&&xa(r[0],r[1],s)&&(i=a<3?n:i,a=1),t=ze(t);++o<a;){var l=r[o];l&&e(t,l,o,i)}return t}))}function Lo(e,t){return function(n,r){if(null==n)return n;if(!Gi(n))return e(n,r);for(var o=n.length,a=t?o:-1,i=ze(n);(t?a--:++a<o)&&!1!==r(i[a],a,i););return n}}function So(e){return function(t,n,r){for(var o=-1,a=ze(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(!1===n(a[l],l,a))break}return t}}function Io(e){return function(t){var r=sn(t=As(t))?mn(t):n,o=r?r[0]:t.charAt(0),a=r?jo(r,1).join(""):t.slice(1);return o[e]()+a}}function Wo(e){return function(t){return St(_s(Xs(t).replace($e,"")),e,"")}}function Ho(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Yn(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function Ro(e){return function(t,r,o){var a=ze(t);if(!Gi(t)){var i=ua(r,3);t=ks(t),r=function(e){return i(a[e],e,a)}}var s=e(t,r,o);return s>-1?a[i?t[s]:s]:n}}function Vo(e){return oa((function(t){var o=t.length,a=o,i=Xn.prototype.thru;for(e&&t.reverse();a--;){var s=t[a];if("function"!=typeof s)throw new Pe(r);if(i&&!l&&"wrapper"==la(s))var l=new Xn([],!0)}for(a=l?a:o;++a<o;){var c=la(s=t[a]),u="wrapper"==c?sa(s):n;l=u&&ja(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[la(u[0])].apply(l,u[3]):1==s.length&&ja(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Qi(n))return l.plant(n).value();for(var r=0,a=o?t[r].apply(this,e):n;++r<o;)a=t[r].call(this,a);return a}}))}function Yo(e,t,r,o,a,i,s,l,u,d){var p=t&c,f=1&t,m=2&t,h=24&t,g=512&t,v=m?n:Ho(e);return function c(){for(var y=arguments.length,A=ie(y),b=y;b--;)A[b]=arguments[b];if(h)var x=ca(c),w=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(A,x);if(o&&(A=To(A,o,a,h)),i&&(A=Po(A,i,s,h)),y-=w,h&&y<d){var j=un(A,x);return qo(e,t,Yo,c.placeholder,r,A,j,l,u,d-y)}var M=f?r:this,O=m?M[e]:e;return y=A.length,l?A=function(e,t){var r=e.length,o=bn(t.length,r),a=No(e);for(;o--;){var i=t[o];e[o]=ba(i,r)?a[i]:n}return e}(A,l):g&&y>1&&A.reverse(),p&&u<y&&(A.length=u),this&&this!==mt&&this instanceof c&&(O=v||Ho(O)),O.apply(M,A)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return xr(e,(function(e,o,a){t(r,n(e),o,a)})),r}(n,e,t(r),{})}}function Xo(e,t){return function(r,o){var a;if(r===n&&o===n)return t;if(r!==n&&(a=r),o!==n){if(a===n)return o;"string"==typeof r||"string"==typeof o?(r=uo(r),o=uo(o)):(r=co(r),o=co(o)),a=e(r,o)}return a}}function Qo(e){return oa((function(t){return t=Et(t,_t(ua())),Jr((function(n){var r=this;return e(t,(function(e){return Ct(e,r,n)}))}))}))}function Zo(e,t){var r=(t=t===n?" ":uo(t)).length;if(r<2)return r?Kr(t,e):t;var o=Kr(t,ht(e/fn(t)));return sn(t)?jo(mn(o),0,e).join(""):o.slice(0,e)}function Go(e){return function(t,r,o){return o&&"number"!=typeof o&&xa(t,r,o)&&(r=o=n),t=ms(t),r===n?(r=t,t=0):r=ms(r),function(e,t,n,r){for(var o=-1,a=An(ht((t-e)/(n||1)),0),i=ie(a);a--;)i[r?a:++o]=e,e+=n;return i}(t,r,o=o===n?t<r?1:-1:ms(o),e)}}function Uo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=vs(t),n=vs(n)),e(t,n)}}function qo(e,t,r,o,a,i,c,u,d,p){var f=8&t;t|=f?s:l,4&(t&=~(f?l:s))||(t&=-4);var m=[e,t,a,f?i:n,f?c:n,f?n:i,f?n:c,u,d,p],h=r.apply(n,m);return ja(e)&&Na(h,m),h.placeholder=o,Ea(h,e,t)}function Ko(e){var t=Ce[e];return function(e,n){if(e=vs(e),(n=null==n?0:bn(hs(n),292))&&Ht(e)){var r=(As(e)+"e").split("e");return+((r=(As(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Jo=Dn&&1/dn(new Dn([,-0]))[1]==d?function(e){return new Dn(e)}:cl;function _o(e){return function(t){var n=ga(t);return n==j?ln(t):n==D?pn(t):function(e,t){return Et(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function $o(e,t,o,d,p,f,m,h){var g=2&t;if(!g&&"function"!=typeof e)throw new Pe(r);var v=d?d.length:0;if(v||(t&=-97,d=p=n),m=m===n?m:An(hs(m),0),h=h===n?h:hs(h),v-=p?p.length:0,t&l){var y=d,A=p;d=p=n}var b=g?n:sa(e),x=[e,t,o,d,p,y,A,f,m,h];if(b&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,s=r==c&&8==n||r==c&&n==u&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!s)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var d=e[3];e[3]=d?To(d,l,t[4]):l,e[4]=d?un(e[3],a):t[4]}(l=t[5])&&(d=e[5],e[5]=d?Po(d,l,t[6]):l,e[6]=d?un(e[5],a):t[6]);(l=t[7])&&(e[7]=l);r&c&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(x,b),e=x[0],t=x[1],o=x[2],d=x[3],p=x[4],!(h=x[9]=x[9]===n?g?0:e.length:An(x[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||t==i?function(e,t,r){var o=Ho(e);return function a(){for(var i=arguments.length,s=ie(i),l=i,c=ca(a);l--;)s[l]=arguments[l];var u=i<3&&s[0]!==c&&s[i-1]!==c?[]:un(s,c);return(i-=u.length)<r?qo(e,t,Yo,a.placeholder,n,s,u,n,n,r-i):Ct(this&&this!==mt&&this instanceof a?o:e,this,s)}}(e,t,h):t!=s&&33!=t||p.length?Yo.apply(n,x):function(e,t,n,r){var o=1&t,a=Ho(e);return function t(){for(var i=-1,s=arguments.length,l=-1,c=r.length,u=ie(c+s),d=this&&this!==mt&&this instanceof t?a:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++i];return Ct(d,o?n:this,u)}}(e,t,o,d);else var w=function(e,t,n){var r=1&t,o=Ho(e);return function t(){return(this&&this!==mt&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,o);return Ea((b?to:Na)(w,x),e,t)}function ea(e,t,r,o){return e===n||Vi(e,Be[r])&&!Se.call(o,r)?t:e}function ta(e,t,r,o,a,i){return ts(e)&&ts(t)&&(i.set(t,e),Fr(e,t,n,ta,i),i.delete(t)),e}function na(e){return as(e)?n:e}function ra(e,t,r,o,a,i){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var p=-1,f=!0,m=2&r?new qn:n;for(i.set(e,t),i.set(t,e);++p<l;){var h=e[p],g=t[p];if(o)var v=s?o(g,h,p,t,e,i):o(h,g,p,e,t,i);if(v!==n){if(v)continue;f=!1;break}if(m){if(!Wt(t,(function(e,t){if(!en(m,t)&&(h===e||a(h,e,r,o,i)))return m.push(t)}))){f=!1;break}}else if(h!==g&&!a(h,g,r,o,i)){f=!1;break}}return i.delete(e),i.delete(t),f}function oa(e){return Ba(Da(e,n,Za),e+"")}function aa(e){return Or(e,ks,ma)}function ia(e){return Or(e,Bs,ha)}var sa=Nn?function(e){return Nn.get(e)}:cl;function la(e){for(var t=e.name+"",n=kn[t],r=Se.call(kn,t)?n.length:0;r--;){var o=n[r],a=o.func;if(null==a||a==e)return o.name}return t}function ca(e){return(Se.call(Vn,"placeholder")?Vn:e).placeholder}function ua(){var e=Vn.iteratee||al;return e=e===al?Sr:e,arguments.length?e(arguments[0],arguments[1]):e}function da(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function pa(e){for(var t=ks(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Ca(o)]}return t}function fa(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Lr(r)?r:n}var ma=yt?function(e){return null==e?[]:(e=ze(e),Nt(yt(e),(function(t){return qe.call(e,t)})))}:gl,ha=yt?function(e){for(var t=[];e;)Lt(t,ma(e)),e=Ge(e);return t}:gl,ga=Cr;function va(e,t,n){for(var r=-1,o=(t=xo(t,e)).length,a=!1;++r<o;){var i=Wa(t[r]);if(!(a=null!=e&&n(e,i)))break;e=e[i]}return a||++r!=o?a:!!(o=null==e?0:e.length)&&es(o)&&ba(i,o)&&(Qi(e)||Xi(e))}function ya(e){return"function"!=typeof e.constructor||Oa(e)?{}:Yn(Ge(e))}function Aa(e){return Qi(e)||Xi(e)||!!(Je&&e&&e[Je])}function ba(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&Ae.test(e))&&e>-1&&e%1==0&&e<t}function xa(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!("number"==r?Gi(n)&&ba(t,n.length):"string"==r&&t in n)&&Vi(n[t],e)}function wa(e,t){if(Qi(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||(te.test(e)||!ee.test(e)||null!=t&&e in ze(t))}function ja(e){var t=la(e),n=Vn[t];if("function"!=typeof n||!(t in Qn.prototype))return!1;if(e===n)return!0;var r=sa(n);return!!r&&e===r[0]}(On&&ga(new On(new ArrayBuffer(1)))!=B||Cn&&ga(new Cn)!=j||zn&&ga(zn.resolve())!=C||Dn&&ga(new Dn)!=D||Tn&&ga(new Tn)!=N)&&(ga=function(e){var t=Cr(e),r=t==O?e.constructor:n,o=r?Ha(r):"";if(o)switch(o){case Bn:return B;case En:return j;case Ln:return C;case Sn:return D;case In:return N}return t});var Ma=Ee?_i:vl;function Oa(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Be)}function Ca(e){return e==e&&!ts(e)}function za(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in ze(r)))}}function Da(e,t,r){return t=An(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=An(n.length-t,0),i=ie(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=ie(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),Ct(e,this,s)}}function Ta(e,t){return t.length<2?e:Mr(e,oo(t,0,-1))}function Pa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Na=La(to),ka=ft||function(e,t){return mt.setTimeout(e,t)},Ba=La(no);function Ea(e,t,n){var r=t+"";return Ba(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Dt(h,(function(n){var r="_."+n[0];t&n[1]&&!kt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ce):[]}(r),n)))}function La(e){var t=0,r=0;return function(){var o=xn(),a=16-(o-r);if(r=o,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Sa(e,t){var r=-1,o=e.length,a=o-1;for(t=t===n?o:t;++r<t;){var i=qr(r,a),s=e[i];e[i]=e[r],e[r]=s}return e.length=t,e}var Ia=function(e){var t=Li(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,n,r,o){t.push(r?o.replace(pe,"$1"):n||e)})),t}));function Wa(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ha(e){if(null!=e){try{return Le.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ra(e){if(e instanceof Qn)return e.clone();var t=new Xn(e.__wrapped__,e.__chain__);return t.__actions__=No(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Va=Jr((function(e,t){return Ui(e)?pr(e,yr(t,1,Ui,!0)):[]})),Ya=Jr((function(e,t){var r=Ja(t);return Ui(r)&&(r=n),Ui(e)?pr(e,yr(t,1,Ui,!0),ua(r,2)):[]})),Fa=Jr((function(e,t){var r=Ja(t);return Ui(r)&&(r=n),Ui(e)?pr(e,yr(t,1,Ui,!0),n,r):[]}));function Xa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=An(r+o,0)),Vt(e,ua(t,3),o)}function Qa(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var a=o-1;return r!==n&&(a=hs(r),a=r<0?An(o+a,0):bn(a,o-1)),Vt(e,ua(t,3),a,!0)}function Za(e){return(null==e?0:e.length)?yr(e,1):[]}function Ga(e){return e&&e.length?e[0]:n}var Ua=Jr((function(e){var t=Et(e,Ao);return t.length&&t[0]===e[0]?Pr(t):[]})),qa=Jr((function(e){var t=Ja(e),r=Et(e,Ao);return t===Ja(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Pr(r,ua(t,2)):[]})),Ka=Jr((function(e){var t=Ja(e),r=Et(e,Ao);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Pr(r,n,t):[]}));function Ja(e){var t=null==e?0:e.length;return t?e[t-1]:n}var _a=Jr($a);function $a(e,t){return e&&e.length&&t&&t.length?Gr(e,t):e}var ei=oa((function(e,t){var n=null==e?0:e.length,r=sr(e,t);return Ur(e,Et(t,(function(e){return ba(e,n)?+e:e})).sort(Do)),r}));function ti(e){return null==e?e:Mn.call(e)}var ni=Jr((function(e){return po(yr(e,1,Ui,!0))})),ri=Jr((function(e){var t=Ja(e);return Ui(t)&&(t=n),po(yr(e,1,Ui,!0),ua(t,2))})),oi=Jr((function(e){var t=Ja(e);return t="function"==typeof t?t:n,po(yr(e,1,Ui,!0),n,t)}));function ai(e){if(!e||!e.length)return[];var t=0;return e=Nt(e,(function(e){if(Ui(e))return t=An(e.length,t),!0})),Kt(t,(function(t){return Et(e,Zt(t))}))}function ii(e,t){if(!e||!e.length)return[];var r=ai(e);return null==t?r:Et(r,(function(e){return Ct(t,n,e)}))}var si=Jr((function(e,t){return Ui(e)?pr(e,t):[]})),li=Jr((function(e){return vo(Nt(e,Ui))})),ci=Jr((function(e){var t=Ja(e);return Ui(t)&&(t=n),vo(Nt(e,Ui),ua(t,2))})),ui=Jr((function(e){var t=Ja(e);return t="function"==typeof t?t:n,vo(Nt(e,Ui),n,t)})),di=Jr(ai);var pi=Jr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ii(e,r)}));function fi(e){var t=Vn(e);return t.__chain__=!0,t}function mi(e,t){return t(e)}var hi=oa((function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,a=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Qn&&ba(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:mi,args:[a],thisArg:n}),new Xn(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(a)}));var gi=Bo((function(e,t,n){Se.call(e,n)?++e[n]:ir(e,n,1)}));var vi=Ro(Xa),yi=Ro(Qa);function Ai(e,t){return(Qi(e)?Dt:fr)(e,ua(t,3))}function bi(e,t){return(Qi(e)?Tt:mr)(e,ua(t,3))}var xi=Bo((function(e,t,n){Se.call(e,n)?e[n].push(t):ir(e,n,[t])}));var wi=Jr((function(e,t,n){var r=-1,o="function"==typeof t,a=Gi(e)?ie(e.length):[];return fr(e,(function(e){a[++r]=o?Ct(t,e,n):Nr(e,t,n)})),a})),ji=Bo((function(e,t,n){ir(e,n,t)}));function Mi(e,t){return(Qi(e)?Et:Rr)(e,ua(t,3))}var Oi=Bo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ci=Jr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&xa(e,t[0],t[1])?t=[]:n>2&&xa(t[0],t[1],t[2])&&(t=[t[0]]),Qr(e,yr(t,1),[])})),zi=pt||function(){return mt.Date.now()};function Di(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,$o(e,c,n,n,n,n,t)}function Ti(e,t){var o;if("function"!=typeof t)throw new Pe(r);return e=hs(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=n),o}}var Pi=Jr((function(e,t,n){var r=1;if(n.length){var o=un(n,ca(Pi));r|=s}return $o(e,r,t,n,o)})),Ni=Jr((function(e,t,n){var r=3;if(n.length){var o=un(n,ca(Ni));r|=s}return $o(t,r,e,n,o)}));function ki(e,t,o){var a,i,s,l,c,u,d=0,p=!1,f=!1,m=!0;if("function"!=typeof e)throw new Pe(r);function h(t){var r=a,o=i;return a=i=n,d=t,l=e.apply(o,r)}function g(e){var r=e-u;return u===n||r>=t||r<0||f&&e-d>=s}function v(){var e=zi();if(g(e))return y(e);c=ka(v,function(e){var n=t-(e-u);return f?bn(n,s-(e-d)):n}(e))}function y(e){return c=n,m&&a?h(e):(a=i=n,l)}function A(){var e=zi(),r=g(e);if(a=arguments,i=this,u=e,r){if(c===n)return function(e){return d=e,c=ka(v,t),p?h(e):l}(u);if(f)return Mo(c),c=ka(v,t),h(u)}return c===n&&(c=ka(v,t)),l}return t=vs(t)||0,ts(o)&&(p=!!o.leading,s=(f="maxWait"in o)?An(vs(o.maxWait)||0,t):s,m="trailing"in o?!!o.trailing:m),A.cancel=function(){c!==n&&Mo(c),d=0,a=u=i=c=n},A.flush=function(){return c===n?l:y(zi())},A}var Bi=Jr((function(e,t){return dr(e,1,t)})),Ei=Jr((function(e,t,n){return dr(e,vs(t)||0,n)}));function Li(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Pe(r);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(Li.Cache||Un),n}function Si(e){if("function"!=typeof e)throw new Pe(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Li.Cache=Un;var Ii=wo((function(e,t){var n=(t=1==t.length&&Qi(t[0])?Et(t[0],_t(ua())):Et(yr(t,1),_t(ua()))).length;return Jr((function(r){for(var o=-1,a=bn(r.length,n);++o<a;)r[o]=t[o].call(this,r[o]);return Ct(e,this,r)}))})),Wi=Jr((function(e,t){var r=un(t,ca(Wi));return $o(e,s,n,t,r)})),Hi=Jr((function(e,t){var r=un(t,ca(Hi));return $o(e,l,n,t,r)})),Ri=oa((function(e,t){return $o(e,u,n,n,n,t)}));function Vi(e,t){return e===t||e!=e&&t!=t}var Yi=Uo(zr),Fi=Uo((function(e,t){return e>=t})),Xi=kr(function(){return arguments}())?kr:function(e){return ns(e)&&Se.call(e,"callee")&&!qe.call(e,"callee")},Qi=ie.isArray,Zi=bt?_t(bt):function(e){return ns(e)&&Cr(e)==k};function Gi(e){return null!=e&&es(e.length)&&!_i(e)}function Ui(e){return ns(e)&&Gi(e)}var qi=At||vl,Ki=xt?_t(xt):function(e){return ns(e)&&Cr(e)==A};function Ji(e){if(!ns(e))return!1;var t=Cr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!as(e)}function _i(e){if(!ts(e))return!1;var t=Cr(e);return t==x||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function $i(e){return"number"==typeof e&&e==hs(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=wt?_t(wt):function(e){return ns(e)&&ga(e)==j};function os(e){return"number"==typeof e||ns(e)&&Cr(e)==M}function as(e){if(!ns(e)||Cr(e)!=O)return!1;var t=Ge(e);if(null===t)return!0;var n=Se.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==Re}var is=jt?_t(jt):function(e){return ns(e)&&Cr(e)==z};var ss=Mt?_t(Mt):function(e){return ns(e)&&ga(e)==D};function ls(e){return"string"==typeof e||!Qi(e)&&ns(e)&&Cr(e)==T}function cs(e){return"symbol"==typeof e||ns(e)&&Cr(e)==P}var us=Ot?_t(Ot):function(e){return ns(e)&&es(e.length)&&!!st[Cr(e)]};var ds=Uo(Hr),ps=Uo((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Gi(e))return ls(e)?mn(e):No(e);if(_e&&e[_e])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[_e]());var t=ga(e);return(t==j?ln:t==D?dn:Vs)(e)}function ms(e){return e?(e=vs(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=ms(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?lr(hs(e),0,m):0}function vs(e){if("number"==typeof e)return e;if(cs(e))return f;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var n=ge.test(e);return n||ye.test(e)?dt(e.slice(2),n?2:8):he.test(e)?f:+e}function ys(e){return ko(e,Bs(e))}function As(e){return null==e?"":uo(e)}var bs=Eo((function(e,t){if(Oa(t)||Gi(t))ko(t,ks(t),e);else for(var n in t)Se.call(t,n)&&nr(e,n,t[n])})),xs=Eo((function(e,t){ko(t,Bs(t),e)})),ws=Eo((function(e,t,n,r){ko(t,Bs(t),e,r)})),js=Eo((function(e,t,n,r){ko(t,ks(t),e,r)})),Ms=oa(sr);var Os=Jr((function(e,t){e=ze(e);var r=-1,o=t.length,a=o>2?t[2]:n;for(a&&xa(t[0],t[1],a)&&(o=1);++r<o;)for(var i=t[r],s=Bs(i),l=-1,c=s.length;++l<c;){var u=s[l],d=e[u];(d===n||Vi(d,Be[u])&&!Se.call(e,u))&&(e[u]=i[u])}return e})),Cs=Jr((function(e){return e.push(n,ta),Ct(Ls,n,e)}));function zs(e,t,r){var o=null==e?n:Mr(e,t);return o===n?r:o}function Ds(e,t){return null!=e&&va(e,t,Tr)}var Ts=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=He.call(t)),e[t]=n}),tl(ol)),Ps=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=He.call(t)),Se.call(e,t)?e[t].push(n):e[t]=[n]}),ua),Ns=Jr(Nr);function ks(e){return Gi(e)?Jn(e):Ir(e)}function Bs(e){return Gi(e)?Jn(e,!0):Wr(e)}var Es=Eo((function(e,t,n){Fr(e,t,n)})),Ls=Eo((function(e,t,n,r){Fr(e,t,n,r)})),Ss=oa((function(e,t){var n={};if(null==e)return n;var r=!1;t=Et(t,(function(t){return t=xo(t,e),r||(r=t.length>1),t})),ko(e,ia(e),n),r&&(n=cr(n,7,na));for(var o=t.length;o--;)fo(n,t[o]);return n}));var Is=oa((function(e,t){return null==e?{}:function(e,t){return Zr(e,t,(function(t,n){return Ds(e,n)}))}(e,t)}));function Ws(e,t){if(null==e)return{};var n=Et(ia(e),(function(e){return[e]}));return t=ua(t),Zr(e,n,(function(e,n){return t(e,n[0])}))}var Hs=_o(ks),Rs=_o(Bs);function Vs(e){return null==e?[]:$t(e,ks(e))}var Ys=Wo((function(e,t,n){return t=t.toLowerCase(),e+(n?Fs(t):t)}));function Fs(e){return Js(As(e).toLowerCase())}function Xs(e){return(e=As(e))&&e.replace(be,rn).replace(et,"")}var Qs=Wo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Zs=Wo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Gs=Io("toLowerCase");var Us=Wo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var qs=Wo((function(e,t,n){return e+(n?" ":"")+Js(t)}));var Ks=Wo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Js=Io("toUpperCase");function _s(e,t,r){return e=As(e),(t=r?n:t)===n?function(e){return ot.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var $s=Jr((function(e,t){try{return Ct(e,n,t)}catch(e){return Ji(e)?e:new Me(e)}})),el=oa((function(e,t){return Dt(t,(function(t){t=Wa(t),ir(e,t,Pi(e[t],e))})),e}));function tl(e){return function(){return e}}var nl=Vo(),rl=Vo(!0);function ol(e){return e}function al(e){return Sr("function"==typeof e?e:cr(e,1))}var il=Jr((function(e,t){return function(n){return Nr(n,e,t)}})),sl=Jr((function(e,t){return function(n){return Nr(e,n,t)}}));function ll(e,t,n){var r=ks(t),o=jr(t,r);null!=n||ts(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=jr(t,ks(t)));var a=!(ts(n)&&"chain"in n&&!n.chain),i=_i(e);return Dt(o,(function(n){var r=t[n];e[n]=r,i&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=No(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function cl(){}var ul=Qo(Et),dl=Qo(Pt),pl=Qo(Wt);function fl(e){return wa(e)?Zt(Wa(e)):function(e){return function(t){return Mr(t,e)}}(e)}var ml=Go(),hl=Go(!0);function gl(){return[]}function vl(){return!1}var yl=Xo((function(e,t){return e+t}),0),Al=Ko("ceil"),bl=Xo((function(e,t){return e/t}),1),xl=Ko("floor");var wl,jl=Xo((function(e,t){return e*t}),1),Ml=Ko("round"),Ol=Xo((function(e,t){return e-t}),0);return Vn.after=function(e,t){if("function"!=typeof t)throw new Pe(r);return e=hs(e),function(){if(--e<1)return t.apply(this,arguments)}},Vn.ary=Di,Vn.assign=bs,Vn.assignIn=xs,Vn.assignInWith=ws,Vn.assignWith=js,Vn.at=Ms,Vn.before=Ti,Vn.bind=Pi,Vn.bindAll=el,Vn.bindKey=Ni,Vn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Qi(e)?e:[e]},Vn.chain=fi,Vn.chunk=function(e,t,r){t=(r?xa(e,t,r):t===n)?1:An(hs(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,i=0,s=ie(ht(o/t));a<o;)s[i++]=oo(e,a,a+=t);return s},Vn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var a=e[t];a&&(o[r++]=a)}return o},Vn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ie(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Lt(Qi(n)?No(n):[n],yr(t,1))},Vn.cond=function(e){var t=null==e?0:e.length,n=ua();return e=t?Et(e,(function(e){if("function"!=typeof e[1])throw new Pe(r);return[n(e[0]),e[1]]})):[],Jr((function(n){for(var r=-1;++r<t;){var o=e[r];if(Ct(o[0],this,n))return Ct(o[1],this,n)}}))},Vn.conforms=function(e){return function(e){var t=ks(e);return function(n){return ur(n,e,t)}}(cr(e,1))},Vn.constant=tl,Vn.countBy=gi,Vn.create=function(e,t){var n=Yn(e);return null==t?n:ar(n,t)},Vn.curry=function e(t,r,o){var a=$o(t,8,n,n,n,n,n,r=o?n:r);return a.placeholder=e.placeholder,a},Vn.curryRight=function e(t,r,o){var a=$o(t,i,n,n,n,n,n,r=o?n:r);return a.placeholder=e.placeholder,a},Vn.debounce=ki,Vn.defaults=Os,Vn.defaultsDeep=Cs,Vn.defer=Bi,Vn.delay=Ei,Vn.difference=Va,Vn.differenceBy=Ya,Vn.differenceWith=Fa,Vn.drop=function(e,t,r){var o=null==e?0:e.length;return o?oo(e,(t=r||t===n?1:hs(t))<0?0:t,o):[]},Vn.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?oo(e,0,(t=o-(t=r||t===n?1:hs(t)))<0?0:t):[]},Vn.dropRightWhile=function(e,t){return e&&e.length?ho(e,ua(t,3),!0,!0):[]},Vn.dropWhile=function(e,t){return e&&e.length?ho(e,ua(t,3),!0):[]},Vn.fill=function(e,t,r,o){var a=null==e?0:e.length;return a?(r&&"number"!=typeof r&&xa(e,t,r)&&(r=0,o=a),function(e,t,r,o){var a=e.length;for((r=hs(r))<0&&(r=-r>a?0:a+r),(o=o===n||o>a?a:hs(o))<0&&(o+=a),o=r>o?0:gs(o);r<o;)e[r++]=t;return e}(e,t,r,o)):[]},Vn.filter=function(e,t){return(Qi(e)?Nt:vr)(e,ua(t,3))},Vn.flatMap=function(e,t){return yr(Mi(e,t),1)},Vn.flatMapDeep=function(e,t){return yr(Mi(e,t),d)},Vn.flatMapDepth=function(e,t,r){return r=r===n?1:hs(r),yr(Mi(e,t),r)},Vn.flatten=Za,Vn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,d):[]},Vn.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===n?1:hs(t)):[]},Vn.flip=function(e){return $o(e,512)},Vn.flow=nl,Vn.flowRight=rl,Vn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Vn.functions=function(e){return null==e?[]:jr(e,ks(e))},Vn.functionsIn=function(e){return null==e?[]:jr(e,Bs(e))},Vn.groupBy=xi,Vn.initial=function(e){return(null==e?0:e.length)?oo(e,0,-1):[]},Vn.intersection=Ua,Vn.intersectionBy=qa,Vn.intersectionWith=Ka,Vn.invert=Ts,Vn.invertBy=Ps,Vn.invokeMap=wi,Vn.iteratee=al,Vn.keyBy=ji,Vn.keys=ks,Vn.keysIn=Bs,Vn.map=Mi,Vn.mapKeys=function(e,t){var n={};return t=ua(t,3),xr(e,(function(e,r,o){ir(n,t(e,r,o),e)})),n},Vn.mapValues=function(e,t){var n={};return t=ua(t,3),xr(e,(function(e,r,o){ir(n,r,t(e,r,o))})),n},Vn.matches=function(e){return Vr(cr(e,1))},Vn.matchesProperty=function(e,t){return Yr(e,cr(t,1))},Vn.memoize=Li,Vn.merge=Es,Vn.mergeWith=Ls,Vn.method=il,Vn.methodOf=sl,Vn.mixin=ll,Vn.negate=Si,Vn.nthArg=function(e){return e=hs(e),Jr((function(t){return Xr(t,e)}))},Vn.omit=Ss,Vn.omitBy=function(e,t){return Ws(e,Si(ua(t)))},Vn.once=function(e){return Ti(2,e)},Vn.orderBy=function(e,t,r,o){return null==e?[]:(Qi(t)||(t=null==t?[]:[t]),Qi(r=o?n:r)||(r=null==r?[]:[r]),Qr(e,t,r))},Vn.over=ul,Vn.overArgs=Ii,Vn.overEvery=dl,Vn.overSome=pl,Vn.partial=Wi,Vn.partialRight=Hi,Vn.partition=Oi,Vn.pick=Is,Vn.pickBy=Ws,Vn.property=fl,Vn.propertyOf=function(e){return function(t){return null==e?n:Mr(e,t)}},Vn.pull=_a,Vn.pullAll=$a,Vn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Gr(e,t,ua(n,2)):e},Vn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Gr(e,t,n,r):e},Vn.pullAt=ei,Vn.range=ml,Vn.rangeRight=hl,Vn.rearg=Ri,Vn.reject=function(e,t){return(Qi(e)?Nt:vr)(e,Si(ua(t,3)))},Vn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],a=e.length;for(t=ua(t,3);++r<a;){var i=e[r];t(i,r,e)&&(n.push(i),o.push(r))}return Ur(e,o),n},Vn.rest=function(e,t){if("function"!=typeof e)throw new Pe(r);return Jr(e,t=t===n?t:hs(t))},Vn.reverse=ti,Vn.sampleSize=function(e,t,r){return t=(r?xa(e,t,r):t===n)?1:hs(t),(Qi(e)?$n:$r)(e,t)},Vn.set=function(e,t,n){return null==e?e:eo(e,t,n)},Vn.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:eo(e,t,r,o)},Vn.shuffle=function(e){return(Qi(e)?er:ro)(e)},Vn.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&xa(e,t,r)?(t=0,r=o):(t=null==t?0:hs(t),r=r===n?o:hs(r)),oo(e,t,r)):[]},Vn.sortBy=Ci,Vn.sortedUniq=function(e){return e&&e.length?lo(e):[]},Vn.sortedUniqBy=function(e,t){return e&&e.length?lo(e,ua(t,2)):[]},Vn.split=function(e,t,r){return r&&"number"!=typeof r&&xa(e,t,r)&&(t=r=n),(r=r===n?m:r>>>0)?(e=As(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=uo(t))&&sn(e)?jo(mn(e),0,r):e.split(t,r):[]},Vn.spread=function(e,t){if("function"!=typeof e)throw new Pe(r);return t=null==t?0:An(hs(t),0),Jr((function(n){var r=n[t],o=jo(n,0,t);return r&&Lt(o,r),Ct(e,this,o)}))},Vn.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Vn.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===n?1:hs(t))<0?0:t):[]},Vn.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?oo(e,(t=o-(t=r||t===n?1:hs(t)))<0?0:t,o):[]},Vn.takeRightWhile=function(e,t){return e&&e.length?ho(e,ua(t,3),!1,!0):[]},Vn.takeWhile=function(e,t){return e&&e.length?ho(e,ua(t,3)):[]},Vn.tap=function(e,t){return t(e),e},Vn.throttle=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw new Pe(r);return ts(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),ki(e,t,{leading:o,maxWait:t,trailing:a})},Vn.thru=mi,Vn.toArray=fs,Vn.toPairs=Hs,Vn.toPairsIn=Rs,Vn.toPath=function(e){return Qi(e)?Et(e,Wa):cs(e)?[e]:No(Ia(As(e)))},Vn.toPlainObject=ys,Vn.transform=function(e,t,n){var r=Qi(e),o=r||qi(e)||us(e);if(t=ua(t,4),null==n){var a=e&&e.constructor;n=o?r?new a:[]:ts(e)&&_i(a)?Yn(Ge(e)):{}}return(o?Dt:xr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Vn.unary=function(e){return Di(e,1)},Vn.union=ni,Vn.unionBy=ri,Vn.unionWith=oi,Vn.uniq=function(e){return e&&e.length?po(e):[]},Vn.uniqBy=function(e,t){return e&&e.length?po(e,ua(t,2)):[]},Vn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?po(e,n,t):[]},Vn.unset=function(e,t){return null==e||fo(e,t)},Vn.unzip=ai,Vn.unzipWith=ii,Vn.update=function(e,t,n){return null==e?e:mo(e,t,bo(n))},Vn.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:mo(e,t,bo(r),o)},Vn.values=Vs,Vn.valuesIn=function(e){return null==e?[]:$t(e,Bs(e))},Vn.without=si,Vn.words=_s,Vn.wrap=function(e,t){return Wi(bo(t),e)},Vn.xor=li,Vn.xorBy=ci,Vn.xorWith=ui,Vn.zip=di,Vn.zipObject=function(e,t){return yo(e||[],t||[],nr)},Vn.zipObjectDeep=function(e,t){return yo(e||[],t||[],eo)},Vn.zipWith=pi,Vn.entries=Hs,Vn.entriesIn=Rs,Vn.extend=xs,Vn.extendWith=ws,ll(Vn,Vn),Vn.add=yl,Vn.attempt=$s,Vn.camelCase=Ys,Vn.capitalize=Fs,Vn.ceil=Al,Vn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=vs(r))==r?r:0),t!==n&&(t=(t=vs(t))==t?t:0),lr(vs(e),t,r)},Vn.clone=function(e){return cr(e,4)},Vn.cloneDeep=function(e){return cr(e,5)},Vn.cloneDeepWith=function(e,t){return cr(e,5,t="function"==typeof t?t:n)},Vn.cloneWith=function(e,t){return cr(e,4,t="function"==typeof t?t:n)},Vn.conformsTo=function(e,t){return null==t||ur(e,t,ks(t))},Vn.deburr=Xs,Vn.defaultTo=function(e,t){return null==e||e!=e?t:e},Vn.divide=bl,Vn.endsWith=function(e,t,r){e=As(e),t=uo(t);var o=e.length,a=r=r===n?o:lr(hs(r),0,o);return(r-=t.length)>=0&&e.slice(r,a)==t},Vn.eq=Vi,Vn.escape=function(e){return(e=As(e))&&K.test(e)?e.replace(U,on):e},Vn.escapeRegExp=function(e){return(e=As(e))&&oe.test(e)?e.replace(re,"\\$&"):e},Vn.every=function(e,t,r){var o=Qi(e)?Pt:hr;return r&&xa(e,t,r)&&(t=n),o(e,ua(t,3))},Vn.find=vi,Vn.findIndex=Xa,Vn.findKey=function(e,t){return Rt(e,ua(t,3),xr)},Vn.findLast=yi,Vn.findLastIndex=Qa,Vn.findLastKey=function(e,t){return Rt(e,ua(t,3),wr)},Vn.floor=xl,Vn.forEach=Ai,Vn.forEachRight=bi,Vn.forIn=function(e,t){return null==e?e:Ar(e,ua(t,3),Bs)},Vn.forInRight=function(e,t){return null==e?e:br(e,ua(t,3),Bs)},Vn.forOwn=function(e,t){return e&&xr(e,ua(t,3))},Vn.forOwnRight=function(e,t){return e&&wr(e,ua(t,3))},Vn.get=zs,Vn.gt=Yi,Vn.gte=Fi,Vn.has=function(e,t){return null!=e&&va(e,t,Dr)},Vn.hasIn=Ds,Vn.head=Ga,Vn.identity=ol,Vn.includes=function(e,t,n,r){e=Gi(e)?e:Vs(e),n=n&&!r?hs(n):0;var o=e.length;return n<0&&(n=An(o+n,0)),ls(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Yt(e,t,n)>-1},Vn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=An(r+o,0)),Yt(e,t,o)},Vn.inRange=function(e,t,r){return t=ms(t),r===n?(r=t,t=0):r=ms(r),function(e,t,n){return e>=bn(t,n)&&e<An(t,n)}(e=vs(e),t,r)},Vn.invoke=Ns,Vn.isArguments=Xi,Vn.isArray=Qi,Vn.isArrayBuffer=Zi,Vn.isArrayLike=Gi,Vn.isArrayLikeObject=Ui,Vn.isBoolean=function(e){return!0===e||!1===e||ns(e)&&Cr(e)==y},Vn.isBuffer=qi,Vn.isDate=Ki,Vn.isElement=function(e){return ns(e)&&1===e.nodeType&&!as(e)},Vn.isEmpty=function(e){if(null==e)return!0;if(Gi(e)&&(Qi(e)||"string"==typeof e||"function"==typeof e.splice||qi(e)||us(e)||Xi(e)))return!e.length;var t=ga(e);if(t==j||t==D)return!e.size;if(Oa(e))return!Ir(e).length;for(var n in e)if(Se.call(e,n))return!1;return!0},Vn.isEqual=function(e,t){return Br(e,t)},Vn.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return o===n?Br(e,t,n,r):!!o},Vn.isError=Ji,Vn.isFinite=function(e){return"number"==typeof e&&Ht(e)},Vn.isFunction=_i,Vn.isInteger=$i,Vn.isLength=es,Vn.isMap=rs,Vn.isMatch=function(e,t){return e===t||Er(e,t,pa(t))},Vn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Er(e,t,pa(t),r)},Vn.isNaN=function(e){return os(e)&&e!=+e},Vn.isNative=function(e){if(Ma(e))throw new Me("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(e)},Vn.isNil=function(e){return null==e},Vn.isNull=function(e){return null===e},Vn.isNumber=os,Vn.isObject=ts,Vn.isObjectLike=ns,Vn.isPlainObject=as,Vn.isRegExp=is,Vn.isSafeInteger=function(e){return $i(e)&&e>=-9007199254740991&&e<=p},Vn.isSet=ss,Vn.isString=ls,Vn.isSymbol=cs,Vn.isTypedArray=us,Vn.isUndefined=function(e){return e===n},Vn.isWeakMap=function(e){return ns(e)&&ga(e)==N},Vn.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==Cr(e)},Vn.join=function(e,t){return null==e?"":Gt.call(e,t)},Vn.kebabCase=Qs,Vn.last=Ja,Vn.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var a=o;return r!==n&&(a=(a=hs(r))<0?An(o+a,0):bn(a,o-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,a):Vt(e,Xt,a,!0)},Vn.lowerCase=Zs,Vn.lowerFirst=Gs,Vn.lt=ds,Vn.lte=ps,Vn.max=function(e){return e&&e.length?gr(e,ol,zr):n},Vn.maxBy=function(e,t){return e&&e.length?gr(e,ua(t,2),zr):n},Vn.mean=function(e){return Qt(e,ol)},Vn.meanBy=function(e,t){return Qt(e,ua(t,2))},Vn.min=function(e){return e&&e.length?gr(e,ol,Hr):n},Vn.minBy=function(e,t){return e&&e.length?gr(e,ua(t,2),Hr):n},Vn.stubArray=gl,Vn.stubFalse=vl,Vn.stubObject=function(){return{}},Vn.stubString=function(){return""},Vn.stubTrue=function(){return!0},Vn.multiply=jl,Vn.nth=function(e,t){return e&&e.length?Xr(e,hs(t)):n},Vn.noConflict=function(){return mt._===this&&(mt._=Ve),this},Vn.noop=cl,Vn.now=zi,Vn.pad=function(e,t,n){e=As(e);var r=(t=hs(t))?fn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Zo(gt(o),n)+e+Zo(ht(o),n)},Vn.padEnd=function(e,t,n){e=As(e);var r=(t=hs(t))?fn(e):0;return t&&r<t?e+Zo(t-r,n):e},Vn.padStart=function(e,t,n){e=As(e);var r=(t=hs(t))?fn(e):0;return t&&r<t?Zo(t-r,n)+e:e},Vn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(As(e).replace(ae,""),t||0)},Vn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&xa(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=ms(e),t===n?(t=e,e=0):t=ms(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var a=jn();return bn(e+a*(t-e+ut("1e-"+((a+"").length-1))),t)}return qr(e,t)},Vn.reduce=function(e,t,n){var r=Qi(e)?St:Ut,o=arguments.length<3;return r(e,ua(t,4),n,o,fr)},Vn.reduceRight=function(e,t,n){var r=Qi(e)?It:Ut,o=arguments.length<3;return r(e,ua(t,4),n,o,mr)},Vn.repeat=function(e,t,r){return t=(r?xa(e,t,r):t===n)?1:hs(t),Kr(As(e),t)},Vn.replace=function(){var e=arguments,t=As(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Vn.result=function(e,t,r){var o=-1,a=(t=xo(t,e)).length;for(a||(a=1,e=n);++o<a;){var i=null==e?n:e[Wa(t[o])];i===n&&(o=a,i=r),e=_i(i)?i.call(e):i}return e},Vn.round=Ml,Vn.runInContext=e,Vn.sample=function(e){return(Qi(e)?_n:_r)(e)},Vn.size=function(e){if(null==e)return 0;if(Gi(e))return ls(e)?fn(e):e.length;var t=ga(e);return t==j||t==D?e.size:Ir(e).length},Vn.snakeCase=Us,Vn.some=function(e,t,r){var o=Qi(e)?Wt:ao;return r&&xa(e,t,r)&&(t=n),o(e,ua(t,3))},Vn.sortedIndex=function(e,t){return io(e,t)},Vn.sortedIndexBy=function(e,t,n){return so(e,t,ua(n,2))},Vn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=io(e,t);if(r<n&&Vi(e[r],t))return r}return-1},Vn.sortedLastIndex=function(e,t){return io(e,t,!0)},Vn.sortedLastIndexBy=function(e,t,n){return so(e,t,ua(n,2),!0)},Vn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=io(e,t,!0)-1;if(Vi(e[n],t))return n}return-1},Vn.startCase=qs,Vn.startsWith=function(e,t,n){return e=As(e),n=null==n?0:lr(hs(n),0,e.length),t=uo(t),e.slice(n,n+t.length)==t},Vn.subtract=Ol,Vn.sum=function(e){return e&&e.length?qt(e,ol):0},Vn.sumBy=function(e,t){return e&&e.length?qt(e,ua(t,2)):0},Vn.template=function(e,t,r){var o=Vn.templateSettings;r&&xa(e,t,r)&&(t=n),e=As(e),t=ws({},t,o,ea);var a,i,s=ws({},t.imports,o.imports,ea),l=ks(s),c=$t(s,l),u=0,d=t.interpolate||xe,p="__p += '",f=De((t.escape||xe).source+"|"+d.source+"|"+(d===$?fe:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),m="//# sourceURL="+(Se.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";e.replace(f,(function(t,n,r,o,s,l){return r||(r=o),p+=e.slice(u,l).replace(we,an),n&&(a=!0,p+="' +\n__e("+n+") +\n'"),s&&(i=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),p+="';\n";var h=Se.call(t,"variable")&&t.variable;if(h){if(de.test(h))throw new Me("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(i?p.replace(X,""):p).replace(Q,"$1").replace(Z,"$1;"),p="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=$s((function(){return Oe(l,m+"return "+p).apply(n,c)}));if(g.source=p,Ji(g))throw g;return g},Vn.times=function(e,t){if((e=hs(e))<1||e>p)return[];var n=m,r=bn(e,m);t=ua(t),e-=m;for(var o=Kt(r,t);++n<e;)t(n);return o},Vn.toFinite=ms,Vn.toInteger=hs,Vn.toLength=gs,Vn.toLower=function(e){return As(e).toLowerCase()},Vn.toNumber=vs,Vn.toSafeInteger=function(e){return e?lr(hs(e),-9007199254740991,p):0===e?e:0},Vn.toString=As,Vn.toUpper=function(e){return As(e).toUpperCase()},Vn.trim=function(e,t,r){if((e=As(e))&&(r||t===n))return Jt(e);if(!e||!(t=uo(t)))return e;var o=mn(e),a=mn(t);return jo(o,tn(o,a),nn(o,a)+1).join("")},Vn.trimEnd=function(e,t,r){if((e=As(e))&&(r||t===n))return e.slice(0,hn(e)+1);if(!e||!(t=uo(t)))return e;var o=mn(e);return jo(o,0,nn(o,mn(t))+1).join("")},Vn.trimStart=function(e,t,r){if((e=As(e))&&(r||t===n))return e.replace(ae,"");if(!e||!(t=uo(t)))return e;var o=mn(e);return jo(o,tn(o,mn(t))).join("")},Vn.truncate=function(e,t){var r=30,o="...";if(ts(t)){var a="separator"in t?t.separator:a;r="length"in t?hs(t.length):r,o="omission"in t?uo(t.omission):o}var i=(e=As(e)).length;if(sn(e)){var s=mn(e);i=s.length}if(r>=i)return e;var l=r-fn(o);if(l<1)return o;var c=s?jo(s,0,l).join(""):e.slice(0,l);if(a===n)return c+o;if(s&&(l+=c.length-l),is(a)){if(e.slice(l).search(a)){var u,d=c;for(a.global||(a=De(a.source,As(me.exec(a))+"g")),a.lastIndex=0;u=a.exec(d);)var p=u.index;c=c.slice(0,p===n?l:p)}}else if(e.indexOf(uo(a),l)!=l){var f=c.lastIndexOf(a);f>-1&&(c=c.slice(0,f))}return c+o},Vn.unescape=function(e){return(e=As(e))&&q.test(e)?e.replace(G,gn):e},Vn.uniqueId=function(e){var t=++Ie;return As(e)+t},Vn.upperCase=Ks,Vn.upperFirst=Js,Vn.each=Ai,Vn.eachRight=bi,Vn.first=Ga,ll(Vn,(wl={},xr(Vn,(function(e,t){Se.call(Vn.prototype,t)||(wl[t]=e)})),wl),{chain:!1}),Vn.VERSION="4.17.21",Dt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Vn[e].placeholder=Vn})),Dt(["drop","take"],(function(e,t){Qn.prototype[e]=function(r){r=r===n?1:An(hs(r),0);var o=this.__filtered__&&!t?new Qn(this):this.clone();return o.__filtered__?o.__takeCount__=bn(r,o.__takeCount__):o.__views__.push({size:bn(r,m),type:e+(o.__dir__<0?"Right":"")}),o},Qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Dt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ua(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Dt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Qn.prototype[e]=function(){return this[n](1).value()[0]}})),Dt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Qn.prototype[e]=function(){return this.__filtered__?new Qn(this):this[n](1)}})),Qn.prototype.compact=function(){return this.filter(ol)},Qn.prototype.find=function(e){return this.filter(e).head()},Qn.prototype.findLast=function(e){return this.reverse().find(e)},Qn.prototype.invokeMap=Jr((function(e,t){return"function"==typeof e?new Qn(this):this.map((function(n){return Nr(n,e,t)}))})),Qn.prototype.reject=function(e){return this.filter(Si(ua(e)))},Qn.prototype.slice=function(e,t){e=hs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Qn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=hs(t))<0?r.dropRight(-t):r.take(t-e)),r)},Qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Qn.prototype.toArray=function(){return this.take(m)},xr(Qn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),a=Vn[o?"take"+("last"==t?"Right":""):t],i=o||/^find/.test(t);a&&(Vn.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,l=t instanceof Qn,c=s[0],u=l||Qi(t),d=function(e){var t=a.apply(Vn,Lt([e],s));return o&&p?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,f=!!this.__actions__.length,m=i&&!p,h=l&&!f;if(!i&&u){t=h?t:new Qn(this);var g=e.apply(t,s);return g.__actions__.push({func:mi,args:[d],thisArg:n}),new Xn(g,p)}return m&&h?e.apply(this,s):(g=this.thru(d),m?o?g.value()[0]:g.value():g)})})),Dt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ne[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Vn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Qi(o)?o:[],e)}return this[n]((function(n){return t.apply(Qi(n)?n:[],e)}))}})),xr(Qn.prototype,(function(e,t){var n=Vn[t];if(n){var r=n.name+"";Se.call(kn,r)||(kn[r]=[]),kn[r].push({name:t,func:n})}})),kn[Yo(n,2).name]=[{name:"wrapper",func:n}],Qn.prototype.clone=function(){var e=new Qn(this.__wrapped__);return e.__actions__=No(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=No(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=No(this.__views__),e},Qn.prototype.reverse=function(){if(this.__filtered__){var e=new Qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Qi(e),r=t<0,o=n?e.length:0,a=function(e,t,n){var r=-1,o=n.length;for(;++r<o;){var a=n[r],i=a.size;switch(a.type){case"drop":e+=i;break;case"dropRight":t-=i;break;case"take":t=bn(t,e+i);break;case"takeRight":e=An(e,t-i)}}return{start:e,end:t}}(0,o,this.__views__),i=a.start,s=a.end,l=s-i,c=r?s:i-1,u=this.__iteratees__,d=u.length,p=0,f=bn(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return go(e,this.__actions__);var m=[];e:for(;l--&&p<f;){for(var h=-1,g=e[c+=t];++h<d;){var v=u[h],y=v.iteratee,A=v.type,b=y(g);if(2==A)g=b;else if(!b){if(1==A)continue e;break e}}m[p++]=g}return m},Vn.prototype.at=hi,Vn.prototype.chain=function(){return fi(this)},Vn.prototype.commit=function(){return new Xn(this.value(),this.__chain__)},Vn.prototype.next=function(){this.__values__===n&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Vn.prototype.plant=function(e){for(var t,r=this;r instanceof Fn;){var o=Ra(r);o.__index__=0,o.__values__=n,t?a.__wrapped__=o:t=o;var a=o;r=r.__wrapped__}return a.__wrapped__=e,t},Vn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Qn){var t=e;return this.__actions__.length&&(t=new Qn(this)),(t=t.reverse()).__actions__.push({func:mi,args:[ti],thisArg:n}),new Xn(t,this.__chain__)}return this.thru(ti)},Vn.prototype.toJSON=Vn.prototype.valueOf=Vn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Vn.prototype.first=Vn.prototype.head,_e&&(Vn.prototype[_e]=function(){return this}),Vn}();gt?((gt.exports=vn)._=vn,ht._=vn):mt._=vn}).call(S)}(km,km.exports);var Bm,Em=km.exports,Lm=x.create({withCredentials:!0});exports.RequestState=void 0,(Bm=exports.RequestState||(exports.RequestState={})).IDLE="idle",Bm.LOADING="loading",Bm.SUCCEEDED="succeeded",Bm.FAILED="failed";var Sm=function(){function e(e,t,n){this.data=e,this.state=t,this.error=n}return e.idle=function(t){var n=new e(t,exports.RequestState.IDLE);return Q({},n)},e.loading=function(t){var n=new e(t,exports.RequestState.LOADING);return Q({},n)},e.succeeded=function(t){var n=new e(t,exports.RequestState.SUCCEEDED);return Q({},n)},e.error=function(t,n){var r=new e(n,exports.RequestState.FAILED,t);return Q({},r)},e}();var Im=e.createContext({statusCode:null,dashbaordUrlPrefix:""});function Wm(){var t=e.useState(Sm.idle),n=t[0],r=t[1],o=e.useContext(Im).dashbaordUrlPrefix,a=e.useCallback((function(e){r(Sm.loading()),Lm.get("".concat(o,"/").concat(e.url),Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Sm.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Sm.error(n))}))}),[]),i=e.useCallback((function(e){r(Sm.loading()),Lm.post("".concat(o,"/").concat(e.url),e.body,Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Sm.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Sm.error(n))}))}),[]),s=e.useCallback((function(e){r(Sm.loading()),Lm.patch("".concat(o,"/").concat(e.url),e.body,Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Sm.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Sm.error(n))}))}),[]),l=e.useCallback((function(e){r(Sm.loading()),Lm.delete("".concat(o,"/").concat(e.url),Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Sm.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Sm.error(n))}))}),[]);return{requestState:n,get:a,post:i,patch:s,remove:l}}function Hm(){return w.configure({showSpinner:!1}),e.useMemo((function(){w.start()}),[]),e.useEffect((function(){w.done()}),[]),null}var Rm=mo("div")((function(e){return{right:0,bottom:0,zIndex:99999,width:"100%",height:"100%",position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.theme.palette.background.default}}));function Vm(e){var t=e.isDashboard,r=e.loadingLogo,o=e.logoSxProps,a=Z(e,["isDashboard","loadingLogo","logoSxProps"]);return X.jsxs(X.Fragment,{children:[X.jsx(Hm,{}),!t&&X.jsxs(Rm,Q({},a,{children:[X.jsx(p.m.div,{animate:{scale:[1,.9,.9,1,1],opacity:[1,.48,.48,1,1]},transition:{duration:2,ease:"easeInOut",repeatDelay:1,repeat:1/0},children:X.jsx(n.Box,{sx:Q({width:200},o),children:X.jsx(ki,{visibleByDefault:!0,disabledEffect:!0,src:r,alt:"logo"})})}),X.jsx(n.Box,{component:p.m.div,animate:{scale:[1.2,1,1,1.2,1.2],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:100,height:100,borderRadius:"25%",position:"absolute",border:function(e){return"solid 3px ".concat(vr(e.palette.primary.dark,.24))}}}),X.jsx(n.Box,{component:p.m.div,animate:{scale:[1,1.2,1.2,1,1],rotate:[0,270,270,0,0],opacity:[1,.25,.25,.25,1],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:120,height:120,borderRadius:"25%",position:"absolute",border:function(e){return"solid 8px ".concat(vr(e.palette.primary.dark,.24))}}})]}))]})}var Ym=e.createContext({resources:null,getResources:function(){},state:exports.RequestState.IDLE}),Fm=require("@mui/icons-material"),Xm=function(e){return X.jsx(Qm,{src:e,sx:{width:1,height:1}})};function Qm(e){var t=e.src,r=e.sx,o=X.jsx(n.Box,{component:"span",sx:Q({width:24,height:24,display:"inline-block",bgcolor:"currentColor",mask:"url(".concat(t,") no-repeat center / contain"),WebkitMask:"url(".concat(t,") no-repeat center / contain")},r)}),a=X.jsx(n.Box,{sx:{display:"flex",gap:1},children:X.jsx(n.SvgIcon,{component:Fm[t],color:"inherit"})});return void 0!==Fm[t]?a:o}var Zm=e.createContext({paths:{},root:"",home:""});function Gm(e,t){return"".concat(e).concat(t)}function Um(){var t=e.useContext(Ym).resources,n=e.useContext(Zm).paths;if(!t)return[];var r=t.modelParents;return e.useMemo((function(){var e=[];for(var o in r){for(var a=[],i=r[o],s=t[i[0]].properties.parent,l=s.icon,c={title:s.value,icon:Xm(l),children:a},u=0;u<i.length;u++){var d=t[i[u]];a.push({title:d.properties.name,path:n[i[u]]?n[i[u]].list:""})}c.children=a,e.push(c)}return[{subheader:"",items:e||[]}]}),[t])}var qm=e.createContext({textFieldSize:"small",themeLayout:"vertical",defaultRowsPerPage:50,themeStretch:!0,loadingLoago:"",navBarLogo:"",miniNavBarLogo:""}),Km=e.createContext({identityPoolId:"",region:"",userPoolId:"",userPoolWebClientId:"",bucket:"",googleApiKey:"",bucketUrl:""}),Jm=e.createContext({setAlert:function(e,t,n){},setErrorAlert:function(e,t){},setSuccessAlert:function(e,t){}});var _m=e.createContext({openDialog:function(e,t){}});var $m=function(){return e.useContext(qm)},eh=function(){return e.useContext(Ym)},th=function(){return e.useContext(Jm)},nh=function(){return e.useContext(Zm)},rh="AddMoreOption";function oh(t){var r=t.name,o=t.options,a=t.loading,i=t.multiple,s=t.onOptionChange,l=t.onOpenChanged,u=t.hasNext,d=t.loadMoreText,p=Z(t,["name","options","loading","multiple","onOptionChange","onOpenChanged","hasNext","loadMoreText"]),f=c.useFormContext().control,m=e.useState(!1),h=m[0],g=m[1],v=e.useState({page:1,filter:void 0}),y=v[0],A=v[1],b=$m().textFieldSize,x=function(e){var t;t=e.target.value,A({page:1,filter:t})},w=function(e){l(e,y.page,y.filter),g(e)},j=e.useMemo((function(){return Em.debounce(x,500)}),[]);e.useEffect((function(){return function(){j.cancel()}}),[]),e.useEffect((function(){l(h,y.page,y.filter)}),[y]);var M=X.jsx(cs,{fontSize:"small"}),O=X.jsx(hs,{fontSize:"small"});return X.jsx(c.Controller,{name:r,control:f,render:function(e){var t=e.field,l=e.fieldState.error;return X.jsx(n.Autocomplete,Q({multiple:i,fullWidth:p.fullWidth,sx:p.sx},t,{filterOptions:function(e){var t=q([],e,!0);return u&&0!==e.length&&t.push({_id:rh,title:null!=d?d:"+ Load More"}),t},disableCloseOnSelect:i,id:r,size:"medium",open:h,disabled:p.disabled,onOpen:function(){return w(!0)},onClose:function(){w(!1)},isOptionEqualToValue:function(e,t){return e._id===t._id},renderOption:function(e,t,r){var o=r.selected;return X.jsx(X.Fragment,{children:t._id===rh?X.jsx(n.Stack,{justifyContent:"center",children:X.jsx(n.Button,{sx:{margin:1},onClick:function(){return A({page:y.page+1,filter:y.filter})},children:t.title})}):X.jsx("li",Q({},e,{style:{justifyContent:t._id===rh?"center":void 0},children:X.jsxs(n.Stack,{direction:"row",spacing:1,alignItems:"center",children:[i&&X.jsx(n.Checkbox,{icon:M,checkedIcon:O,style:{marginRight:1},checked:o}),t.image&&X.jsx(n.Avatar,{alt:"-",src:t.image}),X.jsx(n.Typography,{children:t.title?t.title:t.name})]})}))})},getOptionLabel:function(e){if(!e||!(e.title?e.title:e.name)||""===(e.title?e.title:e.name))return"";var t=e.title?e.title:e.name;return e.image&&!i&&t&&""!==t?t+";;"+e.image:t},options:null!=o?o:[],loading:a,onChange:function(e,n,r){s&&s(n),t.onChange(i?n:Q({},n))},renderInput:function(e){var t,r,o,s=e.inputProps.value,c=void 0;if(!i&&"string"==typeof s&&s.includes(";;")){var u=s.split(";;");c=u[1],e.inputProps=Q(Q({},e.inputProps),{value:u[0]}),e.InputProps=Q(Q({},e.InputProps),{startAdornment:X.jsx(n.Avatar,{src:c,alt:""})})}return X.jsx(n.TextField,Q({},e,p,{size:b,error:!!l,onChange:j,helperText:null!==(t=null==l?void 0:l.message)&&void 0!==t?t:null===(o=null===(r=Object(l))||void 0===r?void 0:r._id)||void 0===o?void 0:o.message,InputProps:Q(Q({},e.InputProps),{endAdornment:X.jsxs(X.Fragment,{children:[a?X.jsx(n.CircularProgress,{color:"inherit",size:20}):null,e.InputProps.endAdornment]})})}))}}))}})}var ah,ih=["true","false"];function sh(e,t,r,o,a,i,s,l,c,u,d){if(r[t])switch(r[t].type){case bm.STRING:return X.jsx(as,{name:i,size:e,label:r[t].value},t);case bm.PHONENUMBER:return X.jsx(b,{defaultCountry:r[t].countryCodes?r[t].countryCodes[0]:"sa",onChange:function(e){return u(i,e)},onlyCountries:r[t].countryCodes?r[t].countryCodes:["eg","sa"],name:i,size:e,label:r[t].value,value:d(i)?d(i):"",variant:"outlined",fullWidth:!0},t);case bm.TIMEPICKER:case bm.LOCALIZEDString:case bm.OBJECTID:return X.jsx(as,{name:i,size:e,label:r[t].value},t);case bm.NUMBER:return X.jsxs(n.Card,{sx:{py:3,px:3},children:[X.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),X.jsxs(n.Stack,{direction:"row",spacing:2,children:[X.jsx(as,{name:t+".from",style:{flex:1,width:90},size:e,label:s?"From":"من"}),X.jsx(as,{name:t+".to",style:{flex:1,width:90},size:e,label:s?"To":"إلى"})]})]},t);case bm.DATE:return X.jsxs(n.Card,{sx:{py:3,px:3},children:[X.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),X.jsxs(n.Grid,{container:!0,spacing:2,children:[X.jsx(n.Grid,{item:!0,xs:12,children:X.jsx(As,{name:t+".from",size:e,label:s?"From":"من",fullWidth:!0},t)}),X.jsx(n.Grid,{item:!0,xs:12,children:X.jsx(As,{name:t+".to",size:e,label:s?"To":"إلى",fullWidth:!0},t)})]})]},t);case bm.ENUM:return X.jsx(is,{name:i,size:e,label:r[t].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:r[t].enumValues.map((function(e){return X.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e.includes("_")?e.split("_").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()})).join(" "):e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e)}))},t);case bm.BOOLEAN:return X.jsx(is,{name:i,size:e,label:r[t].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:ih.map((function(e){return X.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e},e)}))},t);case bm.ARRAY:case bm.REFERENCE:return X.jsx(oh,{name:i,size:e,label:r[t].value,multiple:!1,onOptionChange:function(e){return c(e,t)},options:o[t]&&o[t].data?o[t].data:[],loading:a[i],hasNext:o[t]&&o[t].hasNext,onOpenChanged:function(e,n,o){return l(r[t].apiRoute,r[t].path,e,t,i,n,o)}},t);default:return}}!function(e){e.ENGLISH="en",e.ARABIC="ar"}(ah||(ah={}));var lh=function(){function e(){}return e.isEnglish=function(){switch(localStorage.getItem("i18nextLng")){case ah.ENGLISH:return!0;case ah.ARABIC:return!1;default:return!0}},e.getLocale=function(){return this.isEnglish()?ah.ENGLISH:ah.ARABIC},e.getLocalizedString=function(e){for(var t=this.getLocale(),n=e[0].value,r=0;r<e.length;r++){var o=e[r];if(o.key===t)return o.value?o.value:n}return n},e}(),ch=function(){function e(){}return e.getReferenceImage=function(e,t){var n=void 0,r=require("lodash");if(e.properties.disableImageOnReference)return n;var o=e.properties.model;if(e.properties.imageOnReferencePath)n=r.get(t,e.properties.imageOnReferencePath);else{if(n=this.getDataFromPath(o,"image",t))return n;if(n=this.getDataFromPath(o,"logo",t))return n;if(n=this.getDataFromPath(o,"photo",t))return n}return n},e.getDataFromPath=function(e,t,n){var r=require("lodash");return n[t]&&"string"==typeof n[t]?n[t]:e[t]&&e[t].valuePath?r.get(n,e[t].valuePath):void 0},e}(),uh=function(){function e(){}return e.get=function(e,t){if(!e||!e.properties)return"-";var n=e.properties.title,r=e.properties.model[n].type;return t[n]?r===bm.LOCALIZEDString?lh.getLocalizedString(t[n]):t[n]:this.getReferenceValue(t)},e.getReferenceValue=function(e){return e.name?e.name:e.firstName?e.firstName:e.lastName?e.lastName:e.email?e.email:e.title?e.title:e.phoneNumber?e.phoneNumber:e.phone?e.phone:e.number?e.number:e.key?e.key:e._id?e._id:"-"},e}();function dh(e){var t=e.referencedValues,n=e.value,r=e.loading,o=e.extraKey,a=e.fullKey,i=e.key,s=e.apiRoute,l=e.resources,c=e.pathRoute,u=e.schema,d=e.setLoading,p=e.setReferencedValues,f=e.page,m=e.filter;return G(this,void 0,void 0,(function(){var e,h,g,v,y,A,b,x,w,j,M,O,C,z,D,T,P,N;return U(this,(function(k){switch(k.label){case 0:return n?(e=t[a],(h=null==e?void 0:e.page)===f&&e.filter===m?[2]:((g=Q({},r))[a]=!0,d(g),v=m?"&filter=".concat(m):"",y=s||u[i].apiRoute,[4,Lm.get(y+"?page=".concat(f).concat(v))])):[2];case 1:for(A=k.sent(),b=A.data.data,x=b.records,w=b.pageInfo,j=[],M=0;M<x.length;M++)O=x[M],C=l[c||u[i].path],z=ch.getReferenceImage(C,O),D=uh.get(C,O),T={title:D,_id:O._id,image:z},o&&(T[o]=O[o]),j.push(T);return(P=Q({},t))[i]={data:h===f?j:P[i]&&P[i].data?P[i].data.concat(j):j,page:x.length>0?f:h,filter:m,hasNext:w.nextPage>0},p(P),(N=Q({},r))[a]=!1,d(N),[2]}}))}))}function ph(t){var r=this,o=t.schema,a=t.resources,i=t.filterProperties,s=t.searchParams,u=t.scopeKey,d=t.scopeValue,p=t.setParams,f=t.size;t.initialQueryParams;var m=t.isQuickFilter,h=t.quickFilterValues,g=t.onRefrenceChanged,v=t.setSearchParams,y=t.handleFilterDrawerClose,A=t.filterString,b=e.useState({}),x=b[0],w=b[1],j=e.useState({}),M=j[0],O=j[1],C=function(e,t,n,i,s,l,c){return G(r,void 0,void 0,(function(){return U(this,(function(r){switch(r.label){case 0:return[4,dh({apiRoute:e,referencedValues:M,value:n,loading:x,fullKey:s,key:i,pathRoute:t,resources:a,schema:o,setLoading:w,setReferencedValues:O,page:l,filter:c})];case 1:return r.sent(),[2]}}))}))},z={},D={};i.map((function(e,t){"__v"!==e&&o[e]&&(z[e]=Om(o[e],e,D,s))}));var T=E.object().shape(z),P=lh.isEnglish(),N=e.useMemo((function(){return D}),[]),k=c.useForm({resolver:Ci(T),defaultValues:N}),L=k.handleSubmit,S=k.reset,I=k.setValue,W=k.getValues,H=function(e){return G(r,void 0,void 0,(function(){var t,n;return U(this,(function(r){return t=Q(Q({},e),h),n=Nm(t,y,o,s,v,u,d),A&&A(n,e),[2]}))}))};return m?X.jsx(Ji,{methods:k,onSubmit:L(H),children:X.jsxs(n.Stack,{direction:"row",spacing:2,justifyContent:"end",children:[i&&i.map((function(e,t){return X.jsx(n.Grid,{minWidth:170,children:sh(f,e,o,M,x,e,P,C,g,I,W)},e+t)})),X.jsx(l.LoadingButton,{size:"small",type:"submit",variant:"outlined",children:P?"Filter":"التصفية"})]},"grid1")}):X.jsx("div",{children:X.jsx(B.Fragment,{children:X.jsxs(Ji,{methods:k,onSubmit:L(H),children:[X.jsx(Tm,{children:X.jsx(n.Grid,{container:!0,spacing:2,justifyContent:"end",style:{padding:"2rem"},children:i&&i.map((function(e,t){return X.jsx(n.Grid,{item:!0,xs:12,children:sh(f,e,o,M,x,e,P,C,g,I,W)},e+t)}))},"grid1")}),X.jsx(bo,{sx:{marginTop:"2rem",paddingBottom:"2rem"},children:X.jsx(n.Stack,{mt:2,ml:3,children:X.jsxs(n.Grid,{flexDirection:"column",children:[X.jsx(l.LoadingButton,{style:{flex:1,margin:8,width:150},type:"submit",variant:"contained",startIcon:Xm("FilterAlt"),children:P?"Filter":"التصفية"}),X.jsx(l.LoadingButton,{style:{flex:1},type:"reset",variant:"outlined",color:"inherit",startIcon:Xm("RestartAlt"),onClick:function(){v({}),p((function(e){return Q(Q({},e),{filters:void 0})})),S(Q({},N)),y()},children:P?"Reset":"إلغاء"})]})})})]})})})}function fh(e){var t=e.schema,r=e.resources,o=e.size,a=e.open,i=e.scopeKey,s=e.scopeValue,l=e.filterProperties,c=e.searchParams,u=e.setSearchParams,d=e.setParams,p=e.initialQueryParams,f=e.quickFilterValues,m=e.onRefrenceChanged,h=e.handleFilterDrawerClose,g=e.filterString,v=lh.isEnglish();return X.jsx("div",{children:X.jsx(B.Fragment,{children:X.jsxs(ai,{anchor:"right",open:a,onClose:h,children:[X.jsxs(n.Stack,{direction:"row",alignItems:"center",style:{minWidth:"340px",padding:"1rem",width:"20vw"},justifyContent:"space-between",sx:{px:1,py:1},children:[X.jsx(n.Typography,{variant:"h6",children:v?"Filters":"التصفية"}),X.jsx(n.IconButton,{onClick:h,children:X.jsx(wi,{})})]}),X.jsx(fi,{}),X.jsx(Tm,{children:X.jsx(ph,{schema:t,size:o,resources:r,initialQueryParams:p,filterProperties:l,onRefrenceChanged:m,handleFilterDrawerClose:h,filterString:g,scopeKey:i,scopeValue:s,setParams:d,searchParams:c,setSearchParams:u,quickFilterValues:f})})]})})})}function mh(e,t){var n=(e=new Date(e)).getMonth()+1,r=e.getDate(),o=hh(n),a=hh(r),i=e.getFullYear()+"-"+o+"-"+a;return t&&(i=i+" "+function(e,t){var n=e.getHours(),r=e.getMinutes(),o=n>=12?"pm":"am";return t===ah.ARABIC&&(o=function(e){switch(e){case"am":default:return"صباحاً";case"pm":return"مساءاً"}}(o)),(n=(n%=12)||12)+":"+(r=r<10?"0"+r:r)+" "+o}(e,ah.ENGLISH)),i}function hh(e){return e%10===e?"0".concat(e.toString()):e.toString()}var gh,vh=function(){function e(){}return e.getCartesianProduct=function(e){return e.reduce((function(e,t){return e.map((function(e){return t.map((function(t){return e.concat([t])}))})).reduce((function(e,t){return e.concat(t)}),[])}),[[]])},e.getReferenceValues=function(e){var t=e.referencedValues,n=e.value,r=e.loading,o=e.extraKey,a=e.fullKey,i=e.key,s=e.apiRoute,l=e.resources,c=e.pathRoute,u=e.schema,d=e.setLoading,p=e.setReferencedValues,f=e.adminPath;return G(this,void 0,void 0,(function(){var e,m,h,g,v,y,A,b,x,w,j,M,O,C;return U(this,(function(z){switch(z.label){case 0:return t[i]||!n?[2]:((e=Q({},r))[a]=!0,d(e),[4,Lm.get(s||(u[i].apiRoute?u[i].apiRoute:"".concat(null!=f?f:"","/").concat(l[u[i].path].properties.modelName)))]);case 1:for(m=z.sent(),h=m.data.data.records,g=[],v=0;v<h.length;v++)y=h[v],A=l[c||u[i].path],b=A.properties.title,x=A.properties.model[b].type,w=y[b],j=ch.getReferenceImage(A,y),x===bm.LOCALIZEDString&&(w=lh.getLocalizedString(w)),M={title:w,_id:y._id,image:j},o&&(M[o]=y[o]),g.push(M);return(O=Q({},t))[i]=g,p(O),(C=Q({},r))[a]=!1,d(C),[2]}}))}))},e.onErrorAction=function(e){var t=e.data,n=e.error,r=e.reset,o=e.setErrorState;(0,e.setSubmitStatus)(!1),r(t),setTimeout((function(){o({state:!1})}),4e3),o({state:!0,message:JSON.parse(n).meta.message,severity:"error"})},e.convertCamelCaseToWord=function(e){var t=e.replace(/([A-Z])/g," $1");return t.charAt(0).toUpperCase()+t.slice(1)},e.checkLocalizedString=function(e,t,n){return e[t].properties.model[n].type===bm.LOCALIZEDString},e.stringifyTime=function(e){if(e){var t=e.hour(),n=e.minute(),r=t>=12?"PM":"AM";return(t=(t=(t%=12)||12)<10?"0"+t:t)+":"+(n=n<10?"0"+n:n)+" "+r}},e.convertToOriginal=function(e){var t=e.split(":"),n=t[0],r=t[1].split(" "),o=r[0],a="PM"===r[1]?parseInt(n)+12:parseInt(n);return O("2022-04-07").set("minutes",parseInt(o)).set("hours",a)},e.getRecordName=function(e,t,n){return n&&"string"!=typeof e&&n.properties.model[t].type===bm.LOCALIZEDString?lh.getLocalizedString(e):e},e}();!function(e){e.ALL="ALL",e.IMAGE="IMAGE",e._3D="3D",e.PDF="PDF",e.EXCEL="EXCEL",e.WORD="WORD",e.VIDEO="VIDEO",e.TEXT="TEXT",e.ZIP="ZIP",e.POWER_POINT="POWER_POINT",e.AUDIO="AUDIO"}(gh||(gh={}));var yh=["pdf"],Ah=["txt"],bh=["psd"],xh=["doc","docx"],wh=["xls","xlsx"],jh=["zip","rar","iso"],Mh=["ai","esp"],Oh=["ppt","pptx"],Ch=["wav","aif","mp3","aac"],zh=["jpg","jpeg","gif","bmp","png","svg","webp","avif","JPG"],Dh=["m4v","avi","mpg","mp4","webm"],Th=["gltf","stl","glb"],Ph=function(e){return"/assets/icons/files/".concat(e,".svg")};function Nh(e){var t;switch(null==e?void 0:e.includes(Bh(e))){case Ah.includes(Bh(e)):t="txt";break;case jh.includes(Bh(e)):t="zip";break;case Ch.includes(Bh(e)):t="audio";break;case zh.includes(Bh(e)):t="image";break;case Dh.includes(Bh(e)):t="video";break;case xh.includes(Bh(e)):t="word";break;case wh.includes(Bh(e)):t="excel";break;case Oh.includes(Bh(e)):t="powerpoint";break;case yh.includes(Bh(e)):t="pdf";break;case bh.includes(Bh(e)):t="photoshop";break;case Mh.includes(Bh(e)):t="illustrator";break;default:t=Bh(e)}return t}function kh(e){var t;switch(Nh(e)){case"folder":t=Ph("ic_folder");break;case"txt":t=Ph("ic_txt");break;case"zip":t=Ph("ic_zip");break;case"audio":t=Ph("ic_audio");break;case"video":t=Ph("ic_video");break;case"word":t=Ph("ic_word");break;case"excel":t=Ph("ic_excel");break;case"powerpoint":t=Ph("ic_power_point");break;case"pdf":t=Ph("ic_pdf");break;case"photoshop":t=Ph("ic_pts");break;case"illustrator":t=Ph("ic_ai");break;case"image":t=Ph("ic_img");break;default:t=Ph("ic_file")}return t}function Bh(e){return void 0===e&&(e=""),e&&e.split(".").pop()||""}function Eh(e,t){if(t!==gh.ALL)return t;var n;switch(null==e?void 0:e.includes(Bh(e))){case Ah.includes(Bh(e)):n=gh.TEXT;break;case jh.includes(Bh(e)):n=gh.ZIP;break;case Ch.includes(Bh(e)):n=gh.AUDIO;break;case zh.includes(Bh(e)):n=gh.IMAGE;break;case Dh.includes(Bh(e)):n=gh.VIDEO;break;case xh.includes(Bh(e)):n=gh.WORD;break;case wh.includes(Bh(e)):n=gh.EXCEL;break;case Oh.includes(Bh(e)):n=gh.POWER_POINT;break;case yh.includes(Bh(e)):n=gh.PDF;break;case bh.includes(Bh(e)):case Mh.includes(Bh(e)):n=gh.IMAGE;break;case Th.includes(Bh(e)):n=gh._3D;break;default:n=gh.IMAGE}return n}const Lh=function(e={}){const{createStyledComponent:t=Dr,useThemeProps:n=Tr,componentName:r="MuiStack"}=e,o=t(kr),a=B.forwardRef((function(e,t){const a=qn(n(e)),{component:i="div",direction:s="column",spacing:l=0,divider:c,children:u,className:d,useFlexGap:p=!1}=a,f=Wt(a,Cr),m={direction:s,spacing:l,useFlexGap:p},h=Pt({root:["root"]},(e=>Et(r,e)),{});return X.jsx(o,ne({as:i,ownerState:m,ref:t,className:Jn(h.root,d)},f,{children:c?Pr(u,c):u}))}));return"production"!==process.env.NODE_ENV&&(a.propTypes={children:Pe.node,direction:Pe.oneOfType([Pe.oneOf(["column-reverse","column","row-reverse","row"]),Pe.arrayOf(Pe.oneOf(["column-reverse","column","row-reverse","row"])),Pe.object]),divider:Pe.node,spacing:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.number,Pe.string])),Pe.number,Pe.object,Pe.string]),sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])}),a}({createStyledComponent:mo("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>uo({props:e,name:"MuiStack"})});"production"!==process.env.NODE_ENV&&(Lh.propTypes={children:Pe.node,component:Pe.elementType,direction:Pe.oneOfType([Pe.oneOf(["column-reverse","column","row-reverse","row"]),Pe.arrayOf(Pe.oneOf(["column-reverse","column","row-reverse","row"])),Pe.object]),divider:Pe.node,spacing:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.number,Pe.string])),Pe.number,Pe.object,Pe.string]),sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),useFlexGap:Pe.bool});var Sh=Lh;function Ih(e){return Et("MuiTooltip",e)}var Wh=Lt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const Hh=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];const Rh=mo(qd,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((({theme:e,ownerState:t,open:n})=>ne({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Wh.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Wh.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Wh.arrow}`]:ne({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Wh.arrow}`]:ne({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),Vh=mo("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ue(n.placement.split("-")[0])}`]]}})((({theme:e,ownerState:t})=>{return ne({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:vr(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(n=16/14,Math.round(1e5*n)/1e5)+"em",fontWeight:e.typography.fontWeightRegular},{[`.${Wh.popper}[data-popper-placement*="left"] &`]:ne({transformOrigin:"right center"},t.isRtl?ne({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):ne({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Wh.popper}[data-popper-placement*="right"] &`]:ne({transformOrigin:"left center"},t.isRtl?ne({marginRight:"14px"},t.touch&&{marginRight:"24px"}):ne({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Wh.popper}[data-popper-placement*="top"] &`]:ne({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Wh.popper}[data-popper-placement*="bottom"] &`]:ne({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})});var n})),Yh=mo("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:vr(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Fh=!1,Xh=null,Qh={x:0,y:0};function Zh(e,t){return n=>{t&&t(n),e(n)}}const Gh=B.forwardRef((function(e,t){var n,r,o,a,i,s,l,c,u,d,p,f,m,h,g,v,y,A,b;const x=uo({props:e,name:"MuiTooltip"}),{arrow:w=!1,children:j,components:M={},componentsProps:O={},describeChild:C=!1,disableFocusListener:z=!1,disableHoverListener:D=!1,disableInteractive:T=!1,disableTouchListener:P=!1,enterDelay:N=100,enterNextDelay:k=0,enterTouchDelay:E=700,followCursor:L=!1,id:S,leaveDelay:I=0,leaveTouchDelay:W=1500,onClose:H,onOpen:R,open:V,placement:Y="bottom",PopperComponent:F,PopperProps:Q={},slotProps:Z={},slots:G={},title:U,TransitionComponent:q=Yu,TransitionProps:K}=x,J=Wt(x,Hh),_=B.isValidElement(j)?j:X.jsx("span",{children:j}),$=co(),ee="rtl"===$.direction,[te,re]=B.useState(),[oe,ae]=B.useState(null),ie=B.useRef(!1),se=T||L,le=B.useRef(),ce=B.useRef(),ue=B.useRef(),de=B.useRef(),[pe,fe]=st({controlled:V,default:!1,name:"Tooltip",state:"open"});let me=pe;if("production"!==process.env.NODE_ENV){const{current:e}=B.useRef(void 0!==V);B.useEffect((()=>{te&&te.disabled&&!e&&""!==U&&"button"===te.tagName.toLowerCase()&&console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join("\n"))}),[U,te,e])}const he=at(S),ge=B.useRef(),ve=B.useCallback((()=>{void 0!==ge.current&&(document.body.style.WebkitUserSelect=ge.current,ge.current=void 0),clearTimeout(de.current)}),[]);B.useEffect((()=>()=>{clearTimeout(le.current),clearTimeout(ce.current),clearTimeout(ue.current),ve()}),[ve]);const ye=e=>{clearTimeout(Xh),Fh=!0,fe(!0),R&&!me&&R(e)},Ae=lt((e=>{clearTimeout(Xh),Xh=setTimeout((()=>{Fh=!1}),800+I),fe(!1),H&&me&&H(e),clearTimeout(le.current),le.current=setTimeout((()=>{ie.current=!1}),$.transitions.duration.shortest)})),be=e=>{ie.current&&"touchstart"!==e.type||(te&&te.removeAttribute("title"),clearTimeout(ce.current),clearTimeout(ue.current),N||Fh&&k?ce.current=setTimeout((()=>{ye(e)}),Fh?k:N):ye(e))},xe=e=>{clearTimeout(ce.current),clearTimeout(ue.current),ue.current=setTimeout((()=>{Ae(e)}),I)},{isFocusVisibleRef:we,onBlur:je,onFocus:Me,ref:Oe}=yt(),[,Ce]=B.useState(!1),ze=e=>{je(e),!1===we.current&&(Ce(!1),xe(e))},De=e=>{te||re(e.currentTarget),Me(e),!0===we.current&&(Ce(!0),be(e))},Te=e=>{ie.current=!0;const t=_.props;t.onTouchStart&&t.onTouchStart(e)},Pe=be,Ne=xe,ke=e=>{Te(e),clearTimeout(ue.current),clearTimeout(le.current),ve(),ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",de.current=setTimeout((()=>{document.body.style.WebkitUserSelect=ge.current,be(e)}),E)},Be=e=>{_.props.onTouchEnd&&_.props.onTouchEnd(e),ve(),clearTimeout(ue.current),ue.current=setTimeout((()=>{Ae(e)}),W)};B.useEffect((()=>{if(me)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||Ae(e)}}),[Ae,me]);const Ee=ct(_.ref,Oe,re,t);U||0===U||(me=!1);const Le=B.useRef(),Se={},Ie="string"==typeof U;C?(Se.title=me||!Ie||D?null:U,Se["aria-describedby"]=me?he:null):(Se["aria-label"]=Ie?U:null,Se["aria-labelledby"]=me&&!Ie?he:null);const We=ne({},Se,J,_.props,{className:Jn(J.className,_.props.className),onTouchStart:Te,ref:Ee},L?{onMouseMove:e=>{const t=_.props;t.onMouseMove&&t.onMouseMove(e),Qh={x:e.clientX,y:e.clientY},Le.current&&Le.current.update()}}:{});"production"!==process.env.NODE_ENV&&(We["data-mui-internal-clone-element"]=!0,B.useEffect((()=>{te&&!te.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join("\n"))}),[te]));const He={};P||(We.onTouchStart=ke,We.onTouchEnd=Be),D||(We.onMouseOver=Zh(Pe,We.onMouseOver),We.onMouseLeave=Zh(Ne,We.onMouseLeave),se||(He.onMouseOver=Pe,He.onMouseLeave=Ne)),z||(We.onFocus=Zh(De,We.onFocus),We.onBlur=Zh(ze,We.onBlur),se||(He.onFocus=De,He.onBlur=ze)),"production"!==process.env.NODE_ENV&&_.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${_.props.title}\` or the Tooltip component.`].join("\n"));const Re=B.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(oe),options:{element:oe,padding:4}}];return null!=(e=Q.popperOptions)&&e.modifiers&&(t=t.concat(Q.popperOptions.modifiers)),ne({},Q.popperOptions,{modifiers:t})}),[oe,Q]),Ve=ne({},x,{isRtl:ee,arrow:w,disableInteractive:se,placement:Y,PopperComponentProp:F,touch:ie.current}),Ye=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:a}=e;return Pt({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Ue(a.split("-")[0])}`],arrow:["arrow"]},Ih,t)})(Ve),Fe=null!=(n=null!=(r=G.popper)?r:M.Popper)?n:Rh,Xe=null!=(o=null!=(a=null!=(i=G.transition)?i:M.Transition)?a:q)?o:Yu,Qe=null!=(s=null!=(l=G.tooltip)?l:M.Tooltip)?s:Vh,Ze=null!=(c=null!=(u=G.arrow)?u:M.Arrow)?c:Yh,Ge=Mo(Fe,ne({},Q,null!=(d=Z.popper)?d:O.popper,{className:Jn(Ye.popper,null==Q?void 0:Q.className,null==(p=null!=(f=Z.popper)?f:O.popper)?void 0:p.className)}),Ve),qe=Mo(Xe,ne({},K,null!=(m=Z.transition)?m:O.transition),Ve),Ke=Mo(Qe,ne({},null!=(h=Z.tooltip)?h:O.tooltip,{className:Jn(Ye.tooltip,null==(g=null!=(v=Z.tooltip)?v:O.tooltip)?void 0:g.className)}),Ve),Je=Mo(Ze,ne({},null!=(y=Z.arrow)?y:O.arrow,{className:Jn(Ye.arrow,null==(A=null!=(b=Z.arrow)?b:O.arrow)?void 0:A.className)}),Ve);return X.jsxs(B.Fragment,{children:[B.cloneElement(_,We),X.jsx(Fe,ne({as:null!=F?F:qd,placement:Y,anchorEl:L?{getBoundingClientRect:()=>({top:Qh.y,left:Qh.x,right:Qh.x,bottom:Qh.y,width:0,height:0})}:te,popperRef:Le,open:!!te&&me,id:he,transition:!0},He,Ge,{popperOptions:Re,children:({TransitionProps:e})=>X.jsx(Xe,ne({timeout:$.transitions.duration.shorter},e,qe,{children:X.jsxs(Qe,ne({},Ke,{children:[U,w?X.jsx(Ze,ne({},Je,{ref:ae})):null]}))}))}))]})}));"production"!==process.env.NODE_ENV&&(Gh.propTypes={arrow:Pe.bool,children:Be.isRequired,classes:Pe.object,className:Pe.string,components:Pe.shape({Arrow:Pe.elementType,Popper:Pe.elementType,Tooltip:Pe.elementType,Transition:Pe.elementType}),componentsProps:Pe.shape({arrow:Pe.object,popper:Pe.object,tooltip:Pe.object,transition:Pe.object}),describeChild:Pe.bool,disableFocusListener:Pe.bool,disableHoverListener:Pe.bool,disableInteractive:Pe.bool,disableTouchListener:Pe.bool,enterDelay:Pe.number,enterNextDelay:Pe.number,enterTouchDelay:Pe.number,followCursor:Pe.bool,id:Pe.string,leaveDelay:Pe.number,leaveTouchDelay:Pe.number,onClose:Pe.func,onOpen:Pe.func,open:Pe.bool,placement:Pe.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:Pe.elementType,PopperProps:Pe.object,slotProps:Pe.shape({arrow:Pe.object,popper:Pe.object,tooltip:Pe.object,transition:Pe.object}),slots:Pe.shape({arrow:Pe.elementType,popper:Pe.elementType,tooltip:Pe.elementType,transition:Pe.elementType}),sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),title:Pe.node,TransitionComponent:Pe.elementType,TransitionProps:Pe.object});var Uh=Gh;var qh=Lt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);function Kh(e){return Et("MuiListItemIcon",e)}var Jh=Lt("MuiListItemIcon",["root","alignItemsFlexStart"]);const _h=["className"],$h=mo("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>ne({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),eg=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiListItemIcon"}),{className:r}=n,o=Wt(n,_h),a=ne({},n,{alignItems:B.useContext(ju).alignItems}),i=(e=>{const{alignItems:t,classes:n}=e;return Pt({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Kh,n)})(a);return X.jsx($h,ne({className:Jn(i.root,r),ownerState:a,ref:t},o))}));"production"!==process.env.NODE_ENV&&(eg.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var tg=eg;function ng(e){return Et("MuiListItemText",e)}var rg=Lt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);const og=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],ag=mo("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${rg.primary}`]:t.primary},{[`& .${rg.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})((({ownerState:e})=>ne({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}))),ig=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiListItemText"}),{children:r,className:o,disableTypography:a=!1,inset:i=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:u}=n,d=Wt(n,og),{dense:p}=B.useContext(ju);let f=null!=s?s:r,m=c;const h=ne({},n,{disableTypography:a,inset:i,primary:!!f,secondary:!!m,dense:p}),g=(e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:a}=e;return Pt({root:["root",n&&"inset",a&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},ng,t)})(h);return null==f||f.type===Cf||a||(f=X.jsx(Cf,ne({variant:p?"body2":"body1",className:g.primary,component:null!=l&&l.variant?void 0:"span",display:"block"},l,{children:f}))),null==m||m.type===Cf||a||(m=X.jsx(Cf,ne({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},u,{children:m}))),X.jsxs(ag,ne({className:Jn(g.root,o),ownerState:h,ref:t},d,{children:[f,m]}))}));"production"!==process.env.NODE_ENV&&(ig.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,disableTypography:Pe.bool,inset:Pe.bool,primary:Pe.node,primaryTypographyProps:Pe.object,secondary:Pe.node,secondaryTypographyProps:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var sg=ig;function lg(e){return Et("MuiMenuItem",e)}var cg=Lt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const ug=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],dg=mo(xp,{shouldForwardProp:e=>po(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>ne({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${cg.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${cg.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${cg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${cg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${cg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${si.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${si.inset}`]:{marginLeft:52},[`& .${rg.root}`]:{marginTop:0,marginBottom:0},[`& .${rg.inset}`]:{paddingLeft:36},[`& .${Jh.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&ne({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Jh.root} svg`]:{fontSize:"1.25rem"}})))),pg=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:a=!1,divider:i=!1,disableGutters:s=!1,focusVisibleClassName:l,role:c="menuitem",tabIndex:u,className:d}=n,p=Wt(n,ug),f=B.useContext(ju),m=B.useMemo((()=>({dense:a||f.dense||!1,disableGutters:s})),[f.dense,a,s]),h=B.useRef(null);nt((()=>{r&&(h.current?h.current.focus():"production"!==process.env.NODE_ENV&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))}),[r]);const g=ne({},n,{dense:m.dense,divider:i,disableGutters:s}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:a,classes:i}=e;return ne({},i,Pt({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",a&&"selected"]},lg,i))})(n),y=ct(h,t);let A;return n.disabled||(A=void 0!==u?u:-1),X.jsx(ju.Provider,{value:m,children:X.jsx(dg,ne({ref:y,role:c,tabIndex:A,component:o,focusVisibleClassName:Jn(v.focusVisible,l),className:Jn(v.root,d)},p,{ownerState:g,classes:v}))})}));"production"!==process.env.NODE_ENV&&(pg.propTypes={autoFocus:Pe.bool,children:Pe.node,classes:Pe.object,className:Pe.string,component:Pe.elementType,dense:Pe.bool,disabled:Pe.bool,disableGutters:Pe.bool,divider:Pe.bool,focusVisibleClassName:Pe.string,role:Pe.string,selected:Pe.bool,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),tabIndex:Pe.number});var fg=pg,mg=function(e){var t=e.theme,n=e.bgcolor,r=e.dropdown;return Q(Q(Q({},gg(Q({blur:20,opacity:.9,color:t.palette.background.paper},!!n&&{color:n}))),{backgroundImage:"url(/assets/cyan-blur.png), url(/assets/red-blur.png)",backgroundRepeat:"no-repeat, no-repeat",backgroundPosition:"top right, left bottom",backgroundSize:"50%, 50%"}),r&&{padding:t.spacing(.5),boxShadow:t.customShadows.dropdown,borderRadius:1.25*t.shape.borderRadius})},hg=function(e){var t;return Q(Q({},e.typography.body2),((t={padding:e.spacing(.75,1),borderRadius:.75*e.shape.borderRadius,"&:not(:last-of-type)":{marginBottom:4}})["&.".concat(cg.selected)]={fontWeight:e.typography.fontWeightSemiBold,backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}},t["& .".concat(qh.root)]={padding:e.spacing(.5),marginLeft:e.spacing(-.5),marginRight:e.spacing(.5)},t["&.".concat(Vp.option,'[aria-selected="true"]')]={backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}},t["&+.".concat(si.root)]={margin:e.spacing(.5,0)},t))};function gg(e){var t=(null==e?void 0:e.color)||"#000000",n=(null==e?void 0:e.blur)||6,r=(null==e?void 0:e.opacity)||.8,o=null==e?void 0:e.imgUrl;return o?{position:"relative",backgroundImage:"url(".concat(o,")"),"&:before":{position:"absolute",top:0,left:0,zIndex:9,content:'""',width:"100%",height:"100%",backdropFilter:"blur(".concat(n,"px)"),WebkitBackdropFilter:"blur(".concat(n,"px)"),backgroundColor:vr(t,r)}}:{backdropFilter:"blur(".concat(n,"px)"),WebkitBackdropFilter:"blur(".concat(n,"px)"),backgroundColor:vr(t,r)}}var vg={x:{msOverflowStyle:"none",scrollbarWidth:"none",overflowX:"scroll","&::-webkit-scrollbar":{display:"none"}},y:{msOverflowStyle:"none",scrollbarWidth:"none",overflowY:"scroll","&::-webkit-scrollbar":{display:"none"}}};function yg(e){var t=e.onDownload,n=co();return X.jsx(zp,{onClick:t,sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",borderRadius:"unset",justifyContent:"center",bgcolor:"grey.800",color:"common.white",transition:n.transitions.create(["opacity"]),"&:hover":Q({opacity:1},gg({opacity:.64,color:n.palette.grey[900]}))},children:X.jsx(xo,{icon:"eva:arrow-circle-down-fill",width:24})})}var Ag,bg=mo("span")((function(e){var t=e.arrow,n=e.theme,r=-6.5,o={top:r,transform:"rotate(135deg)"},a={bottom:r,transform:"rotate(-45deg)"},i={left:r,transform:"rotate(45deg)"},s={right:r,transform:"rotate(-135deg)"};return Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q({width:14,height:14,position:"absolute",borderBottomLeftRadius:3.5,clipPath:"polygon(0% 0%, 100% 100%, 0% 100%)",border:"solid 1px ".concat(vr("light"===n.palette.mode?n.palette.grey[500]:n.palette.common.black,.12))},gg({color:n.palette.background.paper})),"top-left"===t&&Q(Q({},o),{left:20})),"top-center"===t&&Q(Q({},o),{left:0,right:0,margin:"auto"})),"top-right"===t&&Q(Q({},o),{right:20})),"bottom-left"===t&&Q(Q({},a),{left:20})),"bottom-center"===t&&Q(Q({},a),{left:0,right:0,margin:"auto"})),"bottom-right"===t&&Q(Q({},a),{right:20})),"left-top"===t&&Q(Q({},i),{top:20})),"left-center"===t&&Q(Q({},i),{top:0,bottom:0,margin:"auto"})),"left-bottom"===t&&Q(Q({},i),{bottom:20})),"right-top"===t&&Q(Q({},s),{top:20})),"right-center"===t&&Q(Q({},s),{top:0,bottom:0,margin:"auto"})),"right-bottom"===t&&Q(Q({},s),{bottom:20}))}));function xg(e){var t,n=e.open,r=e.children,o=e.arrow,a=void 0===o?"top-right":o,i=e.hiddenArrow,s=e.sx,l=Z(e,["open","children","arrow","hiddenArrow","sx"]),c=function(e){var t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}}}return t}(a),u=c.style,d=c.anchorOrigin,p=c.transformOrigin;return X.jsxs(td,Q({open:Boolean(n),anchorEl:n,anchorOrigin:d,transformOrigin:p,PaperProps:{sx:Q(Q(Q({width:"auto",overflow:"inherit"},u),(t={},t["& .".concat(cg.root)]={"& svg":{mr:2,flexShrink:0}},t)),s)}},l,{children:[!i&&X.jsx(bg,{arrow:a}),r]}))}function wg(e){var t=e.actions,r=e.open,o=e.onClose,a=e.onOpen;return X.jsxs(X.Fragment,{children:[X.jsx(n.IconButton,{onClick:a,children:X.jsx(xo,{icon:"eva:more-vertical-fill",width:20,height:20})}),X.jsx(xg,{open:r,anchorEl:r,onClose:o,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},arrow:"right-top",sx:{mt:-1,width:160,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20}}},children:t})]})}function jg(e){var t=e.title,r=e.children,o=e.type,a=o===bm.NESTEDSCHEMA||o===bm.ARRAY||o===bm.RICH_TEXT_I||o===bm.RICH_TEXT_II;return X.jsxs(n.Grid,{item:!0,xs:12,md:a?12:6,sx:{mb:3.5},children:[X.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:t}),r]})}function Mg(e){var t=e.fieldschema;return X.jsx(jg,Q({},e,{type:bm.ARRAY,children:X.jsx(nv,Q({},e,{type:bm.ARRAY,children:function(n,r){return X.jsx(nv,Q({},e,{type:t.arrayType,value:n}))}}))}))}function Og(e){return X.jsx(jg,Q({},e,{children:X.jsx(nv,Q({type:bm.BOOLEAN},e))}))}function Cg(e){return X.jsx(jg,Q({},e,{children:X.jsx(nv,Q({type:bm.COLOR},e))}))}function zg(e){return X.jsx(jg,Q({},e,{children:X.jsx(nv,Q({type:bm.DATE},e))}))}function Dg(e){return X.jsx(jg,Q({},e,{children:X.jsx(nv,Q({type:bm.ENUM},e))}))}function Tg(e){return X.jsx(jg,Q({},e,{children:X.jsx(nv,Q({type:bm.IMAGE},e))}))}function Pg(e){return X.jsx(jg,Q({},e,{children:X.jsx(nv,Q({type:bm.LOCALIZEDString},e))}))}function Ng(e){return X.jsx(jg,Q({},e,{children:X.jsx(nv,Q({type:bm.LOCATION},e))}))}function kg(e){return X.jsx(jg,Q({},e,{type:bm.NESTEDSCHEMA,children:X.jsx(nv,Q({type:bm.NESTEDSCHEMA},e))}))}function Bg(e){return X.jsx(jg,Q({},e,{children:X.jsx(nv,Q({type:bm.REFERENCE},e))}))}function Eg(e){return X.jsx(jg,Q({},e,{children:X.jsx(nv,Q({type:bm.STRING},e))}))}function Lg(e){return X.jsx(jg,Q({},e,{children:X.jsx(nv,Q({type:bm.RICH_TEXT_I},e))}))}function Sg(e){return X.jsx(jg,Q({},e,{children:X.jsx(nv,Q({type:bm.RICH_TEXT_II},e))}))}function Ig(e){var t,n=e.property,r=e.schema,o=e.record,a=e.userpath,i=e.resources,s=n.key,l=n.path,c=r[s],u=null==n?void 0:n.value,d=o[s],p={fieldkey:s,key:s,title:u,value:d,resources:i,userpath:a,path:l,fieldschema:c,color:"black",type:c.type};switch(c.type){case bm.STRING:return/^#[0-9A-F]{6}$/i.test(d)?X.jsx(Cg,Q({},p)):"object"==typeof d?X.jsx(Eg,Q({},p,{title:u||tv,value:d[0]&&null!==(t=lh.getLocalizedString(d))&&void 0!==t?t:tv})):X.jsx(Eg,Q({},p));case bm.NUMBER:case bm.OBJECTID:case bm.PHONENUMBER:case bm.TIMEPICKER:return X.jsx(Eg,Q({},p));case bm.DATE:return X.jsx(zg,Q({},p));case bm.LOCATION:return X.jsx(Ng,Q({},p,{value:{address:d.address,longitude:d.longitude,latitude:d.latitude}}));case bm.ENUM:return X.jsx(Dg,Q({},p,{enumvalues:c.enumValues}));case bm.IMAGE:return X.jsx(Tg,Q({},p));case bm.BOOLEAN:return X.jsx(Og,Q({},p));case bm.NESTEDSCHEMA:return X.jsx(kg,Q({},p,{fieldschema:r[s]}));case bm.LOCALIZEDString:return X.jsx(Pg,Q({},p));case bm.RICH_TEXT_I:return X.jsx(Lg,Q({},p));case bm.RICH_TEXT_II:return X.jsx(Sg,Q({},p));case bm.ARRAY:return X.jsx(Mg,Q({},p,{fieldschema:c,enumvalues:c.enumValues}));case bm.REFERENCE:return X.jsx(Bg,Q({},p))}return X.jsx(X.Fragment,{})}function Wg(e){var t,r=e.fieldschema,o=e.value;return X.jsx(n.Card,{sx:{py:3,px:3},children:X.jsx(n.Grid,{container:!0,children:null===(t=null==r?void 0:r.keys)||void 0===t?void 0:t.map((function(t){var n;return(n=JSON.parse(JSON.stringify(null==r?void 0:r.schema[t]))).key=t,o&&X.jsx(Ig,Q({},e,{property:n,schema:r.schema,record:o}),n.key)}))})})}function Hg(e){var t=e.value;return X.jsx(n.Card,{sx:{py:3,px:3},children:X.jsx(n.Stack,{direction:"column",spacing:2,children:t.map((function(e,t){return X.jsxs(n.Stack,{direction:"row",spacing:1,children:[X.jsx(ki,{disabledEffect:!0,visibleByDefault:!0,alt:"empty content",src:Rg(e.key),sx:{width:30,height:20}}),X.jsx(n.Typography,{fontWeight:600,fontSize:14,children:e.value})]},t+e.key)}))})})}function Rg(e){switch(e){case ah.ARABIC:return Ag.ARABIC_FLAG;case ah.ENGLISH:default:return Ag.ENGLISH_FLAG}}function Vg(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}!function(e){e.ENGLISH_FLAG="https://pngimg.com/uploads/flags/flags_PNG14592.png",e.ARABIC_FLAG="/assets/icons/flags/ic_flag_sa.svg"}(Ag||(Ag={}));var Yg={exports:{}};!function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function o(e){t=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var n,r=[],o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function f(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return Un(e,t,n,r,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=h()),e._pf}function v(e){if(null==e._isValid){var t=g(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function y(e){var t=m(NaN);return null!=e?f(g(t),e):g(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var A=r.momentProperties=[],b=!1;function x(e,t){var n,r,o,a=A.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=g(t)),c(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)c(o=t[r=A[n]])||(e[r]=o);return e}function w(e){x(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,r.updateOffset(this),b=!1)}function j(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function M(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function O(e,t){var n=!0;return f((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var o,a,i,l=[],c=arguments.length;for(a=0;a<c;a++){if(o="","object"==typeof arguments[a]){for(i in o+="\n["+a+"] ",arguments[0])s(arguments[0],i)&&(o+=i+": "+arguments[0][i]+", ");o=o.slice(0,-2)}else o=arguments[a];l.push(o)}M(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var C,z={};function D(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),z[e]||(M(t),z[e]=!0)}function T(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function P(e){var t,n;for(n in e)s(e,n)&&(T(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function N(e,t){var n,r=f({},e);for(n in t)s(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},f(r[n],e[n]),f(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&i(e[n])&&(r[n]=f({},r[n]));return r}function k(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,C=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var B={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function E(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return T(r)?r.call(t,n):r}function L(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var S=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,W={},H={};function R(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(H[e]=o),t&&(H[t[0]]=function(){return L(o.apply(this,arguments),t[1],t[2])}),n&&(H[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function V(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Y(e){var t,n,r=e.match(S);for(t=0,n=r.length;t<n;t++)H[r[t]]?r[t]=H[r[t]]:r[t]=V(r[t]);return function(t){var o,a="";for(o=0;o<n;o++)a+=T(r[o])?r[o].call(t,e):r[o];return a}}function F(e,t){return e.isValid()?(t=X(t,e.localeData()),W[t]=W[t]||Y(t),W[t](e)):e.localeData().invalidDate()}function X(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(I.lastIndex=0;n>=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,n-=1;return e}var Q={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Z(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(S).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var G="Invalid date";function U(){return this._invalidDate}var q="%d",K=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var _={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function $(e,t,n,r){var o=this._relativeTime[n];return T(o)?o(e,t,n,r):o.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function re(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function oe(e){var t,n,r={};for(n in e)s(e,n)&&(t=re(n))&&(r[t]=e[n]);return r}var ae={};function ie(e,t){ae[e]=t}function se(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:ae[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function le(e){return e%4==0&&e%100!=0||e%400==0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ue(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}function de(e,t){return function(n){return null!=n?(fe(this,e,n),r.updateOffset(this,t),this):pe(this,e)}}function pe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(n=ue(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),$e(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function me(e){return T(this[e=re(e)])?this[e]():this}function he(e,t){if("object"==typeof e){var n,r=se(e=oe(e)),o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(T(this[e=re(e)]))return this[e](t);return this}var ge,ve=/\d/,ye=/\d\d/,Ae=/\d{3}/,be=/\d{4}/,xe=/[+-]?\d{6}/,we=/\d\d?/,je=/\d\d\d\d?/,Me=/\d\d\d\d\d\d?/,Oe=/\d{1,3}/,Ce=/\d{1,4}/,ze=/[+-]?\d{1,6}/,De=/\d+/,Te=/[+-]?\d+/,Pe=/Z|[+-]\d\d:?\d\d/gi,Ne=/Z|[+-]\d\d(?::?\d\d)?/gi,ke=/[+-]?\d+(\.\d{1,3})?/,Be=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Ee(e,t,n){ge[e]=T(t)?t:function(e,r){return e&&n?n:t}}function Le(e,t){return s(ge,e)?ge[e](t._strict,t._locale):new RegExp(Se(e))}function Se(e){return Ie(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o})))}function Ie(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ge={};var We={};function He(e,t){var n,r,o=t;for("string"==typeof e&&(e=[e]),u(t)&&(o=function(e,n){n[t]=ue(e)}),r=e.length,n=0;n<r;n++)We[e[n]]=o}function Re(e,t){He(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function Ve(e,t,n){null!=t&&s(We,e)&&We[e](t,n._a,n,e)}var Ye,Fe=0,Xe=1,Qe=2,Ze=3,Ge=4,Ue=5,qe=6,Ke=7,Je=8;function _e(e,t){return(e%t+t)%t}function $e(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=_e(t,12);return e+=(t-n)/12,1===n?le(e)?29:28:31-n%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},R("M",["MM",2],"Mo",(function(){return this.month()+1})),R("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),R("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ne("month","M"),ie("month",8),Ee("M",we),Ee("MM",we,ye),Ee("MMM",(function(e,t){return t.monthsShortRegex(e)})),Ee("MMMM",(function(e,t){return t.monthsRegex(e)})),He(["M","MM"],(function(e,t){t[Xe]=ue(e)-1})),He(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[Xe]=o:g(n).invalidMonth=e}));var et="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,rt=Be,ot=Be;function at(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone}function it(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function st(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Ye.call(this._shortMonthsParse,i))?o:null:-1!==(o=Ye.call(this._longMonthsParse,i))?o:null:"MMM"===t?-1!==(o=Ye.call(this._shortMonthsParse,i))||-1!==(o=Ye.call(this._longMonthsParse,i))?o:null:-1!==(o=Ye.call(this._longMonthsParse,i))||-1!==(o=Ye.call(this._shortMonthsParse,i))?o:null}function lt(e,t,n){var r,o,a;if(this._monthsParseExact)return st.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ct(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=ue(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),$e(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ut(e){return null!=e?(ct(this,e),r.updateOffset(this,!0),this):pe(this,"Month")}function dt(){return $e(this.year(),this.month())}function pt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||mt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=rt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ft(e){return this._monthsParseExact?(s(this,"_monthsRegex")||mt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=ot),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function mt(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],a=[];for(t=0;t<12;t++)n=m([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),a.sort(e),t=0;t<12;t++)r[t]=Ie(r[t]),o[t]=Ie(o[t]);for(t=0;t<24;t++)a[t]=Ie(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function ht(e){return le(e)?366:365}R("Y",0,0,(function(){var e=this.year();return e<=9999?L(e,4):"+"+e})),R(0,["YY",2],0,(function(){return this.year()%100})),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),ne("year","y"),ie("year",1),Ee("Y",Te),Ee("YY",we,ye),Ee("YYYY",Ce,be),Ee("YYYYY",ze,xe),Ee("YYYYYY",ze,xe),He(["YYYYY","YYYYYY"],Fe),He("YYYY",(function(e,t){t[Fe]=2===e.length?r.parseTwoDigitYear(e):ue(e)})),He("YY",(function(e,t){t[Fe]=r.parseTwoDigitYear(e)})),He("Y",(function(e,t){t[Fe]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return ue(e)+(ue(e)>68?1900:2e3)};var gt=de("FullYear",!0);function vt(){return le(this.year())}function yt(e,t,n,r,o,a,i){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,a,i),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,a,i),s}function At(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function bt(e,t,n){var r=7+t-n;return-(7+At(e,0,r).getUTCDay()-t)%7+r-1}function xt(e,t,n,r,o){var a,i,s=1+7*(t-1)+(7+n-r)%7+bt(e,r,o);return s<=0?i=ht(a=e-1)+s:s>ht(e)?(a=e+1,i=s-ht(e)):(a=e,i=s),{year:a,dayOfYear:i}}function wt(e,t,n){var r,o,a=bt(e.year(),t,n),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?r=i+jt(o=e.year()-1,t,n):i>jt(e.year(),t,n)?(r=i-jt(e.year(),t,n),o=e.year()+1):(o=e.year(),r=i),{week:r,year:o}}function jt(e,t,n){var r=bt(e,t,n),o=bt(e+1,t,n);return(ht(e)-r+o)/7}function Mt(e){return wt(e,this._week.dow,this._week.doy).week}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),ie("week",5),ie("isoWeek",5),Ee("w",we),Ee("ww",we,ye),Ee("W",we),Ee("WW",we,ye),Re(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=ue(e)}));var Ot={dow:0,doy:6};function Ct(){return this._week.dow}function zt(){return this._week.doy}function Dt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Tt(e){var t=wt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Pt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Nt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function kt(e,t){return e.slice(t,7).concat(e.slice(0,t))}R("d",0,"do","day"),R("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),R("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),R("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),ie("day",11),ie("weekday",11),ie("isoWeekday",11),Ee("d",we),Ee("e",we),Ee("E",we),Ee("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ee("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ee("dddd",(function(e,t){return t.weekdaysRegex(e)})),Re(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:g(n).invalidWeekday=e})),Re(["d","e","E"],(function(e,t,n,r){t[r]=ue(e)}));var Bt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Et="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Lt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),St=Be,It=Be,Wt=Be;function Ht(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?kt(n,this._week.dow):e?n[e.day()]:n}function Rt(e){return!0===e?kt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Vt(e){return!0===e?kt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Yt(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Ye.call(this._weekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Ye.call(this._shortWeekdaysParse,i))?o:null:-1!==(o=Ye.call(this._minWeekdaysParse,i))?o:null:"dddd"===t?-1!==(o=Ye.call(this._weekdaysParse,i))||-1!==(o=Ye.call(this._shortWeekdaysParse,i))||-1!==(o=Ye.call(this._minWeekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Ye.call(this._shortWeekdaysParse,i))||-1!==(o=Ye.call(this._weekdaysParse,i))||-1!==(o=Ye.call(this._minWeekdaysParse,i))?o:null:-1!==(o=Ye.call(this._minWeekdaysParse,i))||-1!==(o=Ye.call(this._weekdaysParse,i))||-1!==(o=Ye.call(this._shortWeekdaysParse,i))?o:null}function Ft(e,t,n){var r,o,a;if(this._weekdaysParseExact)return Yt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Xt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Pt(e,this.localeData()),this.add(e-t,"d")):t}function Qt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Zt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Nt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Gt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=St),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ut(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=It),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function qt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Wt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,n,r,o,a,i=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),r=Ie(this.weekdaysMin(n,"")),o=Ie(this.weekdaysShort(n,"")),a=Ie(this.weekdays(n,"")),i.push(r),s.push(o),l.push(a),c.push(r),c.push(o),c.push(a);i.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Jt(){return this.hours()%12||12}function _t(){return this.hours()||24}function $t(e,t){R(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,Jt),R("k",["kk",2],0,_t),R("hmm",0,0,(function(){return""+Jt.apply(this)+L(this.minutes(),2)})),R("hmmss",0,0,(function(){return""+Jt.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)})),R("Hmm",0,0,(function(){return""+this.hours()+L(this.minutes(),2)})),R("Hmmss",0,0,(function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)})),$t("a",!0),$t("A",!1),ne("hour","h"),ie("hour",13),Ee("a",en),Ee("A",en),Ee("H",we),Ee("h",we),Ee("k",we),Ee("HH",we,ye),Ee("hh",we,ye),Ee("kk",we,ye),Ee("hmm",je),Ee("hmmss",Me),Ee("Hmm",je),Ee("Hmmss",Me),He(["H","HH"],Ze),He(["k","kk"],(function(e,t,n){var r=ue(e);t[Ze]=24===r?0:r})),He(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),He(["h","hh"],(function(e,t,n){t[Ze]=ue(e),g(n).bigHour=!0})),He("hmm",(function(e,t,n){var r=e.length-2;t[Ze]=ue(e.substr(0,r)),t[Ge]=ue(e.substr(r)),g(n).bigHour=!0})),He("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ze]=ue(e.substr(0,r)),t[Ge]=ue(e.substr(r,2)),t[Ue]=ue(e.substr(o)),g(n).bigHour=!0})),He("Hmm",(function(e,t,n){var r=e.length-2;t[Ze]=ue(e.substr(0,r)),t[Ge]=ue(e.substr(r))})),He("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ze]=ue(e.substr(0,r)),t[Ge]=ue(e.substr(r,2)),t[Ue]=ue(e.substr(o))}));var nn=/[ap]\.?m?\.?/i,rn=de("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:B,longDateFormat:Q,invalidDate:G,ordinal:q,dayOfMonthOrdinalParse:K,relativeTime:_,months:et,monthsShort:tt,week:Ot,weekdays:Bt,weekdaysMin:Lt,weekdaysShort:Et,meridiemParse:nn},ln={},cn={};function un(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dn(e){return e?e.toLowerCase().replace("_","-"):e}function pn(e){for(var t,n,r,o,a=0;a<e.length;){for(t=(o=dn(e[a]).split("-")).length,n=(n=dn(e[a+1]))?n.split("-"):null;t>0;){if(r=mn(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&un(o,n)>=t-1)break;t--}a++}return an}function fn(e){return null!=e.match("^[^/\\\\]*$")}function mn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&fn(t))try{n=an._abbr,Vg("./locale/"+t),hn(n)}catch(e){ln[t]=null}return ln[t]}function hn(e,t){var n;return e&&((n=c(t)?yn(e):gn(e,t))?an=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function gn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=ln[e])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=mn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new k(N(r,t)),cn[e]&&cn[e].forEach((function(e){gn(e.name,e.config)})),hn(e),ln[e]}return delete ln[e],null}function vn(e,t){if(null!=t){var n,r,o=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(N(ln[e]._config,t)):(null!=(r=mn(e))&&(o=r._config),t=N(o,t),null==r&&(t.abbr=e),(n=new k(t)).parentLocale=ln[e],ln[e]=n),hn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===hn()&&hn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function yn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!a(e)){if(t=mn(e))return t;e=[e]}return pn(e)}function An(){return C(ln)}function bn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Xe]<0||n[Xe]>11?Xe:n[Qe]<1||n[Qe]>$e(n[Fe],n[Xe])?Qe:n[Ze]<0||n[Ze]>24||24===n[Ze]&&(0!==n[Ge]||0!==n[Ue]||0!==n[qe])?Ze:n[Ge]<0||n[Ge]>59?Ge:n[Ue]<0||n[Ue]>59?Ue:n[qe]<0||n[qe]>999?qe:-1,g(e)._overflowDayOfYear&&(t<Fe||t>Qe)&&(t=Qe),g(e)._overflowWeeks&&-1===t&&(t=Ke),g(e)._overflowWeekday&&-1===t&&(t=Je),g(e).overflow=t),e}var xn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,jn=/Z|[+-]\d\d(?::?\d\d)?/,Mn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],On=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Cn=/^\/?Date\((-?\d+)/i,zn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Dn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tn(e){var t,n,r,o,a,i,s=e._i,l=xn.exec(s)||wn.exec(s),c=Mn.length,u=On.length;if(l){for(g(e).iso=!0,t=0,n=c;t<n;t++)if(Mn[t][1].exec(l[1])){o=Mn[t][0],r=!1!==Mn[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=u;t<n;t++)if(On[t][1].exec(l[3])){a=(l[2]||" ")+On[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(l[4]){if(!jn.exec(l[4]))return void(e._isValid=!1);i="Z"}e._f=o+(a||"")+(i||""),Vn(e)}else e._isValid=!1}function Pn(e,t,n,r,o,a){var i=[Nn(e),tt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return a&&i.push(parseInt(a,10)),i}function Nn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function kn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Bn(e,t,n){return!e||Et.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function En(e,t,n){if(e)return Dn[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}function Ln(e){var t,n=zn.exec(kn(e._i));if(n){if(t=Pn(n[4],n[3],n[2],n[5],n[6],n[7]),!Bn(n[1],t,e))return;e._a=t,e._tzm=En(n[8],n[9],n[10]),e._d=At.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Sn(e){var t=Cn.exec(e._i);null===t?(Tn(e),!1===e._isValid&&(delete e._isValid,Ln(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function In(e,t,n){return null!=e?e:null!=t?t:n}function Wn(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Hn(e){var t,n,r,o,a,i=[];if(!e._d){for(r=Wn(e),e._w&&null==e._a[Qe]&&null==e._a[Xe]&&Rn(e),null!=e._dayOfYear&&(a=In(e._a[Fe],r[Fe]),(e._dayOfYear>ht(a)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=At(a,0,e._dayOfYear),e._a[Xe]=n.getUTCMonth(),e._a[Qe]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=i[t]=r[t];for(;t<7;t++)e._a[t]=i[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ze]&&0===e._a[Ge]&&0===e._a[Ue]&&0===e._a[qe]&&(e._nextDay=!0,e._a[Ze]=0),e._d=(e._useUTC?At:yt).apply(null,i),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ze]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(g(e).weekdayMismatch=!0)}}function Rn(e){var t,n,r,o,a,i,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,i=4,n=In(t.GG,e._a[Fe],wt(qn(),1,4).year),r=In(t.W,1),((o=In(t.E,1))<1||o>7)&&(l=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,c=wt(qn(),a,i),n=In(t.gg,e._a[Fe],c.year),r=In(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+a,(t.e<0||t.e>6)&&(l=!0)):o=a),r<1||r>jt(n,a,i)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=xt(n,r,o,a,i),e._a[Fe]=s.year,e._dayOfYear=s.dayOfYear)}function Vn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,o,a,i,s,l,c=""+e._i,u=c.length,d=0;for(l=(o=X(e._f,e._locale).match(S)||[]).length,t=0;t<l;t++)a=o[t],(n=(c.match(Le(a,e))||[])[0])&&((i=c.substr(0,c.indexOf(n))).length>0&&g(e).unusedInput.push(i),c=c.slice(c.indexOf(n)+n.length),d+=n.length),H[a]?(n?g(e).empty=!1:g(e).unusedTokens.push(a),Ve(a,n,e)):e._strict&&!n&&g(e).unusedTokens.push(a);g(e).charsLeftOver=u-d,c.length>0&&g(e).unusedInput.push(c),e._a[Ze]<=12&&!0===g(e).bigHour&&e._a[Ze]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Ze]=Yn(e._locale,e._a[Ze],e._meridiem),null!==(s=g(e).era)&&(e._a[Fe]=e._locale.erasConvertYear(s,e._a[Fe])),Hn(e),bn(e)}else Ln(e);else Tn(e)}function Yn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Fn(e){var t,n,r,o,a,i,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<l;o++)a=0,i=!1,t=x({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Vn(t),v(t)&&(i=!0),a+=g(t).charsLeftOver,a+=10*g(t).unusedTokens.length,g(t).score=a,s?a<r&&(r=a,n=t):(null==r||a<r||i)&&(r=a,n=t,i&&(s=!0));f(e,n||t)}function Xn(e){if(!e._d){var t=oe(e._i),n=void 0===t.day?t.date:t.day;e._a=p([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Hn(e)}}function Qn(e){var t=new w(bn(Zn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Zn(e){var t=e._i,n=e._f;return e._locale=e._locale||yn(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),j(t)?new w(bn(t)):(d(t)?e._d=t:a(n)?Fn(e):n?Vn(e):Gn(e),v(e)||(e._d=null),e))}function Gn(e){var t=e._i;c(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Sn(e):a(t)?(e._a=p(t.slice(0),(function(e){return parseInt(e,10)})),Hn(e)):i(t)?Xn(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}function Un(e,t,n,r,o){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,Qn(s)}function qn(e,t,n,r){return Un(e,t,n,r,!1)}r.createFromInputFallback=O("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Kn=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=qn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),Jn=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=qn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function _n(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return qn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function $n(){return _n("isBefore",[].slice.call(arguments,0))}function er(){return _n("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rr(e){var t,n,r=!1,o=nr.length;for(t in e)if(s(e,t)&&(-1===Ye.call(nr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<o;++n)if(e[nr[n]]){if(r)return!1;parseFloat(e[nr[n]])!==ue(e[nr[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ar(){return Dr(NaN)}function ir(e){var t=oe(e),n=t.year||0,r=t.quarter||0,o=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=rr(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*s*60*60,this._days=+i+7*a,this._months=+o+3*r+12*n,this._data={},this._locale=yn(),this._bubble()}function sr(e){return e instanceof ir}function lr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cr(e,t,n){var r,o=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&ue(e[r])!==ue(t[r]))&&i++;return i+a}function ur(e,t){R(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+L(~~(e/60),2)+t+L(~~e%60,2)}))}ur("Z",":"),ur("ZZ",""),Ee("Z",Ne),Ee("ZZ",Ne),He(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=pr(Ne,e)}));var dr=/([\+\-]|\d\d)/gi;function pr(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(dr)||["-",0,0])[1]+ue(n[2]))?0:"+"===n[0]?r:-r}function fr(e,t){var n,o;return t._isUTC?(n=t.clone(),o=(j(e)||d(e)?e.valueOf():qn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),r.updateOffset(n,!1),n):qn(e).local()}function mr(e){return-Math.round(e._d.getTimezoneOffset())}function hr(e,t,n){var o,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=pr(Ne,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(o=mr(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),a!==e&&(!t||this._changeInProgress?Br(this,Dr(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:mr(this)}function gr(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vr(e){return this.utcOffset(0,e)}function yr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mr(this),"m")),this}function Ar(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=pr(Pe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function br(e){return!!this.isValid()&&(e=e?qn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function xr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return x(t,this),(t=Zn(t))._a?(e=t._isUTC?m(t._a):qn(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function jr(){return!!this.isValid()&&!this._isUTC}function Mr(){return!!this.isValid()&&this._isUTC}function Or(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Cr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,zr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Dr(e,t){var n,r,o,a=e,i=null;return sr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(i=Cr.exec(e))?(n="-"===i[1]?-1:1,a={y:0,d:ue(i[Qe])*n,h:ue(i[Ze])*n,m:ue(i[Ge])*n,s:ue(i[Ue])*n,ms:ue(lr(1e3*i[qe]))*n}):(i=zr.exec(e))?(n="-"===i[1]?-1:1,a={y:Tr(i[2],n),M:Tr(i[3],n),w:Tr(i[4],n),d:Tr(i[5],n),h:Tr(i[6],n),m:Tr(i[7],n),s:Tr(i[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(o=Nr(qn(a.from),qn(a.to)),(a={}).ms=o.milliseconds,a.M=o.months),r=new ir(a),sr(e)&&s(e,"_locale")&&(r._locale=e._locale),sr(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Tr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Pr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Nr(e,t){var n;return e.isValid()&&t.isValid()?(t=fr(t,e),e.isBefore(t)?n=Pr(e,t):((n=Pr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function kr(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(D(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),Br(this,Dr(n,r),e),this}}function Br(e,t,n,o){var a=t._milliseconds,i=lr(t._days),s=lr(t._months);e.isValid()&&(o=null==o||o,s&&ct(e,pe(e,"Month")+s*n),i&&fe(e,"Date",pe(e,"Date")+i*n),a&&e._d.setTime(e._d.valueOf()+a*n),o&&r.updateOffset(e,i||s))}Dr.fn=ir.prototype,Dr.invalid=ar;var Er=kr(1,"add"),Lr=kr(-1,"subtract");function Sr(e){return"string"==typeof e||e instanceof String}function Ir(e){return j(e)||d(e)||Sr(e)||u(e)||Hr(e)||Wr(e)||null==e}function Wr(e){var t,n,r=i(e)&&!l(e),o=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=a.length;for(t=0;t<c;t+=1)n=a[t],o=o||s(e,n);return r&&o}function Hr(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Sr(e)})).length),t&&n}function Rr(e){var t,n,r=i(e)&&!l(e),o=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)n=a[t],o=o||s(e,n);return r&&o}function Vr(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Yr(e,t){1===arguments.length&&(arguments[0]?Ir(arguments[0])?(e=arguments[0],t=void 0):Rr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||qn(),o=fr(n,this).startOf("day"),a=r.calendarFormat(this,o)||"sameElse",i=t&&(T(t[a])?t[a].call(this,n):t[a]);return this.format(i||this.localeData().calendar(a,this,qn(n)))}function Fr(){return new w(this)}function Xr(e,t){var n=j(e)?e:qn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Qr(e,t){var n=j(e)?e:qn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Zr(e,t,n,r){var o=j(e)?e:qn(e),a=j(t)?t:qn(t);return!!(this.isValid()&&o.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))}function Gr(e,t){var n,r=j(e)?e:qn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Ur(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function qr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Kr(e,t,n){var r,o,a;if(!this.isValid())return NaN;if(!(r=fr(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=re(t)){case"year":a=Jr(this,r)/12;break;case"month":a=Jr(this,r);break;case"quarter":a=Jr(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-o)/864e5;break;case"week":a=(this-r-o)/6048e5;break;default:a=this-r}return n?a:ce(a)}function Jr(e,t){if(e.date()<t.date())return-Jr(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function _r(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function $r(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?F(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(n,"Z")):F(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eo(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,o="moment",a="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+o+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=a+'[")]',this.format(e+t+n+r)}function to(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=F(this,e);return this.localeData().postformat(t)}function no(e,t){return this.isValid()&&(j(e)&&e.isValid()||qn(e).isValid())?Dr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ro(e){return this.from(qn(),e)}function oo(e,t){return this.isValid()&&(j(e)&&e.isValid()||qn(e).isValid())?Dr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ao(e){return this.to(qn(),e)}function io(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var so=O("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function lo(){return this._locale}var co=1e3,uo=60*co,po=60*uo,fo=3506328*po;function mo(e,t){return(e%t+t)%t}function ho(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fo:new Date(e,t,n).valueOf()}function go(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fo:Date.UTC(e,t,n)}function vo(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:ho,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=mo(t+(this._isUTC?0:this.utcOffset()*uo),po);break;case"minute":t=this._d.valueOf(),t-=mo(t,uo);break;case"second":t=this._d.valueOf(),t-=mo(t,co)}return this._d.setTime(t),r.updateOffset(this,!0),this}function yo(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:ho,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=po-mo(t+(this._isUTC?0:this.utcOffset()*uo),po)-1;break;case"minute":t=this._d.valueOf(),t+=uo-mo(t,uo)-1;break;case"second":t=this._d.valueOf(),t+=co-mo(t,co)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function Ao(){return this._d.valueOf()-6e4*(this._offset||0)}function bo(){return Math.floor(this.valueOf()/1e3)}function xo(){return new Date(this.valueOf())}function wo(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function jo(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Mo(){return this.isValid()?this.toISOString():null}function Oo(){return v(this)}function Co(){return f({},g(this))}function zo(){return g(this).overflow}function Do(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function To(e,t){var n,o,a,i=this._eras||yn("en")._eras;for(n=0,o=i.length;n<o;++n)switch("string"==typeof i[n].since&&(a=r(i[n].since).startOf("day"),i[n].since=a.valueOf()),typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":a=r(i[n].until).startOf("day").valueOf(),i[n].until=a.valueOf()}return i}function Po(e,t,n){var r,o,a,i,s,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(a=l[r].name.toUpperCase(),i=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(i===e)return l[r];break;case"NNNN":if(a===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([a,i,s].indexOf(e)>=0)return l[r]}function No(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function ko(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Bo(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Eo(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Lo(){var e,t,n,o,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,o=this.clone().startOf("day").valueOf(),a[e].since<=o&&o<=a[e].until||a[e].until<=o&&o<=a[e].since)return(this.year()-r(a[e].since).year())*n+a[e].offset;return this.year()}function So(e){return s(this,"_erasNameRegex")||Fo.call(this),e?this._erasNameRegex:this._erasRegex}function Io(e){return s(this,"_erasAbbrRegex")||Fo.call(this),e?this._erasAbbrRegex:this._erasRegex}function Wo(e){return s(this,"_erasNarrowRegex")||Fo.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ho(e,t){return t.erasAbbrRegex(e)}function Ro(e,t){return t.erasNameRegex(e)}function Vo(e,t){return t.erasNarrowRegex(e)}function Yo(e,t){return t._eraYearOrdinalRegex||De}function Fo(){var e,t,n=[],r=[],o=[],a=[],i=this.eras();for(e=0,t=i.length;e<t;++e)r.push(Ie(i[e].name)),n.push(Ie(i[e].abbr)),o.push(Ie(i[e].narrow)),a.push(Ie(i[e].name)),a.push(Ie(i[e].abbr)),a.push(Ie(i[e].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function Xo(e,t){R(0,[e,e.length],0,t)}function Qo(e){return Jo.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Zo(e){return Jo.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Go(){return jt(this.year(),1,4)}function Uo(){return jt(this.isoWeekYear(),1,4)}function qo(){var e=this.localeData()._week;return jt(this.year(),e.dow,e.doy)}function Ko(){var e=this.localeData()._week;return jt(this.weekYear(),e.dow,e.doy)}function Jo(e,t,n,r,o){var a;return null==e?wt(this,r,o).year:(t>(a=jt(e,r,o))&&(t=a),_o.call(this,e,t,n,r,o))}function _o(e,t,n,r,o){var a=xt(e,t,n,r,o),i=At(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}function $o(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),Ee("N",Ho),Ee("NN",Ho),Ee("NNN",Ho),Ee("NNNN",Ro),Ee("NNNNN",Vo),He(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?g(n).era=o:g(n).invalidEra=e})),Ee("y",De),Ee("yy",De),Ee("yyy",De),Ee("yyyy",De),Ee("yo",Yo),He(["y","yy","yyy","yyyy"],Fe),He(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Fe]=n._locale.eraYearOrdinalParse(e,o):t[Fe]=parseInt(e,10)})),R(0,["gg",2],0,(function(){return this.weekYear()%100})),R(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Xo("gggg","weekYear"),Xo("ggggg","weekYear"),Xo("GGGG","isoWeekYear"),Xo("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),ie("weekYear",1),ie("isoWeekYear",1),Ee("G",Te),Ee("g",Te),Ee("GG",we,ye),Ee("gg",we,ye),Ee("GGGG",Ce,be),Ee("gggg",Ce,be),Ee("GGGGG",ze,xe),Ee("ggggg",ze,xe),Re(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=ue(e)})),Re(["gg","GG"],(function(e,t,n,o){t[o]=r.parseTwoDigitYear(e)})),R("Q",0,"Qo","quarter"),ne("quarter","Q"),ie("quarter",7),Ee("Q",ve),He("Q",(function(e,t){t[Xe]=3*(ue(e)-1)})),R("D",["DD",2],"Do","date"),ne("date","D"),ie("date",9),Ee("D",we),Ee("DD",we,ye),Ee("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),He(["D","DD"],Qe),He("Do",(function(e,t){t[Qe]=ue(e.match(we)[0])}));var ea=de("Date",!0);function ta(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}R("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),ie("dayOfYear",4),Ee("DDD",Oe),Ee("DDDD",Ae),He(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ue(e)})),R("m",["mm",2],0,"minute"),ne("minute","m"),ie("minute",14),Ee("m",we),Ee("mm",we,ye),He(["m","mm"],Ge);var na=de("Minutes",!1);R("s",["ss",2],0,"second"),ne("second","s"),ie("second",15),Ee("s",we),Ee("ss",we,ye),He(["s","ss"],Ue);var ra,oa,aa=de("Seconds",!1);for(R("S",0,0,(function(){return~~(this.millisecond()/100)})),R(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),R(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),R(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),R(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),R(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),R(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),ie("millisecond",16),Ee("S",Oe,ve),Ee("SS",Oe,ye),Ee("SSS",Oe,Ae),ra="SSSS";ra.length<=9;ra+="S")Ee(ra,De);function ia(e,t){t[qe]=ue(1e3*("0."+e))}for(ra="S";ra.length<=9;ra+="S")He(ra,ia);function sa(){return this._isUTC?"UTC":""}function la(){return this._isUTC?"Coordinated Universal Time":""}oa=de("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var ca=w.prototype;function ua(e){return qn(1e3*e)}function da(){return qn.apply(null,arguments).parseZone()}function pa(e){return e}ca.add=Er,ca.calendar=Yr,ca.clone=Fr,ca.diff=Kr,ca.endOf=yo,ca.format=to,ca.from=no,ca.fromNow=ro,ca.to=oo,ca.toNow=ao,ca.get=me,ca.invalidAt=zo,ca.isAfter=Xr,ca.isBefore=Qr,ca.isBetween=Zr,ca.isSame=Gr,ca.isSameOrAfter=Ur,ca.isSameOrBefore=qr,ca.isValid=Oo,ca.lang=so,ca.locale=io,ca.localeData=lo,ca.max=Jn,ca.min=Kn,ca.parsingFlags=Co,ca.set=he,ca.startOf=vo,ca.subtract=Lr,ca.toArray=wo,ca.toObject=jo,ca.toDate=xo,ca.toISOString=$r,ca.inspect=eo,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ca[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ca.toJSON=Mo,ca.toString=_r,ca.unix=bo,ca.valueOf=Ao,ca.creationData=Do,ca.eraName=ko,ca.eraNarrow=Bo,ca.eraAbbr=Eo,ca.eraYear=Lo,ca.year=gt,ca.isLeapYear=vt,ca.weekYear=Qo,ca.isoWeekYear=Zo,ca.quarter=ca.quarters=$o,ca.month=ut,ca.daysInMonth=dt,ca.week=ca.weeks=Dt,ca.isoWeek=ca.isoWeeks=Tt,ca.weeksInYear=qo,ca.weeksInWeekYear=Ko,ca.isoWeeksInYear=Go,ca.isoWeeksInISOWeekYear=Uo,ca.date=ea,ca.day=ca.days=Xt,ca.weekday=Qt,ca.isoWeekday=Zt,ca.dayOfYear=ta,ca.hour=ca.hours=rn,ca.minute=ca.minutes=na,ca.second=ca.seconds=aa,ca.millisecond=ca.milliseconds=oa,ca.utcOffset=hr,ca.utc=vr,ca.local=yr,ca.parseZone=Ar,ca.hasAlignedHourOffset=br,ca.isDST=xr,ca.isLocal=jr,ca.isUtcOffset=Mr,ca.isUtc=Or,ca.isUTC=Or,ca.zoneAbbr=sa,ca.zoneName=la,ca.dates=O("dates accessor is deprecated. Use date instead.",ea),ca.months=O("months accessor is deprecated. Use month instead",ut),ca.years=O("years accessor is deprecated. Use year instead",gt),ca.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),ca.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wr);var fa=k.prototype;function ma(e,t,n,r){var o=yn(),a=m().set(r,t);return o[n](a,e)}function ha(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return ma(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=ma(e,r,n,"month");return o}function ga(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var o,a=yn(),i=e?a._week.dow:0,s=[];if(null!=n)return ma(t,(n+i)%7,r,"day");for(o=0;o<7;o++)s[o]=ma(t,(o+i)%7,r,"day");return s}function va(e,t){return ha(e,t,"months")}function ya(e,t){return ha(e,t,"monthsShort")}function Aa(e,t,n){return ga(e,t,n,"weekdays")}function ba(e,t,n){return ga(e,t,n,"weekdaysShort")}function xa(e,t,n){return ga(e,t,n,"weekdaysMin")}fa.calendar=E,fa.longDateFormat=Z,fa.invalidDate=U,fa.ordinal=J,fa.preparse=pa,fa.postformat=pa,fa.relativeTime=$,fa.pastFuture=ee,fa.set=P,fa.eras=To,fa.erasParse=Po,fa.erasConvertYear=No,fa.erasAbbrRegex=Io,fa.erasNameRegex=So,fa.erasNarrowRegex=Wo,fa.months=at,fa.monthsShort=it,fa.monthsParse=lt,fa.monthsRegex=ft,fa.monthsShortRegex=pt,fa.week=Mt,fa.firstDayOfYear=zt,fa.firstDayOfWeek=Ct,fa.weekdays=Ht,fa.weekdaysMin=Vt,fa.weekdaysShort=Rt,fa.weekdaysParse=Ft,fa.weekdaysRegex=Gt,fa.weekdaysShortRegex=Ut,fa.weekdaysMinRegex=qt,fa.isPM=tn,fa.meridiem=on,hn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ue(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=O("moment.lang is deprecated. Use moment.locale instead.",hn),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",yn);var wa=Math.abs;function ja(){var e=this._data;return this._milliseconds=wa(this._milliseconds),this._days=wa(this._days),this._months=wa(this._months),e.milliseconds=wa(e.milliseconds),e.seconds=wa(e.seconds),e.minutes=wa(e.minutes),e.hours=wa(e.hours),e.months=wa(e.months),e.years=wa(e.years),this}function Ma(e,t,n,r){var o=Dr(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Oa(e,t){return Ma(this,e,t,1)}function Ca(e,t){return Ma(this,e,t,-1)}function za(e){return e<0?Math.floor(e):Math.ceil(e)}function Da(){var e,t,n,r,o,a=this._milliseconds,i=this._days,s=this._months,l=this._data;return a>=0&&i>=0&&s>=0||a<=0&&i<=0&&s<=0||(a+=864e5*za(Pa(s)+i),i=0,s=0),l.milliseconds=a%1e3,e=ce(a/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,n=ce(t/60),l.hours=n%24,i+=ce(n/24),s+=o=ce(Ta(i)),i-=za(Pa(o)),r=ce(s/12),s%=12,l.days=i,l.months=s,l.years=r,this}function Ta(e){return 4800*e/146097}function Pa(e){return 146097*e/4800}function Na(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Ta(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Pa(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function ka(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ue(this._months/12):NaN}function Ba(e){return function(){return this.as(e)}}var Ea=Ba("ms"),La=Ba("s"),Sa=Ba("m"),Ia=Ba("h"),Wa=Ba("d"),Ha=Ba("w"),Ra=Ba("M"),Va=Ba("Q"),Ya=Ba("y");function Fa(){return Dr(this)}function Xa(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Qa(e){return function(){return this.isValid()?this._data[e]:NaN}}var Za=Qa("milliseconds"),Ga=Qa("seconds"),Ua=Qa("minutes"),qa=Qa("hours"),Ka=Qa("days"),Ja=Qa("months"),_a=Qa("years");function $a(){return ce(this.days()/7)}var ei=Math.round,ti={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ni(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function ri(e,t,n,r){var o=Dr(e).abs(),a=ei(o.as("s")),i=ei(o.as("m")),s=ei(o.as("h")),l=ei(o.as("d")),c=ei(o.as("M")),u=ei(o.as("w")),d=ei(o.as("y")),p=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(p=p||u<=1&&["w"]||u<n.w&&["ww",u]),(p=p||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,p[3]=+e>0,p[4]=r,ni.apply(null,p)}function oi(e){return void 0===e?ei:"function"==typeof e&&(ei=e,!0)}function ai(e,t){return void 0!==ti[e]&&(void 0===t?ti[e]:(ti[e]=t,"s"===e&&(ti.ss=t-1),!0))}function ii(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,a=ti;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(a=Object.assign({},ti,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),r=ri(this,!o,a,n=this.localeData()),o&&(r=n.pastFuture(+this,r)),n.postformat(r)}var si=Math.abs;function li(e){return(e>0)-(e<0)||+e}function ci(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,a,i,s,l=si(this._milliseconds)/1e3,c=si(this._days),u=si(this._months),d=this.asSeconds();return d?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,n=ce(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",a=li(this._months)!==li(d)?"-":"",i=li(this._days)!==li(d)?"-":"",s=li(this._milliseconds)!==li(d)?"-":"",o+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(c?i+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var ui=ir.prototype;return ui.isValid=or,ui.abs=ja,ui.add=Oa,ui.subtract=Ca,ui.as=Na,ui.asMilliseconds=Ea,ui.asSeconds=La,ui.asMinutes=Sa,ui.asHours=Ia,ui.asDays=Wa,ui.asWeeks=Ha,ui.asMonths=Ra,ui.asQuarters=Va,ui.asYears=Ya,ui.valueOf=ka,ui._bubble=Da,ui.clone=Fa,ui.get=Xa,ui.milliseconds=Za,ui.seconds=Ga,ui.minutes=Ua,ui.hours=qa,ui.days=Ka,ui.weeks=$a,ui.months=Ja,ui.years=_a,ui.humanize=ii,ui.toISOString=ci,ui.toString=ci,ui.toJSON=ci,ui.locale=io,ui.localeData=lo,ui.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ci),ui.lang=so,R("X",0,0,"unix"),R("x",0,0,"valueOf"),Ee("x",Te),Ee("X",ke),He("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),He("x",(function(e,t,n){n._d=new Date(ue(e))})),
|
|
131
131
|
//! moment.js
|
|
132
|
-
r.version="2.29.4",o(qn),r.fn=ca,r.min=$n,r.max=er,r.now=tr,r.utc=m,r.unix=ua,r.months=va,r.isDate=d,r.locale=hn,r.invalid=y,r.duration=Dr,r.isMoment=j,r.weekdays=Aa,r.parseZone=da,r.localeData=yn,r.isDuration=sr,r.monthsShort=ya,r.weekdaysMin=xa,r.defineLocale=gn,r.updateLocale=vn,r.locales=An,r.weekdaysShort=ba,r.normalizeUnits=re,r.relativeTimeRounding=oi,r.relativeTimeThreshold=ai,r.calendarFormat=Vr,r.prototype=ca,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}(Yg);var Fg=I(Yg.exports);function Xg(e){var t=e.value;return X.jsx(n.Typography,Q({style:{fontWeight:50},noWrap:!0},e,{children:Fg(new Date(t)).format("Do MMMM YYYY @ HH:MM")}))}function Qg(e){var t=e.value,r=e.enumvalues,o=r&&!r.includes(t)?"error":void 0,a=rv.enhance(t);return X.jsx(n.Chip,{label:a,color:o,size:"small"})}function Zg(e){var t=e.value;return X.jsx(n.Typography,Q({},e,{noWrap:!0,children:t.longitude&&t.latitude?X.jsx(n.Link,{align:"justify",style:{cursor:"pointer"},onClick:function(){return e=t.latitude,n=t.longitude,void window.open("https://maps.google.com?q="+e+","+n);var e,n},children:t.address}):X.jsx(n.Typography,Q({style:{fontWeight:50}},e,{noWrap:!0,children:t.address}))}))}function Gg(e){var t=e.value,r=e.children;return Z(e,["value","children"]),X.jsx(n.Card,{sx:{py:3,px:3},children:X.jsx(n.Grid,{children:t.map((function(e,t){return X.jsxs(n.Grid,{item:!0,xs:12,sx:{mb:5},children:[X.jsx(n.Typography,{color:"grey",fontSize:10,paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:"["+(t+1)+"]"}),r&&r(e,t)]},t)}))})})}function Ug(e){var t=e.navigateTo,o=e.value,a=r.useNavigate();return X.jsx(n.Link,{align:"justify",style:{cursor:"pointer"},onClick:function(){return a(t)},children:o})}var qg=require("pluralize");function Kg(e){var t,r=e.value,o=e.fieldkey,a=e.userpath,i=e.fieldschema,s=e.resources,l=e.path,c=null!=l?l:null==i?void 0:i.path,u=s[null!=c?c:""],d=u.properties,p=d.title,f=null===(t=d.actions.show)||void 0===t?void 0:t.isAccessible,m=ch.getReferenceImage(u,r);function h(){return vh.checkLocalizedString(s,null!=c?c:"",p)?lh.getLocalizedString(r[p]):r[p]?r[p]:r._id?r._id:tv}return X.jsxs(n.Stack,{direction:"row",spacing:1,alignItems:"center",children:[m&&X.jsx(n.Avatar,{alt:"-",src:m}),X.jsx(n.Typography,Q({},e.props,{children:f?X.jsx(Ug,{value:h(),navigateTo:a[c||qg.singular(o)].show(r._id)}):X.jsx(nv,Q({type:bm.STRING},e,{value:h()}))}))]})}function Jg(e){var t,r,o,a=e.value,i=e.userpath,s=e.resources,l=e.path,c=e.fieldschema,u=s[null!==(t=null==c?void 0:c.path)&&void 0!==t?t:""],d=u.properties,p=null==d?void 0:d.title,f=null===(o=null===(r=null==d?void 0:d.actions)||void 0===r?void 0:r.show)||void 0===o?void 0:o.isAccessible,m=ch.getReferenceImage(u,a);function h(){var e;return vh.checkLocalizedString(s,null!==(e=null==c?void 0:c.path)&&void 0!==e?e:"",p)?lh.getLocalizedString(a[p]):a[p]}if(a)return a.map((function(t){return X.jsxs(n.Stack,{direction:"row",spacing:1,alignItems:"center",children:[m&&X.jsx(n.Avatar,{alt:"-",src:m}),X.jsx(n.Typography,Q({},e.props,{children:f?X.jsx(Ug,{value:h(),navigateTo:i[null!=l?l:""].show(t._id)}):X.jsx(nv,Q({type:bm.STRING},e,{value:h()}))}))]},t._id)}))}function _g(e){var t=e.value,r=e.props;return null===t?X.jsx(n.Typography,Q({},r,{children:tv})):"[object Array]"!==Object.prototype.toString.call(t)?X.jsx(Kg,Q({},e)):t?X.jsx(Jg,Q({},e)):X.jsx(X.Fragment,{})}function $g(e){var t=e.htmlString;return X.jsx("div",{children:X.jsx(g,{value:t,readOnly:!0,theme:"bubble"})})}function ev(e){var t=e.value,r=e.type;return X.jsx(n.Card,{sx:{py:1,px:3},children:r&&r===bm.RICH_TEXT_I?X.jsx($g,{htmlString:t}):X.jsx("div",{dangerouslySetInnerHTML:{__html:t}})})}var tv="---";function nv(e){var t=e.value,r=e.fieldschema,o=e.type,a=e.enumvalues,i=e.children;if(null==t)return X.jsx(n.Typography,Q({},e,{children:tv}));switch(o){case bm.STRING:case bm.NUMBER:case bm.OBJECTID:case bm.PHONENUMBER:case bm.TIMEPICKER:case bm.PASSWORD:return X.jsx(n.Typography,Q({},e,{children:t}));case bm.NESTEDSCHEMA:return X.jsx(Wg,Q({},e,{value:t,fieldschema:r}));case bm.LOCALIZEDString:return X.jsx(Hg,{value:t});case bm.BOOLEAN:return X.jsx(n.Chip,{label:t?t.toString():"false",variant:"outlined",size:"small"});case bm.COLOR:return X.jsx(n.Typography,Q({},e,{color:t,children:t}));case bm.DATE:return X.jsx(Xg,Q({},e));case bm.ENUM:return X.jsx(Qg,Q({enumvalues:a},e));case bm.RICH_TEXT_I:case bm.RICH_TEXT_II:return X.jsx(ev,Q({},e));case bm.LOCATION:return X.jsx(Zg,Q({},e));case bm.IMAGE:return X.jsx("img",{src:t,alt:"",height:70});case bm.ARRAY:return t&&t.length>0?X.jsx(Gg,Q({},e,{value:t,children:i})):X.jsx(n.Typography,Q({},e,{children:tv}));case bm.REFERENCE:return X.jsx(_g,Q({},e));default:return X.jsx(X.Fragment,{})}}var rv=function(){function e(){}return e.enhance=function(e){var t=this;return e?e.includes("_")?e.split("_").map((function(e){return t.enhanceEnum(e)})).join(" "):this.enhanceEnum(e):tv},e.enhanceEnum=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e}(),ov=require("lodash");function av(e,t){var n,r,o,a,i,s,l,c,u,d,p=e.action,f=e.path,m=e.recordId;switch(p){case ym.LIST:return null!==(r=null===(n=t[f])||void 0===n?void 0:n.list)&&void 0!==r?r:f;case ym.NEW:return null!==(a=null===(o=t[f])||void 0===o?void 0:o.new)&&void 0!==a?a:f;case ym.SHOW:return null!==(s=null===(i=t[f])||void 0===i?void 0:i.show(m))&&void 0!==s?s:f;case ym.EDIT:return null!==(c=null===(l=t[f])||void 0===l?void 0:l.edit(m))&&void 0!==c?c:f;default:return null!==(d=null===(u=t[f])||void 0===u?void 0:u.list)&&void 0!==d?d:f}}function iv(t){var n=t.resourceName,o=t.params,a=t.resources,i=t.dialogState,s=t.paramsState,l=t.extras;s[0];var c=s[1],u=e.useContext(Im).dashbaordUrlPrefix,d=e.useContext(Zm).paths,p=th(),f=p.setSuccessAlert,m=p.setErrorAlert,h=p.setAlert,g=e.useState(null),v=g[0],y=g[1],A=function(){y(null)},b=o.row,x=a[n].properties,w=x.actions,j=x.modelName,M=i[1],O=[],C=r.useNavigate();return w.delete.isAccessible&&O.push({onClick:function(e){M({title:w?w.delete.confirmationMessageTitle:"",message:w?w.delete.confirmationMessageBody:"",onClose:function(){M({open:!1})},onConfirm:function(){var e;M({open:!1}),f(null!==(e=null==l?void 0:l.afterDeleteSnackBarText)&&void 0!==e?e:"Deleted successfully"),c((function(e){return Q(Q({},e),{filters:void 0,filter:void 0})}))},action:function(){return Lm.delete("".concat(u,"/").concat(a[n].properties.path,"/").concat(e._id))},open:!0})},title:w.delete.value,icon:X.jsx(xo,{icon:"eva:trash-2-outline"}),key:"delete",color:"error.main"}),w.edit.isAccessible&&O.push({onClick:function(e){C(d[n].edit(e._id))},title:w.edit.value,icon:X.jsx(xo,{icon:"eva:edit-fill"}),key:"edit",color:"black"}),w.show.isAccessible&&O.push({onClick:function(e){C(d[n].show(e._id))},title:w.show.value,icon:X.jsx(xo,{icon:"mdi:show-outline"}),key:"show",color:"black"}),b.extraActionKeys&&w.extras&&0!==b.extraActionKeys.length&&b.extraActionKeys.forEach((function(e){var t;w.extras.record[e]&&O.push({onClick:function(t){var n,r,o;w.extras.record[e].guard||Lm.post("".concat(u,"/actions/execute/").concat(e),{record:t,modelName:j}).then((function(t){var n,r,o=t.data.data.response;if(w.extras.record[e].handlerStrategy===xm.FILE_DOWNLOAD){var a=o.filePath;setTimeout((function(){window.open(a,"_blank")}))}else C(av(o,d)),h(null!==(n=w.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=w.extras.record[e].severity)&&void 0!==r?r:"success")})).catch((function(){m("Error happened")})),M({title:null!==(r=null!==(n=w.extras.record[e].guardTitle)&&void 0!==n?n:w.extras.record[e].name)&&void 0!==r?r:"",message:null!==(o=w.extras.record[e].guard)&&void 0!==o?o:"Do you want to execute this action?",onClose:function(){M({open:!1})},onConfirm:function(t){var n,r,o,a;switch(M({open:!1}),w.extras.record[e].handlerStrategy){case xm.NORMAL:t.action===ym.LIST?(c((function(e){return Q(Q({},e),{page:Av.page})})),h(null!==(n=w.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=w.extras.record[e].severity)&&void 0!==r?r:"success")):C(av(t,d));break;case xm.FILE_DOWNLOAD:var i=t.filePath;setTimeout((function(){window.open(i,"_blank")}));break;default:h(null!==(o=w.extras.record[e].message)&&void 0!==o?o:"Action executed Successfully",null!==(a=w.extras.record[e].severity)&&void 0!==a?a:"success")}},action:function(){return Lm.post("".concat(u,"/actions/execute/").concat(e),{record:t,modelName:j})},open:w.extras.record[e].guard})},title:w.extras.record[e].name,icon:fv(w.extras.record[e].icon),key:w.extras.record[e].name,color:null!==(t=w.extras.record[e].color)&&void 0!==t?t:"black"})})),X.jsx(wg,{open:v,onOpen:function(e){y(e.currentTarget)},onClose:A,actions:cv(O,A,b)})}function sv(e,t,o,a,i,s,l,c,u,d,p,f){if(!(s&&s.hasOwnProperty(o.key)&&null!==s[o.key]||t.valuePath))return X.jsx(n.Typography,Q({},i,{children:"--- "}));switch(t.type){case bm.STRING:if(/^#[0-9A-F]{6}$/i.test(a)){i.color=a,i.variant="body2";break}if(!s||!s.hasOwnProperty(o.key)||null===s[o.key]){e="---",i.variant="subtitle2";break}o.key===c&&l&&l.show.isAccessible&&(e=X.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:a}));break;case bm.OBJECTID:if(o.key===c&&l&&l.show.isAccessible){e=X.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:a});break}i.variant="subtitle2";break;case bm.NUMBER:case bm.PHONENUMBER:i.variant="subtitle2";break;case bm.DATE:var m=!(!p[o.key]||!p[o.key].withTime);i.variant="subtitle2",e=mh(s[o.key],m);break;case bm.LOCALIZEDString:var h=s[o.key]&&s[o.key][0]?lh.getLocalizedString(s[o.key]):"----";e=o.key===c&&l&&l.show.isAccessible?X.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:h}):h,i.variant="subtitle2";break;case bm.ENUM:return X.jsx(n.Chip,{label:rv.enhance(a),size:"small"});case bm.IMAGE:var g=Nh(a);return X.jsx("img",{src:"image"===g?a:kh(g),alt:a,height:80});case bm.BOOLEAN:return X.jsx(n.Chip,{label:"".concat(a),variant:"outlined",size:"small",component:"div"});case bm.NESTEDSCHEMA:i.variant="caption",i.color="GrayText",e="Object {...}";break;case bm.RICH_TEXT_I:case bm.RICH_TEXT_II:i.variant="caption",i.color="GrayText",e="<HTML... />";break;case bm.ARRAY:i.variant="caption",i.color="GrayText",e="Length ["+s[o.key].length+"]";break;case bm.REFERENCE:if(!s[o.key])break;var v=s[o.key].pathOfTable?s[o.key].pathOfTable:o.path,y=d[v];if(!(y&&y.properties&&s[o.key]&&v)){i.variant="subtitle2",e=a._id;break}var A=y.properties.title,b=vh.checkLocalizedString(d,v,A)?lh.getLocalizedString(s[o.key][A]):s[o.key][A]?s[o.key][A]:s[o.key]._id;if(!y.properties.actions.show.isAccessible){e=a?b:s[o.key]?s[o.key]._id:"---";break}e=X.jsx(n.Link,{align:"justify",href:f[v||o.key.toLowerCase()].show(a||s[o.key]&&s[o.key]._id?s[o.key]._id:""),children:a||s[o.key]._id?b:"---- "})}return X.jsx(n.Typography,Q({},i,{children:e}))}function lv(e,t,o,a,i){var s=a[e].properties?a[e].properties.model:void 0,l=a[e].properties,c=l.title,u=l.actions,d=o.value,p=o.row,f={color:"black",noWrap:!1,sx:{fontWeight:50,wordWrap:"break-word",whiteSpace:"normal"},variant:"body1"},m=d;if(t.key.includes(".")){var h=t.key.split("."),g={key:h[h.length-1],value:t.value,path:t.path},v=pv(t.key,p),y=dv(t.key,s),A=v?v[g.key]:null;return sv(A,y,g,A,f,v,u,c,e,a,s,i)}return p.hasOwnProperty(t.key)&&null!==p[t.key]?t.key===c?X.jsx(n.Typography,{variant:"body2",color:"black",noWrap:!0,children:u.show.isAccessible?X.jsx(n.Link,{align:"justify",component:r.Link,to:i[e].show(p._id),style:{cursor:"pointer"},children:s[t.key].type===bm.LOCALIZEDString?p[t.key][0]?lh.getLocalizedString(p[t.key]):"---":"object"==typeof p[t.key]?lh.getLocalizedString(p[t.key]):p[t.key]}):X.jsx(n.Typography,Q({},f,{children:s[t.key].type===bm.LOCALIZEDString?lh.getLocalizedString(p[t.key]):p[t.key]}))}):sv(m,s[t.key],t,d,f,p,u,c,e,a,s,i):s[t.key].valuePath?sv(m,s[t.key],t,ov.get(p,s[t.key].valuePath),f,p,u,c,e,a,s,i):X.jsx(n.Typography,Q({},f,{children:"--- "}))}function cv(e,t,r){return e.map((function(e){return X.jsxs(n.MenuItem,{onClick:function(){e.onClick(r,e.key),t()},sx:{color:e.color},children:[e.icon,e.title]},e.key)}))}function uv(t){var o=t.resources,a=t.resourceName,i=t.selected,s=t.bulkActionsDialogState,l=t.setBulkActionsDialogState,c=t.setSelected,u=e.useContext(Im).dashbaordUrlPrefix,d=e.useContext(Zm).paths,p=o[a].properties,f=p.actions,m=p.modelName,h=t.dialogState[1],g=t.gridState[1],v=th(),y=v.setErrorAlert,A=v.setAlert,b=r.useNavigate();return o[a].properties.actions.extras&&o[a].properties.actions.extras.resource?X.jsx(X.Fragment,{children:Object.keys(o[a].properties.actions.extras.resource).map((function(e){var t,r,o,a,p;if(!f.extras.resource[e])return X.jsx(X.Fragment,{});var v=null!==(t=f.extras.resource[e].message)&&void 0!==t?t:"Action executed Successfully",x=null!==(r=f.extras.resource[e].severity)&&void 0!==r?r:"success";return X.jsx(n.Button,{size:null!==(o=f.extras.resource[e].size)&&void 0!==o?o:"small",color:null!==(a=f.extras.resource[e].color)&&void 0!==a?a:"inherit",variant:null!==(p=f.extras.resource[e].variant)&&void 0!==p?p:"contained",startIcon:fv(f.extras.resource[e].icon),onClick:function(t){var n,r,o,a;if(!f.extras.resource[e].guard)switch(f.extras.resource[e].handlerStrategy){case xm.NORMAL:Lm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m}).then((function(e){var t=e.data.data.response;t.action===ym.LIST?(g((function(e){return Q(Q({},e),{page:Av.page})})),A(v,x)):b(av(t,d))})).catch((function(){y("Error happened")}));break;case xm.FILE_DOWNLOAD:Lm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m}).then((function(e){var t=e.data.data.response;setTimeout((function(){window.open(t.filePath,"_blank")}))})).catch((function(){}));break;case xm.CUSTOM_COMPONENT:var p=null!==(n=f.extras.resource[e].fullScreen)&&void 0!==n&&n;!function(e,t,n,r,o,a,i,c,u){var d=Q({},s);d[e]={state:t,modelName:n,saveLoadingState:r,fullScreen:a,setSelected:o,documentIds:null!=u?u:[],afterExecuteMessage:i,severity:c},l(d)}(e,!0,m,!1,c,p,v,x,i);break;default:A(v,x)}h({title:null!==(o=null!==(r=f.extras.resource[e].guardTitle)&&void 0!==r?r:f.extras.resource[e].name)&&void 0!==o?o:"",message:null!==(a=f.extras.resource[e].guard)&&void 0!==a?a:"Do you want to execute this action?",onClose:function(){h({open:!1})},onConfirm:function(t){switch(h({open:!1}),c((function(e){return[]})),f.extras.resource[e].handlerStrategy){case xm.NORMAL:t.action===ym.LIST?(g((function(e){return Q(Q({},e),{page:Av.page})})),A(v,x)):b(av(t,d));break;case xm.FILE_DOWNLOAD:t.filePath,setTimeout((function(){window.open(t.filePath,"_blank")}));break;default:A(v,x)}},action:function(){return Lm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m})},open:f.extras.resource[e].guard})},sx:{mr:1},children:f.extras.resource[e].name},e)}))}):X.jsx(X.Fragment,{})}function dv(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t[r];for(var o="",a=1;a<n.length;a++)o+=n[a],a!==n.length-1&&(o+=".");return dv(o,t[r].schema)}function pv(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t;for(var o="",a=1;a<n.length;a++)o+=n[a],a!==n.length-1&&(o+=".");return pv(o,t[r])}var fv=function(e){return X.jsx(Qm,{src:e,sx:{width:1,height:1}})};function mv(e,t,n,r,o,a){if(!r||!t||!r.hasOwnProperty(t.key)||null===r[t.key])return"---";switch(e.type){case bm.STRING:if(!r.hasOwnProperty(t.key)||null===r[t.key])return"---";break;case bm.DATE:return mh(n,!(!a[t.key]||!a[t.key].withTime));case bm.LOCALIZEDString:var i=r[t.key]&&r[t.key][0]?lh.getLocalizedString(r[t.key]):"----";return i||"---";case bm.NESTEDSCHEMA:return"Object {...}";case bm.ARRAY:return"Length ["+n.length+"]";case bm.REFERENCE:if(!r[t.key])break;var s=o[t.path];if(!s||!s.properties||!r[t.key])return n._id;var l=o[t.path].properties.title,c=vh.checkLocalizedString(o,t.path,l)?lh.getLocalizedString(r[t.key][l]):r[t.key][l];return s.properties.actions.show.isAccessible?n?c:"---- ":n?c:"---"}return n}function hv(e){var t,r=e.params,o=e.props,a=e.resourceName,i=e.extras,s=nh().paths,l=eh().resources;if(!l)return X.jsx(X.Fragment,{});var c=null===(t=l[a].properties.model[o.key])||void 0===t?void 0:t.isClickable,u=null==i?void 0:i.onClickProperty;return c?X.jsx(n.Button,{sx:{padding:0},onClick:function(){return u&&u[o.key]?u[o.key](o,a,r):void 0},children:lv(a,o,r,l,s)}):lv(a,o,r,l,s)}var gv=1,vv=[5,10,25,50,100],yv={currentPage:1,perPage:5,recordsCount:0},Av={page:gv,perPage:5};function bv(e,t,n,r,o,a,i){var s=e.map((function(e){return{field:e.key,headerName:e.value,align:"center",headerAlign:"center",flex:e.flex?e.flex:a?1:void 0,minWidth:a?void 0:150,valueGetter:function(r){return function(e,t,n,r){var o=r[e].properties?r[e].properties.model:void 0,a=r[e].properties,i=a.title;a.actions;var s=n.value,l=n.row;if(t.key.includes(".")){var c=t.key.split("."),u={key:c[c.length-1],value:t.value,path:t.path},d=pv(t.key,l);return mv(dv(t.key,o),u,d?d[u.key]:null,d,r,o)}return l.hasOwnProperty(t.key)&&null!==l[t.key]?t.key===i?o[t.key].type===bm.LOCALIZEDString?lh.getLocalizedString(l[t.key]):l[t.key]:mv(o[t.key],t,s,l,r,o):"---"}(n,e,r,t)},renderCell:function(t){return e.renderCell?e.renderCell(t):X.jsx(hv,{resourceName:n,params:t,props:e,extras:i})}}})),l={field:"actions",headerName:"",type:"number",editable:!1,align:"center",headerAlign:"left",disableColumnMenu:!0,flex:a?1:void 0,minWidth:a?void 0:150,hideable:!1,sortable:!1,disableExport:!0,renderCell:function(e){return X.jsx(iv,{resources:t,params:e,resourceName:n,dialogState:r,paramsState:o,extras:i})}};return!(null==i?void 0:i.hideActions)&&s.push(l),s}var xv=e.forwardRef((function(e,t){return X.jsx(n.Slide,Q({direction:"up",ref:t},e))}));function wv(t){var r,o,a=t.open,i=t.onClose,s=t.title,c=t.onConfirm,u=t.message,d=t.action,p=t.extras,f=e.useState(!1),m=f[0],h=f[1];return X.jsxs(n.Dialog,{open:a,fullWidth:!0,keepMounted:!0,onClose:function(e,t){"backdropClick"!==t&&i&&i()},"aria-describedby":"alert-dialog-slide-description",disableEscapeKeyDown:!0,TransitionComponent:xv,children:[X.jsx(n.DialogTitle,{children:s}),X.jsx(n.DialogContent,{children:X.jsx(n.DialogContentText,{id:"alert-dialog-slide-description",children:u})}),X.jsxs(n.DialogActions,{children:[X.jsx(n.Button,{color:"inherit",onClick:i,disabled:m,children:null!==(r=null==p?void 0:p.cancelText)&&void 0!==r?r:"Cancel"}),X.jsx(l.LoadingButton,{variant:"contained",onClick:function(){d&&(h(!0),d().then((function(e){var t=e.data.data?e.data.data.response:e.data.meta;h(!1),c&&c(t)})).catch((function(e){i&&i(),console.log(e)})))},loading:m,children:null!==(o=null==p?void 0:p.confirmText)&&void 0!==o?o:"Confirm"})]})]})}var jv=n.styled("div")((function(e){var t=e.theme;return{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%","& .ant-empty-img-1":{fill:"light"===t.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===t.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===t.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===t.palette.mode?"#fff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===t.palette.mode?"0.8":"0.08",fill:"light"===t.palette.mode?"#f5f5f5":"#fff"}}}));function Mv(e){var t=e.checkBox,r=e.numberOfColumns,o=Z(e,["checkBox","numberOfColumns"]),a=Array.apply(null,Array(r)).map((function(e,t){return t}));return X.jsx(n.TableRow,Q({},o,{children:X.jsx(n.TableCell,{children:X.jsxs(n.Stack,{spacing:2,gridRow:"auto",direction:"row",justifyContent:"space-around",width:920,children:[t&&X.jsx(n.Skeleton,{variant:"rectangular",width:20,height:20,sx:{borderRadius:1,flexShrink:0}}),a.map((function(e){return X.jsx(n.Skeleton,{variant:"text",width:150,height:20},e)}))]})})}))}var Ov=n.styled("div")((function(e){var t=e.theme;return{right:24,zIndex:9,bottom:40,display:"flex",position:"fixed",alignItems:"center",boxShadow:t.customShadows.z20,padding:t.spacing(1.5,1,1.5,2),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.text.primary}}));function Cv(e){var t,r=e.action,o=e.selected;e.rowCount,e.numSelected;var a=e.extras;e.onSelectAllItems;var i=e.sx,s=Z(e,["action","selected","rowCount","numSelected","extras","onSelectAllItems","sx"]);return X.jsx(n.Portal,{children:X.jsxs(Ov,Q({sx:i},s,{children:[X.jsxs(n.Typography,{variant:"subtitle2",sx:{mr:2,color:function(e){return"light"===e.palette.mode?"common.white":"grey.800"}},children:[o&&o.length,X.jsx(n.Box,{component:"span",sx:{ml:.5},children:null!==(t=null==a?void 0:a.itemsSelectedText)&&void 0!==t?t:"items selected"})]}),r&&r]}))})}function zv(){return X.jsxs(M.GridToolbarContainer,{sx:{mt:2},children:[X.jsx(M.GridToolbarColumnsButton,{}),X.jsx(M.GridToolbarFilterButton,{}),X.jsx(M.GridToolbarDensitySelector,{}),X.jsx(M.GridToolbarExport,{})]})}function Dv(e,t,n){return X.jsx(X.Fragment,{children:[1,2].map((function(e){return function(e,t,n){return X.jsx(Mv,{sx:{height:72},checkBox:t,numberOfColumns:n},e)}(e,t,n)}))})}function Tv(t){var o,a,i=this,s=t.resources,c=t.resourceName,u=t.paramsState,d=t.bulkActionsDialogState,p=t.extras,f=t.setBulkActionsDialogState,m=e.useContext(Im).dashbaordUrlPrefix;e.useContext(Zm).paths;var h=e.useState([]),g=(h[0],h[1]),v=e.useState([]),y=v[0],A=v[1],b=e.useState(!0),x=b[0],w=b[1],j=e.useState(yv),O=j[0],C=j[1],z=u[0],D=u[1],T=e.useState(!1),P=T[0],N=T[1],k=s[c];if(p&&p.overridenResource){var B=p.overridenResource(k);k=Q(Q({},k),B)}var E=k.properties.actions,L=e.useState([]),S=L[0],I=L[1],W=Vi("up","lg"),H=r.useSearchParams(),R=H[0],V=H[1];e.useContext(qm).defaultRowsPerPage;var Y,F=th().setSuccessAlert,Z=e.useState({open:!1,title:"",onClose:function(){},onConfirm:function(){}}),K=bv(k.listProperties,s,c,Z,u,W,p);return e.useEffect((function(){!function(e){G(i,void 0,void 0,(function(){return U(this,(function(t){return w(!0),Lm.get("".concat(m,"/").concat(k.properties.path),{params:e}).then((function(e){var t=e.data.data,n=t.pageInfo,r=t.records;g((function(e){return 1===n.currentPage?q([],r,!0):q(q([],e,!0),r,!0)})),A(r),C(n),w(!1)})),[2]}))}))}(z)}),[z,c,s,m]),X.jsxs(X.Fragment,{children:[X.jsx(M.DataGrid,Q({rows:x?[]:y,columns:K,initialState:{sorting:{sortModel:[{sort:z.order,field:null!==(o=z.orderBy)&&void 0!==o?o:"_id"}]}},pageSizeOptions:vv,rowCount:null==O?void 0:O.recordsCount,checkboxSelection:!(null==p?void 0:p.hideBulkActions)&&(E.bulkDelete.isAccessible||E.extras&&E.extras.resource&&Object.keys(E.extras.resource).length>0),disableRowSelectionOnClick:!0,loading:x,slots:{loadingOverlay:function(){return Dv(0,E.bulkDelete.isAccessible,k.listProperties.length)},noRowsOverlay:function(){return e=null==p?void 0:p.noRowsText,X.jsxs(jv,{children:[X.jsx("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false",children:X.jsxs("g",{fill:"none",fillRule:"evenodd",children:[X.jsxs("g",{transform:"translate(24 31.67)",children:[X.jsx("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),X.jsx("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),X.jsx("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),X.jsx("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})]}),X.jsx("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),X.jsxs("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)",children:[X.jsx("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),X.jsx("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})}),X.jsx(n.Box,{sx:{mt:1},children:null!=e?e:"No Rows"})]});var e},toolbar:(null==p?void 0:p.hideToolbar)?null:zv},density:(null==p?void 0:p.density)?p.density:"comfortable",editMode:"row"},(Y="server",{paginationMode:Y,sortingMode:Y,filterMode:Y}),{pagination:!0,onPaginationModelChange:function(e,t){e.page!==O.currentPage-1&&(!function(e,t,n,r,o){var a=o[0];o[1];var i=t[1],s=e+1;a.perPage,a.perPage,a.perPage,i((function(e){return Q(Q({},e),{page:s})}))}(e.page,u,0,0,[O,C]),R.set("page",(e.page+1).toString()),V(R)),O.perPage!==e.pageSize&&(!function(e,t,n,r){if(e!==r.perPage){var o=t[1];n([]),o((function(t){return Q(Q({},t),{page:gv,perPage:e})}))}}(e.pageSize,u,g,O),R.set("perPage",e.pageSize.toString()),R.set("page","1"),V(R))},paginationModel:{page:O.currentPage-1,pageSize:O.perPage},keepNonExistentRowsSelected:!0,onRowSelectionModelChange:function(e){I(e)},onSortModelChange:function(e){!function(e,t,n){var r=n[1],o=e.map((function(e){return{order:e.sort,orderBy:e.field}}))[0];t([]),r((function(e){return Q(Q(Q({},e),o),{page:gv})}))}(e,g,u)},autoHeight:!0,getRowId:function(e){return e._id},disableColumnFilter:!0,rowSelectionModel:S})),X.jsx(wv,Q({},Z[0],{extras:p})),S.length>0&&!(null==p?void 0:p.hideBulkActions)&&X.jsx(Cv,{numSelected:S.length,rowCount:y.length,selected:S.map((function(e){return e.toString()})),extras:p,action:X.jsxs(X.Fragment,{children:[E.bulkDelete.isAccessible&&X.jsx(l.LoadingButton,{size:"small",loading:P,color:"error",variant:"contained",startIcon:X.jsx(xo,{icon:"eva:trash-2-outline"}),onClick:function(){return G(i,void 0,void 0,(function(){return U(this,(function(e){switch(e.label){case 0:return N(!0),[4,Lm.delete("".concat(m,"/").concat(k.properties.path,"/all"),{data:S}).then((function(){N(!1),F(p&&p.afterBulkDeleteSnackBarText?p.afterBulkDeleteSnackBarText(S.length):"".concat(S.length," records are deleted successfully")),D((function(e){return Q(Q({},e),{page:Av.page,filters:void 0})})),E.bulkDelete.reloadAfterAction&&window.location.reload(),I((function(e){return[]}))}))];case 1:return e.sent(),[2]}}))}))},sx:{mr:1},children:null!==(a=null==p?void 0:p.bulkDeleteText)&&void 0!==a?a:"Delete"}),X.jsx(uv,{resources:s,resourceName:c,dialogState:Z,gridState:u,selected:S,setSelected:I,bulkActionsDialogState:d,setBulkActionsDialogState:f})]})})]})}function Pv(t){var r=t.placeholder,o=t.onInputChange,a=Z(t,["placeholder","onInputChange"]),i=function(e){o(e.target.value)},s=e.useMemo((function(){return Em.debounce(i,500)}),[]);return e.useEffect((function(){return function(){s.cancel()}}),[]),X.jsx(n.TextField,Q({},a,{fullWidth:!0,onChange:s,placeholder:r,InputProps:{startAdornment:X.jsx(n.InputAdornment,{position:"start",children:X.jsx(xo,{icon:"eva:search-fill",sx:{color:"text.disabled",width:20,height:20}})})}}))}function Nv(t){var n=this,o=t.bulkActionsDialogState,a=t.bulkActionsComponents,i=t.setParams,s=t.setBulkActionsDialogState,l=r.useNavigate(),c=e.useContext(Im).dashbaordUrlPrefix,u=nh().paths,d=th().setSuccessAlert,p=function(e){var t=Q({},o);t[e]={state:!1,modelName:o?o[e].modelName:"",saveLoadingState:!1,fullScreen:!!o&&o[e].fullScreen,setSelected:o?o[e].setSelected:function(e){return""},documentIds:[],afterExecuteMessage:o[e].afterExecuteMessage,severity:o[e].severity},s(t)};return X.jsx(X.Fragment,{children:a&&a(o,p,(function(e,t){return G(n,void 0,void 0,(function(){var n,r,a;return U(this,(function(f){switch(f.label){case 0:return m=t,(h=Q({},o))[m]={state:o[m].state,modelName:o[m].modelName,fullScreen:o[m].fullScreen,saveLoadingState:!0,setSelected:o[m].setSelected,documentIds:o[m].documentIds,afterExecuteMessage:o[m].afterExecuteMessage,severity:o[m].severity},s(h),[4,Lm.post("".concat(c,"/actions/execute/").concat(t),{record:e,modelName:o?o[t].modelName:""})];case 1:return n=f.sent(),p(t),o&&o[t].setSelected([]),r=n.data.data.response,a=r.action,d(o?o[t].afterExecuteMessage:""),a===ym.LIST?i((function(e){return Q(Q({},e),{page:Av.page})})):l(av(r,u)),[2]}var m,h}))}))}))})}var kv=["true","false"];function Bv(e,t,r,o,a,i,s,l,c,u,d,p){if(r[i])switch(r[i].type){case bm.STRING:return X.jsx(as,{name:i,size:e,label:r[i].value,value:l[i],onChange:function(e){return u(i,e,[i])}},t);case bm.PHONENUMBER:return X.jsx(b,{defaultCountry:r[i].countryCodes?r[i].countryCodes[0]:"sa",onChange:function(e){return d(i,e)},onlyCountries:r[i].countryCodes?r[i].countryCodes:["eg","sa"],name:i,size:e,label:r[t].value,value:p(i)?p(i):"",variant:"outlined",fullWidth:!0},t);case bm.TIMEPICKER:return X.jsx(as,{name:i,value:l[i],size:e,label:r[t].value},t);case bm.LOCALIZEDString:return X.jsx(as,{name:i,size:e,label:r[i].value,value:l[i],onChange:function(e){return u(i,e,[i])}},t);case bm.OBJECTID:return X.jsx(as,{name:i,size:e,label:r[i].value,value:l[i]},t);case bm.NUMBER:return X.jsxs(n.Card,{sx:{py:3,px:3},children:[X.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[i].value},t),X.jsxs(n.Stack,{direction:"row",spacing:2,children:[X.jsx(as,{name:i+".from",style:{flex:1,width:90},size:e,label:s?"From":"من"}),X.jsx(as,{name:i+".to",style:{flex:1,width:90},size:e,label:s?"To":"إلى"})]})]},t);case bm.DATE:return X.jsxs(n.Card,{sx:{py:3,px:3},children:[X.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[i].value},t),X.jsxs(n.Grid,{container:!0,spacing:2,children:[X.jsx(n.Grid,{item:!0,xs:12,children:X.jsx(As,{name:i+".from",size:e,label:s?"From":"من",fullWidth:!0},t)}),X.jsx(n.Grid,{item:!0,xs:12,children:X.jsx(As,{name:i+".to",size:e,label:s?"To":"إلى",fullWidth:!0},t)})]})]},t);case bm.ENUM:return X.jsx(is,{name:i,size:e,label:r[i].value,value:l[i],SelectProps:{native:!1,sx:{textTransform:"capitalize"}},onChange:function(e){return u(i,e.target.value,[i])},children:r[i].enumValues.map((function(e){return X.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e.includes("_")?e.split("_").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()})).join(" "):e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e)}))},t);case bm.BOOLEAN:return X.jsx(is,{name:i,size:e,label:r[i].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},onChange:function(e){return u(i,e.target.value,[i])},children:kv.map((function(e){return X.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e},e)}))},t);case bm.ARRAY:case bm.REFERENCE:return X.jsx(oh,{name:i,size:e,value:l[i]?l[i]:"",label:r[i].value,multiple:!1,onOptionChange:function(e){return u(i,e,["".concat(i,"-name"),"".concat(i,"-id")])},options:o[t]&&o[t].data?o[t].data:[],loading:a[i],hasNext:o[t]&&o[t].hasNext,onOpenChanged:function(e,t,n){return c(r[i].apiRoute,r[i].path,e,i,i,t,n)}},t);default:return}}var Ev=function(){function e(e){this.resource=e,this.uniqueFields=new Set,this.execute()}return e.prototype.getUniqueFields=function(){return this.uniqueFields},e.prototype.execute=function(){var e=this;this.resource.listProperties&&this.resource.listProperties.forEach((function(t){e.uniqueFields.add(t.key)})),this.resource.filterProperties&&this.resource.filterProperties.forEach((function(t){e.uniqueFields.add(t)})),this.resource.quickFilterProperties&&this.resource.quickFilterProperties.forEach((function(t){e.uniqueFields.add(t)}))},e}();var Lv=function(){function e(e,t){this.defaultrowsPerPage=t,this.searchParams=e}return e.prototype.get=function(){return{page:this.getPageNumber(),pageSize:this.getPageSize()}},e.prototype.getPageSize=function(){var e=this.searchParams.get("perPage");return e?isNaN(+e)||+e<=0?this.getDefaultPageSize():vv.reduce((function(t,n){return Math.abs(n-+e)<Math.abs(t-+e)?n:t})):this.defaultrowsPerPage},e.prototype.getPageNumber=function(){var e=this.searchParams.get("page"),t=Av.page;return e?isNaN(+e)||+e<=0?this.getDefaultPageNumber():+e:t},e.prototype.getDefaultPageSize=function(){return this.defaultrowsPerPage},e.prototype.getDefaultPageNumber=function(){return Av.page},e}(),Sv=function(){function e(){}return e.modify=function(e){return"_id"===e?e.replace("_",""):e},e}(),Iv=n.styled("span")((function(e){return{width:6,height:6,borderRadius:"50%",position:"absolute",backgroundColor:e.theme.palette.error.main}})),Wv=[];function Hv(t){var o=this,a=e.useState(!1),i=a[0],s=a[1],l=e.useState(!1),u=l[0],d=l[1],p=lh.isEnglish(),f=e.useContext(qm),m=f.textFieldSize,h=f.themeStretch,g=e.useState(),v=g[0],y=g[1],A=e.useState({}),b=A[0],x=A[1],w=e.useState({});w[0],w[1];var j,M=e.useState({}),O=M[0],C=M[1],z=e.useState({}),D=z[0],T=z[1],P=e.useState({}),N=P[0],k=P[1],B=function(e,t,n,r,a,i,s){return G(o,void 0,void 0,(function(){return U(this,(function(o){switch(o.label){case 0:return[4,dh({apiRoute:e,referencedValues:O,value:n,loading:b,fullKey:a,key:r,pathRoute:t,resources:ue,schema:ye,setLoading:x,setReferencedValues:C,page:i,filter:s})];case 1:return o.sent(),[2]}}))}))},L=e.useState({state:!1,message:"",severity:"error"}),S=L[0],I=L[1],W=r.useLocation(),H=r.useSearchParams(),R=H[0],V=H[1],Y=e.useState(W.state?W.state.actionState:null),F=Y[0],Z=Y[1],q=e.useContext(Zm),J=q.paths,_=q.root,ee=e.useState(void 0),te=ee[0],ne=ee[1],re=t.path,oe=t.extras,ae=t.Actions,ie=t.bulkActionsComponents,se=t.HeadingView,le=t.disableFilterButton,ce=t.dataListComponent,ue=e.useContext(Ym).resources,de=ue[re],pe=de.properties.defaultOrderBy,fe=de.properties.defaultOrder,me=de.properties.defaultrowsPerPage,he=de.quickFilterProperties,ge=de.properties.filters,ve=ge&&ge.scopes&&ge.scopes.auto?ge.scopes.auto.key:void 0,ye=de.properties.model,Ae={};new Ev(de).getUniqueFields().forEach((function(e){"__v"!==e&&""!==e&&function(e,t,n,r){if(n[t]=void 0,e)switch(e.type){case bm.STRING:case bm.PHONENUMBER:case bm.LOCALIZEDString:case bm.OBJECTID:n[t]=r&&r.get(t)?r.get(t):"";break;case bm.BOOLEAN:n[t]=!r||!1!==r.get(t)&&!0!==r.get(t)?void 0:r.get(t);break;case bm.REFERENCE:n[t]=r&&r.get(t+"-name")?{_id:r.get(t+"-id"),title:r.get(t+"-name")}:void 0;break;case bm.DATE:case bm.NUMBER:n[t]={from:"",to:""},n[t].from=r.get(t+"-from")?r.get(t+"-from"):"",n[t].to=r.get(t+"-to")?r.get(t+"-to"):"";break;case bm.ENUM:n[t]=r&&r.get(t)?r.get(t):void 0}}(ye[e],e,Ae,R)})),j=function(e,t,n){Object.keys(e).map((function(n){if(e[n]&&t[n].type===bm.DATE){if(e[n].from&&""!==e[n].from)try{e[n].from=e[n].from.toISOString().split("T")[0]}catch(e){}if(e[n].to&&""!==e[n].to)try{e[n].to=e[n].to.toISOString().split("T")[0]}catch(e){}}}));var r="";return Object.keys(e).map((function(o){e[o]&&""!==e[o]&&t[o].type&&o!==n&&(t[o].type===bm.NUMBER||t[o].type===bm.DATE?!e[o].from&&!e[o].to||""===e[o].from&&""===e[o].to?e[o]=void 0:(e[o].from&&""!==e[o].from&&e[o].from,e[o].to&&""!==e[o].to&&e[o].to,r=r+o+":from="+e[o].from+",to="+e[o].to+";;"+t[o].type+"^^"):t[o].type===bm.REFERENCE?(e[o].title,e[o]._id,r=r+o+"="+e[o]._id+";;"+t[o].type+"^^"):(e[o],r=r+o+"="+e[o]+";;"+t[o].type+"^^"))})),r}(Ae,ye,ve);var be=new Lv(R,me).get(),xe=be.page,we=be.pageSize,je=e.useState(Q(Q({},Av),{page:xe,order:fe,orderBy:pe,perPage:we,filters:j,scope:ve&&R.get(ve)?R.get(ve):void 0})),Me=je[0],Oe=je[1],Ce=function(t){var n=e.useState(t||""),r=n[0],o=n[1];return{currentTab:r,onChangeTab:function(e,t){o(t)},setCurrentTab:o}}(ve&&R.get(ve)?R.get(ve):"all"),ze=Ce.currentTab,De=Ce.onChangeTab,Te=Ce.setCurrentTab,Pe={resources:ue,resourceName:re,paramsState:[Me,Oe],bulkActionsDialogState:v,setBulkActionsDialogState:y,extras:oe,setCustomActions:ne};Wv=[],e.useEffect((function(){if(de.filterProperties){var e={};de.filterProperties.forEach((function(t){Ae[t]&&""!==Ae[t]&&(e[t]=Ae[t])})),k(e)}if(de.quickFilterProperties){var t={};de.quickFilterProperties.forEach((function(e){Ae[e]&&""!==Ae[e]&&(t[e]=Ae[e])})),T(t)}}),[]),e.useEffect((function(){F&&setTimeout((function(){Z(null),window.history.replaceState({},document.title)}),4e3)}),[F]);var Ne=de.properties.actions;de.listProperties&&de.listProperties.forEach((function(e){"__v"!==e.key&&""!==e&&Wv.push({id:e.key,label:e.value,align:"left"})})),Wv.push({id:"__v",label:""});var ke={},Be={};he.map((function(e,t){"__v"!==e&&ye[e]&&(ke[e]=Om(ye[e],e,Be,R))}));var Ee=E.object().shape(ke),Le=c.useForm({resolver:Ci(Ee),defaultValues:Ae}),Se=Le.handleSubmit,Ie=Le.reset,We=Le.setValue,He=Le.getValues,Re=function(e){return G(o,void 0,void 0,(function(){var t;return U(this,(function(n){return t=Nm(e,Fe,ye,R,V,ve,ze),Oe((function(e){return Q(Q({},e),{filters:t})})),ve&&R.get(ve)&&Te(R.get(ve)),[2]}))}))},Ve=function(e,t,n){return G(o,void 0,void 0,(function(){var r,o;return U(this,(function(a){switch(a.label){case 0:return t||n.forEach((function(e){R.delete(e)})),(r=Q({},D))[e]=t,T(r),o=Q(Q({},N),r),[4,Re(o)];case 1:return a.sent(),[2]}}))}))},Ye=de.properties.name,Fe=function(){d(!1)};return X.jsx(K,{title:p?Ye+": List":"قائمة "+Ye,children:X.jsxs(n.Container,{maxWidth:!h&&"lg",children:[X.jsx(fh,{open:u,size:m,handleFilterDrawerClose:Fe,schema:ye,searchParams:R,setSearchParams:V,resources:ue,scopeKey:ve,scopeValue:ze,initialQueryParams:Av,quickFilterValues:D,setParams:Oe,onRefrenceChanged:function(e,t){},filterProperties:de.filterProperties,filterString:function(e,t){Oe((function(t){return Q(Q({},t),{filters:e})})),k(t),ve&&R.get(ve)&&Te(R.get(ve))}}),X.jsx(Nv,{bulkActionsDialogState:v,setBulkActionsDialogState:y,setParams:Oe,bulkActionsComponents:ie}),F&&X.jsx(n.Snackbar,{open:!!F,anchorOrigin:{horizontal:"center",vertical:"top"},children:X.jsx(n.Alert,{onClose:function(){Z(null)},severity:F.severity,children:F.message})}),S.state&&X.jsx(n.Snackbar,{open:!!S.state,anchorOrigin:{horizontal:"center",vertical:"top"},children:X.jsx(n.Alert,{onClose:function(){I({state:!1})},severity:S.severity,children:S.message})}),de.properties?X.jsx($,{heading:Ye,headingView:se,links:[{name:p?"Dashboard":"الرئيسية",href:_},{name:Ye}],action:X.jsxs(n.Stack,{direction:{xs:"column",sm:"row"},spacing:1,children:[ae&&X.jsx(ae,{setParams:Oe,initialQueryParams:Av}),te,Ne.new.isAccessible&&X.jsx(n.Button,{variant:"contained",component:r.Link,to:J[re].new,startIcon:X.jsx(xo,{icon:"eva:plus-fill"}),children:Ne.new.value})]})}):X.jsx(wo,{tuples:[]}),X.jsxs(n.Card,{children:[de.properties&&de.properties.filters.scopes.isAccessible&&X.jsx(n.Tabs,{allowScrollButtonsMobile:!0,variant:"scrollable",scrollButtons:"auto",value:ze,onChange:function(e,t){De(e,t),Oe((function(e){return Q(Q({},e),{scope:"all"===t?void 0:t})})),ve&&("all"===t?R.delete(ve):R.has(ve)?R.set(ve,t):R.append(ve,t),V(R))},sx:{px:2,bgcolor:"background.neutral"},children:de.properties.filters.scopes.options.map((function(e){return X.jsx(n.Tab,{disableRipple:!0,label:e.value,value:e.key},e.key)}))}),X.jsx(n.Divider,{}),X.jsxs(n.Stack,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",sx:{pt:3,px:3},spacing:2,children:[X.jsxs(X.Fragment,{children:[de.properties&&de.properties.filters.searchBar.isAccessible&&X.jsx(Pv,{size:m,placeholder:p?"Search by "+Sv.modify(de.properties.title)+"...":"ابحث هنا …",onInputChange:function(e){Oe((function(t){return Q(Q({},t),{filter:e})}))}}),he.length>0&&X.jsx(Ji,{methods:Le,onSubmit:Se(Re),children:X.jsx(n.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:he&&he.map((function(e,t){return X.jsx(n.Grid,{minWidth:200,children:Bv(m,e+i.toString(),ye,O,b,e,p,D,B,Ve,We,He)},e+t)}))},"grid1")})]}),!le&&X.jsxs(n.Stack,{direction:"row",spacing:1,children:[X.jsx(n.Tooltip,{title:"Filter list",onClick:function(){d(!0)},children:X.jsx(n.IconButton,{children:X.jsx(xo,{icon:"ic:round-filter-list"})})}),Me.filters&&!u&&X.jsx(Iv,{}),Me.filters&&!u&&X.jsx(n.Tooltip,{title:"Reset Filter",onClick:function(){s(!i),V({}),Te("all"),Ie({}),T({}),k({}),Oe((function(e){return Q(Q({},e),{page:1,filters:void 0,scope:void 0})}))},children:X.jsx(n.IconButton,{children:Xm("RestartAlt")})})]})]}),ce?ce(Pe):X.jsx(Tv,Q({},Pe))]})]})})}var Rv=["1","2","3","4","5","6"];function Vv(e){var t=e.loadingVertical;return Z(e,["loadingVertical"]),X.jsx(n.Card,{sx:{pt:5,px:5,width:1500},children:X.jsx(n.Grid,{container:!t,children:Rv.map((function(e){return X.jsxs(n.Grid,{item:!0,xs:12,md:6,sx:{mb:3.5},children:[X.jsx(n.Skeleton,{variant:"text",width:100,height:20,sx:{mb:1}}),X.jsx(n.Skeleton,{variant:"text",width:300,height:20})]},e)}))})})}function Yv(e){var t=e.text,o=e.to,a=e.icon;return X.jsx(n.Button,{variant:"contained",component:r.Link,to:o,startIcon:X.jsx(xo,{icon:a}),children:t})}function Fv(e){return X.jsx(Yv,Q({},e,{icon:"eva:edit-fill"}))}var Xv,Qv=function(){function e(e,t,n,r,o){this.modelLocalizedName=t,this.modelName=e,this.isEnglish=n,this.title=r,this.record=o}return e.prototype.getTitle=function(){return this.isEnglish?this.modelLocalizedName+": Show":"عرض "+this.modelLocalizedName},e.prototype.getBreadCrumbHeading=function(){return this.isEnglish?this.modelName+" Data":"عرض "+this.modelLocalizedName},e.prototype.getBreadCrumbLinks=function(e,t,r,o){return[{name:this.isEnglish?"Dashboard":"الرئيسية",href:o},{name:this.modelLocalizedName,href:e[t].list},{name:this.record?r[this.title].type===bm.LOCALIZEDString?this.getValue():"object"!=typeof this.record[this.title]?this.record[this.title]:this.getValue():X.jsx(n.Skeleton,{variant:"text",width:100,height:20})}]},e.prototype.getValue=function(){return this.record[this.title][0]?lh.getLocalizedString(this.record[this.title]):"---"},e}();function Zv(t){var r=t.record,o=t.path,a=t.userPath,i=e.useContext(Ym).resources,s=i[o].showProperties,l=i[o].properties.model;return X.jsx(n.Card,{sx:{pt:5,px:5},children:X.jsx(n.Grid,{container:!0,columnSpacing:2,children:s&&s.map((function(e){return r.hasOwnProperty(e.key)&&null!==r[e.key]?X.jsx(Ig,{property:e,schema:l,record:r,resources:i,userpath:a},e.key):X.jsx(Eg,{title:e.value,value:tv,fieldkey:e.key,resources:i,userpath:a},e.key)}))})})}function Gv(e){var t=e.title,r=e.loading,o=e.icon,a=e.onClick;return X.jsx(n.IconButton,{size:"small",title:t,onClick:a,children:X.jsx(xo,{icon:r?"eos-icons:loading":o})})}function Uv(t){var o=this,a=t.modelPath,i=t.onNoNextText,s=t.onNoPreviousText,l=t.recordId,c=t.nextButtonTitle,u=t.previousButtonTitle,d=t.navigateTo,p=t.onClickNext,f=t.onClickPrevious,m=lh.isEnglish();r.useNavigate();var h=th().setAlert,g=e.useState({next:!1,previous:!1}),v=g[0],y=g[1],A=e.useContext(Im).dashbaordUrlPrefix,b="ooui:previous-ltr",x="ooui:previous-rtl",w=m?b:x,j=m?x:b,M=function(e){return G(o,void 0,void 0,(function(){var t,n,r,o,c;return U(this,(function(u){switch(u.label){case 0:return e===Xv.NEXT?(t=null!=i?i:"No next records",y({next:!0,previous:!1})):(t=null!=s?s:"No previous records",y({next:!1,previous:!0})),[4,Lm.get("".concat(A,"/").concat(a,"/neighbors/").concat(l,"?type=").concat(e))];case 1:return n=u.sent(),y({next:!1,previous:!1}),r=n.data.data,o=r.hasNeighbor,c=r.neighborRecordId,o&&c?(d(c),[2]):(h(t,"warning"),[2])}}))}))};return X.jsxs(n.Stack,{direction:"row",spacing:"5px",alignSelf:"end",children:[X.jsx(Gv,{title:null!=u?u:"Previous",icon:w,onClick:f?function(){return f(l)}:function(){return M(Xv.PREVIOUS)},loading:v.previous}),X.jsx(Gv,{title:null!=c?c:"Next",icon:j,onClick:p?function(){return p(l)}:function(){return M(Xv.NEXT)},loading:v.next})]})}function qv(t){var o,a,i=r.useParams().id,s=void 0===i?"":i,l=t.path,c=t.modelRoute,u=t.disableDefaultActions,d=t.Component,p=t.HeadingView,f=t.Actions,m=t.BreadcrumbsChildren,h=t.BreadCrumbLinks,g=lh.isEnglish(),v=e.useContext(Ym).resources,y=e.useContext(qm).themeStretch,A=e.useContext(Zm),b=A.paths,x=A.root,w=r.useNavigate(),j=v[l],M=j.properties,O=M.model,C=M.name,z=M.actions,D=M.title,T=vh.convertCamelCaseToWord(l),P=Wm(),N=P.requestState,k=P.get,B=new Qv(T,C,g,D,null===(o=N.data)||void 0===o?void 0:o.record);e.useEffect((function(){k({url:"".concat(c,"/").concat(s)})}),[s]);var E=N.state===exports.RequestState.SUCCEEDED;return X.jsx(K,{title:B.getTitle(),children:X.jsxs(n.Container,{maxWidth:!y&&"lg",children:[X.jsx($,{headingView:p&&E&&X.jsx(p,{record:N.data}),heading:B.getBreadCrumbHeading(),links:h&&E?h(N.data):B.getBreadCrumbLinks(b,l,O,x),action:X.jsxs(n.Stack,{spacing:2,children:[!j.properties.disableNextPreviousButtonsInShowPage&&X.jsx(Uv,Q({},t,{recordId:s,modelPath:c,navigateTo:function(e){return w(b[l].show(e))}})),X.jsxs(n.Stack,{direction:{xs:"column",md:"row"},spacing:2,children:[f&&E&&X.jsx(f,{record:N.data}),!u&&M&&z.edit.isAccessible&&X.jsx(Fv,{text:z.edit.value,to:b[l].edit(s)})]})]}),children:m&&E&&X.jsx(m,{record:N.data})}),E?d?X.jsx(d,{record:N.data,path:l,userPath:b}):X.jsx(Zv,{record:null===(a=N.data)||void 0===a?void 0:a.record,path:l,userPath:b},s):X.jsx(n.Grid,{container:!0,alignItems:"center",children:X.jsx(Vv,{sx:{height:50}})})]})})}!function(e){e.NEXT="NEXT",e.PREVIOUS="PREVIOUS"}(Xv||(Xv={}));var Kv=function(){function e(e,t,n,r,o,a){this.modelLocalizedName=e,this.isEnglish=t,this.title=n,this.record=r,this.isEdit=a,this.schema=o}return e.prototype.getTitle=function(){return(this.isEdit?this.getEditWord():this.getNewWord())+this.modelLocalizedName},e.prototype.getBreadCrumbLinks=function(e,t,n){return[{name:this.isEnglish?"Dashboard":"الرئيسية",href:n},{name:this.modelLocalizedName,href:e[t].list},{name:this.isEdit?this.getRecordName():this.getNewWord()}]},e.prototype.getNewWord=function(){return this.isEnglish?"Create ":" اضافة "},e.prototype.getEditWord=function(){return this.isEnglish?"Edit ":"تعديل "},e.prototype.getRecordName=function(){return this.record?this.schema[this.title].type===bm.LOCALIZEDString?this.getValue():"object"!=typeof this.record[this.title]?this.record[this.title]:this.getValue():X.jsx(n.Skeleton,{variant:"text",width:100,height:20})},e.prototype.getValue=function(){return this.record[this.title][0]?lh.getLocalizedString(this.record[this.title]):"---"},e}(),Jv=function(){return o.object().shape({images:o.array().of(o.object().shape({title:o.string().required("Title is required"),_id:o.string().required("id is required"),url:o.string().required("url is required")}))})};function _v(t){var r=t.selected,o=t.fileType,a=t.setFiles,i=t.setSelected,s=c.useForm({resolver:Ci(Jv()),defaultValues:{images:[]}}),u=s.control,d=s.handleSubmit;s.setValue;var p=c.useFieldArray({control:u,name:"images"}),f=p.fields,m=p.append,h=p.remove;return e.useEffect((function(){m(r.filter((function(e){return void 0===f.find((function(t){return t._id===e._id}))}))),h(f.filter((function(e){return void 0===r.find((function(t){return t._id===e._id}))})).map((function(e){return f.findIndex((function(t){return t._id===e._id}))})))}),[r]),X.jsx(Ji,{methods:s,onSubmit:d((function(e){(0,t.update)(e)})),children:X.jsxs(Tm,{sx:{maxHeight:450,paddingBottom:2},children:[f.map((function(e,t){return X.jsxs(n.Stack,{sx:{my:1,pr:3},children:[X.jsxs(X.Fragment,{children:[X.jsx(ki,{src:Eh(e.url,o)===gh.IMAGE?e.url:kh(Nh(e.url)),alt:e.title,sx:{borderRadius:"30px",paddingBottom:1,paddingTop:1}}),X.jsx(n.IconButton,{size:"small",onClick:function(){return t=e,void i((function(e){return e.filter((function(e){return e._id!==t._id}))}));var t},sx:{p:.01,mr:2,mb:1,right:0,position:"absolute",color:"common.white",bgcolor:"red","&:hover":{bgcolor:function(e){return n.alpha(e.palette.grey[900],.48)}}},children:X.jsx(xo,{icon:"eva:close-fill"})})]}),X.jsx(as,{sx:{paddingBottom:1},name:"images.".concat(t,".title"),placeholder:"title",size:"small"}),t<f.length-1&&X.jsx(n.Divider,{})]},e._id)})),X.jsx(l.LoadingButton,{type:"submit",fullWidth:!0,variant:"contained",style:{textAlign:"center",marginBottom:10},children:"Update"}),X.jsx(l.LoadingButton,{type:"submit",fullWidth:!0,variant:"outlined",style:{textAlign:"center"},onClick:function(){i([]),a&&a([])},children:"Remove All"})]})})}function $v(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const ey=["onChange"],ty={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ny(e){const{onChange:t}=e,n=Wt(e,ey),r=B.useRef(),o=B.useRef(null),a=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return nt((()=>{const e=Ke((()=>{const e=r.current;a(),e!==r.current&&t(r.current)})),n=$e(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),B.useEffect((()=>{a(),t(r.current)}),[t]),X.jsx("div",ne({style:ty,ref:o},n))}"production"!==process.env.NODE_ENV&&(ny.propTypes={onChange:Pe.func.isRequired});var ry=La(X.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),oy=La(X.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function ay(e){return Et("MuiTabScrollButton",e)}var iy=Lt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]);const sy=["className","slots","slotProps","direction","orientation","disabled"],ly=mo(xp,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})((({ownerState:e})=>ne({width:40,flexShrink:0,opacity:.8,[`&.${iy.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}))),cy=B.forwardRef((function(e,t){var n,r;const o=uo({props:e,name:"MuiTabScrollButton"}),{className:a,slots:i={},slotProps:s={},direction:l}=o,c=Wt(o,sy),u=ne({isRtl:"rtl"===co().direction},o),d=(e=>{const{classes:t,orientation:n,disabled:r}=e;return Pt({root:["root",n,r&&"disabled"]},ay,t)})(u),p=null!=(n=i.StartScrollButtonIcon)?n:ry,f=null!=(r=i.EndScrollButtonIcon)?r:oy,m=ko({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u}),h=ko({elementType:f,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u});return X.jsx(ly,ne({component:"div",className:Jn(d.root,a),ref:t,role:null,ownerState:u,tabIndex:null},c,{children:"left"===l?X.jsx(p,ne({},m)):X.jsx(f,ne({},h))}))}));"production"!==process.env.NODE_ENV&&(cy.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,direction:Pe.oneOf(["left","right"]).isRequired,disabled:Pe.bool,orientation:Pe.oneOf(["horizontal","vertical"]).isRequired,slotProps:Pe.shape({endScrollButtonIcon:Pe.oneOfType([Pe.func,Pe.object]),startScrollButtonIcon:Pe.oneOfType([Pe.func,Pe.object])}),slots:Pe.shape({EndScrollButtonIcon:Pe.elementType,StartScrollButtonIcon:Pe.elementType}),sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var uy=cy;function dy(e){return Et("MuiTabs",e)}var py=Lt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);const fy=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],my=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,hy=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,gy=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},vy=mo("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${py.scrollButtons}`]:t.scrollButtons},{[`& .${py.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((({ownerState:e,theme:t})=>ne({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${py.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}))),yy=mo("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})((({ownerState:e})=>ne({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"}))),Ay=mo("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})((({ownerState:e})=>ne({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"}))),by=mo("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((({ownerState:e,theme:t})=>ne({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0}))),xy=mo(ny,{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),wy={};let jy=!1;const My=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiTabs"}),r=co(),o="rtl"===r.direction,{"aria-label":a,"aria-labelledby":i,action:s,centered:l=!1,children:c,className:u,component:d="div",allowScrollButtonsMobile:p=!1,indicatorColor:f="primary",onChange:m,orientation:h="horizontal",ScrollButtonComponent:g=uy,scrollButtons:v="auto",selectionFollowsFocus:y,slots:A={},slotProps:b={},TabIndicatorProps:x={},TabScrollButtonProps:w={},textColor:j="primary",value:M,variant:O="standard",visibleScrollbar:C=!1}=n,z=Wt(n,fy),D="scrollable"===O,T="vertical"===h,P=T?"scrollTop":"scrollLeft",N=T?"top":"left",k=T?"bottom":"right",E=T?"clientHeight":"clientWidth",L=T?"height":"width",S=ne({},n,{component:d,allowScrollButtonsMobile:p,indicatorColor:f,orientation:h,vertical:T,scrollButtons:v,textColor:j,variant:O,visibleScrollbar:C,fixed:!D,hideScrollbar:D&&!C,scrollableX:D&&!T,scrollableY:D&&T,centered:l&&!D,scrollButtonsHideMobile:!p}),I=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:a,centered:i,scrollButtonsHideMobile:s,classes:l}=e;return Pt({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",i&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},dy,l)})(S),W=ko({elementType:A.StartScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:S}),H=ko({elementType:A.EndScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:S});"production"!==process.env.NODE_ENV&&l&&D&&console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');const[R,V]=B.useState(!1),[Y,F]=B.useState(wy),[Q,Z]=B.useState(!1),[G,U]=B.useState(!1),[q,K]=B.useState(!1),[J,_]=B.useState({overflow:"hidden",scrollbarWidth:0}),$=new Map,ee=B.useRef(null),te=B.useRef(null),re=()=>{const e=ee.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:wt(e,r.direction),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==M){const e=te.current.children;if(e.length>0){const r=e[$.get(M)];"production"!==process.env.NODE_ENV&&(r||console.error(["MUI: The `value` provided to the Tabs component is invalid.",`None of the Tabs' children match with "${M}".`,$.keys?`You can provide one of the following values: ${Array.from($.keys()).join(", ")}.`:null].join("\n"))),n=r?r.getBoundingClientRect():null,"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&!jy&&n&&0===n.width&&0===n.height&&0!==t.clientWidth&&(t=null,console.error(["MUI: The `value` provided to the Tabs component is invalid.",`The Tab with this \`value\` ("${M}") is not part of the document layout.`,"Make sure the tab item is present in the document or that it's not `display: none`."].join("\n")),jy=!0)}}return{tabsMeta:t,tabMeta:n}},oe=lt((()=>{const{tabsMeta:e,tabMeta:t}=re();let n,r=0;if(T)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const a=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+a)}const a={[n]:r,[L]:t?t[L]:0};if(isNaN(Y[n])||isNaN(Y[L]))F(a);else{const e=Math.abs(Y[n]-a[n]),t=Math.abs(Y[L]-a[L]);(e>=1||t>=1)&&F(a)}})),ae=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=(()=>{})){const{ease:a=$v,duration:i=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=r=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/i);t[e]=a(u)*(n-l)+l,u>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(d)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(d)}(P,ee.current,e,{duration:r.transitions.duration.standard}):ee.current[P]=e},ie=e=>{let t=ee.current[P];T?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===xt()?-1:1),ae(t)},se=()=>{const e=ee.current[E];let t=0;const n=Array.from(te.current.children);for(let r=0;r<n.length;r+=1){const o=n[r];if(t+o[E]>e){0===r&&(t=e);break}t+=o[E]}return t},le=()=>{ie(-1*se())},ce=()=>{ie(se())},ue=B.useCallback((e=>{_({overflow:null,scrollbarWidth:e})}),[]),de=lt((e=>{const{tabsMeta:t,tabMeta:n}=re();if(n&&t)if(n[N]<t[N]){const r=t[P]+(n[N]-t[N]);ae(r,{animation:e})}else if(n[k]>t[k]){const r=t[P]+(n[k]-t[k]);ae(r,{animation:e})}})),pe=lt((()=>{D&&!1!==v&&K(!q)}));B.useEffect((()=>{const e=Ke((()=>{ee.current&&oe()})),t=$e(ee.current);let n;return t.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(n=new ResizeObserver(e),Array.from(te.current.children).forEach((e=>{n.observe(e)}))),()=>{e.clear(),t.removeEventListener("resize",e),n&&n.disconnect()}}),[oe]),B.useEffect((()=>{const e=Array.from(te.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&D&&!1!==v){const n=e[0],r=e[t-1],o={root:ee.current,threshold:.99},a=new IntersectionObserver((e=>{Z(!e[0].isIntersecting)}),o);a.observe(n);const i=new IntersectionObserver((e=>{U(!e[0].isIntersecting)}),o);return i.observe(r),()=>{a.disconnect(),i.disconnect()}}}),[D,v,q,null==c?void 0:c.length]),B.useEffect((()=>{V(!0)}),[]),B.useEffect((()=>{oe()})),B.useEffect((()=>{de(wy!==Y)}),[de,Y]),B.useImperativeHandle(s,(()=>({updateIndicator:oe,updateScrollButtons:pe})),[oe,pe]);const fe=X.jsx(by,ne({},x,{className:Jn(I.indicator,x.className),ownerState:S,style:ne({},Y,x.style)}));let me=0;const he=B.Children.map(c,(e=>{if(!B.isValidElement(e))return null;"production"!==process.env.NODE_ENV&&xu.isFragment(e)&&console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n"));const t=void 0===e.props.value?me:e.props.value;$.set(t,me);const n=t===M;return me+=1,B.cloneElement(e,ne({fullWidth:"fullWidth"===O,indicator:n&&!R&&fe,selected:n,selectionFollowsFocus:y,onChange:m,textColor:j,value:t},1!==me||!1!==M||e.props.tabIndex?{}:{tabIndex:0}))})),ge=(()=>{const e={};e.scrollbarSizeListener=D?X.jsx(xy,{onChange:ue,className:Jn(I.scrollableX,I.hideScrollbar)}):null;const t=D&&("auto"===v&&(Q||G)||!0===v);return e.scrollButtonStart=t?X.jsx(g,ne({slots:{StartScrollButtonIcon:A.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:W},orientation:h,direction:o?"right":"left",onClick:le,disabled:!Q},w,{className:Jn(I.scrollButtons,w.className)})):null,e.scrollButtonEnd=t?X.jsx(g,ne({slots:{EndScrollButtonIcon:A.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:H},orientation:h,direction:o?"left":"right",onClick:ce,disabled:!G},w,{className:Jn(I.scrollButtons,w.className)})):null,e})();return X.jsxs(vy,ne({className:Jn(I.root,u),ownerState:S,ref:t,as:d},z,{children:[ge.scrollButtonStart,ge.scrollbarSizeListener,X.jsxs(yy,{className:I.scroller,ownerState:S,style:{overflow:J.overflow,[T?"margin"+(o?"Left":"Right"):"marginBottom"]:C?void 0:-J.scrollbarWidth},ref:ee,children:[X.jsx(Ay,{"aria-label":a,"aria-labelledby":i,"aria-orientation":"vertical"===h?"vertical":null,className:I.flexContainer,ownerState:S,onKeyDown:e=>{const t=te.current,n=_e(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===h?"ArrowLeft":"ArrowUp",a="horizontal"===h?"ArrowRight":"ArrowDown";switch("horizontal"===h&&o&&(r="ArrowRight",a="ArrowLeft"),e.key){case r:e.preventDefault(),gy(t,n,hy);break;case a:e.preventDefault(),gy(t,n,my);break;case"Home":e.preventDefault(),gy(t,null,my);break;case"End":e.preventDefault(),gy(t,null,hy)}},ref:te,role:"tablist",children:he}),R&&fe]}),ge.scrollButtonEnd]}))}));"production"!==process.env.NODE_ENV&&(My.propTypes={action:Ge,allowScrollButtonsMobile:Pe.bool,"aria-label":Pe.string,"aria-labelledby":Pe.string,centered:Pe.bool,children:Pe.node,classes:Pe.object,className:Pe.string,component:Pe.elementType,indicatorColor:Pe.oneOfType([Pe.oneOf(["primary","secondary"]),Pe.string]),onChange:Pe.func,orientation:Pe.oneOf(["horizontal","vertical"]),ScrollButtonComponent:Pe.elementType,scrollButtons:Pe.oneOf(["auto",!1,!0]),selectionFollowsFocus:Pe.bool,slotProps:Pe.shape({endScrollButtonIcon:Pe.oneOfType([Pe.func,Pe.object]),startScrollButtonIcon:Pe.oneOfType([Pe.func,Pe.object])}),slots:Pe.shape({EndScrollButtonIcon:Pe.elementType,StartScrollButtonIcon:Pe.elementType}),sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),TabIndicatorProps:Pe.object,TabScrollButtonProps:Pe.object,textColor:Pe.oneOf(["inherit","primary","secondary"]),value:Pe.any,variant:Pe.oneOf(["fullWidth","scrollable","standard"]),visibleScrollbar:Pe.bool});var Oy=My;function Cy(e){return Et("MuiTab",e)}var zy=Lt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]);const Dy=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Ty=mo(xp,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Ue(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})((({theme:e,ownerState:t})=>ne({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${zy.iconWrapper}`]:ne({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${zy.selected}`]:{opacity:1},[`&.${zy.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${zy.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${zy.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${zy.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${zy.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}))),Py=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiTab"}),{className:r,disabled:o=!1,disableFocusRipple:a=!1,fullWidth:i,icon:s,iconPosition:l="top",indicator:c,label:u,onChange:d,onClick:p,onFocus:f,selected:m,selectionFollowsFocus:h,textColor:g="inherit",value:v,wrapped:y=!1}=n,A=Wt(n,Dy),b=ne({},n,{disabled:o,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:l,label:!!u,fullWidth:i,textColor:g,wrapped:y}),x=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:a,label:i,selected:s,disabled:l}=e;return Pt({root:["root",a&&i&&"labelIcon",`textColor${Ue(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]},Cy,t)})(b),w=s&&u&&B.isValidElement(s)?B.cloneElement(s,{className:Jn(x.iconWrapper,s.props.className)}):s;return X.jsxs(Ty,ne({focusRipple:!a,className:Jn(x.root,r),ref:t,role:"tab","aria-selected":m,disabled:o,onClick:e=>{!m&&d&&d(e,v),p&&p(e)},onFocus:e=>{h&&!m&&d&&d(e,v),f&&f(e)},ownerState:b,tabIndex:m?0:-1},A,{children:["top"===l||"start"===l?X.jsxs(B.Fragment,{children:[w,u]}):X.jsxs(B.Fragment,{children:[u,w]}),c]}))}));"production"!==process.env.NODE_ENV&&(Py.propTypes={children:it,classes:Pe.object,className:Pe.string,disabled:Pe.bool,disableFocusRipple:Pe.bool,disableRipple:Pe.bool,icon:Pe.oneOfType([Pe.element,Pe.string]),iconPosition:Pe.oneOf(["bottom","end","start","top"]),label:Pe.node,onChange:Pe.func,onClick:Pe.func,onFocus:Pe.func,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),value:Pe.any,wrapped:Pe.bool});var Ny=Py;function ky(t){var r=this,o=t.Content,a=t.uploadFiles;t.imagesFiles;var i=t.isLoading;Z(t,["Content","uploadFiles","imagesFiles","isLoading"]);var s=e.useState([]),l=s[0],c=s[1],u=e.useState(!1),d=u[0],p=u[1],f=e.useState(!1),m=f[0],h=f[1],g=e.useState(!1);g[0];var v=g[1],y=e.useCallback((function(e){p(!1),c((function(t){return q(q([],t,!0),e.map((function(e){return Object.assign(e,{preview:URL.createObjectURL(e)})})),!0)}))}),[c,l]);return X.jsxs(n.Grid,{children:[X.jsx(n.Snackbar,{open:m,anchorOrigin:{horizontal:"center",vertical:"top"},children:X.jsx(n.Alert,{onClose:function(){h(!1)},severity:"success",children:"Images are uploaded !"},"alert")}),X.jsx(qi,{files:l,showPreview:!0,onDrop:y,onRemoveAll:function(){c([]),setTimeout((function(){v(!1)}),4e3)},onRemove:function(e){c((function(t){return t.filter((function(t){return t!==e}))}))},onUpload:function(){return G(r,void 0,void 0,(function(){return U(this,(function(e){switch(e.label){case 0:return[4,a(l)];case 1:return e.sent(),p(!0),h(!0),c([]),setTimeout((function(){h(!1)}),4e3),[2]}}))}))},sx:{p:2},Content:o,isLoading:i,uploaded:d})]})}function By(e){return Et("MuiImageList",e)}Lt("MuiImageList",["root","masonry","quilted","standard","woven"]);const Ey=B.createContext({});"production"!==process.env.NODE_ENV&&(Ey.displayName="ImageListContext");var Ly=Ey;const Sy=["children","className","cols","component","rowHeight","gap","style","variant"],Iy=mo("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})((({ownerState:e})=>ne({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"},"masonry"===e.variant&&{display:"block"}))),Wy=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiImageList"}),{children:r,className:o,cols:a=2,component:i="ul",rowHeight:s="auto",gap:l=4,style:c,variant:u="standard"}=n,d=Wt(n,Sy),p=B.useMemo((()=>({rowHeight:s,gap:l,variant:u})),[s,l,u]);B.useEffect((()=>{"production"!==process.env.NODE_ENV&&void 0!==document&&"objectFit"in document.documentElement.style==!1&&console.error(["MUI: ImageList v5+ no longer natively supports Internet Explorer.","Use v4 of this component instead, or polyfill CSS object-fit."].join("\n"))}),[]);const f=ne("masonry"===u?{columnCount:a,columnGap:l}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:l},c),m=ne({},n,{component:i,gap:l,rowHeight:s,variant:u}),h=(e=>{const{classes:t,variant:n}=e;return Pt({root:["root",n]},By,t)})(m);return X.jsx(Iy,ne({as:i,className:Jn(h.root,h[u],o),ref:t,style:f,ownerState:m},d,{children:X.jsx(Ly.Provider,{value:p,children:r})}))}));"production"!==process.env.NODE_ENV&&(Wy.propTypes={children:Pe.node.isRequired,classes:Pe.object,className:Pe.string,cols:Dt,component:Pe.elementType,gap:Pe.number,rowHeight:Pe.oneOfType([Pe.oneOf(["auto"]),Pe.number]),style:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),variant:Pe.oneOfType([Pe.oneOf(["masonry","quilted","standard","woven"]),Pe.string])});var Hy=Wy;function Ry(e){return Et("MuiImageListItem",e)}var Vy=Lt("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]);const Yy=["children","className","cols","component","rows","style"],Fy=mo("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Vy.img}`]:t.img},t.root,t[n.variant]]}})((({ownerState:e})=>ne({display:"block",position:"relative"},"standard"===e.variant&&{display:"flex",flexDirection:"column"},"woven"===e.variant&&{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}},{[`& .${Vy.img}`]:ne({objectFit:"cover",width:"100%",height:"100%",display:"block"},"standard"===e.variant&&{height:"auto",flexGrow:1})}))),Xy=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiImageListItem"}),{children:r,className:o,cols:a=1,component:i="li",rows:s=1,style:l}=n,c=Wt(n,Yy),{rowHeight:u="auto",gap:d,variant:p}=B.useContext(Ly);let f="auto";"woven"===p?f=void 0:"auto"!==u&&(f=u*s+d*(s-1));const m=ne({},n,{cols:a,component:i,gap:d,rowHeight:u,rows:s,variant:p}),h=(e=>{const{classes:t,variant:n}=e;return Pt({root:["root",n],img:["img"]},Ry,t)})(m);return X.jsx(Fy,ne({as:i,className:Jn(h.root,h[p],o),ref:t,style:ne({height:f,gridColumnEnd:"masonry"!==p?`span ${a}`:void 0,gridRowEnd:"masonry"!==p?`span ${s}`:void 0,marginBottom:"masonry"===p?d:void 0},l),ownerState:m},c,{children:B.Children.map(r,(e=>B.isValidElement(e)?("production"!==process.env.NODE_ENV&&xu.isFragment(e)&&console.error(["MUI: The ImageListItem component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n")),"img"===e.type||Je(e,["Image"])?B.cloneElement(e,{className:Jn(h.img,e.props.className)}):e):null))}))}));"production"!==process.env.NODE_ENV&&(Xy.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,cols:Dt,component:Pe.elementType,rows:Dt,style:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var Qy=Xy,Zy={},Gy=vi;Object.defineProperty(Zy,"__esModule",{value:!0});var Uy=Zy.default=void 0,qy=Gy(bi()),Ky=X,Jy=(0,qy.default)((0,Ky.jsx)("path",{d:"M21 3H3v18h18V3zM10 17l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBoxSharp");Uy=Zy.default=Jy;var _y=mo(n.Box)((function(e){return{height:"100%",display:"flex",textAlign:"center",alignItems:"center",flexDirection:"column",justifyContent:"center",padding:e.theme.spacing(8,2)}}));function $y(e){var t=e.title,r=e.description,o=e.img,a=e.imageHeight,i=Z(e,["title","description","img","imageHeight"]);return X.jsxs(_y,Q({},i,{children:[X.jsx(ki,{disabledEffect:!0,visibleByDefault:!0,alt:"empty content",src:o||"/assets/illustrations/illustration_empty_content.svg",sx:{height:null!=a?a:240,mb:3}}),X.jsx(n.Typography,{variant:"h5",gutterBottom:!0,children:t}),r&&X.jsx(n.Typography,{variant:"body2",sx:{color:"text.secondary"},children:r})]}))}var eA=mo((function(e){return X.jsx(Qy,Q({},e))}))((function(e){return{"& .MuiImageListItem-img":{borderRadius:"10px",border:e.selected&&"3px solid #0085FF"}}}));function tA(t){var r=e.useState(t.selected),o=r[0],a=r[1],i=t.item,s=t.onImageSelected,l=t.fileType?Eh(i.url,t.fileType):gh.IMAGE;return B.useEffect((function(){a(t.selected)}),[o,t.selected]),X.jsxs(eA,{selected:o,onClick:function(){return function(e){s(e),a(!o)}(i)},children:[X.jsx("img",{src:l===gh.IMAGE?i.url:kh(Nh(i.url)),alt:i.title,loading:"lazy"}),l!==gh.IMAGE&&X.jsx(n.Typography,{style:{color:"#6F6F6F"},fontWeight:200,fontSize:10,alignSelf:"center",children:i.title}),o&&X.jsx(n.ImageListItemBar,{sx:{background:"transparent"},position:"top",actionIcon:X.jsx(n.Icon,{children:X.jsx(Uy,{color:"info",sx:{background:"#fff",color:"#0085FF"}})}),actionPosition:"right"})]})}function nA(e){var t=e.images,r=e.isLoading,o=e.selected,a=e.multiple,i=e.numberOfColumns,s=e.fileType?e.fileType:gh.IMAGE;return X.jsxs(Tm,{sx:{maxHeight:380},children:[X.jsxs(Hy,{cols:i||7,gap:8,children:[!r&&t.map((function(t,n){return X.jsx(tA,{item:t,index:n,multiple:a,onImageSelected:e.onImageSelected,images:e.images,selected:void 0!==o.find((function(e){return e._id===t._id})),fileType:s},t._id)})),r&&Array.from(Array(10).keys()).map((function(e){return X.jsx(n.Skeleton,{variant:"rectangular",sx:{borderRadius:"10px",height:"164px"}},e)}))]}),(!t||0===t.length)&&!r&&X.jsx($y,{title:"No images found"})]})}function rA(e){var t=e.isLoading,r=e.onImageSelected,o=e.images,a=e.numberOfColumns,i=e.onQueryFilter,s=e.isUploading,l=e.selected,c=e.multiple,u=e.fileType;return X.jsxs(n.Stack,{spacing:1,sx:{mx:1},children:[s&&X.jsx(n.Alert,{severity:"info",children:"Uploading in progress"}),i&&X.jsx(Pv,{placeholder:"search",onInputChange:i,size:"small",sx:{pr:1,pl:2,pb:1}}),X.jsx(nA,{onImageSelected:r,images:o,isLoading:t,numberOfColumns:a,selected:l,multiple:c,fileType:u})]})}function oA(e){var t=e.children,n=e.value,r=e.index,o=Z(e,["children","value","index"]);return X.jsx("div",Q({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o,{children:n===r&&X.jsx(bo,{children:t})}))}var aA=mo((function(e){return X.jsx(Oy,Q({},e))}))({"& .MuiTabs-indicator":{display:"none",justifyContent:"center",backgroundColor:"transparent"}}),iA=mo((function(e){return X.jsx(Ny,Q({disableRipple:!0},e))}))((function(e){var t=e.theme;return{textTransform:"none",fontWeight:t.typography.fontWeightRegular,fontSize:t.typography.pxToRem(15),paddingLeft:"23px",paddingRight:"23px",color:"#000","&.Mui-selected":{background:"#fff",border:"0.5px solid black",borderRadius:"0px"},"&.Mui-focusVisible":{backgroundColor:"rgba(100, 95, 228, 0.32)"},"&.MuiTab-root":{marginRight:"0px"}}}));function sA(e){var t=e.uploadingTapProps,n=e.onImageSelected,r=e.images,o=e.onQueryFilter,a=e.isLoading,i=e.uploadFileString,s=e.mediaLibraryString,l=e.selected,c=e.multiple,u=e.fileType,d=e.handleSelectionPanelState,p=e.numberOfColumns,f=B.useState(0),m=f[0],h=f[1];return X.jsxs(bo,{sx:{width:"100%"},children:[X.jsx(bo,{paddingBottom:2,children:X.jsxs(aA,{value:m,onChange:function(e,t){d&&d(1===t),h(t)},sx:{background:"#F8F8F8",paddingLeft:3},children:[X.jsx(iA,{label:i||"Upload files"}),X.jsx(iA,{label:s||"Media library"})]})}),X.jsx(oA,{value:m,index:0,children:X.jsx(ky,Q({},t))}),X.jsx(oA,{value:m,index:1,children:X.jsx(rA,{numberOfColumns:p,isUploading:t.isLoading,images:r,onImageSelected:n,onQueryFilter:o,isLoading:a,selected:l,multiple:c,fileType:u})})]})}function lA(t){var r=this,o=t.onDismiss,a=t.onConfirm,i=t.uploadImages,s=t.filterImagesByTitle,l=t.updateImages,c=t.loadImagesList,u=t.Content,d=t.setFiles,p=t.fileType,f=t.basePath,m=t.setParams,h=t.icon,g=t.mediaLibraryString,v=t.uploadFileString,y=t.message,A=t.imagesSelected,b=t.multiple,x=Z(t,["onDismiss","onConfirm","uploadImages","filterImagesByTitle","updateImages","loadImagesList","Content","setFiles","fileType","basePath","setParams","icon","mediaLibraryString","uploadFileString","message","imagesSelected","multiple"]),w=e.useState(!1),j=w[0],M=w[1],O=e.useState([]),C=O[0],z=O[1],D=e.useState(!1),T=D[0],P=D[1],N=e.useState([]),k=N[0],B=N[1],E=e.useState(!0),L=E[0],S=E[1],I=function(e){B(b?function(t){return t.find((function(t){return t._id===e._id}))?t.filter((function(t){return t._id!==e._id})):q([e],t,!0)}:[e])};e.useEffect((function(){A&&0!==A.length&&B(A)}),[A]),e.useEffect((function(){h&&B([h])}),[h]);var W=e.useState([]),H=W[0],R=W[1],V={Content:u,uploadFiles:function(e){return G(r,void 0,void 0,(function(){var t;return U(this,(function(n){switch(n.label){case 0:return z(e),M(!0),[4,i(e,p)];case 1:return t=n.sent(),m&&m((function(e){return Q({},e)})),t.forEach((function(e){I(e)})),M(!1),R(t),[2]}}))}))},isLoading:j,imagesFiles:C};return e.useEffect((function(){V.isLoading&&!L||(P(!0),c((function(e){P(!1),R(e)}),p,f))}),[V.isLoading,L]),X.jsxs(n.Dialog,Q({},x,{onClose:o,children:[X.jsx(n.DialogTitle,{id:"id",style:{paddingBottom:6},children:X.jsxs(n.Stack,{direction:"row",justifyContent:"space-between",children:[X.jsx(n.Typography,{flexGrow:1,style:{color:"black"},fontWeight:700,fontSize:25,children:y||"Insert Media"}),X.jsx(n.IconButton,{size:"large",onClick:o,sx:{p:.01,color:"common.black",bgcolor:"white"},children:X.jsx(xo,{icon:"eva:close-fill"})})]})}),X.jsxs(n.Grid,{container:!0,children:[X.jsx(n.Grid,{item:!0,xs:k.length>0?9:12,children:X.jsx(sA,{onImageSelected:I,uploadingTapProps:V,images:H,numberOfColumns:k.length>0?5:7,mediaLibraryString:g,uploadFileString:v,multiple:b,onQueryFilter:function(e){return function(e,t){P(!0),s(e,(function(e){P(!1),R(e)}),t)}(e,p)},isLoading:T,selected:k,handleSelectionPanelState:function(e){return S(e)},fileType:p})}),k.length>0&&X.jsx(n.Grid,{item:!0,xs:3,sx:{background:"#F8F8F8",p:3,borderLeft:"0.5px solid black",borderLeftColor:"#ABABAB"},children:X.jsx(_v,{setSelected:B,selected:k,update:function(e){P(!0),l(e.images,(function(e){P(!1),R(e)})),m&&m((function(e){return Q({},e)}))},fileType:p,setFiles:d})})]}),X.jsx(n.DialogActions,{children:0!==k.length&&X.jsx(n.Button,{size:"small",variant:"contained",autoFocus:!0,onClick:function(){return a(k)},children:b?"Select Images":"Select Image"})})]}))}var cA=function(e,t){return G(void 0,void 0,void 0,(function(){return U(this,(function(n){return[2,new Promise((function(n){new C(e,{quality:.6,success:function(e){try{j.Storage.put(e.name,e,{contentType:e.type}).then((function(e){t(e.key)}))}catch(e){console.log("Error uploading file: ",e)}n(!0)},error:function(e){console.log(e.message)}})}))]}))}))},uA=function(e,t){return G(void 0,void 0,void 0,(function(){return U(this,(function(n){return[2,Promise.all(e.map((function(e){if(Eh(e.name,t)===gh.IMAGE)return new Promise((function(t){new C(e,{quality:.6,convertSize:1/0,success:function(e){try{j.Storage.put(e.name,e,{contentType:e.type}).then((function(e){t(e.key)}))}catch(e){console.log("Error uploading file: ",e)}},error:function(e){console.log(e.message)}})}));var n=[];try{j.Storage.put(e.name,e,{contentType:e.type}).then((function(e){n.push(e.key)}))}catch(e){console.log("Error uploading file: ",e)}})))]}))}))},dA=function(e,t){return Q({},t)},pA=function(e){return{display:"flex",padding:8,overflow:"auto"}};function fA(e){var t=e.items,r=e.disabled,o=t.length>0;return X.jsx(n.List,{style:{display:"flex",flexWrap:"wrap",flexGrow:0,flexShrink:0,flexBasis:"25%"},disablePadding:!0,sx:Q({},o&&{my:3,display:"flex",flexDirection:"row",flexWrap:"wrap"}),children:X.jsx(p.AnimatePresence,{children:X.jsx(z.DragDropContext,{onDragEnd:function(n){if(n.destination){var r=t.splice(n.source.index,1)[0];t.splice(n.destination.index,0,r),e.setImages(t)}},children:X.jsx(z.Droppable,{droppableId:"characters",direction:"horizontal",children:function(t,o){return X.jsxs("div",Q({style:pA(o.isDraggingOver)},t.droppableProps,{ref:t.innerRef,children:[e.items.map((function(t,o){return X.jsx(n.ListItem,Q({component:p.m.div},Li().inRight,{sx:{p:0,m:.75,width:100,height:100,position:"relative",display:"inline-flex"},children:X.jsx(z.Draggable,{draggableId:t._id,index:o,children:function(o,a){return X.jsxs("div",Q({ref:o.innerRef},o.draggableProps,o.dragHandleProps,{style:dA(a.isDragging,o.draggableProps.style),children:[X.jsx("img",{src:t.url,alt:"no"}),e.onRemove&&X.jsx(n.IconButton,{size:"small",disabled:r,onClick:function(){return e.onRemove({id:t._id,name:t.title})},sx:{top:-8,p:.01,right:-8,position:"absolute",color:"common.white",bgcolor:"red","&:hover":{bgcolor:function(e){return n.alpha(e.palette.grey[900],.48)}}},children:X.jsx(xo,{icon:"eva:close-fill"})})]}))}},t._id)}),t._id)})),t.placeholder]}))}})})})})}function mA(e){return{key:e.id,name:e.name}}function hA(e){var t=e.file,r=e.tooltip,o=e.imageView,a=e.onDownload,i=e.sx,s=e.imgSx,l=mA(t).name,c=Nh(l),u="image"===c&&o?X.jsx(n.Box,{component:"img",src:l,sx:Q({width:1,height:1,flexShrink:0,objectFit:"cover"},s)}):X.jsx(n.Box,{component:"img",src:kh(c),sx:Q({width:32,height:32,flexShrink:0},i)});return r?X.jsx(n.Tooltip,{title:l,children:X.jsxs(n.Stack,{flexShrink:0,component:"span",alignItems:"center",justifyContent:"center",sx:{width:"fit-content",height:"inherit"},children:[u,a&&X.jsx(yg,{onDownload:a})]})}):X.jsxs(X.Fragment,{children:[u,a&&X.jsx(yg,{onDownload:a})]})}function gA(e){e.thumbnail;var t=e.files,r=e.disabled,o=e.onRemove,a=e.sx;return(null==t?void 0:t.length)?X.jsx(p.AnimatePresence,{initial:!1,children:t.map((function(e){var t=mA(e),i=t.key,s=t.name;return X.jsxs(n.Stack,Q({component:p.m.div},Li().inUp,{spacing:2,direction:"row",alignItems:"center",sx:Q({my:1,px:1,py:.75,borderRadius:.75,border:function(e){return"solid 1px ".concat(e.palette.divider)}},a),children:[X.jsx(hA,{file:e}),X.jsx(n.Stack,{flexGrow:1,sx:{minWidth:0},children:X.jsx(n.Typography,{variant:"subtitle2",noWrap:!0,children:s})}),o&&X.jsx(n.IconButton,{disabled:r,edge:"end",size:"small",onClick:function(){return o(e)},children:X.jsx(xo,{icon:"eva:close-fill"})})]}),i)}))}):null}function vA(e){e.showPreview;var t=e.files,r=e.type,o=e.disabled,a=e.onRemove,i=e.setImages,s=t.length>0;if(r===gh.IMAGE)return X.jsx(n.List,{style:{width:607,overflowX:"auto",display:"flex",flexWrap:"wrap",flexGrow:0,flexShrink:0,flexBasis:"25%"},disablePadding:!0,sx:Q({},s&&{my:3}),children:X.jsx(fA,{items:t,onRemove:a,setImages:i,disabled:o})});var l=[];return t.forEach((function(e){l.push({name:e.title+"."+e.url.split(".").pop(),id:e._id})})),X.jsx(gA,{onRemove:a,files:l,disabled:o})}function yA(e){var t="";return e!==gh.ALL&&(t="&filters=type=".concat(e,";;enum")),t}function AA(t){var r=this,o=t.image,a=t.keyValue,i=t.isEnglish,s=t.imageDialogState,l=t.label,c=t.multiple,u=t.fileType,d=t.dismissDialogState,p=t.setImages,f=t.handleEditImage,m=t.handleRemoveImage,h=t.setImageDialogState,g=t.setImage,v=t.setValue,y=e.useContext(Im).dashbaordUrlPrefix,A=e.useContext(Km).bucketUrl;return X.jsxs(X.Fragment,{children:[X.jsxs(n.Card,{sx:{p:3,mb:3},style:{width:450,minHeight:248,top:444,paddingTop:24,paddingLeft:24,paddingRight:36,paddingBottom:24,left:330,position:"inherit",backgroundColor:"white"},children:[X.jsx(n.Stack,{spacing:3.5,marginRight:4,children:X.jsxs("div",{style:{display:"flex",alignItems:"baseline"},children:[X.jsx(n.Typography,{fontWeight:500,height:25,fontSize:18,letterSpacing:.15,width:194,position:"inherit",display:"inline",alignItems:"center",children:l}),o&&o[a]&&X.jsx(n.Typography,{marginLeft:17,fontWeight:400,height:21,fontSize:16,letterSpacing:.15,width:91,boxSizing:"border-box",flex:1,alignSelf:"end",children:X.jsx(n.Link,{onClick:function(){return f(a)},underline:"always",color:"#0085FF",style:{cursor:"pointer"},children:i?"Edit":"تعديل"})})]})}),o&&o[a]&&!s[a]?!c&&X.jsxs(n.Grid,{children:[X.jsx(n.IconButton,{size:"small",onClick:function(){return m(a)},sx:{p:.01,right:800,position:"absolute",color:"common.white",bgcolor:function(e){return n.alpha(e.palette.grey[900],.72)},"&:hover":{bgcolor:function(e){return n.alpha(e.palette.grey[900],.48)}}},children:X.jsx(xo,{icon:"eva:close-fill"})}),X.jsx("img",{src:u===gh.IMAGE?o[a].url:kh(Nh(o[a].url)),style:{width:200,marginLeft:100,marginTop:20},alt:"Collection"}),u!==gh.IMAGE&&X.jsx(n.Typography,{style:{color:"#6F6F6F"},fontWeight:200,fontSize:13,children:o[a].title})]}):X.jsxs(n.Box,{width:400,height:150,textAlign:"center",marginTop:1.5,sx:{borderRadius:"10px",border:"1px dashed #BCBCBC"},children:[X.jsx(n.Button,{style:{marginTop:43,color:"#0085FF",backgroundColor:"#E2F1FF",fontSize:12,fontWeight:400},onClick:function(){return function(e,t,n){var r=Q({},t);r[e]=!0,n(r)}(a,s,h)},children:i?"Upload image":"تحميل"}),X.jsx(n.Typography,{style:{marginTop:18,color:"#6F6F6F"},fontWeight:400,fontSize:13,children:i?"or drop an image to upload":"يمكنك تحميل صورة من هنا"})]}),o&&o[a]&&0!==o[a].length&&c&&X.jsx(vA,{files:o[a],onRemove:function(e){return function(e,t,n,r){var o=Q({},e);o[n]=e[n].filter((function(e){return e._id!==t.id})),r(o)}(o,e,a,g)},type:gh.ALL})]}),X.jsx(lA,{open:!!s[a]&&s[a],maxWidth:"md",fileType:u,basePath:null!=y?y:"",multiple:null!=c&&c,mediaLibraryString:i?"Media library":"قائمة الصور",uploadFileString:i?"Upload files":"تحميل صور جديدة",fullWidth:!0,message:i?"Upload image":"تحميل صورة",onDismiss:function(){return d(a,s,h)},updateImages:function(e,t){Lm.patch("".concat(y,"/images/all"),{images:e}).then((function(e){t(e.data.data.records)}))},filterImagesByTitle:function(e,t,n){var r=yA(n);Lm.get("".concat(y,"/images?filter=").concat(e,"&order=desc&orderBy=updatedAt").concat(r)).then((function(e){t(e.data.data.records)})).catch((function(){}))},loadImagesList:function(e,t){var n=yA(t);Lm.get("".concat(y,"/images?order=desc&orderBy=updatedAt").concat(n)).then((function(t){e(t.data.data.records)})).catch((function(){}))},imagesSelected:o&&o[a]?c?o[a]:[o[a]]:[],uploadImages:function(e,t){return G(r,void 0,void 0,(function(){var n;return U(this,(function(r){switch(r.label){case 0:return[4,uA(e,t)];case 1:return r.sent(),n=e.map((function(e){return e.name})),[4,Lm.post("".concat(y,"/images/all"),{images:n.map((function(e){return{url:A+e,title:e.split(".")[0],type:Eh(e,t)}}))})];case 2:return[2,r.sent().data.data.records]}}))}))},onConfirm:function(e){p(a,o,g,c?e:e[0]),v(a,c?e:e[0]),d(a,s,h)}},a)]})}function bA(e){var t=e.handleChange;return X.jsxs(l.TabList,{onChange:t,"aria-label":"lab API tabs example",children:[X.jsx(n.Tab,{label:X.jsx(xA,{flag:Ag.ENGLISH_FLAG,text:"EN"}),value:"1"}),X.jsx(n.Tab,{label:X.jsx(xA,{flag:Ag.ARABIC_FLAG,text:"AR"}),value:"2"})]})}function xA(e){var t=e.flag,r=e.text;return X.jsxs(n.Stack,{direction:"row",spacing:.5,alignItems:"center",children:[X.jsx(ki,{disabledEffect:!0,visibleByDefault:!0,alt:"empty content",src:t,sx:{width:23,height:15,borderRadius:"2px"}}),X.jsx(n.Typography,{fontWeight:1e3,fontSize:12,children:r})]})}function wA(e){var t=e.title,r=e.size,o=e.value,a=e.isEdit,i=e.fieldName,s=e.numberOfRows,c=e.setValue,u=e.getValues,d=e.handleChange,p=i+".ar",f=i+".en";a&&(f=i+".0.value",p=i+".1.value",c(i+".0.key","en"),c(i+".1.key","ar"));var m=(s||1)>1;function h(e,t,o,a,i){return X.jsxs(l.TabPanel,{value:e,style:{paddingTop:15},children:[X.jsx(as,{size:r,multiline:m,rows:s,dir:i,name:t,style:{minHeight:40,boxSizing:"border-box",paddingBottom:12}}),X.jsx(n.Typography,{paddingRight:2,paddingLeft:2,noWrap:!0,fontWeight:600,fontSize:13,color:"#919EAB",align:a,children:u(o)})]})}return X.jsxs(n.Card,{sx:{pl:2,pr:2,pt:2,pb:2,mb:2},children:[X.jsx(n.Typography,{fontWeight:600,height:25,fontSize:14,position:"inherit",display:"inline",color:"#919EAB",children:t}),X.jsx(n.Box,{borderColor:"black",sx:{width:"100%",typography:"body1"},children:X.jsxs(l.TabContext,{value:o,children:[X.jsx(n.Box,{sx:{borderBottom:1,borderColor:"divider"},children:X.jsx(bA,{handleChange:d})}),h("1",f,p,"right","ltr"),h("2",p,f,"left","rtl")]})})]})}var jA={exports:{}};jA.exports=function(){var e="week",t="year";return function(n,r,o){var a=r.prototype;a.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var r=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var a=o(this).startOf(t).add(1,t).date(r),i=o(this).endOf(e);if(a.isBefore(i))return 1}var s=o(this).startOf(t).date(r).startOf(e).subtract(1,"millisecond"),l=this.diff(s,e,!0);return l<0?o(this).startOf("week").week():Math.ceil(l)},a.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}();var MA=I(jA.exports),OA={exports:{}};OA.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,a={},i=function(e){return(e=+e)+(e>68?1900:2e3)},s=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],c=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=a.meridiem;if(r){for(var o=1;o<=24;o+=1)if(e.indexOf(r(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[o,function(e){this.afternoon=u(e,!1)}],a:[o,function(e){this.afternoon=u(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,s("seconds")],ss:[r,s("seconds")],m:[r,s("minutes")],mm:[r,s("minutes")],H:[r,s("hours")],h:[r,s("hours")],HH:[r,s("hours")],hh:[r,s("hours")],D:[r,s("day")],DD:[n,s("day")],Do:[o,function(e){var t=a.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,s("month")],MM:[n,s("month")],MMM:[o,function(e){var t=c("months"),n=(c("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,s("year")],YY:[n,function(e){this.year=i(e)}],YYYY:[/\d{4}/,s("year")],Z:l,ZZ:l};function p(n){var r,o;r=n,o=a&&a.formats;for(var i=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||o[r]||e[r]||o[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=i.length,l=0;l<s;l+=1){var c=i[l],u=d[c],p=u&&u[0],f=u&&u[1];i[l]=f?{regex:p,parser:f}:c.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var o=i[n];if("string"==typeof o)r+=o.length;else{var a=o.regex,l=o.parser,c=e.slice(r),u=a.exec(c)[0];l.call(t,u),e=e.replace(u,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(i=e.parseTwoDigitYear);var r=t.prototype,o=r.parse;r.parse=function(e){var t=e.date,r=e.utc,i=e.args;this.$u=r;var s=i[1];if("string"==typeof s){var l=!0===i[2],c=!0===i[3],u=l||c,d=i[2];c&&(d=i[2]),a=this.$locale(),!l&&d&&(a=n.Ls[d]),this.$d=function(e,t,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var r=p(t)(e),o=r.year,a=r.month,i=r.day,s=r.hours,l=r.minutes,c=r.seconds,u=r.milliseconds,d=r.zone,f=new Date,m=i||(o||a?1:f.getDate()),h=o||f.getFullYear(),g=0;o&&!a||(g=a>0?a-1:f.getMonth());var v=s||0,y=l||0,A=c||0,b=u||0;return d?new Date(Date.UTC(h,g,m,v,y,A,b+60*d.offset*1e3)):n?new Date(Date.UTC(h,g,m,v,y,A,b)):new Date(h,g,m,v,y,A,b)}catch(e){return new Date("")}}(t,s,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date("")),a={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){i[1]=s[m-1];var h=n.apply(this,i);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(""))}else o.call(this,e)}}}();var CA=I(OA.exports),zA={exports:{}};zA.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,r){var o=n.prototype,a=o.format;r.en.formats=e,o.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,o){var a=o&&o.toUpperCase();return r||n[o]||e[o]||n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,void 0===n?{}:n);return a.call(this,r)}}}();var DA=I(zA.exports),TA={exports:{}};TA.exports=function(e,t,n){t.prototype.isBetween=function(e,t,r,o){var a=n(e),i=n(t),s="("===(o=o||"()")[0],l=")"===o[1];return(s?this.isAfter(a,r):!this.isBefore(a,r))&&(l?this.isBefore(i,r):!this.isAfter(i,r))||(s?this.isBefore(a,r):!this.isAfter(a,r))&&(l?this.isAfter(i,r):!this.isBefore(i,r))}};var PA=I(TA.exports);const NA=(e,t="warning")=>{let n=!1;const r=Array.isArray(e)?e.join("\n"):e;return()=>{n||(n=!0,"error"===t?console.error(r):console.warn(r))}};O.extend(CA),O.extend(DA),O.extend(PA);const kA=NA(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),BA={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},EA={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"ddd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},LA=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n"),SA=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");class IA{constructor({locale:e,formats:t,instance:n}={}){var r,o,a;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=BA,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasUTCPlugin=()=>void 0!==O.utc,this.hasTimezonePlugin=()=>void 0!==O.tz,this.isSame=(e,t,n)=>{const r=this.setTimezone(t,this.getTimezone(e));return e.format(n)===r.format(n)},this.cleanTimezone=e=>{switch(e){case"default":return;case"system":return O.tz.guess();default:return e}},this.createSystemDate=e=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(e);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const t=O.tz.guess();return"UTC"!==t?O.tz(e,t):O(e)}return O(e)},this.createUTCDate=e=>{if(!this.hasUTCPlugin())throw new Error(LA);return O.utc(e)},this.createTZDate=(e,t)=>{if(!this.hasUTCPlugin())throw new Error(LA);if(!this.hasTimezonePlugin())throw new Error(SA);const n=void 0!==e&&!e.endsWith("Z");return O(e).tz(this.cleanTimezone(t),n)},this.getLocaleFormats=()=>{const e=O.Ls;let t=e[this.locale||"en"];return void 0===t&&(kA(),t=e.en),t.formats},this.adjustOffset=e=>{if(!this.hasTimezonePlugin())return e;const t=this.getTimezone(e);if("UTC"!==t){var n,r;const o=e.tz(this.cleanTimezone(t),!0);return(null!=(n=o.$offset)?n:0)===(null!=(r=e.$offset)?r:0)?e:o}return e},this.date=e=>null===e?null:this.dayjs(e),this.dateWithTimezone=(e,t)=>{if(null===e)return null;let n;return n="UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),void 0===this.locale?n:n.locale(this.locale)},this.getTimezone=e=>{if(this.hasUTCPlugin()&&e.isUTC())return"UTC";if(this.hasTimezonePlugin()){var t;const n=null==(t=e.$x)?void 0:t.$timezone;return null!=n?n:"system"}return"system"},this.setTimezone=(e,t)=>{if(this.getTimezone(e)===t)return e;if("UTC"===t){if(!this.hasUTCPlugin())throw new Error(LA);return e.utc()}if("system"===t)return e.local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(SA)}return O.tz(e,this.cleanTimezone(t))},this.toJsDate=e=>e.toDate(),this.parseISO=e=>this.dayjs(e),this.toISO=e=>e.toISOString(),this.parse=(e,t)=>""===e?null:this.dayjs(e,t,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=e=>{const t=this.getLocaleFormats();return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,((e,n,r)=>{const o=r&&r.toUpperCase();return n||t[r]||t[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,((e,t,n)=>t||n.slice(1)))}))},this.getFormatHelperText=e=>this.expandFormat(e).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=e=>null===e,this.isValid=e=>this.dayjs(e).isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>this.dayjs(e).format(t),this.formatNumber=e=>e,this.getDiff=(e,t,n)=>e.diff(t,n),this.isEqual=(e,t)=>null===e&&null===t||this.dayjs(e).toDate().getTime()===this.dayjs(t).toDate().getTime(),this.isSameYear=(e,t)=>this.isSame(e,t,"YYYY"),this.isSameMonth=(e,t)=>this.isSame(e,t,"YYYY-MM"),this.isSameDay=(e,t)=>this.isSame(e,t,"YYYY-MM-DD"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e>t,this.isAfterYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()>t.utc():e.isAfter(t,"year"),this.isAfterDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()>t.utc():e.isAfter(t,"day"),this.isBefore=(e,t)=>e<t,this.isBeforeYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()<t.utc():e.isBefore(t,"year"),this.isBeforeDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()<t.utc():e.isBefore(t,"day"),this.isWithinRange=(e,[t,n])=>e>=t&&e<=n,this.startOfYear=e=>this.adjustOffset(e.startOf("year")),this.startOfMonth=e=>this.adjustOffset(e.startOf("month")),this.startOfWeek=e=>this.adjustOffset(e.startOf("week")),this.startOfDay=e=>this.adjustOffset(e.startOf("day")),this.endOfYear=e=>this.adjustOffset(e.endOf("year")),this.endOfMonth=e=>this.adjustOffset(e.endOf("month")),this.endOfWeek=e=>this.adjustOffset(e.endOf("week")),this.endOfDay=e=>this.adjustOffset(e.endOf("day")),this.addYears=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"year"):e.add(t,"year")),this.addMonths=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"month"):e.add(t,"month")),this.addWeeks=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"week"):e.add(t,"week")),this.addDays=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"day"):e.add(t,"day")),this.addHours=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"hour"):e.add(t,"hour")),this.addMinutes=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"minute"):e.add(t,"minute")),this.addSeconds=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"second"):e.add(t,"second")),this.getYear=e=>e.year(),this.getMonth=e=>e.month(),this.getDate=e=>e.date(),this.getHours=e=>e.hour(),this.getMinutes=e=>e.minute(),this.getSeconds=e=>e.second(),this.getMilliseconds=e=>e.millisecond(),this.setYear=(e,t)=>this.adjustOffset(e.set("year",t)),this.setMonth=(e,t)=>this.adjustOffset(e.set("month",t)),this.setDate=(e,t)=>this.adjustOffset(e.set("date",t)),this.setHours=(e,t)=>this.adjustOffset(e.set("hour",t)),this.setMinutes=(e,t)=>this.adjustOffset(e.set("minute",t)),this.setSeconds=(e,t)=>this.adjustOffset(e.set("second",t)),this.setMilliseconds=(e,t)=>this.adjustOffset(e.set("millisecond",t)),this.getDaysInMonth=e=>e.daysInMonth(),this.getNextMonth=e=>this.addMonths(e,1),this.getPreviousMonth=e=>this.addMonths(e,-1),this.getMonthArray=e=>{const t=[e.startOf("year")];for(;t.length<12;){const e=t[t.length-1];t.push(this.addMonths(e,1))}return t},this.mergeDateAndTime=(e,t)=>e.hour(t.hour()).minute(t.minute()).second(t.second()),this.getWeekdays=()=>{const e=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map((t=>this.formatByString(this.addDays(e,t),"dd")))},this.getWeekArray=e=>{const t=this.setLocaleToValue(e),n=t.startOf("month").startOf("week"),r=t.endOf("month").endOf("week");let o=0,a=n;const i=[];for(;a<r;){const e=Math.floor(o/7);i[e]=i[e]||[],i[e].push(a),a=this.addDays(a,1),o+=1}return i},this.getWeekNumber=e=>e.week(),this.getYearRange=(e,t)=>{const n=e.startOf("year"),r=t.endOf("year"),o=[];let a=n;for(;a<r;)o.push(a),a=this.addYears(a,1);return o},this.getMeridiemText=e=>"am"===e?"AM":"PM",this.rawDayJsInstance=n,this.dayjs=(o=null!=(r=this.rawDayJsInstance)?r:O,(a=e)?(...e)=>o(...e).locale(a):o),this.locale=e,this.formats=ne({},EA,t),O.extend(MA)}}const WA=["localeText"],HA=B.createContext(null);"production"!==process.env.NODE_ENV&&(HA.displayName="MuiPickersAdapterContext");const RA=function(e){var t;const{localeText:n}=e,r=Wt(e,WA),{utils:o,localeText:a}=null!=(t=B.useContext(HA))?t:{utils:void 0,localeText:void 0},i=uo({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:c,dateLibInstance:u,adapterLocale:d,localeText:p}=i,f=B.useMemo((()=>ne({},p,a,n)),[p,a,n]),m=B.useMemo((()=>{if(!l)return o||null;const e=new l({locale:d,formats:c,instance:u});if(!e.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e}),[l,d,c,u,o]),h=B.useMemo((()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null),[m]),g=B.useMemo((()=>({utils:m,defaultDates:h,localeText:f})),[h,m,f]);return X.jsx(HA.Provider,{value:g,children:s})};"production"!==process.env.NODE_ENV&&(RA.propTypes={adapterLocale:Pe.any,children:Pe.node,dateAdapter:Pe.func,dateFormats:Pe.shape({dayOfMonth:Pe.string,fullDate:Pe.string,fullDateTime:Pe.string,fullDateTime12h:Pe.string,fullDateTime24h:Pe.string,fullDateWithWeekday:Pe.string,fullTime:Pe.string,fullTime12h:Pe.string,fullTime24h:Pe.string,hours12h:Pe.string,hours24h:Pe.string,keyboardDate:Pe.string,keyboardDateTime:Pe.string,keyboardDateTime12h:Pe.string,keyboardDateTime24h:Pe.string,meridiem:Pe.string,minutes:Pe.string,month:Pe.string,monthAndDate:Pe.string,monthAndYear:Pe.string,monthShort:Pe.string,normalDate:Pe.string,normalDateWithWeekday:Pe.string,seconds:Pe.string,shortDate:Pe.string,weekday:Pe.string,weekdayShort:Pe.string,year:Pe.string}),dateLibInstance:Pe.any,localeText:Pe.object});const VA=(e,t)=>e.length===t.length&&t.every((t=>e.includes(t))),YA=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},FA=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r},XA=(e,t,n)=>"date"===n?e.startOfDay(e.dateWithTimezone(void 0,t)):e.dateWithTimezone(void 0,t),QA=(e,t)=>{const n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},ZA=["hours","minutes","seconds"],GA=e=>ZA.includes(e),UA=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,qA=(e,t,n)=>{if(n){if((e>=12?"pm":"am")!==t)return"am"===t?e-12:e+12}return e},KA=(e,t,n,r)=>{const o=qA(r.getHours(e),t,n);return r.setHours(e,o)},JA=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),_A=(e,t)=>(n,r)=>e?t.isAfter(n,r):JA(n,t)>JA(r,t),$A=(e,{format:t,views:n,ampm:r})=>{if(null!=t)return t;const o=e.formats;return VA(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:VA(n,["minutes"])?o.minutes:VA(n,["seconds"])?o.seconds:VA(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:VA(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`},eb={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},tb=(e,t,n)=>{if(t===eb.year)return e.startOfYear(n);if(t===eb.month)return e.startOfMonth(n);if(t===eb.day)return e.startOfDay(n);let r=n;return t<eb.minutes&&(r=e.setMinutes(r,0)),t<eb.seconds&&(r=e.setSeconds(r,0)),t<eb.milliseconds&&(r=e.setMilliseconds(r,0)),r},nb=(e,t)=>{const n=e.formatTokenMap[t];if(null==n)throw new Error([`MUI: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join("\n"));return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},rb=(e,t,n)=>{const r=[],o=e.dateWithTimezone(void 0,t),a=e.startOfWeek(o),i=e.endOfWeek(o);let s=a;for(;e.isBefore(s,i);)r.push(s),s=e.addDays(s,1);return r.map((t=>e.formatByString(t,n)))},ob=(e,t,n,r)=>{switch(n){case"month":return YA(e,e.dateWithTimezone(void 0,t)).map((t=>e.formatByString(t,r)));case"weekDay":return rb(e,t,r);case"meridiem":{const n=e.dateWithTimezone(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map((t=>e.formatByString(t,r)))}default:return[]}},ab=(e,t,n)=>{let r=t;for(r=Number(r).toString();r.length<n;)r=`0${r}`;return r},ib=(e,t,n,r,o)=>{if("production"!==process.env.NODE_ENV&&"day"!==o.type&&"digit-with-letter"===o.contentType)throw new Error([`MUI: The token "${o.format}" is a digit format with letter in it.'\n This type of format is only supported for 'day' sections`].join("\n"));if("day"===o.type&&"digit-with-letter"===o.contentType){const t=e.setDate(r.longestMonth,n);return e.formatByString(t,o.format)}const a=n.toString();return o.hasLeadingZerosInInput?ab(0,a,o.maxLength):a},sb=(e,t,n,r,o,a,i)=>{const s=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}})(r),l="Home"===r,c="End"===r,u=""===n.value||l||c;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{const r=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),d=t=>ib(e,0,t,r,n),p="minutes"===n.type&&null!=i&&i.minutesStep?i.minutesStep:1;let f=parseInt(n.value,10)+s*p;if(u){if("year"===n.type&&!c&&!l)return e.formatByString(e.dateWithTimezone(void 0,t),n.format);f=s>0||l?r.minimum:r.maximum}return f%p!=0&&((s<0||l)&&(f+=p-(p+f)%p),(s>0||c)&&(f-=f%p)),f>r.maximum?d(r.minimum+(f-r.maximum-1)%(r.maximum-r.minimum+1)):f<r.minimum?d(r.maximum-(r.minimum-f-1)%(r.maximum-r.minimum+1)):d(f)})():(()=>{const r=ob(e,t,n.type,n.format);if(0===r.length)return n.value;if(u)return s>0||l?r[0]:r[r.length-1];const o=r.indexOf(n.value);return r[(o+r.length+s)%r.length]})()},lb=(e,t)=>{let n=e.value||e.placeholder;const r="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(n=Number(n).toString());return["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!r&&1===n.length&&(n=`${n}`),"input-rtl"===t&&(n=`${n}`),n},cb=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),ub=(e,t)=>{let n=0,r=t?1:0;const o=[];for(let a=0;a<e.length;a+=1){const i=e[a],s=lb(i,t?"input-rtl":"input-ltr"),l=`${i.startSeparator}${s}${i.endSeparator}`,c=cb(l).length,u=l.length,d=cb(s),p=r+s.indexOf(d[0])+i.startSeparator.length,f=p+d.length;o.push(ne({},i,{start:n,end:n+c,startInInput:p,endInInput:f})),n+=c,r+=u}return o},db=(e,t,n,r,o)=>{switch(r.type){case"year":return n.fieldYearPlaceholder({digitAmount:e.formatByString(e.dateWithTimezone(void 0,t),o).length});case"month":return n.fieldMonthPlaceholder({contentType:r.contentType});case"day":return n.fieldDayPlaceholder();case"weekDay":return n.fieldWeekDayPlaceholder({contentType:r.contentType});case"hours":return n.fieldHoursPlaceholder();case"minutes":return n.fieldMinutesPlaceholder();case"seconds":return n.fieldSecondsPlaceholder();case"meridiem":return n.fieldMeridiemPlaceholder();default:return o}},pb=(e,t,n,r)=>{if("production"!==process.env.NODE_ENV&&"weekDay"===nb(e,n).type)throw new Error("changeSectionValueFormat doesn't support week day formats");return e.formatByString(e.parse(t,n),r)},fb=(e,t,n)=>4===e.formatByString(e.dateWithTimezone(void 0,t),n).length,mb=(e,t,n,r,o)=>{if("digit"!==n)return!1;const a=e.dateWithTimezone(void 0,t);switch(r){case"year":if(fb(e,t,o)){return"0001"===e.formatByString(e.setYear(a,1),o)}return"01"===e.formatByString(e.setYear(a,2001),o);case"month":return e.formatByString(e.startOfYear(a),o).length>1;case"day":return e.formatByString(e.startOfMonth(a),o).length>1;case"weekDay":return e.formatByString(e.startOfWeek(a),o).length>1;case"hours":return e.formatByString(e.setHours(a,1),o).length>1;case"minutes":case"seconds":return e.formatByString(e.setMinutes(a,1),o).length>1;default:throw new Error("Invalid section type")}},hb=(e,t,n,r,o,a,i,s)=>{let l="";const c=[],u=e.date(),d=r=>{if(""===r)return null;const a=nb(e,r),s=mb(e,t,a.contentType,a.type,r),d=i?s:"digit"===a.contentType,p=null!=o&&e.isValid(o);let f=p?e.formatByString(o,r):"",m=null;if(d)if(s)m=""===f?e.formatByString(u,r).length:f.length;else{if(null==a.maxLength)throw new Error(`MUI: The token ${r} should have a 'maxDigitNumber' property on it's adapter`);m=a.maxLength,p&&(f=ab(0,f,m))}return c.push(ne({},a,{format:r,maxLength:m,value:f,placeholder:db(e,t,n,a,r),hasLeadingZeros:s,hasLeadingZerosInFormat:s,hasLeadingZerosInInput:d,startSeparator:0===c.length?l:"",endSeparator:"",modified:!1})),null};let p=10,f=r,m=e.expandFormat(r);for(;m!==f;)if(f=m,m=e.expandFormat(f),p-=1,p<0)throw new Error("MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component");const h=m,g=((e,t)=>{const n=[],{start:r,end:o}=e.escapedCharacters,a=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let i=null;for(;i=a.exec(t);)n.push({start:i.index,end:a.lastIndex-1});return n})(e,h),v=new RegExp(`^(${Object.keys(e.formatTokenMap).join("|")})`);let y="";for(let e=0;e<h.length;e+=1){const t=g.find((t=>t.start<=e&&t.end>=e)),n=h[e],r=null!=t,o=`${y}${h.slice(e)}`;if(!r&&n.match(/([A-Za-z]+)/)&&v.test(o))y+=n;else{r&&(null==t?void 0:t.start)===e||(null==t?void 0:t.end)===e||(d(y),y="",0===c.length?l+=n:c[c.length-1].endSeparator+=n)}}return d(y),c.map((e=>{const t=e=>{let t=e;return s&&null!==t&&t.includes(" ")&&(t=`${t}`),"spacious"===a&&["/",".","-"].includes(t)&&(t=` ${t} `),t};return e.startSeparator=t(e.startSeparator),e.endSeparator=t(e.endSeparator),e}))},gb=(e,t)=>{const n=t.some((e=>"day"===e.type)),r=[],o=[];for(let e=0;e<t.length;e+=1){const a=t[e];n&&"weekDay"===a.type||(r.push(a.format),o.push(lb(a,"non-input")))}const a=r.join(" "),i=o.join(" ");return e.parse(i,a)};let vb=!1;const yb=(e,t)=>{if("production"!==process.env.NODE_ENV&&!vb){const n=[];["date","date-time"].includes(t)&&n.push("weekDay","day","month","year"),["time","date-time"].includes(t)&&n.push("hours","minutes","seconds","meridiem");const r=e.find((e=>!n.includes(e.type)));r&&(console.warn(`MUI: The field component you are using is not compatible with the "${r.type} date section.`,`The supported date sections are ["${n.join('", "')}"]\`.`),vb=!0)}},Ab={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8},bb=(e,t,n,r,o,a)=>[...r].sort(((e,t)=>Ab[e.type]-Ab[t.type])).reduce(((r,o)=>!a||o.modified?((e,t,n,r,o)=>{switch(n.type){case"year":return e.setYear(o,e.getYear(r));case"month":return e.setMonth(o,e.getMonth(r));case"weekDay":{const o=rb(e,t,n.format),a=e.formatByString(r,n.format),i=o.indexOf(a),s=o.indexOf(n.value)-i;return e.addDays(r,s)}case"day":return e.setDate(o,e.getDate(r));case"meridiem":{const t=e.getHours(r)<12,n=e.getHours(o);return t&&n>=12?e.addHours(o,-12):!t&&n<12?e.addHours(o,12):o}case"hours":return e.setHours(o,e.getHours(r));case"minutes":return e.setMinutes(o,e.getMinutes(r));case"seconds":return e.setSeconds(o,e.getSeconds(r));default:return o}})(e,t,o,n,r):r),o),xb=["value","referenceDate"],wb={emptyValue:null,getTodayValue:XA,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Wt(e,xb);return null!=t&&r.utils.isValid(t)?t:null!=n?n:(({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{var a;let i=o?o():tb(t,n,XA(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,i)&&(i=tb(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,i)&&(i=tb(t,n,e.maxDate));const s=_A(null!=(a=e.disableIgnoringDatePartForTimeValidation)&&a,t);return null!=e.minTime&&s(e.minTime,i)&&(i=tb(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:FA(t,i,e.minTime))),null!=e.maxTime&&s(i,e.maxTime)&&(i=tb(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:FA(t,i,e.maxTime))),i})(r)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},jb={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,r,o)=>!e.isValid(t)&&!!n?n:ub(o(t),r),getValueStrFromSections:(e,t)=>{const n=e.map((e=>{const n=lb(e,t?"input-rtl":"input-ltr");return`${e.startSeparator}${n}${e.endSeparator}`})).join("");return t?`${n}`:n},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},Mb={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>`Select ${e}. ${null===t?"No time selected":`Selected time is ${n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?`Choose date, selected date is ${t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?`Choose time, selected time is ${t.format(e,"fullTime")}`:"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},Ob=Mb;ne({},Mb);const Cb=()=>{const e=B.useContext(HA);if(null===e)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.utils)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=B.useMemo((()=>ne({},Ob,e.localeText)),[e.localeText]);return B.useMemo((()=>ne({},e,{localeText:t})),[e,t])},zb=()=>Cb().utils,Db=()=>Cb().localeText,Tb=e=>{const t=zb(),n=B.useRef();return void 0===n.current&&(n.current=t.dateWithTimezone(void 0,e)),n.current};function Pb(e,t,n,r){const{value:o,onError:a}=e,i=Cb(),s=B.useRef(r),l=t({adapter:i,value:o,props:e});return B.useEffect((()=>{a&&!n(l,s.current)&&a(l,o),s.current=l}),[n,a,s,l,o]),l}const Nb=({timezone:e,value:t,defaultValue:n,onChange:r,valueManager:o})=>{var a,i;const s=zb(),l=B.useRef(n),c=null!=(a=null!=t?t:l.current)?a:o.emptyValue,u=B.useMemo((()=>o.getTimezone(s,c)),[s,o,c]),d=lt((e=>null==u?e:o.setTimezone(s,u,e))),p=null!=(i=null!=e?e:u)?i:"default";return{value:B.useMemo((()=>o.setTimezone(s,p,c)),[o,s,p,c]),handleValueChange:lt(((e,...t)=>{const n=d(e);null==r||r(n,...t)})),timezone:p}},kb=({name:e,timezone:t,value:n,defaultValue:r,onChange:o,valueManager:a})=>{const[i,s]=st({name:e,state:"value",controlled:n,default:null!=r?r:a.emptyValue}),l=lt(((e,...t)=>{s(e),null==o||o(e,...t)}));return Nb({timezone:t,value:i,defaultValue:void 0,onChange:l,valueManager:a})},Bb=e=>{const t=zb(),n=Db(),r=Cb(),o="rtl"===co().direction,{valueManager:a,fieldValueManager:i,valueType:s,validator:l,internalProps:c,internalProps:{value:u,defaultValue:d,referenceDate:p,onChange:f,format:m,formatDensity:h="dense",selectedSections:g,onSelectedSectionsChange:v,shouldRespectLeadingZeros:y=!1,timezone:A}}=e,{timezone:b,value:x,handleValueChange:w}=Nb({timezone:A,value:u,defaultValue:d,onChange:f,valueManager:a}),j=B.useMemo((()=>((e,t)=>{const n=e.dateWithTimezone(void 0,t),r=e.endOfYear(n),o=e.endOfDay(n),{maxDaysInMonth:a,longestMonth:i}=YA(e,n).reduce(((t,n)=>{const r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t}),{maxDaysInMonth:0,longestMonth:null});return{year:({format:n})=>({minimum:0,maximum:fb(e,t,n)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(r)+1}),day:({currentDate:t})=>({minimum:1,maximum:null!=t&&e.isValid(t)?e.getDaysInMonth(t):a,longestMonth:i}),weekDay:({format:n,contentType:r})=>{if("digit"===r){const r=rb(e,t,n).map(Number);return{minimum:Math.min(...r),maximum:Math.max(...r)}}return{minimum:1,maximum:7}},hours:({format:t})=>{const r=e.getHours(o);return e.formatByString(e.endOfDay(n),t)!==r.toString()?{minimum:1,maximum:Number(e.formatByString(e.startOfDay(n),t))}:{minimum:0,maximum:r}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:0})}})(t,b)),[t,b]),M=B.useCallback(((e,r=null)=>i.getSectionsFromValue(t,e,r,o,(e=>hb(t,b,n,m,e,h,y,o)))),[i,m,n,o,y,t,h,b]),O=B.useMemo((()=>i.getValueStrFromSections(M(a.emptyValue),o)),[i,M,a.emptyValue,o]),[C,z]=B.useState((()=>{const e=M(x);yb(e,s);const n={sections:e,value:x,referenceValue:a.emptyValue,tempValueStrAndroid:null},r=(e=>Math.max(...e.map((e=>{var t;return null!=(t=eb[e.type])?t:1}))))(e);return ne({},n,{referenceValue:a.getInitialReferenceValue({referenceDate:p,value:x,utils:t,props:c,granularity:r,timezone:b})})})),[D,T]=st({controlled:g,default:null,name:"useField",state:"selectedSectionIndexes"}),P=e=>{T(e),null==v||v(e),z((e=>ne({},e,{selectedSectionQuery:null})))},N=B.useMemo((()=>{if(null==D)return null;if("all"===D)return{startIndex:0,endIndex:C.sections.length-1,shouldSelectBoundarySelectors:!0};if("number"==typeof D)return{startIndex:D,endIndex:D};if("string"==typeof D){const e=C.sections.findIndex((e=>e.type===D));return{startIndex:e,endIndex:e}}return D}),[D,C.sections]),k=({value:e,referenceValue:t,sections:n})=>{z((r=>ne({},r,{sections:n,value:e,referenceValue:t,tempValueStrAndroid:null})));const o={validationError:l({adapter:r,value:e,props:ne({},c,{value:e,timezone:b})})};w(e,o)},E=(e,t)=>{const n=[...C.sections];return n[e]=ne({},n[e],{value:t,modified:!0}),ub(n,o)};return B.useEffect((()=>{const e=M(C.value);yb(e,s),z((t=>ne({},t,{sections:e})))}),[m,t.locale]),B.useEffect((()=>{let e=!1;e=!a.areValuesEqual(t,C.value,x)||a.getTimezone(t,C.value)!==a.getTimezone(t,x),e&&z((e=>ne({},e,{value:x,referenceValue:i.updateReferenceValue(t,x,e.referenceValue),sections:M(x)})))}),[x]),{state:C,selectedSectionIndexes:N,setSelectedSections:P,clearValue:()=>{a.areValuesEqual(t,C.value,a.emptyValue)||k({value:a.emptyValue,referenceValue:C.referenceValue,sections:M(a.emptyValue)})},clearActiveSection:()=>{if(null==N)return;const e=C.sections[N.startIndex];if(""===e.value)return;const n=i.getActiveDateManager(t,C,e),r=1===n.getSections(C.sections).filter((e=>""!==e.value)).length,o=E(N.startIndex,""),a=r?null:t.date(new Date("")),s=n.getNewValuesFromNewActiveDate(a);(null!=a&&!t.isValid(a))!=(null!=n.date&&!t.isValid(n.date))?k(ne({},s,{sections:o})):z((e=>ne({},e,s,{sections:o,tempValueStrAndroid:null})))},updateSectionValue:({activeSection:e,newSectionValue:n,shouldGoToNextSection:r})=>{r&&N&&N.startIndex<C.sections.length-1?P(N.startIndex+1):N&&N.startIndex!==N.endIndex&&P(N.startIndex);const o=i.getActiveDateManager(t,C,e),a=E(N.startIndex,n),s=o.getSections(a);let l,c,u=gb(t,s),d=!1;if(!t.isValid(u)){const e=((e,t,n,r)=>{if(!n.every((e=>"weekDay"===e.type||""!==e.value))||!n.some((e=>"day"===e.type)))return null;const o=n.map((t=>{if("day"!==t.type)return t;const n=r.day({currentDate:null,format:t.format,contentType:t.contentType});return ne({},t,{value:ib(e,0,n.minimum,n,t)})})),a=gb(e,o);return null!=a&&e.isValid(a)?n.map((e=>{if("day"!==e.type)return e;const t=r.day({currentDate:a,format:e.format,contentType:e.contentType});return Number(e.value)<=t.maximum?e:ne({},e,{value:t.maximum.toString()})})):null})(t,0,s,j);null!=e&&(d=!0,u=gb(t,e))}if(null!=u&&t.isValid(u)){const e=bb(t,b,u,s,o.referenceDate,!0);l=o.getNewValuesFromNewActiveDate(e),c=!0}else l=o.getNewValuesFromNewActiveDate(u),c=(null!=u&&!t.isValid(u))!=(null!=o.date&&!t.isValid(o.date));const p=d?M(l.value,C.sections):a;return c?k(ne({},l,{sections:p})):z((e=>ne({},e,l,{sections:p,tempValueStrAndroid:null})))},updateValueFromValueStr:e=>{const r=i.parseValueStr(e,C.referenceValue,((e,r)=>{const a=t.parse(e,m);if(null==a||!t.isValid(a))return null;const i=hb(t,b,n,m,a,h,y,o);return bb(t,b,a,i,r,!1)})),a=i.updateReferenceValue(t,r,C.referenceValue);k({value:r,referenceValue:a,sections:M(r,C.sections)})},setTempAndroidValueStr:e=>z((t=>ne({},t,{tempValueStrAndroid:e}))),sectionsValueBoundaries:j,placeholder:O,timezone:b}},Eb=e=>null!=e.saveQuery,Lb=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,setTempAndroidValueStr:r,timezone:o})=>{const a=zb(),[i,s]=B.useState(null),l=lt((()=>s(null)));B.useEffect((()=>{var t;null!=i&&(null==(t=e[i.sectionIndex])?void 0:t.type)!==i.sectionType&&l()}),[e,i,l]),B.useEffect((()=>{if(null!=i){const e=setTimeout((()=>l()),5e3);return()=>{window.clearTimeout(e)}}return()=>{}}),[i,l]);const c=({keyPressed:t,sectionIndex:n},r,o)=>{const a=t.toLowerCase(),c=e[n];if(null!=i&&(!o||o(i.value))&&i.sectionIndex===n){const e=`${i.value}${a}`,t=r(e,c);if(!Eb(t))return s({sectionIndex:n,value:e,sectionType:c.type}),t}const u=r(a,c);return Eb(u)&&!u.saveQuery?(l(),null):(s({sectionIndex:n,value:a,sectionType:c.type}),Eb(u)?null:u)};return{applyCharacterEditing:lt((i=>{const s=e[i.sectionIndex],l=!Number.isNaN(Number(i.keyPressed))?(e=>{const t=(e,t)=>{const r=Number(`${e}`),o=n[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(r>o.maximum)return{saveQuery:!1};if(r<o.minimum)return{saveQuery:!0};const i=Number(`${e}0`)>o.maximum||e.length===o.maximum.toString().length;return{sectionValue:ib(a,0,r,o,t),shouldGoToNextSection:i}};return c(e,((e,n)=>{if("digit"===n.contentType||"digit-with-letter"===n.contentType)return t(e,n);if("month"===n.type){const r=mb(a,o,"digit","month","MM"),i=t(e,{type:n.type,format:"MM",hasLeadingZerosInFormat:r,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});return Eb(i)?i:ne({},i,{sectionValue:pb(a,i.sectionValue,"MM",n.format)})}if("weekDay"===n.type){const r=t(e,n);return Eb(r)?r:ne({},r,{sectionValue:rb(a,o,n.format)[Number(r.sectionValue)-1]})}return{saveQuery:!1}}),(e=>!Number.isNaN(Number(e))))})(i):(e=>{const t=(e,t,n)=>{const r=t.filter((e=>e.toLowerCase().startsWith(n)));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},n=(e,n,r,i)=>{const s=e=>ob(a,o,n.type,e);if("letter"===n.contentType)return t(n.format,s(n.format),e);if(r&&null!=i&&"letter"===nb(a,r).contentType){const n=s(r),o=t(0,n,e);return Eb(o)?{saveQuery:!1}:ne({},o,{sectionValue:i(o.sectionValue,n)})}return{saveQuery:!1}};return c(e,((e,t)=>{switch(t.type){case"month":{const r=e=>pb(a,e,a.formats.month,t.format);return n(e,t,a.formats.month,r)}case"weekDay":{const r=(e,t)=>t.indexOf(e).toString();return n(e,t,a.formats.weekday,r)}case"meridiem":return n(e,t);default:return{saveQuery:!1}}}))})(i);null==l?r(null):t({activeSection:s,newSectionValue:l.sectionValue,shouldGoToNextSection:l.shouldGoToNextSection})})),resetCharacterQuery:l}};function Sb(e,t){return Array.isArray(t)?t.every((t=>-1!==e.indexOf(t))):-1!==e.indexOf(t)}const Ib=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Ib(t.shadowRoot):t:null},Wb="@media (pointer: fine)",Hb=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error"],Rb=e=>{const t=zb(),{state:n,selectedSectionIndexes:r,setSelectedSections:o,clearValue:a,clearActiveSection:i,updateSectionValue:s,updateValueFromValueStr:l,setTempAndroidValueStr:c,sectionsValueBoundaries:u,placeholder:d,timezone:p}=Bb(e),{inputRef:f,internalProps:m,internalProps:{readOnly:h=!1,unstableFieldRef:g,minutesStep:v},forwardedProps:{onClick:y,onKeyDown:A,onFocus:b,onBlur:x,onMouseUp:w,onPaste:j,error:M},fieldValueManager:O,valueManager:C,validator:z}=e,D=Wt(e.forwardedProps,Hb),{applyCharacterEditing:T,resetCharacterQuery:P}=Lb({sections:n.sections,updateSectionValue:s,sectionsValueBoundaries:u,setTempAndroidValueStr:c,timezone:p}),N=B.useRef(null),k=ct(f,N),E=B.useRef(void 0),L="rtl"===co().direction,S=B.useMemo((()=>((e,t)=>{const n={};if(!t)return e.forEach(((t,r)=>{const o=0===r?null:r-1,a=r===e.length-1?null:r+1;n[r]={leftIndex:o,rightIndex:a}})),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let a=0,i=0,s=e.length-1;for(;s>=0;){i=e.findIndex(((e,t)=>{var n;return t>=a&&(null==(n=e.endSeparator)?void 0:n.includes(" "))&&" / "!==e.endSeparator})),-1===i&&(i=e.length-1);for(let e=i;e>=a;e-=1)o[e]=s,r[s]=e,s-=1;a=i+1}return e.forEach(((t,a)=>{const i=o[a],s=0===i?null:r[i-1],l=i===e.length-1?null:r[i+1];n[a]={leftIndex:s,rightIndex:l}})),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(n.sections,L)),[n.sections,L]),I=()=>{var e;if(h)return void o(null);const t=null!=(e=N.current.selectionStart)?e:0;let r;r=t<=n.sections[0].startInInput||t>=n.sections[n.sections.length-1].endInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>t));const a=-1===r?n.sections.length-1:r-1;o(a)},W=lt(((...e)=>{null==y||y(...e),I()})),H=lt((e=>{null==w||w(e),e.preventDefault()})),R=lt(((...e)=>{null==b||b(...e);const t=N.current;window.clearTimeout(E.current),E.current=setTimeout((()=>{t&&t===N.current&&(null!=r||h||(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?o("all"):I()))}))})),V=lt(((...e)=>{null==x||x(...e),o(null)})),Y=lt((e=>{if(null==j||j(e),h)return void e.preventDefault();const t=e.clipboardData.getData("text");if(r&&r.startIndex===r.endIndex){const o=n.sections[r.startIndex],a=/^[a-zA-Z]+$/.test(t),i=/^[0-9]+$/.test(t),s=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===o.contentType&&a||"digit"===o.contentType&&i||"digit-with-letter"===o.contentType&&s)return;if(a||i)return void e.preventDefault()}e.preventDefault(),P(),l(t)})),F=lt((e=>{if(h)return;const t=e.target.value,o=e.nativeEvent.data,a=o&&o.length>1,i=a?o:t,s=cb(i);if(null==r||a)return void l(a?o:s);let u;if(0===r.startIndex&&r.endIndex===n.sections.length-1&&1===s.length)u=s;else{const e=cb(O.getValueStrFromSections(n.sections,L));let t=-1,o=-1;for(let n=0;n<e.length;n+=1)-1===t&&e[n]!==s[n]&&(t=n),-1===o&&e[e.length-n-1]!==s[s.length-n-1]&&(o=n);const a=n.sections[r.startIndex];if(t<a.start||e.length-o-1>a.end)return;const i=s.length-e.length+a.end-cb(a.endSeparator||"").length;u=s.slice(a.start+cb(a.startSeparator||"").length,i)}navigator.userAgent.toLowerCase().indexOf("android")>-1&&0===u.length?c(i):T({keyPressed:u,sectionIndex:r.startIndex})})),X=lt((e=>{switch(null==A||A(e),!0){case"a"===e.key&&(e.ctrlKey||e.metaKey):e.preventDefault(),o("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==r)o(S.startIndex);else if(r.startIndex!==r.endIndex)o(r.endIndex);else{const e=S.neighbors[r.startIndex].rightIndex;null!==e&&o(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==r)o(S.endIndex);else if(r.startIndex!==r.endIndex)o(r.startIndex);else{const e=S.neighbors[r.startIndex].leftIndex;null!==e&&o(e)}break;case["Backspace","Delete"].includes(e.key):if(e.preventDefault(),h)break;null==r||0===r.startIndex&&r.endIndex===n.sections.length-1?a():i(),P();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),h||null==r)break;const o=n.sections[r.startIndex],a=O.getActiveDateManager(t,n,o),i=sb(t,p,o,e.key,u,a.date,{minutesStep:v});s({activeSection:o,newSectionValue:i,shouldGoToNextSection:!1});break}}}));nt((()=>{if(!N.current)return;if(null==r)return void(N.current.scrollLeft&&(N.current.scrollLeft=0));const e=n.sections[r.startIndex],t=n.sections[r.endIndex];let o=e.startInInput,a=t.endInInput;if(r.shouldSelectBoundarySelectors&&(o-=e.startSeparator.length,a+=t.endSeparator.length),o!==N.current.selectionStart||a!==N.current.selectionEnd){const e=N.current.scrollTop;N.current===Ib(document)&&N.current.setSelectionRange(o,a),N.current.scrollTop=e}}));const Q=Pb(ne({},m,{value:n.value,timezone:p}),z,C.isSameError,C.defaultErrorState),Z=B.useMemo((()=>void 0!==M?M:C.hasError(Q)),[C,Q,M]);B.useEffect((()=>{Z||r||P()}),[n.referenceValue,r,Z]),B.useEffect((()=>(N.current&&N.current===document.activeElement&&o("all"),()=>window.clearTimeout(E.current))),[]),B.useEffect((()=>{null!=n.tempValueStrAndroid&&null!=r&&(P(),i())}),[n.tempValueStrAndroid]);const G=B.useMemo((()=>{var e;return null!=(e=n.tempValueStrAndroid)?e:O.getValueStrFromSections(n.sections,L)}),[n.sections,O,n.tempValueStrAndroid,L]),U=B.useMemo((()=>null==r||"letter"===n.sections[r.startIndex].contentType?"text":"numeric"),[r,n.sections]),q=!(N.current&&N.current===Ib(document))&&C.areValuesEqual(t,n.value,C.emptyValue);return B.useImperativeHandle(g,(()=>({getSections:()=>n.sections,getActiveSectionIndex:()=>{var e,t;const r=null!=(e=N.current.selectionStart)?e:0,o=null!=(t=N.current.selectionEnd)?t:0;if(0===r&&0===o)return null;const a=r<=n.sections[0].startInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>r));return-1===a?n.sections.length-1:a-1},setSelectedSections:e=>o(e)}))),ne({placeholder:d,autoComplete:"off"},D,{value:q?"":G,inputMode:U,readOnly:h,onClick:W,onFocus:R,onBlur:V,onPaste:Y,onChange:F,onKeyDown:X,onMouseUp:H,error:Z,ref:k})},Vb=({adapter:e,value:t,props:n})=>{if(null===t)return null;const{minTime:r,maxTime:o,minutesStep:a,shouldDisableClock:i,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u,timezone:d}=n,p=e.utils.dateWithTimezone(void 0,d),f=_A(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case Boolean(r&&f(r,t)):return"minTime";case Boolean(o&&f(t,o)):return"maxTime";case Boolean(u&&e.utils.isAfter(t,p)):return"disableFuture";case Boolean(c&&e.utils.isBefore(t,p)):return"disablePast";case Boolean(s&&s(t,"hours")):return"shouldDisableTime-hours";case Boolean(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case Boolean(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case Boolean(i&&i(e.utils.getHours(t),"hours")):return"shouldDisableClock-hours";case Boolean(i&&i(e.utils.getMinutes(t),"minutes")):return"shouldDisableClock-minutes";case Boolean(i&&i(e.utils.getSeconds(t),"seconds")):return"shouldDisableClock-seconds";case Boolean(a&&e.utils.getMinutes(t)%a!=0):return"minutesStep";default:return null}},Yb=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],Fb=["disablePast","disableFuture","minTime","maxTime","shouldDisableClock","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],Xb=["minDateTime","maxDateTime"],Qb=[...Yb,...Fb,...Xb],Zb=e=>Qb.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{}),Gb=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],Ub=({props:e,inputRef:t})=>{const n=(e=>{var t,n,r,o;const a=zb(),i=(null!=(t=e.ampm)?t:a.is12HourCycleInCurrentLocale())?a.formats.fullTime12h:a.formats.fullTime24h;return ne({},e,{disablePast:null!=(n=e.disablePast)&&n,disableFuture:null!=(r=e.disableFuture)&&r,format:null!=(o=e.format)?o:i})})(e),{forwardedProps:r,internalProps:o}=((e,t)=>{const n=ne({},e),r={},o=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return Gb.forEach(o),"date"===t?Yb.forEach(o):"time"===t?Fb.forEach(o):"date-time"===t&&(Yb.forEach(o),Fb.forEach(o),Xb.forEach(o)),{forwardedProps:n,internalProps:r}})(n,"time");return Rb({inputRef:t,forwardedProps:r,internalProps:o,valueManager:wb,fieldValueManager:jb,validator:Vb,valueType:"time"})},qb=["slots","slotProps","components","componentsProps","InputProps","inputProps"],Kb=["inputRef"],Jb=["ref","onPaste","onKeyDown","inputMode","readOnly"],_b=B.forwardRef((function(e,t){var n,r,o;const a=uo({props:e,name:"MuiTimeField"}),{slots:i,slotProps:s,components:l,componentsProps:c,InputProps:u,inputProps:d}=a,p=Wt(a,qb),f=a,m=null!=(n=null!=(r=null==i?void 0:i.textField)?r:null==l?void 0:l.TextField)?n:Qd,h=ko({elementType:m,externalSlotProps:null!=(o=null==s?void 0:s.textField)?o:null==c?void 0:c.textField,externalForwardedProps:p,ownerState:f}),{inputRef:g}=h,v=Wt(h,Kb);v.inputProps=ne({},d,v.inputProps),v.InputProps=ne({},u,v.InputProps);const y=Ub({props:v,inputRef:g}),{ref:A,onPaste:b,onKeyDown:x,inputMode:w,readOnly:j}=y,M=Wt(y,Jb);return X.jsx(m,ne({ref:t},M,{InputProps:ne({},M.InputProps,{readOnly:j}),inputProps:ne({},M.inputProps,{inputMode:w,onPaste:b,onKeyDown:x,ref:A})}))}));function $b(e){return Et("MuiPickersToolbarText",e)}"production"!==process.env.NODE_ENV&&(_b.propTypes={ampm:Pe.bool,autoFocus:Pe.bool,className:Pe.string,color:Pe.oneOf(["error","info","primary","secondary","success","warning"]),component:Pe.elementType,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disablePast:Pe.bool,focused:Pe.bool,format:Pe.string,formatDensity:Pe.oneOf(["dense","spacious"]),FormHelperTextProps:Pe.object,fullWidth:Pe.bool,helperText:Pe.node,hiddenLabel:Pe.bool,id:Pe.string,InputLabelProps:Pe.object,inputProps:Pe.object,InputProps:Pe.object,inputRef:Pe.oneOfType([Pe.func,Pe.shape({current:Pe.any.isRequired})]),label:Pe.node,margin:Pe.oneOf(["dense","none","normal"]),maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,name:Pe.string,onBlur:Pe.func,onChange:Pe.func,onClick:Pe.func,onError:Pe.func,onFocus:Pe.func,onSelectedSectionsChange:Pe.func,readOnly:Pe.bool,referenceDate:Pe.any,required:Pe.bool,selectedSections:Pe.oneOfType([Pe.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),Pe.number,Pe.shape({endIndex:Pe.number.isRequired,startIndex:Pe.number.isRequired})]),shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,shouldRespectLeadingZeros:Pe.bool,size:Pe.oneOf(["medium","small"]),slotProps:Pe.object,slots:Pe.object,style:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),timezone:Pe.string,unstableFieldRef:Pe.oneOfType([Pe.func,Pe.object]),value:Pe.any,variant:Pe.oneOf(["filled","outlined","standard"])});const ex=Lt("MuiPickersToolbarText",["root","selected"]),tx=["className","selected","value"],nx=mo(Cf,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${ex.selected}`]:t.selected}]})((({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${ex.selected}`]:{color:(e.vars||e).palette.text.primary}}))),rx=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiPickersToolbarText"}),{className:r,value:o}=n,a=Wt(n,tx),i=(e=>{const{classes:t,selected:n}=e;return Pt({root:["root",n&&"selected"]},$b,t)})(n);return X.jsx(nx,ne({ref:t,className:Jn(r,i.root),component:"span"},a,{children:o}))}));function ox(e){return Et("MuiButton",e)}var ax=Lt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const ix=B.createContext({});"production"!==process.env.NODE_ENV&&(ix.displayName="ButtonGroupContext");var sx=ix;const lx=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],cx=e=>ne({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),ux=mo(xp,{shouldForwardProp:e=>po(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ue(n.color)}`],t[`size${Ue(n.size)}`],t[`${n.variant}Size${Ue(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],a="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return ne({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":ne({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:vr(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vr(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vr(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":ne({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${ax.focusVisible}`]:ne({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${ax.disabled}`]:ne({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${vr(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ax.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ax.disabled}`]:{boxShadow:"none"}})),dx=mo("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Ue(n.size)}`]]}})((({ownerState:e})=>ne({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},cx(e)))),px=mo("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Ue(n.size)}`]]}})((({ownerState:e})=>ne({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},cx(e)))),fx=B.forwardRef((function(e,t){const n=B.useContext(sx),r=uo({props:Tt(n,e),name:"MuiButton"}),{children:o,color:a="primary",component:i="button",className:s,disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,endIcon:d,focusVisibleClassName:p,fullWidth:f=!1,size:m="medium",startIcon:h,type:g,variant:v="text"}=r,y=Wt(r,lx),A=ne({},r,{color:a,component:i,disabled:l,disableElevation:c,disableFocusRipple:u,fullWidth:f,size:m,type:g,variant:v}),b=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:a,classes:i}=e;return ne({},i,Pt({root:["root",a,`${a}${Ue(t)}`,`size${Ue(o)}`,`${a}Size${Ue(o)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Ue(o)}`],endIcon:["endIcon",`iconSize${Ue(o)}`]},ox,i))})(A),x=h&&X.jsx(dx,{className:b.startIcon,ownerState:A,children:h}),w=d&&X.jsx(px,{className:b.endIcon,ownerState:A,children:d});return X.jsxs(ux,ne({ownerState:A,className:Jn(n.className,b.root,s),component:i,disabled:l,focusRipple:!u,focusVisibleClassName:Jn(b.focusVisible,p),ref:t,type:g},y,{classes:b,children:[x,o,w]}))}));"production"!==process.env.NODE_ENV&&(fx.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,color:Pe.oneOfType([Pe.oneOf(["inherit","primary","secondary","success","error","info","warning"]),Pe.string]),component:Pe.elementType,disabled:Pe.bool,disableElevation:Pe.bool,disableFocusRipple:Pe.bool,disableRipple:Pe.bool,endIcon:Pe.node,focusVisibleClassName:Pe.string,fullWidth:Pe.bool,href:Pe.string,size:Pe.oneOfType([Pe.oneOf(["small","medium","large"]),Pe.string]),startIcon:Pe.node,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),type:Pe.oneOfType([Pe.oneOf(["button","reset","submit"]),Pe.string]),variant:Pe.oneOfType([Pe.oneOf(["contained","outlined","text"]),Pe.string])});var mx=fx;function hx(e){return Et("MuiPickersToolbar",e)}Lt("MuiPickersToolbar",["root","content"]);const gx=["align","className","selected","typographyClassName","value","variant","width"],vx=mo(mx,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),yx=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:o,selected:a,typographyClassName:i,value:s,variant:l,width:c}=n,u=Wt(n,gx),d=(e=>{const{classes:t}=e;return Pt({root:["root"]},hx,t)})(n);return X.jsx(vx,ne({variant:"text",ref:t,className:Jn(o,d.root)},c?{sx:{width:c}}:{},u,{children:X.jsx(rx,{align:r,className:i,variant:l,value:s,selected:a})}))})),Ax=mo("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>ne({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3)},t.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}))),bx=mo(gf,{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})((({ownerState:e})=>ne({flex:1},!e.isLandscape&&{alignItems:"center"}))),xx=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiPickersToolbar"}),{children:r,className:o,isLandscape:a,landscapeDirection:i="column",toolbarTitle:s,hidden:l,titleId:c}=n,u=n,d=(e=>{const{classes:t,isLandscape:n}=e;return Pt({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},hx,t)})(u);return l?null:X.jsxs(Ax,{ref:t,className:Jn(d.root,o),ownerState:u,children:[X.jsx(Cf,{color:"text.secondary",variant:"overline",id:c,children:s}),X.jsx(bx,{container:!0,justifyContent:a?"flex-start":"space-between",className:d.content,ownerState:u,direction:a?i:"row",alignItems:a?"flex-start":"flex-end",children:r})]})}));function wx(e,t,n,r){const o=zb();return{meridiemMode:UA(e,o),handleMeridiemChange:B.useCallback((a=>{const i=null==e?null:KA(e,a,Boolean(t),o);n(i,null!=r?r:"partial")}),[t,e,n,r,o])}}function jx(e){return Et("MuiTimePickerToolbar",e)}const Mx=Lt("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Ox=["ampm","ampmInClock","value","isLandscape","onChange","view","onViewChange","views","disabled","readOnly"],Cx=e=>{const{theme:t,isLandscape:n,classes:r}=e;return Pt({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",n&&"hourMinuteLabelLandscape","rtl"===t.direction&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},jx,r)},zx=mo(xx,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Dx=mo(rx,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),Tx=mo("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${Mx.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${Mx.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})((({theme:e,ownerState:t})=>ne({display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},t.isLandscape&&{marginTop:"auto"},"rtl"===e.direction&&{flexDirection:"row-reverse"})));Tx.propTypes={as:Pe.elementType,ownerState:Pe.object.isRequired,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])};const Px=mo("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${Mx.ampmLabel}`]:t.ampmLabel},{[`&.${Mx.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})((({ownerState:e})=>ne({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12},e.isLandscape&&{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"},{[`& .${Mx.ampmLabel}`]:{fontSize:17}})));function Nx(e){const t=uo({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,isLandscape:a,onChange:i,view:s,onViewChange:l,views:c,disabled:u,readOnly:d}=t,p=Wt(t,Ox),f=zb(),m=Db(),h=co(),g=Boolean(n&&!r&&c.includes("hours")),{meridiemMode:v,handleMeridiemChange:y}=wx(o,n,i),A=t,b=Cx(ne({},A,{theme:h})),x=X.jsx(Dx,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:b.separator});return X.jsxs(zx,ne({landscapeDirection:"row",toolbarTitle:m.timePickerToolbarTitle,isLandscape:a,ownerState:A,className:b.root},p,{children:[X.jsxs(Tx,{className:b.hourMinuteLabel,ownerState:A,children:[Sb(c,"hours")&&X.jsx(yx,{tabIndex:-1,variant:"h3",onClick:()=>l("hours"),selected:"hours"===s,value:o?(w=o,n?f.format(w,"hours12h"):f.format(w,"hours24h")):"--"}),Sb(c,["hours","minutes"])&&x,Sb(c,"minutes")&&X.jsx(yx,{tabIndex:-1,variant:"h3",onClick:()=>l("minutes"),selected:"minutes"===s,value:o?f.format(o,"minutes"):"--"}),Sb(c,["minutes","seconds"])&&x,Sb(c,"seconds")&&X.jsx(yx,{variant:"h3",onClick:()=>l("seconds"),selected:"seconds"===s,value:o?f.format(o,"seconds"):"--"})]}),g&&X.jsxs(Px,{className:b.ampmSelection,ownerState:A,children:[X.jsx(yx,{disableRipple:!0,variant:"subtitle2",selected:"am"===v,typographyClassName:b.ampmLabel,value:QA(f,"am"),onClick:d?void 0:()=>y("am"),disabled:u}),X.jsx(yx,{disableRipple:!0,variant:"subtitle2",selected:"pm"===v,typographyClassName:b.ampmLabel,value:QA(f,"pm"),onClick:d?void 0:()=>y("pm"),disabled:u})]})]}));var w}Px.propTypes={as:Pe.elementType,ownerState:Pe.object.isRequired,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])},"production"!==process.env.NODE_ENV&&(Nx.propTypes={ampm:Pe.bool,ampmInClock:Pe.bool,classes:Pe.object,className:Pe.string,disabled:Pe.bool,hidden:Pe.bool,isLandscape:Pe.bool.isRequired,onChange:Pe.func.isRequired,onViewChange:Pe.func.isRequired,readOnly:Pe.bool,titleId:Pe.string,toolbarFormat:Pe.string,toolbarPlaceholder:Pe.node,value:Pe.any,view:Pe.oneOf(["hours","meridiem","minutes","seconds"]).isRequired,views:Pe.arrayOf(Pe.oneOf(["hours","meridiem","minutes","seconds"]).isRequired).isRequired});const kx=e=>{if(void 0!==e)return Object.keys(e).reduce(((t,n)=>ne({},t,{[`${n.slice(0,1).toLowerCase()}${n.slice(1)}`]:e[n]})),{})};function Bx(e,t){var n,r,o,a,i;const s=zb(),l=uo({props:e,name:t}),c=null!=(n=l.ampm)?n:s.is12HourCycleInCurrentLocale(),u=B.useMemo((()=>{var e;return null==(null==(e=l.localeText)?void 0:e.toolbarTitle)?l.localeText:ne({},l.localeText,{timePickerToolbarTitle:l.localeText.toolbarTitle})}),[l.localeText]),d=null!=(r=l.slots)?r:kx(l.components),p=null!=(o=l.slotProps)?o:l.componentsProps;return ne({},l,{ampm:c,localeText:u},(({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=null!=n?n:r;let a;if(null!=e)a=e;else if(o.includes(t))a=t;else{if(!(o.length>0))throw new Error("MUI: The `views` prop must contain at least one view");a=o[0]}return{views:o,openTo:a}})({views:l.views,openTo:l.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{disableFuture:null!=(a=l.disableFuture)&&a,disablePast:null!=(i=l.disablePast)&&i,slots:ne({toolbar:Nx},d),slotProps:ne({},p,{toolbar:ne({ampm:c,ampmInClock:l.ampmInClock},null==p?void 0:p.toolbar)})})}La(X.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const Ex=La(X.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),Lx=La(X.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight");La(X.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");const Sx=La(X.jsxs(B.Fragment,{children:[X.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),X.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");function Ix(e){return Et("MuiInputAdornment",e)}La(X.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),La(X.jsxs(B.Fragment,{children:[X.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),X.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");var Wx,Hx=Lt("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);const Rx=["children","className","component","disablePointerEvents","disableTypography","position","variant"],Vx=mo("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ue(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((({theme:e,ownerState:t})=>ne({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${Hx.positionStart}&:not(.${Hx.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),Yx=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:a="div",disablePointerEvents:i=!1,disableTypography:s=!1,position:l,variant:c}=n,u=Wt(n,Rx),d=oc()||{};let p=c;c&&d.variant&&"production"!==process.env.NODE_ENV&&c===d.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),d&&!p&&(p=d.variant);const f=ne({},n,{hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:i,position:l,variant:p}),m=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:a,variant:i}=e;return Pt({root:["root",n&&"disablePointerEvents",o&&`position${Ue(o)}`,i,r&&"hiddenLabel",a&&`size${Ue(a)}`]},Ix,t)})(f);return X.jsx(rc.Provider,{value:null,children:X.jsx(Vx,ne({as:a,ownerState:f,className:Jn(m.root,o),ref:t},u,{children:"string"!=typeof r||s?X.jsxs(B.Fragment,{children:["start"===l?Wx||(Wx=X.jsx("span",{className:"notranslate",children:""})):null,r]}):X.jsx(Cf,{color:"text.secondary",children:r})}))})}));"production"!==process.env.NODE_ENV&&(Yx.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,component:Pe.elementType,disablePointerEvents:Pe.bool,disableTypography:Pe.bool,position:Pe.oneOf(["end","start"]).isRequired,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),variant:Pe.oneOf(["filled","outlined","standard"])});var Fx=Yx;function Xx(e){return Et("MuiPickersPopper",e)}Lt("MuiPickersPopper",["root","paper"]);const Qx=mo(qd,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({zIndex:e.zIndex.modal}))),Zx=mo(Ua,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({ownerState:e})=>ne({transformOrigin:"top center",outline:0},"top"===e.placement&&{transformOrigin:"bottom center"})));function Gx(e){var t,n,r,o;const a=uo({props:e,name:"MuiPickersPopper"}),{anchorEl:i,children:s,containerRef:l=null,shouldRestoreFocus:c,onBlur:u,onDismiss:d,open:p,role:f,placement:m,slots:h,slotProps:g}=a;B.useEffect((()=>{function e(e){!p||"Escape"!==e.key&&"Esc"!==e.key||d()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[d,p]);const v=B.useRef(null);B.useEffect((()=>{"tooltip"===f||c&&!c()||(p?v.current=Ib(document):v.current&&v.current instanceof HTMLElement&&setTimeout((()=>{v.current instanceof HTMLElement&&v.current.focus()})))}),[p,f,c]);const[y,A,b]=function(e,t){const n=B.useRef(!1),r=B.useRef(!1),o=B.useRef(null),a=B.useRef(!1);B.useEffect((()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),a.current=!1};function t(){a.current=!0}}),[e]);const i=lt((e=>{if(!a.current)return;const i=r.current;r.current=!1;const s=_e(o.current);if(!o.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,s))return;if(n.current)return void(n.current=!1);let l;l=e.composedPath?e.composedPath().indexOf(o.current)>-1:!s.documentElement.contains(e.target)||o.current.contains(e.target),l||i||t(e)})),s=()=>{r.current=!0};return B.useEffect((()=>{if(e){const e=_e(o.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",i),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",t)}}}),[e,i]),B.useEffect((()=>{if(e){const e=_e(o.current);return e.addEventListener("click",i),()=>{e.removeEventListener("click",i),r.current=!1}}}),[e,i]),[o,s,s]}(p,null!=u?u:d),x=ct(B.useRef(null),l),w=ct(x,y),j=a,M=(e=>{const{classes:t}=e;return Pt({root:["root"],paper:["paper"]},Xx,t)})(j),O=null!=(t=null==h?void 0:h.desktopTransition)?t:Yu,C=null!=(n=null==h?void 0:h.desktopTrapFocus)?n:Xo,z=null!=(r=null==h?void 0:h.desktopPaper)?r:Zx,D=ko({elementType:z,externalSlotProps:null==g?void 0:g.desktopPaper,additionalProps:{tabIndex:-1,elevation:8,ref:w},className:M.paper,ownerState:{}}),T=null!=(o=null==h?void 0:h.popper)?o:Qx,P=ko({elementType:T,externalSlotProps:null==g?void 0:g.popper,additionalProps:{transition:!0,role:f,open:p,anchorEl:i,placement:m,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),d())}},className:M.root,ownerState:a});return X.jsx(T,ne({},P,{children:({TransitionProps:e,placement:t})=>X.jsx(C,ne({open:p,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===f,isEnabled:()=>!0},null==g?void 0:g.desktopTrapFocus,{children:X.jsx(O,ne({},e,null==g?void 0:g.desktopTransition,{children:X.jsx(z,ne({},D,{onClick:e=>{var t;A(e),null==(t=D.onClick)||t.call(D,e)},onTouchStart:e=>{var t;b(e),null==(t=D.onTouchStart)||t.call(D,e)},ownerState:ne({},j,{placement:t}),children:s}))}))}))}))}const Ux=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:a,onChange:i,value:s,defaultValue:l,closeOnSelect:c="desktop"===r,selectedSections:u,onSelectedSectionsChange:d,timezone:p}=e,{current:f}=B.useRef(l),{current:m}=B.useRef(void 0!==s);"production"!==process.env.NODE_ENV&&(B.useEffect((()=>{m!==(void 0!==s)&&console.error([`MUI: A component is changing the ${m?"":"un"}controlled value of a picker to be ${m?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).","Decide between using a controlled or uncontrolled valuefor the lifetime of the component.","The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join("\n"))}),[s]),B.useEffect((()=>{m||f===l||console.error(["MUI: A component is changing the defaultValue of an uncontrolled picker after being initialized. To suppress this warning opt to use a controlled value."].join("\n"))}),[JSON.stringify(f)]));const h=zb(),g=Cb(),[v,y]=st({controlled:u,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:A,setIsOpen:b}=(({open:e,onOpen:t,onClose:n})=>{const r=B.useRef("boolean"==typeof e).current,[o,a]=B.useState(!1);return B.useEffect((()=>{if(r){if("boolean"!=typeof e)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");a(e)}}),[r,e]),{isOpen:o,setIsOpen:B.useCallback((e=>{r||a(e),e&&t&&t(),!e&&n&&n()}),[r,t,n])}})(e),[x,w]=B.useState((()=>{let e;return e=void 0!==s?s:void 0!==f?f:t.emptyValue,{draft:e,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:s,hasBeenModifiedSinceMount:!1}})),{timezone:j,handleValueChange:M}=Nb({timezone:p,value:s,defaultValue:f,onChange:i,valueManager:t});Pb(ne({},e,{value:x.draft,timezone:j}),o,t.isSameError,t.defaultErrorState);const O=lt((n=>{const r={action:n,dateState:x,hasChanged:e=>!t.areValuesEqual(h,n.value,e),isControlled:m,closeOnSelect:c},i=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,a=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!(!a||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!a||n(r.lastPublishedValue)))})(r),s=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:a}=e,i=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!(!i||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&a?!!i||n(r.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(r.lastCommittedValue)})(r),l=(e=>{const{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(r);if(w((e=>ne({},e,{draft:n.value,lastPublishedValue:i?n.value:e.lastPublishedValue,lastCommittedValue:s?n.value:e.lastCommittedValue,hasBeenModifiedSinceMount:!0}))),i){const t={validationError:"setValueFromField"===n.name?n.context.validationError:o({adapter:g,value:n.value,props:ne({},e,{value:n.value,timezone:j})})};M(n.value,t)}s&&a&&a(n.value),l&&b(!1)}));if(void 0!==s&&(void 0===x.lastControlledValue||!t.areValuesEqual(h,x.lastControlledValue,s))){const e=t.areValuesEqual(h,x.draft,s);w((t=>ne({},t,{lastControlledValue:s},e?{}:{lastCommittedValue:s,lastPublishedValue:s,draft:s,hasBeenModifiedSinceMount:!0})))}const C=lt((()=>{O({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})})),z=lt((()=>{O({value:x.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})})),D=lt((()=>{O({value:x.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})})),T=lt((()=>{O({value:x.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})})),P=lt((()=>{O({value:t.getTodayValue(h,j,n),name:"setValueFromAction",pickerAction:"today"})})),N=lt((()=>b(!0))),k=lt((()=>b(!1))),E=lt(((e,t="partial")=>O({name:"setValueFromView",value:e,selectionState:t}))),L=lt(((e,t)=>O({name:"setValueFromShortcut",value:e,changeImportance:null!=t?t:"accept"}))),S=lt(((e,t)=>O({name:"setValueFromField",value:e,context:t}))),I=lt((e=>{y(e),null==d||d(e)})),W={onClear:C,onAccept:z,onDismiss:D,onCancel:T,onSetToday:P,onOpen:N,onClose:k},H={value:x.draft,onChange:S,selectedSections:v,onSelectedSectionsChange:I},R=B.useMemo((()=>t.cleanValue(h,x.draft)),[h,t,x.draft]);return{open:A,fieldProps:H,viewProps:{value:R,onChange:E,onClose:k,open:A,onSelectedSectionsChange:I},layoutProps:ne({},W,{value:R,onChange:E,onSelectShortcut:L,isValid:n=>{const r=o({adapter:g,value:n,props:ne({},e,{value:n,timezone:j})});return!t.hasError(r)}}),actions:W}};let qx=!1;function Kx({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:a,focusedView:i,onFocusedViewChange:s}){var l,c;"production"!==process.env.NODE_ENV&&(qx||(null==r||o.includes(r)||(console.warn(`MUI: \`view="${r}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),qx=!0),null!=r||null==n||o.includes(n)||(console.warn(`MUI: \`openTo="${n}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),qx=!0)));const u=B.useRef(n),d=B.useRef(o),p=B.useRef(o.includes(n)?n:o[0]),[f,m]=st({name:"useViews",state:"view",controlled:r,default:p.current}),h=B.useRef(a?f:null),[g,v]=st({name:"useViews",state:"focusedView",controlled:i,default:h.current});B.useEffect((()=>{(u.current&&u.current!==n||d.current&&d.current.some((e=>!o.includes(e))))&&(m(o.includes(n)?n:o[0]),d.current=o,u.current=n)}),[n,m,f,o]);const y=o.indexOf(f),A=null!=(l=o[y-1])?l:null,b=null!=(c=o[y+1])?c:null,x=lt(((e,t)=>{v(t?e:t=>e===t?null:t),null==s||s(e,t)})),w=lt((e=>{e!==f&&(m(e),x(e,!0),t&&t(e))})),j=lt((()=>{b&&w(b),x(b,!0)})),M=lt(((t,n,r)=>{const a="finish"===n,i=r?o.indexOf(r)<o.length-1:Boolean(b);e(t,a&&i?"partial":n),a&&j()})),O=lt(((t,n,r)=>{e(t,n?"partial":"finish",r),n&&(w(n),x(n,!0))}));return{view:f,setView:w,focusedView:g,setFocusedView:x,nextView:b,previousView:A,defaultView:p.current,goToNextView:j,setValueAndGoToNextView:M,setValueAndGoToView:O}}const Jx=["className","sx"];function _x(){return"undefined"==typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}const $x=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,a=((e,t)=>{const[n,r]=B.useState(_x);return nt((()=>{const e=()=>{r(_x())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),!Sb(e,["hours","minutes","seconds"])&&"landscape"===(t||n)})(n.views,o);return{layoutProps:ne({},n,t,{isLandscape:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}},ew=NA(["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]),tw=({props:e,valueManager:t,valueType:n,wrapperVariant:r,inputRef:o,additionalViewProps:a,validator:i,autoFocusView:s})=>{"production"!==process.env.NODE_ENV&&null!=e.renderInput&&ew();const l=Ux({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i}),c=(({props:e,propsFromPickerValue:t,additionalViewProps:n,inputRef:r,autoFocusView:o})=>{const{onChange:a,open:i,onSelectedSectionsChange:s,onClose:l}=t,{views:c,openTo:u,onViewChange:d,disableOpenPicker:p,viewRenderers:f,timezone:m}=e,h=Wt(e,Jx),{view:g,setView:v,defaultView:y,focusedView:A,setFocusedView:b,setValueAndGoToNextView:x}=Kx({view:void 0,views:c,openTo:u,onChange:a,onViewChange:d,autoFocus:o}),{hasUIView:w,viewModeLookup:j}=B.useMemo((()=>c.reduce(((e,t)=>{let n;return n=p?"field":null!=f[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e}),{hasUIView:!1,viewModeLookup:{}})),[p,f,c]),M=B.useMemo((()=>c.reduce(((e,t)=>null!=f[t]&&GA(t)?e+1:e),0)),[f,c]),O=j[g],C=lt((()=>"UI"===O)),[z,D]=B.useState("UI"===O?g:null);return z!==g&&"UI"===j[g]&&D(g),nt((()=>{"field"===O&&i&&(l(),setTimeout((()=>{null==r||r.current.focus(),s(g)})))}),[g]),nt((()=>{if(!i)return;let e=g;"field"===O&&null!=z&&(e=z),e!==y&&"UI"===j[e]&&"UI"===j[y]&&(e=y),e!==g&&v(e),b(e,!0)}),[i]),{hasUIView:w,shouldRestoreFocus:C,layoutProps:{views:c,view:z,onViewChange:v},renderCurrentView:()=>{if(null==z)return null;const e=f[z];return null==e?null:e(ne({},h,n,t,{views:c,timezone:m,onChange:x,view:z,onViewChange:v,focusedView:A,onFocusedViewChange:b,showViewSwitcher:M>1,timeViewsCount:M}))}}})({props:e,inputRef:o,additionalViewProps:a,autoFocusView:s,propsFromPickerValue:l.viewProps}),u=$x({props:e,wrapperVariant:r,propsFromPickerValue:l.layoutProps,propsFromPickerViews:c.layoutProps});return{open:l.open,actions:l.actions,fieldProps:l.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:u.layoutProps}};function nw(e){return Et("MuiPickersLayout",e)}const rw=Lt("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","shortcuts"]);function ow(e){return Et("MuiDialogActions",e)}Lt("MuiDialogActions",["root","spacing"]);const aw=["className","disableSpacing"],iw=mo("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((({ownerState:e})=>ne({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}}))),sw=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:o=!1}=n,a=Wt(n,aw),i=ne({},n,{disableSpacing:o}),s=(e=>{const{classes:t,disableSpacing:n}=e;return Pt({root:["root",!n&&"spacing"]},ow,t)})(i);return X.jsx(iw,ne({className:Jn(s.root,r),ownerState:i,ref:t},a))}));"production"!==process.env.NODE_ENV&&(sw.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,disableSpacing:Pe.bool,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var lw=sw;const cw=["onAccept","onClear","onCancel","onSetToday","actions"];function uw(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:a}=e,i=Wt(e,cw),s=Db();if(null==a||0===a.length)return null;const l=null==a?void 0:a.map((e=>{switch(e){case"clear":return X.jsx(mx,{onClick:n,children:s.clearButtonLabel},e);case"cancel":return X.jsx(mx,{onClick:r,children:s.cancelButtonLabel},e);case"accept":return X.jsx(mx,{onClick:t,children:s.okButtonLabel},e);case"today":return X.jsx(mx,{onClick:o,children:s.todayButtonLabel},e);default:return null}}));return X.jsx(lw,ne({},i,{children:l}))}function dw(e){return Et("MuiListItem",e)}"production"!==process.env.NODE_ENV&&(uw.propTypes={actions:Pe.arrayOf(Pe.oneOf(["accept","cancel","clear","today"]).isRequired),disableSpacing:Pe.bool,onAccept:Pe.func.isRequired,onCancel:Pe.func.isRequired,onClear:Pe.func.isRequired,onSetToday:Pe.func.isRequired,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var pw=Lt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function fw(e){return Et("MuiListItemButton",e)}var mw=Lt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);const hw=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],gw=mo(xp,{shouldForwardProp:e=>po(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>ne({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${mw.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${mw.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${mw.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${mw.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${mw.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}))),vw=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:o=!1,component:a="div",children:i,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:u,selected:d=!1,className:p}=n,f=Wt(n,hw),m=B.useContext(ju),h=B.useMemo((()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:l})),[r,m.dense,s,l]),g=B.useRef(null);nt((()=>{o&&(g.current?g.current.focus():"production"!==process.env.NODE_ENV&&console.error("MUI: Unable to set focus to a ListItemButton whose component has not been rendered."))}),[o]);const v=ne({},n,{alignItems:r,dense:h.dense,disableGutters:l,divider:c,selected:d}),y=(e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:a,divider:i,selected:s}=e;return ne({},n,Pt({root:["root",r&&"dense",!a&&"gutters",i&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},fw,n))})(v),A=ct(g,t);return X.jsx(ju.Provider,{value:h,children:X.jsx(gw,ne({ref:A,href:f.href||f.to,component:(f.href||f.to)&&"div"===a?"button":a,focusVisibleClassName:Jn(y.focusVisible,u),ownerState:v,className:Jn(y.root,p)},f,{classes:y,children:i}))})}));"production"!==process.env.NODE_ENV&&(vw.propTypes={alignItems:Pe.oneOf(["center","flex-start"]),autoFocus:Pe.bool,children:Pe.node,classes:Pe.object,className:Pe.string,component:Pe.elementType,dense:Pe.bool,disabled:Pe.bool,disableGutters:Pe.bool,divider:Pe.bool,focusVisibleClassName:Pe.string,href:Pe.string,selected:Pe.bool,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var yw=vw;function Aw(e){return Et("MuiListItemSecondaryAction",e)}Lt("MuiListItemSecondaryAction",["root","disableGutters"]);const bw=["className"],xw=mo("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})((({ownerState:e})=>ne({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0}))),ww=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,o=Wt(n,bw),a=ne({},n,{disableGutters:B.useContext(ju).disableGutters}),i=(e=>{const{disableGutters:t,classes:n}=e;return Pt({root:["root",t&&"disableGutters"]},Aw,n)})(a);return X.jsx(xw,ne({className:Jn(i.root,r),ownerState:a,ref:t},o))}));"production"!==process.env.NODE_ENV&&(ww.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])}),ww.muiName="ListItemSecondaryAction";var jw=ww;const Mw=["className"],Ow=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Cw=mo("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})((({theme:e,ownerState:t})=>ne({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&ne({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${mw.root}`]:{paddingRight:48}},{[`&.${pw.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${pw.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${pw.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${pw.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${pw.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vr(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48}))),zw=mo("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Dw=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:o=!1,button:a=!1,children:i,className:s,component:l,components:c={},componentsProps:u={},ContainerComponent:d="li",ContainerProps:{className:p}={},dense:f=!1,disabled:m=!1,disableGutters:h=!1,disablePadding:g=!1,divider:v=!1,focusVisibleClassName:y,secondaryAction:A,selected:b=!1,slotProps:x={},slots:w={}}=n,j=Wt(n.ContainerProps,Mw),M=Wt(n,Ow),O=B.useContext(ju),C=B.useMemo((()=>({dense:f||O.dense||!1,alignItems:r,disableGutters:h})),[r,O.dense,f,h]),z=B.useRef(null);nt((()=>{o&&(z.current?z.current.focus():"production"!==process.env.NODE_ENV&&console.error("MUI: Unable to set focus to a ListItem whose component has not been rendered."))}),[o]);const D=B.Children.toArray(i),T=D.length&&Je(D[D.length-1],["ListItemSecondaryAction"]),P=ne({},n,{alignItems:r,autoFocus:o,button:a,dense:C.dense,disabled:m,disableGutters:h,disablePadding:g,divider:v,hasSecondaryAction:T,selected:b}),N=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:a,disableGutters:i,disablePadding:s,divider:l,hasSecondaryAction:c,selected:u}=e;return Pt({root:["root",o&&"dense",!i&&"gutters",!s&&"padding",l&&"divider",a&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},dw,r)})(P),k=ct(z,t),E=w.root||c.Root||Cw,L=x.root||u.root||{},S=ne({className:Jn(N.root,L.className,s),disabled:m},M);let I=l||"li";return a&&(S.component=l||"div",S.focusVisibleClassName=Jn(pw.focusVisible,y),I=xp),T?(I=S.component||l?I:"div","li"===d&&("li"===I?I="div":"li"===S.component&&(S.component="div")),X.jsx(ju.Provider,{value:C,children:X.jsxs(zw,ne({as:d,className:Jn(N.container,p),ref:k,ownerState:P},j,{children:[X.jsx(E,ne({},L,!jo(E)&&{as:I,ownerState:ne({},P,L.ownerState)},S,{children:D})),D.pop()]}))})):X.jsx(ju.Provider,{value:C,children:X.jsxs(E,ne({},L,{as:I,ref:k},!jo(E)&&{ownerState:ne({},P,L.ownerState)},S,{children:[D,A&&X.jsx(jw,{children:A})]}))})}));"production"!==process.env.NODE_ENV&&(Dw.propTypes={alignItems:Pe.oneOf(["center","flex-start"]),autoFocus:Pe.bool,button:Pe.bool,children:te(Pe.node,(e=>{const t=B.Children.toArray(e.children);let n=-1;for(let e=t.length-1;e>=0;e-=1){if(Je(t[e],["ListItemSecondaryAction"])){n=e;break}}return-1!==n&&n!==t.length-1?new Error("MUI: You used an element after ListItemSecondaryAction. For ListItem to detect that it has a secondary action you must pass it as the last child to ListItem."):null})),classes:Pe.object,className:Pe.string,component:Pe.elementType,components:Pe.shape({Root:Pe.elementType}),componentsProps:Pe.shape({root:Pe.object}),ContainerComponent:Ee,ContainerProps:Pe.object,dense:Pe.bool,disabled:Pe.bool,disableGutters:Pe.bool,disablePadding:Pe.bool,divider:Pe.bool,focusVisibleClassName:Pe.string,secondaryAction:Pe.node,selected:Pe.bool,slotProps:Pe.shape({root:Pe.object}),slots:Pe.shape({root:Pe.elementType}),sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var Tw=Dw;const Pw=["items","changeImportance","isLandscape","onChange","isValid"];function Nw(e){const{items:t,changeImportance:n,onChange:r,isValid:o}=e,a=Wt(e,Pw);if(null==t||0===t.length)return null;const i=t.map((e=>{const t=e.getValue({isValid:o});return{label:e.label,onClick:()=>{r(t,n)},disabled:!o(t)}}));return X.jsx(Tu,ne({dense:!0,sx:[{maxHeight:358,maxWidth:200,overflow:"auto"},...Array.isArray(a.sx)?a.sx:[a.sx]]},a,{children:i.map((e=>X.jsx(Tw,{children:X.jsx(Sp,ne({},e))},e.label)))}))}"production"!==process.env.NODE_ENV&&(Nw.propTypes={changeImportance:Pe.oneOf(["accept","set"]),className:Pe.string,component:Pe.elementType,dense:Pe.bool,disablePadding:Pe.bool,isLandscape:Pe.bool.isRequired,isValid:Pe.func.isRequired,items:Pe.arrayOf(Pe.shape({getValue:Pe.func.isRequired,label:Pe.string.isRequired})),onChange:Pe.func.isRequired,style:Pe.object,subheader:Pe.node,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var kw=e=>{var t,n;const{wrapperVariant:r,onAccept:o,onClear:a,onCancel:i,onSetToday:s,view:l,views:c,onViewChange:u,value:d,onChange:p,onSelectShortcut:f,isValid:m,isLandscape:h,disabled:g,readOnly:v,children:y,components:A,componentsProps:b,slots:x,slotProps:w}=e,j=null!=x?x:kx(A),M=null!=w?w:b,O=(e=>{const{classes:t,isLandscape:n}=e;return Pt({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},nw,t)})(e),C=null!=(t=null==j?void 0:j.actionBar)?t:uw,z=ko({elementType:C,externalSlotProps:null==M?void 0:M.actionBar,additionalProps:{onAccept:o,onClear:a,onCancel:i,onSetToday:s,actions:"desktop"===r?[]:["cancel","accept"],className:O.actionBar},ownerState:ne({},e,{wrapperVariant:r})}),D=X.jsx(C,ne({},z)),T=null==j?void 0:j.toolbar,P=ko({elementType:T,externalSlotProps:null==M?void 0:M.toolbar,additionalProps:{isLandscape:h,onChange:p,value:d,view:l,onViewChange:u,views:c,disabled:g,readOnly:v,className:O.toolbar},ownerState:ne({},e,{wrapperVariant:r})}),N=function(e){return null!==e.view}(P)&&T?X.jsx(T,ne({},P)):null,k=y,B=null==j?void 0:j.tabs,E=l&&B?X.jsx(B,ne({view:l,onViewChange:u},null==M?void 0:M.tabs)):null,L=null!=(n=null==j?void 0:j.shortcuts)?n:Nw,S=ko({elementType:L,externalSlotProps:null==M?void 0:M.shortcuts,additionalProps:{isValid:m,isLandscape:h,onChange:f,className:O.shortcuts},ownerState:{isValid:m,isLandscape:h,onChange:f,className:O.shortcuts,wrapperVariant:r}});return{toolbar:N,content:k,tabs:E,actionBar:D,shortcuts:l&&L?X.jsx(L,ne({},S)):null}};const Bw=mo("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${rw.toolbar}`]:t.isLandscape?{gridColumn:"rtl"===e.direction?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[`.${rw.shortcuts}`]:t.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:"rtl"===e.direction?3:1,gridRow:"2 / 3"},[`& .${rw.actionBar}`]:{gridColumn:"1 / 4",gridRow:3}})));Bw.propTypes={as:Pe.elementType,ownerState:Pe.shape({isLandscape:Pe.bool.isRequired}).isRequired,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])};const Ew=mo("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Lw=function(e){const t=uo({props:e,name:"MuiPickersLayout"}),{toolbar:n,content:r,tabs:o,actionBar:a,shortcuts:i}=kw(t),{sx:s,className:l,isLandscape:c,ref:u,wrapperVariant:d}=t,p=t,f=(e=>{const{isLandscape:t,classes:n}=e;return Pt({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},nw,n)})(p);return X.jsxs(Bw,{ref:u,sx:s,className:Jn(l,f.root),ownerState:p,children:[c?i:n,c?n:i,X.jsx(Ew,{className:f.contentWrapper,children:"desktop"===d?X.jsxs(B.Fragment,{children:[r,o]}):X.jsxs(B.Fragment,{children:[o,r]})}),a]})};"production"!==process.env.NODE_ENV&&(Lw.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,components:Pe.object,componentsProps:Pe.object,disabled:Pe.bool,isLandscape:Pe.bool.isRequired,isValid:Pe.func.isRequired,onAccept:Pe.func.isRequired,onCancel:Pe.func.isRequired,onChange:Pe.func.isRequired,onClear:Pe.func.isRequired,onClose:Pe.func.isRequired,onDismiss:Pe.func.isRequired,onOpen:Pe.func.isRequired,onSelectShortcut:Pe.func.isRequired,onSetToday:Pe.func.isRequired,onViewChange:Pe.func.isRequired,orientation:Pe.oneOf(["landscape","portrait"]),readOnly:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),value:Pe.any,view:Pe.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),views:Pe.arrayOf(Pe.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]).isRequired).isRequired,wrapperVariant:Pe.oneOf(["desktop","mobile"])});const Sw=["props","getOpenDialogAriaText"],Iw=["ownerState"],Ww=["ownerState"];function Hw(e){return Et("MuiPickersArrowSwitcher",e)}Lt("MuiPickersArrowSwitcher",["root","spacer","button"]);const Rw=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],Vw=["ownerState"],Yw=["ownerState"],Fw=mo("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Xw=mo("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((({theme:e})=>({width:e.spacing(3)}))),Qw=mo(zp,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})((({ownerState:e})=>ne({},e.hidden&&{visibility:"hidden"}))),Zw=B.forwardRef((function(e,t){var n,r,o,a;const i="rtl"===co().direction,s=uo({props:e,name:"MuiPickersArrowSwitcher"}),{children:l,className:c,slots:u,slotProps:d,isNextDisabled:p,isNextHidden:f,onGoToNext:m,nextLabel:h,isPreviousDisabled:g,isPreviousHidden:v,onGoToPrevious:y,previousLabel:A}=s,b=Wt(s,Rw),x=s,w=(e=>{const{classes:t}=e;return Pt({root:["root"],spacer:["spacer"],button:["button"]},Hw,t)})(x),j={isDisabled:p,isHidden:f,goTo:m,label:h},M={isDisabled:g,isHidden:v,goTo:y,label:A},[O,C]=i?[j,M]:[M,j],z=null!=(n=null==u?void 0:u.previousIconButton)?n:Qw,D=ko({elementType:z,externalSlotProps:null==d?void 0:d.previousIconButton,additionalProps:{size:"medium",title:O.label,"aria-label":O.label,disabled:O.isDisabled,edge:"end",onClick:O.goTo},ownerState:ne({},x,{hidden:O.isHidden}),className:w.button}),T=null!=(r=null==u?void 0:u.nextIconButton)?r:Qw,P=ko({elementType:T,externalSlotProps:null==d?void 0:d.nextIconButton,additionalProps:{size:"medium",title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:"start",onClick:C.goTo},ownerState:ne({},x,{hidden:C.isHidden}),className:w.button}),N=null!=(o=null==u?void 0:u.leftArrowIcon)?o:Ex,k=Wt(ko({elementType:N,externalSlotProps:null==d?void 0:d.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),Vw),B=null!=(a=null==u?void 0:u.rightArrowIcon)?a:Lx,E=Wt(ko({elementType:B,externalSlotProps:null==d?void 0:d.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),Yw);return X.jsxs(Fw,ne({ref:t,className:Jn(w.root,c),ownerState:x},b,{children:[X.jsx(z,ne({},D,{children:i?X.jsx(B,ne({},E)):X.jsx(N,ne({},k))})),l?X.jsx(Cf,{variant:"subtitle1",component:"span",children:l}):X.jsx(Xw,{className:w.spacer,ownerState:x}),X.jsx(T,ne({},P,{children:i?X.jsx(N,ne({},k)):X.jsx(B,ne({},E))}))]}))})),Gw=mo("div")({overflow:"hidden",width:320,maxHeight:358,display:"flex",flexDirection:"column",margin:"0 auto"});function Uw(e){return Et("MuiTimeClock",e)}Lt("MuiTimeClock",["root","arrowSwitcher"]);const qw=220,Kw=36,Jw={x:qw/2,y:qw/2},_w=Jw.x-Jw.x,$w=0-Jw.y,ej=(e,t,n)=>{const r=t-Jw.x,o=n-Jw.y,a=Math.atan2(_w,$w)-Math.atan2(r,o);let i=a*(180/Math.PI);i=Math.round(i/e)*e,i%=360;const s=r**2+o**2;return{value:Math.floor(i/e)||0,distance:Math.sqrt(s)}};function tj(e){return Et("MuiClockPointer",e)}Lt("MuiClockPointer",["root","thumb"]);const nj=["className","hasSelected","isInner","type","viewValue"],rj=e=>{const{classes:t}=e;return Pt({root:["root"],thumb:["thumb"]},tj,t)},oj=mo("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>ne({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},t.shouldAnimate&&{transition:e.transitions.create(["transform","height"])}))),aj=mo("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e,ownerState:t})=>ne({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box"},t.hasSelected&&{backgroundColor:(e.vars||e).palette.primary.main})));function ij(e){const t=uo({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:o,viewValue:a}=t,i=Wt(t,nj),s=B.useRef(o);B.useEffect((()=>{s.current=o}),[o]);const l=ne({},t,{shouldAnimate:s.current!==o}),c=rj(l);return X.jsx(oj,ne({style:(()=>{let e=360/("hours"===o?12:60)*a;return"hours"===o&&a>12&&(e-=360),{height:Math.round((r?.26:.4)*qw),transform:`rotateZ(${e}deg)`}})(),className:Jn(n,c.root),ownerState:l},i,{children:X.jsx(aj,{ownerState:l,className:c.thumb})}))}function sj(e){return Et("MuiClock",e)}Lt("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton"]);const lj=mo("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)}))),cj=mo("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),uj=mo("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),dj=mo("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})((({ownerState:e})=>ne({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none"},e.disabled?{}:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}))),pj=mo("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})((({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}))),fj=mo(zp,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})((({theme:e,ownerState:t})=>ne({zIndex:1,position:"absolute",bottom:8,left:8},"am"===t.meridiemMode&&{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}))),mj=mo(zp,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})((({theme:e,ownerState:t})=>ne({zIndex:1,position:"absolute",bottom:8,right:8},"pm"===t.meridiemMode&&{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}})));function hj(e){const t=uo({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:a,value:i,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:d,selectedId:p,type:f,viewValue:m,disabled:h,readOnly:g,className:v}=t,y=t,A=zb(),b=Db(),x=B.useRef(!1),w=(e=>{const{classes:t}=e;return Pt({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton"],pmButton:["pmButton"]},sj,t)})(y),j=l(m,f),M=!n&&"hours"===f&&(m<1||m>12),O=(e,t)=>{h||g||l(e,f)||d(e,t)},C=(e,t)=>{let{offsetX:r,offsetY:o}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,o=e.changedTouches[0].clientY-t.top}const a="seconds"===f||"minutes"===f?((e,t,n=1)=>{const r=6*n;let{value:o}=ej(r,e,t);return o=o*n%60,o})(r,o,u):((e,t,n)=>{const{value:r,distance:o}=ej(30,e,t);let a=r||12;return n?a%=12:o<qw/2-Kw&&(a+=12,a%=24),a})(r,o,Boolean(n));O(a,t)},z=B.useMemo((()=>"hours"===f||m%5==0),[f,m]),D="minutes"===f?u:1,T=B.useRef(null);nt((()=>{o&&T.current.focus()}),[o]);return X.jsxs(lj,{className:Jn(v,w.root),children:[X.jsxs(cj,{className:w.clock,children:[X.jsx(dj,{onTouchMove:e=>{x.current=!0,C(e,"shallow")},onTouchEnd:e=>{x.current&&(C(e,"finish"),x.current=!1)},onMouseUp:e=>{x.current&&(x.current=!1),C(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&C(e.nativeEvent,"shallow")},ownerState:{disabled:h},className:w.squareMask}),!j&&X.jsxs(B.Fragment,{children:[X.jsx(pj,{className:w.pin}),null!=i&&X.jsx(ij,{type:f,viewValue:m,isInner:M,hasSelected:z})]}),X.jsx(uj,{"aria-activedescendant":p,"aria-label":b.clockLabelText(f,i,A),ref:T,role:"listbox",onKeyDown:e=>{if(!x.current)switch(e.key){case"Home":O(0,"partial"),e.preventDefault();break;case"End":O("minutes"===f?59:23,"partial"),e.preventDefault();break;case"ArrowUp":O(m+D,"partial"),e.preventDefault();break;case"ArrowDown":O(m-D,"partial"),e.preventDefault()}},tabIndex:0,className:w.wrapper,children:a})]}),n&&r&&X.jsxs(B.Fragment,{children:[X.jsx(fj,{onClick:g?void 0:()=>s("am"),disabled:h||null===c,ownerState:y,className:w.amButton,children:X.jsx(Cf,{variant:"caption",children:"AM"})}),X.jsx(mj,{disabled:h||null===c,onClick:g?void 0:()=>s("pm"),ownerState:y,className:w.pmButton,children:X.jsx(Cf,{variant:"caption",children:"PM"})})]})]})}function gj(e){return Et("MuiClockNumber",e)}const vj=Lt("MuiClockNumber",["root","selected","disabled"]),yj=["className","disabled","index","inner","label","selected"],Aj=mo("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${vj.disabled}`]:t.disabled},{[`&.${vj.selected}`]:t.selected}]})((({theme:e,ownerState:t})=>ne({height:Kw,width:Kw,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${vj.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${vj.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled}},t.inner&&ne({},e.typography.body2,{color:(e.vars||e).palette.text.secondary}))));function bj(e){const t=uo({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:o,inner:a,label:i,selected:s}=t,l=Wt(t,yj),c=t,u=(e=>{const{classes:t,selected:n,disabled:r}=e;return Pt({root:["root",n&&"selected",r&&"disabled"]},gj,t)})(c),d=o%12/12*Math.PI*2-Math.PI/2,p=(qw-Kw-2)/2*(a?.65:1),f=Math.round(Math.cos(d)*p),m=Math.round(Math.sin(d)*p);return X.jsx(Aj,ne({className:Jn(n,u.root),"aria-disabled":!!r||void 0,"aria-selected":!!s||void 0,role:"option",style:{transform:`translate(${f}px, ${m+(qw-Kw)/2}px`},ownerState:c},l,{children:i}))}const xj=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:a})=>{const i=t?a.getHours(t):null,s=[],l=e?12:23,c=t=>null!==i&&(e?12===t?12===i||0===i:i===t||i-12===t:i===t);for(let t=e?1:0;t<=l;t+=1){let i=t.toString();0===t&&(i="00");const l=!e&&(0===t||t>12);i=a.formatNumber(i);const u=c(t);s.push(X.jsx(bj,{id:u?o:void 0,index:t,inner:l,selected:u,disabled:r(t),label:i,"aria-label":n(i)},t))}return s},wj=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const a=e.formatNumber;return[[5,a("05")],[10,a("10")],[15,a("15")],[20,a("20")],[25,a("25")],[30,a("30")],[35,a("35")],[40,a("40")],[45,a("45")],[50,a("50")],[55,a("55")],[0,a("00")]].map((([e,a],i)=>{const s=e===t;return X.jsx(bj,{label:a,id:s?o:void 0,index:i+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(a)},e)}))},jj=({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const a=B.useMemo((()=>wb.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:eb.day,timezone:o,getTodayDate:()=>XA(n,o,"date")})),[]);return null!=e?e:a},Mj=["ampm","ampmInClock","autoFocus","components","componentsProps","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableClock","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],Oj=mo(Gw,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),Cj=mo(Zw,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),zj=["hours","minutes"],Dj=B.forwardRef((function(e,t){const n=zb(),r=uo({props:e,name:"MuiTimeClock"}),{ampm:o=n.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:i,components:s,componentsProps:l,slots:c,slotProps:u,value:d,defaultValue:p,referenceDate:f,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:h,minTime:g,disableFuture:v,disablePast:y,minutesStep:A=1,shouldDisableClock:b,shouldDisableTime:x,showViewSwitcher:w,onChange:j,view:M,views:O=zj,openTo:C,onViewChange:z,focusedView:D,onFocusedViewChange:T,className:P,disabled:N,readOnly:k,timezone:E}=r,L=Wt(r,Mj),S=null!=c?c:kx(s),I=null!=u?u:l,{value:W,handleValueChange:H,timezone:R}=kb({name:"TimeClock",timezone:E,value:d,defaultValue:p,onChange:j,valueManager:wb}),V=jj({value:W,referenceDate:f,utils:n,props:r,timezone:R}),Y=Db(),F=Tb(R),{view:Q,setView:Z,previousView:G,nextView:U,setValueAndGoToNextView:q}=Kx({view:M,views:O,openTo:C,onViewChange:z,onChange:H,focusedView:D,onFocusedViewChange:T}),{meridiemMode:K,handleMeridiemChange:J}=wx(V,o,q),_=B.useCallback(((e,t)=>{const r=_A(m,n),a="hours"===t||"minutes"===t&&O.includes("seconds"),i=({start:e,end:t})=>(!g||!r(g,t))&&((!h||!r(e,h))&&((!v||!r(e,F))&&(!y||!r(F,a?t:e)))),s=(e,r=1)=>{if(e%r!=0)return!1;if(null!=b&&b(e,t))return!1;if(x)switch(t){case"hours":return!x(n.setHours(V,e),"hours");case"minutes":return!x(n.setMinutes(V,e),"minutes");case"seconds":return!x(n.setSeconds(V,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=qA(e,K,o),r=n.setHours(V,t);return!i({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case"minutes":{const t=n.setMinutes(V,e);return!i({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,A)}case"seconds":{const t=n.setSeconds(V,e);return!i({start:t,end:t})||!s(e)}default:throw new Error("not supported")}}),[o,V,m,h,K,g,A,b,x,n,v,y,F,O]),$=at(),ee=B.useMemo((()=>{switch(Q){case"hours":{const e=(e,t)=>{const r=qA(e,K,o);q(n.setHours(V,r),t)};return{onChange:e,viewValue:n.getHours(V),children:xj({value:W,utils:n,ampm:o,onChange:e,getClockNumberText:Y.hoursClockNumberText,isDisabled:e=>N||_(e,"hours"),selectedId:$})}}case"minutes":{const e=n.getMinutes(V),t=(e,t)=>{q(n.setMinutes(V,e),t)};return{viewValue:e,onChange:t,children:wj({utils:n,value:e,onChange:t,getClockNumberText:Y.minutesClockNumberText,isDisabled:e=>N||_(e,"minutes"),selectedId:$})}}case"seconds":{const e=n.getSeconds(V),t=(e,t)=>{q(n.setSeconds(V,e),t)};return{viewValue:e,onChange:t,children:wj({utils:n,value:e,onChange:t,getClockNumberText:Y.secondsClockNumberText,isDisabled:e=>N||_(e,"seconds"),selectedId:$})}}default:throw new Error("You must provide the type for ClockView")}}),[Q,n,W,o,Y.hoursClockNumberText,Y.minutesClockNumberText,Y.secondsClockNumberText,K,q,V,_,$,N]),te=r,re=(e=>{const{classes:t}=e;return Pt({root:["root"],arrowSwitcher:["arrowSwitcher"]},Uw,t)})(te);return X.jsxs(Oj,ne({ref:t,className:Jn(re.root,P),ownerState:te},L,{children:[X.jsx(hj,ne({autoFocus:null!=i?i:!!D,ampmInClock:a&&O.includes("hours"),value:W,type:Q,ampm:o,minutesStep:A,isTimeDisabled:_,meridiemMode:K,handleMeridiemChange:J,selectedId:$,disabled:N,readOnly:k},ee)),w&&X.jsx(Cj,{className:re.arrowSwitcher,slots:S,slotProps:I,onGoToPrevious:()=>Z(G),isPreviousDisabled:!G,previousLabel:Y.openPreviousView,onGoToNext:()=>Z(U),isNextDisabled:!U,nextLabel:Y.openNextView,ownerState:te})]}))}));function Tj(e){return Et("MuiDigitalClock",e)}"production"!==process.env.NODE_ENV&&(Dj.propTypes={ampm:Pe.bool,ampmInClock:Pe.bool,autoFocus:Pe.bool,classes:Pe.object,className:Pe.string,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disablePast:Pe.bool,focusedView:Pe.oneOf(["hours","minutes","seconds"]),maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onChange:Pe.func,onFocusedViewChange:Pe.func,onViewChange:Pe.func,openTo:Pe.oneOf(["hours","minutes","seconds"]),readOnly:Pe.bool,referenceDate:Pe.any,shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,showViewSwitcher:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours","minutes","seconds"]),views:Pe.arrayOf(Pe.oneOf(["hours","minutes","seconds"]).isRequired)}),Lt("MuiDigitalClock",["root","list","item"]);const Pj=["ampm","timeStep","autoFocus","components","componentsProps","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableClock","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","views","skipDisabled","timezone"],Nj=mo(Gw,{name:"MuiDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({ownerState:e})=>({overflowY:"auto",width:"100%",scrollBehavior:e.alreadyRendered?"smooth":"auto",maxHeight:232}))),kj=mo(Su,{name:"MuiDigitalClock",slot:"List",overridesResolver:(e,t)=>t.list})({padding:0}),Bj=mo(fg,{name:"MuiDigitalClock",slot:"Item",overridesResolver:(e,t)=>t.item})((({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vr(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:vr(e.palette.primary.main,e.palette.action.focusOpacity)}}))),Ej=B.forwardRef((function(e,t){var n,r,o;const a=zb(),i=B.useRef(null),s=ct(t,i),l=uo({props:e,name:"MuiDigitalClock"}),{ampm:c=a.is12HourCycleInCurrentLocale(),timeStep:u=30,autoFocus:d,components:p,componentsProps:f,slots:m,slotProps:h,value:g,defaultValue:v,referenceDate:y,disableIgnoringDatePartForTimeValidation:A=!1,maxTime:b,minTime:x,disableFuture:w,disablePast:j,minutesStep:M=1,shouldDisableClock:O,shouldDisableTime:C,onChange:z,view:D,openTo:T,onViewChange:P,focusedView:N,onFocusedViewChange:k,className:E,disabled:L,readOnly:S,views:I=["hours"],skipDisabled:W=!1,timezone:H}=l,R=Wt(l,Pj),{value:V,handleValueChange:Y,timezone:F}=kb({name:"DigitalClock",timezone:H,value:g,defaultValue:v,onChange:z,valueManager:wb}),Q=Db(),Z=Tb(F),G=B.useMemo((()=>ne({},l,{alreadyRendered:!!i.current})),[l]),U=(e=>{const{classes:t}=e;return Pt({root:["root"],list:["list"],item:["item"]},Tj,t)})(G),q=null!=(n=null!=(r=null==m?void 0:m.digitalClockItem)?r:null==p?void 0:p.DigitalClockItem)?n:Bj,K=ko({elementType:q,externalSlotProps:null!=(o=null==h?void 0:h.digitalClockItem)?o:null==f?void 0:f.digitalClockItem,ownerState:{},className:U.item}),J=jj({value:V,referenceDate:y,utils:a,props:l,timezone:F}),_=lt((e=>Y(e,"finish"))),{setValueAndGoToNextView:$}=Kx({view:D,views:I,openTo:T,onViewChange:P,onChange:_,focusedView:N,onFocusedViewChange:k}),ee=lt((e=>{$(e,"finish")}));B.useEffect((()=>{if(null===i.current)return;const e=i.current.querySelector('[role="listbox"] [role="option"][aria-selected="true"]');if(!e)return;const t=e.offsetTop;i.current.scrollTop=t-4}));const te=B.useCallback((e=>{const t=_A(A,a);return!!(x&&t(x,e)||b&&t(e,b)||w&&t(e,Z)||j&&t(Z,e))||!!(a.getMinutes(e)%M!=0||null!=O&&O(a.toJsDate(e).getTime(),"hours")||C&&C(e,"hours"))}),[A,a,x,b,w,Z,j,M,O,C]),re=B.useMemo((()=>{const e=a.startOfDay(J);return[e,...Array.from({length:Math.ceil(1440/u)-1},((t,n)=>a.addMinutes(e,u*(n+1))))]}),[J,u,a]);return X.jsx(Nj,ne({ref:s,className:Jn(U.root,E),ownerState:G},R,{children:X.jsx(kj,{autoFocusItem:d||!!N,role:"listbox","aria-label":Q.timePickerToolbarTitle,className:U.list,children:re.map((e=>{if(W&&te(e))return null;const t=a.isEqual(e,V);return X.jsx(q,ne({onClick:()=>!S&&ee(e),selected:t,disabled:L||te(e),disableRipple:S,role:"option","aria-disabled":S,"aria-selected":t},K,{children:a.format(e,c?"fullTime12h":"fullTime24h")}),a.toISO(e))}))})}))}));function Lj(e){return Et("MuiMultiSectionDigitalClock",e)}function Sj(e){return Et("MuiMultiSectionDigitalClock",e)}"production"!==process.env.NODE_ENV&&(Ej.propTypes={ampm:Pe.bool,autoFocus:Pe.bool,classes:Pe.object,className:Pe.string,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disablePast:Pe.bool,focusedView:Pe.oneOf(["hours"]),maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onChange:Pe.func,onFocusedViewChange:Pe.func,onViewChange:Pe.func,openTo:Pe.oneOf(["hours"]),readOnly:Pe.bool,referenceDate:Pe.any,shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,skipDisabled:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),timeStep:Pe.number,timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours"]),views:Pe.arrayOf(Pe.oneOf(["hours"]))}),Lt("MuiMultiSectionDigitalClock",["root"]),Lt("MuiMultiSectionDigitalClock",["root","item"]);const Ij=["autoFocus","onChange","className","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],Wj=mo(Su,{name:"MuiMultiSectionDigitalClockSection",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>({maxHeight:232,width:56,padding:0,overflow:"hidden",scrollBehavior:t.alreadyRendered?"smooth":"auto","&:hover":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&:after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"}}))),Hj=mo(fg,{name:"MuiMultiSectionDigitalClockSection",slot:"Item",overridesResolver:(e,t)=>t.item})((({theme:e})=>({padding:8,margin:"2px 4px",width:48,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vr(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:vr(e.palette.primary.main,e.palette.action.focusOpacity)}}))),Rj=B.forwardRef((function(e,t){var n;const r=B.useRef(null),o=ct(t,r),a=B.useRef(null),i=uo({props:e,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:s,onChange:l,className:c,disabled:u,readOnly:d,items:p,active:f,slots:m,slotProps:h,skipDisabled:g}=i,v=Wt(i,Ij),y=B.useMemo((()=>ne({},i,{alreadyRendered:!!r.current})),[i]),A=(e=>{const{classes:t}=e;return Pt({root:["root"],item:["item"]},Sj,t)})(y),b=null!=(n=null==m?void 0:m.digitalClockSectionItem)?n:Hj;return B.useEffect((()=>{if(null===r.current)return;const e=r.current.querySelector('[role="option"][aria-selected="true"]');if(!e||a.current===e)return void(a.current!==e&&(a.current=e));a.current=e,f&&s&&e.focus();const t=e.offsetTop;r.current.scrollTop=t-4})),X.jsx(Wj,ne({ref:o,className:Jn(A.root,c),ownerState:y,autoFocusItem:s&&f,role:"listbox"},v,{children:p.map((e=>{var t,n;if(g&&null!=(t=e.isDisabled)&&t.call(e,e.value))return null;const r=e.isSelected(e.value);return X.jsx(b,ne({onClick:()=>!d&&l(e.value),selected:r,disabled:u||(null==(n=e.isDisabled)?void 0:n.call(e,e.value)),disableRipple:d,role:"option","aria-disabled":d,"aria-label":e.ariaLabel,"aria-selected":r},null==h?void 0:h.digitalClockSectionItem,{children:e.label}),e.label)}))}))})),Vj=({now:e,value:t,utils:n,ampm:r,isDisabled:o,resolveAriaLabel:a,timeStep:i})=>{const s=t?n.getHours(t):null,l=[],c=e=>null!==s&&(r?12===e?12===s||0===s:s===e||s-12===e:s===e),u=r?11:23;for(let t=0;t<=u;t+=i){let i=n.format(n.setHours(e,t),r?"hours12h":"hours24h");const s=a(parseInt(i,10).toString());i=n.formatNumber(i),l.push({value:t,label:i,isSelected:c,isDisabled:o,ariaLabel:s})}return l},Yj=({value:e,isDisabled:t,timeStep:n,resolveLabel:r,resolveAriaLabel:o,hasValue:a=!0})=>{const i=t=>null!==e&&(a&&e===t);return[...Array.from({length:Math.ceil(60/n)},((e,a)=>{const s=n*a;return{value:s,label:r(s),isDisabled:t,isSelected:i,ariaLabel:o(s.toString())}}))]},Fj=["ampm","timeSteps","autoFocus","components","componentsProps","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableClock","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","skipDisabled","timezone"],Xj=mo(Gw,{name:"MuiMultiSectionDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`}))),Qj=B.forwardRef((function(e,t){const n=zb(),r=uo({props:e,name:"MuiMultiSectionDigitalClock"}),{ampm:o=n.is12HourCycleInCurrentLocale(),timeSteps:a,autoFocus:i,components:s,componentsProps:l,slots:c,slotProps:u,value:d,defaultValue:p,referenceDate:f,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:h,minTime:g,disableFuture:v,disablePast:y,minutesStep:A=1,shouldDisableClock:b,shouldDisableTime:x,onChange:w,view:j,views:M=["hours","minutes"],openTo:O,onViewChange:C,focusedView:z,onFocusedViewChange:D,className:T,disabled:P,readOnly:N,skipDisabled:k=!1,timezone:E}=r,L=Wt(r,Fj),{value:S,handleValueChange:I,timezone:W}=kb({name:"MultiSectionDigitalClock",timezone:E,value:d,defaultValue:p,onChange:w,valueManager:wb}),H=Db(),R=Tb(W),V=B.useMemo((()=>ne({hours:1,minutes:5,seconds:5},a)),[a]),Y=jj({value:S,referenceDate:f,utils:n,props:r,timezone:W}),F=lt(((e,t,n)=>I(e,t,n))),Q=B.useMemo((()=>o&&M.includes("hours")?M.includes("meridiem")?M:[...M,"meridiem"]:M),[o,M]),{view:Z,setValueAndGoToView:G,focusedView:U}=Kx({view:j,views:Q,openTo:O,onViewChange:C,onChange:F,focusedView:z,onFocusedViewChange:D}),q=lt((e=>{G(e,null,"meridiem")})),{meridiemMode:K,handleMeridiemChange:J}=wx(Y,o,q,"finish"),_=B.useCallback(((e,t)=>{const r=_A(m,n),a="hours"===t||"minutes"===t&&Q.includes("seconds"),i=({start:e,end:t})=>(!g||!r(g,t))&&((!h||!r(e,h))&&((!v||!r(e,R))&&(!y||!r(R,a?t:e)))),s=(e,r=1)=>{if(e%r!=0)return!1;if(null!=b&&b(e,t))return!1;if(x)switch(t){case"hours":return!x(n.setHours(Y,e),"hours");case"minutes":return!x(n.setMinutes(Y,e),"minutes");case"seconds":return!x(n.setSeconds(Y,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=qA(e,K,o),r=n.setHours(Y,t);return!i({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case"minutes":{const t=n.setMinutes(Y,e);return!i({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,A)}case"seconds":{const t=n.setSeconds(Y,e);return!i({start:t,end:t})||!s(e)}default:throw new Error("not supported")}}),[o,Y,m,h,K,g,A,b,x,n,v,y,R,Q]),$=lt(((e,t)=>{const n=Q.indexOf(e),r=Q[n+1];G(t,r,e)})),ee=B.useCallback((e=>{switch(e){case"hours":return{onChange:e=>{const t=qA(e,K,o);$("hours",n.setHours(Y,t))},items:Vj({now:R,value:S,ampm:o,utils:n,isDisabled:e=>P||_(e,"hours"),timeStep:V.hours,resolveAriaLabel:H.hoursClockNumberText})};case"minutes":return{onChange:e=>{$("minutes",n.setMinutes(Y,e))},items:Yj({value:n.getMinutes(Y),isDisabled:e=>P||_(e,"minutes"),resolveLabel:e=>n.format(n.setMinutes(R,e),"minutes"),timeStep:V.minutes,hasValue:!!S,resolveAriaLabel:H.minutesClockNumberText})};case"seconds":return{onChange:e=>{$("seconds",n.setSeconds(Y,e))},items:Yj({value:n.getSeconds(Y),isDisabled:e=>P||_(e,"seconds"),resolveLabel:e=>n.format(n.setSeconds(R,e),"seconds"),timeStep:V.seconds,hasValue:!!S,resolveAriaLabel:H.secondsClockNumberText})};case"meridiem":{const e=QA(n,"am"),t=QA(n,"pm");return{onChange:J,items:[{value:"am",label:e,isSelected:()=>!!S&&"am"===K,ariaLabel:e},{value:"pm",label:t,isSelected:()=>!!S&&"pm"===K,ariaLabel:t}]}}default:throw new Error(`Unknown view: ${e} found.`)}}),[R,S,o,n,V.hours,V.minutes,V.seconds,H.hoursClockNumberText,H.minutesClockNumberText,H.secondsClockNumberText,K,$,Y,P,_,J]),te=B.useMemo((()=>Q.reduce(((e,t)=>ne({},e,{[t]:ee(t)})),{})),[Q,ee]),re=r,oe=(e=>{const{classes:t}=e;return Pt({root:["root"]},Lj,t)})(re);return X.jsx(Xj,ne({ref:t,className:Jn(oe.root,T),ownerState:re,role:"group"},L,{children:Object.entries(te).map((([e,t])=>X.jsx(Rj,{items:t.items,onChange:t.onChange,active:Z===e,autoFocus:null!=i?i:U===e,disabled:P,readOnly:N,slots:null!=c?c:s,slotProps:null!=u?u:l,skipDisabled:k,"aria-label":H.selectViewText(e)},e)))}))}));"production"!==process.env.NODE_ENV&&(Qj.propTypes={ampm:Pe.bool,autoFocus:Pe.bool,classes:Pe.object,className:Pe.string,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disablePast:Pe.bool,focusedView:Pe.oneOf(["hours","meridiem","minutes","seconds"]),maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onChange:Pe.func,onFocusedViewChange:Pe.func,onViewChange:Pe.func,openTo:Pe.oneOf(["hours","meridiem","minutes","seconds"]),readOnly:Pe.bool,referenceDate:Pe.any,shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,skipDisabled:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),timeSteps:Pe.shape({hours:Pe.number,minutes:Pe.number,seconds:Pe.number}),timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours","meridiem","minutes","seconds"]),views:Pe.arrayOf(Pe.oneOf(["hours","meridiem","minutes","seconds"]).isRequired)});const Zj=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,ampmInClock:y,components:A,componentsProps:b,slots:x,slotProps:w,readOnly:j,disabled:M,sx:O,autoFocus:C,showViewSwitcher:z,disableIgnoringDatePartForTimeValidation:D,timezone:T})=>X.jsx(Dj,{view:e,onViewChange:t,focusedView:n&&GA(n)?n:null,onFocusedViewChange:r,views:o.filter(GA),value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,ampmInClock:y,components:A,componentsProps:b,slots:x,slotProps:w,readOnly:j,disabled:M,sx:O,autoFocus:C,showViewSwitcher:z,disableIgnoringDatePartForTimeValidation:D,timezone:T}),Gj=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,components:y,componentsProps:A,slots:b,slotProps:x,readOnly:w,disabled:j,sx:M,autoFocus:O,disableIgnoringDatePartForTimeValidation:C,timeSteps:z,skipDisabled:D,timezone:T})=>X.jsx(Ej,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(GA),value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,components:y,componentsProps:A,slots:b,slotProps:x,readOnly:w,disabled:j,sx:M,autoFocus:O,disableIgnoringDatePartForTimeValidation:C,timeStep:null==z?void 0:z.minutes,skipDisabled:D,timezone:T}),Uj=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,components:y,componentsProps:A,slots:b,slotProps:x,readOnly:w,disabled:j,sx:M,autoFocus:O,disableIgnoringDatePartForTimeValidation:C,timeSteps:z,skipDisabled:D,timezone:T})=>X.jsx(Qj,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(GA),value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,components:y,componentsProps:A,slots:b,slotProps:x,readOnly:w,disabled:j,sx:M,autoFocus:O,disableIgnoringDatePartForTimeValidation:C,timeSteps:z,skipDisabled:D,timezone:T}),qj=B.forwardRef((function(e,t){var n,r,o,a,i,s,l;const c=Db(),u=zb(),d=Bx(e,"MuiDesktopTimePicker"),p=null!=(n=d.thresholdToRenderTimeInASingleColumn)?n:24,f=ne({hours:1,minutes:5,seconds:5},d.timeSteps),m=1440/(f.hours*f.minutes)<=p,h=m?Gj:Uj,g=ne({hours:h,minutes:h,seconds:h,meridiem:h},d.viewRenderers),v=null==(r=d.ampmInClock)||r,y=m?[]:["accept"],A=(null==(o=g.hours)?void 0:o.name)===Uj.name,b=d.ampm&&A?[...d.views,"meridiem"]:d.views,x=ne({},d,{ampmInClock:v,timeSteps:f,viewRenderers:g,format:$A(u,d),views:m?["hours"]:b,slots:ne({field:_b,openPickerIcon:Sx},d.slots),slotProps:ne({},d.slotProps,{field:e=>{var n;return ne({},To(null==(n=d.slotProps)?void 0:n.field,e),Zb(d),{ref:t})},toolbar:ne({hidden:!0,ampmInClock:v},null==(a=d.slotProps)?void 0:a.toolbar),actionBar:ne({actions:y},null==(i=d.slotProps)?void 0:i.actionBar)})}),{renderPicker:w}=(e=>{var t,n,r,o,a;let{props:i,getOpenDialogAriaText:s}=e,l=Wt(e,Sw);const{slots:c,slotProps:u,className:d,sx:p,format:f,formatDensity:m,timezone:h,label:g,inputRef:v,readOnly:y,disabled:A,autoFocus:b,localeText:x}=i,w=zb(),j=B.useRef(null),M=B.useRef(null),O=at(),C=null!=(t=null==u||null==(n=u.toolbar)?void 0:n.hidden)&&t,{open:z,actions:D,hasUIView:T,layoutProps:P,renderCurrentView:N,shouldRestoreFocus:k,fieldProps:E}=tw(ne({},l,{props:i,inputRef:j,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),L=null!=(r=c.inputAdornment)?r:Fx,S=Wt(ko({elementType:L,externalSlotProps:null==u?void 0:u.inputAdornment,additionalProps:{position:"end"},ownerState:i}),Iw),I=null!=(o=c.openPickerButton)?o:zp,W=Wt(ko({elementType:I,externalSlotProps:null==u?void 0:u.openPickerButton,additionalProps:{disabled:A||y,onClick:D.onOpen,"aria-label":s(E.value,w),edge:S.position},ownerState:i}),Ww),H=c.openPickerIcon,R=c.field,V=ko({elementType:R,externalSlotProps:null==u?void 0:u.field,additionalProps:ne({},E,C&&{id:O},{readOnly:y,disabled:A,className:d,sx:p,format:f,formatDensity:m,timezone:h,label:g,autoFocus:b&&!i.open,focused:!!z||void 0}),ownerState:i});T&&(V.InputProps=ne({},V.InputProps,{ref:M,[`${S.position}Adornment`]:X.jsx(L,ne({},S,{children:X.jsx(I,ne({},W,{children:X.jsx(H,ne({},null==u?void 0:u.openPickerIcon))}))}))}));const Y=ne({textField:c.textField},V.slots),F=null!=(a=c.layout)?a:Lw,Q=ct(j,V.inputRef,v);let Z=O;C&&(Z=g?`${O}-label`:void 0);const G=ne({},u,{toolbar:ne({},null==u?void 0:u.toolbar,{titleId:O}),popper:ne({"aria-labelledby":Z},null==u?void 0:u.popper)});return{renderPicker:()=>X.jsxs(RA,{localeText:x,children:[X.jsx(R,ne({},V,{slots:Y,slotProps:G,inputRef:Q})),X.jsx(Gx,ne({role:"dialog",placement:"bottom-start",anchorEl:M.current},D,{open:z,slots:c,slotProps:G,shouldRestoreFocus:k,children:X.jsx(F,ne({},P,null==G?void 0:G.layout,{slots:c,slotProps:G,children:N()}))}))]})}})({props:x,valueManager:wb,valueType:"time",getOpenDialogAriaText:null!=(s=null==(l=x.localeText)?void 0:l.openTimePickerDialogue)?s:c.openTimePickerDialogue,validator:Vb});return w()}));function Kj(e){return Et("MuiDialogContent",e)}qj.propTypes={ampm:Pe.bool,ampmInClock:Pe.bool,autoFocus:Pe.bool,className:Pe.string,closeOnSelect:Pe.bool,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disableOpenPicker:Pe.bool,disablePast:Pe.bool,format:Pe.string,formatDensity:Pe.oneOf(["dense","spacious"]),inputRef:Pe.oneOfType([Pe.func,Pe.shape({current:Pe.object})]),label:Pe.node,localeText:Pe.object,maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onAccept:Pe.func,onChange:Pe.func,onClose:Pe.func,onError:Pe.func,onOpen:Pe.func,onSelectedSectionsChange:Pe.func,onViewChange:Pe.func,open:Pe.bool,openTo:Pe.oneOf(["hours","meridiem","minutes","seconds"]),orientation:Pe.oneOf(["landscape","portrait"]),readOnly:Pe.bool,selectedSections:Pe.oneOfType([Pe.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),Pe.number,Pe.shape({endIndex:Pe.number.isRequired,startIndex:Pe.number.isRequired})]),shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,skipDisabled:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),thresholdToRenderTimeInASingleColumn:Pe.number,timeSteps:Pe.shape({hours:Pe.number,minutes:Pe.number,seconds:Pe.number}),timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:Pe.shape({hours:Pe.func,meridiem:Pe.func,minutes:Pe.func,seconds:Pe.func}),views:Pe.arrayOf(Pe.oneOf(["hours","minutes","seconds"]).isRequired)},Lt("MuiDialogContent",["root","dividers"]);var Jj=Lt("MuiDialogTitle",["root"]);const _j=["className","dividers"],$j=mo("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((({theme:e,ownerState:t})=>ne({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${Jj.root} + &`]:{paddingTop:0}}))),eM=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1}=n,a=Wt(n,_j),i=ne({},n,{dividers:o}),s=(e=>{const{classes:t,dividers:n}=e;return Pt({root:["root",n&&"dividers"]},Kj,t)})(i);return X.jsx($j,ne({className:Jn(s.root,r),ownerState:i,ref:t},a))}));"production"!==process.env.NODE_ENV&&(eM.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,dividers:Pe.bool,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var tM=eM;function nM(e){return Et("MuiDialog",e)}var rM=Lt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);const oM=B.createContext({});"production"!==process.env.NODE_ENV&&(oM.displayName="DialogContext");var aM=oM;const iM=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],sM=mo(ja,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),lM=mo(Da,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),cM=mo("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Ue(n.scroll)}`]]}})((({ownerState:e})=>ne({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),uM=mo(Ua,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Ue(n.scroll)}`],t[`paperWidth${Ue(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((({theme:e,ownerState:t})=>ne({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===t.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===t.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===t.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${rM.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&"xs"!==t.maxWidth&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${rM.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${rM.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}))),dM=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiDialog"}),r=co(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":i,BackdropComponent:s,BackdropProps:l,children:c,className:u,disableEscapeKeyDown:d=!1,fullScreen:p=!1,fullWidth:f=!1,maxWidth:m="sm",onBackdropClick:h,onClose:g,open:v,PaperComponent:y=Ua,PaperProps:A={},scroll:b="paper",TransitionComponent:x=ya,transitionDuration:w=o,TransitionProps:j}=n,M=Wt(n,iM),O=ne({},n,{disableEscapeKeyDown:d,fullScreen:p,fullWidth:f,maxWidth:m,scroll:b}),C=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e;return Pt({root:["root"],container:["container",`scroll${Ue(n)}`],paper:["paper",`paperScroll${Ue(n)}`,`paperWidth${Ue(String(r))}`,o&&"paperFullWidth",a&&"paperFullScreen"]},nM,t)})(O),z=B.useRef(),D=at(i),T=B.useMemo((()=>({titleId:D})),[D]);return X.jsx(lM,ne({className:Jn(C.root,u),closeAfterTransition:!0,components:{Backdrop:sM},componentsProps:{backdrop:ne({transitionDuration:w,as:s},l)},disableEscapeKeyDown:d,onClose:g,open:v,ref:t,onClick:e=>{z.current&&(z.current=null,h&&h(e),g&&g(e,"backdropClick"))},ownerState:O},M,{children:X.jsx(x,ne({appear:!0,in:v,timeout:w,role:"presentation"},j,{children:X.jsx(cM,{className:Jn(C.container),onMouseDown:e=>{z.current=e.target===e.currentTarget},ownerState:O,children:X.jsx(uM,ne({as:y,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":D},A,{className:Jn(C.paper,A.className),ownerState:O,children:X.jsx(aM.Provider,{value:T,children:c})}))})}))}))}));"production"!==process.env.NODE_ENV&&(dM.propTypes={"aria-describedby":Pe.string,"aria-labelledby":Pe.string,BackdropComponent:Pe.elementType,BackdropProps:Pe.object,children:Pe.node,classes:Pe.object,className:Pe.string,disableEscapeKeyDown:Pe.bool,fullScreen:Pe.bool,fullWidth:Pe.bool,maxWidth:Pe.oneOfType([Pe.oneOf(["xs","sm","md","lg","xl",!1]),Pe.string]),onBackdropClick:Pe.func,onClose:Pe.func,open:Pe.bool.isRequired,PaperComponent:Pe.elementType,PaperProps:Pe.object,scroll:Pe.oneOf(["body","paper"]),sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),TransitionComponent:Pe.elementType,transitionDuration:Pe.oneOfType([Pe.number,Pe.shape({appear:Pe.number,enter:Pe.number,exit:Pe.number})]),TransitionProps:Pe.object});var pM=dM;const fM=mo(pM)({[`& .${rM.container}`]:{outline:0},[`& .${rM.paper}`]:{outline:0,minWidth:320}}),mM=mo(tM)({"&:first-of-type":{padding:0}});function hM(e){var t,n;const{children:r,onDismiss:o,open:a,slots:i,slotProps:s}=e,l=null!=(t=null==i?void 0:i.dialog)?t:fM,c=null!=(n=null==i?void 0:i.mobileTransition)?n:ya;return X.jsx(l,ne({open:a,onClose:o},null==s?void 0:s.dialog,{TransitionComponent:c,TransitionProps:null==s?void 0:s.mobileTransition,PaperComponent:null==i?void 0:i.mobilePaper,PaperProps:null==s?void 0:s.mobilePaper,children:X.jsx(mM,{children:r})}))}const gM=["props","getOpenDialogAriaText"],vM=B.forwardRef((function(e,t){var n,r,o,a;const i=Db(),s=zb(),l=Bx(e,"MuiMobileTimePicker"),c=ne({hours:Zj,minutes:Zj,seconds:Zj},l.viewRenderers),u=null!=(n=l.ampmInClock)&&n,d=ne({},l,{ampmInClock:u,viewRenderers:c,format:$A(s,l),slots:ne({field:_b},l.slots),slotProps:ne({},l.slotProps,{field:e=>{var n;return ne({},To(null==(n=l.slotProps)?void 0:n.field,e),Zb(l),{ref:t})},toolbar:ne({hidden:!1,ampmInClock:u},null==(r=l.slotProps)?void 0:r.toolbar)})}),{renderPicker:p}=(e=>{var t,n,r;let{props:o,getOpenDialogAriaText:a}=e,i=Wt(e,gM);const{slots:s,slotProps:l,className:c,sx:u,format:d,formatDensity:p,timezone:f,label:m,inputRef:h,readOnly:g,disabled:v,localeText:y}=o,A=zb(),b=B.useRef(null),x=at(),w=null!=(t=null==l||null==(n=l.toolbar)?void 0:n.hidden)&&t,{open:j,actions:M,layoutProps:O,renderCurrentView:C,fieldProps:z}=tw(ne({},i,{props:o,inputRef:b,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),D=s.field,T=ko({elementType:D,externalSlotProps:null==l?void 0:l.field,additionalProps:ne({},z,w&&{id:x},!(v||g)&&{onClick:M.onOpen,onKeyDown:(P=M.onOpen,e=>{"Enter"!==e.key&&" "!==e.key||(P(e),e.preventDefault(),e.stopPropagation()),N&&N(e)})},{readOnly:null==g||g,disabled:v,className:c,sx:u,format:d,formatDensity:p,timezone:f,label:m}),ownerState:o});var P,N;T.inputProps=ne({},T.inputProps,{"aria-label":a(z.value,A)});const k=ne({textField:s.textField},T.slots),E=null!=(r=s.layout)?r:Lw,L=ct(b,T.inputRef,h);let S=x;w&&(S=m?`${x}-label`:void 0);const I=ne({},l,{toolbar:ne({},null==l?void 0:l.toolbar,{titleId:x}),mobilePaper:ne({"aria-labelledby":S},null==l?void 0:l.mobilePaper)});return{renderPicker:()=>X.jsxs(RA,{localeText:y,children:[X.jsx(D,ne({},T,{slots:k,slotProps:I,inputRef:L})),X.jsx(hM,ne({},M,{open:j,slots:s,slotProps:I,children:X.jsx(E,ne({},O,null==I?void 0:I.layout,{slots:s,slotProps:I,children:C()}))}))]})}})({props:d,valueManager:wb,valueType:"time",getOpenDialogAriaText:null!=(o=null==(a=d.localeText)?void 0:a.openTimePickerDialogue)?o:i.openTimePickerDialogue,validator:Vb});return p()}));vM.propTypes={ampm:Pe.bool,ampmInClock:Pe.bool,autoFocus:Pe.bool,className:Pe.string,closeOnSelect:Pe.bool,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disableOpenPicker:Pe.bool,disablePast:Pe.bool,format:Pe.string,formatDensity:Pe.oneOf(["dense","spacious"]),inputRef:Pe.oneOfType([Pe.func,Pe.shape({current:Pe.object})]),label:Pe.node,localeText:Pe.object,maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onAccept:Pe.func,onChange:Pe.func,onClose:Pe.func,onError:Pe.func,onOpen:Pe.func,onSelectedSectionsChange:Pe.func,onViewChange:Pe.func,open:Pe.bool,openTo:Pe.oneOf(["hours","minutes","seconds"]),orientation:Pe.oneOf(["landscape","portrait"]),readOnly:Pe.bool,selectedSections:Pe.oneOfType([Pe.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),Pe.number,Pe.shape({endIndex:Pe.number.isRequired,startIndex:Pe.number.isRequired})]),shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours","minutes","seconds"]),viewRenderers:Pe.shape({hours:Pe.func,minutes:Pe.func,seconds:Pe.func}),views:Pe.arrayOf(Pe.oneOf(["hours","minutes","seconds"]).isRequired)};const yM=["desktopModeMediaQuery"],AM=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiTimePicker"}),{desktopModeMediaQuery:r=Wb}=n,o=Wt(n,yM);return Ri(r,{defaultMatches:!0})?X.jsx(qj,ne({ref:t},o)):X.jsx(vM,ne({ref:t},o))}));function bM(t){var n=this,r=t.label,o=t.size,a=t.fieldName,i=t.fullWidth,s=t.setValue,l=t.getValues,c=B.useState(null),u=c[0],d=c[1];return e.useEffect((function(){G(n,void 0,void 0,(function(){return U(this,(function(e){return l(a)&&d(vh.convertToOriginal(l(a))),[2]}))}))}),[a]),X.jsx(RA,{dateAdapter:IA,children:X.jsx(AM,{label:r,value:u,onChange:function(e){if(e){var t=vh.stringifyTime(e);s(a,t||""),d(e)}},slots:{textField:function(e){return X.jsx(Qd,Q({},e,{size:o,name:a,fullWidth:i||!0}))}}})})}function xM(e){var t=e.name,r=e.disabled,o=e.label,a=e.size,i=e.showPassword,s=e.setShowPassword;return X.jsx(as,{size:a,disabled:r,name:t,type:i?"text":"password",InputProps:{endAdornment:X.jsx(n.InputAdornment,{position:"end",children:X.jsx(n.IconButton,{onClick:function(){return s(!i)},edge:"end",children:X.jsx(xo,{icon:i?"eva:eye-fill":"eva:eye-off-fill"})})})},label:o})}function wM(e){var t=e.handleDrop,r=e.list,o=e.itemComponent;return X.jsx(z.DragDropContext,{onDragEnd:function(e,n){return t(e)},children:X.jsx(z.Droppable,{droppableId:"list-container",children:function(e){return X.jsx("div",Q({className:"list-container"},e.droppableProps,{ref:e.innerRef,children:X.jsxs(n.Stack,{spacing:3,children:[r.map((function(e,t){return X.jsx(z.Draggable,{draggableId:e.id,index:t,children:function(n){return X.jsx("div",Q({className:"item-container",ref:n.innerRef},n.dragHandleProps,n.draggableProps,{children:o(e,t)}))}},e.id)})),e.placeholder]})}))}})})}function jM(e){var t=e.index,r=e.draggable,o=e.item,a=e.itemComponent,i=e.handleRemove;return X.jsx(n.Card,{sx:{paddingTop:1,paddingBottom:3,paddingX:r?1:3,cursor:"auto"},children:X.jsxs(n.Stack,{direction:"row",spacing:2,children:[r&&X.jsx(n.IconButton,{color:"error",size:"small",sx:{alignSelf:"center",cursor:"move"},children:X.jsx(xo,{icon:"icon-park:drag"})}),X.jsxs(n.Stack,{spacing:1.5,width:"100%",children:[X.jsxs(n.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[X.jsx(n.Typography,{color:"grey",fontSize:10,variant:"overline",sx:{color:"text.disabled"},children:"["+(t+1)+"]"}),X.jsx(n.IconButton,{onClick:function(){return i(t)},color:"error",size:"medium",children:X.jsx(xo,{icon:"eva:trash-2-outline"})})]}),a(t,o)]})]})})}var MM;function OM(e){var t=e.draggable,r=e.handleDrop,o=e.itemComponent,a=e.list,i=e.handleRemove,s=e.direction,l=e.numberOfColumns,c=(null!=s?s:MM.VERTICAL)===MM.VERTICAL,u=c?12:12/(null!=l?l:3);return X.jsx(X.Fragment,{children:t?X.jsx(wM,{handleDrop:r,list:a,itemComponent:function(e,n){return X.jsx(jM,{item:e,draggable:t,index:n,itemComponent:o,handleRemove:i})}}):c?X.jsx(n.Stack,{spacing:3,children:a.map((function(e,n){return X.jsx(jM,{draggable:t,item:e,index:n,itemComponent:o,handleRemove:i},e.id)}))}):X.jsx(n.Grid,{container:!0,spacing:3,children:a.map((function(e,r){return X.jsx(n.Grid,{item:!0,xs:12,md:u,children:X.jsx(jM,{draggable:t,item:e,index:r,itemComponent:o,handleRemove:i},e.id)},e.id)}))})})}function CM(e){var t=e.draggable,r=e.addButtonText,o=e.handleRemove,a=e.itemComponent,i=e.handleDrop,s=e.handleAdd,l=e.list,c=e.direction,u=e.numberOfColumns;return X.jsxs(n.Stack,{spacing:3,children:[X.jsx(OM,{handleRemove:o,draggable:t,handleDrop:i,list:l,itemComponent:a,direction:c,numberOfColumns:u}),X.jsx(n.Button,{size:"small",startIcon:X.jsx(xo,{icon:"eva:plus-fill"}),onClick:s,sx:{flexShrink:0,alignSelf:"start",padding:1},children:null!=r?r:"Add"})]})}function zM(e){var t=e.name,r=e.disabled,o=e.label,a=e.getValues,i=e.handleChange;return X.jsx(n.FormControlLabel,{control:X.jsx(n.Checkbox,{checked:a(t),onChange:i,name:t,disabled:r}),label:o})}function DM(e){var t=e.values,r=e.name,o=e.label,a=e.size,i=e.disabled;return X.jsx(is,{name:r,size:a,label:o,disabled:i,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:null==t?void 0:t.map((function(e){return X.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:rv.enhance(e)},e)}))})}function TM(e){var t=e.key,r=e.name,o=e.handleDrop;return X.jsx(n.Grid,{item:!0,xs:12,md:3,children:X.jsx(n.Box,{sx:{mb:5,mt:5},children:X.jsx(Ki,{name:r,accept:{"image/*":[".jpeg",".png"]},maxSize:3145728,onDrop:function(e){return o(e,r)},helperText:X.jsxs(n.Typography,{variant:"caption",sx:{mt:2,mx:"auto",display:"block",textAlign:"center",color:"text.secondary"},children:["Allowed *.jpeg, *.jpg, *.png, *.gif",X.jsx("br",{})," max size of ",Di(3145728)]})})})},t)}function PM(e){var t=e.name,n=e.minDate,r=e.maxDate,o=Z(e,["name","minDate","maxDate"]),a=c.useFormContext().control;return X.jsx(c.Controller,{name:t,control:a,render:function(e){var t=e.field,a=e.fieldState.error;return X.jsx(v.DateTimePicker,{label:o.label,value:new Date(t.value),minDate:null==n?void 0:n.getDate(),maxDate:null==r?void 0:r.getDate(),onChange:function(e){t.onChange(e)},slotProps:{textField:{fullWidth:!0,margin:"normal",helperText:null==a?void 0:a.message,error:!!a}}})}})}"production"!==process.env.NODE_ENV&&(AM.propTypes={ampm:Pe.bool,ampmInClock:Pe.bool,autoFocus:Pe.bool,className:Pe.string,closeOnSelect:Pe.bool,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,desktopModeMediaQuery:Pe.string,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disableOpenPicker:Pe.bool,disablePast:Pe.bool,format:Pe.string,formatDensity:Pe.oneOf(["dense","spacious"]),inputRef:Pe.oneOfType([Pe.func,Pe.shape({current:Pe.object})]),label:Pe.node,localeText:Pe.object,maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onAccept:Pe.func,onChange:Pe.func,onClose:Pe.func,onError:Pe.func,onOpen:Pe.func,onSelectedSectionsChange:Pe.func,onViewChange:Pe.func,open:Pe.bool,openTo:Pe.oneOf(["hours","meridiem","minutes","seconds"]),orientation:Pe.oneOf(["landscape","portrait"]),readOnly:Pe.bool,selectedSections:Pe.oneOfType([Pe.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),Pe.number,Pe.shape({endIndex:Pe.number.isRequired,startIndex:Pe.number.isRequired})]),shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,skipDisabled:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),thresholdToRenderTimeInASingleColumn:Pe.number,timeSteps:Pe.shape({hours:Pe.number,minutes:Pe.number,seconds:Pe.number}),timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:Pe.shape({hours:Pe.func,meridiem:Pe.func,minutes:Pe.func,seconds:Pe.func}),views:Pe.arrayOf(Pe.oneOf(["hours","minutes","seconds"]).isRequired)}),function(e){e.HORIZONTAL="HORIZONTAL",e.VERTICAL="VERTICAL"}(MM||(MM={}));var NM,kM={exports:{}},BM={exports:{}};function EM(){return NM||(NM=1,BM.exports=function(){var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:G(e)}function r(e){return s(e)?e:U(e)}function o(e){return l(e)?e:q(e)}function a(e){return i(e)&&!c(e)?e:K(e)}function i(e){return!(!e||!e[d])}function s(e){return!(!e||!e[p])}function l(e){return!(!e||!e[f])}function c(e){return s(e)||l(e)}function u(e){return!(!e||!e[m])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=s,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=o,n.Set=a;var d="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",f="@@__IMMUTABLE_INDEXED__@@",m="@@__IMMUTABLE_ORDERED__@@",h="delete",g=5,v=1<<g,y=v-1,A={},b={value:!1},x={value:!1};function w(e){return e.value=!1,e}function j(e){e&&(e.value=!0)}function M(){}function O(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(D)),e.size}function z(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function D(){return!0}function T(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function P(e,t){return k(e,t,0)}function N(e,t){return k(e,t,t)}function k(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var B=0,E=1,L=2,S="function"==typeof Symbol&&Symbol.iterator,I="@@iterator",W=S||I;function H(e){this.next=e}function R(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function V(){return{value:void 0,done:!0}}function Y(e){return!!Q(e)}function F(e){return e&&"function"==typeof e.next}function X(e){var t=Q(e);return t&&t.call(e)}function Q(e){var t=e&&(S&&e[S]||e[I]);if("function"==typeof t)return t}function Z(e){return e&&"number"==typeof e.length}function G(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function U(e){return null==e?ie().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function q(e){return null==e?ie():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():le(e)}function K(e){return(null==e?ie():i(e)?s(e)?e.entrySeq():e:le(e)).toSetSeq()}H.prototype.toString=function(){return"[Iterator]"},H.KEYS=B,H.VALUES=E,H.ENTRIES=L,H.prototype.inspect=H.prototype.toSource=function(){return this.toString()},H.prototype[W]=function(){return this},t(G,n),G.of=function(){return G(arguments)},G.prototype.toSeq=function(){return this},G.prototype.toString=function(){return this.__toString("Seq {","}")},G.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},G.prototype.__iterate=function(e,t){return de(this,e,t,!0)},G.prototype.__iterator=function(e,t){return pe(this,e,t,!0)},t(U,G),U.prototype.toKeyedSeq=function(){return this},t(q,G),q.of=function(){return q(arguments)},q.prototype.toIndexedSeq=function(){return this},q.prototype.toString=function(){return this.__toString("Seq [","]")},q.prototype.__iterate=function(e,t){return de(this,e,t,!1)},q.prototype.__iterator=function(e,t){return pe(this,e,t,!1)},t(K,G),K.of=function(){return K(arguments)},K.prototype.toSetSeq=function(){return this},G.isSeq=ae,G.Keyed=U,G.Set=K,G.Indexed=q;var J,_,$,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ae(e){return!(!e||!e[ee])}function ie(){return J||(J=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():F(e)?new oe(e).fromEntrySeq():Y(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function le(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=ue(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ue(e){return Z(e)?new te(e):F(e)?new oe(e):Y(e)?new re(e):void 0}function de(e,t,n,r){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var s=o[n?a-i:i];if(!1===t(s[1],r?s[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function pe(e,t,n,r){var o=e._cache;if(o){var a=o.length-1,i=0;return new H((function(){var e=o[n?a-i:i];return i++>a?V():R(t,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,n)}function fe(e,t){return t?me(t,e,"",{"":e}):he(e)}function me(e,t,n,r){return Array.isArray(t)?e.call(r,n,q(t).map((function(n,r){return me(e,n,r,t)}))):ge(t)?e.call(r,n,U(t).map((function(n,r){return me(e,n,r,t)}))):t}function he(e){return Array.isArray(e)?q(e).map(he).toList():ge(e)?U(e).map(he).toMap():e}function ge(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ve(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ye(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ve(o[1],e)&&(n||ve(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var d=!0,p=t.__iterate((function(t,r){if(n?!e.has(t):o?!ve(t,e.get(r,A)):!ve(e.get(r,A),t))return d=!1,!1}));return d&&e.size===p}function Ae(e,t){if(!(this instanceof Ae))return new Ae(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(_)return _;_=this}}function be(e,t){if(!e)throw new Error(t)}function xe(e,t,n){if(!(this instanceof xe))return new xe(e,t,n);if(be(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if($)return $;$=this}}function we(){throw TypeError("Abstract")}function je(){}function Me(){}function Oe(){}G.prototype[ee]=!0,t(te,q),te.prototype.get=function(e,t){return this.has(e)?this._array[z(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===e(n[t?r-o:o],o,this))return o+1;return o},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,o=0;return new H((function(){return o>r?V():R(e,o,n[t?r-o++:o++])}))},t(ne,U),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,a=0;a<=o;a++){var i=r[t?o-a:a];if(!1===e(n[i],i,this))return a+1}return a},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,a=0;return new H((function(){var i=r[t?o-a:a];return a++>o?V():R(e,i,n[i])}))},ne.prototype[m]=!0,t(re,q),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=X(this._iterable),r=0;if(F(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=X(this._iterable);if(!F(n))return new H(V);var r=0;return new H((function(){var t=n.next();return t.done?t:R(e,r++,t.value)}))},t(oe,q),oe.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,a=0;a<o.length;)if(!1===e(o[a],a++,this))return a;for(;!(n=r.next()).done;){var i=n.value;if(o[a]=i,!1===e(i,a++,this))break}return a},oe.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,o=0;return new H((function(){if(o>=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return R(e,o,r[o++])}))},t(Ae,q),Ae.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Ae.prototype.get=function(e,t){return this.has(e)?this._value:t},Ae.prototype.includes=function(e){return ve(this._value,e)},Ae.prototype.slice=function(e,t){var n=this.size;return T(e,t,n)?this:new Ae(this._value,N(t,n)-P(e,n))},Ae.prototype.reverse=function(){return this},Ae.prototype.indexOf=function(e){return ve(this._value,e)?0:-1},Ae.prototype.lastIndexOf=function(e){return ve(this._value,e)?this.size:-1},Ae.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},Ae.prototype.__iterator=function(e,t){var n=this,r=0;return new H((function(){return r<n.size?R(e,r++,n._value):V()}))},Ae.prototype.equals=function(e){return e instanceof Ae?ve(this._value,e._value):ye(e)},t(xe,q),xe.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},xe.prototype.get=function(e,t){return this.has(e)?this._start+z(this,e)*this._step:t},xe.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},xe.prototype.slice=function(e,t){return T(e,t,this.size)?this:(e=P(e,this.size),(t=N(t,this.size))<=e?new xe(0,0):new xe(this.get(e,this._end),this.get(t,this._end),this._step))},xe.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},xe.prototype.lastIndexOf=function(e){return this.indexOf(e)},xe.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,a=0;a<=n;a++){if(!1===e(o,a,this))return a+1;o+=t?-r:r}return a},xe.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,a=0;return new H((function(){var i=o;return o+=t?-r:r,a>n?V():R(e,a++,i)}))},xe.prototype.equals=function(e){return e instanceof xe?this._start===e._start&&this._end===e._end&&this._step===e._step:ye(this,e)},t(we,n),t(je,we),t(Me,we),t(Oe,we),we.Keyed=je,we.Indexed=Me,we.Set=Oe;var Ce="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ze(e){return e>>>1&1073741824|3221225471&e}function De(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ze(n)}if("string"===t)return e.length>He?Te(e):Pe(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ne(e);if("function"==typeof e.toString)return Pe(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Te(e){var t=Ye[e];return void 0===t&&(t=Pe(e),Ve===Re&&(Ve=0,Ye={}),Ve++,Ye[e]=t),t}function Pe(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ze(t)}function Ne(e){var t;if(Se&&void 0!==(t=Le.get(e)))return t;if(void 0!==(t=e[We]))return t;if(!Be){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[We]))return t;if(void 0!==(t=Ee(e)))return t}if(t=++Ie,1073741824&Ie&&(Ie=0),Se)Le.set(e,t);else{if(void 0!==ke&&!1===ke(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Be)Object.defineProperty(e,We,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[We]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[We]=t}}return t}var ke=Object.isExtensible,Be=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Ee(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Le,Se="function"==typeof WeakMap;Se&&(Le=new WeakMap);var Ie=0,We="__immutablehash__";"function"==typeof Symbol&&(We=Symbol(We));var He=16,Re=255,Ve=0,Ye={};function Fe(e){be(e!==1/0,"Cannot perform this action with an infinite size.")}function Xe(e){return null==e?ot():Qe(e)&&!u(e)?e:ot().withMutations((function(t){var n=r(e);Fe(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Qe(e){return!(!e||!e[Ge])}t(Xe,je),Xe.prototype.toString=function(){return this.__toString("Map {","}")},Xe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Xe.prototype.set=function(e,t){return at(this,e,t)},Xe.prototype.setIn=function(e,t){return this.updateIn(e,A,(function(){return t}))},Xe.prototype.remove=function(e){return at(this,e,A)},Xe.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return A}))},Xe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Xe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=gt(this,wn(e),t,n);return r===A?void 0:r},Xe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ot()},Xe.prototype.merge=function(){return pt(this,void 0,arguments)},Xe.prototype.mergeWith=function(t){return pt(this,t,e.call(arguments,1))},Xe.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Xe.prototype.mergeDeep=function(){return pt(this,ft,arguments)},Xe.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return pt(this,mt(t),n)},Xe.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Xe.prototype.sort=function(e){return Yt(dn(this,e))},Xe.prototype.sortBy=function(e,t){return Yt(dn(this,t,e))},Xe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Xe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new M)},Xe.prototype.asImmutable=function(){return this.__ensureOwner()},Xe.prototype.wasAltered=function(){return this.__altered},Xe.prototype.__iterator=function(e,t){return new et(this,e,t)},Xe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Xe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Xe.isMap=Qe;var Ze,Ge="@@__IMMUTABLE_MAP__@@",Ue=Xe.prototype;function qe(e,t){this.ownerID=e,this.entries=t}function Ke(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function _e(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function $e(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return R(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var o=Object.create(Ue);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ot(){return Ze||(Ze=rt(0))}function at(e,t,n){var r,o;if(e._root){var a=w(b),i=w(x);if(r=it(e._root,e.__ownerID,0,void 0,t,n,a,i),!i.value)return e;o=e.size+(a.value?n===A?-1:1:0)}else{if(n===A)return e;o=1,r=new qe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(o,r):ot()}function it(e,t,n,r,o,a,i,s){return e?e.update(t,n,r,o,a,i,s):a===A?e:(j(s),j(i),new $e(t,r,[o,a]))}function st(e){return e.constructor===$e||e.constructor===_e}function lt(e,t,n,r,o){if(e.keyHash===r)return new _e(t,r,[e.entry,o]);var a,i=(0===n?e.keyHash:e.keyHash>>>n)&y,s=(0===n?r:r>>>n)&y;return new Ke(t,1<<i|1<<s,i===s?[lt(e,t,n+g,r,o)]:(a=new $e(t,r,o),i<s?[e,a]:[a,e]))}function ct(e,t,n,r){e||(e=new M);for(var o=new $e(e,De(n),[n,r]),a=0;a<t.length;a++){var i=t[a];o=o.update(e,0,void 0,i[0],i[1])}return o}function ut(e,t,n,r){for(var o=0,a=0,i=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==r&&(o|=l,i[a++]=u)}return new Ke(e,o,i)}function dt(e,t,n,r,o){for(var a=0,i=new Array(v),s=0;0!==n;s++,n>>>=1)i[s]=1&n?t[a++]:void 0;return i[r]=o,new Je(e,a+1,i)}function pt(e,t,n){for(var o=[],a=0;a<n.length;a++){var s=n[a],l=r(s);i(s)||(l=l.map((function(e){return fe(e)}))),o.push(l)}return ht(e,t,o)}function ft(e,t,n){return e&&e.mergeDeep&&i(t)?e.mergeDeep(t):ve(e,t)?e:t}function mt(e){return function(t,n,r){if(t&&t.mergeDeepWith&&i(n))return t.mergeDeepWith(e,n);var o=e(t,n,r);return ve(t,o)?t:o}}function ht(e,t,n){return 0===(n=n.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,A,(function(e){return e===A?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},o=0;o<n.length;o++)n[o].forEach(r)})):e.constructor(n[0])}function gt(e,t,n,r){var o=e===A,a=t.next();if(a.done){var i=o?n:e,s=r(i);return s===i?e:s}be(o||e&&e.set,"invalid keyPath");var l=a.value,c=o?A:e.get(l,A),u=gt(c,t,n,r);return u===c?e:u===A?e.remove(l):(o?ot():e).set(l,u)}function vt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function yt(e,t,n,r){var o=r?e:O(e);return o[t]=n,o}function At(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var a=new Array(o),i=0,s=0;s<o;s++)s===t?(a[s]=n,i=-1):a[s]=e[s+i];return a}function bt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),a=0,i=0;i<r;i++)i===t&&(a=1),o[i]=e[i+a];return o}Ue[Ge]=!0,Ue[h]=Ue.remove,Ue.removeIn=Ue.deleteIn,qe.prototype.get=function(e,t,n,r){for(var o=this.entries,a=0,i=o.length;a<i;a++)if(ve(n,o[a][0]))return o[a][1];return r},qe.prototype.update=function(e,t,n,r,o,a,i){for(var s=o===A,l=this.entries,c=0,u=l.length;c<u&&!ve(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(j(i),(s||!d)&&j(a),!s||1!==l.length){if(!d&&!s&&l.length>=xt)return ct(e,l,r,o);var p=e&&e===this.ownerID,f=p?l:O(l);return d?s?c===u-1?f.pop():f[c]=f.pop():f[c]=[r,o]:f.push([r,o]),p?(this.entries=f,this):new qe(e,f)}},Ke.prototype.get=function(e,t,n,r){void 0===t&&(t=De(n));var o=1<<((0===e?t:t>>>e)&y),a=this.bitmap;return 0==(a&o)?r:this.nodes[vt(a&o-1)].get(e+g,t,n,r)},Ke.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=De(r));var s=(0===t?n:n>>>t)&y,l=1<<s,c=this.bitmap,u=0!=(c&l);if(!u&&o===A)return this;var d=vt(c&l-1),p=this.nodes,f=u?p[d]:void 0,m=it(f,e,t+g,n,r,o,a,i);if(m===f)return this;if(!u&&m&&p.length>=wt)return dt(e,p,c,s,m);if(u&&!m&&2===p.length&&st(p[1^d]))return p[1^d];if(u&&m&&1===p.length&&st(m))return m;var h=e&&e===this.ownerID,v=u?m?c:c^l:c|l,b=u?m?yt(p,d,m,h):bt(p,d,h):At(p,d,m,h);return h?(this.bitmap=v,this.nodes=b,this):new Ke(e,v,b)},Je.prototype.get=function(e,t,n,r){void 0===t&&(t=De(n));var o=(0===e?t:t>>>e)&y,a=this.nodes[o];return a?a.get(e+g,t,n,r):r},Je.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=De(r));var s=(0===t?n:n>>>t)&y,l=o===A,c=this.nodes,u=c[s];if(l&&!u)return this;var d=it(u,e,t+g,n,r,o,a,i);if(d===u)return this;var p=this.count;if(u){if(!d&&--p<jt)return ut(e,c,p,s)}else p++;var f=e&&e===this.ownerID,m=yt(c,s,d,f);return f?(this.count=p,this.nodes=m,this):new Je(e,p,m)},_e.prototype.get=function(e,t,n,r){for(var o=this.entries,a=0,i=o.length;a<i;a++)if(ve(n,o[a][0]))return o[a][1];return r},_e.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=De(r));var s=o===A;if(n!==this.keyHash)return s?this:(j(i),j(a),lt(this,e,t,n,[r,o]));for(var l=this.entries,c=0,u=l.length;c<u&&!ve(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(j(i),(s||!d)&&j(a),s&&2===u)return new $e(e,this.keyHash,l[1^c]);var p=e&&e===this.ownerID,f=p?l:O(l);return d?s?c===u-1?f.pop():f[c]=f.pop():f[c]=[r,o]:f.push([r,o]),p?(this.entries=f,this):new _e(e,this.keyHash,f)},$e.prototype.get=function(e,t,n,r){return ve(n,this.entry[0])?this.entry[1]:r},$e.prototype.update=function(e,t,n,r,o,a,i){var s=o===A,l=ve(r,this.entry[0]);return(l?o===this.entry[1]:s)?this:(j(i),s?void j(a):l?e&&e===this.ownerID?(this.entry[1]=o,this):new $e(e,this.keyHash,[r,o]):(j(a),lt(this,e,t,De(r),[r,o])))},qe.prototype.iterate=_e.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},Ke.prototype.iterate=Je.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var a=n[t?o-r:r];if(a&&!1===a.iterate(e,t))return!1}},$e.prototype.iterate=function(e,t){return e(this.entry)},t(et,H),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,o=t.index++;if(r.entry){if(0===o)return tt(e,r.entry)}else if(r.entries){if(o<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-o:o])}else if(o<=(n=r.nodes.length-1)){var a=r.nodes[this._reverse?n-o:o];if(a){if(a.entry)return tt(e,a.entry);t=this._stack=nt(a,t)}continue}t=this._stack=this._stack.__prev}return V()};var xt=v/4,wt=v/2,jt=v/4;function Mt(e){var t=Et();if(null==e)return t;if(Ot(e))return e;var n=o(e),r=n.size;return 0===r?t:(Fe(r),r>0&&r<v?Bt(0,r,g,null,new Dt(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function Ot(e){return!(!e||!e[Ct])}t(Mt,Me),Mt.of=function(){return this(arguments)},Mt.prototype.toString=function(){return this.__toString("List [","]")},Mt.prototype.get=function(e,t){if((e=z(this,e))>=0&&e<this.size){var n=Wt(this,e+=this._origin);return n&&n.array[e&y]}return t},Mt.prototype.set=function(e,t){return Lt(this,e,t)},Mt.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},Mt.prototype.insert=function(e,t){return this.splice(e,0,t)},Mt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=g,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Et()},Mt.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){Ht(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},Mt.prototype.pop=function(){return Ht(this,0,-1)},Mt.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){Ht(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},Mt.prototype.shift=function(){return Ht(this,1)},Mt.prototype.merge=function(){return Rt(this,void 0,arguments)},Mt.prototype.mergeWith=function(t){return Rt(this,t,e.call(arguments,1))},Mt.prototype.mergeDeep=function(){return Rt(this,ft,arguments)},Mt.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Rt(this,mt(t),n)},Mt.prototype.setSize=function(e){return Ht(this,0,e)},Mt.prototype.slice=function(e,t){var n=this.size;return T(e,t,n)?this:Ht(this,P(e,n),N(t,n))},Mt.prototype.__iterator=function(e,t){var n=0,r=kt(this,t);return new H((function(){var t=r();return t===Nt?V():R(e,n++,t)}))},Mt.prototype.__iterate=function(e,t){for(var n,r=0,o=kt(this,t);(n=o())!==Nt&&!1!==e(n,r++,this););return r},Mt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Bt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},Mt.isList=Ot;var Ct="@@__IMMUTABLE_LIST__@@",zt=Mt.prototype;function Dt(e,t){this.array=e,this.ownerID=t}zt[Ct]=!0,zt[h]=zt.remove,zt.setIn=Ue.setIn,zt.deleteIn=zt.removeIn=Ue.removeIn,zt.update=Ue.update,zt.updateIn=Ue.updateIn,zt.mergeIn=Ue.mergeIn,zt.mergeDeepIn=Ue.mergeDeepIn,zt.withMutations=Ue.withMutations,zt.asMutable=Ue.asMutable,zt.asImmutable=Ue.asImmutable,zt.wasAltered=Ue.wasAltered,Dt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&y;if(r>=this.array.length)return new Dt([],e);var o,a=0===r;if(t>0){var i=this.array[r];if((o=i&&i.removeBefore(e,t-g,n))===i&&a)return this}if(a&&!o)return this;var s=It(this,e);if(!a)for(var l=0;l<r;l++)s.array[l]=void 0;return o&&(s.array[r]=o),s},Dt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,o=n-1>>>t&y;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((r=a&&a.removeAfter(e,t-g,n))===a&&o===this.array.length-1)return this}var i=It(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var Tt,Pt,Nt={};function kt(e,t){var n=e._origin,r=e._capacity,o=Vt(r),a=e._tail;return i(e._root,e._level,0);function i(e,t,n){return 0===t?s(e,n):l(e,t,n)}function s(e,i){var s=i===o?a&&a.array:e&&e.array,l=i>n?0:n-i,c=r-i;return c>v&&(c=v),function(){if(l===c)return Nt;var e=t?--c:l++;return s&&s[e]}}function l(e,o,a){var s,l=e&&e.array,c=a>n?0:n-a>>o,u=1+(r-a>>o);return u>v&&(u=v),function(){for(;;){if(s){var e=s();if(e!==Nt)return e;s=null}if(c===u)return Nt;var n=t?--u:c++;s=i(l&&l[n],o-g,a+(n<<o))}}}}function Bt(e,t,n,r,o,a,i){var s=Object.create(zt);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=o,s.__ownerID=a,s.__hash=i,s.__altered=!1,s}function Et(){return Tt||(Tt=Bt(0,0,g))}function Lt(e,t,n){if((t=z(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?Ht(e,t).set(0,n):Ht(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,a=w(x);return t>=Vt(e._capacity)?r=St(r,e.__ownerID,0,t,n,a):o=St(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Bt(e._origin,e._capacity,e._level,o,r):e}function St(e,t,n,r,o,a){var i,s=r>>>n&y,l=e&&s<e.array.length;if(!l&&void 0===o)return e;if(n>0){var c=e&&e.array[s],u=St(c,t,n-g,r,o,a);return u===c?e:((i=It(e,t)).array[s]=u,i)}return l&&e.array[s]===o?e:(j(a),i=It(e,t),void 0===o&&s===i.array.length-1?i.array.pop():i.array[s]=o,i)}function It(e,t){return t&&e&&t===e.ownerID?e:new Dt(e?e.array.slice():[],t)}function Wt(e,t){if(t>=Vt(e._capacity))return e._tail;if(t<1<<e._level+g){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&y],r-=g;return n}}function Ht(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new M,o=e._origin,a=e._capacity,i=o+t,s=void 0===n?a:n<0?a+n:o+n;if(i===o&&s===a)return e;if(i>=s)return e.clear();for(var l=e._level,c=e._root,u=0;i+u<0;)c=new Dt(c&&c.array.length?[void 0,c]:[],r),u+=1<<(l+=g);u&&(i+=u,o+=u,s+=u,a+=u);for(var d=Vt(a),p=Vt(s);p>=1<<l+g;)c=new Dt(c&&c.array.length?[c]:[],r),l+=g;var f=e._tail,m=p<d?Wt(e,s-1):p>d?new Dt([],r):f;if(f&&p>d&&i<a&&f.array.length){for(var h=c=It(c,r),v=l;v>g;v-=g){var A=d>>>v&y;h=h.array[A]=It(h.array[A],r)}h.array[d>>>g&y]=f}if(s<a&&(m=m&&m.removeAfter(r,0,s)),i>=p)i-=p,s-=p,l=g,c=null,m=m&&m.removeBefore(r,0,i);else if(i>o||p<d){for(u=0;c;){var b=i>>>l&y;if(b!==p>>>l&y)break;b&&(u+=(1<<l)*b),l-=g,c=c.array[b]}c&&i>o&&(c=c.removeBefore(r,l,i-u)),c&&p<d&&(c=c.removeAfter(r,l,p-u)),u&&(i-=u,s-=u)}return e.__ownerID?(e.size=s-i,e._origin=i,e._capacity=s,e._level=l,e._root=c,e._tail=m,e.__hash=void 0,e.__altered=!0,e):Bt(i,s,l,c,m)}function Rt(e,t,n){for(var r=[],a=0,s=0;s<n.length;s++){var l=n[s],c=o(l);c.size>a&&(a=c.size),i(l)||(c=c.map((function(e){return fe(e)}))),r.push(c)}return a>e.size&&(e=e.setSize(a)),ht(e,t,r)}function Vt(e){return e<v?0:e-1>>>g<<g}function Yt(e){return null==e?Qt():Ft(e)?e:Qt().withMutations((function(t){var n=r(e);Fe(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ft(e){return Qe(e)&&u(e)}function Xt(e,t,n,r){var o=Object.create(Yt.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function Qt(){return Pt||(Pt=Xt(ot(),Et()))}function Zt(e,t,n){var r,o,a=e._map,i=e._list,s=a.get(t),l=void 0!==s;if(n===A){if(!l)return e;i.size>=v&&i.size>=2*a.size?(r=(o=i.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=a.remove(t),o=s===i.size-1?i.pop():i.set(s,void 0))}else if(l){if(n===i.get(s)[1])return e;r=a,o=i.set(s,[t,n])}else r=a.set(t,i.size),o=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Xt(r,o)}function Gt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Ut(e){this._iter=e,this.size=e.size}function qt(e){this._iter=e,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Jt(e){var t=An(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=bn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===L){var r=e.__iterator(t,n);return new H((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===E?B:E,n)},t}function _t(e,t,n){var r=An(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var a=e.get(r,A);return a===A?o:t.call(n,a,r,e)},r.__iterateUncached=function(r,o){var a=this;return e.__iterate((function(e,o,i){return!1!==r(t.call(n,e,o,i),o,a)}),o)},r.__iteratorUncached=function(r,o){var a=e.__iterator(L,o);return new H((function(){var o=a.next();if(o.done)return o;var i=o.value,s=i[0];return R(r,s,t.call(n,i[1],s,e),o)}))},r}function $t(e,t){var n=An(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Jt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=bn,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var o=An(e);return r&&(o.has=function(r){var o=e.get(r,A);return o!==A&&!!t.call(n,o,r,e)},o.get=function(r,o){var a=e.get(r,A);return a!==A&&t.call(n,a,r,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,s=0;return e.__iterate((function(e,a,l){if(t.call(n,e,a,l))return s++,o(e,r?a:s-1,i)}),a),s},o.__iteratorUncached=function(o,a){var i=e.__iterator(L,a),s=0;return new H((function(){for(;;){var a=i.next();if(a.done)return a;var l=a.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return R(o,r?c:s++,u,a)}}))},o}function tn(e,t,n){var r=Xe().asMutable();return e.__iterate((function(o,a){r.update(t.call(n,o,a,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=s(e),o=(u(e)?Yt():Xe()).asMutable();e.__iterate((function(a,i){o.update(t.call(n,a,i,e),(function(e){return(e=e||[]).push(r?[i,a]:a),e}))}));var a=yn(e);return o.map((function(t){return hn(e,a(t))}))}function rn(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),T(t,n,o))return e;var a=P(t,o),i=N(n,o);if(a!=a||i!=i)return rn(e.toSeq().cacheResult(),t,n,r);var s,l=i-a;l==l&&(s=l<0?0:l);var c=An(e);return c.size=0===s?s:e.size&&s||void 0,!r&&ae(e)&&s>=0&&(c.get=function(t,n){return(t=z(this,t))>=0&&t<s?e.get(t+a,n):n}),c.__iterateUncached=function(t,n){var o=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var i=0,l=!0,c=0;return e.__iterate((function(e,n){if(!l||!(l=i++<a))return c++,!1!==t(e,r?n:c-1,o)&&c!==s})),c},c.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var o=0!==s&&e.__iterator(t,n),i=0,l=0;return new H((function(){for(;i++<a;)o.next();if(++l>s)return V();var e=o.next();return r||t===E?e:R(t,l-1,t===B?void 0:e.value[1],e)}))},c}function on(e,t,n){var r=An(e);return r.__iterateUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterate(r,o);var i=0;return e.__iterate((function(e,o,s){return t.call(n,e,o,s)&&++i&&r(e,o,a)})),i},r.__iteratorUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterator(r,o);var i=e.__iterator(L,o),s=!0;return new H((function(){if(!s)return V();var e=i.next();if(e.done)return e;var o=e.value,l=o[0],c=o[1];return t.call(n,c,l,a)?r===L?e:R(r,l,c,e):(s=!1,V())}))},r}function an(e,t,n,r){var o=An(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var s=!0,l=0;return e.__iterate((function(e,a,c){if(!s||!(s=t.call(n,e,a,c)))return l++,o(e,r?a:l-1,i)})),l},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var s=e.__iterator(L,a),l=!0,c=0;return new H((function(){var e,a,u;do{if((e=s.next()).done)return r||o===E?e:R(o,c++,o===B?void 0:e.value[1],e);var d=e.value;a=d[0],u=d[1],l&&(l=t.call(n,u,a,i))}while(l);return o===L?e:R(o,a,u,e)}))},o}function sn(e,t){var n=s(e),o=[e].concat(t).map((function(e){return i(e)?n&&(e=r(e)):e=n?se(e):le(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||n&&s(a)||l(e)&&l(a))return a}var c=new te(o);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function ln(e,t,n){var r=An(e);return r.__iterateUncached=function(r,o){var a=0,s=!1;function l(e,c){var u=this;e.__iterate((function(e,o){return(!t||c<t)&&i(e)?l(e,c+1):!1===r(e,n?o:a++,u)&&(s=!0),!s}),o)}return l(e,0),a},r.__iteratorUncached=function(r,o){var a=e.__iterator(r,o),s=[],l=0;return new H((function(){for(;a;){var e=a.next();if(!1===e.done){var c=e.value;if(r===L&&(c=c[1]),t&&!(s.length<t)||!i(c))return n?e:R(r,l++,c,e);s.push(a),a=c.__iterator(r,o)}else a=s.pop()}return V()}))},r}function cn(e,t,n){var r=yn(e);return e.toSeq().map((function(o,a){return r(t.call(n,o,a,e))})).flatten(!0)}function un(e,t){var n=An(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var o=this,a=0;return e.__iterate((function(e,r){return(!a||!1!==n(t,a++,o))&&!1!==n(e,a++,o)}),r),a},n.__iteratorUncached=function(n,r){var o,a=e.__iterator(E,r),i=0;return new H((function(){return(!o||i%2)&&(o=a.next()).done?o:i%2?R(n,i++,t):R(n,i++,o.value,o)}))},n}function dn(e,t,n){t||(t=xn);var r=s(e),o=0,a=e.toSeq().map((function(t,r){return[r,t,o++,n?n(t,r,e):t]})).toArray();return a.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),r?U(a):l(e)?q(a):K(a)}function pn(e,t,n){if(t||(t=xn),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return fn(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return fn(t,e,n)?n:e}))}function fn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function mn(e,t,r){var o=An(e);return o.size=new te(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(E,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=r.map((function(e){return e=n(e),X(o?e.reverse():e)})),i=0,s=!1;return new H((function(){var n;return s||(n=a.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?V():R(e,i++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function hn(e,t){return ae(e)?t:e.constructor(t)}function gn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function vn(e){return Fe(e.size),C(e)}function yn(e){return s(e)?r:l(e)?o:a}function An(e){return Object.create((s(e)?U:l(e)?q:K).prototype)}function bn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):G.prototype.cacheResult.call(this)}function xn(e,t){return e>t?1:e<t?-1:0}function wn(e){var t=X(e);if(!t){if(!Z(e))throw new TypeError("Expected iterable or array-like: "+e);t=X(n(e))}return t}function jn(e,t){var n,r=function(a){if(a instanceof r)return a;if(!(this instanceof r))return new r(a);if(!n){n=!0;var i=Object.keys(e);zn(o,i),o.size=i.length,o._name=t,o._keys=i,o._defaultValues=e}this._map=Xe(a)},o=r.prototype=Object.create(Mn);return o.constructor=r,r}t(Yt,Xe),Yt.of=function(){return this(arguments)},Yt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Yt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Yt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Qt()},Yt.prototype.set=function(e,t){return Zt(this,e,t)},Yt.prototype.remove=function(e){return Zt(this,e,A)},Yt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Yt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},Yt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Yt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Xt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Yt.isOrderedMap=Ft,Yt.prototype[m]=!0,Yt.prototype[h]=Yt.prototype.remove,t(Gt,U),Gt.prototype.get=function(e,t){return this._iter.get(e,t)},Gt.prototype.has=function(e){return this._iter.has(e)},Gt.prototype.valueSeq=function(){return this._iter.valueSeq()},Gt.prototype.reverse=function(){var e=this,t=$t(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Gt.prototype.map=function(e,t){var n=this,r=_t(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Gt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?vn(this):0,function(o){return e(o,t?--n:n++,r)}),t)},Gt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(E,t),r=t?vn(this):0;return new H((function(){var o=n.next();return o.done?o:R(e,t?--r:r++,o.value,o)}))},Gt.prototype[m]=!0,t(Ut,q),Ut.prototype.includes=function(e){return this._iter.includes(e)},Ut.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},Ut.prototype.__iterator=function(e,t){var n=this._iter.__iterator(E,t),r=0;return new H((function(){var t=n.next();return t.done?t:R(e,r++,t.value,t)}))},t(qt,K),qt.prototype.has=function(e){return this._iter.includes(e)},qt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},qt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(E,t);return new H((function(){var t=n.next();return t.done?t:R(e,t.value,t.value,t)}))},t(Kt,U),Kt.prototype.entrySeq=function(){return this._iter.toSeq()},Kt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){gn(t);var r=i(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},Kt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(E,t);return new H((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){gn(r);var o=i(r);return R(e,o?r.get(0):r[0],o?r.get(1):r[1],t)}}}))},Ut.prototype.cacheResult=Gt.prototype.cacheResult=qt.prototype.cacheResult=Kt.prototype.cacheResult=bn,t(jn,je),jn.prototype.toString=function(){return this.__toString(Cn(this)+" {","}")},jn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},jn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},jn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=On(this,ot()))},jn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Cn(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:On(this,n)},jn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:On(this,t)},jn.prototype.wasAltered=function(){return this._map.wasAltered()},jn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},jn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},jn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?On(this,t,e):(this.__ownerID=e,this._map=t,this)};var Mn=jn.prototype;function On(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Cn(e){return e._name||e.constructor.name||"Record"}function zn(e,t){try{t.forEach(Dn.bind(void 0,e))}catch(e){}}function Dn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){be(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function Tn(e){return null==e?Sn():Pn(e)&&!u(e)?e:Sn().withMutations((function(t){var n=a(e);Fe(n.size),n.forEach((function(e){return t.add(e)}))}))}function Pn(e){return!(!e||!e[kn])}Mn[h]=Mn.remove,Mn.deleteIn=Mn.removeIn=Ue.removeIn,Mn.merge=Ue.merge,Mn.mergeWith=Ue.mergeWith,Mn.mergeIn=Ue.mergeIn,Mn.mergeDeep=Ue.mergeDeep,Mn.mergeDeepWith=Ue.mergeDeepWith,Mn.mergeDeepIn=Ue.mergeDeepIn,Mn.setIn=Ue.setIn,Mn.update=Ue.update,Mn.updateIn=Ue.updateIn,Mn.withMutations=Ue.withMutations,Mn.asMutable=Ue.asMutable,Mn.asImmutable=Ue.asImmutable,t(Tn,Oe),Tn.of=function(){return this(arguments)},Tn.fromKeys=function(e){return this(r(e).keySeq())},Tn.prototype.toString=function(){return this.__toString("Set {","}")},Tn.prototype.has=function(e){return this._map.has(e)},Tn.prototype.add=function(e){return En(this,this._map.set(e,!0))},Tn.prototype.remove=function(e){return En(this,this._map.remove(e))},Tn.prototype.clear=function(){return En(this,this._map.clear())},Tn.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)a(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},Tn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return a(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},Tn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return a(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},Tn.prototype.merge=function(){return this.union.apply(this,arguments)},Tn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},Tn.prototype.sort=function(e){return In(dn(this,e))},Tn.prototype.sortBy=function(e,t){return In(dn(this,t,e))},Tn.prototype.wasAltered=function(){return this._map.wasAltered()},Tn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},Tn.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},Tn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},Tn.isSet=Pn;var Nn,kn="@@__IMMUTABLE_SET__@@",Bn=Tn.prototype;function En(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Ln(e,t){var n=Object.create(Bn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Sn(){return Nn||(Nn=Ln(ot()))}function In(e){return null==e?Yn():Wn(e)?e:Yn().withMutations((function(t){var n=a(e);Fe(n.size),n.forEach((function(e){return t.add(e)}))}))}function Wn(e){return Pn(e)&&u(e)}Bn[kn]=!0,Bn[h]=Bn.remove,Bn.mergeDeep=Bn.merge,Bn.mergeDeepWith=Bn.mergeWith,Bn.withMutations=Ue.withMutations,Bn.asMutable=Ue.asMutable,Bn.asImmutable=Ue.asImmutable,Bn.__empty=Sn,Bn.__make=Ln,t(In,Tn),In.of=function(){return this(arguments)},In.fromKeys=function(e){return this(r(e).keySeq())},In.prototype.toString=function(){return this.__toString("OrderedSet {","}")},In.isOrderedSet=Wn;var Hn,Rn=In.prototype;function Vn(e,t){var n=Object.create(Rn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Yn(){return Hn||(Hn=Vn(Qt()))}function Fn(e){return null==e?qn():Xn(e)?e:qn().unshiftAll(e)}function Xn(e){return!(!e||!e[Zn])}Rn[m]=!0,Rn.__empty=Yn,Rn.__make=Vn,t(Fn,Me),Fn.of=function(){return this(arguments)},Fn.prototype.toString=function(){return this.__toString("Stack [","]")},Fn.prototype.get=function(e,t){var n=this._head;for(e=z(this,e);n&&e--;)n=n.next;return n?n.value:t},Fn.prototype.peek=function(){return this._head&&this._head.value},Fn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Un(e,t)},Fn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Fe(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Un(t,n)},Fn.prototype.pop=function(){return this.slice(1)},Fn.prototype.unshift=function(){return this.push.apply(this,arguments)},Fn.prototype.unshiftAll=function(e){return this.pushAll(e)},Fn.prototype.shift=function(){return this.pop.apply(this,arguments)},Fn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):qn()},Fn.prototype.slice=function(e,t){if(T(e,t,this.size))return this;var n=P(e,this.size);if(N(t,this.size)!==this.size)return Me.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):Un(r,o)},Fn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Un(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Fn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Fn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new H((function(){if(r){var t=r.value;return r=r.next,R(e,n++,t)}return V()}))},Fn.isStack=Xn;var Qn,Zn="@@__IMMUTABLE_STACK__@@",Gn=Fn.prototype;function Un(e,t,n,r){var o=Object.create(Gn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function qn(){return Qn||(Qn=Un(0))}function Kn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Gn[Zn]=!0,Gn.withMutations=Ue.withMutations,Gn.asMutable=Ue.asMutable,Gn.asImmutable=Ue.asImmutable,Gn.wasAltered=Ue.wasAltered,n.Iterator=H,Kn(n,{toArray:function(){Fe(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Ut(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Gt(this,!0)},toMap:function(){return Xe(this.toKeyedSeq())},toObject:function(){Fe(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return Yt(this.toKeyedSeq())},toOrderedSet:function(){return In(s(this)?this.valueSeq():this)},toSet:function(){return Tn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new qt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Fn(s(this)?this.valueSeq():this)},toList:function(){return Mt(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return hn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ve(t,e)}))},entries:function(){return this.__iterator(L)},every:function(e,t){Fe(this.size);var n=!0;return this.__iterate((function(r,o,a){if(!e.call(t,r,o,a))return n=!1,!1})),n},filter:function(e,t){return hn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate((function(r,o,a){if(e.call(t,r,o,a))return n=[o,r],!1})),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return Fe(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Fe(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(B)},map:function(e,t){return hn(this,_t(this,e,t))},reduce:function(e,t,n){var r,o;return Fe(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,a,i){o?(o=!1,r=t):r=e.call(n,r,t,a,i)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return hn(this,$t(this,!0))},slice:function(e,t){return hn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return hn(this,dn(this,e))},values:function(){return this.__iterator(E)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return C(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ye(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(D)},flatMap:function(e,t){return hn(this,cn(this,e,t))},flatten:function(e){return hn(this,ln(this,e,!0))},fromEntrySeq:function(){return new Kt(this)},get:function(e,t){return this.find((function(t,n){return ve(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=wn(e);!(n=o.next()).done;){var a=n.value;if((r=r&&r.get?r.get(a,A):A)===A)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,A)!==A},hasIn:function(e){return this.getIn(e,A)!==A},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map($n).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return pn(this,e)},maxBy:function(e,t){return pn(this,t,e)},min:function(e){return pn(this,e?nr(e):ar)},minBy:function(e,t){return pn(this,t?nr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return hn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return hn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return hn(this,dn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return hn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return hn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var Jn=n.prototype;Jn[d]=!0,Jn[W]=Jn.values,Jn.__toJS=Jn.toArray,Jn.__toStringMapper=rr,Jn.inspect=Jn.toSource=function(){return this.toString()},Jn.chain=Jn.flatMap,Jn.contains=Jn.includes,function(){try{Object.defineProperty(Jn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch(e){}}(),Kn(r,{flip:function(){return hn(this,Jt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey((function(t){return ve(t,e)}))},lastKeyOf:function(e){return this.findLastKey((function(t){return ve(t,e)}))},mapEntries:function(e,t){var n=this,r=0;return hn(this,this.toSeq().map((function(o,a){return e.call(t,[a,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return hn(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var _n=r.prototype;function $n(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):e}function or(){return O(arguments)}function ar(e,t){return e<t?1:e>t?-1:0}function ir(e){if(e.size===1/0)return 0;var t=u(e),n=s(e),r=t?1:0;return sr(e.__iterate(n?t?function(e,t){r=31*r+lr(De(e),De(t))|0}:function(e,t){r=r+lr(De(e),De(t))|0}:t?function(e){r=31*r+De(e)|0}:function(e){r=r+De(e)|0}),r)}function sr(e,t){return t=Ce(t,3432918353),t=Ce(t<<15|t>>>-15,461845907),t=Ce(t<<13|t>>>-13,5),t=Ce((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ze((t=Ce(t^t>>>13,3266489909))^t>>>16)}function lr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}_n[p]=!0,_n[W]=Jn.entries,_n.__toJS=Jn.toObject,_n.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Kn(o,{toKeyedSeq:function(){return new Gt(this,!1)},filter:function(e,t){return hn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return hn(this,$t(this,!1))},slice:function(e,t){return hn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=P(e,e<0?this.count():this.size);var r=this.slice(0,e);return hn(this,1===n?r:r.concat(O(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return hn(this,ln(this,e,!1))},get:function(e,t){return(e=z(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=z(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return hn(this,un(this,e))},interleave:function(){var e=[this].concat(O(arguments)),t=mn(this.toSeq(),q.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),hn(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return hn(this,an(this,e,t,!1))},zip:function(){return hn(this,mn(this,or,[this].concat(O(arguments))))},zipWith:function(e){var t=O(arguments);return t[0]=this,hn(this,mn(this,e,t))}}),o.prototype[f]=!0,o.prototype[m]=!0,Kn(a,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),a.prototype.has=Jn.includes,Kn(U,r.prototype),Kn(q,o.prototype),Kn(K,a.prototype),Kn(je,r.prototype),Kn(Me,o.prototype),Kn(Oe,a.prototype);var cr={Iterable:n,Seq:G,Collection:we,Map:Xe,OrderedMap:Yt,List:Mt,Stack:Fn,Set:Tn,OrderedSet:In,Record:jn,Range:xe,Repeat:Ae,is:ve,fromJS:fe};return cr}()),BM.exports}window,kM.exports=function(e,t,n){return a={},r.m=o=[function(e,t,n){e.exports=n(10)()},function(t,n){t.exports=e},function(e,t,n){var r;
|
|
132
|
+
r.version="2.29.4",o(qn),r.fn=ca,r.min=$n,r.max=er,r.now=tr,r.utc=m,r.unix=ua,r.months=va,r.isDate=d,r.locale=hn,r.invalid=y,r.duration=Dr,r.isMoment=j,r.weekdays=Aa,r.parseZone=da,r.localeData=yn,r.isDuration=sr,r.monthsShort=ya,r.weekdaysMin=xa,r.defineLocale=gn,r.updateLocale=vn,r.locales=An,r.weekdaysShort=ba,r.normalizeUnits=re,r.relativeTimeRounding=oi,r.relativeTimeThreshold=ai,r.calendarFormat=Vr,r.prototype=ca,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}(Yg);var Fg=I(Yg.exports);function Xg(e){var t=e.value;return X.jsx(n.Typography,Q({style:{fontWeight:50},noWrap:!0},e,{children:Fg(new Date(t)).format("Do MMMM YYYY @ HH:MM")}))}function Qg(e){var t=e.value,r=e.enumvalues,o=r&&!r.includes(t)?"error":void 0,a=rv.enhance(t);return X.jsx(n.Chip,{label:a,color:o,size:"small"})}function Zg(e){var t=e.value;return X.jsx(n.Typography,Q({},e,{noWrap:!0,children:t.longitude&&t.latitude?X.jsx(n.Link,{align:"justify",style:{cursor:"pointer"},onClick:function(){return e=t.latitude,n=t.longitude,void window.open("https://maps.google.com?q="+e+","+n);var e,n},children:t.address}):X.jsx(n.Typography,Q({style:{fontWeight:50}},e,{noWrap:!0,children:t.address}))}))}function Gg(e){var t=e.value,r=e.children;return Z(e,["value","children"]),X.jsx(n.Card,{sx:{py:3,px:3},children:X.jsx(n.Grid,{children:t.map((function(e,t){return X.jsxs(n.Grid,{item:!0,xs:12,sx:{mb:5},children:[X.jsx(n.Typography,{color:"grey",fontSize:10,paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:"["+(t+1)+"]"}),r&&r(e,t)]},t)}))})})}function Ug(e){var t=e.navigateTo,o=e.value,a=r.useNavigate();return X.jsx(n.Link,{align:"justify",style:{cursor:"pointer"},onClick:function(){return a(t)},children:o})}var qg=require("pluralize");function Kg(e){var t,r=e.value,o=e.fieldkey,a=e.userpath,i=e.fieldschema,s=e.resources,l=e.path,c=null!=l?l:null==i?void 0:i.path,u=s[null!=c?c:""],d=u.properties,p=d.title,f=null===(t=d.actions.show)||void 0===t?void 0:t.isAccessible,m=ch.getReferenceImage(u,r);function h(){return vh.checkLocalizedString(s,null!=c?c:"",p)?lh.getLocalizedString(r[p]):r[p]?r[p]:r._id?r._id:tv}return X.jsxs(n.Stack,{direction:"row",spacing:1,alignItems:"center",children:[m&&X.jsx(n.Avatar,{alt:"-",src:m}),X.jsx(n.Typography,Q({},e.props,{children:f?X.jsx(Ug,{value:h(),navigateTo:a[c||qg.singular(o)].show(r._id)}):X.jsx(nv,Q({type:bm.STRING},e,{value:h()}))}))]})}function Jg(e){var t,r,o,a=e.value,i=e.userpath,s=e.resources,l=e.path,c=e.fieldschema,u=s[null!==(t=null==c?void 0:c.path)&&void 0!==t?t:""],d=u.properties,p=null==d?void 0:d.title,f=null===(o=null===(r=null==d?void 0:d.actions)||void 0===r?void 0:r.show)||void 0===o?void 0:o.isAccessible,m=ch.getReferenceImage(u,a);function h(){var e;return vh.checkLocalizedString(s,null!==(e=null==c?void 0:c.path)&&void 0!==e?e:"",p)?lh.getLocalizedString(a[p]):a[p]}if(a)return a.map((function(t){return X.jsxs(n.Stack,{direction:"row",spacing:1,alignItems:"center",children:[m&&X.jsx(n.Avatar,{alt:"-",src:m}),X.jsx(n.Typography,Q({},e.props,{children:f?X.jsx(Ug,{value:h(),navigateTo:i[null!=l?l:""].show(t._id)}):X.jsx(nv,Q({type:bm.STRING},e,{value:h()}))}))]},t._id)}))}function _g(e){var t=e.value,r=e.props;return null===t?X.jsx(n.Typography,Q({},r,{children:tv})):"[object Array]"!==Object.prototype.toString.call(t)?X.jsx(Kg,Q({},e)):t?X.jsx(Jg,Q({},e)):X.jsx(X.Fragment,{})}function $g(e){var t=e.htmlString;return X.jsx("div",{children:X.jsx(g,{value:t,readOnly:!0,theme:"bubble"})})}function ev(e){var t=e.value,r=e.type;return X.jsx(n.Card,{sx:{py:1,px:3},children:r&&r===bm.RICH_TEXT_I?X.jsx($g,{htmlString:t}):X.jsx("div",{dangerouslySetInnerHTML:{__html:t}})})}var tv="---";function nv(e){var t=e.value,r=e.fieldschema,o=e.type,a=e.enumvalues,i=e.children;if(null==t)return X.jsx(n.Typography,Q({},e,{children:tv}));switch(o){case bm.STRING:case bm.NUMBER:case bm.OBJECTID:case bm.PHONENUMBER:case bm.TIMEPICKER:case bm.PASSWORD:return X.jsx(n.Typography,Q({},e,{children:t}));case bm.NESTEDSCHEMA:return X.jsx(Wg,Q({},e,{value:t,fieldschema:r}));case bm.LOCALIZEDString:return X.jsx(Hg,{value:t});case bm.BOOLEAN:return X.jsx(n.Chip,{label:t?t.toString():"false",variant:"outlined",size:"small"});case bm.COLOR:return X.jsx(n.Typography,Q({},e,{color:t,children:t}));case bm.DATE:return X.jsx(Xg,Q({},e));case bm.ENUM:return X.jsx(Qg,Q({enumvalues:a},e));case bm.RICH_TEXT_I:case bm.RICH_TEXT_II:return X.jsx(ev,Q({},e));case bm.LOCATION:return X.jsx(Zg,Q({},e));case bm.IMAGE:return X.jsx("img",{src:t,alt:"",height:70});case bm.ARRAY:return t&&t.length>0?X.jsx(Gg,Q({},e,{value:t,children:i})):X.jsx(n.Typography,Q({},e,{children:tv}));case bm.REFERENCE:return X.jsx(_g,Q({},e));default:return X.jsx(X.Fragment,{})}}var rv=function(){function e(){}return e.enhance=function(e){var t=this;return e?e.includes("_")?e.split("_").map((function(e){return t.enhanceEnum(e)})).join(" "):this.enhanceEnum(e):tv},e.enhanceEnum=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e}(),ov=require("lodash");function av(e,t){var n,r,o,a,i,s,l,c,u,d,p=e.action,f=e.path,m=e.recordId;switch(p){case ym.LIST:return null!==(r=null===(n=t[f])||void 0===n?void 0:n.list)&&void 0!==r?r:f;case ym.NEW:return null!==(a=null===(o=t[f])||void 0===o?void 0:o.new)&&void 0!==a?a:f;case ym.SHOW:return null!==(s=null===(i=t[f])||void 0===i?void 0:i.show(m))&&void 0!==s?s:f;case ym.EDIT:return null!==(c=null===(l=t[f])||void 0===l?void 0:l.edit(m))&&void 0!==c?c:f;default:return null!==(d=null===(u=t[f])||void 0===u?void 0:u.list)&&void 0!==d?d:f}}function iv(t){var n=t.resourceName,o=t.params,a=t.resources,i=t.dialogState,s=t.paramsState,l=t.extras;s[0];var c=s[1],u=e.useContext(Im).dashbaordUrlPrefix,d=e.useContext(Zm).paths,p=th(),f=p.setSuccessAlert,m=p.setErrorAlert,h=p.setAlert,g=e.useState(null),v=g[0],y=g[1],A=function(){y(null)},b=o.row,x=a[n].properties,w=x.actions,j=x.modelName,M=i[1],O=[],C=r.useNavigate();return w.delete.isAccessible&&O.push({onClick:function(e){M({title:w?w.delete.confirmationMessageTitle:"",message:w?w.delete.confirmationMessageBody:"",onClose:function(){M({open:!1})},onConfirm:function(){var e;M({open:!1}),f(null!==(e=null==l?void 0:l.afterDeleteSnackBarText)&&void 0!==e?e:"Deleted successfully"),c((function(e){return Q(Q({},e),{filters:void 0,filter:void 0})}))},action:function(){return Lm.delete("".concat(u,"/").concat(a[n].properties.path,"/").concat(e._id))},open:!0})},title:w.delete.value,icon:X.jsx(xo,{icon:"eva:trash-2-outline"}),key:"delete",color:"error.main"}),w.edit.isAccessible&&O.push({onClick:function(e){C(d[n].edit(e._id))},title:w.edit.value,icon:X.jsx(xo,{icon:"eva:edit-fill"}),key:"edit",color:"black"}),w.show.isAccessible&&O.push({onClick:function(e){C(d[n].show(e._id))},title:w.show.value,icon:X.jsx(xo,{icon:"mdi:show-outline"}),key:"show",color:"black"}),b.extraActionKeys&&w.extras&&0!==b.extraActionKeys.length&&b.extraActionKeys.forEach((function(e){var t;w.extras.record[e]&&O.push({onClick:function(t){var n,r,o;w.extras.record[e].guard||Lm.post("".concat(u,"/actions/execute/").concat(e),{record:t,modelName:j}).then((function(t){var n,r,o=t.data.data.response;if(w.extras.record[e].handlerStrategy===xm.FILE_DOWNLOAD){var a=o.filePath;setTimeout((function(){window.open(a,"_blank")}))}else C(av(o,d)),h(null!==(n=w.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=w.extras.record[e].severity)&&void 0!==r?r:"success")})).catch((function(){m("Error happened")})),M({title:null!==(r=null!==(n=w.extras.record[e].guardTitle)&&void 0!==n?n:w.extras.record[e].name)&&void 0!==r?r:"",message:null!==(o=w.extras.record[e].guard)&&void 0!==o?o:"Do you want to execute this action?",onClose:function(){M({open:!1})},onConfirm:function(t){var n,r,o,a;switch(M({open:!1}),w.extras.record[e].handlerStrategy){case xm.NORMAL:t.action===ym.LIST?(c((function(e){return Q(Q({},e),{page:Av.page})})),h(null!==(n=w.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=w.extras.record[e].severity)&&void 0!==r?r:"success")):C(av(t,d));break;case xm.FILE_DOWNLOAD:var i=t.filePath;setTimeout((function(){window.open(i,"_blank")}));break;default:h(null!==(o=w.extras.record[e].message)&&void 0!==o?o:"Action executed Successfully",null!==(a=w.extras.record[e].severity)&&void 0!==a?a:"success")}},action:function(){return Lm.post("".concat(u,"/actions/execute/").concat(e),{record:t,modelName:j})},open:w.extras.record[e].guard})},title:w.extras.record[e].name,icon:fv(w.extras.record[e].icon),key:w.extras.record[e].name,color:null!==(t=w.extras.record[e].color)&&void 0!==t?t:"black"})})),X.jsx(wg,{open:v,onOpen:function(e){y(e.currentTarget)},onClose:A,actions:cv(O,A,b)})}function sv(e,t,o,a,i,s,l,c,u,d,p,f){if(!(s&&s.hasOwnProperty(o.key)&&null!==s[o.key]||t.valuePath))return X.jsx(n.Typography,Q({},i,{children:"--- "}));switch(t.type){case bm.STRING:if(/^#[0-9A-F]{6}$/i.test(a)){i.color=a,i.variant="body2";break}if(!s||!s.hasOwnProperty(o.key)||null===s[o.key]){e="---",i.variant="subtitle2";break}o.key===c&&l&&l.show.isAccessible&&(e=X.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:a}));break;case bm.OBJECTID:if(o.key===c&&l&&l.show.isAccessible){e=X.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:a});break}i.variant="subtitle2";break;case bm.NUMBER:case bm.PHONENUMBER:i.variant="subtitle2";break;case bm.DATE:var m=!(!p[o.key]||!p[o.key].withTime);i.variant="subtitle2",e=mh(s[o.key],m);break;case bm.LOCALIZEDString:var h=s[o.key]&&s[o.key][0]?lh.getLocalizedString(s[o.key]):"----";e=o.key===c&&l&&l.show.isAccessible?X.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:h}):h,i.variant="subtitle2";break;case bm.ENUM:return X.jsx(n.Chip,{label:rv.enhance(a),size:"small"});case bm.IMAGE:var g=Nh(a);return X.jsx("img",{src:"image"===g?a:kh(g),alt:a,height:80});case bm.BOOLEAN:return X.jsx(n.Chip,{label:"".concat(a),variant:"outlined",size:"small",component:"div"});case bm.NESTEDSCHEMA:i.variant="caption",i.color="GrayText",e="Object {...}";break;case bm.RICH_TEXT_I:case bm.RICH_TEXT_II:i.variant="caption",i.color="GrayText",e="<HTML... />";break;case bm.ARRAY:i.variant="caption",i.color="GrayText",e="Length ["+s[o.key].length+"]";break;case bm.REFERENCE:if(!s[o.key])break;var v=s[o.key].pathOfTable?s[o.key].pathOfTable:o.path,y=d[v];if(!(y&&y.properties&&s[o.key]&&v)){i.variant="subtitle2",e=a._id;break}var A=y.properties.title,b=vh.checkLocalizedString(d,v,A)?lh.getLocalizedString(s[o.key][A]):s[o.key][A]?s[o.key][A]:s[o.key]._id;if(!y.properties.actions.show.isAccessible){e=a?b:s[o.key]?s[o.key]._id:"---";break}e=X.jsx(n.Link,{align:"justify",href:f[v||o.key.toLowerCase()].show(a||s[o.key]&&s[o.key]._id?s[o.key]._id:""),children:a||s[o.key]._id?b:"---- "})}return X.jsx(n.Typography,Q({},i,{children:e}))}function lv(e,t,o,a,i){var s=a[e].properties?a[e].properties.model:void 0,l=a[e].properties,c=l.title,u=l.actions,d=o.value,p=o.row,f={color:"black",noWrap:!1,sx:{fontWeight:50,wordWrap:"break-word",whiteSpace:"normal"},variant:"body1"},m=d;if(t.key.includes(".")){var h=t.key.split("."),g={key:h[h.length-1],value:t.value,path:t.path},v=pv(t.key,p),y=dv(t.key,s),A=v?v[g.key]:null;return sv(A,y,g,A,f,v,u,c,e,a,s,i)}return p.hasOwnProperty(t.key)&&null!==p[t.key]?t.key===c?X.jsx(n.Typography,{variant:"body2",color:"black",noWrap:!0,children:u.show.isAccessible?X.jsx(n.Link,{align:"justify",component:r.Link,to:i[e].show(p._id),style:{cursor:"pointer"},children:s[t.key].type===bm.LOCALIZEDString?p[t.key][0]?lh.getLocalizedString(p[t.key]):"---":"object"==typeof p[t.key]?lh.getLocalizedString(p[t.key]):p[t.key]}):X.jsx(n.Typography,Q({},f,{children:s[t.key].type===bm.LOCALIZEDString?lh.getLocalizedString(p[t.key]):p[t.key]}))}):sv(m,s[t.key],t,d,f,p,u,c,e,a,s,i):s[t.key].valuePath?sv(m,s[t.key],t,ov.get(p,s[t.key].valuePath),f,p,u,c,e,a,s,i):X.jsx(n.Typography,Q({},f,{children:"--- "}))}function cv(e,t,r){return e.map((function(e){return X.jsxs(n.MenuItem,{onClick:function(){e.onClick(r,e.key),t()},sx:{color:e.color},children:[e.icon,e.title]},e.key)}))}function uv(t){var o=t.resources,a=t.resourceName,i=t.selected,s=t.bulkActionsDialogState,l=t.setBulkActionsDialogState,c=t.setSelected,u=e.useContext(Im).dashbaordUrlPrefix,d=e.useContext(Zm).paths,p=o[a].properties,f=p.actions,m=p.modelName,h=t.dialogState[1],g=t.gridState[1],v=th(),y=v.setErrorAlert,A=v.setAlert,b=r.useNavigate();return o[a].properties.actions.extras&&o[a].properties.actions.extras.resource?X.jsx(X.Fragment,{children:Object.keys(o[a].properties.actions.extras.resource).map((function(e){var t,r,o,a,p;if(!f.extras.resource[e])return X.jsx(X.Fragment,{});var v=null!==(t=f.extras.resource[e].message)&&void 0!==t?t:"Action executed Successfully",x=null!==(r=f.extras.resource[e].severity)&&void 0!==r?r:"success";return X.jsx(n.Button,{size:null!==(o=f.extras.resource[e].size)&&void 0!==o?o:"small",color:null!==(a=f.extras.resource[e].color)&&void 0!==a?a:"inherit",variant:null!==(p=f.extras.resource[e].variant)&&void 0!==p?p:"contained",startIcon:fv(f.extras.resource[e].icon),onClick:function(t){var n,r,o,a;if(!f.extras.resource[e].guard)switch(f.extras.resource[e].handlerStrategy){case xm.NORMAL:Lm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m}).then((function(e){var t=e.data.data.response;t.action===ym.LIST?(g((function(e){return Q(Q({},e),{page:Av.page})})),A(v,x)):b(av(t,d))})).catch((function(){y("Error happened")}));break;case xm.FILE_DOWNLOAD:Lm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m}).then((function(e){var t=e.data.data.response;setTimeout((function(){window.open(t.filePath,"_blank")}))})).catch((function(){}));break;case xm.CUSTOM_COMPONENT:var p=null!==(n=f.extras.resource[e].fullScreen)&&void 0!==n&&n;!function(e,t,n,r,o,a,i,c,u){var d=Q({},s);d[e]={state:t,modelName:n,saveLoadingState:r,fullScreen:a,setSelected:o,documentIds:null!=u?u:[],afterExecuteMessage:i,severity:c},l(d)}(e,!0,m,!1,c,p,v,x,i);break;default:A(v,x)}h({title:null!==(o=null!==(r=f.extras.resource[e].guardTitle)&&void 0!==r?r:f.extras.resource[e].name)&&void 0!==o?o:"",message:null!==(a=f.extras.resource[e].guard)&&void 0!==a?a:"Do you want to execute this action?",onClose:function(){h({open:!1})},onConfirm:function(t){switch(h({open:!1}),c((function(e){return[]})),f.extras.resource[e].handlerStrategy){case xm.NORMAL:t.action===ym.LIST?(g((function(e){return Q(Q({},e),{page:Av.page})})),A(v,x)):b(av(t,d));break;case xm.FILE_DOWNLOAD:t.filePath,setTimeout((function(){window.open(t.filePath,"_blank")}));break;default:A(v,x)}},action:function(){return Lm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m})},open:f.extras.resource[e].guard})},sx:{mr:1},children:f.extras.resource[e].name},e)}))}):X.jsx(X.Fragment,{})}function dv(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t[r];for(var o="",a=1;a<n.length;a++)o+=n[a],a!==n.length-1&&(o+=".");return dv(o,t[r].schema)}function pv(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t;for(var o="",a=1;a<n.length;a++)o+=n[a],a!==n.length-1&&(o+=".");return pv(o,t[r])}var fv=function(e){return X.jsx(Qm,{src:e,sx:{width:1,height:1}})};function mv(e,t,n,r,o,a){if(!r||!t||!r.hasOwnProperty(t.key)||null===r[t.key])return"---";switch(e.type){case bm.STRING:if(!r.hasOwnProperty(t.key)||null===r[t.key])return"---";break;case bm.DATE:return mh(n,!(!a[t.key]||!a[t.key].withTime));case bm.LOCALIZEDString:var i=r[t.key]&&r[t.key][0]?lh.getLocalizedString(r[t.key]):"----";return i||"---";case bm.NESTEDSCHEMA:return"Object {...}";case bm.ARRAY:return"Length ["+n.length+"]";case bm.REFERENCE:if(!r[t.key])break;var s=o[t.path];if(!s||!s.properties||!r[t.key])return n._id;var l=o[t.path].properties.title,c=vh.checkLocalizedString(o,t.path,l)?lh.getLocalizedString(r[t.key][l]):r[t.key][l];return s.properties.actions.show.isAccessible?n?c:"---- ":n?c:"---"}return n}function hv(e){var t,r=e.params,o=e.props,a=e.resourceName,i=e.extras,s=nh().paths,l=eh().resources;if(!l)return X.jsx(X.Fragment,{});var c=null===(t=l[a].properties.model[o.key])||void 0===t?void 0:t.isClickable,u=null==i?void 0:i.onClickProperty;return c?X.jsx(n.Button,{sx:{padding:0},onClick:function(){return u&&u[o.key]?u[o.key](o,a,r):void 0},children:lv(a,o,r,l,s)}):lv(a,o,r,l,s)}var gv=1,vv=[5,10,25,50,100],yv={currentPage:1,perPage:5,recordsCount:0},Av={page:gv,perPage:5};function bv(e,t,n,r,o,a,i){var s=e.map((function(e){return{field:e.key,headerName:e.value,align:"center",headerAlign:"center",flex:e.flex?e.flex:a?1:void 0,minWidth:a?void 0:150,valueGetter:function(r){return function(e,t,n,r){var o=r[e].properties?r[e].properties.model:void 0,a=r[e].properties,i=a.title;a.actions;var s=n.value,l=n.row;if(t.key.includes(".")){var c=t.key.split("."),u={key:c[c.length-1],value:t.value,path:t.path},d=pv(t.key,l);return mv(dv(t.key,o),u,d?d[u.key]:null,d,r,o)}return l.hasOwnProperty(t.key)&&null!==l[t.key]?t.key===i?o[t.key].type===bm.LOCALIZEDString?lh.getLocalizedString(l[t.key]):l[t.key]:mv(o[t.key],t,s,l,r,o):"---"}(n,e,r,t)},renderCell:function(t){return e.renderCell?e.renderCell(t):X.jsx(hv,{resourceName:n,params:t,props:e,extras:i})}}})),l={field:"actions",headerName:"",type:"number",editable:!1,align:"center",headerAlign:"left",disableColumnMenu:!0,flex:a?1:void 0,minWidth:a?void 0:150,hideable:!1,sortable:!1,disableExport:!0,renderCell:function(e){return X.jsx(iv,{resources:t,params:e,resourceName:n,dialogState:r,paramsState:o,extras:i})}};return!(null==i?void 0:i.hideActions)&&s.push(l),s}var xv=e.forwardRef((function(e,t){return X.jsx(n.Slide,Q({direction:"up",ref:t},e))}));function wv(t){var r,o,a=t.open,i=t.onClose,s=t.title,c=t.onConfirm,u=t.message,d=t.action,p=t.extras,f=e.useState(!1),m=f[0],h=f[1];return X.jsxs(n.Dialog,{open:a,fullWidth:!0,keepMounted:!0,onClose:function(e,t){"backdropClick"!==t&&i&&i()},"aria-describedby":"alert-dialog-slide-description",disableEscapeKeyDown:!0,TransitionComponent:xv,children:[X.jsx(n.DialogTitle,{children:s}),X.jsx(n.DialogContent,{children:X.jsx(n.DialogContentText,{id:"alert-dialog-slide-description",children:u})}),X.jsxs(n.DialogActions,{children:[X.jsx(n.Button,{color:"inherit",onClick:i,disabled:m,children:null!==(r=null==p?void 0:p.cancelText)&&void 0!==r?r:"Cancel"}),X.jsx(l.LoadingButton,{variant:"contained",onClick:function(){d&&(h(!0),d().then((function(e){var t=e.data.data?e.data.data.response:e.data.meta;h(!1),c&&c(t)})).catch((function(e){i&&i(),console.log(e)})))},loading:m,children:null!==(o=null==p?void 0:p.confirmText)&&void 0!==o?o:"Confirm"})]})]})}var jv=n.styled("div")((function(e){var t=e.theme;return{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%","& .ant-empty-img-1":{fill:"light"===t.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===t.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===t.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===t.palette.mode?"#fff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===t.palette.mode?"0.8":"0.08",fill:"light"===t.palette.mode?"#f5f5f5":"#fff"}}}));function Mv(e){var t=e.checkBox,r=e.numberOfColumns,o=Z(e,["checkBox","numberOfColumns"]),a=Array.apply(null,Array(r)).map((function(e,t){return t}));return X.jsx(n.TableRow,Q({},o,{children:X.jsx(n.TableCell,{children:X.jsxs(n.Stack,{spacing:2,gridRow:"auto",direction:"row",justifyContent:"space-around",width:920,children:[t&&X.jsx(n.Skeleton,{variant:"rectangular",width:20,height:20,sx:{borderRadius:1,flexShrink:0}}),a.map((function(e){return X.jsx(n.Skeleton,{variant:"text",width:150,height:20},e)}))]})})}))}var Ov=n.styled("div")((function(e){var t=e.theme;return{right:24,zIndex:9,bottom:40,display:"flex",position:"fixed",alignItems:"center",boxShadow:t.customShadows.z20,padding:t.spacing(1.5,1,1.5,2),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.text.primary}}));function Cv(e){var t,r=e.action,o=e.selected;e.rowCount,e.numSelected;var a=e.extras;e.onSelectAllItems;var i=e.sx,s=Z(e,["action","selected","rowCount","numSelected","extras","onSelectAllItems","sx"]);return X.jsx(n.Portal,{children:X.jsxs(Ov,Q({sx:i},s,{children:[X.jsxs(n.Typography,{variant:"subtitle2",sx:{mr:2,color:function(e){return"light"===e.palette.mode?"common.white":"grey.800"}},children:[o&&o.length,X.jsx(n.Box,{component:"span",sx:{ml:.5},children:null!==(t=null==a?void 0:a.itemsSelectedText)&&void 0!==t?t:"items selected"})]}),r&&r]}))})}function zv(){return X.jsxs(M.GridToolbarContainer,{sx:{mt:2},children:[X.jsx(M.GridToolbarColumnsButton,{}),X.jsx(M.GridToolbarFilterButton,{}),X.jsx(M.GridToolbarDensitySelector,{}),X.jsx(M.GridToolbarExport,{})]})}function Dv(e,t,n){return X.jsx(X.Fragment,{children:[1,2].map((function(e){return function(e,t,n){return X.jsx(Mv,{sx:{height:72},checkBox:t,numberOfColumns:n},e)}(e,t,n)}))})}function Tv(t){var o,a,i=this,s=t.resources,c=t.resourceName,u=t.paramsState,d=t.bulkActionsDialogState,p=t.extras,f=t.setBulkActionsDialogState,m=e.useContext(Im).dashbaordUrlPrefix;e.useContext(Zm).paths;var h=e.useState([]),g=(h[0],h[1]),v=e.useState([]),y=v[0],A=v[1],b=e.useState(!0),x=b[0],w=b[1],j=e.useState(yv),O=j[0],C=j[1],z=u[0],D=u[1],T=e.useState(!1),P=T[0],N=T[1],k=s[c];if(p&&p.overridenResource){var B=p.overridenResource(k);k=Q(Q({},k),B)}var E=k.properties.actions,L=e.useState([]),S=L[0],I=L[1],W=Vi("up","lg"),H=r.useSearchParams(),R=H[0],V=H[1];e.useContext(qm).defaultRowsPerPage;var Y,F=th().setSuccessAlert,Z=e.useState({open:!1,title:"",onClose:function(){},onConfirm:function(){}}),K=bv(k.listProperties,s,c,Z,u,W,p);return e.useEffect((function(){!function(e){G(i,void 0,void 0,(function(){return U(this,(function(t){return w(!0),Lm.get("".concat(m,"/").concat(k.properties.path),{params:e}).then((function(e){var t=e.data.data,n=t.pageInfo,r=t.records;g((function(e){return 1===n.currentPage?q([],r,!0):q(q([],e,!0),r,!0)})),A(r),C(n),w(!1)})),[2]}))}))}(z)}),[z,c,s,m]),X.jsxs(X.Fragment,{children:[X.jsx(M.DataGrid,Q({rows:x?[]:y,columns:K,initialState:{sorting:{sortModel:[{sort:z.order,field:null!==(o=z.orderBy)&&void 0!==o?o:"_id"}]}},pageSizeOptions:vv,rowCount:null==O?void 0:O.recordsCount,checkboxSelection:!(null==p?void 0:p.hideBulkActions)&&(E.bulkDelete.isAccessible||E.extras&&E.extras.resource&&Object.keys(E.extras.resource).length>0),disableRowSelectionOnClick:!0,loading:x,slots:{loadingOverlay:function(){return Dv(0,E.bulkDelete.isAccessible,k.listProperties.length)},noRowsOverlay:function(){return e=null==p?void 0:p.noRowsText,X.jsxs(jv,{children:[X.jsx("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false",children:X.jsxs("g",{fill:"none",fillRule:"evenodd",children:[X.jsxs("g",{transform:"translate(24 31.67)",children:[X.jsx("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),X.jsx("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),X.jsx("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),X.jsx("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})]}),X.jsx("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),X.jsxs("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)",children:[X.jsx("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),X.jsx("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})}),X.jsx(n.Box,{sx:{mt:1},children:null!=e?e:"No Rows"})]});var e},toolbar:(null==p?void 0:p.hideToolbar)?null:zv},density:(null==p?void 0:p.density)?p.density:"comfortable",editMode:"row"},(Y="server",{paginationMode:Y,sortingMode:Y,filterMode:Y}),{pagination:!0,onPaginationModelChange:function(e,t){e.page!==O.currentPage-1&&(!function(e,t,n,r,o){var a=o[0];o[1];var i=t[1],s=e+1;a.perPage,a.perPage,a.perPage,i((function(e){return Q(Q({},e),{page:s})}))}(e.page,u,0,0,[O,C]),R.set("page",(e.page+1).toString()),V(R)),O.perPage!==e.pageSize&&(!function(e,t,n,r){if(e!==r.perPage){var o=t[1];n([]),o((function(t){return Q(Q({},t),{page:gv,perPage:e})}))}}(e.pageSize,u,g,O),R.set("perPage",e.pageSize.toString()),R.set("page","1"),V(R))},paginationModel:{page:O.currentPage-1,pageSize:O.perPage},keepNonExistentRowsSelected:!0,onRowSelectionModelChange:function(e){I(e)},onSortModelChange:function(e){!function(e,t,n){var r=n[1],o=e.map((function(e){return{order:e.sort,orderBy:e.field}}))[0];t([]),r((function(e){return Q(Q(Q({},e),o),{page:gv})}))}(e,g,u)},autoHeight:!0,getRowId:function(e){return e._id},disableColumnFilter:!0,rowSelectionModel:S})),X.jsx(wv,Q({},Z[0],{extras:p})),S.length>0&&!(null==p?void 0:p.hideBulkActions)&&X.jsx(Cv,{numSelected:S.length,rowCount:y.length,selected:S.map((function(e){return e.toString()})),extras:p,action:X.jsxs(X.Fragment,{children:[E.bulkDelete.isAccessible&&X.jsx(l.LoadingButton,{size:"small",loading:P,color:"error",variant:"contained",startIcon:X.jsx(xo,{icon:"eva:trash-2-outline"}),onClick:function(){return G(i,void 0,void 0,(function(){return U(this,(function(e){switch(e.label){case 0:return N(!0),[4,Lm.delete("".concat(m,"/").concat(k.properties.path,"/all"),{data:S}).then((function(){N(!1),F(p&&p.afterBulkDeleteSnackBarText?p.afterBulkDeleteSnackBarText(S.length):"".concat(S.length," records are deleted successfully")),D((function(e){return Q(Q({},e),{page:Av.page,filters:void 0})})),E.bulkDelete.reloadAfterAction&&window.location.reload(),I((function(e){return[]}))}))];case 1:return e.sent(),[2]}}))}))},sx:{mr:1},children:null!==(a=null==p?void 0:p.bulkDeleteText)&&void 0!==a?a:"Delete"}),X.jsx(uv,{resources:s,resourceName:c,dialogState:Z,gridState:u,selected:S,setSelected:I,bulkActionsDialogState:d,setBulkActionsDialogState:f})]})})]})}function Pv(t){var r=t.placeholder,o=t.onInputChange,a=Z(t,["placeholder","onInputChange"]),i=function(e){o(e.target.value)},s=e.useMemo((function(){return Em.debounce(i,500)}),[]);return e.useEffect((function(){return function(){s.cancel()}}),[]),X.jsx(n.TextField,Q({},a,{fullWidth:!0,onChange:s,placeholder:r,InputProps:{startAdornment:X.jsx(n.InputAdornment,{position:"start",children:X.jsx(xo,{icon:"eva:search-fill",sx:{color:"text.disabled",width:20,height:20}})})}}))}function Nv(t){var n=this,o=t.bulkActionsDialogState,a=t.bulkActionsComponents,i=t.setParams,s=t.setBulkActionsDialogState,l=r.useNavigate(),c=e.useContext(Im).dashbaordUrlPrefix,u=nh().paths,d=th().setSuccessAlert,p=function(e){var t=Q({},o);t[e]={state:!1,modelName:o?o[e].modelName:"",saveLoadingState:!1,fullScreen:!!o&&o[e].fullScreen,setSelected:o?o[e].setSelected:function(e){return""},documentIds:[],afterExecuteMessage:o[e].afterExecuteMessage,severity:o[e].severity},s(t)};return X.jsx(X.Fragment,{children:a&&a(o,p,(function(e,t){return G(n,void 0,void 0,(function(){var n,r,a;return U(this,(function(f){switch(f.label){case 0:return m=t,(h=Q({},o))[m]={state:o[m].state,modelName:o[m].modelName,fullScreen:o[m].fullScreen,saveLoadingState:!0,setSelected:o[m].setSelected,documentIds:o[m].documentIds,afterExecuteMessage:o[m].afterExecuteMessage,severity:o[m].severity},s(h),[4,Lm.post("".concat(c,"/actions/execute/").concat(t),{record:e,modelName:o?o[t].modelName:""})];case 1:return n=f.sent(),p(t),o&&o[t].setSelected([]),r=n.data.data.response,a=r.action,d(o?o[t].afterExecuteMessage:""),a===ym.LIST?i((function(e){return Q(Q({},e),{page:Av.page})})):l(av(r,u)),[2]}var m,h}))}))}))})}var kv=["true","false"];function Bv(e,t,r,o,a,i,s,l,c,u,d,p){if(r[i])switch(r[i].type){case bm.STRING:return X.jsx(as,{name:i,size:e,label:r[i].value,value:l[i],onChange:function(e){return u(i,e,[i])}},t);case bm.PHONENUMBER:return X.jsx(b,{defaultCountry:r[i].countryCodes?r[i].countryCodes[0]:"sa",onChange:function(e){return d(i,e)},onlyCountries:r[i].countryCodes?r[i].countryCodes:["eg","sa"],name:i,size:e,label:r[t].value,value:p(i)?p(i):"",variant:"outlined",fullWidth:!0},t);case bm.TIMEPICKER:return X.jsx(as,{name:i,value:l[i],size:e,label:r[t].value},t);case bm.LOCALIZEDString:return X.jsx(as,{name:i,size:e,label:r[i].value,value:l[i],onChange:function(e){return u(i,e,[i])}},t);case bm.OBJECTID:return X.jsx(as,{name:i,size:e,label:r[i].value,value:l[i]},t);case bm.NUMBER:return X.jsxs(n.Card,{sx:{py:3,px:3},children:[X.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[i].value},t),X.jsxs(n.Stack,{direction:"row",spacing:2,children:[X.jsx(as,{name:i+".from",style:{flex:1,width:90},size:e,label:s?"From":"من"}),X.jsx(as,{name:i+".to",style:{flex:1,width:90},size:e,label:s?"To":"إلى"})]})]},t);case bm.DATE:return X.jsxs(n.Card,{sx:{py:3,px:3},children:[X.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[i].value},t),X.jsxs(n.Grid,{container:!0,spacing:2,children:[X.jsx(n.Grid,{item:!0,xs:12,children:X.jsx(As,{name:i+".from",size:e,label:s?"From":"من",fullWidth:!0},t)}),X.jsx(n.Grid,{item:!0,xs:12,children:X.jsx(As,{name:i+".to",size:e,label:s?"To":"إلى",fullWidth:!0},t)})]})]},t);case bm.ENUM:return X.jsx(is,{name:i,size:e,label:r[i].value,value:l[i],SelectProps:{native:!1,sx:{textTransform:"capitalize"}},onChange:function(e){return u(i,e.target.value,[i])},children:r[i].enumValues.map((function(e){return X.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e.includes("_")?e.split("_").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()})).join(" "):e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e)}))},t);case bm.BOOLEAN:return X.jsx(is,{name:i,size:e,label:r[i].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},onChange:function(e){return u(i,e.target.value,[i])},children:kv.map((function(e){return X.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e},e)}))},t);case bm.ARRAY:case bm.REFERENCE:return X.jsx(oh,{name:i,size:e,value:l[i]?l[i]:"",label:r[i].value,multiple:!1,onOptionChange:function(e){return u(i,e,["".concat(i,"-name"),"".concat(i,"-id")])},options:o[i]&&o[i].data?o[i].data:[],loading:a[i],hasNext:o[i]&&o[i].hasNext,onOpenChanged:function(e,t,n){return c(r[i].apiRoute,r[i].path,e,i,i,t,n)}},t);default:return}}var Ev=function(){function e(e){this.resource=e,this.uniqueFields=new Set,this.execute()}return e.prototype.getUniqueFields=function(){return this.uniqueFields},e.prototype.execute=function(){var e=this;this.resource.listProperties&&this.resource.listProperties.forEach((function(t){e.uniqueFields.add(t.key)})),this.resource.filterProperties&&this.resource.filterProperties.forEach((function(t){e.uniqueFields.add(t)})),this.resource.quickFilterProperties&&this.resource.quickFilterProperties.forEach((function(t){e.uniqueFields.add(t)}))},e}();var Lv=function(){function e(e,t){this.defaultrowsPerPage=t,this.searchParams=e}return e.prototype.get=function(){return{page:this.getPageNumber(),pageSize:this.getPageSize()}},e.prototype.getPageSize=function(){var e=this.searchParams.get("perPage");return e?isNaN(+e)||+e<=0?this.getDefaultPageSize():vv.reduce((function(t,n){return Math.abs(n-+e)<Math.abs(t-+e)?n:t})):this.defaultrowsPerPage},e.prototype.getPageNumber=function(){var e=this.searchParams.get("page"),t=Av.page;return e?isNaN(+e)||+e<=0?this.getDefaultPageNumber():+e:t},e.prototype.getDefaultPageSize=function(){return this.defaultrowsPerPage},e.prototype.getDefaultPageNumber=function(){return Av.page},e}(),Sv=function(){function e(){}return e.modify=function(e){return"_id"===e?e.replace("_",""):e},e}(),Iv=n.styled("span")((function(e){return{width:6,height:6,borderRadius:"50%",position:"absolute",backgroundColor:e.theme.palette.error.main}})),Wv=[];function Hv(t){var o=this,a=e.useState(!1),i=a[0],s=a[1],l=e.useState(!1),u=l[0],d=l[1],p=lh.isEnglish(),f=e.useContext(qm),m=f.textFieldSize,h=f.themeStretch,g=e.useState(),v=g[0],y=g[1],A=e.useState({}),b=A[0],x=A[1],w=e.useState({});w[0],w[1];var j,M=e.useState({}),O=M[0],C=M[1],z=e.useState({}),D=z[0],T=z[1],P=e.useState({}),N=P[0],k=P[1],B=function(e,t,n,r,a,i,s){return G(o,void 0,void 0,(function(){return U(this,(function(o){switch(o.label){case 0:return[4,dh({apiRoute:e,referencedValues:O,value:n,loading:b,fullKey:a,key:r,pathRoute:t,resources:ue,schema:ye,setLoading:x,setReferencedValues:C,page:i,filter:s})];case 1:return o.sent(),[2]}}))}))},L=e.useState({state:!1,message:"",severity:"error"}),S=L[0],I=L[1],W=r.useLocation(),H=r.useSearchParams(),R=H[0],V=H[1],Y=e.useState(W.state?W.state.actionState:null),F=Y[0],Z=Y[1],q=e.useContext(Zm),J=q.paths,_=q.root,ee=e.useState(void 0),te=ee[0],ne=ee[1],re=t.path,oe=t.extras,ae=t.Actions,ie=t.bulkActionsComponents,se=t.HeadingView,le=t.disableFilterButton,ce=t.dataListComponent,ue=e.useContext(Ym).resources,de=ue[re],pe=de.properties.defaultOrderBy,fe=de.properties.defaultOrder,me=de.properties.defaultrowsPerPage,he=de.quickFilterProperties,ge=de.properties.filters,ve=ge&&ge.scopes&&ge.scopes.auto?ge.scopes.auto.key:void 0,ye=de.properties.model,Ae={};new Ev(de).getUniqueFields().forEach((function(e){"__v"!==e&&""!==e&&function(e,t,n,r){if(n[t]=void 0,e)switch(e.type){case bm.STRING:case bm.PHONENUMBER:case bm.LOCALIZEDString:case bm.OBJECTID:n[t]=r&&r.get(t)?r.get(t):"";break;case bm.BOOLEAN:n[t]=!r||!1!==r.get(t)&&!0!==r.get(t)?void 0:r.get(t);break;case bm.REFERENCE:n[t]=r&&r.get(t+"-name")?{_id:r.get(t+"-id"),title:r.get(t+"-name")}:void 0;break;case bm.DATE:case bm.NUMBER:n[t]={from:"",to:""},n[t].from=r.get(t+"-from")?r.get(t+"-from"):"",n[t].to=r.get(t+"-to")?r.get(t+"-to"):"";break;case bm.ENUM:n[t]=r&&r.get(t)?r.get(t):void 0}}(ye[e],e,Ae,R)})),j=function(e,t,n){Object.keys(e).map((function(n){if(e[n]&&t[n].type===bm.DATE){if(e[n].from&&""!==e[n].from)try{e[n].from=e[n].from.toISOString().split("T")[0]}catch(e){}if(e[n].to&&""!==e[n].to)try{e[n].to=e[n].to.toISOString().split("T")[0]}catch(e){}}}));var r="";return Object.keys(e).map((function(o){e[o]&&""!==e[o]&&t[o].type&&o!==n&&(t[o].type===bm.NUMBER||t[o].type===bm.DATE?!e[o].from&&!e[o].to||""===e[o].from&&""===e[o].to?e[o]=void 0:(e[o].from&&""!==e[o].from&&e[o].from,e[o].to&&""!==e[o].to&&e[o].to,r=r+o+":from="+e[o].from+",to="+e[o].to+";;"+t[o].type+"^^"):t[o].type===bm.REFERENCE?(e[o].title,e[o]._id,r=r+o+"="+e[o]._id+";;"+t[o].type+"^^"):(e[o],r=r+o+"="+e[o]+";;"+t[o].type+"^^"))})),r}(Ae,ye,ve);var be=new Lv(R,me).get(),xe=be.page,we=be.pageSize,je=e.useState(Q(Q({},Av),{page:xe,order:fe,orderBy:pe,perPage:we,filters:j,scope:ve&&R.get(ve)?R.get(ve):void 0})),Me=je[0],Oe=je[1],Ce=function(t){var n=e.useState(t||""),r=n[0],o=n[1];return{currentTab:r,onChangeTab:function(e,t){o(t)},setCurrentTab:o}}(ve&&R.get(ve)?R.get(ve):"all"),ze=Ce.currentTab,De=Ce.onChangeTab,Te=Ce.setCurrentTab,Pe={resources:ue,resourceName:re,paramsState:[Me,Oe],bulkActionsDialogState:v,setBulkActionsDialogState:y,extras:oe,setCustomActions:ne};Wv=[],e.useEffect((function(){if(de.filterProperties){var e={};de.filterProperties.forEach((function(t){Ae[t]&&""!==Ae[t]&&(e[t]=Ae[t])})),k(e)}if(de.quickFilterProperties){var t={};de.quickFilterProperties.forEach((function(e){Ae[e]&&""!==Ae[e]&&(t[e]=Ae[e])})),T(t)}}),[]),e.useEffect((function(){F&&setTimeout((function(){Z(null),window.history.replaceState({},document.title)}),4e3)}),[F]);var Ne=de.properties.actions;de.listProperties&&de.listProperties.forEach((function(e){"__v"!==e.key&&""!==e&&Wv.push({id:e.key,label:e.value,align:"left"})})),Wv.push({id:"__v",label:""});var ke={},Be={};he.map((function(e,t){"__v"!==e&&ye[e]&&(ke[e]=Om(ye[e],e,Be,R))}));var Ee=E.object().shape(ke),Le=c.useForm({resolver:Ci(Ee),defaultValues:Ae}),Se=Le.handleSubmit,Ie=Le.reset,We=Le.setValue,He=Le.getValues,Re=function(e){return G(o,void 0,void 0,(function(){var t;return U(this,(function(n){return t=Nm(e,Fe,ye,R,V,ve,ze),Oe((function(e){return Q(Q({},e),{filters:t})})),ve&&R.get(ve)&&Te(R.get(ve)),[2]}))}))},Ve=function(e,t,n){return G(o,void 0,void 0,(function(){var r,o;return U(this,(function(a){switch(a.label){case 0:return t||n.forEach((function(e){R.delete(e)})),(r=Q({},D))[e]=t,T(r),o=Q(Q({},N),r),[4,Re(o)];case 1:return a.sent(),[2]}}))}))},Ye=de.properties.name,Fe=function(){d(!1)};return X.jsx(K,{title:p?Ye+": List":"قائمة "+Ye,children:X.jsxs(n.Container,{maxWidth:!h&&"lg",children:[X.jsx(fh,{open:u,size:m,handleFilterDrawerClose:Fe,schema:ye,searchParams:R,setSearchParams:V,resources:ue,scopeKey:ve,scopeValue:ze,initialQueryParams:Av,quickFilterValues:D,setParams:Oe,onRefrenceChanged:function(e,t){},filterProperties:de.filterProperties,filterString:function(e,t){Oe((function(t){return Q(Q({},t),{filters:e})})),k(t),ve&&R.get(ve)&&Te(R.get(ve))}}),X.jsx(Nv,{bulkActionsDialogState:v,setBulkActionsDialogState:y,setParams:Oe,bulkActionsComponents:ie}),F&&X.jsx(n.Snackbar,{open:!!F,anchorOrigin:{horizontal:"center",vertical:"top"},children:X.jsx(n.Alert,{onClose:function(){Z(null)},severity:F.severity,children:F.message})}),S.state&&X.jsx(n.Snackbar,{open:!!S.state,anchorOrigin:{horizontal:"center",vertical:"top"},children:X.jsx(n.Alert,{onClose:function(){I({state:!1})},severity:S.severity,children:S.message})}),de.properties?X.jsx($,{heading:Ye,headingView:se,links:[{name:p?"Dashboard":"الرئيسية",href:_},{name:Ye}],action:X.jsxs(n.Stack,{direction:{xs:"column",sm:"row"},spacing:1,children:[ae&&X.jsx(ae,{setParams:Oe,initialQueryParams:Av}),te,Ne.new.isAccessible&&X.jsx(n.Button,{variant:"contained",component:r.Link,to:J[re].new,startIcon:X.jsx(xo,{icon:"eva:plus-fill"}),children:Ne.new.value})]})}):X.jsx(wo,{tuples:[]}),X.jsxs(n.Card,{children:[de.properties&&de.properties.filters.scopes.isAccessible&&X.jsx(n.Tabs,{allowScrollButtonsMobile:!0,variant:"scrollable",scrollButtons:"auto",value:ze,onChange:function(e,t){De(e,t),Oe((function(e){return Q(Q({},e),{scope:"all"===t?void 0:t})})),ve&&("all"===t?R.delete(ve):R.has(ve)?R.set(ve,t):R.append(ve,t),V(R))},sx:{px:2,bgcolor:"background.neutral"},children:de.properties.filters.scopes.options.map((function(e){return X.jsx(n.Tab,{disableRipple:!0,label:e.value,value:e.key},e.key)}))}),X.jsx(n.Divider,{}),X.jsxs(n.Stack,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",sx:{pt:3,px:3},spacing:2,children:[X.jsxs(X.Fragment,{children:[de.properties&&de.properties.filters.searchBar.isAccessible&&X.jsx(Pv,{size:m,placeholder:p?"Search by "+Sv.modify(de.properties.title)+"...":"ابحث هنا …",onInputChange:function(e){Oe((function(t){return Q(Q({},t),{filter:e})}))}}),he.length>0&&X.jsx(Ji,{methods:Le,onSubmit:Se(Re),children:X.jsx(n.Stack,{direction:{xs:"column",sm:"row"},spacing:2,children:he&&he.map((function(e,t){return X.jsx(n.Grid,{minWidth:200,children:Bv(m,e+i.toString(),ye,O,b,e,p,D,B,Ve,We,He)},e+t)}))},"grid1")})]}),!le&&X.jsxs(n.Stack,{direction:"row",spacing:1,children:[X.jsx(n.Tooltip,{title:"Filter list",onClick:function(){d(!0)},children:X.jsx(n.IconButton,{children:X.jsx(xo,{icon:"ic:round-filter-list"})})}),Me.filters&&!u&&X.jsx(Iv,{}),Me.filters&&!u&&X.jsx(n.Tooltip,{title:"Reset Filter",onClick:function(){s(!i),V({}),Te("all"),Ie({}),T({}),k({}),Oe((function(e){return Q(Q({},e),{page:1,filters:void 0,scope:void 0})}))},children:X.jsx(n.IconButton,{children:Xm("RestartAlt")})})]})]}),ce?ce(Pe):X.jsx(Tv,Q({},Pe))]})]})})}var Rv=["1","2","3","4","5","6"];function Vv(e){var t=e.loadingVertical;return Z(e,["loadingVertical"]),X.jsx(n.Card,{sx:{pt:5,px:5,width:1500},children:X.jsx(n.Grid,{container:!t,children:Rv.map((function(e){return X.jsxs(n.Grid,{item:!0,xs:12,md:6,sx:{mb:3.5},children:[X.jsx(n.Skeleton,{variant:"text",width:100,height:20,sx:{mb:1}}),X.jsx(n.Skeleton,{variant:"text",width:300,height:20})]},e)}))})})}function Yv(e){var t=e.text,o=e.to,a=e.icon;return X.jsx(n.Button,{variant:"contained",component:r.Link,to:o,startIcon:X.jsx(xo,{icon:a}),children:t})}function Fv(e){return X.jsx(Yv,Q({},e,{icon:"eva:edit-fill"}))}var Xv,Qv=function(){function e(e,t,n,r,o){this.modelLocalizedName=t,this.modelName=e,this.isEnglish=n,this.title=r,this.record=o}return e.prototype.getTitle=function(){return this.isEnglish?this.modelLocalizedName+": Show":"عرض "+this.modelLocalizedName},e.prototype.getBreadCrumbHeading=function(){return this.isEnglish?this.modelName+" Data":"عرض "+this.modelLocalizedName},e.prototype.getBreadCrumbLinks=function(e,t,r,o){return[{name:this.isEnglish?"Dashboard":"الرئيسية",href:o},{name:this.modelLocalizedName,href:e[t].list},{name:this.record?r[this.title].type===bm.LOCALIZEDString?this.getValue():"object"!=typeof this.record[this.title]?this.record[this.title]:this.getValue():X.jsx(n.Skeleton,{variant:"text",width:100,height:20})}]},e.prototype.getValue=function(){return this.record[this.title][0]?lh.getLocalizedString(this.record[this.title]):"---"},e}();function Zv(t){var r=t.record,o=t.path,a=t.userPath,i=e.useContext(Ym).resources,s=i[o].showProperties,l=i[o].properties.model;return X.jsx(n.Card,{sx:{pt:5,px:5},children:X.jsx(n.Grid,{container:!0,columnSpacing:2,children:s&&s.map((function(e){return r.hasOwnProperty(e.key)&&null!==r[e.key]?X.jsx(Ig,{property:e,schema:l,record:r,resources:i,userpath:a},e.key):X.jsx(Eg,{title:e.value,value:tv,fieldkey:e.key,resources:i,userpath:a},e.key)}))})})}function Gv(e){var t=e.title,r=e.loading,o=e.icon,a=e.onClick;return X.jsx(n.IconButton,{size:"small",title:t,onClick:a,children:X.jsx(xo,{icon:r?"eos-icons:loading":o})})}function Uv(t){var o=this,a=t.modelPath,i=t.onNoNextText,s=t.onNoPreviousText,l=t.recordId,c=t.nextButtonTitle,u=t.previousButtonTitle,d=t.navigateTo,p=t.onClickNext,f=t.onClickPrevious,m=lh.isEnglish();r.useNavigate();var h=th().setAlert,g=e.useState({next:!1,previous:!1}),v=g[0],y=g[1],A=e.useContext(Im).dashbaordUrlPrefix,b="ooui:previous-ltr",x="ooui:previous-rtl",w=m?b:x,j=m?x:b,M=function(e){return G(o,void 0,void 0,(function(){var t,n,r,o,c;return U(this,(function(u){switch(u.label){case 0:return e===Xv.NEXT?(t=null!=i?i:"No next records",y({next:!0,previous:!1})):(t=null!=s?s:"No previous records",y({next:!1,previous:!0})),[4,Lm.get("".concat(A,"/").concat(a,"/neighbors/").concat(l,"?type=").concat(e))];case 1:return n=u.sent(),y({next:!1,previous:!1}),r=n.data.data,o=r.hasNeighbor,c=r.neighborRecordId,o&&c?(d(c),[2]):(h(t,"warning"),[2])}}))}))};return X.jsxs(n.Stack,{direction:"row",spacing:"5px",alignSelf:"end",children:[X.jsx(Gv,{title:null!=u?u:"Previous",icon:w,onClick:f?function(){return f(l)}:function(){return M(Xv.PREVIOUS)},loading:v.previous}),X.jsx(Gv,{title:null!=c?c:"Next",icon:j,onClick:p?function(){return p(l)}:function(){return M(Xv.NEXT)},loading:v.next})]})}function qv(t){var o,a,i=r.useParams().id,s=void 0===i?"":i,l=t.path,c=t.modelRoute,u=t.disableDefaultActions,d=t.Component,p=t.HeadingView,f=t.Actions,m=t.BreadcrumbsChildren,h=t.BreadCrumbLinks,g=lh.isEnglish(),v=e.useContext(Ym).resources,y=e.useContext(qm).themeStretch,A=e.useContext(Zm),b=A.paths,x=A.root,w=r.useNavigate(),j=v[l],M=j.properties,O=M.model,C=M.name,z=M.actions,D=M.title,T=vh.convertCamelCaseToWord(l),P=Wm(),N=P.requestState,k=P.get,B=new Qv(T,C,g,D,null===(o=N.data)||void 0===o?void 0:o.record);e.useEffect((function(){k({url:"".concat(c,"/").concat(s)})}),[s]);var E=N.state===exports.RequestState.SUCCEEDED;return X.jsx(K,{title:B.getTitle(),children:X.jsxs(n.Container,{maxWidth:!y&&"lg",children:[X.jsx($,{headingView:p&&E&&X.jsx(p,{record:N.data}),heading:B.getBreadCrumbHeading(),links:h&&E?h(N.data):B.getBreadCrumbLinks(b,l,O,x),action:X.jsxs(n.Stack,{spacing:2,children:[!j.properties.disableNextPreviousButtonsInShowPage&&X.jsx(Uv,Q({},t,{recordId:s,modelPath:c,navigateTo:function(e){return w(b[l].show(e))}})),X.jsxs(n.Stack,{direction:{xs:"column",md:"row"},spacing:2,children:[f&&E&&X.jsx(f,{record:N.data}),!u&&M&&z.edit.isAccessible&&X.jsx(Fv,{text:z.edit.value,to:b[l].edit(s)})]})]}),children:m&&E&&X.jsx(m,{record:N.data})}),E?d?X.jsx(d,{record:N.data,path:l,userPath:b}):X.jsx(Zv,{record:null===(a=N.data)||void 0===a?void 0:a.record,path:l,userPath:b},s):X.jsx(n.Grid,{container:!0,alignItems:"center",children:X.jsx(Vv,{sx:{height:50}})})]})})}!function(e){e.NEXT="NEXT",e.PREVIOUS="PREVIOUS"}(Xv||(Xv={}));var Kv=function(){function e(e,t,n,r,o,a){this.modelLocalizedName=e,this.isEnglish=t,this.title=n,this.record=r,this.isEdit=a,this.schema=o}return e.prototype.getTitle=function(){return(this.isEdit?this.getEditWord():this.getNewWord())+this.modelLocalizedName},e.prototype.getBreadCrumbLinks=function(e,t,n){return[{name:this.isEnglish?"Dashboard":"الرئيسية",href:n},{name:this.modelLocalizedName,href:e[t].list},{name:this.isEdit?this.getRecordName():this.getNewWord()}]},e.prototype.getNewWord=function(){return this.isEnglish?"Create ":" اضافة "},e.prototype.getEditWord=function(){return this.isEnglish?"Edit ":"تعديل "},e.prototype.getRecordName=function(){return this.record?this.schema[this.title].type===bm.LOCALIZEDString?this.getValue():"object"!=typeof this.record[this.title]?this.record[this.title]:this.getValue():X.jsx(n.Skeleton,{variant:"text",width:100,height:20})},e.prototype.getValue=function(){return this.record[this.title][0]?lh.getLocalizedString(this.record[this.title]):"---"},e}(),Jv=function(){return o.object().shape({images:o.array().of(o.object().shape({title:o.string().required("Title is required"),_id:o.string().required("id is required"),url:o.string().required("url is required")}))})};function _v(t){var r=t.selected,o=t.fileType,a=t.setFiles,i=t.setSelected,s=c.useForm({resolver:Ci(Jv()),defaultValues:{images:[]}}),u=s.control,d=s.handleSubmit;s.setValue;var p=c.useFieldArray({control:u,name:"images"}),f=p.fields,m=p.append,h=p.remove;return e.useEffect((function(){m(r.filter((function(e){return void 0===f.find((function(t){return t._id===e._id}))}))),h(f.filter((function(e){return void 0===r.find((function(t){return t._id===e._id}))})).map((function(e){return f.findIndex((function(t){return t._id===e._id}))})))}),[r]),X.jsx(Ji,{methods:s,onSubmit:d((function(e){(0,t.update)(e)})),children:X.jsxs(Tm,{sx:{maxHeight:450,paddingBottom:2},children:[f.map((function(e,t){return X.jsxs(n.Stack,{sx:{my:1,pr:3},children:[X.jsxs(X.Fragment,{children:[X.jsx(ki,{src:Eh(e.url,o)===gh.IMAGE?e.url:kh(Nh(e.url)),alt:e.title,sx:{borderRadius:"30px",paddingBottom:1,paddingTop:1}}),X.jsx(n.IconButton,{size:"small",onClick:function(){return t=e,void i((function(e){return e.filter((function(e){return e._id!==t._id}))}));var t},sx:{p:.01,mr:2,mb:1,right:0,position:"absolute",color:"common.white",bgcolor:"red","&:hover":{bgcolor:function(e){return n.alpha(e.palette.grey[900],.48)}}},children:X.jsx(xo,{icon:"eva:close-fill"})})]}),X.jsx(as,{sx:{paddingBottom:1},name:"images.".concat(t,".title"),placeholder:"title",size:"small"}),t<f.length-1&&X.jsx(n.Divider,{})]},e._id)})),X.jsx(l.LoadingButton,{type:"submit",fullWidth:!0,variant:"contained",style:{textAlign:"center",marginBottom:10},children:"Update"}),X.jsx(l.LoadingButton,{type:"submit",fullWidth:!0,variant:"outlined",style:{textAlign:"center"},onClick:function(){i([]),a&&a([])},children:"Remove All"})]})})}function $v(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const ey=["onChange"],ty={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ny(e){const{onChange:t}=e,n=Wt(e,ey),r=B.useRef(),o=B.useRef(null),a=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return nt((()=>{const e=Ke((()=>{const e=r.current;a(),e!==r.current&&t(r.current)})),n=$e(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),B.useEffect((()=>{a(),t(r.current)}),[t]),X.jsx("div",ne({style:ty,ref:o},n))}"production"!==process.env.NODE_ENV&&(ny.propTypes={onChange:Pe.func.isRequired});var ry=La(X.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),oy=La(X.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function ay(e){return Et("MuiTabScrollButton",e)}var iy=Lt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]);const sy=["className","slots","slotProps","direction","orientation","disabled"],ly=mo(xp,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})((({ownerState:e})=>ne({width:40,flexShrink:0,opacity:.8,[`&.${iy.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}))),cy=B.forwardRef((function(e,t){var n,r;const o=uo({props:e,name:"MuiTabScrollButton"}),{className:a,slots:i={},slotProps:s={},direction:l}=o,c=Wt(o,sy),u=ne({isRtl:"rtl"===co().direction},o),d=(e=>{const{classes:t,orientation:n,disabled:r}=e;return Pt({root:["root",n,r&&"disabled"]},ay,t)})(u),p=null!=(n=i.StartScrollButtonIcon)?n:ry,f=null!=(r=i.EndScrollButtonIcon)?r:oy,m=ko({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u}),h=ko({elementType:f,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:u});return X.jsx(ly,ne({component:"div",className:Jn(d.root,a),ref:t,role:null,ownerState:u,tabIndex:null},c,{children:"left"===l?X.jsx(p,ne({},m)):X.jsx(f,ne({},h))}))}));"production"!==process.env.NODE_ENV&&(cy.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,direction:Pe.oneOf(["left","right"]).isRequired,disabled:Pe.bool,orientation:Pe.oneOf(["horizontal","vertical"]).isRequired,slotProps:Pe.shape({endScrollButtonIcon:Pe.oneOfType([Pe.func,Pe.object]),startScrollButtonIcon:Pe.oneOfType([Pe.func,Pe.object])}),slots:Pe.shape({EndScrollButtonIcon:Pe.elementType,StartScrollButtonIcon:Pe.elementType}),sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var uy=cy;function dy(e){return Et("MuiTabs",e)}var py=Lt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);const fy=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],my=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,hy=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,gy=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},vy=mo("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${py.scrollButtons}`]:t.scrollButtons},{[`& .${py.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((({ownerState:e,theme:t})=>ne({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${py.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}))),yy=mo("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})((({ownerState:e})=>ne({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"}))),Ay=mo("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})((({ownerState:e})=>ne({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"}))),by=mo("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((({ownerState:e,theme:t})=>ne({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0}))),xy=mo(ny,{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),wy={};let jy=!1;const My=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiTabs"}),r=co(),o="rtl"===r.direction,{"aria-label":a,"aria-labelledby":i,action:s,centered:l=!1,children:c,className:u,component:d="div",allowScrollButtonsMobile:p=!1,indicatorColor:f="primary",onChange:m,orientation:h="horizontal",ScrollButtonComponent:g=uy,scrollButtons:v="auto",selectionFollowsFocus:y,slots:A={},slotProps:b={},TabIndicatorProps:x={},TabScrollButtonProps:w={},textColor:j="primary",value:M,variant:O="standard",visibleScrollbar:C=!1}=n,z=Wt(n,fy),D="scrollable"===O,T="vertical"===h,P=T?"scrollTop":"scrollLeft",N=T?"top":"left",k=T?"bottom":"right",E=T?"clientHeight":"clientWidth",L=T?"height":"width",S=ne({},n,{component:d,allowScrollButtonsMobile:p,indicatorColor:f,orientation:h,vertical:T,scrollButtons:v,textColor:j,variant:O,visibleScrollbar:C,fixed:!D,hideScrollbar:D&&!C,scrollableX:D&&!T,scrollableY:D&&T,centered:l&&!D,scrollButtonsHideMobile:!p}),I=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:a,centered:i,scrollButtonsHideMobile:s,classes:l}=e;return Pt({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",i&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},dy,l)})(S),W=ko({elementType:A.StartScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:S}),H=ko({elementType:A.EndScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:S});"production"!==process.env.NODE_ENV&&l&&D&&console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');const[R,V]=B.useState(!1),[Y,F]=B.useState(wy),[Q,Z]=B.useState(!1),[G,U]=B.useState(!1),[q,K]=B.useState(!1),[J,_]=B.useState({overflow:"hidden",scrollbarWidth:0}),$=new Map,ee=B.useRef(null),te=B.useRef(null),re=()=>{const e=ee.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:wt(e,r.direction),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==M){const e=te.current.children;if(e.length>0){const r=e[$.get(M)];"production"!==process.env.NODE_ENV&&(r||console.error(["MUI: The `value` provided to the Tabs component is invalid.",`None of the Tabs' children match with "${M}".`,$.keys?`You can provide one of the following values: ${Array.from($.keys()).join(", ")}.`:null].join("\n"))),n=r?r.getBoundingClientRect():null,"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&!jy&&n&&0===n.width&&0===n.height&&0!==t.clientWidth&&(t=null,console.error(["MUI: The `value` provided to the Tabs component is invalid.",`The Tab with this \`value\` ("${M}") is not part of the document layout.`,"Make sure the tab item is present in the document or that it's not `display: none`."].join("\n")),jy=!0)}}return{tabsMeta:t,tabMeta:n}},oe=lt((()=>{const{tabsMeta:e,tabMeta:t}=re();let n,r=0;if(T)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const a=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+a)}const a={[n]:r,[L]:t?t[L]:0};if(isNaN(Y[n])||isNaN(Y[L]))F(a);else{const e=Math.abs(Y[n]-a[n]),t=Math.abs(Y[L]-a[L]);(e>=1||t>=1)&&F(a)}})),ae=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=(()=>{})){const{ease:a=$v,duration:i=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=r=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/i);t[e]=a(u)*(n-l)+l,u>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(d)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(d)}(P,ee.current,e,{duration:r.transitions.duration.standard}):ee.current[P]=e},ie=e=>{let t=ee.current[P];T?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===xt()?-1:1),ae(t)},se=()=>{const e=ee.current[E];let t=0;const n=Array.from(te.current.children);for(let r=0;r<n.length;r+=1){const o=n[r];if(t+o[E]>e){0===r&&(t=e);break}t+=o[E]}return t},le=()=>{ie(-1*se())},ce=()=>{ie(se())},ue=B.useCallback((e=>{_({overflow:null,scrollbarWidth:e})}),[]),de=lt((e=>{const{tabsMeta:t,tabMeta:n}=re();if(n&&t)if(n[N]<t[N]){const r=t[P]+(n[N]-t[N]);ae(r,{animation:e})}else if(n[k]>t[k]){const r=t[P]+(n[k]-t[k]);ae(r,{animation:e})}})),pe=lt((()=>{D&&!1!==v&&K(!q)}));B.useEffect((()=>{const e=Ke((()=>{ee.current&&oe()})),t=$e(ee.current);let n;return t.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(n=new ResizeObserver(e),Array.from(te.current.children).forEach((e=>{n.observe(e)}))),()=>{e.clear(),t.removeEventListener("resize",e),n&&n.disconnect()}}),[oe]),B.useEffect((()=>{const e=Array.from(te.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&D&&!1!==v){const n=e[0],r=e[t-1],o={root:ee.current,threshold:.99},a=new IntersectionObserver((e=>{Z(!e[0].isIntersecting)}),o);a.observe(n);const i=new IntersectionObserver((e=>{U(!e[0].isIntersecting)}),o);return i.observe(r),()=>{a.disconnect(),i.disconnect()}}}),[D,v,q,null==c?void 0:c.length]),B.useEffect((()=>{V(!0)}),[]),B.useEffect((()=>{oe()})),B.useEffect((()=>{de(wy!==Y)}),[de,Y]),B.useImperativeHandle(s,(()=>({updateIndicator:oe,updateScrollButtons:pe})),[oe,pe]);const fe=X.jsx(by,ne({},x,{className:Jn(I.indicator,x.className),ownerState:S,style:ne({},Y,x.style)}));let me=0;const he=B.Children.map(c,(e=>{if(!B.isValidElement(e))return null;"production"!==process.env.NODE_ENV&&xu.isFragment(e)&&console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n"));const t=void 0===e.props.value?me:e.props.value;$.set(t,me);const n=t===M;return me+=1,B.cloneElement(e,ne({fullWidth:"fullWidth"===O,indicator:n&&!R&&fe,selected:n,selectionFollowsFocus:y,onChange:m,textColor:j,value:t},1!==me||!1!==M||e.props.tabIndex?{}:{tabIndex:0}))})),ge=(()=>{const e={};e.scrollbarSizeListener=D?X.jsx(xy,{onChange:ue,className:Jn(I.scrollableX,I.hideScrollbar)}):null;const t=D&&("auto"===v&&(Q||G)||!0===v);return e.scrollButtonStart=t?X.jsx(g,ne({slots:{StartScrollButtonIcon:A.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:W},orientation:h,direction:o?"right":"left",onClick:le,disabled:!Q},w,{className:Jn(I.scrollButtons,w.className)})):null,e.scrollButtonEnd=t?X.jsx(g,ne({slots:{EndScrollButtonIcon:A.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:H},orientation:h,direction:o?"left":"right",onClick:ce,disabled:!G},w,{className:Jn(I.scrollButtons,w.className)})):null,e})();return X.jsxs(vy,ne({className:Jn(I.root,u),ownerState:S,ref:t,as:d},z,{children:[ge.scrollButtonStart,ge.scrollbarSizeListener,X.jsxs(yy,{className:I.scroller,ownerState:S,style:{overflow:J.overflow,[T?"margin"+(o?"Left":"Right"):"marginBottom"]:C?void 0:-J.scrollbarWidth},ref:ee,children:[X.jsx(Ay,{"aria-label":a,"aria-labelledby":i,"aria-orientation":"vertical"===h?"vertical":null,className:I.flexContainer,ownerState:S,onKeyDown:e=>{const t=te.current,n=_e(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===h?"ArrowLeft":"ArrowUp",a="horizontal"===h?"ArrowRight":"ArrowDown";switch("horizontal"===h&&o&&(r="ArrowRight",a="ArrowLeft"),e.key){case r:e.preventDefault(),gy(t,n,hy);break;case a:e.preventDefault(),gy(t,n,my);break;case"Home":e.preventDefault(),gy(t,null,my);break;case"End":e.preventDefault(),gy(t,null,hy)}},ref:te,role:"tablist",children:he}),R&&fe]}),ge.scrollButtonEnd]}))}));"production"!==process.env.NODE_ENV&&(My.propTypes={action:Ge,allowScrollButtonsMobile:Pe.bool,"aria-label":Pe.string,"aria-labelledby":Pe.string,centered:Pe.bool,children:Pe.node,classes:Pe.object,className:Pe.string,component:Pe.elementType,indicatorColor:Pe.oneOfType([Pe.oneOf(["primary","secondary"]),Pe.string]),onChange:Pe.func,orientation:Pe.oneOf(["horizontal","vertical"]),ScrollButtonComponent:Pe.elementType,scrollButtons:Pe.oneOf(["auto",!1,!0]),selectionFollowsFocus:Pe.bool,slotProps:Pe.shape({endScrollButtonIcon:Pe.oneOfType([Pe.func,Pe.object]),startScrollButtonIcon:Pe.oneOfType([Pe.func,Pe.object])}),slots:Pe.shape({EndScrollButtonIcon:Pe.elementType,StartScrollButtonIcon:Pe.elementType}),sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),TabIndicatorProps:Pe.object,TabScrollButtonProps:Pe.object,textColor:Pe.oneOf(["inherit","primary","secondary"]),value:Pe.any,variant:Pe.oneOf(["fullWidth","scrollable","standard"]),visibleScrollbar:Pe.bool});var Oy=My;function Cy(e){return Et("MuiTab",e)}var zy=Lt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]);const Dy=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Ty=mo(xp,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Ue(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})((({theme:e,ownerState:t})=>ne({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${zy.iconWrapper}`]:ne({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${zy.selected}`]:{opacity:1},[`&.${zy.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${zy.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${zy.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${zy.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${zy.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}))),Py=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiTab"}),{className:r,disabled:o=!1,disableFocusRipple:a=!1,fullWidth:i,icon:s,iconPosition:l="top",indicator:c,label:u,onChange:d,onClick:p,onFocus:f,selected:m,selectionFollowsFocus:h,textColor:g="inherit",value:v,wrapped:y=!1}=n,A=Wt(n,Dy),b=ne({},n,{disabled:o,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:l,label:!!u,fullWidth:i,textColor:g,wrapped:y}),x=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:a,label:i,selected:s,disabled:l}=e;return Pt({root:["root",a&&i&&"labelIcon",`textColor${Ue(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]},Cy,t)})(b),w=s&&u&&B.isValidElement(s)?B.cloneElement(s,{className:Jn(x.iconWrapper,s.props.className)}):s;return X.jsxs(Ty,ne({focusRipple:!a,className:Jn(x.root,r),ref:t,role:"tab","aria-selected":m,disabled:o,onClick:e=>{!m&&d&&d(e,v),p&&p(e)},onFocus:e=>{h&&!m&&d&&d(e,v),f&&f(e)},ownerState:b,tabIndex:m?0:-1},A,{children:["top"===l||"start"===l?X.jsxs(B.Fragment,{children:[w,u]}):X.jsxs(B.Fragment,{children:[u,w]}),c]}))}));"production"!==process.env.NODE_ENV&&(Py.propTypes={children:it,classes:Pe.object,className:Pe.string,disabled:Pe.bool,disableFocusRipple:Pe.bool,disableRipple:Pe.bool,icon:Pe.oneOfType([Pe.element,Pe.string]),iconPosition:Pe.oneOf(["bottom","end","start","top"]),label:Pe.node,onChange:Pe.func,onClick:Pe.func,onFocus:Pe.func,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),value:Pe.any,wrapped:Pe.bool});var Ny=Py;function ky(t){var r=this,o=t.Content,a=t.uploadFiles;t.imagesFiles;var i=t.isLoading;Z(t,["Content","uploadFiles","imagesFiles","isLoading"]);var s=e.useState([]),l=s[0],c=s[1],u=e.useState(!1),d=u[0],p=u[1],f=e.useState(!1),m=f[0],h=f[1],g=e.useState(!1);g[0];var v=g[1],y=e.useCallback((function(e){p(!1),c((function(t){return q(q([],t,!0),e.map((function(e){return Object.assign(e,{preview:URL.createObjectURL(e)})})),!0)}))}),[c,l]);return X.jsxs(n.Grid,{children:[X.jsx(n.Snackbar,{open:m,anchorOrigin:{horizontal:"center",vertical:"top"},children:X.jsx(n.Alert,{onClose:function(){h(!1)},severity:"success",children:"Images are uploaded !"},"alert")}),X.jsx(qi,{files:l,showPreview:!0,onDrop:y,onRemoveAll:function(){c([]),setTimeout((function(){v(!1)}),4e3)},onRemove:function(e){c((function(t){return t.filter((function(t){return t!==e}))}))},onUpload:function(){return G(r,void 0,void 0,(function(){return U(this,(function(e){switch(e.label){case 0:return[4,a(l)];case 1:return e.sent(),p(!0),h(!0),c([]),setTimeout((function(){h(!1)}),4e3),[2]}}))}))},sx:{p:2},Content:o,isLoading:i,uploaded:d})]})}function By(e){return Et("MuiImageList",e)}Lt("MuiImageList",["root","masonry","quilted","standard","woven"]);const Ey=B.createContext({});"production"!==process.env.NODE_ENV&&(Ey.displayName="ImageListContext");var Ly=Ey;const Sy=["children","className","cols","component","rowHeight","gap","style","variant"],Iy=mo("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})((({ownerState:e})=>ne({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"},"masonry"===e.variant&&{display:"block"}))),Wy=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiImageList"}),{children:r,className:o,cols:a=2,component:i="ul",rowHeight:s="auto",gap:l=4,style:c,variant:u="standard"}=n,d=Wt(n,Sy),p=B.useMemo((()=>({rowHeight:s,gap:l,variant:u})),[s,l,u]);B.useEffect((()=>{"production"!==process.env.NODE_ENV&&void 0!==document&&"objectFit"in document.documentElement.style==!1&&console.error(["MUI: ImageList v5+ no longer natively supports Internet Explorer.","Use v4 of this component instead, or polyfill CSS object-fit."].join("\n"))}),[]);const f=ne("masonry"===u?{columnCount:a,columnGap:l}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:l},c),m=ne({},n,{component:i,gap:l,rowHeight:s,variant:u}),h=(e=>{const{classes:t,variant:n}=e;return Pt({root:["root",n]},By,t)})(m);return X.jsx(Iy,ne({as:i,className:Jn(h.root,h[u],o),ref:t,style:f,ownerState:m},d,{children:X.jsx(Ly.Provider,{value:p,children:r})}))}));"production"!==process.env.NODE_ENV&&(Wy.propTypes={children:Pe.node.isRequired,classes:Pe.object,className:Pe.string,cols:Dt,component:Pe.elementType,gap:Pe.number,rowHeight:Pe.oneOfType([Pe.oneOf(["auto"]),Pe.number]),style:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),variant:Pe.oneOfType([Pe.oneOf(["masonry","quilted","standard","woven"]),Pe.string])});var Hy=Wy;function Ry(e){return Et("MuiImageListItem",e)}var Vy=Lt("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]);const Yy=["children","className","cols","component","rows","style"],Fy=mo("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Vy.img}`]:t.img},t.root,t[n.variant]]}})((({ownerState:e})=>ne({display:"block",position:"relative"},"standard"===e.variant&&{display:"flex",flexDirection:"column"},"woven"===e.variant&&{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}},{[`& .${Vy.img}`]:ne({objectFit:"cover",width:"100%",height:"100%",display:"block"},"standard"===e.variant&&{height:"auto",flexGrow:1})}))),Xy=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiImageListItem"}),{children:r,className:o,cols:a=1,component:i="li",rows:s=1,style:l}=n,c=Wt(n,Yy),{rowHeight:u="auto",gap:d,variant:p}=B.useContext(Ly);let f="auto";"woven"===p?f=void 0:"auto"!==u&&(f=u*s+d*(s-1));const m=ne({},n,{cols:a,component:i,gap:d,rowHeight:u,rows:s,variant:p}),h=(e=>{const{classes:t,variant:n}=e;return Pt({root:["root",n],img:["img"]},Ry,t)})(m);return X.jsx(Fy,ne({as:i,className:Jn(h.root,h[p],o),ref:t,style:ne({height:f,gridColumnEnd:"masonry"!==p?`span ${a}`:void 0,gridRowEnd:"masonry"!==p?`span ${s}`:void 0,marginBottom:"masonry"===p?d:void 0},l),ownerState:m},c,{children:B.Children.map(r,(e=>B.isValidElement(e)?("production"!==process.env.NODE_ENV&&xu.isFragment(e)&&console.error(["MUI: The ImageListItem component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n")),"img"===e.type||Je(e,["Image"])?B.cloneElement(e,{className:Jn(h.img,e.props.className)}):e):null))}))}));"production"!==process.env.NODE_ENV&&(Xy.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,cols:Dt,component:Pe.elementType,rows:Dt,style:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var Qy=Xy,Zy={},Gy=vi;Object.defineProperty(Zy,"__esModule",{value:!0});var Uy=Zy.default=void 0,qy=Gy(bi()),Ky=X,Jy=(0,qy.default)((0,Ky.jsx)("path",{d:"M21 3H3v18h18V3zM10 17l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBoxSharp");Uy=Zy.default=Jy;var _y=mo(n.Box)((function(e){return{height:"100%",display:"flex",textAlign:"center",alignItems:"center",flexDirection:"column",justifyContent:"center",padding:e.theme.spacing(8,2)}}));function $y(e){var t=e.title,r=e.description,o=e.img,a=e.imageHeight,i=Z(e,["title","description","img","imageHeight"]);return X.jsxs(_y,Q({},i,{children:[X.jsx(ki,{disabledEffect:!0,visibleByDefault:!0,alt:"empty content",src:o||"/assets/illustrations/illustration_empty_content.svg",sx:{height:null!=a?a:240,mb:3}}),X.jsx(n.Typography,{variant:"h5",gutterBottom:!0,children:t}),r&&X.jsx(n.Typography,{variant:"body2",sx:{color:"text.secondary"},children:r})]}))}var eA=mo((function(e){return X.jsx(Qy,Q({},e))}))((function(e){return{"& .MuiImageListItem-img":{borderRadius:"10px",border:e.selected&&"3px solid #0085FF"}}}));function tA(t){var r=e.useState(t.selected),o=r[0],a=r[1],i=t.item,s=t.onImageSelected,l=t.fileType?Eh(i.url,t.fileType):gh.IMAGE;return B.useEffect((function(){a(t.selected)}),[o,t.selected]),X.jsxs(eA,{selected:o,onClick:function(){return function(e){s(e),a(!o)}(i)},children:[X.jsx("img",{src:l===gh.IMAGE?i.url:kh(Nh(i.url)),alt:i.title,loading:"lazy"}),l!==gh.IMAGE&&X.jsx(n.Typography,{style:{color:"#6F6F6F"},fontWeight:200,fontSize:10,alignSelf:"center",children:i.title}),o&&X.jsx(n.ImageListItemBar,{sx:{background:"transparent"},position:"top",actionIcon:X.jsx(n.Icon,{children:X.jsx(Uy,{color:"info",sx:{background:"#fff",color:"#0085FF"}})}),actionPosition:"right"})]})}function nA(e){var t=e.images,r=e.isLoading,o=e.selected,a=e.multiple,i=e.numberOfColumns,s=e.fileType?e.fileType:gh.IMAGE;return X.jsxs(Tm,{sx:{maxHeight:380},children:[X.jsxs(Hy,{cols:i||7,gap:8,children:[!r&&t.map((function(t,n){return X.jsx(tA,{item:t,index:n,multiple:a,onImageSelected:e.onImageSelected,images:e.images,selected:void 0!==o.find((function(e){return e._id===t._id})),fileType:s},t._id)})),r&&Array.from(Array(10).keys()).map((function(e){return X.jsx(n.Skeleton,{variant:"rectangular",sx:{borderRadius:"10px",height:"164px"}},e)}))]}),(!t||0===t.length)&&!r&&X.jsx($y,{title:"No images found"})]})}function rA(e){var t=e.isLoading,r=e.onImageSelected,o=e.images,a=e.numberOfColumns,i=e.onQueryFilter,s=e.isUploading,l=e.selected,c=e.multiple,u=e.fileType;return X.jsxs(n.Stack,{spacing:1,sx:{mx:1},children:[s&&X.jsx(n.Alert,{severity:"info",children:"Uploading in progress"}),i&&X.jsx(Pv,{placeholder:"search",onInputChange:i,size:"small",sx:{pr:1,pl:2,pb:1}}),X.jsx(nA,{onImageSelected:r,images:o,isLoading:t,numberOfColumns:a,selected:l,multiple:c,fileType:u})]})}function oA(e){var t=e.children,n=e.value,r=e.index,o=Z(e,["children","value","index"]);return X.jsx("div",Q({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},o,{children:n===r&&X.jsx(bo,{children:t})}))}var aA=mo((function(e){return X.jsx(Oy,Q({},e))}))({"& .MuiTabs-indicator":{display:"none",justifyContent:"center",backgroundColor:"transparent"}}),iA=mo((function(e){return X.jsx(Ny,Q({disableRipple:!0},e))}))((function(e){var t=e.theme;return{textTransform:"none",fontWeight:t.typography.fontWeightRegular,fontSize:t.typography.pxToRem(15),paddingLeft:"23px",paddingRight:"23px",color:"#000","&.Mui-selected":{background:"#fff",border:"0.5px solid black",borderRadius:"0px"},"&.Mui-focusVisible":{backgroundColor:"rgba(100, 95, 228, 0.32)"},"&.MuiTab-root":{marginRight:"0px"}}}));function sA(e){var t=e.uploadingTapProps,n=e.onImageSelected,r=e.images,o=e.onQueryFilter,a=e.isLoading,i=e.uploadFileString,s=e.mediaLibraryString,l=e.selected,c=e.multiple,u=e.fileType,d=e.handleSelectionPanelState,p=e.numberOfColumns,f=B.useState(0),m=f[0],h=f[1];return X.jsxs(bo,{sx:{width:"100%"},children:[X.jsx(bo,{paddingBottom:2,children:X.jsxs(aA,{value:m,onChange:function(e,t){d&&d(1===t),h(t)},sx:{background:"#F8F8F8",paddingLeft:3},children:[X.jsx(iA,{label:i||"Upload files"}),X.jsx(iA,{label:s||"Media library"})]})}),X.jsx(oA,{value:m,index:0,children:X.jsx(ky,Q({},t))}),X.jsx(oA,{value:m,index:1,children:X.jsx(rA,{numberOfColumns:p,isUploading:t.isLoading,images:r,onImageSelected:n,onQueryFilter:o,isLoading:a,selected:l,multiple:c,fileType:u})})]})}function lA(t){var r=this,o=t.onDismiss,a=t.onConfirm,i=t.uploadImages,s=t.filterImagesByTitle,l=t.updateImages,c=t.loadImagesList,u=t.Content,d=t.setFiles,p=t.fileType,f=t.basePath,m=t.setParams,h=t.icon,g=t.mediaLibraryString,v=t.uploadFileString,y=t.message,A=t.imagesSelected,b=t.multiple,x=Z(t,["onDismiss","onConfirm","uploadImages","filterImagesByTitle","updateImages","loadImagesList","Content","setFiles","fileType","basePath","setParams","icon","mediaLibraryString","uploadFileString","message","imagesSelected","multiple"]),w=e.useState(!1),j=w[0],M=w[1],O=e.useState([]),C=O[0],z=O[1],D=e.useState(!1),T=D[0],P=D[1],N=e.useState([]),k=N[0],B=N[1],E=e.useState(!0),L=E[0],S=E[1],I=function(e){B(b?function(t){return t.find((function(t){return t._id===e._id}))?t.filter((function(t){return t._id!==e._id})):q([e],t,!0)}:[e])};e.useEffect((function(){A&&0!==A.length&&B(A)}),[A]),e.useEffect((function(){h&&B([h])}),[h]);var W=e.useState([]),H=W[0],R=W[1],V={Content:u,uploadFiles:function(e){return G(r,void 0,void 0,(function(){var t;return U(this,(function(n){switch(n.label){case 0:return z(e),M(!0),[4,i(e,p)];case 1:return t=n.sent(),m&&m((function(e){return Q({},e)})),t.forEach((function(e){I(e)})),M(!1),R(t),[2]}}))}))},isLoading:j,imagesFiles:C};return e.useEffect((function(){V.isLoading&&!L||(P(!0),c((function(e){P(!1),R(e)}),p,f))}),[V.isLoading,L]),X.jsxs(n.Dialog,Q({},x,{onClose:o,children:[X.jsx(n.DialogTitle,{id:"id",style:{paddingBottom:6},children:X.jsxs(n.Stack,{direction:"row",justifyContent:"space-between",children:[X.jsx(n.Typography,{flexGrow:1,style:{color:"black"},fontWeight:700,fontSize:25,children:y||"Insert Media"}),X.jsx(n.IconButton,{size:"large",onClick:o,sx:{p:.01,color:"common.black",bgcolor:"white"},children:X.jsx(xo,{icon:"eva:close-fill"})})]})}),X.jsxs(n.Grid,{container:!0,children:[X.jsx(n.Grid,{item:!0,xs:k.length>0?9:12,children:X.jsx(sA,{onImageSelected:I,uploadingTapProps:V,images:H,numberOfColumns:k.length>0?5:7,mediaLibraryString:g,uploadFileString:v,multiple:b,onQueryFilter:function(e){return function(e,t){P(!0),s(e,(function(e){P(!1),R(e)}),t)}(e,p)},isLoading:T,selected:k,handleSelectionPanelState:function(e){return S(e)},fileType:p})}),k.length>0&&X.jsx(n.Grid,{item:!0,xs:3,sx:{background:"#F8F8F8",p:3,borderLeft:"0.5px solid black",borderLeftColor:"#ABABAB"},children:X.jsx(_v,{setSelected:B,selected:k,update:function(e){P(!0),l(e.images,(function(e){P(!1),R(e)})),m&&m((function(e){return Q({},e)}))},fileType:p,setFiles:d})})]}),X.jsx(n.DialogActions,{children:0!==k.length&&X.jsx(n.Button,{size:"small",variant:"contained",autoFocus:!0,onClick:function(){return a(k)},children:b?"Select Images":"Select Image"})})]}))}var cA=function(e,t){return G(void 0,void 0,void 0,(function(){return U(this,(function(n){return[2,new Promise((function(n){new C(e,{quality:.6,success:function(e){try{j.Storage.put(e.name,e,{contentType:e.type}).then((function(e){t(e.key)}))}catch(e){console.log("Error uploading file: ",e)}n(!0)},error:function(e){console.log(e.message)}})}))]}))}))},uA=function(e,t){return G(void 0,void 0,void 0,(function(){return U(this,(function(n){return[2,Promise.all(e.map((function(e){if(Eh(e.name,t)===gh.IMAGE)return new Promise((function(t){new C(e,{quality:.6,convertSize:1/0,success:function(e){try{j.Storage.put(e.name,e,{contentType:e.type}).then((function(e){t(e.key)}))}catch(e){console.log("Error uploading file: ",e)}},error:function(e){console.log(e.message)}})}));var n=[];try{j.Storage.put(e.name,e,{contentType:e.type}).then((function(e){n.push(e.key)}))}catch(e){console.log("Error uploading file: ",e)}})))]}))}))},dA=function(e,t){return Q({},t)},pA=function(e){return{display:"flex",padding:8,overflow:"auto"}};function fA(e){var t=e.items,r=e.disabled,o=t.length>0;return X.jsx(n.List,{style:{display:"flex",flexWrap:"wrap",flexGrow:0,flexShrink:0,flexBasis:"25%"},disablePadding:!0,sx:Q({},o&&{my:3,display:"flex",flexDirection:"row",flexWrap:"wrap"}),children:X.jsx(p.AnimatePresence,{children:X.jsx(z.DragDropContext,{onDragEnd:function(n){if(n.destination){var r=t.splice(n.source.index,1)[0];t.splice(n.destination.index,0,r),e.setImages(t)}},children:X.jsx(z.Droppable,{droppableId:"characters",direction:"horizontal",children:function(t,o){return X.jsxs("div",Q({style:pA(o.isDraggingOver)},t.droppableProps,{ref:t.innerRef,children:[e.items.map((function(t,o){return X.jsx(n.ListItem,Q({component:p.m.div},Li().inRight,{sx:{p:0,m:.75,width:100,height:100,position:"relative",display:"inline-flex"},children:X.jsx(z.Draggable,{draggableId:t._id,index:o,children:function(o,a){return X.jsxs("div",Q({ref:o.innerRef},o.draggableProps,o.dragHandleProps,{style:dA(a.isDragging,o.draggableProps.style),children:[X.jsx("img",{src:t.url,alt:"no"}),e.onRemove&&X.jsx(n.IconButton,{size:"small",disabled:r,onClick:function(){return e.onRemove({id:t._id,name:t.title})},sx:{top:-8,p:.01,right:-8,position:"absolute",color:"common.white",bgcolor:"red","&:hover":{bgcolor:function(e){return n.alpha(e.palette.grey[900],.48)}}},children:X.jsx(xo,{icon:"eva:close-fill"})})]}))}},t._id)}),t._id)})),t.placeholder]}))}})})})})}function mA(e){return{key:e.id,name:e.name}}function hA(e){var t=e.file,r=e.tooltip,o=e.imageView,a=e.onDownload,i=e.sx,s=e.imgSx,l=mA(t).name,c=Nh(l),u="image"===c&&o?X.jsx(n.Box,{component:"img",src:l,sx:Q({width:1,height:1,flexShrink:0,objectFit:"cover"},s)}):X.jsx(n.Box,{component:"img",src:kh(c),sx:Q({width:32,height:32,flexShrink:0},i)});return r?X.jsx(n.Tooltip,{title:l,children:X.jsxs(n.Stack,{flexShrink:0,component:"span",alignItems:"center",justifyContent:"center",sx:{width:"fit-content",height:"inherit"},children:[u,a&&X.jsx(yg,{onDownload:a})]})}):X.jsxs(X.Fragment,{children:[u,a&&X.jsx(yg,{onDownload:a})]})}function gA(e){e.thumbnail;var t=e.files,r=e.disabled,o=e.onRemove,a=e.sx;return(null==t?void 0:t.length)?X.jsx(p.AnimatePresence,{initial:!1,children:t.map((function(e){var t=mA(e),i=t.key,s=t.name;return X.jsxs(n.Stack,Q({component:p.m.div},Li().inUp,{spacing:2,direction:"row",alignItems:"center",sx:Q({my:1,px:1,py:.75,borderRadius:.75,border:function(e){return"solid 1px ".concat(e.palette.divider)}},a),children:[X.jsx(hA,{file:e}),X.jsx(n.Stack,{flexGrow:1,sx:{minWidth:0},children:X.jsx(n.Typography,{variant:"subtitle2",noWrap:!0,children:s})}),o&&X.jsx(n.IconButton,{disabled:r,edge:"end",size:"small",onClick:function(){return o(e)},children:X.jsx(xo,{icon:"eva:close-fill"})})]}),i)}))}):null}function vA(e){e.showPreview;var t=e.files,r=e.type,o=e.disabled,a=e.onRemove,i=e.setImages,s=t.length>0;if(r===gh.IMAGE)return X.jsx(n.List,{style:{width:607,overflowX:"auto",display:"flex",flexWrap:"wrap",flexGrow:0,flexShrink:0,flexBasis:"25%"},disablePadding:!0,sx:Q({},s&&{my:3}),children:X.jsx(fA,{items:t,onRemove:a,setImages:i,disabled:o})});var l=[];return t.forEach((function(e){l.push({name:e.title+"."+e.url.split(".").pop(),id:e._id})})),X.jsx(gA,{onRemove:a,files:l,disabled:o})}function yA(e){var t="";return e!==gh.ALL&&(t="&filters=type=".concat(e,";;enum")),t}function AA(t){var r=this,o=t.image,a=t.keyValue,i=t.isEnglish,s=t.imageDialogState,l=t.label,c=t.multiple,u=t.fileType,d=t.dismissDialogState,p=t.setImages,f=t.handleEditImage,m=t.handleRemoveImage,h=t.setImageDialogState,g=t.setImage,v=t.setValue,y=e.useContext(Im).dashbaordUrlPrefix,A=e.useContext(Km).bucketUrl;return X.jsxs(X.Fragment,{children:[X.jsxs(n.Card,{sx:{p:3,mb:3},style:{width:450,minHeight:248,top:444,paddingTop:24,paddingLeft:24,paddingRight:36,paddingBottom:24,left:330,position:"inherit",backgroundColor:"white"},children:[X.jsx(n.Stack,{spacing:3.5,marginRight:4,children:X.jsxs("div",{style:{display:"flex",alignItems:"baseline"},children:[X.jsx(n.Typography,{fontWeight:500,height:25,fontSize:18,letterSpacing:.15,width:194,position:"inherit",display:"inline",alignItems:"center",children:l}),o&&o[a]&&X.jsx(n.Typography,{marginLeft:17,fontWeight:400,height:21,fontSize:16,letterSpacing:.15,width:91,boxSizing:"border-box",flex:1,alignSelf:"end",children:X.jsx(n.Link,{onClick:function(){return f(a)},underline:"always",color:"#0085FF",style:{cursor:"pointer"},children:i?"Edit":"تعديل"})})]})}),o&&o[a]&&!s[a]?!c&&X.jsxs(n.Grid,{children:[X.jsx(n.IconButton,{size:"small",onClick:function(){return m(a)},sx:{p:.01,right:800,position:"absolute",color:"common.white",bgcolor:function(e){return n.alpha(e.palette.grey[900],.72)},"&:hover":{bgcolor:function(e){return n.alpha(e.palette.grey[900],.48)}}},children:X.jsx(xo,{icon:"eva:close-fill"})}),X.jsx("img",{src:u===gh.IMAGE?o[a].url:kh(Nh(o[a].url)),style:{width:200,marginLeft:100,marginTop:20},alt:"Collection"}),u!==gh.IMAGE&&X.jsx(n.Typography,{style:{color:"#6F6F6F"},fontWeight:200,fontSize:13,children:o[a].title})]}):X.jsxs(n.Box,{width:400,height:150,textAlign:"center",marginTop:1.5,sx:{borderRadius:"10px",border:"1px dashed #BCBCBC"},children:[X.jsx(n.Button,{style:{marginTop:43,color:"#0085FF",backgroundColor:"#E2F1FF",fontSize:12,fontWeight:400},onClick:function(){return function(e,t,n){var r=Q({},t);r[e]=!0,n(r)}(a,s,h)},children:i?"Upload image":"تحميل"}),X.jsx(n.Typography,{style:{marginTop:18,color:"#6F6F6F"},fontWeight:400,fontSize:13,children:i?"or drop an image to upload":"يمكنك تحميل صورة من هنا"})]}),o&&o[a]&&0!==o[a].length&&c&&X.jsx(vA,{files:o[a],onRemove:function(e){return function(e,t,n,r){var o=Q({},e);o[n]=e[n].filter((function(e){return e._id!==t.id})),r(o)}(o,e,a,g)},type:gh.ALL})]}),X.jsx(lA,{open:!!s[a]&&s[a],maxWidth:"md",fileType:u,basePath:null!=y?y:"",multiple:null!=c&&c,mediaLibraryString:i?"Media library":"قائمة الصور",uploadFileString:i?"Upload files":"تحميل صور جديدة",fullWidth:!0,message:i?"Upload image":"تحميل صورة",onDismiss:function(){return d(a,s,h)},updateImages:function(e,t){Lm.patch("".concat(y,"/images/all"),{images:e}).then((function(e){t(e.data.data.records)}))},filterImagesByTitle:function(e,t,n){var r=yA(n);Lm.get("".concat(y,"/images?filter=").concat(e,"&order=desc&orderBy=updatedAt").concat(r)).then((function(e){t(e.data.data.records)})).catch((function(){}))},loadImagesList:function(e,t){var n=yA(t);Lm.get("".concat(y,"/images?order=desc&orderBy=updatedAt").concat(n)).then((function(t){e(t.data.data.records)})).catch((function(){}))},imagesSelected:o&&o[a]?c?o[a]:[o[a]]:[],uploadImages:function(e,t){return G(r,void 0,void 0,(function(){var n;return U(this,(function(r){switch(r.label){case 0:return[4,uA(e,t)];case 1:return r.sent(),n=e.map((function(e){return e.name})),[4,Lm.post("".concat(y,"/images/all"),{images:n.map((function(e){return{url:A+e,title:e.split(".")[0],type:Eh(e,t)}}))})];case 2:return[2,r.sent().data.data.records]}}))}))},onConfirm:function(e){p(a,o,g,c?e:e[0]),v(a,c?e:e[0]),d(a,s,h)}},a)]})}function bA(e){var t=e.handleChange;return X.jsxs(l.TabList,{onChange:t,"aria-label":"lab API tabs example",children:[X.jsx(n.Tab,{label:X.jsx(xA,{flag:Ag.ENGLISH_FLAG,text:"EN"}),value:"1"}),X.jsx(n.Tab,{label:X.jsx(xA,{flag:Ag.ARABIC_FLAG,text:"AR"}),value:"2"})]})}function xA(e){var t=e.flag,r=e.text;return X.jsxs(n.Stack,{direction:"row",spacing:.5,alignItems:"center",children:[X.jsx(ki,{disabledEffect:!0,visibleByDefault:!0,alt:"empty content",src:t,sx:{width:23,height:15,borderRadius:"2px"}}),X.jsx(n.Typography,{fontWeight:1e3,fontSize:12,children:r})]})}function wA(e){var t=e.title,r=e.size,o=e.value,a=e.isEdit,i=e.fieldName,s=e.numberOfRows,c=e.setValue,u=e.getValues,d=e.handleChange,p=i+".ar",f=i+".en";a&&(f=i+".0.value",p=i+".1.value",c(i+".0.key","en"),c(i+".1.key","ar"));var m=(s||1)>1;function h(e,t,o,a,i){return X.jsxs(l.TabPanel,{value:e,style:{paddingTop:15},children:[X.jsx(as,{size:r,multiline:m,rows:s,dir:i,name:t,style:{minHeight:40,boxSizing:"border-box",paddingBottom:12}}),X.jsx(n.Typography,{paddingRight:2,paddingLeft:2,noWrap:!0,fontWeight:600,fontSize:13,color:"#919EAB",align:a,children:u(o)})]})}return X.jsxs(n.Card,{sx:{pl:2,pr:2,pt:2,pb:2,mb:2},children:[X.jsx(n.Typography,{fontWeight:600,height:25,fontSize:14,position:"inherit",display:"inline",color:"#919EAB",children:t}),X.jsx(n.Box,{borderColor:"black",sx:{width:"100%",typography:"body1"},children:X.jsxs(l.TabContext,{value:o,children:[X.jsx(n.Box,{sx:{borderBottom:1,borderColor:"divider"},children:X.jsx(bA,{handleChange:d})}),h("1",f,p,"right","ltr"),h("2",p,f,"left","rtl")]})})]})}var jA={exports:{}};jA.exports=function(){var e="week",t="year";return function(n,r,o){var a=r.prototype;a.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var r=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var a=o(this).startOf(t).add(1,t).date(r),i=o(this).endOf(e);if(a.isBefore(i))return 1}var s=o(this).startOf(t).date(r).startOf(e).subtract(1,"millisecond"),l=this.diff(s,e,!0);return l<0?o(this).startOf("week").week():Math.ceil(l)},a.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}();var MA=I(jA.exports),OA={exports:{}};OA.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,a={},i=function(e){return(e=+e)+(e>68?1900:2e3)},s=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],c=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=a.meridiem;if(r){for(var o=1;o<=24;o+=1)if(e.indexOf(r(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[o,function(e){this.afternoon=u(e,!1)}],a:[o,function(e){this.afternoon=u(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,s("seconds")],ss:[r,s("seconds")],m:[r,s("minutes")],mm:[r,s("minutes")],H:[r,s("hours")],h:[r,s("hours")],HH:[r,s("hours")],hh:[r,s("hours")],D:[r,s("day")],DD:[n,s("day")],Do:[o,function(e){var t=a.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,s("month")],MM:[n,s("month")],MMM:[o,function(e){var t=c("months"),n=(c("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,s("year")],YY:[n,function(e){this.year=i(e)}],YYYY:[/\d{4}/,s("year")],Z:l,ZZ:l};function p(n){var r,o;r=n,o=a&&a.formats;for(var i=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||o[r]||e[r]||o[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=i.length,l=0;l<s;l+=1){var c=i[l],u=d[c],p=u&&u[0],f=u&&u[1];i[l]=f?{regex:p,parser:f}:c.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var o=i[n];if("string"==typeof o)r+=o.length;else{var a=o.regex,l=o.parser,c=e.slice(r),u=a.exec(c)[0];l.call(t,u),e=e.replace(u,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(i=e.parseTwoDigitYear);var r=t.prototype,o=r.parse;r.parse=function(e){var t=e.date,r=e.utc,i=e.args;this.$u=r;var s=i[1];if("string"==typeof s){var l=!0===i[2],c=!0===i[3],u=l||c,d=i[2];c&&(d=i[2]),a=this.$locale(),!l&&d&&(a=n.Ls[d]),this.$d=function(e,t,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var r=p(t)(e),o=r.year,a=r.month,i=r.day,s=r.hours,l=r.minutes,c=r.seconds,u=r.milliseconds,d=r.zone,f=new Date,m=i||(o||a?1:f.getDate()),h=o||f.getFullYear(),g=0;o&&!a||(g=a>0?a-1:f.getMonth());var v=s||0,y=l||0,A=c||0,b=u||0;return d?new Date(Date.UTC(h,g,m,v,y,A,b+60*d.offset*1e3)):n?new Date(Date.UTC(h,g,m,v,y,A,b)):new Date(h,g,m,v,y,A,b)}catch(e){return new Date("")}}(t,s,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date("")),a={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){i[1]=s[m-1];var h=n.apply(this,i);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(""))}else o.call(this,e)}}}();var CA=I(OA.exports),zA={exports:{}};zA.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,r){var o=n.prototype,a=o.format;r.en.formats=e,o.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,o){var a=o&&o.toUpperCase();return r||n[o]||e[o]||n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,void 0===n?{}:n);return a.call(this,r)}}}();var DA=I(zA.exports),TA={exports:{}};TA.exports=function(e,t,n){t.prototype.isBetween=function(e,t,r,o){var a=n(e),i=n(t),s="("===(o=o||"()")[0],l=")"===o[1];return(s?this.isAfter(a,r):!this.isBefore(a,r))&&(l?this.isBefore(i,r):!this.isAfter(i,r))||(s?this.isBefore(a,r):!this.isAfter(a,r))&&(l?this.isAfter(i,r):!this.isBefore(i,r))}};var PA=I(TA.exports);const NA=(e,t="warning")=>{let n=!1;const r=Array.isArray(e)?e.join("\n"):e;return()=>{n||(n=!0,"error"===t?console.error(r):console.warn(r))}};O.extend(CA),O.extend(DA),O.extend(PA);const kA=NA(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),BA={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},EA={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"ddd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},LA=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n"),SA=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");class IA{constructor({locale:e,formats:t,instance:n}={}){var r,o,a;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=BA,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasUTCPlugin=()=>void 0!==O.utc,this.hasTimezonePlugin=()=>void 0!==O.tz,this.isSame=(e,t,n)=>{const r=this.setTimezone(t,this.getTimezone(e));return e.format(n)===r.format(n)},this.cleanTimezone=e=>{switch(e){case"default":return;case"system":return O.tz.guess();default:return e}},this.createSystemDate=e=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(e);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const t=O.tz.guess();return"UTC"!==t?O.tz(e,t):O(e)}return O(e)},this.createUTCDate=e=>{if(!this.hasUTCPlugin())throw new Error(LA);return O.utc(e)},this.createTZDate=(e,t)=>{if(!this.hasUTCPlugin())throw new Error(LA);if(!this.hasTimezonePlugin())throw new Error(SA);const n=void 0!==e&&!e.endsWith("Z");return O(e).tz(this.cleanTimezone(t),n)},this.getLocaleFormats=()=>{const e=O.Ls;let t=e[this.locale||"en"];return void 0===t&&(kA(),t=e.en),t.formats},this.adjustOffset=e=>{if(!this.hasTimezonePlugin())return e;const t=this.getTimezone(e);if("UTC"!==t){var n,r;const o=e.tz(this.cleanTimezone(t),!0);return(null!=(n=o.$offset)?n:0)===(null!=(r=e.$offset)?r:0)?e:o}return e},this.date=e=>null===e?null:this.dayjs(e),this.dateWithTimezone=(e,t)=>{if(null===e)return null;let n;return n="UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),void 0===this.locale?n:n.locale(this.locale)},this.getTimezone=e=>{if(this.hasUTCPlugin()&&e.isUTC())return"UTC";if(this.hasTimezonePlugin()){var t;const n=null==(t=e.$x)?void 0:t.$timezone;return null!=n?n:"system"}return"system"},this.setTimezone=(e,t)=>{if(this.getTimezone(e)===t)return e;if("UTC"===t){if(!this.hasUTCPlugin())throw new Error(LA);return e.utc()}if("system"===t)return e.local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(SA)}return O.tz(e,this.cleanTimezone(t))},this.toJsDate=e=>e.toDate(),this.parseISO=e=>this.dayjs(e),this.toISO=e=>e.toISOString(),this.parse=(e,t)=>""===e?null:this.dayjs(e,t,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=e=>{const t=this.getLocaleFormats();return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,((e,n,r)=>{const o=r&&r.toUpperCase();return n||t[r]||t[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,((e,t,n)=>t||n.slice(1)))}))},this.getFormatHelperText=e=>this.expandFormat(e).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=e=>null===e,this.isValid=e=>this.dayjs(e).isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>this.dayjs(e).format(t),this.formatNumber=e=>e,this.getDiff=(e,t,n)=>e.diff(t,n),this.isEqual=(e,t)=>null===e&&null===t||this.dayjs(e).toDate().getTime()===this.dayjs(t).toDate().getTime(),this.isSameYear=(e,t)=>this.isSame(e,t,"YYYY"),this.isSameMonth=(e,t)=>this.isSame(e,t,"YYYY-MM"),this.isSameDay=(e,t)=>this.isSame(e,t,"YYYY-MM-DD"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e>t,this.isAfterYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()>t.utc():e.isAfter(t,"year"),this.isAfterDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()>t.utc():e.isAfter(t,"day"),this.isBefore=(e,t)=>e<t,this.isBeforeYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()<t.utc():e.isBefore(t,"year"),this.isBeforeDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()<t.utc():e.isBefore(t,"day"),this.isWithinRange=(e,[t,n])=>e>=t&&e<=n,this.startOfYear=e=>this.adjustOffset(e.startOf("year")),this.startOfMonth=e=>this.adjustOffset(e.startOf("month")),this.startOfWeek=e=>this.adjustOffset(e.startOf("week")),this.startOfDay=e=>this.adjustOffset(e.startOf("day")),this.endOfYear=e=>this.adjustOffset(e.endOf("year")),this.endOfMonth=e=>this.adjustOffset(e.endOf("month")),this.endOfWeek=e=>this.adjustOffset(e.endOf("week")),this.endOfDay=e=>this.adjustOffset(e.endOf("day")),this.addYears=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"year"):e.add(t,"year")),this.addMonths=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"month"):e.add(t,"month")),this.addWeeks=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"week"):e.add(t,"week")),this.addDays=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"day"):e.add(t,"day")),this.addHours=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"hour"):e.add(t,"hour")),this.addMinutes=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"minute"):e.add(t,"minute")),this.addSeconds=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"second"):e.add(t,"second")),this.getYear=e=>e.year(),this.getMonth=e=>e.month(),this.getDate=e=>e.date(),this.getHours=e=>e.hour(),this.getMinutes=e=>e.minute(),this.getSeconds=e=>e.second(),this.getMilliseconds=e=>e.millisecond(),this.setYear=(e,t)=>this.adjustOffset(e.set("year",t)),this.setMonth=(e,t)=>this.adjustOffset(e.set("month",t)),this.setDate=(e,t)=>this.adjustOffset(e.set("date",t)),this.setHours=(e,t)=>this.adjustOffset(e.set("hour",t)),this.setMinutes=(e,t)=>this.adjustOffset(e.set("minute",t)),this.setSeconds=(e,t)=>this.adjustOffset(e.set("second",t)),this.setMilliseconds=(e,t)=>this.adjustOffset(e.set("millisecond",t)),this.getDaysInMonth=e=>e.daysInMonth(),this.getNextMonth=e=>this.addMonths(e,1),this.getPreviousMonth=e=>this.addMonths(e,-1),this.getMonthArray=e=>{const t=[e.startOf("year")];for(;t.length<12;){const e=t[t.length-1];t.push(this.addMonths(e,1))}return t},this.mergeDateAndTime=(e,t)=>e.hour(t.hour()).minute(t.minute()).second(t.second()),this.getWeekdays=()=>{const e=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map((t=>this.formatByString(this.addDays(e,t),"dd")))},this.getWeekArray=e=>{const t=this.setLocaleToValue(e),n=t.startOf("month").startOf("week"),r=t.endOf("month").endOf("week");let o=0,a=n;const i=[];for(;a<r;){const e=Math.floor(o/7);i[e]=i[e]||[],i[e].push(a),a=this.addDays(a,1),o+=1}return i},this.getWeekNumber=e=>e.week(),this.getYearRange=(e,t)=>{const n=e.startOf("year"),r=t.endOf("year"),o=[];let a=n;for(;a<r;)o.push(a),a=this.addYears(a,1);return o},this.getMeridiemText=e=>"am"===e?"AM":"PM",this.rawDayJsInstance=n,this.dayjs=(o=null!=(r=this.rawDayJsInstance)?r:O,(a=e)?(...e)=>o(...e).locale(a):o),this.locale=e,this.formats=ne({},EA,t),O.extend(MA)}}const WA=["localeText"],HA=B.createContext(null);"production"!==process.env.NODE_ENV&&(HA.displayName="MuiPickersAdapterContext");const RA=function(e){var t;const{localeText:n}=e,r=Wt(e,WA),{utils:o,localeText:a}=null!=(t=B.useContext(HA))?t:{utils:void 0,localeText:void 0},i=uo({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:c,dateLibInstance:u,adapterLocale:d,localeText:p}=i,f=B.useMemo((()=>ne({},p,a,n)),[p,a,n]),m=B.useMemo((()=>{if(!l)return o||null;const e=new l({locale:d,formats:c,instance:u});if(!e.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e}),[l,d,c,u,o]),h=B.useMemo((()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null),[m]),g=B.useMemo((()=>({utils:m,defaultDates:h,localeText:f})),[h,m,f]);return X.jsx(HA.Provider,{value:g,children:s})};"production"!==process.env.NODE_ENV&&(RA.propTypes={adapterLocale:Pe.any,children:Pe.node,dateAdapter:Pe.func,dateFormats:Pe.shape({dayOfMonth:Pe.string,fullDate:Pe.string,fullDateTime:Pe.string,fullDateTime12h:Pe.string,fullDateTime24h:Pe.string,fullDateWithWeekday:Pe.string,fullTime:Pe.string,fullTime12h:Pe.string,fullTime24h:Pe.string,hours12h:Pe.string,hours24h:Pe.string,keyboardDate:Pe.string,keyboardDateTime:Pe.string,keyboardDateTime12h:Pe.string,keyboardDateTime24h:Pe.string,meridiem:Pe.string,minutes:Pe.string,month:Pe.string,monthAndDate:Pe.string,monthAndYear:Pe.string,monthShort:Pe.string,normalDate:Pe.string,normalDateWithWeekday:Pe.string,seconds:Pe.string,shortDate:Pe.string,weekday:Pe.string,weekdayShort:Pe.string,year:Pe.string}),dateLibInstance:Pe.any,localeText:Pe.object});const VA=(e,t)=>e.length===t.length&&t.every((t=>e.includes(t))),YA=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},FA=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r},XA=(e,t,n)=>"date"===n?e.startOfDay(e.dateWithTimezone(void 0,t)):e.dateWithTimezone(void 0,t),QA=(e,t)=>{const n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},ZA=["hours","minutes","seconds"],GA=e=>ZA.includes(e),UA=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,qA=(e,t,n)=>{if(n){if((e>=12?"pm":"am")!==t)return"am"===t?e-12:e+12}return e},KA=(e,t,n,r)=>{const o=qA(r.getHours(e),t,n);return r.setHours(e,o)},JA=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),_A=(e,t)=>(n,r)=>e?t.isAfter(n,r):JA(n,t)>JA(r,t),$A=(e,{format:t,views:n,ampm:r})=>{if(null!=t)return t;const o=e.formats;return VA(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:VA(n,["minutes"])?o.minutes:VA(n,["seconds"])?o.seconds:VA(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:VA(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`},eb={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},tb=(e,t,n)=>{if(t===eb.year)return e.startOfYear(n);if(t===eb.month)return e.startOfMonth(n);if(t===eb.day)return e.startOfDay(n);let r=n;return t<eb.minutes&&(r=e.setMinutes(r,0)),t<eb.seconds&&(r=e.setSeconds(r,0)),t<eb.milliseconds&&(r=e.setMilliseconds(r,0)),r},nb=(e,t)=>{const n=e.formatTokenMap[t];if(null==n)throw new Error([`MUI: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join("\n"));return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},rb=(e,t,n)=>{const r=[],o=e.dateWithTimezone(void 0,t),a=e.startOfWeek(o),i=e.endOfWeek(o);let s=a;for(;e.isBefore(s,i);)r.push(s),s=e.addDays(s,1);return r.map((t=>e.formatByString(t,n)))},ob=(e,t,n,r)=>{switch(n){case"month":return YA(e,e.dateWithTimezone(void 0,t)).map((t=>e.formatByString(t,r)));case"weekDay":return rb(e,t,r);case"meridiem":{const n=e.dateWithTimezone(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map((t=>e.formatByString(t,r)))}default:return[]}},ab=(e,t,n)=>{let r=t;for(r=Number(r).toString();r.length<n;)r=`0${r}`;return r},ib=(e,t,n,r,o)=>{if("production"!==process.env.NODE_ENV&&"day"!==o.type&&"digit-with-letter"===o.contentType)throw new Error([`MUI: The token "${o.format}" is a digit format with letter in it.'\n This type of format is only supported for 'day' sections`].join("\n"));if("day"===o.type&&"digit-with-letter"===o.contentType){const t=e.setDate(r.longestMonth,n);return e.formatByString(t,o.format)}const a=n.toString();return o.hasLeadingZerosInInput?ab(0,a,o.maxLength):a},sb=(e,t,n,r,o,a,i)=>{const s=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}})(r),l="Home"===r,c="End"===r,u=""===n.value||l||c;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{const r=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),d=t=>ib(e,0,t,r,n),p="minutes"===n.type&&null!=i&&i.minutesStep?i.minutesStep:1;let f=parseInt(n.value,10)+s*p;if(u){if("year"===n.type&&!c&&!l)return e.formatByString(e.dateWithTimezone(void 0,t),n.format);f=s>0||l?r.minimum:r.maximum}return f%p!=0&&((s<0||l)&&(f+=p-(p+f)%p),(s>0||c)&&(f-=f%p)),f>r.maximum?d(r.minimum+(f-r.maximum-1)%(r.maximum-r.minimum+1)):f<r.minimum?d(r.maximum-(r.minimum-f-1)%(r.maximum-r.minimum+1)):d(f)})():(()=>{const r=ob(e,t,n.type,n.format);if(0===r.length)return n.value;if(u)return s>0||l?r[0]:r[r.length-1];const o=r.indexOf(n.value);return r[(o+r.length+s)%r.length]})()},lb=(e,t)=>{let n=e.value||e.placeholder;const r="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(n=Number(n).toString());return["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!r&&1===n.length&&(n=`${n}`),"input-rtl"===t&&(n=`${n}`),n},cb=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),ub=(e,t)=>{let n=0,r=t?1:0;const o=[];for(let a=0;a<e.length;a+=1){const i=e[a],s=lb(i,t?"input-rtl":"input-ltr"),l=`${i.startSeparator}${s}${i.endSeparator}`,c=cb(l).length,u=l.length,d=cb(s),p=r+s.indexOf(d[0])+i.startSeparator.length,f=p+d.length;o.push(ne({},i,{start:n,end:n+c,startInInput:p,endInInput:f})),n+=c,r+=u}return o},db=(e,t,n,r,o)=>{switch(r.type){case"year":return n.fieldYearPlaceholder({digitAmount:e.formatByString(e.dateWithTimezone(void 0,t),o).length});case"month":return n.fieldMonthPlaceholder({contentType:r.contentType});case"day":return n.fieldDayPlaceholder();case"weekDay":return n.fieldWeekDayPlaceholder({contentType:r.contentType});case"hours":return n.fieldHoursPlaceholder();case"minutes":return n.fieldMinutesPlaceholder();case"seconds":return n.fieldSecondsPlaceholder();case"meridiem":return n.fieldMeridiemPlaceholder();default:return o}},pb=(e,t,n,r)=>{if("production"!==process.env.NODE_ENV&&"weekDay"===nb(e,n).type)throw new Error("changeSectionValueFormat doesn't support week day formats");return e.formatByString(e.parse(t,n),r)},fb=(e,t,n)=>4===e.formatByString(e.dateWithTimezone(void 0,t),n).length,mb=(e,t,n,r,o)=>{if("digit"!==n)return!1;const a=e.dateWithTimezone(void 0,t);switch(r){case"year":if(fb(e,t,o)){return"0001"===e.formatByString(e.setYear(a,1),o)}return"01"===e.formatByString(e.setYear(a,2001),o);case"month":return e.formatByString(e.startOfYear(a),o).length>1;case"day":return e.formatByString(e.startOfMonth(a),o).length>1;case"weekDay":return e.formatByString(e.startOfWeek(a),o).length>1;case"hours":return e.formatByString(e.setHours(a,1),o).length>1;case"minutes":case"seconds":return e.formatByString(e.setMinutes(a,1),o).length>1;default:throw new Error("Invalid section type")}},hb=(e,t,n,r,o,a,i,s)=>{let l="";const c=[],u=e.date(),d=r=>{if(""===r)return null;const a=nb(e,r),s=mb(e,t,a.contentType,a.type,r),d=i?s:"digit"===a.contentType,p=null!=o&&e.isValid(o);let f=p?e.formatByString(o,r):"",m=null;if(d)if(s)m=""===f?e.formatByString(u,r).length:f.length;else{if(null==a.maxLength)throw new Error(`MUI: The token ${r} should have a 'maxDigitNumber' property on it's adapter`);m=a.maxLength,p&&(f=ab(0,f,m))}return c.push(ne({},a,{format:r,maxLength:m,value:f,placeholder:db(e,t,n,a,r),hasLeadingZeros:s,hasLeadingZerosInFormat:s,hasLeadingZerosInInput:d,startSeparator:0===c.length?l:"",endSeparator:"",modified:!1})),null};let p=10,f=r,m=e.expandFormat(r);for(;m!==f;)if(f=m,m=e.expandFormat(f),p-=1,p<0)throw new Error("MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component");const h=m,g=((e,t)=>{const n=[],{start:r,end:o}=e.escapedCharacters,a=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let i=null;for(;i=a.exec(t);)n.push({start:i.index,end:a.lastIndex-1});return n})(e,h),v=new RegExp(`^(${Object.keys(e.formatTokenMap).join("|")})`);let y="";for(let e=0;e<h.length;e+=1){const t=g.find((t=>t.start<=e&&t.end>=e)),n=h[e],r=null!=t,o=`${y}${h.slice(e)}`;if(!r&&n.match(/([A-Za-z]+)/)&&v.test(o))y+=n;else{r&&(null==t?void 0:t.start)===e||(null==t?void 0:t.end)===e||(d(y),y="",0===c.length?l+=n:c[c.length-1].endSeparator+=n)}}return d(y),c.map((e=>{const t=e=>{let t=e;return s&&null!==t&&t.includes(" ")&&(t=`${t}`),"spacious"===a&&["/",".","-"].includes(t)&&(t=` ${t} `),t};return e.startSeparator=t(e.startSeparator),e.endSeparator=t(e.endSeparator),e}))},gb=(e,t)=>{const n=t.some((e=>"day"===e.type)),r=[],o=[];for(let e=0;e<t.length;e+=1){const a=t[e];n&&"weekDay"===a.type||(r.push(a.format),o.push(lb(a,"non-input")))}const a=r.join(" "),i=o.join(" ");return e.parse(i,a)};let vb=!1;const yb=(e,t)=>{if("production"!==process.env.NODE_ENV&&!vb){const n=[];["date","date-time"].includes(t)&&n.push("weekDay","day","month","year"),["time","date-time"].includes(t)&&n.push("hours","minutes","seconds","meridiem");const r=e.find((e=>!n.includes(e.type)));r&&(console.warn(`MUI: The field component you are using is not compatible with the "${r.type} date section.`,`The supported date sections are ["${n.join('", "')}"]\`.`),vb=!0)}},Ab={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8},bb=(e,t,n,r,o,a)=>[...r].sort(((e,t)=>Ab[e.type]-Ab[t.type])).reduce(((r,o)=>!a||o.modified?((e,t,n,r,o)=>{switch(n.type){case"year":return e.setYear(o,e.getYear(r));case"month":return e.setMonth(o,e.getMonth(r));case"weekDay":{const o=rb(e,t,n.format),a=e.formatByString(r,n.format),i=o.indexOf(a),s=o.indexOf(n.value)-i;return e.addDays(r,s)}case"day":return e.setDate(o,e.getDate(r));case"meridiem":{const t=e.getHours(r)<12,n=e.getHours(o);return t&&n>=12?e.addHours(o,-12):!t&&n<12?e.addHours(o,12):o}case"hours":return e.setHours(o,e.getHours(r));case"minutes":return e.setMinutes(o,e.getMinutes(r));case"seconds":return e.setSeconds(o,e.getSeconds(r));default:return o}})(e,t,o,n,r):r),o),xb=["value","referenceDate"],wb={emptyValue:null,getTodayValue:XA,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Wt(e,xb);return null!=t&&r.utils.isValid(t)?t:null!=n?n:(({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{var a;let i=o?o():tb(t,n,XA(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,i)&&(i=tb(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,i)&&(i=tb(t,n,e.maxDate));const s=_A(null!=(a=e.disableIgnoringDatePartForTimeValidation)&&a,t);return null!=e.minTime&&s(e.minTime,i)&&(i=tb(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:FA(t,i,e.minTime))),null!=e.maxTime&&s(i,e.maxTime)&&(i=tb(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:FA(t,i,e.maxTime))),i})(r)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},jb={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,r,o)=>!e.isValid(t)&&!!n?n:ub(o(t),r),getValueStrFromSections:(e,t)=>{const n=e.map((e=>{const n=lb(e,t?"input-rtl":"input-ltr");return`${e.startSeparator}${n}${e.endSeparator}`})).join("");return t?`${n}`:n},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},Mb={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>`Select ${e}. ${null===t?"No time selected":`Selected time is ${n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?`Choose date, selected date is ${t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?`Choose time, selected time is ${t.format(e,"fullTime")}`:"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},Ob=Mb;ne({},Mb);const Cb=()=>{const e=B.useContext(HA);if(null===e)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.utils)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=B.useMemo((()=>ne({},Ob,e.localeText)),[e.localeText]);return B.useMemo((()=>ne({},e,{localeText:t})),[e,t])},zb=()=>Cb().utils,Db=()=>Cb().localeText,Tb=e=>{const t=zb(),n=B.useRef();return void 0===n.current&&(n.current=t.dateWithTimezone(void 0,e)),n.current};function Pb(e,t,n,r){const{value:o,onError:a}=e,i=Cb(),s=B.useRef(r),l=t({adapter:i,value:o,props:e});return B.useEffect((()=>{a&&!n(l,s.current)&&a(l,o),s.current=l}),[n,a,s,l,o]),l}const Nb=({timezone:e,value:t,defaultValue:n,onChange:r,valueManager:o})=>{var a,i;const s=zb(),l=B.useRef(n),c=null!=(a=null!=t?t:l.current)?a:o.emptyValue,u=B.useMemo((()=>o.getTimezone(s,c)),[s,o,c]),d=lt((e=>null==u?e:o.setTimezone(s,u,e))),p=null!=(i=null!=e?e:u)?i:"default";return{value:B.useMemo((()=>o.setTimezone(s,p,c)),[o,s,p,c]),handleValueChange:lt(((e,...t)=>{const n=d(e);null==r||r(n,...t)})),timezone:p}},kb=({name:e,timezone:t,value:n,defaultValue:r,onChange:o,valueManager:a})=>{const[i,s]=st({name:e,state:"value",controlled:n,default:null!=r?r:a.emptyValue}),l=lt(((e,...t)=>{s(e),null==o||o(e,...t)}));return Nb({timezone:t,value:i,defaultValue:void 0,onChange:l,valueManager:a})},Bb=e=>{const t=zb(),n=Db(),r=Cb(),o="rtl"===co().direction,{valueManager:a,fieldValueManager:i,valueType:s,validator:l,internalProps:c,internalProps:{value:u,defaultValue:d,referenceDate:p,onChange:f,format:m,formatDensity:h="dense",selectedSections:g,onSelectedSectionsChange:v,shouldRespectLeadingZeros:y=!1,timezone:A}}=e,{timezone:b,value:x,handleValueChange:w}=Nb({timezone:A,value:u,defaultValue:d,onChange:f,valueManager:a}),j=B.useMemo((()=>((e,t)=>{const n=e.dateWithTimezone(void 0,t),r=e.endOfYear(n),o=e.endOfDay(n),{maxDaysInMonth:a,longestMonth:i}=YA(e,n).reduce(((t,n)=>{const r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t}),{maxDaysInMonth:0,longestMonth:null});return{year:({format:n})=>({minimum:0,maximum:fb(e,t,n)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(r)+1}),day:({currentDate:t})=>({minimum:1,maximum:null!=t&&e.isValid(t)?e.getDaysInMonth(t):a,longestMonth:i}),weekDay:({format:n,contentType:r})=>{if("digit"===r){const r=rb(e,t,n).map(Number);return{minimum:Math.min(...r),maximum:Math.max(...r)}}return{minimum:1,maximum:7}},hours:({format:t})=>{const r=e.getHours(o);return e.formatByString(e.endOfDay(n),t)!==r.toString()?{minimum:1,maximum:Number(e.formatByString(e.startOfDay(n),t))}:{minimum:0,maximum:r}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:0})}})(t,b)),[t,b]),M=B.useCallback(((e,r=null)=>i.getSectionsFromValue(t,e,r,o,(e=>hb(t,b,n,m,e,h,y,o)))),[i,m,n,o,y,t,h,b]),O=B.useMemo((()=>i.getValueStrFromSections(M(a.emptyValue),o)),[i,M,a.emptyValue,o]),[C,z]=B.useState((()=>{const e=M(x);yb(e,s);const n={sections:e,value:x,referenceValue:a.emptyValue,tempValueStrAndroid:null},r=(e=>Math.max(...e.map((e=>{var t;return null!=(t=eb[e.type])?t:1}))))(e);return ne({},n,{referenceValue:a.getInitialReferenceValue({referenceDate:p,value:x,utils:t,props:c,granularity:r,timezone:b})})})),[D,T]=st({controlled:g,default:null,name:"useField",state:"selectedSectionIndexes"}),P=e=>{T(e),null==v||v(e),z((e=>ne({},e,{selectedSectionQuery:null})))},N=B.useMemo((()=>{if(null==D)return null;if("all"===D)return{startIndex:0,endIndex:C.sections.length-1,shouldSelectBoundarySelectors:!0};if("number"==typeof D)return{startIndex:D,endIndex:D};if("string"==typeof D){const e=C.sections.findIndex((e=>e.type===D));return{startIndex:e,endIndex:e}}return D}),[D,C.sections]),k=({value:e,referenceValue:t,sections:n})=>{z((r=>ne({},r,{sections:n,value:e,referenceValue:t,tempValueStrAndroid:null})));const o={validationError:l({adapter:r,value:e,props:ne({},c,{value:e,timezone:b})})};w(e,o)},E=(e,t)=>{const n=[...C.sections];return n[e]=ne({},n[e],{value:t,modified:!0}),ub(n,o)};return B.useEffect((()=>{const e=M(C.value);yb(e,s),z((t=>ne({},t,{sections:e})))}),[m,t.locale]),B.useEffect((()=>{let e=!1;e=!a.areValuesEqual(t,C.value,x)||a.getTimezone(t,C.value)!==a.getTimezone(t,x),e&&z((e=>ne({},e,{value:x,referenceValue:i.updateReferenceValue(t,x,e.referenceValue),sections:M(x)})))}),[x]),{state:C,selectedSectionIndexes:N,setSelectedSections:P,clearValue:()=>{a.areValuesEqual(t,C.value,a.emptyValue)||k({value:a.emptyValue,referenceValue:C.referenceValue,sections:M(a.emptyValue)})},clearActiveSection:()=>{if(null==N)return;const e=C.sections[N.startIndex];if(""===e.value)return;const n=i.getActiveDateManager(t,C,e),r=1===n.getSections(C.sections).filter((e=>""!==e.value)).length,o=E(N.startIndex,""),a=r?null:t.date(new Date("")),s=n.getNewValuesFromNewActiveDate(a);(null!=a&&!t.isValid(a))!=(null!=n.date&&!t.isValid(n.date))?k(ne({},s,{sections:o})):z((e=>ne({},e,s,{sections:o,tempValueStrAndroid:null})))},updateSectionValue:({activeSection:e,newSectionValue:n,shouldGoToNextSection:r})=>{r&&N&&N.startIndex<C.sections.length-1?P(N.startIndex+1):N&&N.startIndex!==N.endIndex&&P(N.startIndex);const o=i.getActiveDateManager(t,C,e),a=E(N.startIndex,n),s=o.getSections(a);let l,c,u=gb(t,s),d=!1;if(!t.isValid(u)){const e=((e,t,n,r)=>{if(!n.every((e=>"weekDay"===e.type||""!==e.value))||!n.some((e=>"day"===e.type)))return null;const o=n.map((t=>{if("day"!==t.type)return t;const n=r.day({currentDate:null,format:t.format,contentType:t.contentType});return ne({},t,{value:ib(e,0,n.minimum,n,t)})})),a=gb(e,o);return null!=a&&e.isValid(a)?n.map((e=>{if("day"!==e.type)return e;const t=r.day({currentDate:a,format:e.format,contentType:e.contentType});return Number(e.value)<=t.maximum?e:ne({},e,{value:t.maximum.toString()})})):null})(t,0,s,j);null!=e&&(d=!0,u=gb(t,e))}if(null!=u&&t.isValid(u)){const e=bb(t,b,u,s,o.referenceDate,!0);l=o.getNewValuesFromNewActiveDate(e),c=!0}else l=o.getNewValuesFromNewActiveDate(u),c=(null!=u&&!t.isValid(u))!=(null!=o.date&&!t.isValid(o.date));const p=d?M(l.value,C.sections):a;return c?k(ne({},l,{sections:p})):z((e=>ne({},e,l,{sections:p,tempValueStrAndroid:null})))},updateValueFromValueStr:e=>{const r=i.parseValueStr(e,C.referenceValue,((e,r)=>{const a=t.parse(e,m);if(null==a||!t.isValid(a))return null;const i=hb(t,b,n,m,a,h,y,o);return bb(t,b,a,i,r,!1)})),a=i.updateReferenceValue(t,r,C.referenceValue);k({value:r,referenceValue:a,sections:M(r,C.sections)})},setTempAndroidValueStr:e=>z((t=>ne({},t,{tempValueStrAndroid:e}))),sectionsValueBoundaries:j,placeholder:O,timezone:b}},Eb=e=>null!=e.saveQuery,Lb=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,setTempAndroidValueStr:r,timezone:o})=>{const a=zb(),[i,s]=B.useState(null),l=lt((()=>s(null)));B.useEffect((()=>{var t;null!=i&&(null==(t=e[i.sectionIndex])?void 0:t.type)!==i.sectionType&&l()}),[e,i,l]),B.useEffect((()=>{if(null!=i){const e=setTimeout((()=>l()),5e3);return()=>{window.clearTimeout(e)}}return()=>{}}),[i,l]);const c=({keyPressed:t,sectionIndex:n},r,o)=>{const a=t.toLowerCase(),c=e[n];if(null!=i&&(!o||o(i.value))&&i.sectionIndex===n){const e=`${i.value}${a}`,t=r(e,c);if(!Eb(t))return s({sectionIndex:n,value:e,sectionType:c.type}),t}const u=r(a,c);return Eb(u)&&!u.saveQuery?(l(),null):(s({sectionIndex:n,value:a,sectionType:c.type}),Eb(u)?null:u)};return{applyCharacterEditing:lt((i=>{const s=e[i.sectionIndex],l=!Number.isNaN(Number(i.keyPressed))?(e=>{const t=(e,t)=>{const r=Number(`${e}`),o=n[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(r>o.maximum)return{saveQuery:!1};if(r<o.minimum)return{saveQuery:!0};const i=Number(`${e}0`)>o.maximum||e.length===o.maximum.toString().length;return{sectionValue:ib(a,0,r,o,t),shouldGoToNextSection:i}};return c(e,((e,n)=>{if("digit"===n.contentType||"digit-with-letter"===n.contentType)return t(e,n);if("month"===n.type){const r=mb(a,o,"digit","month","MM"),i=t(e,{type:n.type,format:"MM",hasLeadingZerosInFormat:r,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});return Eb(i)?i:ne({},i,{sectionValue:pb(a,i.sectionValue,"MM",n.format)})}if("weekDay"===n.type){const r=t(e,n);return Eb(r)?r:ne({},r,{sectionValue:rb(a,o,n.format)[Number(r.sectionValue)-1]})}return{saveQuery:!1}}),(e=>!Number.isNaN(Number(e))))})(i):(e=>{const t=(e,t,n)=>{const r=t.filter((e=>e.toLowerCase().startsWith(n)));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},n=(e,n,r,i)=>{const s=e=>ob(a,o,n.type,e);if("letter"===n.contentType)return t(n.format,s(n.format),e);if(r&&null!=i&&"letter"===nb(a,r).contentType){const n=s(r),o=t(0,n,e);return Eb(o)?{saveQuery:!1}:ne({},o,{sectionValue:i(o.sectionValue,n)})}return{saveQuery:!1}};return c(e,((e,t)=>{switch(t.type){case"month":{const r=e=>pb(a,e,a.formats.month,t.format);return n(e,t,a.formats.month,r)}case"weekDay":{const r=(e,t)=>t.indexOf(e).toString();return n(e,t,a.formats.weekday,r)}case"meridiem":return n(e,t);default:return{saveQuery:!1}}}))})(i);null==l?r(null):t({activeSection:s,newSectionValue:l.sectionValue,shouldGoToNextSection:l.shouldGoToNextSection})})),resetCharacterQuery:l}};function Sb(e,t){return Array.isArray(t)?t.every((t=>-1!==e.indexOf(t))):-1!==e.indexOf(t)}const Ib=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Ib(t.shadowRoot):t:null},Wb="@media (pointer: fine)",Hb=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error"],Rb=e=>{const t=zb(),{state:n,selectedSectionIndexes:r,setSelectedSections:o,clearValue:a,clearActiveSection:i,updateSectionValue:s,updateValueFromValueStr:l,setTempAndroidValueStr:c,sectionsValueBoundaries:u,placeholder:d,timezone:p}=Bb(e),{inputRef:f,internalProps:m,internalProps:{readOnly:h=!1,unstableFieldRef:g,minutesStep:v},forwardedProps:{onClick:y,onKeyDown:A,onFocus:b,onBlur:x,onMouseUp:w,onPaste:j,error:M},fieldValueManager:O,valueManager:C,validator:z}=e,D=Wt(e.forwardedProps,Hb),{applyCharacterEditing:T,resetCharacterQuery:P}=Lb({sections:n.sections,updateSectionValue:s,sectionsValueBoundaries:u,setTempAndroidValueStr:c,timezone:p}),N=B.useRef(null),k=ct(f,N),E=B.useRef(void 0),L="rtl"===co().direction,S=B.useMemo((()=>((e,t)=>{const n={};if(!t)return e.forEach(((t,r)=>{const o=0===r?null:r-1,a=r===e.length-1?null:r+1;n[r]={leftIndex:o,rightIndex:a}})),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let a=0,i=0,s=e.length-1;for(;s>=0;){i=e.findIndex(((e,t)=>{var n;return t>=a&&(null==(n=e.endSeparator)?void 0:n.includes(" "))&&" / "!==e.endSeparator})),-1===i&&(i=e.length-1);for(let e=i;e>=a;e-=1)o[e]=s,r[s]=e,s-=1;a=i+1}return e.forEach(((t,a)=>{const i=o[a],s=0===i?null:r[i-1],l=i===e.length-1?null:r[i+1];n[a]={leftIndex:s,rightIndex:l}})),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(n.sections,L)),[n.sections,L]),I=()=>{var e;if(h)return void o(null);const t=null!=(e=N.current.selectionStart)?e:0;let r;r=t<=n.sections[0].startInInput||t>=n.sections[n.sections.length-1].endInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>t));const a=-1===r?n.sections.length-1:r-1;o(a)},W=lt(((...e)=>{null==y||y(...e),I()})),H=lt((e=>{null==w||w(e),e.preventDefault()})),R=lt(((...e)=>{null==b||b(...e);const t=N.current;window.clearTimeout(E.current),E.current=setTimeout((()=>{t&&t===N.current&&(null!=r||h||(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?o("all"):I()))}))})),V=lt(((...e)=>{null==x||x(...e),o(null)})),Y=lt((e=>{if(null==j||j(e),h)return void e.preventDefault();const t=e.clipboardData.getData("text");if(r&&r.startIndex===r.endIndex){const o=n.sections[r.startIndex],a=/^[a-zA-Z]+$/.test(t),i=/^[0-9]+$/.test(t),s=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===o.contentType&&a||"digit"===o.contentType&&i||"digit-with-letter"===o.contentType&&s)return;if(a||i)return void e.preventDefault()}e.preventDefault(),P(),l(t)})),F=lt((e=>{if(h)return;const t=e.target.value,o=e.nativeEvent.data,a=o&&o.length>1,i=a?o:t,s=cb(i);if(null==r||a)return void l(a?o:s);let u;if(0===r.startIndex&&r.endIndex===n.sections.length-1&&1===s.length)u=s;else{const e=cb(O.getValueStrFromSections(n.sections,L));let t=-1,o=-1;for(let n=0;n<e.length;n+=1)-1===t&&e[n]!==s[n]&&(t=n),-1===o&&e[e.length-n-1]!==s[s.length-n-1]&&(o=n);const a=n.sections[r.startIndex];if(t<a.start||e.length-o-1>a.end)return;const i=s.length-e.length+a.end-cb(a.endSeparator||"").length;u=s.slice(a.start+cb(a.startSeparator||"").length,i)}navigator.userAgent.toLowerCase().indexOf("android")>-1&&0===u.length?c(i):T({keyPressed:u,sectionIndex:r.startIndex})})),X=lt((e=>{switch(null==A||A(e),!0){case"a"===e.key&&(e.ctrlKey||e.metaKey):e.preventDefault(),o("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==r)o(S.startIndex);else if(r.startIndex!==r.endIndex)o(r.endIndex);else{const e=S.neighbors[r.startIndex].rightIndex;null!==e&&o(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==r)o(S.endIndex);else if(r.startIndex!==r.endIndex)o(r.startIndex);else{const e=S.neighbors[r.startIndex].leftIndex;null!==e&&o(e)}break;case["Backspace","Delete"].includes(e.key):if(e.preventDefault(),h)break;null==r||0===r.startIndex&&r.endIndex===n.sections.length-1?a():i(),P();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),h||null==r)break;const o=n.sections[r.startIndex],a=O.getActiveDateManager(t,n,o),i=sb(t,p,o,e.key,u,a.date,{minutesStep:v});s({activeSection:o,newSectionValue:i,shouldGoToNextSection:!1});break}}}));nt((()=>{if(!N.current)return;if(null==r)return void(N.current.scrollLeft&&(N.current.scrollLeft=0));const e=n.sections[r.startIndex],t=n.sections[r.endIndex];let o=e.startInInput,a=t.endInInput;if(r.shouldSelectBoundarySelectors&&(o-=e.startSeparator.length,a+=t.endSeparator.length),o!==N.current.selectionStart||a!==N.current.selectionEnd){const e=N.current.scrollTop;N.current===Ib(document)&&N.current.setSelectionRange(o,a),N.current.scrollTop=e}}));const Q=Pb(ne({},m,{value:n.value,timezone:p}),z,C.isSameError,C.defaultErrorState),Z=B.useMemo((()=>void 0!==M?M:C.hasError(Q)),[C,Q,M]);B.useEffect((()=>{Z||r||P()}),[n.referenceValue,r,Z]),B.useEffect((()=>(N.current&&N.current===document.activeElement&&o("all"),()=>window.clearTimeout(E.current))),[]),B.useEffect((()=>{null!=n.tempValueStrAndroid&&null!=r&&(P(),i())}),[n.tempValueStrAndroid]);const G=B.useMemo((()=>{var e;return null!=(e=n.tempValueStrAndroid)?e:O.getValueStrFromSections(n.sections,L)}),[n.sections,O,n.tempValueStrAndroid,L]),U=B.useMemo((()=>null==r||"letter"===n.sections[r.startIndex].contentType?"text":"numeric"),[r,n.sections]),q=!(N.current&&N.current===Ib(document))&&C.areValuesEqual(t,n.value,C.emptyValue);return B.useImperativeHandle(g,(()=>({getSections:()=>n.sections,getActiveSectionIndex:()=>{var e,t;const r=null!=(e=N.current.selectionStart)?e:0,o=null!=(t=N.current.selectionEnd)?t:0;if(0===r&&0===o)return null;const a=r<=n.sections[0].startInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>r));return-1===a?n.sections.length-1:a-1},setSelectedSections:e=>o(e)}))),ne({placeholder:d,autoComplete:"off"},D,{value:q?"":G,inputMode:U,readOnly:h,onClick:W,onFocus:R,onBlur:V,onPaste:Y,onChange:F,onKeyDown:X,onMouseUp:H,error:Z,ref:k})},Vb=({adapter:e,value:t,props:n})=>{if(null===t)return null;const{minTime:r,maxTime:o,minutesStep:a,shouldDisableClock:i,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u,timezone:d}=n,p=e.utils.dateWithTimezone(void 0,d),f=_A(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case Boolean(r&&f(r,t)):return"minTime";case Boolean(o&&f(t,o)):return"maxTime";case Boolean(u&&e.utils.isAfter(t,p)):return"disableFuture";case Boolean(c&&e.utils.isBefore(t,p)):return"disablePast";case Boolean(s&&s(t,"hours")):return"shouldDisableTime-hours";case Boolean(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case Boolean(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case Boolean(i&&i(e.utils.getHours(t),"hours")):return"shouldDisableClock-hours";case Boolean(i&&i(e.utils.getMinutes(t),"minutes")):return"shouldDisableClock-minutes";case Boolean(i&&i(e.utils.getSeconds(t),"seconds")):return"shouldDisableClock-seconds";case Boolean(a&&e.utils.getMinutes(t)%a!=0):return"minutesStep";default:return null}},Yb=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],Fb=["disablePast","disableFuture","minTime","maxTime","shouldDisableClock","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],Xb=["minDateTime","maxDateTime"],Qb=[...Yb,...Fb,...Xb],Zb=e=>Qb.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{}),Gb=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],Ub=({props:e,inputRef:t})=>{const n=(e=>{var t,n,r,o;const a=zb(),i=(null!=(t=e.ampm)?t:a.is12HourCycleInCurrentLocale())?a.formats.fullTime12h:a.formats.fullTime24h;return ne({},e,{disablePast:null!=(n=e.disablePast)&&n,disableFuture:null!=(r=e.disableFuture)&&r,format:null!=(o=e.format)?o:i})})(e),{forwardedProps:r,internalProps:o}=((e,t)=>{const n=ne({},e),r={},o=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return Gb.forEach(o),"date"===t?Yb.forEach(o):"time"===t?Fb.forEach(o):"date-time"===t&&(Yb.forEach(o),Fb.forEach(o),Xb.forEach(o)),{forwardedProps:n,internalProps:r}})(n,"time");return Rb({inputRef:t,forwardedProps:r,internalProps:o,valueManager:wb,fieldValueManager:jb,validator:Vb,valueType:"time"})},qb=["slots","slotProps","components","componentsProps","InputProps","inputProps"],Kb=["inputRef"],Jb=["ref","onPaste","onKeyDown","inputMode","readOnly"],_b=B.forwardRef((function(e,t){var n,r,o;const a=uo({props:e,name:"MuiTimeField"}),{slots:i,slotProps:s,components:l,componentsProps:c,InputProps:u,inputProps:d}=a,p=Wt(a,qb),f=a,m=null!=(n=null!=(r=null==i?void 0:i.textField)?r:null==l?void 0:l.TextField)?n:Qd,h=ko({elementType:m,externalSlotProps:null!=(o=null==s?void 0:s.textField)?o:null==c?void 0:c.textField,externalForwardedProps:p,ownerState:f}),{inputRef:g}=h,v=Wt(h,Kb);v.inputProps=ne({},d,v.inputProps),v.InputProps=ne({},u,v.InputProps);const y=Ub({props:v,inputRef:g}),{ref:A,onPaste:b,onKeyDown:x,inputMode:w,readOnly:j}=y,M=Wt(y,Jb);return X.jsx(m,ne({ref:t},M,{InputProps:ne({},M.InputProps,{readOnly:j}),inputProps:ne({},M.inputProps,{inputMode:w,onPaste:b,onKeyDown:x,ref:A})}))}));function $b(e){return Et("MuiPickersToolbarText",e)}"production"!==process.env.NODE_ENV&&(_b.propTypes={ampm:Pe.bool,autoFocus:Pe.bool,className:Pe.string,color:Pe.oneOf(["error","info","primary","secondary","success","warning"]),component:Pe.elementType,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disablePast:Pe.bool,focused:Pe.bool,format:Pe.string,formatDensity:Pe.oneOf(["dense","spacious"]),FormHelperTextProps:Pe.object,fullWidth:Pe.bool,helperText:Pe.node,hiddenLabel:Pe.bool,id:Pe.string,InputLabelProps:Pe.object,inputProps:Pe.object,InputProps:Pe.object,inputRef:Pe.oneOfType([Pe.func,Pe.shape({current:Pe.any.isRequired})]),label:Pe.node,margin:Pe.oneOf(["dense","none","normal"]),maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,name:Pe.string,onBlur:Pe.func,onChange:Pe.func,onClick:Pe.func,onError:Pe.func,onFocus:Pe.func,onSelectedSectionsChange:Pe.func,readOnly:Pe.bool,referenceDate:Pe.any,required:Pe.bool,selectedSections:Pe.oneOfType([Pe.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),Pe.number,Pe.shape({endIndex:Pe.number.isRequired,startIndex:Pe.number.isRequired})]),shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,shouldRespectLeadingZeros:Pe.bool,size:Pe.oneOf(["medium","small"]),slotProps:Pe.object,slots:Pe.object,style:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),timezone:Pe.string,unstableFieldRef:Pe.oneOfType([Pe.func,Pe.object]),value:Pe.any,variant:Pe.oneOf(["filled","outlined","standard"])});const ex=Lt("MuiPickersToolbarText",["root","selected"]),tx=["className","selected","value"],nx=mo(Cf,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${ex.selected}`]:t.selected}]})((({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${ex.selected}`]:{color:(e.vars||e).palette.text.primary}}))),rx=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiPickersToolbarText"}),{className:r,value:o}=n,a=Wt(n,tx),i=(e=>{const{classes:t,selected:n}=e;return Pt({root:["root",n&&"selected"]},$b,t)})(n);return X.jsx(nx,ne({ref:t,className:Jn(r,i.root),component:"span"},a,{children:o}))}));function ox(e){return Et("MuiButton",e)}var ax=Lt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const ix=B.createContext({});"production"!==process.env.NODE_ENV&&(ix.displayName="ButtonGroupContext");var sx=ix;const lx=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],cx=e=>ne({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),ux=mo(xp,{shouldForwardProp:e=>po(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ue(n.color)}`],t[`size${Ue(n.size)}`],t[`${n.variant}Size${Ue(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],a="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return ne({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":ne({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:vr(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vr(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vr(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":ne({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${ax.focusVisible}`]:ne({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${ax.disabled}`]:ne({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${vr(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ax.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ax.disabled}`]:{boxShadow:"none"}})),dx=mo("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Ue(n.size)}`]]}})((({ownerState:e})=>ne({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},cx(e)))),px=mo("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Ue(n.size)}`]]}})((({ownerState:e})=>ne({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},cx(e)))),fx=B.forwardRef((function(e,t){const n=B.useContext(sx),r=uo({props:Tt(n,e),name:"MuiButton"}),{children:o,color:a="primary",component:i="button",className:s,disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,endIcon:d,focusVisibleClassName:p,fullWidth:f=!1,size:m="medium",startIcon:h,type:g,variant:v="text"}=r,y=Wt(r,lx),A=ne({},r,{color:a,component:i,disabled:l,disableElevation:c,disableFocusRipple:u,fullWidth:f,size:m,type:g,variant:v}),b=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:a,classes:i}=e;return ne({},i,Pt({root:["root",a,`${a}${Ue(t)}`,`size${Ue(o)}`,`${a}Size${Ue(o)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Ue(o)}`],endIcon:["endIcon",`iconSize${Ue(o)}`]},ox,i))})(A),x=h&&X.jsx(dx,{className:b.startIcon,ownerState:A,children:h}),w=d&&X.jsx(px,{className:b.endIcon,ownerState:A,children:d});return X.jsxs(ux,ne({ownerState:A,className:Jn(n.className,b.root,s),component:i,disabled:l,focusRipple:!u,focusVisibleClassName:Jn(b.focusVisible,p),ref:t,type:g},y,{classes:b,children:[x,o,w]}))}));"production"!==process.env.NODE_ENV&&(fx.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,color:Pe.oneOfType([Pe.oneOf(["inherit","primary","secondary","success","error","info","warning"]),Pe.string]),component:Pe.elementType,disabled:Pe.bool,disableElevation:Pe.bool,disableFocusRipple:Pe.bool,disableRipple:Pe.bool,endIcon:Pe.node,focusVisibleClassName:Pe.string,fullWidth:Pe.bool,href:Pe.string,size:Pe.oneOfType([Pe.oneOf(["small","medium","large"]),Pe.string]),startIcon:Pe.node,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),type:Pe.oneOfType([Pe.oneOf(["button","reset","submit"]),Pe.string]),variant:Pe.oneOfType([Pe.oneOf(["contained","outlined","text"]),Pe.string])});var mx=fx;function hx(e){return Et("MuiPickersToolbar",e)}Lt("MuiPickersToolbar",["root","content"]);const gx=["align","className","selected","typographyClassName","value","variant","width"],vx=mo(mx,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),yx=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:o,selected:a,typographyClassName:i,value:s,variant:l,width:c}=n,u=Wt(n,gx),d=(e=>{const{classes:t}=e;return Pt({root:["root"]},hx,t)})(n);return X.jsx(vx,ne({variant:"text",ref:t,className:Jn(o,d.root)},c?{sx:{width:c}}:{},u,{children:X.jsx(rx,{align:r,className:i,variant:l,value:s,selected:a})}))})),Ax=mo("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>ne({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3)},t.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}))),bx=mo(gf,{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})((({ownerState:e})=>ne({flex:1},!e.isLandscape&&{alignItems:"center"}))),xx=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiPickersToolbar"}),{children:r,className:o,isLandscape:a,landscapeDirection:i="column",toolbarTitle:s,hidden:l,titleId:c}=n,u=n,d=(e=>{const{classes:t,isLandscape:n}=e;return Pt({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},hx,t)})(u);return l?null:X.jsxs(Ax,{ref:t,className:Jn(d.root,o),ownerState:u,children:[X.jsx(Cf,{color:"text.secondary",variant:"overline",id:c,children:s}),X.jsx(bx,{container:!0,justifyContent:a?"flex-start":"space-between",className:d.content,ownerState:u,direction:a?i:"row",alignItems:a?"flex-start":"flex-end",children:r})]})}));function wx(e,t,n,r){const o=zb();return{meridiemMode:UA(e,o),handleMeridiemChange:B.useCallback((a=>{const i=null==e?null:KA(e,a,Boolean(t),o);n(i,null!=r?r:"partial")}),[t,e,n,r,o])}}function jx(e){return Et("MuiTimePickerToolbar",e)}const Mx=Lt("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Ox=["ampm","ampmInClock","value","isLandscape","onChange","view","onViewChange","views","disabled","readOnly"],Cx=e=>{const{theme:t,isLandscape:n,classes:r}=e;return Pt({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",n&&"hourMinuteLabelLandscape","rtl"===t.direction&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},jx,r)},zx=mo(xx,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Dx=mo(rx,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),Tx=mo("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${Mx.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${Mx.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})((({theme:e,ownerState:t})=>ne({display:"flex",justifyContent:"flex-end",alignItems:"flex-end"},t.isLandscape&&{marginTop:"auto"},"rtl"===e.direction&&{flexDirection:"row-reverse"})));Tx.propTypes={as:Pe.elementType,ownerState:Pe.object.isRequired,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])};const Px=mo("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${Mx.ampmLabel}`]:t.ampmLabel},{[`&.${Mx.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})((({ownerState:e})=>ne({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12},e.isLandscape&&{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"},{[`& .${Mx.ampmLabel}`]:{fontSize:17}})));function Nx(e){const t=uo({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,isLandscape:a,onChange:i,view:s,onViewChange:l,views:c,disabled:u,readOnly:d}=t,p=Wt(t,Ox),f=zb(),m=Db(),h=co(),g=Boolean(n&&!r&&c.includes("hours")),{meridiemMode:v,handleMeridiemChange:y}=wx(o,n,i),A=t,b=Cx(ne({},A,{theme:h})),x=X.jsx(Dx,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:b.separator});return X.jsxs(zx,ne({landscapeDirection:"row",toolbarTitle:m.timePickerToolbarTitle,isLandscape:a,ownerState:A,className:b.root},p,{children:[X.jsxs(Tx,{className:b.hourMinuteLabel,ownerState:A,children:[Sb(c,"hours")&&X.jsx(yx,{tabIndex:-1,variant:"h3",onClick:()=>l("hours"),selected:"hours"===s,value:o?(w=o,n?f.format(w,"hours12h"):f.format(w,"hours24h")):"--"}),Sb(c,["hours","minutes"])&&x,Sb(c,"minutes")&&X.jsx(yx,{tabIndex:-1,variant:"h3",onClick:()=>l("minutes"),selected:"minutes"===s,value:o?f.format(o,"minutes"):"--"}),Sb(c,["minutes","seconds"])&&x,Sb(c,"seconds")&&X.jsx(yx,{variant:"h3",onClick:()=>l("seconds"),selected:"seconds"===s,value:o?f.format(o,"seconds"):"--"})]}),g&&X.jsxs(Px,{className:b.ampmSelection,ownerState:A,children:[X.jsx(yx,{disableRipple:!0,variant:"subtitle2",selected:"am"===v,typographyClassName:b.ampmLabel,value:QA(f,"am"),onClick:d?void 0:()=>y("am"),disabled:u}),X.jsx(yx,{disableRipple:!0,variant:"subtitle2",selected:"pm"===v,typographyClassName:b.ampmLabel,value:QA(f,"pm"),onClick:d?void 0:()=>y("pm"),disabled:u})]})]}));var w}Px.propTypes={as:Pe.elementType,ownerState:Pe.object.isRequired,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])},"production"!==process.env.NODE_ENV&&(Nx.propTypes={ampm:Pe.bool,ampmInClock:Pe.bool,classes:Pe.object,className:Pe.string,disabled:Pe.bool,hidden:Pe.bool,isLandscape:Pe.bool.isRequired,onChange:Pe.func.isRequired,onViewChange:Pe.func.isRequired,readOnly:Pe.bool,titleId:Pe.string,toolbarFormat:Pe.string,toolbarPlaceholder:Pe.node,value:Pe.any,view:Pe.oneOf(["hours","meridiem","minutes","seconds"]).isRequired,views:Pe.arrayOf(Pe.oneOf(["hours","meridiem","minutes","seconds"]).isRequired).isRequired});const kx=e=>{if(void 0!==e)return Object.keys(e).reduce(((t,n)=>ne({},t,{[`${n.slice(0,1).toLowerCase()}${n.slice(1)}`]:e[n]})),{})};function Bx(e,t){var n,r,o,a,i;const s=zb(),l=uo({props:e,name:t}),c=null!=(n=l.ampm)?n:s.is12HourCycleInCurrentLocale(),u=B.useMemo((()=>{var e;return null==(null==(e=l.localeText)?void 0:e.toolbarTitle)?l.localeText:ne({},l.localeText,{timePickerToolbarTitle:l.localeText.toolbarTitle})}),[l.localeText]),d=null!=(r=l.slots)?r:kx(l.components),p=null!=(o=l.slotProps)?o:l.componentsProps;return ne({},l,{ampm:c,localeText:u},(({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=null!=n?n:r;let a;if(null!=e)a=e;else if(o.includes(t))a=t;else{if(!(o.length>0))throw new Error("MUI: The `views` prop must contain at least one view");a=o[0]}return{views:o,openTo:a}})({views:l.views,openTo:l.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{disableFuture:null!=(a=l.disableFuture)&&a,disablePast:null!=(i=l.disablePast)&&i,slots:ne({toolbar:Nx},d),slotProps:ne({},p,{toolbar:ne({ampm:c,ampmInClock:l.ampmInClock},null==p?void 0:p.toolbar)})})}La(X.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const Ex=La(X.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),Lx=La(X.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight");La(X.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");const Sx=La(X.jsxs(B.Fragment,{children:[X.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),X.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");function Ix(e){return Et("MuiInputAdornment",e)}La(X.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),La(X.jsxs(B.Fragment,{children:[X.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),X.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");var Wx,Hx=Lt("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);const Rx=["children","className","component","disablePointerEvents","disableTypography","position","variant"],Vx=mo("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ue(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((({theme:e,ownerState:t})=>ne({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${Hx.positionStart}&:not(.${Hx.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),Yx=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:a="div",disablePointerEvents:i=!1,disableTypography:s=!1,position:l,variant:c}=n,u=Wt(n,Rx),d=oc()||{};let p=c;c&&d.variant&&"production"!==process.env.NODE_ENV&&c===d.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),d&&!p&&(p=d.variant);const f=ne({},n,{hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:i,position:l,variant:p}),m=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:a,variant:i}=e;return Pt({root:["root",n&&"disablePointerEvents",o&&`position${Ue(o)}`,i,r&&"hiddenLabel",a&&`size${Ue(a)}`]},Ix,t)})(f);return X.jsx(rc.Provider,{value:null,children:X.jsx(Vx,ne({as:a,ownerState:f,className:Jn(m.root,o),ref:t},u,{children:"string"!=typeof r||s?X.jsxs(B.Fragment,{children:["start"===l?Wx||(Wx=X.jsx("span",{className:"notranslate",children:""})):null,r]}):X.jsx(Cf,{color:"text.secondary",children:r})}))})}));"production"!==process.env.NODE_ENV&&(Yx.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,component:Pe.elementType,disablePointerEvents:Pe.bool,disableTypography:Pe.bool,position:Pe.oneOf(["end","start"]).isRequired,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),variant:Pe.oneOf(["filled","outlined","standard"])});var Fx=Yx;function Xx(e){return Et("MuiPickersPopper",e)}Lt("MuiPickersPopper",["root","paper"]);const Qx=mo(qd,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({zIndex:e.zIndex.modal}))),Zx=mo(Ua,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({ownerState:e})=>ne({transformOrigin:"top center",outline:0},"top"===e.placement&&{transformOrigin:"bottom center"})));function Gx(e){var t,n,r,o;const a=uo({props:e,name:"MuiPickersPopper"}),{anchorEl:i,children:s,containerRef:l=null,shouldRestoreFocus:c,onBlur:u,onDismiss:d,open:p,role:f,placement:m,slots:h,slotProps:g}=a;B.useEffect((()=>{function e(e){!p||"Escape"!==e.key&&"Esc"!==e.key||d()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[d,p]);const v=B.useRef(null);B.useEffect((()=>{"tooltip"===f||c&&!c()||(p?v.current=Ib(document):v.current&&v.current instanceof HTMLElement&&setTimeout((()=>{v.current instanceof HTMLElement&&v.current.focus()})))}),[p,f,c]);const[y,A,b]=function(e,t){const n=B.useRef(!1),r=B.useRef(!1),o=B.useRef(null),a=B.useRef(!1);B.useEffect((()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),a.current=!1};function t(){a.current=!0}}),[e]);const i=lt((e=>{if(!a.current)return;const i=r.current;r.current=!1;const s=_e(o.current);if(!o.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,s))return;if(n.current)return void(n.current=!1);let l;l=e.composedPath?e.composedPath().indexOf(o.current)>-1:!s.documentElement.contains(e.target)||o.current.contains(e.target),l||i||t(e)})),s=()=>{r.current=!0};return B.useEffect((()=>{if(e){const e=_e(o.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",i),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",t)}}}),[e,i]),B.useEffect((()=>{if(e){const e=_e(o.current);return e.addEventListener("click",i),()=>{e.removeEventListener("click",i),r.current=!1}}}),[e,i]),[o,s,s]}(p,null!=u?u:d),x=ct(B.useRef(null),l),w=ct(x,y),j=a,M=(e=>{const{classes:t}=e;return Pt({root:["root"],paper:["paper"]},Xx,t)})(j),O=null!=(t=null==h?void 0:h.desktopTransition)?t:Yu,C=null!=(n=null==h?void 0:h.desktopTrapFocus)?n:Xo,z=null!=(r=null==h?void 0:h.desktopPaper)?r:Zx,D=ko({elementType:z,externalSlotProps:null==g?void 0:g.desktopPaper,additionalProps:{tabIndex:-1,elevation:8,ref:w},className:M.paper,ownerState:{}}),T=null!=(o=null==h?void 0:h.popper)?o:Qx,P=ko({elementType:T,externalSlotProps:null==g?void 0:g.popper,additionalProps:{transition:!0,role:f,open:p,anchorEl:i,placement:m,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),d())}},className:M.root,ownerState:a});return X.jsx(T,ne({},P,{children:({TransitionProps:e,placement:t})=>X.jsx(C,ne({open:p,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===f,isEnabled:()=>!0},null==g?void 0:g.desktopTrapFocus,{children:X.jsx(O,ne({},e,null==g?void 0:g.desktopTransition,{children:X.jsx(z,ne({},D,{onClick:e=>{var t;A(e),null==(t=D.onClick)||t.call(D,e)},onTouchStart:e=>{var t;b(e),null==(t=D.onTouchStart)||t.call(D,e)},ownerState:ne({},j,{placement:t}),children:s}))}))}))}))}const Ux=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:a,onChange:i,value:s,defaultValue:l,closeOnSelect:c="desktop"===r,selectedSections:u,onSelectedSectionsChange:d,timezone:p}=e,{current:f}=B.useRef(l),{current:m}=B.useRef(void 0!==s);"production"!==process.env.NODE_ENV&&(B.useEffect((()=>{m!==(void 0!==s)&&console.error([`MUI: A component is changing the ${m?"":"un"}controlled value of a picker to be ${m?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).","Decide between using a controlled or uncontrolled valuefor the lifetime of the component.","The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join("\n"))}),[s]),B.useEffect((()=>{m||f===l||console.error(["MUI: A component is changing the defaultValue of an uncontrolled picker after being initialized. To suppress this warning opt to use a controlled value."].join("\n"))}),[JSON.stringify(f)]));const h=zb(),g=Cb(),[v,y]=st({controlled:u,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:A,setIsOpen:b}=(({open:e,onOpen:t,onClose:n})=>{const r=B.useRef("boolean"==typeof e).current,[o,a]=B.useState(!1);return B.useEffect((()=>{if(r){if("boolean"!=typeof e)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");a(e)}}),[r,e]),{isOpen:o,setIsOpen:B.useCallback((e=>{r||a(e),e&&t&&t(),!e&&n&&n()}),[r,t,n])}})(e),[x,w]=B.useState((()=>{let e;return e=void 0!==s?s:void 0!==f?f:t.emptyValue,{draft:e,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:s,hasBeenModifiedSinceMount:!1}})),{timezone:j,handleValueChange:M}=Nb({timezone:p,value:s,defaultValue:f,onChange:i,valueManager:t});Pb(ne({},e,{value:x.draft,timezone:j}),o,t.isSameError,t.defaultErrorState);const O=lt((n=>{const r={action:n,dateState:x,hasChanged:e=>!t.areValuesEqual(h,n.value,e),isControlled:m,closeOnSelect:c},i=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,a=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!(!a||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!a||n(r.lastPublishedValue)))})(r),s=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:a}=e,i=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!(!i||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&a?!!i||n(r.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(r.lastCommittedValue)})(r),l=(e=>{const{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(r);if(w((e=>ne({},e,{draft:n.value,lastPublishedValue:i?n.value:e.lastPublishedValue,lastCommittedValue:s?n.value:e.lastCommittedValue,hasBeenModifiedSinceMount:!0}))),i){const t={validationError:"setValueFromField"===n.name?n.context.validationError:o({adapter:g,value:n.value,props:ne({},e,{value:n.value,timezone:j})})};M(n.value,t)}s&&a&&a(n.value),l&&b(!1)}));if(void 0!==s&&(void 0===x.lastControlledValue||!t.areValuesEqual(h,x.lastControlledValue,s))){const e=t.areValuesEqual(h,x.draft,s);w((t=>ne({},t,{lastControlledValue:s},e?{}:{lastCommittedValue:s,lastPublishedValue:s,draft:s,hasBeenModifiedSinceMount:!0})))}const C=lt((()=>{O({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})})),z=lt((()=>{O({value:x.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})})),D=lt((()=>{O({value:x.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})})),T=lt((()=>{O({value:x.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})})),P=lt((()=>{O({value:t.getTodayValue(h,j,n),name:"setValueFromAction",pickerAction:"today"})})),N=lt((()=>b(!0))),k=lt((()=>b(!1))),E=lt(((e,t="partial")=>O({name:"setValueFromView",value:e,selectionState:t}))),L=lt(((e,t)=>O({name:"setValueFromShortcut",value:e,changeImportance:null!=t?t:"accept"}))),S=lt(((e,t)=>O({name:"setValueFromField",value:e,context:t}))),I=lt((e=>{y(e),null==d||d(e)})),W={onClear:C,onAccept:z,onDismiss:D,onCancel:T,onSetToday:P,onOpen:N,onClose:k},H={value:x.draft,onChange:S,selectedSections:v,onSelectedSectionsChange:I},R=B.useMemo((()=>t.cleanValue(h,x.draft)),[h,t,x.draft]);return{open:A,fieldProps:H,viewProps:{value:R,onChange:E,onClose:k,open:A,onSelectedSectionsChange:I},layoutProps:ne({},W,{value:R,onChange:E,onSelectShortcut:L,isValid:n=>{const r=o({adapter:g,value:n,props:ne({},e,{value:n,timezone:j})});return!t.hasError(r)}}),actions:W}};let qx=!1;function Kx({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:a,focusedView:i,onFocusedViewChange:s}){var l,c;"production"!==process.env.NODE_ENV&&(qx||(null==r||o.includes(r)||(console.warn(`MUI: \`view="${r}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),qx=!0),null!=r||null==n||o.includes(n)||(console.warn(`MUI: \`openTo="${n}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),qx=!0)));const u=B.useRef(n),d=B.useRef(o),p=B.useRef(o.includes(n)?n:o[0]),[f,m]=st({name:"useViews",state:"view",controlled:r,default:p.current}),h=B.useRef(a?f:null),[g,v]=st({name:"useViews",state:"focusedView",controlled:i,default:h.current});B.useEffect((()=>{(u.current&&u.current!==n||d.current&&d.current.some((e=>!o.includes(e))))&&(m(o.includes(n)?n:o[0]),d.current=o,u.current=n)}),[n,m,f,o]);const y=o.indexOf(f),A=null!=(l=o[y-1])?l:null,b=null!=(c=o[y+1])?c:null,x=lt(((e,t)=>{v(t?e:t=>e===t?null:t),null==s||s(e,t)})),w=lt((e=>{e!==f&&(m(e),x(e,!0),t&&t(e))})),j=lt((()=>{b&&w(b),x(b,!0)})),M=lt(((t,n,r)=>{const a="finish"===n,i=r?o.indexOf(r)<o.length-1:Boolean(b);e(t,a&&i?"partial":n),a&&j()})),O=lt(((t,n,r)=>{e(t,n?"partial":"finish",r),n&&(w(n),x(n,!0))}));return{view:f,setView:w,focusedView:g,setFocusedView:x,nextView:b,previousView:A,defaultView:p.current,goToNextView:j,setValueAndGoToNextView:M,setValueAndGoToView:O}}const Jx=["className","sx"];function _x(){return"undefined"==typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}const $x=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,a=((e,t)=>{const[n,r]=B.useState(_x);return nt((()=>{const e=()=>{r(_x())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),!Sb(e,["hours","minutes","seconds"])&&"landscape"===(t||n)})(n.views,o);return{layoutProps:ne({},n,t,{isLandscape:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}},ew=NA(["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]),tw=({props:e,valueManager:t,valueType:n,wrapperVariant:r,inputRef:o,additionalViewProps:a,validator:i,autoFocusView:s})=>{"production"!==process.env.NODE_ENV&&null!=e.renderInput&&ew();const l=Ux({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i}),c=(({props:e,propsFromPickerValue:t,additionalViewProps:n,inputRef:r,autoFocusView:o})=>{const{onChange:a,open:i,onSelectedSectionsChange:s,onClose:l}=t,{views:c,openTo:u,onViewChange:d,disableOpenPicker:p,viewRenderers:f,timezone:m}=e,h=Wt(e,Jx),{view:g,setView:v,defaultView:y,focusedView:A,setFocusedView:b,setValueAndGoToNextView:x}=Kx({view:void 0,views:c,openTo:u,onChange:a,onViewChange:d,autoFocus:o}),{hasUIView:w,viewModeLookup:j}=B.useMemo((()=>c.reduce(((e,t)=>{let n;return n=p?"field":null!=f[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e}),{hasUIView:!1,viewModeLookup:{}})),[p,f,c]),M=B.useMemo((()=>c.reduce(((e,t)=>null!=f[t]&&GA(t)?e+1:e),0)),[f,c]),O=j[g],C=lt((()=>"UI"===O)),[z,D]=B.useState("UI"===O?g:null);return z!==g&&"UI"===j[g]&&D(g),nt((()=>{"field"===O&&i&&(l(),setTimeout((()=>{null==r||r.current.focus(),s(g)})))}),[g]),nt((()=>{if(!i)return;let e=g;"field"===O&&null!=z&&(e=z),e!==y&&"UI"===j[e]&&"UI"===j[y]&&(e=y),e!==g&&v(e),b(e,!0)}),[i]),{hasUIView:w,shouldRestoreFocus:C,layoutProps:{views:c,view:z,onViewChange:v},renderCurrentView:()=>{if(null==z)return null;const e=f[z];return null==e?null:e(ne({},h,n,t,{views:c,timezone:m,onChange:x,view:z,onViewChange:v,focusedView:A,onFocusedViewChange:b,showViewSwitcher:M>1,timeViewsCount:M}))}}})({props:e,inputRef:o,additionalViewProps:a,autoFocusView:s,propsFromPickerValue:l.viewProps}),u=$x({props:e,wrapperVariant:r,propsFromPickerValue:l.layoutProps,propsFromPickerViews:c.layoutProps});return{open:l.open,actions:l.actions,fieldProps:l.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:u.layoutProps}};function nw(e){return Et("MuiPickersLayout",e)}const rw=Lt("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","shortcuts"]);function ow(e){return Et("MuiDialogActions",e)}Lt("MuiDialogActions",["root","spacing"]);const aw=["className","disableSpacing"],iw=mo("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((({ownerState:e})=>ne({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}}))),sw=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:o=!1}=n,a=Wt(n,aw),i=ne({},n,{disableSpacing:o}),s=(e=>{const{classes:t,disableSpacing:n}=e;return Pt({root:["root",!n&&"spacing"]},ow,t)})(i);return X.jsx(iw,ne({className:Jn(s.root,r),ownerState:i,ref:t},a))}));"production"!==process.env.NODE_ENV&&(sw.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,disableSpacing:Pe.bool,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var lw=sw;const cw=["onAccept","onClear","onCancel","onSetToday","actions"];function uw(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:a}=e,i=Wt(e,cw),s=Db();if(null==a||0===a.length)return null;const l=null==a?void 0:a.map((e=>{switch(e){case"clear":return X.jsx(mx,{onClick:n,children:s.clearButtonLabel},e);case"cancel":return X.jsx(mx,{onClick:r,children:s.cancelButtonLabel},e);case"accept":return X.jsx(mx,{onClick:t,children:s.okButtonLabel},e);case"today":return X.jsx(mx,{onClick:o,children:s.todayButtonLabel},e);default:return null}}));return X.jsx(lw,ne({},i,{children:l}))}function dw(e){return Et("MuiListItem",e)}"production"!==process.env.NODE_ENV&&(uw.propTypes={actions:Pe.arrayOf(Pe.oneOf(["accept","cancel","clear","today"]).isRequired),disableSpacing:Pe.bool,onAccept:Pe.func.isRequired,onCancel:Pe.func.isRequired,onClear:Pe.func.isRequired,onSetToday:Pe.func.isRequired,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var pw=Lt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function fw(e){return Et("MuiListItemButton",e)}var mw=Lt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);const hw=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],gw=mo(xp,{shouldForwardProp:e=>po(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>ne({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${mw.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${mw.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${mw.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${mw.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${mw.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}))),vw=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:o=!1,component:a="div",children:i,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:u,selected:d=!1,className:p}=n,f=Wt(n,hw),m=B.useContext(ju),h=B.useMemo((()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:l})),[r,m.dense,s,l]),g=B.useRef(null);nt((()=>{o&&(g.current?g.current.focus():"production"!==process.env.NODE_ENV&&console.error("MUI: Unable to set focus to a ListItemButton whose component has not been rendered."))}),[o]);const v=ne({},n,{alignItems:r,dense:h.dense,disableGutters:l,divider:c,selected:d}),y=(e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:a,divider:i,selected:s}=e;return ne({},n,Pt({root:["root",r&&"dense",!a&&"gutters",i&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},fw,n))})(v),A=ct(g,t);return X.jsx(ju.Provider,{value:h,children:X.jsx(gw,ne({ref:A,href:f.href||f.to,component:(f.href||f.to)&&"div"===a?"button":a,focusVisibleClassName:Jn(y.focusVisible,u),ownerState:v,className:Jn(y.root,p)},f,{classes:y,children:i}))})}));"production"!==process.env.NODE_ENV&&(vw.propTypes={alignItems:Pe.oneOf(["center","flex-start"]),autoFocus:Pe.bool,children:Pe.node,classes:Pe.object,className:Pe.string,component:Pe.elementType,dense:Pe.bool,disabled:Pe.bool,disableGutters:Pe.bool,divider:Pe.bool,focusVisibleClassName:Pe.string,href:Pe.string,selected:Pe.bool,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var yw=vw;function Aw(e){return Et("MuiListItemSecondaryAction",e)}Lt("MuiListItemSecondaryAction",["root","disableGutters"]);const bw=["className"],xw=mo("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})((({ownerState:e})=>ne({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0}))),ww=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,o=Wt(n,bw),a=ne({},n,{disableGutters:B.useContext(ju).disableGutters}),i=(e=>{const{disableGutters:t,classes:n}=e;return Pt({root:["root",t&&"disableGutters"]},Aw,n)})(a);return X.jsx(xw,ne({className:Jn(i.root,r),ownerState:a,ref:t},o))}));"production"!==process.env.NODE_ENV&&(ww.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])}),ww.muiName="ListItemSecondaryAction";var jw=ww;const Mw=["className"],Ow=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Cw=mo("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})((({theme:e,ownerState:t})=>ne({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&ne({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${mw.root}`]:{paddingRight:48}},{[`&.${pw.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${pw.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${pw.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${pw.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${pw.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vr(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48}))),zw=mo("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Dw=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:o=!1,button:a=!1,children:i,className:s,component:l,components:c={},componentsProps:u={},ContainerComponent:d="li",ContainerProps:{className:p}={},dense:f=!1,disabled:m=!1,disableGutters:h=!1,disablePadding:g=!1,divider:v=!1,focusVisibleClassName:y,secondaryAction:A,selected:b=!1,slotProps:x={},slots:w={}}=n,j=Wt(n.ContainerProps,Mw),M=Wt(n,Ow),O=B.useContext(ju),C=B.useMemo((()=>({dense:f||O.dense||!1,alignItems:r,disableGutters:h})),[r,O.dense,f,h]),z=B.useRef(null);nt((()=>{o&&(z.current?z.current.focus():"production"!==process.env.NODE_ENV&&console.error("MUI: Unable to set focus to a ListItem whose component has not been rendered."))}),[o]);const D=B.Children.toArray(i),T=D.length&&Je(D[D.length-1],["ListItemSecondaryAction"]),P=ne({},n,{alignItems:r,autoFocus:o,button:a,dense:C.dense,disabled:m,disableGutters:h,disablePadding:g,divider:v,hasSecondaryAction:T,selected:b}),N=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:a,disableGutters:i,disablePadding:s,divider:l,hasSecondaryAction:c,selected:u}=e;return Pt({root:["root",o&&"dense",!i&&"gutters",!s&&"padding",l&&"divider",a&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},dw,r)})(P),k=ct(z,t),E=w.root||c.Root||Cw,L=x.root||u.root||{},S=ne({className:Jn(N.root,L.className,s),disabled:m},M);let I=l||"li";return a&&(S.component=l||"div",S.focusVisibleClassName=Jn(pw.focusVisible,y),I=xp),T?(I=S.component||l?I:"div","li"===d&&("li"===I?I="div":"li"===S.component&&(S.component="div")),X.jsx(ju.Provider,{value:C,children:X.jsxs(zw,ne({as:d,className:Jn(N.container,p),ref:k,ownerState:P},j,{children:[X.jsx(E,ne({},L,!jo(E)&&{as:I,ownerState:ne({},P,L.ownerState)},S,{children:D})),D.pop()]}))})):X.jsx(ju.Provider,{value:C,children:X.jsxs(E,ne({},L,{as:I,ref:k},!jo(E)&&{ownerState:ne({},P,L.ownerState)},S,{children:[D,A&&X.jsx(jw,{children:A})]}))})}));"production"!==process.env.NODE_ENV&&(Dw.propTypes={alignItems:Pe.oneOf(["center","flex-start"]),autoFocus:Pe.bool,button:Pe.bool,children:te(Pe.node,(e=>{const t=B.Children.toArray(e.children);let n=-1;for(let e=t.length-1;e>=0;e-=1){if(Je(t[e],["ListItemSecondaryAction"])){n=e;break}}return-1!==n&&n!==t.length-1?new Error("MUI: You used an element after ListItemSecondaryAction. For ListItem to detect that it has a secondary action you must pass it as the last child to ListItem."):null})),classes:Pe.object,className:Pe.string,component:Pe.elementType,components:Pe.shape({Root:Pe.elementType}),componentsProps:Pe.shape({root:Pe.object}),ContainerComponent:Ee,ContainerProps:Pe.object,dense:Pe.bool,disabled:Pe.bool,disableGutters:Pe.bool,disablePadding:Pe.bool,divider:Pe.bool,focusVisibleClassName:Pe.string,secondaryAction:Pe.node,selected:Pe.bool,slotProps:Pe.shape({root:Pe.object}),slots:Pe.shape({root:Pe.elementType}),sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var Tw=Dw;const Pw=["items","changeImportance","isLandscape","onChange","isValid"];function Nw(e){const{items:t,changeImportance:n,onChange:r,isValid:o}=e,a=Wt(e,Pw);if(null==t||0===t.length)return null;const i=t.map((e=>{const t=e.getValue({isValid:o});return{label:e.label,onClick:()=>{r(t,n)},disabled:!o(t)}}));return X.jsx(Tu,ne({dense:!0,sx:[{maxHeight:358,maxWidth:200,overflow:"auto"},...Array.isArray(a.sx)?a.sx:[a.sx]]},a,{children:i.map((e=>X.jsx(Tw,{children:X.jsx(Sp,ne({},e))},e.label)))}))}"production"!==process.env.NODE_ENV&&(Nw.propTypes={changeImportance:Pe.oneOf(["accept","set"]),className:Pe.string,component:Pe.elementType,dense:Pe.bool,disablePadding:Pe.bool,isLandscape:Pe.bool.isRequired,isValid:Pe.func.isRequired,items:Pe.arrayOf(Pe.shape({getValue:Pe.func.isRequired,label:Pe.string.isRequired})),onChange:Pe.func.isRequired,style:Pe.object,subheader:Pe.node,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var kw=e=>{var t,n;const{wrapperVariant:r,onAccept:o,onClear:a,onCancel:i,onSetToday:s,view:l,views:c,onViewChange:u,value:d,onChange:p,onSelectShortcut:f,isValid:m,isLandscape:h,disabled:g,readOnly:v,children:y,components:A,componentsProps:b,slots:x,slotProps:w}=e,j=null!=x?x:kx(A),M=null!=w?w:b,O=(e=>{const{classes:t,isLandscape:n}=e;return Pt({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},nw,t)})(e),C=null!=(t=null==j?void 0:j.actionBar)?t:uw,z=ko({elementType:C,externalSlotProps:null==M?void 0:M.actionBar,additionalProps:{onAccept:o,onClear:a,onCancel:i,onSetToday:s,actions:"desktop"===r?[]:["cancel","accept"],className:O.actionBar},ownerState:ne({},e,{wrapperVariant:r})}),D=X.jsx(C,ne({},z)),T=null==j?void 0:j.toolbar,P=ko({elementType:T,externalSlotProps:null==M?void 0:M.toolbar,additionalProps:{isLandscape:h,onChange:p,value:d,view:l,onViewChange:u,views:c,disabled:g,readOnly:v,className:O.toolbar},ownerState:ne({},e,{wrapperVariant:r})}),N=function(e){return null!==e.view}(P)&&T?X.jsx(T,ne({},P)):null,k=y,B=null==j?void 0:j.tabs,E=l&&B?X.jsx(B,ne({view:l,onViewChange:u},null==M?void 0:M.tabs)):null,L=null!=(n=null==j?void 0:j.shortcuts)?n:Nw,S=ko({elementType:L,externalSlotProps:null==M?void 0:M.shortcuts,additionalProps:{isValid:m,isLandscape:h,onChange:f,className:O.shortcuts},ownerState:{isValid:m,isLandscape:h,onChange:f,className:O.shortcuts,wrapperVariant:r}});return{toolbar:N,content:k,tabs:E,actionBar:D,shortcuts:l&&L?X.jsx(L,ne({},S)):null}};const Bw=mo("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${rw.toolbar}`]:t.isLandscape?{gridColumn:"rtl"===e.direction?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[`.${rw.shortcuts}`]:t.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:"rtl"===e.direction?3:1,gridRow:"2 / 3"},[`& .${rw.actionBar}`]:{gridColumn:"1 / 4",gridRow:3}})));Bw.propTypes={as:Pe.elementType,ownerState:Pe.shape({isLandscape:Pe.bool.isRequired}).isRequired,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])};const Ew=mo("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Lw=function(e){const t=uo({props:e,name:"MuiPickersLayout"}),{toolbar:n,content:r,tabs:o,actionBar:a,shortcuts:i}=kw(t),{sx:s,className:l,isLandscape:c,ref:u,wrapperVariant:d}=t,p=t,f=(e=>{const{isLandscape:t,classes:n}=e;return Pt({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},nw,n)})(p);return X.jsxs(Bw,{ref:u,sx:s,className:Jn(l,f.root),ownerState:p,children:[c?i:n,c?n:i,X.jsx(Ew,{className:f.contentWrapper,children:"desktop"===d?X.jsxs(B.Fragment,{children:[r,o]}):X.jsxs(B.Fragment,{children:[o,r]})}),a]})};"production"!==process.env.NODE_ENV&&(Lw.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,components:Pe.object,componentsProps:Pe.object,disabled:Pe.bool,isLandscape:Pe.bool.isRequired,isValid:Pe.func.isRequired,onAccept:Pe.func.isRequired,onCancel:Pe.func.isRequired,onChange:Pe.func.isRequired,onClear:Pe.func.isRequired,onClose:Pe.func.isRequired,onDismiss:Pe.func.isRequired,onOpen:Pe.func.isRequired,onSelectShortcut:Pe.func.isRequired,onSetToday:Pe.func.isRequired,onViewChange:Pe.func.isRequired,orientation:Pe.oneOf(["landscape","portrait"]),readOnly:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),value:Pe.any,view:Pe.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),views:Pe.arrayOf(Pe.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]).isRequired).isRequired,wrapperVariant:Pe.oneOf(["desktop","mobile"])});const Sw=["props","getOpenDialogAriaText"],Iw=["ownerState"],Ww=["ownerState"];function Hw(e){return Et("MuiPickersArrowSwitcher",e)}Lt("MuiPickersArrowSwitcher",["root","spacer","button"]);const Rw=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],Vw=["ownerState"],Yw=["ownerState"],Fw=mo("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Xw=mo("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((({theme:e})=>({width:e.spacing(3)}))),Qw=mo(zp,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})((({ownerState:e})=>ne({},e.hidden&&{visibility:"hidden"}))),Zw=B.forwardRef((function(e,t){var n,r,o,a;const i="rtl"===co().direction,s=uo({props:e,name:"MuiPickersArrowSwitcher"}),{children:l,className:c,slots:u,slotProps:d,isNextDisabled:p,isNextHidden:f,onGoToNext:m,nextLabel:h,isPreviousDisabled:g,isPreviousHidden:v,onGoToPrevious:y,previousLabel:A}=s,b=Wt(s,Rw),x=s,w=(e=>{const{classes:t}=e;return Pt({root:["root"],spacer:["spacer"],button:["button"]},Hw,t)})(x),j={isDisabled:p,isHidden:f,goTo:m,label:h},M={isDisabled:g,isHidden:v,goTo:y,label:A},[O,C]=i?[j,M]:[M,j],z=null!=(n=null==u?void 0:u.previousIconButton)?n:Qw,D=ko({elementType:z,externalSlotProps:null==d?void 0:d.previousIconButton,additionalProps:{size:"medium",title:O.label,"aria-label":O.label,disabled:O.isDisabled,edge:"end",onClick:O.goTo},ownerState:ne({},x,{hidden:O.isHidden}),className:w.button}),T=null!=(r=null==u?void 0:u.nextIconButton)?r:Qw,P=ko({elementType:T,externalSlotProps:null==d?void 0:d.nextIconButton,additionalProps:{size:"medium",title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:"start",onClick:C.goTo},ownerState:ne({},x,{hidden:C.isHidden}),className:w.button}),N=null!=(o=null==u?void 0:u.leftArrowIcon)?o:Ex,k=Wt(ko({elementType:N,externalSlotProps:null==d?void 0:d.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),Vw),B=null!=(a=null==u?void 0:u.rightArrowIcon)?a:Lx,E=Wt(ko({elementType:B,externalSlotProps:null==d?void 0:d.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),Yw);return X.jsxs(Fw,ne({ref:t,className:Jn(w.root,c),ownerState:x},b,{children:[X.jsx(z,ne({},D,{children:i?X.jsx(B,ne({},E)):X.jsx(N,ne({},k))})),l?X.jsx(Cf,{variant:"subtitle1",component:"span",children:l}):X.jsx(Xw,{className:w.spacer,ownerState:x}),X.jsx(T,ne({},P,{children:i?X.jsx(N,ne({},k)):X.jsx(B,ne({},E))}))]}))})),Gw=mo("div")({overflow:"hidden",width:320,maxHeight:358,display:"flex",flexDirection:"column",margin:"0 auto"});function Uw(e){return Et("MuiTimeClock",e)}Lt("MuiTimeClock",["root","arrowSwitcher"]);const qw=220,Kw=36,Jw={x:qw/2,y:qw/2},_w=Jw.x-Jw.x,$w=0-Jw.y,ej=(e,t,n)=>{const r=t-Jw.x,o=n-Jw.y,a=Math.atan2(_w,$w)-Math.atan2(r,o);let i=a*(180/Math.PI);i=Math.round(i/e)*e,i%=360;const s=r**2+o**2;return{value:Math.floor(i/e)||0,distance:Math.sqrt(s)}};function tj(e){return Et("MuiClockPointer",e)}Lt("MuiClockPointer",["root","thumb"]);const nj=["className","hasSelected","isInner","type","viewValue"],rj=e=>{const{classes:t}=e;return Pt({root:["root"],thumb:["thumb"]},tj,t)},oj=mo("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>ne({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},t.shouldAnimate&&{transition:e.transitions.create(["transform","height"])}))),aj=mo("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e,ownerState:t})=>ne({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box"},t.hasSelected&&{backgroundColor:(e.vars||e).palette.primary.main})));function ij(e){const t=uo({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:o,viewValue:a}=t,i=Wt(t,nj),s=B.useRef(o);B.useEffect((()=>{s.current=o}),[o]);const l=ne({},t,{shouldAnimate:s.current!==o}),c=rj(l);return X.jsx(oj,ne({style:(()=>{let e=360/("hours"===o?12:60)*a;return"hours"===o&&a>12&&(e-=360),{height:Math.round((r?.26:.4)*qw),transform:`rotateZ(${e}deg)`}})(),className:Jn(n,c.root),ownerState:l},i,{children:X.jsx(aj,{ownerState:l,className:c.thumb})}))}function sj(e){return Et("MuiClock",e)}Lt("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton"]);const lj=mo("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)}))),cj=mo("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),uj=mo("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),dj=mo("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})((({ownerState:e})=>ne({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none"},e.disabled?{}:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}))),pj=mo("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})((({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}))),fj=mo(zp,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})((({theme:e,ownerState:t})=>ne({zIndex:1,position:"absolute",bottom:8,left:8},"am"===t.meridiemMode&&{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}))),mj=mo(zp,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})((({theme:e,ownerState:t})=>ne({zIndex:1,position:"absolute",bottom:8,right:8},"pm"===t.meridiemMode&&{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}})));function hj(e){const t=uo({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:a,value:i,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:d,selectedId:p,type:f,viewValue:m,disabled:h,readOnly:g,className:v}=t,y=t,A=zb(),b=Db(),x=B.useRef(!1),w=(e=>{const{classes:t}=e;return Pt({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton"],pmButton:["pmButton"]},sj,t)})(y),j=l(m,f),M=!n&&"hours"===f&&(m<1||m>12),O=(e,t)=>{h||g||l(e,f)||d(e,t)},C=(e,t)=>{let{offsetX:r,offsetY:o}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,o=e.changedTouches[0].clientY-t.top}const a="seconds"===f||"minutes"===f?((e,t,n=1)=>{const r=6*n;let{value:o}=ej(r,e,t);return o=o*n%60,o})(r,o,u):((e,t,n)=>{const{value:r,distance:o}=ej(30,e,t);let a=r||12;return n?a%=12:o<qw/2-Kw&&(a+=12,a%=24),a})(r,o,Boolean(n));O(a,t)},z=B.useMemo((()=>"hours"===f||m%5==0),[f,m]),D="minutes"===f?u:1,T=B.useRef(null);nt((()=>{o&&T.current.focus()}),[o]);return X.jsxs(lj,{className:Jn(v,w.root),children:[X.jsxs(cj,{className:w.clock,children:[X.jsx(dj,{onTouchMove:e=>{x.current=!0,C(e,"shallow")},onTouchEnd:e=>{x.current&&(C(e,"finish"),x.current=!1)},onMouseUp:e=>{x.current&&(x.current=!1),C(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&C(e.nativeEvent,"shallow")},ownerState:{disabled:h},className:w.squareMask}),!j&&X.jsxs(B.Fragment,{children:[X.jsx(pj,{className:w.pin}),null!=i&&X.jsx(ij,{type:f,viewValue:m,isInner:M,hasSelected:z})]}),X.jsx(uj,{"aria-activedescendant":p,"aria-label":b.clockLabelText(f,i,A),ref:T,role:"listbox",onKeyDown:e=>{if(!x.current)switch(e.key){case"Home":O(0,"partial"),e.preventDefault();break;case"End":O("minutes"===f?59:23,"partial"),e.preventDefault();break;case"ArrowUp":O(m+D,"partial"),e.preventDefault();break;case"ArrowDown":O(m-D,"partial"),e.preventDefault()}},tabIndex:0,className:w.wrapper,children:a})]}),n&&r&&X.jsxs(B.Fragment,{children:[X.jsx(fj,{onClick:g?void 0:()=>s("am"),disabled:h||null===c,ownerState:y,className:w.amButton,children:X.jsx(Cf,{variant:"caption",children:"AM"})}),X.jsx(mj,{disabled:h||null===c,onClick:g?void 0:()=>s("pm"),ownerState:y,className:w.pmButton,children:X.jsx(Cf,{variant:"caption",children:"PM"})})]})]})}function gj(e){return Et("MuiClockNumber",e)}const vj=Lt("MuiClockNumber",["root","selected","disabled"]),yj=["className","disabled","index","inner","label","selected"],Aj=mo("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${vj.disabled}`]:t.disabled},{[`&.${vj.selected}`]:t.selected}]})((({theme:e,ownerState:t})=>ne({height:Kw,width:Kw,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${vj.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${vj.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled}},t.inner&&ne({},e.typography.body2,{color:(e.vars||e).palette.text.secondary}))));function bj(e){const t=uo({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:o,inner:a,label:i,selected:s}=t,l=Wt(t,yj),c=t,u=(e=>{const{classes:t,selected:n,disabled:r}=e;return Pt({root:["root",n&&"selected",r&&"disabled"]},gj,t)})(c),d=o%12/12*Math.PI*2-Math.PI/2,p=(qw-Kw-2)/2*(a?.65:1),f=Math.round(Math.cos(d)*p),m=Math.round(Math.sin(d)*p);return X.jsx(Aj,ne({className:Jn(n,u.root),"aria-disabled":!!r||void 0,"aria-selected":!!s||void 0,role:"option",style:{transform:`translate(${f}px, ${m+(qw-Kw)/2}px`},ownerState:c},l,{children:i}))}const xj=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:a})=>{const i=t?a.getHours(t):null,s=[],l=e?12:23,c=t=>null!==i&&(e?12===t?12===i||0===i:i===t||i-12===t:i===t);for(let t=e?1:0;t<=l;t+=1){let i=t.toString();0===t&&(i="00");const l=!e&&(0===t||t>12);i=a.formatNumber(i);const u=c(t);s.push(X.jsx(bj,{id:u?o:void 0,index:t,inner:l,selected:u,disabled:r(t),label:i,"aria-label":n(i)},t))}return s},wj=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const a=e.formatNumber;return[[5,a("05")],[10,a("10")],[15,a("15")],[20,a("20")],[25,a("25")],[30,a("30")],[35,a("35")],[40,a("40")],[45,a("45")],[50,a("50")],[55,a("55")],[0,a("00")]].map((([e,a],i)=>{const s=e===t;return X.jsx(bj,{label:a,id:s?o:void 0,index:i+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(a)},e)}))},jj=({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const a=B.useMemo((()=>wb.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:eb.day,timezone:o,getTodayDate:()=>XA(n,o,"date")})),[]);return null!=e?e:a},Mj=["ampm","ampmInClock","autoFocus","components","componentsProps","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableClock","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],Oj=mo(Gw,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),Cj=mo(Zw,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),zj=["hours","minutes"],Dj=B.forwardRef((function(e,t){const n=zb(),r=uo({props:e,name:"MuiTimeClock"}),{ampm:o=n.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:i,components:s,componentsProps:l,slots:c,slotProps:u,value:d,defaultValue:p,referenceDate:f,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:h,minTime:g,disableFuture:v,disablePast:y,minutesStep:A=1,shouldDisableClock:b,shouldDisableTime:x,showViewSwitcher:w,onChange:j,view:M,views:O=zj,openTo:C,onViewChange:z,focusedView:D,onFocusedViewChange:T,className:P,disabled:N,readOnly:k,timezone:E}=r,L=Wt(r,Mj),S=null!=c?c:kx(s),I=null!=u?u:l,{value:W,handleValueChange:H,timezone:R}=kb({name:"TimeClock",timezone:E,value:d,defaultValue:p,onChange:j,valueManager:wb}),V=jj({value:W,referenceDate:f,utils:n,props:r,timezone:R}),Y=Db(),F=Tb(R),{view:Q,setView:Z,previousView:G,nextView:U,setValueAndGoToNextView:q}=Kx({view:M,views:O,openTo:C,onViewChange:z,onChange:H,focusedView:D,onFocusedViewChange:T}),{meridiemMode:K,handleMeridiemChange:J}=wx(V,o,q),_=B.useCallback(((e,t)=>{const r=_A(m,n),a="hours"===t||"minutes"===t&&O.includes("seconds"),i=({start:e,end:t})=>(!g||!r(g,t))&&((!h||!r(e,h))&&((!v||!r(e,F))&&(!y||!r(F,a?t:e)))),s=(e,r=1)=>{if(e%r!=0)return!1;if(null!=b&&b(e,t))return!1;if(x)switch(t){case"hours":return!x(n.setHours(V,e),"hours");case"minutes":return!x(n.setMinutes(V,e),"minutes");case"seconds":return!x(n.setSeconds(V,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=qA(e,K,o),r=n.setHours(V,t);return!i({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case"minutes":{const t=n.setMinutes(V,e);return!i({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,A)}case"seconds":{const t=n.setSeconds(V,e);return!i({start:t,end:t})||!s(e)}default:throw new Error("not supported")}}),[o,V,m,h,K,g,A,b,x,n,v,y,F,O]),$=at(),ee=B.useMemo((()=>{switch(Q){case"hours":{const e=(e,t)=>{const r=qA(e,K,o);q(n.setHours(V,r),t)};return{onChange:e,viewValue:n.getHours(V),children:xj({value:W,utils:n,ampm:o,onChange:e,getClockNumberText:Y.hoursClockNumberText,isDisabled:e=>N||_(e,"hours"),selectedId:$})}}case"minutes":{const e=n.getMinutes(V),t=(e,t)=>{q(n.setMinutes(V,e),t)};return{viewValue:e,onChange:t,children:wj({utils:n,value:e,onChange:t,getClockNumberText:Y.minutesClockNumberText,isDisabled:e=>N||_(e,"minutes"),selectedId:$})}}case"seconds":{const e=n.getSeconds(V),t=(e,t)=>{q(n.setSeconds(V,e),t)};return{viewValue:e,onChange:t,children:wj({utils:n,value:e,onChange:t,getClockNumberText:Y.secondsClockNumberText,isDisabled:e=>N||_(e,"seconds"),selectedId:$})}}default:throw new Error("You must provide the type for ClockView")}}),[Q,n,W,o,Y.hoursClockNumberText,Y.minutesClockNumberText,Y.secondsClockNumberText,K,q,V,_,$,N]),te=r,re=(e=>{const{classes:t}=e;return Pt({root:["root"],arrowSwitcher:["arrowSwitcher"]},Uw,t)})(te);return X.jsxs(Oj,ne({ref:t,className:Jn(re.root,P),ownerState:te},L,{children:[X.jsx(hj,ne({autoFocus:null!=i?i:!!D,ampmInClock:a&&O.includes("hours"),value:W,type:Q,ampm:o,minutesStep:A,isTimeDisabled:_,meridiemMode:K,handleMeridiemChange:J,selectedId:$,disabled:N,readOnly:k},ee)),w&&X.jsx(Cj,{className:re.arrowSwitcher,slots:S,slotProps:I,onGoToPrevious:()=>Z(G),isPreviousDisabled:!G,previousLabel:Y.openPreviousView,onGoToNext:()=>Z(U),isNextDisabled:!U,nextLabel:Y.openNextView,ownerState:te})]}))}));function Tj(e){return Et("MuiDigitalClock",e)}"production"!==process.env.NODE_ENV&&(Dj.propTypes={ampm:Pe.bool,ampmInClock:Pe.bool,autoFocus:Pe.bool,classes:Pe.object,className:Pe.string,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disablePast:Pe.bool,focusedView:Pe.oneOf(["hours","minutes","seconds"]),maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onChange:Pe.func,onFocusedViewChange:Pe.func,onViewChange:Pe.func,openTo:Pe.oneOf(["hours","minutes","seconds"]),readOnly:Pe.bool,referenceDate:Pe.any,shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,showViewSwitcher:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours","minutes","seconds"]),views:Pe.arrayOf(Pe.oneOf(["hours","minutes","seconds"]).isRequired)}),Lt("MuiDigitalClock",["root","list","item"]);const Pj=["ampm","timeStep","autoFocus","components","componentsProps","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableClock","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","views","skipDisabled","timezone"],Nj=mo(Gw,{name:"MuiDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({ownerState:e})=>({overflowY:"auto",width:"100%",scrollBehavior:e.alreadyRendered?"smooth":"auto",maxHeight:232}))),kj=mo(Su,{name:"MuiDigitalClock",slot:"List",overridesResolver:(e,t)=>t.list})({padding:0}),Bj=mo(fg,{name:"MuiDigitalClock",slot:"Item",overridesResolver:(e,t)=>t.item})((({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vr(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:vr(e.palette.primary.main,e.palette.action.focusOpacity)}}))),Ej=B.forwardRef((function(e,t){var n,r,o;const a=zb(),i=B.useRef(null),s=ct(t,i),l=uo({props:e,name:"MuiDigitalClock"}),{ampm:c=a.is12HourCycleInCurrentLocale(),timeStep:u=30,autoFocus:d,components:p,componentsProps:f,slots:m,slotProps:h,value:g,defaultValue:v,referenceDate:y,disableIgnoringDatePartForTimeValidation:A=!1,maxTime:b,minTime:x,disableFuture:w,disablePast:j,minutesStep:M=1,shouldDisableClock:O,shouldDisableTime:C,onChange:z,view:D,openTo:T,onViewChange:P,focusedView:N,onFocusedViewChange:k,className:E,disabled:L,readOnly:S,views:I=["hours"],skipDisabled:W=!1,timezone:H}=l,R=Wt(l,Pj),{value:V,handleValueChange:Y,timezone:F}=kb({name:"DigitalClock",timezone:H,value:g,defaultValue:v,onChange:z,valueManager:wb}),Q=Db(),Z=Tb(F),G=B.useMemo((()=>ne({},l,{alreadyRendered:!!i.current})),[l]),U=(e=>{const{classes:t}=e;return Pt({root:["root"],list:["list"],item:["item"]},Tj,t)})(G),q=null!=(n=null!=(r=null==m?void 0:m.digitalClockItem)?r:null==p?void 0:p.DigitalClockItem)?n:Bj,K=ko({elementType:q,externalSlotProps:null!=(o=null==h?void 0:h.digitalClockItem)?o:null==f?void 0:f.digitalClockItem,ownerState:{},className:U.item}),J=jj({value:V,referenceDate:y,utils:a,props:l,timezone:F}),_=lt((e=>Y(e,"finish"))),{setValueAndGoToNextView:$}=Kx({view:D,views:I,openTo:T,onViewChange:P,onChange:_,focusedView:N,onFocusedViewChange:k}),ee=lt((e=>{$(e,"finish")}));B.useEffect((()=>{if(null===i.current)return;const e=i.current.querySelector('[role="listbox"] [role="option"][aria-selected="true"]');if(!e)return;const t=e.offsetTop;i.current.scrollTop=t-4}));const te=B.useCallback((e=>{const t=_A(A,a);return!!(x&&t(x,e)||b&&t(e,b)||w&&t(e,Z)||j&&t(Z,e))||!!(a.getMinutes(e)%M!=0||null!=O&&O(a.toJsDate(e).getTime(),"hours")||C&&C(e,"hours"))}),[A,a,x,b,w,Z,j,M,O,C]),re=B.useMemo((()=>{const e=a.startOfDay(J);return[e,...Array.from({length:Math.ceil(1440/u)-1},((t,n)=>a.addMinutes(e,u*(n+1))))]}),[J,u,a]);return X.jsx(Nj,ne({ref:s,className:Jn(U.root,E),ownerState:G},R,{children:X.jsx(kj,{autoFocusItem:d||!!N,role:"listbox","aria-label":Q.timePickerToolbarTitle,className:U.list,children:re.map((e=>{if(W&&te(e))return null;const t=a.isEqual(e,V);return X.jsx(q,ne({onClick:()=>!S&&ee(e),selected:t,disabled:L||te(e),disableRipple:S,role:"option","aria-disabled":S,"aria-selected":t},K,{children:a.format(e,c?"fullTime12h":"fullTime24h")}),a.toISO(e))}))})}))}));function Lj(e){return Et("MuiMultiSectionDigitalClock",e)}function Sj(e){return Et("MuiMultiSectionDigitalClock",e)}"production"!==process.env.NODE_ENV&&(Ej.propTypes={ampm:Pe.bool,autoFocus:Pe.bool,classes:Pe.object,className:Pe.string,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disablePast:Pe.bool,focusedView:Pe.oneOf(["hours"]),maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onChange:Pe.func,onFocusedViewChange:Pe.func,onViewChange:Pe.func,openTo:Pe.oneOf(["hours"]),readOnly:Pe.bool,referenceDate:Pe.any,shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,skipDisabled:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),timeStep:Pe.number,timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours"]),views:Pe.arrayOf(Pe.oneOf(["hours"]))}),Lt("MuiMultiSectionDigitalClock",["root"]),Lt("MuiMultiSectionDigitalClock",["root","item"]);const Ij=["autoFocus","onChange","className","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],Wj=mo(Su,{name:"MuiMultiSectionDigitalClockSection",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e,ownerState:t})=>({maxHeight:232,width:56,padding:0,overflow:"hidden",scrollBehavior:t.alreadyRendered?"smooth":"auto","&:hover":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&:after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"}}))),Hj=mo(fg,{name:"MuiMultiSectionDigitalClockSection",slot:"Item",overridesResolver:(e,t)=>t.item})((({theme:e})=>({padding:8,margin:"2px 4px",width:48,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vr(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:vr(e.palette.primary.main,e.palette.action.focusOpacity)}}))),Rj=B.forwardRef((function(e,t){var n;const r=B.useRef(null),o=ct(t,r),a=B.useRef(null),i=uo({props:e,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:s,onChange:l,className:c,disabled:u,readOnly:d,items:p,active:f,slots:m,slotProps:h,skipDisabled:g}=i,v=Wt(i,Ij),y=B.useMemo((()=>ne({},i,{alreadyRendered:!!r.current})),[i]),A=(e=>{const{classes:t}=e;return Pt({root:["root"],item:["item"]},Sj,t)})(y),b=null!=(n=null==m?void 0:m.digitalClockSectionItem)?n:Hj;return B.useEffect((()=>{if(null===r.current)return;const e=r.current.querySelector('[role="option"][aria-selected="true"]');if(!e||a.current===e)return void(a.current!==e&&(a.current=e));a.current=e,f&&s&&e.focus();const t=e.offsetTop;r.current.scrollTop=t-4})),X.jsx(Wj,ne({ref:o,className:Jn(A.root,c),ownerState:y,autoFocusItem:s&&f,role:"listbox"},v,{children:p.map((e=>{var t,n;if(g&&null!=(t=e.isDisabled)&&t.call(e,e.value))return null;const r=e.isSelected(e.value);return X.jsx(b,ne({onClick:()=>!d&&l(e.value),selected:r,disabled:u||(null==(n=e.isDisabled)?void 0:n.call(e,e.value)),disableRipple:d,role:"option","aria-disabled":d,"aria-label":e.ariaLabel,"aria-selected":r},null==h?void 0:h.digitalClockSectionItem,{children:e.label}),e.label)}))}))})),Vj=({now:e,value:t,utils:n,ampm:r,isDisabled:o,resolveAriaLabel:a,timeStep:i})=>{const s=t?n.getHours(t):null,l=[],c=e=>null!==s&&(r?12===e?12===s||0===s:s===e||s-12===e:s===e),u=r?11:23;for(let t=0;t<=u;t+=i){let i=n.format(n.setHours(e,t),r?"hours12h":"hours24h");const s=a(parseInt(i,10).toString());i=n.formatNumber(i),l.push({value:t,label:i,isSelected:c,isDisabled:o,ariaLabel:s})}return l},Yj=({value:e,isDisabled:t,timeStep:n,resolveLabel:r,resolveAriaLabel:o,hasValue:a=!0})=>{const i=t=>null!==e&&(a&&e===t);return[...Array.from({length:Math.ceil(60/n)},((e,a)=>{const s=n*a;return{value:s,label:r(s),isDisabled:t,isSelected:i,ariaLabel:o(s.toString())}}))]},Fj=["ampm","timeSteps","autoFocus","components","componentsProps","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableClock","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","skipDisabled","timezone"],Xj=mo(Gw,{name:"MuiMultiSectionDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`}))),Qj=B.forwardRef((function(e,t){const n=zb(),r=uo({props:e,name:"MuiMultiSectionDigitalClock"}),{ampm:o=n.is12HourCycleInCurrentLocale(),timeSteps:a,autoFocus:i,components:s,componentsProps:l,slots:c,slotProps:u,value:d,defaultValue:p,referenceDate:f,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:h,minTime:g,disableFuture:v,disablePast:y,minutesStep:A=1,shouldDisableClock:b,shouldDisableTime:x,onChange:w,view:j,views:M=["hours","minutes"],openTo:O,onViewChange:C,focusedView:z,onFocusedViewChange:D,className:T,disabled:P,readOnly:N,skipDisabled:k=!1,timezone:E}=r,L=Wt(r,Fj),{value:S,handleValueChange:I,timezone:W}=kb({name:"MultiSectionDigitalClock",timezone:E,value:d,defaultValue:p,onChange:w,valueManager:wb}),H=Db(),R=Tb(W),V=B.useMemo((()=>ne({hours:1,minutes:5,seconds:5},a)),[a]),Y=jj({value:S,referenceDate:f,utils:n,props:r,timezone:W}),F=lt(((e,t,n)=>I(e,t,n))),Q=B.useMemo((()=>o&&M.includes("hours")?M.includes("meridiem")?M:[...M,"meridiem"]:M),[o,M]),{view:Z,setValueAndGoToView:G,focusedView:U}=Kx({view:j,views:Q,openTo:O,onViewChange:C,onChange:F,focusedView:z,onFocusedViewChange:D}),q=lt((e=>{G(e,null,"meridiem")})),{meridiemMode:K,handleMeridiemChange:J}=wx(Y,o,q,"finish"),_=B.useCallback(((e,t)=>{const r=_A(m,n),a="hours"===t||"minutes"===t&&Q.includes("seconds"),i=({start:e,end:t})=>(!g||!r(g,t))&&((!h||!r(e,h))&&((!v||!r(e,R))&&(!y||!r(R,a?t:e)))),s=(e,r=1)=>{if(e%r!=0)return!1;if(null!=b&&b(e,t))return!1;if(x)switch(t){case"hours":return!x(n.setHours(Y,e),"hours");case"minutes":return!x(n.setMinutes(Y,e),"minutes");case"seconds":return!x(n.setSeconds(Y,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=qA(e,K,o),r=n.setHours(Y,t);return!i({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case"minutes":{const t=n.setMinutes(Y,e);return!i({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,A)}case"seconds":{const t=n.setSeconds(Y,e);return!i({start:t,end:t})||!s(e)}default:throw new Error("not supported")}}),[o,Y,m,h,K,g,A,b,x,n,v,y,R,Q]),$=lt(((e,t)=>{const n=Q.indexOf(e),r=Q[n+1];G(t,r,e)})),ee=B.useCallback((e=>{switch(e){case"hours":return{onChange:e=>{const t=qA(e,K,o);$("hours",n.setHours(Y,t))},items:Vj({now:R,value:S,ampm:o,utils:n,isDisabled:e=>P||_(e,"hours"),timeStep:V.hours,resolveAriaLabel:H.hoursClockNumberText})};case"minutes":return{onChange:e=>{$("minutes",n.setMinutes(Y,e))},items:Yj({value:n.getMinutes(Y),isDisabled:e=>P||_(e,"minutes"),resolveLabel:e=>n.format(n.setMinutes(R,e),"minutes"),timeStep:V.minutes,hasValue:!!S,resolveAriaLabel:H.minutesClockNumberText})};case"seconds":return{onChange:e=>{$("seconds",n.setSeconds(Y,e))},items:Yj({value:n.getSeconds(Y),isDisabled:e=>P||_(e,"seconds"),resolveLabel:e=>n.format(n.setSeconds(R,e),"seconds"),timeStep:V.seconds,hasValue:!!S,resolveAriaLabel:H.secondsClockNumberText})};case"meridiem":{const e=QA(n,"am"),t=QA(n,"pm");return{onChange:J,items:[{value:"am",label:e,isSelected:()=>!!S&&"am"===K,ariaLabel:e},{value:"pm",label:t,isSelected:()=>!!S&&"pm"===K,ariaLabel:t}]}}default:throw new Error(`Unknown view: ${e} found.`)}}),[R,S,o,n,V.hours,V.minutes,V.seconds,H.hoursClockNumberText,H.minutesClockNumberText,H.secondsClockNumberText,K,$,Y,P,_,J]),te=B.useMemo((()=>Q.reduce(((e,t)=>ne({},e,{[t]:ee(t)})),{})),[Q,ee]),re=r,oe=(e=>{const{classes:t}=e;return Pt({root:["root"]},Lj,t)})(re);return X.jsx(Xj,ne({ref:t,className:Jn(oe.root,T),ownerState:re,role:"group"},L,{children:Object.entries(te).map((([e,t])=>X.jsx(Rj,{items:t.items,onChange:t.onChange,active:Z===e,autoFocus:null!=i?i:U===e,disabled:P,readOnly:N,slots:null!=c?c:s,slotProps:null!=u?u:l,skipDisabled:k,"aria-label":H.selectViewText(e)},e)))}))}));"production"!==process.env.NODE_ENV&&(Qj.propTypes={ampm:Pe.bool,autoFocus:Pe.bool,classes:Pe.object,className:Pe.string,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disablePast:Pe.bool,focusedView:Pe.oneOf(["hours","meridiem","minutes","seconds"]),maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onChange:Pe.func,onFocusedViewChange:Pe.func,onViewChange:Pe.func,openTo:Pe.oneOf(["hours","meridiem","minutes","seconds"]),readOnly:Pe.bool,referenceDate:Pe.any,shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,skipDisabled:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),timeSteps:Pe.shape({hours:Pe.number,minutes:Pe.number,seconds:Pe.number}),timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours","meridiem","minutes","seconds"]),views:Pe.arrayOf(Pe.oneOf(["hours","meridiem","minutes","seconds"]).isRequired)});const Zj=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,ampmInClock:y,components:A,componentsProps:b,slots:x,slotProps:w,readOnly:j,disabled:M,sx:O,autoFocus:C,showViewSwitcher:z,disableIgnoringDatePartForTimeValidation:D,timezone:T})=>X.jsx(Dj,{view:e,onViewChange:t,focusedView:n&&GA(n)?n:null,onFocusedViewChange:r,views:o.filter(GA),value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,ampmInClock:y,components:A,componentsProps:b,slots:x,slotProps:w,readOnly:j,disabled:M,sx:O,autoFocus:C,showViewSwitcher:z,disableIgnoringDatePartForTimeValidation:D,timezone:T}),Gj=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,components:y,componentsProps:A,slots:b,slotProps:x,readOnly:w,disabled:j,sx:M,autoFocus:O,disableIgnoringDatePartForTimeValidation:C,timeSteps:z,skipDisabled:D,timezone:T})=>X.jsx(Ej,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(GA),value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,components:y,componentsProps:A,slots:b,slotProps:x,readOnly:w,disabled:j,sx:M,autoFocus:O,disableIgnoringDatePartForTimeValidation:C,timeStep:null==z?void 0:z.minutes,skipDisabled:D,timezone:T}),Uj=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,components:y,componentsProps:A,slots:b,slotProps:x,readOnly:w,disabled:j,sx:M,autoFocus:O,disableIgnoringDatePartForTimeValidation:C,timeSteps:z,skipDisabled:D,timezone:T})=>X.jsx(Qj,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(GA),value:a,defaultValue:i,onChange:s,className:l,classes:c,disableFuture:u,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:m,shouldDisableClock:h,minutesStep:g,ampm:v,components:y,componentsProps:A,slots:b,slotProps:x,readOnly:w,disabled:j,sx:M,autoFocus:O,disableIgnoringDatePartForTimeValidation:C,timeSteps:z,skipDisabled:D,timezone:T}),qj=B.forwardRef((function(e,t){var n,r,o,a,i,s,l;const c=Db(),u=zb(),d=Bx(e,"MuiDesktopTimePicker"),p=null!=(n=d.thresholdToRenderTimeInASingleColumn)?n:24,f=ne({hours:1,minutes:5,seconds:5},d.timeSteps),m=1440/(f.hours*f.minutes)<=p,h=m?Gj:Uj,g=ne({hours:h,minutes:h,seconds:h,meridiem:h},d.viewRenderers),v=null==(r=d.ampmInClock)||r,y=m?[]:["accept"],A=(null==(o=g.hours)?void 0:o.name)===Uj.name,b=d.ampm&&A?[...d.views,"meridiem"]:d.views,x=ne({},d,{ampmInClock:v,timeSteps:f,viewRenderers:g,format:$A(u,d),views:m?["hours"]:b,slots:ne({field:_b,openPickerIcon:Sx},d.slots),slotProps:ne({},d.slotProps,{field:e=>{var n;return ne({},To(null==(n=d.slotProps)?void 0:n.field,e),Zb(d),{ref:t})},toolbar:ne({hidden:!0,ampmInClock:v},null==(a=d.slotProps)?void 0:a.toolbar),actionBar:ne({actions:y},null==(i=d.slotProps)?void 0:i.actionBar)})}),{renderPicker:w}=(e=>{var t,n,r,o,a;let{props:i,getOpenDialogAriaText:s}=e,l=Wt(e,Sw);const{slots:c,slotProps:u,className:d,sx:p,format:f,formatDensity:m,timezone:h,label:g,inputRef:v,readOnly:y,disabled:A,autoFocus:b,localeText:x}=i,w=zb(),j=B.useRef(null),M=B.useRef(null),O=at(),C=null!=(t=null==u||null==(n=u.toolbar)?void 0:n.hidden)&&t,{open:z,actions:D,hasUIView:T,layoutProps:P,renderCurrentView:N,shouldRestoreFocus:k,fieldProps:E}=tw(ne({},l,{props:i,inputRef:j,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),L=null!=(r=c.inputAdornment)?r:Fx,S=Wt(ko({elementType:L,externalSlotProps:null==u?void 0:u.inputAdornment,additionalProps:{position:"end"},ownerState:i}),Iw),I=null!=(o=c.openPickerButton)?o:zp,W=Wt(ko({elementType:I,externalSlotProps:null==u?void 0:u.openPickerButton,additionalProps:{disabled:A||y,onClick:D.onOpen,"aria-label":s(E.value,w),edge:S.position},ownerState:i}),Ww),H=c.openPickerIcon,R=c.field,V=ko({elementType:R,externalSlotProps:null==u?void 0:u.field,additionalProps:ne({},E,C&&{id:O},{readOnly:y,disabled:A,className:d,sx:p,format:f,formatDensity:m,timezone:h,label:g,autoFocus:b&&!i.open,focused:!!z||void 0}),ownerState:i});T&&(V.InputProps=ne({},V.InputProps,{ref:M,[`${S.position}Adornment`]:X.jsx(L,ne({},S,{children:X.jsx(I,ne({},W,{children:X.jsx(H,ne({},null==u?void 0:u.openPickerIcon))}))}))}));const Y=ne({textField:c.textField},V.slots),F=null!=(a=c.layout)?a:Lw,Q=ct(j,V.inputRef,v);let Z=O;C&&(Z=g?`${O}-label`:void 0);const G=ne({},u,{toolbar:ne({},null==u?void 0:u.toolbar,{titleId:O}),popper:ne({"aria-labelledby":Z},null==u?void 0:u.popper)});return{renderPicker:()=>X.jsxs(RA,{localeText:x,children:[X.jsx(R,ne({},V,{slots:Y,slotProps:G,inputRef:Q})),X.jsx(Gx,ne({role:"dialog",placement:"bottom-start",anchorEl:M.current},D,{open:z,slots:c,slotProps:G,shouldRestoreFocus:k,children:X.jsx(F,ne({},P,null==G?void 0:G.layout,{slots:c,slotProps:G,children:N()}))}))]})}})({props:x,valueManager:wb,valueType:"time",getOpenDialogAriaText:null!=(s=null==(l=x.localeText)?void 0:l.openTimePickerDialogue)?s:c.openTimePickerDialogue,validator:Vb});return w()}));function Kj(e){return Et("MuiDialogContent",e)}qj.propTypes={ampm:Pe.bool,ampmInClock:Pe.bool,autoFocus:Pe.bool,className:Pe.string,closeOnSelect:Pe.bool,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disableOpenPicker:Pe.bool,disablePast:Pe.bool,format:Pe.string,formatDensity:Pe.oneOf(["dense","spacious"]),inputRef:Pe.oneOfType([Pe.func,Pe.shape({current:Pe.object})]),label:Pe.node,localeText:Pe.object,maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onAccept:Pe.func,onChange:Pe.func,onClose:Pe.func,onError:Pe.func,onOpen:Pe.func,onSelectedSectionsChange:Pe.func,onViewChange:Pe.func,open:Pe.bool,openTo:Pe.oneOf(["hours","meridiem","minutes","seconds"]),orientation:Pe.oneOf(["landscape","portrait"]),readOnly:Pe.bool,selectedSections:Pe.oneOfType([Pe.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),Pe.number,Pe.shape({endIndex:Pe.number.isRequired,startIndex:Pe.number.isRequired})]),shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,skipDisabled:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),thresholdToRenderTimeInASingleColumn:Pe.number,timeSteps:Pe.shape({hours:Pe.number,minutes:Pe.number,seconds:Pe.number}),timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:Pe.shape({hours:Pe.func,meridiem:Pe.func,minutes:Pe.func,seconds:Pe.func}),views:Pe.arrayOf(Pe.oneOf(["hours","minutes","seconds"]).isRequired)},Lt("MuiDialogContent",["root","dividers"]);var Jj=Lt("MuiDialogTitle",["root"]);const _j=["className","dividers"],$j=mo("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((({theme:e,ownerState:t})=>ne({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${Jj.root} + &`]:{paddingTop:0}}))),eM=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1}=n,a=Wt(n,_j),i=ne({},n,{dividers:o}),s=(e=>{const{classes:t,dividers:n}=e;return Pt({root:["root",n&&"dividers"]},Kj,t)})(i);return X.jsx($j,ne({className:Jn(s.root,r),ownerState:i,ref:t},a))}));"production"!==process.env.NODE_ENV&&(eM.propTypes={children:Pe.node,classes:Pe.object,className:Pe.string,dividers:Pe.bool,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object])});var tM=eM;function nM(e){return Et("MuiDialog",e)}var rM=Lt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);const oM=B.createContext({});"production"!==process.env.NODE_ENV&&(oM.displayName="DialogContext");var aM=oM;const iM=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],sM=mo(ja,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),lM=mo(Da,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),cM=mo("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Ue(n.scroll)}`]]}})((({ownerState:e})=>ne({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),uM=mo(Ua,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Ue(n.scroll)}`],t[`paperWidth${Ue(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((({theme:e,ownerState:t})=>ne({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===t.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===t.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===t.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${rM.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&"xs"!==t.maxWidth&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${rM.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${rM.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}))),dM=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiDialog"}),r=co(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":i,BackdropComponent:s,BackdropProps:l,children:c,className:u,disableEscapeKeyDown:d=!1,fullScreen:p=!1,fullWidth:f=!1,maxWidth:m="sm",onBackdropClick:h,onClose:g,open:v,PaperComponent:y=Ua,PaperProps:A={},scroll:b="paper",TransitionComponent:x=ya,transitionDuration:w=o,TransitionProps:j}=n,M=Wt(n,iM),O=ne({},n,{disableEscapeKeyDown:d,fullScreen:p,fullWidth:f,maxWidth:m,scroll:b}),C=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e;return Pt({root:["root"],container:["container",`scroll${Ue(n)}`],paper:["paper",`paperScroll${Ue(n)}`,`paperWidth${Ue(String(r))}`,o&&"paperFullWidth",a&&"paperFullScreen"]},nM,t)})(O),z=B.useRef(),D=at(i),T=B.useMemo((()=>({titleId:D})),[D]);return X.jsx(lM,ne({className:Jn(C.root,u),closeAfterTransition:!0,components:{Backdrop:sM},componentsProps:{backdrop:ne({transitionDuration:w,as:s},l)},disableEscapeKeyDown:d,onClose:g,open:v,ref:t,onClick:e=>{z.current&&(z.current=null,h&&h(e),g&&g(e,"backdropClick"))},ownerState:O},M,{children:X.jsx(x,ne({appear:!0,in:v,timeout:w,role:"presentation"},j,{children:X.jsx(cM,{className:Jn(C.container),onMouseDown:e=>{z.current=e.target===e.currentTarget},ownerState:O,children:X.jsx(uM,ne({as:y,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":D},A,{className:Jn(C.paper,A.className),ownerState:O,children:X.jsx(aM.Provider,{value:T,children:c})}))})}))}))}));"production"!==process.env.NODE_ENV&&(dM.propTypes={"aria-describedby":Pe.string,"aria-labelledby":Pe.string,BackdropComponent:Pe.elementType,BackdropProps:Pe.object,children:Pe.node,classes:Pe.object,className:Pe.string,disableEscapeKeyDown:Pe.bool,fullScreen:Pe.bool,fullWidth:Pe.bool,maxWidth:Pe.oneOfType([Pe.oneOf(["xs","sm","md","lg","xl",!1]),Pe.string]),onBackdropClick:Pe.func,onClose:Pe.func,open:Pe.bool.isRequired,PaperComponent:Pe.elementType,PaperProps:Pe.object,scroll:Pe.oneOf(["body","paper"]),sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),TransitionComponent:Pe.elementType,transitionDuration:Pe.oneOfType([Pe.number,Pe.shape({appear:Pe.number,enter:Pe.number,exit:Pe.number})]),TransitionProps:Pe.object});var pM=dM;const fM=mo(pM)({[`& .${rM.container}`]:{outline:0},[`& .${rM.paper}`]:{outline:0,minWidth:320}}),mM=mo(tM)({"&:first-of-type":{padding:0}});function hM(e){var t,n;const{children:r,onDismiss:o,open:a,slots:i,slotProps:s}=e,l=null!=(t=null==i?void 0:i.dialog)?t:fM,c=null!=(n=null==i?void 0:i.mobileTransition)?n:ya;return X.jsx(l,ne({open:a,onClose:o},null==s?void 0:s.dialog,{TransitionComponent:c,TransitionProps:null==s?void 0:s.mobileTransition,PaperComponent:null==i?void 0:i.mobilePaper,PaperProps:null==s?void 0:s.mobilePaper,children:X.jsx(mM,{children:r})}))}const gM=["props","getOpenDialogAriaText"],vM=B.forwardRef((function(e,t){var n,r,o,a;const i=Db(),s=zb(),l=Bx(e,"MuiMobileTimePicker"),c=ne({hours:Zj,minutes:Zj,seconds:Zj},l.viewRenderers),u=null!=(n=l.ampmInClock)&&n,d=ne({},l,{ampmInClock:u,viewRenderers:c,format:$A(s,l),slots:ne({field:_b},l.slots),slotProps:ne({},l.slotProps,{field:e=>{var n;return ne({},To(null==(n=l.slotProps)?void 0:n.field,e),Zb(l),{ref:t})},toolbar:ne({hidden:!1,ampmInClock:u},null==(r=l.slotProps)?void 0:r.toolbar)})}),{renderPicker:p}=(e=>{var t,n,r;let{props:o,getOpenDialogAriaText:a}=e,i=Wt(e,gM);const{slots:s,slotProps:l,className:c,sx:u,format:d,formatDensity:p,timezone:f,label:m,inputRef:h,readOnly:g,disabled:v,localeText:y}=o,A=zb(),b=B.useRef(null),x=at(),w=null!=(t=null==l||null==(n=l.toolbar)?void 0:n.hidden)&&t,{open:j,actions:M,layoutProps:O,renderCurrentView:C,fieldProps:z}=tw(ne({},i,{props:o,inputRef:b,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),D=s.field,T=ko({elementType:D,externalSlotProps:null==l?void 0:l.field,additionalProps:ne({},z,w&&{id:x},!(v||g)&&{onClick:M.onOpen,onKeyDown:(P=M.onOpen,e=>{"Enter"!==e.key&&" "!==e.key||(P(e),e.preventDefault(),e.stopPropagation()),N&&N(e)})},{readOnly:null==g||g,disabled:v,className:c,sx:u,format:d,formatDensity:p,timezone:f,label:m}),ownerState:o});var P,N;T.inputProps=ne({},T.inputProps,{"aria-label":a(z.value,A)});const k=ne({textField:s.textField},T.slots),E=null!=(r=s.layout)?r:Lw,L=ct(b,T.inputRef,h);let S=x;w&&(S=m?`${x}-label`:void 0);const I=ne({},l,{toolbar:ne({},null==l?void 0:l.toolbar,{titleId:x}),mobilePaper:ne({"aria-labelledby":S},null==l?void 0:l.mobilePaper)});return{renderPicker:()=>X.jsxs(RA,{localeText:y,children:[X.jsx(D,ne({},T,{slots:k,slotProps:I,inputRef:L})),X.jsx(hM,ne({},M,{open:j,slots:s,slotProps:I,children:X.jsx(E,ne({},O,null==I?void 0:I.layout,{slots:s,slotProps:I,children:C()}))}))]})}})({props:d,valueManager:wb,valueType:"time",getOpenDialogAriaText:null!=(o=null==(a=d.localeText)?void 0:a.openTimePickerDialogue)?o:i.openTimePickerDialogue,validator:Vb});return p()}));vM.propTypes={ampm:Pe.bool,ampmInClock:Pe.bool,autoFocus:Pe.bool,className:Pe.string,closeOnSelect:Pe.bool,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disableOpenPicker:Pe.bool,disablePast:Pe.bool,format:Pe.string,formatDensity:Pe.oneOf(["dense","spacious"]),inputRef:Pe.oneOfType([Pe.func,Pe.shape({current:Pe.object})]),label:Pe.node,localeText:Pe.object,maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onAccept:Pe.func,onChange:Pe.func,onClose:Pe.func,onError:Pe.func,onOpen:Pe.func,onSelectedSectionsChange:Pe.func,onViewChange:Pe.func,open:Pe.bool,openTo:Pe.oneOf(["hours","minutes","seconds"]),orientation:Pe.oneOf(["landscape","portrait"]),readOnly:Pe.bool,selectedSections:Pe.oneOfType([Pe.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),Pe.number,Pe.shape({endIndex:Pe.number.isRequired,startIndex:Pe.number.isRequired})]),shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours","minutes","seconds"]),viewRenderers:Pe.shape({hours:Pe.func,minutes:Pe.func,seconds:Pe.func}),views:Pe.arrayOf(Pe.oneOf(["hours","minutes","seconds"]).isRequired)};const yM=["desktopModeMediaQuery"],AM=B.forwardRef((function(e,t){const n=uo({props:e,name:"MuiTimePicker"}),{desktopModeMediaQuery:r=Wb}=n,o=Wt(n,yM);return Ri(r,{defaultMatches:!0})?X.jsx(qj,ne({ref:t},o)):X.jsx(vM,ne({ref:t},o))}));function bM(t){var n=this,r=t.label,o=t.size,a=t.fieldName,i=t.fullWidth,s=t.setValue,l=t.getValues,c=B.useState(null),u=c[0],d=c[1];return e.useEffect((function(){G(n,void 0,void 0,(function(){return U(this,(function(e){return l(a)&&d(vh.convertToOriginal(l(a))),[2]}))}))}),[a]),X.jsx(RA,{dateAdapter:IA,children:X.jsx(AM,{label:r,value:u,onChange:function(e){if(e){var t=vh.stringifyTime(e);s(a,t||""),d(e)}},slots:{textField:function(e){return X.jsx(Qd,Q({},e,{size:o,name:a,fullWidth:i||!0}))}}})})}function xM(e){var t=e.name,r=e.disabled,o=e.label,a=e.size,i=e.showPassword,s=e.setShowPassword;return X.jsx(as,{size:a,disabled:r,name:t,type:i?"text":"password",InputProps:{endAdornment:X.jsx(n.InputAdornment,{position:"end",children:X.jsx(n.IconButton,{onClick:function(){return s(!i)},edge:"end",children:X.jsx(xo,{icon:i?"eva:eye-fill":"eva:eye-off-fill"})})})},label:o})}function wM(e){var t=e.handleDrop,r=e.list,o=e.itemComponent;return X.jsx(z.DragDropContext,{onDragEnd:function(e,n){return t(e)},children:X.jsx(z.Droppable,{droppableId:"list-container",children:function(e){return X.jsx("div",Q({className:"list-container"},e.droppableProps,{ref:e.innerRef,children:X.jsxs(n.Stack,{spacing:3,children:[r.map((function(e,t){return X.jsx(z.Draggable,{draggableId:e.id,index:t,children:function(n){return X.jsx("div",Q({className:"item-container",ref:n.innerRef},n.dragHandleProps,n.draggableProps,{children:o(e,t)}))}},e.id)})),e.placeholder]})}))}})})}function jM(e){var t=e.index,r=e.draggable,o=e.item,a=e.itemComponent,i=e.handleRemove;return X.jsx(n.Card,{sx:{paddingTop:1,paddingBottom:3,paddingX:r?1:3,cursor:"auto"},children:X.jsxs(n.Stack,{direction:"row",spacing:2,children:[r&&X.jsx(n.IconButton,{color:"error",size:"small",sx:{alignSelf:"center",cursor:"move"},children:X.jsx(xo,{icon:"icon-park:drag"})}),X.jsxs(n.Stack,{spacing:1.5,width:"100%",children:[X.jsxs(n.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[X.jsx(n.Typography,{color:"grey",fontSize:10,variant:"overline",sx:{color:"text.disabled"},children:"["+(t+1)+"]"}),X.jsx(n.IconButton,{onClick:function(){return i(t)},color:"error",size:"medium",children:X.jsx(xo,{icon:"eva:trash-2-outline"})})]}),a(t,o)]})]})})}var MM;function OM(e){var t=e.draggable,r=e.handleDrop,o=e.itemComponent,a=e.list,i=e.handleRemove,s=e.direction,l=e.numberOfColumns,c=(null!=s?s:MM.VERTICAL)===MM.VERTICAL,u=c?12:12/(null!=l?l:3);return X.jsx(X.Fragment,{children:t?X.jsx(wM,{handleDrop:r,list:a,itemComponent:function(e,n){return X.jsx(jM,{item:e,draggable:t,index:n,itemComponent:o,handleRemove:i})}}):c?X.jsx(n.Stack,{spacing:3,children:a.map((function(e,n){return X.jsx(jM,{draggable:t,item:e,index:n,itemComponent:o,handleRemove:i},e.id)}))}):X.jsx(n.Grid,{container:!0,spacing:3,children:a.map((function(e,r){return X.jsx(n.Grid,{item:!0,xs:12,md:u,children:X.jsx(jM,{draggable:t,item:e,index:r,itemComponent:o,handleRemove:i},e.id)},e.id)}))})})}function CM(e){var t=e.draggable,r=e.addButtonText,o=e.handleRemove,a=e.itemComponent,i=e.handleDrop,s=e.handleAdd,l=e.list,c=e.direction,u=e.numberOfColumns;return X.jsxs(n.Stack,{spacing:3,children:[X.jsx(OM,{handleRemove:o,draggable:t,handleDrop:i,list:l,itemComponent:a,direction:c,numberOfColumns:u}),X.jsx(n.Button,{size:"small",startIcon:X.jsx(xo,{icon:"eva:plus-fill"}),onClick:s,sx:{flexShrink:0,alignSelf:"start",padding:1},children:null!=r?r:"Add"})]})}function zM(e){var t=e.name,r=e.disabled,o=e.label,a=e.getValues,i=e.handleChange;return X.jsx(n.FormControlLabel,{control:X.jsx(n.Checkbox,{checked:a(t),onChange:i,name:t,disabled:r}),label:o})}function DM(e){var t=e.values,r=e.name,o=e.label,a=e.size,i=e.disabled;return X.jsx(is,{name:r,size:a,label:o,disabled:i,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:null==t?void 0:t.map((function(e){return X.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:rv.enhance(e)},e)}))})}function TM(e){var t=e.key,r=e.name,o=e.handleDrop;return X.jsx(n.Grid,{item:!0,xs:12,md:3,children:X.jsx(n.Box,{sx:{mb:5,mt:5},children:X.jsx(Ki,{name:r,accept:{"image/*":[".jpeg",".png"]},maxSize:3145728,onDrop:function(e){return o(e,r)},helperText:X.jsxs(n.Typography,{variant:"caption",sx:{mt:2,mx:"auto",display:"block",textAlign:"center",color:"text.secondary"},children:["Allowed *.jpeg, *.jpg, *.png, *.gif",X.jsx("br",{})," max size of ",Di(3145728)]})})})},t)}function PM(e){var t=e.name,n=e.minDate,r=e.maxDate,o=Z(e,["name","minDate","maxDate"]),a=c.useFormContext().control;return X.jsx(c.Controller,{name:t,control:a,render:function(e){var t=e.field,a=e.fieldState.error;return X.jsx(v.DateTimePicker,{label:o.label,value:new Date(t.value),minDate:null==n?void 0:n.getDate(),maxDate:null==r?void 0:r.getDate(),onChange:function(e){t.onChange(e)},slotProps:{textField:{fullWidth:!0,margin:"normal",helperText:null==a?void 0:a.message,error:!!a}}})}})}"production"!==process.env.NODE_ENV&&(AM.propTypes={ampm:Pe.bool,ampmInClock:Pe.bool,autoFocus:Pe.bool,className:Pe.string,closeOnSelect:Pe.bool,components:Pe.object,componentsProps:Pe.object,defaultValue:Pe.any,desktopModeMediaQuery:Pe.string,disabled:Pe.bool,disableFuture:Pe.bool,disableIgnoringDatePartForTimeValidation:Pe.bool,disableOpenPicker:Pe.bool,disablePast:Pe.bool,format:Pe.string,formatDensity:Pe.oneOf(["dense","spacious"]),inputRef:Pe.oneOfType([Pe.func,Pe.shape({current:Pe.object})]),label:Pe.node,localeText:Pe.object,maxTime:Pe.any,minTime:Pe.any,minutesStep:Pe.number,onAccept:Pe.func,onChange:Pe.func,onClose:Pe.func,onError:Pe.func,onOpen:Pe.func,onSelectedSectionsChange:Pe.func,onViewChange:Pe.func,open:Pe.bool,openTo:Pe.oneOf(["hours","meridiem","minutes","seconds"]),orientation:Pe.oneOf(["landscape","portrait"]),readOnly:Pe.bool,selectedSections:Pe.oneOfType([Pe.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),Pe.number,Pe.shape({endIndex:Pe.number.isRequired,startIndex:Pe.number.isRequired})]),shouldDisableClock:Pe.func,shouldDisableTime:Pe.func,skipDisabled:Pe.bool,slotProps:Pe.object,slots:Pe.object,sx:Pe.oneOfType([Pe.arrayOf(Pe.oneOfType([Pe.func,Pe.object,Pe.bool])),Pe.func,Pe.object]),thresholdToRenderTimeInASingleColumn:Pe.number,timeSteps:Pe.shape({hours:Pe.number,minutes:Pe.number,seconds:Pe.number}),timezone:Pe.string,value:Pe.any,view:Pe.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:Pe.shape({hours:Pe.func,meridiem:Pe.func,minutes:Pe.func,seconds:Pe.func}),views:Pe.arrayOf(Pe.oneOf(["hours","minutes","seconds"]).isRequired)}),function(e){e.HORIZONTAL="HORIZONTAL",e.VERTICAL="VERTICAL"}(MM||(MM={}));var NM,kM={exports:{}},BM={exports:{}};function EM(){return NM||(NM=1,BM.exports=function(){var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:G(e)}function r(e){return s(e)?e:U(e)}function o(e){return l(e)?e:q(e)}function a(e){return i(e)&&!c(e)?e:K(e)}function i(e){return!(!e||!e[d])}function s(e){return!(!e||!e[p])}function l(e){return!(!e||!e[f])}function c(e){return s(e)||l(e)}function u(e){return!(!e||!e[m])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=s,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=r,n.Indexed=o,n.Set=a;var d="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",f="@@__IMMUTABLE_INDEXED__@@",m="@@__IMMUTABLE_ORDERED__@@",h="delete",g=5,v=1<<g,y=v-1,A={},b={value:!1},x={value:!1};function w(e){return e.value=!1,e}function j(e){e&&(e.value=!0)}function M(){}function O(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(D)),e.size}function z(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function D(){return!0}function T(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function P(e,t){return k(e,t,0)}function N(e,t){return k(e,t,t)}function k(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var B=0,E=1,L=2,S="function"==typeof Symbol&&Symbol.iterator,I="@@iterator",W=S||I;function H(e){this.next=e}function R(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function V(){return{value:void 0,done:!0}}function Y(e){return!!Q(e)}function F(e){return e&&"function"==typeof e.next}function X(e){var t=Q(e);return t&&t.call(e)}function Q(e){var t=e&&(S&&e[S]||e[I]);if("function"==typeof t)return t}function Z(e){return e&&"number"==typeof e.length}function G(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function U(e){return null==e?ie().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function q(e){return null==e?ie():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():le(e)}function K(e){return(null==e?ie():i(e)?s(e)?e.entrySeq():e:le(e)).toSetSeq()}H.prototype.toString=function(){return"[Iterator]"},H.KEYS=B,H.VALUES=E,H.ENTRIES=L,H.prototype.inspect=H.prototype.toSource=function(){return this.toString()},H.prototype[W]=function(){return this},t(G,n),G.of=function(){return G(arguments)},G.prototype.toSeq=function(){return this},G.prototype.toString=function(){return this.__toString("Seq {","}")},G.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},G.prototype.__iterate=function(e,t){return de(this,e,t,!0)},G.prototype.__iterator=function(e,t){return pe(this,e,t,!0)},t(U,G),U.prototype.toKeyedSeq=function(){return this},t(q,G),q.of=function(){return q(arguments)},q.prototype.toIndexedSeq=function(){return this},q.prototype.toString=function(){return this.__toString("Seq [","]")},q.prototype.__iterate=function(e,t){return de(this,e,t,!1)},q.prototype.__iterator=function(e,t){return pe(this,e,t,!1)},t(K,G),K.of=function(){return K(arguments)},K.prototype.toSetSeq=function(){return this},G.isSeq=ae,G.Keyed=U,G.Set=K,G.Indexed=q;var J,_,$,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ae(e){return!(!e||!e[ee])}function ie(){return J||(J=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():F(e)?new oe(e).fromEntrySeq():Y(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function le(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=ue(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function ue(e){return Z(e)?new te(e):F(e)?new oe(e):Y(e)?new re(e):void 0}function de(e,t,n,r){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var s=o[n?a-i:i];if(!1===t(s[1],r?s[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function pe(e,t,n,r){var o=e._cache;if(o){var a=o.length-1,i=0;return new H((function(){var e=o[n?a-i:i];return i++>a?V():R(t,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,n)}function fe(e,t){return t?me(t,e,"",{"":e}):he(e)}function me(e,t,n,r){return Array.isArray(t)?e.call(r,n,q(t).map((function(n,r){return me(e,n,r,t)}))):ge(t)?e.call(r,n,U(t).map((function(n,r){return me(e,n,r,t)}))):t}function he(e){return Array.isArray(e)?q(e).map(he).toList():ge(e)?U(e).map(he).toMap():e}function ge(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ve(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ye(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ve(o[1],e)&&(n||ve(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var d=!0,p=t.__iterate((function(t,r){if(n?!e.has(t):o?!ve(t,e.get(r,A)):!ve(e.get(r,A),t))return d=!1,!1}));return d&&e.size===p}function Ae(e,t){if(!(this instanceof Ae))return new Ae(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(_)return _;_=this}}function be(e,t){if(!e)throw new Error(t)}function xe(e,t,n){if(!(this instanceof xe))return new xe(e,t,n);if(be(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if($)return $;$=this}}function we(){throw TypeError("Abstract")}function je(){}function Me(){}function Oe(){}G.prototype[ee]=!0,t(te,q),te.prototype.get=function(e,t){return this.has(e)?this._array[z(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===e(n[t?r-o:o],o,this))return o+1;return o},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,o=0;return new H((function(){return o>r?V():R(e,o,n[t?r-o++:o++])}))},t(ne,U),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,a=0;a<=o;a++){var i=r[t?o-a:a];if(!1===e(n[i],i,this))return a+1}return a},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,a=0;return new H((function(){var i=r[t?o-a:a];return a++>o?V():R(e,i,n[i])}))},ne.prototype[m]=!0,t(re,q),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=X(this._iterable),r=0;if(F(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=X(this._iterable);if(!F(n))return new H(V);var r=0;return new H((function(){var t=n.next();return t.done?t:R(e,r++,t.value)}))},t(oe,q),oe.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,a=0;a<o.length;)if(!1===e(o[a],a++,this))return a;for(;!(n=r.next()).done;){var i=n.value;if(o[a]=i,!1===e(i,a++,this))break}return a},oe.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,o=0;return new H((function(){if(o>=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return R(e,o,r[o++])}))},t(Ae,q),Ae.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Ae.prototype.get=function(e,t){return this.has(e)?this._value:t},Ae.prototype.includes=function(e){return ve(this._value,e)},Ae.prototype.slice=function(e,t){var n=this.size;return T(e,t,n)?this:new Ae(this._value,N(t,n)-P(e,n))},Ae.prototype.reverse=function(){return this},Ae.prototype.indexOf=function(e){return ve(this._value,e)?0:-1},Ae.prototype.lastIndexOf=function(e){return ve(this._value,e)?this.size:-1},Ae.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},Ae.prototype.__iterator=function(e,t){var n=this,r=0;return new H((function(){return r<n.size?R(e,r++,n._value):V()}))},Ae.prototype.equals=function(e){return e instanceof Ae?ve(this._value,e._value):ye(e)},t(xe,q),xe.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},xe.prototype.get=function(e,t){return this.has(e)?this._start+z(this,e)*this._step:t},xe.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},xe.prototype.slice=function(e,t){return T(e,t,this.size)?this:(e=P(e,this.size),(t=N(t,this.size))<=e?new xe(0,0):new xe(this.get(e,this._end),this.get(t,this._end),this._step))},xe.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},xe.prototype.lastIndexOf=function(e){return this.indexOf(e)},xe.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,a=0;a<=n;a++){if(!1===e(o,a,this))return a+1;o+=t?-r:r}return a},xe.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,a=0;return new H((function(){var i=o;return o+=t?-r:r,a>n?V():R(e,a++,i)}))},xe.prototype.equals=function(e){return e instanceof xe?this._start===e._start&&this._end===e._end&&this._step===e._step:ye(this,e)},t(we,n),t(je,we),t(Me,we),t(Oe,we),we.Keyed=je,we.Indexed=Me,we.Set=Oe;var Ce="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ze(e){return e>>>1&1073741824|3221225471&e}function De(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ze(n)}if("string"===t)return e.length>He?Te(e):Pe(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ne(e);if("function"==typeof e.toString)return Pe(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Te(e){var t=Ye[e];return void 0===t&&(t=Pe(e),Ve===Re&&(Ve=0,Ye={}),Ve++,Ye[e]=t),t}function Pe(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ze(t)}function Ne(e){var t;if(Se&&void 0!==(t=Le.get(e)))return t;if(void 0!==(t=e[We]))return t;if(!Be){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[We]))return t;if(void 0!==(t=Ee(e)))return t}if(t=++Ie,1073741824&Ie&&(Ie=0),Se)Le.set(e,t);else{if(void 0!==ke&&!1===ke(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Be)Object.defineProperty(e,We,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[We]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[We]=t}}return t}var ke=Object.isExtensible,Be=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Ee(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Le,Se="function"==typeof WeakMap;Se&&(Le=new WeakMap);var Ie=0,We="__immutablehash__";"function"==typeof Symbol&&(We=Symbol(We));var He=16,Re=255,Ve=0,Ye={};function Fe(e){be(e!==1/0,"Cannot perform this action with an infinite size.")}function Xe(e){return null==e?ot():Qe(e)&&!u(e)?e:ot().withMutations((function(t){var n=r(e);Fe(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Qe(e){return!(!e||!e[Ge])}t(Xe,je),Xe.prototype.toString=function(){return this.__toString("Map {","}")},Xe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Xe.prototype.set=function(e,t){return at(this,e,t)},Xe.prototype.setIn=function(e,t){return this.updateIn(e,A,(function(){return t}))},Xe.prototype.remove=function(e){return at(this,e,A)},Xe.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return A}))},Xe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Xe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=gt(this,wn(e),t,n);return r===A?void 0:r},Xe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ot()},Xe.prototype.merge=function(){return pt(this,void 0,arguments)},Xe.prototype.mergeWith=function(t){return pt(this,t,e.call(arguments,1))},Xe.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Xe.prototype.mergeDeep=function(){return pt(this,ft,arguments)},Xe.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return pt(this,mt(t),n)},Xe.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Xe.prototype.sort=function(e){return Yt(dn(this,e))},Xe.prototype.sortBy=function(e,t){return Yt(dn(this,t,e))},Xe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Xe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new M)},Xe.prototype.asImmutable=function(){return this.__ensureOwner()},Xe.prototype.wasAltered=function(){return this.__altered},Xe.prototype.__iterator=function(e,t){return new et(this,e,t)},Xe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Xe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Xe.isMap=Qe;var Ze,Ge="@@__IMMUTABLE_MAP__@@",Ue=Xe.prototype;function qe(e,t){this.ownerID=e,this.entries=t}function Ke(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function _e(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function $e(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return R(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var o=Object.create(Ue);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ot(){return Ze||(Ze=rt(0))}function at(e,t,n){var r,o;if(e._root){var a=w(b),i=w(x);if(r=it(e._root,e.__ownerID,0,void 0,t,n,a,i),!i.value)return e;o=e.size+(a.value?n===A?-1:1:0)}else{if(n===A)return e;o=1,r=new qe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(o,r):ot()}function it(e,t,n,r,o,a,i,s){return e?e.update(t,n,r,o,a,i,s):a===A?e:(j(s),j(i),new $e(t,r,[o,a]))}function st(e){return e.constructor===$e||e.constructor===_e}function lt(e,t,n,r,o){if(e.keyHash===r)return new _e(t,r,[e.entry,o]);var a,i=(0===n?e.keyHash:e.keyHash>>>n)&y,s=(0===n?r:r>>>n)&y;return new Ke(t,1<<i|1<<s,i===s?[lt(e,t,n+g,r,o)]:(a=new $e(t,r,o),i<s?[e,a]:[a,e]))}function ct(e,t,n,r){e||(e=new M);for(var o=new $e(e,De(n),[n,r]),a=0;a<t.length;a++){var i=t[a];o=o.update(e,0,void 0,i[0],i[1])}return o}function ut(e,t,n,r){for(var o=0,a=0,i=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==r&&(o|=l,i[a++]=u)}return new Ke(e,o,i)}function dt(e,t,n,r,o){for(var a=0,i=new Array(v),s=0;0!==n;s++,n>>>=1)i[s]=1&n?t[a++]:void 0;return i[r]=o,new Je(e,a+1,i)}function pt(e,t,n){for(var o=[],a=0;a<n.length;a++){var s=n[a],l=r(s);i(s)||(l=l.map((function(e){return fe(e)}))),o.push(l)}return ht(e,t,o)}function ft(e,t,n){return e&&e.mergeDeep&&i(t)?e.mergeDeep(t):ve(e,t)?e:t}function mt(e){return function(t,n,r){if(t&&t.mergeDeepWith&&i(n))return t.mergeDeepWith(e,n);var o=e(t,n,r);return ve(t,o)?t:o}}function ht(e,t,n){return 0===(n=n.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations((function(e){for(var r=t?function(n,r){e.update(r,A,(function(e){return e===A?n:t(e,n,r)}))}:function(t,n){e.set(n,t)},o=0;o<n.length;o++)n[o].forEach(r)})):e.constructor(n[0])}function gt(e,t,n,r){var o=e===A,a=t.next();if(a.done){var i=o?n:e,s=r(i);return s===i?e:s}be(o||e&&e.set,"invalid keyPath");var l=a.value,c=o?A:e.get(l,A),u=gt(c,t,n,r);return u===c?e:u===A?e.remove(l):(o?ot():e).set(l,u)}function vt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function yt(e,t,n,r){var o=r?e:O(e);return o[t]=n,o}function At(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var a=new Array(o),i=0,s=0;s<o;s++)s===t?(a[s]=n,i=-1):a[s]=e[s+i];return a}function bt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),a=0,i=0;i<r;i++)i===t&&(a=1),o[i]=e[i+a];return o}Ue[Ge]=!0,Ue[h]=Ue.remove,Ue.removeIn=Ue.deleteIn,qe.prototype.get=function(e,t,n,r){for(var o=this.entries,a=0,i=o.length;a<i;a++)if(ve(n,o[a][0]))return o[a][1];return r},qe.prototype.update=function(e,t,n,r,o,a,i){for(var s=o===A,l=this.entries,c=0,u=l.length;c<u&&!ve(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(j(i),(s||!d)&&j(a),!s||1!==l.length){if(!d&&!s&&l.length>=xt)return ct(e,l,r,o);var p=e&&e===this.ownerID,f=p?l:O(l);return d?s?c===u-1?f.pop():f[c]=f.pop():f[c]=[r,o]:f.push([r,o]),p?(this.entries=f,this):new qe(e,f)}},Ke.prototype.get=function(e,t,n,r){void 0===t&&(t=De(n));var o=1<<((0===e?t:t>>>e)&y),a=this.bitmap;return 0==(a&o)?r:this.nodes[vt(a&o-1)].get(e+g,t,n,r)},Ke.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=De(r));var s=(0===t?n:n>>>t)&y,l=1<<s,c=this.bitmap,u=0!=(c&l);if(!u&&o===A)return this;var d=vt(c&l-1),p=this.nodes,f=u?p[d]:void 0,m=it(f,e,t+g,n,r,o,a,i);if(m===f)return this;if(!u&&m&&p.length>=wt)return dt(e,p,c,s,m);if(u&&!m&&2===p.length&&st(p[1^d]))return p[1^d];if(u&&m&&1===p.length&&st(m))return m;var h=e&&e===this.ownerID,v=u?m?c:c^l:c|l,b=u?m?yt(p,d,m,h):bt(p,d,h):At(p,d,m,h);return h?(this.bitmap=v,this.nodes=b,this):new Ke(e,v,b)},Je.prototype.get=function(e,t,n,r){void 0===t&&(t=De(n));var o=(0===e?t:t>>>e)&y,a=this.nodes[o];return a?a.get(e+g,t,n,r):r},Je.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=De(r));var s=(0===t?n:n>>>t)&y,l=o===A,c=this.nodes,u=c[s];if(l&&!u)return this;var d=it(u,e,t+g,n,r,o,a,i);if(d===u)return this;var p=this.count;if(u){if(!d&&--p<jt)return ut(e,c,p,s)}else p++;var f=e&&e===this.ownerID,m=yt(c,s,d,f);return f?(this.count=p,this.nodes=m,this):new Je(e,p,m)},_e.prototype.get=function(e,t,n,r){for(var o=this.entries,a=0,i=o.length;a<i;a++)if(ve(n,o[a][0]))return o[a][1];return r},_e.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=De(r));var s=o===A;if(n!==this.keyHash)return s?this:(j(i),j(a),lt(this,e,t,n,[r,o]));for(var l=this.entries,c=0,u=l.length;c<u&&!ve(r,l[c][0]);c++);var d=c<u;if(d?l[c][1]===o:s)return this;if(j(i),(s||!d)&&j(a),s&&2===u)return new $e(e,this.keyHash,l[1^c]);var p=e&&e===this.ownerID,f=p?l:O(l);return d?s?c===u-1?f.pop():f[c]=f.pop():f[c]=[r,o]:f.push([r,o]),p?(this.entries=f,this):new _e(e,this.keyHash,f)},$e.prototype.get=function(e,t,n,r){return ve(n,this.entry[0])?this.entry[1]:r},$e.prototype.update=function(e,t,n,r,o,a,i){var s=o===A,l=ve(r,this.entry[0]);return(l?o===this.entry[1]:s)?this:(j(i),s?void j(a):l?e&&e===this.ownerID?(this.entry[1]=o,this):new $e(e,this.keyHash,[r,o]):(j(a),lt(this,e,t,De(r),[r,o])))},qe.prototype.iterate=_e.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},Ke.prototype.iterate=Je.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var a=n[t?o-r:r];if(a&&!1===a.iterate(e,t))return!1}},$e.prototype.iterate=function(e,t){return e(this.entry)},t(et,H),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,o=t.index++;if(r.entry){if(0===o)return tt(e,r.entry)}else if(r.entries){if(o<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-o:o])}else if(o<=(n=r.nodes.length-1)){var a=r.nodes[this._reverse?n-o:o];if(a){if(a.entry)return tt(e,a.entry);t=this._stack=nt(a,t)}continue}t=this._stack=this._stack.__prev}return V()};var xt=v/4,wt=v/2,jt=v/4;function Mt(e){var t=Et();if(null==e)return t;if(Ot(e))return e;var n=o(e),r=n.size;return 0===r?t:(Fe(r),r>0&&r<v?Bt(0,r,g,null,new Dt(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function Ot(e){return!(!e||!e[Ct])}t(Mt,Me),Mt.of=function(){return this(arguments)},Mt.prototype.toString=function(){return this.__toString("List [","]")},Mt.prototype.get=function(e,t){if((e=z(this,e))>=0&&e<this.size){var n=Wt(this,e+=this._origin);return n&&n.array[e&y]}return t},Mt.prototype.set=function(e,t){return Lt(this,e,t)},Mt.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},Mt.prototype.insert=function(e,t){return this.splice(e,0,t)},Mt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=g,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Et()},Mt.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){Ht(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},Mt.prototype.pop=function(){return Ht(this,0,-1)},Mt.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){Ht(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},Mt.prototype.shift=function(){return Ht(this,1)},Mt.prototype.merge=function(){return Rt(this,void 0,arguments)},Mt.prototype.mergeWith=function(t){return Rt(this,t,e.call(arguments,1))},Mt.prototype.mergeDeep=function(){return Rt(this,ft,arguments)},Mt.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Rt(this,mt(t),n)},Mt.prototype.setSize=function(e){return Ht(this,0,e)},Mt.prototype.slice=function(e,t){var n=this.size;return T(e,t,n)?this:Ht(this,P(e,n),N(t,n))},Mt.prototype.__iterator=function(e,t){var n=0,r=kt(this,t);return new H((function(){var t=r();return t===Nt?V():R(e,n++,t)}))},Mt.prototype.__iterate=function(e,t){for(var n,r=0,o=kt(this,t);(n=o())!==Nt&&!1!==e(n,r++,this););return r},Mt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Bt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},Mt.isList=Ot;var Ct="@@__IMMUTABLE_LIST__@@",zt=Mt.prototype;function Dt(e,t){this.array=e,this.ownerID=t}zt[Ct]=!0,zt[h]=zt.remove,zt.setIn=Ue.setIn,zt.deleteIn=zt.removeIn=Ue.removeIn,zt.update=Ue.update,zt.updateIn=Ue.updateIn,zt.mergeIn=Ue.mergeIn,zt.mergeDeepIn=Ue.mergeDeepIn,zt.withMutations=Ue.withMutations,zt.asMutable=Ue.asMutable,zt.asImmutable=Ue.asImmutable,zt.wasAltered=Ue.wasAltered,Dt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&y;if(r>=this.array.length)return new Dt([],e);var o,a=0===r;if(t>0){var i=this.array[r];if((o=i&&i.removeBefore(e,t-g,n))===i&&a)return this}if(a&&!o)return this;var s=It(this,e);if(!a)for(var l=0;l<r;l++)s.array[l]=void 0;return o&&(s.array[r]=o),s},Dt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,o=n-1>>>t&y;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((r=a&&a.removeAfter(e,t-g,n))===a&&o===this.array.length-1)return this}var i=It(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var Tt,Pt,Nt={};function kt(e,t){var n=e._origin,r=e._capacity,o=Vt(r),a=e._tail;return i(e._root,e._level,0);function i(e,t,n){return 0===t?s(e,n):l(e,t,n)}function s(e,i){var s=i===o?a&&a.array:e&&e.array,l=i>n?0:n-i,c=r-i;return c>v&&(c=v),function(){if(l===c)return Nt;var e=t?--c:l++;return s&&s[e]}}function l(e,o,a){var s,l=e&&e.array,c=a>n?0:n-a>>o,u=1+(r-a>>o);return u>v&&(u=v),function(){for(;;){if(s){var e=s();if(e!==Nt)return e;s=null}if(c===u)return Nt;var n=t?--u:c++;s=i(l&&l[n],o-g,a+(n<<o))}}}}function Bt(e,t,n,r,o,a,i){var s=Object.create(zt);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=o,s.__ownerID=a,s.__hash=i,s.__altered=!1,s}function Et(){return Tt||(Tt=Bt(0,0,g))}function Lt(e,t,n){if((t=z(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?Ht(e,t).set(0,n):Ht(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,a=w(x);return t>=Vt(e._capacity)?r=St(r,e.__ownerID,0,t,n,a):o=St(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Bt(e._origin,e._capacity,e._level,o,r):e}function St(e,t,n,r,o,a){var i,s=r>>>n&y,l=e&&s<e.array.length;if(!l&&void 0===o)return e;if(n>0){var c=e&&e.array[s],u=St(c,t,n-g,r,o,a);return u===c?e:((i=It(e,t)).array[s]=u,i)}return l&&e.array[s]===o?e:(j(a),i=It(e,t),void 0===o&&s===i.array.length-1?i.array.pop():i.array[s]=o,i)}function It(e,t){return t&&e&&t===e.ownerID?e:new Dt(e?e.array.slice():[],t)}function Wt(e,t){if(t>=Vt(e._capacity))return e._tail;if(t<1<<e._level+g){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&y],r-=g;return n}}function Ht(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new M,o=e._origin,a=e._capacity,i=o+t,s=void 0===n?a:n<0?a+n:o+n;if(i===o&&s===a)return e;if(i>=s)return e.clear();for(var l=e._level,c=e._root,u=0;i+u<0;)c=new Dt(c&&c.array.length?[void 0,c]:[],r),u+=1<<(l+=g);u&&(i+=u,o+=u,s+=u,a+=u);for(var d=Vt(a),p=Vt(s);p>=1<<l+g;)c=new Dt(c&&c.array.length?[c]:[],r),l+=g;var f=e._tail,m=p<d?Wt(e,s-1):p>d?new Dt([],r):f;if(f&&p>d&&i<a&&f.array.length){for(var h=c=It(c,r),v=l;v>g;v-=g){var A=d>>>v&y;h=h.array[A]=It(h.array[A],r)}h.array[d>>>g&y]=f}if(s<a&&(m=m&&m.removeAfter(r,0,s)),i>=p)i-=p,s-=p,l=g,c=null,m=m&&m.removeBefore(r,0,i);else if(i>o||p<d){for(u=0;c;){var b=i>>>l&y;if(b!==p>>>l&y)break;b&&(u+=(1<<l)*b),l-=g,c=c.array[b]}c&&i>o&&(c=c.removeBefore(r,l,i-u)),c&&p<d&&(c=c.removeAfter(r,l,p-u)),u&&(i-=u,s-=u)}return e.__ownerID?(e.size=s-i,e._origin=i,e._capacity=s,e._level=l,e._root=c,e._tail=m,e.__hash=void 0,e.__altered=!0,e):Bt(i,s,l,c,m)}function Rt(e,t,n){for(var r=[],a=0,s=0;s<n.length;s++){var l=n[s],c=o(l);c.size>a&&(a=c.size),i(l)||(c=c.map((function(e){return fe(e)}))),r.push(c)}return a>e.size&&(e=e.setSize(a)),ht(e,t,r)}function Vt(e){return e<v?0:e-1>>>g<<g}function Yt(e){return null==e?Qt():Ft(e)?e:Qt().withMutations((function(t){var n=r(e);Fe(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Ft(e){return Qe(e)&&u(e)}function Xt(e,t,n,r){var o=Object.create(Yt.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function Qt(){return Pt||(Pt=Xt(ot(),Et()))}function Zt(e,t,n){var r,o,a=e._map,i=e._list,s=a.get(t),l=void 0!==s;if(n===A){if(!l)return e;i.size>=v&&i.size>=2*a.size?(r=(o=i.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=a.remove(t),o=s===i.size-1?i.pop():i.set(s,void 0))}else if(l){if(n===i.get(s)[1])return e;r=a,o=i.set(s,[t,n])}else r=a.set(t,i.size),o=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Xt(r,o)}function Gt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Ut(e){this._iter=e,this.size=e.size}function qt(e){this._iter=e,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Jt(e){var t=An(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=bn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===L){var r=e.__iterator(t,n);return new H((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===E?B:E,n)},t}function _t(e,t,n){var r=An(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var a=e.get(r,A);return a===A?o:t.call(n,a,r,e)},r.__iterateUncached=function(r,o){var a=this;return e.__iterate((function(e,o,i){return!1!==r(t.call(n,e,o,i),o,a)}),o)},r.__iteratorUncached=function(r,o){var a=e.__iterator(L,o);return new H((function(){var o=a.next();if(o.done)return o;var i=o.value,s=i[0];return R(r,s,t.call(n,i[1],s,e),o)}))},r}function $t(e,t){var n=An(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Jt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=bn,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var o=An(e);return r&&(o.has=function(r){var o=e.get(r,A);return o!==A&&!!t.call(n,o,r,e)},o.get=function(r,o){var a=e.get(r,A);return a!==A&&t.call(n,a,r,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,s=0;return e.__iterate((function(e,a,l){if(t.call(n,e,a,l))return s++,o(e,r?a:s-1,i)}),a),s},o.__iteratorUncached=function(o,a){var i=e.__iterator(L,a),s=0;return new H((function(){for(;;){var a=i.next();if(a.done)return a;var l=a.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return R(o,r?c:s++,u,a)}}))},o}function tn(e,t,n){var r=Xe().asMutable();return e.__iterate((function(o,a){r.update(t.call(n,o,a,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=s(e),o=(u(e)?Yt():Xe()).asMutable();e.__iterate((function(a,i){o.update(t.call(n,a,i,e),(function(e){return(e=e||[]).push(r?[i,a]:a),e}))}));var a=yn(e);return o.map((function(t){return hn(e,a(t))}))}function rn(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),T(t,n,o))return e;var a=P(t,o),i=N(n,o);if(a!=a||i!=i)return rn(e.toSeq().cacheResult(),t,n,r);var s,l=i-a;l==l&&(s=l<0?0:l);var c=An(e);return c.size=0===s?s:e.size&&s||void 0,!r&&ae(e)&&s>=0&&(c.get=function(t,n){return(t=z(this,t))>=0&&t<s?e.get(t+a,n):n}),c.__iterateUncached=function(t,n){var o=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var i=0,l=!0,c=0;return e.__iterate((function(e,n){if(!l||!(l=i++<a))return c++,!1!==t(e,r?n:c-1,o)&&c!==s})),c},c.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var o=0!==s&&e.__iterator(t,n),i=0,l=0;return new H((function(){for(;i++<a;)o.next();if(++l>s)return V();var e=o.next();return r||t===E?e:R(t,l-1,t===B?void 0:e.value[1],e)}))},c}function on(e,t,n){var r=An(e);return r.__iterateUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterate(r,o);var i=0;return e.__iterate((function(e,o,s){return t.call(n,e,o,s)&&++i&&r(e,o,a)})),i},r.__iteratorUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterator(r,o);var i=e.__iterator(L,o),s=!0;return new H((function(){if(!s)return V();var e=i.next();if(e.done)return e;var o=e.value,l=o[0],c=o[1];return t.call(n,c,l,a)?r===L?e:R(r,l,c,e):(s=!1,V())}))},r}function an(e,t,n,r){var o=An(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var s=!0,l=0;return e.__iterate((function(e,a,c){if(!s||!(s=t.call(n,e,a,c)))return l++,o(e,r?a:l-1,i)})),l},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var s=e.__iterator(L,a),l=!0,c=0;return new H((function(){var e,a,u;do{if((e=s.next()).done)return r||o===E?e:R(o,c++,o===B?void 0:e.value[1],e);var d=e.value;a=d[0],u=d[1],l&&(l=t.call(n,u,a,i))}while(l);return o===L?e:R(o,a,u,e)}))},o}function sn(e,t){var n=s(e),o=[e].concat(t).map((function(e){return i(e)?n&&(e=r(e)):e=n?se(e):le(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||n&&s(a)||l(e)&&l(a))return a}var c=new te(o);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function ln(e,t,n){var r=An(e);return r.__iterateUncached=function(r,o){var a=0,s=!1;function l(e,c){var u=this;e.__iterate((function(e,o){return(!t||c<t)&&i(e)?l(e,c+1):!1===r(e,n?o:a++,u)&&(s=!0),!s}),o)}return l(e,0),a},r.__iteratorUncached=function(r,o){var a=e.__iterator(r,o),s=[],l=0;return new H((function(){for(;a;){var e=a.next();if(!1===e.done){var c=e.value;if(r===L&&(c=c[1]),t&&!(s.length<t)||!i(c))return n?e:R(r,l++,c,e);s.push(a),a=c.__iterator(r,o)}else a=s.pop()}return V()}))},r}function cn(e,t,n){var r=yn(e);return e.toSeq().map((function(o,a){return r(t.call(n,o,a,e))})).flatten(!0)}function un(e,t){var n=An(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var o=this,a=0;return e.__iterate((function(e,r){return(!a||!1!==n(t,a++,o))&&!1!==n(e,a++,o)}),r),a},n.__iteratorUncached=function(n,r){var o,a=e.__iterator(E,r),i=0;return new H((function(){return(!o||i%2)&&(o=a.next()).done?o:i%2?R(n,i++,t):R(n,i++,o.value,o)}))},n}function dn(e,t,n){t||(t=xn);var r=s(e),o=0,a=e.toSeq().map((function(t,r){return[r,t,o++,n?n(t,r,e):t]})).toArray();return a.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),r?U(a):l(e)?q(a):K(a)}function pn(e,t,n){if(t||(t=xn),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return fn(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return fn(t,e,n)?n:e}))}function fn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function mn(e,t,r){var o=An(e);return o.size=new te(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(E,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=r.map((function(e){return e=n(e),X(o?e.reverse():e)})),i=0,s=!1;return new H((function(){var n;return s||(n=a.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?V():R(e,i++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function hn(e,t){return ae(e)?t:e.constructor(t)}function gn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function vn(e){return Fe(e.size),C(e)}function yn(e){return s(e)?r:l(e)?o:a}function An(e){return Object.create((s(e)?U:l(e)?q:K).prototype)}function bn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):G.prototype.cacheResult.call(this)}function xn(e,t){return e>t?1:e<t?-1:0}function wn(e){var t=X(e);if(!t){if(!Z(e))throw new TypeError("Expected iterable or array-like: "+e);t=X(n(e))}return t}function jn(e,t){var n,r=function(a){if(a instanceof r)return a;if(!(this instanceof r))return new r(a);if(!n){n=!0;var i=Object.keys(e);zn(o,i),o.size=i.length,o._name=t,o._keys=i,o._defaultValues=e}this._map=Xe(a)},o=r.prototype=Object.create(Mn);return o.constructor=r,r}t(Yt,Xe),Yt.of=function(){return this(arguments)},Yt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Yt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Yt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Qt()},Yt.prototype.set=function(e,t){return Zt(this,e,t)},Yt.prototype.remove=function(e){return Zt(this,e,A)},Yt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Yt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},Yt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Yt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Xt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Yt.isOrderedMap=Ft,Yt.prototype[m]=!0,Yt.prototype[h]=Yt.prototype.remove,t(Gt,U),Gt.prototype.get=function(e,t){return this._iter.get(e,t)},Gt.prototype.has=function(e){return this._iter.has(e)},Gt.prototype.valueSeq=function(){return this._iter.valueSeq()},Gt.prototype.reverse=function(){var e=this,t=$t(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Gt.prototype.map=function(e,t){var n=this,r=_t(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Gt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?vn(this):0,function(o){return e(o,t?--n:n++,r)}),t)},Gt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(E,t),r=t?vn(this):0;return new H((function(){var o=n.next();return o.done?o:R(e,t?--r:r++,o.value,o)}))},Gt.prototype[m]=!0,t(Ut,q),Ut.prototype.includes=function(e){return this._iter.includes(e)},Ut.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate((function(t){return e(t,r++,n)}),t)},Ut.prototype.__iterator=function(e,t){var n=this._iter.__iterator(E,t),r=0;return new H((function(){var t=n.next();return t.done?t:R(e,r++,t.value,t)}))},t(qt,K),qt.prototype.has=function(e){return this._iter.includes(e)},qt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},qt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(E,t);return new H((function(){var t=n.next();return t.done?t:R(e,t.value,t.value,t)}))},t(Kt,U),Kt.prototype.entrySeq=function(){return this._iter.toSeq()},Kt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){gn(t);var r=i(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},Kt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(E,t);return new H((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){gn(r);var o=i(r);return R(e,o?r.get(0):r[0],o?r.get(1):r[1],t)}}}))},Ut.prototype.cacheResult=Gt.prototype.cacheResult=qt.prototype.cacheResult=Kt.prototype.cacheResult=bn,t(jn,je),jn.prototype.toString=function(){return this.__toString(Cn(this)+" {","}")},jn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},jn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},jn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=On(this,ot()))},jn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Cn(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:On(this,n)},jn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:On(this,t)},jn.prototype.wasAltered=function(){return this._map.wasAltered()},jn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterator(e,t)},jn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map((function(e,t){return n.get(t)})).__iterate(e,t)},jn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?On(this,t,e):(this.__ownerID=e,this._map=t,this)};var Mn=jn.prototype;function On(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Cn(e){return e._name||e.constructor.name||"Record"}function zn(e,t){try{t.forEach(Dn.bind(void 0,e))}catch(e){}}function Dn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){be(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function Tn(e){return null==e?Sn():Pn(e)&&!u(e)?e:Sn().withMutations((function(t){var n=a(e);Fe(n.size),n.forEach((function(e){return t.add(e)}))}))}function Pn(e){return!(!e||!e[kn])}Mn[h]=Mn.remove,Mn.deleteIn=Mn.removeIn=Ue.removeIn,Mn.merge=Ue.merge,Mn.mergeWith=Ue.mergeWith,Mn.mergeIn=Ue.mergeIn,Mn.mergeDeep=Ue.mergeDeep,Mn.mergeDeepWith=Ue.mergeDeepWith,Mn.mergeDeepIn=Ue.mergeDeepIn,Mn.setIn=Ue.setIn,Mn.update=Ue.update,Mn.updateIn=Ue.updateIn,Mn.withMutations=Ue.withMutations,Mn.asMutable=Ue.asMutable,Mn.asImmutable=Ue.asImmutable,t(Tn,Oe),Tn.of=function(){return this(arguments)},Tn.fromKeys=function(e){return this(r(e).keySeq())},Tn.prototype.toString=function(){return this.__toString("Set {","}")},Tn.prototype.has=function(e){return this._map.has(e)},Tn.prototype.add=function(e){return En(this,this._map.set(e,!0))},Tn.prototype.remove=function(e){return En(this,this._map.remove(e))},Tn.prototype.clear=function(){return En(this,this._map.clear())},Tn.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(e){for(var n=0;n<t.length;n++)a(t[n]).forEach((function(t){return e.add(t)}))})):this.constructor(t[0])},Tn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return a(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.every((function(e){return e.includes(n)}))||e.remove(n)}))}))},Tn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map((function(e){return a(e)}));var n=this;return this.withMutations((function(e){n.forEach((function(n){t.some((function(e){return e.includes(n)}))&&e.remove(n)}))}))},Tn.prototype.merge=function(){return this.union.apply(this,arguments)},Tn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},Tn.prototype.sort=function(e){return In(dn(this,e))},Tn.prototype.sortBy=function(e,t){return In(dn(this,t,e))},Tn.prototype.wasAltered=function(){return this._map.wasAltered()},Tn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t,r){return e(r,r,n)}),t)},Tn.prototype.__iterator=function(e,t){return this._map.map((function(e,t){return t})).__iterator(e,t)},Tn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},Tn.isSet=Pn;var Nn,kn="@@__IMMUTABLE_SET__@@",Bn=Tn.prototype;function En(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Ln(e,t){var n=Object.create(Bn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Sn(){return Nn||(Nn=Ln(ot()))}function In(e){return null==e?Yn():Wn(e)?e:Yn().withMutations((function(t){var n=a(e);Fe(n.size),n.forEach((function(e){return t.add(e)}))}))}function Wn(e){return Pn(e)&&u(e)}Bn[kn]=!0,Bn[h]=Bn.remove,Bn.mergeDeep=Bn.merge,Bn.mergeDeepWith=Bn.mergeWith,Bn.withMutations=Ue.withMutations,Bn.asMutable=Ue.asMutable,Bn.asImmutable=Ue.asImmutable,Bn.__empty=Sn,Bn.__make=Ln,t(In,Tn),In.of=function(){return this(arguments)},In.fromKeys=function(e){return this(r(e).keySeq())},In.prototype.toString=function(){return this.__toString("OrderedSet {","}")},In.isOrderedSet=Wn;var Hn,Rn=In.prototype;function Vn(e,t){var n=Object.create(Rn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Yn(){return Hn||(Hn=Vn(Qt()))}function Fn(e){return null==e?qn():Xn(e)?e:qn().unshiftAll(e)}function Xn(e){return!(!e||!e[Zn])}Rn[m]=!0,Rn.__empty=Yn,Rn.__make=Vn,t(Fn,Me),Fn.of=function(){return this(arguments)},Fn.prototype.toString=function(){return this.__toString("Stack [","]")},Fn.prototype.get=function(e,t){var n=this._head;for(e=z(this,e);n&&e--;)n=n.next;return n?n.value:t},Fn.prototype.peek=function(){return this._head&&this._head.value},Fn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Un(e,t)},Fn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Fe(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Un(t,n)},Fn.prototype.pop=function(){return this.slice(1)},Fn.prototype.unshift=function(){return this.push.apply(this,arguments)},Fn.prototype.unshiftAll=function(e){return this.pushAll(e)},Fn.prototype.shift=function(){return this.pop.apply(this,arguments)},Fn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):qn()},Fn.prototype.slice=function(e,t){if(T(e,t,this.size))return this;var n=P(e,this.size);if(N(t,this.size)!==this.size)return Me.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):Un(r,o)},Fn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Un(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Fn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Fn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new H((function(){if(r){var t=r.value;return r=r.next,R(e,n++,t)}return V()}))},Fn.isStack=Xn;var Qn,Zn="@@__IMMUTABLE_STACK__@@",Gn=Fn.prototype;function Un(e,t,n,r){var o=Object.create(Gn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function qn(){return Qn||(Qn=Un(0))}function Kn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Gn[Zn]=!0,Gn.withMutations=Ue.withMutations,Gn.asMutable=Ue.asMutable,Gn.asImmutable=Ue.asImmutable,Gn.wasAltered=Ue.wasAltered,n.Iterator=H,Kn(n,{toArray:function(){Fe(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Ut(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Gt(this,!0)},toMap:function(){return Xe(this.toKeyedSeq())},toObject:function(){Fe(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return Yt(this.toKeyedSeq())},toOrderedSet:function(){return In(s(this)?this.valueSeq():this)},toSet:function(){return Tn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new qt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Fn(s(this)?this.valueSeq():this)},toList:function(){return Mt(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return hn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ve(t,e)}))},entries:function(){return this.__iterator(L)},every:function(e,t){Fe(this.size);var n=!0;return this.__iterate((function(r,o,a){if(!e.call(t,r,o,a))return n=!1,!1})),n},filter:function(e,t){return hn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate((function(r,o,a){if(e.call(t,r,o,a))return n=[o,r],!1})),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return Fe(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Fe(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(B)},map:function(e,t){return hn(this,_t(this,e,t))},reduce:function(e,t,n){var r,o;return Fe(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,a,i){o?(o=!1,r=t):r=e.call(n,r,t,a,i)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return hn(this,$t(this,!0))},slice:function(e,t){return hn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return hn(this,dn(this,e))},values:function(){return this.__iterator(E)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return C(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ye(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(D)},flatMap:function(e,t){return hn(this,cn(this,e,t))},flatten:function(e){return hn(this,ln(this,e,!0))},fromEntrySeq:function(){return new Kt(this)},get:function(e,t){return this.find((function(t,n){return ve(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=wn(e);!(n=o.next()).done;){var a=n.value;if((r=r&&r.get?r.get(a,A):A)===A)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,A)!==A},hasIn:function(e){return this.getIn(e,A)!==A},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map($n).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return pn(this,e)},maxBy:function(e,t){return pn(this,t,e)},min:function(e){return pn(this,e?nr(e):ar)},minBy:function(e,t){return pn(this,t?nr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return hn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return hn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return hn(this,dn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return hn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return hn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var Jn=n.prototype;Jn[d]=!0,Jn[W]=Jn.values,Jn.__toJS=Jn.toArray,Jn.__toStringMapper=rr,Jn.inspect=Jn.toSource=function(){return this.toString()},Jn.chain=Jn.flatMap,Jn.contains=Jn.includes,function(){try{Object.defineProperty(Jn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch(e){}}(),Kn(r,{flip:function(){return hn(this,Jt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey((function(t){return ve(t,e)}))},lastKeyOf:function(e){return this.findLastKey((function(t){return ve(t,e)}))},mapEntries:function(e,t){var n=this,r=0;return hn(this,this.toSeq().map((function(o,a){return e.call(t,[a,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return hn(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var _n=r.prototype;function $n(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):e}function or(){return O(arguments)}function ar(e,t){return e<t?1:e>t?-1:0}function ir(e){if(e.size===1/0)return 0;var t=u(e),n=s(e),r=t?1:0;return sr(e.__iterate(n?t?function(e,t){r=31*r+lr(De(e),De(t))|0}:function(e,t){r=r+lr(De(e),De(t))|0}:t?function(e){r=31*r+De(e)|0}:function(e){r=r+De(e)|0}),r)}function sr(e,t){return t=Ce(t,3432918353),t=Ce(t<<15|t>>>-15,461845907),t=Ce(t<<13|t>>>-13,5),t=Ce((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ze((t=Ce(t^t>>>13,3266489909))^t>>>16)}function lr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}_n[p]=!0,_n[W]=Jn.entries,_n.__toJS=Jn.toObject,_n.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Kn(o,{toKeyedSeq:function(){return new Gt(this,!1)},filter:function(e,t){return hn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return hn(this,$t(this,!1))},slice:function(e,t){return hn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=P(e,e<0?this.count():this.size);var r=this.slice(0,e);return hn(this,1===n?r:r.concat(O(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return hn(this,ln(this,e,!1))},get:function(e,t){return(e=z(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=z(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return hn(this,un(this,e))},interleave:function(){var e=[this].concat(O(arguments)),t=mn(this.toSeq(),q.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),hn(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return hn(this,an(this,e,t,!1))},zip:function(){return hn(this,mn(this,or,[this].concat(O(arguments))))},zipWith:function(e){var t=O(arguments);return t[0]=this,hn(this,mn(this,e,t))}}),o.prototype[f]=!0,o.prototype[m]=!0,Kn(a,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),a.prototype.has=Jn.includes,Kn(U,r.prototype),Kn(q,o.prototype),Kn(K,a.prototype),Kn(je,r.prototype),Kn(Me,o.prototype),Kn(Oe,a.prototype);var cr={Iterable:n,Seq:G,Collection:we,Map:Xe,OrderedMap:Yt,List:Mt,Stack:Fn,Set:Tn,OrderedSet:In,Record:jn,Range:xe,Repeat:Ae,is:ve,fromJS:fe};return cr}()),BM.exports}window,kM.exports=function(e,t,n){return a={},r.m=o=[function(e,t,n){e.exports=n(10)()},function(t,n){t.exports=e},function(e,t,n){var r;
|
|
133
133
|
/*!
|
|
134
134
|
Copyright (c) 2017 Jed Watson.
|
|
135
135
|
Licensed under the MIT License (MIT), see
|