@flesh-and-blood/search 3.1.13 → 3.1.15

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var Nr=Object.create;var se=Object.defineProperty,$r=Object.defineProperties,Hr=Object.getOwnPropertyDescriptor,Gr=Object.getOwnPropertyDescriptors,Wr=Object.getOwnPropertyNames,gt=Object.getOwnPropertySymbols,jr=Object.getPrototypeOf,vt=Object.prototype.hasOwnProperty,Kr=Object.prototype.propertyIsEnumerable;var mt=(e,t,r)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t||(t={}))vt.call(t,r)&&mt(e,r,t[r]);if(gt)for(var r of gt(t))Kr.call(t,r)&&mt(e,r,t[r]);return e},ee=(e,t)=>$r(e,Gr(t));var yt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ur=(e,t)=>{for(var r in t)se(e,r,{get:t[r],enumerable:!0})},bt=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Wr(t))!vt.call(e,n)&&n!==r&&se(e,n,{get:()=>t[n],enumerable:!(i=Hr(t,n))||i.enumerable});return e};var K=(e,t,r)=>(r=e!=null?Nr(jr(e)):{},bt(t||!e||!e.__esModule?se(r,"default",{value:e,enumerable:!0}):r,e)),Yr=e=>bt(se({},"__esModule",{value:!0}),e);var U=yt((qn,Ht)=>{var fe=Object.defineProperty,Vr=Object.defineProperties,Qr=Object.getOwnPropertyDescriptor,Jr=Object.getOwnPropertyDescriptors,Zr=Object.getOwnPropertyNames,kt=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable,Ct=(e,t,r)=>t in e?fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qr=(e,t)=>{for(var r in t||(t={}))Mt.call(t,r)&&Ct(e,r,t[r]);if(kt)for(var r of kt(t))Xr.call(t,r)&&Ct(e,r,t[r]);return e},ei=(e,t)=>Vr(e,Jr(t)),ti=(e,t)=>{for(var r in t)fe(e,r,{get:t[r],enumerable:!0})},ri=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Zr(t))!Mt.call(e,n)&&n!==r&&fe(e,n,{get:()=>t[n],enumerable:!(i=Qr(t,n))||i.enumerable});return e},ii=e=>ri(fe({},"__esModule",{value:!0}),e),At={};ti(At,{Bond:()=>xt,Class:()=>Ft,Flow:()=>Bt,Foiling:()=>St,Format:()=>Lt,Fusion:()=>Tt,Hero:()=>Ot,Keyword:()=>zt,Rarity:()=>Pt,Release:()=>Dt,ReleaseEdition:()=>Rt,Subtype:()=>_t,Talent:()=>It,Treatment:()=>wt,Type:()=>Et,fullSetIdentifiers:()=>Ie,getCanAddToDeck:()=>ai,getCardIdentifier:()=>ni,getDefaultPrinting:()=>gi,getIsArenaCard:()=>Nt,getIsDeckCard:()=>Re,getPrint:()=>ui,getShouldRotateCardImage:()=>oi,getSpecialPrinting:()=>hi,orderedFullSetBlackBorderIdentifiers:()=>di,setIdentifierToSetMappings:()=>$t,setToSetIdentifierMappings:()=>si});Ht.exports=ii(At);var St=(e=>(e.C="Cold",e.G="Gold",e.R="Rainbow",e))(St||{}),wt=(e=>(e.AB="Alternate Border",e.AA="Alternate Art",e.AT="Alternate Text",e.EA="Extended Art",e.FA="Full Art",e))(wt||{}),Ft=(e=>(e.NotClassed="NotClassed",e.Generic="Generic",e.Adjudicator="Adjudicator",e.Assassin="Assassin",e.Bard="Bard",e.Brute="Brute",e.Guardian="Guardian",e.Illusionist="Illusionist",e.Mechanologist="Mechanologist",e.Merchant="Merchant",e.Ninja="Ninja",e.Ranger="Ranger",e.Runeblade="Runeblade",e.Shapeshifter="Shapeshifter",e.Warrior="Warrior",e.Wizard="Wizard",e))(Ft||{}),xt=(e=>(e.Earth="Earth",e))(xt||{}),Bt=(e=>(e.Lightning="Lightning",e))(Bt||{}),Lt=(e=>(e.Blitz="Blitz",e.BlitzLivingLegend="Blitz (Living Legend)",e.Clash="Clash",e.ClassicConstructed="Classic Constructed",e.ClassicConstructedLivingLegend="Classic Constructed (Living Legend)",e.Commoner="Commoner",e.Draft="Draft",e.Open="Open",e.Sealed="Sealed",e.UltimatePitFight="Ultimate Pit Fight",e))(Lt||{}),Tt=(e=>(e.Earth="Earth",e.Ice="Ice",e.Lightning="Lightning",e))(Tt||{}),Pt=(e=>(e.Token="Token",e.Common="Common",e.Rare="Rare",e.SuperRare="Super Rare",e.Majestic="Majestic",e.Marvel="Marvel",e.Legendary="Legendary",e.Fabled="Fabled",e.Promo="Promo",e))(Pt||{}),Dt=(e=>(e.ArcaneRising="Arcane Rising",e.BrightLights="Bright Lights",e.CrucibleOfWar="Crucible of War",e.DuskTillDawn="Dusk till Dawn",e.Dynasty="Dynasty",e.Everfest="Everfest",e.HeavyHitters="Heavy Hitters",e.HistoryPack1="History Pack 1",e.Monarch="Monarch",e.Outsiders="Outsiders",e.PartTheMistveil="Part the Mistveil",e.Rosetta="Rosetta",e.TalesOfAria="Tales of Aria",e.Uprising="Uprising",e.WelcomeToRathe="Welcome to Rathe",e.ArmoryDeckKayo="Armory Deck: Kayo",e.ArmoryDeckBoltyn="Armory Deck: Boltyn",e.ArmoryDeckAzalea="Armory Deck: Azalea",e.ArakniBlitzDeck="Arakni Blitz Deck",e.AzaleaBlitzDeck="Azalea Blitz Deck",e.BenjiBlitzDeck="Benji Blitz Deck",e.BetsyBlitzDeck="Betsy Blitz Deck",e.BoltynBlitzDeck="Boltyn Blitz Deck",e.BriarBlitzDeck="Briar Blitz Deck",e.BravoBlitzDeck="Bravo Blitz Deck",e.ChaneBlitzDeck="Chane Blitz Deck",e.DromaiBlitzDeck="Dromai Blitz Deck",e.EnigmaBlitzDeck="Enigma Blitz Deck",e.FaiBlitzDeck="Fai Blitz Deck",e.KassaiBlitzDeck="Kassai Blitz Deck",e.KatsuBlitzDeck="Katsu Blitz Deck",e.KayoBlitzDeck="Kayo Blitz Deck",e.LeviaBlitzDeck="Levia Blitz Deck",e.LexiBlitzDeck="Lexi Blitz Deck",e.NuuBlitzDeck="Nuu Blitz Deck",e.OldhimBlitzDeck="Oldhim Blitz Deck",e.OlympiaBlitzDeck="Olympia Blitz Deck",e.PrismBlitzDeck="Prism Blitz Deck",e.RhinarBlitzDeck="Rhinar Blitz Deck",e.RiptideBlitzDeck="Riptide Blitz Deck",e.UzuriBlitzDeck="Uzuri Blitz Deck",e.VictorBlitzDeck="Victor Blitz Deck",e.ZenBlitzDeck="Zen Blitz Deck",e.FirstStrikeAurora="1st Strike: Aurora",e.FirstStrikeTerra="1st Strike: Terra",e.DorintheaHeroDeck="Dorinthea Hero Deck",e.KatsuHeroDeck="Katsu Hero Deck",e.RhinarHeroDeck="Rhinar Hero Deck",e.ClassicBattlesRhinarDorinthea="Classic Battles: Rhinar vs Dorinthea",e.IraWelcomeDeck="Ira Welcome Deck",e.RoundTheTable="Round the Table",e.Promos="Promos",e))(Dt||{}),Rt=(e=>(e.Alpha="Alpha",e.First="First",e.Unlimited="Unlimited",e.Promo="Promo",e))(Rt||{}),It=(e=>(e.Draconic="Draconic",e.Earth="Earth",e.Elemental="Elemental",e.Ice="Ice",e.Light="Light",e.Lightning="Lightning",e.Mystic="Mystic",e.Royal="Royal",e.Shadow="Shadow",e))(It||{}),Et=(e=>(e.Action="Action",e.AttackReaction="Attack Reaction",e.Block="Block",e.DefenseReaction="Defense Reaction",e.DemiHero="Demi-Hero",e.Equipment="Equipment",e.Hero="Hero",e.Instant="Instant",e.Macro="Macro",e.Mentor="Mentor",e.Resource="Resource",e.Token="Token",e.Weapon="Weapon",e))(Et||{}),_t=(e=>(e.OneHanded="1H",e.TwoHanded="2H",e.Affliction="Affliction",e.Ally="Ally",e.Angel="Angel",e.Arms="Arms",e.Arrow="Arrow",e.Ash="Ash",e.Attack="Attack",e.Aura="Aura",e.Axe="Axe",e.Base="Base",e.Book="Book",e.Bow="Bow",e.Chest="Chest",e.Chi="Chi",e.Claw="Claw",e.Club="Club",e.Construct="Construct",e.Dagger="Dagger",e.Demon="Demon",e.Dragon="Dragon",e.Evo="Evo",e.Fiddle="Fiddle",e.Figment="Figment",e.Flail="Flail",e.Gem="Gem",e.Gun="Gun",e.Hammer="Hammer",e.Head="Head",e.Invocation="Invocation",e.Item="Item",e.Landmark="Landmark",e.Lute="Lute",e.Legs="Legs",e.NonAttack="Non-Attack",e.OffHand="Off-Hand",e.Orb="Orb",e.Pistol="Pistol",e.Quiver="Quiver",e.Rock="Rock",e.Shuriken="Shuriken",e.Scepter="Scepter",e.Scroll="Scroll",e.Scythe="Scythe",e.Song="Song",e.Staff="Staff",e.Sword="Sword",e.Trap="Trap",e.Wrench="Wrench",e.Young="Young",e))(_t||{}),Ot=(e=>(e.Arakni="Arakni",e.Aurora="Aurora",e.Azalea="Azalea",e.Benji="Benji",e.Betsy="Betsy",e.Blaze="Blaze",e.Boltyn="Boltyn",e.Bravo="Bravo",e.Brevant="Brevant",e.Briar="Briar",e.Brutus="Brutus",e.Chane="Chane",e.Dash="Dash",e.DataDoll="Data Doll",e.Dorinthea="Dorinthea",e.Dromai="Dromai",e.Emperor="Emperor",e.Enigma="Enigma",e.Fai="Fai",e.Florian="Florian",e.GenisWotchuneed="Genis Wotchuneed",e.Ira="Ira",e.Iyslander="Iyslander",e.Kano="Kano",e.Kassai="Kassai",e.Katsu="Katsu",e.Kavdaen="Kavdaen",e.Kayo="Kayo",e.Levia="Levia",e.Lexi="Lexi",e.Maxx="Maxx",e.Melody="Melody",e.Nuu="Nuu",e.Oldhim="Oldhim",e.Olympia="Olympia",e.Oscilio="Oscilio",e.Prism="Prism",e.Rhinar="Rhinar",e.Riptide="Riptide",e.Ruudi="Ruu'di",e.Shiyana="Shiyana",e.Squizzy="Squizzy",e.Starvo="Starvo",e.Taipanis="Taipanis",e.Taylor="Taylor",e.Teklovossen="Teklovossen",e.Terra="Terra",e.Theryon="Theryon",e.Uzuri="Uzuri",e.Valda="Valda",e.Verdance="Verdance",e.Victor="Victor",e.Vynnset="Vynnset",e.Viserai="Viserai",e.Yorick="Yorick",e.Yoji="Yoji",e.Zen="Zen",e))(Ot||{}),zt=(e=>(e.Ambush="Ambush",e.Amp="Amp",e.ArcaneBarrier="Arcane Barrier",e.ArcaneShelter="Arcane Shelter",e.Awaken="Awaken",e.Battleworn="Battleworn",e.BeatChest="Beat Chest",e.BladeBreak="Blade Break",e.BloodDebt="Blood Debt",e.Boost="Boost",e.Bond="Bond",e.Channel="Channel",e.Charge="Charge",e.Clash="Clash",e.Cloaked="Cloaked",e.Combo="Combo",e.Contract="Contract",e.Crank="Crank",e.Crush="Crush",e.Decompose="Decompose",e.Dominate="Dominate",e.Ephemeral="Ephemeral",e.Essence="Essence",e.EvoUpgrade="Evo Upgrade",e.Flow="Flow",e.Freeze="Freeze",e.Fusion="Fusion",e.Galvanize="Galvanize",e.GoAgain="Go again",e.Guardwell="Guardwell",e.Heave="Heave",e.Intimidate="Intimidate",e.Legendary="Legendary",e.Material="Material",e.Meld="Meld",e.Modular="Modular",e.Mirage="Mirage",e.Negate="Negate",e.Opt="Opt",e.Overpower="Overpower",e.Pairs="Pairs",e.Piercing="Piercing",e.Phantasm="Phantasm",e.Protect="Protect",e.Quell="Quell",e.Reload="Reload",e.Reprise="Reprise",e.RuneGate="Rune Gate",e.Rupture="Rupture",e.Scrap="Scrap",e.Solflare="Solflare",e.Specialization="Specialization",e.Spectra="Spectra",e.Spellvoid="Spellvoid",e.Stealth="Stealth",e.Surge="Surge",e.Temper="Temper",e.Tower="Tower",e.Transform="Transform",e.Transcend="Transcend",e.Universal="Universal",e.Unfreeze="Unfreeze",e.Unity="Unity",e.Wager="Wager",e.Ward="Ward",e))(zt||{}),ni=(e,t)=>{let{name:r,pitch:i}=e,n=r.toLowerCase().replace("//","-").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").replace(/ /g,"-").replace("\xED","i").replace(/[^a-z0-9 -]/g,"").replace(/--/,"-"),a="";switch(i){case"1":case 1:a=t?"-1":"-red";break;case"2":case 2:a=t?"-2":"-yellow";break;case"3":case 3:a=t?"-3":"-blue";break}return`${n}${a}`},Nt=(e,t)=>{let r=Re(e,t),i=["Demi-Hero","Equipment","Weapon"].some(n=>e.includes(n));return!r&&i},Re=(e,t)=>{let r=["Action","Attack Reaction","Block","Defense Reaction","Instant","Mentor","Resource"].some(n=>e.includes(n)),i=!t||!t.includes("Ephemeral");return r&&i},ai=(e,t)=>{let r=Nt(e,t),i=Re(e,t);return r||i},oi=e=>{var t,r;return((t=e.keywords)==null?void 0:t.includes("Meld"))||((r=e.subtypes)==null?void 0:r.includes("Landmark"))||!1},Ie={wtr:"Welcome to Rathe",arc:"Arcane Rising",cru:"Crucible of War",mon:"Monarch",ele:"Tales of Aria",evr:"Everfest","1hp":"History Pack 1",hp1:"History Pack 1",upr:"Uprising",dyn:"Dynasty",out:"Outsiders",dtd:"Dusk till Dawn",evo:"Bright Lights",hvy:"Heavy Hitters",mst:"Part the Mistveil",ros:"Rosetta"},$t=ei(qr({},Ie),{ako:"Armory Deck: Kayo",asb:"Armory Deck: Boltyn",aaz:"Armory Deck: Azalea",ara:"Arakni Blitz Deck",azl:"Azalea Blitz Deck",ben:"Benji Blitz Deck",bet:"Betsy Blitz Deck",bol:"Boltyn Blitz Deck",bri:"Briar Blitz Deck",bvo:"Bravo Blitz Deck",chn:"Chane Blitz Deck",dro:"Dromai Blitz Deck",eng:"Enigma Blitz Deck",fai:"Fai Blitz Deck",kat:"Katsu Blitz Deck",ksi:"Kassai Blitz Deck",kyo:"Kayo Blitz Deck",lev:"Levia Blitz Deck",lxi:"Lexi Blitz Deck",nuu:"Nuu Blitz Deck",old:"Oldhim Blitz Deck",ola:"Olympia Blitz Deck",psm:"Prism Blitz Deck",rip:"Riptide Blitz Deck",rnr:"Rhinar Blitz Deck",uzu:"Uzuri Blitz Deck",vic:"Victor Blitz Deck",zen:"Zen Blitz Deck",aur:"1st Strike: Aurora",ter:"1st Strike: Terra",dvr:"Classic Battles: Rhinar vs Dorinthea",rvd:"Classic Battles: Rhinar vs Dorinthea",ira:"Ira Welcome Deck",tcc:"Round the Table",tea:"Dorinthea Hero Deck",ksu:"Katsu Hero Deck",rnr2:"Rhinar Hero Deck",fab:"Promos",her:"Promos",jdg:"Promos",lgs:"Promos",lss:"Promos",oxo:"Promos",xxx:"Promos",win:"Promos"}),De={};for(let[e,t]of Object.entries($t)){let r=De[t];r?r.push(e):De[t]=[e]}var si=De,ci={"Rhinar Blitz Deck":"-Blitz"},li={MST158_V3:"-V3",ROS162_V2:"-V2"},ui=e=>{var t,r;let i=ci[e.set]||"",n=`${e.identifier}${i}`,a=e.edition?`-${e.edition}`:"",s=e.foiling?`-${e.foiling}`:"",o=e.treatment?`-${e.treatment}`:"",c=(t=e.image)!=null&&t.toLowerCase().includes("back")?"-Back":"",l=li[((r=e.image)==null?void 0:r.toUpperCase())||""]||"";return`${n}${a}${s}${o}${c}${l}`},di=Object.keys(Ie).filter(e=>!e.toLowerCase().includes("hp")).reverse().map(e=>e.toUpperCase()),fi={"command-and-conquer-red":{print:"DYN000-Cold"},"cracked-bauble-yellow":{print:"LGS083-Cold"},"fate-foreseen-red":{print:"FAB024-Rainbow"},"pitfall-trap-yellow":{print:"LGS151-Rainbow"},quicken:{print:"EVO250"},"ravenous-rabble-red":{print:"FAB190-Rainbow-Extended Art"},"rockslide-trap-blue":{print:"LGS152-Rainbow"},"sigil-of-solace-red":{print:"FAB178-Rainbow-Extended Art"},"spectral-shield":{print:"MST158-Alternate Art-V3"},"tripwire-trap-red":{print:"LGS150-Rainbow"},"viserai-rune-blood":{print:"HER011-Cold"}},hi=(e,t)=>{let{cardIdentifier:r}=e,i=Object.entries(fi).find(([n])=>n===r);if(i){let[,{print:n}]=i;return t.find(a=>a.print===n)||t[0]}else{let n,a,s,o,c,l,u,f,d,g,m,h,v,p,C,w,y,F;for(let b of t){let{edition:S,foiling:x,identifier:L,image:z,treatment:T}=b,D=L.toLowerCase().includes("win");if(z&&!D){if(n||(n=b),T==="Alternate Art")a=b;else if(T==="Alternate Border")s=b;else if(T==="Alternate Text")o=b;else if(T==="Extended Art")u=b,x==="Cold"&&(c=b),x||(d=b),S==="Promo"&&(g=b);else if(T==="Full Art"){f=b,x==="Cold"&&(l=b);break}z&&z.includes("_V2")&&(m=b),S==="Alpha"?h=b:S==="First"?v=b:S==="Promo"?p=b:S==="Unlimited"&&(C=b),x==="Cold"?(w=b,S==="Promo"&&(F=b)):x==="Gold"&&(y=b)}}return l||f||c||g||d||u||s||a||o||m||F||h||v||p||C||y||w||n}},pi={"command-and-conquer-red":{print:"ARC159-Unlimited"},"pitfall-trap-yellow":{print:"LGS151-Rainbow"},"rockslide-trap-blue":{print:"LGS152-Rainbow"},"spectral-shield":{print:"MST158"},"tripwire-trap-red":{print:"LGS150-Rainbow"}},gi=(e,t)=>{let{cardIdentifier:r}=e,i=Object.entries(pi).find(([n])=>n===r);if(i){let[,{print:n}]=i;return t.find(a=>a.print===n)||t[0]}else{let n,a;for(let s of t){let{edition:o,image:c,treatment:l}=s;if(c&&(n||(n=s),!a&&o!=="Promo"&&(a=s)),n&&a)break}return a||n||t[0]}}});var ar=yt((ea,nr)=>{"use strict";function Gt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gt(Object(r),!0).forEach(function(i){Oe(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gt(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function _e(e){"@babel/helpers - typeof";return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_e(e)}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wt(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function E(e,t,r){return t&&Wt(e.prototype,t),r&&Wt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&ze(e,t)}function pe(e){return pe=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},pe(e)}function ze(e,t){return ze=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},ze(e,t)}function mi(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function vi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yi(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vi(e)}function J(e){var t=mi();return function(){var i=pe(e),n;if(t){var a=pe(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return yi(this,n)}}function re(e){return bi(e)||ki(e)||Ci(e)||Mi()}function bi(e){if(Array.isArray(e))return Ne(e)}function ki(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ci(e,t){if(e){if(typeof e=="string")return Ne(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ne(e,t)}}function Ne(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function Mi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y(e){return Array.isArray?Array.isArray(e):Zt(e)==="[object Array]"}var Ai=1/0;function Si(e){if(typeof e=="string")return e;var t=e+"";return t=="0"&&1/e==-Ai?"-0":t}function wi(e){return e==null?"":Si(e)}function H(e){return typeof e=="string"}function Qt(e){return typeof e=="number"}function Fi(e){return e===!0||e===!1||xi(e)&&Zt(e)=="[object Boolean]"}function Jt(e){return _e(e)==="object"}function xi(e){return Jt(e)&&e!==null}function _(e){return e!=null}function Ee(e){return!e.trim().length}function Zt(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var Bi="Incorrect 'index' type",Li=function(t){return"Invalid value for key ".concat(t)},Ti=function(t){return"Pattern length exceeds max of ".concat(t,".")},Pi=function(t){return"Missing ".concat(t," property in key")},Di=function(t){return"Property 'weight' in key '".concat(t,"' must be a positive integer")},jt=Object.prototype.hasOwnProperty,Ri=function(){function e(t){var r=this;I(this,e),this._keys=[],this._keyMap={};var i=0;t.forEach(function(n){var a=Xt(n);i+=a.weight,r._keys.push(a),r._keyMap[a.id]=a,i+=a.weight}),this._keys.forEach(function(n){n.weight/=i})}return E(e,[{key:"get",value:function(r){return this._keyMap[r]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function Xt(e){var t=null,r=null,i=null,n=1,a=null;if(H(e)||Y(e))i=e,t=Kt(e),r=$e(e);else{if(!jt.call(e,"name"))throw new Error(Pi("name"));var s=e.name;if(i=s,jt.call(e,"weight")&&(n=e.weight,n<=0))throw new Error(Di(s));t=Kt(s),r=$e(s),a=e.getFn}return{path:t,id:r,weight:n,src:i,getFn:a}}function Kt(e){return Y(e)?e:e.split(".")}function $e(e){return Y(e)?e.join("."):e}function Ii(e,t){var r=[],i=!1,n=function a(s,o,c){if(_(s))if(!o[c])r.push(s);else{var l=o[c],u=s[l];if(!_(u))return;if(c===o.length-1&&(H(u)||Qt(u)||Fi(u)))r.push(wi(u));else if(Y(u)){i=!0;for(var f=0,d=u.length;f<d;f+=1)a(u[f],o,c+1)}else o.length&&a(u,o,c+1)}};return n(e,H(t)?t.split("."):t,0),i?r:r[0]}var Ei={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},_i={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(t,r){return t.score===r.score?t.idx<r.idx?-1:1:t.score<r.score?-1:1}},Oi={location:0,threshold:.6,distance:100},zi={useExtendedSearch:!1,getFn:Ii,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},M=ne(ne(ne(ne({},_i),Ei),Oi),zi),Ni=/[^ ]+/g;function $i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,r=new Map,i=Math.pow(10,t);return{get:function(a){var s=a.match(Ni).length;if(r.has(s))return r.get(s);var o=1/Math.pow(s,.5*e),c=parseFloat(Math.round(o*i)/i);return r.set(s,c),c},clear:function(){r.clear()}}}var Ke=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getFn,i=r===void 0?M.getFn:r,n=t.fieldNormWeight,a=n===void 0?M.fieldNormWeight:n;I(this,e),this.norm=$i(a,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return E(e,[{key:"setSources",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.docs=r}},{key:"setIndexRecords",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.records=r}},{key:"setKeys",value:function(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.keys=i,this._keysMap={},i.forEach(function(n,a){r._keysMap[n.id]=a})}},{key:"create",value:function(){var r=this;this.isCreated||!this.docs.length||(this.isCreated=!0,H(this.docs[0])?this.docs.forEach(function(i,n){r._addString(i,n)}):this.docs.forEach(function(i,n){r._addObject(i,n)}),this.norm.clear())}},{key:"add",value:function(r){var i=this.size();H(r)?this._addString(r,i):this._addObject(r,i)}},{key:"removeAt",value:function(r){this.records.splice(r,1);for(var i=r,n=this.size();i<n;i+=1)this.records[i].i-=1}},{key:"getValueForItemAtKeyId",value:function(r,i){return r[this._keysMap[i]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(r,i){if(!(!_(r)||Ee(r))){var n={v:r,i,n:this.norm.get(r)};this.records.push(n)}}},{key:"_addObject",value:function(r,i){var n=this,a={i,$:{}};this.keys.forEach(function(s,o){var c=s.getFn?s.getFn(r):n.getFn(r,s.path);if(_(c)){if(Y(c))(function(){for(var u=[],f=[{nestedArrIndex:-1,value:c}];f.length;){var d=f.pop(),g=d.nestedArrIndex,m=d.value;if(_(m))if(H(m)&&!Ee(m)){var h={v:m,i:g,n:n.norm.get(m)};u.push(h)}else Y(m)&&m.forEach(function(v,p){f.push({nestedArrIndex:p,value:v})})}a.$[o]=u})();else if(H(c)&&!Ee(c)){var l={v:c,n:n.norm.get(c)};a.$[o]=l}}}),this.records.push(a)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function qt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.getFn,n=i===void 0?M.getFn:i,a=r.fieldNormWeight,s=a===void 0?M.fieldNormWeight:a,o=new Ke({getFn:n,fieldNormWeight:s});return o.setKeys(e.map(Xt)),o.setSources(t),o.create(),o}function Hi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.getFn,i=r===void 0?M.getFn:r,n=t.fieldNormWeight,a=n===void 0?M.fieldNormWeight:n,s=e.keys,o=e.records,c=new Ke({getFn:i,fieldNormWeight:a});return c.setKeys(s),c.setIndexRecords(o),c}function he(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.errors,i=r===void 0?0:r,n=t.currentLocation,a=n===void 0?0:n,s=t.expectedLocation,o=s===void 0?0:s,c=t.distance,l=c===void 0?M.distance:c,u=t.ignoreLocation,f=u===void 0?M.ignoreLocation:u,d=i/e.length;if(f)return d;var g=Math.abs(o-a);return l?d+g/l:g?1:d}function Gi(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:M.minMatchCharLength,r=[],i=-1,n=-1,a=0,s=e.length;a<s;a+=1){var o=e[a];o&&i===-1?i=a:!o&&i!==-1&&(n=a-1,n-i+1>=t&&r.push([i,n]),i=-1)}return e[a-1]&&a-i>=t&&r.push([i,a-1]),r}var te=32;function Wi(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i.location,a=n===void 0?M.location:n,s=i.distance,o=s===void 0?M.distance:s,c=i.threshold,l=c===void 0?M.threshold:c,u=i.findAllMatches,f=u===void 0?M.findAllMatches:u,d=i.minMatchCharLength,g=d===void 0?M.minMatchCharLength:d,m=i.includeMatches,h=m===void 0?M.includeMatches:m,v=i.ignoreLocation,p=v===void 0?M.ignoreLocation:v;if(t.length>te)throw new Error(Ti(te));for(var C=t.length,w=e.length,y=Math.max(0,Math.min(a,w)),F=l,b=y,S=g>1||h,x=S?Array(w):[],L;(L=e.indexOf(t,b))>-1;){var z=he(t,{currentLocation:L,expectedLocation:y,distance:o,ignoreLocation:p});if(F=Math.min(z,F),b=L+C,S)for(var T=0;T<C;)x[L+T]=1,T+=1}b=-1;for(var D=[],R=1,N=C+w,Le=1<<C-1,q=0;q<C;q+=1){for(var ue=0,V=N;ue<V;){var Or=he(t,{errors:q,currentLocation:y+V,expectedLocation:y,distance:o,ignoreLocation:p});Or<=F?ue=V:N=V,V=Math.floor((N-ue)/2+ue)}N=V;var ft=Math.max(1,y-V+1),Te=f?w:Math.min(y+V,w)+C,ie=Array(Te+2);ie[Te+1]=(1<<q)-1;for(var $=Te;$>=ft;$-=1){var de=$-1,ht=r[e.charAt(de)];if(S&&(x[de]=+!!ht),ie[$]=(ie[$+1]<<1|1)&ht,q&&(ie[$]|=(D[$+1]|D[$])<<1|1|D[$+1]),ie[$]&Le&&(R=he(t,{errors:q,currentLocation:de,expectedLocation:y,distance:o,ignoreLocation:p}),R<=F)){if(F=R,b=de,b<=y)break;ft=Math.max(1,2*y-b)}}var zr=he(t,{errors:q+1,currentLocation:y,expectedLocation:y,distance:o,ignoreLocation:p});if(zr>F)break;D=ie}var Pe={isMatch:b>=0,score:Math.max(.001,R)};if(S){var pt=Gi(x,g);pt.length?h&&(Pe.indices=pt):Pe.isMatch=!1}return Pe}function ji(e){for(var t={},r=0,i=e.length;r<i;r+=1){var n=e.charAt(r);t[n]=(t[n]||0)|1<<i-r-1}return t}var er=function(){function e(t){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.location,a=n===void 0?M.location:n,s=i.threshold,o=s===void 0?M.threshold:s,c=i.distance,l=c===void 0?M.distance:c,u=i.includeMatches,f=u===void 0?M.includeMatches:u,d=i.findAllMatches,g=d===void 0?M.findAllMatches:d,m=i.minMatchCharLength,h=m===void 0?M.minMatchCharLength:m,v=i.isCaseSensitive,p=v===void 0?M.isCaseSensitive:v,C=i.ignoreLocation,w=C===void 0?M.ignoreLocation:C;if(I(this,e),this.options={location:a,threshold:o,distance:l,includeMatches:f,findAllMatches:g,minMatchCharLength:h,isCaseSensitive:p,ignoreLocation:w},this.pattern=p?t:t.toLowerCase(),this.chunks=[],!!this.pattern.length){var y=function(T,D){r.chunks.push({pattern:T,alphabet:ji(T),startIndex:D})},F=this.pattern.length;if(F>te){for(var b=0,S=F%te,x=F-S;b<x;)y(this.pattern.substr(b,te),b),b+=te;if(S){var L=F-te;y(this.pattern.substr(L),L)}}else y(this.pattern,0)}}return E(e,[{key:"searchIn",value:function(r){var i=this.options,n=i.isCaseSensitive,a=i.includeMatches;if(n||(r=r.toLowerCase()),this.pattern===r){var s={isMatch:!0,score:0};return a&&(s.indices=[[0,r.length-1]]),s}var o=this.options,c=o.location,l=o.distance,u=o.threshold,f=o.findAllMatches,d=o.minMatchCharLength,g=o.ignoreLocation,m=[],h=0,v=!1;this.chunks.forEach(function(C){var w=C.pattern,y=C.alphabet,F=C.startIndex,b=Wi(r,w,y,{location:c+F,distance:l,threshold:u,findAllMatches:f,minMatchCharLength:d,includeMatches:a,ignoreLocation:g}),S=b.isMatch,x=b.score,L=b.indices;S&&(v=!0),h+=x,S&&L&&(m=[].concat(re(m),re(L)))});var p={isMatch:v,score:v?h/this.chunks.length:1};return v&&a&&(p.indices=m),p}}]),e}(),Z=function(){function e(t){I(this,e),this.pattern=t}return E(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(r){return Ut(r,this.multiRegex)}},{key:"isSingleMatch",value:function(r){return Ut(r,this.singleRegex)}}]),e}();function Ut(e,t){var r=e.match(t);return r?r[1]:null}var Ki=function(e){Q(r,e);var t=J(r);function r(i){return I(this,r),t.call(this,i)}return E(r,[{key:"search",value:function(n){var a=n===this.pattern;return{isMatch:a,score:a?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),r}(Z),Ui=function(e){Q(r,e);var t=J(r);function r(i){return I(this,r),t.call(this,i)}return E(r,[{key:"search",value:function(n){var a=n.indexOf(this.pattern),s=a===-1;return{isMatch:s,score:s?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),r}(Z),Yi=function(e){Q(r,e);var t=J(r);function r(i){return I(this,r),t.call(this,i)}return E(r,[{key:"search",value:function(n){var a=n.startsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),r}(Z),Vi=function(e){Q(r,e);var t=J(r);function r(i){return I(this,r),t.call(this,i)}return E(r,[{key:"search",value:function(n){var a=!n.startsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),r}(Z),Qi=function(e){Q(r,e);var t=J(r);function r(i){return I(this,r),t.call(this,i)}return E(r,[{key:"search",value:function(n){var a=n.endsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[n.length-this.pattern.length,n.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),r}(Z),Ji=function(e){Q(r,e);var t=J(r);function r(i){return I(this,r),t.call(this,i)}return E(r,[{key:"search",value:function(n){var a=!n.endsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),r}(Z),tr=function(e){Q(r,e);var t=J(r);function r(i){var n,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.location,o=s===void 0?M.location:s,c=a.threshold,l=c===void 0?M.threshold:c,u=a.distance,f=u===void 0?M.distance:u,d=a.includeMatches,g=d===void 0?M.includeMatches:d,m=a.findAllMatches,h=m===void 0?M.findAllMatches:m,v=a.minMatchCharLength,p=v===void 0?M.minMatchCharLength:v,C=a.isCaseSensitive,w=C===void 0?M.isCaseSensitive:C,y=a.ignoreLocation,F=y===void 0?M.ignoreLocation:y;return I(this,r),n=t.call(this,i),n._bitapSearch=new er(i,{location:o,threshold:l,distance:f,includeMatches:g,findAllMatches:h,minMatchCharLength:p,isCaseSensitive:w,ignoreLocation:F}),n}return E(r,[{key:"search",value:function(n){return this._bitapSearch.searchIn(n)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),r}(Z),rr=function(e){Q(r,e);var t=J(r);function r(i){return I(this,r),t.call(this,i)}return E(r,[{key:"search",value:function(n){for(var a=0,s,o=[],c=this.pattern.length;(s=n.indexOf(this.pattern,a))>-1;)a=s+c,o.push([s,a-1]);var l=!!o.length;return{isMatch:l,score:l?0:1,indices:o}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),r}(Z),He=[Ki,rr,Yi,Vi,Ji,Qi,Ui,tr],Yt=He.length,Zi=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Xi="|";function qi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.split(Xi).map(function(r){for(var i=r.trim().split(Zi).filter(function(m){return m&&!!m.trim()}),n=[],a=0,s=i.length;a<s;a+=1){for(var o=i[a],c=!1,l=-1;!c&&++l<Yt;){var u=He[l],f=u.isMultiMatch(o);f&&(n.push(new u(f,t)),c=!0)}if(!c)for(l=-1;++l<Yt;){var d=He[l],g=d.isSingleMatch(o);if(g){n.push(new d(g,t));break}}}return n})}var en=new Set([tr.type,rr.type]),tn=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.isCaseSensitive,n=i===void 0?M.isCaseSensitive:i,a=r.includeMatches,s=a===void 0?M.includeMatches:a,o=r.minMatchCharLength,c=o===void 0?M.minMatchCharLength:o,l=r.ignoreLocation,u=l===void 0?M.ignoreLocation:l,f=r.findAllMatches,d=f===void 0?M.findAllMatches:f,g=r.location,m=g===void 0?M.location:g,h=r.threshold,v=h===void 0?M.threshold:h,p=r.distance,C=p===void 0?M.distance:p;I(this,e),this.query=null,this.options={isCaseSensitive:n,includeMatches:s,minMatchCharLength:c,findAllMatches:d,ignoreLocation:u,location:m,threshold:v,distance:C},this.pattern=n?t:t.toLowerCase(),this.query=qi(this.pattern,this.options)}return E(e,[{key:"searchIn",value:function(r){var i=this.query;if(!i)return{isMatch:!1,score:1};var n=this.options,a=n.includeMatches,s=n.isCaseSensitive;r=s?r:r.toLowerCase();for(var o=0,c=[],l=0,u=0,f=i.length;u<f;u+=1){var d=i[u];c.length=0,o=0;for(var g=0,m=d.length;g<m;g+=1){var h=d[g],v=h.search(r),p=v.isMatch,C=v.indices,w=v.score;if(p){if(o+=1,l+=w,a){var y=h.constructor.type;en.has(y)?c=[].concat(re(c),re(C)):c.push(C)}}else{l=0,o=0,c.length=0;break}}if(o){var F={isMatch:!0,score:l/o};return a&&(F.indices=c),F}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(r,i){return i.useExtendedSearch}}]),e}(),ge=[];function rn(){ge.push.apply(ge,arguments)}function Ge(e,t){for(var r=0,i=ge.length;r<i;r+=1){var n=ge[r];if(n.condition(e,t))return new n(e,t)}return new er(e,t)}var me={AND:"$and",OR:"$or"},We={PATH:"$path",PATTERN:"$val"},je=function(t){return!!(t[me.AND]||t[me.OR])},nn=function(t){return!!t[We.PATH]},an=function(t){return!Y(t)&&Jt(t)&&!je(t)},Vt=function(t){return Oe({},me.AND,Object.keys(t).map(function(r){return Oe({},r,t[r])}))};function ir(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.auto,n=i===void 0?!0:i,a=function s(o){var c=Object.keys(o),l=nn(o);if(!l&&c.length>1&&!je(o))return s(Vt(o));if(an(o)){var u=l?o[We.PATH]:c[0],f=l?o[We.PATTERN]:o[u];if(!H(f))throw new Error(Li(u));var d={keyId:$e(u),pattern:f};return n&&(d.searcher=Ge(f,t)),d}var g={children:[],operator:c[0]};return c.forEach(function(m){var h=o[m];Y(h)&&h.forEach(function(v){g.children.push(s(v))})}),g};return je(e)||(e=Vt(e)),a(e)}function on(e,t){var r=t.ignoreFieldNorm,i=r===void 0?M.ignoreFieldNorm:r;e.forEach(function(n){var a=1;n.matches.forEach(function(s){var o=s.key,c=s.norm,l=s.score,u=o?o.weight:null;a*=Math.pow(l===0&&u?Number.EPSILON:l,(u||1)*(i?1:c))}),n.score=a})}function sn(e,t){var r=e.matches;t.matches=[],_(r)&&r.forEach(function(i){if(!(!_(i.indices)||!i.indices.length)){var n=i.indices,a=i.value,s={indices:n,value:a};i.key&&(s.key=i.key.src),i.idx>-1&&(s.refIndex=i.idx),t.matches.push(s)}})}function cn(e,t){t.score=e.score}function ln(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.includeMatches,n=i===void 0?M.includeMatches:i,a=r.includeScore,s=a===void 0?M.includeScore:a,o=[];return n&&o.push(sn),s&&o.push(cn),e.map(function(c){var l=c.idx,u={item:t[l],refIndex:l};return o.length&&o.forEach(function(f){f(c,u)}),u})}var ae=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;I(this,e),this.options=ne(ne({},M),r),this.options.useExtendedSearch,this._keyStore=new Ri(this.options.keys),this.setCollection(t,i)}return E(e,[{key:"setCollection",value:function(r,i){if(this._docs=r,i&&!(i instanceof Ke))throw new Error(Bi);this._myIndex=i||qt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(r){_(r)&&(this._docs.push(r),this._myIndex.add(r))}},{key:"remove",value:function(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){return!1},i=[],n=0,a=this._docs.length;n<a;n+=1){var s=this._docs[n];r(s,n)&&(this.removeAt(n),n-=1,a-=1,i.push(s))}return i}},{key:"removeAt",value:function(r){this._docs.splice(r,1),this._myIndex.removeAt(r)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.limit,a=n===void 0?-1:n,s=this.options,o=s.includeMatches,c=s.includeScore,l=s.shouldSort,u=s.sortFn,f=s.ignoreFieldNorm,d=H(r)?H(this._docs[0])?this._searchStringList(r):this._searchObjectList(r):this._searchLogical(r);return on(d,{ignoreFieldNorm:f}),l&&d.sort(u),Qt(a)&&a>-1&&(d=d.slice(0,a)),ln(d,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(r){var i=Ge(r,this.options),n=this._myIndex.records,a=[];return n.forEach(function(s){var o=s.v,c=s.i,l=s.n;if(_(o)){var u=i.searchIn(o),f=u.isMatch,d=u.score,g=u.indices;f&&a.push({item:o,idx:c,matches:[{score:d,value:o,norm:l,indices:g}]})}}),a}},{key:"_searchLogical",value:function(r){var i=this,n=ir(r,this.options),a=function l(u,f,d){if(!u.children){var g=u.keyId,m=u.searcher,h=i._findMatches({key:i._keyStore.get(g),value:i._myIndex.getValueForItemAtKeyId(f,g),searcher:m});return h&&h.length?[{idx:d,item:f,matches:h}]:[]}for(var v=[],p=0,C=u.children.length;p<C;p+=1){var w=u.children[p],y=l(w,f,d);if(y.length)v.push.apply(v,re(y));else if(u.operator===me.AND)return[]}return v},s=this._myIndex.records,o={},c=[];return s.forEach(function(l){var u=l.$,f=l.i;if(_(u)){var d=a(n,u,f);d.length&&(o[f]||(o[f]={idx:f,item:u,matches:[]},c.push(o[f])),d.forEach(function(g){var m,h=g.matches;(m=o[f].matches).push.apply(m,re(h))}))}}),c}},{key:"_searchObjectList",value:function(r){var i=this,n=Ge(r,this.options),a=this._myIndex,s=a.keys,o=a.records,c=[];return o.forEach(function(l){var u=l.$,f=l.i;if(_(u)){var d=[];s.forEach(function(g,m){d.push.apply(d,re(i._findMatches({key:g,value:u[m],searcher:n})))}),d.length&&c.push({idx:f,item:u,matches:d})}}),c}},{key:"_findMatches",value:function(r){var i=r.key,n=r.value,a=r.searcher;if(!_(n))return[];var s=[];if(Y(n))n.forEach(function(g){var m=g.v,h=g.i,v=g.n;if(_(m)){var p=a.searchIn(m),C=p.isMatch,w=p.score,y=p.indices;C&&s.push({score:w,key:i,value:m,idx:h,norm:v,indices:y})}});else{var o=n.v,c=n.n,l=a.searchIn(o),u=l.isMatch,f=l.score,d=l.indices;u&&s.push({score:f,key:i,value:o,norm:c,indices:d})}return s}}]),e}();ae.version="6.6.2";ae.createIndex=qt;ae.parseIndex=Hi;ae.config=M;ae.parseQuery=ir;rn(tn);var un=ae;nr.exports=un});var Zn={};Ur(Zn,{PUNCTUATION:()=>A,abbreviations:()=>Ve,availableExclusions:()=>Lr,availableModifiers:()=>Br,clashBannedCards:()=>Ue,clashLegalCards:()=>dn,clashSpecializationOverrides:()=>Ye,default:()=>Dr,filterCard:()=>Rr,filtersToCardPropertyMappings:()=>Fe,getAbbreviation:()=>ye,getAbbreviationByCard:()=>fn,getCardByName:()=>at,getCleanText:()=>ot,getExcludedMetaFilters:()=>Je,getHeroBreakdown:()=>Yn,getKeywordsAndAppliedFiltersFromText:()=>nt,getMetaFilters:()=>Qe,getNormalizedText:()=>le,getRelatedCards:()=>dt,getRelatedCardsByName:()=>xe,getTokensReferencedByCards:()=>Jn,multiWordShorthands:()=>Xe,shorthands:()=>Ze,singleWordShorthands:()=>qe});module.exports=Yr(Zn);var O=K(U()),st=K(ar());var ve=K(U()),Ue=["Amulet of Ice","Ball Lightning","Belittle","Drone of Brutality","Duskblade","Rosetta Thorn","Stubby Hammerers"],dn=[],Ye=[{heroes:[ve.Hero.Briar],cardIdentifiers:["rosetta-thorn"]},{heroes:[ve.Hero.Emperor],cardIdentifiers:["command-and-conquer-red"]},{heroes:[ve.Hero.Prism],cardIdentifiers:["figment-of-erudition-yellow","figment-of-judgment-yellow","figment-of-protection-yellow","figment-of-ravages-yellow","figment-of-rebirth-yellow","figment-of-tenacity-yellow","figment-of-triumph-yellow","figment-of-war-yellow"]}];var A=/[!"#$%&'’(),./:;<=>?@[\]^_`|~]/g;var k=K(U());var ye=e=>Ve.find(({abbreviations:t})=>t.find(r=>r.toLowerCase()===e)),fn=e=>Ve.find(({card:t})=>t.toLowerCase()===e.name.toLowerCase()),Ve=[{abbreviations:["10k"],card:"10,000 Year Reunion"},{abbreviations:["3oak"],card:"Three of a Kind"},{abbreviations:["ALS"],card:"Arc Light Sentinel"},{abbreviations:["AoW"],card:"Art of War"},{abbreviations:["BBD"],card:"Barraging Beatdown"},{abbreviations:["BBS"],card:"Big Blue Sky"},{abbreviations:["Starvo"],card:"Bravo, Star of the Show"},{abbreviations:["BEB"],card:"Bull's Eye Bracers"},{abbreviations:["BLW"],card:"Be Like Water"},{abbreviations:["BoJ"],card:"Balance of Justice"},{abbreviations:["BOHH"],card:"Blood on Her Hands"},{abbreviations:["BRB"],card:"Bloodrush Bellow"},{abbreviations:["Breezies"],card:"Breeze Rider Boots"},{abbreviations:["BTA"],card:"Burn Them All"},{abbreviations:["Cake","\u{1F382}"],card:"Ninth Blade of the Blood Oath"},{abbreviations:["CLF"],card:"Channel Lake Frigid"},{abbreviations:["CMH"],card:"Channel Mount Heroic"},{abbreviations:["CnC","C&C"],card:"Command and Conquer"},{abbreviations:["CStrike","C-Strike","C Strike"],card:"Celestial Cataclysm"},{abbreviations:["Cat","Kitty"],card:"Crouching Tiger"},{abbreviations:["CoD"],card:"Crown of Dominion"},{abbreviations:["CoP"],card:"Crown of Providence"},{abbreviations:["CtW"],card:"Crush the Weak"},{abbreviations:["DD"],card:"Death Dealer"},{abbreviations:["DPot","D Pot"],card:"Potion of Deja Vu"},{abbreviations:["Dullcap"],card:"Arcanite Skullcap"},{abbreviations:["EBTT"],card:"Even Bigger Than That!"},{abbreviations:["NewNigma"],card:"Enigma, New Moon"},{abbreviations:["EPot","E Pot"],card:"Energy Potion"},{abbreviations:["EStrike","E-Strike","E Strike"],card:"Enlightened Strike"},{abbreviations:["FFS"],card:"Fyendal's Fighting Spirit"},{abbreviations:["FoN"],card:"Force of Nature"},{abbreviations:["Frosty","\u{1F976}","\u{1F9CA}","\u2744\uFE0F"],card:"Frostbite"},{abbreviations:["Frosty Hammer"],card:"Winter's Wail"},{abbreviations:["GnT"],card:"Give and Take"},{abbreviations:["HMH"],card:"Hope Merchant's Hood"},{abbreviations:["HoI"],card:"Heart of Ice"},{abbreviations:["KKBB"],card:"Knick Knack Bric-a-brac"},{abbreviations:["BStrike"],card:"Levels of Enlightenment"},{abbreviations:["LAG","Twominaris"],card:"Luminaris, Angel's Glow"},{abbreviations:["LCF","Newminaris"],card:"Luminaris, Celestial Fury"},{abbreviations:["LDE"],card:"Last Ditch Effort"},{abbreviations:["LFaL","L4aL"],card:"Life for a Life"},{abbreviations:["LiT"],card:"Lost in Thought"},{abbreviations:["LNW"],card:"Leave No Witnesses"},{abbreviations:["LoW"],card:"Lord of Wind"},{abbreviations:["LtC"],card:"Lead the Charge"},{abbreviations:["MaxV"],card:"Maximum Velocity"},{abbreviations:["MMB"],card:"Mage Master Boots"},{abbreviations:["MnG"],card:"Meat and Greet"},{abbreviations:["MoM"],card:"Mask of Momentum"},{abbreviations:["Pajamas","PJs"],card:"Alluvion Constellas"},{abbreviations:["Ponder Run"],card:"Premeditate"},{abbreviations:["PF","\u{1F525}"],card:"Phoenix Flame"},{abbreviations:["PoM"],card:"Peace of Mind"},{abbreviations:["Pumpkin"],card:"Jack-o'-lantern"},{abbreviations:["Qi Unbound"],card:"Qi Unleashed"},{abbreviations:["RitL"],card:"Red in the Ledger"},{abbreviations:["Cats","Ghost cat","Ghost cats"],card:"Restless Coalescence"},{abbreviations:["SFaF","S4aS"],card:"Scar for a Scar"},{abbreviations:["SWOMB"],card:"Shifting Winds of the Mystic Beast"},{abbreviations:["SWK"],card:"Spinning Wheel Kick"},{abbreviations:["SSGB"],card:"Sandscour Greatbow"},{abbreviations:["SSP"],card:"Sand Sketched Plan"},{abbreviations:["SFTL"],card:"Swing Fist, Think Later"},{abbreviations:["Thanos","Infinity Gauntlet"],card:"Polarity Reversal Script"},{abbreviations:["TAYG"],card:"That All You Got?"},{abbreviations:["ToS"],card:"Test of Strength"},{abbreviations:["TROM"],card:"This Round's on Me"},{abbreviations:["TTT"],card:"Take the Tempo"},{abbreviations:["Ultron"],card:"Teklovossen, the Mechropotent"},{abbreviations:["Pox Malone","Post Malone"],card:"Virulent Touch"},{abbreviations:["Cast Homes"],card:"Visit Goldmane Estate"},{abbreviations:["ZTS"],card:"Zero to Sixty"}];var P=K(U());var Me=Array.from(Array(50).keys()).map(e=>`${e}`),hn=[{format:P.Format.Blitz.toLowerCase().replaceAll(A,"")},{format:P.Format.BlitzLivingLegend.toLowerCase().replaceAll(A,""),nicknames:["blitz ll"]},{format:P.Format.Clash.toLowerCase().replaceAll(A,"")},{format:P.Format.ClassicConstructed.toLowerCase().replaceAll(A,""),nicknames:["cc","classic"]},{format:P.Format.ClassicConstructedLivingLegend.toLowerCase().replaceAll(A,""),nicknames:["cc ll","classic constructed ll","ll cc","ll","living legend"]},{format:P.Format.Commoner.toLowerCase().replaceAll(A,"")},{format:P.Format.UltimatePitFight.toLowerCase().replaceAll(A,""),nicknames:["upf"]}],pn=[{hero:P.Hero.DataDoll,nicknames:["data","datadoll"]},{hero:P.Hero.Dorinthea,nicknames:["dori"]},{hero:P.Hero.GenisWotchuneed,nicknames:["genis"]},{hero:P.Hero.Iyslander,nicknames:["islander"]}],gn=Object.values(P.Hero).map(e=>{let t=pn.find(({hero:i})=>i===e),r=e.toLowerCase().replaceAll(A,"");return t?ee(j({},t),{hero:r}):{hero:r}}),be=["common","rare","super rare","majestic","legendary","fabled"],mn=(e,t,r)=>{let i=[];if(!t)i.push(...e);else for(let n of e)switch(t){case">=":let a=!1;for(let l of be)a?i.push(l):l===n&&(a=!0,i.push(l));break;case">":let s=!1;for(let l of be)s?i.push(l):l===n&&(s=!0);break;case"<=":let o=!1;for(let l of be.slice().reverse())o?i.push(l):l===n&&(o=!0,i.push(l));break;case"<":let c=!1;for(let l of be.slice().reverse())c?i.push(l):l===n&&(c=!0);break;default:break}return{filterToPropertyMapping:{property:"rarities",isArray:!0},isOr:!0,values:i,excluded:r}},vn=(e,t)=>{let r=[],i=[],n=[];for(let a of e){let s=hn.find(({format:o,nicknames:c})=>o===a||!!c&&c.includes(a));if(s)i.push(s.format);else{let o=gn.find(({hero:c,nicknames:l})=>c===a||!!l&&l.includes(a));o&&n.push(o.hero)}}return i.length>0&&r.push({filterToPropertyMapping:{property:"legalFormats",isArray:!0},values:i,isOr:!0,excluded:t}),n.length>0&&r.push({filterToPropertyMapping:{property:"legalHeroes",isArray:!0},values:n,isOr:!0,excluded:t}),r},Qe=(e,t,r,i)=>{let n=[];return kn(t)?n.push(...vn(r,e)):Mn(t)&&n.push(mn(r,i,e)),n},oe=[{filterToPropertyMapping:{property:"cost",isNumber:!0},values:Me,excluded:!0},{filterToPropertyMapping:{property:"specialCost",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0}],G=[{filterToPropertyMapping:{property:"defense",isNumber:!0},values:Me,excluded:!0},{filterToPropertyMapping:{property:"specialDefense",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["hero","placeholder","token","weapon"],excluded:!0}],ke=[{filterToPropertyMapping:{property:"pitch",isNumber:!0},excluded:!0,values:Me},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0},{filterToPropertyMapping:{property:"isCardBack",isBoolean:!0},values:["true"],excluded:!0}],X=[{filterToPropertyMapping:{property:"power",isNumber:!0},excluded:!0,values:Me},{filterToPropertyMapping:{property:"specialPower",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token"],excluded:!0}],Ce=[{filterToPropertyMapping:{property:"talents",isArray:!0},excluded:!0,values:Object.values(P.Talent).map(e=>e.toLowerCase())}],yn={"!co":oe,"-co":oe,"!cost":oe,"-cost":oe,"!color":oe,"-color":oe,"!b":G,"-b":G,"!block":G,"-block":G,"!d":G,"-d":G,"!def":G,"-def":G,"!defense":G,"-defense":G,"!pitch":ke,"-pitch":ke,"!p":ke,"-p":ke,"!attack":X,"-attack":X,"!power":X,"-power":X,"!pwr":X,"-pwr":X,"!pow":X,"-pow":X,"!talents":Ce,"-talents":Ce,"!tal":Ce,"-tal":Ce},Je=e=>{let t=[],r=yn[e];return r&&t.push(...r),t},bn=["l","legal","hero"],kn=e=>bn.includes(e),Cn=["r","rarity"],Mn=e=>Cn.includes(e);var Ze=[{description:"Attack actions",filters:["st:attack"],shorthands:["AA"]},{description:"Arcane barrier",filters:['k:"arcane barrier"'],shorthands:["AB"]},{description:"Attack reactions",filters:['t:"attack reaction"'],shorthands:["AR"]},{description:"Defense reactions",filters:['t:"defense reaction"'],shorthands:["DR"]},{description:"Gain life",filters:["gain {h}"],shorthands:["Gain life","Gains life"]},{description:"Go again",filters:['k:"go again"'],shorthands:["GA"]},{description:"Non-attack actions",filters:["t:action","st:non-attack"],shorthands:["NAA"]},{description:"Plus defense",filters:["+ {d}"],shorthands:["Pump defense","Pumps defense","Buff defense","Buffs defense"]},{description:"Plus power",filters:["+ {p}"],shorthands:["Pumps","Pump","Buff","Buffs","Pump attack","Pump attacks","Pumps attack","Pumps attacks","Buff attack","Buff attacks","Buffs attack","Buffs attacks","Pump power","Pumps power","Buff power","Buffs power"]},{description:"Poppers",filters:["!c:illusionist","st:attack","pwr:>=6","def:>=0"],helper:'6+ power non-Illusionist attacks that can "pop" phantasm attacks when defending',shorthands:["Poppers","Popper"]},{description:"Spellvoid",filters:['k:"spellvoid"'],shorthands:["SV"]}],Xe=Ze.filter(({shorthands:e})=>e.some(t=>t.includes(" "))).map(e=>ee(j({},e),{shorthands:e.shorthands.filter(t=>t.includes(" ")).map(t=>t.toLowerCase()).sort((t,r)=>r.length-t.length)})),qe=Ze.filter(({shorthands:e})=>e.some(t=>!t.includes(" "))).map(e=>ee(j({},e),{shorthands:e.shorthands.filter(t=>!t.includes(" ")).map(t=>t.toLowerCase()).sort((t,r)=>r.length-t.length)}));var Br=[">=",">","<=","<"],Lr=["!","-"],et={property:"artists",isArray:!0,partialMatch:!0},or={property:"bannedFormats",isArray:!0,partialMatch:!0},sr={property:"bonds",isArray:!0},An={property:"n/a"},cr={property:"classes",isArray:!0,partialMatch:!0},lr={property:"cost",specialProperty:"specialCost",isNumber:!0,partialMatch:!0},ce={property:"defense",specialProperty:"specialDefense",isNumber:!0},ur={property:"flows",isArray:!0},dr={nestedProperty:"foiling",property:"printings",isArray:!0},fr={property:"fusions",isArray:!0},hr={property:"intellect",isNumber:!0},pr={property:"keywords",isArray:!0,partialMatch:!0},tt={property:"n/a",isMeta:!0},gr={property:"life",specialProperty:"specialLife",isNumber:!0},mr={property:"name",isString:!0},rt={property:"pitch",isNumber:!0},Ae={property:"power",specialProperty:"specialPower",isNumber:!0},vr={property:"n/a",isMeta:!0},Sn={property:"n/a"},wn={property:"n/a"},yr={property:"sets",isArray:!0,partialMatch:!0},Se={property:"specializations",isArray:!0,partialMatch:!0},br={property:"subtypes",isArray:!0},kr={property:"types",isArray:!0},Cr={property:"talents",isArray:!0},Fn={property:"functionalText",isString:!0,partialMatch:!0},xn={property:"typeText",isString:!0,partialMatch:!0},we={nestedProperty:"treatment",property:"printings",isArray:!0},Fe={a:et,artist:et,art:et,attack:Ae,b:ce,block:ce,banned:or,bond:sr,bonds:sr,c:cr,class:cr,chain:An,co:lr,cost:lr,color:rt,d:ce,def:ce,defense:ce,flow:ur,flows:ur,f:fr,fusion:fr,foil:dr,foiling:dr,i:hr,intellect:hr,k:pr,keyword:pr,l:tt,legal:tt,hero:tt,li:gr,life:gr,n:mr,name:mr,p:rt,pitch:rt,pwr:Ae,pow:Ae,power:Ae,r:vr,rarity:vr,referencedby:Sn,references:wn,rf:or,s:yr,set:yr,sp:Se,spec:Se,specialization:Se,specializations:Se,st:br,subtype:br,t:kr,type:kr,tal:Cr,talent:Cr,text:Fn,treat:we,treatment:we,var:we,variation:we,x:xn},Bn=[{text:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase(),override:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase().replaceAll(A,"")}],Ln=e=>{var n;let t=[],r=e.replaceAll("\u201D",'"');for(let{text:a,override:s}of Bn)r.includes(a)&&(r=r.replace(a,s));if((n=ye(r))==null?void 0:n.card)t.push(r);else{let a=r.split(/[ ]+/),s="",o=0;for(let c of a)o===2&&(t.push(s.trim().replaceAll('"',"")),s="",o=0),o<2&&c.split('"').length===2?(s+=" "+c,o++):o===0&&s===""?t.push(c):o===1&&(s+=" "+c);o===2&&(t.push(s.trim().replaceAll('"',"")),s="",o=0)}return t},Tn=[k.Hero.Briar,k.Hero.Brutus,k.Hero.Emperor,k.Hero.Prism,k.Hero.Shiyana,k.Hero.Taylor,k.Hero.Yorick],nt=(e,t)=>{var d;let r=e.trim().toLowerCase();for(let{filters:g,shorthands:m}of Xe)for(let h of m)if(r.includes(h)){r=r.replace(h,g.join(" "));break}for(let[g,m]of Object.entries(k.setToSetIdentifierMappings))r.includes(g.toLowerCase())&&(r=r.replace(g.toLowerCase(),m[0]));let i=Ln(r),n=[];for(let g of i){let m=qe.find(({shorthands:h})=>h.includes(g));m?n.push(...m.filters):n.push(g)}let a=[],s=[],o=[],c=[],l=[],u=[],f={isClash:!1,heroes:[]};for(let g of n)if(Nn(g)){let[m,h]=g.split(":"),{modifier:v,values:p,isAnd:C,isOr:w}=On(h),{filterKey:y,excluded:F,isMeta:b}=zn(m);if(b){if(["rarity","r"].includes(y)&&(p=_n(p)),["legal","l","hero"].includes(y)){for(let S of Tn)h.includes(S.toLowerCase())&&(f.heroes.includes(S)||f.heroes.push(S));h.includes("clash")&&(f.isClash=!0)}a.push(...Qe(F,y,p,v))}else{if(["chain"].includes(y)){let S=R=>R.name.toLowerCase().replaceAll(A,""),x=p.map(R=>at(R,t)).filter(R=>!!R).map(S),L=new Set(x);y="name",w=!0;let z=20,T=0,D=R=>{if(!R.types.includes(k.Type.Hero)){let N=S(R);L.add(N),x.includes(N)||x.push(N)}};for(let R of x){if(T>z)break;let{referencedBy:N,references:Le}=xe(R,t);Le.forEach(D),T===0&&N.forEach(D),T++}p=Array.from(L)}else if(["referencedby","references"].includes(y)){let S=y,x=[...p].filter(L=>!!L);p=[],y="name",w=!0;for(let L of x){let{referencedBy:z,references:T}=xe(L,t);["referencedby"].includes(S)?p.push(...T.map(({name:D})=>D.toLowerCase().replaceAll(A,""))):["references"].includes(S)&&p.push(...z.map(({name:D})=>D.toLowerCase().replaceAll(A,"")))}}else["art","artist"].includes(y)?s=p:["foiling","foil"].includes(y)?(c=In(p),p=c.map(S=>S.toLowerCase())):["treat","treatment","var","variation"].includes(y)?(u=En(p),p=u.map(S=>S.toLowerCase())):["set","s"].includes(y)?(l=Pn(p),p=l.map(S=>S.toLowerCase().replaceAll(A,""))):["pitch","p","color"].includes(y)&&(p=Rn(p));Fe[y]&&a.push({filterToPropertyMapping:Fe[y],values:p,isAnd:C,isOr:w,modifier:v,excluded:F})}}else if(g){let m=(d=ye(g))==null?void 0:d.card,h=Je(g);m?o.push(`"${m.toLowerCase().replace(A,"")}"`):h&&h.length>0?a.push(...h):o.push(g.replace(A,""))}return{appliedFilters:a,attributes:{artists:s,foilings:c,releases:l,treatments:u},keywords:o,specialConditions:f}},Pn=e=>{let t=[];for(let r of e)t.push(...Dn(r));return t},Dn=e=>{let t=[],r=Object.values(k.Release).find(i=>i.toLowerCase().replaceAll(A,"")===e);if(r&&t.push(r),t.length===0){let i=k.setIdentifierToSetMappings[e];i&&t.push(i)}if(t.length===0){let i=Object.values(k.Release).filter(n=>n.toLowerCase().includes(e));i.length>0&&t.push(...i)}return t},it={blue:3,yellow:2,red:1,white:0},Rn=e=>{let t=[];for(let r of e)it[r]||it[r]===0?t.push(it[r].toString()):t.push(r);return t},Mr={r:k.Foiling.R,rf:k.Foiling.R,rainbow:k.Foiling.R,c:k.Foiling.C,cf:k.Foiling.C,cold:k.Foiling.C,g:k.Foiling.G,gf:k.Foiling.G,gold:k.Foiling.G},In=e=>{let t=[];for(let r of e)Mr[r]&&t.push(Mr[r]);return t},Ar=ee(j({},Object.values(k.Treatment).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{})),{aa:k.Treatment.AA,alt:k.Treatment.AA,"alt art":k.Treatment.AA,ab:k.Treatment.AB,"alt border":k.Treatment.AB,at:k.Treatment.AT,"alt text":k.Treatment.AT,ea:k.Treatment.EA,extended:k.Treatment.EA,"extended art":k.Treatment.EA,fa:k.Treatment.FA,full:k.Treatment.FA,"full art":k.Treatment.FA}),En=e=>{let t=[];for(let r of e)Ar[r]?t.push(Ar[r]):k.Treatment[r.toUpperCase()]&&t.push(k.Treatment[r.toUpperCase()]);return t},Sr={c:"common",f:"fabled",l:"legendary",m:"majestic",v:"marvel",r:"rare",s:"super rare",t:"token"},_n=e=>{let t=[];for(let r of e)Sr[r]?t.push(Sr[r]):t.push(r);return t},On=e=>{let t=[],r,i,n=Br.find(a=>e.includes(a));if(n){let[,a]=e.split(n);wr(a)?(r=!0,t.push(...a.trim().split("+").map(s=>s.replace(A,"")))):Fr(a)?(i=!0,t.push(...a.trim().split(",").map(s=>s.replace(A,"")))):t.push(a.trim().replace(A,""))}else wr(e)?(r=!0,t.push(...e.trim().split("+").map(a=>a.replace(A,"")))):Fr(e)?(i=!0,t.push(...e.trim().split(",").map(a=>a.replace(A,"")))):e.startsWith('"')&&e.endsWith('"')?t.push(e.trim().replaceAll('"',"").replace(A,"")):t.push(e.trim().replace(A,""));return{modifier:n,values:t,isAnd:r,isOr:i}},zn=e=>{let t=$n(e);if(t){let[,r]=e.split(t);return{excluded:!0,filterKey:r,isMeta:xr(r)}}else return{excluded:!1,filterKey:e,isMeta:xr(e)}},Nn=e=>e.indexOf(":")>=0,wr=e=>e.indexOf("+")>=0,Fr=e=>e.indexOf(",")>=0,xr=e=>{var t;return!!((t=Fe[e])!=null&&t.isMeta)},$n=e=>{var t;return(t=Lr.find(r=>e.includes(r)))==null?void 0:t.slice(0,1)};var B=K(U()),Tr={artists:["Hoodwill"],cardIdentifier:"fangs-a-lot-blue",classes:[B.Class.Generic],defaultImage:"FNG000",functionalText:"If Fangs A Lot is put into your banished zone from your graveyard, instead put it into your hand.",legalFormats:[],legalHeroes:[B.Hero.Kayo,B.Hero.Levia,B.Hero.Rhinar],printings:[{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000",print:"FNG000",set:B.Release.Promos},{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000_Marvel",print:`FNG000-${B.Treatment.FA}`,set:B.Release.Promos,treatment:B.Treatment.FA}],name:"Fangs A Lot",rarities:[B.Rarity.Rare],rarity:B.Rarity.Rare,sets:[B.Release.Promos],setIdentifiers:["FNG000"],specialImage:"FNG000_Marvel",subtypes:[B.Subtype.Attack],types:[B.Type.Action],typeText:"Generic Action - Attack"},Pr=[{keyword:Tr.name.toLowerCase(),card:Tr}];var at=(e,t)=>{let r=t.find(i=>ot(i.name)===e);return r||(r=t.find(i=>ot(i.name).includes(e))),r},ot=e=>le(e.toLowerCase().trim().replace(A,"")),le=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"");var ct=class{constructor(t){this.search=(t,r)=>{let i,{appliedFilters:n,attributes:a,keywords:s,specialConditions:o}=nt(t,this.cards),c=s.join(" "),l=r?Pr.filter(h=>h.keyword===c):[];if(l.length>0?i=l.map(({card:h})=>h):s.length?i=this.fuse.search(c).map(h=>h.item):i=[...this.cards],n.length&&(i=i.filter(h=>h&&Rr(h,n,o))),s.length===0){let h="";if(a.releases.length===1)try{let v=a.releases[0];h=O.setToSetIdentifierMappings[v][0].toUpperCase()}catch(v){console.error("Error getting set identifier from search",v)}h?i.sort((v,p)=>{var y,F;let C=(y=v.setIdentifiers.find(b=>b.includes(h)))==null?void 0:y.replace(h,""),w=(F=p.setIdentifiers.find(b=>b.includes(h)))==null?void 0:F.replace(h,"");return C&&w?C.localeCompare(w):-1}):i.sort((v,p)=>v.name===p.name?`${v.pitch}`.localeCompare(`${p.pitch}`):v.name.localeCompare(p.name))}else{let h=[],v=[],p=s.map(C=>C.toLowerCase().replace(A,"")).join(" ");for(let C of i)C.name.toLowerCase().replace(A,"")===p?h.push(C):v.push(C);i=[...h,...v]}let u,{artists:f,foilings:d,releases:g,treatments:m}=a;return(f.length>0||d.length>0||g.length>0||m.length>0)&&(u=i.map(h=>{let v=h.printings.filter(p=>{let C=!!p.image,w=f.length===0||f.some(S=>p.artists.find(x=>x.replace(A,"").toLowerCase().includes(x))),y=d.length===0||d.includes(p.foiling),F=g.length===0||g.includes(p.set),b=m.length===0||m.includes(p.treatment);return C&&w&&y&&F&&b});return j({matchingPrintings:v},h)})),{appliedFilters:n,attributes:a,keywords:s,searchResults:u||i}};let r={getFn:(i,n)=>{let a=st.default.config.getFn(i,n);return a&&(Array.isArray(a)?a.map(s=>le(s.replace(A,""))):le(a).replace(A,""))},ignoreLocation:!0,includeScore:!0,keys:[{name:"name",weight:10},{name:"functionalText",weight:6},{name:"setIdentifiers",weight:2},{name:"typeText",weight:6}],threshold:.15,useExtendedSearch:!0};this.cards=[...t],this.fuse=new st.default([...t],r)}},Dr=ct,Rr=(e,t,r)=>{let i=!0;for(let n of t){let{isNumber:a,isString:s,isArray:o,isBoolean:c,property:l}=n.filterToPropertyMapping;if((a&&!Hn(e,n)||s&&!Gn(e,n)||o&&!Wn(e,n)||c&&!jn(e,n))&&(i=!1),r.isClash&&["rarities","bannedFormats","legalFormats"].includes(l)){let f=[O.Rarity.SuperRare,O.Rarity.Majestic,O.Rarity.Legendary,O.Rarity.Fabled].some(v=>e.rarities.includes(v)),d=!1;for(let{cardIdentifiers:v,heroes:p}of Ye)for(let C of r.heroes)p.includes(C)&&v.includes(e.cardIdentifier)&&(d=!0);let g=!!e.specializations&&e.specializations.length>0||d,m=[O.Type.Mentor,O.Type.Weapon].some(v=>e.types.includes(v)),h=Ue.includes(e.name);!i&&!h&&(g||m)&&f&&(i=!0),h&&(i=!1)}if(r.isClash&&r.heroes.includes(O.Hero.Briar)&&e.name==="Rosetta Thorn"&&(i=!0),!i)break}return i},Hn=(e,t)=>{var r;if(Be(t,e)){let{values:i,modifier:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=t,o=lt(e,t);if(o!=null&&!isNaN(o))if(o=parseInt(o),n)switch(n){case">=":let c=i==null?void 0:i.some(d=>o>=parseInt(d));return a?!c:c;case">":let l=i==null?void 0:i.some(d=>o>parseInt(d));return a?!l:l;case"<=":let u=i==null?void 0:i.some(d=>o<=parseInt(d));return a?!u:u;case"<":let f=i==null?void 0:i.some(d=>o<parseInt(d));return a?!f:f;default:return!1}else{let c=i==null?void 0:i.some(l=>o===parseInt(l));return a?!c:c}else{let c=(r=Un(e,t))==null?void 0:r.toLowerCase(),l=s?i==null?void 0:i.some(u=>c==null?void 0:c.includes(u)):i==null?void 0:i.some(u=>c===u);return a?!l:l}}else return!0},Gn=(e,t)=>{var r;if(Be(t,e)){let{values:i,isAnd:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=t,o=(r=lt(e,t))==null?void 0:r.replaceAll(A,"");if(s){let c=n?i==null?void 0:i.every(l=>o==null?void 0:o.toLowerCase().includes(l)):i==null?void 0:i.some(l=>o==null?void 0:o.toLowerCase().includes(l));return a?!c:c}else{let c=n?i==null?void 0:i.every(l=>(o==null?void 0:o.toLowerCase())===l):i==null?void 0:i.some(l=>(o==null?void 0:o.toLowerCase())===l);return a?!c:c}}else return!0},Wn=(e,t)=>{if(Be(t,e)){let{values:r,isAnd:i,excluded:n,filterToPropertyMapping:{partialMatch:a}}=t,s=Kn(e,t).map(o=>o==null?void 0:o.replaceAll(A,""));if(a){let o=i?r.every(l=>s==null?void 0:s.some(u=>u==null?void 0:u.toLowerCase().includes(l))):r.some(l=>s==null?void 0:s.some(u=>u==null?void 0:u.toLowerCase().includes(l))),c=s.length===0;return n?!o||c:o}else{let o=i?r.every(c=>s==null?void 0:s.some(l=>(l==null?void 0:l.toLowerCase())===c)):r.some(c=>s==null?void 0:s.some(l=>(l==null?void 0:l.toLowerCase())===c));return n?!o:o}}else return!0},jn=(e,t)=>{if(Be(t,e)){let{excluded:r}=t,i=lt(e,t);return r?!i:i}else return!0},lt=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.property]},Kn=(e,t)=>{let{filterToPropertyMapping:{nestedProperty:r,property:i}}=t,n=e[i]||[];return r?n.map(a=>a[r]).filter(a=>!!a):n},Un=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.specialProperty]},Be=({cardTypes:e},{types:t,subtypes:r})=>!e||(e==null?void 0:e.some(i=>t.map(n=>n.toLowerCase()).includes(i.toLowerCase())||r.map(n=>n.toLowerCase()).includes(i.toLowerCase())));var W=K(U()),Yn=e=>{let t=e.filter(o=>o.types.includes(W.Type.Hero)).sort((o,c)=>o.name.localeCompare(c.name)),r=t.filter(o=>!o.young&&!o.classes.includes(W.Class.Adjudicator)),i=t.filter(o=>{let c=o.rarities.some(u=>u!==W.Rarity.Promo),l=o.sets.some(u=>u!==W.Release.Promos);return c||l}),n=t.filter(o=>{let c=o.rarities.every(u=>u===W.Rarity.Promo),l=o.sets.every(u=>u===W.Release.Promos);return c&&l}),a=t.filter(o=>o.young),s=a.filter(({hero:o})=>!r.find(c=>c.hero===o));return{all:t,adult:r,nonPromo:i,promoOnly:n,young:a,youngOnly:s}};var _r=K(U());var ut=K(U()),Vn={"Dawnblade, Resplendent":"Dawnblade"},Ir=e=>Vn[e.name]||e.name,Er=e=>{var t;return(t=e.functionalText)==null?void 0:t.replaceAll(e.name,"")},xe=(e,t)=>{let r=t.find(i=>i.name.toLowerCase().replace(A,"")===e);return r||(r=t.find(i=>i.name.toLowerCase().replace(A,"").includes(e))),dt(r,t)},dt=(e,t)=>{var a,s;let r=[],i=[],n=[];if(e){let o=[],c=[],l=Ir(e);for(let u of t){let f=Ir(u),d=l===f,g=e.pitch!==u.pitch;if(d&&g)r.push(u);else if(!d){let m=e.name==="Seismic Surge",h=(a=u.keywords)==null?void 0:a.includes(ut.Keyword.Heave),v=m&&h,p=Er(u),C=p==null?void 0:p.includes(l),w=Er(e),y=w==null?void 0:w.includes(f);(C||v)&&o.push(u);let F=u.name==="Seismic Surge",b=(s=e.keywords)==null?void 0:s.includes(ut.Keyword.Heave);(y||F&&b)&&c.push(u)}}for(let u of o)i.push(u);for(let u of c){let f=u.name;l!==f&&!c.some(d=>{let g=d.name;return g!==f&&g.includes(f)})&&n.push(u)}}return{otherPitches:r,referencedBy:i,references:n}},Qn=["cash-in-yellow"],Jn=(e,t,r)=>{let i=new Set;for(let n of e.filter(({cardIdentifier:a})=>!Qn.includes(a))){let{references:a}=dt(n,t);for(let s of a.filter(o=>{let c=o.name==="Hyper Driver",l=r===_r.Hero.Maxx;return!c||l}))i.add(s)}return Array.from(i)};0&&(module.exports={PUNCTUATION,abbreviations,availableExclusions,availableModifiers,clashBannedCards,clashLegalCards,clashSpecializationOverrides,filterCard,filtersToCardPropertyMappings,getAbbreviation,getAbbreviationByCard,getCardByName,getCleanText,getExcludedMetaFilters,getHeroBreakdown,getKeywordsAndAppliedFiltersFromText,getMetaFilters,getNormalizedText,getRelatedCards,getRelatedCardsByName,getTokensReferencedByCards,multiWordShorthands,shorthands,singleWordShorthands});
1
+ var Nr=Object.create;var se=Object.defineProperty,$r=Object.defineProperties,Hr=Object.getOwnPropertyDescriptor,Gr=Object.getOwnPropertyDescriptors,Wr=Object.getOwnPropertyNames,gt=Object.getOwnPropertySymbols,jr=Object.getPrototypeOf,vt=Object.prototype.hasOwnProperty,Kr=Object.prototype.propertyIsEnumerable;var mt=(e,t,r)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H=(e,t)=>{for(var r in t||(t={}))vt.call(t,r)&&mt(e,r,t[r]);if(gt)for(var r of gt(t))Kr.call(t,r)&&mt(e,r,t[r]);return e},Q=(e,t)=>$r(e,Gr(t));var yt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ur=(e,t)=>{for(var r in t)se(e,r,{get:t[r],enumerable:!0})},bt=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Wr(t))!vt.call(e,n)&&n!==r&&se(e,n,{get:()=>t[n],enumerable:!(i=Hr(t,n))||i.enumerable});return e};var K=(e,t,r)=>(r=e!=null?Nr(jr(e)):{},bt(t||!e||!e.__esModule?se(r,"default",{value:e,enumerable:!0}):r,e)),Yr=e=>bt(se({},"__esModule",{value:!0}),e);var U=yt((ea,Ht)=>{var fe=Object.defineProperty,Vr=Object.defineProperties,Qr=Object.getOwnPropertyDescriptor,Jr=Object.getOwnPropertyDescriptors,Zr=Object.getOwnPropertyNames,kt=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable,Mt=(e,t,r)=>t in e?fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qr=(e,t)=>{for(var r in t||(t={}))Ct.call(t,r)&&Mt(e,r,t[r]);if(kt)for(var r of kt(t))Xr.call(t,r)&&Mt(e,r,t[r]);return e},ei=(e,t)=>Vr(e,Jr(t)),ti=(e,t)=>{for(var r in t)fe(e,r,{get:t[r],enumerable:!0})},ri=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Zr(t))!Ct.call(e,n)&&n!==r&&fe(e,n,{get:()=>t[n],enumerable:!(i=Qr(t,n))||i.enumerable});return e},ii=e=>ri(fe({},"__esModule",{value:!0}),e),At={};ti(At,{Bond:()=>xt,Class:()=>wt,Flow:()=>Bt,Foiling:()=>St,Format:()=>Tt,Fusion:()=>Lt,Hero:()=>_t,Keyword:()=>zt,Rarity:()=>Pt,Release:()=>Dt,ReleaseEdition:()=>Rt,Subtype:()=>Ot,Talent:()=>It,Treatment:()=>Ft,Type:()=>Et,fullSetIdentifiers:()=>Ie,getCanAddToDeck:()=>ai,getCardIdentifier:()=>ni,getDefaultPrinting:()=>gi,getIsArenaCard:()=>Nt,getIsDeckCard:()=>Re,getPrint:()=>ui,getShouldRotateCardImage:()=>oi,getSpecialPrinting:()=>hi,orderedFullSetBlackBorderIdentifiers:()=>di,setIdentifierToSetMappings:()=>$t,setToSetIdentifierMappings:()=>si});Ht.exports=ii(At);var St=(e=>(e.C="Cold",e.G="Gold",e.R="Rainbow",e))(St||{}),Ft=(e=>(e.AB="Alternate Border",e.AA="Alternate Art",e.AT="Alternate Text",e.EA="Extended Art",e.FA="Full Art",e))(Ft||{}),wt=(e=>(e.NotClassed="NotClassed",e.Generic="Generic",e.Adjudicator="Adjudicator",e.Assassin="Assassin",e.Bard="Bard",e.Brute="Brute",e.Guardian="Guardian",e.Illusionist="Illusionist",e.Mechanologist="Mechanologist",e.Merchant="Merchant",e.Ninja="Ninja",e.Ranger="Ranger",e.Runeblade="Runeblade",e.Shapeshifter="Shapeshifter",e.Warrior="Warrior",e.Wizard="Wizard",e))(wt||{}),xt=(e=>(e.Earth="Earth",e))(xt||{}),Bt=(e=>(e.Lightning="Lightning",e))(Bt||{}),Tt=(e=>(e.Blitz="Blitz",e.BlitzLivingLegend="Blitz (Living Legend)",e.Clash="Clash",e.ClassicConstructed="Classic Constructed",e.ClassicConstructedLivingLegend="Classic Constructed (Living Legend)",e.Commoner="Commoner",e.Draft="Draft",e.Open="Open",e.Sealed="Sealed",e.UltimatePitFight="Ultimate Pit Fight",e))(Tt||{}),Lt=(e=>(e.Earth="Earth",e.Ice="Ice",e.Lightning="Lightning",e))(Lt||{}),Pt=(e=>(e.Token="Token",e.Common="Common",e.Rare="Rare",e.SuperRare="Super Rare",e.Majestic="Majestic",e.Marvel="Marvel",e.Legendary="Legendary",e.Fabled="Fabled",e.Promo="Promo",e))(Pt||{}),Dt=(e=>(e.ArcaneRising="Arcane Rising",e.BrightLights="Bright Lights",e.CrucibleOfWar="Crucible of War",e.DuskTillDawn="Dusk till Dawn",e.Dynasty="Dynasty",e.Everfest="Everfest",e.HeavyHitters="Heavy Hitters",e.HistoryPack1="History Pack 1",e.Monarch="Monarch",e.Outsiders="Outsiders",e.PartTheMistveil="Part the Mistveil",e.Rosetta="Rosetta",e.TalesOfAria="Tales of Aria",e.Uprising="Uprising",e.WelcomeToRathe="Welcome to Rathe",e.ArmoryDeckKayo="Armory Deck: Kayo",e.ArmoryDeckBoltyn="Armory Deck: Boltyn",e.ArmoryDeckAzalea="Armory Deck: Azalea",e.ArakniBlitzDeck="Arakni Blitz Deck",e.AzaleaBlitzDeck="Azalea Blitz Deck",e.BenjiBlitzDeck="Benji Blitz Deck",e.BetsyBlitzDeck="Betsy Blitz Deck",e.BoltynBlitzDeck="Boltyn Blitz Deck",e.BriarBlitzDeck="Briar Blitz Deck",e.BravoBlitzDeck="Bravo Blitz Deck",e.ChaneBlitzDeck="Chane Blitz Deck",e.DromaiBlitzDeck="Dromai Blitz Deck",e.EnigmaBlitzDeck="Enigma Blitz Deck",e.FaiBlitzDeck="Fai Blitz Deck",e.KassaiBlitzDeck="Kassai Blitz Deck",e.KatsuBlitzDeck="Katsu Blitz Deck",e.KayoBlitzDeck="Kayo Blitz Deck",e.LeviaBlitzDeck="Levia Blitz Deck",e.LexiBlitzDeck="Lexi Blitz Deck",e.NuuBlitzDeck="Nuu Blitz Deck",e.OldhimBlitzDeck="Oldhim Blitz Deck",e.OlympiaBlitzDeck="Olympia Blitz Deck",e.PrismBlitzDeck="Prism Blitz Deck",e.RhinarBlitzDeck="Rhinar Blitz Deck",e.RiptideBlitzDeck="Riptide Blitz Deck",e.UzuriBlitzDeck="Uzuri Blitz Deck",e.VictorBlitzDeck="Victor Blitz Deck",e.ZenBlitzDeck="Zen Blitz Deck",e.FirstStrikeAurora="1st Strike: Aurora",e.FirstStrikeTerra="1st Strike: Terra",e.DorintheaHeroDeck="Dorinthea Hero Deck",e.KatsuHeroDeck="Katsu Hero Deck",e.RhinarHeroDeck="Rhinar Hero Deck",e.ClassicBattlesRhinarDorinthea="Classic Battles: Rhinar vs Dorinthea",e.IraWelcomeDeck="Ira Welcome Deck",e.RoundTheTable="Round the Table",e.Promos="Promos",e))(Dt||{}),Rt=(e=>(e.Alpha="Alpha",e.First="First",e.Unlimited="Unlimited",e.Promo="Promo",e))(Rt||{}),It=(e=>(e.Draconic="Draconic",e.Earth="Earth",e.Elemental="Elemental",e.Ice="Ice",e.Light="Light",e.Lightning="Lightning",e.Mystic="Mystic",e.Royal="Royal",e.Shadow="Shadow",e))(It||{}),Et=(e=>(e.Action="Action",e.AttackReaction="Attack Reaction",e.Block="Block",e.DefenseReaction="Defense Reaction",e.DemiHero="Demi-Hero",e.Equipment="Equipment",e.Hero="Hero",e.Instant="Instant",e.Macro="Macro",e.Mentor="Mentor",e.Resource="Resource",e.Token="Token",e.Weapon="Weapon",e))(Et||{}),Ot=(e=>(e.OneHanded="1H",e.TwoHanded="2H",e.Affliction="Affliction",e.Ally="Ally",e.Angel="Angel",e.Arms="Arms",e.Arrow="Arrow",e.Ash="Ash",e.Attack="Attack",e.Aura="Aura",e.Axe="Axe",e.Base="Base",e.Book="Book",e.Bow="Bow",e.Chest="Chest",e.Chi="Chi",e.Claw="Claw",e.Club="Club",e.Construct="Construct",e.Dagger="Dagger",e.Demon="Demon",e.Dragon="Dragon",e.Evo="Evo",e.Fiddle="Fiddle",e.Figment="Figment",e.Flail="Flail",e.Gem="Gem",e.Gun="Gun",e.Hammer="Hammer",e.Head="Head",e.Invocation="Invocation",e.Item="Item",e.Landmark="Landmark",e.Lute="Lute",e.Legs="Legs",e.NonAttack="Non-Attack",e.OffHand="Off-Hand",e.Orb="Orb",e.Pistol="Pistol",e.Quiver="Quiver",e.Rock="Rock",e.Shuriken="Shuriken",e.Scepter="Scepter",e.Scroll="Scroll",e.Scythe="Scythe",e.Song="Song",e.Staff="Staff",e.Sword="Sword",e.Trap="Trap",e.Wrench="Wrench",e.Young="Young",e))(Ot||{}),_t=(e=>(e.Arakni="Arakni",e.Aurora="Aurora",e.Azalea="Azalea",e.Benji="Benji",e.Betsy="Betsy",e.Blaze="Blaze",e.Boltyn="Boltyn",e.Bravo="Bravo",e.Brevant="Brevant",e.Briar="Briar",e.Brutus="Brutus",e.Chane="Chane",e.Dash="Dash",e.DataDoll="Data Doll",e.Dorinthea="Dorinthea",e.Dromai="Dromai",e.Emperor="Emperor",e.Enigma="Enigma",e.Fai="Fai",e.Florian="Florian",e.GenisWotchuneed="Genis Wotchuneed",e.Ira="Ira",e.Iyslander="Iyslander",e.Kano="Kano",e.Kassai="Kassai",e.Katsu="Katsu",e.Kavdaen="Kavdaen",e.Kayo="Kayo",e.Levia="Levia",e.Lexi="Lexi",e.Maxx="Maxx",e.Melody="Melody",e.Nuu="Nuu",e.Oldhim="Oldhim",e.Olympia="Olympia",e.Oscilio="Oscilio",e.Prism="Prism",e.Rhinar="Rhinar",e.Riptide="Riptide",e.Ruudi="Ruu'di",e.Shiyana="Shiyana",e.Squizzy="Squizzy",e.Starvo="Starvo",e.Taipanis="Taipanis",e.Taylor="Taylor",e.Teklovossen="Teklovossen",e.Terra="Terra",e.Theryon="Theryon",e.Uzuri="Uzuri",e.Valda="Valda",e.Verdance="Verdance",e.Victor="Victor",e.Vynnset="Vynnset",e.Viserai="Viserai",e.Yorick="Yorick",e.Yoji="Yoji",e.Zen="Zen",e))(_t||{}),zt=(e=>(e.Ambush="Ambush",e.Amp="Amp",e.ArcaneBarrier="Arcane Barrier",e.ArcaneShelter="Arcane Shelter",e.Awaken="Awaken",e.Battleworn="Battleworn",e.BeatChest="Beat Chest",e.BladeBreak="Blade Break",e.BloodDebt="Blood Debt",e.Boost="Boost",e.Bond="Bond",e.Channel="Channel",e.Charge="Charge",e.Clash="Clash",e.Cloaked="Cloaked",e.Combo="Combo",e.Contract="Contract",e.Crank="Crank",e.Crush="Crush",e.Decompose="Decompose",e.Dominate="Dominate",e.Ephemeral="Ephemeral",e.Essence="Essence",e.EvoUpgrade="Evo Upgrade",e.Flow="Flow",e.Freeze="Freeze",e.Fusion="Fusion",e.Galvanize="Galvanize",e.GoAgain="Go again",e.Guardwell="Guardwell",e.Heave="Heave",e.Intimidate="Intimidate",e.Legendary="Legendary",e.Material="Material",e.Meld="Meld",e.Modular="Modular",e.Mirage="Mirage",e.Negate="Negate",e.Opt="Opt",e.Overpower="Overpower",e.Pairs="Pairs",e.Piercing="Piercing",e.Phantasm="Phantasm",e.Protect="Protect",e.Quell="Quell",e.Reload="Reload",e.Reprise="Reprise",e.RuneGate="Rune Gate",e.Rupture="Rupture",e.Scrap="Scrap",e.Solflare="Solflare",e.Specialization="Specialization",e.Spectra="Spectra",e.Spellvoid="Spellvoid",e.Stealth="Stealth",e.Surge="Surge",e.Temper="Temper",e.Tower="Tower",e.Transform="Transform",e.Transcend="Transcend",e.Universal="Universal",e.Unfreeze="Unfreeze",e.Unity="Unity",e.Wager="Wager",e.Ward="Ward",e))(zt||{}),ni=(e,t)=>{let{name:r,pitch:i}=e,n=r.toLowerCase().replace("//","-").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").replace(/ /g,"-").replace("\xED","i").replace(/[^a-z0-9 -]/g,"").replace(/--/,"-"),a="";switch(i){case"1":case 1:a=t?"-1":"-red";break;case"2":case 2:a=t?"-2":"-yellow";break;case"3":case 3:a=t?"-3":"-blue";break}return`${n}${a}`},Nt=(e,t)=>{let r=Re(e,t),i=["Demi-Hero","Equipment","Weapon"].some(n=>e.includes(n));return!r&&i},Re=(e,t)=>{let r=["Action","Attack Reaction","Block","Defense Reaction","Instant","Mentor","Resource"].some(n=>e.includes(n)),i=!t||!t.includes("Ephemeral");return r&&i},ai=(e,t)=>{let r=Nt(e,t),i=Re(e,t);return r||i},oi=e=>{var t,r;return((t=e.keywords)==null?void 0:t.includes("Meld"))||((r=e.subtypes)==null?void 0:r.includes("Landmark"))||!1},Ie={wtr:"Welcome to Rathe",arc:"Arcane Rising",cru:"Crucible of War",mon:"Monarch",ele:"Tales of Aria",evr:"Everfest","1hp":"History Pack 1",hp1:"History Pack 1",upr:"Uprising",dyn:"Dynasty",out:"Outsiders",dtd:"Dusk till Dawn",evo:"Bright Lights",hvy:"Heavy Hitters",mst:"Part the Mistveil",ros:"Rosetta"},$t=ei(qr({},Ie),{ako:"Armory Deck: Kayo",asb:"Armory Deck: Boltyn",aaz:"Armory Deck: Azalea",ara:"Arakni Blitz Deck",azl:"Azalea Blitz Deck",ben:"Benji Blitz Deck",bet:"Betsy Blitz Deck",bol:"Boltyn Blitz Deck",bri:"Briar Blitz Deck",bvo:"Bravo Blitz Deck",chn:"Chane Blitz Deck",dro:"Dromai Blitz Deck",eng:"Enigma Blitz Deck",fai:"Fai Blitz Deck",kat:"Katsu Blitz Deck",ksi:"Kassai Blitz Deck",kyo:"Kayo Blitz Deck",lev:"Levia Blitz Deck",lxi:"Lexi Blitz Deck",nuu:"Nuu Blitz Deck",old:"Oldhim Blitz Deck",ola:"Olympia Blitz Deck",psm:"Prism Blitz Deck",rip:"Riptide Blitz Deck",rnr:"Rhinar Blitz Deck",uzu:"Uzuri Blitz Deck",vic:"Victor Blitz Deck",zen:"Zen Blitz Deck",aur:"1st Strike: Aurora",ter:"1st Strike: Terra",dvr:"Classic Battles: Rhinar vs Dorinthea",rvd:"Classic Battles: Rhinar vs Dorinthea",ira:"Ira Welcome Deck",tcc:"Round the Table",tea:"Dorinthea Hero Deck",ksu:"Katsu Hero Deck",rnr2:"Rhinar Hero Deck",fab:"Promos",her:"Promos",jdg:"Promos",lgs:"Promos",lss:"Promos",oxo:"Promos",xxx:"Promos",win:"Promos"}),De={};for(let[e,t]of Object.entries($t)){let r=De[t];r?r.push(e):De[t]=[e]}var si=De,ci={"Rhinar Blitz Deck":"-Blitz"},li={MST158_V3:"-V3",ROS162_V2:"-V2"},ui=e=>{var t,r;let i=ci[e.set]||"",n=`${e.identifier}${i}`,a=e.edition?`-${e.edition}`:"",s=e.foiling?`-${e.foiling}`:"",o=e.treatment?`-${e.treatment}`:"",c=(t=e.image)!=null&&t.toLowerCase().includes("back")?"-Back":"",l=li[((r=e.image)==null?void 0:r.toUpperCase())||""]||"";return`${n}${a}${s}${o}${c}${l}`},di=Object.keys(Ie).filter(e=>!e.toLowerCase().includes("hp")).reverse().map(e=>e.toUpperCase()),fi={"command-and-conquer-red":{print:"DYN000-Cold"},"cracked-bauble-yellow":{print:"LGS083-Cold"},"fate-foreseen-red":{print:"FAB024-Rainbow"},"pitfall-trap-yellow":{print:"LGS151-Rainbow"},quicken:{print:"EVO250"},"ravenous-rabble-red":{print:"FAB190-Rainbow-Extended Art"},"rockslide-trap-blue":{print:"LGS152-Rainbow"},"sigil-of-solace-red":{print:"FAB178-Rainbow-Extended Art"},"spectral-shield":{print:"MST158-Alternate Art-V3"},"tripwire-trap-red":{print:"LGS150-Rainbow"},"viserai-rune-blood":{print:"HER011-Cold"}},hi=(e,t)=>{let{cardIdentifier:r}=e,i=Object.entries(fi).find(([n])=>n===r);if(i){let[,{print:n}]=i;return t.find(a=>a.print===n)||t[0]}else{let n,a,s,o,c,l,u,f,d,g,m,h,v,p,M,S,y,w;for(let b of t){let{edition:A,foiling:x,identifier:T,image:z,treatment:L}=b,P=T.toLowerCase().includes("win");if(z&&!P){if(n||(n=b),L==="Alternate Art")a=b;else if(L==="Alternate Border")s=b;else if(L==="Alternate Text")o=b;else if(L==="Extended Art")u=b,x==="Cold"&&(c=b),x||(d=b),A==="Promo"&&(g=b);else if(L==="Full Art"){f=b,x==="Cold"&&(l=b);break}z&&z.includes("_V2")&&(m=b),A==="Alpha"?h=b:A==="First"?v=b:A==="Promo"?p=b:A==="Unlimited"&&(M=b),x==="Cold"?(S=b,A==="Promo"&&(w=b)):x==="Gold"&&(y=b)}}return l||f||c||g||d||u||s||a||o||m||w||h||v||p||M||y||S||n}},pi={"command-and-conquer-red":{print:"ARC159-Unlimited"},"pitfall-trap-yellow":{print:"LGS151-Rainbow"},"rockslide-trap-blue":{print:"LGS152-Rainbow"},"spectral-shield":{print:"MST158"},"tripwire-trap-red":{print:"LGS150-Rainbow"}},gi=(e,t)=>{let{cardIdentifier:r}=e,i=Object.entries(pi).find(([n])=>n===r);if(i){let[,{print:n}]=i;return t.find(a=>a.print===n)||t[0]}else{let n,a;for(let s of t){let{edition:o,image:c,treatment:l}=s;if(c&&(n||(n=s),!a&&o!=="Promo"&&(a=s)),n&&a)break}return a||n||t[0]}}});var ar=yt((ta,nr)=>{"use strict";function Gt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gt(Object(r),!0).forEach(function(i){_e(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gt(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Oe(e){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(e)}function R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wt(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function I(e,t,r){return t&&Wt(e.prototype,t),r&&Wt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&ze(e,t)}function pe(e){return pe=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},pe(e)}function ze(e,t){return ze=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},ze(e,t)}function mi(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function vi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yi(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vi(e)}function Z(e){var t=mi();return function(){var i=pe(e),n;if(t){var a=pe(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return yi(this,n)}}function re(e){return bi(e)||ki(e)||Mi(e)||Ci()}function bi(e){if(Array.isArray(e))return Ne(e)}function ki(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mi(e,t){if(e){if(typeof e=="string")return Ne(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ne(e,t)}}function Ne(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function Ci(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y(e){return Array.isArray?Array.isArray(e):Zt(e)==="[object Array]"}var Ai=1/0;function Si(e){if(typeof e=="string")return e;var t=e+"";return t=="0"&&1/e==-Ai?"-0":t}function Fi(e){return e==null?"":Si(e)}function G(e){return typeof e=="string"}function Qt(e){return typeof e=="number"}function wi(e){return e===!0||e===!1||xi(e)&&Zt(e)=="[object Boolean]"}function Jt(e){return Oe(e)==="object"}function xi(e){return Jt(e)&&e!==null}function O(e){return e!=null}function Ee(e){return!e.trim().length}function Zt(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var Bi="Incorrect 'index' type",Ti=function(t){return"Invalid value for key ".concat(t)},Li=function(t){return"Pattern length exceeds max of ".concat(t,".")},Pi=function(t){return"Missing ".concat(t," property in key")},Di=function(t){return"Property 'weight' in key '".concat(t,"' must be a positive integer")},jt=Object.prototype.hasOwnProperty,Ri=function(){function e(t){var r=this;R(this,e),this._keys=[],this._keyMap={};var i=0;t.forEach(function(n){var a=Xt(n);i+=a.weight,r._keys.push(a),r._keyMap[a.id]=a,i+=a.weight}),this._keys.forEach(function(n){n.weight/=i})}return I(e,[{key:"get",value:function(r){return this._keyMap[r]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function Xt(e){var t=null,r=null,i=null,n=1,a=null;if(G(e)||Y(e))i=e,t=Kt(e),r=$e(e);else{if(!jt.call(e,"name"))throw new Error(Pi("name"));var s=e.name;if(i=s,jt.call(e,"weight")&&(n=e.weight,n<=0))throw new Error(Di(s));t=Kt(s),r=$e(s),a=e.getFn}return{path:t,id:r,weight:n,src:i,getFn:a}}function Kt(e){return Y(e)?e:e.split(".")}function $e(e){return Y(e)?e.join("."):e}function Ii(e,t){var r=[],i=!1,n=function a(s,o,c){if(O(s))if(!o[c])r.push(s);else{var l=o[c],u=s[l];if(!O(u))return;if(c===o.length-1&&(G(u)||Qt(u)||wi(u)))r.push(Fi(u));else if(Y(u)){i=!0;for(var f=0,d=u.length;f<d;f+=1)a(u[f],o,c+1)}else o.length&&a(u,o,c+1)}};return n(e,G(t)?t.split("."):t,0),i?r:r[0]}var Ei={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Oi={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(t,r){return t.score===r.score?t.idx<r.idx?-1:1:t.score<r.score?-1:1}},_i={location:0,threshold:.6,distance:100},zi={useExtendedSearch:!1,getFn:Ii,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},C=ne(ne(ne(ne({},Oi),Ei),_i),zi),Ni=/[^ ]+/g;function $i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,r=new Map,i=Math.pow(10,t);return{get:function(a){var s=a.match(Ni).length;if(r.has(s))return r.get(s);var o=1/Math.pow(s,.5*e),c=parseFloat(Math.round(o*i)/i);return r.set(s,c),c},clear:function(){r.clear()}}}var Ke=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getFn,i=r===void 0?C.getFn:r,n=t.fieldNormWeight,a=n===void 0?C.fieldNormWeight:n;R(this,e),this.norm=$i(a,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return I(e,[{key:"setSources",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.docs=r}},{key:"setIndexRecords",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.records=r}},{key:"setKeys",value:function(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.keys=i,this._keysMap={},i.forEach(function(n,a){r._keysMap[n.id]=a})}},{key:"create",value:function(){var r=this;this.isCreated||!this.docs.length||(this.isCreated=!0,G(this.docs[0])?this.docs.forEach(function(i,n){r._addString(i,n)}):this.docs.forEach(function(i,n){r._addObject(i,n)}),this.norm.clear())}},{key:"add",value:function(r){var i=this.size();G(r)?this._addString(r,i):this._addObject(r,i)}},{key:"removeAt",value:function(r){this.records.splice(r,1);for(var i=r,n=this.size();i<n;i+=1)this.records[i].i-=1}},{key:"getValueForItemAtKeyId",value:function(r,i){return r[this._keysMap[i]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(r,i){if(!(!O(r)||Ee(r))){var n={v:r,i,n:this.norm.get(r)};this.records.push(n)}}},{key:"_addObject",value:function(r,i){var n=this,a={i,$:{}};this.keys.forEach(function(s,o){var c=s.getFn?s.getFn(r):n.getFn(r,s.path);if(O(c)){if(Y(c))(function(){for(var u=[],f=[{nestedArrIndex:-1,value:c}];f.length;){var d=f.pop(),g=d.nestedArrIndex,m=d.value;if(O(m))if(G(m)&&!Ee(m)){var h={v:m,i:g,n:n.norm.get(m)};u.push(h)}else Y(m)&&m.forEach(function(v,p){f.push({nestedArrIndex:p,value:v})})}a.$[o]=u})();else if(G(c)&&!Ee(c)){var l={v:c,n:n.norm.get(c)};a.$[o]=l}}}),this.records.push(a)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function qt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.getFn,n=i===void 0?C.getFn:i,a=r.fieldNormWeight,s=a===void 0?C.fieldNormWeight:a,o=new Ke({getFn:n,fieldNormWeight:s});return o.setKeys(e.map(Xt)),o.setSources(t),o.create(),o}function Hi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.getFn,i=r===void 0?C.getFn:r,n=t.fieldNormWeight,a=n===void 0?C.fieldNormWeight:n,s=e.keys,o=e.records,c=new Ke({getFn:i,fieldNormWeight:a});return c.setKeys(s),c.setIndexRecords(o),c}function he(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.errors,i=r===void 0?0:r,n=t.currentLocation,a=n===void 0?0:n,s=t.expectedLocation,o=s===void 0?0:s,c=t.distance,l=c===void 0?C.distance:c,u=t.ignoreLocation,f=u===void 0?C.ignoreLocation:u,d=i/e.length;if(f)return d;var g=Math.abs(o-a);return l?d+g/l:g?1:d}function Gi(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C.minMatchCharLength,r=[],i=-1,n=-1,a=0,s=e.length;a<s;a+=1){var o=e[a];o&&i===-1?i=a:!o&&i!==-1&&(n=a-1,n-i+1>=t&&r.push([i,n]),i=-1)}return e[a-1]&&a-i>=t&&r.push([i,a-1]),r}var te=32;function Wi(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i.location,a=n===void 0?C.location:n,s=i.distance,o=s===void 0?C.distance:s,c=i.threshold,l=c===void 0?C.threshold:c,u=i.findAllMatches,f=u===void 0?C.findAllMatches:u,d=i.minMatchCharLength,g=d===void 0?C.minMatchCharLength:d,m=i.includeMatches,h=m===void 0?C.includeMatches:m,v=i.ignoreLocation,p=v===void 0?C.ignoreLocation:v;if(t.length>te)throw new Error(Li(te));for(var M=t.length,S=e.length,y=Math.max(0,Math.min(a,S)),w=l,b=y,A=g>1||h,x=A?Array(S):[],T;(T=e.indexOf(t,b))>-1;){var z=he(t,{currentLocation:T,expectedLocation:y,distance:o,ignoreLocation:p});if(w=Math.min(z,w),b=T+M,A)for(var L=0;L<M;)x[T+L]=1,L+=1}b=-1;for(var P=[],D=1,N=M+S,Te=1<<M-1,ee=0;ee<M;ee+=1){for(var ue=0,V=N;ue<V;){var _r=he(t,{errors:ee,currentLocation:y+V,expectedLocation:y,distance:o,ignoreLocation:p});_r<=w?ue=V:N=V,V=Math.floor((N-ue)/2+ue)}N=V;var ft=Math.max(1,y-V+1),Le=f?S:Math.min(y+V,S)+M,ie=Array(Le+2);ie[Le+1]=(1<<ee)-1;for(var $=Le;$>=ft;$-=1){var de=$-1,ht=r[e.charAt(de)];if(A&&(x[de]=+!!ht),ie[$]=(ie[$+1]<<1|1)&ht,ee&&(ie[$]|=(P[$+1]|P[$])<<1|1|P[$+1]),ie[$]&Te&&(D=he(t,{errors:ee,currentLocation:de,expectedLocation:y,distance:o,ignoreLocation:p}),D<=w)){if(w=D,b=de,b<=y)break;ft=Math.max(1,2*y-b)}}var zr=he(t,{errors:ee+1,currentLocation:y,expectedLocation:y,distance:o,ignoreLocation:p});if(zr>w)break;P=ie}var Pe={isMatch:b>=0,score:Math.max(.001,D)};if(A){var pt=Gi(x,g);pt.length?h&&(Pe.indices=pt):Pe.isMatch=!1}return Pe}function ji(e){for(var t={},r=0,i=e.length;r<i;r+=1){var n=e.charAt(r);t[n]=(t[n]||0)|1<<i-r-1}return t}var er=function(){function e(t){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.location,a=n===void 0?C.location:n,s=i.threshold,o=s===void 0?C.threshold:s,c=i.distance,l=c===void 0?C.distance:c,u=i.includeMatches,f=u===void 0?C.includeMatches:u,d=i.findAllMatches,g=d===void 0?C.findAllMatches:d,m=i.minMatchCharLength,h=m===void 0?C.minMatchCharLength:m,v=i.isCaseSensitive,p=v===void 0?C.isCaseSensitive:v,M=i.ignoreLocation,S=M===void 0?C.ignoreLocation:M;if(R(this,e),this.options={location:a,threshold:o,distance:l,includeMatches:f,findAllMatches:g,minMatchCharLength:h,isCaseSensitive:p,ignoreLocation:S},this.pattern=p?t:t.toLowerCase(),this.chunks=[],!!this.pattern.length){var y=function(L,P){r.chunks.push({pattern:L,alphabet:ji(L),startIndex:P})},w=this.pattern.length;if(w>te){for(var b=0,A=w%te,x=w-A;b<x;)y(this.pattern.substr(b,te),b),b+=te;if(A){var T=w-te;y(this.pattern.substr(T),T)}}else y(this.pattern,0)}}return I(e,[{key:"searchIn",value:function(r){var i=this.options,n=i.isCaseSensitive,a=i.includeMatches;if(n||(r=r.toLowerCase()),this.pattern===r){var s={isMatch:!0,score:0};return a&&(s.indices=[[0,r.length-1]]),s}var o=this.options,c=o.location,l=o.distance,u=o.threshold,f=o.findAllMatches,d=o.minMatchCharLength,g=o.ignoreLocation,m=[],h=0,v=!1;this.chunks.forEach(function(M){var S=M.pattern,y=M.alphabet,w=M.startIndex,b=Wi(r,S,y,{location:c+w,distance:l,threshold:u,findAllMatches:f,minMatchCharLength:d,includeMatches:a,ignoreLocation:g}),A=b.isMatch,x=b.score,T=b.indices;A&&(v=!0),h+=x,A&&T&&(m=[].concat(re(m),re(T)))});var p={isMatch:v,score:v?h/this.chunks.length:1};return v&&a&&(p.indices=m),p}}]),e}(),X=function(){function e(t){R(this,e),this.pattern=t}return I(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(r){return Ut(r,this.multiRegex)}},{key:"isSingleMatch",value:function(r){return Ut(r,this.singleRegex)}}]),e}();function Ut(e,t){var r=e.match(t);return r?r[1]:null}var Ki=function(e){J(r,e);var t=Z(r);function r(i){return R(this,r),t.call(this,i)}return I(r,[{key:"search",value:function(n){var a=n===this.pattern;return{isMatch:a,score:a?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),r}(X),Ui=function(e){J(r,e);var t=Z(r);function r(i){return R(this,r),t.call(this,i)}return I(r,[{key:"search",value:function(n){var a=n.indexOf(this.pattern),s=a===-1;return{isMatch:s,score:s?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),r}(X),Yi=function(e){J(r,e);var t=Z(r);function r(i){return R(this,r),t.call(this,i)}return I(r,[{key:"search",value:function(n){var a=n.startsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),r}(X),Vi=function(e){J(r,e);var t=Z(r);function r(i){return R(this,r),t.call(this,i)}return I(r,[{key:"search",value:function(n){var a=!n.startsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),r}(X),Qi=function(e){J(r,e);var t=Z(r);function r(i){return R(this,r),t.call(this,i)}return I(r,[{key:"search",value:function(n){var a=n.endsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[n.length-this.pattern.length,n.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),r}(X),Ji=function(e){J(r,e);var t=Z(r);function r(i){return R(this,r),t.call(this,i)}return I(r,[{key:"search",value:function(n){var a=!n.endsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),r}(X),tr=function(e){J(r,e);var t=Z(r);function r(i){var n,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.location,o=s===void 0?C.location:s,c=a.threshold,l=c===void 0?C.threshold:c,u=a.distance,f=u===void 0?C.distance:u,d=a.includeMatches,g=d===void 0?C.includeMatches:d,m=a.findAllMatches,h=m===void 0?C.findAllMatches:m,v=a.minMatchCharLength,p=v===void 0?C.minMatchCharLength:v,M=a.isCaseSensitive,S=M===void 0?C.isCaseSensitive:M,y=a.ignoreLocation,w=y===void 0?C.ignoreLocation:y;return R(this,r),n=t.call(this,i),n._bitapSearch=new er(i,{location:o,threshold:l,distance:f,includeMatches:g,findAllMatches:h,minMatchCharLength:p,isCaseSensitive:S,ignoreLocation:w}),n}return I(r,[{key:"search",value:function(n){return this._bitapSearch.searchIn(n)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),r}(X),rr=function(e){J(r,e);var t=Z(r);function r(i){return R(this,r),t.call(this,i)}return I(r,[{key:"search",value:function(n){for(var a=0,s,o=[],c=this.pattern.length;(s=n.indexOf(this.pattern,a))>-1;)a=s+c,o.push([s,a-1]);var l=!!o.length;return{isMatch:l,score:l?0:1,indices:o}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),r}(X),He=[Ki,rr,Yi,Vi,Ji,Qi,Ui,tr],Yt=He.length,Zi=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Xi="|";function qi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.split(Xi).map(function(r){for(var i=r.trim().split(Zi).filter(function(m){return m&&!!m.trim()}),n=[],a=0,s=i.length;a<s;a+=1){for(var o=i[a],c=!1,l=-1;!c&&++l<Yt;){var u=He[l],f=u.isMultiMatch(o);f&&(n.push(new u(f,t)),c=!0)}if(!c)for(l=-1;++l<Yt;){var d=He[l],g=d.isSingleMatch(o);if(g){n.push(new d(g,t));break}}}return n})}var en=new Set([tr.type,rr.type]),tn=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.isCaseSensitive,n=i===void 0?C.isCaseSensitive:i,a=r.includeMatches,s=a===void 0?C.includeMatches:a,o=r.minMatchCharLength,c=o===void 0?C.minMatchCharLength:o,l=r.ignoreLocation,u=l===void 0?C.ignoreLocation:l,f=r.findAllMatches,d=f===void 0?C.findAllMatches:f,g=r.location,m=g===void 0?C.location:g,h=r.threshold,v=h===void 0?C.threshold:h,p=r.distance,M=p===void 0?C.distance:p;R(this,e),this.query=null,this.options={isCaseSensitive:n,includeMatches:s,minMatchCharLength:c,findAllMatches:d,ignoreLocation:u,location:m,threshold:v,distance:M},this.pattern=n?t:t.toLowerCase(),this.query=qi(this.pattern,this.options)}return I(e,[{key:"searchIn",value:function(r){var i=this.query;if(!i)return{isMatch:!1,score:1};var n=this.options,a=n.includeMatches,s=n.isCaseSensitive;r=s?r:r.toLowerCase();for(var o=0,c=[],l=0,u=0,f=i.length;u<f;u+=1){var d=i[u];c.length=0,o=0;for(var g=0,m=d.length;g<m;g+=1){var h=d[g],v=h.search(r),p=v.isMatch,M=v.indices,S=v.score;if(p){if(o+=1,l+=S,a){var y=h.constructor.type;en.has(y)?c=[].concat(re(c),re(M)):c.push(M)}}else{l=0,o=0,c.length=0;break}}if(o){var w={isMatch:!0,score:l/o};return a&&(w.indices=c),w}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(r,i){return i.useExtendedSearch}}]),e}(),ge=[];function rn(){ge.push.apply(ge,arguments)}function Ge(e,t){for(var r=0,i=ge.length;r<i;r+=1){var n=ge[r];if(n.condition(e,t))return new n(e,t)}return new er(e,t)}var me={AND:"$and",OR:"$or"},We={PATH:"$path",PATTERN:"$val"},je=function(t){return!!(t[me.AND]||t[me.OR])},nn=function(t){return!!t[We.PATH]},an=function(t){return!Y(t)&&Jt(t)&&!je(t)},Vt=function(t){return _e({},me.AND,Object.keys(t).map(function(r){return _e({},r,t[r])}))};function ir(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.auto,n=i===void 0?!0:i,a=function s(o){var c=Object.keys(o),l=nn(o);if(!l&&c.length>1&&!je(o))return s(Vt(o));if(an(o)){var u=l?o[We.PATH]:c[0],f=l?o[We.PATTERN]:o[u];if(!G(f))throw new Error(Ti(u));var d={keyId:$e(u),pattern:f};return n&&(d.searcher=Ge(f,t)),d}var g={children:[],operator:c[0]};return c.forEach(function(m){var h=o[m];Y(h)&&h.forEach(function(v){g.children.push(s(v))})}),g};return je(e)||(e=Vt(e)),a(e)}function on(e,t){var r=t.ignoreFieldNorm,i=r===void 0?C.ignoreFieldNorm:r;e.forEach(function(n){var a=1;n.matches.forEach(function(s){var o=s.key,c=s.norm,l=s.score,u=o?o.weight:null;a*=Math.pow(l===0&&u?Number.EPSILON:l,(u||1)*(i?1:c))}),n.score=a})}function sn(e,t){var r=e.matches;t.matches=[],O(r)&&r.forEach(function(i){if(!(!O(i.indices)||!i.indices.length)){var n=i.indices,a=i.value,s={indices:n,value:a};i.key&&(s.key=i.key.src),i.idx>-1&&(s.refIndex=i.idx),t.matches.push(s)}})}function cn(e,t){t.score=e.score}function ln(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.includeMatches,n=i===void 0?C.includeMatches:i,a=r.includeScore,s=a===void 0?C.includeScore:a,o=[];return n&&o.push(sn),s&&o.push(cn),e.map(function(c){var l=c.idx,u={item:t[l],refIndex:l};return o.length&&o.forEach(function(f){f(c,u)}),u})}var ae=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;R(this,e),this.options=ne(ne({},C),r),this.options.useExtendedSearch,this._keyStore=new Ri(this.options.keys),this.setCollection(t,i)}return I(e,[{key:"setCollection",value:function(r,i){if(this._docs=r,i&&!(i instanceof Ke))throw new Error(Bi);this._myIndex=i||qt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(r){O(r)&&(this._docs.push(r),this._myIndex.add(r))}},{key:"remove",value:function(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){return!1},i=[],n=0,a=this._docs.length;n<a;n+=1){var s=this._docs[n];r(s,n)&&(this.removeAt(n),n-=1,a-=1,i.push(s))}return i}},{key:"removeAt",value:function(r){this._docs.splice(r,1),this._myIndex.removeAt(r)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.limit,a=n===void 0?-1:n,s=this.options,o=s.includeMatches,c=s.includeScore,l=s.shouldSort,u=s.sortFn,f=s.ignoreFieldNorm,d=G(r)?G(this._docs[0])?this._searchStringList(r):this._searchObjectList(r):this._searchLogical(r);return on(d,{ignoreFieldNorm:f}),l&&d.sort(u),Qt(a)&&a>-1&&(d=d.slice(0,a)),ln(d,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(r){var i=Ge(r,this.options),n=this._myIndex.records,a=[];return n.forEach(function(s){var o=s.v,c=s.i,l=s.n;if(O(o)){var u=i.searchIn(o),f=u.isMatch,d=u.score,g=u.indices;f&&a.push({item:o,idx:c,matches:[{score:d,value:o,norm:l,indices:g}]})}}),a}},{key:"_searchLogical",value:function(r){var i=this,n=ir(r,this.options),a=function l(u,f,d){if(!u.children){var g=u.keyId,m=u.searcher,h=i._findMatches({key:i._keyStore.get(g),value:i._myIndex.getValueForItemAtKeyId(f,g),searcher:m});return h&&h.length?[{idx:d,item:f,matches:h}]:[]}for(var v=[],p=0,M=u.children.length;p<M;p+=1){var S=u.children[p],y=l(S,f,d);if(y.length)v.push.apply(v,re(y));else if(u.operator===me.AND)return[]}return v},s=this._myIndex.records,o={},c=[];return s.forEach(function(l){var u=l.$,f=l.i;if(O(u)){var d=a(n,u,f);d.length&&(o[f]||(o[f]={idx:f,item:u,matches:[]},c.push(o[f])),d.forEach(function(g){var m,h=g.matches;(m=o[f].matches).push.apply(m,re(h))}))}}),c}},{key:"_searchObjectList",value:function(r){var i=this,n=Ge(r,this.options),a=this._myIndex,s=a.keys,o=a.records,c=[];return o.forEach(function(l){var u=l.$,f=l.i;if(O(u)){var d=[];s.forEach(function(g,m){d.push.apply(d,re(i._findMatches({key:g,value:u[m],searcher:n})))}),d.length&&c.push({idx:f,item:u,matches:d})}}),c}},{key:"_findMatches",value:function(r){var i=r.key,n=r.value,a=r.searcher;if(!O(n))return[];var s=[];if(Y(n))n.forEach(function(g){var m=g.v,h=g.i,v=g.n;if(O(m)){var p=a.searchIn(m),M=p.isMatch,S=p.score,y=p.indices;M&&s.push({score:S,key:i,value:m,idx:h,norm:v,indices:y})}});else{var o=n.v,c=n.n,l=a.searchIn(o),u=l.isMatch,f=l.score,d=l.indices;u&&s.push({score:f,key:i,value:o,norm:c,indices:d})}return s}}]),e}();ae.version="6.6.2";ae.createIndex=qt;ae.parseIndex=Hi;ae.config=C;ae.parseQuery=ir;rn(tn);var un=ae;nr.exports=un});var Xn={};Ur(Xn,{PUNCTUATION:()=>F,abbreviations:()=>Ve,availableExclusions:()=>Tr,availableModifiers:()=>Br,clashBannedCards:()=>Ue,clashLegalCards:()=>dn,clashSpecializationOverrides:()=>Ye,default:()=>Dr,filterCard:()=>Rr,filtersToCardPropertyMappings:()=>we,getAbbreviation:()=>ye,getAbbreviationByCard:()=>fn,getCardByName:()=>at,getCleanText:()=>ot,getExcludedMetaFilters:()=>Je,getHeroBreakdown:()=>Vn,getKeywordsAndAppliedFiltersFromText:()=>nt,getMetaFilters:()=>Qe,getNormalizedText:()=>le,getRelatedCards:()=>dt,getRelatedCardsByName:()=>xe,getTokensReferencedByCards:()=>Zn,multiWordShorthands:()=>Xe,shorthands:()=>Ze,singleWordShorthands:()=>qe});module.exports=Yr(Xn);var _=K(U()),st=K(ar());var ve=K(U()),Ue=["Amulet of Ice","Ball Lightning","Belittle","Drone of Brutality","Duskblade","Rosetta Thorn","Stubby Hammerers"],dn=[],Ye=[{heroes:[ve.Hero.Briar],cardIdentifiers:["rosetta-thorn"]},{heroes:[ve.Hero.Emperor],cardIdentifiers:["command-and-conquer-red"]},{heroes:[ve.Hero.Prism],cardIdentifiers:["figment-of-erudition-yellow","figment-of-judgment-yellow","figment-of-protection-yellow","figment-of-ravages-yellow","figment-of-rebirth-yellow","figment-of-tenacity-yellow","figment-of-triumph-yellow","figment-of-war-yellow"]}];var F=/[!"#$%&'’(),./:;<=>?@[\]^_`|~]/g;var k=K(U());var ye=e=>Ve.find(({abbreviations:t})=>t.find(r=>r.toLowerCase()===e)),fn=e=>Ve.find(({card:t})=>t.toLowerCase()===e.name.toLowerCase()),Ve=[{abbreviations:["10k"],card:"10,000 Year Reunion"},{abbreviations:["3oak"],card:"Three of a Kind"},{abbreviations:["ALS"],card:"Arc Light Sentinel"},{abbreviations:["AoW"],card:"Art of War"},{abbreviations:["BBD"],card:"Barraging Beatdown"},{abbreviations:["BBS"],card:"Big Blue Sky"},{abbreviations:["Starvo"],card:"Bravo, Star of the Show"},{abbreviations:["BEB"],card:"Bull's Eye Bracers"},{abbreviations:["BLW"],card:"Be Like Water"},{abbreviations:["BoJ"],card:"Balance of Justice"},{abbreviations:["BOHH"],card:"Blood on Her Hands"},{abbreviations:["BRB"],card:"Bloodrush Bellow"},{abbreviations:["Breezies"],card:"Breeze Rider Boots"},{abbreviations:["BTA"],card:"Burn Them All"},{abbreviations:["Cake","\u{1F382}"],card:"Ninth Blade of the Blood Oath"},{abbreviations:["CLF"],card:"Channel Lake Frigid"},{abbreviations:["CMH"],card:"Channel Mount Heroic"},{abbreviations:["CnC","C&C"],card:"Command and Conquer"},{abbreviations:["CStrike","C-Strike","C Strike"],card:"Celestial Cataclysm"},{abbreviations:["Cat","Kitty"],card:"Crouching Tiger"},{abbreviations:["CoD"],card:"Crown of Dominion"},{abbreviations:["CoP"],card:"Crown of Providence"},{abbreviations:["CtW"],card:"Crush the Weak"},{abbreviations:["DD"],card:"Death Dealer"},{abbreviations:["DPot","D Pot"],card:"Potion of Deja Vu"},{abbreviations:["Dullcap"],card:"Arcanite Skullcap"},{abbreviations:["EBTT"],card:"Even Bigger Than That!"},{abbreviations:["NewNigma"],card:"Enigma, New Moon"},{abbreviations:["EPot","E Pot"],card:"Energy Potion"},{abbreviations:["EStrike","E-Strike","E Strike"],card:"Enlightened Strike"},{abbreviations:["FFS"],card:"Fyendal's Fighting Spirit"},{abbreviations:["FoN"],card:"Force of Nature"},{abbreviations:["Frosty","\u{1F976}","\u{1F9CA}","\u2744\uFE0F"],card:"Frostbite"},{abbreviations:["Frosty Hammer"],card:"Winter's Wail"},{abbreviations:["GnT"],card:"Give and Take"},{abbreviations:["HMH"],card:"Hope Merchant's Hood"},{abbreviations:["HoI"],card:"Heart of Ice"},{abbreviations:["KKBB"],card:"Knick Knack Bric-a-brac"},{abbreviations:["BStrike"],card:"Levels of Enlightenment"},{abbreviations:["LAG","Twominaris"],card:"Luminaris, Angel's Glow"},{abbreviations:["LCF","Newminaris"],card:"Luminaris, Celestial Fury"},{abbreviations:["LDE"],card:"Last Ditch Effort"},{abbreviations:["LFaL","L4aL"],card:"Life for a Life"},{abbreviations:["LiT"],card:"Lost in Thought"},{abbreviations:["LNW"],card:"Leave No Witnesses"},{abbreviations:["LoW"],card:"Lord of Wind"},{abbreviations:["LtC"],card:"Lead the Charge"},{abbreviations:["MaxV"],card:"Maximum Velocity"},{abbreviations:["MMB"],card:"Mage Master Boots"},{abbreviations:["MnG"],card:"Meat and Greet"},{abbreviations:["MoM"],card:"Mask of Momentum"},{abbreviations:["Pajamas","PJs"],card:"Alluvion Constellas"},{abbreviations:["Ponder Run"],card:"Premeditate"},{abbreviations:["PF","\u{1F525}"],card:"Phoenix Flame"},{abbreviations:["PoM"],card:"Peace of Mind"},{abbreviations:["Pumpkin"],card:"Jack-o'-lantern"},{abbreviations:["Qi Unbound"],card:"Qi Unleashed"},{abbreviations:["RitL"],card:"Red in the Ledger"},{abbreviations:["Cats","Ghost cat","Ghost cats"],card:"Restless Coalescence"},{abbreviations:["SFaF","S4aS"],card:"Scar for a Scar"},{abbreviations:["SWOMB"],card:"Shifting Winds of the Mystic Beast"},{abbreviations:["SWK"],card:"Spinning Wheel Kick"},{abbreviations:["SSGB"],card:"Sandscour Greatbow"},{abbreviations:["SSP"],card:"Sand Sketched Plan"},{abbreviations:["SFTL"],card:"Swing Fist, Think Later"},{abbreviations:["Thanos","Infinity Gauntlet"],card:"Polarity Reversal Script"},{abbreviations:["TAYG"],card:"That All You Got?"},{abbreviations:["ToS"],card:"Test of Strength"},{abbreviations:["TROM"],card:"This Round's on Me"},{abbreviations:["TTT"],card:"Take the Tempo"},{abbreviations:["Ultron"],card:"Teklovossen, the Mechropotent"},{abbreviations:["Pox Malone","Post Malone"],card:"Virulent Touch"},{abbreviations:["Cast Homes"],card:"Visit Goldmane Estate"},{abbreviations:["ZTS"],card:"Zero to Sixty"}];var E=K(U());var Ce=Array.from(Array(50).keys()).map(e=>`${e}`),hn=[{format:E.Format.BlitzLivingLegend,nicknames:["blitz ll"]},{format:E.Format.ClassicConstructed,nicknames:["cc","classic"]},{format:E.Format.ClassicConstructedLivingLegend,nicknames:["cc ll","classic constructed ll","ll cc","ll","living legend"]},{format:E.Format.UltimatePitFight,nicknames:["upf"]}],pn=Object.values(E.Format).map(e=>{let t=hn.find(({format:i})=>i===e),r=e.toLowerCase().replaceAll(F,"");return t?Q(H({},t),{format:r}):{format:r}}),gn=[{hero:E.Hero.DataDoll,nicknames:["data","datadoll"]},{hero:E.Hero.Dorinthea,nicknames:["dori"]},{hero:E.Hero.GenisWotchuneed,nicknames:["genis"]},{hero:E.Hero.Iyslander,nicknames:["islander"]}],mn=Object.values(E.Hero).map(e=>{let t=gn.find(({hero:i})=>i===e),r=e.toLowerCase().replaceAll(F,"");return t?Q(H({},t),{hero:r}):{hero:r}}),be=["common","rare","super rare","majestic","legendary","fabled"],vn=(e,t,r)=>{let i=[];if(!t)i.push(...e);else for(let n of e)switch(t){case">=":let a=!1;for(let l of be)a?i.push(l):l===n&&(a=!0,i.push(l));break;case">":let s=!1;for(let l of be)s?i.push(l):l===n&&(s=!0);break;case"<=":let o=!1;for(let l of be.slice().reverse())o?i.push(l):l===n&&(o=!0,i.push(l));break;case"<":let c=!1;for(let l of be.slice().reverse())c?i.push(l):l===n&&(c=!0);break;default:break}return{filterToPropertyMapping:{property:"rarities",isArray:!0},isOr:!0,values:i,excluded:r}},yn=(e,t)=>{let r=[],i=[],n=[];for(let a of e){let s=pn.find(({format:o,nicknames:c})=>o===a||!!c&&c.includes(a));if(s)i.push(s.format);else{let o=mn.find(({hero:c,nicknames:l})=>c===a||!!l&&l.includes(a));o&&n.push(o.hero)}}return i.length>0&&r.push({filterToPropertyMapping:{property:"legalFormats",isArray:!0},values:i,isOr:!0,excluded:t}),n.length>0&&r.push({filterToPropertyMapping:{property:"legalHeroes",isArray:!0},values:n,isOr:!0,excluded:t}),r},Qe=(e,t,r,i)=>{let n=[];return Mn(t)?n.push(...yn(r,e)):An(t)&&n.push(vn(r,i,e)),n},oe=[{filterToPropertyMapping:{property:"cost",isNumber:!0},values:Ce,excluded:!0},{filterToPropertyMapping:{property:"specialCost",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0}],W=[{filterToPropertyMapping:{property:"defense",isNumber:!0},values:Ce,excluded:!0},{filterToPropertyMapping:{property:"specialDefense",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["hero","placeholder","token","weapon"],excluded:!0}],ke=[{filterToPropertyMapping:{property:"pitch",isNumber:!0},excluded:!0,values:Ce},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0},{filterToPropertyMapping:{property:"isCardBack",isBoolean:!0},values:["true"],excluded:!0}],q=[{filterToPropertyMapping:{property:"power",isNumber:!0},excluded:!0,values:Ce},{filterToPropertyMapping:{property:"specialPower",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token"],excluded:!0}],Me=[{filterToPropertyMapping:{property:"talents",isArray:!0},excluded:!0,values:Object.values(E.Talent).map(e=>e.toLowerCase())}],bn={"!co":oe,"-co":oe,"!cost":oe,"-cost":oe,"!color":oe,"-color":oe,"!b":W,"-b":W,"!block":W,"-block":W,"!d":W,"-d":W,"!def":W,"-def":W,"!defense":W,"-defense":W,"!pitch":ke,"-pitch":ke,"!p":ke,"-p":ke,"!attack":q,"-attack":q,"!power":q,"-power":q,"!pwr":q,"-pwr":q,"!pow":q,"-pow":q,"!talents":Me,"-talents":Me,"!tal":Me,"-tal":Me},Je=e=>{let t=[],r=bn[e];return r&&t.push(...r),t},kn=["l","legal","hero"],Mn=e=>kn.includes(e),Cn=["r","rarity"],An=e=>Cn.includes(e);var Ze=[{description:"Attack actions",filters:["st:attack"],shorthands:["AA"]},{description:"Arcane barrier",filters:['k:"arcane barrier"'],shorthands:["AB"]},{description:"Attack reactions",filters:['t:"attack reaction"'],shorthands:["AR"]},{description:"Defense reactions",filters:['t:"defense reaction"'],shorthands:["DR"]},{description:"Gain life",filters:["gain {h}"],shorthands:["Gain life","Gains life"]},{description:"Go again",filters:['k:"go again"'],shorthands:["GA"]},{description:"Non-attack actions",filters:["t:action","st:non-attack"],shorthands:["NAA"]},{description:"Plus defense",filters:["+ {d}"],shorthands:["Pump defense","Pumps defense","Buff defense","Buffs defense"]},{description:"Plus power",filters:["+ {p}"],shorthands:["Pumps","Pump","Buff","Buffs","Pump attack","Pump attacks","Pumps attack","Pumps attacks","Buff attack","Buff attacks","Buffs attack","Buffs attacks","Pump power","Pumps power","Buff power","Buffs power"]},{description:"Poppers",filters:["!c:illusionist","st:attack","pwr:>=6","def:>=0"],helper:'6+ power non-Illusionist attacks that can "pop" phantasm attacks when defending',shorthands:["Poppers","Popper"]},{description:"Spellvoid",filters:['k:"spellvoid"'],shorthands:["SV"]}],Xe=Ze.filter(({shorthands:e})=>e.some(t=>t.includes(" "))).map(e=>Q(H({},e),{shorthands:e.shorthands.filter(t=>t.includes(" ")).map(t=>t.toLowerCase()).sort((t,r)=>r.length-t.length)})),qe=Ze.filter(({shorthands:e})=>e.some(t=>!t.includes(" "))).map(e=>Q(H({},e),{shorthands:e.shorthands.filter(t=>!t.includes(" ")).map(t=>t.toLowerCase()).sort((t,r)=>r.length-t.length)}));var Br=[">=",">","<=","<"],Tr=["!","-"],et={property:"artists",isArray:!0,partialMatch:!0},or={property:"bannedFormats",isArray:!0,partialMatch:!0},sr={property:"bonds",isArray:!0},Sn={property:"n/a"},cr={property:"classes",isArray:!0,partialMatch:!0},lr={property:"cost",specialProperty:"specialCost",isNumber:!0,partialMatch:!0},ce={property:"defense",specialProperty:"specialDefense",isNumber:!0},ur={property:"flows",isArray:!0},dr={nestedProperty:"foiling",property:"printings",isArray:!0},fr={property:"fusions",isArray:!0},hr={property:"intellect",isNumber:!0},pr={property:"keywords",isArray:!0,partialMatch:!0},tt={property:"n/a",isMeta:!0},gr={property:"life",specialProperty:"specialLife",isNumber:!0},mr={property:"name",isString:!0},rt={property:"pitch",isNumber:!0},Ae={property:"power",specialProperty:"specialPower",isNumber:!0},vr={property:"n/a",isMeta:!0},Fn={property:"n/a"},wn={property:"n/a"},yr={property:"sets",isArray:!0,partialMatch:!0},Se={property:"specializations",isArray:!0,partialMatch:!0},br={property:"subtypes",isArray:!0},kr={property:"types",isArray:!0},Mr={property:"talents",isArray:!0},xn={property:"functionalText",isString:!0,partialMatch:!0},Bn={property:"typeText",isString:!0,partialMatch:!0},Fe={nestedProperty:"treatment",property:"printings",isArray:!0},we={a:et,artist:et,art:et,attack:Ae,b:ce,block:ce,banned:or,bond:sr,bonds:sr,c:cr,class:cr,chain:Sn,co:lr,cost:lr,color:rt,d:ce,def:ce,defense:ce,flow:ur,flows:ur,f:fr,fusion:fr,foil:dr,foiling:dr,i:hr,intellect:hr,k:pr,keyword:pr,l:tt,legal:tt,hero:tt,li:gr,life:gr,n:mr,name:mr,p:rt,pitch:rt,pwr:Ae,pow:Ae,power:Ae,r:vr,rarity:vr,referencedby:Fn,references:wn,rf:or,s:yr,set:yr,sp:Se,spec:Se,specialization:Se,specializations:Se,st:br,subtype:br,t:kr,type:kr,tal:Mr,talent:Mr,text:xn,treat:Fe,treatment:Fe,var:Fe,variation:Fe,x:Bn},Tn=[{text:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase(),override:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase().replaceAll(F,"")}],Ln=e=>{var n;let t=[],r=e.replaceAll("\u201D",'"');for(let{text:a,override:s}of Tn)r.includes(a)&&(r=r.replace(a,s));if((n=ye(r))==null?void 0:n.card)t.push(r);else{let a=r.split(/[ ]+/),s="",o=0;for(let c of a)o===2&&(t.push(s.trim().replaceAll('"',"")),s="",o=0),o<2&&c.split('"').length===2?(s+=" "+c,o++):o===0&&s===""?t.push(c):o===1&&(s+=" "+c);o===2&&(t.push(s.trim().replaceAll('"',"")),s="",o=0)}return t},Pn=[k.Hero.Briar,k.Hero.Brutus,k.Hero.Emperor,k.Hero.Prism,k.Hero.Shiyana,k.Hero.Taylor,k.Hero.Yorick],nt=(e,t)=>{var d;let r=e.trim().toLowerCase();for(let{filters:g,shorthands:m}of Xe)for(let h of m)if(r.includes(h)){r=r.replace(h,g.join(" "));break}for(let[g,m]of Object.entries(k.setToSetIdentifierMappings))r.includes(g.toLowerCase())&&(r=r.replace(g.toLowerCase(),m[0]));let i=Ln(r),n=[];for(let g of i){let m=qe.find(({shorthands:h})=>h.includes(g));m?n.push(...m.filters):n.push(g)}let a=[],s=[],o=[],c=[],l=[],u=[],f={isClash:!1,heroes:[]};for(let g of n)if($n(g)){let[m,h]=g.split(":"),{modifier:v,values:p,isAnd:M,isOr:S}=zn(h),{filterKey:y,excluded:w,isMeta:b}=Nn(m);if(b){if(["rarity","r"].includes(y)&&(p=_n(p)),["legal","l","hero"].includes(y)){for(let A of Pn)h.includes(A.toLowerCase())&&(f.heroes.includes(A)||f.heroes.push(A));h.includes("clash")&&(f.isClash=!0)}a.push(...Qe(w,y,p,v))}else{if(["chain"].includes(y)){let A=D=>D.name.toLowerCase().replaceAll(F,""),x=p.map(D=>at(D,t)).filter(D=>!!D).map(A),T=new Set(x);y="name",S=!0;let z=20,L=0,P=D=>{if(!D.types.includes(k.Type.Hero)){let N=A(D);T.add(N),x.includes(N)||x.push(N)}};for(let D of x){if(L>z)break;let{referencedBy:N,references:Te}=xe(D,t);Te.forEach(P),L===0&&N.forEach(P),L++}p=Array.from(T)}else if(["referencedby","references"].includes(y)){let A=y,x=[...p].filter(T=>!!T);p=[],y="name",S=!0;for(let T of x){let{referencedBy:z,references:L}=xe(T,t);["referencedby"].includes(A)?p.push(...L.map(({name:P})=>P.toLowerCase().replaceAll(F,""))):["references"].includes(A)&&p.push(...z.map(({name:P})=>P.toLowerCase().replaceAll(F,"")))}}else["art","artist"].includes(y)?s=p:["foiling","foil"].includes(y)?(c=En(p),p=c.map(A=>A.toLowerCase())):["treat","treatment","var","variation"].includes(y)?(u=On(p),p=u.map(A=>A.toLowerCase())):["set","s"].includes(y)?(l=Dn(p),p=l.map(A=>A.toLowerCase().replaceAll(F,""))):["pitch","p","color"].includes(y)&&(p=In(p));we[y]&&a.push({filterToPropertyMapping:we[y],values:p,isAnd:M,isOr:S,modifier:v,excluded:w})}}else if(g){let m=(d=ye(g))==null?void 0:d.card,h=Je(g);m?o.push(`"${m.toLowerCase().replace(F,"")}"`):h&&h.length>0?a.push(...h):o.push(g.replace(F,""))}return{appliedFilters:a,attributes:{artists:s,foilings:c,releases:l,treatments:u},keywords:o,specialConditions:f}},Dn=e=>{let t=[];for(let r of e)t.push(...Rn(r));return t},Rn=e=>{let t=[],r=Object.values(k.Release).find(i=>i.toLowerCase().replaceAll(F,"")===e);if(r&&t.push(r),t.length===0){let i=k.setIdentifierToSetMappings[e];i&&t.push(i)}if(t.length===0){let i=Object.values(k.Release).filter(n=>n.toLowerCase().includes(e));i.length>0&&t.push(...i)}return t},it={blue:3,yellow:2,red:1,white:0},In=e=>{let t=[];for(let r of e)it[r]||it[r]===0?t.push(it[r].toString()):t.push(r);return t},Cr={r:k.Foiling.R,rf:k.Foiling.R,rainbow:k.Foiling.R,c:k.Foiling.C,cf:k.Foiling.C,cold:k.Foiling.C,g:k.Foiling.G,gf:k.Foiling.G,gold:k.Foiling.G},En=e=>{let t=[];for(let r of e)Cr[r]&&t.push(Cr[r]);return t},Ar=Q(H({},Object.values(k.Treatment).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{})),{aa:k.Treatment.AA,alt:k.Treatment.AA,"alt art":k.Treatment.AA,ab:k.Treatment.AB,"alt border":k.Treatment.AB,at:k.Treatment.AT,"alt text":k.Treatment.AT,ea:k.Treatment.EA,extended:k.Treatment.EA,"extended art":k.Treatment.EA,fa:k.Treatment.FA,full:k.Treatment.FA,"full art":k.Treatment.FA}),On=e=>{let t=[];for(let r of e)Ar[r]?t.push(Ar[r]):k.Treatment[r.toUpperCase()]&&t.push(k.Treatment[r.toUpperCase()]);return t},Sr={c:"common",f:"fabled",l:"legendary",m:"majestic",v:"marvel",r:"rare",s:"super rare",t:"token"},_n=e=>{let t=[];for(let r of e)Sr[r]?t.push(Sr[r]):t.push(r);return t},zn=e=>{let t=[],r,i,n=Br.find(a=>e.includes(a));if(n){let[,a]=e.split(n);Fr(a)?(r=!0,t.push(...a.trim().split("+").map(s=>s.replace(F,"")))):wr(a)?(i=!0,t.push(...a.trim().split(",").map(s=>s.replace(F,"")))):t.push(a.trim().replace(F,""))}else Fr(e)?(r=!0,t.push(...e.trim().split("+").map(a=>a.replace(F,"")))):wr(e)?(i=!0,t.push(...e.trim().split(",").map(a=>a.replace(F,"")))):e.startsWith('"')&&e.endsWith('"')?t.push(e.trim().replaceAll('"',"").replace(F,"")):t.push(e.trim().replace(F,""));return{modifier:n,values:t,isAnd:r,isOr:i}},Nn=e=>{let t=Hn(e);if(t){let[,r]=e.split(t);return{excluded:!0,filterKey:r,isMeta:xr(r)}}else return{excluded:!1,filterKey:e,isMeta:xr(e)}},$n=e=>e.indexOf(":")>=0,Fr=e=>e.indexOf("+")>=0,wr=e=>e.indexOf(",")>=0,xr=e=>{var t;return!!((t=we[e])!=null&&t.isMeta)},Hn=e=>{var t;return(t=Tr.find(r=>e.includes(r)))==null?void 0:t.slice(0,1)};var B=K(U()),Lr={artists:["Hoodwill"],cardIdentifier:"fangs-a-lot-blue",classes:[B.Class.Generic],defaultImage:"FNG000",functionalText:"If Fangs A Lot is put into your banished zone from your graveyard, instead put it into your hand.",legalFormats:[],legalHeroes:[B.Hero.Kayo,B.Hero.Levia,B.Hero.Rhinar],printings:[{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000",print:"FNG000",set:B.Release.Promos},{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000_Marvel",print:`FNG000-${B.Treatment.FA}`,set:B.Release.Promos,treatment:B.Treatment.FA}],name:"Fangs A Lot",rarities:[B.Rarity.Rare],rarity:B.Rarity.Rare,sets:[B.Release.Promos],setIdentifiers:["FNG000"],specialImage:"FNG000_Marvel",subtypes:[B.Subtype.Attack],types:[B.Type.Action],typeText:"Generic Action - Attack"},Pr=[{keyword:Lr.name.toLowerCase(),card:Lr}];var at=(e,t)=>{let r=t.find(i=>ot(i.name)===e);return r||(r=t.find(i=>ot(i.name).includes(e))),r},ot=e=>le(e.toLowerCase().trim().replace(F,"")),le=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"");var ct=class{constructor(t){this.search=(t,r)=>{let i,{appliedFilters:n,attributes:a,keywords:s,specialConditions:o}=nt(t,this.cards),c=s.join(" "),l=r?Pr.filter(h=>h.keyword===c):[];if(l.length>0?i=l.map(({card:h})=>h):s.length?i=this.fuse.search(c).map(h=>h.item):i=[...this.cards],n.length&&(i=i.filter(h=>h&&Rr(h,n,o))),s.length===0){let h="";if(a.releases.length===1)try{let v=a.releases[0];h=_.setToSetIdentifierMappings[v][0].toUpperCase()}catch(v){console.error("Error getting set identifier from search",v)}h?i.sort((v,p)=>{var y,w;let M=(y=v.setIdentifiers.find(b=>b.includes(h)))==null?void 0:y.replace(h,""),S=(w=p.setIdentifiers.find(b=>b.includes(h)))==null?void 0:w.replace(h,"");return M&&S?M.localeCompare(S):-1}):i.sort((v,p)=>v.name===p.name?`${v.pitch}`.localeCompare(`${p.pitch}`):v.name.localeCompare(p.name))}else{let h=[],v=[],p=s.map(M=>M.toLowerCase().replace(F,"")).join(" ");for(let M of i)M.name.toLowerCase().replace(F,"")===p?h.push(M):v.push(M);i=[...h,...v]}let u,{artists:f,foilings:d,releases:g,treatments:m}=a;return(f.length>0||d.length>0||g.length>0||m.length>0)&&(u=i.map(h=>{let v=h.printings.filter(p=>{let M=!!p.image,S=f.length===0||f.some(A=>p.artists.find(x=>x.replace(F,"").toLowerCase().includes(x))),y=d.length===0||d.includes(p.foiling),w=g.length===0||g.includes(p.set),b=m.length===0||m.includes(p.treatment);return M&&S&&y&&w&&b});return H({matchingPrintings:v},h)})),{appliedFilters:n,attributes:a,keywords:s,searchResults:u||i}};let r={getFn:(i,n)=>{let a=st.default.config.getFn(i,n);return a&&(Array.isArray(a)?a.map(s=>le(s.replace(F,""))):le(a).replace(F,""))},ignoreLocation:!0,includeScore:!0,keys:[{name:"name",weight:10},{name:"functionalText",weight:6},{name:"setIdentifiers",weight:2},{name:"typeText",weight:6}],threshold:.15,useExtendedSearch:!0};this.cards=[...t],this.fuse=new st.default([...t],r)}},Dr=ct,Rr=(e,t,r)=>{let i=!0;for(let n of t){let{isNumber:a,isString:s,isArray:o,isBoolean:c,property:l}=n.filterToPropertyMapping;if((a&&!Gn(e,n)||s&&!Wn(e,n)||o&&!jn(e,n)||c&&!Kn(e,n))&&(i=!1),r.isClash&&["rarities","bannedFormats","legalFormats"].includes(l)){let f=[_.Rarity.SuperRare,_.Rarity.Majestic,_.Rarity.Legendary,_.Rarity.Fabled].some(v=>e.rarities.includes(v)),d=!1;for(let{cardIdentifiers:v,heroes:p}of Ye)for(let M of r.heroes)p.includes(M)&&v.includes(e.cardIdentifier)&&(d=!0);let g=!!e.specializations&&e.specializations.length>0||d,m=[_.Type.Mentor,_.Type.Weapon].some(v=>e.types.includes(v)),h=Ue.includes(e.name);!i&&!h&&(g||m)&&f&&(i=!0),h&&(i=!1)}if(r.isClash&&r.heroes.includes(_.Hero.Briar)&&e.name==="Rosetta Thorn"&&(i=!0),!i)break}return i},Gn=(e,t)=>{var r;if(Be(t,e)){let{values:i,modifier:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=t,o=lt(e,t);if(o!=null&&!isNaN(o))if(o=parseInt(o),n)switch(n){case">=":let c=i==null?void 0:i.some(d=>o>=parseInt(d));return a?!c:c;case">":let l=i==null?void 0:i.some(d=>o>parseInt(d));return a?!l:l;case"<=":let u=i==null?void 0:i.some(d=>o<=parseInt(d));return a?!u:u;case"<":let f=i==null?void 0:i.some(d=>o<parseInt(d));return a?!f:f;default:return!1}else{let c=i==null?void 0:i.some(l=>o===parseInt(l));return a?!c:c}else{let c=(r=Yn(e,t))==null?void 0:r.toLowerCase(),l=s?i==null?void 0:i.some(u=>c==null?void 0:c.includes(u)):i==null?void 0:i.some(u=>c===u);return a?!l:l}}else return!0},Wn=(e,t)=>{var r;if(Be(t,e)){let{values:i,isAnd:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=t,o=(r=lt(e,t))==null?void 0:r.replaceAll(F,"");if(s){let c=n?i==null?void 0:i.every(l=>o==null?void 0:o.toLowerCase().includes(l)):i==null?void 0:i.some(l=>o==null?void 0:o.toLowerCase().includes(l));return a?!c:c}else{let c=n?i==null?void 0:i.every(l=>(o==null?void 0:o.toLowerCase())===l):i==null?void 0:i.some(l=>(o==null?void 0:o.toLowerCase())===l);return a?!c:c}}else return!0},jn=(e,t)=>{if(Be(t,e)){let{values:r,isAnd:i,excluded:n,filterToPropertyMapping:{partialMatch:a}}=t,s=Un(e,t).map(o=>o==null?void 0:o.replaceAll(F,""));if(a){let o=i?r.every(l=>s==null?void 0:s.some(u=>u==null?void 0:u.toLowerCase().includes(l))):r.some(l=>s==null?void 0:s.some(u=>u==null?void 0:u.toLowerCase().includes(l))),c=s.length===0;return n?!o||c:o}else{let o=i?r.every(c=>s==null?void 0:s.some(l=>(l==null?void 0:l.toLowerCase())===c)):r.some(c=>s==null?void 0:s.some(l=>(l==null?void 0:l.toLowerCase())===c));return n?!o:o}}else return!0},Kn=(e,t)=>{if(Be(t,e)){let{excluded:r}=t,i=lt(e,t);return r?!i:i}else return!0},lt=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.property]},Un=(e,t)=>{let{filterToPropertyMapping:{nestedProperty:r,property:i}}=t,n=e[i]||[];return r?n.map(a=>a[r]).filter(a=>!!a):n},Yn=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.specialProperty]},Be=({cardTypes:e},{types:t,subtypes:r})=>!e||(e==null?void 0:e.some(i=>t.map(n=>n.toLowerCase()).includes(i.toLowerCase())||r.map(n=>n.toLowerCase()).includes(i.toLowerCase())));var j=K(U()),Vn=e=>{let t=e.filter(o=>o.types.includes(j.Type.Hero)).sort((o,c)=>o.name.localeCompare(c.name)),r=t.filter(o=>!o.young&&!o.classes.includes(j.Class.Adjudicator)),i=t.filter(o=>{let c=o.rarities.some(u=>u!==j.Rarity.Promo),l=o.sets.some(u=>u!==j.Release.Promos);return c||l}),n=t.filter(o=>{let c=o.rarities.every(u=>u===j.Rarity.Promo),l=o.sets.every(u=>u===j.Release.Promos);return c&&l}),a=t.filter(o=>o.young),s=a.filter(({hero:o})=>!r.find(c=>c.hero===o));return{all:t,adult:r,nonPromo:i,promoOnly:n,young:a,youngOnly:s}};var Or=K(U());var ut=K(U()),Qn={"Dawnblade, Resplendent":"Dawnblade"},Ir=e=>Qn[e.name]||e.name,Er=e=>{var t;return(t=e.functionalText)==null?void 0:t.replaceAll(e.name,"")},xe=(e,t)=>{let r=t.find(i=>i.name.toLowerCase().replace(F,"")===e);return r||(r=t.find(i=>i.name.toLowerCase().replace(F,"").includes(e))),dt(r,t)},dt=(e,t)=>{var a,s;let r=[],i=[],n=[];if(e){let o=[],c=[],l=Ir(e);for(let u of t){let f=Ir(u),d=l===f,g=e.pitch!==u.pitch;if(d&&g)r.push(u);else if(!d){let m=e.name==="Seismic Surge",h=(a=u.keywords)==null?void 0:a.includes(ut.Keyword.Heave),v=m&&h,p=Er(u),M=p==null?void 0:p.includes(l),S=Er(e),y=S==null?void 0:S.includes(f);(M||v)&&o.push(u);let w=u.name==="Seismic Surge",b=(s=e.keywords)==null?void 0:s.includes(ut.Keyword.Heave);(y||w&&b)&&c.push(u)}}for(let u of o)i.push(u);for(let u of c){let f=u.name;l!==f&&!c.some(d=>{let g=d.name;return g!==f&&g.includes(f)})&&n.push(u)}}return{otherPitches:r,referencedBy:i,references:n}},Jn=["cash-in-yellow"],Zn=(e,t,r)=>{let i=new Set;for(let n of e.filter(({cardIdentifier:a})=>!Jn.includes(a))){let{references:a}=dt(n,t);for(let s of a.filter(o=>{let c=o.name==="Hyper Driver",l=r===Or.Hero.Maxx;return!c||l}))i.add(s)}return Array.from(i)};0&&(module.exports={PUNCTUATION,abbreviations,availableExclusions,availableModifiers,clashBannedCards,clashLegalCards,clashSpecializationOverrides,filterCard,filtersToCardPropertyMappings,getAbbreviation,getAbbreviationByCard,getCardByName,getCleanText,getExcludedMetaFilters,getHeroBreakdown,getKeywordsAndAppliedFiltersFromText,getMetaFilters,getNormalizedText,getRelatedCards,getRelatedCardsByName,getTokensReferencedByCards,multiWordShorthands,shorthands,singleWordShorthands});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@flesh-and-blood/search",
3
3
  "description": "TypeScript search engine for Flesh and Blood cards",
4
- "version": "3.1.13",
4
+ "version": "3.1.15",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  "fuse.js": "^6.6.2"
18
18
  },
19
19
  "devDependencies": {
20
- "@flesh-and-blood/cards": "^3.1.13",
20
+ "@flesh-and-blood/cards": "^3.1.15",
21
21
  "@types/jest": "^29.5.11",
22
22
  "@types/node": "^20.10.5",
23
23
  "esbuild": "^0.19.10",
@@ -47,5 +47,5 @@
47
47
  "FAB",
48
48
  "FABTCG"
49
49
  ],
50
- "gitHead": "c1086e17c0f3d0df693e547ee95f1777b27a436a"
50
+ "gitHead": "953b46a7663b3e12634f680622f0c5e3a411acf0"
51
51
  }