@squidcloud/backend 1.0.349 → 1.0.351

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.
@@ -1,5 +1,5 @@
1
- import { ApiEndpointId, CollectionName, IntegrationId, TopicName } from '@squidcloud/client';
2
- import { ActionMethodDecorator, AiFunctionAction, ClientConnectionStateChangeAction, ExecutableAction, LimitsAction, LimiterConfig, SchedulerAction, SecureAiAgentAction, SecureApiAction, SecureDatabaseAction, SecureDistributedLockAction, SecureGraphQLAction, SecureMetricAction, SecureNativeQueryAction, SecureStorageAction, SecureTopicAction, TriggerAction, WebhookAction } from '../../internal-common/src/public-types-backend/bundle-api.public-types';
1
+ import { AiFunctionId, ApiEndpointId, CollectionName, IntegrationId, TopicName } from '@squidcloud/client';
2
+ import { ActionMethodDecorator, AiFunctionAction, ClientConnectionStateChangeAction, ExecutableAction, LimiterConfig, LimitsAction, SchedulerAction, SecureAiAgentAction, SecureApiAction, SecureDatabaseAction, SecureDistributedLockAction, SecureGraphQLAction, SecureMetricAction, SecureNativeQueryAction, SecureStorageAction, SecureTopicAction, TriggerAction, WebhookAction } from '../../internal-common/src/public-types-backend/bundle-api.public-types';
3
3
  import { CronExpression, CronExpressionString, MutationType, SchedulerId, TriggerId, WebhookId } from './public-types';
4
4
  import { AiFunctionAttributes, AiFunctionParam, DatabaseActionType, MetricActionType, StorageActionType, TopicActionType } from '../../internal-common/src/public-types-backend/bundle-data.public-types';
5
5
  /**
@@ -128,7 +128,12 @@ export declare function executable(): ActionMethodDecorator<ExecutableAction>;
128
128
  * Options for the `@aiFunction` annotation.
129
129
  * @category AI
130
130
  */
131
- export interface AiFunctionOptions {
131
+ export interface AiFunctionMetadataOptions {
132
+ /**
133
+ * Unique AI function ID. If not set, the function name (excluding the class name) is used as the default ID.
134
+ * If not provided the ID of the function is constructed as 'ClassName:FunctionName'.
135
+ */
136
+ id?: AiFunctionId;
132
137
  /** Describes the capabilities of the function. This is used by the AI agent to determine when to call it. */
133
138
  description: string;
134
139
  /** Parameters for the AI function. These parameters are passed to the function by the calling agent. */
@@ -155,7 +160,7 @@ export declare function aiFunction<ParamType extends Record<string, any> = any>(
155
160
  * @category AI
156
161
  * @category Decorator
157
162
  */
158
- export declare function aiFunction<ParamType extends Record<string, any> = any>(options: AiFunctionOptions): ActionMethodDecorator<AiFunctionAction<ParamType>>;
163
+ export declare function aiFunction<ParamType extends Record<string, any> = any>(options: AiFunctionMetadataOptions): ActionMethodDecorator<AiFunctionAction<ParamType>>;
159
164
  /**
160
165
  * Options for the `@trigger` annotation.
161
166
  * @category Platform
@@ -246,7 +251,7 @@ export declare function scheduler(options: SchedulerOptions): ActionMethodDecora
246
251
  /**
247
252
  * Decorator that marks a function as a webhook. The function will be called when a webhook is triggered.
248
253
  * Once the webhook is created, it will be exposed as a URL with the provided webhook ID with this format:
249
- * `https://<your app Id>.<app region>.squid.cloud/webhooks/<webhook-id>`.
254
+ * `https://<your app ID>.<app region>.squid.cloud/webhooks/<webhook-id>`.
250
255
  *
251
256
  * The function accepts a context object as a parameter. The context object contains information about the webhook.
252
257
  * The function can return any value that can be serialized to JSON or a `WebhookResponse` object that can be created
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- (()=>{var t={36:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var u=Object.getOwnPropertyDescriptor(n,e);u&&!("get"in u?!n.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,u)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),u=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(n,"__esModule",{value:!0}),u(e(77),n)},77:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var u=Object.getOwnPropertyDescriptor(n,e);u&&!("get"in u?!n.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,u)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),u=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(n,"__esModule",{value:!0}),u(e(373),n),u(e(596),n),u(e(333),n),u(e(665),n),u(e(663),n),u(e(630),n),u(e(704),n)},243:function(t,n,e){var r;t=e.nmd(t),function(){var u,i="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,s=128,f=1/0,l=9007199254740991,h=NaN,_=4294967295,p=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],v="[object Arguments]",d="[object Array]",g="[object Boolean]",y="[object Date]",F="[object Error]",A="[object Function]",b="[object GeneratorFunction]",m="[object Map]",E="[object Number]",D="[object Object]",w="[object Promise]",O="[object RegExp]",T="[object Set]",I="[object String]",R="[object Symbol]",C="[object WeakMap]",k="[object ArrayBuffer]",N="[object DataView]",x="[object Float32Array]",S="[object Float64Array]",M="[object Int8Array]",j="[object Int16Array]",Y="[object Int32Array]",L="[object Uint8Array]",$="[object Uint8ClampedArray]",B="[object Uint16Array]",U="[object Uint32Array]",q=/\b__p \+= '';/g,P=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,H=RegExp(z.source),G=RegExp(W.source),K=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/[\\^$.*+?()[\]{}|]/g,et=RegExp(nt.source),rt=/^\s+/,ut=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ot=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,st=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,_t=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,dt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ft=/($^)/,At=/['\n\r\u2028\u2029\\]/g,bt="\\ud800-\\udfff",mt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Et="\\u2700-\\u27bf",Dt="a-z\\xdf-\\xf6\\xf8-\\xff",wt="A-Z\\xc0-\\xd6\\xd8-\\xde",Ot="\\ufe0e\\ufe0f",Tt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",It="["+bt+"]",Rt="["+Tt+"]",Ct="["+mt+"]",kt="\\d+",Nt="["+Et+"]",xt="["+Dt+"]",St="[^"+bt+Tt+kt+Et+Dt+wt+"]",Mt="\\ud83c[\\udffb-\\udfff]",jt="[^"+bt+"]",Yt="(?:\\ud83c[\\udde6-\\uddff]){2}",Lt="[\\ud800-\\udbff][\\udc00-\\udfff]",$t="["+wt+"]",Bt="\\u200d",Ut="(?:"+xt+"|"+St+")",qt="(?:"+$t+"|"+St+")",Pt="(?:['’](?:d|ll|m|re|s|t|ve))?",Vt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+Ct+"|"+Mt+")?",Wt="["+Ot+"]?",Ht=Wt+zt+"(?:"+Bt+"(?:"+[jt,Yt,Lt].join("|")+")"+Wt+zt+")*",Gt="(?:"+[Nt,Yt,Lt].join("|")+")"+Ht,Kt="(?:"+[jt+Ct+"?",Ct,Yt,Lt,It].join("|")+")",Zt=RegExp("['’]","g"),Qt=RegExp(Ct,"g"),Jt=RegExp(Mt+"(?="+Mt+")|"+Kt+Ht,"g"),Xt=RegExp([$t+"?"+xt+"+"+Pt+"(?="+[Rt,$t,"$"].join("|")+")",qt+"+"+Vt+"(?="+[Rt,$t+Ut,"$"].join("|")+")",$t+"?"+Ut+"+"+Pt,$t+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kt,Gt].join("|"),"g"),tn=RegExp("["+Bt+bt+mt+Ot+"]"),nn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,en=["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"],rn=-1,un={};un[x]=un[S]=un[M]=un[j]=un[Y]=un[L]=un[$]=un[B]=un[U]=!0,un[v]=un[d]=un[k]=un[g]=un[N]=un[y]=un[F]=un[A]=un[m]=un[E]=un[D]=un[O]=un[T]=un[I]=un[C]=!1;var on={};on[v]=on[d]=on[k]=on[N]=on[g]=on[y]=on[x]=on[S]=on[M]=on[j]=on[Y]=on[m]=on[E]=on[D]=on[O]=on[T]=on[I]=on[R]=on[L]=on[$]=on[B]=on[U]=!0,on[F]=on[A]=on[C]=!1;var an={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},cn=parseFloat,sn=parseInt,fn="object"==typeof global&&global&&global.Object===Object&&global,ln="object"==typeof self&&self&&self.Object===Object&&self,hn=fn||ln||Function("return this")(),_n=n&&!n.nodeType&&n,pn=_n&&t&&!t.nodeType&&t,vn=pn&&pn.exports===_n,dn=vn&&fn.process,gn=function(){try{return pn&&pn.require&&pn.require("util").types||dn&&dn.binding&&dn.binding("util")}catch(t){}}(),yn=gn&&gn.isArrayBuffer,Fn=gn&&gn.isDate,An=gn&&gn.isMap,bn=gn&&gn.isRegExp,mn=gn&&gn.isSet,En=gn&&gn.isTypedArray;function Dn(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function wn(t,n,e,r){for(var u=-1,i=null==t?0:t.length;++u<i;){var o=t[u];n(r,o,e(o),t)}return r}function On(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}function Tn(t,n){for(var e=null==t?0:t.length;e--&&!1!==n(t[e],e,t););return t}function In(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function Rn(t,n){for(var e=-1,r=null==t?0:t.length,u=0,i=[];++e<r;){var o=t[e];n(o,e,t)&&(i[u++]=o)}return i}function Cn(t,n){return!(null==t||!t.length)&&Bn(t,n,0)>-1}function kn(t,n,e){for(var r=-1,u=null==t?0:t.length;++r<u;)if(e(n,t[r]))return!0;return!1}function Nn(t,n){for(var e=-1,r=null==t?0:t.length,u=Array(r);++e<r;)u[e]=n(t[e],e,t);return u}function xn(t,n){for(var e=-1,r=n.length,u=t.length;++e<r;)t[u+e]=n[e];return t}function Sn(t,n,e,r){var u=-1,i=null==t?0:t.length;for(r&&i&&(e=t[++u]);++u<i;)e=n(e,t[u],u,t);return e}function Mn(t,n,e,r){var u=null==t?0:t.length;for(r&&u&&(e=t[--u]);u--;)e=n(e,t[u],u,t);return e}function jn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}var Yn=Vn("length");function Ln(t,n,e){var r;return e(t,(function(t,e,u){if(n(t,e,u))return r=e,!1})),r}function $n(t,n,e,r){for(var u=t.length,i=e+(r?1:-1);r?i--:++i<u;)if(n(t[i],i,t))return i;return-1}function Bn(t,n,e){return n==n?function(t,n,e){for(var r=e-1,u=t.length;++r<u;)if(t[r]===n)return r;return-1}(t,n,e):$n(t,qn,e)}function Un(t,n,e,r){for(var u=e-1,i=t.length;++u<i;)if(r(t[u],n))return u;return-1}function qn(t){return t!=t}function Pn(t,n){var e=null==t?0:t.length;return e?Hn(t,n)/e:h}function Vn(t){return function(n){return null==n?u:n[t]}}function zn(t){return function(n){return null==t?u:t[n]}}function Wn(t,n,e,r,u){return u(t,(function(t,u,i){e=r?(r=!1,t):n(e,t,u,i)})),e}function Hn(t,n){for(var e,r=-1,i=t.length;++r<i;){var o=n(t[r]);o!==u&&(e=e===u?o:e+o)}return e}function Gn(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function Kn(t){return t?t.slice(0,he(t)+1).replace(rt,""):t}function Zn(t){return function(n){return t(n)}}function Qn(t,n){return Nn(n,(function(n){return t[n]}))}function Jn(t,n){return t.has(n)}function Xn(t,n){for(var e=-1,r=t.length;++e<r&&Bn(n,t[e],0)>-1;);return e}function te(t,n){for(var e=t.length;e--&&Bn(n,t[e],0)>-1;);return e}var ne=zn({À:"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"}),ee=zn({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function re(t){return"\\"+an[t]}function ue(t){return tn.test(t)}function ie(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function oe(t,n){return function(e){return t(n(e))}}function ae(t,n){for(var e=-1,r=t.length,u=0,i=[];++e<r;){var o=t[e];o!==n&&o!==a||(t[e]=a,i[u++]=e)}return i}function ce(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}function se(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=[t,t]})),e}function fe(t){return ue(t)?function(t){for(var n=Jt.lastIndex=0;Jt.test(t);)++n;return n}(t):Yn(t)}function le(t){return ue(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function he(t){for(var n=t.length;n--&&ut.test(t.charAt(n)););return n}var _e=zn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),pe=function t(n){var e,r=(n=null==n?hn:pe.defaults(hn.Object(),n,pe.pick(hn,en))).Array,ut=n.Date,bt=n.Error,mt=n.Function,Et=n.Math,Dt=n.Object,wt=n.RegExp,Ot=n.String,Tt=n.TypeError,It=r.prototype,Rt=mt.prototype,Ct=Dt.prototype,kt=n["__core-js_shared__"],Nt=Rt.toString,xt=Ct.hasOwnProperty,St=0,Mt=(e=/[^.]+$/.exec(kt&&kt.keys&&kt.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",jt=Ct.toString,Yt=Nt.call(Dt),Lt=hn._,$t=wt("^"+Nt.call(xt).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bt=vn?n.Buffer:u,Ut=n.Symbol,qt=n.Uint8Array,Pt=Bt?Bt.allocUnsafe:u,Vt=oe(Dt.getPrototypeOf,Dt),zt=Dt.create,Wt=Ct.propertyIsEnumerable,Ht=It.splice,Gt=Ut?Ut.isConcatSpreadable:u,Kt=Ut?Ut.iterator:u,Jt=Ut?Ut.toStringTag:u,tn=function(){try{var t=ci(Dt,"defineProperty");return t({},"",{}),t}catch(t){}}(),an=n.clearTimeout!==hn.clearTimeout&&n.clearTimeout,fn=ut&&ut.now!==hn.Date.now&&ut.now,ln=n.setTimeout!==hn.setTimeout&&n.setTimeout,_n=Et.ceil,pn=Et.floor,dn=Dt.getOwnPropertySymbols,gn=Bt?Bt.isBuffer:u,Yn=n.isFinite,zn=It.join,ve=oe(Dt.keys,Dt),de=Et.max,ge=Et.min,ye=ut.now,Fe=n.parseInt,Ae=Et.random,be=It.reverse,me=ci(n,"DataView"),Ee=ci(n,"Map"),De=ci(n,"Promise"),we=ci(n,"Set"),Oe=ci(n,"WeakMap"),Te=ci(Dt,"create"),Ie=Oe&&new Oe,Re={},Ce=ji(me),ke=ji(Ee),Ne=ji(De),xe=ji(we),Se=ji(Oe),Me=Ut?Ut.prototype:u,je=Me?Me.valueOf:u,Ye=Me?Me.toString:u;function Le(t){if(ta(t)&&!Po(t)&&!(t instanceof qe)){if(t instanceof Ue)return t;if(xt.call(t,"__wrapped__"))return Yi(t)}return new Ue(t)}var $e=function(){function t(){}return function(n){if(!Xo(n))return{};if(zt)return zt(n);t.prototype=n;var e=new t;return t.prototype=u,e}}();function Be(){}function Ue(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=u}function qe(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=_,this.__views__=[]}function Pe(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Ve(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function ze(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function We(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new ze;++n<e;)this.add(t[n])}function He(t){var n=this.__data__=new Ve(t);this.size=n.size}function Ge(t,n){var e=Po(t),r=!e&&qo(t),u=!e&&!r&&Ho(t),i=!e&&!r&&!u&&ca(t),o=e||r||u||i,a=o?Gn(t.length,Ot):[],c=a.length;for(var s in t)!n&&!xt.call(t,s)||o&&("length"==s||u&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||vi(s,c))||a.push(s);return a}function Ke(t){var n=t.length;return n?t[zr(0,n-1)]:u}function Ze(t,n){return ki(Ou(t),ir(n,0,t.length))}function Qe(t){return ki(Ou(t))}function Je(t,n,e){(e!==u&&!$o(t[n],e)||e===u&&!(n in t))&&rr(t,n,e)}function Xe(t,n,e){var r=t[n];xt.call(t,n)&&$o(r,e)&&(e!==u||n in t)||rr(t,n,e)}function tr(t,n){for(var e=t.length;e--;)if($o(t[e][0],n))return e;return-1}function nr(t,n,e,r){return fr(t,(function(t,u,i){n(r,t,e(t),i)})),r}function er(t,n){return t&&Tu(n,Ca(n),t)}function rr(t,n,e){"__proto__"==n&&tn?tn(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}function ur(t,n){for(var e=-1,i=n.length,o=r(i),a=null==t;++e<i;)o[e]=a?u:wa(t,n[e]);return o}function ir(t,n,e){return t==t&&(e!==u&&(t=t<=e?t:e),n!==u&&(t=t>=n?t:n)),t}function or(t,n,e,r,i,o){var a,c=1&n,s=2&n,f=4&n;if(e&&(a=i?e(t,r,i,o):e(t)),a!==u)return a;if(!Xo(t))return t;var l=Po(t);if(l){if(a=function(t){var n=t.length,e=new t.constructor(n);return n&&"string"==typeof t[0]&&xt.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t),!c)return Ou(t,a)}else{var h=li(t),_=h==A||h==b;if(Ho(t))return Au(t,c);if(h==D||h==v||_&&!i){if(a=s||_?{}:_i(t),!c)return s?function(t,n){return Tu(t,fi(t),n)}(t,function(t,n){return t&&Tu(n,ka(n),t)}(a,t)):function(t,n){return Tu(t,si(t),n)}(t,er(a,t))}else{if(!on[h])return i?t:{};a=function(t,n,e){var r,u=t.constructor;switch(n){case k:return bu(t);case g:case y:return new u(+t);case N:return function(t,n){var e=n?bu(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case x:case S:case M:case j:case Y:case L:case $:case B:case U:return mu(t,e);case m:return new u;case E:case I:return new u(t);case O:return function(t){var n=new t.constructor(t.source,ht.exec(t));return n.lastIndex=t.lastIndex,n}(t);case T:return new u;case R:return r=t,je?Dt(je.call(r)):{}}}(t,h,c)}}o||(o=new He);var p=o.get(t);if(p)return p;o.set(t,a),ia(t)?t.forEach((function(r){a.add(or(r,n,e,r,t,o))})):na(t)&&t.forEach((function(r,u){a.set(u,or(r,n,e,u,t,o))}));var d=l?u:(f?s?ni:ti:s?ka:Ca)(t);return On(d||t,(function(r,u){d&&(r=t[u=r]),Xe(a,u,or(r,n,e,u,t,o))})),a}function ar(t,n,e){var r=e.length;if(null==t)return!r;for(t=Dt(t);r--;){var i=e[r],o=n[i],a=t[i];if(a===u&&!(i in t)||!o(a))return!1}return!0}function cr(t,n,e){if("function"!=typeof t)throw new Tt(i);return Ti((function(){t.apply(u,e)}),n)}function sr(t,n,e,r){var u=-1,i=Cn,o=!0,a=t.length,c=[],s=n.length;if(!a)return c;e&&(n=Nn(n,Zn(e))),r?(i=kn,o=!1):n.length>=200&&(i=Jn,o=!1,n=new We(n));t:for(;++u<a;){var f=t[u],l=null==e?f:e(f);if(f=r||0!==f?f:0,o&&l==l){for(var h=s;h--;)if(n[h]===l)continue t;c.push(f)}else i(n,l,r)||c.push(f)}return c}Le.templateSettings={escape:K,evaluate:Z,interpolate:Q,variable:"",imports:{_:Le}},Le.prototype=Be.prototype,Le.prototype.constructor=Le,Ue.prototype=$e(Be.prototype),Ue.prototype.constructor=Ue,qe.prototype=$e(Be.prototype),qe.prototype.constructor=qe,Pe.prototype.clear=function(){this.__data__=Te?Te(null):{},this.size=0},Pe.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},Pe.prototype.get=function(t){var n=this.__data__;if(Te){var e=n[t];return e===o?u:e}return xt.call(n,t)?n[t]:u},Pe.prototype.has=function(t){var n=this.__data__;return Te?n[t]!==u:xt.call(n,t)},Pe.prototype.set=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Te&&n===u?o:n,this},Ve.prototype.clear=function(){this.__data__=[],this.size=0},Ve.prototype.delete=function(t){var n=this.__data__,e=tr(n,t);return!(e<0||(e==n.length-1?n.pop():Ht.call(n,e,1),--this.size,0))},Ve.prototype.get=function(t){var n=this.__data__,e=tr(n,t);return e<0?u:n[e][1]},Ve.prototype.has=function(t){return tr(this.__data__,t)>-1},Ve.prototype.set=function(t,n){var e=this.__data__,r=tr(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},ze.prototype.clear=function(){this.size=0,this.__data__={hash:new Pe,map:new(Ee||Ve),string:new Pe}},ze.prototype.delete=function(t){var n=oi(this,t).delete(t);return this.size-=n?1:0,n},ze.prototype.get=function(t){return oi(this,t).get(t)},ze.prototype.has=function(t){return oi(this,t).has(t)},ze.prototype.set=function(t,n){var e=oi(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},We.prototype.add=We.prototype.push=function(t){return this.__data__.set(t,o),this},We.prototype.has=function(t){return this.__data__.has(t)},He.prototype.clear=function(){this.__data__=new Ve,this.size=0},He.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},He.prototype.get=function(t){return this.__data__.get(t)},He.prototype.has=function(t){return this.__data__.has(t)},He.prototype.set=function(t,n){var e=this.__data__;if(e instanceof Ve){var r=e.__data__;if(!Ee||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new ze(r)}return e.set(t,n),this.size=e.size,this};var fr=Cu(yr),lr=Cu(Fr,!0);function hr(t,n){var e=!0;return fr(t,(function(t,r,u){return e=!!n(t,r,u)})),e}function _r(t,n,e){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=n(o);if(null!=a&&(c===u?a==a&&!aa(a):e(a,c)))var c=a,s=o}return s}function pr(t,n){var e=[];return fr(t,(function(t,r,u){n(t,r,u)&&e.push(t)})),e}function vr(t,n,e,r,u){var i=-1,o=t.length;for(e||(e=pi),u||(u=[]);++i<o;){var a=t[i];n>0&&e(a)?n>1?vr(a,n-1,e,r,u):xn(u,a):r||(u[u.length]=a)}return u}var dr=ku(),gr=ku(!0);function yr(t,n){return t&&dr(t,n,Ca)}function Fr(t,n){return t&&gr(t,n,Ca)}function Ar(t,n){return Rn(n,(function(n){return Zo(t[n])}))}function br(t,n){for(var e=0,r=(n=du(n,t)).length;null!=t&&e<r;)t=t[Mi(n[e++])];return e&&e==r?t:u}function mr(t,n,e){var r=n(t);return Po(t)?r:xn(r,e(t))}function Er(t){return null==t?t===u?"[object Undefined]":"[object Null]":Jt&&Jt in Dt(t)?function(t){var n=xt.call(t,Jt),e=t[Jt];try{t[Jt]=u;var r=!0}catch(t){}var i=jt.call(t);return r&&(n?t[Jt]=e:delete t[Jt]),i}(t):function(t){return jt.call(t)}(t)}function Dr(t,n){return t>n}function wr(t,n){return null!=t&&xt.call(t,n)}function Or(t,n){return null!=t&&n in Dt(t)}function Tr(t,n,e){for(var i=e?kn:Cn,o=t[0].length,a=t.length,c=a,s=r(a),f=1/0,l=[];c--;){var h=t[c];c&&n&&(h=Nn(h,Zn(n))),f=ge(h.length,f),s[c]=!e&&(n||o>=120&&h.length>=120)?new We(c&&h):u}h=t[0];var _=-1,p=s[0];t:for(;++_<o&&l.length<f;){var v=h[_],d=n?n(v):v;if(v=e||0!==v?v:0,!(p?Jn(p,d):i(l,d,e))){for(c=a;--c;){var g=s[c];if(!(g?Jn(g,d):i(t[c],d,e)))continue t}p&&p.push(d),l.push(v)}}return l}function Ir(t,n,e){var r=null==(t=Di(t,n=du(n,t)))?t:t[Mi(Gi(n))];return null==r?u:Dn(r,t,e)}function Rr(t){return ta(t)&&Er(t)==v}function Cr(t,n,e,r,i){return t===n||(null==t||null==n||!ta(t)&&!ta(n)?t!=t&&n!=n:function(t,n,e,r,i,o){var a=Po(t),c=Po(n),s=a?d:li(t),f=c?d:li(n),l=(s=s==v?D:s)==D,h=(f=f==v?D:f)==D,_=s==f;if(_&&Ho(t)){if(!Ho(n))return!1;a=!0,l=!1}if(_&&!l)return o||(o=new He),a||ca(t)?Ju(t,n,e,r,i,o):function(t,n,e,r,u,i,o){switch(e){case N:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case k:return!(t.byteLength!=n.byteLength||!i(new qt(t),new qt(n)));case g:case y:case E:return $o(+t,+n);case F:return t.name==n.name&&t.message==n.message;case O:case I:return t==n+"";case m:var a=ie;case T:var c=1&r;if(a||(a=ce),t.size!=n.size&&!c)return!1;var s=o.get(t);if(s)return s==n;r|=2,o.set(t,n);var f=Ju(a(t),a(n),r,u,i,o);return o.delete(t),f;case R:if(je)return je.call(t)==je.call(n)}return!1}(t,n,s,e,r,i,o);if(!(1&e)){var p=l&&xt.call(t,"__wrapped__"),A=h&&xt.call(n,"__wrapped__");if(p||A){var b=p?t.value():t,w=A?n.value():n;return o||(o=new He),i(b,w,e,r,o)}}return!!_&&(o||(o=new He),function(t,n,e,r,i,o){var a=1&e,c=ti(t),s=c.length;if(s!=ti(n).length&&!a)return!1;for(var f=s;f--;){var l=c[f];if(!(a?l in n:xt.call(n,l)))return!1}var h=o.get(t),_=o.get(n);if(h&&_)return h==n&&_==t;var p=!0;o.set(t,n),o.set(n,t);for(var v=a;++f<s;){var d=t[l=c[f]],g=n[l];if(r)var y=a?r(g,d,l,n,t,o):r(d,g,l,t,n,o);if(!(y===u?d===g||i(d,g,e,r,o):y)){p=!1;break}v||(v="constructor"==l)}if(p&&!v){var F=t.constructor,A=n.constructor;F==A||!("constructor"in t)||!("constructor"in n)||"function"==typeof F&&F instanceof F&&"function"==typeof A&&A instanceof A||(p=!1)}return o.delete(t),o.delete(n),p}(t,n,e,r,i,o))}(t,n,e,r,Cr,i))}function kr(t,n,e,r){var i=e.length,o=i,a=!r;if(null==t)return!o;for(t=Dt(t);i--;){var c=e[i];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<o;){var s=(c=e[i])[0],f=t[s],l=c[1];if(a&&c[2]){if(f===u&&!(s in t))return!1}else{var h=new He;if(r)var _=r(f,l,s,t,n,h);if(!(_===u?Cr(l,f,3,r,h):_))return!1}}return!0}function Nr(t){return!(!Xo(t)||(n=t,Mt&&Mt in n))&&(Zo(t)?$t:vt).test(ji(t));var n}function xr(t){return"function"==typeof t?t:null==t?ec:"object"==typeof t?Po(t)?Lr(t[0],t[1]):Yr(t):lc(t)}function Sr(t){if(!Ai(t))return ve(t);var n=[];for(var e in Dt(t))xt.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Mr(t,n){return t<n}function jr(t,n){var e=-1,u=zo(t)?r(t.length):[];return fr(t,(function(t,r,i){u[++e]=n(t,r,i)})),u}function Yr(t){var n=ai(t);return 1==n.length&&n[0][2]?mi(n[0][0],n[0][1]):function(e){return e===t||kr(e,t,n)}}function Lr(t,n){return gi(t)&&bi(n)?mi(Mi(t),n):function(e){var r=wa(e,t);return r===u&&r===n?Oa(e,t):Cr(n,r,3)}}function $r(t,n,e,r,i){t!==n&&dr(n,(function(o,a){if(i||(i=new He),Xo(o))!function(t,n,e,r,i,o,a){var c=wi(t,e),s=wi(n,e),f=a.get(s);if(f)Je(t,e,f);else{var l=o?o(c,s,e+"",t,n,a):u,h=l===u;if(h){var _=Po(s),p=!_&&Ho(s),v=!_&&!p&&ca(s);l=s,_||p||v?Po(c)?l=c:Wo(c)?l=Ou(c):p?(h=!1,l=Au(s,!0)):v?(h=!1,l=mu(s,!0)):l=[]:ra(s)||qo(s)?(l=c,qo(c)?l=da(c):Xo(c)&&!Zo(c)||(l=_i(s))):h=!1}h&&(a.set(s,l),i(l,s,r,o,a),a.delete(s)),Je(t,e,l)}}(t,n,a,e,$r,r,i);else{var c=r?r(wi(t,a),o,a+"",t,n,i):u;c===u&&(c=o),Je(t,a,c)}}),ka)}function Br(t,n){var e=t.length;if(e)return vi(n+=n<0?e:0,e)?t[n]:u}function Ur(t,n,e){n=n.length?Nn(n,(function(t){return Po(t)?function(n){return br(n,1===t.length?t[0]:t)}:t})):[ec];var r=-1;n=Nn(n,Zn(ii()));var u=jr(t,(function(t,e,u){var i=Nn(n,(function(n){return n(t)}));return{criteria:i,index:++r,value:t}}));return function(t){var n=t.length;for(t.sort((function(t,n){return function(t,n,e){for(var r=-1,u=t.criteria,i=n.criteria,o=u.length,a=e.length;++r<o;){var c=Eu(u[r],i[r]);if(c)return r>=a?c:c*("desc"==e[r]?-1:1)}return t.index-n.index}(t,n,e)}));n--;)t[n]=t[n].value;return t}(u)}function qr(t,n,e){for(var r=-1,u=n.length,i={};++r<u;){var o=n[r],a=br(t,o);e(a,o)&&Zr(i,du(o,t),a)}return i}function Pr(t,n,e,r){var u=r?Un:Bn,i=-1,o=n.length,a=t;for(t===n&&(n=Ou(n)),e&&(a=Nn(t,Zn(e)));++i<o;)for(var c=0,s=n[i],f=e?e(s):s;(c=u(a,f,c,r))>-1;)a!==t&&Ht.call(a,c,1),Ht.call(t,c,1);return t}function Vr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var u=n[e];if(e==r||u!==i){var i=u;vi(u)?Ht.call(t,u,1):cu(t,u)}}return t}function zr(t,n){return t+pn(Ae()*(n-t+1))}function Wr(t,n){var e="";if(!t||n<1||n>l)return e;do{n%2&&(e+=t),(n=pn(n/2))&&(t+=t)}while(n);return e}function Hr(t,n){return Ii(Ei(t,n,ec),t+"")}function Gr(t){return Ke($a(t))}function Kr(t,n){var e=$a(t);return ki(e,ir(n,0,e.length))}function Zr(t,n,e,r){if(!Xo(t))return t;for(var i=-1,o=(n=du(n,t)).length,a=o-1,c=t;null!=c&&++i<o;){var s=Mi(n[i]),f=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(i!=a){var l=c[s];(f=r?r(l,s,c):u)===u&&(f=Xo(l)?l:vi(n[i+1])?[]:{})}Xe(c,s,f),c=c[s]}return t}var Qr=Ie?function(t,n){return Ie.set(t,n),t}:ec,Jr=tn?function(t,n){return tn(t,"toString",{configurable:!0,enumerable:!1,value:Xa(n),writable:!0})}:ec;function Xr(t){return ki($a(t))}function tu(t,n,e){var u=-1,i=t.length;n<0&&(n=-n>i?0:i+n),(e=e>i?i:e)<0&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var o=r(i);++u<i;)o[u]=t[u+n];return o}function nu(t,n){var e;return fr(t,(function(t,r,u){return!(e=n(t,r,u))})),!!e}function eu(t,n,e){var r=0,u=null==t?r:t.length;if("number"==typeof n&&n==n&&u<=2147483647){for(;r<u;){var i=r+u>>>1,o=t[i];null!==o&&!aa(o)&&(e?o<=n:o<n)?r=i+1:u=i}return u}return ru(t,n,ec,e)}function ru(t,n,e,r){var i=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(n=e(n))!=n,c=null===n,s=aa(n),f=n===u;i<o;){var l=pn((i+o)/2),h=e(t[l]),_=h!==u,p=null===h,v=h==h,d=aa(h);if(a)var g=r||v;else g=f?v&&(r||_):c?v&&_&&(r||!p):s?v&&_&&!p&&(r||!d):!p&&!d&&(r?h<=n:h<n);g?i=l+1:o=l}return ge(o,4294967294)}function uu(t,n){for(var e=-1,r=t.length,u=0,i=[];++e<r;){var o=t[e],a=n?n(o):o;if(!e||!$o(a,c)){var c=a;i[u++]=0===o?0:o}}return i}function iu(t){return"number"==typeof t?t:aa(t)?h:+t}function ou(t){if("string"==typeof t)return t;if(Po(t))return Nn(t,ou)+"";if(aa(t))return Ye?Ye.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function au(t,n,e){var r=-1,u=Cn,i=t.length,o=!0,a=[],c=a;if(e)o=!1,u=kn;else if(i>=200){var s=n?null:Wu(t);if(s)return ce(s);o=!1,u=Jn,c=new We}else c=n?[]:a;t:for(;++r<i;){var f=t[r],l=n?n(f):f;if(f=e||0!==f?f:0,o&&l==l){for(var h=c.length;h--;)if(c[h]===l)continue t;n&&c.push(l),a.push(f)}else u(c,l,e)||(c!==a&&c.push(l),a.push(f))}return a}function cu(t,n){return null==(t=Di(t,n=du(n,t)))||delete t[Mi(Gi(n))]}function su(t,n,e,r){return Zr(t,n,e(br(t,n)),r)}function fu(t,n,e,r){for(var u=t.length,i=r?u:-1;(r?i--:++i<u)&&n(t[i],i,t););return e?tu(t,r?0:i,r?i+1:u):tu(t,r?i+1:0,r?u:i)}function lu(t,n){var e=t;return e instanceof qe&&(e=e.value()),Sn(n,(function(t,n){return n.func.apply(n.thisArg,xn([t],n.args))}),e)}function hu(t,n,e){var u=t.length;if(u<2)return u?au(t[0]):[];for(var i=-1,o=r(u);++i<u;)for(var a=t[i],c=-1;++c<u;)c!=i&&(o[i]=sr(o[i]||a,t[c],n,e));return au(vr(o,1),n,e)}function _u(t,n,e){for(var r=-1,i=t.length,o=n.length,a={};++r<i;){var c=r<o?n[r]:u;e(a,t[r],c)}return a}function pu(t){return Wo(t)?t:[]}function vu(t){return"function"==typeof t?t:ec}function du(t,n){return Po(t)?t:gi(t,n)?[t]:Si(ga(t))}var gu=Hr;function yu(t,n,e){var r=t.length;return e=e===u?r:e,!n&&e>=r?t:tu(t,n,e)}var Fu=an||function(t){return hn.clearTimeout(t)};function Au(t,n){if(n)return t.slice();var e=t.length,r=Pt?Pt(e):new t.constructor(e);return t.copy(r),r}function bu(t){var n=new t.constructor(t.byteLength);return new qt(n).set(new qt(t)),n}function mu(t,n){var e=n?bu(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Eu(t,n){if(t!==n){var e=t!==u,r=null===t,i=t==t,o=aa(t),a=n!==u,c=null===n,s=n==n,f=aa(n);if(!c&&!f&&!o&&t>n||o&&a&&s&&!c&&!f||r&&a&&s||!e&&s||!i)return 1;if(!r&&!o&&!f&&t<n||f&&e&&i&&!r&&!o||c&&e&&i||!a&&i||!s)return-1}return 0}function Du(t,n,e,u){for(var i=-1,o=t.length,a=e.length,c=-1,s=n.length,f=de(o-a,0),l=r(s+f),h=!u;++c<s;)l[c]=n[c];for(;++i<a;)(h||i<o)&&(l[e[i]]=t[i]);for(;f--;)l[c++]=t[i++];return l}function wu(t,n,e,u){for(var i=-1,o=t.length,a=-1,c=e.length,s=-1,f=n.length,l=de(o-c,0),h=r(l+f),_=!u;++i<l;)h[i]=t[i];for(var p=i;++s<f;)h[p+s]=n[s];for(;++a<c;)(_||i<o)&&(h[p+e[a]]=t[i++]);return h}function Ou(t,n){var e=-1,u=t.length;for(n||(n=r(u));++e<u;)n[e]=t[e];return n}function Tu(t,n,e,r){var i=!e;e||(e={});for(var o=-1,a=n.length;++o<a;){var c=n[o],s=r?r(e[c],t[c],c,e,t):u;s===u&&(s=t[c]),i?rr(e,c,s):Xe(e,c,s)}return e}function Iu(t,n){return function(e,r){var u=Po(e)?wn:nr,i=n?n():{};return u(e,t,ii(r,2),i)}}function Ru(t){return Hr((function(n,e){var r=-1,i=e.length,o=i>1?e[i-1]:u,a=i>2?e[2]:u;for(o=t.length>3&&"function"==typeof o?(i--,o):u,a&&di(e[0],e[1],a)&&(o=i<3?u:o,i=1),n=Dt(n);++r<i;){var c=e[r];c&&t(n,c,r,o)}return n}))}function Cu(t,n){return function(e,r){if(null==e)return e;if(!zo(e))return t(e,r);for(var u=e.length,i=n?u:-1,o=Dt(e);(n?i--:++i<u)&&!1!==r(o[i],i,o););return e}}function ku(t){return function(n,e,r){for(var u=-1,i=Dt(n),o=r(n),a=o.length;a--;){var c=o[t?a:++u];if(!1===e(i[c],c,i))break}return n}}function Nu(t){return function(n){var e=ue(n=ga(n))?le(n):u,r=e?e[0]:n.charAt(0),i=e?yu(e,1).join(""):n.slice(1);return r[t]()+i}}function xu(t){return function(n){return Sn(Za(qa(n).replace(Zt,"")),t,"")}}function Su(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=$e(t.prototype),r=t.apply(e,n);return Xo(r)?r:e}}function Mu(t){return function(n,e,r){var i=Dt(n);if(!zo(n)){var o=ii(e,3);n=Ca(n),e=function(t){return o(i[t],t,i)}}var a=t(n,e,r);return a>-1?i[o?n[a]:a]:u}}function ju(t){return Xu((function(n){var e=n.length,r=e,o=Ue.prototype.thru;for(t&&n.reverse();r--;){var a=n[r];if("function"!=typeof a)throw new Tt(i);if(o&&!c&&"wrapper"==ri(a))var c=new Ue([],!0)}for(r=c?r:e;++r<e;){var s=ri(a=n[r]),f="wrapper"==s?ei(a):u;c=f&&yi(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?c[ri(f[0])].apply(c,f[3]):1==a.length&&yi(a)?c[s]():c.thru(a)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&Po(r))return c.plant(r).value();for(var u=0,i=e?n[u].apply(this,t):r;++u<e;)i=n[u].call(this,i);return i}}))}function Yu(t,n,e,i,o,a,c,f,l,h){var _=n&s,p=1&n,v=2&n,d=24&n,g=512&n,y=v?u:Su(t);return function s(){for(var F=arguments.length,A=r(F),b=F;b--;)A[b]=arguments[b];if(d)var m=ui(s),E=function(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}(A,m);if(i&&(A=Du(A,i,o,d)),a&&(A=wu(A,a,c,d)),F-=E,d&&F<h){var D=ae(A,m);return Vu(t,n,Yu,s.placeholder,e,A,D,f,l,h-F)}var w=p?e:this,O=v?w[t]:t;return F=A.length,f?A=function(t,n){for(var e=t.length,r=ge(n.length,e),i=Ou(t);r--;){var o=n[r];t[r]=vi(o,e)?i[o]:u}return t}(A,f):g&&F>1&&A.reverse(),_&&l<F&&(A.length=l),this&&this!==hn&&this instanceof s&&(O=y||Su(O)),O.apply(w,A)}}function Lu(t,n){return function(e,r){return function(t,n,e,r){return yr(t,(function(t,u,i){n(r,e(t),u,i)})),r}(e,t,n(r),{})}}function $u(t,n){return function(e,r){var i;if(e===u&&r===u)return n;if(e!==u&&(i=e),r!==u){if(i===u)return r;"string"==typeof e||"string"==typeof r?(e=ou(e),r=ou(r)):(e=iu(e),r=iu(r)),i=t(e,r)}return i}}function Bu(t){return Xu((function(n){return n=Nn(n,Zn(ii())),Hr((function(e){var r=this;return t(n,(function(t){return Dn(t,r,e)}))}))}))}function Uu(t,n){var e=(n=n===u?" ":ou(n)).length;if(e<2)return e?Wr(n,t):n;var r=Wr(n,_n(t/fe(n)));return ue(n)?yu(le(r),0,t).join(""):r.slice(0,t)}function qu(t){return function(n,e,i){return i&&"number"!=typeof i&&di(n,e,i)&&(e=i=u),n=ha(n),e===u?(e=n,n=0):e=ha(e),function(t,n,e,u){for(var i=-1,o=de(_n((n-t)/(e||1)),0),a=r(o);o--;)a[u?o:++i]=t,t+=e;return a}(n,e,i=i===u?n<e?1:-1:ha(i),t)}}function Pu(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=va(n),e=va(e)),t(n,e)}}function Vu(t,n,e,r,i,o,a,s,f,l){var h=8&n;n|=h?c:64,4&(n&=~(h?64:c))||(n&=-4);var _=[t,n,i,h?o:u,h?a:u,h?u:o,h?u:a,s,f,l],p=e.apply(u,_);return yi(t)&&Oi(p,_),p.placeholder=r,Ri(p,t,n)}function zu(t){var n=Et[t];return function(t,e){if(t=va(t),(e=null==e?0:ge(_a(e),292))&&Yn(t)){var r=(ga(t)+"e").split("e");return+((r=(ga(n(r[0]+"e"+(+r[1]+e)))+"e").split("e"))[0]+"e"+(+r[1]-e))}return n(t)}}var Wu=we&&1/ce(new we([,-0]))[1]==f?function(t){return new we(t)}:ac;function Hu(t){return function(n){var e=li(n);return e==m?ie(n):e==T?se(n):function(t,n){return Nn(n,(function(n){return[n,t[n]]}))}(n,t(n))}}function Gu(t,n,e,o,f,l,h,_){var p=2&n;if(!p&&"function"!=typeof t)throw new Tt(i);var v=o?o.length:0;if(v||(n&=-97,o=f=u),h=h===u?h:de(_a(h),0),_=_===u?_:_a(_),v-=f?f.length:0,64&n){var d=o,g=f;o=f=u}var y=p?u:ei(t),F=[t,n,e,o,f,d,g,l,h,_];if(y&&function(t,n){var e=t[1],r=n[1],u=e|r,i=u<131,o=r==s&&8==e||r==s&&256==e&&t[7].length<=n[8]||384==r&&n[7].length<=n[8]&&8==e;if(!i&&!o)return t;1&r&&(t[2]=n[2],u|=1&e?0:4);var c=n[3];if(c){var f=t[3];t[3]=f?Du(f,c,n[4]):c,t[4]=f?ae(t[3],a):n[4]}(c=n[5])&&(f=t[5],t[5]=f?wu(f,c,n[6]):c,t[6]=f?ae(t[5],a):n[6]),(c=n[7])&&(t[7]=c),r&s&&(t[8]=null==t[8]?n[8]:ge(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=u}(F,y),t=F[0],n=F[1],e=F[2],o=F[3],f=F[4],!(_=F[9]=F[9]===u?p?0:t.length:de(F[9]-v,0))&&24&n&&(n&=-25),n&&1!=n)A=8==n||16==n?function(t,n,e){var i=Su(t);return function o(){for(var a=arguments.length,c=r(a),s=a,f=ui(o);s--;)c[s]=arguments[s];var l=a<3&&c[0]!==f&&c[a-1]!==f?[]:ae(c,f);return(a-=l.length)<e?Vu(t,n,Yu,o.placeholder,u,c,l,u,u,e-a):Dn(this&&this!==hn&&this instanceof o?i:t,this,c)}}(t,n,_):n!=c&&33!=n||f.length?Yu.apply(u,F):function(t,n,e,u){var i=1&n,o=Su(t);return function n(){for(var a=-1,c=arguments.length,s=-1,f=u.length,l=r(f+c),h=this&&this!==hn&&this instanceof n?o:t;++s<f;)l[s]=u[s];for(;c--;)l[s++]=arguments[++a];return Dn(h,i?e:this,l)}}(t,n,e,o);else var A=function(t,n,e){var r=1&n,u=Su(t);return function n(){return(this&&this!==hn&&this instanceof n?u:t).apply(r?e:this,arguments)}}(t,n,e);return Ri((y?Qr:Oi)(A,F),t,n)}function Ku(t,n,e,r){return t===u||$o(t,Ct[e])&&!xt.call(r,e)?n:t}function Zu(t,n,e,r,i,o){return Xo(t)&&Xo(n)&&(o.set(n,t),$r(t,n,u,Zu,o),o.delete(n)),t}function Qu(t){return ra(t)?u:t}function Ju(t,n,e,r,i,o){var a=1&e,c=t.length,s=n.length;if(c!=s&&!(a&&s>c))return!1;var f=o.get(t),l=o.get(n);if(f&&l)return f==n&&l==t;var h=-1,_=!0,p=2&e?new We:u;for(o.set(t,n),o.set(n,t);++h<c;){var v=t[h],d=n[h];if(r)var g=a?r(d,v,h,n,t,o):r(v,d,h,t,n,o);if(g!==u){if(g)continue;_=!1;break}if(p){if(!jn(n,(function(t,n){if(!Jn(p,n)&&(v===t||i(v,t,e,r,o)))return p.push(n)}))){_=!1;break}}else if(v!==d&&!i(v,d,e,r,o)){_=!1;break}}return o.delete(t),o.delete(n),_}function Xu(t){return Ii(Ei(t,u,Pi),t+"")}function ti(t){return mr(t,Ca,si)}function ni(t){return mr(t,ka,fi)}var ei=Ie?function(t){return Ie.get(t)}:ac;function ri(t){for(var n=t.name+"",e=Re[n],r=xt.call(Re,n)?e.length:0;r--;){var u=e[r],i=u.func;if(null==i||i==t)return u.name}return n}function ui(t){return(xt.call(Le,"placeholder")?Le:t).placeholder}function ii(){var t=Le.iteratee||rc;return t=t===rc?xr:t,arguments.length?t(arguments[0],arguments[1]):t}function oi(t,n){var e,r,u=t.__data__;return("string"==(r=typeof(e=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?u["string"==typeof n?"string":"hash"]:u.map}function ai(t){for(var n=Ca(t),e=n.length;e--;){var r=n[e],u=t[r];n[e]=[r,u,bi(u)]}return n}function ci(t,n){var e=function(t,n){return null==t?u:t[n]}(t,n);return Nr(e)?e:u}var si=dn?function(t){return null==t?[]:(t=Dt(t),Rn(dn(t),(function(n){return Wt.call(t,n)})))}:pc,fi=dn?function(t){for(var n=[];t;)xn(n,si(t)),t=Vt(t);return n}:pc,li=Er;function hi(t,n,e){for(var r=-1,u=(n=du(n,t)).length,i=!1;++r<u;){var o=Mi(n[r]);if(!(i=null!=t&&e(t,o)))break;t=t[o]}return i||++r!=u?i:!!(u=null==t?0:t.length)&&Jo(u)&&vi(o,u)&&(Po(t)||qo(t))}function _i(t){return"function"!=typeof t.constructor||Ai(t)?{}:$e(Vt(t))}function pi(t){return Po(t)||qo(t)||!!(Gt&&t&&t[Gt])}function vi(t,n){var e=typeof t;return!!(n=null==n?l:n)&&("number"==e||"symbol"!=e&&gt.test(t))&&t>-1&&t%1==0&&t<n}function di(t,n,e){if(!Xo(e))return!1;var r=typeof n;return!!("number"==r?zo(e)&&vi(n,e.length):"string"==r&&n in e)&&$o(e[n],t)}function gi(t,n){if(Po(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!aa(t))||X.test(t)||!J.test(t)||null!=n&&t in Dt(n)}function yi(t){var n=ri(t),e=Le[n];if("function"!=typeof e||!(n in qe.prototype))return!1;if(t===e)return!0;var r=ei(e);return!!r&&t===r[0]}(me&&li(new me(new ArrayBuffer(1)))!=N||Ee&&li(new Ee)!=m||De&&li(De.resolve())!=w||we&&li(new we)!=T||Oe&&li(new Oe)!=C)&&(li=function(t){var n=Er(t),e=n==D?t.constructor:u,r=e?ji(e):"";if(r)switch(r){case Ce:return N;case ke:return m;case Ne:return w;case xe:return T;case Se:return C}return n});var Fi=kt?Zo:vc;function Ai(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Ct)}function bi(t){return t==t&&!Xo(t)}function mi(t,n){return function(e){return null!=e&&e[t]===n&&(n!==u||t in Dt(e))}}function Ei(t,n,e){return n=de(n===u?t.length-1:n,0),function(){for(var u=arguments,i=-1,o=de(u.length-n,0),a=r(o);++i<o;)a[i]=u[n+i];i=-1;for(var c=r(n+1);++i<n;)c[i]=u[i];return c[n]=e(a),Dn(t,this,c)}}function Di(t,n){return n.length<2?t:br(t,tu(n,0,-1))}function wi(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var Oi=Ci(Qr),Ti=ln||function(t,n){return hn.setTimeout(t,n)},Ii=Ci(Jr);function Ri(t,n,e){var r=n+"";return Ii(t,function(t,n){var e=n.length;if(!e)return t;var r=e-1;return n[r]=(e>1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return On(p,(function(e){var r="_."+e[0];n&e[1]&&!Cn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(ot);return n?n[1].split(at):[]}(r),e)))}function Ci(t){var n=0,e=0;return function(){var r=ye(),i=16-(r-e);if(e=r,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(u,arguments)}}function ki(t,n){var e=-1,r=t.length,i=r-1;for(n=n===u?r:n;++e<n;){var o=zr(e,i),a=t[o];t[o]=t[e],t[e]=a}return t.length=n,t}var Ni,xi,Si=(Ni=xo((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(tt,(function(t,e,r,u){n.push(r?u.replace(ft,"$1"):e||t)})),n}),(function(t){return 500===xi.size&&xi.clear(),t})),xi=Ni.cache,Ni);function Mi(t){if("string"==typeof t||aa(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function ji(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Yi(t){if(t instanceof qe)return t.clone();var n=new Ue(t.__wrapped__,t.__chain__);return n.__actions__=Ou(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}var Li=Hr((function(t,n){return Wo(t)?sr(t,vr(n,1,Wo,!0)):[]})),$i=Hr((function(t,n){var e=Gi(n);return Wo(e)&&(e=u),Wo(t)?sr(t,vr(n,1,Wo,!0),ii(e,2)):[]})),Bi=Hr((function(t,n){var e=Gi(n);return Wo(e)&&(e=u),Wo(t)?sr(t,vr(n,1,Wo,!0),u,e):[]}));function Ui(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var u=null==e?0:_a(e);return u<0&&(u=de(r+u,0)),$n(t,ii(n,3),u)}function qi(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return e!==u&&(i=_a(e),i=e<0?de(r+i,0):ge(i,r-1)),$n(t,ii(n,3),i,!0)}function Pi(t){return null!=t&&t.length?vr(t,1):[]}function Vi(t){return t&&t.length?t[0]:u}var zi=Hr((function(t){var n=Nn(t,pu);return n.length&&n[0]===t[0]?Tr(n):[]})),Wi=Hr((function(t){var n=Gi(t),e=Nn(t,pu);return n===Gi(e)?n=u:e.pop(),e.length&&e[0]===t[0]?Tr(e,ii(n,2)):[]})),Hi=Hr((function(t){var n=Gi(t),e=Nn(t,pu);return(n="function"==typeof n?n:u)&&e.pop(),e.length&&e[0]===t[0]?Tr(e,u,n):[]}));function Gi(t){var n=null==t?0:t.length;return n?t[n-1]:u}var Ki=Hr(Zi);function Zi(t,n){return t&&t.length&&n&&n.length?Pr(t,n):t}var Qi=Xu((function(t,n){var e=null==t?0:t.length,r=ur(t,n);return Vr(t,Nn(n,(function(t){return vi(t,e)?+t:t})).sort(Eu)),r}));function Ji(t){return null==t?t:be.call(t)}var Xi=Hr((function(t){return au(vr(t,1,Wo,!0))})),to=Hr((function(t){var n=Gi(t);return Wo(n)&&(n=u),au(vr(t,1,Wo,!0),ii(n,2))})),no=Hr((function(t){var n=Gi(t);return n="function"==typeof n?n:u,au(vr(t,1,Wo,!0),u,n)}));function eo(t){if(!t||!t.length)return[];var n=0;return t=Rn(t,(function(t){if(Wo(t))return n=de(t.length,n),!0})),Gn(n,(function(n){return Nn(t,Vn(n))}))}function ro(t,n){if(!t||!t.length)return[];var e=eo(t);return null==n?e:Nn(e,(function(t){return Dn(n,u,t)}))}var uo=Hr((function(t,n){return Wo(t)?sr(t,n):[]})),io=Hr((function(t){return hu(Rn(t,Wo))})),oo=Hr((function(t){var n=Gi(t);return Wo(n)&&(n=u),hu(Rn(t,Wo),ii(n,2))})),ao=Hr((function(t){var n=Gi(t);return n="function"==typeof n?n:u,hu(Rn(t,Wo),u,n)})),co=Hr(eo),so=Hr((function(t){var n=t.length,e=n>1?t[n-1]:u;return e="function"==typeof e?(t.pop(),e):u,ro(t,e)}));function fo(t){var n=Le(t);return n.__chain__=!0,n}function lo(t,n){return n(t)}var ho=Xu((function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(n){return ur(n,t)};return!(n>1||this.__actions__.length)&&r instanceof qe&&vi(e)?((r=r.slice(e,+e+(n?1:0))).__actions__.push({func:lo,args:[i],thisArg:u}),new Ue(r,this.__chain__).thru((function(t){return n&&!t.length&&t.push(u),t}))):this.thru(i)})),_o=Iu((function(t,n,e){xt.call(t,e)?++t[e]:rr(t,e,1)})),po=Mu(Ui),vo=Mu(qi);function go(t,n){return(Po(t)?On:fr)(t,ii(n,3))}function yo(t,n){return(Po(t)?Tn:lr)(t,ii(n,3))}var Fo=Iu((function(t,n,e){xt.call(t,e)?t[e].push(n):rr(t,e,[n])})),Ao=Hr((function(t,n,e){var u=-1,i="function"==typeof n,o=zo(t)?r(t.length):[];return fr(t,(function(t){o[++u]=i?Dn(n,t,e):Ir(t,n,e)})),o})),bo=Iu((function(t,n,e){rr(t,e,n)}));function mo(t,n){return(Po(t)?Nn:jr)(t,ii(n,3))}var Eo=Iu((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]})),Do=Hr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&di(t,n[0],n[1])?n=[]:e>2&&di(n[0],n[1],n[2])&&(n=[n[0]]),Ur(t,vr(n,1),[])})),wo=fn||function(){return hn.Date.now()};function Oo(t,n,e){return n=e?u:n,n=t&&null==n?t.length:n,Gu(t,s,u,u,u,u,n)}function To(t,n){var e;if("function"!=typeof n)throw new Tt(i);return t=_a(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=u),e}}var Io=Hr((function(t,n,e){var r=1;if(e.length){var u=ae(e,ui(Io));r|=c}return Gu(t,r,n,e,u)})),Ro=Hr((function(t,n,e){var r=3;if(e.length){var u=ae(e,ui(Ro));r|=c}return Gu(n,r,t,e,u)}));function Co(t,n,e){var r,o,a,c,s,f,l=0,h=!1,_=!1,p=!0;if("function"!=typeof t)throw new Tt(i);function v(n){var e=r,i=o;return r=o=u,l=n,c=t.apply(i,e)}function d(t){var e=t-f;return f===u||e>=n||e<0||_&&t-l>=a}function g(){var t=wo();if(d(t))return y(t);s=Ti(g,function(t){var e=n-(t-f);return _?ge(e,a-(t-l)):e}(t))}function y(t){return s=u,p&&r?v(t):(r=o=u,c)}function F(){var t=wo(),e=d(t);if(r=arguments,o=this,f=t,e){if(s===u)return function(t){return l=t,s=Ti(g,n),h?v(t):c}(f);if(_)return Fu(s),s=Ti(g,n),v(f)}return s===u&&(s=Ti(g,n)),c}return n=va(n)||0,Xo(e)&&(h=!!e.leading,a=(_="maxWait"in e)?de(va(e.maxWait)||0,n):a,p="trailing"in e?!!e.trailing:p),F.cancel=function(){s!==u&&Fu(s),l=0,r=f=o=s=u},F.flush=function(){return s===u?c:y(wo())},F}var ko=Hr((function(t,n){return cr(t,1,n)})),No=Hr((function(t,n,e){return cr(t,va(n)||0,e)}));function xo(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Tt(i);var e=function(){var r=arguments,u=n?n.apply(this,r):r[0],i=e.cache;if(i.has(u))return i.get(u);var o=t.apply(this,r);return e.cache=i.set(u,o)||i,o};return e.cache=new(xo.Cache||ze),e}function So(t){if("function"!=typeof t)throw new Tt(i);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}xo.Cache=ze;var Mo=gu((function(t,n){var e=(n=1==n.length&&Po(n[0])?Nn(n[0],Zn(ii())):Nn(vr(n,1),Zn(ii()))).length;return Hr((function(r){for(var u=-1,i=ge(r.length,e);++u<i;)r[u]=n[u].call(this,r[u]);return Dn(t,this,r)}))})),jo=Hr((function(t,n){var e=ae(n,ui(jo));return Gu(t,c,u,n,e)})),Yo=Hr((function(t,n){var e=ae(n,ui(Yo));return Gu(t,64,u,n,e)})),Lo=Xu((function(t,n){return Gu(t,256,u,u,u,n)}));function $o(t,n){return t===n||t!=t&&n!=n}var Bo=Pu(Dr),Uo=Pu((function(t,n){return t>=n})),qo=Rr(function(){return arguments}())?Rr:function(t){return ta(t)&&xt.call(t,"callee")&&!Wt.call(t,"callee")},Po=r.isArray,Vo=yn?Zn(yn):function(t){return ta(t)&&Er(t)==k};function zo(t){return null!=t&&Jo(t.length)&&!Zo(t)}function Wo(t){return ta(t)&&zo(t)}var Ho=gn||vc,Go=Fn?Zn(Fn):function(t){return ta(t)&&Er(t)==y};function Ko(t){if(!ta(t))return!1;var n=Er(t);return n==F||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Zo(t){if(!Xo(t))return!1;var n=Er(t);return n==A||n==b||"[object AsyncFunction]"==n||"[object Proxy]"==n}function Qo(t){return"number"==typeof t&&t==_a(t)}function Jo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Xo(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function ta(t){return null!=t&&"object"==typeof t}var na=An?Zn(An):function(t){return ta(t)&&li(t)==m};function ea(t){return"number"==typeof t||ta(t)&&Er(t)==E}function ra(t){if(!ta(t)||Er(t)!=D)return!1;var n=Vt(t);if(null===n)return!0;var e=xt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Nt.call(e)==Yt}var ua=bn?Zn(bn):function(t){return ta(t)&&Er(t)==O},ia=mn?Zn(mn):function(t){return ta(t)&&li(t)==T};function oa(t){return"string"==typeof t||!Po(t)&&ta(t)&&Er(t)==I}function aa(t){return"symbol"==typeof t||ta(t)&&Er(t)==R}var ca=En?Zn(En):function(t){return ta(t)&&Jo(t.length)&&!!un[Er(t)]},sa=Pu(Mr),fa=Pu((function(t,n){return t<=n}));function la(t){if(!t)return[];if(zo(t))return oa(t)?le(t):Ou(t);if(Kt&&t[Kt])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[Kt]());var n=li(t);return(n==m?ie:n==T?ce:$a)(t)}function ha(t){return t?(t=va(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function _a(t){var n=ha(t),e=n%1;return n==n?e?n-e:n:0}function pa(t){return t?ir(_a(t),0,_):0}function va(t){if("number"==typeof t)return t;if(aa(t))return h;if(Xo(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=Xo(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Kn(t);var e=pt.test(t);return e||dt.test(t)?sn(t.slice(2),e?2:8):_t.test(t)?h:+t}function da(t){return Tu(t,ka(t))}function ga(t){return null==t?"":ou(t)}var ya=Ru((function(t,n){if(Ai(n)||zo(n))Tu(n,Ca(n),t);else for(var e in n)xt.call(n,e)&&Xe(t,e,n[e])})),Fa=Ru((function(t,n){Tu(n,ka(n),t)})),Aa=Ru((function(t,n,e,r){Tu(n,ka(n),t,r)})),ba=Ru((function(t,n,e,r){Tu(n,Ca(n),t,r)})),ma=Xu(ur),Ea=Hr((function(t,n){t=Dt(t);var e=-1,r=n.length,i=r>2?n[2]:u;for(i&&di(n[0],n[1],i)&&(r=1);++e<r;)for(var o=n[e],a=ka(o),c=-1,s=a.length;++c<s;){var f=a[c],l=t[f];(l===u||$o(l,Ct[f])&&!xt.call(t,f))&&(t[f]=o[f])}return t})),Da=Hr((function(t){return t.push(u,Zu),Dn(xa,u,t)}));function wa(t,n,e){var r=null==t?u:br(t,n);return r===u?e:r}function Oa(t,n){return null!=t&&hi(t,n,Or)}var Ta=Lu((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=jt.call(n)),t[n]=e}),Xa(ec)),Ia=Lu((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=jt.call(n)),xt.call(t,n)?t[n].push(e):t[n]=[e]}),ii),Ra=Hr(Ir);function Ca(t){return zo(t)?Ge(t):Sr(t)}function ka(t){return zo(t)?Ge(t,!0):function(t){if(!Xo(t))return function(t){var n=[];if(null!=t)for(var e in Dt(t))n.push(e);return n}(t);var n=Ai(t),e=[];for(var r in t)("constructor"!=r||!n&&xt.call(t,r))&&e.push(r);return e}(t)}var Na=Ru((function(t,n,e){$r(t,n,e)})),xa=Ru((function(t,n,e,r){$r(t,n,e,r)})),Sa=Xu((function(t,n){var e={};if(null==t)return e;var r=!1;n=Nn(n,(function(n){return n=du(n,t),r||(r=n.length>1),n})),Tu(t,ni(t),e),r&&(e=or(e,7,Qu));for(var u=n.length;u--;)cu(e,n[u]);return e})),Ma=Xu((function(t,n){return null==t?{}:function(t,n){return qr(t,n,(function(n,e){return Oa(t,e)}))}(t,n)}));function ja(t,n){if(null==t)return{};var e=Nn(ni(t),(function(t){return[t]}));return n=ii(n),qr(t,e,(function(t,e){return n(t,e[0])}))}var Ya=Hu(Ca),La=Hu(ka);function $a(t){return null==t?[]:Qn(t,Ca(t))}var Ba=xu((function(t,n,e){return n=n.toLowerCase(),t+(e?Ua(n):n)}));function Ua(t){return Ka(ga(t).toLowerCase())}function qa(t){return(t=ga(t))&&t.replace(yt,ne).replace(Qt,"")}var Pa=xu((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Va=xu((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),za=Nu("toLowerCase"),Wa=xu((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()})),Ha=xu((function(t,n,e){return t+(e?" ":"")+Ka(n)})),Ga=xu((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Ka=Nu("toUpperCase");function Za(t,n,e){return t=ga(t),(n=e?u:n)===u?function(t){return nn.test(t)}(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(n)||[]}var Qa=Hr((function(t,n){try{return Dn(t,u,n)}catch(t){return Ko(t)?t:new bt(t)}})),Ja=Xu((function(t,n){return On(n,(function(n){n=Mi(n),rr(t,n,Io(t[n],t))})),t}));function Xa(t){return function(){return t}}var tc=ju(),nc=ju(!0);function ec(t){return t}function rc(t){return xr("function"==typeof t?t:or(t,1))}var uc=Hr((function(t,n){return function(e){return Ir(e,t,n)}})),ic=Hr((function(t,n){return function(e){return Ir(t,e,n)}}));function oc(t,n,e){var r=Ca(n),u=Ar(n,r);null!=e||Xo(n)&&(u.length||!r.length)||(e=n,n=t,t=this,u=Ar(n,Ca(n)));var i=!(Xo(e)&&"chain"in e&&!e.chain),o=Zo(t);return On(u,(function(e){var r=n[e];t[e]=r,o&&(t.prototype[e]=function(){var n=this.__chain__;if(i||n){var e=t(this.__wrapped__);return(e.__actions__=Ou(this.__actions__)).push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,xn([this.value()],arguments))})})),t}function ac(){}var cc=Bu(Nn),sc=Bu(In),fc=Bu(jn);function lc(t){return gi(t)?Vn(Mi(t)):function(t){return function(n){return br(n,t)}}(t)}var hc=qu(),_c=qu(!0);function pc(){return[]}function vc(){return!1}var dc,gc=$u((function(t,n){return t+n}),0),yc=zu("ceil"),Fc=$u((function(t,n){return t/n}),1),Ac=zu("floor"),bc=$u((function(t,n){return t*n}),1),mc=zu("round"),Ec=$u((function(t,n){return t-n}),0);return Le.after=function(t,n){if("function"!=typeof n)throw new Tt(i);return t=_a(t),function(){if(--t<1)return n.apply(this,arguments)}},Le.ary=Oo,Le.assign=ya,Le.assignIn=Fa,Le.assignInWith=Aa,Le.assignWith=ba,Le.at=ma,Le.before=To,Le.bind=Io,Le.bindAll=Ja,Le.bindKey=Ro,Le.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Po(t)?t:[t]},Le.chain=fo,Le.chunk=function(t,n,e){n=(e?di(t,n,e):n===u)?1:de(_a(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,a=0,c=r(_n(i/n));o<i;)c[a++]=tu(t,o,o+=n);return c},Le.compact=function(t){for(var n=-1,e=null==t?0:t.length,r=0,u=[];++n<e;){var i=t[n];i&&(u[r++]=i)}return u},Le.concat=function(){var t=arguments.length;if(!t)return[];for(var n=r(t-1),e=arguments[0],u=t;u--;)n[u-1]=arguments[u];return xn(Po(e)?Ou(e):[e],vr(n,1))},Le.cond=function(t){var n=null==t?0:t.length,e=ii();return t=n?Nn(t,(function(t){if("function"!=typeof t[1])throw new Tt(i);return[e(t[0]),t[1]]})):[],Hr((function(e){for(var r=-1;++r<n;){var u=t[r];if(Dn(u[0],this,e))return Dn(u[1],this,e)}}))},Le.conforms=function(t){return function(t){var n=Ca(t);return function(e){return ar(e,t,n)}}(or(t,1))},Le.constant=Xa,Le.countBy=_o,Le.create=function(t,n){var e=$e(t);return null==n?e:er(e,n)},Le.curry=function t(n,e,r){var i=Gu(n,8,u,u,u,u,u,e=r?u:e);return i.placeholder=t.placeholder,i},Le.curryRight=function t(n,e,r){var i=Gu(n,16,u,u,u,u,u,e=r?u:e);return i.placeholder=t.placeholder,i},Le.debounce=Co,Le.defaults=Ea,Le.defaultsDeep=Da,Le.defer=ko,Le.delay=No,Le.difference=Li,Le.differenceBy=$i,Le.differenceWith=Bi,Le.drop=function(t,n,e){var r=null==t?0:t.length;return r?tu(t,(n=e||n===u?1:_a(n))<0?0:n,r):[]},Le.dropRight=function(t,n,e){var r=null==t?0:t.length;return r?tu(t,0,(n=r-(n=e||n===u?1:_a(n)))<0?0:n):[]},Le.dropRightWhile=function(t,n){return t&&t.length?fu(t,ii(n,3),!0,!0):[]},Le.dropWhile=function(t,n){return t&&t.length?fu(t,ii(n,3),!0):[]},Le.fill=function(t,n,e,r){var i=null==t?0:t.length;return i?(e&&"number"!=typeof e&&di(t,n,e)&&(e=0,r=i),function(t,n,e,r){var i=t.length;for((e=_a(e))<0&&(e=-e>i?0:i+e),(r=r===u||r>i?i:_a(r))<0&&(r+=i),r=e>r?0:pa(r);e<r;)t[e++]=n;return t}(t,n,e,r)):[]},Le.filter=function(t,n){return(Po(t)?Rn:pr)(t,ii(n,3))},Le.flatMap=function(t,n){return vr(mo(t,n),1)},Le.flatMapDeep=function(t,n){return vr(mo(t,n),f)},Le.flatMapDepth=function(t,n,e){return e=e===u?1:_a(e),vr(mo(t,n),e)},Le.flatten=Pi,Le.flattenDeep=function(t){return null!=t&&t.length?vr(t,f):[]},Le.flattenDepth=function(t,n){return null!=t&&t.length?vr(t,n=n===u?1:_a(n)):[]},Le.flip=function(t){return Gu(t,512)},Le.flow=tc,Le.flowRight=nc,Le.fromPairs=function(t){for(var n=-1,e=null==t?0:t.length,r={};++n<e;){var u=t[n];r[u[0]]=u[1]}return r},Le.functions=function(t){return null==t?[]:Ar(t,Ca(t))},Le.functionsIn=function(t){return null==t?[]:Ar(t,ka(t))},Le.groupBy=Fo,Le.initial=function(t){return null!=t&&t.length?tu(t,0,-1):[]},Le.intersection=zi,Le.intersectionBy=Wi,Le.intersectionWith=Hi,Le.invert=Ta,Le.invertBy=Ia,Le.invokeMap=Ao,Le.iteratee=rc,Le.keyBy=bo,Le.keys=Ca,Le.keysIn=ka,Le.map=mo,Le.mapKeys=function(t,n){var e={};return n=ii(n,3),yr(t,(function(t,r,u){rr(e,n(t,r,u),t)})),e},Le.mapValues=function(t,n){var e={};return n=ii(n,3),yr(t,(function(t,r,u){rr(e,r,n(t,r,u))})),e},Le.matches=function(t){return Yr(or(t,1))},Le.matchesProperty=function(t,n){return Lr(t,or(n,1))},Le.memoize=xo,Le.merge=Na,Le.mergeWith=xa,Le.method=uc,Le.methodOf=ic,Le.mixin=oc,Le.negate=So,Le.nthArg=function(t){return t=_a(t),Hr((function(n){return Br(n,t)}))},Le.omit=Sa,Le.omitBy=function(t,n){return ja(t,So(ii(n)))},Le.once=function(t){return To(2,t)},Le.orderBy=function(t,n,e,r){return null==t?[]:(Po(n)||(n=null==n?[]:[n]),Po(e=r?u:e)||(e=null==e?[]:[e]),Ur(t,n,e))},Le.over=cc,Le.overArgs=Mo,Le.overEvery=sc,Le.overSome=fc,Le.partial=jo,Le.partialRight=Yo,Le.partition=Eo,Le.pick=Ma,Le.pickBy=ja,Le.property=lc,Le.propertyOf=function(t){return function(n){return null==t?u:br(t,n)}},Le.pull=Ki,Le.pullAll=Zi,Le.pullAllBy=function(t,n,e){return t&&t.length&&n&&n.length?Pr(t,n,ii(e,2)):t},Le.pullAllWith=function(t,n,e){return t&&t.length&&n&&n.length?Pr(t,n,u,e):t},Le.pullAt=Qi,Le.range=hc,Le.rangeRight=_c,Le.rearg=Lo,Le.reject=function(t,n){return(Po(t)?Rn:pr)(t,So(ii(n,3)))},Le.remove=function(t,n){var e=[];if(!t||!t.length)return e;var r=-1,u=[],i=t.length;for(n=ii(n,3);++r<i;){var o=t[r];n(o,r,t)&&(e.push(o),u.push(r))}return Vr(t,u),e},Le.rest=function(t,n){if("function"!=typeof t)throw new Tt(i);return Hr(t,n=n===u?n:_a(n))},Le.reverse=Ji,Le.sampleSize=function(t,n,e){return n=(e?di(t,n,e):n===u)?1:_a(n),(Po(t)?Ze:Kr)(t,n)},Le.set=function(t,n,e){return null==t?t:Zr(t,n,e)},Le.setWith=function(t,n,e,r){return r="function"==typeof r?r:u,null==t?t:Zr(t,n,e,r)},Le.shuffle=function(t){return(Po(t)?Qe:Xr)(t)},Le.slice=function(t,n,e){var r=null==t?0:t.length;return r?(e&&"number"!=typeof e&&di(t,n,e)?(n=0,e=r):(n=null==n?0:_a(n),e=e===u?r:_a(e)),tu(t,n,e)):[]},Le.sortBy=Do,Le.sortedUniq=function(t){return t&&t.length?uu(t):[]},Le.sortedUniqBy=function(t,n){return t&&t.length?uu(t,ii(n,2)):[]},Le.split=function(t,n,e){return e&&"number"!=typeof e&&di(t,n,e)&&(n=e=u),(e=e===u?_:e>>>0)?(t=ga(t))&&("string"==typeof n||null!=n&&!ua(n))&&!(n=ou(n))&&ue(t)?yu(le(t),0,e):t.split(n,e):[]},Le.spread=function(t,n){if("function"!=typeof t)throw new Tt(i);return n=null==n?0:de(_a(n),0),Hr((function(e){var r=e[n],u=yu(e,0,n);return r&&xn(u,r),Dn(t,this,u)}))},Le.tail=function(t){var n=null==t?0:t.length;return n?tu(t,1,n):[]},Le.take=function(t,n,e){return t&&t.length?tu(t,0,(n=e||n===u?1:_a(n))<0?0:n):[]},Le.takeRight=function(t,n,e){var r=null==t?0:t.length;return r?tu(t,(n=r-(n=e||n===u?1:_a(n)))<0?0:n,r):[]},Le.takeRightWhile=function(t,n){return t&&t.length?fu(t,ii(n,3),!1,!0):[]},Le.takeWhile=function(t,n){return t&&t.length?fu(t,ii(n,3)):[]},Le.tap=function(t,n){return n(t),t},Le.throttle=function(t,n,e){var r=!0,u=!0;if("function"!=typeof t)throw new Tt(i);return Xo(e)&&(r="leading"in e?!!e.leading:r,u="trailing"in e?!!e.trailing:u),Co(t,n,{leading:r,maxWait:n,trailing:u})},Le.thru=lo,Le.toArray=la,Le.toPairs=Ya,Le.toPairsIn=La,Le.toPath=function(t){return Po(t)?Nn(t,Mi):aa(t)?[t]:Ou(Si(ga(t)))},Le.toPlainObject=da,Le.transform=function(t,n,e){var r=Po(t),u=r||Ho(t)||ca(t);if(n=ii(n,4),null==e){var i=t&&t.constructor;e=u?r?new i:[]:Xo(t)&&Zo(i)?$e(Vt(t)):{}}return(u?On:yr)(t,(function(t,r,u){return n(e,t,r,u)})),e},Le.unary=function(t){return Oo(t,1)},Le.union=Xi,Le.unionBy=to,Le.unionWith=no,Le.uniq=function(t){return t&&t.length?au(t):[]},Le.uniqBy=function(t,n){return t&&t.length?au(t,ii(n,2)):[]},Le.uniqWith=function(t,n){return n="function"==typeof n?n:u,t&&t.length?au(t,u,n):[]},Le.unset=function(t,n){return null==t||cu(t,n)},Le.unzip=eo,Le.unzipWith=ro,Le.update=function(t,n,e){return null==t?t:su(t,n,vu(e))},Le.updateWith=function(t,n,e,r){return r="function"==typeof r?r:u,null==t?t:su(t,n,vu(e),r)},Le.values=$a,Le.valuesIn=function(t){return null==t?[]:Qn(t,ka(t))},Le.without=uo,Le.words=Za,Le.wrap=function(t,n){return jo(vu(n),t)},Le.xor=io,Le.xorBy=oo,Le.xorWith=ao,Le.zip=co,Le.zipObject=function(t,n){return _u(t||[],n||[],Xe)},Le.zipObjectDeep=function(t,n){return _u(t||[],n||[],Zr)},Le.zipWith=so,Le.entries=Ya,Le.entriesIn=La,Le.extend=Fa,Le.extendWith=Aa,oc(Le,Le),Le.add=gc,Le.attempt=Qa,Le.camelCase=Ba,Le.capitalize=Ua,Le.ceil=yc,Le.clamp=function(t,n,e){return e===u&&(e=n,n=u),e!==u&&(e=(e=va(e))==e?e:0),n!==u&&(n=(n=va(n))==n?n:0),ir(va(t),n,e)},Le.clone=function(t){return or(t,4)},Le.cloneDeep=function(t){return or(t,5)},Le.cloneDeepWith=function(t,n){return or(t,5,n="function"==typeof n?n:u)},Le.cloneWith=function(t,n){return or(t,4,n="function"==typeof n?n:u)},Le.conformsTo=function(t,n){return null==n||ar(t,n,Ca(n))},Le.deburr=qa,Le.defaultTo=function(t,n){return null==t||t!=t?n:t},Le.divide=Fc,Le.endsWith=function(t,n,e){t=ga(t),n=ou(n);var r=t.length,i=e=e===u?r:ir(_a(e),0,r);return(e-=n.length)>=0&&t.slice(e,i)==n},Le.eq=$o,Le.escape=function(t){return(t=ga(t))&&G.test(t)?t.replace(W,ee):t},Le.escapeRegExp=function(t){return(t=ga(t))&&et.test(t)?t.replace(nt,"\\$&"):t},Le.every=function(t,n,e){var r=Po(t)?In:hr;return e&&di(t,n,e)&&(n=u),r(t,ii(n,3))},Le.find=po,Le.findIndex=Ui,Le.findKey=function(t,n){return Ln(t,ii(n,3),yr)},Le.findLast=vo,Le.findLastIndex=qi,Le.findLastKey=function(t,n){return Ln(t,ii(n,3),Fr)},Le.floor=Ac,Le.forEach=go,Le.forEachRight=yo,Le.forIn=function(t,n){return null==t?t:dr(t,ii(n,3),ka)},Le.forInRight=function(t,n){return null==t?t:gr(t,ii(n,3),ka)},Le.forOwn=function(t,n){return t&&yr(t,ii(n,3))},Le.forOwnRight=function(t,n){return t&&Fr(t,ii(n,3))},Le.get=wa,Le.gt=Bo,Le.gte=Uo,Le.has=function(t,n){return null!=t&&hi(t,n,wr)},Le.hasIn=Oa,Le.head=Vi,Le.identity=ec,Le.includes=function(t,n,e,r){t=zo(t)?t:$a(t),e=e&&!r?_a(e):0;var u=t.length;return e<0&&(e=de(u+e,0)),oa(t)?e<=u&&t.indexOf(n,e)>-1:!!u&&Bn(t,n,e)>-1},Le.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var u=null==e?0:_a(e);return u<0&&(u=de(r+u,0)),Bn(t,n,u)},Le.inRange=function(t,n,e){return n=ha(n),e===u?(e=n,n=0):e=ha(e),function(t,n,e){return t>=ge(n,e)&&t<de(n,e)}(t=va(t),n,e)},Le.invoke=Ra,Le.isArguments=qo,Le.isArray=Po,Le.isArrayBuffer=Vo,Le.isArrayLike=zo,Le.isArrayLikeObject=Wo,Le.isBoolean=function(t){return!0===t||!1===t||ta(t)&&Er(t)==g},Le.isBuffer=Ho,Le.isDate=Go,Le.isElement=function(t){return ta(t)&&1===t.nodeType&&!ra(t)},Le.isEmpty=function(t){if(null==t)return!0;if(zo(t)&&(Po(t)||"string"==typeof t||"function"==typeof t.splice||Ho(t)||ca(t)||qo(t)))return!t.length;var n=li(t);if(n==m||n==T)return!t.size;if(Ai(t))return!Sr(t).length;for(var e in t)if(xt.call(t,e))return!1;return!0},Le.isEqual=function(t,n){return Cr(t,n)},Le.isEqualWith=function(t,n,e){var r=(e="function"==typeof e?e:u)?e(t,n):u;return r===u?Cr(t,n,u,e):!!r},Le.isError=Ko,Le.isFinite=function(t){return"number"==typeof t&&Yn(t)},Le.isFunction=Zo,Le.isInteger=Qo,Le.isLength=Jo,Le.isMap=na,Le.isMatch=function(t,n){return t===n||kr(t,n,ai(n))},Le.isMatchWith=function(t,n,e){return e="function"==typeof e?e:u,kr(t,n,ai(n),e)},Le.isNaN=function(t){return ea(t)&&t!=+t},Le.isNative=function(t){if(Fi(t))throw new bt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(t)},Le.isNil=function(t){return null==t},Le.isNull=function(t){return null===t},Le.isNumber=ea,Le.isObject=Xo,Le.isObjectLike=ta,Le.isPlainObject=ra,Le.isRegExp=ua,Le.isSafeInteger=function(t){return Qo(t)&&t>=-9007199254740991&&t<=l},Le.isSet=ia,Le.isString=oa,Le.isSymbol=aa,Le.isTypedArray=ca,Le.isUndefined=function(t){return t===u},Le.isWeakMap=function(t){return ta(t)&&li(t)==C},Le.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==Er(t)},Le.join=function(t,n){return null==t?"":zn.call(t,n)},Le.kebabCase=Pa,Le.last=Gi,Le.lastIndexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=r;return e!==u&&(i=(i=_a(e))<0?de(r+i,0):ge(i,r-1)),n==n?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(t,n,i):$n(t,qn,i,!0)},Le.lowerCase=Va,Le.lowerFirst=za,Le.lt=sa,Le.lte=fa,Le.max=function(t){return t&&t.length?_r(t,ec,Dr):u},Le.maxBy=function(t,n){return t&&t.length?_r(t,ii(n,2),Dr):u},Le.mean=function(t){return Pn(t,ec)},Le.meanBy=function(t,n){return Pn(t,ii(n,2))},Le.min=function(t){return t&&t.length?_r(t,ec,Mr):u},Le.minBy=function(t,n){return t&&t.length?_r(t,ii(n,2),Mr):u},Le.stubArray=pc,Le.stubFalse=vc,Le.stubObject=function(){return{}},Le.stubString=function(){return""},Le.stubTrue=function(){return!0},Le.multiply=bc,Le.nth=function(t,n){return t&&t.length?Br(t,_a(n)):u},Le.noConflict=function(){return hn._===this&&(hn._=Lt),this},Le.noop=ac,Le.now=wo,Le.pad=function(t,n,e){t=ga(t);var r=(n=_a(n))?fe(t):0;if(!n||r>=n)return t;var u=(n-r)/2;return Uu(pn(u),e)+t+Uu(_n(u),e)},Le.padEnd=function(t,n,e){t=ga(t);var r=(n=_a(n))?fe(t):0;return n&&r<n?t+Uu(n-r,e):t},Le.padStart=function(t,n,e){t=ga(t);var r=(n=_a(n))?fe(t):0;return n&&r<n?Uu(n-r,e)+t:t},Le.parseInt=function(t,n,e){return e||null==n?n=0:n&&(n=+n),Fe(ga(t).replace(rt,""),n||0)},Le.random=function(t,n,e){if(e&&"boolean"!=typeof e&&di(t,n,e)&&(n=e=u),e===u&&("boolean"==typeof n?(e=n,n=u):"boolean"==typeof t&&(e=t,t=u)),t===u&&n===u?(t=0,n=1):(t=ha(t),n===u?(n=t,t=0):n=ha(n)),t>n){var r=t;t=n,n=r}if(e||t%1||n%1){var i=Ae();return ge(t+i*(n-t+cn("1e-"+((i+"").length-1))),n)}return zr(t,n)},Le.reduce=function(t,n,e){var r=Po(t)?Sn:Wn,u=arguments.length<3;return r(t,ii(n,4),e,u,fr)},Le.reduceRight=function(t,n,e){var r=Po(t)?Mn:Wn,u=arguments.length<3;return r(t,ii(n,4),e,u,lr)},Le.repeat=function(t,n,e){return n=(e?di(t,n,e):n===u)?1:_a(n),Wr(ga(t),n)},Le.replace=function(){var t=arguments,n=ga(t[0]);return t.length<3?n:n.replace(t[1],t[2])},Le.result=function(t,n,e){var r=-1,i=(n=du(n,t)).length;for(i||(i=1,t=u);++r<i;){var o=null==t?u:t[Mi(n[r])];o===u&&(r=i,o=e),t=Zo(o)?o.call(t):o}return t},Le.round=mc,Le.runInContext=t,Le.sample=function(t){return(Po(t)?Ke:Gr)(t)},Le.size=function(t){if(null==t)return 0;if(zo(t))return oa(t)?fe(t):t.length;var n=li(t);return n==m||n==T?t.size:Sr(t).length},Le.snakeCase=Wa,Le.some=function(t,n,e){var r=Po(t)?jn:nu;return e&&di(t,n,e)&&(n=u),r(t,ii(n,3))},Le.sortedIndex=function(t,n){return eu(t,n)},Le.sortedIndexBy=function(t,n,e){return ru(t,n,ii(e,2))},Le.sortedIndexOf=function(t,n){var e=null==t?0:t.length;if(e){var r=eu(t,n);if(r<e&&$o(t[r],n))return r}return-1},Le.sortedLastIndex=function(t,n){return eu(t,n,!0)},Le.sortedLastIndexBy=function(t,n,e){return ru(t,n,ii(e,2),!0)},Le.sortedLastIndexOf=function(t,n){if(null!=t&&t.length){var e=eu(t,n,!0)-1;if($o(t[e],n))return e}return-1},Le.startCase=Ha,Le.startsWith=function(t,n,e){return t=ga(t),e=null==e?0:ir(_a(e),0,t.length),n=ou(n),t.slice(e,e+n.length)==n},Le.subtract=Ec,Le.sum=function(t){return t&&t.length?Hn(t,ec):0},Le.sumBy=function(t,n){return t&&t.length?Hn(t,ii(n,2)):0},Le.template=function(t,n,e){var r=Le.templateSettings;e&&di(t,n,e)&&(n=u),t=ga(t),n=Aa({},n,r,Ku);var i,o,a=Aa({},n.imports,r.imports,Ku),c=Ca(a),s=Qn(a,c),f=0,l=n.interpolate||Ft,h="__p += '",_=wt((n.escape||Ft).source+"|"+l.source+"|"+(l===Q?lt:Ft).source+"|"+(n.evaluate||Ft).source+"|$","g"),p="//# sourceURL="+(xt.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rn+"]")+"\n";t.replace(_,(function(n,e,r,u,a,c){return r||(r=u),h+=t.slice(f,c).replace(At,re),e&&(i=!0,h+="' +\n__e("+e+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=c+n.length,n})),h+="';\n";var v=xt.call(n,"variable")&&n.variable;if(v){if(st.test(v))throw new bt("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(q,""):h).replace(P,"$1").replace(V,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var d=Qa((function(){return mt(c,p+"return "+h).apply(u,s)}));if(d.source=h,Ko(d))throw d;return d},Le.times=function(t,n){if((t=_a(t))<1||t>l)return[];var e=_,r=ge(t,_);n=ii(n),t-=_;for(var u=Gn(r,n);++e<t;)n(e);return u},Le.toFinite=ha,Le.toInteger=_a,Le.toLength=pa,Le.toLower=function(t){return ga(t).toLowerCase()},Le.toNumber=va,Le.toSafeInteger=function(t){return t?ir(_a(t),-9007199254740991,l):0===t?t:0},Le.toString=ga,Le.toUpper=function(t){return ga(t).toUpperCase()},Le.trim=function(t,n,e){if((t=ga(t))&&(e||n===u))return Kn(t);if(!t||!(n=ou(n)))return t;var r=le(t),i=le(n);return yu(r,Xn(r,i),te(r,i)+1).join("")},Le.trimEnd=function(t,n,e){if((t=ga(t))&&(e||n===u))return t.slice(0,he(t)+1);if(!t||!(n=ou(n)))return t;var r=le(t);return yu(r,0,te(r,le(n))+1).join("")},Le.trimStart=function(t,n,e){if((t=ga(t))&&(e||n===u))return t.replace(rt,"");if(!t||!(n=ou(n)))return t;var r=le(t);return yu(r,Xn(r,le(n))).join("")},Le.truncate=function(t,n){var e=30,r="...";if(Xo(n)){var i="separator"in n?n.separator:i;e="length"in n?_a(n.length):e,r="omission"in n?ou(n.omission):r}var o=(t=ga(t)).length;if(ue(t)){var a=le(t);o=a.length}if(e>=o)return t;var c=e-fe(r);if(c<1)return r;var s=a?yu(a,0,c).join(""):t.slice(0,c);if(i===u)return s+r;if(a&&(c+=s.length-c),ua(i)){if(t.slice(c).search(i)){var f,l=s;for(i.global||(i=wt(i.source,ga(ht.exec(i))+"g")),i.lastIndex=0;f=i.exec(l);)var h=f.index;s=s.slice(0,h===u?c:h)}}else if(t.indexOf(ou(i),c)!=c){var _=s.lastIndexOf(i);_>-1&&(s=s.slice(0,_))}return s+r},Le.unescape=function(t){return(t=ga(t))&&H.test(t)?t.replace(z,_e):t},Le.uniqueId=function(t){var n=++St;return ga(t)+n},Le.upperCase=Ga,Le.upperFirst=Ka,Le.each=go,Le.eachRight=yo,Le.first=Vi,oc(Le,(dc={},yr(Le,(function(t,n){xt.call(Le.prototype,n)||(dc[n]=t)})),dc),{chain:!1}),Le.VERSION="4.17.21",On(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Le[t].placeholder=Le})),On(["drop","take"],(function(t,n){qe.prototype[t]=function(e){e=e===u?1:de(_a(e),0);var r=this.__filtered__&&!n?new qe(this):this.clone();return r.__filtered__?r.__takeCount__=ge(e,r.__takeCount__):r.__views__.push({size:ge(e,_),type:t+(r.__dir__<0?"Right":"")}),r},qe.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),On(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;qe.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:ii(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),On(["head","last"],(function(t,n){var e="take"+(n?"Right":"");qe.prototype[t]=function(){return this[e](1).value()[0]}})),On(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");qe.prototype[t]=function(){return this.__filtered__?new qe(this):this[e](1)}})),qe.prototype.compact=function(){return this.filter(ec)},qe.prototype.find=function(t){return this.filter(t).head()},qe.prototype.findLast=function(t){return this.reverse().find(t)},qe.prototype.invokeMap=Hr((function(t,n){return"function"==typeof t?new qe(this):this.map((function(e){return Ir(e,t,n)}))})),qe.prototype.reject=function(t){return this.filter(So(ii(t)))},qe.prototype.slice=function(t,n){t=_a(t);var e=this;return e.__filtered__&&(t>0||n<0)?new qe(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==u&&(e=(n=_a(n))<0?e.dropRight(-n):e.take(n-t)),e)},qe.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qe.prototype.toArray=function(){return this.take(_)},yr(qe.prototype,(function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),i=Le[r?"take"+("last"==n?"Right":""):n],o=r||/^find/.test(n);i&&(Le.prototype[n]=function(){var n=this.__wrapped__,a=r?[1]:arguments,c=n instanceof qe,s=a[0],f=c||Po(n),l=function(t){var n=i.apply(Le,xn([t],a));return r&&h?n[0]:n};f&&e&&"function"==typeof s&&1!=s.length&&(c=f=!1);var h=this.__chain__,_=!!this.__actions__.length,p=o&&!h,v=c&&!_;if(!o&&f){n=v?n:new qe(this);var d=t.apply(n,a);return d.__actions__.push({func:lo,args:[l],thisArg:u}),new Ue(d,h)}return p&&v?t.apply(this,a):(d=this.thru(l),p?r?d.value()[0]:d.value():d)})})),On(["pop","push","shift","sort","splice","unshift"],(function(t){var n=It[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Le.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var u=this.value();return n.apply(Po(u)?u:[],t)}return this[e]((function(e){return n.apply(Po(e)?e:[],t)}))}})),yr(qe.prototype,(function(t,n){var e=Le[n];if(e){var r=e.name+"";xt.call(Re,r)||(Re[r]=[]),Re[r].push({name:n,func:e})}})),Re[Yu(u,2).name]=[{name:"wrapper",func:u}],qe.prototype.clone=function(){var t=new qe(this.__wrapped__);return t.__actions__=Ou(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ou(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ou(this.__views__),t},qe.prototype.reverse=function(){if(this.__filtered__){var t=new qe(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qe.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Po(t),r=n<0,u=e?t.length:0,i=function(t,n,e){for(var r=-1,u=e.length;++r<u;){var i=e[r],o=i.size;switch(i.type){case"drop":t+=o;break;case"dropRight":n-=o;break;case"take":n=ge(n,t+o);break;case"takeRight":t=de(t,n-o)}}return{start:t,end:n}}(0,u,this.__views__),o=i.start,a=i.end,c=a-o,s=r?a:o-1,f=this.__iteratees__,l=f.length,h=0,_=ge(c,this.__takeCount__);if(!e||!r&&u==c&&_==c)return lu(t,this.__actions__);var p=[];t:for(;c--&&h<_;){for(var v=-1,d=t[s+=n];++v<l;){var g=f[v],y=g.iteratee,F=g.type,A=y(d);if(2==F)d=A;else if(!A){if(1==F)continue t;break t}}p[h++]=d}return p},Le.prototype.at=ho,Le.prototype.chain=function(){return fo(this)},Le.prototype.commit=function(){return new Ue(this.value(),this.__chain__)},Le.prototype.next=function(){this.__values__===u&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?u:this.__values__[this.__index__++]}},Le.prototype.plant=function(t){for(var n,e=this;e instanceof Be;){var r=Yi(e);r.__index__=0,r.__values__=u,n?i.__wrapped__=r:n=r;var i=r;e=e.__wrapped__}return i.__wrapped__=t,n},Le.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qe){var n=t;return this.__actions__.length&&(n=new qe(this)),(n=n.reverse()).__actions__.push({func:lo,args:[Ji],thisArg:u}),new Ue(n,this.__chain__)}return this.thru(Ji)},Le.prototype.toJSON=Le.prototype.valueOf=Le.prototype.value=function(){return lu(this.__wrapped__,this.__actions__)},Le.prototype.first=Le.prototype.head,Kt&&(Le.prototype[Kt]=function(){return this}),Le}();hn._=pe,(r=function(){return pe}.call(n,e,n,t))===u||(t.exports=r)}.call(this)},333:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertDate=n.assertEmail=n.assertHexString=n.assertUuid=n.assertBoolean=n.assertNumber=n.assertString=void 0,n.formatError=o,n.assertNonNullable=function(t,n){(0,r.assertTruthy)((0,u.isNonNullable)(t),(()=>o(n,"Value is "+(void 0===t?"undefined":"null"),t)))};const r=e(373),u=e(665),i=e(663);function o(t,n,e){const u=(0,r.getAssertionErrorFromProvider)(t);if("object"==typeof u)throw u;return`${u?`${u}: `:""}${n} ${(0,i.formatValue)(e)}`}n.assertString=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isString)(t),(()=>o(n,"Not a string",t)))},n.assertNumber=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isNumber)(t),(()=>o(n,"Not a number",t)))},n.assertBoolean=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isBoolean)(t),(()=>o(n,"Not a boolean",t)))},n.assertUuid=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isUuid)(t),(()=>o(n,"Invalid uuid",t)))},n.assertHexString=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isHexString)(t),(()=>o(n,"Invalid hex string",t)))},n.assertEmail=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isEmail)(t),(()=>o(n,"Invalid email",t)))},n.assertDate=(t,n=void 0)=>{(0,r.assertTruthy)(t instanceof Date,(()=>o(n,"Invalid Date",t)))}},373:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setDefaultAssertionErrorFactory=function(t){o=t||i},n.assertTruthy=a,n.truthy=function(t,n,...e){return a(t,n,...e),t},n.fail=c,n.getAssertionErrorFromProvider=s,n.getErrorMessage=f,n.assertObject=l,n.assertArray=function(t,n,e={},u=void 0){var i,o;const c=_(u);a(Array.isArray(t),(()=>`${c()}value is not an array: ${t}`));const s=null!==(i=e.minLength)&&void 0!==i?i:0,f=null!==(o=e.maxLength)&&void 0!==o?o:1/0;a(t.length>=s,(()=>`${c()}array length < minLength. Array length: ${t.length}, minLength: ${s}`)),a(t.length<=f,(()=>`${c()}array length > maxLength. Array length: ${t.length}, maxLength: ${f}`)),e.uniqueByIdentity&&a((0,r.checkArrayHasUniqueElements)(t,e.uniqueByIdentity),(()=>`${c()}array contains non-unique elements`));let l=0;const h=()=>`${c("no-space-separator")}[${l}]`;for(;l<t.length;l++)p(t[l],n,h)},n.assertRecord=function(t,n,e={},r=void 0){const i=_(r);a("object"==typeof t,(()=>`${i()}value is not an object: ${(0,u.formatValue)(t)}`)),a(null!==t,(()=>`${i()}value is null`)),a(!Array.isArray(t),(()=>`${i()}the value is not a record, but is an array`));for(const[r,o]of Object.entries(t)){const t=()=>`${i("no-space-separator")}['${r}']`;e.keyAssertion&&p(r,e.keyAssertion,(()=>`${t()}, key assertion failed:`)),p(o,n,t);const{keyField:c}=e;if(c){a("object"==typeof o&&null!==o,(()=>`${t()} is not an object: ${(0,u.formatValue)(o)}`));const n=o[c];a(n===r,(()=>`${t()} key value does not match object field '${c}' value: ${(0,u.formatValue)(n)}`))}}e.$o&&e.$o(t,r)},n.callValueAssertion=h;const r=e(665),u=e(663),i=t=>new Error(t);let o=i;function a(t,n,...e){t||c(n,...e)}function c(t,...n){const e=s(t);if("object"==typeof e)throw e;throw o(e||"Assertion error",...n)}function s(t){return void 0===t?"":"string"==typeof t?t:t()}function f(t){const n=s(t);return"string"==typeof n?n:n.message||"<no error message>"}function l(t,n,e=void 0,r={}){const u=()=>f(e),i=t=>{const n=u();return 0===n.length?t:`${n} ${t}`};a("object"==typeof t,(()=>i("is not an object: "+typeof t))),a(void 0!==t,(()=>i("is not defined"))),a(null!==t,(()=>i("is null"))),a(!Array.isArray(t),(()=>i("is an array.")));const o=Object.entries(n);if(r.failOnUnknownFields){const n=r.allowedUnknownFieldNames||[];for(const e in t)a(n.includes(e)||o.some((([t])=>e===t)),i(`property can't be checked: ${e}`))}let c;for(const[n,e]of o){a("function"==typeof e||"object"==typeof e&&null!==e,(()=>`${u()}.${n} assertion is not an object or a function: ${typeof e}`));const r=t[n],i=()=>`${u()}.${n}`;if("object"==typeof e)a(!Array.isArray(r),(()=>`${u()}.${i()} use arrayAssertion() to create a ValueAssertion for an array`)),l(r,e,i);else if(a("function"==typeof e,(()=>`${u()}.${i()} assertion is not a function`)),"$o"===n)c=e;else{const t=e(r,i);a(void 0===t,`Assertion function must assert (void) but it returns a value: ${t}. Wrap with $u()?`)}}c&&c(t,e)}function h(t,n,e){n(t,e)}function _(t){return(n="with-space-separator")=>{const e=f(t);return e?`${e}${"with-space-separator"===n?" ":""}`:""}}function p(t,n,e){"object"==typeof n?(a(!Array.isArray(t),(()=>`${e}: use arrayAssertion() to create a ValueAssertion for an array`)),l(t,n,e)):h(t,n,e)}},596:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.stringAssertion=void 0,n.objectAssertion=function(t,n=void 0){return e=>(0,r.assertObject)(e,t,n)},n.arrayAssertion=function(t,n={}){const{minLength:e,maxLength:u}=n;return(0,r.assertTruthy)((null!=e?e:0)<=(null!=u?u:1/0),`minLength must be < maxLength! minLength ${e}, maxLength: ${u}`),(0,r.assertTruthy)((null!=e?e:0)>=0,`minLength must be a positive number: ${e}`),(0,r.assertTruthy)((null!=u?u:0)>=0,`maxLength must be a positive number: ${u}`),(e,u=void 0)=>{(0,r.assertArray)(e,t,n,u)}},n.recordAssertion=function(t,n={}){return(e,u=void 0)=>{(0,r.assertRecord)(e,t,n,u)}},n.$a=i,n.$u=function(t,n){return i(t,n)},n.valueOr=o,n.undefinedOr=function(t){return o(void 0,t)},n.nullOr=function(t){return o(null,t)};const r=e(373),u=e(333);function i(t,n){return(0,r.assertTruthy)("function"==typeof t,`"check" is not a function: ${t}`),(e,u=void 0)=>(0,r.assertTruthy)(t(e),(()=>{let t=(0,r.getErrorMessage)(u)||"Check is failed";return t.endsWith(":")||(t+=":"),`${t} ${(0,r.getErrorMessage)(n)||("object"==typeof e?"[object]":`'${e}'`)}`}))}function o(t,n){return(e,u=void 0)=>{e!==t&&("object"==typeof n?(0,r.assertObject)(e,n,u):(0,r.callValueAssertion)(e,n,u))}}n.stringAssertion=t=>(n,e=void 0)=>{var i,o;(0,u.assertString)(n,e),(0,r.assertTruthy)(n.length>=(null!==(i=t.minLength)&&void 0!==i?i:0),`${(0,r.getErrorMessage)(e)} length is too small: ${n.length} < ${t.minLength}`),(0,r.assertTruthy)(n.length<=(null!==(o=t.maxLength)&&void 0!==o?o:1/0),`${(0,r.getErrorMessage)(e)} length is too large ${n.length} > ${t.maxLength}`)}},630:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tryCatch=u,n.validateObject=function(t,n,e=void 0,i={}){return u((()=>(0,r.assertObject)(t,n,e,i)))},n.validateArray=function(t,n,e={},i=void 0){return u((()=>(0,r.assertArray)(t,n,e,i)))},n.validateRecord=function(t,n,e={},i=void 0){return u((()=>(0,r.assertRecord)(t,n,e,i)))};const r=e(373);function u(t){try{t()}catch(t){return t instanceof Error&&t.message||`${t}`}}},663:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatValue=function(t){return void 0===t?"<undefined>":"symbol"==typeof t?t.toString():null===t?"<null>":`<${typeof t}:${t}>`}},665:(t,n)=>{"use strict";function e(t){return"string"==typeof t}function r(t,n,e){if(t===n)return!0;if(!t||!n)return!1;if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0}Object.defineProperty(n,"__esModule",{value:!0}),n.isBoolean=function(t){return"boolean"==typeof t},n.isString=e,n.isNumber=function(t){return"number"==typeof t},n.isDate=function(t){return t instanceof Date},n.checkArrayHasUniqueElements=function(t,n){if(t.length<=1)return!0;const e=new Set;for(const r of t){const t=n(r);if(e.has(t))return!1;e.add(t)}return!0},n.checkArraysHaveEqualElements=function(t,n){return r(t,n,((t,n)=>t===n))},n.checkArraysHasEqualElementsByComparator=r,n.isEmail=function(t,n={allowInternationalDomains:!1}){if(!e(t)||0===t.length||t.length>254)return!1;if(!(n.allowInternationalDomains?i:u).test(t))return!1;const r=t.split("@");return!(r[0].length>64)&&!r[1].split(".").some((t=>t.length>63))},n.isUuid=function(t){return e(t)&&o.test(t)},n.isHexString=function(t){return e(t)&&a.test(t)},n.isNonNullable=function(t){return null!=t};const u=/^[-!#$%&'*+/\d=?A-Z^_a-z{|}~](\.?[-!#$%&'*+/\d=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z\d])*\.[a-zA-Z](-?[a-zA-Z\d])+$/,i=/^(?!\.)((?!.*\.{2})[a-zA-Z0-9\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF.!#$%&'*+-/=?^_`{|}~\-\d]+)@(?!\.)([a-zA-Z0-9\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF\-.\d]+)((\.([a-zA-Z\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF]){2,63})+)$/i,o=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,a=/^[0-9a-fA-F]*$/},704:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getMessageFromError=function(t,n){return t instanceof Error?t.message:null!=n?n:`${t}`}}},n={};function e(r){var u=n[r];if(void 0!==u)return u.exports;var i=n[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}e.d=(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";e.r(r),e.d(r,{ApiCallContext:()=>R,CronExpression:()=>C,DistributedLockContext:()=>k,GraphqlContext:()=>N,MUTATION_TYPES:()=>Y,MutationContext:()=>L,QueryContext:()=>K,SecureAiAgentContext:()=>I,SquidProject:()=>T,SquidService:()=>at,aiFunction:()=>d,clientConnectionStateHandler:()=>D,createWebhookResponse:()=>st,executable:()=>v,getSquidService:()=>ct,limiterConfigToOptions:()=>O,limits:()=>E,metadata:()=>a,scheduler:()=>y,secureAiAgent:()=>m,secureApi:()=>_,secureCollection:()=>s,secureDatabase:()=>c,secureDistributedLock:()=>b,secureGraphQL:()=>p,secureMetric:()=>h,secureNativeQuery:()=>A,secureStorage:()=>f,secureTopic:()=>l,trigger:()=>g,webhook:()=>F});const t=require("@squidcloud/client");var n=e(36),u=e(243);const i=(t,n)=>Array.isArray(t)?t.concat(n):void 0;function o(t,n){(0,u.mergeWith)(t,n,i)}const a=new class{constructor(){this.data={databases:{},storage:{},executables:{},apis:{},graphql:{},triggers:{},schedulers:{},webhooks:{},nativeQueries:{},distributedLocks:{},aiChatbots:{},clientConnectionStateChangeHandlers:[],aiFunctions:{},openApiControllersMap:{},queues:{},metrics:{security:{write:[],all:[]}},limits:{}}}secureDatabase(n,e,r=t.BUILT_IN_DB_INTEGRATION_ID){o(this.data,{databases:{[r]:{security:{[n]:[e]}}}})}secureCollection(n,e,r,u=t.BUILT_IN_DB_INTEGRATION_ID){o(this.data,{databases:{[u]:{collections:{[n]:{security:{[e]:[r]}}}}}})}secureStorage(n,e,r=t.BUILT_IN_STORAGE_INTEGRATION_ID){o(this.data,{storage:{[r]:{security:{[n]:[e]}}}})}secureTopic(n,e,r,u=t.BUILT_IN_QUEUE_INTEGRATION_ID){o(this.data,{queues:{[u]:{topics:{[n]:{security:{[e]:[r]}}}}}})}secureMetric(t,n,e){o(this.data,{metrics:{security:{[n]:[{namePrefix:t,serviceFunction:e}]}}})}secureApi(t,n,e){o(this.data,n?{apis:{[t]:{endpoints:{[n]:{security:[e]}}}}}:{apis:{[t]:{security:[e]}}})}secureGraphQL(t,n){o(this.data,{graphql:{[t]:{security:[n]}}})}transformDatabase(n,e,r=t.BUILT_IN_DB_INTEGRATION_ID){o(this.data,{databases:{[r]:{transform:{[n]:{type:n,serviceFunction:e}}}}})}transformCollection(n,e,r,u=t.BUILT_IN_DB_INTEGRATION_ID){o(this.data,{databases:{[u]:{collections:{[n]:{transform:{[e]:{type:e,serviceFunction:r}}}}}}})}executable(t){const n=t.split(":")[1];o(this.data,{executables:{[n]:{serviceFunction:t}}})}aiFunction(t,n,e,r){const u=t.split(":")[1],i={aiFunctions:{[u]:{serviceFunction:t,description:n,params:e,attributes:r}}};o(this.data,i)}trigger(t,e,r,u,i){(0,n.assertTruthy)(!this.data.triggers[t],`Duplicate Trigger IDs: ${t}`),this.data.triggers[t]={integrationId:u,collectionName:e,functionName:r,mutationTypes:i}}scheduler(t,e,r,u){(0,n.assertTruthy)(!this.data.schedulers[t],`Duplicate Scheduler IDs: ${t}`),this.data.schedulers[t]={cronExpression:e,functionName:r,exclusive:u}}webhook(t,e){(0,n.assertTruthy)(!this.data.webhooks[t],`Duplicate Webhook IDs: ${t}`),this.data.webhooks[t]={functionName:e}}secureNativeQuery(t,n){o(this.data,{nativeQueries:{[t]:[n]}})}secureDistributedLock(t,n){o(this.data,t?{distributedLocks:{mutexes:{[t]:{security:[n]}}}}:{distributedLocks:{security:[n]}})}secureAiAgent(n,e){o(this.data,n?{aiChatbots:{[t.AI_AGENTS_INTEGRATION_ID]:{profiles:{[n]:{security:{chat:[e]}}}}}}:{aiChatbots:{[t.AI_AGENTS_INTEGRATION_ID]:{security:{chat:[e]}}}})}limits(t,n){o(this.data,{limits:{[t]:n}})}clientConnectionChangeHandler(t){o(this.data,{clientConnectionStateChangeHandlers:[t]})}};function c(t,n){return function(e,r,u){return a.secureDatabase(t,w(e,r),n),u}}function s(t,n,e){return function(r,u,i){return a.secureCollection(t,n,w(r,u),e),i}}function f(t,n){return function(e,r,u){return a.secureStorage(t,w(e,r),n),u}}function l(t,n,e){return function(r,u,i){return a.secureTopic(t,n,w(r,u),e),i}}function h(t){return function(n,e,r){return a.secureMetric(t.metricNamePrefix||"",t.type,w(n,e)),r}}function _(t,n){return function(e,r,u){return a.secureApi(t,n,w(e,r)),u}}function p(t){return function(n,e,r){return a.secureGraphQL(t,w(n,e)),r}}function v(){return function(t,n,e){return a.executable(w(t,n)),e}}function d(t,e=[],r={}){return function(u,i,o){let c;c="object"==typeof t?{description:t.description,params:(0,n.truthy)(t.params,`AI function definition requires "params" to be defined: ${i}`),attributes:t.attributes||{}}:{description:t,params:e,attributes:r};const s=w(u,i);return a.aiFunction(s,c.description,c.params,c.attributes),o}}function g(e,r="",u){const i="object"==typeof e?{...e}:{id:e,collection:r,integrationId:u};return(0,n.assertTruthy)(i.collection,"Collection name can't be empty"),function(n,e,r){return i.id||(i.id=w(n,e)),a.trigger(i.id,i.collection,w(n,e),i.integrationId||t.BUILT_IN_DB_INTEGRATION_ID,i.mutationTypes),r}}function y(t,e,r=!0){return function(u,i,o){const c=w(u,i);let s;return s="object"==typeof t?{cron:t.cron,id:t.id||c,exclusive:t.exclusive??!0}:{id:t,cron:(0,n.truthy)(e,"cronExpression must be defined"),exclusive:r},a.scheduler(s.id,s.cron,c,s.exclusive),o}}function F(t){return function(n,e,r){return a.webhook(t,w(n,e)),r}}function A(t){return function(n,e,r){return a.secureNativeQuery(t,w(n,e)),r}}function b(t){return function(n,e,r){return a.secureDistributedLock(t,w(n,e)),r}}function m(t){return function(n,e,r){return a.secureAiAgent(t,w(n,e)),r}}function E(t){return function(n,e,r){return a.limits(w(n,e),O(t)),r}}function D(){return function(t,n,e){return a.clientConnectionChangeHandler(w(t,n)),e}}function w(t,n){return`${t.constructor.name}:${n}`}function O(t){return void 0!==t.rateLimit&&("number"==typeof t.rateLimit?t.rateLimit=[{value:t.rateLimit,scope:"global"}]:"object"!=typeof t.rateLimit||Array.isArray(t.rateLimit)||(t.rateLimit=[t.rateLimit]),t.rateLimit.forEach((t=>{void 0===t.scope&&(t.scope="global")}))),void 0!==t.quotaLimit&&("number"==typeof t.quotaLimit?t.quotaLimit=[{value:t.quotaLimit,scope:"global",renewPeriod:"monthly"}]:"object"!=typeof t.quotaLimit||Array.isArray(t.quotaLimit)||(t.quotaLimit=[t.quotaLimit]),t.quotaLimit.forEach((t=>{void 0===t.scope&&(t.scope="global"),void 0===t.renewPeriod&&(t.renewPeriod="monthly")}))),t}class T{metadata(){return a.data}async cleanup(){for(const n of t.Squid.getInstances())await n.destruct()}}class I{constructor(t){this.agentId=t.agentId,this.prompt=t.prompt}}class R{constructor(t){this.integrationId=t.integrationId,this.endpointId=t.endpointId,this.url=t.url,this.method=t.method,this.body=t.body,this.options=t.options}}var C;!function(t){t.EVERY_SECOND="* * * * * *",t.EVERY_5_SECONDS="*/5 * * * * *",t.EVERY_10_SECONDS="*/10 * * * * *",t.EVERY_30_SECONDS="*/30 * * * * *",t.EVERY_MINUTE="*/1 * * * *",t.EVERY_5_MINUTES="0 */5 * * * *",t.EVERY_10_MINUTES="0 */10 * * * *",t.EVERY_30_MINUTES="0 */30 * * * *",t.EVERY_HOUR="0 0-23/1 * * *",t.EVERY_2_HOURS="0 0-23/2 * * *",t.EVERY_3_HOURS="0 0-23/3 * * *",t.EVERY_4_HOURS="0 0-23/4 * * *",t.EVERY_5_HOURS="0 0-23/5 * * *",t.EVERY_6_HOURS="0 0-23/6 * * *",t.EVERY_7_HOURS="0 0-23/7 * * *",t.EVERY_8_HOURS="0 0-23/8 * * *",t.EVERY_9_HOURS="0 0-23/9 * * *",t.EVERY_10_HOURS="0 0-23/10 * * *",t.EVERY_11_HOURS="0 0-23/11 * * *",t.EVERY_12_HOURS="0 0-23/12 * * *",t.EVERY_DAY_AT_1AM="0 01 * * *",t.EVERY_DAY_AT_2AM="0 02 * * *",t.EVERY_DAY_AT_3AM="0 03 * * *",t.EVERY_DAY_AT_4AM="0 04 * * *",t.EVERY_DAY_AT_5AM="0 05 * * *",t.EVERY_DAY_AT_6AM="0 06 * * *",t.EVERY_DAY_AT_7AM="0 07 * * *",t.EVERY_DAY_AT_8AM="0 08 * * *",t.EVERY_DAY_AT_9AM="0 09 * * *",t.EVERY_DAY_AT_10AM="0 10 * * *",t.EVERY_DAY_AT_11AM="0 11 * * *",t.EVERY_DAY_AT_NOON="0 12 * * *",t.EVERY_DAY_AT_1PM="0 13 * * *",t.EVERY_DAY_AT_2PM="0 14 * * *",t.EVERY_DAY_AT_3PM="0 15 * * *",t.EVERY_DAY_AT_4PM="0 16 * * *",t.EVERY_DAY_AT_5PM="0 17 * * *",t.EVERY_DAY_AT_6PM="0 18 * * *",t.EVERY_DAY_AT_7PM="0 19 * * *",t.EVERY_DAY_AT_8PM="0 20 * * *",t.EVERY_DAY_AT_9PM="0 21 * * *",t.EVERY_DAY_AT_10PM="0 22 * * *",t.EVERY_DAY_AT_11PM="0 23 * * *",t.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",t.EVERY_WEEK="0 0 * * 7",t.EVERY_WEEKDAY="0 0 * * 1-5",t.EVERY_WEEKEND="0 0 * * 6,7",t.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",t.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",t.EVERY_2ND_HOUR="0 */2 * * *",t.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",t.EVERY_2ND_MONTH="0 0 1 */2 *",t.EVERY_QUARTER="0 0 1 */3 *",t.EVERY_6_MONTHS="0 0 1 */6 *",t.EVERY_YEAR="0 0 1 1 *",t.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",t.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",t.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",t.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",t.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",t.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",t.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",t.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",t.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",t.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",t.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",t.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",t.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",t.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",t.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",t.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",t.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",t.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",t.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",t.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",t.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",t.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",t.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",t.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",t.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"}(C||(C={}));class k{constructor(t){this.mutex=t}}class N{constructor(t){this.isGraphiQL=t.isGraphiQL,this.query=t.query,this.operationName=t.operationName,this.variables=t.variables}}const x=/[.\[\]]/;function S(t,n){if(!t)return;const e=n.split(x);let r,u=t;for(;u&&e.length;){const t=e.shift();if(t){if("object"!=typeof u||!(t in u))return;r=u[t],u=r}}return r}function M(t){return null==t}function j(t,n){if(t===n)return!0;if(null===t||null===n)return!1;const e=typeof t;if(e!==typeof n)return!1;if("object"!==e)return t===n;if(t instanceof Date&&n instanceof Date)return t.getTime()===n.getTime();const r=Object.keys(t),u=Object.keys(n);if(r.length!==u.length)return!1;for(const e of r)if(!u.includes(e)||!j(t[e],n[e]))return!1;return!0}const Y=["insert","update","delete"];class L{constructor(t,n,e){this.mutation=t,this.beforeAndAfterDocs=n,this.serverTimeStamp=e}getMutationType(){return this.mutation.type}get before(){return this.beforeAndAfterDocs.before}get after(){return this.beforeAndAfterDocs.after}affectsPath(t){return!j(S(this.before,t),S(this.after,t))}affectedPaths(t=""){(0,n.assertTruthy)("update"===this.mutation.type,"affectedPaths can only be used with update mutations");const e=[];return this.checkPath(t,e),e}checkPath(t,n){const e=S(this.before,t),r=S(this.after,t);if(!j(e,r)&&(""!==t&&n.push(t),"object"==typeof e&&null!==e&&"object"==typeof r&&null!==r)){const u=Object.keys(e),i=Object.keys(r);new Set([...u,...i]).forEach((e=>{const r=t?`${t}.${e}`:e;this.checkPath(r,n)}))}}}function $(t,e,r){if(t=t instanceof Date?t.getTime():t??null,e=e instanceof Date?e.getTime():e??null,"=="===r)return j(t,e);if("!="===r)return!j(t,e);switch(r){case"<":return!M(t)&&(!!M(e)||e<t);case"<=":return!!M(e)||!M(t)&&e<=t;case">":return!M(e)&&(!!M(t)||e>t);case">=":return!!M(t)||!M(e)&&e>=t;case"like":return"string"==typeof e&&"string"==typeof t&&B(e,t,!1);case"not like":return!("string"==typeof e&&"string"==typeof t&&B(e,t,!1));case"like_cs":return"string"==typeof e&&"string"==typeof t&&B(e,t,!0);case"not like_cs":return!("string"==typeof e&&"string"==typeof t&&B(e,t,!0));case"array_includes_some":{const r=e;return Array.isArray(e)&&Array.isArray(t)&&t.some((t=>(0,n.truthy)(r,"VALUE_CANNOT_BE_NULL").some((n=>j(n,t)))))}case"array_includes_all":{const r=e;return Array.isArray(t)&&Array.isArray(e)&&t.every((t=>(0,n.truthy)(r,"VALUE_CANNOT_BE_NULL").some((n=>j(n,t)))))}case"array_not_includes":{const r=e;return Array.isArray(e)&&Array.isArray(t)&&t.every((t=>!(0,n.truthy)(r,"VALUE_CANNOT_BE_NULL").some((n=>j(n,t)))))}default:throw new Error(`Unsupported operator comparison: ${r}`)}}function B(t,n,e){e||(t=t.toLowerCase(),n=n.toLowerCase());const r=function(t){let n="";for(let e=0;e<t.length;++e)"\\"===t[e]?e+1<t.length&&["%","_"].includes(t[e+1])?(n+=t[e+1],e++):e+1<t.length&&"\\"===t[e+1]?(n+="\\\\",e++):n+="\\":"%"===t[e]?n+="[\\s\\S]*":"_"===t[e]?n+="[\\s\\S]":("/-\\^$*+?.()[]{}|".includes(t[e])&&(n+="\\"),n+=t[e]);return n}(n);return new RegExp(`^${r}$`).test(t)}function U(t){return"fieldName"in t}const q={"in:in":(t,n)=>t.every((t=>n.includes(t))),"in:not in":(t,n)=>t.every((t=>!n.includes(t))),"not in:not in":(t,n)=>n.every((n=>t.includes(n))),">:not in":(t,n)=>n.every((n=>t>=n)),">=:not in":(t,n)=>n.every((n=>t>n)),"<:not in":(t,n)=>n.every((n=>t<=n)),"<=:not in":(t,n)=>n.every((n=>t<n)),">:>":(t,n)=>t>=n,">=:>":(t,n)=>t>n,"in:>":(t,n)=>t.every((t=>t>n)),">:>=":(t,n)=>t>=n,">=:>=":(t,n)=>t>=n,"in:>=":(t,n)=>t.every((t=>t>=n)),"<:<":(t,n)=>t<=n,"<=:<":(t,n)=>t<n,"in:<":(t,n)=>t.every((t=>t<n)),"<:<=":(t,n)=>t<=n,"<=:<=":(t,n)=>t<=n,"in:<=":(t,n)=>t.every((t=>t<=n)),"like:like":(t,n)=>P(t.toLowerCase(),n.toLowerCase()),"like_cs:like":(t,n)=>P(t.toLowerCase(),n.toLowerCase()),"like:like_cs":(t,n)=>P(t,n)&&z(n),"like_cs:like_cs":(t,n)=>P(t,n),"like:not like":(t,n)=>!V(t.toLowerCase(),n.toLowerCase()),"like_cs:not like":(t,n)=>!V(t.toLowerCase(),n.toLowerCase()),"like:not like_cs":(t,n)=>!V(t.toLowerCase(),n.toLowerCase()),"like_cs:not like_cs":(t,n)=>!V(t,n),"not like:like":(t,n)=>H(t,n),"not like_cs:like":(t,n)=>H(t,n),"not like:like_cs":(t,n)=>H(t,n),"not like_cs:like_cs":(t,n)=>H(t,n),"not like:not like":(t,n)=>P(n.toLowerCase(),t.toLowerCase()),"not like_cs:not like":(t,n)=>P(n,t)&&z(t),"not like:not like_cs":(t,n)=>P(n.toLowerCase(),t.toLowerCase()),"not like_cs:not like_cs":(t,n)=>P(n,t),"in:like":(t,n)=>t.every((t=>$(n,t,"like"))),"in:like_cs":(t,n)=>t.every((t=>$(n,t,"like_cs"))),"in:not like":(t,n)=>t.every((t=>$(n,t,"not like"))),"in:not like_cs":(t,n)=>t.every((t=>$(n,t,"not like_cs"))),"like:in":(t,n)=>!t.includes("%")&&!t.includes("_")&&!!n.find((n=>n.toLowerCase()===t.toLowerCase())),"like_cs:in":(t,n)=>!t.includes("%")&&!t.includes("_")&&n.includes(t),"not like:in":(t,n)=>t.length>0&&W(t)||G(t)&&n.includes(""),"not like_cs:in":(t,n)=>t.length>0&&W(t)||G(t)&&n.includes(""),"not in:like":(t,n)=>n.length>0&&W(n)||G(n)&&t.includes(""),"not in:like_cs":(t,n)=>n.length>0&&W(n)||G(n)&&t.includes(""),"not in:not like":(t,n)=>!n.includes("%")&&!n.includes("_")&&!!t.find((t=>t.toLowerCase()===n.toLowerCase())),"not in:not like_cs":(t,n)=>!n.includes("%")&&!n.includes("_")&&t.includes(n),"like:not in":(t,n)=>n.every((n=>$(t,n,"not like"))),"like_cs:not in":(t,n)=>n.every((n=>$(t,n,"not like_cs"))),"not like:not in":(t,n)=>n.every((n=>$(t,n,"like"))),"not like_cs:not in":(t,n)=>n.every((n=>$(t,n,"like_cs"))),"array_includes_some:array_includes_some":(t,n)=>t.every((t=>n.includes(t))),"array_includes_all:array_includes_all":(t,n)=>t.every((t=>n.includes(t))),"array_not_includes:array_not_includes":(t,n)=>n.every((n=>t.includes(n))),"array_includes_some:array_not_includes":(t,n)=>t.every((t=>!n.includes(t))),"array_not_includes:array_includes_some":(t,n)=>n.every((n=>!t.includes(n))),"array_includes_all:array_includes_some":(t,n)=>t.every((t=>n.includes(t))),"array_includes_some:array_includes_all":(t,n)=>t.every((t=>n.includes(t))),"array_not_includes:array_includes_all":(t,n)=>n.every((n=>!t.includes(n))),"array_includes_all:array_not_includes":(t,n)=>t.every((t=>!n.includes(t)))};function P(t,n,e=0,r=0){if(r>=n.length)return e>=t.length;if(e>=t.length)return W(n.substring(r));const u=t[e],i=n[r];return"%"===u&&"%"===i?P(t,n,e+1,r+1)||P(t,n,e+1,r):"%"!==u&&("%"===i?P(t,n,e,r+1)||P(t,n,e+1,r):(u===i||"_"===i)&&P(t,n,e+1,r+1))}function V(t,n,e=0,r=0){if(e>=t.length&&r>=n.length)return!0;if(e>=t.length)return W(n.substring(r));if(r>=n.length)return W(t.substring(e));const u=e<t.length?t[e]:"",i=r<n.length?n[r]:"";return"%"===u&&"%"===i?V(t,n,e+1,r+1)||V(t,n,e,r+1)||V(t,n,e+1,r):"%"===u||"%"===i?V(t,n,e,r+1)||V(t,n,e+1,r):(u===i||"_"===u||"_"===i)&&V(t,n,e+1,r+1)}function z(t){return!/[a-zA-Z]/.test(t)}function W(t){return t.split("").every((t=>"%"===t))}function H(t,n){return t.length>0&&W(t)||n.length>0&&W(n)||G(t)&&0===n.length}function G(t){let n=!1,e=!1;for(const r of t)switch(r){case"%":n=!0;break;case"_":if(e)return!1;e=!0;break;default:return!1}return n&&e}class K{constructor(t){this.query=t,this.query=t,this.parsedConditions=this.parseConditions(this.query.conditions.filter(U))}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}sortedBy(t){return!t.find(((t,n)=>!j(this.query.sortOrder[n],{...t,asc:t.asc??!0})))}sortedByExact(t){return t.length===this.query.sortOrder.length&&this.sortedBy(t)}isSubqueryOf(t,n,e){return this.isSubqueryOfCondition({fieldName:t,operator:n,value:e})}isSubqueryOfCondition(t){return!!this.parsedConditions.filter((n=>n.fieldName===t.fieldName)).find((n=>this.evaluateSubset(n,t)))}isSubqueryOfConditions(t){return this.parseConditions(t).every((t=>this.isSubqueryOfCondition(t)))}isSubqueryOfQuery(t){if(t.collectionName!==this.collectionName||t.integrationId!==this.integrationId)return!1;const n=t.conditions.filter(U),e=this.isSubqueryOfConditions(n),r=this.sortedBy(t.sortOrder),u=-1===t.limit||this.limit>-1&&this.limit<t.limit;return e&&r&&u}getConditionsFor(...t){return this.parsedConditions.filter((n=>t.includes(n.fieldName)))}getConditionsForField(t){return this.parsedConditions.filter((n=>n.fieldName===t))}documentMatchesQuery(t){for(const n of this.parsedConditions){const e=n.fieldName,r=n.operator,u=S(t,e);if("in"===r){if(n.value.includes(u))continue;return!1}if("not in"!==r){if(!$(n.value,u,r))return!1}else if(n.value.includes(u))return!1}return!0}evaluateSubset(t,n){const{operator:e,value:r}=t,{operator:u,value:i}=this.parseConditions([n])[0],o=q[`${e}:${u}`];return!!o&&o(r,i)}parseConditions(t){const n=[],e=new Map,r=new Map;return t.forEach((t=>{switch(t.operator){case"==":case"in":e.set(t.fieldName,(e.get(t.fieldName)||[]).concat(t.value));break;case"!=":case"not in":r.set(t.fieldName,(r.get(t.fieldName)||[]).concat(t.value));break;default:n.push(t)}})),e.forEach(((t,e)=>{n.push({fieldName:e,operator:"in",value:t})})),r.forEach(((t,e)=>{n.push({fieldName:e,operator:"not in",value:t})})),n}}const Z=require("path");function Q(){if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;throw new Error("Unable to locate global object")}!function(t=!0){Q().SQUID_LOG_DEBUG_ENABLED=t}(function(){let t="";return"undefined"!=typeof window&&window.location?t=new URLSearchParams(window.location.search).get("SQUID_DEBUG")||"":"undefined"!=typeof process&&process.env&&(t=process.env.SQUID_DEBUG||""),"1"===t||"true"===t}());const J=new Map,X="__squidMetadata",tt="CIRCULAR_DEPENDENCY",nt=[];function et(t){return t[X]||{version:0}}function rt(t,e){(0,n.assertTruthy)(t.backendApiKey===e.backendApiKey,"backendApiKey does not match."),(0,n.assertTruthy)(t.requestLocalStorage===e.requestLocalStorage,"requestLocalStorage does not match"),(0,n.assertTruthy)(t.environmentId===e.environmentId,"environmentId does not match"),(0,n.assertTruthy)(t.squidDeveloperId===e.squidDeveloperId,"squidDeveloperId does not match"),(0,n.assertTruthy)(t.appId===e.appId,"appId does not match")}const ut="SQUID_GLOBAL_CONFIG";function it(){return(0,n.truthy)(Q()[ut],"Squid global config is not defined!")}const ot=["aiData","api","application","application-kotlin","auth","backend-function","connector","integration","internal-storage","internalCodeExecutor","mutation","named-query","native-query","observability","openapi","query","queue","quota","scheduler","secret","storage","webhooks","ws","personalStorage","internal-extraction"];class at{constructor(){this.region=process.env.SQUID_REGION||"local",this.config=it(),this[X]={version:2},this.backendBaseUrl=function(t,n,e){const r=new URL("https://squid.cloud");r.host=`${n}.${t}.${r.host}`;const u=e.replace(/^\//g,"").split("/")[0]||"";(function(t){return/^local/.test(t)})(t)&&(r.protocol="http",r.port=ot.includes(u)?"8001":"8000",function(t){return/android$/.test(t)}(t)?r.host="10.0.2.2":function(t){return/ios$/.test(t)}(t)&&(r.host="localhost"));const i=r.toString();e=e.startsWith("/")?e.slice(1):e;const o=i.replace(/\/$/g,"");return e.length?`${o}/${e}`:o}(this.region,this.config.appId,"")}get secrets(){return this.config.secrets}get apiKeys(){return this.config.apiKeys}get context(){return this.getRequestConfig().context}getApiKey(){return this.config.backendApiKey}get squid(){const e=function(t){(0,n.assertString)(t,"Invalid application ID");const[e,r,u,i]=t.split("-");return(0,n.assertTruthy)(!i,`Invalid application ID: ${t}`),{appId:e,environmentId:r??"prod",squidDeveloperId:u}}(this.config.appId);return t.Squid.getInstance({appId:e.appId,apiKey:this.config.backendApiKey,squidDeveloperId:e.squidDeveloperId,environmentId:e.environmentId,region:this.region})}get assetsDirectory(){const t=Object.getPrototypeOf(this).constructor.name,e=this.config.codeDir||this.config.codeDirByServiceClassName.get(t);return(0,n.assertTruthy)(e,(()=>`No codeDir found for service: ${t}`)),Z.resolve(e,"public")}getUserAuth(){const{auth:t}=this.getRequestConfig();return"Bearer"===t?.type?t:void 0}getApiKeyAuth(){const{auth:t}=this.getRequestConfig();return"ApiKey"===t?.type?t:void 0}isAuthenticated(){const{auth:t}=this.getRequestConfig();return!!t}getRequestConfig(){return this.assertInRequestScope(),t=this.config.requestLocalStorage,(0,n.truthy)(t.getStore(),"Failed to access request data outside of the request's scope");var t}assertIsAuthenticated(){this.assertInRequestScope(),(0,n.assertTruthy)(this.isAuthenticated(),"UNAUTHORIZED")}assertInRequestScope(){(0,n.assertTruthy)(this.config.requestLocalStorage.getStore(),"This method can only be called with a valid request scope.")}assertApiKeyCall(){(0,n.assertTruthy)(this.getApiKeyAuth(),"This method can only be called with API key")}createWebhookResponse(t,n,e){return{body:t||"",statusCode:n||(t?200:204),headers:e||{},__isWebhookResponse__:!0}}throwWebhookResponse(t){throw{body:t.body||"",statusCode:t.statusCode||500,headers:t.headers||{},__isWebhookResponse__:!0}}createOpenApiResponse(t,n,e){return{body:t||"",statusCode:n||(t?200:204),headers:e||{},__isOpenApiResponse__:!0}}throwOpenApiResponse(t){throw{body:t.body||"",statusCode:t.statusCode||500,headers:t.headers||{},__isOpenApiResponse__:!0}}async convertToSquidFile(t){return{__isSquidFile__:!0,data:new Uint8Array(await t.arrayBuffer()),fieldName:t.name,mimetype:t.type,originalName:t.name,size:t.size,encoding:t.type}}}function ct(t,e){const r=t.name,u=Object.getPrototypeOf(e).constructor.name,i=it(),o={...i,callerServiceClassName:new Map},a=i.codeDirByServiceClassName.get(r);if(a)o.codeDirByServiceClassName.set(r,a);else{const t=i.codeDirByServiceClassName.get(u);(0,n.assertTruthy)(t,(()=>`Caller class codeDir is not set: ${u}`)),o.codeDirByServiceClassName.set(r,t)}return function(t,e,r){!function(t){const e=Q(),r=e[ut];if(r){rt(r,t);for(const[e,u]of t.codeDirByServiceClassName){const t=r.codeDirByServiceClassName.get(e);t?(0,n.assertTruthy)(t===u,(()=>`codeDir is changed for class ${e}: old: ${t}, new: ${u}`)):r.codeDirByServiceClassName.set(e,u)}}else e[ut]=t}(e);let u=J.get(t);if(!u||et(u).version<=1){const i={...e,...r};(0,n.assertTruthy)(!nt.includes(t),(()=>`${tt}: ${nt[nt.length-1]?.name} => ${t.name}`)),nt.push(t);try{u=e.requestLocalStorage.run(r,(()=>new t(i)))}finally{nt.pop()}et(u).version>1&&J.set(t,u)}else rt(u.config,e),u.config.secrets=e.secrets,u.config.apiKeys=e.apiKeys;return u}(t,o,{})}function st(t){return{__isWebhookResponse__:!0,body:"",statusCode:204,headers:{},...t}}})();var u=exports;for(var i in r)u[i]=r[i];r.__esModule&&Object.defineProperty(u,"__esModule",{value:!0})})();
2
+ (()=>{var t={36:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var u=Object.getOwnPropertyDescriptor(n,e);u&&!("get"in u?!n.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,u)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),u=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(n,"__esModule",{value:!0}),u(e(77),n)},77:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var u=Object.getOwnPropertyDescriptor(n,e);u&&!("get"in u?!n.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,u)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),u=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(n,"__esModule",{value:!0}),u(e(373),n),u(e(596),n),u(e(333),n),u(e(665),n),u(e(663),n),u(e(630),n),u(e(704),n)},243:function(t,n,e){var r;t=e.nmd(t),function(){var u,i="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,s=128,f=1/0,l=9007199254740991,h=NaN,_=4294967295,p=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],d="[object Arguments]",v="[object Array]",g="[object Boolean]",y="[object Date]",F="[object Error]",A="[object Function]",b="[object GeneratorFunction]",m="[object Map]",E="[object Number]",D="[object Object]",w="[object Promise]",O="[object RegExp]",T="[object Set]",I="[object String]",R="[object Symbol]",C="[object WeakMap]",k="[object ArrayBuffer]",N="[object DataView]",x="[object Float32Array]",S="[object Float64Array]",M="[object Int8Array]",j="[object Int16Array]",Y="[object Int32Array]",L="[object Uint8Array]",$="[object Uint8ClampedArray]",B="[object Uint16Array]",U="[object Uint32Array]",q=/\b__p \+= '';/g,P=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,H=RegExp(z.source),G=RegExp(W.source),K=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/[\\^$.*+?()[\]{}|]/g,et=RegExp(nt.source),rt=/^\s+/,ut=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ot=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,st=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,_t=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,dt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ft=/($^)/,At=/['\n\r\u2028\u2029\\]/g,bt="\\ud800-\\udfff",mt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Et="\\u2700-\\u27bf",Dt="a-z\\xdf-\\xf6\\xf8-\\xff",wt="A-Z\\xc0-\\xd6\\xd8-\\xde",Ot="\\ufe0e\\ufe0f",Tt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",It="["+bt+"]",Rt="["+Tt+"]",Ct="["+mt+"]",kt="\\d+",Nt="["+Et+"]",xt="["+Dt+"]",St="[^"+bt+Tt+kt+Et+Dt+wt+"]",Mt="\\ud83c[\\udffb-\\udfff]",jt="[^"+bt+"]",Yt="(?:\\ud83c[\\udde6-\\uddff]){2}",Lt="[\\ud800-\\udbff][\\udc00-\\udfff]",$t="["+wt+"]",Bt="\\u200d",Ut="(?:"+xt+"|"+St+")",qt="(?:"+$t+"|"+St+")",Pt="(?:['’](?:d|ll|m|re|s|t|ve))?",Vt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+Ct+"|"+Mt+")?",Wt="["+Ot+"]?",Ht=Wt+zt+"(?:"+Bt+"(?:"+[jt,Yt,Lt].join("|")+")"+Wt+zt+")*",Gt="(?:"+[Nt,Yt,Lt].join("|")+")"+Ht,Kt="(?:"+[jt+Ct+"?",Ct,Yt,Lt,It].join("|")+")",Zt=RegExp("['’]","g"),Qt=RegExp(Ct,"g"),Jt=RegExp(Mt+"(?="+Mt+")|"+Kt+Ht,"g"),Xt=RegExp([$t+"?"+xt+"+"+Pt+"(?="+[Rt,$t,"$"].join("|")+")",qt+"+"+Vt+"(?="+[Rt,$t+Ut,"$"].join("|")+")",$t+"?"+Ut+"+"+Pt,$t+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kt,Gt].join("|"),"g"),tn=RegExp("["+Bt+bt+mt+Ot+"]"),nn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,en=["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"],rn=-1,un={};un[x]=un[S]=un[M]=un[j]=un[Y]=un[L]=un[$]=un[B]=un[U]=!0,un[d]=un[v]=un[k]=un[g]=un[N]=un[y]=un[F]=un[A]=un[m]=un[E]=un[D]=un[O]=un[T]=un[I]=un[C]=!1;var on={};on[d]=on[v]=on[k]=on[N]=on[g]=on[y]=on[x]=on[S]=on[M]=on[j]=on[Y]=on[m]=on[E]=on[D]=on[O]=on[T]=on[I]=on[R]=on[L]=on[$]=on[B]=on[U]=!0,on[F]=on[A]=on[C]=!1;var an={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},cn=parseFloat,sn=parseInt,fn="object"==typeof global&&global&&global.Object===Object&&global,ln="object"==typeof self&&self&&self.Object===Object&&self,hn=fn||ln||Function("return this")(),_n=n&&!n.nodeType&&n,pn=_n&&t&&!t.nodeType&&t,dn=pn&&pn.exports===_n,vn=dn&&fn.process,gn=function(){try{return pn&&pn.require&&pn.require("util").types||vn&&vn.binding&&vn.binding("util")}catch(t){}}(),yn=gn&&gn.isArrayBuffer,Fn=gn&&gn.isDate,An=gn&&gn.isMap,bn=gn&&gn.isRegExp,mn=gn&&gn.isSet,En=gn&&gn.isTypedArray;function Dn(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function wn(t,n,e,r){for(var u=-1,i=null==t?0:t.length;++u<i;){var o=t[u];n(r,o,e(o),t)}return r}function On(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}function Tn(t,n){for(var e=null==t?0:t.length;e--&&!1!==n(t[e],e,t););return t}function In(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function Rn(t,n){for(var e=-1,r=null==t?0:t.length,u=0,i=[];++e<r;){var o=t[e];n(o,e,t)&&(i[u++]=o)}return i}function Cn(t,n){return!(null==t||!t.length)&&Bn(t,n,0)>-1}function kn(t,n,e){for(var r=-1,u=null==t?0:t.length;++r<u;)if(e(n,t[r]))return!0;return!1}function Nn(t,n){for(var e=-1,r=null==t?0:t.length,u=Array(r);++e<r;)u[e]=n(t[e],e,t);return u}function xn(t,n){for(var e=-1,r=n.length,u=t.length;++e<r;)t[u+e]=n[e];return t}function Sn(t,n,e,r){var u=-1,i=null==t?0:t.length;for(r&&i&&(e=t[++u]);++u<i;)e=n(e,t[u],u,t);return e}function Mn(t,n,e,r){var u=null==t?0:t.length;for(r&&u&&(e=t[--u]);u--;)e=n(e,t[u],u,t);return e}function jn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}var Yn=Vn("length");function Ln(t,n,e){var r;return e(t,(function(t,e,u){if(n(t,e,u))return r=e,!1})),r}function $n(t,n,e,r){for(var u=t.length,i=e+(r?1:-1);r?i--:++i<u;)if(n(t[i],i,t))return i;return-1}function Bn(t,n,e){return n==n?function(t,n,e){for(var r=e-1,u=t.length;++r<u;)if(t[r]===n)return r;return-1}(t,n,e):$n(t,qn,e)}function Un(t,n,e,r){for(var u=e-1,i=t.length;++u<i;)if(r(t[u],n))return u;return-1}function qn(t){return t!=t}function Pn(t,n){var e=null==t?0:t.length;return e?Hn(t,n)/e:h}function Vn(t){return function(n){return null==n?u:n[t]}}function zn(t){return function(n){return null==t?u:t[n]}}function Wn(t,n,e,r,u){return u(t,(function(t,u,i){e=r?(r=!1,t):n(e,t,u,i)})),e}function Hn(t,n){for(var e,r=-1,i=t.length;++r<i;){var o=n(t[r]);o!==u&&(e=e===u?o:e+o)}return e}function Gn(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function Kn(t){return t?t.slice(0,he(t)+1).replace(rt,""):t}function Zn(t){return function(n){return t(n)}}function Qn(t,n){return Nn(n,(function(n){return t[n]}))}function Jn(t,n){return t.has(n)}function Xn(t,n){for(var e=-1,r=t.length;++e<r&&Bn(n,t[e],0)>-1;);return e}function te(t,n){for(var e=t.length;e--&&Bn(n,t[e],0)>-1;);return e}var ne=zn({À:"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"}),ee=zn({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function re(t){return"\\"+an[t]}function ue(t){return tn.test(t)}function ie(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function oe(t,n){return function(e){return t(n(e))}}function ae(t,n){for(var e=-1,r=t.length,u=0,i=[];++e<r;){var o=t[e];o!==n&&o!==a||(t[e]=a,i[u++]=e)}return i}function ce(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}function se(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=[t,t]})),e}function fe(t){return ue(t)?function(t){for(var n=Jt.lastIndex=0;Jt.test(t);)++n;return n}(t):Yn(t)}function le(t){return ue(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function he(t){for(var n=t.length;n--&&ut.test(t.charAt(n)););return n}var _e=zn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),pe=function t(n){var e,r=(n=null==n?hn:pe.defaults(hn.Object(),n,pe.pick(hn,en))).Array,ut=n.Date,bt=n.Error,mt=n.Function,Et=n.Math,Dt=n.Object,wt=n.RegExp,Ot=n.String,Tt=n.TypeError,It=r.prototype,Rt=mt.prototype,Ct=Dt.prototype,kt=n["__core-js_shared__"],Nt=Rt.toString,xt=Ct.hasOwnProperty,St=0,Mt=(e=/[^.]+$/.exec(kt&&kt.keys&&kt.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",jt=Ct.toString,Yt=Nt.call(Dt),Lt=hn._,$t=wt("^"+Nt.call(xt).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bt=dn?n.Buffer:u,Ut=n.Symbol,qt=n.Uint8Array,Pt=Bt?Bt.allocUnsafe:u,Vt=oe(Dt.getPrototypeOf,Dt),zt=Dt.create,Wt=Ct.propertyIsEnumerable,Ht=It.splice,Gt=Ut?Ut.isConcatSpreadable:u,Kt=Ut?Ut.iterator:u,Jt=Ut?Ut.toStringTag:u,tn=function(){try{var t=ci(Dt,"defineProperty");return t({},"",{}),t}catch(t){}}(),an=n.clearTimeout!==hn.clearTimeout&&n.clearTimeout,fn=ut&&ut.now!==hn.Date.now&&ut.now,ln=n.setTimeout!==hn.setTimeout&&n.setTimeout,_n=Et.ceil,pn=Et.floor,vn=Dt.getOwnPropertySymbols,gn=Bt?Bt.isBuffer:u,Yn=n.isFinite,zn=It.join,de=oe(Dt.keys,Dt),ve=Et.max,ge=Et.min,ye=ut.now,Fe=n.parseInt,Ae=Et.random,be=It.reverse,me=ci(n,"DataView"),Ee=ci(n,"Map"),De=ci(n,"Promise"),we=ci(n,"Set"),Oe=ci(n,"WeakMap"),Te=ci(Dt,"create"),Ie=Oe&&new Oe,Re={},Ce=ji(me),ke=ji(Ee),Ne=ji(De),xe=ji(we),Se=ji(Oe),Me=Ut?Ut.prototype:u,je=Me?Me.valueOf:u,Ye=Me?Me.toString:u;function Le(t){if(ta(t)&&!Po(t)&&!(t instanceof qe)){if(t instanceof Ue)return t;if(xt.call(t,"__wrapped__"))return Yi(t)}return new Ue(t)}var $e=function(){function t(){}return function(n){if(!Xo(n))return{};if(zt)return zt(n);t.prototype=n;var e=new t;return t.prototype=u,e}}();function Be(){}function Ue(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=u}function qe(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=_,this.__views__=[]}function Pe(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Ve(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function ze(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function We(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new ze;++n<e;)this.add(t[n])}function He(t){var n=this.__data__=new Ve(t);this.size=n.size}function Ge(t,n){var e=Po(t),r=!e&&qo(t),u=!e&&!r&&Ho(t),i=!e&&!r&&!u&&ca(t),o=e||r||u||i,a=o?Gn(t.length,Ot):[],c=a.length;for(var s in t)!n&&!xt.call(t,s)||o&&("length"==s||u&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||di(s,c))||a.push(s);return a}function Ke(t){var n=t.length;return n?t[zr(0,n-1)]:u}function Ze(t,n){return ki(Ou(t),ir(n,0,t.length))}function Qe(t){return ki(Ou(t))}function Je(t,n,e){(e!==u&&!$o(t[n],e)||e===u&&!(n in t))&&rr(t,n,e)}function Xe(t,n,e){var r=t[n];xt.call(t,n)&&$o(r,e)&&(e!==u||n in t)||rr(t,n,e)}function tr(t,n){for(var e=t.length;e--;)if($o(t[e][0],n))return e;return-1}function nr(t,n,e,r){return fr(t,(function(t,u,i){n(r,t,e(t),i)})),r}function er(t,n){return t&&Tu(n,Ca(n),t)}function rr(t,n,e){"__proto__"==n&&tn?tn(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}function ur(t,n){for(var e=-1,i=n.length,o=r(i),a=null==t;++e<i;)o[e]=a?u:wa(t,n[e]);return o}function ir(t,n,e){return t==t&&(e!==u&&(t=t<=e?t:e),n!==u&&(t=t>=n?t:n)),t}function or(t,n,e,r,i,o){var a,c=1&n,s=2&n,f=4&n;if(e&&(a=i?e(t,r,i,o):e(t)),a!==u)return a;if(!Xo(t))return t;var l=Po(t);if(l){if(a=function(t){var n=t.length,e=new t.constructor(n);return n&&"string"==typeof t[0]&&xt.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t),!c)return Ou(t,a)}else{var h=li(t),_=h==A||h==b;if(Ho(t))return Au(t,c);if(h==D||h==d||_&&!i){if(a=s||_?{}:_i(t),!c)return s?function(t,n){return Tu(t,fi(t),n)}(t,function(t,n){return t&&Tu(n,ka(n),t)}(a,t)):function(t,n){return Tu(t,si(t),n)}(t,er(a,t))}else{if(!on[h])return i?t:{};a=function(t,n,e){var r,u=t.constructor;switch(n){case k:return bu(t);case g:case y:return new u(+t);case N:return function(t,n){var e=n?bu(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case x:case S:case M:case j:case Y:case L:case $:case B:case U:return mu(t,e);case m:return new u;case E:case I:return new u(t);case O:return function(t){var n=new t.constructor(t.source,ht.exec(t));return n.lastIndex=t.lastIndex,n}(t);case T:return new u;case R:return r=t,je?Dt(je.call(r)):{}}}(t,h,c)}}o||(o=new He);var p=o.get(t);if(p)return p;o.set(t,a),ia(t)?t.forEach((function(r){a.add(or(r,n,e,r,t,o))})):na(t)&&t.forEach((function(r,u){a.set(u,or(r,n,e,u,t,o))}));var v=l?u:(f?s?ni:ti:s?ka:Ca)(t);return On(v||t,(function(r,u){v&&(r=t[u=r]),Xe(a,u,or(r,n,e,u,t,o))})),a}function ar(t,n,e){var r=e.length;if(null==t)return!r;for(t=Dt(t);r--;){var i=e[r],o=n[i],a=t[i];if(a===u&&!(i in t)||!o(a))return!1}return!0}function cr(t,n,e){if("function"!=typeof t)throw new Tt(i);return Ti((function(){t.apply(u,e)}),n)}function sr(t,n,e,r){var u=-1,i=Cn,o=!0,a=t.length,c=[],s=n.length;if(!a)return c;e&&(n=Nn(n,Zn(e))),r?(i=kn,o=!1):n.length>=200&&(i=Jn,o=!1,n=new We(n));t:for(;++u<a;){var f=t[u],l=null==e?f:e(f);if(f=r||0!==f?f:0,o&&l==l){for(var h=s;h--;)if(n[h]===l)continue t;c.push(f)}else i(n,l,r)||c.push(f)}return c}Le.templateSettings={escape:K,evaluate:Z,interpolate:Q,variable:"",imports:{_:Le}},Le.prototype=Be.prototype,Le.prototype.constructor=Le,Ue.prototype=$e(Be.prototype),Ue.prototype.constructor=Ue,qe.prototype=$e(Be.prototype),qe.prototype.constructor=qe,Pe.prototype.clear=function(){this.__data__=Te?Te(null):{},this.size=0},Pe.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},Pe.prototype.get=function(t){var n=this.__data__;if(Te){var e=n[t];return e===o?u:e}return xt.call(n,t)?n[t]:u},Pe.prototype.has=function(t){var n=this.__data__;return Te?n[t]!==u:xt.call(n,t)},Pe.prototype.set=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Te&&n===u?o:n,this},Ve.prototype.clear=function(){this.__data__=[],this.size=0},Ve.prototype.delete=function(t){var n=this.__data__,e=tr(n,t);return!(e<0||(e==n.length-1?n.pop():Ht.call(n,e,1),--this.size,0))},Ve.prototype.get=function(t){var n=this.__data__,e=tr(n,t);return e<0?u:n[e][1]},Ve.prototype.has=function(t){return tr(this.__data__,t)>-1},Ve.prototype.set=function(t,n){var e=this.__data__,r=tr(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},ze.prototype.clear=function(){this.size=0,this.__data__={hash:new Pe,map:new(Ee||Ve),string:new Pe}},ze.prototype.delete=function(t){var n=oi(this,t).delete(t);return this.size-=n?1:0,n},ze.prototype.get=function(t){return oi(this,t).get(t)},ze.prototype.has=function(t){return oi(this,t).has(t)},ze.prototype.set=function(t,n){var e=oi(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},We.prototype.add=We.prototype.push=function(t){return this.__data__.set(t,o),this},We.prototype.has=function(t){return this.__data__.has(t)},He.prototype.clear=function(){this.__data__=new Ve,this.size=0},He.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},He.prototype.get=function(t){return this.__data__.get(t)},He.prototype.has=function(t){return this.__data__.has(t)},He.prototype.set=function(t,n){var e=this.__data__;if(e instanceof Ve){var r=e.__data__;if(!Ee||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new ze(r)}return e.set(t,n),this.size=e.size,this};var fr=Cu(yr),lr=Cu(Fr,!0);function hr(t,n){var e=!0;return fr(t,(function(t,r,u){return e=!!n(t,r,u)})),e}function _r(t,n,e){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=n(o);if(null!=a&&(c===u?a==a&&!aa(a):e(a,c)))var c=a,s=o}return s}function pr(t,n){var e=[];return fr(t,(function(t,r,u){n(t,r,u)&&e.push(t)})),e}function dr(t,n,e,r,u){var i=-1,o=t.length;for(e||(e=pi),u||(u=[]);++i<o;){var a=t[i];n>0&&e(a)?n>1?dr(a,n-1,e,r,u):xn(u,a):r||(u[u.length]=a)}return u}var vr=ku(),gr=ku(!0);function yr(t,n){return t&&vr(t,n,Ca)}function Fr(t,n){return t&&gr(t,n,Ca)}function Ar(t,n){return Rn(n,(function(n){return Zo(t[n])}))}function br(t,n){for(var e=0,r=(n=vu(n,t)).length;null!=t&&e<r;)t=t[Mi(n[e++])];return e&&e==r?t:u}function mr(t,n,e){var r=n(t);return Po(t)?r:xn(r,e(t))}function Er(t){return null==t?t===u?"[object Undefined]":"[object Null]":Jt&&Jt in Dt(t)?function(t){var n=xt.call(t,Jt),e=t[Jt];try{t[Jt]=u;var r=!0}catch(t){}var i=jt.call(t);return r&&(n?t[Jt]=e:delete t[Jt]),i}(t):function(t){return jt.call(t)}(t)}function Dr(t,n){return t>n}function wr(t,n){return null!=t&&xt.call(t,n)}function Or(t,n){return null!=t&&n in Dt(t)}function Tr(t,n,e){for(var i=e?kn:Cn,o=t[0].length,a=t.length,c=a,s=r(a),f=1/0,l=[];c--;){var h=t[c];c&&n&&(h=Nn(h,Zn(n))),f=ge(h.length,f),s[c]=!e&&(n||o>=120&&h.length>=120)?new We(c&&h):u}h=t[0];var _=-1,p=s[0];t:for(;++_<o&&l.length<f;){var d=h[_],v=n?n(d):d;if(d=e||0!==d?d:0,!(p?Jn(p,v):i(l,v,e))){for(c=a;--c;){var g=s[c];if(!(g?Jn(g,v):i(t[c],v,e)))continue t}p&&p.push(v),l.push(d)}}return l}function Ir(t,n,e){var r=null==(t=Di(t,n=vu(n,t)))?t:t[Mi(Gi(n))];return null==r?u:Dn(r,t,e)}function Rr(t){return ta(t)&&Er(t)==d}function Cr(t,n,e,r,i){return t===n||(null==t||null==n||!ta(t)&&!ta(n)?t!=t&&n!=n:function(t,n,e,r,i,o){var a=Po(t),c=Po(n),s=a?v:li(t),f=c?v:li(n),l=(s=s==d?D:s)==D,h=(f=f==d?D:f)==D,_=s==f;if(_&&Ho(t)){if(!Ho(n))return!1;a=!0,l=!1}if(_&&!l)return o||(o=new He),a||ca(t)?Ju(t,n,e,r,i,o):function(t,n,e,r,u,i,o){switch(e){case N:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case k:return!(t.byteLength!=n.byteLength||!i(new qt(t),new qt(n)));case g:case y:case E:return $o(+t,+n);case F:return t.name==n.name&&t.message==n.message;case O:case I:return t==n+"";case m:var a=ie;case T:var c=1&r;if(a||(a=ce),t.size!=n.size&&!c)return!1;var s=o.get(t);if(s)return s==n;r|=2,o.set(t,n);var f=Ju(a(t),a(n),r,u,i,o);return o.delete(t),f;case R:if(je)return je.call(t)==je.call(n)}return!1}(t,n,s,e,r,i,o);if(!(1&e)){var p=l&&xt.call(t,"__wrapped__"),A=h&&xt.call(n,"__wrapped__");if(p||A){var b=p?t.value():t,w=A?n.value():n;return o||(o=new He),i(b,w,e,r,o)}}return!!_&&(o||(o=new He),function(t,n,e,r,i,o){var a=1&e,c=ti(t),s=c.length;if(s!=ti(n).length&&!a)return!1;for(var f=s;f--;){var l=c[f];if(!(a?l in n:xt.call(n,l)))return!1}var h=o.get(t),_=o.get(n);if(h&&_)return h==n&&_==t;var p=!0;o.set(t,n),o.set(n,t);for(var d=a;++f<s;){var v=t[l=c[f]],g=n[l];if(r)var y=a?r(g,v,l,n,t,o):r(v,g,l,t,n,o);if(!(y===u?v===g||i(v,g,e,r,o):y)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var F=t.constructor,A=n.constructor;F==A||!("constructor"in t)||!("constructor"in n)||"function"==typeof F&&F instanceof F&&"function"==typeof A&&A instanceof A||(p=!1)}return o.delete(t),o.delete(n),p}(t,n,e,r,i,o))}(t,n,e,r,Cr,i))}function kr(t,n,e,r){var i=e.length,o=i,a=!r;if(null==t)return!o;for(t=Dt(t);i--;){var c=e[i];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<o;){var s=(c=e[i])[0],f=t[s],l=c[1];if(a&&c[2]){if(f===u&&!(s in t))return!1}else{var h=new He;if(r)var _=r(f,l,s,t,n,h);if(!(_===u?Cr(l,f,3,r,h):_))return!1}}return!0}function Nr(t){return!(!Xo(t)||(n=t,Mt&&Mt in n))&&(Zo(t)?$t:dt).test(ji(t));var n}function xr(t){return"function"==typeof t?t:null==t?ec:"object"==typeof t?Po(t)?Lr(t[0],t[1]):Yr(t):lc(t)}function Sr(t){if(!Ai(t))return de(t);var n=[];for(var e in Dt(t))xt.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Mr(t,n){return t<n}function jr(t,n){var e=-1,u=zo(t)?r(t.length):[];return fr(t,(function(t,r,i){u[++e]=n(t,r,i)})),u}function Yr(t){var n=ai(t);return 1==n.length&&n[0][2]?mi(n[0][0],n[0][1]):function(e){return e===t||kr(e,t,n)}}function Lr(t,n){return gi(t)&&bi(n)?mi(Mi(t),n):function(e){var r=wa(e,t);return r===u&&r===n?Oa(e,t):Cr(n,r,3)}}function $r(t,n,e,r,i){t!==n&&vr(n,(function(o,a){if(i||(i=new He),Xo(o))!function(t,n,e,r,i,o,a){var c=wi(t,e),s=wi(n,e),f=a.get(s);if(f)Je(t,e,f);else{var l=o?o(c,s,e+"",t,n,a):u,h=l===u;if(h){var _=Po(s),p=!_&&Ho(s),d=!_&&!p&&ca(s);l=s,_||p||d?Po(c)?l=c:Wo(c)?l=Ou(c):p?(h=!1,l=Au(s,!0)):d?(h=!1,l=mu(s,!0)):l=[]:ra(s)||qo(s)?(l=c,qo(c)?l=va(c):Xo(c)&&!Zo(c)||(l=_i(s))):h=!1}h&&(a.set(s,l),i(l,s,r,o,a),a.delete(s)),Je(t,e,l)}}(t,n,a,e,$r,r,i);else{var c=r?r(wi(t,a),o,a+"",t,n,i):u;c===u&&(c=o),Je(t,a,c)}}),ka)}function Br(t,n){var e=t.length;if(e)return di(n+=n<0?e:0,e)?t[n]:u}function Ur(t,n,e){n=n.length?Nn(n,(function(t){return Po(t)?function(n){return br(n,1===t.length?t[0]:t)}:t})):[ec];var r=-1;n=Nn(n,Zn(ii()));var u=jr(t,(function(t,e,u){var i=Nn(n,(function(n){return n(t)}));return{criteria:i,index:++r,value:t}}));return function(t){var n=t.length;for(t.sort((function(t,n){return function(t,n,e){for(var r=-1,u=t.criteria,i=n.criteria,o=u.length,a=e.length;++r<o;){var c=Eu(u[r],i[r]);if(c)return r>=a?c:c*("desc"==e[r]?-1:1)}return t.index-n.index}(t,n,e)}));n--;)t[n]=t[n].value;return t}(u)}function qr(t,n,e){for(var r=-1,u=n.length,i={};++r<u;){var o=n[r],a=br(t,o);e(a,o)&&Zr(i,vu(o,t),a)}return i}function Pr(t,n,e,r){var u=r?Un:Bn,i=-1,o=n.length,a=t;for(t===n&&(n=Ou(n)),e&&(a=Nn(t,Zn(e)));++i<o;)for(var c=0,s=n[i],f=e?e(s):s;(c=u(a,f,c,r))>-1;)a!==t&&Ht.call(a,c,1),Ht.call(t,c,1);return t}function Vr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var u=n[e];if(e==r||u!==i){var i=u;di(u)?Ht.call(t,u,1):cu(t,u)}}return t}function zr(t,n){return t+pn(Ae()*(n-t+1))}function Wr(t,n){var e="";if(!t||n<1||n>l)return e;do{n%2&&(e+=t),(n=pn(n/2))&&(t+=t)}while(n);return e}function Hr(t,n){return Ii(Ei(t,n,ec),t+"")}function Gr(t){return Ke($a(t))}function Kr(t,n){var e=$a(t);return ki(e,ir(n,0,e.length))}function Zr(t,n,e,r){if(!Xo(t))return t;for(var i=-1,o=(n=vu(n,t)).length,a=o-1,c=t;null!=c&&++i<o;){var s=Mi(n[i]),f=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(i!=a){var l=c[s];(f=r?r(l,s,c):u)===u&&(f=Xo(l)?l:di(n[i+1])?[]:{})}Xe(c,s,f),c=c[s]}return t}var Qr=Ie?function(t,n){return Ie.set(t,n),t}:ec,Jr=tn?function(t,n){return tn(t,"toString",{configurable:!0,enumerable:!1,value:Xa(n),writable:!0})}:ec;function Xr(t){return ki($a(t))}function tu(t,n,e){var u=-1,i=t.length;n<0&&(n=-n>i?0:i+n),(e=e>i?i:e)<0&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var o=r(i);++u<i;)o[u]=t[u+n];return o}function nu(t,n){var e;return fr(t,(function(t,r,u){return!(e=n(t,r,u))})),!!e}function eu(t,n,e){var r=0,u=null==t?r:t.length;if("number"==typeof n&&n==n&&u<=2147483647){for(;r<u;){var i=r+u>>>1,o=t[i];null!==o&&!aa(o)&&(e?o<=n:o<n)?r=i+1:u=i}return u}return ru(t,n,ec,e)}function ru(t,n,e,r){var i=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(n=e(n))!=n,c=null===n,s=aa(n),f=n===u;i<o;){var l=pn((i+o)/2),h=e(t[l]),_=h!==u,p=null===h,d=h==h,v=aa(h);if(a)var g=r||d;else g=f?d&&(r||_):c?d&&_&&(r||!p):s?d&&_&&!p&&(r||!v):!p&&!v&&(r?h<=n:h<n);g?i=l+1:o=l}return ge(o,4294967294)}function uu(t,n){for(var e=-1,r=t.length,u=0,i=[];++e<r;){var o=t[e],a=n?n(o):o;if(!e||!$o(a,c)){var c=a;i[u++]=0===o?0:o}}return i}function iu(t){return"number"==typeof t?t:aa(t)?h:+t}function ou(t){if("string"==typeof t)return t;if(Po(t))return Nn(t,ou)+"";if(aa(t))return Ye?Ye.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function au(t,n,e){var r=-1,u=Cn,i=t.length,o=!0,a=[],c=a;if(e)o=!1,u=kn;else if(i>=200){var s=n?null:Wu(t);if(s)return ce(s);o=!1,u=Jn,c=new We}else c=n?[]:a;t:for(;++r<i;){var f=t[r],l=n?n(f):f;if(f=e||0!==f?f:0,o&&l==l){for(var h=c.length;h--;)if(c[h]===l)continue t;n&&c.push(l),a.push(f)}else u(c,l,e)||(c!==a&&c.push(l),a.push(f))}return a}function cu(t,n){return null==(t=Di(t,n=vu(n,t)))||delete t[Mi(Gi(n))]}function su(t,n,e,r){return Zr(t,n,e(br(t,n)),r)}function fu(t,n,e,r){for(var u=t.length,i=r?u:-1;(r?i--:++i<u)&&n(t[i],i,t););return e?tu(t,r?0:i,r?i+1:u):tu(t,r?i+1:0,r?u:i)}function lu(t,n){var e=t;return e instanceof qe&&(e=e.value()),Sn(n,(function(t,n){return n.func.apply(n.thisArg,xn([t],n.args))}),e)}function hu(t,n,e){var u=t.length;if(u<2)return u?au(t[0]):[];for(var i=-1,o=r(u);++i<u;)for(var a=t[i],c=-1;++c<u;)c!=i&&(o[i]=sr(o[i]||a,t[c],n,e));return au(dr(o,1),n,e)}function _u(t,n,e){for(var r=-1,i=t.length,o=n.length,a={};++r<i;){var c=r<o?n[r]:u;e(a,t[r],c)}return a}function pu(t){return Wo(t)?t:[]}function du(t){return"function"==typeof t?t:ec}function vu(t,n){return Po(t)?t:gi(t,n)?[t]:Si(ga(t))}var gu=Hr;function yu(t,n,e){var r=t.length;return e=e===u?r:e,!n&&e>=r?t:tu(t,n,e)}var Fu=an||function(t){return hn.clearTimeout(t)};function Au(t,n){if(n)return t.slice();var e=t.length,r=Pt?Pt(e):new t.constructor(e);return t.copy(r),r}function bu(t){var n=new t.constructor(t.byteLength);return new qt(n).set(new qt(t)),n}function mu(t,n){var e=n?bu(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Eu(t,n){if(t!==n){var e=t!==u,r=null===t,i=t==t,o=aa(t),a=n!==u,c=null===n,s=n==n,f=aa(n);if(!c&&!f&&!o&&t>n||o&&a&&s&&!c&&!f||r&&a&&s||!e&&s||!i)return 1;if(!r&&!o&&!f&&t<n||f&&e&&i&&!r&&!o||c&&e&&i||!a&&i||!s)return-1}return 0}function Du(t,n,e,u){for(var i=-1,o=t.length,a=e.length,c=-1,s=n.length,f=ve(o-a,0),l=r(s+f),h=!u;++c<s;)l[c]=n[c];for(;++i<a;)(h||i<o)&&(l[e[i]]=t[i]);for(;f--;)l[c++]=t[i++];return l}function wu(t,n,e,u){for(var i=-1,o=t.length,a=-1,c=e.length,s=-1,f=n.length,l=ve(o-c,0),h=r(l+f),_=!u;++i<l;)h[i]=t[i];for(var p=i;++s<f;)h[p+s]=n[s];for(;++a<c;)(_||i<o)&&(h[p+e[a]]=t[i++]);return h}function Ou(t,n){var e=-1,u=t.length;for(n||(n=r(u));++e<u;)n[e]=t[e];return n}function Tu(t,n,e,r){var i=!e;e||(e={});for(var o=-1,a=n.length;++o<a;){var c=n[o],s=r?r(e[c],t[c],c,e,t):u;s===u&&(s=t[c]),i?rr(e,c,s):Xe(e,c,s)}return e}function Iu(t,n){return function(e,r){var u=Po(e)?wn:nr,i=n?n():{};return u(e,t,ii(r,2),i)}}function Ru(t){return Hr((function(n,e){var r=-1,i=e.length,o=i>1?e[i-1]:u,a=i>2?e[2]:u;for(o=t.length>3&&"function"==typeof o?(i--,o):u,a&&vi(e[0],e[1],a)&&(o=i<3?u:o,i=1),n=Dt(n);++r<i;){var c=e[r];c&&t(n,c,r,o)}return n}))}function Cu(t,n){return function(e,r){if(null==e)return e;if(!zo(e))return t(e,r);for(var u=e.length,i=n?u:-1,o=Dt(e);(n?i--:++i<u)&&!1!==r(o[i],i,o););return e}}function ku(t){return function(n,e,r){for(var u=-1,i=Dt(n),o=r(n),a=o.length;a--;){var c=o[t?a:++u];if(!1===e(i[c],c,i))break}return n}}function Nu(t){return function(n){var e=ue(n=ga(n))?le(n):u,r=e?e[0]:n.charAt(0),i=e?yu(e,1).join(""):n.slice(1);return r[t]()+i}}function xu(t){return function(n){return Sn(Za(qa(n).replace(Zt,"")),t,"")}}function Su(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=$e(t.prototype),r=t.apply(e,n);return Xo(r)?r:e}}function Mu(t){return function(n,e,r){var i=Dt(n);if(!zo(n)){var o=ii(e,3);n=Ca(n),e=function(t){return o(i[t],t,i)}}var a=t(n,e,r);return a>-1?i[o?n[a]:a]:u}}function ju(t){return Xu((function(n){var e=n.length,r=e,o=Ue.prototype.thru;for(t&&n.reverse();r--;){var a=n[r];if("function"!=typeof a)throw new Tt(i);if(o&&!c&&"wrapper"==ri(a))var c=new Ue([],!0)}for(r=c?r:e;++r<e;){var s=ri(a=n[r]),f="wrapper"==s?ei(a):u;c=f&&yi(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?c[ri(f[0])].apply(c,f[3]):1==a.length&&yi(a)?c[s]():c.thru(a)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&Po(r))return c.plant(r).value();for(var u=0,i=e?n[u].apply(this,t):r;++u<e;)i=n[u].call(this,i);return i}}))}function Yu(t,n,e,i,o,a,c,f,l,h){var _=n&s,p=1&n,d=2&n,v=24&n,g=512&n,y=d?u:Su(t);return function s(){for(var F=arguments.length,A=r(F),b=F;b--;)A[b]=arguments[b];if(v)var m=ui(s),E=function(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}(A,m);if(i&&(A=Du(A,i,o,v)),a&&(A=wu(A,a,c,v)),F-=E,v&&F<h){var D=ae(A,m);return Vu(t,n,Yu,s.placeholder,e,A,D,f,l,h-F)}var w=p?e:this,O=d?w[t]:t;return F=A.length,f?A=function(t,n){for(var e=t.length,r=ge(n.length,e),i=Ou(t);r--;){var o=n[r];t[r]=di(o,e)?i[o]:u}return t}(A,f):g&&F>1&&A.reverse(),_&&l<F&&(A.length=l),this&&this!==hn&&this instanceof s&&(O=y||Su(O)),O.apply(w,A)}}function Lu(t,n){return function(e,r){return function(t,n,e,r){return yr(t,(function(t,u,i){n(r,e(t),u,i)})),r}(e,t,n(r),{})}}function $u(t,n){return function(e,r){var i;if(e===u&&r===u)return n;if(e!==u&&(i=e),r!==u){if(i===u)return r;"string"==typeof e||"string"==typeof r?(e=ou(e),r=ou(r)):(e=iu(e),r=iu(r)),i=t(e,r)}return i}}function Bu(t){return Xu((function(n){return n=Nn(n,Zn(ii())),Hr((function(e){var r=this;return t(n,(function(t){return Dn(t,r,e)}))}))}))}function Uu(t,n){var e=(n=n===u?" ":ou(n)).length;if(e<2)return e?Wr(n,t):n;var r=Wr(n,_n(t/fe(n)));return ue(n)?yu(le(r),0,t).join(""):r.slice(0,t)}function qu(t){return function(n,e,i){return i&&"number"!=typeof i&&vi(n,e,i)&&(e=i=u),n=ha(n),e===u?(e=n,n=0):e=ha(e),function(t,n,e,u){for(var i=-1,o=ve(_n((n-t)/(e||1)),0),a=r(o);o--;)a[u?o:++i]=t,t+=e;return a}(n,e,i=i===u?n<e?1:-1:ha(i),t)}}function Pu(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=da(n),e=da(e)),t(n,e)}}function Vu(t,n,e,r,i,o,a,s,f,l){var h=8&n;n|=h?c:64,4&(n&=~(h?64:c))||(n&=-4);var _=[t,n,i,h?o:u,h?a:u,h?u:o,h?u:a,s,f,l],p=e.apply(u,_);return yi(t)&&Oi(p,_),p.placeholder=r,Ri(p,t,n)}function zu(t){var n=Et[t];return function(t,e){if(t=da(t),(e=null==e?0:ge(_a(e),292))&&Yn(t)){var r=(ga(t)+"e").split("e");return+((r=(ga(n(r[0]+"e"+(+r[1]+e)))+"e").split("e"))[0]+"e"+(+r[1]-e))}return n(t)}}var Wu=we&&1/ce(new we([,-0]))[1]==f?function(t){return new we(t)}:ac;function Hu(t){return function(n){var e=li(n);return e==m?ie(n):e==T?se(n):function(t,n){return Nn(n,(function(n){return[n,t[n]]}))}(n,t(n))}}function Gu(t,n,e,o,f,l,h,_){var p=2&n;if(!p&&"function"!=typeof t)throw new Tt(i);var d=o?o.length:0;if(d||(n&=-97,o=f=u),h=h===u?h:ve(_a(h),0),_=_===u?_:_a(_),d-=f?f.length:0,64&n){var v=o,g=f;o=f=u}var y=p?u:ei(t),F=[t,n,e,o,f,v,g,l,h,_];if(y&&function(t,n){var e=t[1],r=n[1],u=e|r,i=u<131,o=r==s&&8==e||r==s&&256==e&&t[7].length<=n[8]||384==r&&n[7].length<=n[8]&&8==e;if(!i&&!o)return t;1&r&&(t[2]=n[2],u|=1&e?0:4);var c=n[3];if(c){var f=t[3];t[3]=f?Du(f,c,n[4]):c,t[4]=f?ae(t[3],a):n[4]}(c=n[5])&&(f=t[5],t[5]=f?wu(f,c,n[6]):c,t[6]=f?ae(t[5],a):n[6]),(c=n[7])&&(t[7]=c),r&s&&(t[8]=null==t[8]?n[8]:ge(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=u}(F,y),t=F[0],n=F[1],e=F[2],o=F[3],f=F[4],!(_=F[9]=F[9]===u?p?0:t.length:ve(F[9]-d,0))&&24&n&&(n&=-25),n&&1!=n)A=8==n||16==n?function(t,n,e){var i=Su(t);return function o(){for(var a=arguments.length,c=r(a),s=a,f=ui(o);s--;)c[s]=arguments[s];var l=a<3&&c[0]!==f&&c[a-1]!==f?[]:ae(c,f);return(a-=l.length)<e?Vu(t,n,Yu,o.placeholder,u,c,l,u,u,e-a):Dn(this&&this!==hn&&this instanceof o?i:t,this,c)}}(t,n,_):n!=c&&33!=n||f.length?Yu.apply(u,F):function(t,n,e,u){var i=1&n,o=Su(t);return function n(){for(var a=-1,c=arguments.length,s=-1,f=u.length,l=r(f+c),h=this&&this!==hn&&this instanceof n?o:t;++s<f;)l[s]=u[s];for(;c--;)l[s++]=arguments[++a];return Dn(h,i?e:this,l)}}(t,n,e,o);else var A=function(t,n,e){var r=1&n,u=Su(t);return function n(){return(this&&this!==hn&&this instanceof n?u:t).apply(r?e:this,arguments)}}(t,n,e);return Ri((y?Qr:Oi)(A,F),t,n)}function Ku(t,n,e,r){return t===u||$o(t,Ct[e])&&!xt.call(r,e)?n:t}function Zu(t,n,e,r,i,o){return Xo(t)&&Xo(n)&&(o.set(n,t),$r(t,n,u,Zu,o),o.delete(n)),t}function Qu(t){return ra(t)?u:t}function Ju(t,n,e,r,i,o){var a=1&e,c=t.length,s=n.length;if(c!=s&&!(a&&s>c))return!1;var f=o.get(t),l=o.get(n);if(f&&l)return f==n&&l==t;var h=-1,_=!0,p=2&e?new We:u;for(o.set(t,n),o.set(n,t);++h<c;){var d=t[h],v=n[h];if(r)var g=a?r(v,d,h,n,t,o):r(d,v,h,t,n,o);if(g!==u){if(g)continue;_=!1;break}if(p){if(!jn(n,(function(t,n){if(!Jn(p,n)&&(d===t||i(d,t,e,r,o)))return p.push(n)}))){_=!1;break}}else if(d!==v&&!i(d,v,e,r,o)){_=!1;break}}return o.delete(t),o.delete(n),_}function Xu(t){return Ii(Ei(t,u,Pi),t+"")}function ti(t){return mr(t,Ca,si)}function ni(t){return mr(t,ka,fi)}var ei=Ie?function(t){return Ie.get(t)}:ac;function ri(t){for(var n=t.name+"",e=Re[n],r=xt.call(Re,n)?e.length:0;r--;){var u=e[r],i=u.func;if(null==i||i==t)return u.name}return n}function ui(t){return(xt.call(Le,"placeholder")?Le:t).placeholder}function ii(){var t=Le.iteratee||rc;return t=t===rc?xr:t,arguments.length?t(arguments[0],arguments[1]):t}function oi(t,n){var e,r,u=t.__data__;return("string"==(r=typeof(e=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?u["string"==typeof n?"string":"hash"]:u.map}function ai(t){for(var n=Ca(t),e=n.length;e--;){var r=n[e],u=t[r];n[e]=[r,u,bi(u)]}return n}function ci(t,n){var e=function(t,n){return null==t?u:t[n]}(t,n);return Nr(e)?e:u}var si=vn?function(t){return null==t?[]:(t=Dt(t),Rn(vn(t),(function(n){return Wt.call(t,n)})))}:pc,fi=vn?function(t){for(var n=[];t;)xn(n,si(t)),t=Vt(t);return n}:pc,li=Er;function hi(t,n,e){for(var r=-1,u=(n=vu(n,t)).length,i=!1;++r<u;){var o=Mi(n[r]);if(!(i=null!=t&&e(t,o)))break;t=t[o]}return i||++r!=u?i:!!(u=null==t?0:t.length)&&Jo(u)&&di(o,u)&&(Po(t)||qo(t))}function _i(t){return"function"!=typeof t.constructor||Ai(t)?{}:$e(Vt(t))}function pi(t){return Po(t)||qo(t)||!!(Gt&&t&&t[Gt])}function di(t,n){var e=typeof t;return!!(n=null==n?l:n)&&("number"==e||"symbol"!=e&&gt.test(t))&&t>-1&&t%1==0&&t<n}function vi(t,n,e){if(!Xo(e))return!1;var r=typeof n;return!!("number"==r?zo(e)&&di(n,e.length):"string"==r&&n in e)&&$o(e[n],t)}function gi(t,n){if(Po(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!aa(t))||X.test(t)||!J.test(t)||null!=n&&t in Dt(n)}function yi(t){var n=ri(t),e=Le[n];if("function"!=typeof e||!(n in qe.prototype))return!1;if(t===e)return!0;var r=ei(e);return!!r&&t===r[0]}(me&&li(new me(new ArrayBuffer(1)))!=N||Ee&&li(new Ee)!=m||De&&li(De.resolve())!=w||we&&li(new we)!=T||Oe&&li(new Oe)!=C)&&(li=function(t){var n=Er(t),e=n==D?t.constructor:u,r=e?ji(e):"";if(r)switch(r){case Ce:return N;case ke:return m;case Ne:return w;case xe:return T;case Se:return C}return n});var Fi=kt?Zo:dc;function Ai(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Ct)}function bi(t){return t==t&&!Xo(t)}function mi(t,n){return function(e){return null!=e&&e[t]===n&&(n!==u||t in Dt(e))}}function Ei(t,n,e){return n=ve(n===u?t.length-1:n,0),function(){for(var u=arguments,i=-1,o=ve(u.length-n,0),a=r(o);++i<o;)a[i]=u[n+i];i=-1;for(var c=r(n+1);++i<n;)c[i]=u[i];return c[n]=e(a),Dn(t,this,c)}}function Di(t,n){return n.length<2?t:br(t,tu(n,0,-1))}function wi(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var Oi=Ci(Qr),Ti=ln||function(t,n){return hn.setTimeout(t,n)},Ii=Ci(Jr);function Ri(t,n,e){var r=n+"";return Ii(t,function(t,n){var e=n.length;if(!e)return t;var r=e-1;return n[r]=(e>1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return On(p,(function(e){var r="_."+e[0];n&e[1]&&!Cn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(ot);return n?n[1].split(at):[]}(r),e)))}function Ci(t){var n=0,e=0;return function(){var r=ye(),i=16-(r-e);if(e=r,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(u,arguments)}}function ki(t,n){var e=-1,r=t.length,i=r-1;for(n=n===u?r:n;++e<n;){var o=zr(e,i),a=t[o];t[o]=t[e],t[e]=a}return t.length=n,t}var Ni,xi,Si=(Ni=xo((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(tt,(function(t,e,r,u){n.push(r?u.replace(ft,"$1"):e||t)})),n}),(function(t){return 500===xi.size&&xi.clear(),t})),xi=Ni.cache,Ni);function Mi(t){if("string"==typeof t||aa(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function ji(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Yi(t){if(t instanceof qe)return t.clone();var n=new Ue(t.__wrapped__,t.__chain__);return n.__actions__=Ou(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}var Li=Hr((function(t,n){return Wo(t)?sr(t,dr(n,1,Wo,!0)):[]})),$i=Hr((function(t,n){var e=Gi(n);return Wo(e)&&(e=u),Wo(t)?sr(t,dr(n,1,Wo,!0),ii(e,2)):[]})),Bi=Hr((function(t,n){var e=Gi(n);return Wo(e)&&(e=u),Wo(t)?sr(t,dr(n,1,Wo,!0),u,e):[]}));function Ui(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var u=null==e?0:_a(e);return u<0&&(u=ve(r+u,0)),$n(t,ii(n,3),u)}function qi(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return e!==u&&(i=_a(e),i=e<0?ve(r+i,0):ge(i,r-1)),$n(t,ii(n,3),i,!0)}function Pi(t){return null!=t&&t.length?dr(t,1):[]}function Vi(t){return t&&t.length?t[0]:u}var zi=Hr((function(t){var n=Nn(t,pu);return n.length&&n[0]===t[0]?Tr(n):[]})),Wi=Hr((function(t){var n=Gi(t),e=Nn(t,pu);return n===Gi(e)?n=u:e.pop(),e.length&&e[0]===t[0]?Tr(e,ii(n,2)):[]})),Hi=Hr((function(t){var n=Gi(t),e=Nn(t,pu);return(n="function"==typeof n?n:u)&&e.pop(),e.length&&e[0]===t[0]?Tr(e,u,n):[]}));function Gi(t){var n=null==t?0:t.length;return n?t[n-1]:u}var Ki=Hr(Zi);function Zi(t,n){return t&&t.length&&n&&n.length?Pr(t,n):t}var Qi=Xu((function(t,n){var e=null==t?0:t.length,r=ur(t,n);return Vr(t,Nn(n,(function(t){return di(t,e)?+t:t})).sort(Eu)),r}));function Ji(t){return null==t?t:be.call(t)}var Xi=Hr((function(t){return au(dr(t,1,Wo,!0))})),to=Hr((function(t){var n=Gi(t);return Wo(n)&&(n=u),au(dr(t,1,Wo,!0),ii(n,2))})),no=Hr((function(t){var n=Gi(t);return n="function"==typeof n?n:u,au(dr(t,1,Wo,!0),u,n)}));function eo(t){if(!t||!t.length)return[];var n=0;return t=Rn(t,(function(t){if(Wo(t))return n=ve(t.length,n),!0})),Gn(n,(function(n){return Nn(t,Vn(n))}))}function ro(t,n){if(!t||!t.length)return[];var e=eo(t);return null==n?e:Nn(e,(function(t){return Dn(n,u,t)}))}var uo=Hr((function(t,n){return Wo(t)?sr(t,n):[]})),io=Hr((function(t){return hu(Rn(t,Wo))})),oo=Hr((function(t){var n=Gi(t);return Wo(n)&&(n=u),hu(Rn(t,Wo),ii(n,2))})),ao=Hr((function(t){var n=Gi(t);return n="function"==typeof n?n:u,hu(Rn(t,Wo),u,n)})),co=Hr(eo),so=Hr((function(t){var n=t.length,e=n>1?t[n-1]:u;return e="function"==typeof e?(t.pop(),e):u,ro(t,e)}));function fo(t){var n=Le(t);return n.__chain__=!0,n}function lo(t,n){return n(t)}var ho=Xu((function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(n){return ur(n,t)};return!(n>1||this.__actions__.length)&&r instanceof qe&&di(e)?((r=r.slice(e,+e+(n?1:0))).__actions__.push({func:lo,args:[i],thisArg:u}),new Ue(r,this.__chain__).thru((function(t){return n&&!t.length&&t.push(u),t}))):this.thru(i)})),_o=Iu((function(t,n,e){xt.call(t,e)?++t[e]:rr(t,e,1)})),po=Mu(Ui),vo=Mu(qi);function go(t,n){return(Po(t)?On:fr)(t,ii(n,3))}function yo(t,n){return(Po(t)?Tn:lr)(t,ii(n,3))}var Fo=Iu((function(t,n,e){xt.call(t,e)?t[e].push(n):rr(t,e,[n])})),Ao=Hr((function(t,n,e){var u=-1,i="function"==typeof n,o=zo(t)?r(t.length):[];return fr(t,(function(t){o[++u]=i?Dn(n,t,e):Ir(t,n,e)})),o})),bo=Iu((function(t,n,e){rr(t,e,n)}));function mo(t,n){return(Po(t)?Nn:jr)(t,ii(n,3))}var Eo=Iu((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]})),Do=Hr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&vi(t,n[0],n[1])?n=[]:e>2&&vi(n[0],n[1],n[2])&&(n=[n[0]]),Ur(t,dr(n,1),[])})),wo=fn||function(){return hn.Date.now()};function Oo(t,n,e){return n=e?u:n,n=t&&null==n?t.length:n,Gu(t,s,u,u,u,u,n)}function To(t,n){var e;if("function"!=typeof n)throw new Tt(i);return t=_a(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=u),e}}var Io=Hr((function(t,n,e){var r=1;if(e.length){var u=ae(e,ui(Io));r|=c}return Gu(t,r,n,e,u)})),Ro=Hr((function(t,n,e){var r=3;if(e.length){var u=ae(e,ui(Ro));r|=c}return Gu(n,r,t,e,u)}));function Co(t,n,e){var r,o,a,c,s,f,l=0,h=!1,_=!1,p=!0;if("function"!=typeof t)throw new Tt(i);function d(n){var e=r,i=o;return r=o=u,l=n,c=t.apply(i,e)}function v(t){var e=t-f;return f===u||e>=n||e<0||_&&t-l>=a}function g(){var t=wo();if(v(t))return y(t);s=Ti(g,function(t){var e=n-(t-f);return _?ge(e,a-(t-l)):e}(t))}function y(t){return s=u,p&&r?d(t):(r=o=u,c)}function F(){var t=wo(),e=v(t);if(r=arguments,o=this,f=t,e){if(s===u)return function(t){return l=t,s=Ti(g,n),h?d(t):c}(f);if(_)return Fu(s),s=Ti(g,n),d(f)}return s===u&&(s=Ti(g,n)),c}return n=da(n)||0,Xo(e)&&(h=!!e.leading,a=(_="maxWait"in e)?ve(da(e.maxWait)||0,n):a,p="trailing"in e?!!e.trailing:p),F.cancel=function(){s!==u&&Fu(s),l=0,r=f=o=s=u},F.flush=function(){return s===u?c:y(wo())},F}var ko=Hr((function(t,n){return cr(t,1,n)})),No=Hr((function(t,n,e){return cr(t,da(n)||0,e)}));function xo(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Tt(i);var e=function(){var r=arguments,u=n?n.apply(this,r):r[0],i=e.cache;if(i.has(u))return i.get(u);var o=t.apply(this,r);return e.cache=i.set(u,o)||i,o};return e.cache=new(xo.Cache||ze),e}function So(t){if("function"!=typeof t)throw new Tt(i);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}xo.Cache=ze;var Mo=gu((function(t,n){var e=(n=1==n.length&&Po(n[0])?Nn(n[0],Zn(ii())):Nn(dr(n,1),Zn(ii()))).length;return Hr((function(r){for(var u=-1,i=ge(r.length,e);++u<i;)r[u]=n[u].call(this,r[u]);return Dn(t,this,r)}))})),jo=Hr((function(t,n){var e=ae(n,ui(jo));return Gu(t,c,u,n,e)})),Yo=Hr((function(t,n){var e=ae(n,ui(Yo));return Gu(t,64,u,n,e)})),Lo=Xu((function(t,n){return Gu(t,256,u,u,u,n)}));function $o(t,n){return t===n||t!=t&&n!=n}var Bo=Pu(Dr),Uo=Pu((function(t,n){return t>=n})),qo=Rr(function(){return arguments}())?Rr:function(t){return ta(t)&&xt.call(t,"callee")&&!Wt.call(t,"callee")},Po=r.isArray,Vo=yn?Zn(yn):function(t){return ta(t)&&Er(t)==k};function zo(t){return null!=t&&Jo(t.length)&&!Zo(t)}function Wo(t){return ta(t)&&zo(t)}var Ho=gn||dc,Go=Fn?Zn(Fn):function(t){return ta(t)&&Er(t)==y};function Ko(t){if(!ta(t))return!1;var n=Er(t);return n==F||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Zo(t){if(!Xo(t))return!1;var n=Er(t);return n==A||n==b||"[object AsyncFunction]"==n||"[object Proxy]"==n}function Qo(t){return"number"==typeof t&&t==_a(t)}function Jo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Xo(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function ta(t){return null!=t&&"object"==typeof t}var na=An?Zn(An):function(t){return ta(t)&&li(t)==m};function ea(t){return"number"==typeof t||ta(t)&&Er(t)==E}function ra(t){if(!ta(t)||Er(t)!=D)return!1;var n=Vt(t);if(null===n)return!0;var e=xt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Nt.call(e)==Yt}var ua=bn?Zn(bn):function(t){return ta(t)&&Er(t)==O},ia=mn?Zn(mn):function(t){return ta(t)&&li(t)==T};function oa(t){return"string"==typeof t||!Po(t)&&ta(t)&&Er(t)==I}function aa(t){return"symbol"==typeof t||ta(t)&&Er(t)==R}var ca=En?Zn(En):function(t){return ta(t)&&Jo(t.length)&&!!un[Er(t)]},sa=Pu(Mr),fa=Pu((function(t,n){return t<=n}));function la(t){if(!t)return[];if(zo(t))return oa(t)?le(t):Ou(t);if(Kt&&t[Kt])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[Kt]());var n=li(t);return(n==m?ie:n==T?ce:$a)(t)}function ha(t){return t?(t=da(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function _a(t){var n=ha(t),e=n%1;return n==n?e?n-e:n:0}function pa(t){return t?ir(_a(t),0,_):0}function da(t){if("number"==typeof t)return t;if(aa(t))return h;if(Xo(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=Xo(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Kn(t);var e=pt.test(t);return e||vt.test(t)?sn(t.slice(2),e?2:8):_t.test(t)?h:+t}function va(t){return Tu(t,ka(t))}function ga(t){return null==t?"":ou(t)}var ya=Ru((function(t,n){if(Ai(n)||zo(n))Tu(n,Ca(n),t);else for(var e in n)xt.call(n,e)&&Xe(t,e,n[e])})),Fa=Ru((function(t,n){Tu(n,ka(n),t)})),Aa=Ru((function(t,n,e,r){Tu(n,ka(n),t,r)})),ba=Ru((function(t,n,e,r){Tu(n,Ca(n),t,r)})),ma=Xu(ur),Ea=Hr((function(t,n){t=Dt(t);var e=-1,r=n.length,i=r>2?n[2]:u;for(i&&vi(n[0],n[1],i)&&(r=1);++e<r;)for(var o=n[e],a=ka(o),c=-1,s=a.length;++c<s;){var f=a[c],l=t[f];(l===u||$o(l,Ct[f])&&!xt.call(t,f))&&(t[f]=o[f])}return t})),Da=Hr((function(t){return t.push(u,Zu),Dn(xa,u,t)}));function wa(t,n,e){var r=null==t?u:br(t,n);return r===u?e:r}function Oa(t,n){return null!=t&&hi(t,n,Or)}var Ta=Lu((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=jt.call(n)),t[n]=e}),Xa(ec)),Ia=Lu((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=jt.call(n)),xt.call(t,n)?t[n].push(e):t[n]=[e]}),ii),Ra=Hr(Ir);function Ca(t){return zo(t)?Ge(t):Sr(t)}function ka(t){return zo(t)?Ge(t,!0):function(t){if(!Xo(t))return function(t){var n=[];if(null!=t)for(var e in Dt(t))n.push(e);return n}(t);var n=Ai(t),e=[];for(var r in t)("constructor"!=r||!n&&xt.call(t,r))&&e.push(r);return e}(t)}var Na=Ru((function(t,n,e){$r(t,n,e)})),xa=Ru((function(t,n,e,r){$r(t,n,e,r)})),Sa=Xu((function(t,n){var e={};if(null==t)return e;var r=!1;n=Nn(n,(function(n){return n=vu(n,t),r||(r=n.length>1),n})),Tu(t,ni(t),e),r&&(e=or(e,7,Qu));for(var u=n.length;u--;)cu(e,n[u]);return e})),Ma=Xu((function(t,n){return null==t?{}:function(t,n){return qr(t,n,(function(n,e){return Oa(t,e)}))}(t,n)}));function ja(t,n){if(null==t)return{};var e=Nn(ni(t),(function(t){return[t]}));return n=ii(n),qr(t,e,(function(t,e){return n(t,e[0])}))}var Ya=Hu(Ca),La=Hu(ka);function $a(t){return null==t?[]:Qn(t,Ca(t))}var Ba=xu((function(t,n,e){return n=n.toLowerCase(),t+(e?Ua(n):n)}));function Ua(t){return Ka(ga(t).toLowerCase())}function qa(t){return(t=ga(t))&&t.replace(yt,ne).replace(Qt,"")}var Pa=xu((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Va=xu((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),za=Nu("toLowerCase"),Wa=xu((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()})),Ha=xu((function(t,n,e){return t+(e?" ":"")+Ka(n)})),Ga=xu((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Ka=Nu("toUpperCase");function Za(t,n,e){return t=ga(t),(n=e?u:n)===u?function(t){return nn.test(t)}(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(n)||[]}var Qa=Hr((function(t,n){try{return Dn(t,u,n)}catch(t){return Ko(t)?t:new bt(t)}})),Ja=Xu((function(t,n){return On(n,(function(n){n=Mi(n),rr(t,n,Io(t[n],t))})),t}));function Xa(t){return function(){return t}}var tc=ju(),nc=ju(!0);function ec(t){return t}function rc(t){return xr("function"==typeof t?t:or(t,1))}var uc=Hr((function(t,n){return function(e){return Ir(e,t,n)}})),ic=Hr((function(t,n){return function(e){return Ir(t,e,n)}}));function oc(t,n,e){var r=Ca(n),u=Ar(n,r);null!=e||Xo(n)&&(u.length||!r.length)||(e=n,n=t,t=this,u=Ar(n,Ca(n)));var i=!(Xo(e)&&"chain"in e&&!e.chain),o=Zo(t);return On(u,(function(e){var r=n[e];t[e]=r,o&&(t.prototype[e]=function(){var n=this.__chain__;if(i||n){var e=t(this.__wrapped__);return(e.__actions__=Ou(this.__actions__)).push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,xn([this.value()],arguments))})})),t}function ac(){}var cc=Bu(Nn),sc=Bu(In),fc=Bu(jn);function lc(t){return gi(t)?Vn(Mi(t)):function(t){return function(n){return br(n,t)}}(t)}var hc=qu(),_c=qu(!0);function pc(){return[]}function dc(){return!1}var vc,gc=$u((function(t,n){return t+n}),0),yc=zu("ceil"),Fc=$u((function(t,n){return t/n}),1),Ac=zu("floor"),bc=$u((function(t,n){return t*n}),1),mc=zu("round"),Ec=$u((function(t,n){return t-n}),0);return Le.after=function(t,n){if("function"!=typeof n)throw new Tt(i);return t=_a(t),function(){if(--t<1)return n.apply(this,arguments)}},Le.ary=Oo,Le.assign=ya,Le.assignIn=Fa,Le.assignInWith=Aa,Le.assignWith=ba,Le.at=ma,Le.before=To,Le.bind=Io,Le.bindAll=Ja,Le.bindKey=Ro,Le.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Po(t)?t:[t]},Le.chain=fo,Le.chunk=function(t,n,e){n=(e?vi(t,n,e):n===u)?1:ve(_a(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,a=0,c=r(_n(i/n));o<i;)c[a++]=tu(t,o,o+=n);return c},Le.compact=function(t){for(var n=-1,e=null==t?0:t.length,r=0,u=[];++n<e;){var i=t[n];i&&(u[r++]=i)}return u},Le.concat=function(){var t=arguments.length;if(!t)return[];for(var n=r(t-1),e=arguments[0],u=t;u--;)n[u-1]=arguments[u];return xn(Po(e)?Ou(e):[e],dr(n,1))},Le.cond=function(t){var n=null==t?0:t.length,e=ii();return t=n?Nn(t,(function(t){if("function"!=typeof t[1])throw new Tt(i);return[e(t[0]),t[1]]})):[],Hr((function(e){for(var r=-1;++r<n;){var u=t[r];if(Dn(u[0],this,e))return Dn(u[1],this,e)}}))},Le.conforms=function(t){return function(t){var n=Ca(t);return function(e){return ar(e,t,n)}}(or(t,1))},Le.constant=Xa,Le.countBy=_o,Le.create=function(t,n){var e=$e(t);return null==n?e:er(e,n)},Le.curry=function t(n,e,r){var i=Gu(n,8,u,u,u,u,u,e=r?u:e);return i.placeholder=t.placeholder,i},Le.curryRight=function t(n,e,r){var i=Gu(n,16,u,u,u,u,u,e=r?u:e);return i.placeholder=t.placeholder,i},Le.debounce=Co,Le.defaults=Ea,Le.defaultsDeep=Da,Le.defer=ko,Le.delay=No,Le.difference=Li,Le.differenceBy=$i,Le.differenceWith=Bi,Le.drop=function(t,n,e){var r=null==t?0:t.length;return r?tu(t,(n=e||n===u?1:_a(n))<0?0:n,r):[]},Le.dropRight=function(t,n,e){var r=null==t?0:t.length;return r?tu(t,0,(n=r-(n=e||n===u?1:_a(n)))<0?0:n):[]},Le.dropRightWhile=function(t,n){return t&&t.length?fu(t,ii(n,3),!0,!0):[]},Le.dropWhile=function(t,n){return t&&t.length?fu(t,ii(n,3),!0):[]},Le.fill=function(t,n,e,r){var i=null==t?0:t.length;return i?(e&&"number"!=typeof e&&vi(t,n,e)&&(e=0,r=i),function(t,n,e,r){var i=t.length;for((e=_a(e))<0&&(e=-e>i?0:i+e),(r=r===u||r>i?i:_a(r))<0&&(r+=i),r=e>r?0:pa(r);e<r;)t[e++]=n;return t}(t,n,e,r)):[]},Le.filter=function(t,n){return(Po(t)?Rn:pr)(t,ii(n,3))},Le.flatMap=function(t,n){return dr(mo(t,n),1)},Le.flatMapDeep=function(t,n){return dr(mo(t,n),f)},Le.flatMapDepth=function(t,n,e){return e=e===u?1:_a(e),dr(mo(t,n),e)},Le.flatten=Pi,Le.flattenDeep=function(t){return null!=t&&t.length?dr(t,f):[]},Le.flattenDepth=function(t,n){return null!=t&&t.length?dr(t,n=n===u?1:_a(n)):[]},Le.flip=function(t){return Gu(t,512)},Le.flow=tc,Le.flowRight=nc,Le.fromPairs=function(t){for(var n=-1,e=null==t?0:t.length,r={};++n<e;){var u=t[n];r[u[0]]=u[1]}return r},Le.functions=function(t){return null==t?[]:Ar(t,Ca(t))},Le.functionsIn=function(t){return null==t?[]:Ar(t,ka(t))},Le.groupBy=Fo,Le.initial=function(t){return null!=t&&t.length?tu(t,0,-1):[]},Le.intersection=zi,Le.intersectionBy=Wi,Le.intersectionWith=Hi,Le.invert=Ta,Le.invertBy=Ia,Le.invokeMap=Ao,Le.iteratee=rc,Le.keyBy=bo,Le.keys=Ca,Le.keysIn=ka,Le.map=mo,Le.mapKeys=function(t,n){var e={};return n=ii(n,3),yr(t,(function(t,r,u){rr(e,n(t,r,u),t)})),e},Le.mapValues=function(t,n){var e={};return n=ii(n,3),yr(t,(function(t,r,u){rr(e,r,n(t,r,u))})),e},Le.matches=function(t){return Yr(or(t,1))},Le.matchesProperty=function(t,n){return Lr(t,or(n,1))},Le.memoize=xo,Le.merge=Na,Le.mergeWith=xa,Le.method=uc,Le.methodOf=ic,Le.mixin=oc,Le.negate=So,Le.nthArg=function(t){return t=_a(t),Hr((function(n){return Br(n,t)}))},Le.omit=Sa,Le.omitBy=function(t,n){return ja(t,So(ii(n)))},Le.once=function(t){return To(2,t)},Le.orderBy=function(t,n,e,r){return null==t?[]:(Po(n)||(n=null==n?[]:[n]),Po(e=r?u:e)||(e=null==e?[]:[e]),Ur(t,n,e))},Le.over=cc,Le.overArgs=Mo,Le.overEvery=sc,Le.overSome=fc,Le.partial=jo,Le.partialRight=Yo,Le.partition=Eo,Le.pick=Ma,Le.pickBy=ja,Le.property=lc,Le.propertyOf=function(t){return function(n){return null==t?u:br(t,n)}},Le.pull=Ki,Le.pullAll=Zi,Le.pullAllBy=function(t,n,e){return t&&t.length&&n&&n.length?Pr(t,n,ii(e,2)):t},Le.pullAllWith=function(t,n,e){return t&&t.length&&n&&n.length?Pr(t,n,u,e):t},Le.pullAt=Qi,Le.range=hc,Le.rangeRight=_c,Le.rearg=Lo,Le.reject=function(t,n){return(Po(t)?Rn:pr)(t,So(ii(n,3)))},Le.remove=function(t,n){var e=[];if(!t||!t.length)return e;var r=-1,u=[],i=t.length;for(n=ii(n,3);++r<i;){var o=t[r];n(o,r,t)&&(e.push(o),u.push(r))}return Vr(t,u),e},Le.rest=function(t,n){if("function"!=typeof t)throw new Tt(i);return Hr(t,n=n===u?n:_a(n))},Le.reverse=Ji,Le.sampleSize=function(t,n,e){return n=(e?vi(t,n,e):n===u)?1:_a(n),(Po(t)?Ze:Kr)(t,n)},Le.set=function(t,n,e){return null==t?t:Zr(t,n,e)},Le.setWith=function(t,n,e,r){return r="function"==typeof r?r:u,null==t?t:Zr(t,n,e,r)},Le.shuffle=function(t){return(Po(t)?Qe:Xr)(t)},Le.slice=function(t,n,e){var r=null==t?0:t.length;return r?(e&&"number"!=typeof e&&vi(t,n,e)?(n=0,e=r):(n=null==n?0:_a(n),e=e===u?r:_a(e)),tu(t,n,e)):[]},Le.sortBy=Do,Le.sortedUniq=function(t){return t&&t.length?uu(t):[]},Le.sortedUniqBy=function(t,n){return t&&t.length?uu(t,ii(n,2)):[]},Le.split=function(t,n,e){return e&&"number"!=typeof e&&vi(t,n,e)&&(n=e=u),(e=e===u?_:e>>>0)?(t=ga(t))&&("string"==typeof n||null!=n&&!ua(n))&&!(n=ou(n))&&ue(t)?yu(le(t),0,e):t.split(n,e):[]},Le.spread=function(t,n){if("function"!=typeof t)throw new Tt(i);return n=null==n?0:ve(_a(n),0),Hr((function(e){var r=e[n],u=yu(e,0,n);return r&&xn(u,r),Dn(t,this,u)}))},Le.tail=function(t){var n=null==t?0:t.length;return n?tu(t,1,n):[]},Le.take=function(t,n,e){return t&&t.length?tu(t,0,(n=e||n===u?1:_a(n))<0?0:n):[]},Le.takeRight=function(t,n,e){var r=null==t?0:t.length;return r?tu(t,(n=r-(n=e||n===u?1:_a(n)))<0?0:n,r):[]},Le.takeRightWhile=function(t,n){return t&&t.length?fu(t,ii(n,3),!1,!0):[]},Le.takeWhile=function(t,n){return t&&t.length?fu(t,ii(n,3)):[]},Le.tap=function(t,n){return n(t),t},Le.throttle=function(t,n,e){var r=!0,u=!0;if("function"!=typeof t)throw new Tt(i);return Xo(e)&&(r="leading"in e?!!e.leading:r,u="trailing"in e?!!e.trailing:u),Co(t,n,{leading:r,maxWait:n,trailing:u})},Le.thru=lo,Le.toArray=la,Le.toPairs=Ya,Le.toPairsIn=La,Le.toPath=function(t){return Po(t)?Nn(t,Mi):aa(t)?[t]:Ou(Si(ga(t)))},Le.toPlainObject=va,Le.transform=function(t,n,e){var r=Po(t),u=r||Ho(t)||ca(t);if(n=ii(n,4),null==e){var i=t&&t.constructor;e=u?r?new i:[]:Xo(t)&&Zo(i)?$e(Vt(t)):{}}return(u?On:yr)(t,(function(t,r,u){return n(e,t,r,u)})),e},Le.unary=function(t){return Oo(t,1)},Le.union=Xi,Le.unionBy=to,Le.unionWith=no,Le.uniq=function(t){return t&&t.length?au(t):[]},Le.uniqBy=function(t,n){return t&&t.length?au(t,ii(n,2)):[]},Le.uniqWith=function(t,n){return n="function"==typeof n?n:u,t&&t.length?au(t,u,n):[]},Le.unset=function(t,n){return null==t||cu(t,n)},Le.unzip=eo,Le.unzipWith=ro,Le.update=function(t,n,e){return null==t?t:su(t,n,du(e))},Le.updateWith=function(t,n,e,r){return r="function"==typeof r?r:u,null==t?t:su(t,n,du(e),r)},Le.values=$a,Le.valuesIn=function(t){return null==t?[]:Qn(t,ka(t))},Le.without=uo,Le.words=Za,Le.wrap=function(t,n){return jo(du(n),t)},Le.xor=io,Le.xorBy=oo,Le.xorWith=ao,Le.zip=co,Le.zipObject=function(t,n){return _u(t||[],n||[],Xe)},Le.zipObjectDeep=function(t,n){return _u(t||[],n||[],Zr)},Le.zipWith=so,Le.entries=Ya,Le.entriesIn=La,Le.extend=Fa,Le.extendWith=Aa,oc(Le,Le),Le.add=gc,Le.attempt=Qa,Le.camelCase=Ba,Le.capitalize=Ua,Le.ceil=yc,Le.clamp=function(t,n,e){return e===u&&(e=n,n=u),e!==u&&(e=(e=da(e))==e?e:0),n!==u&&(n=(n=da(n))==n?n:0),ir(da(t),n,e)},Le.clone=function(t){return or(t,4)},Le.cloneDeep=function(t){return or(t,5)},Le.cloneDeepWith=function(t,n){return or(t,5,n="function"==typeof n?n:u)},Le.cloneWith=function(t,n){return or(t,4,n="function"==typeof n?n:u)},Le.conformsTo=function(t,n){return null==n||ar(t,n,Ca(n))},Le.deburr=qa,Le.defaultTo=function(t,n){return null==t||t!=t?n:t},Le.divide=Fc,Le.endsWith=function(t,n,e){t=ga(t),n=ou(n);var r=t.length,i=e=e===u?r:ir(_a(e),0,r);return(e-=n.length)>=0&&t.slice(e,i)==n},Le.eq=$o,Le.escape=function(t){return(t=ga(t))&&G.test(t)?t.replace(W,ee):t},Le.escapeRegExp=function(t){return(t=ga(t))&&et.test(t)?t.replace(nt,"\\$&"):t},Le.every=function(t,n,e){var r=Po(t)?In:hr;return e&&vi(t,n,e)&&(n=u),r(t,ii(n,3))},Le.find=po,Le.findIndex=Ui,Le.findKey=function(t,n){return Ln(t,ii(n,3),yr)},Le.findLast=vo,Le.findLastIndex=qi,Le.findLastKey=function(t,n){return Ln(t,ii(n,3),Fr)},Le.floor=Ac,Le.forEach=go,Le.forEachRight=yo,Le.forIn=function(t,n){return null==t?t:vr(t,ii(n,3),ka)},Le.forInRight=function(t,n){return null==t?t:gr(t,ii(n,3),ka)},Le.forOwn=function(t,n){return t&&yr(t,ii(n,3))},Le.forOwnRight=function(t,n){return t&&Fr(t,ii(n,3))},Le.get=wa,Le.gt=Bo,Le.gte=Uo,Le.has=function(t,n){return null!=t&&hi(t,n,wr)},Le.hasIn=Oa,Le.head=Vi,Le.identity=ec,Le.includes=function(t,n,e,r){t=zo(t)?t:$a(t),e=e&&!r?_a(e):0;var u=t.length;return e<0&&(e=ve(u+e,0)),oa(t)?e<=u&&t.indexOf(n,e)>-1:!!u&&Bn(t,n,e)>-1},Le.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var u=null==e?0:_a(e);return u<0&&(u=ve(r+u,0)),Bn(t,n,u)},Le.inRange=function(t,n,e){return n=ha(n),e===u?(e=n,n=0):e=ha(e),function(t,n,e){return t>=ge(n,e)&&t<ve(n,e)}(t=da(t),n,e)},Le.invoke=Ra,Le.isArguments=qo,Le.isArray=Po,Le.isArrayBuffer=Vo,Le.isArrayLike=zo,Le.isArrayLikeObject=Wo,Le.isBoolean=function(t){return!0===t||!1===t||ta(t)&&Er(t)==g},Le.isBuffer=Ho,Le.isDate=Go,Le.isElement=function(t){return ta(t)&&1===t.nodeType&&!ra(t)},Le.isEmpty=function(t){if(null==t)return!0;if(zo(t)&&(Po(t)||"string"==typeof t||"function"==typeof t.splice||Ho(t)||ca(t)||qo(t)))return!t.length;var n=li(t);if(n==m||n==T)return!t.size;if(Ai(t))return!Sr(t).length;for(var e in t)if(xt.call(t,e))return!1;return!0},Le.isEqual=function(t,n){return Cr(t,n)},Le.isEqualWith=function(t,n,e){var r=(e="function"==typeof e?e:u)?e(t,n):u;return r===u?Cr(t,n,u,e):!!r},Le.isError=Ko,Le.isFinite=function(t){return"number"==typeof t&&Yn(t)},Le.isFunction=Zo,Le.isInteger=Qo,Le.isLength=Jo,Le.isMap=na,Le.isMatch=function(t,n){return t===n||kr(t,n,ai(n))},Le.isMatchWith=function(t,n,e){return e="function"==typeof e?e:u,kr(t,n,ai(n),e)},Le.isNaN=function(t){return ea(t)&&t!=+t},Le.isNative=function(t){if(Fi(t))throw new bt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(t)},Le.isNil=function(t){return null==t},Le.isNull=function(t){return null===t},Le.isNumber=ea,Le.isObject=Xo,Le.isObjectLike=ta,Le.isPlainObject=ra,Le.isRegExp=ua,Le.isSafeInteger=function(t){return Qo(t)&&t>=-9007199254740991&&t<=l},Le.isSet=ia,Le.isString=oa,Le.isSymbol=aa,Le.isTypedArray=ca,Le.isUndefined=function(t){return t===u},Le.isWeakMap=function(t){return ta(t)&&li(t)==C},Le.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==Er(t)},Le.join=function(t,n){return null==t?"":zn.call(t,n)},Le.kebabCase=Pa,Le.last=Gi,Le.lastIndexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=r;return e!==u&&(i=(i=_a(e))<0?ve(r+i,0):ge(i,r-1)),n==n?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(t,n,i):$n(t,qn,i,!0)},Le.lowerCase=Va,Le.lowerFirst=za,Le.lt=sa,Le.lte=fa,Le.max=function(t){return t&&t.length?_r(t,ec,Dr):u},Le.maxBy=function(t,n){return t&&t.length?_r(t,ii(n,2),Dr):u},Le.mean=function(t){return Pn(t,ec)},Le.meanBy=function(t,n){return Pn(t,ii(n,2))},Le.min=function(t){return t&&t.length?_r(t,ec,Mr):u},Le.minBy=function(t,n){return t&&t.length?_r(t,ii(n,2),Mr):u},Le.stubArray=pc,Le.stubFalse=dc,Le.stubObject=function(){return{}},Le.stubString=function(){return""},Le.stubTrue=function(){return!0},Le.multiply=bc,Le.nth=function(t,n){return t&&t.length?Br(t,_a(n)):u},Le.noConflict=function(){return hn._===this&&(hn._=Lt),this},Le.noop=ac,Le.now=wo,Le.pad=function(t,n,e){t=ga(t);var r=(n=_a(n))?fe(t):0;if(!n||r>=n)return t;var u=(n-r)/2;return Uu(pn(u),e)+t+Uu(_n(u),e)},Le.padEnd=function(t,n,e){t=ga(t);var r=(n=_a(n))?fe(t):0;return n&&r<n?t+Uu(n-r,e):t},Le.padStart=function(t,n,e){t=ga(t);var r=(n=_a(n))?fe(t):0;return n&&r<n?Uu(n-r,e)+t:t},Le.parseInt=function(t,n,e){return e||null==n?n=0:n&&(n=+n),Fe(ga(t).replace(rt,""),n||0)},Le.random=function(t,n,e){if(e&&"boolean"!=typeof e&&vi(t,n,e)&&(n=e=u),e===u&&("boolean"==typeof n?(e=n,n=u):"boolean"==typeof t&&(e=t,t=u)),t===u&&n===u?(t=0,n=1):(t=ha(t),n===u?(n=t,t=0):n=ha(n)),t>n){var r=t;t=n,n=r}if(e||t%1||n%1){var i=Ae();return ge(t+i*(n-t+cn("1e-"+((i+"").length-1))),n)}return zr(t,n)},Le.reduce=function(t,n,e){var r=Po(t)?Sn:Wn,u=arguments.length<3;return r(t,ii(n,4),e,u,fr)},Le.reduceRight=function(t,n,e){var r=Po(t)?Mn:Wn,u=arguments.length<3;return r(t,ii(n,4),e,u,lr)},Le.repeat=function(t,n,e){return n=(e?vi(t,n,e):n===u)?1:_a(n),Wr(ga(t),n)},Le.replace=function(){var t=arguments,n=ga(t[0]);return t.length<3?n:n.replace(t[1],t[2])},Le.result=function(t,n,e){var r=-1,i=(n=vu(n,t)).length;for(i||(i=1,t=u);++r<i;){var o=null==t?u:t[Mi(n[r])];o===u&&(r=i,o=e),t=Zo(o)?o.call(t):o}return t},Le.round=mc,Le.runInContext=t,Le.sample=function(t){return(Po(t)?Ke:Gr)(t)},Le.size=function(t){if(null==t)return 0;if(zo(t))return oa(t)?fe(t):t.length;var n=li(t);return n==m||n==T?t.size:Sr(t).length},Le.snakeCase=Wa,Le.some=function(t,n,e){var r=Po(t)?jn:nu;return e&&vi(t,n,e)&&(n=u),r(t,ii(n,3))},Le.sortedIndex=function(t,n){return eu(t,n)},Le.sortedIndexBy=function(t,n,e){return ru(t,n,ii(e,2))},Le.sortedIndexOf=function(t,n){var e=null==t?0:t.length;if(e){var r=eu(t,n);if(r<e&&$o(t[r],n))return r}return-1},Le.sortedLastIndex=function(t,n){return eu(t,n,!0)},Le.sortedLastIndexBy=function(t,n,e){return ru(t,n,ii(e,2),!0)},Le.sortedLastIndexOf=function(t,n){if(null!=t&&t.length){var e=eu(t,n,!0)-1;if($o(t[e],n))return e}return-1},Le.startCase=Ha,Le.startsWith=function(t,n,e){return t=ga(t),e=null==e?0:ir(_a(e),0,t.length),n=ou(n),t.slice(e,e+n.length)==n},Le.subtract=Ec,Le.sum=function(t){return t&&t.length?Hn(t,ec):0},Le.sumBy=function(t,n){return t&&t.length?Hn(t,ii(n,2)):0},Le.template=function(t,n,e){var r=Le.templateSettings;e&&vi(t,n,e)&&(n=u),t=ga(t),n=Aa({},n,r,Ku);var i,o,a=Aa({},n.imports,r.imports,Ku),c=Ca(a),s=Qn(a,c),f=0,l=n.interpolate||Ft,h="__p += '",_=wt((n.escape||Ft).source+"|"+l.source+"|"+(l===Q?lt:Ft).source+"|"+(n.evaluate||Ft).source+"|$","g"),p="//# sourceURL="+(xt.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rn+"]")+"\n";t.replace(_,(function(n,e,r,u,a,c){return r||(r=u),h+=t.slice(f,c).replace(At,re),e&&(i=!0,h+="' +\n__e("+e+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=c+n.length,n})),h+="';\n";var d=xt.call(n,"variable")&&n.variable;if(d){if(st.test(d))throw new bt("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(q,""):h).replace(P,"$1").replace(V,"$1;"),h="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=Qa((function(){return mt(c,p+"return "+h).apply(u,s)}));if(v.source=h,Ko(v))throw v;return v},Le.times=function(t,n){if((t=_a(t))<1||t>l)return[];var e=_,r=ge(t,_);n=ii(n),t-=_;for(var u=Gn(r,n);++e<t;)n(e);return u},Le.toFinite=ha,Le.toInteger=_a,Le.toLength=pa,Le.toLower=function(t){return ga(t).toLowerCase()},Le.toNumber=da,Le.toSafeInteger=function(t){return t?ir(_a(t),-9007199254740991,l):0===t?t:0},Le.toString=ga,Le.toUpper=function(t){return ga(t).toUpperCase()},Le.trim=function(t,n,e){if((t=ga(t))&&(e||n===u))return Kn(t);if(!t||!(n=ou(n)))return t;var r=le(t),i=le(n);return yu(r,Xn(r,i),te(r,i)+1).join("")},Le.trimEnd=function(t,n,e){if((t=ga(t))&&(e||n===u))return t.slice(0,he(t)+1);if(!t||!(n=ou(n)))return t;var r=le(t);return yu(r,0,te(r,le(n))+1).join("")},Le.trimStart=function(t,n,e){if((t=ga(t))&&(e||n===u))return t.replace(rt,"");if(!t||!(n=ou(n)))return t;var r=le(t);return yu(r,Xn(r,le(n))).join("")},Le.truncate=function(t,n){var e=30,r="...";if(Xo(n)){var i="separator"in n?n.separator:i;e="length"in n?_a(n.length):e,r="omission"in n?ou(n.omission):r}var o=(t=ga(t)).length;if(ue(t)){var a=le(t);o=a.length}if(e>=o)return t;var c=e-fe(r);if(c<1)return r;var s=a?yu(a,0,c).join(""):t.slice(0,c);if(i===u)return s+r;if(a&&(c+=s.length-c),ua(i)){if(t.slice(c).search(i)){var f,l=s;for(i.global||(i=wt(i.source,ga(ht.exec(i))+"g")),i.lastIndex=0;f=i.exec(l);)var h=f.index;s=s.slice(0,h===u?c:h)}}else if(t.indexOf(ou(i),c)!=c){var _=s.lastIndexOf(i);_>-1&&(s=s.slice(0,_))}return s+r},Le.unescape=function(t){return(t=ga(t))&&H.test(t)?t.replace(z,_e):t},Le.uniqueId=function(t){var n=++St;return ga(t)+n},Le.upperCase=Ga,Le.upperFirst=Ka,Le.each=go,Le.eachRight=yo,Le.first=Vi,oc(Le,(vc={},yr(Le,(function(t,n){xt.call(Le.prototype,n)||(vc[n]=t)})),vc),{chain:!1}),Le.VERSION="4.17.21",On(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Le[t].placeholder=Le})),On(["drop","take"],(function(t,n){qe.prototype[t]=function(e){e=e===u?1:ve(_a(e),0);var r=this.__filtered__&&!n?new qe(this):this.clone();return r.__filtered__?r.__takeCount__=ge(e,r.__takeCount__):r.__views__.push({size:ge(e,_),type:t+(r.__dir__<0?"Right":"")}),r},qe.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),On(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;qe.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:ii(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),On(["head","last"],(function(t,n){var e="take"+(n?"Right":"");qe.prototype[t]=function(){return this[e](1).value()[0]}})),On(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");qe.prototype[t]=function(){return this.__filtered__?new qe(this):this[e](1)}})),qe.prototype.compact=function(){return this.filter(ec)},qe.prototype.find=function(t){return this.filter(t).head()},qe.prototype.findLast=function(t){return this.reverse().find(t)},qe.prototype.invokeMap=Hr((function(t,n){return"function"==typeof t?new qe(this):this.map((function(e){return Ir(e,t,n)}))})),qe.prototype.reject=function(t){return this.filter(So(ii(t)))},qe.prototype.slice=function(t,n){t=_a(t);var e=this;return e.__filtered__&&(t>0||n<0)?new qe(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==u&&(e=(n=_a(n))<0?e.dropRight(-n):e.take(n-t)),e)},qe.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qe.prototype.toArray=function(){return this.take(_)},yr(qe.prototype,(function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),i=Le[r?"take"+("last"==n?"Right":""):n],o=r||/^find/.test(n);i&&(Le.prototype[n]=function(){var n=this.__wrapped__,a=r?[1]:arguments,c=n instanceof qe,s=a[0],f=c||Po(n),l=function(t){var n=i.apply(Le,xn([t],a));return r&&h?n[0]:n};f&&e&&"function"==typeof s&&1!=s.length&&(c=f=!1);var h=this.__chain__,_=!!this.__actions__.length,p=o&&!h,d=c&&!_;if(!o&&f){n=d?n:new qe(this);var v=t.apply(n,a);return v.__actions__.push({func:lo,args:[l],thisArg:u}),new Ue(v,h)}return p&&d?t.apply(this,a):(v=this.thru(l),p?r?v.value()[0]:v.value():v)})})),On(["pop","push","shift","sort","splice","unshift"],(function(t){var n=It[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Le.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var u=this.value();return n.apply(Po(u)?u:[],t)}return this[e]((function(e){return n.apply(Po(e)?e:[],t)}))}})),yr(qe.prototype,(function(t,n){var e=Le[n];if(e){var r=e.name+"";xt.call(Re,r)||(Re[r]=[]),Re[r].push({name:n,func:e})}})),Re[Yu(u,2).name]=[{name:"wrapper",func:u}],qe.prototype.clone=function(){var t=new qe(this.__wrapped__);return t.__actions__=Ou(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ou(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ou(this.__views__),t},qe.prototype.reverse=function(){if(this.__filtered__){var t=new qe(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qe.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Po(t),r=n<0,u=e?t.length:0,i=function(t,n,e){for(var r=-1,u=e.length;++r<u;){var i=e[r],o=i.size;switch(i.type){case"drop":t+=o;break;case"dropRight":n-=o;break;case"take":n=ge(n,t+o);break;case"takeRight":t=ve(t,n-o)}}return{start:t,end:n}}(0,u,this.__views__),o=i.start,a=i.end,c=a-o,s=r?a:o-1,f=this.__iteratees__,l=f.length,h=0,_=ge(c,this.__takeCount__);if(!e||!r&&u==c&&_==c)return lu(t,this.__actions__);var p=[];t:for(;c--&&h<_;){for(var d=-1,v=t[s+=n];++d<l;){var g=f[d],y=g.iteratee,F=g.type,A=y(v);if(2==F)v=A;else if(!A){if(1==F)continue t;break t}}p[h++]=v}return p},Le.prototype.at=ho,Le.prototype.chain=function(){return fo(this)},Le.prototype.commit=function(){return new Ue(this.value(),this.__chain__)},Le.prototype.next=function(){this.__values__===u&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?u:this.__values__[this.__index__++]}},Le.prototype.plant=function(t){for(var n,e=this;e instanceof Be;){var r=Yi(e);r.__index__=0,r.__values__=u,n?i.__wrapped__=r:n=r;var i=r;e=e.__wrapped__}return i.__wrapped__=t,n},Le.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qe){var n=t;return this.__actions__.length&&(n=new qe(this)),(n=n.reverse()).__actions__.push({func:lo,args:[Ji],thisArg:u}),new Ue(n,this.__chain__)}return this.thru(Ji)},Le.prototype.toJSON=Le.prototype.valueOf=Le.prototype.value=function(){return lu(this.__wrapped__,this.__actions__)},Le.prototype.first=Le.prototype.head,Kt&&(Le.prototype[Kt]=function(){return this}),Le}();hn._=pe,(r=function(){return pe}.call(n,e,n,t))===u||(t.exports=r)}.call(this)},333:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertDate=n.assertEmail=n.assertHexString=n.assertUuid=n.assertBoolean=n.assertNumber=n.assertString=void 0,n.formatError=o,n.assertNonNullable=function(t,n){(0,r.assertTruthy)((0,u.isNonNullable)(t),(()=>o(n,"Value is "+(void 0===t?"undefined":"null"),t)))};const r=e(373),u=e(665),i=e(663);function o(t,n,e){const u=(0,r.getAssertionErrorFromProvider)(t);if("object"==typeof u)throw u;return`${u?`${u}: `:""}${n} ${(0,i.formatValue)(e)}`}n.assertString=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isString)(t),(()=>o(n,"Not a string",t)))},n.assertNumber=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isNumber)(t),(()=>o(n,"Not a number",t)))},n.assertBoolean=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isBoolean)(t),(()=>o(n,"Not a boolean",t)))},n.assertUuid=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isUuid)(t),(()=>o(n,"Invalid uuid",t)))},n.assertHexString=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isHexString)(t),(()=>o(n,"Invalid hex string",t)))},n.assertEmail=(t,n=void 0)=>{(0,r.assertTruthy)((0,u.isEmail)(t),(()=>o(n,"Invalid email",t)))},n.assertDate=(t,n=void 0)=>{(0,r.assertTruthy)(t instanceof Date,(()=>o(n,"Invalid Date",t)))}},373:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setDefaultAssertionErrorFactory=function(t){o=t||i},n.assertTruthy=a,n.truthy=function(t,n,...e){return a(t,n,...e),t},n.fail=c,n.getAssertionErrorFromProvider=s,n.getErrorMessage=f,n.assertObject=l,n.assertArray=function(t,n,e={},u=void 0){var i,o;const c=_(u);a(Array.isArray(t),(()=>`${c()}value is not an array: ${t}`));const s=null!==(i=e.minLength)&&void 0!==i?i:0,f=null!==(o=e.maxLength)&&void 0!==o?o:1/0;a(t.length>=s,(()=>`${c()}array length < minLength. Array length: ${t.length}, minLength: ${s}`)),a(t.length<=f,(()=>`${c()}array length > maxLength. Array length: ${t.length}, maxLength: ${f}`)),e.uniqueByIdentity&&a((0,r.checkArrayHasUniqueElements)(t,e.uniqueByIdentity),(()=>`${c()}array contains non-unique elements`));let l=0;const h=()=>`${c("no-space-separator")}[${l}]`;for(;l<t.length;l++)p(t[l],n,h)},n.assertRecord=function(t,n,e={},r=void 0){const i=_(r);a("object"==typeof t,(()=>`${i()}value is not an object: ${(0,u.formatValue)(t)}`)),a(null!==t,(()=>`${i()}value is null`)),a(!Array.isArray(t),(()=>`${i()}the value is not a record, but is an array`));for(const[r,o]of Object.entries(t)){const t=()=>`${i("no-space-separator")}['${r}']`;e.keyAssertion&&p(r,e.keyAssertion,(()=>`${t()}, key assertion failed:`)),p(o,n,t);const{keyField:c}=e;if(c){a("object"==typeof o&&null!==o,(()=>`${t()} is not an object: ${(0,u.formatValue)(o)}`));const n=o[c];a(n===r,(()=>`${t()} key value does not match object field '${c}' value: ${(0,u.formatValue)(n)}`))}}e.$o&&e.$o(t,r)},n.callValueAssertion=h;const r=e(665),u=e(663),i=t=>new Error(t);let o=i;function a(t,n,...e){t||c(n,...e)}function c(t,...n){const e=s(t);if("object"==typeof e)throw e;throw o(e||"Assertion error",...n)}function s(t){return void 0===t?"":"string"==typeof t?t:t()}function f(t){const n=s(t);return"string"==typeof n?n:n.message||"<no error message>"}function l(t,n,e=void 0,r={}){const u=()=>f(e),i=t=>{const n=u();return 0===n.length?t:`${n} ${t}`};a("object"==typeof t,(()=>i("is not an object: "+typeof t))),a(void 0!==t,(()=>i("is not defined"))),a(null!==t,(()=>i("is null"))),a(!Array.isArray(t),(()=>i("is an array.")));const o=Object.entries(n);if(r.failOnUnknownFields){const n=r.allowedUnknownFieldNames||[];for(const e in t)a(n.includes(e)||o.some((([t])=>e===t)),i(`property can't be checked: ${e}`))}let c;for(const[n,e]of o){a("function"==typeof e||"object"==typeof e&&null!==e,(()=>`${u()}.${n} assertion is not an object or a function: ${typeof e}`));const r=t[n],i=()=>`${u()}.${n}`;if("object"==typeof e)a(!Array.isArray(r),(()=>`${u()}.${i()} use arrayAssertion() to create a ValueAssertion for an array`)),l(r,e,i);else if(a("function"==typeof e,(()=>`${u()}.${i()} assertion is not a function`)),"$o"===n)c=e;else{const t=e(r,i);a(void 0===t,`Assertion function must assert (void) but it returns a value: ${t}. Wrap with $u()?`)}}c&&c(t,e)}function h(t,n,e){n(t,e)}function _(t){return(n="with-space-separator")=>{const e=f(t);return e?`${e}${"with-space-separator"===n?" ":""}`:""}}function p(t,n,e){"object"==typeof n?(a(!Array.isArray(t),(()=>`${e}: use arrayAssertion() to create a ValueAssertion for an array`)),l(t,n,e)):h(t,n,e)}},596:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.stringAssertion=void 0,n.objectAssertion=function(t,n=void 0){return e=>(0,r.assertObject)(e,t,n)},n.arrayAssertion=function(t,n={}){const{minLength:e,maxLength:u}=n;return(0,r.assertTruthy)((null!=e?e:0)<=(null!=u?u:1/0),`minLength must be < maxLength! minLength ${e}, maxLength: ${u}`),(0,r.assertTruthy)((null!=e?e:0)>=0,`minLength must be a positive number: ${e}`),(0,r.assertTruthy)((null!=u?u:0)>=0,`maxLength must be a positive number: ${u}`),(e,u=void 0)=>{(0,r.assertArray)(e,t,n,u)}},n.recordAssertion=function(t,n={}){return(e,u=void 0)=>{(0,r.assertRecord)(e,t,n,u)}},n.$a=i,n.$u=function(t,n){return i(t,n)},n.valueOr=o,n.undefinedOr=function(t){return o(void 0,t)},n.nullOr=function(t){return o(null,t)};const r=e(373),u=e(333);function i(t,n){return(0,r.assertTruthy)("function"==typeof t,`"check" is not a function: ${t}`),(e,u=void 0)=>(0,r.assertTruthy)(t(e),(()=>{let t=(0,r.getErrorMessage)(u)||"Check is failed";return t.endsWith(":")||(t+=":"),`${t} ${(0,r.getErrorMessage)(n)||("object"==typeof e?"[object]":`'${e}'`)}`}))}function o(t,n){return(e,u=void 0)=>{e!==t&&("object"==typeof n?(0,r.assertObject)(e,n,u):(0,r.callValueAssertion)(e,n,u))}}n.stringAssertion=t=>(n,e=void 0)=>{var i,o;(0,u.assertString)(n,e),(0,r.assertTruthy)(n.length>=(null!==(i=t.minLength)&&void 0!==i?i:0),`${(0,r.getErrorMessage)(e)} length is too small: ${n.length} < ${t.minLength}`),(0,r.assertTruthy)(n.length<=(null!==(o=t.maxLength)&&void 0!==o?o:1/0),`${(0,r.getErrorMessage)(e)} length is too large ${n.length} > ${t.maxLength}`)}},630:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tryCatch=u,n.validateObject=function(t,n,e=void 0,i={}){return u((()=>(0,r.assertObject)(t,n,e,i)))},n.validateArray=function(t,n,e={},i=void 0){return u((()=>(0,r.assertArray)(t,n,e,i)))},n.validateRecord=function(t,n,e={},i=void 0){return u((()=>(0,r.assertRecord)(t,n,e,i)))};const r=e(373);function u(t){try{t()}catch(t){return t instanceof Error&&t.message||`${t}`}}},663:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatValue=function(t){return void 0===t?"<undefined>":"symbol"==typeof t?t.toString():null===t?"<null>":`<${typeof t}:${t}>`}},665:(t,n)=>{"use strict";function e(t){return"string"==typeof t}function r(t,n,e){if(t===n)return!0;if(!t||!n)return!1;if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0}Object.defineProperty(n,"__esModule",{value:!0}),n.isBoolean=function(t){return"boolean"==typeof t},n.isString=e,n.isNumber=function(t){return"number"==typeof t},n.isDate=function(t){return t instanceof Date},n.checkArrayHasUniqueElements=function(t,n){if(t.length<=1)return!0;const e=new Set;for(const r of t){const t=n(r);if(e.has(t))return!1;e.add(t)}return!0},n.checkArraysHaveEqualElements=function(t,n){return r(t,n,((t,n)=>t===n))},n.checkArraysHasEqualElementsByComparator=r,n.isEmail=function(t,n={allowInternationalDomains:!1}){if(!e(t)||0===t.length||t.length>254)return!1;if(!(n.allowInternationalDomains?i:u).test(t))return!1;const r=t.split("@");return!(r[0].length>64)&&!r[1].split(".").some((t=>t.length>63))},n.isUuid=function(t){return e(t)&&o.test(t)},n.isHexString=function(t){return e(t)&&a.test(t)},n.isNonNullable=function(t){return null!=t};const u=/^[-!#$%&'*+/\d=?A-Z^_a-z{|}~](\.?[-!#$%&'*+/\d=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z\d])*\.[a-zA-Z](-?[a-zA-Z\d])+$/,i=/^(?!\.)((?!.*\.{2})[a-zA-Z0-9\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF.!#$%&'*+-/=?^_`{|}~\-\d]+)@(?!\.)([a-zA-Z0-9\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF\-.\d]+)((\.([a-zA-Z\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF]){2,63})+)$/i,o=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,a=/^[0-9a-fA-F]*$/},704:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getMessageFromError=function(t,n){return t instanceof Error?t.message:null!=n?n:`${t}`}}},n={};function e(r){var u=n[r];if(void 0!==u)return u.exports;var i=n[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}e.d=(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";e.r(r),e.d(r,{ApiCallContext:()=>R,CronExpression:()=>C,DistributedLockContext:()=>k,GraphqlContext:()=>N,MUTATION_TYPES:()=>Y,MutationContext:()=>L,QueryContext:()=>K,SecureAiAgentContext:()=>I,SquidProject:()=>T,SquidService:()=>at,aiFunction:()=>v,clientConnectionStateHandler:()=>D,createWebhookResponse:()=>st,executable:()=>d,getSquidService:()=>ct,limiterConfigToOptions:()=>O,limits:()=>E,metadata:()=>a,scheduler:()=>y,secureAiAgent:()=>m,secureApi:()=>_,secureCollection:()=>s,secureDatabase:()=>c,secureDistributedLock:()=>b,secureGraphQL:()=>p,secureMetric:()=>h,secureNativeQuery:()=>A,secureStorage:()=>f,secureTopic:()=>l,trigger:()=>g,webhook:()=>F});const t=require("@squidcloud/client");var n=e(36),u=e(243);const i=(t,n)=>Array.isArray(t)?t.concat(n):void 0;function o(t,n){(0,u.mergeWith)(t,n,i)}const a=new class{constructor(){this.data={databases:{},storage:{},executables:{},apis:{},graphql:{},triggers:{},schedulers:{},webhooks:{},nativeQueries:{},distributedLocks:{},aiChatbots:{},clientConnectionStateChangeHandlers:[],aiFunctions:{},openApiControllersMap:{},queues:{},metrics:{security:{write:[],all:[]}},limits:{}}}secureDatabase(n,e,r=t.BUILT_IN_DB_INTEGRATION_ID){o(this.data,{databases:{[r]:{security:{[n]:[e]}}}})}secureCollection(n,e,r,u=t.BUILT_IN_DB_INTEGRATION_ID){o(this.data,{databases:{[u]:{collections:{[n]:{security:{[e]:[r]}}}}}})}secureStorage(n,e,r=t.BUILT_IN_STORAGE_INTEGRATION_ID){o(this.data,{storage:{[r]:{security:{[n]:[e]}}}})}secureTopic(n,e,r,u=t.BUILT_IN_QUEUE_INTEGRATION_ID){o(this.data,{queues:{[u]:{topics:{[n]:{security:{[e]:[r]}}}}}})}secureMetric(t,n,e){o(this.data,{metrics:{security:{[n]:[{namePrefix:t,serviceFunction:e}]}}})}secureApi(t,n,e){o(this.data,n?{apis:{[t]:{endpoints:{[n]:{security:[e]}}}}}:{apis:{[t]:{security:[e]}}})}secureGraphQL(t,n){o(this.data,{graphql:{[t]:{security:[n]}}})}transformDatabase(n,e,r=t.BUILT_IN_DB_INTEGRATION_ID){o(this.data,{databases:{[r]:{transform:{[n]:{type:n,serviceFunction:e}}}}})}transformCollection(n,e,r,u=t.BUILT_IN_DB_INTEGRATION_ID){o(this.data,{databases:{[u]:{collections:{[n]:{transform:{[e]:{type:e,serviceFunction:r}}}}}}})}executable(t){const n=t.split(":")[1];o(this.data,{executables:{[n]:{serviceFunction:t}}})}aiFunction(t,{id:n,description:e,params:r,attributes:u}){const i={aiFunctions:{[n]:{serviceFunction:t,description:e,params:r,attributes:u}}};o(this.data,i)}trigger(t,e,r,u,i){(0,n.assertTruthy)(!this.data.triggers[t],`Duplicate Trigger IDs: ${t}`),this.data.triggers[t]={integrationId:u,collectionName:e,functionName:r,mutationTypes:i}}scheduler(t,e,r,u){(0,n.assertTruthy)(!this.data.schedulers[t],`Duplicate Scheduler IDs: ${t}`),this.data.schedulers[t]={cronExpression:e,functionName:r,exclusive:u}}webhook(t,e){(0,n.assertTruthy)(!this.data.webhooks[t],`Duplicate Webhook IDs: ${t}`),this.data.webhooks[t]={functionName:e}}secureNativeQuery(t,n){o(this.data,{nativeQueries:{[t]:[n]}})}secureDistributedLock(t,n){o(this.data,t?{distributedLocks:{mutexes:{[t]:{security:[n]}}}}:{distributedLocks:{security:[n]}})}secureAiAgent(n,e){o(this.data,n?{aiChatbots:{[t.AI_AGENTS_INTEGRATION_ID]:{profiles:{[n]:{security:{chat:[e]}}}}}}:{aiChatbots:{[t.AI_AGENTS_INTEGRATION_ID]:{security:{chat:[e]}}}})}limits(t,n){o(this.data,{limits:{[t]:n}})}clientConnectionChangeHandler(t){o(this.data,{clientConnectionStateChangeHandlers:[t]})}};function c(t,n){return function(e,r,u){return a.secureDatabase(t,w(e,r),n),u}}function s(t,n,e){return function(r,u,i){return a.secureCollection(t,n,w(r,u),e),i}}function f(t,n){return function(e,r,u){return a.secureStorage(t,w(e,r),n),u}}function l(t,n,e){return function(r,u,i){return a.secureTopic(t,n,w(r,u),e),i}}function h(t){return function(n,e,r){return a.secureMetric(t.metricNamePrefix||"",t.type,w(n,e)),r}}function _(t,n){return function(e,r,u){return a.secureApi(t,n,w(e,r)),u}}function p(t){return function(n,e,r){return a.secureGraphQL(t,w(n,e)),r}}function d(){return function(t,n,e){return a.executable(w(t,n)),e}}function v(t,e=[],r={}){return function(u,i,o){const c=w(u,i),s=function(t){const e=t.split(":");return(0,n.assertTruthy)(2===e.length,`Invalid service function name: ${t}`),e[1]}(c);let f;return f="object"==typeof t?{id:t.id||s,description:t.description,params:(0,n.truthy)(t.params,`AI function definition requires "params" to be defined: ${i}`),attributes:t.attributes||{}}:{id:s,description:t,params:e,attributes:r},a.aiFunction(c,f),o}}function g(e,r="",u){const i="object"==typeof e?{...e}:{id:e,collection:r,integrationId:u};return(0,n.assertTruthy)(i.collection,"Collection name can't be empty"),function(n,e,r){return i.id||(i.id=w(n,e)),a.trigger(i.id,i.collection,w(n,e),i.integrationId||t.BUILT_IN_DB_INTEGRATION_ID,i.mutationTypes),r}}function y(t,e,r=!0){return function(u,i,o){const c=w(u,i);let s;return s="object"==typeof t?{cron:t.cron,id:t.id||c,exclusive:t.exclusive??!0}:{id:t,cron:(0,n.truthy)(e,"cronExpression must be defined"),exclusive:r},a.scheduler(s.id,s.cron,c,s.exclusive),o}}function F(t){return function(n,e,r){return a.webhook(t,w(n,e)),r}}function A(t){return function(n,e,r){return a.secureNativeQuery(t,w(n,e)),r}}function b(t){return function(n,e,r){return a.secureDistributedLock(t,w(n,e)),r}}function m(t){return function(n,e,r){return a.secureAiAgent(t,w(n,e)),r}}function E(t){return function(n,e,r){return a.limits(w(n,e),O(t)),r}}function D(){return function(t,n,e){return a.clientConnectionChangeHandler(w(t,n)),e}}function w(t,n){return`${t.constructor.name}:${n}`}function O(t){return void 0!==t.rateLimit&&("number"==typeof t.rateLimit?t.rateLimit=[{value:t.rateLimit,scope:"global"}]:"object"!=typeof t.rateLimit||Array.isArray(t.rateLimit)||(t.rateLimit=[t.rateLimit]),t.rateLimit.forEach((t=>{void 0===t.scope&&(t.scope="global")}))),void 0!==t.quotaLimit&&("number"==typeof t.quotaLimit?t.quotaLimit=[{value:t.quotaLimit,scope:"global",renewPeriod:"monthly"}]:"object"!=typeof t.quotaLimit||Array.isArray(t.quotaLimit)||(t.quotaLimit=[t.quotaLimit]),t.quotaLimit.forEach((t=>{void 0===t.scope&&(t.scope="global"),void 0===t.renewPeriod&&(t.renewPeriod="monthly")}))),t}class T{metadata(){return a.data}async cleanup(){for(const n of t.Squid.getInstances())await n.destruct()}}class I{constructor(t){this.agentId=t.agentId,this.prompt=t.prompt}}class R{constructor(t){this.integrationId=t.integrationId,this.endpointId=t.endpointId,this.url=t.url,this.method=t.method,this.body=t.body,this.options=t.options}}var C;!function(t){t.EVERY_SECOND="* * * * * *",t.EVERY_5_SECONDS="*/5 * * * * *",t.EVERY_10_SECONDS="*/10 * * * * *",t.EVERY_30_SECONDS="*/30 * * * * *",t.EVERY_MINUTE="*/1 * * * *",t.EVERY_5_MINUTES="0 */5 * * * *",t.EVERY_10_MINUTES="0 */10 * * * *",t.EVERY_30_MINUTES="0 */30 * * * *",t.EVERY_HOUR="0 0-23/1 * * *",t.EVERY_2_HOURS="0 0-23/2 * * *",t.EVERY_3_HOURS="0 0-23/3 * * *",t.EVERY_4_HOURS="0 0-23/4 * * *",t.EVERY_5_HOURS="0 0-23/5 * * *",t.EVERY_6_HOURS="0 0-23/6 * * *",t.EVERY_7_HOURS="0 0-23/7 * * *",t.EVERY_8_HOURS="0 0-23/8 * * *",t.EVERY_9_HOURS="0 0-23/9 * * *",t.EVERY_10_HOURS="0 0-23/10 * * *",t.EVERY_11_HOURS="0 0-23/11 * * *",t.EVERY_12_HOURS="0 0-23/12 * * *",t.EVERY_DAY_AT_1AM="0 01 * * *",t.EVERY_DAY_AT_2AM="0 02 * * *",t.EVERY_DAY_AT_3AM="0 03 * * *",t.EVERY_DAY_AT_4AM="0 04 * * *",t.EVERY_DAY_AT_5AM="0 05 * * *",t.EVERY_DAY_AT_6AM="0 06 * * *",t.EVERY_DAY_AT_7AM="0 07 * * *",t.EVERY_DAY_AT_8AM="0 08 * * *",t.EVERY_DAY_AT_9AM="0 09 * * *",t.EVERY_DAY_AT_10AM="0 10 * * *",t.EVERY_DAY_AT_11AM="0 11 * * *",t.EVERY_DAY_AT_NOON="0 12 * * *",t.EVERY_DAY_AT_1PM="0 13 * * *",t.EVERY_DAY_AT_2PM="0 14 * * *",t.EVERY_DAY_AT_3PM="0 15 * * *",t.EVERY_DAY_AT_4PM="0 16 * * *",t.EVERY_DAY_AT_5PM="0 17 * * *",t.EVERY_DAY_AT_6PM="0 18 * * *",t.EVERY_DAY_AT_7PM="0 19 * * *",t.EVERY_DAY_AT_8PM="0 20 * * *",t.EVERY_DAY_AT_9PM="0 21 * * *",t.EVERY_DAY_AT_10PM="0 22 * * *",t.EVERY_DAY_AT_11PM="0 23 * * *",t.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",t.EVERY_WEEK="0 0 * * 7",t.EVERY_WEEKDAY="0 0 * * 1-5",t.EVERY_WEEKEND="0 0 * * 6,7",t.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",t.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",t.EVERY_2ND_HOUR="0 */2 * * *",t.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",t.EVERY_2ND_MONTH="0 0 1 */2 *",t.EVERY_QUARTER="0 0 1 */3 *",t.EVERY_6_MONTHS="0 0 1 */6 *",t.EVERY_YEAR="0 0 1 1 *",t.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",t.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",t.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",t.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",t.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",t.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",t.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",t.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",t.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",t.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",t.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",t.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",t.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",t.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",t.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",t.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",t.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",t.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",t.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",t.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",t.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",t.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",t.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",t.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",t.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"}(C||(C={}));class k{constructor(t){this.mutex=t}}class N{constructor(t){this.isGraphiQL=t.isGraphiQL,this.query=t.query,this.operationName=t.operationName,this.variables=t.variables}}const x=/[.\[\]]/;function S(t,n){if(!t)return;const e=n.split(x);let r,u=t;for(;u&&e.length;){const t=e.shift();if(t){if("object"!=typeof u||!(t in u))return;r=u[t],u=r}}return r}function M(t){return null==t}function j(t,n){if(t===n)return!0;if(null===t||null===n)return!1;const e=typeof t;if(e!==typeof n)return!1;if("object"!==e)return t===n;if(t instanceof Date&&n instanceof Date)return t.getTime()===n.getTime();const r=Object.keys(t),u=Object.keys(n);if(r.length!==u.length)return!1;for(const e of r)if(!u.includes(e)||!j(t[e],n[e]))return!1;return!0}const Y=["insert","update","delete"];class L{constructor(t,n,e){this.mutation=t,this.beforeAndAfterDocs=n,this.serverTimeStamp=e}getMutationType(){return this.mutation.type}get before(){return this.beforeAndAfterDocs.before}get after(){return this.beforeAndAfterDocs.after}affectsPath(t){return!j(S(this.before,t),S(this.after,t))}affectedPaths(t=""){(0,n.assertTruthy)("update"===this.mutation.type,"affectedPaths can only be used with update mutations");const e=[];return this.checkPath(t,e),e}checkPath(t,n){const e=S(this.before,t),r=S(this.after,t);if(!j(e,r)&&(""!==t&&n.push(t),"object"==typeof e&&null!==e&&"object"==typeof r&&null!==r)){const u=Object.keys(e),i=Object.keys(r);new Set([...u,...i]).forEach((e=>{const r=t?`${t}.${e}`:e;this.checkPath(r,n)}))}}}function $(t,e,r){if(t=t instanceof Date?t.getTime():t??null,e=e instanceof Date?e.getTime():e??null,"=="===r)return j(t,e);if("!="===r)return!j(t,e);switch(r){case"<":return!M(t)&&(!!M(e)||e<t);case"<=":return!!M(e)||!M(t)&&e<=t;case">":return!M(e)&&(!!M(t)||e>t);case">=":return!!M(t)||!M(e)&&e>=t;case"like":return"string"==typeof e&&"string"==typeof t&&B(e,t,!1);case"not like":return!("string"==typeof e&&"string"==typeof t&&B(e,t,!1));case"like_cs":return"string"==typeof e&&"string"==typeof t&&B(e,t,!0);case"not like_cs":return!("string"==typeof e&&"string"==typeof t&&B(e,t,!0));case"array_includes_some":{const r=e;return Array.isArray(e)&&Array.isArray(t)&&t.some((t=>(0,n.truthy)(r,"VALUE_CANNOT_BE_NULL").some((n=>j(n,t)))))}case"array_includes_all":{const r=e;return Array.isArray(t)&&Array.isArray(e)&&t.every((t=>(0,n.truthy)(r,"VALUE_CANNOT_BE_NULL").some((n=>j(n,t)))))}case"array_not_includes":{const r=e;return Array.isArray(e)&&Array.isArray(t)&&t.every((t=>!(0,n.truthy)(r,"VALUE_CANNOT_BE_NULL").some((n=>j(n,t)))))}default:throw new Error(`Unsupported operator comparison: ${r}`)}}function B(t,n,e){e||(t=t.toLowerCase(),n=n.toLowerCase());const r=function(t){let n="";for(let e=0;e<t.length;++e)"\\"===t[e]?e+1<t.length&&["%","_"].includes(t[e+1])?(n+=t[e+1],e++):e+1<t.length&&"\\"===t[e+1]?(n+="\\\\",e++):n+="\\":"%"===t[e]?n+="[\\s\\S]*":"_"===t[e]?n+="[\\s\\S]":("/-\\^$*+?.()[]{}|".includes(t[e])&&(n+="\\"),n+=t[e]);return n}(n);return new RegExp(`^${r}$`).test(t)}function U(t){return"fieldName"in t}const q={"in:in":(t,n)=>t.every((t=>n.includes(t))),"in:not in":(t,n)=>t.every((t=>!n.includes(t))),"not in:not in":(t,n)=>n.every((n=>t.includes(n))),">:not in":(t,n)=>n.every((n=>t>=n)),">=:not in":(t,n)=>n.every((n=>t>n)),"<:not in":(t,n)=>n.every((n=>t<=n)),"<=:not in":(t,n)=>n.every((n=>t<n)),">:>":(t,n)=>t>=n,">=:>":(t,n)=>t>n,"in:>":(t,n)=>t.every((t=>t>n)),">:>=":(t,n)=>t>=n,">=:>=":(t,n)=>t>=n,"in:>=":(t,n)=>t.every((t=>t>=n)),"<:<":(t,n)=>t<=n,"<=:<":(t,n)=>t<n,"in:<":(t,n)=>t.every((t=>t<n)),"<:<=":(t,n)=>t<=n,"<=:<=":(t,n)=>t<=n,"in:<=":(t,n)=>t.every((t=>t<=n)),"like:like":(t,n)=>P(t.toLowerCase(),n.toLowerCase()),"like_cs:like":(t,n)=>P(t.toLowerCase(),n.toLowerCase()),"like:like_cs":(t,n)=>P(t,n)&&z(n),"like_cs:like_cs":(t,n)=>P(t,n),"like:not like":(t,n)=>!V(t.toLowerCase(),n.toLowerCase()),"like_cs:not like":(t,n)=>!V(t.toLowerCase(),n.toLowerCase()),"like:not like_cs":(t,n)=>!V(t.toLowerCase(),n.toLowerCase()),"like_cs:not like_cs":(t,n)=>!V(t,n),"not like:like":(t,n)=>H(t,n),"not like_cs:like":(t,n)=>H(t,n),"not like:like_cs":(t,n)=>H(t,n),"not like_cs:like_cs":(t,n)=>H(t,n),"not like:not like":(t,n)=>P(n.toLowerCase(),t.toLowerCase()),"not like_cs:not like":(t,n)=>P(n,t)&&z(t),"not like:not like_cs":(t,n)=>P(n.toLowerCase(),t.toLowerCase()),"not like_cs:not like_cs":(t,n)=>P(n,t),"in:like":(t,n)=>t.every((t=>$(n,t,"like"))),"in:like_cs":(t,n)=>t.every((t=>$(n,t,"like_cs"))),"in:not like":(t,n)=>t.every((t=>$(n,t,"not like"))),"in:not like_cs":(t,n)=>t.every((t=>$(n,t,"not like_cs"))),"like:in":(t,n)=>!t.includes("%")&&!t.includes("_")&&!!n.find((n=>n.toLowerCase()===t.toLowerCase())),"like_cs:in":(t,n)=>!t.includes("%")&&!t.includes("_")&&n.includes(t),"not like:in":(t,n)=>t.length>0&&W(t)||G(t)&&n.includes(""),"not like_cs:in":(t,n)=>t.length>0&&W(t)||G(t)&&n.includes(""),"not in:like":(t,n)=>n.length>0&&W(n)||G(n)&&t.includes(""),"not in:like_cs":(t,n)=>n.length>0&&W(n)||G(n)&&t.includes(""),"not in:not like":(t,n)=>!n.includes("%")&&!n.includes("_")&&!!t.find((t=>t.toLowerCase()===n.toLowerCase())),"not in:not like_cs":(t,n)=>!n.includes("%")&&!n.includes("_")&&t.includes(n),"like:not in":(t,n)=>n.every((n=>$(t,n,"not like"))),"like_cs:not in":(t,n)=>n.every((n=>$(t,n,"not like_cs"))),"not like:not in":(t,n)=>n.every((n=>$(t,n,"like"))),"not like_cs:not in":(t,n)=>n.every((n=>$(t,n,"like_cs"))),"array_includes_some:array_includes_some":(t,n)=>t.every((t=>n.includes(t))),"array_includes_all:array_includes_all":(t,n)=>t.every((t=>n.includes(t))),"array_not_includes:array_not_includes":(t,n)=>n.every((n=>t.includes(n))),"array_includes_some:array_not_includes":(t,n)=>t.every((t=>!n.includes(t))),"array_not_includes:array_includes_some":(t,n)=>n.every((n=>!t.includes(n))),"array_includes_all:array_includes_some":(t,n)=>t.every((t=>n.includes(t))),"array_includes_some:array_includes_all":(t,n)=>t.every((t=>n.includes(t))),"array_not_includes:array_includes_all":(t,n)=>n.every((n=>!t.includes(n))),"array_includes_all:array_not_includes":(t,n)=>t.every((t=>!n.includes(t)))};function P(t,n,e=0,r=0){if(r>=n.length)return e>=t.length;if(e>=t.length)return W(n.substring(r));const u=t[e],i=n[r];return"%"===u&&"%"===i?P(t,n,e+1,r+1)||P(t,n,e+1,r):"%"!==u&&("%"===i?P(t,n,e,r+1)||P(t,n,e+1,r):(u===i||"_"===i)&&P(t,n,e+1,r+1))}function V(t,n,e=0,r=0){if(e>=t.length&&r>=n.length)return!0;if(e>=t.length)return W(n.substring(r));if(r>=n.length)return W(t.substring(e));const u=e<t.length?t[e]:"",i=r<n.length?n[r]:"";return"%"===u&&"%"===i?V(t,n,e+1,r+1)||V(t,n,e,r+1)||V(t,n,e+1,r):"%"===u||"%"===i?V(t,n,e,r+1)||V(t,n,e+1,r):(u===i||"_"===u||"_"===i)&&V(t,n,e+1,r+1)}function z(t){return!/[a-zA-Z]/.test(t)}function W(t){return t.split("").every((t=>"%"===t))}function H(t,n){return t.length>0&&W(t)||n.length>0&&W(n)||G(t)&&0===n.length}function G(t){let n=!1,e=!1;for(const r of t)switch(r){case"%":n=!0;break;case"_":if(e)return!1;e=!0;break;default:return!1}return n&&e}class K{constructor(t){this.query=t,this.query=t,this.parsedConditions=this.parseConditions(this.query.conditions.filter(U))}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}sortedBy(t){return!t.find(((t,n)=>!j(this.query.sortOrder[n],{...t,asc:t.asc??!0})))}sortedByExact(t){return t.length===this.query.sortOrder.length&&this.sortedBy(t)}isSubqueryOf(t,n,e){return this.isSubqueryOfCondition({fieldName:t,operator:n,value:e})}isSubqueryOfCondition(t){return!!this.parsedConditions.filter((n=>n.fieldName===t.fieldName)).find((n=>this.evaluateSubset(n,t)))}isSubqueryOfConditions(t){return this.parseConditions(t).every((t=>this.isSubqueryOfCondition(t)))}isSubqueryOfQuery(t){if(t.collectionName!==this.collectionName||t.integrationId!==this.integrationId)return!1;const n=t.conditions.filter(U),e=this.isSubqueryOfConditions(n),r=this.sortedBy(t.sortOrder),u=-1===t.limit||this.limit>-1&&this.limit<t.limit;return e&&r&&u}getConditionsFor(...t){return this.parsedConditions.filter((n=>t.includes(n.fieldName)))}getConditionsForField(t){return this.parsedConditions.filter((n=>n.fieldName===t))}documentMatchesQuery(t){for(const n of this.parsedConditions){const e=n.fieldName,r=n.operator,u=S(t,e);if("in"===r){if(n.value.includes(u))continue;return!1}if("not in"!==r){if(!$(n.value,u,r))return!1}else if(n.value.includes(u))return!1}return!0}evaluateSubset(t,n){const{operator:e,value:r}=t,{operator:u,value:i}=this.parseConditions([n])[0],o=q[`${e}:${u}`];return!!o&&o(r,i)}parseConditions(t){const n=[],e=new Map,r=new Map;return t.forEach((t=>{switch(t.operator){case"==":case"in":e.set(t.fieldName,(e.get(t.fieldName)||[]).concat(t.value));break;case"!=":case"not in":r.set(t.fieldName,(r.get(t.fieldName)||[]).concat(t.value));break;default:n.push(t)}})),e.forEach(((t,e)=>{n.push({fieldName:e,operator:"in",value:t})})),r.forEach(((t,e)=>{n.push({fieldName:e,operator:"not in",value:t})})),n}}const Z=require("path");function Q(){if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;throw new Error("Unable to locate global object")}!function(t=!0){Q().SQUID_LOG_DEBUG_ENABLED=t}(function(){let t="";return"undefined"!=typeof window&&window.location?t=new URLSearchParams(window.location.search).get("SQUID_DEBUG")||"":"undefined"!=typeof process&&process.env&&(t=process.env.SQUID_DEBUG||""),"1"===t||"true"===t}());const J=new Map,X="__squidMetadata",tt="CIRCULAR_DEPENDENCY",nt=[];function et(t){return t[X]||{version:0}}function rt(t,e){(0,n.assertTruthy)(t.backendApiKey===e.backendApiKey,"backendApiKey does not match."),(0,n.assertTruthy)(t.requestLocalStorage===e.requestLocalStorage,"requestLocalStorage does not match"),(0,n.assertTruthy)(t.environmentId===e.environmentId,"environmentId does not match"),(0,n.assertTruthy)(t.squidDeveloperId===e.squidDeveloperId,"squidDeveloperId does not match"),(0,n.assertTruthy)(t.appId===e.appId,"appId does not match")}const ut="SQUID_GLOBAL_CONFIG";function it(){return(0,n.truthy)(Q()[ut],"Squid global config is not defined!")}const ot=["aiData","api","application","application-kotlin","auth","backend-function","connector","integration","internal-storage","internalCodeExecutor","mutation","named-query","native-query","observability","openapi","query","queue","quota","scheduler","secret","storage","webhooks","ws","personalStorage","internal-extraction"];class at{constructor(){this.region=process.env.SQUID_REGION||"local",this.config=it(),this[X]={version:2},this.backendBaseUrl=function(t,n,e){const r=new URL("https://squid.cloud");r.host=`${n}.${t}.${r.host}`;const u=e.replace(/^\//g,"").split("/")[0]||"";(function(t){return/^local/.test(t)})(t)&&(r.protocol="http",r.port=ot.includes(u)?"8001":"8000",function(t){return/android$/.test(t)}(t)?r.host="10.0.2.2":function(t){return/ios$/.test(t)}(t)&&(r.host="localhost"));const i=r.toString();e=e.startsWith("/")?e.slice(1):e;const o=i.replace(/\/$/g,"");return e.length?`${o}/${e}`:o}(this.region,this.config.appId,"")}get secrets(){return this.config.secrets}get apiKeys(){return this.config.apiKeys}get context(){return this.getRequestConfig().context}getApiKey(){return this.config.backendApiKey}get squid(){const e=function(t){(0,n.assertString)(t,"Invalid application ID");const[e,r,u,i]=t.split("-");return(0,n.assertTruthy)(!i,`Invalid application ID: ${t}`),{appId:e,environmentId:r??"prod",squidDeveloperId:u}}(this.config.appId);return t.Squid.getInstance({appId:e.appId,apiKey:this.config.backendApiKey,squidDeveloperId:e.squidDeveloperId,environmentId:e.environmentId,region:this.region})}get assetsDirectory(){const t=Object.getPrototypeOf(this).constructor.name,e=this.config.codeDir||this.config.codeDirByServiceClassName.get(t);return(0,n.assertTruthy)(e,(()=>`No codeDir found for service: ${t}`)),Z.resolve(e,"public")}getUserAuth(){const{auth:t}=this.getRequestConfig();return"Bearer"===t?.type?t:void 0}getApiKeyAuth(){const{auth:t}=this.getRequestConfig();return"ApiKey"===t?.type?t:void 0}isAuthenticated(){const{auth:t}=this.getRequestConfig();return!!t}getRequestConfig(){return this.assertInRequestScope(),t=this.config.requestLocalStorage,(0,n.truthy)(t.getStore(),"Failed to access request data outside of the request's scope");var t}assertIsAuthenticated(){this.assertInRequestScope(),(0,n.assertTruthy)(this.isAuthenticated(),"UNAUTHORIZED")}assertInRequestScope(){(0,n.assertTruthy)(this.config.requestLocalStorage.getStore(),"This method can only be called with a valid request scope.")}assertApiKeyCall(){(0,n.assertTruthy)(this.getApiKeyAuth(),"This method can only be called with API key")}createWebhookResponse(t,n,e){return{body:t||"",statusCode:n||(t?200:204),headers:e||{},__isWebhookResponse__:!0}}throwWebhookResponse(t){throw{body:t.body||"",statusCode:t.statusCode||500,headers:t.headers||{},__isWebhookResponse__:!0}}createOpenApiResponse(t,n,e){return{body:t||"",statusCode:n||(t?200:204),headers:e||{},__isOpenApiResponse__:!0}}throwOpenApiResponse(t){throw{body:t.body||"",statusCode:t.statusCode||500,headers:t.headers||{},__isOpenApiResponse__:!0}}async convertToSquidFile(t){return{__isSquidFile__:!0,data:new Uint8Array(await t.arrayBuffer()),fieldName:t.name,mimetype:t.type,originalName:t.name,size:t.size,encoding:t.type}}}function ct(t,e){const r=t.name,u=Object.getPrototypeOf(e).constructor.name,i=it(),o={...i,callerServiceClassName:new Map},a=i.codeDirByServiceClassName.get(r);if(a)o.codeDirByServiceClassName.set(r,a);else{const t=i.codeDirByServiceClassName.get(u);(0,n.assertTruthy)(t,(()=>`Caller class codeDir is not set: ${u}`)),o.codeDirByServiceClassName.set(r,t)}return function(t,e,r){!function(t){const e=Q(),r=e[ut];if(r){rt(r,t);for(const[e,u]of t.codeDirByServiceClassName){const t=r.codeDirByServiceClassName.get(e);t?(0,n.assertTruthy)(t===u,(()=>`codeDir is changed for class ${e}: old: ${t}, new: ${u}`)):r.codeDirByServiceClassName.set(e,u)}}else e[ut]=t}(e);let u=J.get(t);if(!u||et(u).version<=1){const i={...e,...r};(0,n.assertTruthy)(!nt.includes(t),(()=>`${tt}: ${nt[nt.length-1]?.name} => ${t.name}`)),nt.push(t);try{u=e.requestLocalStorage.run(r,(()=>new t(i)))}finally{nt.pop()}et(u).version>1&&J.set(t,u)}else rt(u.config,e),u.config.secrets=e.secrets,u.config.apiKeys=e.apiKeys;return u}(t,o,{})}function st(t){return{__isWebhookResponse__:!0,body:"",statusCode:204,headers:{},...t}}})();var u=exports;for(var i in r)u[i]=r[i];r.__esModule&&Object.defineProperty(u,"__esModule",{value:!0})})();
@@ -1,8 +1,8 @@
1
1
  /** A type alias for a string that represents a webhook. */
2
2
  export type WebhookId = string;
3
- /** A type alias for a string that represents a trigger id. */
3
+ /** A type alias for a string that represents a trigger ID. */
4
4
  export type TriggerId = string;
5
- /** A type alias for a string that represents a scheduler id. */
5
+ /** A type alias for a string that represents a scheduler ID. */
6
6
  export type SchedulerId = string;
7
7
  /** The supported cron expression string. */
8
8
  export type CronExpressionString = `${string} ${string} ${string} ${string} ${string}` | `${string} ${string} ${string} ${string}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/backend",
3
- "version": "1.0.349",
3
+ "version": "1.0.351",
4
4
  "description": "Squid Cloud's backend SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/backend/src/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "typedoc-plugin-markdown": "^4.5.2"
34
34
  },
35
35
  "peerDependencies": {
36
- "@squidcloud/client": "^1.0.349"
36
+ "@squidcloud/client": "^1.0.351"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=20.0.0"