@flesh-and-blood/search 3.4.5 → 3.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var Vr=Object.create;var le=Object.defineProperty,Yr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptor,Qr=Object.getOwnPropertyDescriptors,Zr=Object.getOwnPropertyNames,yt=Object.getOwnPropertySymbols,Xr=Object.getPrototypeOf,kt=Object.prototype.hasOwnProperty,qr=Object.prototype.propertyIsEnumerable;var vt=(e,t,r)=>t in e?le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,W=(e,t)=>{for(var r in t||(t={}))kt.call(t,r)&&vt(e,r,t[r]);if(yt)for(var r of yt(t))qr.call(t,r)&&vt(e,r,t[r]);return e},$=(e,t)=>Yr(e,Qr(t));var bt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ea=(e,t)=>{for(var r in t)le(e,r,{get:t[r],enumerable:!0})},At=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Zr(t))!kt.call(e,i)&&i!==r&&le(e,i,{get:()=>t[i],enumerable:!(a=Jr(t,i))||a.enumerable});return e};var J=(e,t,r)=>(r=e!=null?Vr(Xr(e)):{},At(t||!e||!e.__esModule?le(r,"default",{value:e,enumerable:!0}):r,e)),ta=e=>At(le({},"__esModule",{value:!0}),e);var Q=bt((An,Yt)=>{var fe=Object.defineProperty,ra=Object.defineProperties,aa=Object.getOwnPropertyDescriptor,ia=Object.getOwnPropertyDescriptors,na=Object.getOwnPropertyNames,Ct=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,sa=Object.prototype.propertyIsEnumerable,Dt=(e,t,r)=>t in e?fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oa=(e,t)=>{for(var r in t||(t={}))Mt.call(t,r)&&Dt(e,r,t[r]);if(Ct)for(var r of Ct(t))sa.call(t,r)&&Dt(e,r,t[r]);return e},la=(e,t)=>ra(e,ia(t)),ca=(e,t)=>{for(var r in t)fe(e,r,{get:t[r],enumerable:!0})},ua=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of na(t))!Mt.call(e,i)&&i!==r&&fe(e,i,{get:()=>t[i],enumerable:!(a=aa(t,i))||a.enumerable});return e},da=e=>ua(fe({},"__esModule",{value:!0}),e),Bt={};ca(Bt,{Bond:()=>St,Class:()=>xt,Flow:()=>Tt,Foiling:()=>Ft,Format:()=>It,Fusion:()=>wt,Hero:()=>$t,Keyword:()=>jt,Language:()=>Kt,Meta:()=>Pt,Metatype:()=>Nt,Rarity:()=>Lt,Release:()=>Rt,ReleaseEdition:()=>zt,ReleaseType:()=>Ut,Subtype:()=>Wt,Talent:()=>Ot,Trait:()=>_t,Treatment:()=>Et,Type:()=>Ht,coreSetIdentifiers:()=>Ca,fullSetIdentifiers:()=>ze,getCanAddToDeck:()=>fa,getCanCardBeTokenForDeck:()=>pa,getCardIdentifier:()=>ha,getDefaultPrinting:()=>Pa,getIsArenaCard:()=>Gt,getIsBooster:()=>ya,getIsCardTokenForDeck:()=>ge,getIsDeckCard:()=>Re,getIsDraftable:()=>ka,getIsPreconstructed:()=>Aa,getIsReprint:()=>va,getPrint:()=>Sa,getShouldRotateCardImage:()=>ga,getSpecialPrinting:()=>wa,orderedFullSetBlackBorderIdentifiers:()=>Ta,promoSetIdentifiers:()=>Ma,releases:()=>Ba,setIdentifierToSetMappings:()=>Vt,setToSetIdentifierMappings:()=>Fa,supplementalSetIdentifiers:()=>Da});Yt.exports=da(Bt);var Ft=(e=>(e.C="Cold",e.G="Gold",e.R="Rainbow",e))(Ft||{}),Et=(e=>(e.AB="Alternate Border",e.AA="Alternate Art",e.AT="Alternate Text",e.EA="Extended Art",e.FA="Full Art",e))(Et||{}),xt=(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))(xt||{}),St=(e=>(e.Earth="Earth",e))(St||{}),Tt=(e=>(e.Lightning="Lightning",e))(Tt||{}),It=(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))(It||{}),wt=(e=>(e.Earth="Earth",e.Ice="Ice",e.Lightning="Lightning",e))(wt||{}),Lt=(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))(Lt||{}),Pt=(e=>(e.Expansion="Expansion slot",e.Rainbow="Rainbow",e))(Pt||{}),Rt=(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.TheHunted="The Hunted",e.Uprising="Uprising",e.WelcomeToRathe="Welcome to Rathe",e.ArmoryDeckAzalea="Armory Deck: Azalea",e.ArmoryDeckBoltyn="Armory Deck: Boltyn",e.ArmoryDeckDash="Armory Deck: Dash",e.ArmoryDeckKayo="Armory Deck: Kayo",e.ArmoryDeckOriginsJarl="Armory Deck Origins: Jarl",e.ArakniBlitzDeck="Arakni Blitz Deck",e.ArakniBlitzDeckARK="Arakni Hunted Blitz Deck",e.AuroraBlitzDeck="Aurora 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.ChaneBlitzDeck="Chane Blitz Deck",e.DromaiBlitzDeck="Dromai Blitz Deck",e.EnigmaBlitzDeck="Enigma Blitz Deck",e.FaiBlitzDeck="Fai Blitz Deck",e.FlorianBlitzDeck="Florian 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.OscilioBlitzDeck="Oscilio Blitz Deck",e.PrismBlitzDeck="Prism Blitz Deck",e.RhinarBlitzDeck="Rhinar Blitz Deck",e.RiptideBlitzDeck="Riptide Blitz Deck",e.UzuriBlitzDeck="Uzuri Blitz Deck",e.VerdanceBlitzDeck="Verdance Blitz Deck",e.VictorBlitzDeck="Victor Blitz Deck",e.ZenBlitzDeck="Zen Blitz Deck",e.FirstStrikeAurora="1st Strike: Aurora",e.FirstStrikeTerra="1st Strike: Terra",e.BravoHeroDeck="Bravo Hero Deck",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: TCC x LSS",e.Promos="Promos",e))(Rt||{}),zt=(e=>(e.Alpha="Alpha",e.First="First",e.Unlimited="Unlimited",e.Promo="Promo",e))(zt||{}),Ot=(e=>(e.Chaos="Chaos",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))(Ot||{}),_t=(e=>(e.AgentOfChaos="Agent of Chaos",e))(_t||{}),Nt=(e=>(e.Arakni="Arakni",e.Rosetta="Rosetta",e))(Nt||{}),Ht=(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))(Ht||{}),Wt=(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.Polearm="Polearm",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))(Wt||{}),$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.Cindra="Cindra",e.Crackni="Crackni",e.Dash="Dash",e.DataDoll="Data Doll",e.Dorinthea="Dorinthea",e.Dromai="Dromai",e.Emperor="Emperor",e.Enigma="Enigma",e.Fai="Fai",e.Fang="Fang",e.Florian="Florian",e.GenisWotchuneed="Genis Wotchuneed",e.Ira="Ira",e.Iyslander="Iyslander",e.Jarl="Jarl",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.Slippy="Slippy",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||{}),jt=(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.Heavy="Heavy",e.Intimidate="Intimidate",e.Legendary="Legendary",e.Mark="Mark",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))(jt||{}),ha=(e,t)=>{let{name:r,pitch:a}=e,i=r.toLowerCase().replace("//","-").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").replace(/ /g,"-").replace("\u0111","d").replace("\xED","i").replace(/[^a-z0-9 -]/g,"").replace(/--/,"-"),n="";switch(a){case"1":case 1:n=t?"-1":"-red";break;case"2":case 2:n=t?"-2":"-yellow";break;case"3":case 3:n=t?"-3":"-blue";break}return`${i}${n}`},Gt=({keywords:e,traits:t,types:r})=>{let a=Re({keywords:e,traits:t,types:r}),i=ge({keywords:e,traits:t,types:r}),n=["Demi-Hero","Equipment","Weapon"].some(o=>r.includes(o));return!a&&!i&&n},Re=({keywords:e,traits:t,types:r})=>{let a=["Action","Attack Reaction","Block","Defense Reaction","Instant","Mentor","Resource"].some(n=>r.includes(n)),i=ge({keywords:e,traits:t,types:r});return a&&!i},ge=({keywords:e,traits:t,types:r})=>{let a=!!t&&(t==null?void 0:t.includes("Agent of Chaos")),i=!!e&&e.includes("Ephemeral"),n=["Macro","Token"].some(o=>r.includes(o));return a||i||n},pa=e=>{let t=e.cardIdentifier==="cracked-bauble-yellow",r=ge(e),a=e.isCardBack&&e.cardIdentifier!=="inner-chi-blue";return t||r||a},fa=({isCardBack:e,keywords:t,traits:r,types:a})=>{let i=Gt({keywords:t,traits:r,types:a}),n=Re({keywords:t,traits:r,types:a});return!e&&(i||n)},ga=e=>{var t,r;return((t=e.keywords)==null?void 0:t.includes("Meld"))||((r=e.subtypes)==null?void 0:r.includes("Landmark"))||!1},Kt=(e=>(e.English="English",e.French="Fran\xE7ais",e.German="Deutsch",e.Italian="Italiano",e.Japanese="\u65E5\u672C\u8A9E",e.Spanish="Espa\xF1ol",e))(Kt||{}),ce=["English","Fran\xE7ais","Deutsch","Italiano","\u65E5\u672C\u8A9E","Espa\xF1ol"],Ut=(e=>(e.ArmoryDeck="Armory Deck",e.BlitzDeck="Blitz Deck",e.ClassicBattles="Classic Battles",e.ExpansionBooster="Expansion Booster",e.FirstStrike="1st Strike",e.HistoryPack="History Pack",e.MasteryPack="Mastery Pack",e.RoundTheTable="Round the Table",e.StandaloneBooster="Standalone Booster",e.WelcomeDeck="Welcome Deck",e))(Ut||{}),ma=["Expansion Booster","Standalone Booster"],ya=e=>ma.includes(e),va=e=>e==="History Pack",ka=e=>e==="Standalone Booster",ba=["Armory Deck","Blitz Deck","Classic Battles","1st Strike","Welcome Deck"],Aa=e=>ba.includes(e),Ca={wtr:"Welcome to Rathe",arc:"Arcane Rising",mon:"Monarch",ele:"Tales of Aria",upr:"Uprising",out:"Outsiders",evo:"Bright Lights",hvy:"Heavy Hitters",mst:"Part the Mistveil",ros:"Rosetta"},Da={cru:"Crucible of War",evr:"Everfest","1hp":"History Pack 1",hp1:"History Pack 1",dyn:"Dynasty",dtd:"Dusk till Dawn"},Ma=["fab","her","jdg","lgs","lss","oxo","xxx","win"],Ba=[{cards:30,classes:["Ninja"],heroes:["Ira"],languages:ce,release:"Ira Welcome Deck",releaseDate:"2019-08-31 12:00",releaseType:"Welcome Deck",setIdentifiers:["ira"],talents:[]},{cards:226,classes:["Brute","Guardian","Ninja","Warrior"],heroes:["Bravo","Dorinthea","Katsu","Rhinar"],languages:["English"],release:"Welcome to Rathe",releaseDate:"2019-10-11 12:00",releaseType:"Standalone Booster",setIdentifiers:["wtr"],talents:[]},{cards:219,classes:["Mechanologist","Ranger","Runeblade","Wizard"],heroes:["Azalea","Dash","Kano","Viserai"],languages:["English"],release:"Arcane Rising",releaseDate:"2020-03-27 12:00",releaseType:"Standalone Booster",setIdentifiers:["arc"],talents:[]},{cards:194,classes:["Brute","Guardian","Mechanologist","Merchant","Ninja","Ranger","Runeblade","Warrior","Wizard"],heroes:["Benji","Data Doll","Ira","Kassai","Kavdaen","Kayo","Shiyana"],languages:["English"],release:"Crucible of War",releaseDate:"2020-08-28 12:00",releaseType:"Expansion Booster",setIdentifiers:["cru"],talents:[]},{cards:40,classes:["Warrior"],heroes:["Boltyn"],languages:["English"],release:"Boltyn Blitz Deck",releaseDate:"2021-05-07 12:00",releaseType:"Blitz Deck",setIdentifiers:["bol"],talents:["Light"]},{cards:40,classes:["Runeblade"],heroes:["Chane"],languages:["English"],release:"Chane Blitz Deck",releaseDate:"2021-05-07 12:00",releaseType:"Blitz Deck",setIdentifiers:["chn"],talents:["Shadow"]},{cards:40,classes:["Brute"],languages:["English"],heroes:["Levia"],release:"Levia Blitz Deck",releaseDate:"2021-05-07 12:00",releaseType:"Blitz Deck",setIdentifiers:["lev"],talents:["Shadow"]},{cards:40,classes:["Illusionist"],heroes:["Prism"],languages:["English"],releaseDate:"2021-05-07 12:00",release:"Prism Blitz Deck",releaseType:"Blitz Deck",setIdentifiers:["psm"],talents:["Light"]},{cards:307,classes:["Brute","Illusionist","Runeblade","Warrior"],heroes:["Boltyn","Chane","Levia","Prism"],languages:["English"],release:"Monarch",releaseDate:"2021-05-07 12:00",releaseType:"Standalone Booster",setIdentifiers:["mon"],talents:["Light","Shadow"]},{cards:40,classes:["Runeblade"],heroes:["Briar"],languages:["English"],release:"Briar Blitz Deck",releaseDate:"2021-11-24 12:00",releaseType:"Blitz Deck",talents:["Elemental","Earth","Lightning"],setIdentifiers:["bri"]},{cards:40,classes:["Ranger"],heroes:["Lexi"],languages:["English"],release:"Lexi Blitz Deck",releaseDate:"2021-11-24 12:00",releaseType:"Blitz Deck",setIdentifiers:["lxi"],talents:["Elemental","Ice","Lightning"]},{cards:40,classes:["Guardian"],heroes:["Oldhim"],languages:["English"],release:"Oldhim Blitz Deck",releaseDate:"2021-11-24 12:00",releaseType:"Blitz Deck",setIdentifiers:["old"],talents:["Elemental","Earth","Ice"]},{cards:238,classes:["Guardian","Ranger","Runeblade"],heroes:["Briar","Lexi","Oldhim"],languages:["English"],release:"Tales of Aria",releaseDate:"2021-09-24 12:00",releaseType:"Standalone Booster",setIdentifiers:["ele"],talents:["Elemental","Earth","Ice","Lightning"]},{cards:198,classes:["Brute","Guardian","Illusionist","Mechanologist","Merchant","Ninja","Ranger","Runeblade","Warrior","Wizard"],heroes:["Genis Wotchuneed","Valda"],languages:["English"],release:"Everfest",releaseDate:"2022-02-04 12:00",releaseType:"Expansion Booster",setIdentifiers:["evr"],talents:["Elemental","Earth","Ice","Lightning"]},{cards:423,classes:["Brute","Guardian","Mechanologist","Ninja","Ranger","Runeblade","Warrior","Wizard"],heroes:["Azalea","Benji","Bravo","Dash","Data Doll","Dorinthea","Ira","Kassai","Katsu","Kayo","Rhinar","Viserai","Kano"],languages:["English"],release:"History Pack 1",releaseDate:"2022-05-06 12:00",releaseType:"History Pack",setIdentifiers:["1hp","hp1"],talents:[]},{cards:80,classes:["Brute","Warrior"],heroes:["Dorinthea","Rhinar"],languages:["English"],release:"Classic Battles: Rhinar vs Dorinthea",releaseDate:"2022-05-27 12:00",releaseType:"Classic Battles",setIdentifiers:["dvr","rvd"],talents:[]},{cards:40,classes:["Illusionist"],heroes:["Dromai"],languages:["English"],releaseDate:"2022-06-24 12:00",release:"Dromai Blitz Deck",releaseType:"Blitz Deck",setIdentifiers:["dro"],talents:["Draconic"]},{cards:40,classes:["Ninja"],heroes:["Fai"],languages:["English"],release:"Fai Blitz Deck",releaseDate:"2022-06-24 12:00",releaseType:"Blitz Deck",setIdentifiers:["fai"],talents:["Draconic"]},{cards:226,classes:["Illusionist","Ninja","Wizard"],heroes:["Dromai","Fai","Iyslander"],languages:["English"],release:"Uprising",releaseDate:"2022-06-24 12:00",releaseType:"Standalone Booster",setIdentifiers:["upr"],talents:["Draconic","Elemental","Ice"]},{cards:247,classes:["Assassin","Brute","Guardian","Illusionist","Mechanologist","Ninja","Ranger","Runeblade","Warrior","Wizard"],heroes:["Arakni","Emperor","Yoji"],languages:["English"],release:"Dynasty",releaseDate:"2022-11-11 12:00",releaseType:"Expansion Booster",setIdentifiers:["dyn"],talents:["Royal"]},{cards:536,classes:["Brute","Guardian","Illusionist","Mechanologist","Ninja","Ranger","Runeblade","Warrior","Wizard"],heroes:["Boltyn","Briar","Chane","Levia","Lexi","Oldhim","Prism"],languages:["Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"History Pack 2: Black Label",releaseDate:"2023-02-24 12:00",releaseType:"History Pack",setIdentifiers:["hp2"],talents:["Elemental","Earth","Ice","Lightning","Light","Shadow"]},{cards:40,classes:["Assassin"],heroes:["Arakni"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Arakni Blitz Deck",releaseDate:"2023-03-24 12:00",releaseType:"Blitz Deck",setIdentifiers:["ara"],talents:[]},{cards:40,classes:["Ranger"],heroes:["Azalea"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Azalea Blitz Deck",releaseDate:"2023-03-24 12:00",releaseType:"Blitz Deck",setIdentifiers:["azl"],talents:[]},{cards:40,classes:["Ninja"],heroes:["Benji"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Benji Blitz Deck",releaseDate:"2023-03-24 12:00",releaseType:"Blitz Deck",setIdentifiers:["ben"],talents:[]},{cards:40,classes:["Ninja"],heroes:["Katsu"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Katsu Blitz Deck",releaseDate:"2023-03-24 12:00",releaseType:"Blitz Deck",setIdentifiers:["kat"],talents:[]},{cards:40,classes:["Ranger"],heroes:["Riptide"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Riptide Blitz Deck",releaseDate:"2023-03-24 12:00",releaseType:"Blitz Deck",setIdentifiers:["rip"],talents:[]},{cards:40,classes:["Assassin"],heroes:["Uzuri"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Uzuri Blitz Deck",releaseDate:"2023-03-24 12:00",releaseType:"Blitz Deck",setIdentifiers:["uzu"],talents:[]},{cards:239,classes:["Assassin","Ranger","Ninja"],heroes:["Arakni","Uzuri","Azalea","Katsu","Benji","Riptide"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Outsiders",releaseDate:"2023-03-24 12:00",releaseType:"Standalone Booster",setIdentifiers:["out"],talents:[]},{cards:236,classes:["Illusionist","Runeblade","Warrior","Brute"],heroes:["Prism","Vynnset","Boltyn","Levia"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Dusk till Dawn",releaseDate:"2023-07-14 12:00",releaseType:"Expansion Booster",setIdentifiers:["dtd"],talents:["Light","Shadow"]},{cards:107,classes:["Mechanologist","Bard","Guardian","Ninja"],heroes:["Teklovossen","Melody","Brevant","Ira"],languages:["English"],release:"Round the Table: TCC x LSS",releaseDate:"2023-09-29 12:00",releaseType:"Round the Table",talents:[],setIdentifiers:["tcc"]},{cards:251,classes:["Mechanologist"],heroes:["Dash","Maxx","Teklovossen"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],raritiesExcludedInLimited:["Legendary","Fabled"],release:"Bright Lights",releaseDate:"2023-10-06 12:00",releaseType:"Standalone Booster",setIdentifiers:["evo"],talents:[]},{cards:40,classes:["Guardian"],heroes:["Betsy"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Betsy Blitz Deck",releaseDate:"2024-02-02 12:00",releaseType:"Blitz Deck",setIdentifiers:["bet"],talents:[]},{cards:40,classes:["Warrior"],heroes:["Kassai"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Kassai Blitz Deck",releaseDate:"2024-02-02 12:00",releaseType:"Blitz Deck",setIdentifiers:["ksi"],talents:[]},{cards:40,classes:["Brute"],heroes:["Kayo"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Kayo Blitz Deck",releaseDate:"2024-02-02 12:00",releaseType:"Blitz Deck",setIdentifiers:["kyo"],talents:[]},{cards:40,classes:["Warrior"],heroes:["Olympia"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Olympia Blitz Deck",releaseDate:"2024-02-02 12:00",releaseType:"Blitz Deck",setIdentifiers:["ola"],talents:[]},{cards:40,classes:["Brute"],heroes:["Rhinar"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Rhinar Blitz Deck",releaseDate:"2024-02-02 12:00",releaseType:"Blitz Deck",setIdentifiers:["rnr"],talents:[]},{cards:40,classes:["Guardian"],heroes:["Victor"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],release:"Victor Blitz Deck",releaseDate:"2024-02-02 12:00",releaseType:"Blitz Deck",setIdentifiers:["vic"],talents:[]},{cards:255,classes:["Brute","Guardian","Warrior"],heroes:["Kassai","Betsy","Kayo","Olympia","Victor"],languages:["English","Fran\xE7ais","Deutsch","Italiano","Espa\xF1ol"],raritiesExcludedInLimited:["Legendary","Fabled"],release:"Heavy Hitters",releaseDate:"2024-02-02 12:00",releaseType:"Standalone Booster",setIdentifiers:["hvy"],talents:[]},{cards:66,classes:["Brute"],heroes:["Kayo"],languages:["English","Fran\xE7ais","Italiano","\u65E5\u672C\u8A9E"],release:"Armory Deck: Kayo",releaseDate:"2024-05-03 12:00",releaseType:"Armory Deck",setIdentifiers:["ako"],talents:[]},{cards:40,classes:["Illusionist"],heroes:["Enigma"],languages:["English","Fran\xE7ais","Deutsch","Italiano","\u65E5\u672C\u8A9E","Espa\xF1ol"],release:"Enigma Blitz Deck",releaseDate:"2024-05-31 12:00",releaseType:"Blitz Deck",setIdentifiers:["eng"],talents:["Mystic"]},{cards:40,classes:["Assassin"],heroes:["Nuu"],languages:["English","Fran\xE7ais","Deutsch","Italiano","\u65E5\u672C\u8A9E","Espa\xF1ol"],release:"Nuu Blitz Deck",releaseDate:"2024-05-31 12:00",releaseType:"Blitz Deck",setIdentifiers:["nuu"],talents:["Mystic"]},{cards:40,classes:["Ninja"],heroes:["Zen"],languages:["English","Fran\xE7ais","Deutsch","Italiano","\u65E5\u672C\u8A9E","Espa\xF1ol"],release:"Zen Blitz Deck",releaseDate:"2024-05-31 12:00",releaseType:"Blitz Deck",setIdentifiers:["zen"],talents:["Mystic"]},{cards:239,classes:["Assassin","Illusionist","Ninja"],heroes:["Enigma","Nuu","Zen"],languages:ce,raritiesExcludedInLimited:["Legendary","Fabled"],release:"Part the Mistveil",releaseDate:"2024-05-31 12:00",releaseType:"Standalone Booster",setIdentifiers:["mst"],talents:["Mystic"]},{cards:66,classes:["Warrior"],heroes:["Boltyn"],languages:["English","Fran\xE7ais","Italiano","\u65E5\u672C\u8A9E"],release:"Armory Deck: Boltyn",releaseDate:"2024-07-12 12:00",releaseType:"Armory Deck",setIdentifiers:["asb"],talents:["Light"]},{cards:40,classes:["Runeblade"],heroes:["Aurora"],languages:["English","Fran\xE7ais","Deutsch","Italiano","\u65E5\u672C\u8A9E","Espa\xF1ol"],release:"1st Strike: Aurora",releaseDate:"2024-08-01 12:00",releaseType:"1st Strike",setIdentifiers:["aur"],talents:["Lightning"]},{cards:40,classes:["Guardian"],heroes:["Terra"],languages:["English","Fran\xE7ais","Deutsch","Italiano","\u65E5\u672C\u8A9E","Espa\xF1ol"],release:"1st Strike: Terra",releaseDate:"2024-08-01 12:00",releaseType:"1st Strike",setIdentifiers:["ter"],talents:["Earth"]},{cards:66,classes:["Ranger"],heroes:["Azalea"],languages:["English","Fran\xE7ais","Italiano","\u65E5\u672C\u8A9E"],release:"Armory Deck: Azalea",releaseDate:"2024-08-02 12:00",releaseType:"Armory Deck",setIdentifiers:["aaz"],talents:[]},{cards:258,classes:["Runeblade","Wizard"],heroes:["Aurora","Florian","Oscilio","Verdance"],languages:ce,raritiesExcludedInLimited:["Legendary","Fabled"],release:"Rosetta",releaseDate:"2024-09-20 12:00",releaseType:"Standalone Booster",setIdentifiers:["ros"],talents:["Elemental","Earth","Lightning"]},{cards:40,classes:["Runeblade"],heroes:["Aurora"],languages:["English","Fran\xE7ais","Deutsch","Italiano","\u65E5\u672C\u8A9E","Espa\xF1ol"],release:"Aurora Blitz Deck",releaseDate:"2024-09-20 12:00",releaseType:"Blitz Deck",setIdentifiers:["aua"],talents:["Lightning"]},{cards:40,classes:["Runeblade"],heroes:["Florian"],languages:["English","Fran\xE7ais","Deutsch","Italiano","\u65E5\u672C\u8A9E","Espa\xF1ol"],release:"Florian Blitz Deck",releaseDate:"2024-09-20 12:00",releaseType:"Blitz Deck",setIdentifiers:["flr"],talents:["Earth"]},{cards:40,classes:["Wizard"],heroes:["Oscilio"],languages:["English","Fran\xE7ais","Deutsch","Italiano","\u65E5\u672C\u8A9E","Espa\xF1ol"],release:"Oscilio Blitz Deck",releaseDate:"2024-09-20 12:00",releaseType:"Blitz Deck",setIdentifiers:["osc"],talents:["Lightning"]},{cards:40,classes:["Wizard"],heroes:["Verdance"],languages:["English","Fran\xE7ais","Deutsch","Italiano","\u65E5\u672C\u8A9E","Espa\xF1ol"],release:"Verdance Blitz Deck",releaseDate:"2024-09-20 12:00",releaseType:"Blitz Deck",setIdentifiers:["ver"],talents:["Earth"]},{cards:66,classes:["Mechanologist"],heroes:["Dash"],languages:["English","Fran\xE7ais","Italiano","\u65E5\u672C\u8A9E"],release:"Armory Deck: Dash",releaseDate:"2024-10-18 12:00",releaseType:"Armory Deck",setIdentifiers:["aio"],talents:[]},{cards:30,classes:["Guardian"],heroes:["Jarl"],languages:["English","Fran\xE7ais","Italiano","\u65E5\u672C\u8A9E"],release:"Armory Deck Origins: Jarl",releaseDate:"2024-11-29 12:00",releaseType:"Armory Deck",setIdentifiers:["ajv"],talents:["Elemental","Earth","Ice"]},{cards:265,classes:["Assassin","Ninja","Warrior"],heroes:["Arakni","Cindra","Fang"],languages:ce,raritiesExcludedInLimited:["Legendary","Fabled"],release:"The Hunted",releaseDate:"2025-01-31 12:00",releaseType:"Standalone Booster",setIdentifiers:["hnt"],talents:["Chaos","Draconic","Royal"],url:"https://fabtcg.com/en/articles/hnt/"},{cards:40,classes:["Assassin"],heroes:["Arakni"],languages:ce,release:"Arakni Hunted Blitz Deck",releaseDate:"2025-01-31 12:00",releaseType:"Blitz Deck",setIdentifiers:["ark"],talents:["Chaos"]}],ze={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",hnt:"The Hunted"},Vt=la(oa({},ze),{aaz:"Armory Deck: Azalea",asb:"Armory Deck: Boltyn",aio:"Armory Deck: Dash",ako:"Armory Deck: Kayo",ajv:"Armory Deck Origins: Jarl",ara:"Arakni Blitz Deck",ark:"Arakni Hunted Blitz Deck",aua:"Aurora Blitz Deck",azl:"Azalea Blitz Deck",ben:"Benji Blitz Deck",bet:"Betsy Blitz Deck",bol:"Boltyn Blitz Deck",bri:"Briar Blitz Deck",chn:"Chane Blitz Deck",dro:"Dromai Blitz Deck",eng:"Enigma Blitz Deck",fai:"Fai Blitz Deck",flr:"Florian 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",osc:"Oscilio Blitz Deck",psm:"Prism Blitz Deck",rip:"Riptide Blitz Deck",rnr:"Rhinar Blitz Deck",uzu:"Uzuri Blitz Deck",ver:"Verdance 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: TCC x LSS",bvo:"Bravo Hero Deck",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"}),Pe={};for(let[e,t]of Object.entries(Vt)){let r=Pe[t];r?r.push(e):Pe[t]=[e]}var Fa=Pe,Ea={"Rhinar Blitz Deck":"-Blitz"},xa={MST158_V3:"-V3",ROS162_V2:"-V2","ROS008-MV_V2_BACK":"-V3"},Sa=e=>{var t,r,a;let i=Ea[e.set]||"",n=`${e.identifier}${i}`,o=e.edition?`-${e.edition}`:"",s=e.foiling?`-${e.foiling}`:"",l=(t=e.treatments)!=null&&t.length?`-${e.treatments.sort().join("-")}`:e.treatment?`-${e.treatment}`:"",c=(r=e.image)!=null&&r.toLowerCase().includes("back")?"-Back":"",u=xa[((a=e.image)==null?void 0:a.toUpperCase())||""]||"";return`${n}${o}${s}${l}${c}${u}`},Ta=Object.keys(ze).filter(e=>!e.toLowerCase().includes("hp")).reverse().map(e=>e.toUpperCase()),Ia={"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"},"rosetta-thorn":{print:"ROS256-Cold"},"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"}},wa=(e,t)=>{let{cardIdentifier:r}=e,a=Object.entries(Ia).find(([i])=>i===r);if(a){let[,{print:i}]=a;return t.find(n=>n.print===i)||t[0]}else{let i,n,o,s,l,c,u,p,d,g,f,v,y,M,h,B,m,b,x;for(let C of t){let{edition:D,foiling:E,identifier:L,image:I,treatment:S}=C,P=L.toLowerCase().includes("win"),w=!!I,K=I==null?void 0:I.includes("HP");if(w&&!P&&!K){if(i||(i=C),S==="Alternate Art")n=C;else if(S==="Alternate Border")o=C;else if(S==="Alternate Text")s=C;else if(S==="Extended Art")p=C,E==="Cold"&&(l=C),E||(g=C),D==="Promo"&&(f=C);else if(S==="Full Art"&&(d=C,E==="Cold"&&(c=C,I.includes("_V3")))){u=C;break}I&&I.includes("_V2")&&(v=C),D==="Alpha"?y=C:D==="First"?M=C:D==="Promo"?h=C:D==="Unlimited"&&(B=C),E==="Cold"?(m=C,D==="Promo"&&(x=C)):E==="Gold"&&(b=C)}}return u||c||d||l||f||g||p||o||n||s||v||x||y||M||h||B||b||m||i}},La={"command-and-conquer-red":{print:"ARC159-Unlimited"},"pitfall-trap-yellow":{print:"LGS151-Rainbow"},"rockslide-trap-blue":{print:"LGS152-Rainbow"},"rosetta-thorn":{print:"ELE222-First"},"spectral-shield":{print:"MST158"},"tripwire-trap-red":{print:"LGS150-Rainbow"}},Pa=(e,t)=>{let{cardIdentifier:r}=e,a=Object.entries(La).find(([i])=>i===r);if(a){let[,{print:i}]=a;return t.find(n=>n.print===i)||t[0]}else{let i,n;for(let o of t){let{edition:s,image:l,treatment:c}=o,u=!!l,p=l==null?void 0:l.includes("HP");if(u&&!p&&(i||(i=o),!n&&s!=="Promo"&&c!=="Full Art"&&(n=o)),i&&n)break}return n||i||t[0]}}});var hr=bt((Cn,dr)=>{"use strict";function Jt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,a)}return r}function ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jt(Object(r),!0).forEach(function(a){Ne(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jt(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}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 R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qt(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function z(e,t,r){return t&&Qt(e.prototype,t),r&&Qt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ne(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z(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&&He(e,t)}function ye(e){return ye=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ye(e)}function He(e,t){return He=Object.setPrototypeOf||function(a,i){return a.__proto__=i,a},He(e,t)}function Ra(){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 za(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oa(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 za(e)}function X(e){var t=Ra();return function(){var a=ye(e),i;if(t){var n=ye(this).constructor;i=Reflect.construct(a,arguments,n)}else i=a.apply(this,arguments);return Oa(this,i)}}function re(e){return _a(e)||Na(e)||Ha(e)||Wa()}function _a(e){if(Array.isArray(e))return We(e)}function Na(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ha(e,t){if(e){if(typeof e=="string")return We(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 We(e,t)}}function We(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function Wa(){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 V(e){return Array.isArray?Array.isArray(e):ir(e)==="[object Array]"}var $a=1/0;function ja(e){if(typeof e=="string")return e;var t=e+"";return t=="0"&&1/e==-$a?"-0":t}function Ga(e){return e==null?"":ja(e)}function j(e){return typeof e=="string"}function rr(e){return typeof e=="number"}function Ka(e){return e===!0||e===!1||Ua(e)&&ir(e)=="[object Boolean]"}function ar(e){return _e(e)==="object"}function Ua(e){return ar(e)&&e!==null}function _(e){return e!=null}function Oe(e){return!e.trim().length}function ir(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var Va="Incorrect 'index' type",Ya=function(t){return"Invalid value for key ".concat(t)},Ja=function(t){return"Pattern length exceeds max of ".concat(t,".")},Qa=function(t){return"Missing ".concat(t," property in key")},Za=function(t){return"Property 'weight' in key '".concat(t,"' must be a positive integer")},Zt=Object.prototype.hasOwnProperty,Xa=function(){function e(t){var r=this;R(this,e),this._keys=[],this._keyMap={};var a=0;t.forEach(function(i){var n=nr(i);a+=n.weight,r._keys.push(n),r._keyMap[n.id]=n,a+=n.weight}),this._keys.forEach(function(i){i.weight/=a})}return z(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 nr(e){var t=null,r=null,a=null,i=1,n=null;if(j(e)||V(e))a=e,t=Xt(e),r=$e(e);else{if(!Zt.call(e,"name"))throw new Error(Qa("name"));var o=e.name;if(a=o,Zt.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(Za(o));t=Xt(o),r=$e(o),n=e.getFn}return{path:t,id:r,weight:i,src:a,getFn:n}}function Xt(e){return V(e)?e:e.split(".")}function $e(e){return V(e)?e.join("."):e}function qa(e,t){var r=[],a=!1,i=function n(o,s,l){if(_(o))if(!s[l])r.push(o);else{var c=s[l],u=o[c];if(!_(u))return;if(l===s.length-1&&(j(u)||rr(u)||Ka(u)))r.push(Ga(u));else if(V(u)){a=!0;for(var p=0,d=u.length;p<d;p+=1)n(u[p],s,l+1)}else s.length&&n(u,s,l+1)}};return i(e,j(t)?t.split("."):t,0),a?r:r[0]}var ei={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ti={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}},ri={location:0,threshold:.6,distance:100},ai={useExtendedSearch:!1,getFn:qa,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},A=ie(ie(ie(ie({},ti),ei),ri),ai),ii=/[^ ]+/g;function ni(){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,a=Math.pow(10,t);return{get:function(n){var o=n.match(ii).length;if(r.has(o))return r.get(o);var s=1/Math.pow(o,.5*e),l=parseFloat(Math.round(s*a)/a);return r.set(o,l),l},clear:function(){r.clear()}}}var Ve=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getFn,a=r===void 0?A.getFn:r,i=t.fieldNormWeight,n=i===void 0?A.fieldNormWeight:i;R(this,e),this.norm=ni(n,3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}return z(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,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.keys=a,this._keysMap={},a.forEach(function(i,n){r._keysMap[i.id]=n})}},{key:"create",value:function(){var r=this;this.isCreated||!this.docs.length||(this.isCreated=!0,j(this.docs[0])?this.docs.forEach(function(a,i){r._addString(a,i)}):this.docs.forEach(function(a,i){r._addObject(a,i)}),this.norm.clear())}},{key:"add",value:function(r){var a=this.size();j(r)?this._addString(r,a):this._addObject(r,a)}},{key:"removeAt",value:function(r){this.records.splice(r,1);for(var a=r,i=this.size();a<i;a+=1)this.records[a].i-=1}},{key:"getValueForItemAtKeyId",value:function(r,a){return r[this._keysMap[a]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(r,a){if(!(!_(r)||Oe(r))){var i={v:r,i:a,n:this.norm.get(r)};this.records.push(i)}}},{key:"_addObject",value:function(r,a){var i=this,n={i:a,$:{}};this.keys.forEach(function(o,s){var l=o.getFn?o.getFn(r):i.getFn(r,o.path);if(_(l)){if(V(l))(function(){for(var u=[],p=[{nestedArrIndex:-1,value:l}];p.length;){var d=p.pop(),g=d.nestedArrIndex,f=d.value;if(_(f))if(j(f)&&!Oe(f)){var v={v:f,i:g,n:i.norm.get(f)};u.push(v)}else V(f)&&f.forEach(function(y,M){p.push({nestedArrIndex:M,value:y})})}n.$[s]=u})();else if(j(l)&&!Oe(l)){var c={v:l,n:i.norm.get(l)};n.$[s]=c}}}),this.records.push(n)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function sr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.getFn,i=a===void 0?A.getFn:a,n=r.fieldNormWeight,o=n===void 0?A.fieldNormWeight:n,s=new Ve({getFn:i,fieldNormWeight:o});return s.setKeys(e.map(nr)),s.setSources(t),s.create(),s}function si(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.getFn,a=r===void 0?A.getFn:r,i=t.fieldNormWeight,n=i===void 0?A.fieldNormWeight:i,o=e.keys,s=e.records,l=new Ve({getFn:a,fieldNormWeight:n});return l.setKeys(o),l.setIndexRecords(s),l}function me(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.errors,a=r===void 0?0:r,i=t.currentLocation,n=i===void 0?0:i,o=t.expectedLocation,s=o===void 0?0:o,l=t.distance,c=l===void 0?A.distance:l,u=t.ignoreLocation,p=u===void 0?A.ignoreLocation:u,d=a/e.length;if(p)return d;var g=Math.abs(s-n);return c?d+g/c:g?1:d}function oi(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A.minMatchCharLength,r=[],a=-1,i=-1,n=0,o=e.length;n<o;n+=1){var s=e[n];s&&a===-1?a=n:!s&&a!==-1&&(i=n-1,i-a+1>=t&&r.push([a,i]),a=-1)}return e[n-1]&&n-a>=t&&r.push([a,n-1]),r}var te=32;function li(e,t,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=a.location,n=i===void 0?A.location:i,o=a.distance,s=o===void 0?A.distance:o,l=a.threshold,c=l===void 0?A.threshold:l,u=a.findAllMatches,p=u===void 0?A.findAllMatches:u,d=a.minMatchCharLength,g=d===void 0?A.minMatchCharLength:d,f=a.includeMatches,v=f===void 0?A.includeMatches:f,y=a.ignoreLocation,M=y===void 0?A.ignoreLocation:y;if(t.length>te)throw new Error(Ja(te));for(var h=t.length,B=e.length,m=Math.max(0,Math.min(n,B)),b=c,x=m,C=g>1||v,D=C?Array(B):[],E;(E=e.indexOf(t,x))>-1;){var L=me(t,{currentLocation:E,expectedLocation:m,distance:s,ignoreLocation:M});if(b=Math.min(L,b),x=E+h,C)for(var I=0;I<h;)D[E+I]=1,I+=1}x=-1;for(var S=[],P=1,w=h+B,K=1<<h-1,U=0;U<h;U+=1){for(var he=0,Y=w;he<Y;){var Kr=me(t,{errors:U,currentLocation:m+Y,expectedLocation:m,distance:s,ignoreLocation:M});Kr<=b?he=Y:w=Y,Y=Math.floor((w-he)/2+he)}w=Y;var ft=Math.max(1,m-Y+1),we=p?B:Math.min(m+Y,B)+h,ae=Array(we+2);ae[we+1]=(1<<U)-1;for(var H=we;H>=ft;H-=1){var pe=H-1,gt=r[e.charAt(pe)];if(C&&(D[pe]=+!!gt),ae[H]=(ae[H+1]<<1|1)>,U&&(ae[H]|=(S[H+1]|S[H])<<1|1|S[H+1]),ae[H]&K&&(P=me(t,{errors:U,currentLocation:pe,expectedLocation:m,distance:s,ignoreLocation:M}),P<=b)){if(b=P,x=pe,x<=m)break;ft=Math.max(1,2*m-x)}}var Ur=me(t,{errors:U+1,currentLocation:m,expectedLocation:m,distance:s,ignoreLocation:M});if(Ur>b)break;S=ae}var Le={isMatch:x>=0,score:Math.max(.001,P)};if(C){var mt=oi(D,g);mt.length?v&&(Le.indices=mt):Le.isMatch=!1}return Le}function ci(e){for(var t={},r=0,a=e.length;r<a;r+=1){var i=e.charAt(r);t[i]=(t[i]||0)|1<<a-r-1}return t}var or=function(){function e(t){var r=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=a.location,n=i===void 0?A.location:i,o=a.threshold,s=o===void 0?A.threshold:o,l=a.distance,c=l===void 0?A.distance:l,u=a.includeMatches,p=u===void 0?A.includeMatches:u,d=a.findAllMatches,g=d===void 0?A.findAllMatches:d,f=a.minMatchCharLength,v=f===void 0?A.minMatchCharLength:f,y=a.isCaseSensitive,M=y===void 0?A.isCaseSensitive:y,h=a.ignoreLocation,B=h===void 0?A.ignoreLocation:h;if(R(this,e),this.options={location:n,threshold:s,distance:c,includeMatches:p,findAllMatches:g,minMatchCharLength:v,isCaseSensitive:M,ignoreLocation:B},this.pattern=M?t:t.toLowerCase(),this.chunks=[],!!this.pattern.length){var m=function(I,S){r.chunks.push({pattern:I,alphabet:ci(I),startIndex:S})},b=this.pattern.length;if(b>te){for(var x=0,C=b%te,D=b-C;x<D;)m(this.pattern.substr(x,te),x),x+=te;if(C){var E=b-te;m(this.pattern.substr(E),E)}}else m(this.pattern,0)}}return z(e,[{key:"searchIn",value:function(r){var a=this.options,i=a.isCaseSensitive,n=a.includeMatches;if(i||(r=r.toLowerCase()),this.pattern===r){var o={isMatch:!0,score:0};return n&&(o.indices=[[0,r.length-1]]),o}var s=this.options,l=s.location,c=s.distance,u=s.threshold,p=s.findAllMatches,d=s.minMatchCharLength,g=s.ignoreLocation,f=[],v=0,y=!1;this.chunks.forEach(function(h){var B=h.pattern,m=h.alphabet,b=h.startIndex,x=li(r,B,m,{location:l+b,distance:c,threshold:u,findAllMatches:p,minMatchCharLength:d,includeMatches:n,ignoreLocation:g}),C=x.isMatch,D=x.score,E=x.indices;C&&(y=!0),v+=D,C&&E&&(f=[].concat(re(f),re(E)))});var M={isMatch:y,score:y?v/this.chunks.length:1};return y&&n&&(M.indices=f),M}}]),e}(),q=function(){function e(t){R(this,e),this.pattern=t}return z(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(r){return qt(r,this.multiRegex)}},{key:"isSingleMatch",value:function(r){return qt(r,this.singleRegex)}}]),e}();function qt(e,t){var r=e.match(t);return r?r[1]:null}var ui=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=i===this.pattern;return{isMatch:n,score:n?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}(q),di=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=i.indexOf(this.pattern),o=n===-1;return{isMatch:o,score:o?0:1,indices:[0,i.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),r}(q),hi=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=i.startsWith(this.pattern);return{isMatch:n,score:n?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}(q),pi=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=!i.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,i.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),r}(q),fi=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=i.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[i.length-this.pattern.length,i.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),r}(q),gi=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=!i.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,i.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),r}(q),lr=function(e){Z(r,e);var t=X(r);function r(a){var i,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.location,s=o===void 0?A.location:o,l=n.threshold,c=l===void 0?A.threshold:l,u=n.distance,p=u===void 0?A.distance:u,d=n.includeMatches,g=d===void 0?A.includeMatches:d,f=n.findAllMatches,v=f===void 0?A.findAllMatches:f,y=n.minMatchCharLength,M=y===void 0?A.minMatchCharLength:y,h=n.isCaseSensitive,B=h===void 0?A.isCaseSensitive:h,m=n.ignoreLocation,b=m===void 0?A.ignoreLocation:m;return R(this,r),i=t.call(this,a),i._bitapSearch=new or(a,{location:s,threshold:c,distance:p,includeMatches:g,findAllMatches:v,minMatchCharLength:M,isCaseSensitive:B,ignoreLocation:b}),i}return z(r,[{key:"search",value:function(i){return this._bitapSearch.searchIn(i)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),r}(q),cr=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){for(var n=0,o,s=[],l=this.pattern.length;(o=i.indexOf(this.pattern,n))>-1;)n=o+l,s.push([o,n-1]);var c=!!s.length;return{isMatch:c,score:c?0:1,indices:s}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),r}(q),je=[ui,cr,hi,pi,gi,fi,di,lr],er=je.length,mi=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,yi="|";function vi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.split(yi).map(function(r){for(var a=r.trim().split(mi).filter(function(f){return f&&!!f.trim()}),i=[],n=0,o=a.length;n<o;n+=1){for(var s=a[n],l=!1,c=-1;!l&&++c<er;){var u=je[c],p=u.isMultiMatch(s);p&&(i.push(new u(p,t)),l=!0)}if(!l)for(c=-1;++c<er;){var d=je[c],g=d.isSingleMatch(s);if(g){i.push(new d(g,t));break}}}return i})}var ki=new Set([lr.type,cr.type]),bi=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.isCaseSensitive,i=a===void 0?A.isCaseSensitive:a,n=r.includeMatches,o=n===void 0?A.includeMatches:n,s=r.minMatchCharLength,l=s===void 0?A.minMatchCharLength:s,c=r.ignoreLocation,u=c===void 0?A.ignoreLocation:c,p=r.findAllMatches,d=p===void 0?A.findAllMatches:p,g=r.location,f=g===void 0?A.location:g,v=r.threshold,y=v===void 0?A.threshold:v,M=r.distance,h=M===void 0?A.distance:M;R(this,e),this.query=null,this.options={isCaseSensitive:i,includeMatches:o,minMatchCharLength:l,findAllMatches:d,ignoreLocation:u,location:f,threshold:y,distance:h},this.pattern=i?t:t.toLowerCase(),this.query=vi(this.pattern,this.options)}return z(e,[{key:"searchIn",value:function(r){var a=this.query;if(!a)return{isMatch:!1,score:1};var i=this.options,n=i.includeMatches,o=i.isCaseSensitive;r=o?r:r.toLowerCase();for(var s=0,l=[],c=0,u=0,p=a.length;u<p;u+=1){var d=a[u];l.length=0,s=0;for(var g=0,f=d.length;g<f;g+=1){var v=d[g],y=v.search(r),M=y.isMatch,h=y.indices,B=y.score;if(M){if(s+=1,c+=B,n){var m=v.constructor.type;ki.has(m)?l=[].concat(re(l),re(h)):l.push(h)}}else{c=0,s=0,l.length=0;break}}if(s){var b={isMatch:!0,score:c/s};return n&&(b.indices=l),b}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(r,a){return a.useExtendedSearch}}]),e}(),ve=[];function Ai(){ve.push.apply(ve,arguments)}function Ge(e,t){for(var r=0,a=ve.length;r<a;r+=1){var i=ve[r];if(i.condition(e,t))return new i(e,t)}return new or(e,t)}var ke={AND:"$and",OR:"$or"},Ke={PATH:"$path",PATTERN:"$val"},Ue=function(t){return!!(t[ke.AND]||t[ke.OR])},Ci=function(t){return!!t[Ke.PATH]},Di=function(t){return!V(t)&&ar(t)&&!Ue(t)},tr=function(t){return Ne({},ke.AND,Object.keys(t).map(function(r){return Ne({},r,t[r])}))};function ur(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.auto,i=a===void 0?!0:a,n=function o(s){var l=Object.keys(s),c=Ci(s);if(!c&&l.length>1&&!Ue(s))return o(tr(s));if(Di(s)){var u=c?s[Ke.PATH]:l[0],p=c?s[Ke.PATTERN]:s[u];if(!j(p))throw new Error(Ya(u));var d={keyId:$e(u),pattern:p};return i&&(d.searcher=Ge(p,t)),d}var g={children:[],operator:l[0]};return l.forEach(function(f){var v=s[f];V(v)&&v.forEach(function(y){g.children.push(o(y))})}),g};return Ue(e)||(e=tr(e)),n(e)}function Mi(e,t){var r=t.ignoreFieldNorm,a=r===void 0?A.ignoreFieldNorm:r;e.forEach(function(i){var n=1;i.matches.forEach(function(o){var s=o.key,l=o.norm,c=o.score,u=s?s.weight:null;n*=Math.pow(c===0&&u?Number.EPSILON:c,(u||1)*(a?1:l))}),i.score=n})}function Bi(e,t){var r=e.matches;t.matches=[],_(r)&&r.forEach(function(a){if(!(!_(a.indices)||!a.indices.length)){var i=a.indices,n=a.value,o={indices:i,value:n};a.key&&(o.key=a.key.src),a.idx>-1&&(o.refIndex=a.idx),t.matches.push(o)}})}function Fi(e,t){t.score=e.score}function Ei(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.includeMatches,i=a===void 0?A.includeMatches:a,n=r.includeScore,o=n===void 0?A.includeScore:n,s=[];return i&&s.push(Bi),o&&s.push(Fi),e.map(function(l){var c=l.idx,u={item:t[c],refIndex:c};return s.length&&s.forEach(function(p){p(l,u)}),u})}var ne=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;R(this,e),this.options=ie(ie({},A),r),this.options.useExtendedSearch,this._keyStore=new Xa(this.options.keys),this.setCollection(t,a)}return z(e,[{key:"setCollection",value:function(r,a){if(this._docs=r,a&&!(a instanceof Ve))throw new Error(Va);this._myIndex=a||sr(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},a=[],i=0,n=this._docs.length;i<n;i+=1){var o=this._docs[i];r(o,i)&&(this.removeAt(i),i-=1,n-=1,a.push(o))}return a}},{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 a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=a.limit,n=i===void 0?-1:i,o=this.options,s=o.includeMatches,l=o.includeScore,c=o.shouldSort,u=o.sortFn,p=o.ignoreFieldNorm,d=j(r)?j(this._docs[0])?this._searchStringList(r):this._searchObjectList(r):this._searchLogical(r);return Mi(d,{ignoreFieldNorm:p}),c&&d.sort(u),rr(n)&&n>-1&&(d=d.slice(0,n)),Ei(d,this._docs,{includeMatches:s,includeScore:l})}},{key:"_searchStringList",value:function(r){var a=Ge(r,this.options),i=this._myIndex.records,n=[];return i.forEach(function(o){var s=o.v,l=o.i,c=o.n;if(_(s)){var u=a.searchIn(s),p=u.isMatch,d=u.score,g=u.indices;p&&n.push({item:s,idx:l,matches:[{score:d,value:s,norm:c,indices:g}]})}}),n}},{key:"_searchLogical",value:function(r){var a=this,i=ur(r,this.options),n=function c(u,p,d){if(!u.children){var g=u.keyId,f=u.searcher,v=a._findMatches({key:a._keyStore.get(g),value:a._myIndex.getValueForItemAtKeyId(p,g),searcher:f});return v&&v.length?[{idx:d,item:p,matches:v}]:[]}for(var y=[],M=0,h=u.children.length;M<h;M+=1){var B=u.children[M],m=c(B,p,d);if(m.length)y.push.apply(y,re(m));else if(u.operator===ke.AND)return[]}return y},o=this._myIndex.records,s={},l=[];return o.forEach(function(c){var u=c.$,p=c.i;if(_(u)){var d=n(i,u,p);d.length&&(s[p]||(s[p]={idx:p,item:u,matches:[]},l.push(s[p])),d.forEach(function(g){var f,v=g.matches;(f=s[p].matches).push.apply(f,re(v))}))}}),l}},{key:"_searchObjectList",value:function(r){var a=this,i=Ge(r,this.options),n=this._myIndex,o=n.keys,s=n.records,l=[];return s.forEach(function(c){var u=c.$,p=c.i;if(_(u)){var d=[];o.forEach(function(g,f){d.push.apply(d,re(a._findMatches({key:g,value:u[f],searcher:i})))}),d.length&&l.push({idx:p,item:u,matches:d})}}),l}},{key:"_findMatches",value:function(r){var a=r.key,i=r.value,n=r.searcher;if(!_(i))return[];var o=[];if(V(i))i.forEach(function(g){var f=g.v,v=g.i,y=g.n;if(_(f)){var M=n.searchIn(f),h=M.isMatch,B=M.score,m=M.indices;h&&o.push({score:B,key:a,value:f,idx:v,norm:y,indices:m})}});else{var s=i.v,l=i.n,c=n.searchIn(s),u=c.isMatch,p=c.score,d=c.indices;u&&o.push({score:p,key:a,value:s,norm:l,indices:d})}return o}}]),e}();ne.version="6.6.2";ne.createIndex=sr;ne.parseIndex=si;ne.config=A;ne.parseQuery=ur;Ai(bi);var xi=ne;dr.exports=xi});var kn={};ea(kn,{PUNCTUATION:()=>F,abbreviations:()=>Qe,availableExclusions:()=>_r,availableModifiers:()=>Or,clashBannedCards:()=>Ye,clashLegalCards:()=>Si,clashSpecializationOverrides:()=>Je,default:()=>Wr,filterCard:()=>$r,filtersToCardPropertyMappings:()=>Se,getAbbreviation:()=>Ae,getAbbreviationByCard:()=>Ti,getCardByName:()=>ot,getCleanText:()=>lt,getExcludedMetaFilters:()=>Xe,getKeywordsAndAppliedFiltersFromText:()=>st,getMetaFilters:()=>Ze,getNormalizedText:()=>de,getRelatedCards:()=>pt,getRelatedCardsByName:()=>Te,getTokensReferencedByCards:()=>vn,multiWordShorthands:()=>et,shorthands:()=>qe,singleWordShorthands:()=>tt});module.exports=ta(kn);var N=J(Q()),ct=J(hr());var be=J(Q()),Ye=["Amulet of Ice","Ball Lightning","Belittle","Drone of Brutality","Duskblade","Rosetta Thorn","Stubby Hammerers"],Si=[],Je=[{heroes:[be.Hero.Briar],cardIdentifiers:["rosetta-thorn"]},{heroes:[be.Hero.Emperor],cardIdentifiers:["command-and-conquer-red"]},{heroes:[be.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=J(Q());var Ae=e=>Qe.find(({abbreviations:t})=>t.find(r=>r.toLowerCase()===e)),Ti=e=>Qe.find(({card:t})=>t.toLowerCase()===e.name.toLowerCase()),Qe=[{abbreviations:["10k"],card:"10,000 Year Reunion"},{abbreviations:["Pajamas","PJs"],card:"Alluvion Constellas"},{abbreviations:["Slippy"],card:"Arakni, 5L!p3d 7hRu 7h3 cR4X"},{abbreviations:["Dullcap"],card:"Arcanite Skullcap"},{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:["CStrike","C-Strike","C Strike"],card:"Celestial Cataclysm"},{abbreviations:["CBelly"],card:"Cerebellum Processor"},{abbreviations:["CLF"],card:"Channel Lake Frigid"},{abbreviations:["CLV"],card:"Channel Lightning Valley"},{abbreviations:["CMH"],card:"Channel Mount Heroic"},{abbreviations:["CMT"],card:"Channel the Millennium Tree"},{abbreviations:["CnC","C&C"],card:"Command and Conquer"},{abbreviations:["CYB"],card:"Count Your Blessings"},{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:["DIO"],card:"Dash I/O"},{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:["Yum yum"],card:"Fruits of the Forest"},{abbreviations:["GnT"],card:"Give and Take"},{abbreviations:["Habibi"],card:"Hanabi Blaster"},{abbreviations:["HMH"],card:"Hope Merchant's Hood"},{abbreviations:["HoI"],card:"Heart of Ice"},{abbreviations:["Pumpkin"],card:"Jack-o'-lantern"},{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:["LtC"],card:"Lead the Charge"},{abbreviations:["LNW"],card:"Leave No Witnesses"},{abbreviations:["LFaL","L4aL"],card:"Life for a Life"},{abbreviations:["LiT"],card:"Lost in Thought"},{abbreviations:["LoW"],card:"Lord of Wind"},{abbreviations:["MMB"],card:"Mage Master Boots"},{abbreviations:["MaxV"],card:"Maximum Velocity"},{abbreviations:["MoM"],card:"Mask of Momentum"},{abbreviations:["MnG"],card:"Meat and Greet"},{abbreviations:["Cake","\u{1F382}"],card:"Ninth Blade of the Blood Oath"},{abbreviations:["PoM"],card:"Peace of Mind"},{abbreviations:["PF","\u{1F525}"],card:"Phoenix Flame"},{abbreviations:["PtW"],card:"Poison the Well"},{abbreviations:["Thanos","Infinity Gauntlet"],card:"Polarity Reversal Script"},{abbreviations:["DPot","D Pot"],card:"Potion of D\xE9j\xE0 Vu"},{abbreviations:["Ponder Run"],card:"Premeditate"},{abbreviations:["Qi Unbound"],card:"Qi Unleashed"},{abbreviations:["RitL"],card:"Red in the Ledger"},{abbreviations:["Cats","Ghost cat","Ghost cats"],card:"Restless Coalescence"},{abbreviations:["SSGB"],card:"Sandscour Greatbow"},{abbreviations:["SSP"],card:"Sand Sketched Plan"},{abbreviations:["SFaS","S4aS"],card:"Scar for a Scar"},{abbreviations:["SWOMB"],card:"Shifting Winds of the Mystic Beast"},{abbreviations:["SWK"],card:"Spinning Wheel Kick"},{abbreviations:["SFTL"],card:"Swing Fist, Think Later"},{abbreviations:["TTT"],card:"Take the Tempo"},{abbreviations:["Ultron"],card:"Teklovossen, the Mechropotent"},{abbreviations:["ToS"],card:"Test of Strength"},{abbreviations:["TAYG"],card:"That All You Got?"},{abbreviations:["TROM"],card:"This Round's on Me"},{abbreviations:["3oak"],card:"Three of a Kind"},{abbreviations:["Pox Malone","Post Malone"],card:"Virulent Touch"},{abbreviations:["Cast Homes"],card:"Visit Goldmane Estate"},{abbreviations:["Frosty Hammer"],card:"Winter's Wail"},{abbreviations:["Wreckless Wing"],card:"War Cry of Bellona"},{abbreviations:["ZTS"],card:"Zero to Sixty"}];var O=J(Q());var Be=Array.from(Array(50).keys()).map(e=>`${e}`),Ii=[{format:O.Format.BlitzLivingLegend,nicknames:["blitz ll"]},{format:O.Format.ClassicConstructed,nicknames:["cc","classic"]},{format:O.Format.ClassicConstructedLivingLegend,nicknames:["cc ll","classic constructed ll","ll cc","ll","living legend"]},{format:O.Format.UltimatePitFight,nicknames:["upf"]}],wi=Object.values(O.Format).map(e=>{let t=Ii.find(({format:a})=>a===e),r=e.toLowerCase().replaceAll(F,"");return t?$(W({},t),{format:r}):{format:r}}),Li=[{hero:O.Hero.DataDoll,nicknames:["data","datadoll"]},{hero:O.Hero.Dorinthea,nicknames:["dori"]},{hero:O.Hero.GenisWotchuneed,nicknames:["genis"]},{hero:O.Hero.Iyslander,nicknames:["islander"]}],Pi=Object.values(O.Hero).map(e=>{let t=Li.find(({hero:a})=>a===e),r=e.toLowerCase().replaceAll(F,"");return t?$(W({},t),{hero:r}):{hero:r}}),Ce=["common","rare","super rare","majestic","legendary","fabled"],Ri=(e,t,r)=>{let a=[];if(!t)a.push(...e);else for(let i of e)switch(t){case">=":let n=!1;for(let c of Ce)n?a.push(c):c===i&&(n=!0,a.push(c));break;case">":let o=!1;for(let c of Ce)o?a.push(c):c===i&&(o=!0);break;case"<=":let s=!1;for(let c of Ce.slice().reverse())s?a.push(c):c===i&&(s=!0,a.push(c));break;case"<":let l=!1;for(let c of Ce.slice().reverse())l?a.push(c):c===i&&(l=!0);break;default:break}return{filterToPropertyMapping:{property:"rarities",isArray:!0},isOr:!0,values:a,excluded:r}},zi=(e,t)=>{let r=[],a=[],i=[];for(let n of e){let o=wi.find(({format:s,nicknames:l})=>s===n||!!l&&l.includes(n));if(o)a.push(o.format);else{let s=Pi.find(({hero:l,nicknames:c})=>l===n||!!c&&c.includes(n));s&&i.push(s.hero)}}return a.length>0&&r.push({filterToPropertyMapping:{property:"legalFormats",isArray:!0},values:a,isOr:!0,excluded:t}),i.length>0&&r.push({filterToPropertyMapping:{property:"legalHeroes",isArray:!0},values:i,isOr:!0,excluded:t}),r},Ze=(e,t,r,a)=>{let i=[];return Ni(t)?i.push(...zi(r,e)):Wi(t)&&i.push(Ri(r,a,e)),i},se=[{filterToPropertyMapping:{property:"cost",isNumber:!0},values:Be,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:Be,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}],De=[{filterToPropertyMapping:{property:"pitch",isNumber:!0},excluded:!0,values:Be},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0},{filterToPropertyMapping:{property:"isCardBack",isBoolean:!0},values:["true"],excluded:!0}],ee=[{filterToPropertyMapping:{property:"power",isNumber:!0},excluded:!0,values:Be},{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(O.Talent).map(e=>e.toLowerCase())}],Oi={"!co":se,"-co":se,"!cost":se,"-cost":se,"!color":se,"-color":se,"!b":G,"-b":G,"!block":G,"-block":G,"!d":G,"-d":G,"!def":G,"-def":G,"!defense":G,"-defense":G,"!pitch":De,"-pitch":De,"!p":De,"-p":De,"!attack":ee,"-attack":ee,"!power":ee,"-power":ee,"!pwr":ee,"-pwr":ee,"!pow":ee,"-pow":ee,"!talents":Me,"-talents":Me,"!tal":Me,"-tal":Me},Xe=e=>{let t=[],r=Oi[e];return r&&t.push(...r),t},_i=["l","legal","hero"],Ni=e=>_i.includes(e),Hi=["r","rarity"],Wi=e=>Hi.includes(e);var qe=[{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"]}],et=qe.filter(({shorthands:e})=>e.some(t=>t.includes(" "))).map(e=>$(W({},e),{shorthands:e.shorthands.filter(t=>t.includes(" ")).map(t=>t.toLowerCase()).sort((t,r)=>r.length-t.length)})),tt=qe.filter(({shorthands:e})=>e.some(t=>!t.includes(" "))).map(e=>$(W({},e),{shorthands:e.shorthands.filter(t=>!t.includes(" ")).map(t=>t.toLowerCase()).sort((t,r)=>r.length-t.length)}));var Or=[">=",">","<=","<"],_r=["!","-"],$i={property:"arcane",specialProperty:"specialArcane",isNumber:!0,partialMatch:!0},rt={property:"artists",isArray:!0,partialMatch:!0},pr={property:"bannedFormats",isArray:!0,partialMatch:!0},fr={property:"bonds",isArray:!0},ji={property:"n/a"},gr={property:"classes",isArray:!0,partialMatch:!0},mr={property:"cost",specialProperty:"specialCost",isNumber:!0,partialMatch:!0},ue={property:"defense",specialProperty:"specialDefense",isNumber:!0},yr={property:"flows",isArray:!0},vr={nestedProperty:"foiling",property:"printings",isArray:!0},kr={property:"fusions",isArray:!0},br={property:"intellect",isNumber:!0},Ar={property:"keywords",isArray:!0,partialMatch:!0},at={property:"n/a",isMeta:!0},Cr={property:"life",specialProperty:"specialLife",isNumber:!0},Dr={property:"meta",isArray:!0},Mr={property:"name",isString:!0,partialMatch:!0},it={property:"pitch",isNumber:!0},Fe={property:"power",specialProperty:"specialPower",isNumber:!0},Br={property:"n/a",isMeta:!0},Gi={property:"n/a"},Ki={property:"n/a"},Fr={property:"sets",isArray:!0,partialMatch:!0},Ee={property:"specializations",isArray:!0,partialMatch:!0},Er={property:"subtypes",isArray:!0},xr={property:"types",isArray:!0},Sr={property:"talents",isArray:!0},Ui={property:"functionalText",isString:!0,partialMatch:!0},Vi={property:"typeText",isString:!0,partialMatch:!0},xe={nestedProperty:"treatment",property:"printings",isArray:!0},Se={arcane:$i,a:rt,artist:rt,art:rt,attack:Fe,b:ue,block:ue,banned:pr,bond:fr,bonds:fr,c:gr,class:gr,chain:ji,co:mr,cost:mr,color:it,d:ue,def:ue,defense:ue,flow:yr,flows:yr,f:kr,fusion:kr,foil:vr,foiling:vr,i:br,intellect:br,is:Dr,k:Ar,keyword:Ar,l:at,legal:at,hero:at,li:Cr,life:Cr,meta:Dr,n:Mr,name:Mr,p:it,pitch:it,pwr:Fe,pow:Fe,power:Fe,r:Br,rarity:Br,referencedby:Gi,references:Ki,rf:pr,s:Fr,set:Fr,sp:Ee,spec:Ee,specialization:Ee,specializations:Ee,st:Er,subtype:Er,t:xr,type:xr,tal:Sr,talent:Sr,text:Ui,treat:xe,treatment:xe,var:xe,variation:xe,x:Vi},Yi=[{text:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase(),override:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase().replaceAll(F,"")}],Ji=e=>{var i;let t=[],r=e.replaceAll("\u201D",'"');for(let{text:n,override:o}of Yi)r.includes(n)&&(r=r.replace(n,o));if((i=Ae(r))==null?void 0:i.card)t.push(r);else{let n=r.split(/[ ]+/),o="",s=0;for(let l of n)s===2&&(t.push(o.trim().replaceAll('"',"")),o="",s=0),s<2&&l.split('"').length===2?(o+=" "+l,s++):s===0&&o===""?t.push(l):s===1&&(o+=" "+l);s===2&&(t.push(o.trim().replaceAll('"',"")),o="",s=0)}return t},Qi=[k.Hero.Briar,k.Hero.Brutus,k.Hero.Emperor,k.Hero.Prism,k.Hero.Shiyana,k.Hero.Taylor,k.Hero.Yorick],st=(e,t)=>{var g;let r=e.trim().toLowerCase();for(let{filters:f,shorthands:v}of et)for(let y of v)if(r.includes(y)){r=r.replace(y,f.join(" "));break}for(let[f,v]of Object.entries(k.setToSetIdentifierMappings))r.includes(f.toLowerCase())&&(r=r.replace(f.toLowerCase(),v[0]));let a=Ji(r),i=[];for(let f of a){let v=tt.find(({shorthands:y})=>y.includes(f));v?i.push(...v.filters):i.push(f)}let n=[],o=[],s=[],l=[],c=!1,u=[],p=[],d={isClash:!1,heroes:[]};for(let f of i)if(on(f)){let[v,y]=f.split(":"),{modifier:M,values:h,isAnd:B,isOr:m}=nn(y),{filterKey:b,excluded:x,isMeta:C}=sn(v);if(C){if(["rarity","r"].includes(b)&&(h=an(h)),["legal","l","hero"].includes(b)){for(let D of Qi)y.includes(D.toLowerCase())&&(d.heroes.includes(D)||d.heroes.push(D));y.includes("clash")&&(d.isClash=!0)}n.push(...Ze(x,b,h,M))}else{if(["chain"].includes(b)){let D=w=>w.name.toLowerCase().replaceAll(F,""),E=h.map(w=>ot(w,t)).filter(w=>!!w).map(D),L=new Set(E);b="name",m=!0;let I=20,S=0,P=w=>{if(!w.types.includes(k.Type.Hero)){let K=D(w);L.add(K),E.includes(K)||E.push(K)}};for(let w of E){if(S>I)break;let{referencedBy:K,references:U}=Te(w,t);U.forEach(P),S===0&&K.forEach(P),S++}h=Array.from(L)}else if(["referencedby","references"].includes(b)){let D=b,E=[...h].filter(L=>!!L);h=[],b="name",m=!0;for(let L of E){let{referencedBy:I,references:S}=Te(L,t);["referencedby"].includes(D)?h.push(...S.map(({name:P})=>P.toLowerCase().replaceAll(F,""))):["references"].includes(D)&&h.push(...I.map(({name:P})=>P.toLowerCase().replaceAll(F,"")))}}else if(["art","artist"].includes(b))o=h;else if(["is","is","meta"].includes(b)){let D=en(h);h=D.map(E=>E.toLowerCase().replaceAll(F,"")),D.includes(k.Meta.Expansion)&&!x&&(c=!0)}else["foiling","foil"].includes(b)?(l=tn(h),h=l.map(D=>D.toLowerCase())):["treat","treatment","var","variation"].includes(b)?(p=rn(h),h=p.map(D=>D.toLowerCase())):["set","s"].includes(b)?(u=Zi(h),h=u.map(D=>D.toLowerCase().replaceAll(F,""))):["pitch","p","color"].includes(b)&&(h=qi(h));Se[b]&&n.push({filterToPropertyMapping:Se[b],values:h,isAnd:B,isOr:m,modifier:M,excluded:x})}}else if(f){let v=(g=Ae(f))==null?void 0:g.card,y=Xe(f);v?s.push(`"${v.toLowerCase().replace(F,"")}"`):y&&y.length>0?n.push(...y):s.push(f.replace(F,""))}return{appliedFilters:n,attributes:{artists:o,foilings:l,isExpansionSlot:c,releases:u,treatments:p},keywords:s,specialConditions:d}},Zi=e=>{let t=[];for(let r of e)t.push(...Xi(r));return t},Xi=e=>{let t=[],r=Object.values(k.Release).find(a=>a.toLowerCase().replaceAll(F,"")===e);if(r&&t.push(r),t.length===0){let a=k.setIdentifierToSetMappings[e];a&&t.push(a)}if(t.length===0){let a=Object.values(k.Release).filter(i=>i.toLowerCase().includes(e));a.length>0&&t.push(...a)}return t},nt={blue:3,yellow:2,red:1,white:0},qi=e=>{let t=[];for(let r of e)nt[r]||nt[r]===0?t.push(nt[r].toString()):t.push(r);return t},Tr={exp:k.Meta.Expansion,expansion:k.Meta.Expansion,expansionSlot:k.Meta.Expansion,rainbow:k.Meta.Rainbow},en=e=>{let t=[];for(let r of e)Tr[r]&&t.push(Tr[r]);return t},Ir={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},tn=e=>{let t=[];for(let r of e)Ir[r]&&t.push(Ir[r]);return t},wr=$(W({},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}),rn=e=>{let t=[];for(let r of e)wr[r]?t.push(wr[r]):k.Treatment[r.toUpperCase()]&&t.push(k.Treatment[r.toUpperCase()]);return t},Lr={c:"common",f:"fabled",l:"legendary",m:"majestic",v:"marvel",r:"rare",s:"super rare",t:"token"},an=e=>{let t=[];for(let r of e)Lr[r]?t.push(Lr[r]):t.push(r);return t},nn=e=>{let t=[],r,a,i=Or.find(n=>e.includes(n));if(i){let[,n]=e.split(i);Pr(n)?(r=!0,t.push(...n.trim().split("+").map(o=>o.replace(F,"")))):Rr(n)?(a=!0,t.push(...n.trim().split(",").map(o=>o.replace(F,"")))):t.push(n.trim().replace(F,""))}else Pr(e)?(r=!0,t.push(...e.trim().split("+").map(n=>n.replace(F,"")))):Rr(e)?(a=!0,t.push(...e.trim().split(",").map(n=>n.replace(F,"")))):e.startsWith('"')&&e.endsWith('"')?t.push(e.trim().replaceAll('"',"").replace(F,"")):t.push(e.trim().replace(F,""));return{modifier:i,values:t,isAnd:r,isOr:a}},sn=e=>{let t=ln(e);if(t){let[,r]=e.split(t);return{excluded:!0,filterKey:r,isMeta:zr(r)}}else return{excluded:!1,filterKey:e,isMeta:zr(e)}},on=e=>e.indexOf(":")>=0,Pr=e=>e.indexOf("+")>=0,Rr=e=>e.indexOf(",")>=0,zr=e=>{var t;return!!((t=Se[e])!=null&&t.isMeta)},ln=e=>{var t;return(t=_r.find(r=>e.includes(r)))==null?void 0:t.slice(0,1)};var T=J(Q()),Nr={artists:["Hoodwill"],cardIdentifier:"fangs-a-lot-blue",classes:[T.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:[T.Hero.Kayo,T.Hero.Levia,T.Hero.Rhinar],printings:[{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000",print:"FNG000",set:T.Release.Promos},{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000_Marvel",print:`FNG000-${T.Treatment.FA}`,set:T.Release.Promos,treatment:T.Treatment.FA}],name:"Fangs A Lot",rarities:[T.Rarity.Rare],rarity:T.Rarity.Rare,sets:[T.Release.Promos],setIdentifiers:["FNG000"],specialImage:"FNG000_Marvel",subtypes:[T.Subtype.Attack],types:[T.Type.Action],typeText:"Generic Action - Attack"},Hr=[{keyword:Nr.name.toLowerCase(),card:Nr}];var ot=(e,t)=>{let r=t.find(a=>lt(a.name)===e);return r||(r=t.find(a=>lt(a.name).includes(e))),r},lt=e=>de(e.toLowerCase().trim().replace(F,"")),de=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"");var ut=class{constructor(t,r=!1){this.log=(t,...r)=>{this.debug&&console.log(t,...r)};this.search=(t,r)=>{let a,{appliedFilters:i,attributes:n,keywords:o,specialConditions:s}=st(t,this.cards),l=o.join(" "),c=r?Hr.filter(h=>h.keyword===l):[];if(c.length>0?a=c.map(({card:h})=>h):o.length?a=this.fuse.search(l).map(h=>h.item):a=[...this.cards],i.length&&(a=a.filter(h=>h&&$r(h,i,s))),o.length===0){let h="";if(n.releases.length===1)try{let B=n.releases[0];h=N.setToSetIdentifierMappings[B][0].toUpperCase()}catch(B){console.error("Error getting set identifier from search",B)}h?a.sort((B,m)=>{var C,D;let b=(C=B.setIdentifiers.find(E=>E.includes(h)))==null?void 0:C.replace(h,""),x=(D=m.setIdentifiers.find(E=>E.includes(h)))==null?void 0:D.replace(h,"");return b&&x?b.localeCompare(x):-1}):a.sort((B,m)=>B.name===m.name?`${B.pitch}`.localeCompare(`${m.pitch}`):B.name.localeCompare(m.name))}else{let h=[],B=[],m=o.map(b=>b.toLowerCase().replace(F,"")).join(" ");for(let b of a)b.name.toLowerCase().replace(F,"")===m?h.push(b):B.push(b);a=[...h,...B]}let u,{artists:p,isExpansionSlot:d,foilings:g,releases:f,treatments:v}=n;(p.length>0||d||g.length>0||f.length>0||v.length>0)&&(u=a.map(h=>{let B=h.printings.filter(m=>{let b=!!m.image,x=p.length===0||p.some(S=>m.artists.find(P=>P.replace(F,"").toLowerCase().includes(S))),C=(d||void 0)===m.isExpansionSlot,D=g.length===0||g.includes(m.foiling),E=f.length===0||f.includes(m.set),L=v.length===0||v.includes(m.treatment);return b&&x&&C&&D&&E&&L});return $(W({},h),{matchingPrintings:B})}));let M=(u==null?void 0:u.length)>0?u:a;return{appliedFilters:i,attributes:n,keywords:o,searchResults:M}};let a={getFn:(i,n)=>{let o=ct.default.config.getFn(i,n);return o&&(Array.isArray(o)?o.map(s=>de(s.replace(F,""))):de(o).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.debug=r,this.fuse=new ct.default([...t],a)}},Wr=ut,$r=(e,t,r)=>{let a=!0;for(let i of t){let{isNumber:n,isString:o,isArray:s,isBoolean:l,property:c}=i.filterToPropertyMapping;if((n&&!cn(e,i)||o&&!un(e,i)||s&&!dn(e,i)||l&&!hn(e,i))&&(a=!1),r.isClash&&["rarities","bannedFormats","legalFormats"].includes(c)){let p=[N.Rarity.SuperRare,N.Rarity.Majestic,N.Rarity.Legendary,N.Rarity.Fabled].some(y=>e.rarities.includes(y)),d=!1;for(let{cardIdentifiers:y,heroes:M}of Je)for(let h of r.heroes)M.includes(h)&&y.includes(e.cardIdentifier)&&(d=!0);let g=!!e.specializations&&e.specializations.length>0||d,f=[N.Type.Mentor,N.Type.Weapon].some(y=>e.types.includes(y)),v=Ye.includes(e.name);!a&&!v&&(g||f)&&p&&(a=!0),v&&(a=!1)}if(r.isClash&&r.heroes.includes(N.Hero.Briar)&&e.name==="Rosetta Thorn"&&(a=!0),!a)break}return a},cn=(e,t)=>{var r;if(Ie(t,e)){let{values:a,modifier:i,excluded:n,filterToPropertyMapping:{partialMatch:o}}=t,s=dt(e,t);if(s!=null&&!isNaN(s))if(s=parseInt(s),i)switch(i){case">=":let l=a==null?void 0:a.some(d=>s>=parseInt(d));return n?!l:l;case">":let c=a==null?void 0:a.some(d=>s>parseInt(d));return n?!c:c;case"<=":let u=a==null?void 0:a.some(d=>s<=parseInt(d));return n?!u:u;case"<":let p=a==null?void 0:a.some(d=>s<parseInt(d));return n?!p:p;default:return!1}else{let l=a==null?void 0:a.some(c=>s===parseInt(c));return n?!l:l}else{let l=(r=fn(e,t))==null?void 0:r.toLowerCase(),c=o?a==null?void 0:a.some(u=>l==null?void 0:l.includes(u)):a==null?void 0:a.some(u=>l===u);return n?!c:c}}else return!0},un=(e,t)=>{var r;if(Ie(t,e)){let{values:a,isAnd:i,excluded:n,filterToPropertyMapping:{partialMatch:o}}=t,s=(r=dt(e,t))==null?void 0:r.replaceAll(F,"");if(o){let l=i?a==null?void 0:a.every(c=>s==null?void 0:s.toLowerCase().includes(c)):a==null?void 0:a.some(c=>s==null?void 0:s.toLowerCase().includes(c));return n?!l:l}else{let l=i?a==null?void 0:a.every(c=>(s==null?void 0:s.toLowerCase())===c):a==null?void 0:a.some(c=>(s==null?void 0:s.toLowerCase())===c);return n?!l:l}}else return!0},dn=(e,t)=>{if(Ie(t,e)){let{values:r,isAnd:a,excluded:i,filterToPropertyMapping:{partialMatch:n}}=t,o=pn(e,t).map(s=>s==null?void 0:s.replaceAll(F,""));if(n){let s=a?r.every(c=>o==null?void 0:o.some(u=>u==null?void 0:u.toLowerCase().includes(c))):r.some(c=>o==null?void 0:o.some(u=>u==null?void 0:u.toLowerCase().includes(c))),l=o.length===0;return i?!s||l:s}else{let s=a?r.every(l=>o==null?void 0:o.some(c=>(c==null?void 0:c.toLowerCase())===l)):r.some(l=>o==null?void 0:o.some(c=>(c==null?void 0:c.toLowerCase())===l));return i?!s:s}}else return!0},hn=(e,t)=>{if(Ie(t,e)){let{excluded:r}=t,a=dt(e,t);return r?!a:a}else return!0},dt=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.property]},pn=(e,t)=>{let{filterToPropertyMapping:{nestedProperty:r,property:a}}=t,i=e[a]||[];return r?i.map(n=>n[r]).filter(n=>!!n):i},fn=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.specialProperty]},Ie=({cardTypes:e},{types:t,subtypes:r})=>!e||(e==null?void 0:e.some(a=>t.map(i=>i.toLowerCase()).includes(a.toLowerCase())||r.map(i=>i.toLowerCase()).includes(a.toLowerCase())));var oe=J(Q());var ht=J(Q()),gn={"Dawnblade, Resplendent":"Dawnblade"},jr=e=>gn[e.name]||e.name,Gr=e=>{var t;return(t=e.functionalText)==null?void 0:t.replaceAll(e.name,"")},Te=(e,t)=>{let r=t.find(a=>a.name.toLowerCase().replace(F,"")===e);return r||(r=t.find(a=>a.name.toLowerCase().replace(F,"").includes(e))),pt(r,t)},pt=(e,t)=>{var n,o;let r=[],a=[],i=[];if(e){let s=[],l=[],c=jr(e);for(let u of t){let p=jr(u),d=c===p,g=e.cardIdentifier!==u.cardIdentifier,f=e.pitch!==u.pitch;if(d&&g&&f)r.push(u);else if(!d){let v=e.name==="Seismic Surge",y=(n=u.keywords)==null?void 0:n.includes(ht.Keyword.Heave),M=v&&y,h=Gr(u),B=h==null?void 0:h.includes(c),m=Gr(e),b=u.traits||[],x=(m==null?void 0:m.includes(p))||b.some(L=>m==null?void 0:m.includes(L));(B||M)&&s.push(u);let C=u.name==="Seismic Surge",D=(o=e.keywords)==null?void 0:o.includes(ht.Keyword.Heave);(x||C&&D)&&l.push(u)}}for(let u of s)a.push(u);for(let u of l){let p=u.name;c!==p&&!l.some(d=>{let g=d.name;return g!==p&&(g==null?void 0:g.includes(p))})&&i.push(u)}}return{otherPitches:r,referencedBy:a,references:i}},mn=["cash-in-yellow"],yn={[oe.Hero.Crackni]:{traits:[oe.Trait.AgentOfChaos]},[oe.Hero.Maxx]:{tokens:["hyper-driver"]}},vn=(e,t,r)=>{var i,n;let a=new Set;for(let o of e.filter(({cardIdentifier:s})=>!mn.includes(s))){let{references:s}=pt(o,t);for(let l of s.filter(c=>{let u=c.name==="Hyper Driver",p=r===oe.Hero.Maxx;return!u||p}))a.add(l)}if(r){let o=yn[r];if(o){if(o.cards)for(let s of e)(i=o.cards)!=null&&i.includes(s.cardIdentifier)&&a.add(s);if(o.tokens)for(let s of t)(n=o.tokens)!=null&&n.includes(s.cardIdentifier)&&a.add(s)}}return Array.from(a)};0&&(module.exports={PUNCTUATION,abbreviations,availableExclusions,availableModifiers,clashBannedCards,clashLegalCards,clashSpecializationOverrides,filterCard,filtersToCardPropertyMappings,getAbbreviation,getAbbreviationByCard,getCardByName,getCleanText,getExcludedMetaFilters,getKeywordsAndAppliedFiltersFromText,getMetaFilters,getNormalizedText,getRelatedCards,getRelatedCardsByName,getTokensReferencedByCards,multiWordShorthands,shorthands,singleWordShorthands});
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V(e){return Array.isArray?Array.isArray(e):ir(e)==="[object Array]"}var $a=1/0;function ja(e){if(typeof e=="string")return e;var t=e+"";return t=="0"&&1/e==-$a?"-0":t}function Ga(e){return e==null?"":ja(e)}function j(e){return typeof e=="string"}function rr(e){return typeof e=="number"}function Ka(e){return e===!0||e===!1||Ua(e)&&ir(e)=="[object Boolean]"}function ar(e){return _e(e)==="object"}function Ua(e){return ar(e)&&e!==null}function _(e){return e!=null}function Oe(e){return!e.trim().length}function ir(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var Va="Incorrect 'index' type",Ya=function(t){return"Invalid value for key ".concat(t)},Ja=function(t){return"Pattern length exceeds max of ".concat(t,".")},Qa=function(t){return"Missing ".concat(t," property in key")},Za=function(t){return"Property 'weight' in key '".concat(t,"' must be a positive integer")},Zt=Object.prototype.hasOwnProperty,Xa=function(){function e(t){var r=this;R(this,e),this._keys=[],this._keyMap={};var a=0;t.forEach(function(i){var n=nr(i);a+=n.weight,r._keys.push(n),r._keyMap[n.id]=n,a+=n.weight}),this._keys.forEach(function(i){i.weight/=a})}return z(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 nr(e){var t=null,r=null,a=null,i=1,n=null;if(j(e)||V(e))a=e,t=Xt(e),r=$e(e);else{if(!Zt.call(e,"name"))throw new Error(Qa("name"));var o=e.name;if(a=o,Zt.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(Za(o));t=Xt(o),r=$e(o),n=e.getFn}return{path:t,id:r,weight:i,src:a,getFn:n}}function Xt(e){return V(e)?e:e.split(".")}function $e(e){return V(e)?e.join("."):e}function qa(e,t){var r=[],a=!1,i=function n(o,s,l){if(_(o))if(!s[l])r.push(o);else{var c=s[l],u=o[c];if(!_(u))return;if(l===s.length-1&&(j(u)||rr(u)||Ka(u)))r.push(Ga(u));else if(V(u)){a=!0;for(var p=0,d=u.length;p<d;p+=1)n(u[p],s,l+1)}else s.length&&n(u,s,l+1)}};return i(e,j(t)?t.split("."):t,0),a?r:r[0]}var ei={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ti={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}},ri={location:0,threshold:.6,distance:100},ai={useExtendedSearch:!1,getFn:qa,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},A=ie(ie(ie(ie({},ti),ei),ri),ai),ii=/[^ ]+/g;function ni(){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,a=Math.pow(10,t);return{get:function(n){var o=n.match(ii).length;if(r.has(o))return r.get(o);var s=1/Math.pow(o,.5*e),l=parseFloat(Math.round(s*a)/a);return r.set(o,l),l},clear:function(){r.clear()}}}var Ve=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getFn,a=r===void 0?A.getFn:r,i=t.fieldNormWeight,n=i===void 0?A.fieldNormWeight:i;R(this,e),this.norm=ni(n,3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}return z(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,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.keys=a,this._keysMap={},a.forEach(function(i,n){r._keysMap[i.id]=n})}},{key:"create",value:function(){var r=this;this.isCreated||!this.docs.length||(this.isCreated=!0,j(this.docs[0])?this.docs.forEach(function(a,i){r._addString(a,i)}):this.docs.forEach(function(a,i){r._addObject(a,i)}),this.norm.clear())}},{key:"add",value:function(r){var a=this.size();j(r)?this._addString(r,a):this._addObject(r,a)}},{key:"removeAt",value:function(r){this.records.splice(r,1);for(var a=r,i=this.size();a<i;a+=1)this.records[a].i-=1}},{key:"getValueForItemAtKeyId",value:function(r,a){return r[this._keysMap[a]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(r,a){if(!(!_(r)||Oe(r))){var i={v:r,i:a,n:this.norm.get(r)};this.records.push(i)}}},{key:"_addObject",value:function(r,a){var i=this,n={i:a,$:{}};this.keys.forEach(function(o,s){var l=o.getFn?o.getFn(r):i.getFn(r,o.path);if(_(l)){if(V(l))(function(){for(var u=[],p=[{nestedArrIndex:-1,value:l}];p.length;){var d=p.pop(),g=d.nestedArrIndex,f=d.value;if(_(f))if(j(f)&&!Oe(f)){var v={v:f,i:g,n:i.norm.get(f)};u.push(v)}else V(f)&&f.forEach(function(y,M){p.push({nestedArrIndex:M,value:y})})}n.$[s]=u})();else if(j(l)&&!Oe(l)){var c={v:l,n:i.norm.get(l)};n.$[s]=c}}}),this.records.push(n)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function sr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.getFn,i=a===void 0?A.getFn:a,n=r.fieldNormWeight,o=n===void 0?A.fieldNormWeight:n,s=new Ve({getFn:i,fieldNormWeight:o});return s.setKeys(e.map(nr)),s.setSources(t),s.create(),s}function si(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.getFn,a=r===void 0?A.getFn:r,i=t.fieldNormWeight,n=i===void 0?A.fieldNormWeight:i,o=e.keys,s=e.records,l=new Ve({getFn:a,fieldNormWeight:n});return l.setKeys(o),l.setIndexRecords(s),l}function me(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.errors,a=r===void 0?0:r,i=t.currentLocation,n=i===void 0?0:i,o=t.expectedLocation,s=o===void 0?0:o,l=t.distance,c=l===void 0?A.distance:l,u=t.ignoreLocation,p=u===void 0?A.ignoreLocation:u,d=a/e.length;if(p)return d;var g=Math.abs(s-n);return c?d+g/c:g?1:d}function oi(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A.minMatchCharLength,r=[],a=-1,i=-1,n=0,o=e.length;n<o;n+=1){var s=e[n];s&&a===-1?a=n:!s&&a!==-1&&(i=n-1,i-a+1>=t&&r.push([a,i]),a=-1)}return e[n-1]&&n-a>=t&&r.push([a,n-1]),r}var te=32;function li(e,t,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=a.location,n=i===void 0?A.location:i,o=a.distance,s=o===void 0?A.distance:o,l=a.threshold,c=l===void 0?A.threshold:l,u=a.findAllMatches,p=u===void 0?A.findAllMatches:u,d=a.minMatchCharLength,g=d===void 0?A.minMatchCharLength:d,f=a.includeMatches,v=f===void 0?A.includeMatches:f,y=a.ignoreLocation,M=y===void 0?A.ignoreLocation:y;if(t.length>te)throw new Error(Ja(te));for(var h=t.length,B=e.length,m=Math.max(0,Math.min(n,B)),b=c,x=m,C=g>1||v,D=C?Array(B):[],E;(E=e.indexOf(t,x))>-1;){var L=me(t,{currentLocation:E,expectedLocation:m,distance:s,ignoreLocation:M});if(b=Math.min(L,b),x=E+h,C)for(var I=0;I<h;)D[E+I]=1,I+=1}x=-1;for(var S=[],P=1,w=h+B,K=1<<h-1,U=0;U<h;U+=1){for(var he=0,Y=w;he<Y;){var Kr=me(t,{errors:U,currentLocation:m+Y,expectedLocation:m,distance:s,ignoreLocation:M});Kr<=b?he=Y:w=Y,Y=Math.floor((w-he)/2+he)}w=Y;var ft=Math.max(1,m-Y+1),we=p?B:Math.min(m+Y,B)+h,ae=Array(we+2);ae[we+1]=(1<<U)-1;for(var H=we;H>=ft;H-=1){var pe=H-1,gt=r[e.charAt(pe)];if(C&&(D[pe]=+!!gt),ae[H]=(ae[H+1]<<1|1)>,U&&(ae[H]|=(S[H+1]|S[H])<<1|1|S[H+1]),ae[H]&K&&(P=me(t,{errors:U,currentLocation:pe,expectedLocation:m,distance:s,ignoreLocation:M}),P<=b)){if(b=P,x=pe,x<=m)break;ft=Math.max(1,2*m-x)}}var Ur=me(t,{errors:U+1,currentLocation:m,expectedLocation:m,distance:s,ignoreLocation:M});if(Ur>b)break;S=ae}var Le={isMatch:x>=0,score:Math.max(.001,P)};if(C){var mt=oi(D,g);mt.length?v&&(Le.indices=mt):Le.isMatch=!1}return Le}function ci(e){for(var t={},r=0,a=e.length;r<a;r+=1){var i=e.charAt(r);t[i]=(t[i]||0)|1<<a-r-1}return t}var or=function(){function e(t){var r=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=a.location,n=i===void 0?A.location:i,o=a.threshold,s=o===void 0?A.threshold:o,l=a.distance,c=l===void 0?A.distance:l,u=a.includeMatches,p=u===void 0?A.includeMatches:u,d=a.findAllMatches,g=d===void 0?A.findAllMatches:d,f=a.minMatchCharLength,v=f===void 0?A.minMatchCharLength:f,y=a.isCaseSensitive,M=y===void 0?A.isCaseSensitive:y,h=a.ignoreLocation,B=h===void 0?A.ignoreLocation:h;if(R(this,e),this.options={location:n,threshold:s,distance:c,includeMatches:p,findAllMatches:g,minMatchCharLength:v,isCaseSensitive:M,ignoreLocation:B},this.pattern=M?t:t.toLowerCase(),this.chunks=[],!!this.pattern.length){var m=function(I,S){r.chunks.push({pattern:I,alphabet:ci(I),startIndex:S})},b=this.pattern.length;if(b>te){for(var x=0,C=b%te,D=b-C;x<D;)m(this.pattern.substr(x,te),x),x+=te;if(C){var E=b-te;m(this.pattern.substr(E),E)}}else m(this.pattern,0)}}return z(e,[{key:"searchIn",value:function(r){var a=this.options,i=a.isCaseSensitive,n=a.includeMatches;if(i||(r=r.toLowerCase()),this.pattern===r){var o={isMatch:!0,score:0};return n&&(o.indices=[[0,r.length-1]]),o}var s=this.options,l=s.location,c=s.distance,u=s.threshold,p=s.findAllMatches,d=s.minMatchCharLength,g=s.ignoreLocation,f=[],v=0,y=!1;this.chunks.forEach(function(h){var B=h.pattern,m=h.alphabet,b=h.startIndex,x=li(r,B,m,{location:l+b,distance:c,threshold:u,findAllMatches:p,minMatchCharLength:d,includeMatches:n,ignoreLocation:g}),C=x.isMatch,D=x.score,E=x.indices;C&&(y=!0),v+=D,C&&E&&(f=[].concat(re(f),re(E)))});var M={isMatch:y,score:y?v/this.chunks.length:1};return y&&n&&(M.indices=f),M}}]),e}(),q=function(){function e(t){R(this,e),this.pattern=t}return z(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(r){return qt(r,this.multiRegex)}},{key:"isSingleMatch",value:function(r){return qt(r,this.singleRegex)}}]),e}();function qt(e,t){var r=e.match(t);return r?r[1]:null}var ui=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=i===this.pattern;return{isMatch:n,score:n?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}(q),di=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=i.indexOf(this.pattern),o=n===-1;return{isMatch:o,score:o?0:1,indices:[0,i.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),r}(q),hi=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=i.startsWith(this.pattern);return{isMatch:n,score:n?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}(q),pi=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=!i.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,i.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),r}(q),fi=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=i.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[i.length-this.pattern.length,i.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),r}(q),gi=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){var n=!i.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,i.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),r}(q),lr=function(e){Z(r,e);var t=X(r);function r(a){var i,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.location,s=o===void 0?A.location:o,l=n.threshold,c=l===void 0?A.threshold:l,u=n.distance,p=u===void 0?A.distance:u,d=n.includeMatches,g=d===void 0?A.includeMatches:d,f=n.findAllMatches,v=f===void 0?A.findAllMatches:f,y=n.minMatchCharLength,M=y===void 0?A.minMatchCharLength:y,h=n.isCaseSensitive,B=h===void 0?A.isCaseSensitive:h,m=n.ignoreLocation,b=m===void 0?A.ignoreLocation:m;return R(this,r),i=t.call(this,a),i._bitapSearch=new or(a,{location:s,threshold:c,distance:p,includeMatches:g,findAllMatches:v,minMatchCharLength:M,isCaseSensitive:B,ignoreLocation:b}),i}return z(r,[{key:"search",value:function(i){return this._bitapSearch.searchIn(i)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),r}(q),cr=function(e){Z(r,e);var t=X(r);function r(a){return R(this,r),t.call(this,a)}return z(r,[{key:"search",value:function(i){for(var n=0,o,s=[],l=this.pattern.length;(o=i.indexOf(this.pattern,n))>-1;)n=o+l,s.push([o,n-1]);var c=!!s.length;return{isMatch:c,score:c?0:1,indices:s}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),r}(q),je=[ui,cr,hi,pi,gi,fi,di,lr],er=je.length,mi=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,yi="|";function vi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.split(yi).map(function(r){for(var a=r.trim().split(mi).filter(function(f){return f&&!!f.trim()}),i=[],n=0,o=a.length;n<o;n+=1){for(var s=a[n],l=!1,c=-1;!l&&++c<er;){var u=je[c],p=u.isMultiMatch(s);p&&(i.push(new u(p,t)),l=!0)}if(!l)for(c=-1;++c<er;){var d=je[c],g=d.isSingleMatch(s);if(g){i.push(new d(g,t));break}}}return i})}var ki=new Set([lr.type,cr.type]),bi=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.isCaseSensitive,i=a===void 0?A.isCaseSensitive:a,n=r.includeMatches,o=n===void 0?A.includeMatches:n,s=r.minMatchCharLength,l=s===void 0?A.minMatchCharLength:s,c=r.ignoreLocation,u=c===void 0?A.ignoreLocation:c,p=r.findAllMatches,d=p===void 0?A.findAllMatches:p,g=r.location,f=g===void 0?A.location:g,v=r.threshold,y=v===void 0?A.threshold:v,M=r.distance,h=M===void 0?A.distance:M;R(this,e),this.query=null,this.options={isCaseSensitive:i,includeMatches:o,minMatchCharLength:l,findAllMatches:d,ignoreLocation:u,location:f,threshold:y,distance:h},this.pattern=i?t:t.toLowerCase(),this.query=vi(this.pattern,this.options)}return z(e,[{key:"searchIn",value:function(r){var a=this.query;if(!a)return{isMatch:!1,score:1};var i=this.options,n=i.includeMatches,o=i.isCaseSensitive;r=o?r:r.toLowerCase();for(var s=0,l=[],c=0,u=0,p=a.length;u<p;u+=1){var d=a[u];l.length=0,s=0;for(var g=0,f=d.length;g<f;g+=1){var v=d[g],y=v.search(r),M=y.isMatch,h=y.indices,B=y.score;if(M){if(s+=1,c+=B,n){var m=v.constructor.type;ki.has(m)?l=[].concat(re(l),re(h)):l.push(h)}}else{c=0,s=0,l.length=0;break}}if(s){var b={isMatch:!0,score:c/s};return n&&(b.indices=l),b}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(r,a){return a.useExtendedSearch}}]),e}(),ve=[];function Ai(){ve.push.apply(ve,arguments)}function Ge(e,t){for(var r=0,a=ve.length;r<a;r+=1){var i=ve[r];if(i.condition(e,t))return new i(e,t)}return new or(e,t)}var ke={AND:"$and",OR:"$or"},Ke={PATH:"$path",PATTERN:"$val"},Ue=function(t){return!!(t[ke.AND]||t[ke.OR])},Ci=function(t){return!!t[Ke.PATH]},Di=function(t){return!V(t)&&ar(t)&&!Ue(t)},tr=function(t){return Ne({},ke.AND,Object.keys(t).map(function(r){return Ne({},r,t[r])}))};function ur(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.auto,i=a===void 0?!0:a,n=function o(s){var l=Object.keys(s),c=Ci(s);if(!c&&l.length>1&&!Ue(s))return o(tr(s));if(Di(s)){var u=c?s[Ke.PATH]:l[0],p=c?s[Ke.PATTERN]:s[u];if(!j(p))throw new Error(Ya(u));var d={keyId:$e(u),pattern:p};return i&&(d.searcher=Ge(p,t)),d}var g={children:[],operator:l[0]};return l.forEach(function(f){var v=s[f];V(v)&&v.forEach(function(y){g.children.push(o(y))})}),g};return Ue(e)||(e=tr(e)),n(e)}function Mi(e,t){var r=t.ignoreFieldNorm,a=r===void 0?A.ignoreFieldNorm:r;e.forEach(function(i){var n=1;i.matches.forEach(function(o){var s=o.key,l=o.norm,c=o.score,u=s?s.weight:null;n*=Math.pow(c===0&&u?Number.EPSILON:c,(u||1)*(a?1:l))}),i.score=n})}function Bi(e,t){var r=e.matches;t.matches=[],_(r)&&r.forEach(function(a){if(!(!_(a.indices)||!a.indices.length)){var i=a.indices,n=a.value,o={indices:i,value:n};a.key&&(o.key=a.key.src),a.idx>-1&&(o.refIndex=a.idx),t.matches.push(o)}})}function Fi(e,t){t.score=e.score}function Ei(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.includeMatches,i=a===void 0?A.includeMatches:a,n=r.includeScore,o=n===void 0?A.includeScore:n,s=[];return i&&s.push(Bi),o&&s.push(Fi),e.map(function(l){var c=l.idx,u={item:t[c],refIndex:c};return s.length&&s.forEach(function(p){p(l,u)}),u})}var ne=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;R(this,e),this.options=ie(ie({},A),r),this.options.useExtendedSearch,this._keyStore=new Xa(this.options.keys),this.setCollection(t,a)}return z(e,[{key:"setCollection",value:function(r,a){if(this._docs=r,a&&!(a instanceof Ve))throw new Error(Va);this._myIndex=a||sr(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},a=[],i=0,n=this._docs.length;i<n;i+=1){var o=this._docs[i];r(o,i)&&(this.removeAt(i),i-=1,n-=1,a.push(o))}return a}},{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 a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=a.limit,n=i===void 0?-1:i,o=this.options,s=o.includeMatches,l=o.includeScore,c=o.shouldSort,u=o.sortFn,p=o.ignoreFieldNorm,d=j(r)?j(this._docs[0])?this._searchStringList(r):this._searchObjectList(r):this._searchLogical(r);return Mi(d,{ignoreFieldNorm:p}),c&&d.sort(u),rr(n)&&n>-1&&(d=d.slice(0,n)),Ei(d,this._docs,{includeMatches:s,includeScore:l})}},{key:"_searchStringList",value:function(r){var a=Ge(r,this.options),i=this._myIndex.records,n=[];return i.forEach(function(o){var s=o.v,l=o.i,c=o.n;if(_(s)){var u=a.searchIn(s),p=u.isMatch,d=u.score,g=u.indices;p&&n.push({item:s,idx:l,matches:[{score:d,value:s,norm:c,indices:g}]})}}),n}},{key:"_searchLogical",value:function(r){var a=this,i=ur(r,this.options),n=function c(u,p,d){if(!u.children){var g=u.keyId,f=u.searcher,v=a._findMatches({key:a._keyStore.get(g),value:a._myIndex.getValueForItemAtKeyId(p,g),searcher:f});return v&&v.length?[{idx:d,item:p,matches:v}]:[]}for(var y=[],M=0,h=u.children.length;M<h;M+=1){var B=u.children[M],m=c(B,p,d);if(m.length)y.push.apply(y,re(m));else if(u.operator===ke.AND)return[]}return y},o=this._myIndex.records,s={},l=[];return o.forEach(function(c){var u=c.$,p=c.i;if(_(u)){var d=n(i,u,p);d.length&&(s[p]||(s[p]={idx:p,item:u,matches:[]},l.push(s[p])),d.forEach(function(g){var f,v=g.matches;(f=s[p].matches).push.apply(f,re(v))}))}}),l}},{key:"_searchObjectList",value:function(r){var a=this,i=Ge(r,this.options),n=this._myIndex,o=n.keys,s=n.records,l=[];return s.forEach(function(c){var u=c.$,p=c.i;if(_(u)){var d=[];o.forEach(function(g,f){d.push.apply(d,re(a._findMatches({key:g,value:u[f],searcher:i})))}),d.length&&l.push({idx:p,item:u,matches:d})}}),l}},{key:"_findMatches",value:function(r){var a=r.key,i=r.value,n=r.searcher;if(!_(i))return[];var o=[];if(V(i))i.forEach(function(g){var f=g.v,v=g.i,y=g.n;if(_(f)){var M=n.searchIn(f),h=M.isMatch,B=M.score,m=M.indices;h&&o.push({score:B,key:a,value:f,idx:v,norm:y,indices:m})}});else{var s=i.v,l=i.n,c=n.searchIn(s),u=c.isMatch,p=c.score,d=c.indices;u&&o.push({score:p,key:a,value:s,norm:l,indices:d})}return o}}]),e}();ne.version="6.6.2";ne.createIndex=sr;ne.parseIndex=si;ne.config=A;ne.parseQuery=ur;Ai(bi);var xi=ne;dr.exports=xi});var kn={};ea(kn,{PUNCTUATION:()=>F,abbreviations:()=>Qe,availableExclusions:()=>_r,availableModifiers:()=>Or,clashBannedCards:()=>Ye,clashLegalCards:()=>Si,clashSpecializationOverrides:()=>Je,default:()=>Wr,filterCard:()=>$r,filtersToCardPropertyMappings:()=>Se,getAbbreviation:()=>Ae,getAbbreviationByCard:()=>Ti,getCardByName:()=>ot,getCleanText:()=>lt,getExcludedMetaFilters:()=>Xe,getKeywordsAndAppliedFiltersFromText:()=>st,getMetaFilters:()=>Ze,getNormalizedText:()=>de,getRelatedCards:()=>pt,getRelatedCardsByName:()=>Te,getTokensReferencedByCards:()=>vn,multiWordShorthands:()=>et,shorthands:()=>qe,singleWordShorthands:()=>tt});module.exports=ta(kn);var N=J(Q()),ct=J(hr());var be=J(Q()),Ye=["Amulet of Ice","Ball Lightning","Belittle","Drone of Brutality","Duskblade","Rosetta Thorn","Stubby Hammerers"],Si=[],Je=[{heroes:[be.Hero.Briar],cardIdentifiers:["rosetta-thorn"]},{heroes:[be.Hero.Emperor],cardIdentifiers:["command-and-conquer-red"]},{heroes:[be.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=J(Q());var Ae=e=>Qe.find(({abbreviations:t})=>t.find(r=>r.toLowerCase()===e)),Ti=e=>Qe.find(({card:t})=>t.toLowerCase()===e.name.toLowerCase()),Qe=[{abbreviations:["10k"],card:"10,000 Year Reunion"},{abbreviations:["Pajamas","PJs"],card:"Alluvion Constellas"},{abbreviations:["Slippy","Arakni, Slipped Through the Cracks"],card:"Arakni, 5L!p3d 7hRu 7h3 cR4X"},{abbreviations:["Dullcap"],card:"Arcanite Skullcap"},{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:["CStrike","C-Strike","C Strike"],card:"Celestial Cataclysm"},{abbreviations:["CBelly"],card:"Cerebellum Processor"},{abbreviations:["CLF"],card:"Channel Lake Frigid"},{abbreviations:["CLV"],card:"Channel Lightning Valley"},{abbreviations:["CMH"],card:"Channel Mount Heroic"},{abbreviations:["CMT"],card:"Channel the Millennium Tree"},{abbreviations:["CnC","C&C"],card:"Command and Conquer"},{abbreviations:["CYB"],card:"Count Your Blessings"},{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:["DIO"],card:"Dash I/O"},{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:["Yum yum"],card:"Fruits of the Forest"},{abbreviations:["GnT"],card:"Give and Take"},{abbreviations:["Habibi"],card:"Hanabi Blaster"},{abbreviations:["HMH"],card:"Hope Merchant's Hood"},{abbreviations:["HoI"],card:"Heart of Ice"},{abbreviations:["Pumpkin"],card:"Jack-o'-lantern"},{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:["LtC"],card:"Lead the Charge"},{abbreviations:["LNW"],card:"Leave No Witnesses"},{abbreviations:["LFaL","L4aL"],card:"Life for a Life"},{abbreviations:["LiT"],card:"Lost in Thought"},{abbreviations:["LoW"],card:"Lord of Wind"},{abbreviations:["MMB"],card:"Mage Master Boots"},{abbreviations:["MaxV"],card:"Maximum Velocity"},{abbreviations:["MoM"],card:"Mask of Momentum"},{abbreviations:["MnG"],card:"Meat and Greet"},{abbreviations:["Cake","\u{1F382}"],card:"Ninth Blade of the Blood Oath"},{abbreviations:["PoM"],card:"Peace of Mind"},{abbreviations:["PF","\u{1F525}"],card:"Phoenix Flame"},{abbreviations:["PtW"],card:"Poison the Well"},{abbreviations:["Thanos","Infinity Gauntlet"],card:"Polarity Reversal Script"},{abbreviations:["DPot","D Pot"],card:"Potion of D\xE9j\xE0 Vu"},{abbreviations:["Ponder Run"],card:"Premeditate"},{abbreviations:["Qi Unbound"],card:"Qi Unleashed"},{abbreviations:["RitL"],card:"Red in the Ledger"},{abbreviations:["Cats","Ghost cat","Ghost cats"],card:"Restless Coalescence"},{abbreviations:["SSGB"],card:"Sandscour Greatbow"},{abbreviations:["SSP"],card:"Sand Sketched Plan"},{abbreviations:["SFaS","S4aS"],card:"Scar for a Scar"},{abbreviations:["SWOMB"],card:"Shifting Winds of the Mystic Beast"},{abbreviations:["SWK"],card:"Spinning Wheel Kick"},{abbreviations:["SFTL"],card:"Swing Fist, Think Later"},{abbreviations:["TTT"],card:"Take the Tempo"},{abbreviations:["Ultron"],card:"Teklovossen, the Mechropotent"},{abbreviations:["ToS"],card:"Test of Strength"},{abbreviations:["TAYG"],card:"That All You Got?"},{abbreviations:["TROM"],card:"This Round's on Me"},{abbreviations:["3oak"],card:"Three of a Kind"},{abbreviations:["Pox Malone","Post Malone"],card:"Virulent Touch"},{abbreviations:["Cast Homes"],card:"Visit Goldmane Estate"},{abbreviations:["Frosty Hammer"],card:"Winter's Wail"},{abbreviations:["Wreckless Wing"],card:"War Cry of Bellona"},{abbreviations:["ZTS"],card:"Zero to Sixty"}];var O=J(Q());var Be=Array.from(Array(50).keys()).map(e=>`${e}`),Ii=[{format:O.Format.BlitzLivingLegend,nicknames:["blitz ll"]},{format:O.Format.ClassicConstructed,nicknames:["cc","classic"]},{format:O.Format.ClassicConstructedLivingLegend,nicknames:["cc ll","classic constructed ll","ll cc","ll","living legend"]},{format:O.Format.UltimatePitFight,nicknames:["upf"]}],wi=Object.values(O.Format).map(e=>{let t=Ii.find(({format:a})=>a===e),r=e.toLowerCase().replaceAll(F,"");return t?$(W({},t),{format:r}):{format:r}}),Li=[{hero:O.Hero.DataDoll,nicknames:["data","datadoll"]},{hero:O.Hero.Dorinthea,nicknames:["dori"]},{hero:O.Hero.GenisWotchuneed,nicknames:["genis"]},{hero:O.Hero.Iyslander,nicknames:["islander"]}],Pi=Object.values(O.Hero).map(e=>{let t=Li.find(({hero:a})=>a===e),r=e.toLowerCase().replaceAll(F,"");return t?$(W({},t),{hero:r}):{hero:r}}),Ce=["common","rare","super rare","majestic","legendary","fabled"],Ri=(e,t,r)=>{let a=[];if(!t)a.push(...e);else for(let i of e)switch(t){case">=":let n=!1;for(let c of Ce)n?a.push(c):c===i&&(n=!0,a.push(c));break;case">":let o=!1;for(let c of Ce)o?a.push(c):c===i&&(o=!0);break;case"<=":let s=!1;for(let c of Ce.slice().reverse())s?a.push(c):c===i&&(s=!0,a.push(c));break;case"<":let l=!1;for(let c of Ce.slice().reverse())l?a.push(c):c===i&&(l=!0);break;default:break}return{filterToPropertyMapping:{property:"rarities",isArray:!0},isOr:!0,values:a,excluded:r}},zi=(e,t)=>{let r=[],a=[],i=[];for(let n of e){let o=wi.find(({format:s,nicknames:l})=>s===n||!!l&&l.includes(n));if(o)a.push(o.format);else{let s=Pi.find(({hero:l,nicknames:c})=>l===n||!!c&&c.includes(n));s&&i.push(s.hero)}}return a.length>0&&r.push({filterToPropertyMapping:{property:"legalFormats",isArray:!0},values:a,isOr:!0,excluded:t}),i.length>0&&r.push({filterToPropertyMapping:{property:"legalHeroes",isArray:!0},values:i,isOr:!0,excluded:t}),r},Ze=(e,t,r,a)=>{let i=[];return Ni(t)?i.push(...zi(r,e)):Wi(t)&&i.push(Ri(r,a,e)),i},se=[{filterToPropertyMapping:{property:"cost",isNumber:!0},values:Be,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:Be,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}],De=[{filterToPropertyMapping:{property:"pitch",isNumber:!0},excluded:!0,values:Be},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0},{filterToPropertyMapping:{property:"isCardBack",isBoolean:!0},values:["true"],excluded:!0}],ee=[{filterToPropertyMapping:{property:"power",isNumber:!0},excluded:!0,values:Be},{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(O.Talent).map(e=>e.toLowerCase())}],Oi={"!co":se,"-co":se,"!cost":se,"-cost":se,"!color":se,"-color":se,"!b":G,"-b":G,"!block":G,"-block":G,"!d":G,"-d":G,"!def":G,"-def":G,"!defense":G,"-defense":G,"!pitch":De,"-pitch":De,"!p":De,"-p":De,"!attack":ee,"-attack":ee,"!power":ee,"-power":ee,"!pwr":ee,"-pwr":ee,"!pow":ee,"-pow":ee,"!talents":Me,"-talents":Me,"!tal":Me,"-tal":Me},Xe=e=>{let t=[],r=Oi[e];return r&&t.push(...r),t},_i=["l","legal","hero"],Ni=e=>_i.includes(e),Hi=["r","rarity"],Wi=e=>Hi.includes(e);var qe=[{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"]}],et=qe.filter(({shorthands:e})=>e.some(t=>t.includes(" "))).map(e=>$(W({},e),{shorthands:e.shorthands.filter(t=>t.includes(" ")).map(t=>t.toLowerCase()).sort((t,r)=>r.length-t.length)})),tt=qe.filter(({shorthands:e})=>e.some(t=>!t.includes(" "))).map(e=>$(W({},e),{shorthands:e.shorthands.filter(t=>!t.includes(" ")).map(t=>t.toLowerCase()).sort((t,r)=>r.length-t.length)}));var Or=[">=",">","<=","<"],_r=["!","-"],$i={property:"arcane",specialProperty:"specialArcane",isNumber:!0,partialMatch:!0},rt={property:"artists",isArray:!0,partialMatch:!0},pr={property:"bannedFormats",isArray:!0,partialMatch:!0},fr={property:"bonds",isArray:!0},ji={property:"n/a"},gr={property:"classes",isArray:!0,partialMatch:!0},mr={property:"cost",specialProperty:"specialCost",isNumber:!0,partialMatch:!0},ue={property:"defense",specialProperty:"specialDefense",isNumber:!0},yr={property:"flows",isArray:!0},vr={nestedProperty:"foiling",property:"printings",isArray:!0},kr={property:"fusions",isArray:!0},br={property:"intellect",isNumber:!0},Ar={property:"keywords",isArray:!0,partialMatch:!0},at={property:"n/a",isMeta:!0},Cr={property:"life",specialProperty:"specialLife",isNumber:!0},Dr={property:"meta",isArray:!0},Mr={property:"name",isString:!0,partialMatch:!0},it={property:"pitch",isNumber:!0},Fe={property:"power",specialProperty:"specialPower",isNumber:!0},Br={property:"n/a",isMeta:!0},Gi={property:"n/a"},Ki={property:"n/a"},Fr={property:"sets",isArray:!0,partialMatch:!0},Ee={property:"specializations",isArray:!0,partialMatch:!0},Er={property:"subtypes",isArray:!0},xr={property:"types",isArray:!0},Sr={property:"talents",isArray:!0},Ui={property:"functionalText",isString:!0,partialMatch:!0},Vi={property:"typeText",isString:!0,partialMatch:!0},xe={nestedProperty:"treatment",property:"printings",isArray:!0},Se={arcane:$i,a:rt,artist:rt,art:rt,attack:Fe,b:ue,block:ue,banned:pr,bond:fr,bonds:fr,c:gr,class:gr,chain:ji,co:mr,cost:mr,color:it,d:ue,def:ue,defense:ue,flow:yr,flows:yr,f:kr,fusion:kr,foil:vr,foiling:vr,i:br,intellect:br,is:Dr,k:Ar,keyword:Ar,l:at,legal:at,hero:at,li:Cr,life:Cr,meta:Dr,n:Mr,name:Mr,p:it,pitch:it,pwr:Fe,pow:Fe,power:Fe,r:Br,rarity:Br,referencedby:Gi,references:Ki,rf:pr,s:Fr,set:Fr,sp:Ee,spec:Ee,specialization:Ee,specializations:Ee,st:Er,subtype:Er,t:xr,type:xr,tal:Sr,talent:Sr,text:Ui,treat:xe,treatment:xe,var:xe,variation:xe,x:Vi},Yi=[{text:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase(),override:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase().replaceAll(F,"")}],Ji=e=>{var i;let t=[],r=e.replaceAll("\u201D",'"');for(let{text:n,override:o}of Yi)r.includes(n)&&(r=r.replace(n,o));if((i=Ae(r))==null?void 0:i.card)t.push(r);else{let n=r.split(/[ ]+/),o="",s=0;for(let l of n)s===2&&(t.push(o.trim().replaceAll('"',"")),o="",s=0),s<2&&l.split('"').length===2?(o+=" "+l,s++):s===0&&o===""?t.push(l):s===1&&(o+=" "+l);s===2&&(t.push(o.trim().replaceAll('"',"")),o="",s=0)}return t},Qi=[k.Hero.Briar,k.Hero.Brutus,k.Hero.Emperor,k.Hero.Prism,k.Hero.Shiyana,k.Hero.Taylor,k.Hero.Yorick],st=(e,t)=>{var g;let r=e.trim().toLowerCase();for(let{filters:f,shorthands:v}of et)for(let y of v)if(r.includes(y)){r=r.replace(y,f.join(" "));break}for(let[f,v]of Object.entries(k.setToSetIdentifierMappings))r.includes(f.toLowerCase())&&(r=r.replace(f.toLowerCase(),v[0]));let a=Ji(r),i=[];for(let f of a){let v=tt.find(({shorthands:y})=>y.includes(f));v?i.push(...v.filters):i.push(f)}let n=[],o=[],s=[],l=[],c=!1,u=[],p=[],d={isClash:!1,heroes:[]};for(let f of i)if(on(f)){let[v,y]=f.split(":"),{modifier:M,values:h,isAnd:B,isOr:m}=nn(y),{filterKey:b,excluded:x,isMeta:C}=sn(v);if(C){if(["rarity","r"].includes(b)&&(h=an(h)),["legal","l","hero"].includes(b)){for(let D of Qi)y.includes(D.toLowerCase())&&(d.heroes.includes(D)||d.heroes.push(D));y.includes("clash")&&(d.isClash=!0)}n.push(...Ze(x,b,h,M))}else{if(["chain"].includes(b)){let D=w=>w.name.toLowerCase().replaceAll(F,""),E=h.map(w=>ot(w,t)).filter(w=>!!w).map(D),L=new Set(E);b="name",m=!0;let I=20,S=0,P=w=>{if(!w.types.includes(k.Type.Hero)){let K=D(w);L.add(K),E.includes(K)||E.push(K)}};for(let w of E){if(S>I)break;let{referencedBy:K,references:U}=Te(w,t);U.forEach(P),S===0&&K.forEach(P),S++}h=Array.from(L)}else if(["referencedby","references"].includes(b)){let D=b,E=[...h].filter(L=>!!L);h=[],b="name",m=!0;for(let L of E){let{referencedBy:I,references:S}=Te(L,t);["referencedby"].includes(D)?h.push(...S.map(({name:P})=>P.toLowerCase().replaceAll(F,""))):["references"].includes(D)&&h.push(...I.map(({name:P})=>P.toLowerCase().replaceAll(F,"")))}}else if(["art","artist"].includes(b))o=h;else if(["is","is","meta"].includes(b)){let D=en(h);h=D.map(E=>E.toLowerCase().replaceAll(F,"")),D.includes(k.Meta.Expansion)&&!x&&(c=!0)}else["foiling","foil"].includes(b)?(l=tn(h),h=l.map(D=>D.toLowerCase())):["treat","treatment","var","variation"].includes(b)?(p=rn(h),h=p.map(D=>D.toLowerCase())):["set","s"].includes(b)?(u=Zi(h),h=u.map(D=>D.toLowerCase().replaceAll(F,""))):["pitch","p","color"].includes(b)&&(h=qi(h));Se[b]&&n.push({filterToPropertyMapping:Se[b],values:h,isAnd:B,isOr:m,modifier:M,excluded:x})}}else if(f){let v=(g=Ae(f))==null?void 0:g.card,y=Xe(f);v?s.push(`"${v.toLowerCase().replace(F,"")}"`):y&&y.length>0?n.push(...y):s.push(f.replace(F,""))}return{appliedFilters:n,attributes:{artists:o,foilings:l,isExpansionSlot:c,releases:u,treatments:p},keywords:s,specialConditions:d}},Zi=e=>{let t=[];for(let r of e)t.push(...Xi(r));return t},Xi=e=>{let t=[],r=Object.values(k.Release).find(a=>a.toLowerCase().replaceAll(F,"")===e);if(r&&t.push(r),t.length===0){let a=k.setIdentifierToSetMappings[e];a&&t.push(a)}if(t.length===0){let a=Object.values(k.Release).filter(i=>i.toLowerCase().includes(e));a.length>0&&t.push(...a)}return t},nt={blue:3,yellow:2,red:1,white:0},qi=e=>{let t=[];for(let r of e)nt[r]||nt[r]===0?t.push(nt[r].toString()):t.push(r);return t},Tr={exp:k.Meta.Expansion,expansion:k.Meta.Expansion,expansionSlot:k.Meta.Expansion,rainbow:k.Meta.Rainbow},en=e=>{let t=[];for(let r of e)Tr[r]&&t.push(Tr[r]);return t},Ir={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},tn=e=>{let t=[];for(let r of e)Ir[r]&&t.push(Ir[r]);return t},wr=$(W({},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}),rn=e=>{let t=[];for(let r of e)wr[r]?t.push(wr[r]):k.Treatment[r.toUpperCase()]&&t.push(k.Treatment[r.toUpperCase()]);return t},Lr={c:"common",f:"fabled",l:"legendary",m:"majestic",v:"marvel",r:"rare",s:"super rare",t:"token"},an=e=>{let t=[];for(let r of e)Lr[r]?t.push(Lr[r]):t.push(r);return t},nn=e=>{let t=[],r,a,i=Or.find(n=>e.includes(n));if(i){let[,n]=e.split(i);Pr(n)?(r=!0,t.push(...n.trim().split("+").map(o=>o.replace(F,"")))):Rr(n)?(a=!0,t.push(...n.trim().split(",").map(o=>o.replace(F,"")))):t.push(n.trim().replace(F,""))}else Pr(e)?(r=!0,t.push(...e.trim().split("+").map(n=>n.replace(F,"")))):Rr(e)?(a=!0,t.push(...e.trim().split(",").map(n=>n.replace(F,"")))):e.startsWith('"')&&e.endsWith('"')?t.push(e.trim().replaceAll('"',"").replace(F,"")):t.push(e.trim().replace(F,""));return{modifier:i,values:t,isAnd:r,isOr:a}},sn=e=>{let t=ln(e);if(t){let[,r]=e.split(t);return{excluded:!0,filterKey:r,isMeta:zr(r)}}else return{excluded:!1,filterKey:e,isMeta:zr(e)}},on=e=>e.indexOf(":")>=0,Pr=e=>e.indexOf("+")>=0,Rr=e=>e.indexOf(",")>=0,zr=e=>{var t;return!!((t=Se[e])!=null&&t.isMeta)},ln=e=>{var t;return(t=_r.find(r=>e.includes(r)))==null?void 0:t.slice(0,1)};var T=J(Q()),Nr={artists:["Hoodwill"],cardIdentifier:"fangs-a-lot-blue",classes:[T.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:[T.Hero.Kayo,T.Hero.Levia,T.Hero.Rhinar],printings:[{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000",print:"FNG000",set:T.Release.Promos},{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000_Marvel",print:`FNG000-${T.Treatment.FA}`,set:T.Release.Promos,treatment:T.Treatment.FA}],name:"Fangs A Lot",rarities:[T.Rarity.Rare],rarity:T.Rarity.Rare,sets:[T.Release.Promos],setIdentifiers:["FNG000"],specialImage:"FNG000_Marvel",subtypes:[T.Subtype.Attack],types:[T.Type.Action],typeText:"Generic Action - Attack"},Hr=[{keyword:Nr.name.toLowerCase(),card:Nr}];var ot=(e,t)=>{let r=t.find(a=>lt(a.name)===e);return r||(r=t.find(a=>lt(a.name).includes(e))),r},lt=e=>de(e.toLowerCase().trim().replace(F,"")),de=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"");var ut=class{constructor(t,r=!1){this.log=(t,...r)=>{this.debug&&console.log(t,...r)};this.search=(t,r)=>{let a,{appliedFilters:i,attributes:n,keywords:o,specialConditions:s}=st(t,this.cards),l=o.join(" "),c=r?Hr.filter(h=>h.keyword===l):[];if(c.length>0?a=c.map(({card:h})=>h):o.length?a=this.fuse.search(l).map(h=>h.item):a=[...this.cards],i.length&&(a=a.filter(h=>h&&$r(h,i,s))),o.length===0){let h="";if(n.releases.length===1)try{let B=n.releases[0];h=N.setToSetIdentifierMappings[B][0].toUpperCase()}catch(B){console.error("Error getting set identifier from search",B)}h?a.sort((B,m)=>{var C,D;let b=(C=B.setIdentifiers.find(E=>E.includes(h)))==null?void 0:C.replace(h,""),x=(D=m.setIdentifiers.find(E=>E.includes(h)))==null?void 0:D.replace(h,"");return b&&x?b.localeCompare(x):-1}):a.sort((B,m)=>B.name===m.name?`${B.pitch}`.localeCompare(`${m.pitch}`):B.name.localeCompare(m.name))}else{let h=[],B=[],m=o.map(b=>b.toLowerCase().replace(F,"")).join(" ");for(let b of a)b.name.toLowerCase().replace(F,"")===m?h.push(b):B.push(b);a=[...h,...B]}let u,{artists:p,isExpansionSlot:d,foilings:g,releases:f,treatments:v}=n;(p.length>0||d||g.length>0||f.length>0||v.length>0)&&(u=a.map(h=>{let B=h.printings.filter(m=>{let b=!!m.image,x=p.length===0||p.some(S=>m.artists.find(P=>P.replace(F,"").toLowerCase().includes(S))),C=(d||void 0)===m.isExpansionSlot,D=g.length===0||g.includes(m.foiling),E=f.length===0||f.includes(m.set),L=v.length===0||v.includes(m.treatment);return b&&x&&C&&D&&E&&L});return $(W({},h),{matchingPrintings:B})}));let M=(u==null?void 0:u.length)>0?u:a;return{appliedFilters:i,attributes:n,keywords:o,searchResults:M}};let a={getFn:(i,n)=>{let o=ct.default.config.getFn(i,n);return o&&(Array.isArray(o)?o.map(s=>de(s.replace(F,""))):de(o).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.debug=r,this.fuse=new ct.default([...t],a)}},Wr=ut,$r=(e,t,r)=>{let a=!0;for(let i of t){let{isNumber:n,isString:o,isArray:s,isBoolean:l,property:c}=i.filterToPropertyMapping;if((n&&!cn(e,i)||o&&!un(e,i)||s&&!dn(e,i)||l&&!hn(e,i))&&(a=!1),r.isClash&&["rarities","bannedFormats","legalFormats"].includes(c)){let p=[N.Rarity.SuperRare,N.Rarity.Majestic,N.Rarity.Legendary,N.Rarity.Fabled].some(y=>e.rarities.includes(y)),d=!1;for(let{cardIdentifiers:y,heroes:M}of Je)for(let h of r.heroes)M.includes(h)&&y.includes(e.cardIdentifier)&&(d=!0);let g=!!e.specializations&&e.specializations.length>0||d,f=[N.Type.Mentor,N.Type.Weapon].some(y=>e.types.includes(y)),v=Ye.includes(e.name);!a&&!v&&(g||f)&&p&&(a=!0),v&&(a=!1)}if(r.isClash&&r.heroes.includes(N.Hero.Briar)&&e.name==="Rosetta Thorn"&&(a=!0),!a)break}return a},cn=(e,t)=>{var r;if(Ie(t,e)){let{values:a,modifier:i,excluded:n,filterToPropertyMapping:{partialMatch:o}}=t,s=dt(e,t);if(s!=null&&!isNaN(s))if(s=parseInt(s),i)switch(i){case">=":let l=a==null?void 0:a.some(d=>s>=parseInt(d));return n?!l:l;case">":let c=a==null?void 0:a.some(d=>s>parseInt(d));return n?!c:c;case"<=":let u=a==null?void 0:a.some(d=>s<=parseInt(d));return n?!u:u;case"<":let p=a==null?void 0:a.some(d=>s<parseInt(d));return n?!p:p;default:return!1}else{let l=a==null?void 0:a.some(c=>s===parseInt(c));return n?!l:l}else{let l=(r=fn(e,t))==null?void 0:r.toLowerCase(),c=o?a==null?void 0:a.some(u=>l==null?void 0:l.includes(u)):a==null?void 0:a.some(u=>l===u);return n?!c:c}}else return!0},un=(e,t)=>{var r;if(Ie(t,e)){let{values:a,isAnd:i,excluded:n,filterToPropertyMapping:{partialMatch:o}}=t,s=(r=dt(e,t))==null?void 0:r.replaceAll(F,"");if(o){let l=i?a==null?void 0:a.every(c=>s==null?void 0:s.toLowerCase().includes(c)):a==null?void 0:a.some(c=>s==null?void 0:s.toLowerCase().includes(c));return n?!l:l}else{let l=i?a==null?void 0:a.every(c=>(s==null?void 0:s.toLowerCase())===c):a==null?void 0:a.some(c=>(s==null?void 0:s.toLowerCase())===c);return n?!l:l}}else return!0},dn=(e,t)=>{if(Ie(t,e)){let{values:r,isAnd:a,excluded:i,filterToPropertyMapping:{partialMatch:n}}=t,o=pn(e,t).map(s=>s==null?void 0:s.replaceAll(F,""));if(n){let s=a?r.every(c=>o==null?void 0:o.some(u=>u==null?void 0:u.toLowerCase().includes(c))):r.some(c=>o==null?void 0:o.some(u=>u==null?void 0:u.toLowerCase().includes(c))),l=o.length===0;return i?!s||l:s}else{let s=a?r.every(l=>o==null?void 0:o.some(c=>(c==null?void 0:c.toLowerCase())===l)):r.some(l=>o==null?void 0:o.some(c=>(c==null?void 0:c.toLowerCase())===l));return i?!s:s}}else return!0},hn=(e,t)=>{if(Ie(t,e)){let{excluded:r}=t,a=dt(e,t);return r?!a:a}else return!0},dt=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.property]},pn=(e,t)=>{let{filterToPropertyMapping:{nestedProperty:r,property:a}}=t,i=e[a]||[];return r?i.map(n=>n[r]).filter(n=>!!n):i},fn=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.specialProperty]},Ie=({cardTypes:e},{types:t,subtypes:r})=>!e||(e==null?void 0:e.some(a=>t.map(i=>i.toLowerCase()).includes(a.toLowerCase())||r.map(i=>i.toLowerCase()).includes(a.toLowerCase())));var oe=J(Q());var ht=J(Q()),gn={"Dawnblade, Resplendent":"Dawnblade"},jr=e=>gn[e.name]||e.name,Gr=e=>{var t;return(t=e.functionalText)==null?void 0:t.replaceAll(e.name,"")},Te=(e,t)=>{let r=t.find(a=>a.name.toLowerCase().replace(F,"")===e);return r||(r=t.find(a=>a.name.toLowerCase().replace(F,"").includes(e))),pt(r,t)},pt=(e,t)=>{var n,o;let r=[],a=[],i=[];if(e){let s=[],l=[],c=jr(e);for(let u of t){let p=jr(u),d=c===p,g=e.cardIdentifier!==u.cardIdentifier,f=e.pitch!==u.pitch;if(d&&g&&f)r.push(u);else if(!d){let v=e.name==="Seismic Surge",y=(n=u.keywords)==null?void 0:n.includes(ht.Keyword.Heave),M=v&&y,h=Gr(u),B=h==null?void 0:h.includes(c),m=Gr(e),b=u.traits||[],x=(m==null?void 0:m.includes(p))||b.some(L=>m==null?void 0:m.includes(L));(B||M)&&s.push(u);let C=u.name==="Seismic Surge",D=(o=e.keywords)==null?void 0:o.includes(ht.Keyword.Heave);(x||C&&D)&&l.push(u)}}for(let u of s)a.push(u);for(let u of l){let p=u.name;c!==p&&!l.some(d=>{let g=d.name;return g!==p&&(g==null?void 0:g.includes(p))})&&i.push(u)}}return{otherPitches:r,referencedBy:a,references:i}},mn=["cash-in-yellow"],yn={[oe.Hero.Crackni]:{traits:[oe.Trait.AgentOfChaos]},[oe.Hero.Maxx]:{tokens:["hyper-driver"]}},vn=(e,t,r)=>{var i,n;let a=new Set;for(let o of e.filter(({cardIdentifier:s})=>!mn.includes(s))){let{references:s}=pt(o,t);for(let l of s.filter(c=>{let u=c.name==="Hyper Driver",p=r===oe.Hero.Maxx;return!u||p}))a.add(l)}if(r){let o=yn[r];if(o){if(o.cards)for(let s of e)(i=o.cards)!=null&&i.includes(s.cardIdentifier)&&a.add(s);if(o.tokens)for(let s of t)(n=o.tokens)!=null&&n.includes(s.cardIdentifier)&&a.add(s)}}return Array.from(a)};0&&(module.exports={PUNCTUATION,abbreviations,availableExclusions,availableModifiers,clashBannedCards,clashLegalCards,clashSpecializationOverrides,filterCard,filtersToCardPropertyMappings,getAbbreviation,getAbbreviationByCard,getCardByName,getCleanText,getExcludedMetaFilters,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.4.
|
|
4
|
+
"version": "3.4.6",
|
|
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.4.
|
|
20
|
+
"@flesh-and-blood/cards": "^3.4.6",
|
|
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": "
|
|
50
|
+
"gitHead": "5aab017ea6006f6ccb5eb0873cd8fd651945f5f8"
|
|
51
51
|
}
|