@meltingspot/widget 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,33 @@
1
+ (function(){try{if(typeof document==="undefined")return;var s=document.createElement("style");s.setAttribute("data-meltingspot","widget");s.textContent=":where(dialog.ms-dialog)[open]{opacity:1}body:has(dialog.ms-dialog[open]){overflow:hidden}:where(dialog.ms-dialog){border:0;position:fixed;inset:0;padding:0;overflow:hidden;max-width:100%;max-height:100%;opacity:0;transition:opacity .2s ease-out,overlay .2s ease-out allow-discrete,display .2s ease-out allow-discrete}:where(dialog.ms-dialog) .ms-dialog-close-button{position:absolute;top:8px;right:8px;font-size:16px;border:0;border-radius:4px;background:none;box-sizing:border-box;width:2rem;height:2rem;min-width:2rem;min-height:2rem;padding:0;color:#fff}:where(dialog.ms-dialog) .ms-dialog-close-button span{mix-blend-mode:difference}:where(dialog.ms-dialog) .ms-dialog-close-button svg{transform:translateZ(0);mix-blend-mode:difference;margin:auto}:where(dialog.ms-dialog) .ms-dialog-close-button:hover{background:#c8c8c81a;background-blend-mode:difference}@starting-style{:where(dialog.ms-dialog)[open]{opacity:0}}:where(dialog.ms-dialog)::backdrop{background-color:#0000;transition:display .2s allow-discrete,overlay .2s allow-discrete,background-color .2s}:where(dialog.ms-dialog)[open]::backdrop{background-color:#00000040}@starting-style{:where(dialog.ms-dialog)[open]::backdrop{background-color:#0000}}:where(.ms-modal){width:100%;height:100%;margin:0;border-radius:0}:where(.ms-drawer){max-width:640px;width:100%;height:100%;box-sizing:border-box}:where(.ms-drawer)[data-position=left]{margin:0 auto 0 0}:where(.ms-drawer)[data-position=right]{margin:0 0 0 auto}@media(min-width:640px){:where(.ms-modal){width:640px;height:80vh;margin:auto;border-radius:8px}}@media(min-width:1280px){:where(.ms-modal){width:50vw}}\n";document.head.appendChild(s);}catch(e){}})();(function(kt,Pn){typeof exports=="object"&&typeof module<"u"?Pn(exports):typeof define=="function"&&define.amd?define(["exports"],Pn):(kt=typeof globalThis<"u"?globalThis:kt||self,Pn(kt.MeltingSpotWidget={}))})(this,(function(kt){"use strict";const Pn={withStackTrace:!1},nu=(u,o,r=Pn)=>{const c=o.isOk()?{type:"Ok",value:o.value}:{type:"Err",value:o.error},d=r.withStackTrace?new Error().stack:void 0;return{data:c,message:u,stack:d}};function or(u,o,r,c){function d(v){return v instanceof r?v:new r(function(g){g(v)})}return new(r||(r=Promise))(function(v,g){function y(H){try{F(c.next(H))}catch(U){g(U)}}function A(H){try{F(c.throw(H))}catch(U){g(U)}}function F(H){H.done?v(H.value):d(H.value).then(y,A)}F((c=c.apply(u,[])).next())})}function ru(u){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&u[o],c=0;if(r)return r.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")}function Vt(u){return this instanceof Vt?(this.v=u,this):new Vt(u)}function lf(u,o,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=r.apply(u,o||[]),d,v=[];return d={},g("next"),g("throw"),g("return"),d[Symbol.asyncIterator]=function(){return this},d;function g($){c[$]&&(d[$]=function(q){return new Promise(function(k,M){v.push([$,q,k,M])>1||y($,q)})})}function y($,q){try{A(c[$](q))}catch(k){U(v[0][3],k)}}function A($){$.value instanceof Vt?Promise.resolve($.value.v).then(F,H):U(v[0][2],$)}function F($){y("next",$)}function H($){y("throw",$)}function U($,q){$(q),v.shift(),v.length&&y(v[0][0],v[0][1])}}function hf(u){var o,r;return o={},c("next"),c("throw",function(d){throw d}),c("return"),o[Symbol.iterator]=function(){return this},o;function c(d,v){o[d]=u[d]?function(g){return(r=!r)?{value:Vt(u[d](g)),done:d==="return"}:v?v(g):g}:v}}function df(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=u[Symbol.asyncIterator],r;return o?o.call(u):(u=typeof ru=="function"?ru(u):u[Symbol.iterator](),r={},c("next"),c("throw"),c("return"),r[Symbol.asyncIterator]=function(){return this},r);function c(v){r[v]=u[v]&&function(g){return new Promise(function(y,A){g=u[v](g),d(y,A,g.done,g.value)})}}function d(v,g,y,A){Promise.resolve(A).then(function(F){v({value:F,done:y})},g)}}class Xe{constructor(o){this._promise=o}static fromSafePromise(o){const r=o.then(c=>new jt(c));return new Xe(r)}static fromPromise(o,r){const c=o.then(d=>new jt(d)).catch(d=>new en(r(d)));return new Xe(c)}static fromThrowable(o,r){return(...c)=>new Xe(or(this,void 0,void 0,function*(){try{return new jt(yield o(...c))}catch(d){return new en(r?r(d):d)}}))}static combine(o){return gf(o)}static combineWithAllErrors(o){return pf(o)}map(o){return new Xe(this._promise.then(r=>or(this,void 0,void 0,function*(){return r.isErr()?new en(r.error):new jt(yield o(r.value))})))}mapErr(o){return new Xe(this._promise.then(r=>or(this,void 0,void 0,function*(){return r.isOk()?new jt(r.value):new en(yield o(r.error))})))}andThen(o){return new Xe(this._promise.then(r=>{if(r.isErr())return new en(r.error);const c=o(r.value);return c instanceof Xe?c._promise:c}))}orElse(o){return new Xe(this._promise.then(r=>or(this,void 0,void 0,function*(){return r.isErr()?o(r.error):new jt(r.value)})))}match(o,r){return this._promise.then(c=>c.match(o,r))}unwrapOr(o){return this._promise.then(r=>r.unwrapOr(o))}safeUnwrap(){return lf(this,arguments,function*(){return yield Vt(yield Vt(yield*hf(df(yield Vt(this._promise.then(r=>r.safeUnwrap()))))))})}then(o,r){return this._promise.then(o,r)}}const iu=u=>new Xe(Promise.resolve(new en(u))),ou=u=>{let o=ae([]);for(const r of u)if(r.isErr()){o=Z(r.error);break}else o.map(c=>c.push(r.value));return o},gf=u=>Xe.fromSafePromise(Promise.all(u)).andThen(ou),uu=u=>{let o=ae([]);for(const r of u)r.isErr()&&o.isErr()?o.error.push(r.error):r.isErr()&&o.isOk()?o=Z([r.error]):r.isOk()&&o.isOk()&&o.value.push(r.value);return o},pf=u=>Xe.fromSafePromise(Promise.all(u)).andThen(uu);var _i;(function(u){function o(d,v){return(...g)=>{try{const y=d(...g);return ae(y)}catch(y){return Z(v?v(y):y)}}}u.fromThrowable=o;function r(d){return ou(d)}u.combine=r;function c(d){return uu(d)}u.combineWithAllErrors=c})(_i||(_i={}));const ae=u=>new jt(u),Z=u=>new en(u);class jt{constructor(o){this.value=o}isOk(){return!0}isErr(){return!this.isOk()}map(o){return ae(o(this.value))}mapErr(o){return ae(this.value)}andThen(o){return o(this.value)}orElse(o){return ae(this.value)}asyncAndThen(o){return o(this.value)}asyncMap(o){return Xe.fromSafePromise(o(this.value))}unwrapOr(o){return this.value}match(o,r){return o(this.value)}safeUnwrap(){const o=this.value;return(function*(){return o})()}_unsafeUnwrap(o){return this.value}_unsafeUnwrapErr(o){throw nu("Called `_unsafeUnwrapErr` on an Ok",this,o)}}class en{constructor(o){this.error=o}isOk(){return!1}isErr(){return!this.isOk()}map(o){return Z(this.error)}mapErr(o){return Z(o(this.error))}andThen(o){return Z(this.error)}orElse(o){return o(this.error)}asyncAndThen(o){return iu(this.error)}asyncMap(o){return iu(this.error)}unwrapOr(o){return o}match(o,r){return r(this.error)}safeUnwrap(){const o=this.error;return(function*(){throw yield Z(o),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(o){throw nu("Called `_unsafeUnwrap` on an Err",this,o)}_unsafeUnwrapErr(o){return this.error}}_i.fromThrowable;var ut;(function(u){u[u.CONTINUE=100]="CONTINUE",u[u.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",u[u.PROCESSING=102]="PROCESSING",u[u.EARLY_HINTS=103]="EARLY_HINTS",u[u.OK=200]="OK",u[u.CREATED=201]="CREATED",u[u.ACCEPTED=202]="ACCEPTED",u[u.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",u[u.NO_CONTENT=204]="NO_CONTENT",u[u.RESET_CONTENT=205]="RESET_CONTENT",u[u.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",u[u.MULTI_STATUS=207]="MULTI_STATUS",u[u.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",u[u.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",u[u.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",u[u.SEE_OTHER=303]="SEE_OTHER",u[u.NOT_MODIFIED=304]="NOT_MODIFIED",u[u.USE_PROXY=305]="USE_PROXY",u[u.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",u[u.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",u[u.BAD_REQUEST=400]="BAD_REQUEST",u[u.UNAUTHORIZED=401]="UNAUTHORIZED",u[u.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",u[u.FORBIDDEN=403]="FORBIDDEN",u[u.NOT_FOUND=404]="NOT_FOUND",u[u.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",u[u.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",u[u.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",u[u.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",u[u.CONFLICT=409]="CONFLICT",u[u.GONE=410]="GONE",u[u.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",u[u.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",u[u.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",u[u.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",u[u.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",u[u.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",u[u.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",u[u.IM_A_TEAPOT=418]="IM_A_TEAPOT",u[u.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",u[u.METHOD_FAILURE=420]="METHOD_FAILURE",u[u.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",u[u.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",u[u.LOCKED=423]="LOCKED",u[u.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",u[u.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",u[u.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",u[u.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",u[u.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",u[u.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",u[u.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",u[u.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",u[u.BAD_GATEWAY=502]="BAD_GATEWAY",u[u.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",u[u.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",u[u.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",u[u.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",u[u.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(ut||(ut={}));const mf=new RegExp("^/+"),_f=u=>u.replace(mf,""),vf=new RegExp("/+$"),ur=u=>u.replace(vf,"");function vi(u,o){const r=u.startsWith("/")?u.slice(1):u;return new URL(r,o).toString()}const wi=u=>{const{input:o,rootDocument:r=document}=u;if(typeof o=="string"){const c=r.getElementById(o);if(!c)throw new Error(`Could not found an HTMLElement with ID '${o}'.`);return c}if(o.tagName)return o;throw new Error(`Expected a string or an HTMLElement, but received: ${typeof o}`)},wf=u=>{const o=u.createElement("dialog");o.innerHTML=`
2
+ <form method="dialog">
3
+ <button class="ms-dialog-close-button" aria-label="Close" autofocus>
4
+ <span>
5
+ <svg focusable="false" aria-hidden="true" viewBox="0 0 20 20" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">
6
+ <g>
7
+ <path d="M1.75 18.25L18.25 1.75" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
8
+ <path d="M18.25 18.25L1.75 1.75" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
9
+ </g>
10
+ </svg>
11
+ </span>
12
+ </button>
13
+ </form>
14
+ `,o.classList.add("ms-dialog"),o.addEventListener("click",c=>{c.target===o&&o.close()});const r=o.querySelector(".ms-dialog-close-button");return r&&r.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),o.close()}),o},Ef=["accelerometer *","autoplay","camera","clipboard-write *","display-capture","encrypted-media *","fullscreen","gyroscope *","microphone","picture-in-picture *","screen-wake-lock"],Ei=u=>{const{url:o,searchParams:r={},permissionPolicies:c=[],rootDocument:d=document}=u;Object.entries(r).forEach(([g,y])=>{y!=null&&o.searchParams.set(g,String(y))});const v=d.createElement("iframe");return v.src=o.toString(),v.allow=Ef.concat(c).join("; "),v.width="100%",v.height="100%",v.style.border="0",v};var sr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cn(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var ar={exports:{}},Tf=ar.exports,su;function tn(){return su||(su=1,(function(u,o){(function(r,c){u.exports=c()})(Tf,(function(){var r=1e3,c=6e4,d=36e5,v="millisecond",g="second",y="minute",A="hour",F="day",H="week",U="month",$="quarter",q="year",k="date",M="Invalid Date",K=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,he=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,me={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var x=["th","st","nd","rd"],O=W%100;return"["+W+(x[(O-20)%10]||x[O]||x[0])+"]"}},ne=function(W,x,O){var D=String(W);return!D||D.length>=x?W:""+Array(x+1-D.length).join(O)+W},Le={s:ne,z:function(W){var x=-W.utcOffset(),O=Math.abs(x),D=Math.floor(O/60),L=O%60;return(x<=0?"+":"-")+ne(D,2,"0")+":"+ne(L,2,"0")},m:function W(x,O){if(x.date()<O.date())return-W(O,x);var D=12*(O.year()-x.year())+(O.month()-x.month()),L=x.clone().add(D,U),G=O-L<0,Y=x.clone().add(D+(G?-1:1),U);return+(-(D+(O-L)/(G?L-Y:Y-L))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:U,y:q,w:H,d:F,D:k,h:A,m:y,s:g,ms:v,Q:$}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},ue="en",Te={};Te[ue]=me;var _e="$isDayjsObject",Ne=function(W){return W instanceof En||!(!W||!W[_e])},Pe=function W(x,O,D){var L;if(!x)return ue;if(typeof x=="string"){var G=x.toLowerCase();Te[G]&&(L=G),O&&(Te[G]=O,L=G);var Y=x.split("-");if(!L&&Y.length>1)return W(Y[0])}else{var V=x.name;Te[V]=x,L=V}return!D&&L&&(ue=L),L||!D&&ue},ce=function(W,x){if(Ne(W))return W.clone();var O=typeof x=="object"?x:{};return O.date=W,O.args=arguments,new En(O)},ie=Le;ie.l=Pe,ie.i=Ne,ie.w=function(W,x){return ce(W,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var En=(function(){function W(O){this.$L=Pe(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[_e]=!0}var x=W.prototype;return x.parse=function(O){this.$d=(function(D){var L=D.date,G=D.utc;if(L===null)return new Date(NaN);if(ie.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var Y=L.match(K);if(Y){var V=Y[2]-1||0,ve=(Y[7]||"0").substring(0,3);return G?new Date(Date.UTC(Y[1],V,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,ve)):new Date(Y[1],V,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,ve)}}return new Date(L)})(O),this.init()},x.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},x.$utils=function(){return ie},x.isValid=function(){return this.$d.toString()!==M},x.isSame=function(O,D){var L=ce(O);return this.startOf(D)<=L&&L<=this.endOf(D)},x.isAfter=function(O,D){return ce(O)<this.startOf(D)},x.isBefore=function(O,D){return this.endOf(D)<ce(O)},x.$g=function(O,D,L){return ie.u(O)?this[D]:this.set(L,O)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(O,D){var L=this,G=!!ie.u(D)||D,Y=ie.p(O),V=function(Ve,We){var je=ie.w(L.$u?Date.UTC(L.$y,We,Ve):new Date(L.$y,We,Ve),L);return G?je:je.endOf(F)},ve=function(Ve,We){return ie.w(L.toDate()[Ve].apply(L.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(We)),L)},Re=this.$W,De=this.$M,Me=this.$D,pt="set"+(this.$u?"UTC":"");switch(Y){case q:return G?V(1,0):V(31,11);case U:return G?V(1,De):V(0,De+1);case H:var xt=this.$locale().weekStart||0,mt=(Re<xt?Re+7:Re)-xt;return V(G?Me-mt:Me+(6-mt),De);case F:case k:return ve(pt+"Hours",0);case A:return ve(pt+"Minutes",1);case y:return ve(pt+"Seconds",2);case g:return ve(pt+"Milliseconds",3);default:return this.clone()}},x.endOf=function(O){return this.startOf(O,!1)},x.$set=function(O,D){var L,G=ie.p(O),Y="set"+(this.$u?"UTC":""),V=(L={},L[F]=Y+"Date",L[k]=Y+"Date",L[U]=Y+"Month",L[q]=Y+"FullYear",L[A]=Y+"Hours",L[y]=Y+"Minutes",L[g]=Y+"Seconds",L[v]=Y+"Milliseconds",L)[G],ve=G===F?this.$D+(D-this.$W):D;if(G===U||G===q){var Re=this.clone().set(k,1);Re.$d[V](ve),Re.init(),this.$d=Re.set(k,Math.min(this.$D,Re.daysInMonth())).$d}else V&&this.$d[V](ve);return this.init(),this},x.set=function(O,D){return this.clone().$set(O,D)},x.get=function(O){return this[ie.p(O)]()},x.add=function(O,D){var L,G=this;O=Number(O);var Y=ie.p(D),V=function(De){var Me=ce(G);return ie.w(Me.date(Me.date()+Math.round(De*O)),G)};if(Y===U)return this.set(U,this.$M+O);if(Y===q)return this.set(q,this.$y+O);if(Y===F)return V(1);if(Y===H)return V(7);var ve=(L={},L[y]=c,L[A]=d,L[g]=r,L)[Y]||1,Re=this.$d.getTime()+O*ve;return ie.w(Re,this)},x.subtract=function(O,D){return this.add(-1*O,D)},x.format=function(O){var D=this,L=this.$locale();if(!this.isValid())return L.invalidDate||M;var G=O||"YYYY-MM-DDTHH:mm:ssZ",Y=ie.z(this),V=this.$H,ve=this.$m,Re=this.$M,De=L.weekdays,Me=L.months,pt=L.meridiem,xt=function(We,je,Lt,rn){return We&&(We[je]||We(D,G))||Lt[je].slice(0,rn)},mt=function(We){return ie.s(V%12||12,We,"0")},Ve=pt||function(We,je,Lt){var rn=We<12?"AM":"PM";return Lt?rn.toLowerCase():rn};return G.replace(he,(function(We,je){return je||(function(Lt){switch(Lt){case"YY":return String(D.$y).slice(-2);case"YYYY":return ie.s(D.$y,4,"0");case"M":return Re+1;case"MM":return ie.s(Re+1,2,"0");case"MMM":return xt(L.monthsShort,Re,Me,3);case"MMMM":return xt(Me,Re);case"D":return D.$D;case"DD":return ie.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return xt(L.weekdaysMin,D.$W,De,2);case"ddd":return xt(L.weekdaysShort,D.$W,De,3);case"dddd":return De[D.$W];case"H":return String(V);case"HH":return ie.s(V,2,"0");case"h":return mt(1);case"hh":return mt(2);case"a":return Ve(V,ve,!0);case"A":return Ve(V,ve,!1);case"m":return String(ve);case"mm":return ie.s(ve,2,"0");case"s":return String(D.$s);case"ss":return ie.s(D.$s,2,"0");case"SSS":return ie.s(D.$ms,3,"0");case"Z":return Y}return null})(We)||Y.replace(":","")}))},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(O,D,L){var G,Y=this,V=ie.p(D),ve=ce(O),Re=(ve.utcOffset()-this.utcOffset())*c,De=this-ve,Me=function(){return ie.m(Y,ve)};switch(V){case q:G=Me()/12;break;case U:G=Me();break;case $:G=Me()/3;break;case H:G=(De-Re)/6048e5;break;case F:G=(De-Re)/864e5;break;case A:G=De/d;break;case y:G=De/c;break;case g:G=De/r;break;default:G=De}return L?G:ie.a(G)},x.daysInMonth=function(){return this.endOf(U).$D},x.$locale=function(){return Te[this.$L]},x.locale=function(O,D){if(!O)return this.$L;var L=this.clone(),G=Pe(O,D,!0);return G&&(L.$L=G),L},x.clone=function(){return ie.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},W})(),Or=En.prototype;return ce.prototype=Or,[["$ms",v],["$s",g],["$m",y],["$H",A],["$W",F],["$M",U],["$y",q],["$D",k]].forEach((function(W){Or[W[1]]=function(x){return this.$g(x,W[0],W[1])}})),ce.extend=function(W,x){return W.$i||(W(x,En,ce),W.$i=!0),ce},ce.locale=Pe,ce.isDayjs=Ne,ce.unix=function(W){return ce(1e3*W)},ce.en=Te[ue],ce.Ls=Te,ce.p={},ce}))})(ar)),ar.exports}var yf=tn();const fr=Cn(yf);var cr={exports:{}},If=cr.exports,au;function Af(){return au||(au=1,(function(u,o){(function(r,c){u.exports=c()})(If,(function(){return function(r,c){var d=c.prototype,v=d.format;d.format=function(g){var y=this,A=this.$locale();if(!this.isValid())return v.bind(this)(g);var F=this.$utils(),H=(g||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(U){switch(U){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return A.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return A.ordinal(y.week(),"W");case"w":case"ww":return F.s(y.week(),U==="w"?1:2,"0");case"W":case"WW":return F.s(y.isoWeek(),U==="W"?1:2,"0");case"k":case"kk":return F.s(String(y.$H===0?24:y.$H),U==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return U}}));return v.bind(this)(H)}}}))})(cr)),cr.exports}var Lf=Af();const Rf=Cn(Lf);var lr={exports:{}},Of=lr.exports,fu;function Mf(){return fu||(fu=1,(function(u,o){(function(r,c){u.exports=c()})(Of,(function(){var r={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(c,d,v){var g=d.prototype,y=g.format;v.en.formats=r,g.format=function(A){A===void 0&&(A="YYYY-MM-DDTHH:mm:ssZ");var F=this.$locale().formats,H=(function(U,$){return U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(q,k,M){var K=M&&M.toUpperCase();return k||$[M]||r[M]||$[K].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(he,me,ne){return me||ne.slice(1)}))}))})(A,F===void 0?{}:F);return y.call(this,H)}}}))})(lr)),lr.exports}var bf=Mf();const xf=Cn(bf);var hr={exports:{}},Df=hr.exports,cu;function Sf(){return cu||(cu=1,(function(u,o){(function(r,c){u.exports=c()})(Df,(function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},c={};return function(d,v,g){var y,A=function($,q,k){k===void 0&&(k={});var M=new Date($),K=(function(he,me){me===void 0&&(me={});var ne=me.timeZoneName||"short",Le=he+"|"+ne,ue=c[Le];return ue||(ue=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:he,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:ne}),c[Le]=ue),ue})(q,k);return K.formatToParts(M)},F=function($,q){for(var k=A($,q),M=[],K=0;K<k.length;K+=1){var he=k[K],me=he.type,ne=he.value,Le=r[me];Le>=0&&(M[Le]=parseInt(ne,10))}var ue=M[3],Te=ue===24?0:ue,_e=M[0]+"-"+M[1]+"-"+M[2]+" "+Te+":"+M[4]+":"+M[5]+":000",Ne=+$;return(g.utc(_e).valueOf()-(Ne-=Ne%1e3))/6e4},H=v.prototype;H.tz=function($,q){$===void 0&&($=y);var k,M=this.utcOffset(),K=this.toDate(),he=K.toLocaleString("en-US",{timeZone:$}),me=Math.round((K-new Date(he))/1e3/60),ne=15*-Math.round(K.getTimezoneOffset()/15)-me;if(!Number(ne))k=this.utcOffset(0,q);else if(k=g(he,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(ne,!0),q){var Le=k.utcOffset();k=k.add(M-Le,"minute")}return k.$x.$timezone=$,k},H.offsetName=function($){var q=this.$x.$timezone||g.tz.guess(),k=A(this.valueOf(),q,{timeZoneName:$}).find((function(M){return M.type.toLowerCase()==="timezonename"}));return k&&k.value};var U=H.startOf;H.startOf=function($,q){if(!this.$x||!this.$x.$timezone)return U.call(this,$,q);var k=g(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return U.call(k,$,q).tz(this.$x.$timezone,!0)},g.tz=function($,q,k){var M=k&&q,K=k||q||y,he=F(+g(),K);if(typeof $!="string")return g($).tz(K);var me=(function(Te,_e,Ne){var Pe=Te-60*_e*1e3,ce=F(Pe,Ne);if(_e===ce)return[Pe,_e];var ie=F(Pe-=60*(ce-_e)*1e3,Ne);return ce===ie?[Pe,ce]:[Te-60*Math.min(ce,ie)*1e3,Math.max(ce,ie)]})(g.utc($,M).valueOf(),he,K),ne=me[0],Le=me[1],ue=g(ne).utcOffset(Le);return ue.$x.$timezone=K,ue},g.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},g.tz.setDefault=function($){y=$}}}))})(hr)),hr.exports}var Uf=Sf();const $f=Cn(Uf);var dr={exports:{}},Nf=dr.exports,lu;function Pf(){return lu||(lu=1,(function(u,o){(function(r,c){u.exports=c()})(Nf,(function(){var r="minute",c=/[+-]\d\d(?::?\d\d)?/g,d=/([+-]|\d\d)/g;return function(v,g,y){var A=g.prototype;y.utc=function(M){var K={date:M,utc:!0,args:arguments};return new g(K)},A.utc=function(M){var K=y(this.toDate(),{locale:this.$L,utc:!0});return M?K.add(this.utcOffset(),r):K},A.local=function(){return y(this.toDate(),{locale:this.$L,utc:!1})};var F=A.parse;A.parse=function(M){M.utc&&(this.$u=!0),this.$utils().u(M.$offset)||(this.$offset=M.$offset),F.call(this,M)};var H=A.init;A.init=function(){if(this.$u){var M=this.$d;this.$y=M.getUTCFullYear(),this.$M=M.getUTCMonth(),this.$D=M.getUTCDate(),this.$W=M.getUTCDay(),this.$H=M.getUTCHours(),this.$m=M.getUTCMinutes(),this.$s=M.getUTCSeconds(),this.$ms=M.getUTCMilliseconds()}else H.call(this)};var U=A.utcOffset;A.utcOffset=function(M,K){var he=this.$utils().u;if(he(M))return this.$u?0:he(this.$offset)?U.call(this):this.$offset;if(typeof M=="string"&&(M=(function(ue){ue===void 0&&(ue="");var Te=ue.match(c);if(!Te)return null;var _e=(""+Te[0]).match(d)||["-",0,0],Ne=_e[0],Pe=60*+_e[1]+ +_e[2];return Pe===0?0:Ne==="+"?Pe:-Pe})(M),M===null))return this;var me=Math.abs(M)<=16?60*M:M,ne=this;if(K)return ne.$offset=me,ne.$u=M===0,ne;if(M!==0){var Le=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(ne=this.local().add(me+Le,r)).$offset=me,ne.$x.$localOffset=Le}else ne=this.utc();return ne};var $=A.format;A.format=function(M){var K=M||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return $.call(this,K)},A.valueOf=function(){var M=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*M},A.isUTC=function(){return!!this.$u},A.toISOString=function(){return this.toDate().toISOString()},A.toString=function(){return this.toDate().toUTCString()};var q=A.toDate;A.toDate=function(M){return M==="s"&&this.$offset?y(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():q.call(this)};var k=A.diff;A.diff=function(M,K,he){if(M&&this.$u===M.$u)return k.call(this,M,K,he);var me=this.local(),ne=y(M).local();return k.call(me,ne,K,he)}}}))})(dr)),dr.exports}var Cf=Pf();const Ff=Cn(Cf);var gr={exports:{}},Wf=gr.exports,hu;function Yf(){return hu||(hu=1,(function(u,o){(function(r,c){u.exports=c(tn())})(Wf,(function(r){function c(A){return A&&typeof A=="object"&&"default"in A?A:{default:A}}var d=c(r),v={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function g(A,F,H){var U=v[H];return Array.isArray(U)&&(U=U[F?0:1]),U.replace("%d",A)}var y={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(A){return A+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:g,m:g,mm:g,h:g,hh:g,d:g,dd:g,M:g,MM:g,y:g,yy:g}};return d.default.locale(y,null,!0),y}))})(gr)),gr.exports}Yf();var pr={exports:{}},kf=pr.exports,du;function Hf(){return du||(du=1,(function(u,o){(function(r,c){u.exports=c(tn())})(kf,(function(r){function c(g){return g&&typeof g=="object"&&"default"in g?g:{default:g}}var d=c(r),v={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(g){return""+g+(g===1?"er":"")}};return d.default.locale(v,null,!0),v}))})(pr)),pr.exports}Hf();var mr={exports:{}},Bf=mr.exports,gu;function Gf(){return gu||(gu=1,(function(u,o){(function(r,c){u.exports=c()})(Bf,(function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(r){var c=["th","st","nd","rd"],d=r%100;return"["+r+(c[(d-20)%10]||c[d]||c[0])+"]"}}}))})(mr)),mr.exports}Gf();var _r={exports:{}},zf=_r.exports,pu;function qf(){return pu||(pu=1,(function(u,o){(function(r,c){u.exports=c(tn())})(zf,(function(r){function c(g){return g&&typeof g=="object"&&"default"in g?g:{default:g}}var d=c(r),v={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(g){return g+"º"}};return d.default.locale(v,null,!0),v}))})(_r)),_r.exports}qf();var vr={exports:{}},Kf=vr.exports,mu;function Qf(){return mu||(mu=1,(function(u,o){(function(r,c){u.exports=c(tn())})(Kf,(function(r){function c(g){return g&&typeof g=="object"&&"default"in g?g:{default:g}}var d=c(r),v={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(g){return g+"º"}};return d.default.locale(v,null,!0),v}))})(vr)),vr.exports}Qf();var wr={exports:{}},Zf=wr.exports,_u;function Jf(){return _u||(_u=1,(function(u,o){(function(r,c){u.exports=c(tn())})(Zf,(function(r){function c(g){return g&&typeof g=="object"&&"default"in g?g:{default:g}}var d=c(r),v={name:"pt",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sab".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sa".split("_"),months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(g){return g+"º"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},relativeTime:{future:"em %s",past:"há %s",s:"alguns segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"}};return d.default.locale(v,null,!0),v}))})(wr)),wr.exports}Jf();var Er={exports:{}},Xf=Er.exports,vu;function Vf(){return vu||(vu=1,(function(u,o){(function(r,c){u.exports=c(tn())})(Xf,(function(r){function c(g){return g&&typeof g=="object"&&"default"in g?g:{default:g}}var d=c(r),v={name:"nl",weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),ordinal:function(g){return"["+g+(g===1||g===8||g>=20?"ste":"de")+"]"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"een minuut",mm:"%d minuten",h:"een uur",hh:"%d uur",d:"een dag",dd:"%d dagen",M:"een maand",MM:"%d maanden",y:"een jaar",yy:"%d jaar"}};return d.default.locale(v,null,!0),v}))})(Er)),Er.exports}Vf(),fr.extend(Ff),fr.extend($f),fr.extend(xf),fr.extend(Rf);var Fn={exports:{}};var jf=Fn.exports,wu;function ec(){return wu||(wu=1,(function(u,o){(function(){var r,c="4.17.21",d=200,v="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",y="Invalid `variable` option passed into `_.template`",A="__lodash_hash_undefined__",F=500,H="__lodash_placeholder__",U=1,$=2,q=4,k=1,M=2,K=1,he=2,me=4,ne=8,Le=16,ue=32,Te=64,_e=128,Ne=256,Pe=512,ce=30,ie="...",En=800,Or=16,W=1,x=2,O=3,D=1/0,L=9007199254740991,G=17976931348623157e292,Y=NaN,V=4294967295,ve=V-1,Re=V>>>1,De=[["ary",_e],["bind",K],["bindKey",he],["curry",ne],["curryRight",Le],["flip",Pe],["partial",ue],["partialRight",Te],["rearg",Ne]],Me="[object Arguments]",pt="[object Array]",xt="[object AsyncFunction]",mt="[object Boolean]",Ve="[object Date]",We="[object DOMException]",je="[object Error]",Lt="[object Function]",rn="[object GeneratorFunction]",_t="[object Map]",Wn="[object Number]",Sc="[object Null]",Dt="[object Object]",$u="[object Promise]",Uc="[object Proxy]",Yn="[object RegExp]",vt="[object Set]",kn="[object String]",Mr="[object Symbol]",$c="[object Undefined]",Hn="[object WeakMap]",Nc="[object WeakSet]",Bn="[object ArrayBuffer]",Tn="[object DataView]",$i="[object Float32Array]",Ni="[object Float64Array]",Pi="[object Int8Array]",Ci="[object Int16Array]",Fi="[object Int32Array]",Wi="[object Uint8Array]",Yi="[object Uint8ClampedArray]",ki="[object Uint16Array]",Hi="[object Uint32Array]",Pc=/\b__p \+= '';/g,Cc=/\b(__p \+=) '' \+/g,Fc=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Nu=/&(?:amp|lt|gt|quot|#39);/g,Pu=/[&<>"']/g,Wc=RegExp(Nu.source),Yc=RegExp(Pu.source),kc=/<%-([\s\S]+?)%>/g,Hc=/<%([\s\S]+?)%>/g,Cu=/<%=([\s\S]+?)%>/g,Bc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gc=/^\w*$/,zc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bi=/[\\^$.*+?()[\]{}|]/g,qc=RegExp(Bi.source),Gi=/^\s+/,Kc=/\s/,Qc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Zc=/\{\n\/\* \[wrapped with (.+)\] \*/,Jc=/,? & /,Xc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Vc=/[()=,{}\[\]\/\s]/,jc=/\\(\\)?/g,el=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fu=/\w*$/,tl=/^[-+]0x[0-9a-f]+$/i,nl=/^0b[01]+$/i,rl=/^\[object .+?Constructor\]$/,il=/^0o[0-7]+$/i,ol=/^(?:0|[1-9]\d*)$/,ul=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,br=/($^)/,sl=/['\n\r\u2028\u2029\\]/g,xr="\\ud800-\\udfff",al="\\u0300-\\u036f",fl="\\ufe20-\\ufe2f",cl="\\u20d0-\\u20ff",Wu=al+fl+cl,Yu="\\u2700-\\u27bf",ku="a-z\\xdf-\\xf6\\xf8-\\xff",ll="\\xac\\xb1\\xd7\\xf7",hl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",dl="\\u2000-\\u206f",gl=" \\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",Hu="A-Z\\xc0-\\xd6\\xd8-\\xde",Bu="\\ufe0e\\ufe0f",Gu=ll+hl+dl+gl,zi="['’]",pl="["+xr+"]",zu="["+Gu+"]",Dr="["+Wu+"]",qu="\\d+",ml="["+Yu+"]",Ku="["+ku+"]",Qu="[^"+xr+Gu+qu+Yu+ku+Hu+"]",qi="\\ud83c[\\udffb-\\udfff]",_l="(?:"+Dr+"|"+qi+")",Zu="[^"+xr+"]",Ki="(?:\\ud83c[\\udde6-\\uddff]){2}",Qi="[\\ud800-\\udbff][\\udc00-\\udfff]",yn="["+Hu+"]",Ju="\\u200d",Xu="(?:"+Ku+"|"+Qu+")",vl="(?:"+yn+"|"+Qu+")",Vu="(?:"+zi+"(?:d|ll|m|re|s|t|ve))?",ju="(?:"+zi+"(?:D|LL|M|RE|S|T|VE))?",es=_l+"?",ts="["+Bu+"]?",wl="(?:"+Ju+"(?:"+[Zu,Ki,Qi].join("|")+")"+ts+es+")*",El="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Tl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ns=ts+es+wl,yl="(?:"+[ml,Ki,Qi].join("|")+")"+ns,Il="(?:"+[Zu+Dr+"?",Dr,Ki,Qi,pl].join("|")+")",Al=RegExp(zi,"g"),Ll=RegExp(Dr,"g"),Zi=RegExp(qi+"(?="+qi+")|"+Il+ns,"g"),Rl=RegExp([yn+"?"+Ku+"+"+Vu+"(?="+[zu,yn,"$"].join("|")+")",vl+"+"+ju+"(?="+[zu,yn+Xu,"$"].join("|")+")",yn+"?"+Xu+"+"+Vu,yn+"+"+ju,Tl,El,qu,yl].join("|"),"g"),Ol=RegExp("["+Ju+xr+Wu+Bu+"]"),Ml=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,bl=["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"],xl=-1,ge={};ge[$i]=ge[Ni]=ge[Pi]=ge[Ci]=ge[Fi]=ge[Wi]=ge[Yi]=ge[ki]=ge[Hi]=!0,ge[Me]=ge[pt]=ge[Bn]=ge[mt]=ge[Tn]=ge[Ve]=ge[je]=ge[Lt]=ge[_t]=ge[Wn]=ge[Dt]=ge[Yn]=ge[vt]=ge[kn]=ge[Hn]=!1;var de={};de[Me]=de[pt]=de[Bn]=de[Tn]=de[mt]=de[Ve]=de[$i]=de[Ni]=de[Pi]=de[Ci]=de[Fi]=de[_t]=de[Wn]=de[Dt]=de[Yn]=de[vt]=de[kn]=de[Mr]=de[Wi]=de[Yi]=de[ki]=de[Hi]=!0,de[je]=de[Lt]=de[Hn]=!1;var Dl={À:"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"},Sl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ul={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},$l={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Nl=parseFloat,Pl=parseInt,rs=typeof sr=="object"&&sr&&sr.Object===Object&&sr,Cl=typeof self=="object"&&self&&self.Object===Object&&self,Ce=rs||Cl||Function("return this")(),Ji=o&&!o.nodeType&&o,on=Ji&&!0&&u&&!u.nodeType&&u,is=on&&on.exports===Ji,Xi=is&&rs.process,st=(function(){try{var p=on&&on.require&&on.require("util").types;return p||Xi&&Xi.binding&&Xi.binding("util")}catch{}})(),os=st&&st.isArrayBuffer,us=st&&st.isDate,ss=st&&st.isMap,as=st&&st.isRegExp,fs=st&&st.isSet,cs=st&&st.isTypedArray;function et(p,w,_){switch(_.length){case 0:return p.call(w);case 1:return p.call(w,_[0]);case 2:return p.call(w,_[0],_[1]);case 3:return p.call(w,_[0],_[1],_[2])}return p.apply(w,_)}function Fl(p,w,_,b){for(var B=-1,oe=p==null?0:p.length;++B<oe;){var be=p[B];w(b,be,_(be),p)}return b}function at(p,w){for(var _=-1,b=p==null?0:p.length;++_<b&&w(p[_],_,p)!==!1;);return p}function Wl(p,w){for(var _=p==null?0:p.length;_--&&w(p[_],_,p)!==!1;);return p}function ls(p,w){for(var _=-1,b=p==null?0:p.length;++_<b;)if(!w(p[_],_,p))return!1;return!0}function Bt(p,w){for(var _=-1,b=p==null?0:p.length,B=0,oe=[];++_<b;){var be=p[_];w(be,_,p)&&(oe[B++]=be)}return oe}function Sr(p,w){var _=p==null?0:p.length;return!!_&&In(p,w,0)>-1}function Vi(p,w,_){for(var b=-1,B=p==null?0:p.length;++b<B;)if(_(w,p[b]))return!0;return!1}function pe(p,w){for(var _=-1,b=p==null?0:p.length,B=Array(b);++_<b;)B[_]=w(p[_],_,p);return B}function Gt(p,w){for(var _=-1,b=w.length,B=p.length;++_<b;)p[B+_]=w[_];return p}function ji(p,w,_,b){var B=-1,oe=p==null?0:p.length;for(b&&oe&&(_=p[++B]);++B<oe;)_=w(_,p[B],B,p);return _}function Yl(p,w,_,b){var B=p==null?0:p.length;for(b&&B&&(_=p[--B]);B--;)_=w(_,p[B],B,p);return _}function eo(p,w){for(var _=-1,b=p==null?0:p.length;++_<b;)if(w(p[_],_,p))return!0;return!1}var kl=to("length");function Hl(p){return p.split("")}function Bl(p){return p.match(Xc)||[]}function hs(p,w,_){var b;return _(p,function(B,oe,be){if(w(B,oe,be))return b=oe,!1}),b}function Ur(p,w,_,b){for(var B=p.length,oe=_+(b?1:-1);b?oe--:++oe<B;)if(w(p[oe],oe,p))return oe;return-1}function In(p,w,_){return w===w?th(p,w,_):Ur(p,ds,_)}function Gl(p,w,_,b){for(var B=_-1,oe=p.length;++B<oe;)if(b(p[B],w))return B;return-1}function ds(p){return p!==p}function gs(p,w){var _=p==null?0:p.length;return _?ro(p,w)/_:Y}function to(p){return function(w){return w==null?r:w[p]}}function no(p){return function(w){return p==null?r:p[w]}}function ps(p,w,_,b,B){return B(p,function(oe,be,le){_=b?(b=!1,oe):w(_,oe,be,le)}),_}function zl(p,w){var _=p.length;for(p.sort(w);_--;)p[_]=p[_].value;return p}function ro(p,w){for(var _,b=-1,B=p.length;++b<B;){var oe=w(p[b]);oe!==r&&(_=_===r?oe:_+oe)}return _}function io(p,w){for(var _=-1,b=Array(p);++_<p;)b[_]=w(_);return b}function ql(p,w){return pe(w,function(_){return[_,p[_]]})}function ms(p){return p&&p.slice(0,Es(p)+1).replace(Gi,"")}function tt(p){return function(w){return p(w)}}function oo(p,w){return pe(w,function(_){return p[_]})}function Gn(p,w){return p.has(w)}function _s(p,w){for(var _=-1,b=p.length;++_<b&&In(w,p[_],0)>-1;);return _}function vs(p,w){for(var _=p.length;_--&&In(w,p[_],0)>-1;);return _}function Kl(p,w){for(var _=p.length,b=0;_--;)p[_]===w&&++b;return b}var Ql=no(Dl),Zl=no(Sl);function Jl(p){return"\\"+$l[p]}function Xl(p,w){return p==null?r:p[w]}function An(p){return Ol.test(p)}function Vl(p){return Ml.test(p)}function jl(p){for(var w,_=[];!(w=p.next()).done;)_.push(w.value);return _}function uo(p){var w=-1,_=Array(p.size);return p.forEach(function(b,B){_[++w]=[B,b]}),_}function ws(p,w){return function(_){return p(w(_))}}function zt(p,w){for(var _=-1,b=p.length,B=0,oe=[];++_<b;){var be=p[_];(be===w||be===H)&&(p[_]=H,oe[B++]=_)}return oe}function $r(p){var w=-1,_=Array(p.size);return p.forEach(function(b){_[++w]=b}),_}function eh(p){var w=-1,_=Array(p.size);return p.forEach(function(b){_[++w]=[b,b]}),_}function th(p,w,_){for(var b=_-1,B=p.length;++b<B;)if(p[b]===w)return b;return-1}function nh(p,w,_){for(var b=_+1;b--;)if(p[b]===w)return b;return b}function Ln(p){return An(p)?ih(p):kl(p)}function wt(p){return An(p)?oh(p):Hl(p)}function Es(p){for(var w=p.length;w--&&Kc.test(p.charAt(w)););return w}var rh=no(Ul);function ih(p){for(var w=Zi.lastIndex=0;Zi.test(p);)++w;return w}function oh(p){return p.match(Zi)||[]}function uh(p){return p.match(Rl)||[]}var sh=(function p(w){w=w==null?Ce:Rn.defaults(Ce.Object(),w,Rn.pick(Ce,bl));var _=w.Array,b=w.Date,B=w.Error,oe=w.Function,be=w.Math,le=w.Object,so=w.RegExp,ah=w.String,ft=w.TypeError,Nr=_.prototype,fh=oe.prototype,On=le.prototype,Pr=w["__core-js_shared__"],Cr=fh.toString,fe=On.hasOwnProperty,ch=0,Ts=(function(){var e=/[^.]+$/.exec(Pr&&Pr.keys&&Pr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),Fr=On.toString,lh=Cr.call(le),hh=Ce._,dh=so("^"+Cr.call(fe).replace(Bi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wr=is?w.Buffer:r,qt=w.Symbol,Yr=w.Uint8Array,ys=Wr?Wr.allocUnsafe:r,kr=ws(le.getPrototypeOf,le),Is=le.create,As=On.propertyIsEnumerable,Hr=Nr.splice,Ls=qt?qt.isConcatSpreadable:r,zn=qt?qt.iterator:r,un=qt?qt.toStringTag:r,Br=(function(){try{var e=ln(le,"defineProperty");return e({},"",{}),e}catch{}})(),gh=w.clearTimeout!==Ce.clearTimeout&&w.clearTimeout,ph=b&&b.now!==Ce.Date.now&&b.now,mh=w.setTimeout!==Ce.setTimeout&&w.setTimeout,Gr=be.ceil,zr=be.floor,ao=le.getOwnPropertySymbols,_h=Wr?Wr.isBuffer:r,Rs=w.isFinite,vh=Nr.join,wh=ws(le.keys,le),xe=be.max,Ye=be.min,Eh=b.now,Th=w.parseInt,Os=be.random,yh=Nr.reverse,fo=ln(w,"DataView"),qn=ln(w,"Map"),co=ln(w,"Promise"),Mn=ln(w,"Set"),Kn=ln(w,"WeakMap"),Qn=ln(le,"create"),qr=Kn&&new Kn,bn={},Ih=hn(fo),Ah=hn(qn),Lh=hn(co),Rh=hn(Mn),Oh=hn(Kn),Kr=qt?qt.prototype:r,Zn=Kr?Kr.valueOf:r,Ms=Kr?Kr.toString:r;function a(e){if(Ee(e)&&!z(e)&&!(e instanceof te)){if(e instanceof ct)return e;if(fe.call(e,"__wrapped__"))return ba(e)}return new ct(e)}var xn=(function(){function e(){}return function(t){if(!we(t))return{};if(Is)return Is(t);e.prototype=t;var n=new e;return e.prototype=r,n}})();function Qr(){}function ct(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}a.templateSettings={escape:kc,evaluate:Hc,interpolate:Cu,variable:"",imports:{_:a}},a.prototype=Qr.prototype,a.prototype.constructor=a,ct.prototype=xn(Qr.prototype),ct.prototype.constructor=ct;function te(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=V,this.__views__=[]}function Mh(){var e=new te(this.__wrapped__);return e.__actions__=Ke(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ke(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ke(this.__views__),e}function bh(){if(this.__filtered__){var e=new te(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function xh(){var e=this.__wrapped__.value(),t=this.__dir__,n=z(e),i=t<0,s=n?e.length:0,f=Hd(0,s,this.__views__),l=f.start,h=f.end,m=h-l,E=i?h:l-1,T=this.__iteratees__,I=T.length,R=0,S=Ye(m,this.__takeCount__);if(!n||!i&&s==m&&S==m)return Vs(e,this.__actions__);var P=[];e:for(;m--&&R<S;){E+=t;for(var J=-1,C=e[E];++J<I;){var j=T[J],re=j.iteratee,it=j.type,ze=re(C);if(it==x)C=ze;else if(!ze){if(it==W)continue e;break e}}P[R++]=C}return P}te.prototype=xn(Qr.prototype),te.prototype.constructor=te;function sn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Dh(){this.__data__=Qn?Qn(null):{},this.size=0}function Sh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Uh(e){var t=this.__data__;if(Qn){var n=t[e];return n===A?r:n}return fe.call(t,e)?t[e]:r}function $h(e){var t=this.__data__;return Qn?t[e]!==r:fe.call(t,e)}function Nh(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Qn&&t===r?A:t,this}sn.prototype.clear=Dh,sn.prototype.delete=Sh,sn.prototype.get=Uh,sn.prototype.has=$h,sn.prototype.set=Nh;function St(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Ph(){this.__data__=[],this.size=0}function Ch(e){var t=this.__data__,n=Zr(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():Hr.call(t,n,1),--this.size,!0}function Fh(e){var t=this.__data__,n=Zr(t,e);return n<0?r:t[n][1]}function Wh(e){return Zr(this.__data__,e)>-1}function Yh(e,t){var n=this.__data__,i=Zr(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}St.prototype.clear=Ph,St.prototype.delete=Ch,St.prototype.get=Fh,St.prototype.has=Wh,St.prototype.set=Yh;function Ut(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function kh(){this.size=0,this.__data__={hash:new sn,map:new(qn||St),string:new sn}}function Hh(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t}function Bh(e){return si(this,e).get(e)}function Gh(e){return si(this,e).has(e)}function zh(e,t){var n=si(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}Ut.prototype.clear=kh,Ut.prototype.delete=Hh,Ut.prototype.get=Bh,Ut.prototype.has=Gh,Ut.prototype.set=zh;function an(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ut;++t<n;)this.add(e[t])}function qh(e){return this.__data__.set(e,A),this}function Kh(e){return this.__data__.has(e)}an.prototype.add=an.prototype.push=qh,an.prototype.has=Kh;function Et(e){var t=this.__data__=new St(e);this.size=t.size}function Qh(){this.__data__=new St,this.size=0}function Zh(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Jh(e){return this.__data__.get(e)}function Xh(e){return this.__data__.has(e)}function Vh(e,t){var n=this.__data__;if(n instanceof St){var i=n.__data__;if(!qn||i.length<d-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ut(i)}return n.set(e,t),this.size=n.size,this}Et.prototype.clear=Qh,Et.prototype.delete=Zh,Et.prototype.get=Jh,Et.prototype.has=Xh,Et.prototype.set=Vh;function bs(e,t){var n=z(e),i=!n&&dn(e),s=!n&&!i&&Xt(e),f=!n&&!i&&!s&&$n(e),l=n||i||s||f,h=l?io(e.length,ah):[],m=h.length;for(var E in e)(t||fe.call(e,E))&&!(l&&(E=="length"||s&&(E=="offset"||E=="parent")||f&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||Ct(E,m)))&&h.push(E);return h}function xs(e){var t=e.length;return t?e[yo(0,t-1)]:r}function jh(e,t){return ai(Ke(e),fn(t,0,e.length))}function ed(e){return ai(Ke(e))}function lo(e,t,n){(n!==r&&!Tt(e[t],n)||n===r&&!(t in e))&&$t(e,t,n)}function Jn(e,t,n){var i=e[t];(!(fe.call(e,t)&&Tt(i,n))||n===r&&!(t in e))&&$t(e,t,n)}function Zr(e,t){for(var n=e.length;n--;)if(Tt(e[n][0],t))return n;return-1}function td(e,t,n,i){return Kt(e,function(s,f,l){t(i,s,n(s),l)}),i}function Ds(e,t){return e&&Ot(t,Se(t),e)}function nd(e,t){return e&&Ot(t,Ze(t),e)}function $t(e,t,n){t=="__proto__"&&Br?Br(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ho(e,t){for(var n=-1,i=t.length,s=_(i),f=e==null;++n<i;)s[n]=f?r:Ko(e,t[n]);return s}function fn(e,t,n){return e===e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function lt(e,t,n,i,s,f){var l,h=t&U,m=t&$,E=t&q;if(n&&(l=s?n(e,i,s,f):n(e)),l!==r)return l;if(!we(e))return e;var T=z(e);if(T){if(l=Gd(e),!h)return Ke(e,l)}else{var I=ke(e),R=I==Lt||I==rn;if(Xt(e))return ta(e,h);if(I==Dt||I==Me||R&&!s){if(l=m||R?{}:Ea(e),!h)return m?Ud(e,nd(l,e)):Sd(e,Ds(l,e))}else{if(!de[I])return s?e:{};l=zd(e,I,h)}}f||(f=new Et);var S=f.get(e);if(S)return S;f.set(e,l),Za(e)?e.forEach(function(C){l.add(lt(C,t,n,C,e,f))}):Ka(e)&&e.forEach(function(C,j){l.set(j,lt(C,t,n,j,e,f))});var P=E?m?Uo:So:m?Ze:Se,J=T?r:P(e);return at(J||e,function(C,j){J&&(j=C,C=e[j]),Jn(l,j,lt(C,t,n,j,e,f))}),l}function rd(e){var t=Se(e);return function(n){return Ss(n,e,t)}}function Ss(e,t,n){var i=n.length;if(e==null)return!i;for(e=le(e);i--;){var s=n[i],f=t[s],l=e[s];if(l===r&&!(s in e)||!f(l))return!1}return!0}function Us(e,t,n){if(typeof e!="function")throw new ft(g);return rr(function(){e.apply(r,n)},t)}function Xn(e,t,n,i){var s=-1,f=Sr,l=!0,h=e.length,m=[],E=t.length;if(!h)return m;n&&(t=pe(t,tt(n))),i?(f=Vi,l=!1):t.length>=d&&(f=Gn,l=!1,t=new an(t));e:for(;++s<h;){var T=e[s],I=n==null?T:n(T);if(T=i||T!==0?T:0,l&&I===I){for(var R=E;R--;)if(t[R]===I)continue e;m.push(T)}else f(t,I,i)||m.push(T)}return m}var Kt=ua(Rt),$s=ua(po,!0);function id(e,t){var n=!0;return Kt(e,function(i,s,f){return n=!!t(i,s,f),n}),n}function Jr(e,t,n){for(var i=-1,s=e.length;++i<s;){var f=e[i],l=t(f);if(l!=null&&(h===r?l===l&&!rt(l):n(l,h)))var h=l,m=f}return m}function od(e,t,n,i){var s=e.length;for(n=Q(n),n<0&&(n=-n>s?0:s+n),i=i===r||i>s?s:Q(i),i<0&&(i+=s),i=n>i?0:Xa(i);n<i;)e[n++]=t;return e}function Ns(e,t){var n=[];return Kt(e,function(i,s,f){t(i,s,f)&&n.push(i)}),n}function Fe(e,t,n,i,s){var f=-1,l=e.length;for(n||(n=Kd),s||(s=[]);++f<l;){var h=e[f];t>0&&n(h)?t>1?Fe(h,t-1,n,i,s):Gt(s,h):i||(s[s.length]=h)}return s}var go=sa(),Ps=sa(!0);function Rt(e,t){return e&&go(e,t,Se)}function po(e,t){return e&&Ps(e,t,Se)}function Xr(e,t){return Bt(t,function(n){return Ft(e[n])})}function cn(e,t){t=Zt(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[Mt(t[n++])];return n&&n==i?e:r}function Cs(e,t,n){var i=t(e);return z(e)?i:Gt(i,n(e))}function Be(e){return e==null?e===r?$c:Sc:un&&un in le(e)?kd(e):eg(e)}function mo(e,t){return e>t}function ud(e,t){return e!=null&&fe.call(e,t)}function sd(e,t){return e!=null&&t in le(e)}function ad(e,t,n){return e>=Ye(t,n)&&e<xe(t,n)}function _o(e,t,n){for(var i=n?Vi:Sr,s=e[0].length,f=e.length,l=f,h=_(f),m=1/0,E=[];l--;){var T=e[l];l&&t&&(T=pe(T,tt(t))),m=Ye(T.length,m),h[l]=!n&&(t||s>=120&&T.length>=120)?new an(l&&T):r}T=e[0];var I=-1,R=h[0];e:for(;++I<s&&E.length<m;){var S=T[I],P=t?t(S):S;if(S=n||S!==0?S:0,!(R?Gn(R,P):i(E,P,n))){for(l=f;--l;){var J=h[l];if(!(J?Gn(J,P):i(e[l],P,n)))continue e}R&&R.push(P),E.push(S)}}return E}function fd(e,t,n,i){return Rt(e,function(s,f,l){t(i,n(s),f,l)}),i}function Vn(e,t,n){t=Zt(t,e),e=Aa(e,t);var i=e==null?e:e[Mt(dt(t))];return i==null?r:et(i,e,n)}function Fs(e){return Ee(e)&&Be(e)==Me}function cd(e){return Ee(e)&&Be(e)==Bn}function ld(e){return Ee(e)&&Be(e)==Ve}function jn(e,t,n,i,s){return e===t?!0:e==null||t==null||!Ee(e)&&!Ee(t)?e!==e&&t!==t:hd(e,t,n,i,jn,s)}function hd(e,t,n,i,s,f){var l=z(e),h=z(t),m=l?pt:ke(e),E=h?pt:ke(t);m=m==Me?Dt:m,E=E==Me?Dt:E;var T=m==Dt,I=E==Dt,R=m==E;if(R&&Xt(e)){if(!Xt(t))return!1;l=!0,T=!1}if(R&&!T)return f||(f=new Et),l||$n(e)?_a(e,t,n,i,s,f):Wd(e,t,m,n,i,s,f);if(!(n&k)){var S=T&&fe.call(e,"__wrapped__"),P=I&&fe.call(t,"__wrapped__");if(S||P){var J=S?e.value():e,C=P?t.value():t;return f||(f=new Et),s(J,C,n,i,f)}}return R?(f||(f=new Et),Yd(e,t,n,i,s,f)):!1}function dd(e){return Ee(e)&&ke(e)==_t}function vo(e,t,n,i){var s=n.length,f=s,l=!i;if(e==null)return!f;for(e=le(e);s--;){var h=n[s];if(l&&h[2]?h[1]!==e[h[0]]:!(h[0]in e))return!1}for(;++s<f;){h=n[s];var m=h[0],E=e[m],T=h[1];if(l&&h[2]){if(E===r&&!(m in e))return!1}else{var I=new Et;if(i)var R=i(E,T,m,e,t,I);if(!(R===r?jn(T,E,k|M,i,I):R))return!1}}return!0}function Ws(e){if(!we(e)||Zd(e))return!1;var t=Ft(e)?dh:rl;return t.test(hn(e))}function gd(e){return Ee(e)&&Be(e)==Yn}function pd(e){return Ee(e)&&ke(e)==vt}function md(e){return Ee(e)&&gi(e.length)&&!!ge[Be(e)]}function Ys(e){return typeof e=="function"?e:e==null?Je:typeof e=="object"?z(e)?Bs(e[0],e[1]):Hs(e):ff(e)}function wo(e){if(!nr(e))return wh(e);var t=[];for(var n in le(e))fe.call(e,n)&&n!="constructor"&&t.push(n);return t}function _d(e){if(!we(e))return jd(e);var t=nr(e),n=[];for(var i in e)i=="constructor"&&(t||!fe.call(e,i))||n.push(i);return n}function Eo(e,t){return e<t}function ks(e,t){var n=-1,i=Qe(e)?_(e.length):[];return Kt(e,function(s,f,l){i[++n]=t(s,f,l)}),i}function Hs(e){var t=No(e);return t.length==1&&t[0][2]?ya(t[0][0],t[0][1]):function(n){return n===e||vo(n,e,t)}}function Bs(e,t){return Co(e)&&Ta(t)?ya(Mt(e),t):function(n){var i=Ko(n,e);return i===r&&i===t?Qo(n,e):jn(t,i,k|M)}}function Vr(e,t,n,i,s){e!==t&&go(t,function(f,l){if(s||(s=new Et),we(f))vd(e,t,l,n,Vr,i,s);else{var h=i?i(Wo(e,l),f,l+"",e,t,s):r;h===r&&(h=f),lo(e,l,h)}},Ze)}function vd(e,t,n,i,s,f,l){var h=Wo(e,n),m=Wo(t,n),E=l.get(m);if(E){lo(e,n,E);return}var T=f?f(h,m,n+"",e,t,l):r,I=T===r;if(I){var R=z(m),S=!R&&Xt(m),P=!R&&!S&&$n(m);T=m,R||S||P?z(h)?T=h:ye(h)?T=Ke(h):S?(I=!1,T=ta(m,!0)):P?(I=!1,T=na(m,!0)):T=[]:ir(m)||dn(m)?(T=h,dn(h)?T=Va(h):(!we(h)||Ft(h))&&(T=Ea(m))):I=!1}I&&(l.set(m,T),s(T,m,i,f,l),l.delete(m)),lo(e,n,T)}function Gs(e,t){var n=e.length;if(n)return t+=t<0?n:0,Ct(t,n)?e[t]:r}function zs(e,t,n){t.length?t=pe(t,function(f){return z(f)?function(l){return cn(l,f.length===1?f[0]:f)}:f}):t=[Je];var i=-1;t=pe(t,tt(N()));var s=ks(e,function(f,l,h){var m=pe(t,function(E){return E(f)});return{criteria:m,index:++i,value:f}});return zl(s,function(f,l){return Dd(f,l,n)})}function wd(e,t){return qs(e,t,function(n,i){return Qo(e,i)})}function qs(e,t,n){for(var i=-1,s=t.length,f={};++i<s;){var l=t[i],h=cn(e,l);n(h,l)&&er(f,Zt(l,e),h)}return f}function Ed(e){return function(t){return cn(t,e)}}function To(e,t,n,i){var s=i?Gl:In,f=-1,l=t.length,h=e;for(e===t&&(t=Ke(t)),n&&(h=pe(e,tt(n)));++f<l;)for(var m=0,E=t[f],T=n?n(E):E;(m=s(h,T,m,i))>-1;)h!==e&&Hr.call(h,m,1),Hr.call(e,m,1);return e}function Ks(e,t){for(var n=e?t.length:0,i=n-1;n--;){var s=t[n];if(n==i||s!==f){var f=s;Ct(s)?Hr.call(e,s,1):Lo(e,s)}}return e}function yo(e,t){return e+zr(Os()*(t-e+1))}function Td(e,t,n,i){for(var s=-1,f=xe(Gr((t-e)/(n||1)),0),l=_(f);f--;)l[i?f:++s]=e,e+=n;return l}function Io(e,t){var n="";if(!e||t<1||t>L)return n;do t%2&&(n+=e),t=zr(t/2),t&&(e+=e);while(t);return n}function X(e,t){return Yo(Ia(e,t,Je),e+"")}function yd(e){return xs(Nn(e))}function Id(e,t){var n=Nn(e);return ai(n,fn(t,0,n.length))}function er(e,t,n,i){if(!we(e))return e;t=Zt(t,e);for(var s=-1,f=t.length,l=f-1,h=e;h!=null&&++s<f;){var m=Mt(t[s]),E=n;if(m==="__proto__"||m==="constructor"||m==="prototype")return e;if(s!=l){var T=h[m];E=i?i(T,m,h):r,E===r&&(E=we(T)?T:Ct(t[s+1])?[]:{})}Jn(h,m,E),h=h[m]}return e}var Qs=qr?function(e,t){return qr.set(e,t),e}:Je,Ad=Br?function(e,t){return Br(e,"toString",{configurable:!0,enumerable:!1,value:Jo(t),writable:!0})}:Je;function Ld(e){return ai(Nn(e))}function ht(e,t,n){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var f=_(s);++i<s;)f[i]=e[i+t];return f}function Rd(e,t){var n;return Kt(e,function(i,s,f){return n=t(i,s,f),!n}),!!n}function jr(e,t,n){var i=0,s=e==null?i:e.length;if(typeof t=="number"&&t===t&&s<=Re){for(;i<s;){var f=i+s>>>1,l=e[f];l!==null&&!rt(l)&&(n?l<=t:l<t)?i=f+1:s=f}return s}return Ao(e,t,Je,n)}function Ao(e,t,n,i){var s=0,f=e==null?0:e.length;if(f===0)return 0;t=n(t);for(var l=t!==t,h=t===null,m=rt(t),E=t===r;s<f;){var T=zr((s+f)/2),I=n(e[T]),R=I!==r,S=I===null,P=I===I,J=rt(I);if(l)var C=i||P;else E?C=P&&(i||R):h?C=P&&R&&(i||!S):m?C=P&&R&&!S&&(i||!J):S||J?C=!1:C=i?I<=t:I<t;C?s=T+1:f=T}return Ye(f,ve)}function Zs(e,t){for(var n=-1,i=e.length,s=0,f=[];++n<i;){var l=e[n],h=t?t(l):l;if(!n||!Tt(h,m)){var m=h;f[s++]=l===0?0:l}}return f}function Js(e){return typeof e=="number"?e:rt(e)?Y:+e}function nt(e){if(typeof e=="string")return e;if(z(e))return pe(e,nt)+"";if(rt(e))return Ms?Ms.call(e):"";var t=e+"";return t=="0"&&1/e==-D?"-0":t}function Qt(e,t,n){var i=-1,s=Sr,f=e.length,l=!0,h=[],m=h;if(n)l=!1,s=Vi;else if(f>=d){var E=t?null:Cd(e);if(E)return $r(E);l=!1,s=Gn,m=new an}else m=t?[]:h;e:for(;++i<f;){var T=e[i],I=t?t(T):T;if(T=n||T!==0?T:0,l&&I===I){for(var R=m.length;R--;)if(m[R]===I)continue e;t&&m.push(I),h.push(T)}else s(m,I,n)||(m!==h&&m.push(I),h.push(T))}return h}function Lo(e,t){return t=Zt(t,e),e=Aa(e,t),e==null||delete e[Mt(dt(t))]}function Xs(e,t,n,i){return er(e,t,n(cn(e,t)),i)}function ei(e,t,n,i){for(var s=e.length,f=i?s:-1;(i?f--:++f<s)&&t(e[f],f,e););return n?ht(e,i?0:f,i?f+1:s):ht(e,i?f+1:0,i?s:f)}function Vs(e,t){var n=e;return n instanceof te&&(n=n.value()),ji(t,function(i,s){return s.func.apply(s.thisArg,Gt([i],s.args))},n)}function Ro(e,t,n){var i=e.length;if(i<2)return i?Qt(e[0]):[];for(var s=-1,f=_(i);++s<i;)for(var l=e[s],h=-1;++h<i;)h!=s&&(f[s]=Xn(f[s]||l,e[h],t,n));return Qt(Fe(f,1),t,n)}function js(e,t,n){for(var i=-1,s=e.length,f=t.length,l={};++i<s;){var h=i<f?t[i]:r;n(l,e[i],h)}return l}function Oo(e){return ye(e)?e:[]}function Mo(e){return typeof e=="function"?e:Je}function Zt(e,t){return z(e)?e:Co(e,t)?[e]:Ma(se(e))}var Od=X;function Jt(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:ht(e,t,n)}var ea=gh||function(e){return Ce.clearTimeout(e)};function ta(e,t){if(t)return e.slice();var n=e.length,i=ys?ys(n):new e.constructor(n);return e.copy(i),i}function bo(e){var t=new e.constructor(e.byteLength);return new Yr(t).set(new Yr(e)),t}function Md(e,t){var n=t?bo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function bd(e){var t=new e.constructor(e.source,Fu.exec(e));return t.lastIndex=e.lastIndex,t}function xd(e){return Zn?le(Zn.call(e)):{}}function na(e,t){var n=t?bo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ra(e,t){if(e!==t){var n=e!==r,i=e===null,s=e===e,f=rt(e),l=t!==r,h=t===null,m=t===t,E=rt(t);if(!h&&!E&&!f&&e>t||f&&l&&m&&!h&&!E||i&&l&&m||!n&&m||!s)return 1;if(!i&&!f&&!E&&e<t||E&&n&&s&&!i&&!f||h&&n&&s||!l&&s||!m)return-1}return 0}function Dd(e,t,n){for(var i=-1,s=e.criteria,f=t.criteria,l=s.length,h=n.length;++i<l;){var m=ra(s[i],f[i]);if(m){if(i>=h)return m;var E=n[i];return m*(E=="desc"?-1:1)}}return e.index-t.index}function ia(e,t,n,i){for(var s=-1,f=e.length,l=n.length,h=-1,m=t.length,E=xe(f-l,0),T=_(m+E),I=!i;++h<m;)T[h]=t[h];for(;++s<l;)(I||s<f)&&(T[n[s]]=e[s]);for(;E--;)T[h++]=e[s++];return T}function oa(e,t,n,i){for(var s=-1,f=e.length,l=-1,h=n.length,m=-1,E=t.length,T=xe(f-h,0),I=_(T+E),R=!i;++s<T;)I[s]=e[s];for(var S=s;++m<E;)I[S+m]=t[m];for(;++l<h;)(R||s<f)&&(I[S+n[l]]=e[s++]);return I}function Ke(e,t){var n=-1,i=e.length;for(t||(t=_(i));++n<i;)t[n]=e[n];return t}function Ot(e,t,n,i){var s=!n;n||(n={});for(var f=-1,l=t.length;++f<l;){var h=t[f],m=i?i(n[h],e[h],h,n,e):r;m===r&&(m=e[h]),s?$t(n,h,m):Jn(n,h,m)}return n}function Sd(e,t){return Ot(e,Po(e),t)}function Ud(e,t){return Ot(e,va(e),t)}function ti(e,t){return function(n,i){var s=z(n)?Fl:td,f=t?t():{};return s(n,e,N(i,2),f)}}function Dn(e){return X(function(t,n){var i=-1,s=n.length,f=s>1?n[s-1]:r,l=s>2?n[2]:r;for(f=e.length>3&&typeof f=="function"?(s--,f):r,l&&Ge(n[0],n[1],l)&&(f=s<3?r:f,s=1),t=le(t);++i<s;){var h=n[i];h&&e(t,h,i,f)}return t})}function ua(e,t){return function(n,i){if(n==null)return n;if(!Qe(n))return e(n,i);for(var s=n.length,f=t?s:-1,l=le(n);(t?f--:++f<s)&&i(l[f],f,l)!==!1;);return n}}function sa(e){return function(t,n,i){for(var s=-1,f=le(t),l=i(t),h=l.length;h--;){var m=l[e?h:++s];if(n(f[m],m,f)===!1)break}return t}}function $d(e,t,n){var i=t&K,s=tr(e);function f(){var l=this&&this!==Ce&&this instanceof f?s:e;return l.apply(i?n:this,arguments)}return f}function aa(e){return function(t){t=se(t);var n=An(t)?wt(t):r,i=n?n[0]:t.charAt(0),s=n?Jt(n,1).join(""):t.slice(1);return i[e]()+s}}function Sn(e){return function(t){return ji(sf(uf(t).replace(Al,"")),e,"")}}function tr(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=xn(e.prototype),i=e.apply(n,t);return we(i)?i:n}}function Nd(e,t,n){var i=tr(e);function s(){for(var f=arguments.length,l=_(f),h=f,m=Un(s);h--;)l[h]=arguments[h];var E=f<3&&l[0]!==m&&l[f-1]!==m?[]:zt(l,m);if(f-=E.length,f<n)return da(e,t,ni,s.placeholder,r,l,E,r,r,n-f);var T=this&&this!==Ce&&this instanceof s?i:e;return et(T,this,l)}return s}function fa(e){return function(t,n,i){var s=le(t);if(!Qe(t)){var f=N(n,3);t=Se(t),n=function(h){return f(s[h],h,s)}}var l=e(t,n,i);return l>-1?s[f?t[l]:l]:r}}function ca(e){return Pt(function(t){var n=t.length,i=n,s=ct.prototype.thru;for(e&&t.reverse();i--;){var f=t[i];if(typeof f!="function")throw new ft(g);if(s&&!l&&ui(f)=="wrapper")var l=new ct([],!0)}for(i=l?i:n;++i<n;){f=t[i];var h=ui(f),m=h=="wrapper"?$o(f):r;m&&Fo(m[0])&&m[1]==(_e|ne|ue|Ne)&&!m[4].length&&m[9]==1?l=l[ui(m[0])].apply(l,m[3]):l=f.length==1&&Fo(f)?l[h]():l.thru(f)}return function(){var E=arguments,T=E[0];if(l&&E.length==1&&z(T))return l.plant(T).value();for(var I=0,R=n?t[I].apply(this,E):T;++I<n;)R=t[I].call(this,R);return R}})}function ni(e,t,n,i,s,f,l,h,m,E){var T=t&_e,I=t&K,R=t&he,S=t&(ne|Le),P=t&Pe,J=R?r:tr(e);function C(){for(var j=arguments.length,re=_(j),it=j;it--;)re[it]=arguments[it];if(S)var ze=Un(C),ot=Kl(re,ze);if(i&&(re=ia(re,i,s,S)),f&&(re=oa(re,f,l,S)),j-=ot,S&&j<E){var Ie=zt(re,ze);return da(e,t,ni,C.placeholder,n,re,Ie,h,m,E-j)}var yt=I?n:this,Yt=R?yt[e]:e;return j=re.length,h?re=tg(re,h):P&&j>1&&re.reverse(),T&&m<j&&(re.length=m),this&&this!==Ce&&this instanceof C&&(Yt=J||tr(Yt)),Yt.apply(yt,re)}return C}function la(e,t){return function(n,i){return fd(n,e,t(i),{})}}function ri(e,t){return function(n,i){var s;if(n===r&&i===r)return t;if(n!==r&&(s=n),i!==r){if(s===r)return i;typeof n=="string"||typeof i=="string"?(n=nt(n),i=nt(i)):(n=Js(n),i=Js(i)),s=e(n,i)}return s}}function xo(e){return Pt(function(t){return t=pe(t,tt(N())),X(function(n){var i=this;return e(t,function(s){return et(s,i,n)})})})}function ii(e,t){t=t===r?" ":nt(t);var n=t.length;if(n<2)return n?Io(t,e):t;var i=Io(t,Gr(e/Ln(t)));return An(t)?Jt(wt(i),0,e).join(""):i.slice(0,e)}function Pd(e,t,n,i){var s=t&K,f=tr(e);function l(){for(var h=-1,m=arguments.length,E=-1,T=i.length,I=_(T+m),R=this&&this!==Ce&&this instanceof l?f:e;++E<T;)I[E]=i[E];for(;m--;)I[E++]=arguments[++h];return et(R,s?n:this,I)}return l}function ha(e){return function(t,n,i){return i&&typeof i!="number"&&Ge(t,n,i)&&(n=i=r),t=Wt(t),n===r?(n=t,t=0):n=Wt(n),i=i===r?t<n?1:-1:Wt(i),Td(t,n,i,e)}}function oi(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=gt(t),n=gt(n)),e(t,n)}}function da(e,t,n,i,s,f,l,h,m,E){var T=t&ne,I=T?l:r,R=T?r:l,S=T?f:r,P=T?r:f;t|=T?ue:Te,t&=~(T?Te:ue),t&me||(t&=-4);var J=[e,t,s,S,I,P,R,h,m,E],C=n.apply(r,J);return Fo(e)&&La(C,J),C.placeholder=i,Ra(C,e,t)}function Do(e){var t=be[e];return function(n,i){if(n=gt(n),i=i==null?0:Ye(Q(i),292),i&&Rs(n)){var s=(se(n)+"e").split("e"),f=t(s[0]+"e"+(+s[1]+i));return s=(se(f)+"e").split("e"),+(s[0]+"e"+(+s[1]-i))}return t(n)}}var Cd=Mn&&1/$r(new Mn([,-0]))[1]==D?function(e){return new Mn(e)}:jo;function ga(e){return function(t){var n=ke(t);return n==_t?uo(t):n==vt?eh(t):ql(t,e(t))}}function Nt(e,t,n,i,s,f,l,h){var m=t&he;if(!m&&typeof e!="function")throw new ft(g);var E=i?i.length:0;if(E||(t&=-97,i=s=r),l=l===r?l:xe(Q(l),0),h=h===r?h:Q(h),E-=s?s.length:0,t&Te){var T=i,I=s;i=s=r}var R=m?r:$o(e),S=[e,t,n,i,s,T,I,f,l,h];if(R&&Vd(S,R),e=S[0],t=S[1],n=S[2],i=S[3],s=S[4],h=S[9]=S[9]===r?m?0:e.length:xe(S[9]-E,0),!h&&t&(ne|Le)&&(t&=-25),!t||t==K)var P=$d(e,t,n);else t==ne||t==Le?P=Nd(e,t,h):(t==ue||t==(K|ue))&&!s.length?P=Pd(e,t,n,i):P=ni.apply(r,S);var J=R?Qs:La;return Ra(J(P,S),e,t)}function pa(e,t,n,i){return e===r||Tt(e,On[n])&&!fe.call(i,n)?t:e}function ma(e,t,n,i,s,f){return we(e)&&we(t)&&(f.set(t,e),Vr(e,t,r,ma,f),f.delete(t)),e}function Fd(e){return ir(e)?r:e}function _a(e,t,n,i,s,f){var l=n&k,h=e.length,m=t.length;if(h!=m&&!(l&&m>h))return!1;var E=f.get(e),T=f.get(t);if(E&&T)return E==t&&T==e;var I=-1,R=!0,S=n&M?new an:r;for(f.set(e,t),f.set(t,e);++I<h;){var P=e[I],J=t[I];if(i)var C=l?i(J,P,I,t,e,f):i(P,J,I,e,t,f);if(C!==r){if(C)continue;R=!1;break}if(S){if(!eo(t,function(j,re){if(!Gn(S,re)&&(P===j||s(P,j,n,i,f)))return S.push(re)})){R=!1;break}}else if(!(P===J||s(P,J,n,i,f))){R=!1;break}}return f.delete(e),f.delete(t),R}function Wd(e,t,n,i,s,f,l){switch(n){case Tn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Bn:return!(e.byteLength!=t.byteLength||!f(new Yr(e),new Yr(t)));case mt:case Ve:case Wn:return Tt(+e,+t);case je:return e.name==t.name&&e.message==t.message;case Yn:case kn:return e==t+"";case _t:var h=uo;case vt:var m=i&k;if(h||(h=$r),e.size!=t.size&&!m)return!1;var E=l.get(e);if(E)return E==t;i|=M,l.set(e,t);var T=_a(h(e),h(t),i,s,f,l);return l.delete(e),T;case Mr:if(Zn)return Zn.call(e)==Zn.call(t)}return!1}function Yd(e,t,n,i,s,f){var l=n&k,h=So(e),m=h.length,E=So(t),T=E.length;if(m!=T&&!l)return!1;for(var I=m;I--;){var R=h[I];if(!(l?R in t:fe.call(t,R)))return!1}var S=f.get(e),P=f.get(t);if(S&&P)return S==t&&P==e;var J=!0;f.set(e,t),f.set(t,e);for(var C=l;++I<m;){R=h[I];var j=e[R],re=t[R];if(i)var it=l?i(re,j,R,t,e,f):i(j,re,R,e,t,f);if(!(it===r?j===re||s(j,re,n,i,f):it)){J=!1;break}C||(C=R=="constructor")}if(J&&!C){var ze=e.constructor,ot=t.constructor;ze!=ot&&"constructor"in e&&"constructor"in t&&!(typeof ze=="function"&&ze instanceof ze&&typeof ot=="function"&&ot instanceof ot)&&(J=!1)}return f.delete(e),f.delete(t),J}function Pt(e){return Yo(Ia(e,r,Sa),e+"")}function So(e){return Cs(e,Se,Po)}function Uo(e){return Cs(e,Ze,va)}var $o=qr?function(e){return qr.get(e)}:jo;function ui(e){for(var t=e.name+"",n=bn[t],i=fe.call(bn,t)?n.length:0;i--;){var s=n[i],f=s.func;if(f==null||f==e)return s.name}return t}function Un(e){var t=fe.call(a,"placeholder")?a:e;return t.placeholder}function N(){var e=a.iteratee||Xo;return e=e===Xo?Ys:e,arguments.length?e(arguments[0],arguments[1]):e}function si(e,t){var n=e.__data__;return Qd(t)?n[typeof t=="string"?"string":"hash"]:n.map}function No(e){for(var t=Se(e),n=t.length;n--;){var i=t[n],s=e[i];t[n]=[i,s,Ta(s)]}return t}function ln(e,t){var n=Xl(e,t);return Ws(n)?n:r}function kd(e){var t=fe.call(e,un),n=e[un];try{e[un]=r;var i=!0}catch{}var s=Fr.call(e);return i&&(t?e[un]=n:delete e[un]),s}var Po=ao?function(e){return e==null?[]:(e=le(e),Bt(ao(e),function(t){return As.call(e,t)}))}:eu,va=ao?function(e){for(var t=[];e;)Gt(t,Po(e)),e=kr(e);return t}:eu,ke=Be;(fo&&ke(new fo(new ArrayBuffer(1)))!=Tn||qn&&ke(new qn)!=_t||co&&ke(co.resolve())!=$u||Mn&&ke(new Mn)!=vt||Kn&&ke(new Kn)!=Hn)&&(ke=function(e){var t=Be(e),n=t==Dt?e.constructor:r,i=n?hn(n):"";if(i)switch(i){case Ih:return Tn;case Ah:return _t;case Lh:return $u;case Rh:return vt;case Oh:return Hn}return t});function Hd(e,t,n){for(var i=-1,s=n.length;++i<s;){var f=n[i],l=f.size;switch(f.type){case"drop":e+=l;break;case"dropRight":t-=l;break;case"take":t=Ye(t,e+l);break;case"takeRight":e=xe(e,t-l);break}}return{start:e,end:t}}function Bd(e){var t=e.match(Zc);return t?t[1].split(Jc):[]}function wa(e,t,n){t=Zt(t,e);for(var i=-1,s=t.length,f=!1;++i<s;){var l=Mt(t[i]);if(!(f=e!=null&&n(e,l)))break;e=e[l]}return f||++i!=s?f:(s=e==null?0:e.length,!!s&&gi(s)&&Ct(l,s)&&(z(e)||dn(e)))}function Gd(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&fe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Ea(e){return typeof e.constructor=="function"&&!nr(e)?xn(kr(e)):{}}function zd(e,t,n){var i=e.constructor;switch(t){case Bn:return bo(e);case mt:case Ve:return new i(+e);case Tn:return Md(e,n);case $i:case Ni:case Pi:case Ci:case Fi:case Wi:case Yi:case ki:case Hi:return na(e,n);case _t:return new i;case Wn:case kn:return new i(e);case Yn:return bd(e);case vt:return new i;case Mr:return xd(e)}}function qd(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(Qc,`{
15
+ /* [wrapped with `+t+`] */
16
+ `)}function Kd(e){return z(e)||dn(e)||!!(Ls&&e&&e[Ls])}function Ct(e,t){var n=typeof e;return t=t??L,!!t&&(n=="number"||n!="symbol"&&ol.test(e))&&e>-1&&e%1==0&&e<t}function Ge(e,t,n){if(!we(n))return!1;var i=typeof t;return(i=="number"?Qe(n)&&Ct(t,n.length):i=="string"&&t in n)?Tt(n[t],e):!1}function Co(e,t){if(z(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||rt(e)?!0:Gc.test(e)||!Bc.test(e)||t!=null&&e in le(t)}function Qd(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Fo(e){var t=ui(e),n=a[t];if(typeof n!="function"||!(t in te.prototype))return!1;if(e===n)return!0;var i=$o(n);return!!i&&e===i[0]}function Zd(e){return!!Ts&&Ts in e}var Jd=Pr?Ft:tu;function nr(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||On;return e===n}function Ta(e){return e===e&&!we(e)}function ya(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==r||e in le(n))}}function Xd(e){var t=hi(e,function(i){return n.size===F&&n.clear(),i}),n=t.cache;return t}function Vd(e,t){var n=e[1],i=t[1],s=n|i,f=s<(K|he|_e),l=i==_e&&n==ne||i==_e&&n==Ne&&e[7].length<=t[8]||i==(_e|Ne)&&t[7].length<=t[8]&&n==ne;if(!(f||l))return e;i&K&&(e[2]=t[2],s|=n&K?0:me);var h=t[3];if(h){var m=e[3];e[3]=m?ia(m,h,t[4]):h,e[4]=m?zt(e[3],H):t[4]}return h=t[5],h&&(m=e[5],e[5]=m?oa(m,h,t[6]):h,e[6]=m?zt(e[5],H):t[6]),h=t[7],h&&(e[7]=h),i&_e&&(e[8]=e[8]==null?t[8]:Ye(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=s,e}function jd(e){var t=[];if(e!=null)for(var n in le(e))t.push(n);return t}function eg(e){return Fr.call(e)}function Ia(e,t,n){return t=xe(t===r?e.length-1:t,0),function(){for(var i=arguments,s=-1,f=xe(i.length-t,0),l=_(f);++s<f;)l[s]=i[t+s];s=-1;for(var h=_(t+1);++s<t;)h[s]=i[s];return h[t]=n(l),et(e,this,h)}}function Aa(e,t){return t.length<2?e:cn(e,ht(t,0,-1))}function tg(e,t){for(var n=e.length,i=Ye(t.length,n),s=Ke(e);i--;){var f=t[i];e[i]=Ct(f,n)?s[f]:r}return e}function Wo(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var La=Oa(Qs),rr=mh||function(e,t){return Ce.setTimeout(e,t)},Yo=Oa(Ad);function Ra(e,t,n){var i=t+"";return Yo(e,qd(i,ng(Bd(i),n)))}function Oa(e){var t=0,n=0;return function(){var i=Eh(),s=Or-(i-n);if(n=i,s>0){if(++t>=En)return arguments[0]}else t=0;return e.apply(r,arguments)}}function ai(e,t){var n=-1,i=e.length,s=i-1;for(t=t===r?i:t;++n<t;){var f=yo(n,s),l=e[f];e[f]=e[n],e[n]=l}return e.length=t,e}var Ma=Xd(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zc,function(n,i,s,f){t.push(s?f.replace(jc,"$1"):i||n)}),t});function Mt(e){if(typeof e=="string"||rt(e))return e;var t=e+"";return t=="0"&&1/e==-D?"-0":t}function hn(e){if(e!=null){try{return Cr.call(e)}catch{}try{return e+""}catch{}}return""}function ng(e,t){return at(De,function(n){var i="_."+n[0];t&n[1]&&!Sr(e,i)&&e.push(i)}),e.sort()}function ba(e){if(e instanceof te)return e.clone();var t=new ct(e.__wrapped__,e.__chain__);return t.__actions__=Ke(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function rg(e,t,n){(n?Ge(e,t,n):t===r)?t=1:t=xe(Q(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var s=0,f=0,l=_(Gr(i/t));s<i;)l[f++]=ht(e,s,s+=t);return l}function ig(e){for(var t=-1,n=e==null?0:e.length,i=0,s=[];++t<n;){var f=e[t];f&&(s[i++]=f)}return s}function og(){var e=arguments.length;if(!e)return[];for(var t=_(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Gt(z(n)?Ke(n):[n],Fe(t,1))}var ug=X(function(e,t){return ye(e)?Xn(e,Fe(t,1,ye,!0)):[]}),sg=X(function(e,t){var n=dt(t);return ye(n)&&(n=r),ye(e)?Xn(e,Fe(t,1,ye,!0),N(n,2)):[]}),ag=X(function(e,t){var n=dt(t);return ye(n)&&(n=r),ye(e)?Xn(e,Fe(t,1,ye,!0),r,n):[]});function fg(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:Q(t),ht(e,t<0?0:t,i)):[]}function cg(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:Q(t),t=i-t,ht(e,0,t<0?0:t)):[]}function lg(e,t){return e&&e.length?ei(e,N(t,3),!0,!0):[]}function hg(e,t){return e&&e.length?ei(e,N(t,3),!0):[]}function dg(e,t,n,i){var s=e==null?0:e.length;return s?(n&&typeof n!="number"&&Ge(e,t,n)&&(n=0,i=s),od(e,t,n,i)):[]}function xa(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var s=n==null?0:Q(n);return s<0&&(s=xe(i+s,0)),Ur(e,N(t,3),s)}function Da(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var s=i-1;return n!==r&&(s=Q(n),s=n<0?xe(i+s,0):Ye(s,i-1)),Ur(e,N(t,3),s,!0)}function Sa(e){var t=e==null?0:e.length;return t?Fe(e,1):[]}function gg(e){var t=e==null?0:e.length;return t?Fe(e,D):[]}function pg(e,t){var n=e==null?0:e.length;return n?(t=t===r?1:Q(t),Fe(e,t)):[]}function mg(e){for(var t=-1,n=e==null?0:e.length,i={};++t<n;){var s=e[t];i[s[0]]=s[1]}return i}function Ua(e){return e&&e.length?e[0]:r}function _g(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var s=n==null?0:Q(n);return s<0&&(s=xe(i+s,0)),In(e,t,s)}function vg(e){var t=e==null?0:e.length;return t?ht(e,0,-1):[]}var wg=X(function(e){var t=pe(e,Oo);return t.length&&t[0]===e[0]?_o(t):[]}),Eg=X(function(e){var t=dt(e),n=pe(e,Oo);return t===dt(n)?t=r:n.pop(),n.length&&n[0]===e[0]?_o(n,N(t,2)):[]}),Tg=X(function(e){var t=dt(e),n=pe(e,Oo);return t=typeof t=="function"?t:r,t&&n.pop(),n.length&&n[0]===e[0]?_o(n,r,t):[]});function yg(e,t){return e==null?"":vh.call(e,t)}function dt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Ig(e,t,n){var i=e==null?0:e.length;if(!i)return-1;var s=i;return n!==r&&(s=Q(n),s=s<0?xe(i+s,0):Ye(s,i-1)),t===t?nh(e,t,s):Ur(e,ds,s,!0)}function Ag(e,t){return e&&e.length?Gs(e,Q(t)):r}var Lg=X($a);function $a(e,t){return e&&e.length&&t&&t.length?To(e,t):e}function Rg(e,t,n){return e&&e.length&&t&&t.length?To(e,t,N(n,2)):e}function Og(e,t,n){return e&&e.length&&t&&t.length?To(e,t,r,n):e}var Mg=Pt(function(e,t){var n=e==null?0:e.length,i=ho(e,t);return Ks(e,pe(t,function(s){return Ct(s,n)?+s:s}).sort(ra)),i});function bg(e,t){var n=[];if(!(e&&e.length))return n;var i=-1,s=[],f=e.length;for(t=N(t,3);++i<f;){var l=e[i];t(l,i,e)&&(n.push(l),s.push(i))}return Ks(e,s),n}function ko(e){return e==null?e:yh.call(e)}function xg(e,t,n){var i=e==null?0:e.length;return i?(n&&typeof n!="number"&&Ge(e,t,n)?(t=0,n=i):(t=t==null?0:Q(t),n=n===r?i:Q(n)),ht(e,t,n)):[]}function Dg(e,t){return jr(e,t)}function Sg(e,t,n){return Ao(e,t,N(n,2))}function Ug(e,t){var n=e==null?0:e.length;if(n){var i=jr(e,t);if(i<n&&Tt(e[i],t))return i}return-1}function $g(e,t){return jr(e,t,!0)}function Ng(e,t,n){return Ao(e,t,N(n,2),!0)}function Pg(e,t){var n=e==null?0:e.length;if(n){var i=jr(e,t,!0)-1;if(Tt(e[i],t))return i}return-1}function Cg(e){return e&&e.length?Zs(e):[]}function Fg(e,t){return e&&e.length?Zs(e,N(t,2)):[]}function Wg(e){var t=e==null?0:e.length;return t?ht(e,1,t):[]}function Yg(e,t,n){return e&&e.length?(t=n||t===r?1:Q(t),ht(e,0,t<0?0:t)):[]}function kg(e,t,n){var i=e==null?0:e.length;return i?(t=n||t===r?1:Q(t),t=i-t,ht(e,t<0?0:t,i)):[]}function Hg(e,t){return e&&e.length?ei(e,N(t,3),!1,!0):[]}function Bg(e,t){return e&&e.length?ei(e,N(t,3)):[]}var Gg=X(function(e){return Qt(Fe(e,1,ye,!0))}),zg=X(function(e){var t=dt(e);return ye(t)&&(t=r),Qt(Fe(e,1,ye,!0),N(t,2))}),qg=X(function(e){var t=dt(e);return t=typeof t=="function"?t:r,Qt(Fe(e,1,ye,!0),r,t)});function Kg(e){return e&&e.length?Qt(e):[]}function Qg(e,t){return e&&e.length?Qt(e,N(t,2)):[]}function Zg(e,t){return t=typeof t=="function"?t:r,e&&e.length?Qt(e,r,t):[]}function Ho(e){if(!(e&&e.length))return[];var t=0;return e=Bt(e,function(n){if(ye(n))return t=xe(n.length,t),!0}),io(t,function(n){return pe(e,to(n))})}function Na(e,t){if(!(e&&e.length))return[];var n=Ho(e);return t==null?n:pe(n,function(i){return et(t,r,i)})}var Jg=X(function(e,t){return ye(e)?Xn(e,t):[]}),Xg=X(function(e){return Ro(Bt(e,ye))}),Vg=X(function(e){var t=dt(e);return ye(t)&&(t=r),Ro(Bt(e,ye),N(t,2))}),jg=X(function(e){var t=dt(e);return t=typeof t=="function"?t:r,Ro(Bt(e,ye),r,t)}),ep=X(Ho);function tp(e,t){return js(e||[],t||[],Jn)}function np(e,t){return js(e||[],t||[],er)}var rp=X(function(e){var t=e.length,n=t>1?e[t-1]:r;return n=typeof n=="function"?(e.pop(),n):r,Na(e,n)});function Pa(e){var t=a(e);return t.__chain__=!0,t}function ip(e,t){return t(e),e}function fi(e,t){return t(e)}var op=Pt(function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(f){return ho(f,e)};return t>1||this.__actions__.length||!(i instanceof te)||!Ct(n)?this.thru(s):(i=i.slice(n,+n+(t?1:0)),i.__actions__.push({func:fi,args:[s],thisArg:r}),new ct(i,this.__chain__).thru(function(f){return t&&!f.length&&f.push(r),f}))});function up(){return Pa(this)}function sp(){return new ct(this.value(),this.__chain__)}function ap(){this.__values__===r&&(this.__values__=Ja(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function fp(){return this}function cp(e){for(var t,n=this;n instanceof Qr;){var i=ba(n);i.__index__=0,i.__values__=r,t?s.__wrapped__=i:t=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,t}function lp(){var e=this.__wrapped__;if(e instanceof te){var t=e;return this.__actions__.length&&(t=new te(this)),t=t.reverse(),t.__actions__.push({func:fi,args:[ko],thisArg:r}),new ct(t,this.__chain__)}return this.thru(ko)}function hp(){return Vs(this.__wrapped__,this.__actions__)}var dp=ti(function(e,t,n){fe.call(e,n)?++e[n]:$t(e,n,1)});function gp(e,t,n){var i=z(e)?ls:id;return n&&Ge(e,t,n)&&(t=r),i(e,N(t,3))}function pp(e,t){var n=z(e)?Bt:Ns;return n(e,N(t,3))}var mp=fa(xa),_p=fa(Da);function vp(e,t){return Fe(ci(e,t),1)}function wp(e,t){return Fe(ci(e,t),D)}function Ep(e,t,n){return n=n===r?1:Q(n),Fe(ci(e,t),n)}function Ca(e,t){var n=z(e)?at:Kt;return n(e,N(t,3))}function Fa(e,t){var n=z(e)?Wl:$s;return n(e,N(t,3))}var Tp=ti(function(e,t,n){fe.call(e,n)?e[n].push(t):$t(e,n,[t])});function yp(e,t,n,i){e=Qe(e)?e:Nn(e),n=n&&!i?Q(n):0;var s=e.length;return n<0&&(n=xe(s+n,0)),pi(e)?n<=s&&e.indexOf(t,n)>-1:!!s&&In(e,t,n)>-1}var Ip=X(function(e,t,n){var i=-1,s=typeof t=="function",f=Qe(e)?_(e.length):[];return Kt(e,function(l){f[++i]=s?et(t,l,n):Vn(l,t,n)}),f}),Ap=ti(function(e,t,n){$t(e,n,t)});function ci(e,t){var n=z(e)?pe:ks;return n(e,N(t,3))}function Lp(e,t,n,i){return e==null?[]:(z(t)||(t=t==null?[]:[t]),n=i?r:n,z(n)||(n=n==null?[]:[n]),zs(e,t,n))}var Rp=ti(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function Op(e,t,n){var i=z(e)?ji:ps,s=arguments.length<3;return i(e,N(t,4),n,s,Kt)}function Mp(e,t,n){var i=z(e)?Yl:ps,s=arguments.length<3;return i(e,N(t,4),n,s,$s)}function bp(e,t){var n=z(e)?Bt:Ns;return n(e,di(N(t,3)))}function xp(e){var t=z(e)?xs:yd;return t(e)}function Dp(e,t,n){(n?Ge(e,t,n):t===r)?t=1:t=Q(t);var i=z(e)?jh:Id;return i(e,t)}function Sp(e){var t=z(e)?ed:Ld;return t(e)}function Up(e){if(e==null)return 0;if(Qe(e))return pi(e)?Ln(e):e.length;var t=ke(e);return t==_t||t==vt?e.size:wo(e).length}function $p(e,t,n){var i=z(e)?eo:Rd;return n&&Ge(e,t,n)&&(t=r),i(e,N(t,3))}var Np=X(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Ge(e,t[0],t[1])?t=[]:n>2&&Ge(t[0],t[1],t[2])&&(t=[t[0]]),zs(e,Fe(t,1),[])}),li=ph||function(){return Ce.Date.now()};function Pp(e,t){if(typeof t!="function")throw new ft(g);return e=Q(e),function(){if(--e<1)return t.apply(this,arguments)}}function Wa(e,t,n){return t=n?r:t,t=e&&t==null?e.length:t,Nt(e,_e,r,r,r,r,t)}function Ya(e,t){var n;if(typeof t!="function")throw new ft(g);return e=Q(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Bo=X(function(e,t,n){var i=K;if(n.length){var s=zt(n,Un(Bo));i|=ue}return Nt(e,i,t,n,s)}),ka=X(function(e,t,n){var i=K|he;if(n.length){var s=zt(n,Un(ka));i|=ue}return Nt(t,i,e,n,s)});function Ha(e,t,n){t=n?r:t;var i=Nt(e,ne,r,r,r,r,r,t);return i.placeholder=Ha.placeholder,i}function Ba(e,t,n){t=n?r:t;var i=Nt(e,Le,r,r,r,r,r,t);return i.placeholder=Ba.placeholder,i}function Ga(e,t,n){var i,s,f,l,h,m,E=0,T=!1,I=!1,R=!0;if(typeof e!="function")throw new ft(g);t=gt(t)||0,we(n)&&(T=!!n.leading,I="maxWait"in n,f=I?xe(gt(n.maxWait)||0,t):f,R="trailing"in n?!!n.trailing:R);function S(Ie){var yt=i,Yt=s;return i=s=r,E=Ie,l=e.apply(Yt,yt),l}function P(Ie){return E=Ie,h=rr(j,t),T?S(Ie):l}function J(Ie){var yt=Ie-m,Yt=Ie-E,cf=t-yt;return I?Ye(cf,f-Yt):cf}function C(Ie){var yt=Ie-m,Yt=Ie-E;return m===r||yt>=t||yt<0||I&&Yt>=f}function j(){var Ie=li();if(C(Ie))return re(Ie);h=rr(j,J(Ie))}function re(Ie){return h=r,R&&i?S(Ie):(i=s=r,l)}function it(){h!==r&&ea(h),E=0,i=m=s=h=r}function ze(){return h===r?l:re(li())}function ot(){var Ie=li(),yt=C(Ie);if(i=arguments,s=this,m=Ie,yt){if(h===r)return P(m);if(I)return ea(h),h=rr(j,t),S(m)}return h===r&&(h=rr(j,t)),l}return ot.cancel=it,ot.flush=ze,ot}var Cp=X(function(e,t){return Us(e,1,t)}),Fp=X(function(e,t,n){return Us(e,gt(t)||0,n)});function Wp(e){return Nt(e,Pe)}function hi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new ft(g);var n=function(){var i=arguments,s=t?t.apply(this,i):i[0],f=n.cache;if(f.has(s))return f.get(s);var l=e.apply(this,i);return n.cache=f.set(s,l)||f,l};return n.cache=new(hi.Cache||Ut),n}hi.Cache=Ut;function di(e){if(typeof e!="function")throw new ft(g);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)}}function Yp(e){return Ya(2,e)}var kp=Od(function(e,t){t=t.length==1&&z(t[0])?pe(t[0],tt(N())):pe(Fe(t,1),tt(N()));var n=t.length;return X(function(i){for(var s=-1,f=Ye(i.length,n);++s<f;)i[s]=t[s].call(this,i[s]);return et(e,this,i)})}),Go=X(function(e,t){var n=zt(t,Un(Go));return Nt(e,ue,r,t,n)}),za=X(function(e,t){var n=zt(t,Un(za));return Nt(e,Te,r,t,n)}),Hp=Pt(function(e,t){return Nt(e,Ne,r,r,r,t)});function Bp(e,t){if(typeof e!="function")throw new ft(g);return t=t===r?t:Q(t),X(e,t)}function Gp(e,t){if(typeof e!="function")throw new ft(g);return t=t==null?0:xe(Q(t),0),X(function(n){var i=n[t],s=Jt(n,0,t);return i&&Gt(s,i),et(e,this,s)})}function zp(e,t,n){var i=!0,s=!0;if(typeof e!="function")throw new ft(g);return we(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),Ga(e,t,{leading:i,maxWait:t,trailing:s})}function qp(e){return Wa(e,1)}function Kp(e,t){return Go(Mo(t),e)}function Qp(){if(!arguments.length)return[];var e=arguments[0];return z(e)?e:[e]}function Zp(e){return lt(e,q)}function Jp(e,t){return t=typeof t=="function"?t:r,lt(e,q,t)}function Xp(e){return lt(e,U|q)}function Vp(e,t){return t=typeof t=="function"?t:r,lt(e,U|q,t)}function jp(e,t){return t==null||Ss(e,t,Se(t))}function Tt(e,t){return e===t||e!==e&&t!==t}var em=oi(mo),tm=oi(function(e,t){return e>=t}),dn=Fs((function(){return arguments})())?Fs:function(e){return Ee(e)&&fe.call(e,"callee")&&!As.call(e,"callee")},z=_.isArray,nm=os?tt(os):cd;function Qe(e){return e!=null&&gi(e.length)&&!Ft(e)}function ye(e){return Ee(e)&&Qe(e)}function rm(e){return e===!0||e===!1||Ee(e)&&Be(e)==mt}var Xt=_h||tu,im=us?tt(us):ld;function om(e){return Ee(e)&&e.nodeType===1&&!ir(e)}function um(e){if(e==null)return!0;if(Qe(e)&&(z(e)||typeof e=="string"||typeof e.splice=="function"||Xt(e)||$n(e)||dn(e)))return!e.length;var t=ke(e);if(t==_t||t==vt)return!e.size;if(nr(e))return!wo(e).length;for(var n in e)if(fe.call(e,n))return!1;return!0}function sm(e,t){return jn(e,t)}function am(e,t,n){n=typeof n=="function"?n:r;var i=n?n(e,t):r;return i===r?jn(e,t,r,n):!!i}function zo(e){if(!Ee(e))return!1;var t=Be(e);return t==je||t==We||typeof e.message=="string"&&typeof e.name=="string"&&!ir(e)}function fm(e){return typeof e=="number"&&Rs(e)}function Ft(e){if(!we(e))return!1;var t=Be(e);return t==Lt||t==rn||t==xt||t==Uc}function qa(e){return typeof e=="number"&&e==Q(e)}function gi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=L}function we(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ee(e){return e!=null&&typeof e=="object"}var Ka=ss?tt(ss):dd;function cm(e,t){return e===t||vo(e,t,No(t))}function lm(e,t,n){return n=typeof n=="function"?n:r,vo(e,t,No(t),n)}function hm(e){return Qa(e)&&e!=+e}function dm(e){if(Jd(e))throw new B(v);return Ws(e)}function gm(e){return e===null}function pm(e){return e==null}function Qa(e){return typeof e=="number"||Ee(e)&&Be(e)==Wn}function ir(e){if(!Ee(e)||Be(e)!=Dt)return!1;var t=kr(e);if(t===null)return!0;var n=fe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Cr.call(n)==lh}var qo=as?tt(as):gd;function mm(e){return qa(e)&&e>=-L&&e<=L}var Za=fs?tt(fs):pd;function pi(e){return typeof e=="string"||!z(e)&&Ee(e)&&Be(e)==kn}function rt(e){return typeof e=="symbol"||Ee(e)&&Be(e)==Mr}var $n=cs?tt(cs):md;function _m(e){return e===r}function vm(e){return Ee(e)&&ke(e)==Hn}function wm(e){return Ee(e)&&Be(e)==Nc}var Em=oi(Eo),Tm=oi(function(e,t){return e<=t});function Ja(e){if(!e)return[];if(Qe(e))return pi(e)?wt(e):Ke(e);if(zn&&e[zn])return jl(e[zn]());var t=ke(e),n=t==_t?uo:t==vt?$r:Nn;return n(e)}function Wt(e){if(!e)return e===0?e:0;if(e=gt(e),e===D||e===-D){var t=e<0?-1:1;return t*G}return e===e?e:0}function Q(e){var t=Wt(e),n=t%1;return t===t?n?t-n:t:0}function Xa(e){return e?fn(Q(e),0,V):0}function gt(e){if(typeof e=="number")return e;if(rt(e))return Y;if(we(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=we(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ms(e);var n=nl.test(e);return n||il.test(e)?Pl(e.slice(2),n?2:8):tl.test(e)?Y:+e}function Va(e){return Ot(e,Ze(e))}function ym(e){return e?fn(Q(e),-L,L):e===0?e:0}function se(e){return e==null?"":nt(e)}var Im=Dn(function(e,t){if(nr(t)||Qe(t)){Ot(t,Se(t),e);return}for(var n in t)fe.call(t,n)&&Jn(e,n,t[n])}),ja=Dn(function(e,t){Ot(t,Ze(t),e)}),mi=Dn(function(e,t,n,i){Ot(t,Ze(t),e,i)}),Am=Dn(function(e,t,n,i){Ot(t,Se(t),e,i)}),Lm=Pt(ho);function Rm(e,t){var n=xn(e);return t==null?n:Ds(n,t)}var Om=X(function(e,t){e=le(e);var n=-1,i=t.length,s=i>2?t[2]:r;for(s&&Ge(t[0],t[1],s)&&(i=1);++n<i;)for(var f=t[n],l=Ze(f),h=-1,m=l.length;++h<m;){var E=l[h],T=e[E];(T===r||Tt(T,On[E])&&!fe.call(e,E))&&(e[E]=f[E])}return e}),Mm=X(function(e){return e.push(r,ma),et(ef,r,e)});function bm(e,t){return hs(e,N(t,3),Rt)}function xm(e,t){return hs(e,N(t,3),po)}function Dm(e,t){return e==null?e:go(e,N(t,3),Ze)}function Sm(e,t){return e==null?e:Ps(e,N(t,3),Ze)}function Um(e,t){return e&&Rt(e,N(t,3))}function $m(e,t){return e&&po(e,N(t,3))}function Nm(e){return e==null?[]:Xr(e,Se(e))}function Pm(e){return e==null?[]:Xr(e,Ze(e))}function Ko(e,t,n){var i=e==null?r:cn(e,t);return i===r?n:i}function Cm(e,t){return e!=null&&wa(e,t,ud)}function Qo(e,t){return e!=null&&wa(e,t,sd)}var Fm=la(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Fr.call(t)),e[t]=n},Jo(Je)),Wm=la(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Fr.call(t)),fe.call(e,t)?e[t].push(n):e[t]=[n]},N),Ym=X(Vn);function Se(e){return Qe(e)?bs(e):wo(e)}function Ze(e){return Qe(e)?bs(e,!0):_d(e)}function km(e,t){var n={};return t=N(t,3),Rt(e,function(i,s,f){$t(n,t(i,s,f),i)}),n}function Hm(e,t){var n={};return t=N(t,3),Rt(e,function(i,s,f){$t(n,s,t(i,s,f))}),n}var Bm=Dn(function(e,t,n){Vr(e,t,n)}),ef=Dn(function(e,t,n,i){Vr(e,t,n,i)}),Gm=Pt(function(e,t){var n={};if(e==null)return n;var i=!1;t=pe(t,function(f){return f=Zt(f,e),i||(i=f.length>1),f}),Ot(e,Uo(e),n),i&&(n=lt(n,U|$|q,Fd));for(var s=t.length;s--;)Lo(n,t[s]);return n});function zm(e,t){return tf(e,di(N(t)))}var qm=Pt(function(e,t){return e==null?{}:wd(e,t)});function tf(e,t){if(e==null)return{};var n=pe(Uo(e),function(i){return[i]});return t=N(t),qs(e,n,function(i,s){return t(i,s[0])})}function Km(e,t,n){t=Zt(t,e);var i=-1,s=t.length;for(s||(s=1,e=r);++i<s;){var f=e==null?r:e[Mt(t[i])];f===r&&(i=s,f=n),e=Ft(f)?f.call(e):f}return e}function Qm(e,t,n){return e==null?e:er(e,t,n)}function Zm(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:er(e,t,n,i)}var nf=ga(Se),rf=ga(Ze);function Jm(e,t,n){var i=z(e),s=i||Xt(e)||$n(e);if(t=N(t,4),n==null){var f=e&&e.constructor;s?n=i?new f:[]:we(e)?n=Ft(f)?xn(kr(e)):{}:n={}}return(s?at:Rt)(e,function(l,h,m){return t(n,l,h,m)}),n}function Xm(e,t){return e==null?!0:Lo(e,t)}function Vm(e,t,n){return e==null?e:Xs(e,t,Mo(n))}function jm(e,t,n,i){return i=typeof i=="function"?i:r,e==null?e:Xs(e,t,Mo(n),i)}function Nn(e){return e==null?[]:oo(e,Se(e))}function e_(e){return e==null?[]:oo(e,Ze(e))}function t_(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=gt(n),n=n===n?n:0),t!==r&&(t=gt(t),t=t===t?t:0),fn(gt(e),t,n)}function n_(e,t,n){return t=Wt(t),n===r?(n=t,t=0):n=Wt(n),e=gt(e),ad(e,t,n)}function r_(e,t,n){if(n&&typeof n!="boolean"&&Ge(e,t,n)&&(t=n=r),n===r&&(typeof t=="boolean"?(n=t,t=r):typeof e=="boolean"&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=Wt(e),t===r?(t=e,e=0):t=Wt(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=Os();return Ye(e+s*(t-e+Nl("1e-"+((s+"").length-1))),t)}return yo(e,t)}var i_=Sn(function(e,t,n){return t=t.toLowerCase(),e+(n?of(t):t)});function of(e){return Zo(se(e).toLowerCase())}function uf(e){return e=se(e),e&&e.replace(ul,Ql).replace(Ll,"")}function o_(e,t,n){e=se(e),t=nt(t);var i=e.length;n=n===r?i:fn(Q(n),0,i);var s=n;return n-=t.length,n>=0&&e.slice(n,s)==t}function u_(e){return e=se(e),e&&Yc.test(e)?e.replace(Pu,Zl):e}function s_(e){return e=se(e),e&&qc.test(e)?e.replace(Bi,"\\$&"):e}var a_=Sn(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),f_=Sn(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),c_=aa("toLowerCase");function l_(e,t,n){e=se(e),t=Q(t);var i=t?Ln(e):0;if(!t||i>=t)return e;var s=(t-i)/2;return ii(zr(s),n)+e+ii(Gr(s),n)}function h_(e,t,n){e=se(e),t=Q(t);var i=t?Ln(e):0;return t&&i<t?e+ii(t-i,n):e}function d_(e,t,n){e=se(e),t=Q(t);var i=t?Ln(e):0;return t&&i<t?ii(t-i,n)+e:e}function g_(e,t,n){return n||t==null?t=0:t&&(t=+t),Th(se(e).replace(Gi,""),t||0)}function p_(e,t,n){return(n?Ge(e,t,n):t===r)?t=1:t=Q(t),Io(se(e),t)}function m_(){var e=arguments,t=se(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var __=Sn(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function v_(e,t,n){return n&&typeof n!="number"&&Ge(e,t,n)&&(t=n=r),n=n===r?V:n>>>0,n?(e=se(e),e&&(typeof t=="string"||t!=null&&!qo(t))&&(t=nt(t),!t&&An(e))?Jt(wt(e),0,n):e.split(t,n)):[]}var w_=Sn(function(e,t,n){return e+(n?" ":"")+Zo(t)});function E_(e,t,n){return e=se(e),n=n==null?0:fn(Q(n),0,e.length),t=nt(t),e.slice(n,n+t.length)==t}function T_(e,t,n){var i=a.templateSettings;n&&Ge(e,t,n)&&(t=r),e=se(e),t=mi({},t,i,pa);var s=mi({},t.imports,i.imports,pa),f=Se(s),l=oo(s,f),h,m,E=0,T=t.interpolate||br,I="__p += '",R=so((t.escape||br).source+"|"+T.source+"|"+(T===Cu?el:br).source+"|"+(t.evaluate||br).source+"|$","g"),S="//# sourceURL="+(fe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xl+"]")+`
17
+ `;e.replace(R,function(C,j,re,it,ze,ot){return re||(re=it),I+=e.slice(E,ot).replace(sl,Jl),j&&(h=!0,I+=`' +
18
+ __e(`+j+`) +
19
+ '`),ze&&(m=!0,I+=`';
20
+ `+ze+`;
21
+ __p += '`),re&&(I+=`' +
22
+ ((__t = (`+re+`)) == null ? '' : __t) +
23
+ '`),E=ot+C.length,C}),I+=`';
24
+ `;var P=fe.call(t,"variable")&&t.variable;if(!P)I=`with (obj) {
25
+ `+I+`
26
+ }
27
+ `;else if(Vc.test(P))throw new B(y);I=(m?I.replace(Pc,""):I).replace(Cc,"$1").replace(Fc,"$1;"),I="function("+(P||"obj")+`) {
28
+ `+(P?"":`obj || (obj = {});
29
+ `)+"var __t, __p = ''"+(h?", __e = _.escape":"")+(m?`, __j = Array.prototype.join;
30
+ function print() { __p += __j.call(arguments, '') }
31
+ `:`;
32
+ `)+I+`return __p
33
+ }`;var J=af(function(){return oe(f,S+"return "+I).apply(r,l)});if(J.source=I,zo(J))throw J;return J}function y_(e){return se(e).toLowerCase()}function I_(e){return se(e).toUpperCase()}function A_(e,t,n){if(e=se(e),e&&(n||t===r))return ms(e);if(!e||!(t=nt(t)))return e;var i=wt(e),s=wt(t),f=_s(i,s),l=vs(i,s)+1;return Jt(i,f,l).join("")}function L_(e,t,n){if(e=se(e),e&&(n||t===r))return e.slice(0,Es(e)+1);if(!e||!(t=nt(t)))return e;var i=wt(e),s=vs(i,wt(t))+1;return Jt(i,0,s).join("")}function R_(e,t,n){if(e=se(e),e&&(n||t===r))return e.replace(Gi,"");if(!e||!(t=nt(t)))return e;var i=wt(e),s=_s(i,wt(t));return Jt(i,s).join("")}function O_(e,t){var n=ce,i=ie;if(we(t)){var s="separator"in t?t.separator:s;n="length"in t?Q(t.length):n,i="omission"in t?nt(t.omission):i}e=se(e);var f=e.length;if(An(e)){var l=wt(e);f=l.length}if(n>=f)return e;var h=n-Ln(i);if(h<1)return i;var m=l?Jt(l,0,h).join(""):e.slice(0,h);if(s===r)return m+i;if(l&&(h+=m.length-h),qo(s)){if(e.slice(h).search(s)){var E,T=m;for(s.global||(s=so(s.source,se(Fu.exec(s))+"g")),s.lastIndex=0;E=s.exec(T);)var I=E.index;m=m.slice(0,I===r?h:I)}}else if(e.indexOf(nt(s),h)!=h){var R=m.lastIndexOf(s);R>-1&&(m=m.slice(0,R))}return m+i}function M_(e){return e=se(e),e&&Wc.test(e)?e.replace(Nu,rh):e}var b_=Sn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Zo=aa("toUpperCase");function sf(e,t,n){return e=se(e),t=n?r:t,t===r?Vl(e)?uh(e):Bl(e):e.match(t)||[]}var af=X(function(e,t){try{return et(e,r,t)}catch(n){return zo(n)?n:new B(n)}}),x_=Pt(function(e,t){return at(t,function(n){n=Mt(n),$t(e,n,Bo(e[n],e))}),e});function D_(e){var t=e==null?0:e.length,n=N();return e=t?pe(e,function(i){if(typeof i[1]!="function")throw new ft(g);return[n(i[0]),i[1]]}):[],X(function(i){for(var s=-1;++s<t;){var f=e[s];if(et(f[0],this,i))return et(f[1],this,i)}})}function S_(e){return rd(lt(e,U))}function Jo(e){return function(){return e}}function U_(e,t){return e==null||e!==e?t:e}var $_=ca(),N_=ca(!0);function Je(e){return e}function Xo(e){return Ys(typeof e=="function"?e:lt(e,U))}function P_(e){return Hs(lt(e,U))}function C_(e,t){return Bs(e,lt(t,U))}var F_=X(function(e,t){return function(n){return Vn(n,e,t)}}),W_=X(function(e,t){return function(n){return Vn(e,n,t)}});function Vo(e,t,n){var i=Se(t),s=Xr(t,i);n==null&&!(we(t)&&(s.length||!i.length))&&(n=t,t=e,e=this,s=Xr(t,Se(t)));var f=!(we(n)&&"chain"in n)||!!n.chain,l=Ft(e);return at(s,function(h){var m=t[h];e[h]=m,l&&(e.prototype[h]=function(){var E=this.__chain__;if(f||E){var T=e(this.__wrapped__),I=T.__actions__=Ke(this.__actions__);return I.push({func:m,args:arguments,thisArg:e}),T.__chain__=E,T}return m.apply(e,Gt([this.value()],arguments))})}),e}function Y_(){return Ce._===this&&(Ce._=hh),this}function jo(){}function k_(e){return e=Q(e),X(function(t){return Gs(t,e)})}var H_=xo(pe),B_=xo(ls),G_=xo(eo);function ff(e){return Co(e)?to(Mt(e)):Ed(e)}function z_(e){return function(t){return e==null?r:cn(e,t)}}var q_=ha(),K_=ha(!0);function eu(){return[]}function tu(){return!1}function Q_(){return{}}function Z_(){return""}function J_(){return!0}function X_(e,t){if(e=Q(e),e<1||e>L)return[];var n=V,i=Ye(e,V);t=N(t),e-=V;for(var s=io(i,t);++n<e;)t(n);return s}function V_(e){return z(e)?pe(e,Mt):rt(e)?[e]:Ke(Ma(se(e)))}function j_(e){var t=++ch;return se(e)+t}var e0=ri(function(e,t){return e+t},0),t0=Do("ceil"),n0=ri(function(e,t){return e/t},1),r0=Do("floor");function i0(e){return e&&e.length?Jr(e,Je,mo):r}function o0(e,t){return e&&e.length?Jr(e,N(t,2),mo):r}function u0(e){return gs(e,Je)}function s0(e,t){return gs(e,N(t,2))}function a0(e){return e&&e.length?Jr(e,Je,Eo):r}function f0(e,t){return e&&e.length?Jr(e,N(t,2),Eo):r}var c0=ri(function(e,t){return e*t},1),l0=Do("round"),h0=ri(function(e,t){return e-t},0);function d0(e){return e&&e.length?ro(e,Je):0}function g0(e,t){return e&&e.length?ro(e,N(t,2)):0}return a.after=Pp,a.ary=Wa,a.assign=Im,a.assignIn=ja,a.assignInWith=mi,a.assignWith=Am,a.at=Lm,a.before=Ya,a.bind=Bo,a.bindAll=x_,a.bindKey=ka,a.castArray=Qp,a.chain=Pa,a.chunk=rg,a.compact=ig,a.concat=og,a.cond=D_,a.conforms=S_,a.constant=Jo,a.countBy=dp,a.create=Rm,a.curry=Ha,a.curryRight=Ba,a.debounce=Ga,a.defaults=Om,a.defaultsDeep=Mm,a.defer=Cp,a.delay=Fp,a.difference=ug,a.differenceBy=sg,a.differenceWith=ag,a.drop=fg,a.dropRight=cg,a.dropRightWhile=lg,a.dropWhile=hg,a.fill=dg,a.filter=pp,a.flatMap=vp,a.flatMapDeep=wp,a.flatMapDepth=Ep,a.flatten=Sa,a.flattenDeep=gg,a.flattenDepth=pg,a.flip=Wp,a.flow=$_,a.flowRight=N_,a.fromPairs=mg,a.functions=Nm,a.functionsIn=Pm,a.groupBy=Tp,a.initial=vg,a.intersection=wg,a.intersectionBy=Eg,a.intersectionWith=Tg,a.invert=Fm,a.invertBy=Wm,a.invokeMap=Ip,a.iteratee=Xo,a.keyBy=Ap,a.keys=Se,a.keysIn=Ze,a.map=ci,a.mapKeys=km,a.mapValues=Hm,a.matches=P_,a.matchesProperty=C_,a.memoize=hi,a.merge=Bm,a.mergeWith=ef,a.method=F_,a.methodOf=W_,a.mixin=Vo,a.negate=di,a.nthArg=k_,a.omit=Gm,a.omitBy=zm,a.once=Yp,a.orderBy=Lp,a.over=H_,a.overArgs=kp,a.overEvery=B_,a.overSome=G_,a.partial=Go,a.partialRight=za,a.partition=Rp,a.pick=qm,a.pickBy=tf,a.property=ff,a.propertyOf=z_,a.pull=Lg,a.pullAll=$a,a.pullAllBy=Rg,a.pullAllWith=Og,a.pullAt=Mg,a.range=q_,a.rangeRight=K_,a.rearg=Hp,a.reject=bp,a.remove=bg,a.rest=Bp,a.reverse=ko,a.sampleSize=Dp,a.set=Qm,a.setWith=Zm,a.shuffle=Sp,a.slice=xg,a.sortBy=Np,a.sortedUniq=Cg,a.sortedUniqBy=Fg,a.split=v_,a.spread=Gp,a.tail=Wg,a.take=Yg,a.takeRight=kg,a.takeRightWhile=Hg,a.takeWhile=Bg,a.tap=ip,a.throttle=zp,a.thru=fi,a.toArray=Ja,a.toPairs=nf,a.toPairsIn=rf,a.toPath=V_,a.toPlainObject=Va,a.transform=Jm,a.unary=qp,a.union=Gg,a.unionBy=zg,a.unionWith=qg,a.uniq=Kg,a.uniqBy=Qg,a.uniqWith=Zg,a.unset=Xm,a.unzip=Ho,a.unzipWith=Na,a.update=Vm,a.updateWith=jm,a.values=Nn,a.valuesIn=e_,a.without=Jg,a.words=sf,a.wrap=Kp,a.xor=Xg,a.xorBy=Vg,a.xorWith=jg,a.zip=ep,a.zipObject=tp,a.zipObjectDeep=np,a.zipWith=rp,a.entries=nf,a.entriesIn=rf,a.extend=ja,a.extendWith=mi,Vo(a,a),a.add=e0,a.attempt=af,a.camelCase=i_,a.capitalize=of,a.ceil=t0,a.clamp=t_,a.clone=Zp,a.cloneDeep=Xp,a.cloneDeepWith=Vp,a.cloneWith=Jp,a.conformsTo=jp,a.deburr=uf,a.defaultTo=U_,a.divide=n0,a.endsWith=o_,a.eq=Tt,a.escape=u_,a.escapeRegExp=s_,a.every=gp,a.find=mp,a.findIndex=xa,a.findKey=bm,a.findLast=_p,a.findLastIndex=Da,a.findLastKey=xm,a.floor=r0,a.forEach=Ca,a.forEachRight=Fa,a.forIn=Dm,a.forInRight=Sm,a.forOwn=Um,a.forOwnRight=$m,a.get=Ko,a.gt=em,a.gte=tm,a.has=Cm,a.hasIn=Qo,a.head=Ua,a.identity=Je,a.includes=yp,a.indexOf=_g,a.inRange=n_,a.invoke=Ym,a.isArguments=dn,a.isArray=z,a.isArrayBuffer=nm,a.isArrayLike=Qe,a.isArrayLikeObject=ye,a.isBoolean=rm,a.isBuffer=Xt,a.isDate=im,a.isElement=om,a.isEmpty=um,a.isEqual=sm,a.isEqualWith=am,a.isError=zo,a.isFinite=fm,a.isFunction=Ft,a.isInteger=qa,a.isLength=gi,a.isMap=Ka,a.isMatch=cm,a.isMatchWith=lm,a.isNaN=hm,a.isNative=dm,a.isNil=pm,a.isNull=gm,a.isNumber=Qa,a.isObject=we,a.isObjectLike=Ee,a.isPlainObject=ir,a.isRegExp=qo,a.isSafeInteger=mm,a.isSet=Za,a.isString=pi,a.isSymbol=rt,a.isTypedArray=$n,a.isUndefined=_m,a.isWeakMap=vm,a.isWeakSet=wm,a.join=yg,a.kebabCase=a_,a.last=dt,a.lastIndexOf=Ig,a.lowerCase=f_,a.lowerFirst=c_,a.lt=Em,a.lte=Tm,a.max=i0,a.maxBy=o0,a.mean=u0,a.meanBy=s0,a.min=a0,a.minBy=f0,a.stubArray=eu,a.stubFalse=tu,a.stubObject=Q_,a.stubString=Z_,a.stubTrue=J_,a.multiply=c0,a.nth=Ag,a.noConflict=Y_,a.noop=jo,a.now=li,a.pad=l_,a.padEnd=h_,a.padStart=d_,a.parseInt=g_,a.random=r_,a.reduce=Op,a.reduceRight=Mp,a.repeat=p_,a.replace=m_,a.result=Km,a.round=l0,a.runInContext=p,a.sample=xp,a.size=Up,a.snakeCase=__,a.some=$p,a.sortedIndex=Dg,a.sortedIndexBy=Sg,a.sortedIndexOf=Ug,a.sortedLastIndex=$g,a.sortedLastIndexBy=Ng,a.sortedLastIndexOf=Pg,a.startCase=w_,a.startsWith=E_,a.subtract=h0,a.sum=d0,a.sumBy=g0,a.template=T_,a.times=X_,a.toFinite=Wt,a.toInteger=Q,a.toLength=Xa,a.toLower=y_,a.toNumber=gt,a.toSafeInteger=ym,a.toString=se,a.toUpper=I_,a.trim=A_,a.trimEnd=L_,a.trimStart=R_,a.truncate=O_,a.unescape=M_,a.uniqueId=j_,a.upperCase=b_,a.upperFirst=Zo,a.each=Ca,a.eachRight=Fa,a.first=Ua,Vo(a,(function(){var e={};return Rt(a,function(t,n){fe.call(a.prototype,n)||(e[n]=t)}),e})(),{chain:!1}),a.VERSION=c,at(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){a[e].placeholder=a}),at(["drop","take"],function(e,t){te.prototype[e]=function(n){n=n===r?1:xe(Q(n),0);var i=this.__filtered__&&!t?new te(this):this.clone();return i.__filtered__?i.__takeCount__=Ye(n,i.__takeCount__):i.__views__.push({size:Ye(n,V),type:e+(i.__dir__<0?"Right":"")}),i},te.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),at(["filter","map","takeWhile"],function(e,t){var n=t+1,i=n==W||n==O;te.prototype[e]=function(s){var f=this.clone();return f.__iteratees__.push({iteratee:N(s,3),type:n}),f.__filtered__=f.__filtered__||i,f}}),at(["head","last"],function(e,t){var n="take"+(t?"Right":"");te.prototype[e]=function(){return this[n](1).value()[0]}}),at(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");te.prototype[e]=function(){return this.__filtered__?new te(this):this[n](1)}}),te.prototype.compact=function(){return this.filter(Je)},te.prototype.find=function(e){return this.filter(e).head()},te.prototype.findLast=function(e){return this.reverse().find(e)},te.prototype.invokeMap=X(function(e,t){return typeof e=="function"?new te(this):this.map(function(n){return Vn(n,e,t)})}),te.prototype.reject=function(e){return this.filter(di(N(e)))},te.prototype.slice=function(e,t){e=Q(e);var n=this;return n.__filtered__&&(e>0||t<0)?new te(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(t=Q(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},te.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},te.prototype.toArray=function(){return this.take(V)},Rt(te.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=a[i?"take"+(t=="last"?"Right":""):t],f=i||/^find/.test(t);s&&(a.prototype[t]=function(){var l=this.__wrapped__,h=i?[1]:arguments,m=l instanceof te,E=h[0],T=m||z(l),I=function(j){var re=s.apply(a,Gt([j],h));return i&&R?re[0]:re};T&&n&&typeof E=="function"&&E.length!=1&&(m=T=!1);var R=this.__chain__,S=!!this.__actions__.length,P=f&&!R,J=m&&!S;if(!f&&T){l=J?l:new te(this);var C=e.apply(l,h);return C.__actions__.push({func:fi,args:[I],thisArg:r}),new ct(C,R)}return P&&J?e.apply(this,h):(C=this.thru(I),P?i?C.value()[0]:C.value():C)})}),at(["pop","push","shift","sort","splice","unshift"],function(e){var t=Nr[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);a.prototype[e]=function(){var s=arguments;if(i&&!this.__chain__){var f=this.value();return t.apply(z(f)?f:[],s)}return this[n](function(l){return t.apply(z(l)?l:[],s)})}}),Rt(te.prototype,function(e,t){var n=a[t];if(n){var i=n.name+"";fe.call(bn,i)||(bn[i]=[]),bn[i].push({name:t,func:n})}}),bn[ni(r,he).name]=[{name:"wrapper",func:r}],te.prototype.clone=Mh,te.prototype.reverse=bh,te.prototype.value=xh,a.prototype.at=op,a.prototype.chain=up,a.prototype.commit=sp,a.prototype.next=ap,a.prototype.plant=cp,a.prototype.reverse=lp,a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=hp,a.prototype.first=a.prototype.head,zn&&(a.prototype[zn]=fp),a}),Rn=sh();on?((on.exports=Rn)._=Rn,Ji._=Rn):Ce._=Rn}).call(jf)})(Fn,Fn.exports)),Fn.exports}ec();const tc="0.1.0";class Ti{constructor(o){this.debug=!1,this.debug=o?.debug??!1,this.appName=o?.appName,this.appVersion=o?.appVersion}log(o,...r){this.debug&&this.print(o,"info",r)}warn(o,...r){this.print(o,"warn",r)}error(o,...r){this.print(o,"error",r)}print(o,r,c){const g=[`[${["MeltingSpot",this.appName,this.appVersion].filter(Boolean).join(" - ")}] ${o}`];c.length&&g.push(...c),console[r](...g)}}const nc=new Ti({appName:"Core SDK",appVersion:tc}),nn=u=>u.toLowerCase().replace(/[^a-z0-9-]/g,""),rc=["/user"],ic=({deeplink:u,spotId:o})=>{try{const r=new URL(u,"https://unused.com");let c=r.pathname;return r.search&&(c+=r.search),r.hash&&(c+=r.hash),rc.some(d=>c.startsWith(d))||(c=`/spot/${o}/${_f(c)}`),c}catch(r){return nc.warn("Failed to parse deeplink URL",r),null}},oc=[/(^|\.)meltingspot\.io$/i],yi=u=>{let o;try{const v=ur(u);o=new URL(v)}catch{throw new Error(`Invalid baseURL: ${u}`)}const r=o.hostname==="localhost"||o.hostname==="127.0.0.1",c=o.protocol==="https:",d=oc.some(v=>v.test(o.hostname));if(!r&&(!c||!d))throw new Error(`Untrusted baseURL origin: ${o.origin}`);return o.origin},uc={msApiBaseUrl:"https://openapi.meltingspot.io/",msCommunityWebBaseUrl:"https://go.meltingspot.io/",ssoToken:void 0,spotId:"",rootDocument:globalThis.document};class Ue{constructor(){this.configuration=uc}static getInstance(){return Ue.instance||(Ue.instance=new Ue),Ue.instance}setConfiguration(o){this.configuration={...this.configuration,...o}}static getConfiguration(o={}){return{...Ue.getInstance().configuration,...o}}}const Eu="%[a-f0-9]{2}",Tu=new RegExp("("+Eu+")|([^%]+?)","gi"),yu=new RegExp("("+Eu+")+","gi");function Ii(u,o){try{return[decodeURIComponent(u.join(""))]}catch{}if(u.length===1)return u;o=o||1;const r=u.slice(0,o),c=u.slice(o);return Array.prototype.concat.call([],Ii(r),Ii(c))}function sc(u){try{return decodeURIComponent(u)}catch{let o=u.match(Tu)||[];for(let r=1;r<o.length;r++)u=Ii(o,r).join(""),o=u.match(Tu)||[];return u}}function ac(u){const o={"%FE%FF":"��","%FF%FE":"��"};let r=yu.exec(u);for(;r;){try{o[r[0]]=decodeURIComponent(r[0])}catch{const d=sc(r[0]);d!==r[0]&&(o[r[0]]=d)}r=yu.exec(u)}o["%C2"]="�";const c=Object.keys(o);for(const d of c)u=u.replace(new RegExp(d,"g"),o[d]);return u}function fc(u){if(typeof u!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof u+"`");try{return decodeURIComponent(u)}catch{return ac(u)}}function cc(u,o){const r={};if(Array.isArray(o))for(const c of o){const d=Object.getOwnPropertyDescriptor(u,c);d?.enumerable&&Object.defineProperty(r,c,d)}else for(const c of Reflect.ownKeys(u)){const d=Object.getOwnPropertyDescriptor(u,c);if(d.enumerable){const v=u[c];o(c,v,u)&&Object.defineProperty(r,c,d)}}return r}function Iu(u,o){if(!(typeof u=="string"&&typeof o=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(u===""||o==="")return[];const r=u.indexOf(o);return r===-1?[]:[u.slice(0,r),u.slice(r+o.length)]}const lc=u=>u==null,hc=u=>encodeURIComponent(u).replaceAll(/[!'()*]/g,o=>`%${o.charCodeAt(0).toString(16).toUpperCase()}`),Ai=Symbol("encodeFragmentIdentifier");function dc(u){switch(u.arrayFormat){case"index":return o=>(r,c)=>{const d=r.length;return c===void 0||u.skipNull&&c===null||u.skipEmptyString&&c===""?r:c===null?[...r,[Ae(o,u),"[",d,"]"].join("")]:[...r,[Ae(o,u),"[",Ae(d,u),"]=",Ae(c,u)].join("")]};case"bracket":return o=>(r,c)=>c===void 0||u.skipNull&&c===null||u.skipEmptyString&&c===""?r:c===null?[...r,[Ae(o,u),"[]"].join("")]:[...r,[Ae(o,u),"[]=",Ae(c,u)].join("")];case"colon-list-separator":return o=>(r,c)=>c===void 0||u.skipNull&&c===null||u.skipEmptyString&&c===""?r:c===null?[...r,[Ae(o,u),":list="].join("")]:[...r,[Ae(o,u),":list=",Ae(c,u)].join("")];case"comma":case"separator":case"bracket-separator":{const o=u.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(c,d)=>d===void 0||u.skipNull&&d===null||u.skipEmptyString&&d===""?c:(d=d===null?"":d,c.length===0?[[Ae(r,u),o,Ae(d,u)].join("")]:[[c,Ae(d,u)].join(u.arrayFormatSeparator)])}default:return o=>(r,c)=>c===void 0||u.skipNull&&c===null||u.skipEmptyString&&c===""?r:c===null?[...r,Ae(o,u)]:[...r,[Ae(o,u),"=",Ae(c,u)].join("")]}}function gc(u){let o;switch(u.arrayFormat){case"index":return(r,c,d)=>{if(o=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!o){d[r]=c;return}d[r]===void 0&&(d[r]={}),d[r][o[1]]=c};case"bracket":return(r,c,d)=>{if(o=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!o){d[r]=c;return}if(d[r]===void 0){d[r]=[c];return}d[r]=[...d[r],c]};case"colon-list-separator":return(r,c,d)=>{if(o=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!o){d[r]=c;return}if(d[r]===void 0){d[r]=[c];return}d[r]=[...d[r],c]};case"comma":case"separator":return(r,c,d)=>{const v=typeof c=="string"&&c.includes(u.arrayFormatSeparator),g=typeof c=="string"&&!v&&bt(c,u).includes(u.arrayFormatSeparator);c=g?bt(c,u):c;const y=v||g?c.split(u.arrayFormatSeparator).map(A=>bt(A,u)):c===null?c:bt(c,u);d[r]=y};case"bracket-separator":return(r,c,d)=>{const v=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!v){d[r]=c&&bt(c,u);return}const g=c===null?[]:bt(c,u).split(u.arrayFormatSeparator);if(d[r]===void 0){d[r]=g;return}d[r]=[...d[r],...g]};default:return(r,c,d)=>{if(d[r]===void 0){d[r]=c;return}d[r]=[...[d[r]].flat(),c]}}}function Au(u){if(typeof u!="string"||u.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Ae(u,o){return o.encode?o.strict?hc(u):encodeURIComponent(u):u}function bt(u,o){return o.decode?fc(u):u}function Lu(u){return Array.isArray(u)?u.sort():typeof u=="object"?Lu(Object.keys(u)).sort((o,r)=>Number(o)-Number(r)).map(o=>u[o]):u}function Ru(u){const o=u.indexOf("#");return o!==-1&&(u=u.slice(0,o)),u}function pc(u){let o="";const r=u.indexOf("#");return r!==-1&&(o=u.slice(r)),o}function Ou(u,o,r){return r==="string"&&typeof u=="string"?u:typeof r=="function"&&typeof u=="string"?r(u):r==="boolean"&&u===null?!0:r==="boolean"&&u!==null&&(u.toLowerCase()==="true"||u.toLowerCase()==="false")?u.toLowerCase()==="true":r==="boolean"&&u!==null&&(u.toLowerCase()==="1"||u.toLowerCase()==="0")?u.toLowerCase()==="1":r==="string[]"&&o.arrayFormat!=="none"&&typeof u=="string"?[u]:r==="number[]"&&o.arrayFormat!=="none"&&!Number.isNaN(Number(u))&&typeof u=="string"&&u.trim()!==""?[Number(u)]:r==="number"&&!Number.isNaN(Number(u))&&typeof u=="string"&&u.trim()!==""?Number(u):o.parseBooleans&&u!==null&&(u.toLowerCase()==="true"||u.toLowerCase()==="false")?u.toLowerCase()==="true":o.parseNumbers&&!Number.isNaN(Number(u))&&typeof u=="string"&&u.trim()!==""?Number(u):u}function Li(u){u=Ru(u);const o=u.indexOf("?");return o===-1?"":u.slice(o+1)}function Ri(u,o){o={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...o},Au(o.arrayFormatSeparator);const r=gc(o),c=Object.create(null);if(typeof u!="string"||(u=u.trim().replace(/^[?#&]/,""),!u))return c;for(const d of u.split("&")){if(d==="")continue;const v=o.decode?d.replaceAll("+"," "):d;let[g,y]=Iu(v,"=");g===void 0&&(g=v),y=y===void 0?null:["comma","separator","bracket-separator"].includes(o.arrayFormat)?y:bt(y,o),r(bt(g,o),y,c)}for(const[d,v]of Object.entries(c))if(typeof v=="object"&&v!==null&&o.types[d]!=="string")for(const[g,y]of Object.entries(v)){const A=o.types[d]?o.types[d].replace("[]",""):void 0;v[g]=Ou(y,o,A)}else typeof v=="object"&&v!==null&&o.types[d]==="string"?c[d]=Object.values(v).join(o.arrayFormatSeparator):c[d]=Ou(v,o,o.types[d]);return o.sort===!1?c:(o.sort===!0?Object.keys(c).sort():Object.keys(c).sort(o.sort)).reduce((d,v)=>{const g=c[v];return d[v]=g&&typeof g=="object"&&!Array.isArray(g)?Lu(g):g,d},Object.create(null))}function Mu(u,o){if(!u)return"";o={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...o},Au(o.arrayFormatSeparator);const r=g=>o.skipNull&&lc(u[g])||o.skipEmptyString&&u[g]==="",c=dc(o),d={};for(const[g,y]of Object.entries(u))r(g)||(d[g]=y);const v=Object.keys(d);return o.sort!==!1&&v.sort(o.sort),v.map(g=>{const y=u[g];return y===void 0?"":y===null?Ae(g,o):Array.isArray(y)?y.length===0&&o.arrayFormat==="bracket-separator"?Ae(g,o)+"[]":y.reduce(c(g),[]).join("&"):Ae(g,o)+"="+Ae(y,o)}).filter(g=>g.length>0).join("&")}function bu(u,o){o={decode:!0,...o};let[r,c]=Iu(u,"#");return r===void 0&&(r=u),{url:r?.split("?")?.[0]??"",query:Ri(Li(u),o),...o&&o.parseFragmentIdentifier&&c?{fragmentIdentifier:bt(c,o)}:{}}}function xu(u,o){o={encode:!0,strict:!0,[Ai]:!0,...o};const r=Ru(u.url).split("?")[0]||"",c=Li(u.url),d={...Ri(c,{sort:!1,...o}),...u.query};let v=Mu(d,o);v&&=`?${v}`;let g=pc(u.url);if(typeof u.fragmentIdentifier=="string"){const y=new URL(r);y.hash=u.fragmentIdentifier,g=o[Ai]?y.hash:`#${u.fragmentIdentifier}`}return`${r}${v}${g}`}function Du(u,o,r){r={parseFragmentIdentifier:!0,[Ai]:!1,...r};const{url:c,query:d,fragmentIdentifier:v}=bu(u,r);return xu({url:c,query:cc(d,o),fragmentIdentifier:v},r)}function mc(u,o,r){const c=Array.isArray(o)?d=>!o.includes(d):(d,v)=>!o(d,v);return Du(u,c,r)}const _c=Object.freeze(Object.defineProperty({__proto__:null,exclude:mc,extract:Li,parse:Ri,parseUrl:bu,pick:Du,stringify:Mu,stringifyUrl:xu},Symbol.toStringTag,{value:"Module"}));class qe extends Error{constructor(o,r){super(`HTTP Error ${o}${r?`: ${r}`:""}`),this.code=o,this.name="HttpError",Object.setPrototypeOf(this,qe.prototype)}}var $e=(u=>(u.GET="GET",u.PATCH="PATCH",u.POST="POST",u))($e||{});class vc{constructor(){this.headers={}}setHeaders(o){this.headers=o}async get(o){try{const r=o.query?`${o.url}?${this.serializeQuery(o.query)}`:o.url,c=await fetch(r,{headers:{...this.headers,...o.headers,"Content-Type":"application/json"}});return c.ok?ae(await c.json()):Z(new qe(c.status,await c.text()))}catch(r){const c=r instanceof Error?r.message:"Unknown error";return Z(new qe(ut.INTERNAL_SERVER_ERROR,c))}}async post(o){try{const r=await fetch(o.url,{method:"POST",headers:{...this.headers,...o.headers,"Content-Type":"application/json"},body:JSON.stringify(o.payload)});return r.ok?ae(await r.json()):Z(new qe(r.status,await r.text()))}catch(r){const c=r instanceof Error?r.message:"Unknown error";return Z(new qe(ut.INTERNAL_SERVER_ERROR,c))}}async patch(o){try{const r=await fetch(o.url,{method:"PATCH",headers:{...this.headers,...o.headers,"Content-Type":"application/json"},body:JSON.stringify(o.payload)});return r.ok?ae(await r.json()):Z(new qe(r.status,await r.text()))}catch(r){const c=r instanceof Error?r.message:"Unknown error";return Z(new qe(ut.INTERNAL_SERVER_ERROR,c))}}serializeQuery(o){if(typeof o=="string")return o;if(typeof o=="object")for(const r in o)o[r]===void 0&&delete o[r];return o=_c.stringify(o,{arrayFormat:"none"}),o}}const Tr={accessToken:{email:"/v1/auth/accessToken/email",sso:{jwt:"/v1/auth/accessToken/sso/jwt"}},refreshAccessToken:"/v1/auth/accessToken~refresh",password:{reset:"/v1/auth/password~reset"}};class Ht extends EventTarget{constructor(){super(),this.accessToken=null,this.refreshToken=null}static getInstance(){return Ht.instance||(Ht.instance=new Ht),Ht.instance}async loginWithPassword(o,r){const c=await this.callApi({endpoint:Tr.accessToken.email,method:"POST",body:{email:o,password:r},withSpotId:!0});if(c.isErr())return Z(c.error);const{accessToken:d,refreshToken:v}=c.value;return this.setTokens(d.token,v.token),ae({accessToken:d.token,refreshToken:v.token})}async loginWithSsoToken(o){const r=await this.callApi({endpoint:Tr.accessToken.sso.jwt,method:"POST",body:{token:o},withSpotId:!0});if(r.isErr())return Z(r.error);const{accessToken:c,refreshToken:d}=r.value;return this.setTokens(c.token,d.token),ae({accessToken:c.token,refreshToken:d.token})}loginWithAuthTokens(o,r){return this.setTokens(o,r),{accessToken:o,refreshToken:r}}resetPassword(o){return this.callApi({endpoint:Tr.password.reset,method:"POST",body:{email:o}})}async refresh(){const o=await this.callApi({endpoint:Tr.refreshAccessToken,method:"POST",body:{refreshToken:this.refreshToken}});if(o.isErr())return Z(o.error);const{accessToken:r,refreshToken:c}=o.value;return this.setTokens(r.token,c.token),ae({accessToken:r.token,refreshToken:c.token})}async logout(){this.setTokens(null,null)}getAccessToken(){return this.accessToken}getRefreshToken(){return this.refreshToken}setTokens(o,r){if(this.accessToken!==o||this.refreshToken!==r){this.accessToken=o,this.refreshToken=r;const c=new CustomEvent("auth:tokens-updated",{detail:{accessToken:o,refreshToken:r}});this.dispatchEvent(c)}}async callApi(o){try{const{spotId:r,msApiBaseUrl:c}=Ue.getConfiguration(),d=vi(o.endpoint,c),v={"Content-Type":"application/json",...o.headers};o.withSpotId&&r&&(v[Su.SpotId]=r);const g=await fetch(d,{method:o.method,body:o.body?JSON.stringify(o.body):void 0,headers:v});if(!g.ok)return Z(new qe(g.status,g.statusText));if(g.status===ut.NO_CONTENT)return ae(void 0);const y=await g.json();return ae(y)}catch(r){return Z(new qe(ut.INTERNAL_SERVER_ERROR,r instanceof Error?r.message:String(r)))}}}var Su=(u=>(u.Authorization="Authorization",u.SpotId="x-spotid",u))(Su||{});class It{constructor(){this.queue=[],this.isProcessing=!1,this.isPaused=!1,this.authService=Ht.getInstance(),this.httpService=new vc}static getInstance(){return It.instance||(It.instance=new It),It.instance}static buildAuthenticatedRequest(o){const{msApiBaseUrl:r,spotId:c}=Ue.getConfiguration(),d=vi(o,r),v=Ht.getInstance().getAccessToken();if(!v)return Z(new Error("Not authenticated"));const g={"Content-Type":"application/json",Authorization:`Bearer ${v}`};return c&&(g["x-spotid"]=c),ae({url:d,headers:g})}static async stream(o,r,c){const d=It.buildAuthenticatedRequest(o);if(d.isErr())return Z(d.error);const{url:v,headers:g}=d.value;try{const y=await fetch(v,{method:"POST",headers:g,...r!==void 0?{body:JSON.stringify(r)}:{},...c?{signal:c}:{}});if(!y.ok){const A=await y.text();return Z(new Error(`HTTP ${y.status}: ${A}`))}return y.body?ae(y.body):Z(new Error("Response body is empty"))}catch(y){const A=y instanceof Error?y.message:"Unknown error";return Z(y instanceof Error?y:new Error(A))}}get pendingCount(){return this.queue.length}enqueue(o){return new Promise(r=>{const c=async()=>{try{const d=await o();r(d)}catch(d){r(Z(new qe(ut.INTERNAL_SERVER_ERROR,d instanceof Error?d.message:"Unknown error")))}};this.queue.push(c),this.processQueue()})}async processQueue(){if(!this.isProcessing){this.isProcessing=!0;try{for(;!this.isPaused&&this.queue.length>0;){const o=this.queue.shift();if(!o)break;await o()}}finally{this.isProcessing=!1,!this.isPaused&&this.queue.length>0&&Promise.resolve().then(()=>this.processQueue())}}}pauseQueue(){this.isPaused=!0}resumeQueue(){const o=this.isPaused;this.isPaused=!1,o&&this.processQueue()}async call(o){return this.enqueue(async()=>{const r=async()=>{const{spotId:d,msApiBaseUrl:v}=Ue.getConfiguration(),g={...o.options?.headers??{}};d&&(g["x-spotid"]=d);const y=this.authService.getAccessToken(),{requiresAuth:A=!0}=o;if(!y&&A)return Z(new qe(ut.UNAUTHORIZED));y&&(g.Authorization=`Bearer ${y}`);const F=vi(o.endpoint,v);switch(o.method){case $e.GET:return this.httpService.get({...o.options??{},headers:g,url:F});case $e.PATCH:return this.httpService.patch({...o.options??{},headers:g,url:F});case $e.POST:return this.httpService.post({...o.options??{},headers:g,url:F});default:return Z(new qe(ut.METHOD_NOT_ALLOWED,"Method not allowed"))}};let c=await r();if(c.isErr()&&c.error.code===ut.UNAUTHORIZED){const d=await this.authService.refresh();if(d.isErr())return Z(new qe(ut.UNAUTHORIZED,d.error.message));c=await r()}return c})}}const At={playbooks:"/v1/playbooks",pages:u=>`/v1/playbooks/${u}/pages`,hotspots:(u,o)=>`/v1/playbooks/${u}/pages/${o}/hotspots`,hotspot:(u,o,r)=>`/v1/playbooks/${u}/pages/${o}/hotspots/${r}`,accessibleIntents:(u,o)=>`/v1/playbooks/${u}/pages/${o}/accessibleIntents`,intents:(u,o,r)=>`/v1/playbooks/${u}/pages/${o}/hotspots/${r}/intents`,intent:(u,o,r,c)=>`/v1/playbooks/${u}/pages/${o}/hotspots/${r}/intents/${c}`},yr=50;class gn{static getInstance(){return gn.instance||(gn.instance=new gn),gn.instance}constructor(){this.meltingSpotApi=It.getInstance()}async listPlaybooks(o){const r=await this.meltingSpotApi.call({method:$e.GET,endpoint:At.playbooks,options:{query:{page:o?.page??1,limit:o?.limit??yr,...o?.domain?{"domain[eq]":o.domain}:{}}}});return r.isErr()?Z(r.error):ae(r.value)}async listPlaybookPages(o){const r=await this.meltingSpotApi.call({method:$e.GET,endpoint:At.pages(o.playbookId),options:{query:{page:o.page??1,limit:o.limit??yr,...o.url?{"url[eq]":o.url}:{}}}});return r.isErr()?Z(r.error):ae(r.value)}async createPlaybookPage(o,r){const c=await this.meltingSpotApi.call({method:$e.POST,endpoint:At.pages(o.playbookId),options:{payload:r}});return c.isErr()?Z(c.error):ae(c.value)}async listAccessiblePlaybookIntents(o){const r=await this.meltingSpotApi.call({method:$e.GET,endpoint:At.accessibleIntents(o.playbookId,o.pageId),options:{query:{...o.domain?{"domain[eq]":o.domain}:{}}}});return r.isErr()?Z(r.error):ae(r.value)}async listPlaybookHotspots(o){const r=await this.meltingSpotApi.call({method:$e.GET,endpoint:At.hotspots(o.playbookId,o.pageId),options:{query:{page:o.page??1,limit:o.limit??yr,...o.intentStatus?{"intentStatus[eq]":o.intentStatus}:{},...o.widgetType?{"widgetType[eq]":o.widgetType}:{}}}});return r.isErr()?Z(r.error):ae(r.value)}async createPlaybookHotspot(o,r){const c=await this.meltingSpotApi.call({method:$e.POST,endpoint:At.hotspots(o.playbookId,o.pageId),options:{payload:r}});return c.isErr()?Z(c.error):ae(c.value)}async updatePlaybookHotspot(o,r){const c=await this.meltingSpotApi.call({method:$e.PATCH,endpoint:At.hotspot(o.playbookId,o.pageId,o.hotspotId),options:{payload:r}});return c.isErr()?Z(c.error):ae(c.value)}async listPlaybookIntents(o){const r=await this.meltingSpotApi.call({method:$e.GET,endpoint:At.intents(o.playbookId,o.pageId,o.hotspotId),options:{query:{page:o.page??1,limit:o.limit??yr,...o.status?{"status[eq]":o.status}:{}}}});return r.isErr()?Z(r.error):ae(r.value)}async createPlaybookIntent(o,r){const c=await this.meltingSpotApi.call({method:$e.POST,endpoint:At.intents(o.playbookId,o.pageId,o.hotspotId),options:{payload:r}});return c.isErr()?Z(c.error):ae(c.value)}async updatePlaybookIntent(o,r){const c=await this.meltingSpotApi.call({method:$e.PATCH,endpoint:At.intent(o.playbookId,o.pageId,o.hotspotId,o.intentId),options:{payload:r}});return c.isErr()?Z(c.error):ae(c.value)}}const wc={me:"/v1/spots/me"},Ec=50;class pn{static getInstance(){return pn.instance||(pn.instance=new pn),pn.instance}constructor(){this.meltingSpotApi=It.getInstance()}async listSpotsForMe(o){const r=await this.meltingSpotApi.call({method:$e.GET,endpoint:wc.me,options:{query:{page:1,limit:Ec,...o?.spotMemberRole?{"spotMemberRole[eq]":o.spotMemberRole}:{}}}});return r.isErr()?Z(r.error):ae(r.value)}}const Tc={spotMember:{me:"/v1/spotMembers/me"}};class mn{static getInstance(){return mn.instance||(mn.instance=new mn),mn.instance}constructor(){this.meltingSpotApi=It.getInstance()}async getSpotMemberForMe(){const o=await this.meltingSpotApi.call({method:$e.GET,endpoint:Tc.spotMember.me});return o.isErr()?Z(o.error):ae(o.value)}}const yc={spotMemberSsoToken:"/v1/spotMembers/auth/sso/jwt"};class _n{static getInstance(){return _n.instance||(_n.instance=new _n),_n.instance}constructor(){this.meltingSpotApi=It.getInstance()}async generateSsoToken(){const o=await this.meltingSpotApi.call({method:$e.POST,endpoint:yc.spotMemberSsoToken,options:{payload:{}}});return o.isErr()?Z(o.error):ae(o.value.token)}}class vn{static getInstance(){return vn.instance||(vn.instance=new vn),vn.instance}constructor(){this.spotMemberAuthApiService=_n.getInstance()}async generateSsoToken(){return this.spotMemberAuthApiService.generateSsoToken()}}const Oi=u=>{const o=u.get("utm_source");if(o)return{source:o,medium:u.get("utm_medium")??void 0,campaign:u.get("utm_campaign")??void 0,term:u.get("utm_term")??void 0,content:u.get("utm_content")??void 0}},Mi=u=>u?Object.entries(u).reduce((o,[r,c])=>(c!=null&&(o[`utm_${r}`]=c),o),{}):{},Ic=Ue.getInstance(),Ac=Ht.getInstance(),Lc=vn.getInstance(),Rc={Playbook:gn.getInstance(),Spot:pn.getInstance(),SpotMember:mn.getInstance()},wn=globalThis;wn.MeltingSpot||(wn.MeltingSpot={}),wn.MeltingSpot.Configuration=Ic,wn.MeltingSpot.Auth=Ac,wn.MeltingSpot.Sso=Lc,wn.MeltingSpot.Api=Rc;const Oc="0.1.0",bi=new Ti({appName:"Embed SDK",appVersion:Oc});class Ir{constructor(o){this.content=o}#e=null;#t=null;set onRemove(o){this.#t=o}inject(o){this.remove();const r=wi({input:o,rootDocument:this.content.rootDocument});this.#e=this.content.iframe,this.#e.classList.add("ms-embed"),r.appendChild(this.#e)}remove(){this.#e&&(this.#e.contentWindow&&this.#t?.(this.#e.contentWindow),this.#e.remove(),this.#e=null)}}class Mc{constructor(o){this.baseURL=yi(o.baseURL),this.spotId=nn(o.spotId),this.authToken=o.authToken??null,this.themeMode=o.themeMode??"auto",this.domain=o.domain??null,this.deeplink=o.deeplink?ic({deeplink:o.deeplink,spotId:this.spotId}):null,this.utmParameters=o.utmParameters??null,this.rootDocument=o.rootDocument}get iframe(){const o=this.authToken&&this.authToken.trim().length>0?"/sso/jwt":"",r=new URL(`/spot/${this.spotId}${o}`,ur(this.baseURL)),c=Ei({url:r,searchParams:{embed:this.spotId,themeMode:this.themeMode,ms_token:this.authToken,domain:this.domain,deeplink:this.deeplink,...Mi(this.utmParameters)},rootDocument:this.rootDocument});return c.classList.add("ms-spot"),c}}const xi={READY:"meltingspot:ready",ERROR:"meltingspot:error"},Oe=class Oe{static injectSpotInto(o,r){const{onReady:c,onError:d,...v}=r,{spotId:g,rootDocument:y,msCommunityWebBaseUrl:A}=Ue.getConfiguration({spotId:v.spotId,rootDocument:v.rootDocument,msCommunityWebBaseUrl:v.baseURL});if(!g)throw bi.error("Spot ID is required"),new Error("Spot ID is not configured. Please set the spotId in the configuration.");const F=new URLSearchParams(window.location.search),H={spotId:g,authToken:v.authToken??F.get("ms_token"),domain:v.domain,deeplink:v.deeplink??F.get("ms_url"),themeMode:v.themeMode,utmParameters:v.utmParameters??Oi(F),baseURL:A,rootDocument:y},U=new Ir(new Mc(H));if(U.inject(o),Oe.embeds.push(U),c||d){const $=U.content.iframe.contentWindow;$&&(Oe.iframeCallbacks.set($,{onReady:c,onError:d}),U.onRemove=q=>{Oe.iframeCallbacks.delete(q)}),Oe.ensureMessageListener()}return bi.log("Spot injected",H,o),U}static clear(){Oe.embeds.forEach(o=>{o.remove()}),Oe.embeds=[],Oe.iframeCallbacks.clear(),Oe.messageListened&&(window.removeEventListener("message",Oe.handleMessageEvent),Oe.messageListened=!1),bi.log("All MeltingSpot embeds cleared")}static handleMessageEvent(o){if(!o.data||typeof o.data!="object"||o.data.type!==xi.READY&&o.data.type!==xi.ERROR)return;const r=o.source,c=Oe.iframeCallbacks.get(r);if(!c)return;const{msCommunityWebBaseUrl:d}=Ue.getConfiguration({});if(d)try{const v=new URL(d).origin;if(o.origin!==v)return}catch{}o.data.type===xi.READY?c.onReady?.():c.onError?.(o.data.error)}static ensureMessageListener(){Oe.messageListened||(window.addEventListener("message",Oe.handleMessageEvent),Oe.messageListened=!0)}};Oe.embeds=[],Oe.messageListened=!1,Oe.iframeCallbacks=new Map;let Di=Oe;const Si=globalThis;Si.MeltingSpot||(Si.MeltingSpot={}),Si.MeltingSpot.Embed=Di;const bc="0.1.0",He=new Ti({appName:"Widget SDK",appVersion:bc});class Uu{constructor(o,r,c){this.content=o,this.rootDocument=r,this.dialogClassname=c,this.dialogElement=null,this.triggerElement=null,this.iframeElement=null,this.currentListener=null}inject({into:o,bind:r,options:c}){this.remove();const d=wi({input:o,rootDocument:this.rootDocument});if(this.dialogElement=wf(this.rootDocument),this.dialogElement.classList.add(this.dialogClassname),this.dialogElement.onclose=()=>this.#t(),d.appendChild(this.dialogElement),r){this.triggerElement=wi({input:r,rootDocument:this.rootDocument});const v=this.open.bind(this,c);this.currentListener=g=>{g.stopPropagation(),g.preventDefault(),v()},this.triggerElement.addEventListener("click",this.currentListener)}}remove(){this.dialogElement&&(this.dialogElement.remove(),this.dialogElement.onclose=null,this.dialogElement=null),this.triggerElement&&(this.currentListener&&this.triggerElement.removeEventListener("click",this.currentListener),this.triggerElement=null,this.currentListener=null)}open(o){this.dialogElement||this.inject({into:this.rootDocument.body}),this.dialogElement&&(this.#e(),this.dialogElement.showModal())}close(){this.dialogElement&&this.dialogElement.close()}#e(){this.dialogElement&&(this.iframeElement=this.dialogElement.appendChild(this.content.iframe))}#t(){this.iframeElement&&(this.iframeElement.remove(),this.iframeElement=null)}}class Ar extends Uu{constructor(o,r){super(o,r,"ms-drawer")}open(o){const{position:r="right"}=o??{};super.open(o),this.dialogElement&&(this.dialogElement.dataset.position=r)}}class Lr extends Uu{constructor(o,r){super(o,r,"ms-modal")}}class xc{constructor(o){this.baseURL=yi(o.baseURL),this.spotId=nn(o.spotId),this.widgetId=nn(o.widgetId),this.authToken=o.authToken??null,this.themeMode=o.themeMode??"auto",this.domain=o.domain??null,this.utmParameters=o.utmParameters??null,this.rootDocument=o.rootDocument}get iframe(){const o=new URL(`/widgets/spot/${this.spotId}/widget/${this.widgetId}`,ur(this.baseURL)),r=Ei({url:o,searchParams:{themeMode:this.themeMode,ms_token:this.authToken,domain:this.domain,...Mi(this.utmParameters)},rootDocument:this.rootDocument});return r.classList.add("ms-widget"),r}}class Dc{constructor(o){this.baseURL=yi(o.baseURL),this.spotId=nn(o.spotId),this.widgetContentId=nn(o.widgetContentId),this.contentId=nn(o.contentId),this.widgetId=nn(o.widgetId),this.contentType=o.contentType,this.authToken=o.authToken??null,this.themeMode=o.themeMode??"auto",this.domain=o.domain??null,this.utmParameters=o.utmParameters??null,this.rootDocument=o.rootDocument}get iframe(){const o=new URL(`/widgets/spot/${this.spotId}/widgetContent/${this.widgetContentId}`,ur(this.baseURL));o.searchParams.set("widgetId",this.widgetId);const r=Ei({url:o,searchParams:{themeMode:this.themeMode,ms_token:this.authToken,domain:this.domain,contentId:this.contentId,contentType:this.contentType,...Mi(this.utmParameters)},rootDocument:this.rootDocument});return r.classList.add("ms-widget-content"),r}}const ee=class ee{static injectWidgetInto(o,r){const{spotId:c,rootDocument:d,msCommunityWebBaseUrl:v}=Ue.getConfiguration({spotId:r.spotId,rootDocument:r.rootDocument,msCommunityWebBaseUrl:r.baseURL});if(!c)throw He.error("Spot ID is required"),new Error("Spot ID is not configured. Please set the spotId in the configuration.");const{widget:g,args:y}=ee.createWidget({...r,spotId:c,rootDocument:d,baseURL:v}),A=new Ir(g);return A.inject(o),ee.widgets.push(A),He.log("Widget injected",ee.cleanupLoggedArgs(y),o),A}static injectWidgetContentInto(o,r){const{spotId:c,rootDocument:d,msCommunityWebBaseUrl:v}=Ue.getConfiguration({spotId:r.spotId,rootDocument:r.rootDocument,msCommunityWebBaseUrl:r.baseURL});if(!c)throw He.error("Spot ID is required"),new Error("Spot ID is not configured. Please set the spotId in the configuration.");const{widgetContent:g,args:y}=ee.createWidgetContent({...r,spotId:c,rootDocument:d,baseURL:v}),A=new Ir(g);return A.inject(o),ee.widgets.push(A),He.log("WidgetContent injected",ee.cleanupLoggedArgs(y),o),A}static bindWidgetModalTo(o,r){return ee.bindEntityModalTo(o,{type:"Widget",data:r})}static bindWidgetDrawerTo(o,r){return ee.bindEntityDrawerTo(o,{type:"Widget",data:r})}static createWidgetDrawer(o){const{widget:r}=ee.createWidget(o);return He.log("Create Widget drawer",{data:ee.cleanupLoggedArgs(o)}),new Ar(r,o.rootDocument??document)}static createWidgetModal(o){const{widget:r}=ee.createWidget(o);return He.log("Create Widget modal",{data:ee.cleanupLoggedArgs(o)}),new Lr(r,o.rootDocument??document)}static createWidgetEmbed(o){const{widget:r}=ee.createWidget(o),c=new Ir(r);return He.log("Create Widget embed",{data:ee.cleanupLoggedArgs(o)}),c}static clear(){ee.widgets.forEach(o=>{o.remove()}),ee.widgets=[],ee.widgetOptions={},He.log("All Widget SDK MeltingSpot elements were cleared")}static bindEntityDrawerTo(o,r){const{spotId:c,rootDocument:d,msCommunityWebBaseUrl:v}=Ue.getConfiguration({spotId:r.data.spotId,rootDocument:r.data.rootDocument??document,msCommunityWebBaseUrl:r.data.baseURL});if(!c)throw He.error("Spot ID is required"),new Error("Spot ID is not configured. Please set the spotId in the configuration.");let g,y;switch(r.type){case"Widget":{const U=ee.createWidget({...r.data,spotId:c,rootDocument:d,baseURL:v});g=U.widget,y=U.args}break;case"WidgetContent":{const U=ee.createWidgetContent({...r.data,spotId:c,rootDocument:d,baseURL:v});g=U.widgetContent,y=U.args}}const A=new Ar(g,d),F={position:r.data.position},H=r.data.into??d.body;return A.inject({into:H,bind:o,options:F}),ee.widgets.push(A),He.log("Widget bound to drawer",ee.cleanupLoggedArgs(y),F,H,o),A}static bindEntityModalTo(o,r){const{spotId:c,rootDocument:d,msCommunityWebBaseUrl:v}=Ue.getConfiguration({spotId:r.data.spotId,rootDocument:r.data.rootDocument??document,msCommunityWebBaseUrl:r.data.baseURL});if(!c)throw He.error("Spot ID is required"),new Error("Spot ID is not configured. Please set the spotId in the configuration.");let g,y;switch(r.type){case"Widget":{const H=ee.createWidget({...r.data,spotId:c,rootDocument:d,baseURL:v});g=H.widget,y=H.args}break;case"WidgetContent":{const H=ee.createWidgetContent({...r.data,spotId:c,rootDocument:d,baseURL:v});g=H.widgetContent,y=H.args}}const A=new Lr(g,d),F=r.data.into??d.body;return A.inject({into:F,bind:o}),ee.widgets.push(A),He.log("Widget bound to modal",ee.cleanupLoggedArgs(y),F,o),A}static handleMessageEvent(o){if(!o.data||typeof o.data!="object"||o.data.type!=="OpenWidgetContent")return;const r=o.data?.widgetId;if(!r||typeof r!="string"){He.error("widgetId is required in the message event data");return}const c=ee.widgetOptions[r];if(!c){He.error("No widget options found for widgetId",{widgetId:r});return}let d=null;try{d=new URL(c.baseURL).origin}catch{d=null}if(!d||o.origin!==d){He.warn("Ignoring OpenWidgetContent from unexpected origin",{origin:o.origin,expectedOrigin:d});return}const{spotId:v,rootDocument:g,msCommunityWebBaseUrl:y}=Ue.getConfiguration({spotId:c.spotId,rootDocument:c.rootDocument??document,msCommunityWebBaseUrl:c.baseURL}),{widgetContent:A}=ee.createWidgetContent({...c,widgetContentId:o.data.widgetContentId,contentType:o.data.contentType,contentId:o.data.contentId,widgetId:r,spotId:v,rootDocument:g,baseURL:y});o.data.openingIn==="Drawer"?new Ar(A,g).open():o.data.openingIn==="Modal"&&new Lr(A,g).open()}static createWidget(o){const r=new URLSearchParams(window.location.search),c={spotId:o.spotId,widgetId:o.widgetId,authToken:o.authToken,themeMode:o.themeMode,domain:o.domain,rootDocument:o.rootDocument,baseURL:o.baseURL,utmParameters:o.utmParameters??Oi(r)};return ee.widgetOptions[c.widgetId]=c,ee.messageListened||(window.addEventListener("message",ee.handleMessageEvent),ee.messageListened=!0),{widget:new xc(c),args:c}}static createWidgetContent(o){const r=new URLSearchParams(window.location.search),c={spotId:o.spotId,contentId:o.contentId,contentType:o.contentType,widgetContentId:o.widgetContentId,widgetId:o.widgetId,authToken:o.authToken,themeMode:o.themeMode,domain:o.domain,rootDocument:o.rootDocument,baseURL:o.baseURL,utmParameters:o.utmParameters??Oi(r)};return{widgetContent:new Dc(c),args:c}}static cleanupLoggedArgs(o){const{authToken:r,...c}=o;return{...c,authToken:r?"***":void 0}}};ee.widgets=[],ee.messageListened=!1,ee.widgetOptions={};let Rr=ee;const Ui=globalThis;Ui.MeltingSpot||(Ui.MeltingSpot={}),Ui.MeltingSpot.Widget=Rr,kt.Drawer=Ar,kt.Modal=Lr,kt.Widget=Rr,Object.defineProperty(kt,Symbol.toStringTag,{value:"Module"})}));
package/logger.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { Logger } from '../../core/src/index.ts';
2
+ export declare const logger: Logger;
@@ -0,0 +1,62 @@
1
+ import { EmbedFrame } from '../../embed/src/index.ts';
2
+ import { DrawerPosition, Drawer } from './rendering/drawer';
3
+ import { Modal } from './rendering/modal';
4
+ import { WidgetArgs } from './widget';
5
+ import { WidgetContentArgs } from './widgetContent';
6
+ type PartialWidgetArgs = Omit<WidgetArgs, 'spotId' | 'baseURL'> & {
7
+ spotId?: string;
8
+ baseURL?: string;
9
+ };
10
+ type PartialWidgetContentArgs = Omit<WidgetContentArgs, 'spotId' | 'baseURL'> & {
11
+ spotId?: string;
12
+ baseURL?: string;
13
+ };
14
+ export type InjectWidgetIntoOptions = PartialWidgetArgs;
15
+ export type InjectWidgetContentIntoOptions = PartialWidgetContentArgs;
16
+ export interface BindModalToOptions {
17
+ into?: string | HTMLElement;
18
+ }
19
+ export type BindWidgetModalToOptions = PartialWidgetArgs & BindModalToOptions;
20
+ export type BindWidgetContentModalToOptions = PartialWidgetContentArgs & BindModalToOptions;
21
+ export interface BindDrawerOptions {
22
+ position: DrawerPosition;
23
+ into?: string | HTMLElement;
24
+ }
25
+ export type BindWidgetDrawerToOptions = PartialWidgetArgs & BindDrawerOptions;
26
+ export type BindWidgetContentDrawerToOptions = PartialWidgetContentArgs & BindDrawerOptions;
27
+ export declare class MeltingSpotWidget {
28
+ private static widgets;
29
+ private static messageListened;
30
+ private static widgetOptions;
31
+ static injectWidgetInto(element: string | HTMLElement, options: InjectWidgetIntoOptions): EmbedFrame;
32
+ static injectWidgetContentInto(element: string | HTMLElement, options: InjectWidgetContentIntoOptions): EmbedFrame;
33
+ static bindWidgetModalTo(element: string | HTMLElement, options: BindWidgetModalToOptions): Modal;
34
+ static bindWidgetDrawerTo(element: string | HTMLElement, options: BindWidgetDrawerToOptions): Drawer;
35
+ /**
36
+ * Create a drawer that will contain a widget.
37
+ * By default, the drawer is positioned on the right side of the screen.
38
+ * @param options {WidgetArgs} Widget creation args
39
+ * @returns A drawer, that can be opened and closed programmatically, and that will contain the widget.
40
+ */
41
+ static createWidgetDrawer(options: WidgetArgs): Drawer;
42
+ /**
43
+ * Create a modal that will contain a widget.
44
+ * @param options {WidgetArgs} Widget creation args
45
+ * @returns A modal, that can be opened and closed programmatically, and that will contain the widget.
46
+ */
47
+ static createWidgetModal(options: WidgetArgs): Modal;
48
+ /**
49
+ * Create an embed that will contain a widget.
50
+ * @param options {WidgetArgs} Widget creation args
51
+ * @returns An embed, that can be injected programmatically, and that will contain the
52
+ */
53
+ static createWidgetEmbed(options: WidgetArgs): EmbedFrame;
54
+ static clear(): void;
55
+ private static bindEntityDrawerTo;
56
+ private static bindEntityModalTo;
57
+ private static handleMessageEvent;
58
+ private static createWidget;
59
+ private static createWidgetContent;
60
+ private static cleanupLoggedArgs;
61
+ }
62
+ export {};
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@meltingspot/widget",
3
+ "description": "MeltingSpot Widget SDK",
4
+ "homepage": "https://meltingspot.io",
5
+ "license": "BSD-3-Clause",
6
+ "version": "0.1.0",
7
+ "main": "./index.cjs",
8
+ "module": "./index.mjs",
9
+ "typings": "./index.d.ts",
10
+ "unpkg": "./index.standalone.js",
11
+ "jsdelivr": "./index.standalone.js",
12
+ "style": "./stylesheet.css",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./index.d.ts",
16
+ "import": "./index.mjs",
17
+ "require": "./index.cjs"
18
+ },
19
+ "./stylesheet.css": {
20
+ "default": "./stylesheet.css"
21
+ }
22
+ },
23
+ "dependencies": {
24
+ "@meltingspot/core": "0.1.0",
25
+ "@meltingspot/embed": "0.1.0"
26
+ },
27
+ "publishConfig": {
28
+ "provenance": false
29
+ }
30
+ }
@@ -0,0 +1,24 @@
1
+ import { Injectable, Nullable } from '../../../core/src/index.ts';
2
+ export interface DialogInjectOptions<TOpenOptions = void> {
3
+ into: string | HTMLElement;
4
+ bind?: string | HTMLElement;
5
+ options?: TOpenOptions;
6
+ }
7
+ export interface DialogContent {
8
+ iframe: HTMLIFrameElement;
9
+ }
10
+ export declare abstract class Dialog<TOpenOptions> implements Injectable {
11
+ #private;
12
+ readonly content: DialogContent;
13
+ readonly rootDocument: Document;
14
+ readonly dialogClassname: string;
15
+ protected dialogElement: Nullable<HTMLDialogElement>;
16
+ protected triggerElement: Nullable<HTMLElement>;
17
+ protected iframeElement: Nullable<HTMLIFrameElement>;
18
+ protected currentListener: Nullable<(event: MouseEvent) => void>;
19
+ constructor(content: DialogContent, rootDocument: Document, dialogClassname: string);
20
+ inject({ into, bind, options }: DialogInjectOptions<TOpenOptions>): void;
21
+ remove(): void;
22
+ open(_options?: TOpenOptions): void;
23
+ close(): void;
24
+ }
@@ -0,0 +1,20 @@
1
+ import { DialogContent, DialogInjectOptions, Dialog } from './dialog';
2
+ export type DrawerPosition = 'left' | 'right';
3
+ export interface OpenDrawerOptions {
4
+ position: DrawerPosition;
5
+ rootDocument?: Document;
6
+ }
7
+ /**
8
+ * Keep this type for retro-compatibility
9
+ * @deprecated Use `DialogContent` instead
10
+ */
11
+ export type DrawerContent = DialogContent;
12
+ /**
13
+ * Keep this type for retro-compatibility
14
+ * @deprecated Use `DialogInjectOptions` instead
15
+ */
16
+ export type DrawerInjectOptions = DialogInjectOptions<OpenDrawerOptions>;
17
+ export declare class Drawer extends Dialog<OpenDrawerOptions> {
18
+ constructor(content: DialogContent, rootDocument: Document);
19
+ open(options?: OpenDrawerOptions): void;
20
+ }
@@ -0,0 +1,14 @@
1
+ import { DialogContent, DialogInjectOptions, Dialog } from './dialog';
2
+ /**
3
+ * Keep this type for retro-compatibility
4
+ * @deprecated Use `DialogContent` instead
5
+ */
6
+ export type ModalContent = DialogContent;
7
+ /**
8
+ * Keep this type for retro-compatibility
9
+ * @deprecated Use `DialogInjectOptions` instead
10
+ */
11
+ export type ModalInjectOptions = DialogInjectOptions;
12
+ export declare class Modal extends Dialog<void> {
13
+ constructor(content: DialogContent, rootDocument: Document);
14
+ }