@hitgrab/finder 0.1.18-alpha → 0.1.19-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +538 -0
- package/dist/index.d.mts +538 -0
- package/dist/index.mjs +1 -0
- package/package.json +9 -16
- package/dist/core/__tests__/core.test.d.ts +0 -1
- package/dist/core/__tests__/effects.test.d.ts +0 -1
- package/dist/core/__tests__/events.test.d.ts +0 -1
- package/dist/core/__tests__/filter.test.d.ts +0 -1
- package/dist/core/__tests__/group-by.test.d.ts +0 -1
- package/dist/core/__tests__/json.test.d.ts +0 -1
- package/dist/core/__tests__/pagination.test.d.ts +0 -1
- package/dist/core/__tests__/search.test.d.ts +0 -1
- package/dist/core/__tests__/sort-by.test.d.ts +0 -1
- package/dist/core/__tests__/test-constants.d.ts +0 -5
- package/dist/core/__tests__/test-types.d.ts +0 -6
- package/dist/core/__tests__/utils.test.d.ts +0 -1
- package/dist/core/core-constants.d.ts +0 -50
- package/dist/core/debounce-callback-registry.d.ts +0 -3
- package/dist/core/effect-book.d.ts +0 -12
- package/dist/core/event-emitter.d.ts +0 -12
- package/dist/core/filters.d.ts +0 -29
- package/dist/core/finder-core-implementation.d.ts +0 -45
- package/dist/core/finder-core.d.ts +0 -101
- package/dist/core/finder-error.d.ts +0 -3
- package/dist/core/group-by.d.ts +0 -25
- package/dist/core/pagination.d.ts +0 -19
- package/dist/core/rule-book/boolean-filter-handler.d.ts +0 -11
- package/dist/core/rule-book/filter-handler.d.ts +0 -29
- package/dist/core/rule-book/multiple-filter-handler.d.ts +0 -11
- package/dist/core/rule-book/rule-book.d.ts +0 -14
- package/dist/core/rule-book/single-filter-handler.d.ts +0 -11
- package/dist/core/search/calculate-character-match-indexes.d.ts +0 -1
- package/dist/core/search/calculate-string-match-segments.d.ts +0 -9
- package/dist/core/search/default-search-and-sort-algorithm.d.ts +0 -2
- package/dist/core/search/search-score.d.ts +0 -4
- package/dist/core/search/search-string-transform.d.ts +0 -8
- package/dist/core/search/string-match-haystack.d.ts +0 -15
- package/dist/core/search.d.ts +0 -18
- package/dist/core/sort-by.d.ts +0 -23
- package/dist/core/tester.d.ts +0 -8
- package/dist/core/types/core-types.d.ts +0 -90
- package/dist/core/types/effect-types.d.ts +0 -20
- package/dist/core/types/event-types.d.ts +0 -44
- package/dist/core/types/rule-types.d.ts +0 -89
- package/dist/core/types/string-match-types.d.ts +0 -10
- package/dist/core/utils/rule-type-enforcers.d.ts +0 -18
- package/dist/core/utils/rule-utils.d.ts +0 -14
- package/dist/index.d.ts +0 -13
- package/dist/index.js +0 -5133
- package/dist/index.umd.cjs +0 -27
- package/dist/react/components/finder-content-empty.d.ts +0 -7
- package/dist/react/components/finder-content-groups.d.ts +0 -7
- package/dist/react/components/finder-content-items.d.ts +0 -7
- package/dist/react/components/finder-content-loading.d.ts +0 -7
- package/dist/react/components/finder-content-no-matches.d.ts +0 -7
- package/dist/react/components/finder-content.d.ts +0 -25
- package/dist/react/components/finder-search-term-haystack.d.ts +0 -8
- package/dist/react/components/finder.d.ts +0 -9
- package/dist/react/components/string-match.d.ts +0 -12
- package/dist/react/hooks/use-finder-ref.d.ts +0 -2
- package/dist/react/hooks/use-finder.d.ts +0 -3
- package/dist/react/providers/finder-core-context.d.ts +0 -3
- package/dist/react/types/react-types.d.ts +0 -41
package/dist/index.umd.cjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
(function(et,Ct){typeof exports=="object"&&typeof module<"u"?Ct(exports,require("react"),require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime"],Ct):(et=typeof globalThis<"u"?globalThis:et||self,Ct(et.finder={},et.React,et.ReactJsxRuntime))})(this,(function(et,Ct,ct){"use strict";function $f(c){return c}function Kf(c){return c}function Xf(c){return c}function Zf(c){return c}function Vf(c){return c}function Jf(c,u){return{rules:c,onChange:u}}function Qf(c,u){return{haystack:c,onChange:u}}function kf(c){const u={...c};return delete u.boolean,delete u.multiple,u}function jf(c){const u={...c};return delete u.multiple,{...u,boolean:!0}}function to(c){const u={...c};return delete u.boolean,{...u,multiple:!0}}const ji=Ct.createContext(null);function ye(){const c=Ct.useContext(ji);if(c===null)throw new Error("useFinder requires a FinderContext.");const[u]=c;return u}function tu({children:c}){const u=ye();return u.isLoading?typeof c=="function"?ct.jsx(c,{pagination:u.pagination,context:u.context}):c:null}function eu({children:c}){const u=ye();return u.isEmpty?typeof c=="function"?ct.jsx(c,{pagination:u.pagination,context:u.context}):c:null}function nu({children:c}){const u=ye();return u.isEmpty===!1&&u.hasMatches===!1?typeof c=="function"?ct.jsx(c,{pagination:u.pagination,context:u.context}):c:null}function ru({children:c}){const u=ye();return u.hasMatches&&u.matches.items?typeof c=="function"?ct.jsx(c,{items:u.matches.items,pagination:u.pagination,context:u.context}):c:null}function iu({children:c}){const u=ye();return u.hasMatches&&u.matches.groups?typeof c=="function"?ct.jsx(c,{groups:u.matches.groups,pagination:u.pagination,context:u.context}):c:null}function Me({children:c}){if(Object.values(c).length===0)throw new Error("No render props were found.");return[c.loading&&ct.jsx(tu,{children:c.loading},"loading"),c.empty&&ct.jsx(eu,{children:c.empty},"empty"),c.noMatches&&ct.jsx(nu,{children:c.noMatches},"noMatches"),c.items&&ct.jsx(ru,{children:c.items},"items"),c.groups&&ct.jsx(iu,{children:c.groups},"groups")]}Me.Loading=tu,Me.Empty=eu,Me.NoMatches=nu,Me.Items=ru,Me.Groups=iu;var On=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},en={exports:{}};/**
|
|
2
|
-
* @license
|
|
3
|
-
* Lodash <https://lodash.com/>
|
|
4
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
5
|
-
* Released under MIT license <https://lodash.com/license>
|
|
6
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
7
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
8
|
-
*/var eo=en.exports,uu;function no(){return uu||(uu=1,(function(c,u){(function(){var i,l="4.17.21",_=200,S="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",R="Expected a function",P="Invalid `variable` option passed into `_.template`",U="__lodash_hash_undefined__",q=500,Y="__lodash_placeholder__",K=1,St=2,ht=4,Jt=1,de=2,_t=1,qt=2,re=4,Et=8,Qt=16,wt=32,kt=64,ot=128,k=256,we=512,Pn=30,Pr="...",Lo=800,No=16,hu=1,Po=2,Do=3,Oe=1/0,_e=9007199254740991,Co=17976931348623157e292,Dn=NaN,jt=4294967295,Fo=jt-1,bo=jt>>>1,Bo=[["ary",ot],["bind",_t],["bindKey",qt],["curry",Et],["curryRight",Qt],["flip",we],["partial",wt],["partialRight",kt],["rearg",k]],Ge="[object Arguments]",Cn="[object Array]",Mo="[object AsyncFunction]",un="[object Boolean]",sn="[object Date]",Uo="[object DOMException]",Fn="[object Error]",bn="[object Function]",gu="[object GeneratorFunction]",Yt="[object Map]",fn="[object Number]",Go="[object Null]",ie="[object Object]",du="[object Promise]",Wo="[object Proxy]",on="[object RegExp]",zt="[object Set]",an="[object String]",Bn="[object Symbol]",Ho="[object Undefined]",ln="[object WeakMap]",qo="[object WeakSet]",cn="[object ArrayBuffer]",We="[object DataView]",Dr="[object Float32Array]",Cr="[object Float64Array]",Fr="[object Int8Array]",br="[object Int16Array]",Br="[object Int32Array]",Mr="[object Uint8Array]",Ur="[object Uint8ClampedArray]",Gr="[object Uint16Array]",Wr="[object Uint32Array]",Yo=/\b__p \+= '';/g,zo=/\b(__p \+=) '' \+/g,$o=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_u=/&(?:amp|lt|gt|quot|#39);/g,pu=/[&<>"']/g,Ko=RegExp(_u.source),Xo=RegExp(pu.source),Zo=/<%-([\s\S]+?)%>/g,Vo=/<%([\s\S]+?)%>/g,vu=/<%=([\s\S]+?)%>/g,Jo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qo=/^\w*$/,ko=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hr=/[\\^$.*+?()[\]{}|]/g,jo=RegExp(Hr.source),qr=/^\s+/,ta=/\s/,ea=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,na=/\{\n\/\* \[wrapped with (.+)\] \*/,ra=/,? & /,ia=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ua=/[()=,{}\[\]\/\s]/,sa=/\\(\\)?/g,fa=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Iu=/\w*$/,oa=/^[-+]0x[0-9a-f]+$/i,aa=/^0b[01]+$/i,la=/^\[object .+?Constructor\]$/,ca=/^0o[0-7]+$/i,ha=/^(?:0|[1-9]\d*)$/,ga=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mn=/($^)/,da=/['\n\r\u2028\u2029\\]/g,Un="\\ud800-\\udfff",_a="\\u0300-\\u036f",pa="\\ufe20-\\ufe2f",va="\\u20d0-\\u20ff",Tu=_a+pa+va,Su="\\u2700-\\u27bf",Eu="a-z\\xdf-\\xf6\\xf8-\\xff",Ia="\\xac\\xb1\\xd7\\xf7",Ta="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Sa="\\u2000-\\u206f",Ea=" \\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",Ru="A-Z\\xc0-\\xd6\\xd8-\\xde",Au="\\ufe0e\\ufe0f",mu=Ia+Ta+Sa+Ea,Yr="['’]",Ra="["+Un+"]",yu="["+mu+"]",Gn="["+Tu+"]",wu="\\d+",Aa="["+Su+"]",Ou="["+Eu+"]",xu="[^"+Un+mu+wu+Su+Eu+Ru+"]",zr="\\ud83c[\\udffb-\\udfff]",ma="(?:"+Gn+"|"+zr+")",Lu="[^"+Un+"]",$r="(?:\\ud83c[\\udde6-\\uddff]){2}",Kr="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ru+"]",Nu="\\u200d",Pu="(?:"+Ou+"|"+xu+")",ya="(?:"+He+"|"+xu+")",Du="(?:"+Yr+"(?:d|ll|m|re|s|t|ve))?",Cu="(?:"+Yr+"(?:D|LL|M|RE|S|T|VE))?",Fu=ma+"?",bu="["+Au+"]?",wa="(?:"+Nu+"(?:"+[Lu,$r,Kr].join("|")+")"+bu+Fu+")*",Oa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xa="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Bu=bu+Fu+wa,La="(?:"+[Aa,$r,Kr].join("|")+")"+Bu,Na="(?:"+[Lu+Gn+"?",Gn,$r,Kr,Ra].join("|")+")",Pa=RegExp(Yr,"g"),Da=RegExp(Gn,"g"),Xr=RegExp(zr+"(?="+zr+")|"+Na+Bu,"g"),Ca=RegExp([He+"?"+Ou+"+"+Du+"(?="+[yu,He,"$"].join("|")+")",ya+"+"+Cu+"(?="+[yu,He+Pu,"$"].join("|")+")",He+"?"+Pu+"+"+Du,He+"+"+Cu,xa,Oa,wu,La].join("|"),"g"),Fa=RegExp("["+Nu+Un+Tu+Au+"]"),ba=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ba=["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"],Ma=-1,J={};J[Dr]=J[Cr]=J[Fr]=J[br]=J[Br]=J[Mr]=J[Ur]=J[Gr]=J[Wr]=!0,J[Ge]=J[Cn]=J[cn]=J[un]=J[We]=J[sn]=J[Fn]=J[bn]=J[Yt]=J[fn]=J[ie]=J[on]=J[zt]=J[an]=J[ln]=!1;var V={};V[Ge]=V[Cn]=V[cn]=V[We]=V[un]=V[sn]=V[Dr]=V[Cr]=V[Fr]=V[br]=V[Br]=V[Yt]=V[fn]=V[ie]=V[on]=V[zt]=V[an]=V[Bn]=V[Mr]=V[Ur]=V[Gr]=V[Wr]=!0,V[Fn]=V[bn]=V[ln]=!1;var Ua={À:"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"},Ga={"&":"&","<":"<",">":">",'"':""","'":"'"},Wa={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ha={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qa=parseFloat,Ya=parseInt,Mu=typeof On=="object"&&On&&On.Object===Object&&On,za=typeof self=="object"&&self&&self.Object===Object&&self,at=Mu||za||Function("return this")(),Zr=u&&!u.nodeType&&u,xe=Zr&&!0&&c&&!c.nodeType&&c,Uu=xe&&xe.exports===Zr,Vr=Uu&&Mu.process,Ft=(function(){try{var g=xe&&xe.require&&xe.require("util").types;return g||Vr&&Vr.binding&&Vr.binding("util")}catch{}})(),Gu=Ft&&Ft.isArrayBuffer,Wu=Ft&&Ft.isDate,Hu=Ft&&Ft.isMap,qu=Ft&&Ft.isRegExp,Yu=Ft&&Ft.isSet,zu=Ft&&Ft.isTypedArray;function Ot(g,v,p){switch(p.length){case 0:return g.call(v);case 1:return g.call(v,p[0]);case 2:return g.call(v,p[0],p[1]);case 3:return g.call(v,p[0],p[1],p[2])}return g.apply(v,p)}function $a(g,v,p,m){for(var L=-1,G=g==null?0:g.length;++L<G;){var it=g[L];v(m,it,p(it),g)}return m}function bt(g,v){for(var p=-1,m=g==null?0:g.length;++p<m&&v(g[p],p,g)!==!1;);return g}function Ka(g,v){for(var p=g==null?0:g.length;p--&&v(g[p],p,g)!==!1;);return g}function $u(g,v){for(var p=-1,m=g==null?0:g.length;++p<m;)if(!v(g[p],p,g))return!1;return!0}function pe(g,v){for(var p=-1,m=g==null?0:g.length,L=0,G=[];++p<m;){var it=g[p];v(it,p,g)&&(G[L++]=it)}return G}function Wn(g,v){var p=g==null?0:g.length;return!!p&&qe(g,v,0)>-1}function Jr(g,v,p){for(var m=-1,L=g==null?0:g.length;++m<L;)if(p(v,g[m]))return!0;return!1}function Q(g,v){for(var p=-1,m=g==null?0:g.length,L=Array(m);++p<m;)L[p]=v(g[p],p,g);return L}function ve(g,v){for(var p=-1,m=v.length,L=g.length;++p<m;)g[L+p]=v[p];return g}function Qr(g,v,p,m){var L=-1,G=g==null?0:g.length;for(m&&G&&(p=g[++L]);++L<G;)p=v(p,g[L],L,g);return p}function Xa(g,v,p,m){var L=g==null?0:g.length;for(m&&L&&(p=g[--L]);L--;)p=v(p,g[L],L,g);return p}function kr(g,v){for(var p=-1,m=g==null?0:g.length;++p<m;)if(v(g[p],p,g))return!0;return!1}var Za=jr("length");function Va(g){return g.split("")}function Ja(g){return g.match(ia)||[]}function Ku(g,v,p){var m;return p(g,function(L,G,it){if(v(L,G,it))return m=G,!1}),m}function Hn(g,v,p,m){for(var L=g.length,G=p+(m?1:-1);m?G--:++G<L;)if(v(g[G],G,g))return G;return-1}function qe(g,v,p){return v===v?ol(g,v,p):Hn(g,Xu,p)}function Qa(g,v,p,m){for(var L=p-1,G=g.length;++L<G;)if(m(g[L],v))return L;return-1}function Xu(g){return g!==g}function Zu(g,v){var p=g==null?0:g.length;return p?ei(g,v)/p:Dn}function jr(g){return function(v){return v==null?i:v[g]}}function ti(g){return function(v){return g==null?i:g[v]}}function Vu(g,v,p,m,L){return L(g,function(G,it,X){p=m?(m=!1,G):v(p,G,it,X)}),p}function ka(g,v){var p=g.length;for(g.sort(v);p--;)g[p]=g[p].value;return g}function ei(g,v){for(var p,m=-1,L=g.length;++m<L;){var G=v(g[m]);G!==i&&(p=p===i?G:p+G)}return p}function ni(g,v){for(var p=-1,m=Array(g);++p<g;)m[p]=v(p);return m}function ja(g,v){return Q(v,function(p){return[p,g[p]]})}function Ju(g){return g&&g.slice(0,ts(g)+1).replace(qr,"")}function xt(g){return function(v){return g(v)}}function ri(g,v){return Q(v,function(p){return g[p]})}function hn(g,v){return g.has(v)}function Qu(g,v){for(var p=-1,m=g.length;++p<m&&qe(v,g[p],0)>-1;);return p}function ku(g,v){for(var p=g.length;p--&&qe(v,g[p],0)>-1;);return p}function tl(g,v){for(var p=g.length,m=0;p--;)g[p]===v&&++m;return m}var el=ti(Ua),nl=ti(Ga);function rl(g){return"\\"+Ha[g]}function il(g,v){return g==null?i:g[v]}function Ye(g){return Fa.test(g)}function ul(g){return ba.test(g)}function sl(g){for(var v,p=[];!(v=g.next()).done;)p.push(v.value);return p}function ii(g){var v=-1,p=Array(g.size);return g.forEach(function(m,L){p[++v]=[L,m]}),p}function ju(g,v){return function(p){return g(v(p))}}function Ie(g,v){for(var p=-1,m=g.length,L=0,G=[];++p<m;){var it=g[p];(it===v||it===Y)&&(g[p]=Y,G[L++]=p)}return G}function qn(g){var v=-1,p=Array(g.size);return g.forEach(function(m){p[++v]=m}),p}function fl(g){var v=-1,p=Array(g.size);return g.forEach(function(m){p[++v]=[m,m]}),p}function ol(g,v,p){for(var m=p-1,L=g.length;++m<L;)if(g[m]===v)return m;return-1}function al(g,v,p){for(var m=p+1;m--;)if(g[m]===v)return m;return m}function ze(g){return Ye(g)?cl(g):Za(g)}function $t(g){return Ye(g)?hl(g):Va(g)}function ts(g){for(var v=g.length;v--&&ta.test(g.charAt(v)););return v}var ll=ti(Wa);function cl(g){for(var v=Xr.lastIndex=0;Xr.test(g);)++v;return v}function hl(g){return g.match(Xr)||[]}function gl(g){return g.match(Ca)||[]}var dl=(function g(v){v=v==null?at:$e.defaults(at.Object(),v,$e.pick(at,Ba));var p=v.Array,m=v.Date,L=v.Error,G=v.Function,it=v.Math,X=v.Object,ui=v.RegExp,_l=v.String,Bt=v.TypeError,Yn=p.prototype,pl=G.prototype,Ke=X.prototype,zn=v["__core-js_shared__"],$n=pl.toString,$=Ke.hasOwnProperty,vl=0,es=(function(){var t=/[^.]+$/.exec(zn&&zn.keys&&zn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),Kn=Ke.toString,Il=$n.call(X),Tl=at._,Sl=ui("^"+$n.call($).replace(Hr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xn=Uu?v.Buffer:i,Te=v.Symbol,Zn=v.Uint8Array,ns=Xn?Xn.allocUnsafe:i,Vn=ju(X.getPrototypeOf,X),rs=X.create,is=Ke.propertyIsEnumerable,Jn=Yn.splice,us=Te?Te.isConcatSpreadable:i,gn=Te?Te.iterator:i,Le=Te?Te.toStringTag:i,Qn=(function(){try{var t=Fe(X,"defineProperty");return t({},"",{}),t}catch{}})(),El=v.clearTimeout!==at.clearTimeout&&v.clearTimeout,Rl=m&&m.now!==at.Date.now&&m.now,Al=v.setTimeout!==at.setTimeout&&v.setTimeout,kn=it.ceil,jn=it.floor,si=X.getOwnPropertySymbols,ml=Xn?Xn.isBuffer:i,ss=v.isFinite,yl=Yn.join,wl=ju(X.keys,X),ut=it.max,gt=it.min,Ol=m.now,xl=v.parseInt,fs=it.random,Ll=Yn.reverse,fi=Fe(v,"DataView"),dn=Fe(v,"Map"),oi=Fe(v,"Promise"),Xe=Fe(v,"Set"),_n=Fe(v,"WeakMap"),pn=Fe(X,"create"),tr=_n&&new _n,Ze={},Nl=be(fi),Pl=be(dn),Dl=be(oi),Cl=be(Xe),Fl=be(_n),er=Te?Te.prototype:i,vn=er?er.valueOf:i,os=er?er.toString:i;function f(t){if(tt(t)&&!N(t)&&!(t instanceof B)){if(t instanceof Mt)return t;if($.call(t,"__wrapped__"))return lf(t)}return new Mt(t)}var Ve=(function(){function t(){}return function(e){if(!j(e))return{};if(rs)return rs(e);t.prototype=e;var n=new t;return t.prototype=i,n}})();function nr(){}function Mt(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}f.templateSettings={escape:Zo,evaluate:Vo,interpolate:vu,variable:"",imports:{_:f}},f.prototype=nr.prototype,f.prototype.constructor=f,Mt.prototype=Ve(nr.prototype),Mt.prototype.constructor=Mt;function B(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=jt,this.__views__=[]}function bl(){var t=new B(this.__wrapped__);return t.__actions__=Rt(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Rt(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Rt(this.__views__),t}function Bl(){if(this.__filtered__){var t=new B(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Ml(){var t=this.__wrapped__.value(),e=this.__dir__,n=N(t),r=e<0,s=n?t.length:0,o=Vc(0,s,this.__views__),a=o.start,h=o.end,d=h-a,I=r?h:a-1,T=this.__iteratees__,E=T.length,A=0,y=gt(d,this.__takeCount__);if(!n||!r&&s==d&&y==d)return Ds(t,this.__actions__);var O=[];t:for(;d--&&A<y;){I+=e;for(var C=-1,x=t[I];++C<E;){var b=T[C],M=b.iteratee,Pt=b.type,It=M(x);if(Pt==Po)x=It;else if(!It){if(Pt==hu)continue t;break t}}O[A++]=x}return O}B.prototype=Ve(nr.prototype),B.prototype.constructor=B;function Ne(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ul(){this.__data__=pn?pn(null):{},this.size=0}function Gl(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Wl(t){var e=this.__data__;if(pn){var n=e[t];return n===U?i:n}return $.call(e,t)?e[t]:i}function Hl(t){var e=this.__data__;return pn?e[t]!==i:$.call(e,t)}function ql(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=pn&&e===i?U:e,this}Ne.prototype.clear=Ul,Ne.prototype.delete=Gl,Ne.prototype.get=Wl,Ne.prototype.has=Hl,Ne.prototype.set=ql;function ue(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yl(){this.__data__=[],this.size=0}function zl(t){var e=this.__data__,n=rr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Jn.call(e,n,1),--this.size,!0}function $l(t){var e=this.__data__,n=rr(e,t);return n<0?i:e[n][1]}function Kl(t){return rr(this.__data__,t)>-1}function Xl(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}ue.prototype.clear=Yl,ue.prototype.delete=zl,ue.prototype.get=$l,ue.prototype.has=Kl,ue.prototype.set=Xl;function se(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zl(){this.size=0,this.__data__={hash:new Ne,map:new(dn||ue),string:new Ne}}function Vl(t){var e=_r(this,t).delete(t);return this.size-=e?1:0,e}function Jl(t){return _r(this,t).get(t)}function Ql(t){return _r(this,t).has(t)}function kl(t,e){var n=_r(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}se.prototype.clear=Zl,se.prototype.delete=Vl,se.prototype.get=Jl,se.prototype.has=Ql,se.prototype.set=kl;function Pe(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new se;++e<n;)this.add(t[e])}function jl(t){return this.__data__.set(t,U),this}function tc(t){return this.__data__.has(t)}Pe.prototype.add=Pe.prototype.push=jl,Pe.prototype.has=tc;function Kt(t){var e=this.__data__=new ue(t);this.size=e.size}function ec(){this.__data__=new ue,this.size=0}function nc(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function rc(t){return this.__data__.get(t)}function ic(t){return this.__data__.has(t)}function uc(t,e){var n=this.__data__;if(n instanceof ue){var r=n.__data__;if(!dn||r.length<_-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new se(r)}return n.set(t,e),this.size=n.size,this}Kt.prototype.clear=ec,Kt.prototype.delete=nc,Kt.prototype.get=rc,Kt.prototype.has=ic,Kt.prototype.set=uc;function as(t,e){var n=N(t),r=!n&&Be(t),s=!n&&!r&&me(t),o=!n&&!r&&!s&&je(t),a=n||r||s||o,h=a?ni(t.length,_l):[],d=h.length;for(var I in t)(e||$.call(t,I))&&!(a&&(I=="length"||s&&(I=="offset"||I=="parent")||o&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||le(I,d)))&&h.push(I);return h}function ls(t){var e=t.length;return e?t[Ti(0,e-1)]:i}function sc(t,e){return pr(Rt(t),De(e,0,t.length))}function fc(t){return pr(Rt(t))}function ai(t,e,n){(n!==i&&!Xt(t[e],n)||n===i&&!(e in t))&&fe(t,e,n)}function In(t,e,n){var r=t[e];(!($.call(t,e)&&Xt(r,n))||n===i&&!(e in t))&&fe(t,e,n)}function rr(t,e){for(var n=t.length;n--;)if(Xt(t[n][0],e))return n;return-1}function oc(t,e,n,r){return Se(t,function(s,o,a){e(r,s,n(s),a)}),r}function cs(t,e){return t&&ee(e,ft(e),t)}function ac(t,e){return t&&ee(e,mt(e),t)}function fe(t,e,n){e=="__proto__"&&Qn?Qn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function li(t,e){for(var n=-1,r=e.length,s=p(r),o=t==null;++n<r;)s[n]=o?i:zi(t,e[n]);return s}function De(t,e,n){return t===t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function Ut(t,e,n,r,s,o){var a,h=e&K,d=e&St,I=e&ht;if(n&&(a=s?n(t,r,s,o):n(t)),a!==i)return a;if(!j(t))return t;var T=N(t);if(T){if(a=Qc(t),!h)return Rt(t,a)}else{var E=dt(t),A=E==bn||E==gu;if(me(t))return bs(t,h);if(E==ie||E==Ge||A&&!s){if(a=d||A?{}:tf(t),!h)return d?Wc(t,ac(a,t)):Gc(t,cs(a,t))}else{if(!V[E])return s?t:{};a=kc(t,E,h)}}o||(o=new Kt);var y=o.get(t);if(y)return y;o.set(t,a),Nf(t)?t.forEach(function(x){a.add(Ut(x,e,n,x,t,o))}):xf(t)&&t.forEach(function(x,b){a.set(b,Ut(x,e,n,b,t,o))});var O=I?d?Ni:Li:d?mt:ft,C=T?i:O(t);return bt(C||t,function(x,b){C&&(b=x,x=t[b]),In(a,b,Ut(x,e,n,b,t,o))}),a}function lc(t){var e=ft(t);return function(n){return hs(n,t,e)}}function hs(t,e,n){var r=n.length;if(t==null)return!r;for(t=X(t);r--;){var s=n[r],o=e[s],a=t[s];if(a===i&&!(s in t)||!o(a))return!1}return!0}function gs(t,e,n){if(typeof t!="function")throw new Bt(R);return yn(function(){t.apply(i,n)},e)}function Tn(t,e,n,r){var s=-1,o=Wn,a=!0,h=t.length,d=[],I=e.length;if(!h)return d;n&&(e=Q(e,xt(n))),r?(o=Jr,a=!1):e.length>=_&&(o=hn,a=!1,e=new Pe(e));t:for(;++s<h;){var T=t[s],E=n==null?T:n(T);if(T=r||T!==0?T:0,a&&E===E){for(var A=I;A--;)if(e[A]===E)continue t;d.push(T)}else o(e,E,r)||d.push(T)}return d}var Se=Ws(te),ds=Ws(hi,!0);function cc(t,e){var n=!0;return Se(t,function(r,s,o){return n=!!e(r,s,o),n}),n}function ir(t,e,n){for(var r=-1,s=t.length;++r<s;){var o=t[r],a=e(o);if(a!=null&&(h===i?a===a&&!Nt(a):n(a,h)))var h=a,d=o}return d}function hc(t,e,n,r){var s=t.length;for(n=D(n),n<0&&(n=-n>s?0:s+n),r=r===i||r>s?s:D(r),r<0&&(r+=s),r=n>r?0:Df(r);n<r;)t[n++]=e;return t}function _s(t,e){var n=[];return Se(t,function(r,s,o){e(r,s,o)&&n.push(r)}),n}function lt(t,e,n,r,s){var o=-1,a=t.length;for(n||(n=th),s||(s=[]);++o<a;){var h=t[o];e>0&&n(h)?e>1?lt(h,e-1,n,r,s):ve(s,h):r||(s[s.length]=h)}return s}var ci=Hs(),ps=Hs(!0);function te(t,e){return t&&ci(t,e,ft)}function hi(t,e){return t&&ps(t,e,ft)}function ur(t,e){return pe(e,function(n){return ce(t[n])})}function Ce(t,e){e=Re(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[ne(e[n++])];return n&&n==r?t:i}function vs(t,e,n){var r=e(t);return N(t)?r:ve(r,n(t))}function pt(t){return t==null?t===i?Ho:Go:Le&&Le in X(t)?Zc(t):fh(t)}function gi(t,e){return t>e}function gc(t,e){return t!=null&&$.call(t,e)}function dc(t,e){return t!=null&&e in X(t)}function _c(t,e,n){return t>=gt(e,n)&&t<ut(e,n)}function di(t,e,n){for(var r=n?Jr:Wn,s=t[0].length,o=t.length,a=o,h=p(o),d=1/0,I=[];a--;){var T=t[a];a&&e&&(T=Q(T,xt(e))),d=gt(T.length,d),h[a]=!n&&(e||s>=120&&T.length>=120)?new Pe(a&&T):i}T=t[0];var E=-1,A=h[0];t:for(;++E<s&&I.length<d;){var y=T[E],O=e?e(y):y;if(y=n||y!==0?y:0,!(A?hn(A,O):r(I,O,n))){for(a=o;--a;){var C=h[a];if(!(C?hn(C,O):r(t[a],O,n)))continue t}A&&A.push(O),I.push(y)}}return I}function pc(t,e,n,r){return te(t,function(s,o,a){e(r,n(s),o,a)}),r}function Sn(t,e,n){e=Re(e,t),t=uf(t,e);var r=t==null?t:t[ne(Wt(e))];return r==null?i:Ot(r,t,n)}function Is(t){return tt(t)&&pt(t)==Ge}function vc(t){return tt(t)&&pt(t)==cn}function Ic(t){return tt(t)&&pt(t)==sn}function En(t,e,n,r,s){return t===e?!0:t==null||e==null||!tt(t)&&!tt(e)?t!==t&&e!==e:Tc(t,e,n,r,En,s)}function Tc(t,e,n,r,s,o){var a=N(t),h=N(e),d=a?Cn:dt(t),I=h?Cn:dt(e);d=d==Ge?ie:d,I=I==Ge?ie:I;var T=d==ie,E=I==ie,A=d==I;if(A&&me(t)){if(!me(e))return!1;a=!0,T=!1}if(A&&!T)return o||(o=new Kt),a||je(t)?Qs(t,e,n,r,s,o):Kc(t,e,d,n,r,s,o);if(!(n&Jt)){var y=T&&$.call(t,"__wrapped__"),O=E&&$.call(e,"__wrapped__");if(y||O){var C=y?t.value():t,x=O?e.value():e;return o||(o=new Kt),s(C,x,n,r,o)}}return A?(o||(o=new Kt),Xc(t,e,n,r,s,o)):!1}function Sc(t){return tt(t)&&dt(t)==Yt}function _i(t,e,n,r){var s=n.length,o=s,a=!r;if(t==null)return!o;for(t=X(t);s--;){var h=n[s];if(a&&h[2]?h[1]!==t[h[0]]:!(h[0]in t))return!1}for(;++s<o;){h=n[s];var d=h[0],I=t[d],T=h[1];if(a&&h[2]){if(I===i&&!(d in t))return!1}else{var E=new Kt;if(r)var A=r(I,T,d,t,e,E);if(!(A===i?En(T,I,Jt|de,r,E):A))return!1}}return!0}function Ts(t){if(!j(t)||nh(t))return!1;var e=ce(t)?Sl:la;return e.test(be(t))}function Ec(t){return tt(t)&&pt(t)==on}function Rc(t){return tt(t)&&dt(t)==zt}function Ac(t){return tt(t)&&Rr(t.length)&&!!J[pt(t)]}function Ss(t){return typeof t=="function"?t:t==null?yt:typeof t=="object"?N(t)?As(t[0],t[1]):Rs(t):Yf(t)}function pi(t){if(!mn(t))return wl(t);var e=[];for(var n in X(t))$.call(t,n)&&n!="constructor"&&e.push(n);return e}function mc(t){if(!j(t))return sh(t);var e=mn(t),n=[];for(var r in t)r=="constructor"&&(e||!$.call(t,r))||n.push(r);return n}function vi(t,e){return t<e}function Es(t,e){var n=-1,r=At(t)?p(t.length):[];return Se(t,function(s,o,a){r[++n]=e(s,o,a)}),r}function Rs(t){var e=Di(t);return e.length==1&&e[0][2]?nf(e[0][0],e[0][1]):function(n){return n===t||_i(n,t,e)}}function As(t,e){return Fi(t)&&ef(e)?nf(ne(t),e):function(n){var r=zi(n,t);return r===i&&r===e?$i(n,t):En(e,r,Jt|de)}}function sr(t,e,n,r,s){t!==e&&ci(e,function(o,a){if(s||(s=new Kt),j(o))yc(t,e,a,n,sr,r,s);else{var h=r?r(Bi(t,a),o,a+"",t,e,s):i;h===i&&(h=o),ai(t,a,h)}},mt)}function yc(t,e,n,r,s,o,a){var h=Bi(t,n),d=Bi(e,n),I=a.get(d);if(I){ai(t,n,I);return}var T=o?o(h,d,n+"",t,e,a):i,E=T===i;if(E){var A=N(d),y=!A&&me(d),O=!A&&!y&&je(d);T=d,A||y||O?N(h)?T=h:nt(h)?T=Rt(h):y?(E=!1,T=bs(d,!0)):O?(E=!1,T=Bs(d,!0)):T=[]:wn(d)||Be(d)?(T=h,Be(h)?T=Cf(h):(!j(h)||ce(h))&&(T=tf(d))):E=!1}E&&(a.set(d,T),s(T,d,r,o,a),a.delete(d)),ai(t,n,T)}function ms(t,e){var n=t.length;if(n)return e+=e<0?n:0,le(e,n)?t[e]:i}function ys(t,e,n){e.length?e=Q(e,function(o){return N(o)?function(a){return Ce(a,o.length===1?o[0]:o)}:o}):e=[yt];var r=-1;e=Q(e,xt(w()));var s=Es(t,function(o,a,h){var d=Q(e,function(I){return I(o)});return{criteria:d,index:++r,value:o}});return ka(s,function(o,a){return Uc(o,a,n)})}function wc(t,e){return ws(t,e,function(n,r){return $i(t,r)})}function ws(t,e,n){for(var r=-1,s=e.length,o={};++r<s;){var a=e[r],h=Ce(t,a);n(h,a)&&Rn(o,Re(a,t),h)}return o}function Oc(t){return function(e){return Ce(e,t)}}function Ii(t,e,n,r){var s=r?Qa:qe,o=-1,a=e.length,h=t;for(t===e&&(e=Rt(e)),n&&(h=Q(t,xt(n)));++o<a;)for(var d=0,I=e[o],T=n?n(I):I;(d=s(h,T,d,r))>-1;)h!==t&&Jn.call(h,d,1),Jn.call(t,d,1);return t}function Os(t,e){for(var n=t?e.length:0,r=n-1;n--;){var s=e[n];if(n==r||s!==o){var o=s;le(s)?Jn.call(t,s,1):Ri(t,s)}}return t}function Ti(t,e){return t+jn(fs()*(e-t+1))}function xc(t,e,n,r){for(var s=-1,o=ut(kn((e-t)/(n||1)),0),a=p(o);o--;)a[r?o:++s]=t,t+=n;return a}function Si(t,e){var n="";if(!t||e<1||e>_e)return n;do e%2&&(n+=t),e=jn(e/2),e&&(t+=t);while(e);return n}function F(t,e){return Mi(rf(t,e,yt),t+"")}function Lc(t){return ls(tn(t))}function Nc(t,e){var n=tn(t);return pr(n,De(e,0,n.length))}function Rn(t,e,n,r){if(!j(t))return t;e=Re(e,t);for(var s=-1,o=e.length,a=o-1,h=t;h!=null&&++s<o;){var d=ne(e[s]),I=n;if(d==="__proto__"||d==="constructor"||d==="prototype")return t;if(s!=a){var T=h[d];I=r?r(T,d,h):i,I===i&&(I=j(T)?T:le(e[s+1])?[]:{})}In(h,d,I),h=h[d]}return t}var xs=tr?function(t,e){return tr.set(t,e),t}:yt,Pc=Qn?function(t,e){return Qn(t,"toString",{configurable:!0,enumerable:!1,value:Xi(e),writable:!0})}:yt;function Dc(t){return pr(tn(t))}function Gt(t,e,n){var r=-1,s=t.length;e<0&&(e=-e>s?0:s+e),n=n>s?s:n,n<0&&(n+=s),s=e>n?0:n-e>>>0,e>>>=0;for(var o=p(s);++r<s;)o[r]=t[r+e];return o}function Cc(t,e){var n;return Se(t,function(r,s,o){return n=e(r,s,o),!n}),!!n}function fr(t,e,n){var r=0,s=t==null?r:t.length;if(typeof e=="number"&&e===e&&s<=bo){for(;r<s;){var o=r+s>>>1,a=t[o];a!==null&&!Nt(a)&&(n?a<=e:a<e)?r=o+1:s=o}return s}return Ei(t,e,yt,n)}function Ei(t,e,n,r){var s=0,o=t==null?0:t.length;if(o===0)return 0;e=n(e);for(var a=e!==e,h=e===null,d=Nt(e),I=e===i;s<o;){var T=jn((s+o)/2),E=n(t[T]),A=E!==i,y=E===null,O=E===E,C=Nt(E);if(a)var x=r||O;else I?x=O&&(r||A):h?x=O&&A&&(r||!y):d?x=O&&A&&!y&&(r||!C):y||C?x=!1:x=r?E<=e:E<e;x?s=T+1:o=T}return gt(o,Fo)}function Ls(t,e){for(var n=-1,r=t.length,s=0,o=[];++n<r;){var a=t[n],h=e?e(a):a;if(!n||!Xt(h,d)){var d=h;o[s++]=a===0?0:a}}return o}function Ns(t){return typeof t=="number"?t:Nt(t)?Dn:+t}function Lt(t){if(typeof t=="string")return t;if(N(t))return Q(t,Lt)+"";if(Nt(t))return os?os.call(t):"";var e=t+"";return e=="0"&&1/t==-Oe?"-0":e}function Ee(t,e,n){var r=-1,s=Wn,o=t.length,a=!0,h=[],d=h;if(n)a=!1,s=Jr;else if(o>=_){var I=e?null:zc(t);if(I)return qn(I);a=!1,s=hn,d=new Pe}else d=e?[]:h;t:for(;++r<o;){var T=t[r],E=e?e(T):T;if(T=n||T!==0?T:0,a&&E===E){for(var A=d.length;A--;)if(d[A]===E)continue t;e&&d.push(E),h.push(T)}else s(d,E,n)||(d!==h&&d.push(E),h.push(T))}return h}function Ri(t,e){return e=Re(e,t),t=uf(t,e),t==null||delete t[ne(Wt(e))]}function Ps(t,e,n,r){return Rn(t,e,n(Ce(t,e)),r)}function or(t,e,n,r){for(var s=t.length,o=r?s:-1;(r?o--:++o<s)&&e(t[o],o,t););return n?Gt(t,r?0:o,r?o+1:s):Gt(t,r?o+1:0,r?s:o)}function Ds(t,e){var n=t;return n instanceof B&&(n=n.value()),Qr(e,function(r,s){return s.func.apply(s.thisArg,ve([r],s.args))},n)}function Ai(t,e,n){var r=t.length;if(r<2)return r?Ee(t[0]):[];for(var s=-1,o=p(r);++s<r;)for(var a=t[s],h=-1;++h<r;)h!=s&&(o[s]=Tn(o[s]||a,t[h],e,n));return Ee(lt(o,1),e,n)}function Cs(t,e,n){for(var r=-1,s=t.length,o=e.length,a={};++r<s;){var h=r<o?e[r]:i;n(a,t[r],h)}return a}function mi(t){return nt(t)?t:[]}function yi(t){return typeof t=="function"?t:yt}function Re(t,e){return N(t)?t:Fi(t,e)?[t]:af(z(t))}var Fc=F;function Ae(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:Gt(t,e,n)}var Fs=El||function(t){return at.clearTimeout(t)};function bs(t,e){if(e)return t.slice();var n=t.length,r=ns?ns(n):new t.constructor(n);return t.copy(r),r}function wi(t){var e=new t.constructor(t.byteLength);return new Zn(e).set(new Zn(t)),e}function bc(t,e){var n=e?wi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function Bc(t){var e=new t.constructor(t.source,Iu.exec(t));return e.lastIndex=t.lastIndex,e}function Mc(t){return vn?X(vn.call(t)):{}}function Bs(t,e){var n=e?wi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ms(t,e){if(t!==e){var n=t!==i,r=t===null,s=t===t,o=Nt(t),a=e!==i,h=e===null,d=e===e,I=Nt(e);if(!h&&!I&&!o&&t>e||o&&a&&d&&!h&&!I||r&&a&&d||!n&&d||!s)return 1;if(!r&&!o&&!I&&t<e||I&&n&&s&&!r&&!o||h&&n&&s||!a&&s||!d)return-1}return 0}function Uc(t,e,n){for(var r=-1,s=t.criteria,o=e.criteria,a=s.length,h=n.length;++r<a;){var d=Ms(s[r],o[r]);if(d){if(r>=h)return d;var I=n[r];return d*(I=="desc"?-1:1)}}return t.index-e.index}function Us(t,e,n,r){for(var s=-1,o=t.length,a=n.length,h=-1,d=e.length,I=ut(o-a,0),T=p(d+I),E=!r;++h<d;)T[h]=e[h];for(;++s<a;)(E||s<o)&&(T[n[s]]=t[s]);for(;I--;)T[h++]=t[s++];return T}function Gs(t,e,n,r){for(var s=-1,o=t.length,a=-1,h=n.length,d=-1,I=e.length,T=ut(o-h,0),E=p(T+I),A=!r;++s<T;)E[s]=t[s];for(var y=s;++d<I;)E[y+d]=e[d];for(;++a<h;)(A||s<o)&&(E[y+n[a]]=t[s++]);return E}function Rt(t,e){var n=-1,r=t.length;for(e||(e=p(r));++n<r;)e[n]=t[n];return e}function ee(t,e,n,r){var s=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var h=e[o],d=r?r(n[h],t[h],h,n,t):i;d===i&&(d=t[h]),s?fe(n,h,d):In(n,h,d)}return n}function Gc(t,e){return ee(t,Ci(t),e)}function Wc(t,e){return ee(t,ks(t),e)}function ar(t,e){return function(n,r){var s=N(n)?$a:oc,o=e?e():{};return s(n,t,w(r,2),o)}}function Je(t){return F(function(e,n){var r=-1,s=n.length,o=s>1?n[s-1]:i,a=s>2?n[2]:i;for(o=t.length>3&&typeof o=="function"?(s--,o):i,a&&vt(n[0],n[1],a)&&(o=s<3?i:o,s=1),e=X(e);++r<s;){var h=n[r];h&&t(e,h,r,o)}return e})}function Ws(t,e){return function(n,r){if(n==null)return n;if(!At(n))return t(n,r);for(var s=n.length,o=e?s:-1,a=X(n);(e?o--:++o<s)&&r(a[o],o,a)!==!1;);return n}}function Hs(t){return function(e,n,r){for(var s=-1,o=X(e),a=r(e),h=a.length;h--;){var d=a[t?h:++s];if(n(o[d],d,o)===!1)break}return e}}function Hc(t,e,n){var r=e&_t,s=An(t);function o(){var a=this&&this!==at&&this instanceof o?s:t;return a.apply(r?n:this,arguments)}return o}function qs(t){return function(e){e=z(e);var n=Ye(e)?$t(e):i,r=n?n[0]:e.charAt(0),s=n?Ae(n,1).join(""):e.slice(1);return r[t]()+s}}function Qe(t){return function(e){return Qr(Hf(Wf(e).replace(Pa,"")),t,"")}}function An(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Ve(t.prototype),r=t.apply(n,e);return j(r)?r:n}}function qc(t,e,n){var r=An(t);function s(){for(var o=arguments.length,a=p(o),h=o,d=ke(s);h--;)a[h]=arguments[h];var I=o<3&&a[0]!==d&&a[o-1]!==d?[]:Ie(a,d);if(o-=I.length,o<n)return Xs(t,e,lr,s.placeholder,i,a,I,i,i,n-o);var T=this&&this!==at&&this instanceof s?r:t;return Ot(T,this,a)}return s}function Ys(t){return function(e,n,r){var s=X(e);if(!At(e)){var o=w(n,3);e=ft(e),n=function(h){return o(s[h],h,s)}}var a=t(e,n,r);return a>-1?s[o?e[a]:a]:i}}function zs(t){return ae(function(e){var n=e.length,r=n,s=Mt.prototype.thru;for(t&&e.reverse();r--;){var o=e[r];if(typeof o!="function")throw new Bt(R);if(s&&!a&&dr(o)=="wrapper")var a=new Mt([],!0)}for(r=a?r:n;++r<n;){o=e[r];var h=dr(o),d=h=="wrapper"?Pi(o):i;d&&bi(d[0])&&d[1]==(ot|Et|wt|k)&&!d[4].length&&d[9]==1?a=a[dr(d[0])].apply(a,d[3]):a=o.length==1&&bi(o)?a[h]():a.thru(o)}return function(){var I=arguments,T=I[0];if(a&&I.length==1&&N(T))return a.plant(T).value();for(var E=0,A=n?e[E].apply(this,I):T;++E<n;)A=e[E].call(this,A);return A}})}function lr(t,e,n,r,s,o,a,h,d,I){var T=e&ot,E=e&_t,A=e&qt,y=e&(Et|Qt),O=e&we,C=A?i:An(t);function x(){for(var b=arguments.length,M=p(b),Pt=b;Pt--;)M[Pt]=arguments[Pt];if(y)var It=ke(x),Dt=tl(M,It);if(r&&(M=Us(M,r,s,y)),o&&(M=Gs(M,o,a,y)),b-=Dt,y&&b<I){var rt=Ie(M,It);return Xs(t,e,lr,x.placeholder,n,M,rt,h,d,I-b)}var Zt=E?n:this,ge=A?Zt[t]:t;return b=M.length,h?M=oh(M,h):O&&b>1&&M.reverse(),T&&d<b&&(M.length=d),this&&this!==at&&this instanceof x&&(ge=C||An(ge)),ge.apply(Zt,M)}return x}function $s(t,e){return function(n,r){return pc(n,t,e(r),{})}}function cr(t,e){return function(n,r){var s;if(n===i&&r===i)return e;if(n!==i&&(s=n),r!==i){if(s===i)return r;typeof n=="string"||typeof r=="string"?(n=Lt(n),r=Lt(r)):(n=Ns(n),r=Ns(r)),s=t(n,r)}return s}}function Oi(t){return ae(function(e){return e=Q(e,xt(w())),F(function(n){var r=this;return t(e,function(s){return Ot(s,r,n)})})})}function hr(t,e){e=e===i?" ":Lt(e);var n=e.length;if(n<2)return n?Si(e,t):e;var r=Si(e,kn(t/ze(e)));return Ye(e)?Ae($t(r),0,t).join(""):r.slice(0,t)}function Yc(t,e,n,r){var s=e&_t,o=An(t);function a(){for(var h=-1,d=arguments.length,I=-1,T=r.length,E=p(T+d),A=this&&this!==at&&this instanceof a?o:t;++I<T;)E[I]=r[I];for(;d--;)E[I++]=arguments[++h];return Ot(A,s?n:this,E)}return a}function Ks(t){return function(e,n,r){return r&&typeof r!="number"&&vt(e,n,r)&&(n=r=i),e=he(e),n===i?(n=e,e=0):n=he(n),r=r===i?e<n?1:-1:he(r),xc(e,n,r,t)}}function gr(t){return function(e,n){return typeof e=="string"&&typeof n=="string"||(e=Ht(e),n=Ht(n)),t(e,n)}}function Xs(t,e,n,r,s,o,a,h,d,I){var T=e&Et,E=T?a:i,A=T?i:a,y=T?o:i,O=T?i:o;e|=T?wt:kt,e&=~(T?kt:wt),e&re||(e&=-4);var C=[t,e,s,y,E,O,A,h,d,I],x=n.apply(i,C);return bi(t)&&sf(x,C),x.placeholder=r,ff(x,t,e)}function xi(t){var e=it[t];return function(n,r){if(n=Ht(n),r=r==null?0:gt(D(r),292),r&&ss(n)){var s=(z(n)+"e").split("e"),o=e(s[0]+"e"+(+s[1]+r));return s=(z(o)+"e").split("e"),+(s[0]+"e"+(+s[1]-r))}return e(n)}}var zc=Xe&&1/qn(new Xe([,-0]))[1]==Oe?function(t){return new Xe(t)}:Ji;function Zs(t){return function(e){var n=dt(e);return n==Yt?ii(e):n==zt?fl(e):ja(e,t(e))}}function oe(t,e,n,r,s,o,a,h){var d=e&qt;if(!d&&typeof t!="function")throw new Bt(R);var I=r?r.length:0;if(I||(e&=-97,r=s=i),a=a===i?a:ut(D(a),0),h=h===i?h:D(h),I-=s?s.length:0,e&kt){var T=r,E=s;r=s=i}var A=d?i:Pi(t),y=[t,e,n,r,s,T,E,o,a,h];if(A&&uh(y,A),t=y[0],e=y[1],n=y[2],r=y[3],s=y[4],h=y[9]=y[9]===i?d?0:t.length:ut(y[9]-I,0),!h&&e&(Et|Qt)&&(e&=-25),!e||e==_t)var O=Hc(t,e,n);else e==Et||e==Qt?O=qc(t,e,h):(e==wt||e==(_t|wt))&&!s.length?O=Yc(t,e,n,r):O=lr.apply(i,y);var C=A?xs:sf;return ff(C(O,y),t,e)}function Vs(t,e,n,r){return t===i||Xt(t,Ke[n])&&!$.call(r,n)?e:t}function Js(t,e,n,r,s,o){return j(t)&&j(e)&&(o.set(e,t),sr(t,e,i,Js,o),o.delete(e)),t}function $c(t){return wn(t)?i:t}function Qs(t,e,n,r,s,o){var a=n&Jt,h=t.length,d=e.length;if(h!=d&&!(a&&d>h))return!1;var I=o.get(t),T=o.get(e);if(I&&T)return I==e&&T==t;var E=-1,A=!0,y=n&de?new Pe:i;for(o.set(t,e),o.set(e,t);++E<h;){var O=t[E],C=e[E];if(r)var x=a?r(C,O,E,e,t,o):r(O,C,E,t,e,o);if(x!==i){if(x)continue;A=!1;break}if(y){if(!kr(e,function(b,M){if(!hn(y,M)&&(O===b||s(O,b,n,r,o)))return y.push(M)})){A=!1;break}}else if(!(O===C||s(O,C,n,r,o))){A=!1;break}}return o.delete(t),o.delete(e),A}function Kc(t,e,n,r,s,o,a){switch(n){case We:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case cn:return!(t.byteLength!=e.byteLength||!o(new Zn(t),new Zn(e)));case un:case sn:case fn:return Xt(+t,+e);case Fn:return t.name==e.name&&t.message==e.message;case on:case an:return t==e+"";case Yt:var h=ii;case zt:var d=r&Jt;if(h||(h=qn),t.size!=e.size&&!d)return!1;var I=a.get(t);if(I)return I==e;r|=de,a.set(t,e);var T=Qs(h(t),h(e),r,s,o,a);return a.delete(t),T;case Bn:if(vn)return vn.call(t)==vn.call(e)}return!1}function Xc(t,e,n,r,s,o){var a=n&Jt,h=Li(t),d=h.length,I=Li(e),T=I.length;if(d!=T&&!a)return!1;for(var E=d;E--;){var A=h[E];if(!(a?A in e:$.call(e,A)))return!1}var y=o.get(t),O=o.get(e);if(y&&O)return y==e&&O==t;var C=!0;o.set(t,e),o.set(e,t);for(var x=a;++E<d;){A=h[E];var b=t[A],M=e[A];if(r)var Pt=a?r(M,b,A,e,t,o):r(b,M,A,t,e,o);if(!(Pt===i?b===M||s(b,M,n,r,o):Pt)){C=!1;break}x||(x=A=="constructor")}if(C&&!x){var It=t.constructor,Dt=e.constructor;It!=Dt&&"constructor"in t&&"constructor"in e&&!(typeof It=="function"&&It instanceof It&&typeof Dt=="function"&&Dt instanceof Dt)&&(C=!1)}return o.delete(t),o.delete(e),C}function ae(t){return Mi(rf(t,i,gf),t+"")}function Li(t){return vs(t,ft,Ci)}function Ni(t){return vs(t,mt,ks)}var Pi=tr?function(t){return tr.get(t)}:Ji;function dr(t){for(var e=t.name+"",n=Ze[e],r=$.call(Ze,e)?n.length:0;r--;){var s=n[r],o=s.func;if(o==null||o==t)return s.name}return e}function ke(t){var e=$.call(f,"placeholder")?f:t;return e.placeholder}function w(){var t=f.iteratee||Zi;return t=t===Zi?Ss:t,arguments.length?t(arguments[0],arguments[1]):t}function _r(t,e){var n=t.__data__;return eh(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Di(t){for(var e=ft(t),n=e.length;n--;){var r=e[n],s=t[r];e[n]=[r,s,ef(s)]}return e}function Fe(t,e){var n=il(t,e);return Ts(n)?n:i}function Zc(t){var e=$.call(t,Le),n=t[Le];try{t[Le]=i;var r=!0}catch{}var s=Kn.call(t);return r&&(e?t[Le]=n:delete t[Le]),s}var Ci=si?function(t){return t==null?[]:(t=X(t),pe(si(t),function(e){return is.call(t,e)}))}:Qi,ks=si?function(t){for(var e=[];t;)ve(e,Ci(t)),t=Vn(t);return e}:Qi,dt=pt;(fi&&dt(new fi(new ArrayBuffer(1)))!=We||dn&&dt(new dn)!=Yt||oi&&dt(oi.resolve())!=du||Xe&&dt(new Xe)!=zt||_n&&dt(new _n)!=ln)&&(dt=function(t){var e=pt(t),n=e==ie?t.constructor:i,r=n?be(n):"";if(r)switch(r){case Nl:return We;case Pl:return Yt;case Dl:return du;case Cl:return zt;case Fl:return ln}return e});function Vc(t,e,n){for(var r=-1,s=n.length;++r<s;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=gt(e,t+a);break;case"takeRight":t=ut(t,e-a);break}}return{start:t,end:e}}function Jc(t){var e=t.match(na);return e?e[1].split(ra):[]}function js(t,e,n){e=Re(e,t);for(var r=-1,s=e.length,o=!1;++r<s;){var a=ne(e[r]);if(!(o=t!=null&&n(t,a)))break;t=t[a]}return o||++r!=s?o:(s=t==null?0:t.length,!!s&&Rr(s)&&le(a,s)&&(N(t)||Be(t)))}function Qc(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&$.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function tf(t){return typeof t.constructor=="function"&&!mn(t)?Ve(Vn(t)):{}}function kc(t,e,n){var r=t.constructor;switch(e){case cn:return wi(t);case un:case sn:return new r(+t);case We:return bc(t,n);case Dr:case Cr:case Fr:case br:case Br:case Mr:case Ur:case Gr:case Wr:return Bs(t,n);case Yt:return new r;case fn:case an:return new r(t);case on:return Bc(t);case zt:return new r;case Bn:return Mc(t)}}function jc(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ea,`{
|
|
9
|
-
/* [wrapped with `+e+`] */
|
|
10
|
-
`)}function th(t){return N(t)||Be(t)||!!(us&&t&&t[us])}function le(t,e){var n=typeof t;return e=e??_e,!!e&&(n=="number"||n!="symbol"&&ha.test(t))&&t>-1&&t%1==0&&t<e}function vt(t,e,n){if(!j(n))return!1;var r=typeof e;return(r=="number"?At(n)&&le(e,n.length):r=="string"&&e in n)?Xt(n[e],t):!1}function Fi(t,e){if(N(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Nt(t)?!0:Qo.test(t)||!Jo.test(t)||e!=null&&t in X(e)}function eh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function bi(t){var e=dr(t),n=f[e];if(typeof n!="function"||!(e in B.prototype))return!1;if(t===n)return!0;var r=Pi(n);return!!r&&t===r[0]}function nh(t){return!!es&&es in t}var rh=zn?ce:ki;function mn(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Ke;return t===n}function ef(t){return t===t&&!j(t)}function nf(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==i||t in X(n))}}function ih(t){var e=Sr(t,function(r){return n.size===q&&n.clear(),r}),n=e.cache;return e}function uh(t,e){var n=t[1],r=e[1],s=n|r,o=s<(_t|qt|ot),a=r==ot&&n==Et||r==ot&&n==k&&t[7].length<=e[8]||r==(ot|k)&&e[7].length<=e[8]&&n==Et;if(!(o||a))return t;r&_t&&(t[2]=e[2],s|=n&_t?0:re);var h=e[3];if(h){var d=t[3];t[3]=d?Us(d,h,e[4]):h,t[4]=d?Ie(t[3],Y):e[4]}return h=e[5],h&&(d=t[5],t[5]=d?Gs(d,h,e[6]):h,t[6]=d?Ie(t[5],Y):e[6]),h=e[7],h&&(t[7]=h),r&ot&&(t[8]=t[8]==null?e[8]:gt(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=s,t}function sh(t){var e=[];if(t!=null)for(var n in X(t))e.push(n);return e}function fh(t){return Kn.call(t)}function rf(t,e,n){return e=ut(e===i?t.length-1:e,0),function(){for(var r=arguments,s=-1,o=ut(r.length-e,0),a=p(o);++s<o;)a[s]=r[e+s];s=-1;for(var h=p(e+1);++s<e;)h[s]=r[s];return h[e]=n(a),Ot(t,this,h)}}function uf(t,e){return e.length<2?t:Ce(t,Gt(e,0,-1))}function oh(t,e){for(var n=t.length,r=gt(e.length,n),s=Rt(t);r--;){var o=e[r];t[r]=le(o,n)?s[o]:i}return t}function Bi(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var sf=of(xs),yn=Al||function(t,e){return at.setTimeout(t,e)},Mi=of(Pc);function ff(t,e,n){var r=e+"";return Mi(t,jc(r,ah(Jc(r),n)))}function of(t){var e=0,n=0;return function(){var r=Ol(),s=No-(r-n);if(n=r,s>0){if(++e>=Lo)return arguments[0]}else e=0;return t.apply(i,arguments)}}function pr(t,e){var n=-1,r=t.length,s=r-1;for(e=e===i?r:e;++n<e;){var o=Ti(n,s),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}var af=ih(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ko,function(n,r,s,o){e.push(s?o.replace(sa,"$1"):r||n)}),e});function ne(t){if(typeof t=="string"||Nt(t))return t;var e=t+"";return e=="0"&&1/t==-Oe?"-0":e}function be(t){if(t!=null){try{return $n.call(t)}catch{}try{return t+""}catch{}}return""}function ah(t,e){return bt(Bo,function(n){var r="_."+n[0];e&n[1]&&!Wn(t,r)&&t.push(r)}),t.sort()}function lf(t){if(t instanceof B)return t.clone();var e=new Mt(t.__wrapped__,t.__chain__);return e.__actions__=Rt(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function lh(t,e,n){(n?vt(t,e,n):e===i)?e=1:e=ut(D(e),0);var r=t==null?0:t.length;if(!r||e<1)return[];for(var s=0,o=0,a=p(kn(r/e));s<r;)a[o++]=Gt(t,s,s+=e);return a}function ch(t){for(var e=-1,n=t==null?0:t.length,r=0,s=[];++e<n;){var o=t[e];o&&(s[r++]=o)}return s}function hh(){var t=arguments.length;if(!t)return[];for(var e=p(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return ve(N(n)?Rt(n):[n],lt(e,1))}var gh=F(function(t,e){return nt(t)?Tn(t,lt(e,1,nt,!0)):[]}),dh=F(function(t,e){var n=Wt(e);return nt(n)&&(n=i),nt(t)?Tn(t,lt(e,1,nt,!0),w(n,2)):[]}),_h=F(function(t,e){var n=Wt(e);return nt(n)&&(n=i),nt(t)?Tn(t,lt(e,1,nt,!0),i,n):[]});function ph(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===i?1:D(e),Gt(t,e<0?0:e,r)):[]}function vh(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===i?1:D(e),e=r-e,Gt(t,0,e<0?0:e)):[]}function Ih(t,e){return t&&t.length?or(t,w(e,3),!0,!0):[]}function Th(t,e){return t&&t.length?or(t,w(e,3),!0):[]}function Sh(t,e,n,r){var s=t==null?0:t.length;return s?(n&&typeof n!="number"&&vt(t,e,n)&&(n=0,r=s),hc(t,e,n,r)):[]}function cf(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var s=n==null?0:D(n);return s<0&&(s=ut(r+s,0)),Hn(t,w(e,3),s)}function hf(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var s=r-1;return n!==i&&(s=D(n),s=n<0?ut(r+s,0):gt(s,r-1)),Hn(t,w(e,3),s,!0)}function gf(t){var e=t==null?0:t.length;return e?lt(t,1):[]}function Eh(t){var e=t==null?0:t.length;return e?lt(t,Oe):[]}function Rh(t,e){var n=t==null?0:t.length;return n?(e=e===i?1:D(e),lt(t,e)):[]}function Ah(t){for(var e=-1,n=t==null?0:t.length,r={};++e<n;){var s=t[e];r[s[0]]=s[1]}return r}function df(t){return t&&t.length?t[0]:i}function mh(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var s=n==null?0:D(n);return s<0&&(s=ut(r+s,0)),qe(t,e,s)}function yh(t){var e=t==null?0:t.length;return e?Gt(t,0,-1):[]}var wh=F(function(t){var e=Q(t,mi);return e.length&&e[0]===t[0]?di(e):[]}),Oh=F(function(t){var e=Wt(t),n=Q(t,mi);return e===Wt(n)?e=i:n.pop(),n.length&&n[0]===t[0]?di(n,w(e,2)):[]}),xh=F(function(t){var e=Wt(t),n=Q(t,mi);return e=typeof e=="function"?e:i,e&&n.pop(),n.length&&n[0]===t[0]?di(n,i,e):[]});function Lh(t,e){return t==null?"":yl.call(t,e)}function Wt(t){var e=t==null?0:t.length;return e?t[e-1]:i}function Nh(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var s=r;return n!==i&&(s=D(n),s=s<0?ut(r+s,0):gt(s,r-1)),e===e?al(t,e,s):Hn(t,Xu,s,!0)}function Ph(t,e){return t&&t.length?ms(t,D(e)):i}var Dh=F(_f);function _f(t,e){return t&&t.length&&e&&e.length?Ii(t,e):t}function Ch(t,e,n){return t&&t.length&&e&&e.length?Ii(t,e,w(n,2)):t}function Fh(t,e,n){return t&&t.length&&e&&e.length?Ii(t,e,i,n):t}var bh=ae(function(t,e){var n=t==null?0:t.length,r=li(t,e);return Os(t,Q(e,function(s){return le(s,n)?+s:s}).sort(Ms)),r});function Bh(t,e){var n=[];if(!(t&&t.length))return n;var r=-1,s=[],o=t.length;for(e=w(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),s.push(r))}return Os(t,s),n}function Ui(t){return t==null?t:Ll.call(t)}function Mh(t,e,n){var r=t==null?0:t.length;return r?(n&&typeof n!="number"&&vt(t,e,n)?(e=0,n=r):(e=e==null?0:D(e),n=n===i?r:D(n)),Gt(t,e,n)):[]}function Uh(t,e){return fr(t,e)}function Gh(t,e,n){return Ei(t,e,w(n,2))}function Wh(t,e){var n=t==null?0:t.length;if(n){var r=fr(t,e);if(r<n&&Xt(t[r],e))return r}return-1}function Hh(t,e){return fr(t,e,!0)}function qh(t,e,n){return Ei(t,e,w(n,2),!0)}function Yh(t,e){var n=t==null?0:t.length;if(n){var r=fr(t,e,!0)-1;if(Xt(t[r],e))return r}return-1}function zh(t){return t&&t.length?Ls(t):[]}function $h(t,e){return t&&t.length?Ls(t,w(e,2)):[]}function Kh(t){var e=t==null?0:t.length;return e?Gt(t,1,e):[]}function Xh(t,e,n){return t&&t.length?(e=n||e===i?1:D(e),Gt(t,0,e<0?0:e)):[]}function Zh(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===i?1:D(e),e=r-e,Gt(t,e<0?0:e,r)):[]}function Vh(t,e){return t&&t.length?or(t,w(e,3),!1,!0):[]}function Jh(t,e){return t&&t.length?or(t,w(e,3)):[]}var Qh=F(function(t){return Ee(lt(t,1,nt,!0))}),kh=F(function(t){var e=Wt(t);return nt(e)&&(e=i),Ee(lt(t,1,nt,!0),w(e,2))}),jh=F(function(t){var e=Wt(t);return e=typeof e=="function"?e:i,Ee(lt(t,1,nt,!0),i,e)});function tg(t){return t&&t.length?Ee(t):[]}function eg(t,e){return t&&t.length?Ee(t,w(e,2)):[]}function ng(t,e){return e=typeof e=="function"?e:i,t&&t.length?Ee(t,i,e):[]}function Gi(t){if(!(t&&t.length))return[];var e=0;return t=pe(t,function(n){if(nt(n))return e=ut(n.length,e),!0}),ni(e,function(n){return Q(t,jr(n))})}function pf(t,e){if(!(t&&t.length))return[];var n=Gi(t);return e==null?n:Q(n,function(r){return Ot(e,i,r)})}var rg=F(function(t,e){return nt(t)?Tn(t,e):[]}),ig=F(function(t){return Ai(pe(t,nt))}),ug=F(function(t){var e=Wt(t);return nt(e)&&(e=i),Ai(pe(t,nt),w(e,2))}),sg=F(function(t){var e=Wt(t);return e=typeof e=="function"?e:i,Ai(pe(t,nt),i,e)}),fg=F(Gi);function og(t,e){return Cs(t||[],e||[],In)}function ag(t,e){return Cs(t||[],e||[],Rn)}var lg=F(function(t){var e=t.length,n=e>1?t[e-1]:i;return n=typeof n=="function"?(t.pop(),n):i,pf(t,n)});function vf(t){var e=f(t);return e.__chain__=!0,e}function cg(t,e){return e(t),t}function vr(t,e){return e(t)}var hg=ae(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,s=function(o){return li(o,t)};return e>1||this.__actions__.length||!(r instanceof B)||!le(n)?this.thru(s):(r=r.slice(n,+n+(e?1:0)),r.__actions__.push({func:vr,args:[s],thisArg:i}),new Mt(r,this.__chain__).thru(function(o){return e&&!o.length&&o.push(i),o}))});function gg(){return vf(this)}function dg(){return new Mt(this.value(),this.__chain__)}function _g(){this.__values__===i&&(this.__values__=Pf(this.value()));var t=this.__index__>=this.__values__.length,e=t?i:this.__values__[this.__index__++];return{done:t,value:e}}function pg(){return this}function vg(t){for(var e,n=this;n instanceof nr;){var r=lf(n);r.__index__=0,r.__values__=i,e?s.__wrapped__=r:e=r;var s=r;n=n.__wrapped__}return s.__wrapped__=t,e}function Ig(){var t=this.__wrapped__;if(t instanceof B){var e=t;return this.__actions__.length&&(e=new B(this)),e=e.reverse(),e.__actions__.push({func:vr,args:[Ui],thisArg:i}),new Mt(e,this.__chain__)}return this.thru(Ui)}function Tg(){return Ds(this.__wrapped__,this.__actions__)}var Sg=ar(function(t,e,n){$.call(t,n)?++t[n]:fe(t,n,1)});function Eg(t,e,n){var r=N(t)?$u:cc;return n&&vt(t,e,n)&&(e=i),r(t,w(e,3))}function Rg(t,e){var n=N(t)?pe:_s;return n(t,w(e,3))}var Ag=Ys(cf),mg=Ys(hf);function yg(t,e){return lt(Ir(t,e),1)}function wg(t,e){return lt(Ir(t,e),Oe)}function Og(t,e,n){return n=n===i?1:D(n),lt(Ir(t,e),n)}function If(t,e){var n=N(t)?bt:Se;return n(t,w(e,3))}function Tf(t,e){var n=N(t)?Ka:ds;return n(t,w(e,3))}var xg=ar(function(t,e,n){$.call(t,n)?t[n].push(e):fe(t,n,[e])});function Lg(t,e,n,r){t=At(t)?t:tn(t),n=n&&!r?D(n):0;var s=t.length;return n<0&&(n=ut(s+n,0)),Ar(t)?n<=s&&t.indexOf(e,n)>-1:!!s&&qe(t,e,n)>-1}var Ng=F(function(t,e,n){var r=-1,s=typeof e=="function",o=At(t)?p(t.length):[];return Se(t,function(a){o[++r]=s?Ot(e,a,n):Sn(a,e,n)}),o}),Pg=ar(function(t,e,n){fe(t,n,e)});function Ir(t,e){var n=N(t)?Q:Es;return n(t,w(e,3))}function Dg(t,e,n,r){return t==null?[]:(N(e)||(e=e==null?[]:[e]),n=r?i:n,N(n)||(n=n==null?[]:[n]),ys(t,e,n))}var Cg=ar(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});function Fg(t,e,n){var r=N(t)?Qr:Vu,s=arguments.length<3;return r(t,w(e,4),n,s,Se)}function bg(t,e,n){var r=N(t)?Xa:Vu,s=arguments.length<3;return r(t,w(e,4),n,s,ds)}function Bg(t,e){var n=N(t)?pe:_s;return n(t,Er(w(e,3)))}function Mg(t){var e=N(t)?ls:Lc;return e(t)}function Ug(t,e,n){(n?vt(t,e,n):e===i)?e=1:e=D(e);var r=N(t)?sc:Nc;return r(t,e)}function Gg(t){var e=N(t)?fc:Dc;return e(t)}function Wg(t){if(t==null)return 0;if(At(t))return Ar(t)?ze(t):t.length;var e=dt(t);return e==Yt||e==zt?t.size:pi(t).length}function Hg(t,e,n){var r=N(t)?kr:Cc;return n&&vt(t,e,n)&&(e=i),r(t,w(e,3))}var qg=F(function(t,e){if(t==null)return[];var n=e.length;return n>1&&vt(t,e[0],e[1])?e=[]:n>2&&vt(e[0],e[1],e[2])&&(e=[e[0]]),ys(t,lt(e,1),[])}),Tr=Rl||function(){return at.Date.now()};function Yg(t,e){if(typeof e!="function")throw new Bt(R);return t=D(t),function(){if(--t<1)return e.apply(this,arguments)}}function Sf(t,e,n){return e=n?i:e,e=t&&e==null?t.length:e,oe(t,ot,i,i,i,i,e)}function Ef(t,e){var n;if(typeof e!="function")throw new Bt(R);return t=D(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Wi=F(function(t,e,n){var r=_t;if(n.length){var s=Ie(n,ke(Wi));r|=wt}return oe(t,r,e,n,s)}),Rf=F(function(t,e,n){var r=_t|qt;if(n.length){var s=Ie(n,ke(Rf));r|=wt}return oe(e,r,t,n,s)});function Af(t,e,n){e=n?i:e;var r=oe(t,Et,i,i,i,i,i,e);return r.placeholder=Af.placeholder,r}function mf(t,e,n){e=n?i:e;var r=oe(t,Qt,i,i,i,i,i,e);return r.placeholder=mf.placeholder,r}function yf(t,e,n){var r,s,o,a,h,d,I=0,T=!1,E=!1,A=!0;if(typeof t!="function")throw new Bt(R);e=Ht(e)||0,j(n)&&(T=!!n.leading,E="maxWait"in n,o=E?ut(Ht(n.maxWait)||0,e):o,A="trailing"in n?!!n.trailing:A);function y(rt){var Zt=r,ge=s;return r=s=i,I=rt,a=t.apply(ge,Zt),a}function O(rt){return I=rt,h=yn(b,e),T?y(rt):a}function C(rt){var Zt=rt-d,ge=rt-I,zf=e-Zt;return E?gt(zf,o-ge):zf}function x(rt){var Zt=rt-d,ge=rt-I;return d===i||Zt>=e||Zt<0||E&&ge>=o}function b(){var rt=Tr();if(x(rt))return M(rt);h=yn(b,C(rt))}function M(rt){return h=i,A&&r?y(rt):(r=s=i,a)}function Pt(){h!==i&&Fs(h),I=0,r=d=s=h=i}function It(){return h===i?a:M(Tr())}function Dt(){var rt=Tr(),Zt=x(rt);if(r=arguments,s=this,d=rt,Zt){if(h===i)return O(d);if(E)return Fs(h),h=yn(b,e),y(d)}return h===i&&(h=yn(b,e)),a}return Dt.cancel=Pt,Dt.flush=It,Dt}var zg=F(function(t,e){return gs(t,1,e)}),$g=F(function(t,e,n){return gs(t,Ht(e)||0,n)});function Kg(t){return oe(t,we)}function Sr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new Bt(R);var n=function(){var r=arguments,s=e?e.apply(this,r):r[0],o=n.cache;if(o.has(s))return o.get(s);var a=t.apply(this,r);return n.cache=o.set(s,a)||o,a};return n.cache=new(Sr.Cache||se),n}Sr.Cache=se;function Er(t){if(typeof t!="function")throw new Bt(R);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Xg(t){return Ef(2,t)}var Zg=Fc(function(t,e){e=e.length==1&&N(e[0])?Q(e[0],xt(w())):Q(lt(e,1),xt(w()));var n=e.length;return F(function(r){for(var s=-1,o=gt(r.length,n);++s<o;)r[s]=e[s].call(this,r[s]);return Ot(t,this,r)})}),Hi=F(function(t,e){var n=Ie(e,ke(Hi));return oe(t,wt,i,e,n)}),wf=F(function(t,e){var n=Ie(e,ke(wf));return oe(t,kt,i,e,n)}),Vg=ae(function(t,e){return oe(t,k,i,i,i,e)});function Jg(t,e){if(typeof t!="function")throw new Bt(R);return e=e===i?e:D(e),F(t,e)}function Qg(t,e){if(typeof t!="function")throw new Bt(R);return e=e==null?0:ut(D(e),0),F(function(n){var r=n[e],s=Ae(n,0,e);return r&&ve(s,r),Ot(t,this,s)})}function kg(t,e,n){var r=!0,s=!0;if(typeof t!="function")throw new Bt(R);return j(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),yf(t,e,{leading:r,maxWait:e,trailing:s})}function jg(t){return Sf(t,1)}function td(t,e){return Hi(yi(e),t)}function ed(){if(!arguments.length)return[];var t=arguments[0];return N(t)?t:[t]}function nd(t){return Ut(t,ht)}function rd(t,e){return e=typeof e=="function"?e:i,Ut(t,ht,e)}function id(t){return Ut(t,K|ht)}function ud(t,e){return e=typeof e=="function"?e:i,Ut(t,K|ht,e)}function sd(t,e){return e==null||hs(t,e,ft(e))}function Xt(t,e){return t===e||t!==t&&e!==e}var fd=gr(gi),od=gr(function(t,e){return t>=e}),Be=Is((function(){return arguments})())?Is:function(t){return tt(t)&&$.call(t,"callee")&&!is.call(t,"callee")},N=p.isArray,ad=Gu?xt(Gu):vc;function At(t){return t!=null&&Rr(t.length)&&!ce(t)}function nt(t){return tt(t)&&At(t)}function ld(t){return t===!0||t===!1||tt(t)&&pt(t)==un}var me=ml||ki,cd=Wu?xt(Wu):Ic;function hd(t){return tt(t)&&t.nodeType===1&&!wn(t)}function gd(t){if(t==null)return!0;if(At(t)&&(N(t)||typeof t=="string"||typeof t.splice=="function"||me(t)||je(t)||Be(t)))return!t.length;var e=dt(t);if(e==Yt||e==zt)return!t.size;if(mn(t))return!pi(t).length;for(var n in t)if($.call(t,n))return!1;return!0}function dd(t,e){return En(t,e)}function _d(t,e,n){n=typeof n=="function"?n:i;var r=n?n(t,e):i;return r===i?En(t,e,i,n):!!r}function qi(t){if(!tt(t))return!1;var e=pt(t);return e==Fn||e==Uo||typeof t.message=="string"&&typeof t.name=="string"&&!wn(t)}function pd(t){return typeof t=="number"&&ss(t)}function ce(t){if(!j(t))return!1;var e=pt(t);return e==bn||e==gu||e==Mo||e==Wo}function Of(t){return typeof t=="number"&&t==D(t)}function Rr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=_e}function j(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function tt(t){return t!=null&&typeof t=="object"}var xf=Hu?xt(Hu):Sc;function vd(t,e){return t===e||_i(t,e,Di(e))}function Id(t,e,n){return n=typeof n=="function"?n:i,_i(t,e,Di(e),n)}function Td(t){return Lf(t)&&t!=+t}function Sd(t){if(rh(t))throw new L(S);return Ts(t)}function Ed(t){return t===null}function Rd(t){return t==null}function Lf(t){return typeof t=="number"||tt(t)&&pt(t)==fn}function wn(t){if(!tt(t)||pt(t)!=ie)return!1;var e=Vn(t);if(e===null)return!0;var n=$.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&$n.call(n)==Il}var Yi=qu?xt(qu):Ec;function Ad(t){return Of(t)&&t>=-_e&&t<=_e}var Nf=Yu?xt(Yu):Rc;function Ar(t){return typeof t=="string"||!N(t)&&tt(t)&&pt(t)==an}function Nt(t){return typeof t=="symbol"||tt(t)&&pt(t)==Bn}var je=zu?xt(zu):Ac;function md(t){return t===i}function yd(t){return tt(t)&&dt(t)==ln}function wd(t){return tt(t)&&pt(t)==qo}var Od=gr(vi),xd=gr(function(t,e){return t<=e});function Pf(t){if(!t)return[];if(At(t))return Ar(t)?$t(t):Rt(t);if(gn&&t[gn])return sl(t[gn]());var e=dt(t),n=e==Yt?ii:e==zt?qn:tn;return n(t)}function he(t){if(!t)return t===0?t:0;if(t=Ht(t),t===Oe||t===-Oe){var e=t<0?-1:1;return e*Co}return t===t?t:0}function D(t){var e=he(t),n=e%1;return e===e?n?e-n:e:0}function Df(t){return t?De(D(t),0,jt):0}function Ht(t){if(typeof t=="number")return t;if(Nt(t))return Dn;if(j(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=j(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ju(t);var n=aa.test(t);return n||ca.test(t)?Ya(t.slice(2),n?2:8):oa.test(t)?Dn:+t}function Cf(t){return ee(t,mt(t))}function Ld(t){return t?De(D(t),-_e,_e):t===0?t:0}function z(t){return t==null?"":Lt(t)}var Nd=Je(function(t,e){if(mn(e)||At(e)){ee(e,ft(e),t);return}for(var n in e)$.call(e,n)&&In(t,n,e[n])}),Ff=Je(function(t,e){ee(e,mt(e),t)}),mr=Je(function(t,e,n,r){ee(e,mt(e),t,r)}),Pd=Je(function(t,e,n,r){ee(e,ft(e),t,r)}),Dd=ae(li);function Cd(t,e){var n=Ve(t);return e==null?n:cs(n,e)}var Fd=F(function(t,e){t=X(t);var n=-1,r=e.length,s=r>2?e[2]:i;for(s&&vt(e[0],e[1],s)&&(r=1);++n<r;)for(var o=e[n],a=mt(o),h=-1,d=a.length;++h<d;){var I=a[h],T=t[I];(T===i||Xt(T,Ke[I])&&!$.call(t,I))&&(t[I]=o[I])}return t}),bd=F(function(t){return t.push(i,Js),Ot(bf,i,t)});function Bd(t,e){return Ku(t,w(e,3),te)}function Md(t,e){return Ku(t,w(e,3),hi)}function Ud(t,e){return t==null?t:ci(t,w(e,3),mt)}function Gd(t,e){return t==null?t:ps(t,w(e,3),mt)}function Wd(t,e){return t&&te(t,w(e,3))}function Hd(t,e){return t&&hi(t,w(e,3))}function qd(t){return t==null?[]:ur(t,ft(t))}function Yd(t){return t==null?[]:ur(t,mt(t))}function zi(t,e,n){var r=t==null?i:Ce(t,e);return r===i?n:r}function zd(t,e){return t!=null&&js(t,e,gc)}function $i(t,e){return t!=null&&js(t,e,dc)}var $d=$s(function(t,e,n){e!=null&&typeof e.toString!="function"&&(e=Kn.call(e)),t[e]=n},Xi(yt)),Kd=$s(function(t,e,n){e!=null&&typeof e.toString!="function"&&(e=Kn.call(e)),$.call(t,e)?t[e].push(n):t[e]=[n]},w),Xd=F(Sn);function ft(t){return At(t)?as(t):pi(t)}function mt(t){return At(t)?as(t,!0):mc(t)}function Zd(t,e){var n={};return e=w(e,3),te(t,function(r,s,o){fe(n,e(r,s,o),r)}),n}function Vd(t,e){var n={};return e=w(e,3),te(t,function(r,s,o){fe(n,s,e(r,s,o))}),n}var Jd=Je(function(t,e,n){sr(t,e,n)}),bf=Je(function(t,e,n,r){sr(t,e,n,r)}),Qd=ae(function(t,e){var n={};if(t==null)return n;var r=!1;e=Q(e,function(o){return o=Re(o,t),r||(r=o.length>1),o}),ee(t,Ni(t),n),r&&(n=Ut(n,K|St|ht,$c));for(var s=e.length;s--;)Ri(n,e[s]);return n});function kd(t,e){return Bf(t,Er(w(e)))}var jd=ae(function(t,e){return t==null?{}:wc(t,e)});function Bf(t,e){if(t==null)return{};var n=Q(Ni(t),function(r){return[r]});return e=w(e),ws(t,n,function(r,s){return e(r,s[0])})}function t_(t,e,n){e=Re(e,t);var r=-1,s=e.length;for(s||(s=1,t=i);++r<s;){var o=t==null?i:t[ne(e[r])];o===i&&(r=s,o=n),t=ce(o)?o.call(t):o}return t}function e_(t,e,n){return t==null?t:Rn(t,e,n)}function n_(t,e,n,r){return r=typeof r=="function"?r:i,t==null?t:Rn(t,e,n,r)}var Mf=Zs(ft),Uf=Zs(mt);function r_(t,e,n){var r=N(t),s=r||me(t)||je(t);if(e=w(e,4),n==null){var o=t&&t.constructor;s?n=r?new o:[]:j(t)?n=ce(o)?Ve(Vn(t)):{}:n={}}return(s?bt:te)(t,function(a,h,d){return e(n,a,h,d)}),n}function i_(t,e){return t==null?!0:Ri(t,e)}function u_(t,e,n){return t==null?t:Ps(t,e,yi(n))}function s_(t,e,n,r){return r=typeof r=="function"?r:i,t==null?t:Ps(t,e,yi(n),r)}function tn(t){return t==null?[]:ri(t,ft(t))}function f_(t){return t==null?[]:ri(t,mt(t))}function o_(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=Ht(n),n=n===n?n:0),e!==i&&(e=Ht(e),e=e===e?e:0),De(Ht(t),e,n)}function a_(t,e,n){return e=he(e),n===i?(n=e,e=0):n=he(n),t=Ht(t),_c(t,e,n)}function l_(t,e,n){if(n&&typeof n!="boolean"&&vt(t,e,n)&&(e=n=i),n===i&&(typeof e=="boolean"?(n=e,e=i):typeof t=="boolean"&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=he(t),e===i?(e=t,t=0):e=he(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var s=fs();return gt(t+s*(e-t+qa("1e-"+((s+"").length-1))),e)}return Ti(t,e)}var c_=Qe(function(t,e,n){return e=e.toLowerCase(),t+(n?Gf(e):e)});function Gf(t){return Ki(z(t).toLowerCase())}function Wf(t){return t=z(t),t&&t.replace(ga,el).replace(Da,"")}function h_(t,e,n){t=z(t),e=Lt(e);var r=t.length;n=n===i?r:De(D(n),0,r);var s=n;return n-=e.length,n>=0&&t.slice(n,s)==e}function g_(t){return t=z(t),t&&Xo.test(t)?t.replace(pu,nl):t}function d_(t){return t=z(t),t&&jo.test(t)?t.replace(Hr,"\\$&"):t}var __=Qe(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),p_=Qe(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),v_=qs("toLowerCase");function I_(t,e,n){t=z(t),e=D(e);var r=e?ze(t):0;if(!e||r>=e)return t;var s=(e-r)/2;return hr(jn(s),n)+t+hr(kn(s),n)}function T_(t,e,n){t=z(t),e=D(e);var r=e?ze(t):0;return e&&r<e?t+hr(e-r,n):t}function S_(t,e,n){t=z(t),e=D(e);var r=e?ze(t):0;return e&&r<e?hr(e-r,n)+t:t}function E_(t,e,n){return n||e==null?e=0:e&&(e=+e),xl(z(t).replace(qr,""),e||0)}function R_(t,e,n){return(n?vt(t,e,n):e===i)?e=1:e=D(e),Si(z(t),e)}function A_(){var t=arguments,e=z(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var m_=Qe(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});function y_(t,e,n){return n&&typeof n!="number"&&vt(t,e,n)&&(e=n=i),n=n===i?jt:n>>>0,n?(t=z(t),t&&(typeof e=="string"||e!=null&&!Yi(e))&&(e=Lt(e),!e&&Ye(t))?Ae($t(t),0,n):t.split(e,n)):[]}var w_=Qe(function(t,e,n){return t+(n?" ":"")+Ki(e)});function O_(t,e,n){return t=z(t),n=n==null?0:De(D(n),0,t.length),e=Lt(e),t.slice(n,n+e.length)==e}function x_(t,e,n){var r=f.templateSettings;n&&vt(t,e,n)&&(e=i),t=z(t),e=mr({},e,r,Vs);var s=mr({},e.imports,r.imports,Vs),o=ft(s),a=ri(s,o),h,d,I=0,T=e.interpolate||Mn,E="__p += '",A=ui((e.escape||Mn).source+"|"+T.source+"|"+(T===vu?fa:Mn).source+"|"+(e.evaluate||Mn).source+"|$","g"),y="//# sourceURL="+($.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ma+"]")+`
|
|
11
|
-
`;t.replace(A,function(x,b,M,Pt,It,Dt){return M||(M=Pt),E+=t.slice(I,Dt).replace(da,rl),b&&(h=!0,E+=`' +
|
|
12
|
-
__e(`+b+`) +
|
|
13
|
-
'`),It&&(d=!0,E+=`';
|
|
14
|
-
`+It+`;
|
|
15
|
-
__p += '`),M&&(E+=`' +
|
|
16
|
-
((__t = (`+M+`)) == null ? '' : __t) +
|
|
17
|
-
'`),I=Dt+x.length,x}),E+=`';
|
|
18
|
-
`;var O=$.call(e,"variable")&&e.variable;if(!O)E=`with (obj) {
|
|
19
|
-
`+E+`
|
|
20
|
-
}
|
|
21
|
-
`;else if(ua.test(O))throw new L(P);E=(d?E.replace(Yo,""):E).replace(zo,"$1").replace($o,"$1;"),E="function("+(O||"obj")+`) {
|
|
22
|
-
`+(O?"":`obj || (obj = {});
|
|
23
|
-
`)+"var __t, __p = ''"+(h?", __e = _.escape":"")+(d?`, __j = Array.prototype.join;
|
|
24
|
-
function print() { __p += __j.call(arguments, '') }
|
|
25
|
-
`:`;
|
|
26
|
-
`)+E+`return __p
|
|
27
|
-
}`;var C=qf(function(){return G(o,y+"return "+E).apply(i,a)});if(C.source=E,qi(C))throw C;return C}function L_(t){return z(t).toLowerCase()}function N_(t){return z(t).toUpperCase()}function P_(t,e,n){if(t=z(t),t&&(n||e===i))return Ju(t);if(!t||!(e=Lt(e)))return t;var r=$t(t),s=$t(e),o=Qu(r,s),a=ku(r,s)+1;return Ae(r,o,a).join("")}function D_(t,e,n){if(t=z(t),t&&(n||e===i))return t.slice(0,ts(t)+1);if(!t||!(e=Lt(e)))return t;var r=$t(t),s=ku(r,$t(e))+1;return Ae(r,0,s).join("")}function C_(t,e,n){if(t=z(t),t&&(n||e===i))return t.replace(qr,"");if(!t||!(e=Lt(e)))return t;var r=$t(t),s=Qu(r,$t(e));return Ae(r,s).join("")}function F_(t,e){var n=Pn,r=Pr;if(j(e)){var s="separator"in e?e.separator:s;n="length"in e?D(e.length):n,r="omission"in e?Lt(e.omission):r}t=z(t);var o=t.length;if(Ye(t)){var a=$t(t);o=a.length}if(n>=o)return t;var h=n-ze(r);if(h<1)return r;var d=a?Ae(a,0,h).join(""):t.slice(0,h);if(s===i)return d+r;if(a&&(h+=d.length-h),Yi(s)){if(t.slice(h).search(s)){var I,T=d;for(s.global||(s=ui(s.source,z(Iu.exec(s))+"g")),s.lastIndex=0;I=s.exec(T);)var E=I.index;d=d.slice(0,E===i?h:E)}}else if(t.indexOf(Lt(s),h)!=h){var A=d.lastIndexOf(s);A>-1&&(d=d.slice(0,A))}return d+r}function b_(t){return t=z(t),t&&Ko.test(t)?t.replace(_u,ll):t}var B_=Qe(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ki=qs("toUpperCase");function Hf(t,e,n){return t=z(t),e=n?i:e,e===i?ul(t)?gl(t):Ja(t):t.match(e)||[]}var qf=F(function(t,e){try{return Ot(t,i,e)}catch(n){return qi(n)?n:new L(n)}}),M_=ae(function(t,e){return bt(e,function(n){n=ne(n),fe(t,n,Wi(t[n],t))}),t});function U_(t){var e=t==null?0:t.length,n=w();return t=e?Q(t,function(r){if(typeof r[1]!="function")throw new Bt(R);return[n(r[0]),r[1]]}):[],F(function(r){for(var s=-1;++s<e;){var o=t[s];if(Ot(o[0],this,r))return Ot(o[1],this,r)}})}function G_(t){return lc(Ut(t,K))}function Xi(t){return function(){return t}}function W_(t,e){return t==null||t!==t?e:t}var H_=zs(),q_=zs(!0);function yt(t){return t}function Zi(t){return Ss(typeof t=="function"?t:Ut(t,K))}function Y_(t){return Rs(Ut(t,K))}function z_(t,e){return As(t,Ut(e,K))}var $_=F(function(t,e){return function(n){return Sn(n,t,e)}}),K_=F(function(t,e){return function(n){return Sn(t,n,e)}});function Vi(t,e,n){var r=ft(e),s=ur(e,r);n==null&&!(j(e)&&(s.length||!r.length))&&(n=e,e=t,t=this,s=ur(e,ft(e)));var o=!(j(n)&&"chain"in n)||!!n.chain,a=ce(t);return bt(s,function(h){var d=e[h];t[h]=d,a&&(t.prototype[h]=function(){var I=this.__chain__;if(o||I){var T=t(this.__wrapped__),E=T.__actions__=Rt(this.__actions__);return E.push({func:d,args:arguments,thisArg:t}),T.__chain__=I,T}return d.apply(t,ve([this.value()],arguments))})}),t}function X_(){return at._===this&&(at._=Tl),this}function Ji(){}function Z_(t){return t=D(t),F(function(e){return ms(e,t)})}var V_=Oi(Q),J_=Oi($u),Q_=Oi(kr);function Yf(t){return Fi(t)?jr(ne(t)):Oc(t)}function k_(t){return function(e){return t==null?i:Ce(t,e)}}var j_=Ks(),tp=Ks(!0);function Qi(){return[]}function ki(){return!1}function ep(){return{}}function np(){return""}function rp(){return!0}function ip(t,e){if(t=D(t),t<1||t>_e)return[];var n=jt,r=gt(t,jt);e=w(e),t-=jt;for(var s=ni(r,e);++n<t;)e(n);return s}function up(t){return N(t)?Q(t,ne):Nt(t)?[t]:Rt(af(z(t)))}function sp(t){var e=++vl;return z(t)+e}var fp=cr(function(t,e){return t+e},0),op=xi("ceil"),ap=cr(function(t,e){return t/e},1),lp=xi("floor");function cp(t){return t&&t.length?ir(t,yt,gi):i}function hp(t,e){return t&&t.length?ir(t,w(e,2),gi):i}function gp(t){return Zu(t,yt)}function dp(t,e){return Zu(t,w(e,2))}function _p(t){return t&&t.length?ir(t,yt,vi):i}function pp(t,e){return t&&t.length?ir(t,w(e,2),vi):i}var vp=cr(function(t,e){return t*e},1),Ip=xi("round"),Tp=cr(function(t,e){return t-e},0);function Sp(t){return t&&t.length?ei(t,yt):0}function Ep(t,e){return t&&t.length?ei(t,w(e,2)):0}return f.after=Yg,f.ary=Sf,f.assign=Nd,f.assignIn=Ff,f.assignInWith=mr,f.assignWith=Pd,f.at=Dd,f.before=Ef,f.bind=Wi,f.bindAll=M_,f.bindKey=Rf,f.castArray=ed,f.chain=vf,f.chunk=lh,f.compact=ch,f.concat=hh,f.cond=U_,f.conforms=G_,f.constant=Xi,f.countBy=Sg,f.create=Cd,f.curry=Af,f.curryRight=mf,f.debounce=yf,f.defaults=Fd,f.defaultsDeep=bd,f.defer=zg,f.delay=$g,f.difference=gh,f.differenceBy=dh,f.differenceWith=_h,f.drop=ph,f.dropRight=vh,f.dropRightWhile=Ih,f.dropWhile=Th,f.fill=Sh,f.filter=Rg,f.flatMap=yg,f.flatMapDeep=wg,f.flatMapDepth=Og,f.flatten=gf,f.flattenDeep=Eh,f.flattenDepth=Rh,f.flip=Kg,f.flow=H_,f.flowRight=q_,f.fromPairs=Ah,f.functions=qd,f.functionsIn=Yd,f.groupBy=xg,f.initial=yh,f.intersection=wh,f.intersectionBy=Oh,f.intersectionWith=xh,f.invert=$d,f.invertBy=Kd,f.invokeMap=Ng,f.iteratee=Zi,f.keyBy=Pg,f.keys=ft,f.keysIn=mt,f.map=Ir,f.mapKeys=Zd,f.mapValues=Vd,f.matches=Y_,f.matchesProperty=z_,f.memoize=Sr,f.merge=Jd,f.mergeWith=bf,f.method=$_,f.methodOf=K_,f.mixin=Vi,f.negate=Er,f.nthArg=Z_,f.omit=Qd,f.omitBy=kd,f.once=Xg,f.orderBy=Dg,f.over=V_,f.overArgs=Zg,f.overEvery=J_,f.overSome=Q_,f.partial=Hi,f.partialRight=wf,f.partition=Cg,f.pick=jd,f.pickBy=Bf,f.property=Yf,f.propertyOf=k_,f.pull=Dh,f.pullAll=_f,f.pullAllBy=Ch,f.pullAllWith=Fh,f.pullAt=bh,f.range=j_,f.rangeRight=tp,f.rearg=Vg,f.reject=Bg,f.remove=Bh,f.rest=Jg,f.reverse=Ui,f.sampleSize=Ug,f.set=e_,f.setWith=n_,f.shuffle=Gg,f.slice=Mh,f.sortBy=qg,f.sortedUniq=zh,f.sortedUniqBy=$h,f.split=y_,f.spread=Qg,f.tail=Kh,f.take=Xh,f.takeRight=Zh,f.takeRightWhile=Vh,f.takeWhile=Jh,f.tap=cg,f.throttle=kg,f.thru=vr,f.toArray=Pf,f.toPairs=Mf,f.toPairsIn=Uf,f.toPath=up,f.toPlainObject=Cf,f.transform=r_,f.unary=jg,f.union=Qh,f.unionBy=kh,f.unionWith=jh,f.uniq=tg,f.uniqBy=eg,f.uniqWith=ng,f.unset=i_,f.unzip=Gi,f.unzipWith=pf,f.update=u_,f.updateWith=s_,f.values=tn,f.valuesIn=f_,f.without=rg,f.words=Hf,f.wrap=td,f.xor=ig,f.xorBy=ug,f.xorWith=sg,f.zip=fg,f.zipObject=og,f.zipObjectDeep=ag,f.zipWith=lg,f.entries=Mf,f.entriesIn=Uf,f.extend=Ff,f.extendWith=mr,Vi(f,f),f.add=fp,f.attempt=qf,f.camelCase=c_,f.capitalize=Gf,f.ceil=op,f.clamp=o_,f.clone=nd,f.cloneDeep=id,f.cloneDeepWith=ud,f.cloneWith=rd,f.conformsTo=sd,f.deburr=Wf,f.defaultTo=W_,f.divide=ap,f.endsWith=h_,f.eq=Xt,f.escape=g_,f.escapeRegExp=d_,f.every=Eg,f.find=Ag,f.findIndex=cf,f.findKey=Bd,f.findLast=mg,f.findLastIndex=hf,f.findLastKey=Md,f.floor=lp,f.forEach=If,f.forEachRight=Tf,f.forIn=Ud,f.forInRight=Gd,f.forOwn=Wd,f.forOwnRight=Hd,f.get=zi,f.gt=fd,f.gte=od,f.has=zd,f.hasIn=$i,f.head=df,f.identity=yt,f.includes=Lg,f.indexOf=mh,f.inRange=a_,f.invoke=Xd,f.isArguments=Be,f.isArray=N,f.isArrayBuffer=ad,f.isArrayLike=At,f.isArrayLikeObject=nt,f.isBoolean=ld,f.isBuffer=me,f.isDate=cd,f.isElement=hd,f.isEmpty=gd,f.isEqual=dd,f.isEqualWith=_d,f.isError=qi,f.isFinite=pd,f.isFunction=ce,f.isInteger=Of,f.isLength=Rr,f.isMap=xf,f.isMatch=vd,f.isMatchWith=Id,f.isNaN=Td,f.isNative=Sd,f.isNil=Rd,f.isNull=Ed,f.isNumber=Lf,f.isObject=j,f.isObjectLike=tt,f.isPlainObject=wn,f.isRegExp=Yi,f.isSafeInteger=Ad,f.isSet=Nf,f.isString=Ar,f.isSymbol=Nt,f.isTypedArray=je,f.isUndefined=md,f.isWeakMap=yd,f.isWeakSet=wd,f.join=Lh,f.kebabCase=__,f.last=Wt,f.lastIndexOf=Nh,f.lowerCase=p_,f.lowerFirst=v_,f.lt=Od,f.lte=xd,f.max=cp,f.maxBy=hp,f.mean=gp,f.meanBy=dp,f.min=_p,f.minBy=pp,f.stubArray=Qi,f.stubFalse=ki,f.stubObject=ep,f.stubString=np,f.stubTrue=rp,f.multiply=vp,f.nth=Ph,f.noConflict=X_,f.noop=Ji,f.now=Tr,f.pad=I_,f.padEnd=T_,f.padStart=S_,f.parseInt=E_,f.random=l_,f.reduce=Fg,f.reduceRight=bg,f.repeat=R_,f.replace=A_,f.result=t_,f.round=Ip,f.runInContext=g,f.sample=Mg,f.size=Wg,f.snakeCase=m_,f.some=Hg,f.sortedIndex=Uh,f.sortedIndexBy=Gh,f.sortedIndexOf=Wh,f.sortedLastIndex=Hh,f.sortedLastIndexBy=qh,f.sortedLastIndexOf=Yh,f.startCase=w_,f.startsWith=O_,f.subtract=Tp,f.sum=Sp,f.sumBy=Ep,f.template=x_,f.times=ip,f.toFinite=he,f.toInteger=D,f.toLength=Df,f.toLower=L_,f.toNumber=Ht,f.toSafeInteger=Ld,f.toString=z,f.toUpper=N_,f.trim=P_,f.trimEnd=D_,f.trimStart=C_,f.truncate=F_,f.unescape=b_,f.uniqueId=sp,f.upperCase=B_,f.upperFirst=Ki,f.each=If,f.eachRight=Tf,f.first=df,Vi(f,(function(){var t={};return te(f,function(e,n){$.call(f.prototype,n)||(t[n]=e)}),t})(),{chain:!1}),f.VERSION=l,bt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){f[t].placeholder=f}),bt(["drop","take"],function(t,e){B.prototype[t]=function(n){n=n===i?1:ut(D(n),0);var r=this.__filtered__&&!e?new B(this):this.clone();return r.__filtered__?r.__takeCount__=gt(n,r.__takeCount__):r.__views__.push({size:gt(n,jt),type:t+(r.__dir__<0?"Right":"")}),r},B.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),bt(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==hu||n==Do;B.prototype[t]=function(s){var o=this.clone();return o.__iteratees__.push({iteratee:w(s,3),type:n}),o.__filtered__=o.__filtered__||r,o}}),bt(["head","last"],function(t,e){var n="take"+(e?"Right":"");B.prototype[t]=function(){return this[n](1).value()[0]}}),bt(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");B.prototype[t]=function(){return this.__filtered__?new B(this):this[n](1)}}),B.prototype.compact=function(){return this.filter(yt)},B.prototype.find=function(t){return this.filter(t).head()},B.prototype.findLast=function(t){return this.reverse().find(t)},B.prototype.invokeMap=F(function(t,e){return typeof t=="function"?new B(this):this.map(function(n){return Sn(n,t,e)})}),B.prototype.reject=function(t){return this.filter(Er(w(t)))},B.prototype.slice=function(t,e){t=D(t);var n=this;return n.__filtered__&&(t>0||e<0)?new B(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(e=D(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},B.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},B.prototype.toArray=function(){return this.take(jt)},te(B.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),s=f[r?"take"+(e=="last"?"Right":""):e],o=r||/^find/.test(e);s&&(f.prototype[e]=function(){var a=this.__wrapped__,h=r?[1]:arguments,d=a instanceof B,I=h[0],T=d||N(a),E=function(b){var M=s.apply(f,ve([b],h));return r&&A?M[0]:M};T&&n&&typeof I=="function"&&I.length!=1&&(d=T=!1);var A=this.__chain__,y=!!this.__actions__.length,O=o&&!A,C=d&&!y;if(!o&&T){a=C?a:new B(this);var x=t.apply(a,h);return x.__actions__.push({func:vr,args:[E],thisArg:i}),new Mt(x,A)}return O&&C?t.apply(this,h):(x=this.thru(E),O?r?x.value()[0]:x.value():x)})}),bt(["pop","push","shift","sort","splice","unshift"],function(t){var e=Yn[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);f.prototype[t]=function(){var s=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(N(o)?o:[],s)}return this[n](function(a){return e.apply(N(a)?a:[],s)})}}),te(B.prototype,function(t,e){var n=f[e];if(n){var r=n.name+"";$.call(Ze,r)||(Ze[r]=[]),Ze[r].push({name:e,func:n})}}),Ze[lr(i,qt).name]=[{name:"wrapper",func:i}],B.prototype.clone=bl,B.prototype.reverse=Bl,B.prototype.value=Ml,f.prototype.at=hg,f.prototype.chain=gg,f.prototype.commit=dg,f.prototype.next=_g,f.prototype.plant=vg,f.prototype.reverse=Ig,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=Tg,f.prototype.first=f.prototype.head,gn&&(f.prototype[gn]=pg),f}),$e=dl();xe?((xe.exports=$e)._=$e,Zr._=$e):at._=$e}).call(eo)})(en,en.exports)),en.exports}var Tt=no();function nn(c){return c.toLowerCase().replace(/[^\w\d]+/g,"")}function yr(c,u){const i=new RegExp(/"(.*?)"/g);let l=u,_=[],S,R=!1;for(;(S=i.exec(u))!==null&&R===!1;){const Y=nn(String(S[1])),K=ro(c,Y);K===void 0?R=!0:(_=_.concat(K),l=l.replace(S[0],""))}if(R)return;const P=nn(l),U=io(c,P);return U===void 0?void 0:(_=_.concat(U),_.sort((Y,K)=>Y-K))}function ro(c,u){if(c.length<u.length)return;const i=c.indexOf(u);if(i!==-1)return Tt.range(i,i+u.length).map(l=>l)}function io(c,u){if(c.length<u.length)return;const i=Array.from(u),l=[];let _=c,S=0,R=!1;for(const P of i){const U=_.indexOf(P);if(U===-1&&(R=!0),R===!1){l.push(S+U);const q=U+1;S+=q,_=_.substring(q)}}if(!R)return l}class wr{#t;constructor(u){this.source=u;const i=wr.composeTransformedHaystackSegments(u);this.#t=i,this.transformed=i.map(l=>l.value).join("").toLowerCase()}getSourceCharacterIndex(u){let i=0;return this.#t.reduce((l,_)=>{if(l!==1/0)return l;const S=i+_.value.length;if(u>=i&&u<=S){const R=u-i;l=_.index+R}return i+=_.value.length,l},1/0)}static composeTransformedHaystackSegments(u){const i=u.matchAll(/[\w\d]+/g),l=[];for(const _ of i)l.push({value:_[0],index:_.index,length:_[0].length});return l}}function uo(c,u){return(Array.isArray(c)?c:[c]).map(_=>new wr(_)).reduce((_,S)=>{if(_!==void 0)return _;const R=yr(S.transformed,u);if(R===void 0)return _;const P=so(R,S.transformed),U=fo(S,P);return oo(U)},void 0)}function so(c,u){const i=[...c],l=[];let _=0;for(;i.length>0&&_<100;){const S=i.at(0);if(S===void 0)throw new Error("Should never get here");let R=1;for(let Y=1;Y<=i.length;Y+=1){const K=i.at(Y);K!==void 0&&S+Y===K&&(R+=1)}const P=S,U=S+R,q=u.substring(P,U);l.push({index:P,value:q,is_match:!0,length:q.length}),i.splice(0,R),_+=1}return l}function fo(c,u){return u.reduce((i,l,_)=>{if(_===0&&l.index!==0){const q=c.source.substring(0,c.getSourceCharacterIndex(l.index));i.push({index:0,value:q,is_match:!1,length:q.length})}const S=c.getSourceCharacterIndex(l.index),R=c.getSourceCharacterIndex(l.index+l.length),P=c.source.substring(S,R);i.push({index:S,value:P,is_match:!0,length:P.length});const U=u.at(_+1);if(U){const q=c.getSourceCharacterIndex(l.index+l.length),Y=c.getSourceCharacterIndex(U.index),K=c.source.substring(q,Y);i.push({index:q,value:K,is_match:!1,length:K.length})}else if(S+P.length!==c.source.length){const q=S+P.length,Y=c.source.substring(q);i.push({index:q,value:Y,is_match:!1,length:Y.length})}return i},[])}function oo(c){const u=/\S/,i=[...c];return i.forEach((l,_)=>{if(l.is_match){const S=l.value.search(u);if(S!==0){const R=i.at(_-1);R&&(R.length+=S,R.value+=l.value.substring(0,S),l.value=l.value.substring(S),l.index=l.index+S)}}}),i}function ao(c,u){return(Array.isArray(c)?c:[c]).some(l=>{const _=nn(l);return yr(_,u)!==void 0})}function su({needle:c,haystack:u,Match:i="mark",Miss:l}){const _=Ct.useMemo(()=>uo(u,c),[u,c]);return _===void 0?u:_.map((S,R)=>{const P=[S.value,R].join();return S.is_match?typeof i=="string"?ct.jsx(i,{"data-is-match":S.is_match,children:S.value},P):ct.jsx(i,{"data-is-match":S.is_match,segment:S,segmentIndex:R},P):l!==void 0?typeof l=="string"?ct.jsx(l,{"data-is-match":S.is_match,children:S.value},P):ct.jsx(l,{"data-is-match":S.is_match,segment:S,segmentIndex:R},P):S.value})}function lo({Match:c="mark",Miss:u,children:i}){const l=ye();return l.search.hasSearchTerm===!1?i:ct.jsx(su,{needle:l.search.searchTerm,haystack:i,Match:c,Miss:u})}const Z={INIT:"init",FIRST_USER_INTERACTION:"firstUserInteraction",READY:"ready",CHANGE:"change",SET_ITEMS:"setItems",SET_IS_LOADING:"setIsLoading",SET_IS_DISABLED:"setIsDisabled",SET_CONTEXT:"setContext",SET_SEARCH_TERM:"setSearchTerm",RESET_SEARCH_TERM:"resetSearchTerm",SET_FILTER:"setFilter",RESET_FILTERS:"resetFilters",SET_SORT_BY:"setSortBy",SET_SORT_BY_DIRECTION:"setSortDirection",SET_GROUP_BY:"setGroupBy",SET_GROUP_SORT_BY_DIRECTION:"setGroupBySortDirection",SET_PAGE:"setPage",SET_NUM_ITEMS_PER_PAGE:"setNumItemsPerPage",SYNC_UPDATED_AT:"syncUpdatedAt"},st={CORE:"core",SEARCH:"search",FILTERS:"filters",GROUP_BY:"groupBy",SORT_BY:"sortBy",PAGINATION:"pagination"},W={RULE_NOT_FOUND:"Finder could not locate requested rule",WRONG_RULE_TYPE_FOR_MIXIN:"The requested rule is not valid for this mixin.",NO_SEARCH_RULE_SET:"Unable to set search term; no SearchRule was found.",INVALID_SEARCH_TERM_TYPE:"Search terms must be strings.",NO_MATCHING_OPTION_FOUND_WITH_STRICT_OPTIONS:"Finder could not find a matching option with the passed value could be found. If this is intended, set 'strictOptions:false' in the rule definition.",SETTING_MULTIPLE_FILTER_WITHOUT_ARRAY:"Finder could not set this filter value, as the rule requires an array.",ADDING_OPTION_TO_MULTIPLE_FILTER_WITHOUT_OPTION_VALUE:"Finder could not add to this filter, as no optionValue was passed.",DELETING_OPTION_VALUE_FROM_NON_MULTIPLE_FILTER:"Finder could not delete an option from this filter, as it does not support multiple values.",SETTING_BOOLEAN_FILTER_WITHOUT_BOOLEAN_VALUE:"Finder could not set this filter value, as the rule requires a boolean.",ADDING_OPTION_VALUE_TO_NON_MULTIPLE_FILTER:"Finder could not add to this filter value, as the rule is a boolean.",TOGGLING_OPTION_ON_RULE_WITH_NO_OPTIONS:"Finder could not toggle this filter rule option, as the filter does not have any options.",TOGGLING_OPTION_ON_RULE_WITH_SINGLE_VALUE:"Finder could not toggle this filter rule option, as the rule does not allow multiple values.",TOGGLING_OPTION_THAT_DOES_NOT_EXIST:"Finder could not toggle this filter rule option, as the option was not found.",TOGGLING_OPTION_WITHOUT_PASSING_OPTION:"Finder could not toggle this filter rule option, as the option was not found.",TOGGLING_BOOLEAN_FILTER_WITH_UNUSED_VALUE:"Finder could not toggle this filter rule option, as boolean filters do not have options.",TESTING_OPTIONS_ON_RULE_WITH_NO_OPTIONS:"Finder was unable to test the options for this filter rule. It must be a boolean or have defined options.",INVALID_RULE_WITHOUT_ID:"Init failed: Missing rule id.",INVALID_RULE_SHAPE:"Init failed: Malformed rule definition",INVALID_RULE_DUPLICATE:"Init failed: Duplicate rule id."};class H extends Error{constructor(u,i){const l=`${u} ${JSON.stringify({...i})}`;super(l),this.name="FinderError"}}function co(c,u){const i=c.length/u.length;let l=1,_=1,S=0;for(let R=0;R<c.length;R+=1)S!==void 0&&c.at(R)===S+1&&(_+=1,_>=l&&(l=_)),S=c.at(R);return{percentOfHaystackMatched:i,longestSequentialSequence:l}}function ho(c,u,i){const l=u.reduce((R,P)=>{if(c.rule?.searchFn===void 0)return R;const U=c.rule.searchFn(P,i),Y=(Array.isArray(U)?U.map(nn):[nn(U)]).reduce((K,St)=>{const ht=yr(St,c.searchTerm);return ht!==void 0&&K.push(co(ht,St)),K},[]);if(Y.length>0){const St=Tt.orderBy(Y,["percentOfHaystackMatched","longestSequentialSequence"],["desc","asc"]).at(0);St&&R.push({item:P,score:St})}return R},[]),_=l.reduce((R,P)=>(P.score.longestSequentialSequence>R&&(R=P.score.longestSequentialSequence),R),0);return Tt.orderBy(l,[R=>{const P=R.score.percentOfHaystackMatched*100,U=R.score.longestSequentialSequence/_*100;return P+U}],["desc"]).map(R=>R.item)}function Or(c){return typeof c=="object"&&c!==null&&"sortFn"in c}function xn(c){return typeof c=="object"&&c!==null&&"searchFn"in c}function Ue(c){return typeof c=="object"&&c!==null&&"filterFn"in c}function Ln(c){return Ue(c)&&typeof c.options!="function"}function xr(c){return typeof c=="object"&&c!==null&&"groupFn"in c}function go(c){return typeof c=="object"&&c!==null&&("rules"in c||"callback"in c)}function _o(c){return typeof c=="object"&&c!==null&&("haystack"in c||"callback"in c)}function po(c){return Ue(c)&&c.boolean===!0}function vo(c){return Ue(c)&&c.multiple===!0}function Io(c){return Ue(c)&&c.multiple!==!0&&c.boolean!==!0}class fu{#t;constructor({initialSearchTerm:u},i){if(u&&i.getRuleBook().rules.find(xn)===void 0)throw new H(W.NO_SEARCH_RULE_SET);this.searchTerm=u??"",this.#t=i}get rule(){return this.#t.getRuleBook().rules.find(xn)}get hasSearchRule(){return this.rule!==void 0}get hasSearchTerm(){return this.searchTerm!==""}setSearchTerm(u){const i=this.rule;if(!i)throw new H(W.NO_SEARCH_RULE_SET);if(typeof u!="string")throw new H(W.INVALID_SEARCH_TERM_TYPE);if(this.#t.isDisabled())return;const l=this.searchTerm;this.searchTerm=u,l!==u&&this.#t.debouncer(i,()=>{this.#t.touch({source:st.SEARCH,event:Z.SET_SEARCH_TERM,current:u,initial:l,rule:i})})}reset(){if(this.#t.isDisabled())return;const u=this.searchTerm;this.searchTerm="",this.#t.touch({source:st.SEARCH,event:Z.RESET_SEARCH_TERM,current:"",initial:u,rule:this.rule})}serialize(){return{searchTerm:this.searchTerm,rule:this.rule}}test(u,i=!1){return this.#t.test({search:{searchTerm:u,rule:this.rule}},i)}static process(u,i,l){if(u.rule===void 0)throw new H(W.NO_SEARCH_RULE_SET);return u.searchTerm===""?i:ho(u,i,l)}}function To(c){return{validate(u){if(u!==void 0&&typeof u!="boolean")throw new H(W.SETTING_BOOLEAN_FILTER_WITHOUT_BOOLEAN_VALUE,{rule:c,value:u});return!0},parse(u){return typeof u!="boolean"&&u!==void 0?!1:u===void 0?c.required?!0:c.defaultValue!==void 0?c.defaultValue:!1:u},has(u){return this.parse(u)},toggle(u,i){const l=this.parse(u);if(typeof l!="boolean")throw new H(W.SETTING_BOOLEAN_FILTER_WITHOUT_BOOLEAN_VALUE,{rule:c,value:l,optionValue:i});return!l},add(u,i){throw new H(W.ADDING_OPTION_VALUE_TO_NON_MULTIPLE_FILTER,{rule:c,value:u,optionValue:i})},delete(u,i){if(i!==void 0)throw new H(W.DELETING_OPTION_VALUE_FROM_NON_MULTIPLE_FILTER,{rule:c,value:u,optionValue:i})},isActive(u){return c.required?!0:this.parse(u)===!0},isMatch(u,i,l){return c.filterFn(u,i,l)}}}function So(c){return{validate(u){if(u!==void 0&&Array.isArray(u)===!1)throw new H(W.SETTING_MULTIPLE_FILTER_WITHOUT_ARRAY,{rule:c,value:u});if(c.strictOptions&&Array.isArray(c.options)&&Array.isArray(u)&&u.every(l=>c.options?.some(_=>_.value===l))===!1)throw new H(W.NO_MATCHING_OPTION_FOUND_WITH_STRICT_OPTIONS,{rule:c,value:u});return!0},parse(u){if(u===void 0)return c.required&&Array.isArray(c.options)&&c.options.length>0?[c.options.at(0)?.value]:[];if(Array.isArray(u))return u;throw new H(W.SETTING_MULTIPLE_FILTER_WITHOUT_ARRAY,{rule:c,value:u})},has(u,i){if(i===void 0)return Array.isArray(u)&&u.length>0;if(Array.isArray(i))return i.every(_=>this.has(c,_));const l=c.options?.find(_=>typeof i=="object"&&"value"in i?_.value===i.value:_.value===i);return Array.isArray(u)&&l!==void 0&&u.includes(l.value)},toggle(u,i){const l=this.parse(u);if(Array.isArray(l)===!1)throw new H(W.SETTING_MULTIPLE_FILTER_WITHOUT_ARRAY,{rule:c,value:l});if(i===void 0)throw new H(W.TOGGLING_OPTION_WITHOUT_PASSING_OPTION,{rule:c});if(c.options===void 0)throw new H(W.TOGGLING_OPTION_ON_RULE_WITH_NO_OPTIONS,{rule:c,optionValue:i});const _=c.options.find(S=>typeof i=="object"&&"value"in i?S.value===i.value:S.value===i);if(_===void 0)throw new H(W.TOGGLING_OPTION_THAT_DOES_NOT_EXIST,{rule:c,optionValue:i});return l.includes(_.value)?[...l.filter(S=>S!==_.value)]:[...l,_.value]},add(u,i){const l=this.parse(u);if(i===void 0)throw new H(W.ADDING_OPTION_TO_MULTIPLE_FILTER_WITHOUT_OPTION_VALUE,{rule:c,optionValue:i});const _=c.options?.find(S=>typeof i=="object"&&"value"in i?S.value===i.value:S.value===i);return _!==void 0?l.includes(_.value)===!1?[...l,_.value]:l:[...l,i]},delete(u,i){if(i===void 0)return;const l=this.parse(u),_=c.options?.find(S=>typeof i=="object"&&"value"in i?S.value===i.value:S.value===i);return _!==void 0&&l.includes(_.value)?l.filter(S=>S!==_.value):l.filter(S=>S!==i)},isActive(u){return c.required?!0:this.parse(u).length>0},isMatch(u,i,l){return Array.isArray(i)?i.some(_=>c.filterFn(u,_,l)):!1}}}function Eo(c){return{validate(u){if(c.strictOptions&&Array.isArray(c.options)&&c.options.find(l=>l.value===u)===void 0)throw new H(W.NO_MATCHING_OPTION_FOUND_WITH_STRICT_OPTIONS,{rule:c,value:u});return!0},parse(u){if(u===void 0&&c.required){if(c.defaultValue)return c.defaultValue;if(Array.isArray(c.options)&&c.options.length>0)return c.options.at(0)?.value}return u},has(u){return u!==void 0},toggle(u,i){throw new H(W.TOGGLING_OPTION_ON_RULE_WITH_SINGLE_VALUE,{rule:c,value:u,optionValue:i})},add(u,i){throw new H(W.ADDING_OPTION_VALUE_TO_NON_MULTIPLE_FILTER,{rule:c,value:u,optionValue:i})},delete(u,i){if(i!==void 0)throw new H(W.DELETING_OPTION_VALUE_FROM_NON_MULTIPLE_FILTER,{rule:c,value:u,optionValue:i})},isActive(u){return c.required?!0:!(u===void 0||typeof u=="string"&&u.trim()==="")},isMatch(u,i,l){return c.filterFn(u,i,l)}}}function Vt(c){if(vo(c))return So(c);if(po(c))return To(c);if(Io(c))return Eo(c);throw new H(W.INVALID_RULE_SHAPE,{definition:c})}class ou{#t;#e;constructor({initialFilters:u},i){this.#t=u??{},this.#e=i}set(u,i){if(this.#e.isDisabled())return;const l=this.getRule(u),_=this.get(u),R=typeof i=="string"&&i.trim()===""?void 0:i;Vt(l).validate(i),!(this.#t[l.id]!==void 0&&this.#t[l.id]===R)&&this.#e.debouncer(l,()=>{this.#t={...this.#t,[l.id]:R},this.#e.touch({source:st.FILTERS,event:Z.SET_FILTER,current:R,initial:_,rule:l})})}get rules(){return this.#e.getRuleBook().rules.filter(Ln)}get activeRules(){return this.rules.filter(u=>Vt(u).isActive(this.#t[u.id]))}get(u){const i=this.getRule(u),l=this.#t[i.id];return Vt(i).parse(l)}has(u,i){const l=this.getRule(u),_=this.#t[l.id];return Vt(l).has(_,i)}getRule(u){const i=this.#e.getRuleBook().getRule(u);if(!Ln(i))throw new H(W.WRONG_RULE_TYPE_FOR_MIXIN,{rule:i});return i}add(u,i){const l=this.getRule(u),_=this.#t[l.id];this.set(l,Vt(l).add(_,i))}delete(u,i){const l=this.getRule(u),_=this.#t[l.id];this.set(l,Vt(l).delete(_,i))}toggle(u,i){const l=this.getRule(u),_=this.#t[l.id];if(l.boolean&&i!==void 0)throw new H(W.TOGGLING_BOOLEAN_FILTER_WITH_UNUSED_VALUE,{rule:l,value:_});const S=Vt(l).toggle(_,i);this.set(l,S)}reset(){const u=this.values;this.#t={},this.#e.touch({source:st.FILTERS,event:Z.RESET_FILTERS,current:this.values,initial:u})}isRuleActive(u){const i=this.getRule(u),l=this.#t[i.id];return Vt(i).isActive(l)}test(u){if(this.#e.isLoading())return[];if(u.isAdditive){const i=Tt.uniqBy([...this.rules,...u.rules],"id"),l={...this.values,...u.values};return this.#e.test({filters:{rules:i,values:l}},!0)}return this.#e.test({filters:{rules:u.rules,values:u.values??{}}})}testRule({rule:u,value:i,...l}){const _=this.getRule(u);return this.test({rules:[_],values:{[_.id]:i},...l})}testRuleOptions(u,i){if(this.#e.isLoading())return new Map;const l=this.getRule(u);if(l.boolean){const _=new Map;return _.set(!0,this.testRule({rule:l,value:!0})),_.set(!1,this.testRule({rule:l,value:!1})),_}if(Array.isArray(l.options)){const _=new Map;return l.options.forEach(S=>{let R;l.multiple?R=[S.value]:R=S.value,_.set(S,this.testRule({rule:l,value:R,isAdditive:i}))}),_}throw new H(W.TESTING_OPTIONS_ON_RULE_WITH_NO_OPTIONS,l)}get values(){return this.rules.reduce((u,i)=>(u[i.id]=this.get(i),u),{})}get raw(){return this.#t}serialize(){return{rules:this.rules,values:this.values}}static process(u,i,l){const _=u.rules.filter(S=>Ln(S)&&Vt(S).isActive(u.values[S.id]));return _.length===0?i:i.filter(S=>_.every(R=>Ln(R)&&Vt(R).isMatch(S,u.values[R.id],l)))}}const Lr=[void 0,"desc","asc"];class au{#t;#e;#n;constructor({initialSortBy:u,initialSortDirection:i},l){this.#n=l,u&&(this.#t=this.getRule(u)),this.#e=i}getRule(u){const i=this.#n.getRuleBook().getRule(u);if(Or(i)===!1)throw new H(W.WRONG_RULE_TYPE_FOR_MIXIN,{rule:i});return i}get rules(){return this.#n.getRuleBook().rules.filter(Or)}get activeRule(){const u=this.rules.at(0);return this.#t??u}get sortDirection(){return this.#e??this.activeRule?.defaultSortDirection??"asc"}get userHasSetSortDirection(){return this.#e!==void 0}setSortDirection(u){if(this.#n.isDisabled()||!this.activeRule)return;const i=this.#e;this.#e=u,this.#n.touch({source:st.SORT_BY,event:Z.SET_SORT_BY_DIRECTION,current:{sortDirection:u},initial:{sortDirection:i},rule:this.activeRule})}cycleSortDirection(){const u=Lr.findIndex(i=>i===this.#e);if(u!==-1){const i=u+1%(Lr.length-1);this.setSortDirection(Lr[i])}}toggleSortDirection(){if((this.#e??this.activeRule?.defaultSortDirection)==="desc"){this.setSortDirection("asc");return}this.setSortDirection("desc")}set(u,i){if(this.#n.isDisabled()||!this.activeRule)return;const l=this.#e,_=this.#t,S=u?this.getRule(u):void 0;this.#t=S,this.#e=i,this.#n.touch({source:st.SORT_BY,event:Z.SET_SORT_BY,current:{rule:S?.id,sortDirection:i},initial:{rule:_?.id,sortDirection:l},rule:this.activeRule})}reset(){this.set(void 0,void 0)}serialize(){return{rule:this.activeRule,sortDirection:this.sortDirection}}static process(u,i,l){return u.rule===void 0?i:Tt.orderBy(i,_=>typeof u.rule?.sortFn=="function"?u.rule.sortFn(_,l):Number.NEGATIVE_INFINITY,u.sortDirection)}}class lu{#t;#e;#n;constructor({initialGroupBy:u,initialGroupBySortDirection:i,requireGroup:l},_){this.#n=_,u&&(this.#t=this.getRule(u)),this.#e=i,this.requireGroup=l}getRule(u){const i=this.#n.getRuleBook().getRule(u);if(xr(i)===!1)throw new H(W.WRONG_RULE_TYPE_FOR_MIXIN,{rule:i});return i}get rules(){return this.#n.getRuleBook().rules.filter(xr)}get activeRule(){const u=this.requireGroup?this.rules.at(0):void 0;return this.#t??u}get hasGroupByRule(){return this.activeRule!==void 0}get groupBySortDirection(){return this.#e??this.activeRule?.defaultGroupSortDirection}set(u){if(this.#n.isDisabled())return;const i=this.#t;let l;const _=typeof u=="string"&&u.trim()==="";_&&(l=void 0),_===!1&&u!==void 0&&(l=this.getRule(u)),this.#t!==l&&(this.#t=l,this.#e=void 0,this.#n.touch({source:st.GROUP_BY,event:Z.SET_GROUP_BY,current:l?.id,initial:i?.id,rule:l}))}setGroupSortDirection(u){const i=this.#e;this.#e=u,this.#n.touch({source:st.GROUP_BY,event:Z.SET_GROUP_SORT_BY_DIRECTION,current:u,initial:i,rule:this.activeRule})}toggle(u){const i=this.getRule(u);if(this.activeRule===i){this.set(void 0);return}this.set(i)}reset(){this.setGroupSortDirection(void 0),this.set(void 0)}serialize(){return{rule:this.activeRule,groupBySortDirection:this.#e}}static process(u,i,l){const _=Tt.groupBy(i,q=>u.rule?.groupFn(q,l)),S=Object.entries(_).map(([q,Y])=>({id:q,items:Y})),R=u.rule?.sticky!==void 0,P=[],U=[];if(R&&u.rule&&(P.push(Ro(u.rule)),U.push("asc")),u.rule?.sortGroupFn&&(P.push(u.rule.sortGroupFn),U.push(u.groupBySortDirection??"asc")),P.length>0){const q=U;return Tt.orderBy(S,P,q)}return S}}function Ro(c){let u=[];c.sticky?.header!==void 0&&(Array.isArray(c.sticky.header)&&(u=c.sticky.header),typeof c.sticky.header=="string"&&(u=[c.sticky.header]));let i=[];return c.sticky?.footer!==void 0&&(Array.isArray(c.sticky.footer)&&(i=c.sticky.footer),typeof c.sticky.footer=="string"&&(i=[c.sticky.footer])),l=>{if(u.includes(l.id)){const _=u.findIndex(R=>l.id===R);return(u.length-_)*-1}return i.includes(l.id)?1+i.findIndex(S=>l.id===S):0}}class cu{#t;#e;constructor({page:u,numItemsPerPage:i},l){this.#t=u??1,this.numItemsPerPage=i,this.#e=l}setPage(u){if(u!==this.#t){const i=this.#t;this.#t=u,this.#e.touch({source:st.PAGINATION,event:Z.SET_PAGE,current:{page:this.#t},initial:{page:i}})}}setNumItemsPerPage(u){if(u!==this.numItemsPerPage){const i=this.numItemsPerPage;this.numItemsPerPage=u,this.#e.touch({source:st.PAGINATION,event:Z.SET_NUM_ITEMS_PER_PAGE,current:{numItemsPerPage:this.numItemsPerPage},initial:{numItemsPerPage:i}})}}get lastPage(){if(this.numItemsPerPage!==void 0)return Math.ceil(this.#e.getItems().length/this.numItemsPerPage)}get numTotalItems(){return this.#e.getItems().length}get page(){return this.numItemsPerPage&&this.lastPage?Tt.clamp(this.#t,1,this.lastPage):this.#t}get offset(){return this.numItemsPerPage&&this.lastPage?(Tt.clamp(this.#t,1,this.lastPage)-1)*this.numItemsPerPage:0}serialize(){return{page:this.#t,numItemsPerPage:this.numItemsPerPage}}static process(u,i){if(u.numItemsPerPage===void 0)return i;const l=Math.ceil(i.length/u.numItemsPerPage),S=(Tt.clamp(u.page,1,l)-1)*u.numItemsPerPage;return i.slice(S,S+u.numItemsPerPage)}}function Ao(){const c=new Map;return(u,i)=>u.debounceMilliseconds===void 0?i():(c.has(u)===!1&&c.set(u,Tt.debounce(l=>l(),u.debounceMilliseconds)),c.get(u)?.(i))}class mo{constructor(u,i,l){this.searchEffects=[],this.ruleEffects=[],this.#t=u.filter(go),this.#e=u.filter(_o),this.hydrateDefinitions(i,l)}#t;#e;hydrateDefinitions(u,i){this.ruleEffects=this.#t.map(l=>{const _=typeof l.rules=="function"?l.rules(u,i):l.rules,S=Array.isArray(_)?_:[_];return{...l,rules:S,_isHydrated:!0}}),this.searchEffects=this.#e.map(l=>{const _=typeof l.haystack=="function"?l.haystack(u,i):l.haystack,S=Array.isArray(_)?_:[_];return{...l,haystack:S,_isHydrated:!0}})}processRule(u,i){this.ruleEffects.forEach(l=>{l.rules.some(S=>typeof S=="string"&&u.id===S||typeof S=="object"&&u.id===S.id)&&l.onChange(i,u)})}processSearchTerm(u,i){this.searchEffects.forEach(l=>{ao(l.haystack,u)&&l.onChange(i,u)})}}class yo{#t=new Map;#e=!1;on(u,i){this.#t.has(u)===!1&&this.#t.set(u,new Set),this.#t.get(u)?.add(i)}off(u,i){if(this.#t.has(u)===!1)return;if(i===void 0){this.#t.delete(u);return}this.#t.get(u)?.delete(i)}emit(u,i){if(this.#e)return;this.#t.get(u)?.forEach(_=>{_(i)})}silently(u){this.#e=!0,u(),this.#e=!1}isSilent(){return this.#e}}class rn{constructor(){this.snapshot={},this.isStale=!0}setIsStale(u){this.isStale=u}takeSnapshot({items:u,context:i,mixins:l}){const _=rn.test({mixins:l,items:u,context:i}),S=l.pagination?cu.process(l.pagination,_):_;let R=[];const P=l.groupBy!==void 0;l.groupBy&&(R=lu.process(l.groupBy,S,i)),this.snapshot={items:P?void 0:S,groups:P?R:void 0,numMatchedItems:_.length,numTotalItems:u.length,hasGroupByRule:P}}static test({mixins:u,items:i,context:l}){let _=[...i];return u.search&&(_=fu.process(u.search,_,l)),u.filters&&(_=ou.process(u.filters,_,l)),u.sortBy&&(_=au.process(u.sortBy,_,l)),_}}class Nn{constructor(u,i,l){this.rules=[],Nn.validateDefinitions(u),this.#t=u,this.hydrateDefinitions(i,l)}#t;hydrateDefinitions(u,i){this.rules=this.#t.map(l=>{if(Ue(l)){const _=typeof l.options=="function"?l.options({items:u,context:i}):l.options;return{...l,boolean:!!l.boolean,multiple:!!l.multiple,strictOptions:l.strictOptions??!0,options:_}}return l})}getRule(u){const i=this.rules.find(l=>typeof u=="object"?l.id===u.id:l.id===u);if(i===void 0)throw new H(W.RULE_NOT_FOUND,u);return i}getDefinitions(){return this.#t}setRules(u){Nn.validateDefinitions(u),this.#t=u}static validateDefinitions(u){if(u.length===0)return!1;const i=[xn,Ue,Or,xr],l=new Set;return u.forEach(_=>{if(_.id===void 0&&!xn(_))throw new H(W.INVALID_RULE_WITHOUT_ID,_);if(i.some(S=>S(_))===!1)throw new H(W.INVALID_RULE_SHAPE,_);if(_.id){if(l.has(_.id))throw new H(W.INVALID_RULE_DUPLICATE,_);l.add(_.id)}}),!0}}class wo{constructor(u,{rules:i,effects:l,initialSearchTerm:_,initialSortBy:S,initialSortDirection:R,initialGroupBy:P,initialGroupBySortDirection:U,initialFilters:q,context:Y,page:K,numItemsPerPage:St,isLoading:ht,disabled:Jt,requireGroup:de,ignoreSortByRulesWhileSearchRuleIsActive:_t,onInit:qt,onReady:re,onFirstUserInteraction:Et,onChange:Qt},wt){this.isReady=!1,this.#e=!1,this.#t=u,this.disabled=!!Jt,this.isLoading=!!ht,this.#r=new yo,this.getInstanceFn=wt,this.#i=new Nn(i,u??[],Y),this.#s=new mo(l??[],u??[],Y);const kt=Ao(),ot={getItems:()=>this.items,getRuleBook:()=>this.#i,isLoading:()=>this.isLoading,isDisabled:()=>this.disabled,test:(k,we)=>this.test(k,we),touch:k=>this.#l(k),debouncer:kt};this.search=new fu({initialSearchTerm:_},ot),this.filters=new ou({initialFilters:q},ot),this.sortBy=new au({initialSortBy:S,initialSortDirection:R},ot),this.groupBy=new lu({initialGroupBy:P,initialGroupBySortDirection:U,requireGroup:!!de},ot),this.pagination=new cu({page:K,numItemsPerPage:St},ot),this.updatedAt=Date.now(),this.#u=new rn,this.context=Y,this.#n=_t,this.#r.silently(()=>{const k={source:st.CORE,event:Z.INIT,timestamp:Date.now(),instance:this.getInstanceFn()};qt&&qt(k)}),Qt&&this.#r.on(Z.CHANGE,Qt),Et&&this.#r.on(Z.FIRST_USER_INTERACTION,Et),this.isReady=!ht&&Array.isArray(u)&&u.length>0,re&&this.isReady&&re({source:st.CORE,event:Z.READY,timestamp:Date.now(),instance:this.getInstanceFn()}),this.isReady===!1&&re&&this.#r.on(Z.READY,re)}#t;#e;#n;#r;#u;#i;#s;#l(u){if(this.#r.isSilent())return;this.emitFirstUserInteraction(),this.#o(),this.#u.setIsStale(!0);const i={...u,timestamp:Date.now(),instance:this.getInstanceFn()};this.#r.emit(Z.CHANGE,i),this.#r.silently(()=>{u.rule&&this.#s.processRule(u.rule,this.getInstanceFn()),this.search.hasSearchTerm&&this.#s.processSearchTerm(this.search.searchTerm,this.getInstanceFn())})}#f(u){this.#u.setIsStale(!0),this.#o();const i={...u,timestamp:Date.now(),instance:this.getInstanceFn()};this.#r.emit(u.event,i)}#o(){this.updatedAt=Date.now(),this.#r.emit(Z.SYNC_UPDATED_AT,this.updatedAt)}emitFirstUserInteraction(){if(this.#e===!1){this.#e=!0;const u={source:st.CORE,event:Z.FIRST_USER_INTERACTION,timestamp:Date.now(),instance:this.getInstanceFn()};this.#r.emit(Z.FIRST_USER_INTERACTION,u)}}#c(){this.isReady===!1&&(this.isReady=!0,this.#r.emit(Z.READY,{source:st.CORE,event:Z.READY,timestamp:Date.now()}))}get items(){return Array.isArray(this.#t)?this.#t:[]}get matches(){return this.#u.isStale&&(this.#u.takeSnapshot({items:this.items,context:this.context,mixins:this.#a()}),this.#u.setIsStale(!1)),this.#u.snapshot}test(u,i=!1){if(i){const l={...this.#a(),...u};return rn.test({mixins:l,items:this.items,context:this.context})}return rn.test({mixins:u,items:this.items,context:this.context})}#a(){const u=this.search.hasSearchRule&&this.search.hasSearchTerm,i=u&&this.#n,l={};return u&&(l.search=this.search.serialize()),this.filters.activeRules.length>0&&(l.filters=this.filters.serialize()),this.pagination.numItemsPerPage&&(l.pagination=this.pagination.serialize()),i===!1&&(l.sortBy=this.sortBy.serialize()),this.groupBy.activeRule!==void 0&&(l.groupBy=this.groupBy.serialize()),l}get isEmpty(){return this.isLoading===!1&&this.items.length===0}get hasMatches(){const u=Array.isArray(this.matches.items)&&this.matches.items.length>0,i=Array.isArray(this.matches.groups)&&this.matches.groups.length>0;return u||i}get events(){return{on:(u,i)=>this.#r.on(u,i),off:(u,i)=>this.#r.off(u,i),silently:u=>this.#r.silently(u),isSilent:()=>this.#r.isSilent()}}getRule(u){return this.#i.getRule(u)}get state(){if(this.isLoading)return"loading";if(this.isEmpty)return"empty";const u=this.groupBy.activeRule!==void 0;return u&&Array.isArray(this.matches.groups)&&this.matches.groups.length>0?"groups":u===!1&&Array.isArray(this.matches.items)&&this.matches.items.length>0?"items":"noMatches"}setItems(u){if(Tt.isEqual(u,this.#t)===!1){const i=this.#t;this.#t=u,this.#i.hydrateDefinitions(this.items,this.context),this.#s.hydrateDefinitions(this.items,this.context),this.#f({source:st.CORE,event:Z.SET_ITEMS,current:u,initial:i})}}setIsLoading(u){if(!!u!==this.isLoading){const i=this.isLoading;this.isLoading=!!u,this.#f({source:st.CORE,event:Z.SET_IS_LOADING,current:!!u,initial:i}),this.isLoading===!1&&this.#c()}}setIsDisabled(u){if(!!u!==this.disabled){const i=this.disabled;this.disabled=!!u,this.#f({source:st.CORE,event:Z.SET_IS_DISABLED,current:!!u,initial:i})}}setRules(u){Tt.isEqual(u,this.#i.getDefinitions())===!1&&(this.#i.setRules(u),this.#i.hydrateDefinitions(this.items,this.context))}setContext(u){const i=this.context;Tt.isEqual(u,i)===!1&&(this.context=u,this.#i.hydrateDefinitions(this.items,this.context),this.#s.hydrateDefinitions(this.items,this.context),this.#f({source:st.CORE,event:Z.SET_CONTEXT,current:u,initial:i}))}toJSON(){return{disabled:this.disabled,initialSearchTerm:this.search.searchTerm,initialFilters:this.filters.raw,page:this.pagination.page,numItemsPerPage:this.pagination.numItemsPerPage,initialSortBy:this.sortBy.activeRule?.id,initialSortDirection:this.sortBy.sortDirection,ignoreSortByRulesWhileSearchRuleIsActive:this.#n,initialGroupBy:this.groupBy.activeRule?.id,initialGroupBySortDirection:this.groupBy.groupBySortDirection,requireGroup:this.groupBy.requireGroup}}}class Oo{#t;constructor(u,i){const l=()=>this;this.#t=new wo(u,i,l)}get items(){return this.#t.items}get context(){return this.#t.context}get isReady(){return this.#t.isReady}get isEmpty(){return this.#t.isEmpty}get hasMatches(){return this.#t.hasMatches}get isLoading(){return this.#t.isLoading}get disabled(){return this.#t.disabled}get state(){return this.#t.state}get updatedAt(){return this.#t.updatedAt}get events(){return this.#t.events}get matches(){return this.#t.matches}get search(){const u=this.#t.search;return{rule:u.rule,searchTerm:u.searchTerm,hasSearchTerm:u.hasSearchTerm,hasSearchRule:u.hasSearchRule,setSearchTerm:u.setSearchTerm.bind(u),reset:u.reset.bind(u),test:u.test.bind(u)}}get filters(){const u=this.#t.filters;return{values:u.values,raw:u.raw,activeRules:u.activeRules,rules:u.rules,isActive:u.isRuleActive.bind(u),get:u.get.bind(u),add:u.add.bind(u),has:u.has.bind(u),getRule:u.getRule.bind(u),toggle:u.toggle.bind(u),set:u.set.bind(u),delete:u.delete.bind(u),reset:u.reset.bind(u),test:u.test.bind(u),testRule:u.testRule.bind(u),testRuleOptions:u.testRuleOptions.bind(u)}}get sortBy(){const u=this.#t.sortBy;return{activeRule:u.activeRule,sortDirection:u.sortDirection,userHasSetSortDirection:u.userHasSetSortDirection,rules:u.rules,set:u.set.bind(u),setSortDirection:u.setSortDirection.bind(u),cycleSortDirection:u.cycleSortDirection.bind(u),toggleSortDirection:u.toggleSortDirection.bind(u),reset:u.reset.bind(u)}}get groupBy(){const u=this.#t.groupBy;return{activeRule:u.activeRule,requireGroup:u.requireGroup,rules:u.rules,groupBySortDirection:u.groupBySortDirection,set:u.set.bind(u),toggle:u.toggle.bind(u),setGroupSortDirection:u.setGroupSortDirection.bind(u),reset:u.reset.bind(u)}}get pagination(){const u=this.#t.pagination;return{page:u.page,offset:u.offset,numItemsPerPage:u.numItemsPerPage,numTotalItems:u.numTotalItems,lastPage:u.lastPage,isPaginated:u.numItemsPerPage!==void 0,setPage:u.setPage.bind(u),setNumItemsPerPage:u.setNumItemsPerPage.bind(u)}}setItems(u){return this.#t.setItems(u)}setIsLoading(u){return this.#t.setIsLoading(u)}setIsDisabled(u){return this.#t.setIsDisabled(u)}setRules(u){return this.#t.setRules(u)}setContext(u){return this.#t.setContext(u)}test(u,i=!1){return this.#t.test(u,i)}getRule(u){return this.#t.getRule(u)}toJSON(){return this.#t.toJSON()}}function Nr({items:c,rules:u,effects:i,initialSearchTerm:l,initialSortBy:_,initialSortDirection:S,initialGroupBy:R,initialGroupBySortDirection:P,initialFilters:U,context:q,isLoading:Y,disabled:K,page:St,numItemsPerPage:ht,requireGroup:Jt,ignoreSortByRulesWhileSearchRuleIsActive:de,onInit:_t,onReady:qt,onFirstUserInteraction:re,onChange:Et,controllerRef:Qt,children:wt}){const[kt,ot]=Ct.useState(Date.now()),[k]=Ct.useState(()=>{const Pn=new Oo(c,{rules:u,effects:i,initialSearchTerm:l,initialSortBy:_,initialSortDirection:S,initialGroupBy:R,initialGroupBySortDirection:P,initialFilters:U,context:q,isLoading:Y,disabled:K,page:St,numItemsPerPage:ht,requireGroup:Jt,ignoreSortByRulesWhileSearchRuleIsActive:de,onInit:_t,onReady:qt,onFirstUserInteraction:re,onChange:Et});return Pn.events.on(Z.SYNC_UPDATED_AT,Pr=>ot(Pr)),Pn});k.setItems(c),k.setIsLoading(Y),k.setIsDisabled(K),k.setRules(u),q!==void 0&&k.setContext(q),St!==void 0&&k.pagination.setPage(St),ht!==void 0&&k.pagination.setNumItemsPerPage(ht),Ct.useImperativeHandle(Qt,()=>k,[k]);const we=Ct.useMemo(()=>[k,kt],[k,kt]);return ct.jsx(ji.Provider,{value:we,children:wt})}Nr.Content=Me,Nr.SearchTermHaystack=lo;function xo(){return Ct.useRef(null)}et.Finder=Nr,et.StringMatch=su,et.filterRule=Xf,et.finderRuleset=$f,et.groupByRule=Vf,et.ruleEffect=Jf,et.searchEffect=Qf,et.searchRule=Kf,et.sortByRule=Zf,et.transformFilterToBoolean=jf,et.transformFilterToMultiple=to,et.transformFilterToSingleValue=kf,et.useFinder=ye,et.useFinderRef=xo,Object.defineProperty(et,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FinderContentProps } from "../types/react-types";
|
|
2
|
-
import { ElementType, ReactElement, ReactNode } from "react";
|
|
3
|
-
interface FinderContentEmptyProps<FItem, FContext> {
|
|
4
|
-
children: ElementType<FinderContentProps<FItem, FContext>["empty"]> | ReactElement<FinderContentProps<FItem, FContext>["empty"]> | Iterable<ReactNode>;
|
|
5
|
-
}
|
|
6
|
-
declare function FinderContentEmpty<FItem = any, FContext = any>({ children: Component }: FinderContentEmptyProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export { FinderContentEmpty };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ElementType, ReactElement, ReactNode } from "react";
|
|
2
|
-
import { FinderContentProps } from "../..";
|
|
3
|
-
interface FinderContentGroupsProps<FItem, FContext> {
|
|
4
|
-
children: ElementType<FinderContentProps<FItem, FContext>["groups"]> | ReactElement<FinderContentProps<FItem, FContext>["groups"]> | Iterable<ReactNode>;
|
|
5
|
-
}
|
|
6
|
-
declare function FinderContentGroups<FItem = any, FContext = any>({ children: Component }: FinderContentGroupsProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export { FinderContentGroups };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ElementType, ReactElement, ReactNode } from "react";
|
|
2
|
-
import { FinderContentProps } from "../types/react-types";
|
|
3
|
-
interface FinderContentItemsProps<FItem, FContext> {
|
|
4
|
-
children: ElementType<FinderContentProps<FItem, FContext>["items"]> | ReactElement<FinderContentProps<FItem, FContext>["items"]> | Iterable<ReactNode>;
|
|
5
|
-
}
|
|
6
|
-
declare function FinderContentItems<FItem = any, FContext = any>({ children: Component }: FinderContentItemsProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export { FinderContentItems };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FinderContentProps } from "../types/react-types";
|
|
2
|
-
import { ElementType, ReactElement, ReactNode } from "react";
|
|
3
|
-
interface FinderContentLoadingProps<FItem, FContext> {
|
|
4
|
-
children: ElementType<FinderContentProps<FItem, FContext>["loading"]> | ReactElement<FinderContentProps<FItem, FContext>["loading"]> | Iterable<ReactNode>;
|
|
5
|
-
}
|
|
6
|
-
declare function FinderContentLoading<FItem, FContext>({ children: Component }: FinderContentLoadingProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export { FinderContentLoading };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FinderContentProps } from "../types/react-types";
|
|
2
|
-
import { ElementType, ReactElement, ReactNode } from "react";
|
|
3
|
-
interface FinderContentNoMatchesProps<FItem, FContext> {
|
|
4
|
-
children: ElementType<FinderContentProps<FItem, FContext>["noMatches"]> | ReactElement<FinderContentProps<FItem, FContext>["noMatches"]> | Iterable<ReactNode>;
|
|
5
|
-
}
|
|
6
|
-
declare function FinderContentNoMatches<FItem = any, FContext = any>({ children: Component }: FinderContentNoMatchesProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export { FinderContentNoMatches };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ElementType, ReactElement, ReactNode } from "react";
|
|
2
|
-
import { FinderContentProps } from "../types/react-types";
|
|
3
|
-
import { FinderContentLoading } from "./finder-content-loading";
|
|
4
|
-
import { FinderContentEmpty } from "./finder-content-empty";
|
|
5
|
-
import { FinderContentNoMatches } from "./finder-content-no-matches";
|
|
6
|
-
import { FinderContentItems } from "./finder-content-items";
|
|
7
|
-
import { FinderContentGroups } from "./finder-content-groups";
|
|
8
|
-
interface FinderContentContainerProps<FItem, FContext> {
|
|
9
|
-
children: {
|
|
10
|
-
loading?: ElementType<FinderContentProps<FItem, FContext>["loading"]> | ReactElement<FinderContentProps<FItem, FContext>["loading"]> | Iterable<ReactNode>;
|
|
11
|
-
empty?: ElementType<FinderContentProps<FItem, FContext>["empty"]> | ReactElement<FinderContentProps<FItem, FContext>["empty"]> | Iterable<ReactNode>;
|
|
12
|
-
noMatches?: ElementType<FinderContentProps<FItem, FContext>["noMatches"]> | ReactElement<FinderContentProps<FItem, FContext>["noMatches"]> | Iterable<ReactNode>;
|
|
13
|
-
items?: ElementType<FinderContentProps<FItem, FContext>["items"]> | ReactElement<FinderContentProps<FItem, FContext>["items"]> | Iterable<ReactNode>;
|
|
14
|
-
groups?: ElementType<FinderContentProps<FItem, FContext>["groups"]> | ReactElement<FinderContentProps<FItem, FContext>["groups"]> | Iterable<ReactNode>;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
declare function FinderContent<FItem = any, FContext = any>({ children: renderProps }: FinderContentContainerProps<FItem, FContext>): (import("react/jsx-runtime").JSX.Element | undefined)[];
|
|
18
|
-
declare namespace FinderContent {
|
|
19
|
-
var Loading: typeof FinderContentLoading;
|
|
20
|
-
var Empty: typeof FinderContentEmpty;
|
|
21
|
-
var NoMatches: typeof FinderContentNoMatches;
|
|
22
|
-
var Items: typeof FinderContentItems;
|
|
23
|
-
var Groups: typeof FinderContentGroups;
|
|
24
|
-
}
|
|
25
|
-
export { FinderContent };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FinderSearchTermProp } from "../types/react-types";
|
|
2
|
-
interface FinderSearchTermHaystackProps {
|
|
3
|
-
children: string;
|
|
4
|
-
Match?: FinderSearchTermProp;
|
|
5
|
-
Miss?: FinderSearchTermProp;
|
|
6
|
-
}
|
|
7
|
-
declare function FinderSearchTermHaystack({ Match, Miss, children: haystack }: FinderSearchTermHaystackProps): string | import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export { FinderSearchTermHaystack };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FinderProps } from "../types/react-types";
|
|
2
|
-
import { FinderContent } from "./finder-content";
|
|
3
|
-
import { FinderSearchTermHaystack } from "./finder-search-term-haystack";
|
|
4
|
-
declare function Finder<FItem = any, FContext = any>({ items, rules, effects, initialSearchTerm, initialSortBy, initialSortDirection, initialGroupBy, initialGroupBySortDirection, initialFilters, context, isLoading, disabled, page, numItemsPerPage, requireGroup, ignoreSortByRulesWhileSearchRuleIsActive, onInit, onReady, onFirstUserInteraction, onChange, controllerRef, children, }: FinderProps<FItem, FContext>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare namespace Finder {
|
|
6
|
-
var Content: typeof FinderContent;
|
|
7
|
-
var SearchTermHaystack: typeof FinderSearchTermHaystack;
|
|
8
|
-
}
|
|
9
|
-
export { Finder };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FinderSearchTermProp } from "../types/react-types";
|
|
2
|
-
interface StringMatchProps {
|
|
3
|
-
needle: string;
|
|
4
|
-
haystack: string;
|
|
5
|
-
Match?: FinderSearchTermProp;
|
|
6
|
-
Miss?: FinderSearchTermProp;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Split a string into result segment components .
|
|
10
|
-
*/
|
|
11
|
-
declare function StringMatch({ needle, haystack, Match, Miss }: StringMatchProps): string | (string | import("react/jsx-runtime").JSX.Element)[];
|
|
12
|
-
export { StringMatch };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* React-specific types for creating consumer components.
|
|
3
|
-
*/
|
|
4
|
-
import { ElementType, PropsWithChildren, RefObject } from "react";
|
|
5
|
-
import { FinderConstructorOptions, FinderResultGroup, PaginationMixinInterface } from "../../core/types/core-types";
|
|
6
|
-
import { StringMatchSegment } from "../../core/types/string-match-types";
|
|
7
|
-
import { FinderCore } from "../../core/finder-core";
|
|
8
|
-
export interface FinderProps<FItem, FContext> extends FinderConstructorOptions<FItem, FContext>, PropsWithChildren {
|
|
9
|
-
items: FItem[] | undefined | null;
|
|
10
|
-
controllerRef?: RefObject<FinderCore<FItem, FContext> | null>;
|
|
11
|
-
}
|
|
12
|
-
export interface FinderContentProps<FItem = any, FContext = any> {
|
|
13
|
-
empty: {
|
|
14
|
-
pagination: PaginationMixinInterface;
|
|
15
|
-
context: FContext;
|
|
16
|
-
};
|
|
17
|
-
loading: {
|
|
18
|
-
pagination: PaginationMixinInterface;
|
|
19
|
-
context: FContext;
|
|
20
|
-
};
|
|
21
|
-
noMatches: {
|
|
22
|
-
pagination: PaginationMixinInterface;
|
|
23
|
-
context: FContext;
|
|
24
|
-
};
|
|
25
|
-
items: {
|
|
26
|
-
items: FItem[];
|
|
27
|
-
pagination: PaginationMixinInterface;
|
|
28
|
-
context: FContext;
|
|
29
|
-
};
|
|
30
|
-
groups: {
|
|
31
|
-
groups: FinderResultGroup<FItem>[];
|
|
32
|
-
pagination: PaginationMixinInterface;
|
|
33
|
-
context: FContext;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export type FinderCoreContextProps = [FinderCore, number];
|
|
37
|
-
export interface StringMatchSegmentProps {
|
|
38
|
-
segment: StringMatchSegment;
|
|
39
|
-
segmentIndex: number;
|
|
40
|
-
}
|
|
41
|
-
export type FinderSearchTermProp = keyof HTMLElementTagNameMap | ElementType | ElementType<StringMatchSegmentProps>;
|