build2.js 203 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538
  1. import { i as __require, t as __commonJSMin } from "./chunk.js";
  2. import { t as require_lib } from "./lib.js";
  3. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/fs.js
  4. var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. exports.getFileSystem = getFileSystem;
  7. exports.setFileSystem = setFileSystem;
  8. let fileSystem = {
  9. readFile: () => {
  10. throw Error("readFile not implemented");
  11. },
  12. writeFile: () => {
  13. throw Error("writeFile not implemented");
  14. }
  15. };
  16. function setFileSystem(fs) {
  17. fileSystem.readFile = fs.readFile;
  18. fileSystem.writeFile = fs.writeFile;
  19. }
  20. function getFileSystem() {
  21. return fileSystem;
  22. }
  23. }));
  24. //#endregion
  25. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/unquote.js
  26. var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
  27. Object.defineProperty(exports, "__esModule", { value: true });
  28. exports.default = unquote;
  29. const reg = /['"]/;
  30. function unquote(str$1) {
  31. if (!str$1) return "";
  32. if (reg.test(str$1.charAt(0))) str$1 = str$1.substr(1);
  33. if (reg.test(str$1.charAt(str$1.length - 1))) str$1 = str$1.substr(0, str$1.length - 1);
  34. return str$1;
  35. }
  36. }));
  37. //#endregion
  38. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/replaceValueSymbols.js
  39. var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  40. const matchValueName = /[$]?[\w-]+/g;
  41. const replaceValueSymbols$2 = (value, replacements) => {
  42. let matches;
  43. while (matches = matchValueName.exec(value)) {
  44. const replacement = replacements[matches[0]];
  45. if (replacement) {
  46. value = value.slice(0, matches.index) + replacement + value.slice(matchValueName.lastIndex);
  47. matchValueName.lastIndex -= matches[0].length - replacement.length;
  48. }
  49. }
  50. return value;
  51. };
  52. module.exports = replaceValueSymbols$2;
  53. }));
  54. //#endregion
  55. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/replaceSymbols.js
  56. var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  57. const replaceValueSymbols$1 = require_replaceValueSymbols();
  58. const replaceSymbols$1 = (css, replacements) => {
  59. css.walk((node) => {
  60. if (node.type === "decl" && node.value) node.value = replaceValueSymbols$1(node.value.toString(), replacements);
  61. else if (node.type === "rule" && node.selector) node.selector = replaceValueSymbols$1(node.selector.toString(), replacements);
  62. else if (node.type === "atrule" && node.params) node.params = replaceValueSymbols$1(node.params.toString(), replacements);
  63. });
  64. };
  65. module.exports = replaceSymbols$1;
  66. }));
  67. //#endregion
  68. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/extractICSS.js
  69. var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  70. const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;
  71. const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/;
  72. const getDeclsObject = (rule) => {
  73. const object = {};
  74. rule.walkDecls((decl) => {
  75. const before = decl.raws.before ? decl.raws.before.trim() : "";
  76. object[before + decl.prop] = decl.value;
  77. });
  78. return object;
  79. };
  80. /**
  81. *
  82. * @param {string} css
  83. * @param {boolean} removeRules
  84. * @param {'auto' | 'rule' | 'at-rule'} mode
  85. */
  86. const extractICSS$2 = (css, removeRules = true, mode = "auto") => {
  87. const icssImports = {};
  88. const icssExports = {};
  89. function addImports(node, path$2) {
  90. const unquoted = path$2.replace(/'|"/g, "");
  91. icssImports[unquoted] = Object.assign(icssImports[unquoted] || {}, getDeclsObject(node));
  92. if (removeRules) node.remove();
  93. }
  94. function addExports(node) {
  95. Object.assign(icssExports, getDeclsObject(node));
  96. if (removeRules) node.remove();
  97. }
  98. css.each((node) => {
  99. if (node.type === "rule" && mode !== "at-rule") {
  100. if (node.selector.slice(0, 7) === ":import") {
  101. const matches = importPattern.exec(node.selector);
  102. if (matches) addImports(node, matches[1]);
  103. }
  104. if (node.selector === ":export") addExports(node);
  105. }
  106. if (node.type === "atrule" && mode !== "rule") {
  107. if (node.name === "icss-import") {
  108. const matches = balancedQuotes.exec(node.params);
  109. if (matches) addImports(node, matches[1]);
  110. }
  111. if (node.name === "icss-export") addExports(node);
  112. }
  113. });
  114. return {
  115. icssImports,
  116. icssExports
  117. };
  118. };
  119. module.exports = extractICSS$2;
  120. }));
  121. //#endregion
  122. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/createICSSRules.js
  123. var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  124. const createImports = (imports, postcss, mode = "rule") => {
  125. return Object.keys(imports).map((path$2) => {
  126. const aliases = imports[path$2];
  127. const declarations = Object.keys(aliases).map((key) => postcss.decl({
  128. prop: key,
  129. value: aliases[key],
  130. raws: { before: "\n " }
  131. }));
  132. const hasDeclarations = declarations.length > 0;
  133. const rule = mode === "rule" ? postcss.rule({
  134. selector: `:import('${path$2}')`,
  135. raws: { after: hasDeclarations ? "\n" : "" }
  136. }) : postcss.atRule({
  137. name: "icss-import",
  138. params: `'${path$2}'`,
  139. raws: { after: hasDeclarations ? "\n" : "" }
  140. });
  141. if (hasDeclarations) rule.append(declarations);
  142. return rule;
  143. });
  144. };
  145. const createExports = (exports$1, postcss, mode = "rule") => {
  146. const declarations = Object.keys(exports$1).map((key) => postcss.decl({
  147. prop: key,
  148. value: exports$1[key],
  149. raws: { before: "\n " }
  150. }));
  151. if (declarations.length === 0) return [];
  152. const rule = mode === "rule" ? postcss.rule({
  153. selector: `:export`,
  154. raws: { after: "\n" }
  155. }) : postcss.atRule({
  156. name: "icss-export",
  157. raws: { after: "\n" }
  158. });
  159. rule.append(declarations);
  160. return [rule];
  161. };
  162. const createICSSRules$1 = (imports, exports$1, postcss, mode) => [...createImports(imports, postcss, mode), ...createExports(exports$1, postcss, mode)];
  163. module.exports = createICSSRules$1;
  164. }));
  165. //#endregion
  166. //#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/index.js
  167. var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  168. const replaceValueSymbols = require_replaceValueSymbols();
  169. const replaceSymbols = require_replaceSymbols();
  170. const extractICSS$1 = require_extractICSS();
  171. const createICSSRules = require_createICSSRules();
  172. module.exports = {
  173. replaceValueSymbols,
  174. replaceSymbols,
  175. extractICSS: extractICSS$1,
  176. createICSSRules
  177. };
  178. }));
  179. //#endregion
  180. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/Parser.js
  181. var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
  182. Object.defineProperty(exports, "__esModule", { value: true });
  183. exports.default = void 0;
  184. var _icssUtils = require_src$4();
  185. const importRegexp = /^:import\((.+)\)$/;
  186. var Parser$1 = class {
  187. constructor(pathFetcher, trace) {
  188. this.pathFetcher = pathFetcher;
  189. this.plugin = this.plugin.bind(this);
  190. this.exportTokens = {};
  191. this.translations = {};
  192. this.trace = trace;
  193. }
  194. plugin() {
  195. const parser$1 = this;
  196. return {
  197. postcssPlugin: "css-modules-parser",
  198. async OnceExit(css) {
  199. await Promise.all(parser$1.fetchAllImports(css));
  200. parser$1.linkImportedSymbols(css);
  201. return parser$1.extractExports(css);
  202. }
  203. };
  204. }
  205. fetchAllImports(css) {
  206. let imports = [];
  207. css.each((node) => {
  208. if (node.type == "rule" && node.selector.match(importRegexp)) imports.push(this.fetchImport(node, css.source.input.from, imports.length));
  209. });
  210. return imports;
  211. }
  212. linkImportedSymbols(css) {
  213. (0, _icssUtils.replaceSymbols)(css, this.translations);
  214. }
  215. extractExports(css) {
  216. css.each((node) => {
  217. if (node.type == "rule" && node.selector == ":export") this.handleExport(node);
  218. });
  219. }
  220. handleExport(exportNode) {
  221. exportNode.each((decl) => {
  222. if (decl.type == "decl") {
  223. Object.keys(this.translations).forEach((translation) => {
  224. decl.value = decl.value.replace(translation, this.translations[translation]);
  225. });
  226. this.exportTokens[decl.prop] = decl.value;
  227. }
  228. });
  229. exportNode.remove();
  230. }
  231. async fetchImport(importNode, relativeTo, depNr) {
  232. const file = importNode.selector.match(importRegexp)[1];
  233. const depTrace = this.trace + String.fromCharCode(depNr);
  234. const exports$1 = await this.pathFetcher(file, relativeTo, depTrace);
  235. try {
  236. importNode.each((decl) => {
  237. if (decl.type == "decl") this.translations[decl.prop] = exports$1[decl.value];
  238. });
  239. importNode.remove();
  240. } catch (err) {
  241. console.log(err);
  242. }
  243. }
  244. };
  245. exports.default = Parser$1;
  246. }));
  247. //#endregion
  248. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/saveJSON.js
  249. var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => {
  250. Object.defineProperty(exports, "__esModule", { value: true });
  251. exports.default = saveJSON;
  252. var _fs$2 = require_fs();
  253. function saveJSON(cssFile, json) {
  254. return new Promise((resolve, reject) => {
  255. const { writeFile } = (0, _fs$2.getFileSystem)();
  256. writeFile(`${cssFile}.json`, JSON.stringify(json), (e) => e ? reject(e) : resolve(json));
  257. });
  258. }
  259. }));
  260. //#endregion
  261. //#region ../../node_modules/.pnpm/lodash.camelcase@4.3.0/node_modules/lodash.camelcase/index.js
  262. var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  263. /**
  264. * lodash (Custom Build) <https://lodash.com/>
  265. * Build: `lodash modularize exports="npm" -o ./`
  266. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  267. * Released under MIT license <https://lodash.com/license>
  268. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  269. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  270. */
  271. /** Used as references for various `Number` constants. */
  272. var INFINITY = Infinity;
  273. /** `Object#toString` result references. */
  274. var symbolTag = "[object Symbol]";
  275. /** Used to match words composed of alphanumeric characters. */
  276. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  277. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  278. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  279. /** Used to compose unicode character classes. */
  280. var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23", rsComboSymbolsRange = "\\u20d0-\\u20f0", rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  281. /** Used to compose unicode capture groups. */
  282. var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
  283. /** Used to compose unicode regexes. */
  284. var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")", rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [
  285. rsNonAstral,
  286. rsRegional,
  287. rsSurrPair
  288. ].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [
  289. rsDingbat,
  290. rsRegional,
  291. rsSurrPair
  292. ].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [
  293. rsNonAstral + rsCombo + "?",
  294. rsCombo,
  295. rsRegional,
  296. rsSurrPair,
  297. rsAstral
  298. ].join("|") + ")";
  299. /** Used to match apostrophes. */
  300. var reApos = RegExp(rsApos, "g");
  301. /**
  302. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  303. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  304. */
  305. var reComboMark = RegExp(rsCombo, "g");
  306. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  307. var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
  308. /** Used to match complex or compound words. */
  309. var reUnicodeWord = RegExp([
  310. rsUpper + "?" + rsLower + "+" + rsOptLowerContr + "(?=" + [
  311. rsBreak,
  312. rsUpper,
  313. "$"
  314. ].join("|") + ")",
  315. rsUpperMisc + "+" + rsOptUpperContr + "(?=" + [
  316. rsBreak,
  317. rsUpper + rsLowerMisc,
  318. "$"
  319. ].join("|") + ")",
  320. rsUpper + "?" + rsLowerMisc + "+" + rsOptLowerContr,
  321. rsUpper + "+" + rsOptUpperContr,
  322. rsDigits,
  323. rsEmoji
  324. ].join("|"), "g");
  325. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  326. var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + "]");
  327. /** Used to detect strings that need a more robust regexp to match words. */
  328. var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
  329. /** Used to map Latin Unicode letters to basic Latin letters. */
  330. var deburredLetters = {
  331. "À": "A",
  332. "Á": "A",
  333. "Â": "A",
  334. "Ã": "A",
  335. "Ä": "A",
  336. "Å": "A",
  337. "à": "a",
  338. "á": "a",
  339. "â": "a",
  340. "ã": "a",
  341. "ä": "a",
  342. "å": "a",
  343. "Ç": "C",
  344. "ç": "c",
  345. "Ð": "D",
  346. "ð": "d",
  347. "È": "E",
  348. "É": "E",
  349. "Ê": "E",
  350. "Ë": "E",
  351. "è": "e",
  352. "é": "e",
  353. "ê": "e",
  354. "ë": "e",
  355. "Ì": "I",
  356. "Í": "I",
  357. "Î": "I",
  358. "Ï": "I",
  359. "ì": "i",
  360. "í": "i",
  361. "î": "i",
  362. "ï": "i",
  363. "Ñ": "N",
  364. "ñ": "n",
  365. "Ò": "O",
  366. "Ó": "O",
  367. "Ô": "O",
  368. "Õ": "O",
  369. "Ö": "O",
  370. "Ø": "O",
  371. "ò": "o",
  372. "ó": "o",
  373. "ô": "o",
  374. "õ": "o",
  375. "ö": "o",
  376. "ø": "o",
  377. "Ù": "U",
  378. "Ú": "U",
  379. "Û": "U",
  380. "Ü": "U",
  381. "ù": "u",
  382. "ú": "u",
  383. "û": "u",
  384. "ü": "u",
  385. "Ý": "Y",
  386. "ý": "y",
  387. "ÿ": "y",
  388. "Æ": "Ae",
  389. "æ": "ae",
  390. "Þ": "Th",
  391. "þ": "th",
  392. "ß": "ss",
  393. "Ā": "A",
  394. "Ă": "A",
  395. "Ą": "A",
  396. "ā": "a",
  397. "ă": "a",
  398. "ą": "a",
  399. "Ć": "C",
  400. "Ĉ": "C",
  401. "Ċ": "C",
  402. "Č": "C",
  403. "ć": "c",
  404. "ĉ": "c",
  405. "ċ": "c",
  406. "č": "c",
  407. "Ď": "D",
  408. "Đ": "D",
  409. "ď": "d",
  410. "đ": "d",
  411. "Ē": "E",
  412. "Ĕ": "E",
  413. "Ė": "E",
  414. "Ę": "E",
  415. "Ě": "E",
  416. "ē": "e",
  417. "ĕ": "e",
  418. "ė": "e",
  419. "ę": "e",
  420. "ě": "e",
  421. "Ĝ": "G",
  422. "Ğ": "G",
  423. "Ġ": "G",
  424. "Ģ": "G",
  425. "ĝ": "g",
  426. "ğ": "g",
  427. "ġ": "g",
  428. "ģ": "g",
  429. "Ĥ": "H",
  430. "Ħ": "H",
  431. "ĥ": "h",
  432. "ħ": "h",
  433. "Ĩ": "I",
  434. "Ī": "I",
  435. "Ĭ": "I",
  436. "Į": "I",
  437. "İ": "I",
  438. "ĩ": "i",
  439. "ī": "i",
  440. "ĭ": "i",
  441. "į": "i",
  442. "ı": "i",
  443. "Ĵ": "J",
  444. "ĵ": "j",
  445. "Ķ": "K",
  446. "ķ": "k",
  447. "ĸ": "k",
  448. "Ĺ": "L",
  449. "Ļ": "L",
  450. "Ľ": "L",
  451. "Ŀ": "L",
  452. "Ł": "L",
  453. "ĺ": "l",
  454. "ļ": "l",
  455. "ľ": "l",
  456. "ŀ": "l",
  457. "ł": "l",
  458. "Ń": "N",
  459. "Ņ": "N",
  460. "Ň": "N",
  461. "Ŋ": "N",
  462. "ń": "n",
  463. "ņ": "n",
  464. "ň": "n",
  465. "ŋ": "n",
  466. "Ō": "O",
  467. "Ŏ": "O",
  468. "Ő": "O",
  469. "ō": "o",
  470. "ŏ": "o",
  471. "ő": "o",
  472. "Ŕ": "R",
  473. "Ŗ": "R",
  474. "Ř": "R",
  475. "ŕ": "r",
  476. "ŗ": "r",
  477. "ř": "r",
  478. "Ś": "S",
  479. "Ŝ": "S",
  480. "Ş": "S",
  481. "Š": "S",
  482. "ś": "s",
  483. "ŝ": "s",
  484. "ş": "s",
  485. "š": "s",
  486. "Ţ": "T",
  487. "Ť": "T",
  488. "Ŧ": "T",
  489. "ţ": "t",
  490. "ť": "t",
  491. "ŧ": "t",
  492. "Ũ": "U",
  493. "Ū": "U",
  494. "Ŭ": "U",
  495. "Ů": "U",
  496. "Ű": "U",
  497. "Ų": "U",
  498. "ũ": "u",
  499. "ū": "u",
  500. "ŭ": "u",
  501. "ů": "u",
  502. "ű": "u",
  503. "ų": "u",
  504. "Ŵ": "W",
  505. "ŵ": "w",
  506. "Ŷ": "Y",
  507. "ŷ": "y",
  508. "Ÿ": "Y",
  509. "Ź": "Z",
  510. "Ż": "Z",
  511. "Ž": "Z",
  512. "ź": "z",
  513. "ż": "z",
  514. "ž": "z",
  515. "IJ": "IJ",
  516. "ij": "ij",
  517. "Œ": "Oe",
  518. "œ": "oe",
  519. "ʼn": "'n",
  520. "ſ": "ss"
  521. };
  522. /** Detect free variable `global` from Node.js. */
  523. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  524. /** Detect free variable `self`. */
  525. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  526. /** Used as a reference to the global object. */
  527. var root$1 = freeGlobal || freeSelf || Function("return this")();
  528. /**
  529. * A specialized version of `_.reduce` for arrays without support for
  530. * iteratee shorthands.
  531. *
  532. * @private
  533. * @param {Array} [array] The array to iterate over.
  534. * @param {Function} iteratee The function invoked per iteration.
  535. * @param {*} [accumulator] The initial value.
  536. * @param {boolean} [initAccum] Specify using the first element of `array` as
  537. * the initial value.
  538. * @returns {*} Returns the accumulated value.
  539. */
  540. function arrayReduce(array, iteratee, accumulator, initAccum) {
  541. var index = -1, length = array ? array.length : 0;
  542. if (initAccum && length) accumulator = array[++index];
  543. while (++index < length) accumulator = iteratee(accumulator, array[index], index, array);
  544. return accumulator;
  545. }
  546. /**
  547. * Converts an ASCII `string` to an array.
  548. *
  549. * @private
  550. * @param {string} string The string to convert.
  551. * @returns {Array} Returns the converted array.
  552. */
  553. function asciiToArray(string$1) {
  554. return string$1.split("");
  555. }
  556. /**
  557. * Splits an ASCII `string` into an array of its words.
  558. *
  559. * @private
  560. * @param {string} The string to inspect.
  561. * @returns {Array} Returns the words of `string`.
  562. */
  563. function asciiWords(string$1) {
  564. return string$1.match(reAsciiWord) || [];
  565. }
  566. /**
  567. * The base implementation of `_.propertyOf` without support for deep paths.
  568. *
  569. * @private
  570. * @param {Object} object The object to query.
  571. * @returns {Function} Returns the new accessor function.
  572. */
  573. function basePropertyOf(object) {
  574. return function(key) {
  575. return object == null ? void 0 : object[key];
  576. };
  577. }
  578. /**
  579. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  580. * letters to basic Latin letters.
  581. *
  582. * @private
  583. * @param {string} letter The matched letter to deburr.
  584. * @returns {string} Returns the deburred letter.
  585. */
  586. var deburrLetter = basePropertyOf(deburredLetters);
  587. /**
  588. * Checks if `string` contains Unicode symbols.
  589. *
  590. * @private
  591. * @param {string} string The string to inspect.
  592. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  593. */
  594. function hasUnicode(string$1) {
  595. return reHasUnicode.test(string$1);
  596. }
  597. /**
  598. * Checks if `string` contains a word composed of Unicode symbols.
  599. *
  600. * @private
  601. * @param {string} string The string to inspect.
  602. * @returns {boolean} Returns `true` if a word is found, else `false`.
  603. */
  604. function hasUnicodeWord(string$1) {
  605. return reHasUnicodeWord.test(string$1);
  606. }
  607. /**
  608. * Converts `string` to an array.
  609. *
  610. * @private
  611. * @param {string} string The string to convert.
  612. * @returns {Array} Returns the converted array.
  613. */
  614. function stringToArray(string$1) {
  615. return hasUnicode(string$1) ? unicodeToArray(string$1) : asciiToArray(string$1);
  616. }
  617. /**
  618. * Converts a Unicode `string` to an array.
  619. *
  620. * @private
  621. * @param {string} string The string to convert.
  622. * @returns {Array} Returns the converted array.
  623. */
  624. function unicodeToArray(string$1) {
  625. return string$1.match(reUnicode) || [];
  626. }
  627. /**
  628. * Splits a Unicode `string` into an array of its words.
  629. *
  630. * @private
  631. * @param {string} The string to inspect.
  632. * @returns {Array} Returns the words of `string`.
  633. */
  634. function unicodeWords(string$1) {
  635. return string$1.match(reUnicodeWord) || [];
  636. }
  637. /**
  638. * Used to resolve the
  639. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  640. * of values.
  641. */
  642. var objectToString = Object.prototype.toString;
  643. /** Built-in value references. */
  644. var Symbol$1 = root$1.Symbol;
  645. /** Used to convert symbols to primitives and strings. */
  646. var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
  647. /**
  648. * The base implementation of `_.slice` without an iteratee call guard.
  649. *
  650. * @private
  651. * @param {Array} array The array to slice.
  652. * @param {number} [start=0] The start position.
  653. * @param {number} [end=array.length] The end position.
  654. * @returns {Array} Returns the slice of `array`.
  655. */
  656. function baseSlice(array, start, end) {
  657. var index = -1, length = array.length;
  658. if (start < 0) start = -start > length ? 0 : length + start;
  659. end = end > length ? length : end;
  660. if (end < 0) end += length;
  661. length = start > end ? 0 : end - start >>> 0;
  662. start >>>= 0;
  663. var result = Array(length);
  664. while (++index < length) result[index] = array[index + start];
  665. return result;
  666. }
  667. /**
  668. * The base implementation of `_.toString` which doesn't convert nullish
  669. * values to empty strings.
  670. *
  671. * @private
  672. * @param {*} value The value to process.
  673. * @returns {string} Returns the string.
  674. */
  675. function baseToString(value) {
  676. if (typeof value == "string") return value;
  677. if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
  678. var result = value + "";
  679. return result == "0" && 1 / value == -INFINITY ? "-0" : result;
  680. }
  681. /**
  682. * Casts `array` to a slice if it's needed.
  683. *
  684. * @private
  685. * @param {Array} array The array to inspect.
  686. * @param {number} start The start position.
  687. * @param {number} [end=array.length] The end position.
  688. * @returns {Array} Returns the cast slice.
  689. */
  690. function castSlice(array, start, end) {
  691. var length = array.length;
  692. end = end === void 0 ? length : end;
  693. return !start && end >= length ? array : baseSlice(array, start, end);
  694. }
  695. /**
  696. * Creates a function like `_.lowerFirst`.
  697. *
  698. * @private
  699. * @param {string} methodName The name of the `String` case method to use.
  700. * @returns {Function} Returns the new case function.
  701. */
  702. function createCaseFirst(methodName) {
  703. return function(string$1) {
  704. string$1 = toString(string$1);
  705. var strSymbols = hasUnicode(string$1) ? stringToArray(string$1) : void 0;
  706. var chr = strSymbols ? strSymbols[0] : string$1.charAt(0);
  707. var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string$1.slice(1);
  708. return chr[methodName]() + trailing;
  709. };
  710. }
  711. /**
  712. * Creates a function like `_.camelCase`.
  713. *
  714. * @private
  715. * @param {Function} callback The function to combine each word.
  716. * @returns {Function} Returns the new compounder function.
  717. */
  718. function createCompounder(callback) {
  719. return function(string$1) {
  720. return arrayReduce(words(deburr(string$1).replace(reApos, "")), callback, "");
  721. };
  722. }
  723. /**
  724. * Checks if `value` is object-like. A value is object-like if it's not `null`
  725. * and has a `typeof` result of "object".
  726. *
  727. * @static
  728. * @memberOf _
  729. * @since 4.0.0
  730. * @category Lang
  731. * @param {*} value The value to check.
  732. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  733. * @example
  734. *
  735. * _.isObjectLike({});
  736. * // => true
  737. *
  738. * _.isObjectLike([1, 2, 3]);
  739. * // => true
  740. *
  741. * _.isObjectLike(_.noop);
  742. * // => false
  743. *
  744. * _.isObjectLike(null);
  745. * // => false
  746. */
  747. function isObjectLike(value) {
  748. return !!value && typeof value == "object";
  749. }
  750. /**
  751. * Checks if `value` is classified as a `Symbol` primitive or object.
  752. *
  753. * @static
  754. * @memberOf _
  755. * @since 4.0.0
  756. * @category Lang
  757. * @param {*} value The value to check.
  758. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  759. * @example
  760. *
  761. * _.isSymbol(Symbol.iterator);
  762. * // => true
  763. *
  764. * _.isSymbol('abc');
  765. * // => false
  766. */
  767. function isSymbol(value) {
  768. return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
  769. }
  770. /**
  771. * Converts `value` to a string. An empty string is returned for `null`
  772. * and `undefined` values. The sign of `-0` is preserved.
  773. *
  774. * @static
  775. * @memberOf _
  776. * @since 4.0.0
  777. * @category Lang
  778. * @param {*} value The value to process.
  779. * @returns {string} Returns the string.
  780. * @example
  781. *
  782. * _.toString(null);
  783. * // => ''
  784. *
  785. * _.toString(-0);
  786. * // => '-0'
  787. *
  788. * _.toString([1, 2, 3]);
  789. * // => '1,2,3'
  790. */
  791. function toString(value) {
  792. return value == null ? "" : baseToString(value);
  793. }
  794. /**
  795. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  796. *
  797. * @static
  798. * @memberOf _
  799. * @since 3.0.0
  800. * @category String
  801. * @param {string} [string=''] The string to convert.
  802. * @returns {string} Returns the camel cased string.
  803. * @example
  804. *
  805. * _.camelCase('Foo Bar');
  806. * // => 'fooBar'
  807. *
  808. * _.camelCase('--foo-bar--');
  809. * // => 'fooBar'
  810. *
  811. * _.camelCase('__FOO_BAR__');
  812. * // => 'fooBar'
  813. */
  814. var camelCase = createCompounder(function(result, word$1, index) {
  815. word$1 = word$1.toLowerCase();
  816. return result + (index ? capitalize(word$1) : word$1);
  817. });
  818. /**
  819. * Converts the first character of `string` to upper case and the remaining
  820. * to lower case.
  821. *
  822. * @static
  823. * @memberOf _
  824. * @since 3.0.0
  825. * @category String
  826. * @param {string} [string=''] The string to capitalize.
  827. * @returns {string} Returns the capitalized string.
  828. * @example
  829. *
  830. * _.capitalize('FRED');
  831. * // => 'Fred'
  832. */
  833. function capitalize(string$1) {
  834. return upperFirst(toString(string$1).toLowerCase());
  835. }
  836. /**
  837. * Deburrs `string` by converting
  838. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  839. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  840. * letters to basic Latin letters and removing
  841. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  842. *
  843. * @static
  844. * @memberOf _
  845. * @since 3.0.0
  846. * @category String
  847. * @param {string} [string=''] The string to deburr.
  848. * @returns {string} Returns the deburred string.
  849. * @example
  850. *
  851. * _.deburr('déjà vu');
  852. * // => 'deja vu'
  853. */
  854. function deburr(string$1) {
  855. string$1 = toString(string$1);
  856. return string$1 && string$1.replace(reLatin, deburrLetter).replace(reComboMark, "");
  857. }
  858. /**
  859. * Converts the first character of `string` to upper case.
  860. *
  861. * @static
  862. * @memberOf _
  863. * @since 4.0.0
  864. * @category String
  865. * @param {string} [string=''] The string to convert.
  866. * @returns {string} Returns the converted string.
  867. * @example
  868. *
  869. * _.upperFirst('fred');
  870. * // => 'Fred'
  871. *
  872. * _.upperFirst('FRED');
  873. * // => 'FRED'
  874. */
  875. var upperFirst = createCaseFirst("toUpperCase");
  876. /**
  877. * Splits `string` into an array of its words.
  878. *
  879. * @static
  880. * @memberOf _
  881. * @since 3.0.0
  882. * @category String
  883. * @param {string} [string=''] The string to inspect.
  884. * @param {RegExp|string} [pattern] The pattern to match words.
  885. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  886. * @returns {Array} Returns the words of `string`.
  887. * @example
  888. *
  889. * _.words('fred, barney, & pebbles');
  890. * // => ['fred', 'barney', 'pebbles']
  891. *
  892. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  893. * // => ['fred', 'barney', '&', 'pebbles']
  894. */
  895. function words(string$1, pattern, guard) {
  896. string$1 = toString(string$1);
  897. pattern = guard ? void 0 : pattern;
  898. if (pattern === void 0) return hasUnicodeWord(string$1) ? unicodeWords(string$1) : asciiWords(string$1);
  899. return string$1.match(pattern) || [];
  900. }
  901. module.exports = camelCase;
  902. }));
  903. //#endregion
  904. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/localsConvention.js
  905. var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
  906. Object.defineProperty(exports, "__esModule", { value: true });
  907. exports.makeLocalsConventionReducer = makeLocalsConventionReducer;
  908. var _lodash = _interopRequireDefault$22(require_lodash());
  909. function _interopRequireDefault$22(obj) {
  910. return obj && obj.__esModule ? obj : { default: obj };
  911. }
  912. function dashesCamelCase(string$1) {
  913. return string$1.replace(/-+(\w)/g, (_, firstLetter) => firstLetter.toUpperCase());
  914. }
  915. function makeLocalsConventionReducer(localsConvention, inputFile) {
  916. const isFunc = typeof localsConvention === "function";
  917. return (tokens$1, [className$1, value]) => {
  918. if (isFunc) {
  919. const convention = localsConvention(className$1, value, inputFile);
  920. tokens$1[convention] = value;
  921. return tokens$1;
  922. }
  923. switch (localsConvention) {
  924. case "camelCase":
  925. tokens$1[className$1] = value;
  926. tokens$1[(0, _lodash.default)(className$1)] = value;
  927. break;
  928. case "camelCaseOnly":
  929. tokens$1[(0, _lodash.default)(className$1)] = value;
  930. break;
  931. case "dashes":
  932. tokens$1[className$1] = value;
  933. tokens$1[dashesCamelCase(className$1)] = value;
  934. break;
  935. case "dashesOnly":
  936. tokens$1[dashesCamelCase(className$1)] = value;
  937. break;
  938. }
  939. return tokens$1;
  940. };
  941. }
  942. }));
  943. //#endregion
  944. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/FileSystemLoader.js
  945. var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
  946. Object.defineProperty(exports, "__esModule", { value: true });
  947. exports.default = void 0;
  948. var _postcss$1 = _interopRequireDefault$21(__require("postcss"));
  949. var _path = _interopRequireDefault$21(__require("path"));
  950. var _Parser$1 = _interopRequireDefault$21(require_Parser());
  951. var _fs$1 = require_fs();
  952. function _interopRequireDefault$21(obj) {
  953. return obj && obj.__esModule ? obj : { default: obj };
  954. }
  955. var Core = class Core {
  956. constructor(plugins) {
  957. this.plugins = plugins || Core.defaultPlugins;
  958. }
  959. async load(sourceString, sourcePath, trace, pathFetcher) {
  960. const parser$1 = new _Parser$1.default(pathFetcher, trace);
  961. const plugins = this.plugins.concat([parser$1.plugin()]);
  962. return {
  963. injectableSource: (await (0, _postcss$1.default)(plugins).process(sourceString, { from: sourcePath })).css,
  964. exportTokens: parser$1.exportTokens
  965. };
  966. }
  967. };
  968. const traceKeySorter = (a, b) => {
  969. if (a.length < b.length) return a < b.substring(0, a.length) ? -1 : 1;
  970. if (a.length > b.length) return a.substring(0, b.length) <= b ? -1 : 1;
  971. return a < b ? -1 : 1;
  972. };
  973. var FileSystemLoader = class {
  974. constructor(root$2, plugins, fileResolve) {
  975. if (root$2 === "/" && process.platform === "win32") {
  976. const cwdDrive = process.cwd().slice(0, 3);
  977. if (!/^[A-Za-z]:\\$/.test(cwdDrive)) throw new Error(`Failed to obtain root from "${process.cwd()}".`);
  978. root$2 = cwdDrive;
  979. }
  980. this.root = root$2;
  981. this.fileResolve = fileResolve;
  982. this.sources = {};
  983. this.traces = {};
  984. this.importNr = 0;
  985. this.core = new Core(plugins);
  986. this.tokensByFile = {};
  987. this.fs = (0, _fs$1.getFileSystem)();
  988. }
  989. async fetch(_newPath, relativeTo, _trace) {
  990. const newPath = _newPath.replace(/^["']|["']$/g, "");
  991. const trace = _trace || String.fromCharCode(this.importNr++);
  992. const useFileResolve = typeof this.fileResolve === "function";
  993. const fileResolvedPath = useFileResolve ? await this.fileResolve(newPath, relativeTo) : await Promise.resolve();
  994. if (fileResolvedPath && !_path.default.isAbsolute(fileResolvedPath)) throw new Error("The returned path from the \"fileResolve\" option must be absolute.");
  995. const relativeDir = _path.default.dirname(relativeTo);
  996. const rootRelativePath = fileResolvedPath || _path.default.resolve(relativeDir, newPath);
  997. let fileRelativePath = fileResolvedPath || _path.default.resolve(_path.default.resolve(this.root, relativeDir), newPath);
  998. if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) try {
  999. fileRelativePath = __require.resolve(newPath);
  1000. } catch (e) {}
  1001. const tokens$1 = this.tokensByFile[fileRelativePath];
  1002. if (tokens$1) return tokens$1;
  1003. return new Promise((resolve, reject) => {
  1004. this.fs.readFile(fileRelativePath, "utf-8", async (err, source) => {
  1005. if (err) reject(err);
  1006. const { injectableSource, exportTokens } = await this.core.load(source, rootRelativePath, trace, this.fetch.bind(this));
  1007. this.sources[fileRelativePath] = injectableSource;
  1008. this.traces[trace] = fileRelativePath;
  1009. this.tokensByFile[fileRelativePath] = exportTokens;
  1010. resolve(exportTokens);
  1011. });
  1012. });
  1013. }
  1014. get finalSource() {
  1015. const traces = this.traces;
  1016. const sources = this.sources;
  1017. let written = /* @__PURE__ */ new Set();
  1018. return Object.keys(traces).sort(traceKeySorter).map((key) => {
  1019. const filename = traces[key];
  1020. if (written.has(filename)) return null;
  1021. written.add(filename);
  1022. return sources[filename];
  1023. }).join("");
  1024. }
  1025. };
  1026. exports.default = FileSystemLoader;
  1027. }));
  1028. //#endregion
  1029. //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.6/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
  1030. var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1031. const PERMANENT_MARKER = 2;
  1032. const TEMPORARY_MARKER = 1;
  1033. function createError(node, graph) {
  1034. const er = /* @__PURE__ */ new Error("Nondeterministic import's order");
  1035. er.nodes = [node, graph[node].find((relatedNode) => graph[relatedNode].indexOf(node) > -1)];
  1036. return er;
  1037. }
  1038. function walkGraph(node, graph, state, result, strict) {
  1039. if (state[node] === PERMANENT_MARKER) return;
  1040. if (state[node] === TEMPORARY_MARKER) {
  1041. if (strict) return createError(node, graph);
  1042. return;
  1043. }
  1044. state[node] = TEMPORARY_MARKER;
  1045. const children = graph[node];
  1046. const length = children.length;
  1047. for (let i$1 = 0; i$1 < length; ++i$1) {
  1048. const error = walkGraph(children[i$1], graph, state, result, strict);
  1049. if (error instanceof Error) return error;
  1050. }
  1051. state[node] = PERMANENT_MARKER;
  1052. result.push(node);
  1053. }
  1054. function topologicalSort$1(graph, strict) {
  1055. const result = [];
  1056. const state = {};
  1057. const nodes = Object.keys(graph);
  1058. const length = nodes.length;
  1059. for (let i$1 = 0; i$1 < length; ++i$1) {
  1060. const er = walkGraph(nodes[i$1], graph, state, result, strict);
  1061. if (er instanceof Error) return er;
  1062. }
  1063. return result;
  1064. }
  1065. module.exports = topologicalSort$1;
  1066. }));
  1067. //#endregion
  1068. //#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.6/node_modules/postcss-modules-extract-imports/src/index.js
  1069. var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1070. const topologicalSort = require_topologicalSort();
  1071. const matchImports$1 = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
  1072. const icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/;
  1073. const VISITED_MARKER = 1;
  1074. /**
  1075. * :import('G') {}
  1076. *
  1077. * Rule
  1078. * composes: ... from 'A'
  1079. * composes: ... from 'B'
  1080. * Rule
  1081. * composes: ... from 'A'
  1082. * composes: ... from 'A'
  1083. * composes: ... from 'C'
  1084. *
  1085. * Results in:
  1086. *
  1087. * graph: {
  1088. * G: [],
  1089. * A: [],
  1090. * B: ['A'],
  1091. * C: ['A'],
  1092. * }
  1093. */
  1094. function addImportToGraph(importId, parentId, graph, visited) {
  1095. const siblingsId = parentId + "_siblings";
  1096. const visitedId = parentId + "_" + importId;
  1097. if (visited[visitedId] !== VISITED_MARKER) {
  1098. if (!Array.isArray(visited[siblingsId])) visited[siblingsId] = [];
  1099. const siblings = visited[siblingsId];
  1100. if (Array.isArray(graph[importId])) graph[importId] = graph[importId].concat(siblings);
  1101. else graph[importId] = siblings.slice();
  1102. visited[visitedId] = VISITED_MARKER;
  1103. siblings.push(importId);
  1104. }
  1105. }
  1106. module.exports = (options = {}) => {
  1107. let importIndex = 0;
  1108. const createImportedName = typeof options.createImportedName !== "function" ? (importName) => `i__imported_${importName.replace(/\W/g, "_")}_${importIndex++}` : options.createImportedName;
  1109. const failOnWrongOrder = options.failOnWrongOrder;
  1110. return {
  1111. postcssPlugin: "postcss-modules-extract-imports",
  1112. prepare() {
  1113. const graph = {};
  1114. const visited = {};
  1115. const existingImports = {};
  1116. const importDecls = {};
  1117. const imports = {};
  1118. return { Once(root$2, postcss) {
  1119. root$2.walkRules((rule) => {
  1120. const matches = icssImport.exec(rule.selector);
  1121. if (matches) {
  1122. const [, doubleQuotePath, singleQuotePath] = matches;
  1123. const importPath = doubleQuotePath || singleQuotePath;
  1124. addImportToGraph(importPath, "root", graph, visited);
  1125. existingImports[importPath] = rule;
  1126. }
  1127. });
  1128. root$2.walkDecls(/^composes$/, (declaration) => {
  1129. const multiple = declaration.value.split(",");
  1130. const values = [];
  1131. multiple.forEach((value) => {
  1132. const matches = value.trim().match(matchImports$1);
  1133. if (!matches) {
  1134. values.push(value);
  1135. return;
  1136. }
  1137. let tmpSymbols;
  1138. let [, symbols, doubleQuotePath, singleQuotePath, global$1] = matches;
  1139. if (global$1) tmpSymbols = symbols.split(/\s+/).map((s) => `global(${s})`);
  1140. else {
  1141. const importPath = doubleQuotePath || singleQuotePath;
  1142. let parent = declaration.parent;
  1143. let parentIndexes = "";
  1144. while (parent.type !== "root") {
  1145. parentIndexes = parent.parent.index(parent) + "_" + parentIndexes;
  1146. parent = parent.parent;
  1147. }
  1148. const { selector: selector$1 } = declaration.parent;
  1149. addImportToGraph(importPath, `_${parentIndexes}${selector$1}`, graph, visited);
  1150. importDecls[importPath] = declaration;
  1151. imports[importPath] = imports[importPath] || {};
  1152. tmpSymbols = symbols.split(/\s+/).map((s) => {
  1153. if (!imports[importPath][s]) imports[importPath][s] = createImportedName(s, importPath);
  1154. return imports[importPath][s];
  1155. });
  1156. }
  1157. values.push(tmpSymbols.join(" "));
  1158. });
  1159. declaration.value = values.join(", ");
  1160. });
  1161. const importsOrder = topologicalSort(graph, failOnWrongOrder);
  1162. if (importsOrder instanceof Error) throw importDecls[importsOrder.nodes.find((importPath) => importDecls.hasOwnProperty(importPath))].error("Failed to resolve order of composed modules " + importsOrder.nodes.map((importPath) => "`" + importPath + "`").join(", ") + ".", {
  1163. plugin: "postcss-modules-extract-imports",
  1164. word: "composes"
  1165. });
  1166. let lastImportRule;
  1167. importsOrder.forEach((path$2) => {
  1168. const importedSymbols = imports[path$2];
  1169. let rule = existingImports[path$2];
  1170. if (!rule && importedSymbols) {
  1171. rule = postcss.rule({
  1172. selector: `:import("${path$2}")`,
  1173. raws: { after: "\n" }
  1174. });
  1175. if (lastImportRule) root$2.insertAfter(lastImportRule, rule);
  1176. else root$2.prepend(rule);
  1177. }
  1178. lastImportRule = rule;
  1179. if (!importedSymbols) return;
  1180. Object.keys(importedSymbols).forEach((importedSymbol) => {
  1181. rule.append(postcss.decl({
  1182. value: importedSymbol,
  1183. prop: importedSymbols[importedSymbol],
  1184. raws: { before: "\n " }
  1185. }));
  1186. });
  1187. });
  1188. } };
  1189. }
  1190. };
  1191. };
  1192. module.exports.postcss = true;
  1193. }));
  1194. //#endregion
  1195. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/wasm-hash.js
  1196. var require_wasm_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1197. const MAX_SHORT_STRING$1 = Math.floor(65472 / 4) & -4;
  1198. var WasmHash = class {
  1199. /**
  1200. * @param {WebAssembly.Instance} instance wasm instance
  1201. * @param {WebAssembly.Instance[]} instancesPool pool of instances
  1202. * @param {number} chunkSize size of data chunks passed to wasm
  1203. * @param {number} digestSize size of digest returned by wasm
  1204. */
  1205. constructor(instance, instancesPool, chunkSize, digestSize) {
  1206. const exports$1 = instance.exports;
  1207. exports$1.init();
  1208. this.exports = exports$1;
  1209. this.mem = Buffer.from(exports$1.memory.buffer, 0, 65536);
  1210. this.buffered = 0;
  1211. this.instancesPool = instancesPool;
  1212. this.chunkSize = chunkSize;
  1213. this.digestSize = digestSize;
  1214. }
  1215. reset() {
  1216. this.buffered = 0;
  1217. this.exports.init();
  1218. }
  1219. /**
  1220. * @param {Buffer | string} data data
  1221. * @param {BufferEncoding=} encoding encoding
  1222. * @returns {this} itself
  1223. */
  1224. update(data, encoding) {
  1225. if (typeof data === "string") {
  1226. while (data.length > MAX_SHORT_STRING$1) {
  1227. this._updateWithShortString(data.slice(0, MAX_SHORT_STRING$1), encoding);
  1228. data = data.slice(MAX_SHORT_STRING$1);
  1229. }
  1230. this._updateWithShortString(data, encoding);
  1231. return this;
  1232. }
  1233. this._updateWithBuffer(data);
  1234. return this;
  1235. }
  1236. /**
  1237. * @param {string} data data
  1238. * @param {BufferEncoding=} encoding encoding
  1239. * @returns {void}
  1240. */
  1241. _updateWithShortString(data, encoding) {
  1242. const { exports: exports$1, buffered, mem, chunkSize } = this;
  1243. let endPos;
  1244. if (data.length < 70) if (!encoding || encoding === "utf-8" || encoding === "utf8") {
  1245. endPos = buffered;
  1246. for (let i$1 = 0; i$1 < data.length; i$1++) {
  1247. const cc = data.charCodeAt(i$1);
  1248. if (cc < 128) mem[endPos++] = cc;
  1249. else if (cc < 2048) {
  1250. mem[endPos] = cc >> 6 | 192;
  1251. mem[endPos + 1] = cc & 63 | 128;
  1252. endPos += 2;
  1253. } else {
  1254. endPos += mem.write(data.slice(i$1), endPos, encoding);
  1255. break;
  1256. }
  1257. }
  1258. } else if (encoding === "latin1") {
  1259. endPos = buffered;
  1260. for (let i$1 = 0; i$1 < data.length; i$1++) {
  1261. const cc = data.charCodeAt(i$1);
  1262. mem[endPos++] = cc;
  1263. }
  1264. } else endPos = buffered + mem.write(data, buffered, encoding);
  1265. else endPos = buffered + mem.write(data, buffered, encoding);
  1266. if (endPos < chunkSize) this.buffered = endPos;
  1267. else {
  1268. const l = endPos & ~(this.chunkSize - 1);
  1269. exports$1.update(l);
  1270. const newBuffered = endPos - l;
  1271. this.buffered = newBuffered;
  1272. if (newBuffered > 0) mem.copyWithin(0, l, endPos);
  1273. }
  1274. }
  1275. /**
  1276. * @param {Buffer} data data
  1277. * @returns {void}
  1278. */
  1279. _updateWithBuffer(data) {
  1280. const { exports: exports$1, buffered, mem } = this;
  1281. const length = data.length;
  1282. if (buffered + length < this.chunkSize) {
  1283. data.copy(mem, buffered, 0, length);
  1284. this.buffered += length;
  1285. } else {
  1286. const l = buffered + length & ~(this.chunkSize - 1);
  1287. if (l > 65536) {
  1288. let i$1 = 65536 - buffered;
  1289. data.copy(mem, buffered, 0, i$1);
  1290. exports$1.update(65536);
  1291. const stop = l - buffered - 65536;
  1292. while (i$1 < stop) {
  1293. data.copy(mem, 0, i$1, i$1 + 65536);
  1294. exports$1.update(65536);
  1295. i$1 += 65536;
  1296. }
  1297. data.copy(mem, 0, i$1, l - buffered);
  1298. exports$1.update(l - buffered - i$1);
  1299. } else {
  1300. data.copy(mem, buffered, 0, l - buffered);
  1301. exports$1.update(l);
  1302. }
  1303. const newBuffered = length + buffered - l;
  1304. this.buffered = newBuffered;
  1305. if (newBuffered > 0) data.copy(mem, 0, length - newBuffered, length);
  1306. }
  1307. }
  1308. digest(type) {
  1309. const { exports: exports$1, buffered, mem, digestSize } = this;
  1310. exports$1.final(buffered);
  1311. this.instancesPool.push(this);
  1312. const hex$1 = mem.toString("latin1", 0, digestSize);
  1313. if (type === "hex") return hex$1;
  1314. if (type === "binary" || !type) return Buffer.from(hex$1, "hex");
  1315. return Buffer.from(hex$1, "hex").toString(type);
  1316. }
  1317. };
  1318. const create$2 = (wasmModule, instancesPool, chunkSize, digestSize) => {
  1319. if (instancesPool.length > 0) {
  1320. const old = instancesPool.pop();
  1321. old.reset();
  1322. return old;
  1323. } else return new WasmHash(new WebAssembly.Instance(wasmModule), instancesPool, chunkSize, digestSize);
  1324. };
  1325. module.exports = create$2;
  1326. module.exports.MAX_SHORT_STRING = MAX_SHORT_STRING$1;
  1327. }));
  1328. //#endregion
  1329. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/xxhash64.js
  1330. var require_xxhash64 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1331. const create$1 = require_wasm_hash();
  1332. const xxhash64 = new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL", "base64"));
  1333. module.exports = create$1.bind(null, xxhash64, [], 32, 16);
  1334. }));
  1335. //#endregion
  1336. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BatchedHash.js
  1337. var require_BatchedHash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1338. const MAX_SHORT_STRING = require_wasm_hash().MAX_SHORT_STRING;
  1339. var BatchedHash$1 = class {
  1340. constructor(hash$1) {
  1341. this.string = void 0;
  1342. this.encoding = void 0;
  1343. this.hash = hash$1;
  1344. }
  1345. /**
  1346. * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
  1347. * @param {string|Buffer} data data
  1348. * @param {string=} inputEncoding data encoding
  1349. * @returns {this} updated hash
  1350. */
  1351. update(data, inputEncoding) {
  1352. if (this.string !== void 0) {
  1353. if (typeof data === "string" && inputEncoding === this.encoding && this.string.length + data.length < MAX_SHORT_STRING) {
  1354. this.string += data;
  1355. return this;
  1356. }
  1357. this.hash.update(this.string, this.encoding);
  1358. this.string = void 0;
  1359. }
  1360. if (typeof data === "string") if (data.length < MAX_SHORT_STRING && (!inputEncoding || !inputEncoding.startsWith("ba"))) {
  1361. this.string = data;
  1362. this.encoding = inputEncoding;
  1363. } else this.hash.update(data, inputEncoding);
  1364. else this.hash.update(data);
  1365. return this;
  1366. }
  1367. /**
  1368. * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
  1369. * @param {string=} encoding encoding of the return value
  1370. * @returns {string|Buffer} digest
  1371. */
  1372. digest(encoding) {
  1373. if (this.string !== void 0) this.hash.update(this.string, this.encoding);
  1374. return this.hash.digest(encoding);
  1375. }
  1376. };
  1377. module.exports = BatchedHash$1;
  1378. }));
  1379. //#endregion
  1380. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/md4.js
  1381. var require_md4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1382. const create = require_wasm_hash();
  1383. const md4 = new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvMCgEYfyMBIQojAiEGIwMhByMEIQgDQCAAIAVLBEAgBSgCCCINIAcgBiAFKAIEIgsgCCAHIAUoAgAiDCAKIAggBiAHIAhzcXNqakEDdyIDIAYgB3Nxc2pqQQd3IgEgAyAGc3FzampBC3chAiAFKAIUIg8gASACIAUoAhAiCSADIAEgBSgCDCIOIAYgAyACIAEgA3Nxc2pqQRN3IgQgASACc3FzampBA3ciAyACIARzcXNqakEHdyEBIAUoAiAiEiADIAEgBSgCHCIRIAQgAyAFKAIYIhAgAiAEIAEgAyAEc3FzampBC3ciAiABIANzcXNqakETdyIEIAEgAnNxc2pqQQN3IQMgBSgCLCIVIAQgAyAFKAIoIhQgAiAEIAUoAiQiEyABIAIgAyACIARzcXNqakEHdyIBIAMgBHNxc2pqQQt3IgIgASADc3FzampBE3chBCAPIBAgCSAVIBQgEyAFKAI4IhYgAiAEIAUoAjQiFyABIAIgBSgCMCIYIAMgASAEIAEgAnNxc2pqQQN3IgEgAiAEc3FzampBB3ciAiABIARzcXNqakELdyIDIAkgAiAMIAEgBSgCPCIJIAQgASADIAEgAnNxc2pqQRN3IgEgAiADcnEgAiADcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyaiASakGZ84nUBWpBCXciAyAPIAQgCyACIBggASADIAIgBHJxIAIgBHFyampBmfOJ1AVqQQ13IgEgAyAEcnEgAyAEcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3chAyAKIA4gAiADIBcgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgJqIQogBiAJIAEgESADIAIgFSAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3ciAyAEcyACc2pqQaHX5/YGakEPd2ohBiADIAdqIQcgBCAIaiEIIAVBQGshBQwBCwsgCiQBIAYkAiAHJAMgCCQECw0AIAAQASMAIABqJAAL/wQCA38BfiMAIABqrUIDhiEEIABByABqQUBxIgJBCGshAyAAIgFBAWohACABQYABOgAAA0AgACACSUEAIABBB3EbBEAgAEEAOgAAIABBAWohAAwBCwsDQCAAIAJJBEAgAEIANwMAIABBCGohAAwBCwsgAyAENwMAIAIQAUEAIwGtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=", "base64"));
  1384. module.exports = create.bind(null, md4, [], 64, 32);
  1385. }));
  1386. //#endregion
  1387. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BulkUpdateDecorator.js
  1388. var require_BulkUpdateDecorator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1389. const BULK_SIZE = 2e3;
  1390. const digestCaches = {};
  1391. var BulkUpdateDecorator$1 = class {
  1392. /**
  1393. * @param {Hash | function(): Hash} hashOrFactory function to create a hash
  1394. * @param {string=} hashKey key for caching
  1395. */
  1396. constructor(hashOrFactory, hashKey) {
  1397. this.hashKey = hashKey;
  1398. if (typeof hashOrFactory === "function") {
  1399. this.hashFactory = hashOrFactory;
  1400. this.hash = void 0;
  1401. } else {
  1402. this.hashFactory = void 0;
  1403. this.hash = hashOrFactory;
  1404. }
  1405. this.buffer = "";
  1406. }
  1407. /**
  1408. * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
  1409. * @param {string|Buffer} data data
  1410. * @param {string=} inputEncoding data encoding
  1411. * @returns {this} updated hash
  1412. */
  1413. update(data, inputEncoding) {
  1414. if (inputEncoding !== void 0 || typeof data !== "string" || data.length > BULK_SIZE) {
  1415. if (this.hash === void 0) this.hash = this.hashFactory();
  1416. if (this.buffer.length > 0) {
  1417. this.hash.update(this.buffer);
  1418. this.buffer = "";
  1419. }
  1420. this.hash.update(data, inputEncoding);
  1421. } else {
  1422. this.buffer += data;
  1423. if (this.buffer.length > BULK_SIZE) {
  1424. if (this.hash === void 0) this.hash = this.hashFactory();
  1425. this.hash.update(this.buffer);
  1426. this.buffer = "";
  1427. }
  1428. }
  1429. return this;
  1430. }
  1431. /**
  1432. * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
  1433. * @param {string=} encoding encoding of the return value
  1434. * @returns {string|Buffer} digest
  1435. */
  1436. digest(encoding) {
  1437. let digestCache;
  1438. const buffer = this.buffer;
  1439. if (this.hash === void 0) {
  1440. const cacheKey = `${this.hashKey}-${encoding}`;
  1441. digestCache = digestCaches[cacheKey];
  1442. if (digestCache === void 0) digestCache = digestCaches[cacheKey] = /* @__PURE__ */ new Map();
  1443. const cacheEntry = digestCache.get(buffer);
  1444. if (cacheEntry !== void 0) return cacheEntry;
  1445. this.hash = this.hashFactory();
  1446. }
  1447. if (buffer.length > 0) this.hash.update(buffer);
  1448. const digestResult = this.hash.digest(encoding);
  1449. if (digestCache !== void 0) digestCache.set(buffer, digestResult);
  1450. return digestResult;
  1451. }
  1452. };
  1453. module.exports = BulkUpdateDecorator$1;
  1454. }));
  1455. //#endregion
  1456. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/getHashDigest.js
  1457. var require_getHashDigest = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1458. const baseEncodeTables = {
  1459. 26: "abcdefghijklmnopqrstuvwxyz",
  1460. 32: "123456789abcdefghjkmnpqrstuvwxyz",
  1461. 36: "0123456789abcdefghijklmnopqrstuvwxyz",
  1462. 49: "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",
  1463. 52: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
  1464. 58: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",
  1465. 62: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
  1466. 64: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"
  1467. };
  1468. /**
  1469. * @param {Uint32Array} uint32Array Treated as a long base-0x100000000 number, little endian
  1470. * @param {number} divisor The divisor
  1471. * @return {number} Modulo (remainder) of the division
  1472. */
  1473. function divmod32(uint32Array, divisor) {
  1474. let carry = 0;
  1475. for (let i$1 = uint32Array.length - 1; i$1 >= 0; i$1--) {
  1476. const value = carry * 4294967296 + uint32Array[i$1];
  1477. carry = value % divisor;
  1478. uint32Array[i$1] = Math.floor(value / divisor);
  1479. }
  1480. return carry;
  1481. }
  1482. function encodeBufferToBase(buffer, base, length) {
  1483. const encodeTable = baseEncodeTables[base];
  1484. if (!encodeTable) throw new Error("Unknown encoding base" + base);
  1485. const limit = Math.ceil(buffer.length * 8 / Math.log2(base));
  1486. length = Math.min(length, limit);
  1487. const uint32Array = new Uint32Array(Math.ceil(buffer.length / 4));
  1488. buffer.copy(Buffer.from(uint32Array.buffer));
  1489. let output = "";
  1490. for (let i$1 = 0; i$1 < length; i$1++) output = encodeTable[divmod32(uint32Array, base)] + output;
  1491. return output;
  1492. }
  1493. let crypto = void 0;
  1494. let createXXHash64 = void 0;
  1495. let createMd4 = void 0;
  1496. let BatchedHash = void 0;
  1497. let BulkUpdateDecorator = void 0;
  1498. function getHashDigest$1(buffer, algorithm, digestType, maxLength) {
  1499. algorithm = algorithm || "xxhash64";
  1500. maxLength = maxLength || 9999;
  1501. let hash$1;
  1502. if (algorithm === "xxhash64") {
  1503. if (createXXHash64 === void 0) {
  1504. createXXHash64 = require_xxhash64();
  1505. if (BatchedHash === void 0) BatchedHash = require_BatchedHash();
  1506. }
  1507. hash$1 = new BatchedHash(createXXHash64());
  1508. } else if (algorithm === "md4") {
  1509. if (createMd4 === void 0) {
  1510. createMd4 = require_md4();
  1511. if (BatchedHash === void 0) BatchedHash = require_BatchedHash();
  1512. }
  1513. hash$1 = new BatchedHash(createMd4());
  1514. } else if (algorithm === "native-md4") {
  1515. if (typeof crypto === "undefined") {
  1516. crypto = __require("crypto");
  1517. if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
  1518. }
  1519. hash$1 = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4");
  1520. } else {
  1521. if (typeof crypto === "undefined") {
  1522. crypto = __require("crypto");
  1523. if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator();
  1524. }
  1525. hash$1 = new BulkUpdateDecorator(() => crypto.createHash(algorithm), algorithm);
  1526. }
  1527. hash$1.update(buffer);
  1528. if (digestType === "base26" || digestType === "base32" || digestType === "base36" || digestType === "base49" || digestType === "base52" || digestType === "base58" || digestType === "base62" || digestType === "base64safe") return encodeBufferToBase(hash$1.digest(), digestType === "base64safe" ? 64 : digestType.substr(4), maxLength);
  1529. return hash$1.digest(digestType || "hex").substr(0, maxLength);
  1530. }
  1531. module.exports = getHashDigest$1;
  1532. }));
  1533. //#endregion
  1534. //#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/interpolateName.js
  1535. var require_interpolateName = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1536. const path$1 = __require("path");
  1537. const getHashDigest = require_getHashDigest();
  1538. function interpolateName$1(loaderContext, name, options = {}) {
  1539. let filename;
  1540. const hasQuery = loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1;
  1541. if (typeof name === "function") filename = name(loaderContext.resourcePath, hasQuery ? loaderContext.resourceQuery : void 0);
  1542. else filename = name || "[hash].[ext]";
  1543. const context = options.context;
  1544. const content = options.content;
  1545. const regExp = options.regExp;
  1546. let ext = "bin";
  1547. let basename = "file";
  1548. let directory = "";
  1549. let folder = "";
  1550. let query = "";
  1551. if (loaderContext.resourcePath) {
  1552. const parsed = path$1.parse(loaderContext.resourcePath);
  1553. let resourcePath = loaderContext.resourcePath;
  1554. if (parsed.ext) ext = parsed.ext.substr(1);
  1555. if (parsed.dir) {
  1556. basename = parsed.name;
  1557. resourcePath = parsed.dir + path$1.sep;
  1558. }
  1559. if (typeof context !== "undefined") {
  1560. directory = path$1.relative(context, resourcePath + "_").replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1");
  1561. directory = directory.substr(0, directory.length - 1);
  1562. } else directory = resourcePath.replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1");
  1563. if (directory.length <= 1) directory = "";
  1564. else folder = path$1.basename(directory);
  1565. }
  1566. if (loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1) {
  1567. query = loaderContext.resourceQuery;
  1568. const hashIdx = query.indexOf("#");
  1569. if (hashIdx >= 0) query = query.substr(0, hashIdx);
  1570. }
  1571. let url = filename;
  1572. if (content) url = url.replace(/\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*(?:safe)?))?(?::(\d+))?\]/gi, (all, hashType, digestType, maxLength) => getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)));
  1573. url = url.replace(/\[ext\]/gi, () => ext).replace(/\[name\]/gi, () => basename).replace(/\[path\]/gi, () => directory).replace(/\[folder\]/gi, () => folder).replace(/\[query\]/gi, () => query);
  1574. if (regExp && loaderContext.resourcePath) {
  1575. const match = loaderContext.resourcePath.match(new RegExp(regExp));
  1576. match && match.forEach((matched, i$1) => {
  1577. url = url.replace(new RegExp("\\[" + i$1 + "\\]", "ig"), matched);
  1578. });
  1579. }
  1580. if (typeof loaderContext.options === "object" && typeof loaderContext.options.customInterpolateName === "function") url = loaderContext.options.customInterpolateName.call(loaderContext, url, name, options);
  1581. return url;
  1582. }
  1583. module.exports = interpolateName$1;
  1584. }));
  1585. //#endregion
  1586. //#region ../../node_modules/.pnpm/generic-names@4.0.0/node_modules/generic-names/index.js
  1587. var require_generic_names = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1588. var interpolateName = require_interpolateName();
  1589. var path = __require("path");
  1590. /**
  1591. * @param {string} pattern
  1592. * @param {object} options
  1593. * @param {string} options.context
  1594. * @param {string} options.hashPrefix
  1595. * @return {function}
  1596. */
  1597. module.exports = function createGenerator(pattern, options) {
  1598. options = options || {};
  1599. var context = options && typeof options.context === "string" ? options.context : process.cwd();
  1600. var hashPrefix = options && typeof options.hashPrefix === "string" ? options.hashPrefix : "";
  1601. /**
  1602. * @param {string} localName Usually a class name
  1603. * @param {string} filepath Absolute path
  1604. * @return {string}
  1605. */
  1606. return function generate(localName, filepath) {
  1607. var name = pattern.replace(/\[local\]/gi, localName);
  1608. return interpolateName({ resourcePath: filepath }, name, {
  1609. content: hashPrefix + path.relative(context, filepath).replace(/\\/g, "/") + "\0" + localName,
  1610. context
  1611. }).replace(new RegExp("[^a-zA-Z0-9\\-_\xA0-￿]", "g"), "-").replace(/^((-?[0-9])|--)/, "_$1");
  1612. };
  1613. };
  1614. }));
  1615. //#endregion
  1616. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/unesc.js
  1617. var require_unesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1618. exports.__esModule = true;
  1619. exports["default"] = unesc;
  1620. /**
  1621. *
  1622. * @param {string} str
  1623. * @returns {[string, number]|undefined}
  1624. */
  1625. function gobbleHex(str$1) {
  1626. var lower = str$1.toLowerCase();
  1627. var hex$1 = "";
  1628. var spaceTerminated = false;
  1629. for (var i$1 = 0; i$1 < 6 && lower[i$1] !== void 0; i$1++) {
  1630. var code = lower.charCodeAt(i$1);
  1631. var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
  1632. spaceTerminated = code === 32;
  1633. if (!valid) break;
  1634. hex$1 += lower[i$1];
  1635. }
  1636. if (hex$1.length === 0) return;
  1637. var codePoint = parseInt(hex$1, 16);
  1638. if (codePoint >= 55296 && codePoint <= 57343 || codePoint === 0 || codePoint > 1114111) return ["�", hex$1.length + (spaceTerminated ? 1 : 0)];
  1639. return [String.fromCodePoint(codePoint), hex$1.length + (spaceTerminated ? 1 : 0)];
  1640. }
  1641. var CONTAINS_ESCAPE = /\\/;
  1642. function unesc(str$1) {
  1643. if (!CONTAINS_ESCAPE.test(str$1)) return str$1;
  1644. var ret = "";
  1645. for (var i$1 = 0; i$1 < str$1.length; i$1++) {
  1646. if (str$1[i$1] === "\\") {
  1647. var gobbled = gobbleHex(str$1.slice(i$1 + 1, i$1 + 7));
  1648. if (gobbled !== void 0) {
  1649. ret += gobbled[0];
  1650. i$1 += gobbled[1];
  1651. continue;
  1652. }
  1653. if (str$1[i$1 + 1] === "\\") {
  1654. ret += "\\";
  1655. i$1++;
  1656. continue;
  1657. }
  1658. if (str$1.length === i$1 + 1) ret += str$1[i$1];
  1659. continue;
  1660. }
  1661. ret += str$1[i$1];
  1662. }
  1663. return ret;
  1664. }
  1665. module.exports = exports.default;
  1666. }));
  1667. //#endregion
  1668. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/getProp.js
  1669. var require_getProp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1670. exports.__esModule = true;
  1671. exports["default"] = getProp;
  1672. function getProp(obj) {
  1673. for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key];
  1674. while (props.length > 0) {
  1675. var prop = props.shift();
  1676. if (!obj[prop]) return;
  1677. obj = obj[prop];
  1678. }
  1679. return obj;
  1680. }
  1681. module.exports = exports.default;
  1682. }));
  1683. //#endregion
  1684. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/ensureObject.js
  1685. var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1686. exports.__esModule = true;
  1687. exports["default"] = ensureObject;
  1688. function ensureObject(obj) {
  1689. for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key];
  1690. while (props.length > 0) {
  1691. var prop = props.shift();
  1692. if (!obj[prop]) obj[prop] = {};
  1693. obj = obj[prop];
  1694. }
  1695. }
  1696. module.exports = exports.default;
  1697. }));
  1698. //#endregion
  1699. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/stripComments.js
  1700. var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1701. exports.__esModule = true;
  1702. exports["default"] = stripComments;
  1703. function stripComments(str$1) {
  1704. var s = "";
  1705. var commentStart = str$1.indexOf("/*");
  1706. var lastEnd = 0;
  1707. while (commentStart >= 0) {
  1708. s = s + str$1.slice(lastEnd, commentStart);
  1709. var commentEnd = str$1.indexOf("*/", commentStart + 2);
  1710. if (commentEnd < 0) return s;
  1711. lastEnd = commentEnd + 2;
  1712. commentStart = str$1.indexOf("/*", lastEnd);
  1713. }
  1714. s = s + str$1.slice(lastEnd);
  1715. return s;
  1716. }
  1717. module.exports = exports.default;
  1718. }));
  1719. //#endregion
  1720. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/index.js
  1721. var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
  1722. exports.__esModule = true;
  1723. exports.unesc = exports.stripComments = exports.getProp = exports.ensureObject = void 0;
  1724. var _unesc$1 = _interopRequireDefault$20(require_unesc());
  1725. exports.unesc = _unesc$1["default"];
  1726. var _getProp = _interopRequireDefault$20(require_getProp());
  1727. exports.getProp = _getProp["default"];
  1728. var _ensureObject = _interopRequireDefault$20(require_ensureObject());
  1729. exports.ensureObject = _ensureObject["default"];
  1730. var _stripComments = _interopRequireDefault$20(require_stripComments());
  1731. exports.stripComments = _stripComments["default"];
  1732. function _interopRequireDefault$20(obj) {
  1733. return obj && obj.__esModule ? obj : { "default": obj };
  1734. }
  1735. }));
  1736. //#endregion
  1737. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/node.js
  1738. var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1739. exports.__esModule = true;
  1740. exports["default"] = void 0;
  1741. var _util$3 = require_util();
  1742. function _defineProperties$6(target, props) {
  1743. for (var i$1 = 0; i$1 < props.length; i$1++) {
  1744. var descriptor = props[i$1];
  1745. descriptor.enumerable = descriptor.enumerable || false;
  1746. descriptor.configurable = true;
  1747. if ("value" in descriptor) descriptor.writable = true;
  1748. Object.defineProperty(target, descriptor.key, descriptor);
  1749. }
  1750. }
  1751. function _createClass$6(Constructor, protoProps, staticProps) {
  1752. if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
  1753. if (staticProps) _defineProperties$6(Constructor, staticProps);
  1754. Object.defineProperty(Constructor, "prototype", { writable: false });
  1755. return Constructor;
  1756. }
  1757. var cloneNode = function cloneNode$1(obj, parent) {
  1758. if (typeof obj !== "object" || obj === null) return obj;
  1759. var cloned = new obj.constructor();
  1760. for (var i$1 in obj) {
  1761. if (!obj.hasOwnProperty(i$1)) continue;
  1762. var value = obj[i$1];
  1763. if (i$1 === "parent" && typeof value === "object") {
  1764. if (parent) cloned[i$1] = parent;
  1765. } else if (value instanceof Array) cloned[i$1] = value.map(function(j) {
  1766. return cloneNode$1(j, cloned);
  1767. });
  1768. else cloned[i$1] = cloneNode$1(value, cloned);
  1769. }
  1770. return cloned;
  1771. };
  1772. var Node = /* @__PURE__ */ function() {
  1773. function Node$1(opts) {
  1774. if (opts === void 0) opts = {};
  1775. Object.assign(this, opts);
  1776. this.spaces = this.spaces || {};
  1777. this.spaces.before = this.spaces.before || "";
  1778. this.spaces.after = this.spaces.after || "";
  1779. }
  1780. var _proto = Node$1.prototype;
  1781. _proto.remove = function remove() {
  1782. if (this.parent) this.parent.removeChild(this);
  1783. this.parent = void 0;
  1784. return this;
  1785. };
  1786. _proto.replaceWith = function replaceWith() {
  1787. if (this.parent) {
  1788. for (var index in arguments) this.parent.insertBefore(this, arguments[index]);
  1789. this.remove();
  1790. }
  1791. return this;
  1792. };
  1793. _proto.next = function next() {
  1794. return this.parent.at(this.parent.index(this) + 1);
  1795. };
  1796. _proto.prev = function prev() {
  1797. return this.parent.at(this.parent.index(this) - 1);
  1798. };
  1799. _proto.clone = function clone(overrides) {
  1800. if (overrides === void 0) overrides = {};
  1801. var cloned = cloneNode(this);
  1802. for (var name in overrides) cloned[name] = overrides[name];
  1803. return cloned;
  1804. };
  1805. _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) {
  1806. if (!this.raws) this.raws = {};
  1807. var originalValue = this[name];
  1808. var originalEscaped = this.raws[name];
  1809. this[name] = originalValue + value;
  1810. if (originalEscaped || valueEscaped !== value) this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
  1811. else delete this.raws[name];
  1812. };
  1813. _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) {
  1814. if (!this.raws) this.raws = {};
  1815. this[name] = value;
  1816. this.raws[name] = valueEscaped;
  1817. };
  1818. _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) {
  1819. this[name] = value;
  1820. if (this.raws) delete this.raws[name];
  1821. };
  1822. _proto.isAtPosition = function isAtPosition(line, column) {
  1823. if (this.source && this.source.start && this.source.end) {
  1824. if (this.source.start.line > line) return false;
  1825. if (this.source.end.line < line) return false;
  1826. if (this.source.start.line === line && this.source.start.column > column) return false;
  1827. if (this.source.end.line === line && this.source.end.column < column) return false;
  1828. return true;
  1829. }
  1830. };
  1831. _proto.stringifyProperty = function stringifyProperty(name) {
  1832. return this.raws && this.raws[name] || this[name];
  1833. };
  1834. _proto.valueToString = function valueToString() {
  1835. return String(this.stringifyProperty("value"));
  1836. };
  1837. _proto.toString = function toString$1() {
  1838. return [
  1839. this.rawSpaceBefore,
  1840. this.valueToString(),
  1841. this.rawSpaceAfter
  1842. ].join("");
  1843. };
  1844. _createClass$6(Node$1, [{
  1845. key: "rawSpaceBefore",
  1846. get: function get() {
  1847. var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
  1848. if (rawSpace === void 0) rawSpace = this.spaces && this.spaces.before;
  1849. return rawSpace || "";
  1850. },
  1851. set: function set(raw) {
  1852. (0, _util$3.ensureObject)(this, "raws", "spaces");
  1853. this.raws.spaces.before = raw;
  1854. }
  1855. }, {
  1856. key: "rawSpaceAfter",
  1857. get: function get() {
  1858. var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
  1859. if (rawSpace === void 0) rawSpace = this.spaces.after;
  1860. return rawSpace || "";
  1861. },
  1862. set: function set(raw) {
  1863. (0, _util$3.ensureObject)(this, "raws", "spaces");
  1864. this.raws.spaces.after = raw;
  1865. }
  1866. }]);
  1867. return Node$1;
  1868. }();
  1869. exports["default"] = Node;
  1870. module.exports = exports.default;
  1871. }));
  1872. //#endregion
  1873. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/types.js
  1874. var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
  1875. exports.__esModule = true;
  1876. exports.UNIVERSAL = exports.TAG = exports.STRING = exports.SELECTOR = exports.ROOT = exports.PSEUDO = exports.NESTING = exports.ID = exports.COMMENT = exports.COMBINATOR = exports.CLASS = exports.ATTRIBUTE = void 0;
  1877. var TAG = "tag";
  1878. exports.TAG = TAG;
  1879. var STRING = "string";
  1880. exports.STRING = STRING;
  1881. var SELECTOR = "selector";
  1882. exports.SELECTOR = SELECTOR;
  1883. var ROOT = "root";
  1884. exports.ROOT = ROOT;
  1885. var PSEUDO = "pseudo";
  1886. exports.PSEUDO = PSEUDO;
  1887. var NESTING = "nesting";
  1888. exports.NESTING = NESTING;
  1889. var ID$1 = "id";
  1890. exports.ID = ID$1;
  1891. var COMMENT = "comment";
  1892. exports.COMMENT = COMMENT;
  1893. var COMBINATOR = "combinator";
  1894. exports.COMBINATOR = COMBINATOR;
  1895. var CLASS = "class";
  1896. exports.CLASS = CLASS;
  1897. var ATTRIBUTE = "attribute";
  1898. exports.ATTRIBUTE = ATTRIBUTE;
  1899. var UNIVERSAL = "universal";
  1900. exports.UNIVERSAL = UNIVERSAL;
  1901. }));
  1902. //#endregion
  1903. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/container.js
  1904. var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  1905. exports.__esModule = true;
  1906. exports["default"] = void 0;
  1907. var _node$7 = _interopRequireDefault$19(require_node$1());
  1908. var types$1 = _interopRequireWildcard$3(require_types());
  1909. function _getRequireWildcardCache$3(nodeInterop) {
  1910. if (typeof WeakMap !== "function") return null;
  1911. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  1912. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  1913. return (_getRequireWildcardCache$3 = function _getRequireWildcardCache$4(nodeInterop$1) {
  1914. return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
  1915. })(nodeInterop);
  1916. }
  1917. function _interopRequireWildcard$3(obj, nodeInterop) {
  1918. if (!nodeInterop && obj && obj.__esModule) return obj;
  1919. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  1920. var cache = _getRequireWildcardCache$3(nodeInterop);
  1921. if (cache && cache.has(obj)) return cache.get(obj);
  1922. var newObj = {};
  1923. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  1924. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  1925. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  1926. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  1927. else newObj[key] = obj[key];
  1928. }
  1929. newObj["default"] = obj;
  1930. if (cache) cache.set(obj, newObj);
  1931. return newObj;
  1932. }
  1933. function _interopRequireDefault$19(obj) {
  1934. return obj && obj.__esModule ? obj : { "default": obj };
  1935. }
  1936. function _createForOfIteratorHelperLoose(o, allowArrayLike) {
  1937. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  1938. if (it) return (it = it.call(o)).next.bind(it);
  1939. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  1940. if (it) o = it;
  1941. var i$1 = 0;
  1942. return function() {
  1943. if (i$1 >= o.length) return { done: true };
  1944. return {
  1945. done: false,
  1946. value: o[i$1++]
  1947. };
  1948. };
  1949. }
  1950. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  1951. }
  1952. function _unsupportedIterableToArray(o, minLen) {
  1953. if (!o) return;
  1954. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  1955. var n = Object.prototype.toString.call(o).slice(8, -1);
  1956. if (n === "Object" && o.constructor) n = o.constructor.name;
  1957. if (n === "Map" || n === "Set") return Array.from(o);
  1958. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  1959. }
  1960. function _arrayLikeToArray(arr, len) {
  1961. if (len == null || len > arr.length) len = arr.length;
  1962. for (var i$1 = 0, arr2 = new Array(len); i$1 < len; i$1++) arr2[i$1] = arr[i$1];
  1963. return arr2;
  1964. }
  1965. function _defineProperties$5(target, props) {
  1966. for (var i$1 = 0; i$1 < props.length; i$1++) {
  1967. var descriptor = props[i$1];
  1968. descriptor.enumerable = descriptor.enumerable || false;
  1969. descriptor.configurable = true;
  1970. if ("value" in descriptor) descriptor.writable = true;
  1971. Object.defineProperty(target, descriptor.key, descriptor);
  1972. }
  1973. }
  1974. function _createClass$5(Constructor, protoProps, staticProps) {
  1975. if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
  1976. if (staticProps) _defineProperties$5(Constructor, staticProps);
  1977. Object.defineProperty(Constructor, "prototype", { writable: false });
  1978. return Constructor;
  1979. }
  1980. function _inheritsLoose$13(subClass, superClass) {
  1981. subClass.prototype = Object.create(superClass.prototype);
  1982. subClass.prototype.constructor = subClass;
  1983. _setPrototypeOf$13(subClass, superClass);
  1984. }
  1985. function _setPrototypeOf$13(o, p) {
  1986. _setPrototypeOf$13 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  1987. o$1.__proto__ = p$1;
  1988. return o$1;
  1989. };
  1990. return _setPrototypeOf$13(o, p);
  1991. }
  1992. var Container = /* @__PURE__ */ function(_Node) {
  1993. _inheritsLoose$13(Container$1, _Node);
  1994. function Container$1(opts) {
  1995. var _this = _Node.call(this, opts) || this;
  1996. if (!_this.nodes) _this.nodes = [];
  1997. return _this;
  1998. }
  1999. var _proto = Container$1.prototype;
  2000. _proto.append = function append(selector$1) {
  2001. selector$1.parent = this;
  2002. this.nodes.push(selector$1);
  2003. return this;
  2004. };
  2005. _proto.prepend = function prepend(selector$1) {
  2006. selector$1.parent = this;
  2007. this.nodes.unshift(selector$1);
  2008. for (var id$1 in this.indexes) this.indexes[id$1]++;
  2009. return this;
  2010. };
  2011. _proto.at = function at$1(index) {
  2012. return this.nodes[index];
  2013. };
  2014. _proto.index = function index(child) {
  2015. if (typeof child === "number") return child;
  2016. return this.nodes.indexOf(child);
  2017. };
  2018. _proto.removeChild = function removeChild(child) {
  2019. child = this.index(child);
  2020. this.at(child).parent = void 0;
  2021. this.nodes.splice(child, 1);
  2022. var index;
  2023. for (var id$1 in this.indexes) {
  2024. index = this.indexes[id$1];
  2025. if (index >= child) this.indexes[id$1] = index - 1;
  2026. }
  2027. return this;
  2028. };
  2029. _proto.removeAll = function removeAll() {
  2030. for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) {
  2031. var node = _step.value;
  2032. node.parent = void 0;
  2033. }
  2034. this.nodes = [];
  2035. return this;
  2036. };
  2037. _proto.empty = function empty() {
  2038. return this.removeAll();
  2039. };
  2040. _proto.insertAfter = function insertAfter(oldNode, newNode) {
  2041. var _this$nodes;
  2042. newNode.parent = this;
  2043. var oldIndex = this.index(oldNode);
  2044. var resetNode = [];
  2045. for (var i$1 = 2; i$1 < arguments.length; i$1++) resetNode.push(arguments[i$1]);
  2046. (_this$nodes = this.nodes).splice.apply(_this$nodes, [
  2047. oldIndex + 1,
  2048. 0,
  2049. newNode
  2050. ].concat(resetNode));
  2051. newNode.parent = this;
  2052. var index;
  2053. for (var id$1 in this.indexes) {
  2054. index = this.indexes[id$1];
  2055. if (oldIndex < index) this.indexes[id$1] = index + arguments.length - 1;
  2056. }
  2057. return this;
  2058. };
  2059. _proto.insertBefore = function insertBefore(oldNode, newNode) {
  2060. var _this$nodes2;
  2061. newNode.parent = this;
  2062. var oldIndex = this.index(oldNode);
  2063. var resetNode = [];
  2064. for (var i$1 = 2; i$1 < arguments.length; i$1++) resetNode.push(arguments[i$1]);
  2065. (_this$nodes2 = this.nodes).splice.apply(_this$nodes2, [
  2066. oldIndex,
  2067. 0,
  2068. newNode
  2069. ].concat(resetNode));
  2070. newNode.parent = this;
  2071. var index;
  2072. for (var id$1 in this.indexes) {
  2073. index = this.indexes[id$1];
  2074. if (index >= oldIndex) this.indexes[id$1] = index + arguments.length - 1;
  2075. }
  2076. return this;
  2077. };
  2078. _proto._findChildAtPosition = function _findChildAtPosition(line, col) {
  2079. var found = void 0;
  2080. this.each(function(node) {
  2081. if (node.atPosition) {
  2082. var foundChild = node.atPosition(line, col);
  2083. if (foundChild) {
  2084. found = foundChild;
  2085. return false;
  2086. }
  2087. } else if (node.isAtPosition(line, col)) {
  2088. found = node;
  2089. return false;
  2090. }
  2091. });
  2092. return found;
  2093. };
  2094. _proto.atPosition = function atPosition(line, col) {
  2095. if (this.isAtPosition(line, col)) return this._findChildAtPosition(line, col) || this;
  2096. else return;
  2097. };
  2098. _proto._inferEndPosition = function _inferEndPosition() {
  2099. if (this.last && this.last.source && this.last.source.end) {
  2100. this.source = this.source || {};
  2101. this.source.end = this.source.end || {};
  2102. Object.assign(this.source.end, this.last.source.end);
  2103. }
  2104. };
  2105. _proto.each = function each(callback) {
  2106. if (!this.lastEach) this.lastEach = 0;
  2107. if (!this.indexes) this.indexes = {};
  2108. this.lastEach++;
  2109. var id$1 = this.lastEach;
  2110. this.indexes[id$1] = 0;
  2111. if (!this.length) return;
  2112. var index, result;
  2113. while (this.indexes[id$1] < this.length) {
  2114. index = this.indexes[id$1];
  2115. result = callback(this.at(index), index);
  2116. if (result === false) break;
  2117. this.indexes[id$1] += 1;
  2118. }
  2119. delete this.indexes[id$1];
  2120. if (result === false) return false;
  2121. };
  2122. _proto.walk = function walk(callback) {
  2123. return this.each(function(node, i$1) {
  2124. var result = callback(node, i$1);
  2125. if (result !== false && node.length) result = node.walk(callback);
  2126. if (result === false) return false;
  2127. });
  2128. };
  2129. _proto.walkAttributes = function walkAttributes(callback) {
  2130. var _this2 = this;
  2131. return this.walk(function(selector$1) {
  2132. if (selector$1.type === types$1.ATTRIBUTE) return callback.call(_this2, selector$1);
  2133. });
  2134. };
  2135. _proto.walkClasses = function walkClasses(callback) {
  2136. var _this3 = this;
  2137. return this.walk(function(selector$1) {
  2138. if (selector$1.type === types$1.CLASS) return callback.call(_this3, selector$1);
  2139. });
  2140. };
  2141. _proto.walkCombinators = function walkCombinators(callback) {
  2142. var _this4 = this;
  2143. return this.walk(function(selector$1) {
  2144. if (selector$1.type === types$1.COMBINATOR) return callback.call(_this4, selector$1);
  2145. });
  2146. };
  2147. _proto.walkComments = function walkComments(callback) {
  2148. var _this5 = this;
  2149. return this.walk(function(selector$1) {
  2150. if (selector$1.type === types$1.COMMENT) return callback.call(_this5, selector$1);
  2151. });
  2152. };
  2153. _proto.walkIds = function walkIds(callback) {
  2154. var _this6 = this;
  2155. return this.walk(function(selector$1) {
  2156. if (selector$1.type === types$1.ID) return callback.call(_this6, selector$1);
  2157. });
  2158. };
  2159. _proto.walkNesting = function walkNesting(callback) {
  2160. var _this7 = this;
  2161. return this.walk(function(selector$1) {
  2162. if (selector$1.type === types$1.NESTING) return callback.call(_this7, selector$1);
  2163. });
  2164. };
  2165. _proto.walkPseudos = function walkPseudos(callback) {
  2166. var _this8 = this;
  2167. return this.walk(function(selector$1) {
  2168. if (selector$1.type === types$1.PSEUDO) return callback.call(_this8, selector$1);
  2169. });
  2170. };
  2171. _proto.walkTags = function walkTags(callback) {
  2172. var _this9 = this;
  2173. return this.walk(function(selector$1) {
  2174. if (selector$1.type === types$1.TAG) return callback.call(_this9, selector$1);
  2175. });
  2176. };
  2177. _proto.walkUniversals = function walkUniversals(callback) {
  2178. var _this10 = this;
  2179. return this.walk(function(selector$1) {
  2180. if (selector$1.type === types$1.UNIVERSAL) return callback.call(_this10, selector$1);
  2181. });
  2182. };
  2183. _proto.split = function split(callback) {
  2184. var _this11 = this;
  2185. var current = [];
  2186. return this.reduce(function(memo, node, index) {
  2187. var split$1 = callback.call(_this11, node);
  2188. current.push(node);
  2189. if (split$1) {
  2190. memo.push(current);
  2191. current = [];
  2192. } else if (index === _this11.length - 1) memo.push(current);
  2193. return memo;
  2194. }, []);
  2195. };
  2196. _proto.map = function map(callback) {
  2197. return this.nodes.map(callback);
  2198. };
  2199. _proto.reduce = function reduce(callback, memo) {
  2200. return this.nodes.reduce(callback, memo);
  2201. };
  2202. _proto.every = function every(callback) {
  2203. return this.nodes.every(callback);
  2204. };
  2205. _proto.some = function some(callback) {
  2206. return this.nodes.some(callback);
  2207. };
  2208. _proto.filter = function filter(callback) {
  2209. return this.nodes.filter(callback);
  2210. };
  2211. _proto.sort = function sort(callback) {
  2212. return this.nodes.sort(callback);
  2213. };
  2214. _proto.toString = function toString$1() {
  2215. return this.map(String).join("");
  2216. };
  2217. _createClass$5(Container$1, [
  2218. {
  2219. key: "first",
  2220. get: function get() {
  2221. return this.at(0);
  2222. }
  2223. },
  2224. {
  2225. key: "last",
  2226. get: function get() {
  2227. return this.at(this.length - 1);
  2228. }
  2229. },
  2230. {
  2231. key: "length",
  2232. get: function get() {
  2233. return this.nodes.length;
  2234. }
  2235. }
  2236. ]);
  2237. return Container$1;
  2238. }(_node$7["default"]);
  2239. exports["default"] = Container;
  2240. module.exports = exports.default;
  2241. }));
  2242. //#endregion
  2243. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/root.js
  2244. var require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2245. exports.__esModule = true;
  2246. exports["default"] = void 0;
  2247. var _container$2 = _interopRequireDefault$18(require_container());
  2248. var _types$13 = require_types();
  2249. function _interopRequireDefault$18(obj) {
  2250. return obj && obj.__esModule ? obj : { "default": obj };
  2251. }
  2252. function _defineProperties$4(target, props) {
  2253. for (var i$1 = 0; i$1 < props.length; i$1++) {
  2254. var descriptor = props[i$1];
  2255. descriptor.enumerable = descriptor.enumerable || false;
  2256. descriptor.configurable = true;
  2257. if ("value" in descriptor) descriptor.writable = true;
  2258. Object.defineProperty(target, descriptor.key, descriptor);
  2259. }
  2260. }
  2261. function _createClass$4(Constructor, protoProps, staticProps) {
  2262. if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
  2263. if (staticProps) _defineProperties$4(Constructor, staticProps);
  2264. Object.defineProperty(Constructor, "prototype", { writable: false });
  2265. return Constructor;
  2266. }
  2267. function _inheritsLoose$12(subClass, superClass) {
  2268. subClass.prototype = Object.create(superClass.prototype);
  2269. subClass.prototype.constructor = subClass;
  2270. _setPrototypeOf$12(subClass, superClass);
  2271. }
  2272. function _setPrototypeOf$12(o, p) {
  2273. _setPrototypeOf$12 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2274. o$1.__proto__ = p$1;
  2275. return o$1;
  2276. };
  2277. return _setPrototypeOf$12(o, p);
  2278. }
  2279. var Root = /* @__PURE__ */ function(_Container) {
  2280. _inheritsLoose$12(Root$1, _Container);
  2281. function Root$1(opts) {
  2282. var _this = _Container.call(this, opts) || this;
  2283. _this.type = _types$13.ROOT;
  2284. return _this;
  2285. }
  2286. var _proto = Root$1.prototype;
  2287. _proto.toString = function toString$1() {
  2288. var str$1 = this.reduce(function(memo, selector$1) {
  2289. memo.push(String(selector$1));
  2290. return memo;
  2291. }, []).join(",");
  2292. return this.trailingComma ? str$1 + "," : str$1;
  2293. };
  2294. _proto.error = function error(message, options) {
  2295. if (this._error) return this._error(message, options);
  2296. else return new Error(message);
  2297. };
  2298. _createClass$4(Root$1, [{
  2299. key: "errorGenerator",
  2300. set: function set(handler) {
  2301. this._error = handler;
  2302. }
  2303. }]);
  2304. return Root$1;
  2305. }(_container$2["default"]);
  2306. exports["default"] = Root;
  2307. module.exports = exports.default;
  2308. }));
  2309. //#endregion
  2310. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/selector.js
  2311. var require_selector = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2312. exports.__esModule = true;
  2313. exports["default"] = void 0;
  2314. var _container$1 = _interopRequireDefault$17(require_container());
  2315. var _types$12 = require_types();
  2316. function _interopRequireDefault$17(obj) {
  2317. return obj && obj.__esModule ? obj : { "default": obj };
  2318. }
  2319. function _inheritsLoose$11(subClass, superClass) {
  2320. subClass.prototype = Object.create(superClass.prototype);
  2321. subClass.prototype.constructor = subClass;
  2322. _setPrototypeOf$11(subClass, superClass);
  2323. }
  2324. function _setPrototypeOf$11(o, p) {
  2325. _setPrototypeOf$11 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2326. o$1.__proto__ = p$1;
  2327. return o$1;
  2328. };
  2329. return _setPrototypeOf$11(o, p);
  2330. }
  2331. var Selector = /* @__PURE__ */ function(_Container) {
  2332. _inheritsLoose$11(Selector$1, _Container);
  2333. function Selector$1(opts) {
  2334. var _this = _Container.call(this, opts) || this;
  2335. _this.type = _types$12.SELECTOR;
  2336. return _this;
  2337. }
  2338. return Selector$1;
  2339. }(_container$1["default"]);
  2340. exports["default"] = Selector;
  2341. module.exports = exports.default;
  2342. }));
  2343. //#endregion
  2344. //#region ../../node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js
  2345. /*! https://mths.be/cssesc v3.0.0 by @mathias */
  2346. var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2347. var hasOwnProperty$1 = {}.hasOwnProperty;
  2348. var merge = function merge$1(options, defaults) {
  2349. if (!options) return defaults;
  2350. var result = {};
  2351. for (var key in defaults) result[key] = hasOwnProperty$1.call(options, key) ? options[key] : defaults[key];
  2352. return result;
  2353. };
  2354. var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
  2355. var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
  2356. var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
  2357. var cssesc = function cssesc$1(string$1, options) {
  2358. options = merge(options, cssesc$1.options);
  2359. if (options.quotes != "single" && options.quotes != "double") options.quotes = "single";
  2360. var quote = options.quotes == "double" ? "\"" : "'";
  2361. var isIdentifier$1 = options.isIdentifier;
  2362. var firstChar = string$1.charAt(0);
  2363. var output = "";
  2364. var counter = 0;
  2365. var length = string$1.length;
  2366. while (counter < length) {
  2367. var character = string$1.charAt(counter++);
  2368. var codePoint = character.charCodeAt();
  2369. var value = void 0;
  2370. if (codePoint < 32 || codePoint > 126) {
  2371. if (codePoint >= 55296 && codePoint <= 56319 && counter < length) {
  2372. var extra = string$1.charCodeAt(counter++);
  2373. if ((extra & 64512) == 56320) codePoint = ((codePoint & 1023) << 10) + (extra & 1023) + 65536;
  2374. else counter--;
  2375. }
  2376. value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2377. } else if (options.escapeEverything) if (regexAnySingleEscape.test(character)) value = "\\" + character;
  2378. else value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2379. else if (/[\t\n\f\r\x0B]/.test(character)) value = "\\" + codePoint.toString(16).toUpperCase() + " ";
  2380. else if (character == "\\" || !isIdentifier$1 && (character == "\"" && quote == character || character == "'" && quote == character) || isIdentifier$1 && regexSingleEscape.test(character)) value = "\\" + character;
  2381. else value = character;
  2382. output += value;
  2383. }
  2384. if (isIdentifier$1) {
  2385. if (/^-[-\d]/.test(output)) output = "\\-" + output.slice(1);
  2386. else if (/\d/.test(firstChar)) output = "\\3" + firstChar + " " + output.slice(1);
  2387. }
  2388. output = output.replace(regexExcessiveSpaces, function($0, $1, $2) {
  2389. if ($1 && $1.length % 2) return $0;
  2390. return ($1 || "") + $2;
  2391. });
  2392. if (!isIdentifier$1 && options.wrap) return quote + output + quote;
  2393. return output;
  2394. };
  2395. cssesc.options = {
  2396. "escapeEverything": false,
  2397. "isIdentifier": false,
  2398. "quotes": "single",
  2399. "wrap": false
  2400. };
  2401. cssesc.version = "3.0.0";
  2402. module.exports = cssesc;
  2403. }));
  2404. //#endregion
  2405. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/className.js
  2406. var require_className = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2407. exports.__esModule = true;
  2408. exports["default"] = void 0;
  2409. var _cssesc$2 = _interopRequireDefault$16(require_cssesc());
  2410. var _util$2 = require_util();
  2411. var _node$6 = _interopRequireDefault$16(require_node$1());
  2412. var _types$11 = require_types();
  2413. function _interopRequireDefault$16(obj) {
  2414. return obj && obj.__esModule ? obj : { "default": obj };
  2415. }
  2416. function _defineProperties$3(target, props) {
  2417. for (var i$1 = 0; i$1 < props.length; i$1++) {
  2418. var descriptor = props[i$1];
  2419. descriptor.enumerable = descriptor.enumerable || false;
  2420. descriptor.configurable = true;
  2421. if ("value" in descriptor) descriptor.writable = true;
  2422. Object.defineProperty(target, descriptor.key, descriptor);
  2423. }
  2424. }
  2425. function _createClass$3(Constructor, protoProps, staticProps) {
  2426. if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
  2427. if (staticProps) _defineProperties$3(Constructor, staticProps);
  2428. Object.defineProperty(Constructor, "prototype", { writable: false });
  2429. return Constructor;
  2430. }
  2431. function _inheritsLoose$10(subClass, superClass) {
  2432. subClass.prototype = Object.create(superClass.prototype);
  2433. subClass.prototype.constructor = subClass;
  2434. _setPrototypeOf$10(subClass, superClass);
  2435. }
  2436. function _setPrototypeOf$10(o, p) {
  2437. _setPrototypeOf$10 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2438. o$1.__proto__ = p$1;
  2439. return o$1;
  2440. };
  2441. return _setPrototypeOf$10(o, p);
  2442. }
  2443. var ClassName = /* @__PURE__ */ function(_Node) {
  2444. _inheritsLoose$10(ClassName$1, _Node);
  2445. function ClassName$1(opts) {
  2446. var _this = _Node.call(this, opts) || this;
  2447. _this.type = _types$11.CLASS;
  2448. _this._constructed = true;
  2449. return _this;
  2450. }
  2451. var _proto = ClassName$1.prototype;
  2452. _proto.valueToString = function valueToString() {
  2453. return "." + _Node.prototype.valueToString.call(this);
  2454. };
  2455. _createClass$3(ClassName$1, [{
  2456. key: "value",
  2457. get: function get() {
  2458. return this._value;
  2459. },
  2460. set: function set(v) {
  2461. if (this._constructed) {
  2462. var escaped = (0, _cssesc$2["default"])(v, { isIdentifier: true });
  2463. if (escaped !== v) {
  2464. (0, _util$2.ensureObject)(this, "raws");
  2465. this.raws.value = escaped;
  2466. } else if (this.raws) delete this.raws.value;
  2467. }
  2468. this._value = v;
  2469. }
  2470. }]);
  2471. return ClassName$1;
  2472. }(_node$6["default"]);
  2473. exports["default"] = ClassName;
  2474. module.exports = exports.default;
  2475. }));
  2476. //#endregion
  2477. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/comment.js
  2478. var require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2479. exports.__esModule = true;
  2480. exports["default"] = void 0;
  2481. var _node$5 = _interopRequireDefault$15(require_node$1());
  2482. var _types$10 = require_types();
  2483. function _interopRequireDefault$15(obj) {
  2484. return obj && obj.__esModule ? obj : { "default": obj };
  2485. }
  2486. function _inheritsLoose$9(subClass, superClass) {
  2487. subClass.prototype = Object.create(superClass.prototype);
  2488. subClass.prototype.constructor = subClass;
  2489. _setPrototypeOf$9(subClass, superClass);
  2490. }
  2491. function _setPrototypeOf$9(o, p) {
  2492. _setPrototypeOf$9 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2493. o$1.__proto__ = p$1;
  2494. return o$1;
  2495. };
  2496. return _setPrototypeOf$9(o, p);
  2497. }
  2498. var Comment = /* @__PURE__ */ function(_Node) {
  2499. _inheritsLoose$9(Comment$1, _Node);
  2500. function Comment$1(opts) {
  2501. var _this = _Node.call(this, opts) || this;
  2502. _this.type = _types$10.COMMENT;
  2503. return _this;
  2504. }
  2505. return Comment$1;
  2506. }(_node$5["default"]);
  2507. exports["default"] = Comment;
  2508. module.exports = exports.default;
  2509. }));
  2510. //#endregion
  2511. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/id.js
  2512. var require_id = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2513. exports.__esModule = true;
  2514. exports["default"] = void 0;
  2515. var _node$4 = _interopRequireDefault$14(require_node$1());
  2516. var _types$9 = require_types();
  2517. function _interopRequireDefault$14(obj) {
  2518. return obj && obj.__esModule ? obj : { "default": obj };
  2519. }
  2520. function _inheritsLoose$8(subClass, superClass) {
  2521. subClass.prototype = Object.create(superClass.prototype);
  2522. subClass.prototype.constructor = subClass;
  2523. _setPrototypeOf$8(subClass, superClass);
  2524. }
  2525. function _setPrototypeOf$8(o, p) {
  2526. _setPrototypeOf$8 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2527. o$1.__proto__ = p$1;
  2528. return o$1;
  2529. };
  2530. return _setPrototypeOf$8(o, p);
  2531. }
  2532. var ID = /* @__PURE__ */ function(_Node) {
  2533. _inheritsLoose$8(ID$2, _Node);
  2534. function ID$2(opts) {
  2535. var _this = _Node.call(this, opts) || this;
  2536. _this.type = _types$9.ID;
  2537. return _this;
  2538. }
  2539. var _proto = ID$2.prototype;
  2540. _proto.valueToString = function valueToString() {
  2541. return "#" + _Node.prototype.valueToString.call(this);
  2542. };
  2543. return ID$2;
  2544. }(_node$4["default"]);
  2545. exports["default"] = ID;
  2546. module.exports = exports.default;
  2547. }));
  2548. //#endregion
  2549. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/namespace.js
  2550. var require_namespace = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2551. exports.__esModule = true;
  2552. exports["default"] = void 0;
  2553. var _cssesc$1 = _interopRequireDefault$13(require_cssesc());
  2554. var _util$1 = require_util();
  2555. var _node$3 = _interopRequireDefault$13(require_node$1());
  2556. function _interopRequireDefault$13(obj) {
  2557. return obj && obj.__esModule ? obj : { "default": obj };
  2558. }
  2559. function _defineProperties$2(target, props) {
  2560. for (var i$1 = 0; i$1 < props.length; i$1++) {
  2561. var descriptor = props[i$1];
  2562. descriptor.enumerable = descriptor.enumerable || false;
  2563. descriptor.configurable = true;
  2564. if ("value" in descriptor) descriptor.writable = true;
  2565. Object.defineProperty(target, descriptor.key, descriptor);
  2566. }
  2567. }
  2568. function _createClass$2(Constructor, protoProps, staticProps) {
  2569. if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
  2570. if (staticProps) _defineProperties$2(Constructor, staticProps);
  2571. Object.defineProperty(Constructor, "prototype", { writable: false });
  2572. return Constructor;
  2573. }
  2574. function _inheritsLoose$7(subClass, superClass) {
  2575. subClass.prototype = Object.create(superClass.prototype);
  2576. subClass.prototype.constructor = subClass;
  2577. _setPrototypeOf$7(subClass, superClass);
  2578. }
  2579. function _setPrototypeOf$7(o, p) {
  2580. _setPrototypeOf$7 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2581. o$1.__proto__ = p$1;
  2582. return o$1;
  2583. };
  2584. return _setPrototypeOf$7(o, p);
  2585. }
  2586. var Namespace = /* @__PURE__ */ function(_Node) {
  2587. _inheritsLoose$7(Namespace$1, _Node);
  2588. function Namespace$1() {
  2589. return _Node.apply(this, arguments) || this;
  2590. }
  2591. var _proto = Namespace$1.prototype;
  2592. _proto.qualifiedName = function qualifiedName(value) {
  2593. if (this.namespace) return this.namespaceString + "|" + value;
  2594. else return value;
  2595. };
  2596. _proto.valueToString = function valueToString() {
  2597. return this.qualifiedName(_Node.prototype.valueToString.call(this));
  2598. };
  2599. _createClass$2(Namespace$1, [
  2600. {
  2601. key: "namespace",
  2602. get: function get() {
  2603. return this._namespace;
  2604. },
  2605. set: function set(namespace) {
  2606. if (namespace === true || namespace === "*" || namespace === "&") {
  2607. this._namespace = namespace;
  2608. if (this.raws) delete this.raws.namespace;
  2609. return;
  2610. }
  2611. var escaped = (0, _cssesc$1["default"])(namespace, { isIdentifier: true });
  2612. this._namespace = namespace;
  2613. if (escaped !== namespace) {
  2614. (0, _util$1.ensureObject)(this, "raws");
  2615. this.raws.namespace = escaped;
  2616. } else if (this.raws) delete this.raws.namespace;
  2617. }
  2618. },
  2619. {
  2620. key: "ns",
  2621. get: function get() {
  2622. return this._namespace;
  2623. },
  2624. set: function set(namespace) {
  2625. this.namespace = namespace;
  2626. }
  2627. },
  2628. {
  2629. key: "namespaceString",
  2630. get: function get() {
  2631. if (this.namespace) {
  2632. var ns = this.stringifyProperty("namespace");
  2633. if (ns === true) return "";
  2634. else return ns;
  2635. } else return "";
  2636. }
  2637. }
  2638. ]);
  2639. return Namespace$1;
  2640. }(_node$3["default"]);
  2641. exports["default"] = Namespace;
  2642. module.exports = exports.default;
  2643. }));
  2644. //#endregion
  2645. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/tag.js
  2646. var require_tag = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2647. exports.__esModule = true;
  2648. exports["default"] = void 0;
  2649. var _namespace$2 = _interopRequireDefault$12(require_namespace());
  2650. var _types$8 = require_types();
  2651. function _interopRequireDefault$12(obj) {
  2652. return obj && obj.__esModule ? obj : { "default": obj };
  2653. }
  2654. function _inheritsLoose$6(subClass, superClass) {
  2655. subClass.prototype = Object.create(superClass.prototype);
  2656. subClass.prototype.constructor = subClass;
  2657. _setPrototypeOf$6(subClass, superClass);
  2658. }
  2659. function _setPrototypeOf$6(o, p) {
  2660. _setPrototypeOf$6 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2661. o$1.__proto__ = p$1;
  2662. return o$1;
  2663. };
  2664. return _setPrototypeOf$6(o, p);
  2665. }
  2666. var Tag = /* @__PURE__ */ function(_Namespace) {
  2667. _inheritsLoose$6(Tag$1, _Namespace);
  2668. function Tag$1(opts) {
  2669. var _this = _Namespace.call(this, opts) || this;
  2670. _this.type = _types$8.TAG;
  2671. return _this;
  2672. }
  2673. return Tag$1;
  2674. }(_namespace$2["default"]);
  2675. exports["default"] = Tag;
  2676. module.exports = exports.default;
  2677. }));
  2678. //#endregion
  2679. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/string.js
  2680. var require_string = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2681. exports.__esModule = true;
  2682. exports["default"] = void 0;
  2683. var _node$2 = _interopRequireDefault$11(require_node$1());
  2684. var _types$7 = require_types();
  2685. function _interopRequireDefault$11(obj) {
  2686. return obj && obj.__esModule ? obj : { "default": obj };
  2687. }
  2688. function _inheritsLoose$5(subClass, superClass) {
  2689. subClass.prototype = Object.create(superClass.prototype);
  2690. subClass.prototype.constructor = subClass;
  2691. _setPrototypeOf$5(subClass, superClass);
  2692. }
  2693. function _setPrototypeOf$5(o, p) {
  2694. _setPrototypeOf$5 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2695. o$1.__proto__ = p$1;
  2696. return o$1;
  2697. };
  2698. return _setPrototypeOf$5(o, p);
  2699. }
  2700. var String$1 = /* @__PURE__ */ function(_Node) {
  2701. _inheritsLoose$5(String$2, _Node);
  2702. function String$2(opts) {
  2703. var _this = _Node.call(this, opts) || this;
  2704. _this.type = _types$7.STRING;
  2705. return _this;
  2706. }
  2707. return String$2;
  2708. }(_node$2["default"]);
  2709. exports["default"] = String$1;
  2710. module.exports = exports.default;
  2711. }));
  2712. //#endregion
  2713. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
  2714. var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2715. exports.__esModule = true;
  2716. exports["default"] = void 0;
  2717. var _container = _interopRequireDefault$10(require_container());
  2718. var _types$6 = require_types();
  2719. function _interopRequireDefault$10(obj) {
  2720. return obj && obj.__esModule ? obj : { "default": obj };
  2721. }
  2722. function _inheritsLoose$4(subClass, superClass) {
  2723. subClass.prototype = Object.create(superClass.prototype);
  2724. subClass.prototype.constructor = subClass;
  2725. _setPrototypeOf$4(subClass, superClass);
  2726. }
  2727. function _setPrototypeOf$4(o, p) {
  2728. _setPrototypeOf$4 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2729. o$1.__proto__ = p$1;
  2730. return o$1;
  2731. };
  2732. return _setPrototypeOf$4(o, p);
  2733. }
  2734. var Pseudo = /* @__PURE__ */ function(_Container) {
  2735. _inheritsLoose$4(Pseudo$1, _Container);
  2736. function Pseudo$1(opts) {
  2737. var _this = _Container.call(this, opts) || this;
  2738. _this.type = _types$6.PSEUDO;
  2739. return _this;
  2740. }
  2741. var _proto = Pseudo$1.prototype;
  2742. _proto.toString = function toString$1() {
  2743. var params = this.length ? "(" + this.map(String).join(",") + ")" : "";
  2744. return [
  2745. this.rawSpaceBefore,
  2746. this.stringifyProperty("value"),
  2747. params,
  2748. this.rawSpaceAfter
  2749. ].join("");
  2750. };
  2751. return Pseudo$1;
  2752. }(_container["default"]);
  2753. exports["default"] = Pseudo;
  2754. module.exports = exports.default;
  2755. }));
  2756. //#endregion
  2757. //#region ../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js
  2758. var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  2759. /**
  2760. * For Node.js, simply re-export the core `util.deprecate` function.
  2761. */
  2762. module.exports = __require("util").deprecate;
  2763. }));
  2764. //#endregion
  2765. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/attribute.js
  2766. var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
  2767. exports.__esModule = true;
  2768. exports["default"] = void 0;
  2769. exports.unescapeValue = unescapeValue;
  2770. var _cssesc = _interopRequireDefault$9(require_cssesc());
  2771. var _unesc = _interopRequireDefault$9(require_unesc());
  2772. var _namespace$1 = _interopRequireDefault$9(require_namespace());
  2773. var _types$5 = require_types();
  2774. var _CSSESC_QUOTE_OPTIONS;
  2775. function _interopRequireDefault$9(obj) {
  2776. return obj && obj.__esModule ? obj : { "default": obj };
  2777. }
  2778. function _defineProperties$1(target, props) {
  2779. for (var i$1 = 0; i$1 < props.length; i$1++) {
  2780. var descriptor = props[i$1];
  2781. descriptor.enumerable = descriptor.enumerable || false;
  2782. descriptor.configurable = true;
  2783. if ("value" in descriptor) descriptor.writable = true;
  2784. Object.defineProperty(target, descriptor.key, descriptor);
  2785. }
  2786. }
  2787. function _createClass$1(Constructor, protoProps, staticProps) {
  2788. if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
  2789. if (staticProps) _defineProperties$1(Constructor, staticProps);
  2790. Object.defineProperty(Constructor, "prototype", { writable: false });
  2791. return Constructor;
  2792. }
  2793. function _inheritsLoose$3(subClass, superClass) {
  2794. subClass.prototype = Object.create(superClass.prototype);
  2795. subClass.prototype.constructor = subClass;
  2796. _setPrototypeOf$3(subClass, superClass);
  2797. }
  2798. function _setPrototypeOf$3(o, p) {
  2799. _setPrototypeOf$3 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  2800. o$1.__proto__ = p$1;
  2801. return o$1;
  2802. };
  2803. return _setPrototypeOf$3(o, p);
  2804. }
  2805. var deprecate = require_node();
  2806. var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
  2807. var warnOfDeprecatedValueAssignment = deprecate(function() {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead.");
  2808. var warnOfDeprecatedQuotedAssignment = deprecate(function() {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.");
  2809. var warnOfDeprecatedConstructor = deprecate(function() {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");
  2810. function unescapeValue(value) {
  2811. var deprecatedUsage = false;
  2812. var quoteMark = null;
  2813. var unescaped = value;
  2814. var m = unescaped.match(WRAPPED_IN_QUOTES);
  2815. if (m) {
  2816. quoteMark = m[1];
  2817. unescaped = m[2];
  2818. }
  2819. unescaped = (0, _unesc["default"])(unescaped);
  2820. if (unescaped !== value) deprecatedUsage = true;
  2821. return {
  2822. deprecatedUsage,
  2823. unescaped,
  2824. quoteMark
  2825. };
  2826. }
  2827. function handleDeprecatedContructorOpts(opts) {
  2828. if (opts.quoteMark !== void 0) return opts;
  2829. if (opts.value === void 0) return opts;
  2830. warnOfDeprecatedConstructor();
  2831. var _unescapeValue = unescapeValue(opts.value), quoteMark = _unescapeValue.quoteMark, unescaped = _unescapeValue.unescaped;
  2832. if (!opts.raws) opts.raws = {};
  2833. if (opts.raws.value === void 0) opts.raws.value = opts.value;
  2834. opts.value = unescaped;
  2835. opts.quoteMark = quoteMark;
  2836. return opts;
  2837. }
  2838. var Attribute = /* @__PURE__ */ function(_Namespace) {
  2839. _inheritsLoose$3(Attribute$1, _Namespace);
  2840. function Attribute$1(opts) {
  2841. var _this;
  2842. if (opts === void 0) opts = {};
  2843. _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this;
  2844. _this.type = _types$5.ATTRIBUTE;
  2845. _this.raws = _this.raws || {};
  2846. Object.defineProperty(_this.raws, "unquoted", {
  2847. get: deprecate(function() {
  2848. return _this.value;
  2849. }, "attr.raws.unquoted is deprecated. Call attr.value instead."),
  2850. set: deprecate(function() {
  2851. return _this.value;
  2852. }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")
  2853. });
  2854. _this._constructed = true;
  2855. return _this;
  2856. }
  2857. /**
  2858. * Returns the Attribute's value quoted such that it would be legal to use
  2859. * in the value of a css file. The original value's quotation setting
  2860. * used for stringification is left unchanged. See `setValue(value, options)`
  2861. * if you want to control the quote settings of a new value for the attribute.
  2862. *
  2863. * You can also change the quotation used for the current value by setting quoteMark.
  2864. *
  2865. * Options:
  2866. * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this
  2867. * option is not set, the original value for quoteMark will be used. If
  2868. * indeterminate, a double quote is used. The legal values are:
  2869. * * `null` - the value will be unquoted and characters will be escaped as necessary.
  2870. * * `'` - the value will be quoted with a single quote and single quotes are escaped.
  2871. * * `"` - the value will be quoted with a double quote and double quotes are escaped.
  2872. * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark
  2873. * over the quoteMark option value.
  2874. * * smart {boolean} - if true, will select a quote mark based on the value
  2875. * and the other options specified here. See the `smartQuoteMark()`
  2876. * method.
  2877. **/
  2878. var _proto = Attribute$1.prototype;
  2879. _proto.getQuotedValue = function getQuotedValue(options) {
  2880. if (options === void 0) options = {};
  2881. var cssescopts = CSSESC_QUOTE_OPTIONS[this._determineQuoteMark(options)];
  2882. return (0, _cssesc["default"])(this._value, cssescopts);
  2883. };
  2884. _proto._determineQuoteMark = function _determineQuoteMark(options) {
  2885. return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
  2886. };
  2887. _proto.setValue = function setValue(value, options) {
  2888. if (options === void 0) options = {};
  2889. this._value = value;
  2890. this._quoteMark = this._determineQuoteMark(options);
  2891. this._syncRawValue();
  2892. };
  2893. _proto.smartQuoteMark = function smartQuoteMark(options) {
  2894. var v = this.value;
  2895. var numSingleQuotes = v.replace(/[^']/g, "").length;
  2896. var numDoubleQuotes = v.replace(/[^"]/g, "").length;
  2897. if (numSingleQuotes + numDoubleQuotes === 0) {
  2898. var escaped = (0, _cssesc["default"])(v, { isIdentifier: true });
  2899. if (escaped === v) return Attribute$1.NO_QUOTE;
  2900. else {
  2901. var pref = this.preferredQuoteMark(options);
  2902. if (pref === Attribute$1.NO_QUOTE) {
  2903. var quote = this.quoteMark || options.quoteMark || Attribute$1.DOUBLE_QUOTE;
  2904. var opts = CSSESC_QUOTE_OPTIONS[quote];
  2905. if ((0, _cssesc["default"])(v, opts).length < escaped.length) return quote;
  2906. }
  2907. return pref;
  2908. }
  2909. } else if (numDoubleQuotes === numSingleQuotes) return this.preferredQuoteMark(options);
  2910. else if (numDoubleQuotes < numSingleQuotes) return Attribute$1.DOUBLE_QUOTE;
  2911. else return Attribute$1.SINGLE_QUOTE;
  2912. };
  2913. _proto.preferredQuoteMark = function preferredQuoteMark(options) {
  2914. var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
  2915. if (quoteMark === void 0) quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
  2916. if (quoteMark === void 0) quoteMark = Attribute$1.DOUBLE_QUOTE;
  2917. return quoteMark;
  2918. };
  2919. _proto._syncRawValue = function _syncRawValue() {
  2920. var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
  2921. if (rawValue === this._value) {
  2922. if (this.raws) delete this.raws.value;
  2923. } else this.raws.value = rawValue;
  2924. };
  2925. _proto._handleEscapes = function _handleEscapes(prop, value) {
  2926. if (this._constructed) {
  2927. var escaped = (0, _cssesc["default"])(value, { isIdentifier: true });
  2928. if (escaped !== value) this.raws[prop] = escaped;
  2929. else delete this.raws[prop];
  2930. }
  2931. };
  2932. _proto._spacesFor = function _spacesFor(name) {
  2933. var attrSpaces = {
  2934. before: "",
  2935. after: ""
  2936. };
  2937. var spaces = this.spaces[name] || {};
  2938. var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};
  2939. return Object.assign(attrSpaces, spaces, rawSpaces);
  2940. };
  2941. _proto._stringFor = function _stringFor(name, spaceName, concat) {
  2942. if (spaceName === void 0) spaceName = name;
  2943. if (concat === void 0) concat = defaultAttrConcat;
  2944. var attrSpaces = this._spacesFor(spaceName);
  2945. return concat(this.stringifyProperty(name), attrSpaces);
  2946. };
  2947. _proto.offsetOf = function offsetOf(name) {
  2948. var count = 1;
  2949. var attributeSpaces = this._spacesFor("attribute");
  2950. count += attributeSpaces.before.length;
  2951. if (name === "namespace" || name === "ns") return this.namespace ? count : -1;
  2952. if (name === "attributeNS") return count;
  2953. count += this.namespaceString.length;
  2954. if (this.namespace) count += 1;
  2955. if (name === "attribute") return count;
  2956. count += this.stringifyProperty("attribute").length;
  2957. count += attributeSpaces.after.length;
  2958. var operatorSpaces = this._spacesFor("operator");
  2959. count += operatorSpaces.before.length;
  2960. var operator = this.stringifyProperty("operator");
  2961. if (name === "operator") return operator ? count : -1;
  2962. count += operator.length;
  2963. count += operatorSpaces.after.length;
  2964. var valueSpaces = this._spacesFor("value");
  2965. count += valueSpaces.before.length;
  2966. var value = this.stringifyProperty("value");
  2967. if (name === "value") return value ? count : -1;
  2968. count += value.length;
  2969. count += valueSpaces.after.length;
  2970. var insensitiveSpaces = this._spacesFor("insensitive");
  2971. count += insensitiveSpaces.before.length;
  2972. if (name === "insensitive") return this.insensitive ? count : -1;
  2973. return -1;
  2974. };
  2975. _proto.toString = function toString$1() {
  2976. var _this2 = this;
  2977. var selector$1 = [this.rawSpaceBefore, "["];
  2978. selector$1.push(this._stringFor("qualifiedAttribute", "attribute"));
  2979. if (this.operator && (this.value || this.value === "")) {
  2980. selector$1.push(this._stringFor("operator"));
  2981. selector$1.push(this._stringFor("value"));
  2982. selector$1.push(this._stringFor("insensitiveFlag", "insensitive", function(attrValue, attrSpaces) {
  2983. if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) attrSpaces.before = " ";
  2984. return defaultAttrConcat(attrValue, attrSpaces);
  2985. }));
  2986. }
  2987. selector$1.push("]");
  2988. selector$1.push(this.rawSpaceAfter);
  2989. return selector$1.join("");
  2990. };
  2991. _createClass$1(Attribute$1, [
  2992. {
  2993. key: "quoted",
  2994. get: function get() {
  2995. var qm = this.quoteMark;
  2996. return qm === "'" || qm === "\"";
  2997. },
  2998. set: function set(value) {
  2999. warnOfDeprecatedQuotedAssignment();
  3000. }
  3001. },
  3002. {
  3003. key: "quoteMark",
  3004. get: function get() {
  3005. return this._quoteMark;
  3006. },
  3007. set: function set(quoteMark) {
  3008. if (!this._constructed) {
  3009. this._quoteMark = quoteMark;
  3010. return;
  3011. }
  3012. if (this._quoteMark !== quoteMark) {
  3013. this._quoteMark = quoteMark;
  3014. this._syncRawValue();
  3015. }
  3016. }
  3017. },
  3018. {
  3019. key: "qualifiedAttribute",
  3020. get: function get() {
  3021. return this.qualifiedName(this.raws.attribute || this.attribute);
  3022. }
  3023. },
  3024. {
  3025. key: "insensitiveFlag",
  3026. get: function get() {
  3027. return this.insensitive ? "i" : "";
  3028. }
  3029. },
  3030. {
  3031. key: "value",
  3032. get: function get() {
  3033. return this._value;
  3034. },
  3035. set: function set(v) {
  3036. if (this._constructed) {
  3037. var _unescapeValue2 = unescapeValue(v), deprecatedUsage = _unescapeValue2.deprecatedUsage, unescaped = _unescapeValue2.unescaped, quoteMark = _unescapeValue2.quoteMark;
  3038. if (deprecatedUsage) warnOfDeprecatedValueAssignment();
  3039. if (unescaped === this._value && quoteMark === this._quoteMark) return;
  3040. this._value = unescaped;
  3041. this._quoteMark = quoteMark;
  3042. this._syncRawValue();
  3043. } else this._value = v;
  3044. }
  3045. },
  3046. {
  3047. key: "insensitive",
  3048. get: function get() {
  3049. return this._insensitive;
  3050. },
  3051. set: function set(insensitive) {
  3052. if (!insensitive) {
  3053. this._insensitive = false;
  3054. if (this.raws && (this.raws.insensitiveFlag === "I" || this.raws.insensitiveFlag === "i")) this.raws.insensitiveFlag = void 0;
  3055. }
  3056. this._insensitive = insensitive;
  3057. }
  3058. },
  3059. {
  3060. key: "attribute",
  3061. get: function get() {
  3062. return this._attribute;
  3063. },
  3064. set: function set(name) {
  3065. this._handleEscapes("attribute", name);
  3066. this._attribute = name;
  3067. }
  3068. }
  3069. ]);
  3070. return Attribute$1;
  3071. }(_namespace$1["default"]);
  3072. exports["default"] = Attribute;
  3073. Attribute.NO_QUOTE = null;
  3074. Attribute.SINGLE_QUOTE = "'";
  3075. Attribute.DOUBLE_QUOTE = "\"";
  3076. var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = {
  3077. "'": {
  3078. quotes: "single",
  3079. wrap: true
  3080. },
  3081. "\"": {
  3082. quotes: "double",
  3083. wrap: true
  3084. }
  3085. }, _CSSESC_QUOTE_OPTIONS[null] = { isIdentifier: true }, _CSSESC_QUOTE_OPTIONS);
  3086. function defaultAttrConcat(attrValue, attrSpaces) {
  3087. return "" + attrSpaces.before + attrValue + attrSpaces.after;
  3088. }
  3089. }));
  3090. //#endregion
  3091. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/universal.js
  3092. var require_universal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3093. exports.__esModule = true;
  3094. exports["default"] = void 0;
  3095. var _namespace = _interopRequireDefault$8(require_namespace());
  3096. var _types$4 = require_types();
  3097. function _interopRequireDefault$8(obj) {
  3098. return obj && obj.__esModule ? obj : { "default": obj };
  3099. }
  3100. function _inheritsLoose$2(subClass, superClass) {
  3101. subClass.prototype = Object.create(superClass.prototype);
  3102. subClass.prototype.constructor = subClass;
  3103. _setPrototypeOf$2(subClass, superClass);
  3104. }
  3105. function _setPrototypeOf$2(o, p) {
  3106. _setPrototypeOf$2 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  3107. o$1.__proto__ = p$1;
  3108. return o$1;
  3109. };
  3110. return _setPrototypeOf$2(o, p);
  3111. }
  3112. var Universal = /* @__PURE__ */ function(_Namespace) {
  3113. _inheritsLoose$2(Universal$1, _Namespace);
  3114. function Universal$1(opts) {
  3115. var _this = _Namespace.call(this, opts) || this;
  3116. _this.type = _types$4.UNIVERSAL;
  3117. _this.value = "*";
  3118. return _this;
  3119. }
  3120. return Universal$1;
  3121. }(_namespace["default"]);
  3122. exports["default"] = Universal;
  3123. module.exports = exports.default;
  3124. }));
  3125. //#endregion
  3126. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/combinator.js
  3127. var require_combinator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3128. exports.__esModule = true;
  3129. exports["default"] = void 0;
  3130. var _node$1 = _interopRequireDefault$7(require_node$1());
  3131. var _types$3 = require_types();
  3132. function _interopRequireDefault$7(obj) {
  3133. return obj && obj.__esModule ? obj : { "default": obj };
  3134. }
  3135. function _inheritsLoose$1(subClass, superClass) {
  3136. subClass.prototype = Object.create(superClass.prototype);
  3137. subClass.prototype.constructor = subClass;
  3138. _setPrototypeOf$1(subClass, superClass);
  3139. }
  3140. function _setPrototypeOf$1(o, p) {
  3141. _setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  3142. o$1.__proto__ = p$1;
  3143. return o$1;
  3144. };
  3145. return _setPrototypeOf$1(o, p);
  3146. }
  3147. var Combinator = /* @__PURE__ */ function(_Node) {
  3148. _inheritsLoose$1(Combinator$1, _Node);
  3149. function Combinator$1(opts) {
  3150. var _this = _Node.call(this, opts) || this;
  3151. _this.type = _types$3.COMBINATOR;
  3152. return _this;
  3153. }
  3154. return Combinator$1;
  3155. }(_node$1["default"]);
  3156. exports["default"] = Combinator;
  3157. module.exports = exports.default;
  3158. }));
  3159. //#endregion
  3160. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/nesting.js
  3161. var require_nesting = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3162. exports.__esModule = true;
  3163. exports["default"] = void 0;
  3164. var _node = _interopRequireDefault$6(require_node$1());
  3165. var _types$2 = require_types();
  3166. function _interopRequireDefault$6(obj) {
  3167. return obj && obj.__esModule ? obj : { "default": obj };
  3168. }
  3169. function _inheritsLoose(subClass, superClass) {
  3170. subClass.prototype = Object.create(superClass.prototype);
  3171. subClass.prototype.constructor = subClass;
  3172. _setPrototypeOf(subClass, superClass);
  3173. }
  3174. function _setPrototypeOf(o, p) {
  3175. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) {
  3176. o$1.__proto__ = p$1;
  3177. return o$1;
  3178. };
  3179. return _setPrototypeOf(o, p);
  3180. }
  3181. var Nesting = /* @__PURE__ */ function(_Node) {
  3182. _inheritsLoose(Nesting$1, _Node);
  3183. function Nesting$1(opts) {
  3184. var _this = _Node.call(this, opts) || this;
  3185. _this.type = _types$2.NESTING;
  3186. _this.value = "&";
  3187. return _this;
  3188. }
  3189. return Nesting$1;
  3190. }(_node["default"]);
  3191. exports["default"] = Nesting;
  3192. module.exports = exports.default;
  3193. }));
  3194. //#endregion
  3195. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/sortAscending.js
  3196. var require_sortAscending = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3197. exports.__esModule = true;
  3198. exports["default"] = sortAscending;
  3199. function sortAscending(list) {
  3200. return list.sort(function(a, b) {
  3201. return a - b;
  3202. });
  3203. }
  3204. module.exports = exports.default;
  3205. }));
  3206. //#endregion
  3207. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/tokenTypes.js
  3208. var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
  3209. exports.__esModule = true;
  3210. exports.word = exports.tilde = exports.tab = exports.str = exports.space = exports.slash = exports.singleQuote = exports.semicolon = exports.plus = exports.pipe = exports.openSquare = exports.openParenthesis = exports.newline = exports.greaterThan = exports.feed = exports.equals = exports.doubleQuote = exports.dollar = exports.cr = exports.comment = exports.comma = exports.combinator = exports.colon = exports.closeSquare = exports.closeParenthesis = exports.caret = exports.bang = exports.backslash = exports.at = exports.asterisk = exports.ampersand = void 0;
  3211. var ampersand = 38;
  3212. exports.ampersand = ampersand;
  3213. var asterisk = 42;
  3214. exports.asterisk = asterisk;
  3215. var at = 64;
  3216. exports.at = at;
  3217. var comma = 44;
  3218. exports.comma = comma;
  3219. var colon = 58;
  3220. exports.colon = colon;
  3221. var semicolon = 59;
  3222. exports.semicolon = semicolon;
  3223. var openParenthesis = 40;
  3224. exports.openParenthesis = openParenthesis;
  3225. var closeParenthesis = 41;
  3226. exports.closeParenthesis = closeParenthesis;
  3227. var openSquare = 91;
  3228. exports.openSquare = openSquare;
  3229. var closeSquare = 93;
  3230. exports.closeSquare = closeSquare;
  3231. var dollar = 36;
  3232. exports.dollar = dollar;
  3233. var tilde = 126;
  3234. exports.tilde = tilde;
  3235. var caret = 94;
  3236. exports.caret = caret;
  3237. var plus = 43;
  3238. exports.plus = plus;
  3239. var equals = 61;
  3240. exports.equals = equals;
  3241. var pipe = 124;
  3242. exports.pipe = pipe;
  3243. var greaterThan = 62;
  3244. exports.greaterThan = greaterThan;
  3245. var space = 32;
  3246. exports.space = space;
  3247. var singleQuote = 39;
  3248. exports.singleQuote = singleQuote;
  3249. var doubleQuote = 34;
  3250. exports.doubleQuote = doubleQuote;
  3251. var slash = 47;
  3252. exports.slash = slash;
  3253. var bang = 33;
  3254. exports.bang = bang;
  3255. var backslash = 92;
  3256. exports.backslash = backslash;
  3257. var cr = 13;
  3258. exports.cr = cr;
  3259. var feed = 12;
  3260. exports.feed = feed;
  3261. var newline = 10;
  3262. exports.newline = newline;
  3263. var tab = 9;
  3264. exports.tab = tab;
  3265. var str = singleQuote;
  3266. exports.str = str;
  3267. var comment$1 = -1;
  3268. exports.comment = comment$1;
  3269. var word = -2;
  3270. exports.word = word;
  3271. var combinator$1 = -3;
  3272. exports.combinator = combinator$1;
  3273. }));
  3274. //#endregion
  3275. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/tokenize.js
  3276. var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
  3277. exports.__esModule = true;
  3278. exports.FIELDS = void 0;
  3279. exports["default"] = tokenize;
  3280. var t = _interopRequireWildcard$2(require_tokenTypes());
  3281. var _unescapable, _wordDelimiters;
  3282. function _getRequireWildcardCache$2(nodeInterop) {
  3283. if (typeof WeakMap !== "function") return null;
  3284. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  3285. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  3286. return (_getRequireWildcardCache$2 = function _getRequireWildcardCache$4(nodeInterop$1) {
  3287. return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
  3288. })(nodeInterop);
  3289. }
  3290. function _interopRequireWildcard$2(obj, nodeInterop) {
  3291. if (!nodeInterop && obj && obj.__esModule) return obj;
  3292. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  3293. var cache = _getRequireWildcardCache$2(nodeInterop);
  3294. if (cache && cache.has(obj)) return cache.get(obj);
  3295. var newObj = {};
  3296. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  3297. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  3298. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  3299. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  3300. else newObj[key] = obj[key];
  3301. }
  3302. newObj["default"] = obj;
  3303. if (cache) cache.set(obj, newObj);
  3304. return newObj;
  3305. }
  3306. var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);
  3307. var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters);
  3308. var hex = {};
  3309. var hexChars = "0123456789abcdefABCDEF";
  3310. for (var i = 0; i < hexChars.length; i++) hex[hexChars.charCodeAt(i)] = true;
  3311. /**
  3312. * Returns the last index of the bar css word
  3313. * @param {string} css The string in which the word begins
  3314. * @param {number} start The index into the string where word's first letter occurs
  3315. */
  3316. function consumeWord(css, start) {
  3317. var next = start;
  3318. var code;
  3319. do {
  3320. code = css.charCodeAt(next);
  3321. if (wordDelimiters[code]) return next - 1;
  3322. else if (code === t.backslash) next = consumeEscape(css, next) + 1;
  3323. else next++;
  3324. } while (next < css.length);
  3325. return next - 1;
  3326. }
  3327. /**
  3328. * Returns the last index of the escape sequence
  3329. * @param {string} css The string in which the sequence begins
  3330. * @param {number} start The index into the string where escape character (`\`) occurs.
  3331. */
  3332. function consumeEscape(css, start) {
  3333. var next = start;
  3334. var code = css.charCodeAt(next + 1);
  3335. if (unescapable[code]) {} else if (hex[code]) {
  3336. var hexDigits = 0;
  3337. do {
  3338. next++;
  3339. hexDigits++;
  3340. code = css.charCodeAt(next + 1);
  3341. } while (hex[code] && hexDigits < 6);
  3342. if (hexDigits < 6 && code === t.space) next++;
  3343. } else next++;
  3344. return next;
  3345. }
  3346. var FIELDS = {
  3347. TYPE: 0,
  3348. START_LINE: 1,
  3349. START_COL: 2,
  3350. END_LINE: 3,
  3351. END_COL: 4,
  3352. START_POS: 5,
  3353. END_POS: 6
  3354. };
  3355. exports.FIELDS = FIELDS;
  3356. function tokenize(input) {
  3357. var tokens$1 = [];
  3358. var css = input.css.valueOf();
  3359. var length = css.length;
  3360. var offset = -1;
  3361. var line = 1;
  3362. var start = 0;
  3363. var end = 0;
  3364. var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
  3365. function unclosed(what, fix) {
  3366. if (input.safe) {
  3367. css += fix;
  3368. next = css.length - 1;
  3369. } else throw input.error("Unclosed " + what, line, start - offset, start);
  3370. }
  3371. while (start < length) {
  3372. code = css.charCodeAt(start);
  3373. if (code === t.newline) {
  3374. offset = start;
  3375. line += 1;
  3376. }
  3377. switch (code) {
  3378. case t.space:
  3379. case t.tab:
  3380. case t.newline:
  3381. case t.cr:
  3382. case t.feed:
  3383. next = start;
  3384. do {
  3385. next += 1;
  3386. code = css.charCodeAt(next);
  3387. if (code === t.newline) {
  3388. offset = next;
  3389. line += 1;
  3390. }
  3391. } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
  3392. tokenType = t.space;
  3393. endLine = line;
  3394. endColumn = next - offset - 1;
  3395. end = next;
  3396. break;
  3397. case t.plus:
  3398. case t.greaterThan:
  3399. case t.tilde:
  3400. case t.pipe:
  3401. next = start;
  3402. do {
  3403. next += 1;
  3404. code = css.charCodeAt(next);
  3405. } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
  3406. tokenType = t.combinator;
  3407. endLine = line;
  3408. endColumn = start - offset;
  3409. end = next;
  3410. break;
  3411. case t.asterisk:
  3412. case t.ampersand:
  3413. case t.bang:
  3414. case t.comma:
  3415. case t.equals:
  3416. case t.dollar:
  3417. case t.caret:
  3418. case t.openSquare:
  3419. case t.closeSquare:
  3420. case t.colon:
  3421. case t.semicolon:
  3422. case t.openParenthesis:
  3423. case t.closeParenthesis:
  3424. next = start;
  3425. tokenType = code;
  3426. endLine = line;
  3427. endColumn = start - offset;
  3428. end = next + 1;
  3429. break;
  3430. case t.singleQuote:
  3431. case t.doubleQuote:
  3432. quote = code === t.singleQuote ? "'" : "\"";
  3433. next = start;
  3434. do {
  3435. escaped = false;
  3436. next = css.indexOf(quote, next + 1);
  3437. if (next === -1) unclosed("quote", quote);
  3438. escapePos = next;
  3439. while (css.charCodeAt(escapePos - 1) === t.backslash) {
  3440. escapePos -= 1;
  3441. escaped = !escaped;
  3442. }
  3443. } while (escaped);
  3444. tokenType = t.str;
  3445. endLine = line;
  3446. endColumn = start - offset;
  3447. end = next + 1;
  3448. break;
  3449. default:
  3450. if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
  3451. next = css.indexOf("*/", start + 2) + 1;
  3452. if (next === 0) unclosed("comment", "*/");
  3453. content = css.slice(start, next + 1);
  3454. lines = content.split("\n");
  3455. last = lines.length - 1;
  3456. if (last > 0) {
  3457. nextLine = line + last;
  3458. nextOffset = next - lines[last].length;
  3459. } else {
  3460. nextLine = line;
  3461. nextOffset = offset;
  3462. }
  3463. tokenType = t.comment;
  3464. line = nextLine;
  3465. endLine = nextLine;
  3466. endColumn = next - nextOffset;
  3467. } else if (code === t.slash) {
  3468. next = start;
  3469. tokenType = code;
  3470. endLine = line;
  3471. endColumn = start - offset;
  3472. end = next + 1;
  3473. } else {
  3474. next = consumeWord(css, start);
  3475. tokenType = t.word;
  3476. endLine = line;
  3477. endColumn = next - offset;
  3478. }
  3479. end = next + 1;
  3480. break;
  3481. }
  3482. tokens$1.push([
  3483. tokenType,
  3484. line,
  3485. start - offset,
  3486. endLine,
  3487. endColumn,
  3488. start,
  3489. end
  3490. ]);
  3491. if (nextOffset) {
  3492. offset = nextOffset;
  3493. nextOffset = null;
  3494. }
  3495. start = end;
  3496. }
  3497. return tokens$1;
  3498. }
  3499. }));
  3500. //#endregion
  3501. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/parser.js
  3502. var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  3503. exports.__esModule = true;
  3504. exports["default"] = void 0;
  3505. var _root$1 = _interopRequireDefault$5(require_root());
  3506. var _selector$1 = _interopRequireDefault$5(require_selector());
  3507. var _className$1 = _interopRequireDefault$5(require_className());
  3508. var _comment$1 = _interopRequireDefault$5(require_comment());
  3509. var _id$1 = _interopRequireDefault$5(require_id());
  3510. var _tag$1 = _interopRequireDefault$5(require_tag());
  3511. var _string$1 = _interopRequireDefault$5(require_string());
  3512. var _pseudo$1 = _interopRequireDefault$5(require_pseudo());
  3513. var _attribute$1 = _interopRequireWildcard$1(require_attribute());
  3514. var _universal$1 = _interopRequireDefault$5(require_universal());
  3515. var _combinator$1 = _interopRequireDefault$5(require_combinator());
  3516. var _nesting$1 = _interopRequireDefault$5(require_nesting());
  3517. var _sortAscending = _interopRequireDefault$5(require_sortAscending());
  3518. var _tokenize = _interopRequireWildcard$1(require_tokenize());
  3519. var tokens = _interopRequireWildcard$1(require_tokenTypes());
  3520. var types = _interopRequireWildcard$1(require_types());
  3521. var _util = require_util();
  3522. var _WHITESPACE_TOKENS, _Object$assign;
  3523. function _getRequireWildcardCache$1(nodeInterop) {
  3524. if (typeof WeakMap !== "function") return null;
  3525. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  3526. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  3527. return (_getRequireWildcardCache$1 = function _getRequireWildcardCache$4(nodeInterop$1) {
  3528. return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
  3529. })(nodeInterop);
  3530. }
  3531. function _interopRequireWildcard$1(obj, nodeInterop) {
  3532. if (!nodeInterop && obj && obj.__esModule) return obj;
  3533. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  3534. var cache = _getRequireWildcardCache$1(nodeInterop);
  3535. if (cache && cache.has(obj)) return cache.get(obj);
  3536. var newObj = {};
  3537. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  3538. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  3539. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  3540. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  3541. else newObj[key] = obj[key];
  3542. }
  3543. newObj["default"] = obj;
  3544. if (cache) cache.set(obj, newObj);
  3545. return newObj;
  3546. }
  3547. function _interopRequireDefault$5(obj) {
  3548. return obj && obj.__esModule ? obj : { "default": obj };
  3549. }
  3550. function _defineProperties(target, props) {
  3551. for (var i$1 = 0; i$1 < props.length; i$1++) {
  3552. var descriptor = props[i$1];
  3553. descriptor.enumerable = descriptor.enumerable || false;
  3554. descriptor.configurable = true;
  3555. if ("value" in descriptor) descriptor.writable = true;
  3556. Object.defineProperty(target, descriptor.key, descriptor);
  3557. }
  3558. }
  3559. function _createClass(Constructor, protoProps, staticProps) {
  3560. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3561. if (staticProps) _defineProperties(Constructor, staticProps);
  3562. Object.defineProperty(Constructor, "prototype", { writable: false });
  3563. return Constructor;
  3564. }
  3565. var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS);
  3566. var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign));
  3567. function tokenStart(token) {
  3568. return {
  3569. line: token[_tokenize.FIELDS.START_LINE],
  3570. column: token[_tokenize.FIELDS.START_COL]
  3571. };
  3572. }
  3573. function tokenEnd(token) {
  3574. return {
  3575. line: token[_tokenize.FIELDS.END_LINE],
  3576. column: token[_tokenize.FIELDS.END_COL]
  3577. };
  3578. }
  3579. function getSource(startLine, startColumn, endLine, endColumn) {
  3580. return {
  3581. start: {
  3582. line: startLine,
  3583. column: startColumn
  3584. },
  3585. end: {
  3586. line: endLine,
  3587. column: endColumn
  3588. }
  3589. };
  3590. }
  3591. function getTokenSource(token) {
  3592. return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]);
  3593. }
  3594. function getTokenSourceSpan(startToken, endToken) {
  3595. if (!startToken) return;
  3596. return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]);
  3597. }
  3598. function unescapeProp(node, prop) {
  3599. var value = node[prop];
  3600. if (typeof value !== "string") return;
  3601. if (value.indexOf("\\") !== -1) {
  3602. (0, _util.ensureObject)(node, "raws");
  3603. node[prop] = (0, _util.unesc)(value);
  3604. if (node.raws[prop] === void 0) node.raws[prop] = value;
  3605. }
  3606. return node;
  3607. }
  3608. function indexesOf(array, item) {
  3609. var i$1 = -1;
  3610. var indexes = [];
  3611. while ((i$1 = array.indexOf(item, i$1 + 1)) !== -1) indexes.push(i$1);
  3612. return indexes;
  3613. }
  3614. function uniqs() {
  3615. var list = Array.prototype.concat.apply([], arguments);
  3616. return list.filter(function(item, i$1) {
  3617. return i$1 === list.indexOf(item);
  3618. });
  3619. }
  3620. var Parser = /* @__PURE__ */ function() {
  3621. function Parser$2(rule, options) {
  3622. if (options === void 0) options = {};
  3623. this.rule = rule;
  3624. this.options = Object.assign({
  3625. lossy: false,
  3626. safe: false
  3627. }, options);
  3628. this.position = 0;
  3629. this.css = typeof this.rule === "string" ? this.rule : this.rule.selector;
  3630. this.tokens = (0, _tokenize["default"])({
  3631. css: this.css,
  3632. error: this._errorGenerator(),
  3633. safe: this.options.safe
  3634. });
  3635. var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);
  3636. this.root = new _root$1["default"]({ source: rootSource });
  3637. this.root.errorGenerator = this._errorGenerator();
  3638. var selector$1 = new _selector$1["default"]({
  3639. source: { start: {
  3640. line: 1,
  3641. column: 1
  3642. } },
  3643. sourceIndex: 0
  3644. });
  3645. this.root.append(selector$1);
  3646. this.current = selector$1;
  3647. this.loop();
  3648. }
  3649. var _proto = Parser$2.prototype;
  3650. _proto._errorGenerator = function _errorGenerator() {
  3651. var _this = this;
  3652. return function(message, errorOptions) {
  3653. if (typeof _this.rule === "string") return new Error(message);
  3654. return _this.rule.error(message, errorOptions);
  3655. };
  3656. };
  3657. _proto.attribute = function attribute$1() {
  3658. var attr = [];
  3659. var startingToken = this.currToken;
  3660. this.position++;
  3661. while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {
  3662. attr.push(this.currToken);
  3663. this.position++;
  3664. }
  3665. if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) return this.expected("closing square bracket", this.currToken[_tokenize.FIELDS.START_POS]);
  3666. var len = attr.length;
  3667. var node = {
  3668. source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),
  3669. sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
  3670. };
  3671. if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) return this.expected("attribute", attr[0][_tokenize.FIELDS.START_POS]);
  3672. var pos = 0;
  3673. var spaceBefore = "";
  3674. var commentBefore = "";
  3675. var lastAdded = null;
  3676. var spaceAfterMeaningfulToken = false;
  3677. while (pos < len) {
  3678. var token = attr[pos];
  3679. var content = this.content(token);
  3680. var next = attr[pos + 1];
  3681. switch (token[_tokenize.FIELDS.TYPE]) {
  3682. case tokens.space:
  3683. spaceAfterMeaningfulToken = true;
  3684. if (this.options.lossy) break;
  3685. if (lastAdded) {
  3686. (0, _util.ensureObject)(node, "spaces", lastAdded);
  3687. var prevContent = node.spaces[lastAdded].after || "";
  3688. node.spaces[lastAdded].after = prevContent + content;
  3689. var existingComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || null;
  3690. if (existingComment) node.raws.spaces[lastAdded].after = existingComment + content;
  3691. } else {
  3692. spaceBefore = spaceBefore + content;
  3693. commentBefore = commentBefore + content;
  3694. }
  3695. break;
  3696. case tokens.asterisk:
  3697. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3698. node.operator = content;
  3699. lastAdded = "operator";
  3700. } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) {
  3701. if (spaceBefore) {
  3702. (0, _util.ensureObject)(node, "spaces", "attribute");
  3703. node.spaces.attribute.before = spaceBefore;
  3704. spaceBefore = "";
  3705. }
  3706. if (commentBefore) {
  3707. (0, _util.ensureObject)(node, "raws", "spaces", "attribute");
  3708. node.raws.spaces.attribute.before = spaceBefore;
  3709. commentBefore = "";
  3710. }
  3711. node.namespace = (node.namespace || "") + content;
  3712. if ((0, _util.getProp)(node, "raws", "namespace") || null) node.raws.namespace += content;
  3713. lastAdded = "namespace";
  3714. }
  3715. spaceAfterMeaningfulToken = false;
  3716. break;
  3717. case tokens.dollar: if (lastAdded === "value") {
  3718. var oldRawValue = (0, _util.getProp)(node, "raws", "value");
  3719. node.value += "$";
  3720. if (oldRawValue) node.raws.value = oldRawValue + "$";
  3721. break;
  3722. }
  3723. case tokens.caret:
  3724. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3725. node.operator = content;
  3726. lastAdded = "operator";
  3727. }
  3728. spaceAfterMeaningfulToken = false;
  3729. break;
  3730. case tokens.combinator:
  3731. if (content === "~" && next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3732. node.operator = content;
  3733. lastAdded = "operator";
  3734. }
  3735. if (content !== "|") {
  3736. spaceAfterMeaningfulToken = false;
  3737. break;
  3738. }
  3739. if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
  3740. node.operator = content;
  3741. lastAdded = "operator";
  3742. } else if (!node.namespace && !node.attribute) node.namespace = true;
  3743. spaceAfterMeaningfulToken = false;
  3744. break;
  3745. case tokens.word:
  3746. if (next && this.content(next) === "|" && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && !node.operator && !node.namespace) {
  3747. node.namespace = content;
  3748. lastAdded = "namespace";
  3749. } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) {
  3750. if (spaceBefore) {
  3751. (0, _util.ensureObject)(node, "spaces", "attribute");
  3752. node.spaces.attribute.before = spaceBefore;
  3753. spaceBefore = "";
  3754. }
  3755. if (commentBefore) {
  3756. (0, _util.ensureObject)(node, "raws", "spaces", "attribute");
  3757. node.raws.spaces.attribute.before = commentBefore;
  3758. commentBefore = "";
  3759. }
  3760. node.attribute = (node.attribute || "") + content;
  3761. if ((0, _util.getProp)(node, "raws", "attribute") || null) node.raws.attribute += content;
  3762. lastAdded = "attribute";
  3763. } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) {
  3764. var _unescaped = (0, _util.unesc)(content);
  3765. var _oldRawValue = (0, _util.getProp)(node, "raws", "value") || "";
  3766. var oldValue = node.value || "";
  3767. node.value = oldValue + _unescaped;
  3768. node.quoteMark = null;
  3769. if (_unescaped !== content || _oldRawValue) {
  3770. (0, _util.ensureObject)(node, "raws");
  3771. node.raws.value = (_oldRawValue || oldValue) + content;
  3772. }
  3773. lastAdded = "value";
  3774. } else {
  3775. var insensitive = content === "i" || content === "I";
  3776. if ((node.value || node.value === "") && (node.quoteMark || spaceAfterMeaningfulToken)) {
  3777. node.insensitive = insensitive;
  3778. if (!insensitive || content === "I") {
  3779. (0, _util.ensureObject)(node, "raws");
  3780. node.raws.insensitiveFlag = content;
  3781. }
  3782. lastAdded = "insensitive";
  3783. if (spaceBefore) {
  3784. (0, _util.ensureObject)(node, "spaces", "insensitive");
  3785. node.spaces.insensitive.before = spaceBefore;
  3786. spaceBefore = "";
  3787. }
  3788. if (commentBefore) {
  3789. (0, _util.ensureObject)(node, "raws", "spaces", "insensitive");
  3790. node.raws.spaces.insensitive.before = commentBefore;
  3791. commentBefore = "";
  3792. }
  3793. } else if (node.value || node.value === "") {
  3794. lastAdded = "value";
  3795. node.value += content;
  3796. if (node.raws.value) node.raws.value += content;
  3797. }
  3798. }
  3799. spaceAfterMeaningfulToken = false;
  3800. break;
  3801. case tokens.str:
  3802. if (!node.attribute || !node.operator) return this.error("Expected an attribute followed by an operator preceding the string.", { index: token[_tokenize.FIELDS.START_POS] });
  3803. var _unescapeValue = (0, _attribute$1.unescapeValue)(content), unescaped = _unescapeValue.unescaped, quoteMark = _unescapeValue.quoteMark;
  3804. node.value = unescaped;
  3805. node.quoteMark = quoteMark;
  3806. lastAdded = "value";
  3807. (0, _util.ensureObject)(node, "raws");
  3808. node.raws.value = content;
  3809. spaceAfterMeaningfulToken = false;
  3810. break;
  3811. case tokens.equals:
  3812. if (!node.attribute) return this.expected("attribute", token[_tokenize.FIELDS.START_POS], content);
  3813. if (node.value) return this.error("Unexpected \"=\" found; an operator was already defined.", { index: token[_tokenize.FIELDS.START_POS] });
  3814. node.operator = node.operator ? node.operator + content : content;
  3815. lastAdded = "operator";
  3816. spaceAfterMeaningfulToken = false;
  3817. break;
  3818. case tokens.comment:
  3819. if (lastAdded) if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === "insensitive") {
  3820. var lastComment = (0, _util.getProp)(node, "spaces", lastAdded, "after") || "";
  3821. var rawLastComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || lastComment;
  3822. (0, _util.ensureObject)(node, "raws", "spaces", lastAdded);
  3823. node.raws.spaces[lastAdded].after = rawLastComment + content;
  3824. } else {
  3825. var lastValue = node[lastAdded] || "";
  3826. var rawLastValue = (0, _util.getProp)(node, "raws", lastAdded) || lastValue;
  3827. (0, _util.ensureObject)(node, "raws");
  3828. node.raws[lastAdded] = rawLastValue + content;
  3829. }
  3830. else commentBefore = commentBefore + content;
  3831. break;
  3832. default: return this.error("Unexpected \"" + content + "\" found.", { index: token[_tokenize.FIELDS.START_POS] });
  3833. }
  3834. pos++;
  3835. }
  3836. unescapeProp(node, "attribute");
  3837. unescapeProp(node, "namespace");
  3838. this.newNode(new _attribute$1["default"](node));
  3839. this.position++;
  3840. };
  3841. _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) {
  3842. if (stopPosition < 0) stopPosition = this.tokens.length;
  3843. var startPosition = this.position;
  3844. var nodes = [];
  3845. var space$1 = "";
  3846. var lastComment = void 0;
  3847. do
  3848. if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {
  3849. if (!this.options.lossy) space$1 += this.content();
  3850. } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) {
  3851. var spaces = {};
  3852. if (space$1) {
  3853. spaces.before = space$1;
  3854. space$1 = "";
  3855. }
  3856. lastComment = new _comment$1["default"]({
  3857. value: this.content(),
  3858. source: getTokenSource(this.currToken),
  3859. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
  3860. spaces
  3861. });
  3862. nodes.push(lastComment);
  3863. }
  3864. while (++this.position < stopPosition);
  3865. if (space$1) {
  3866. if (lastComment) lastComment.spaces.after = space$1;
  3867. else if (!this.options.lossy) {
  3868. var firstToken = this.tokens[startPosition];
  3869. var lastToken = this.tokens[this.position - 1];
  3870. nodes.push(new _string$1["default"]({
  3871. value: "",
  3872. source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]),
  3873. sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
  3874. spaces: {
  3875. before: space$1,
  3876. after: ""
  3877. }
  3878. }));
  3879. }
  3880. }
  3881. return nodes;
  3882. };
  3883. _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) {
  3884. var _this2 = this;
  3885. if (requiredSpace === void 0) requiredSpace = false;
  3886. var space$1 = "";
  3887. var rawSpace = "";
  3888. nodes.forEach(function(n) {
  3889. var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace);
  3890. var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace);
  3891. space$1 += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
  3892. rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
  3893. });
  3894. if (rawSpace === space$1) rawSpace = void 0;
  3895. return {
  3896. space: space$1,
  3897. rawSpace
  3898. };
  3899. };
  3900. _proto.isNamedCombinator = function isNamedCombinator(position) {
  3901. if (position === void 0) position = this.position;
  3902. return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash;
  3903. };
  3904. _proto.namedCombinator = function namedCombinator() {
  3905. if (this.isNamedCombinator()) {
  3906. var nameRaw = this.content(this.tokens[this.position + 1]);
  3907. var name = (0, _util.unesc)(nameRaw).toLowerCase();
  3908. var raws = {};
  3909. if (name !== nameRaw) raws.value = "/" + nameRaw + "/";
  3910. var node = new _combinator$1["default"]({
  3911. value: "/" + name + "/",
  3912. source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]),
  3913. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
  3914. raws
  3915. });
  3916. this.position = this.position + 3;
  3917. return node;
  3918. } else this.unexpected();
  3919. };
  3920. _proto.combinator = function combinator$2() {
  3921. var _this3 = this;
  3922. if (this.content() === "|") return this.namespace();
  3923. var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
  3924. if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
  3925. var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
  3926. if (nodes.length > 0) {
  3927. var last = this.current.last;
  3928. if (last) {
  3929. var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), space$1 = _this$convertWhitespa.space, rawSpace = _this$convertWhitespa.rawSpace;
  3930. if (rawSpace !== void 0) last.rawSpaceAfter += rawSpace;
  3931. last.spaces.after += space$1;
  3932. } else nodes.forEach(function(n) {
  3933. return _this3.newNode(n);
  3934. });
  3935. }
  3936. return;
  3937. }
  3938. var firstToken = this.currToken;
  3939. var spaceOrDescendantSelectorNodes = void 0;
  3940. if (nextSigTokenPos > this.position) spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
  3941. var node;
  3942. if (this.isNamedCombinator()) node = this.namedCombinator();
  3943. else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) {
  3944. node = new _combinator$1["default"]({
  3945. value: this.content(),
  3946. source: getTokenSource(this.currToken),
  3947. sourceIndex: this.currToken[_tokenize.FIELDS.START_POS]
  3948. });
  3949. this.position++;
  3950. } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {} else if (!spaceOrDescendantSelectorNodes) this.unexpected();
  3951. if (node) {
  3952. if (spaceOrDescendantSelectorNodes) {
  3953. var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), _space = _this$convertWhitespa2.space, _rawSpace = _this$convertWhitespa2.rawSpace;
  3954. node.spaces.before = _space;
  3955. node.rawSpaceBefore = _rawSpace;
  3956. }
  3957. } else {
  3958. var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), _space2 = _this$convertWhitespa3.space, _rawSpace2 = _this$convertWhitespa3.rawSpace;
  3959. if (!_rawSpace2) _rawSpace2 = _space2;
  3960. var spaces = {};
  3961. var raws = { spaces: {} };
  3962. if (_space2.endsWith(" ") && _rawSpace2.endsWith(" ")) {
  3963. spaces.before = _space2.slice(0, _space2.length - 1);
  3964. raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);
  3965. } else if (_space2.startsWith(" ") && _rawSpace2.startsWith(" ")) {
  3966. spaces.after = _space2.slice(1);
  3967. raws.spaces.after = _rawSpace2.slice(1);
  3968. } else raws.value = _rawSpace2;
  3969. node = new _combinator$1["default"]({
  3970. value: " ",
  3971. source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
  3972. sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
  3973. spaces,
  3974. raws
  3975. });
  3976. }
  3977. if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) {
  3978. node.spaces.after = this.optionalSpace(this.content());
  3979. this.position++;
  3980. }
  3981. return this.newNode(node);
  3982. };
  3983. _proto.comma = function comma$1() {
  3984. if (this.position === this.tokens.length - 1) {
  3985. this.root.trailingComma = true;
  3986. this.position++;
  3987. return;
  3988. }
  3989. this.current._inferEndPosition();
  3990. var selector$1 = new _selector$1["default"]({
  3991. source: { start: tokenStart(this.tokens[this.position + 1]) },
  3992. sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS]
  3993. });
  3994. this.current.parent.append(selector$1);
  3995. this.current = selector$1;
  3996. this.position++;
  3997. };
  3998. _proto.comment = function comment$2() {
  3999. var current = this.currToken;
  4000. this.newNode(new _comment$1["default"]({
  4001. value: this.content(),
  4002. source: getTokenSource(current),
  4003. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4004. }));
  4005. this.position++;
  4006. };
  4007. _proto.error = function error(message, opts) {
  4008. throw this.root.error(message, opts);
  4009. };
  4010. _proto.missingBackslash = function missingBackslash() {
  4011. return this.error("Expected a backslash preceding the semicolon.", { index: this.currToken[_tokenize.FIELDS.START_POS] });
  4012. };
  4013. _proto.missingParenthesis = function missingParenthesis() {
  4014. return this.expected("opening parenthesis", this.currToken[_tokenize.FIELDS.START_POS]);
  4015. };
  4016. _proto.missingSquareBracket = function missingSquareBracket() {
  4017. return this.expected("opening square bracket", this.currToken[_tokenize.FIELDS.START_POS]);
  4018. };
  4019. _proto.unexpected = function unexpected() {
  4020. return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]);
  4021. };
  4022. _proto.unexpectedPipe = function unexpectedPipe() {
  4023. return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]);
  4024. };
  4025. _proto.namespace = function namespace() {
  4026. var before = this.prevToken && this.content(this.prevToken) || true;
  4027. if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) {
  4028. this.position++;
  4029. return this.word(before);
  4030. } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) {
  4031. this.position++;
  4032. return this.universal(before);
  4033. }
  4034. this.unexpectedPipe();
  4035. };
  4036. _proto.nesting = function nesting$1() {
  4037. if (this.nextToken) {
  4038. if (this.content(this.nextToken) === "|") {
  4039. this.position++;
  4040. return;
  4041. }
  4042. }
  4043. var current = this.currToken;
  4044. this.newNode(new _nesting$1["default"]({
  4045. value: this.content(),
  4046. source: getTokenSource(current),
  4047. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4048. }));
  4049. this.position++;
  4050. };
  4051. _proto.parentheses = function parentheses() {
  4052. var last = this.current.last;
  4053. var unbalanced = 1;
  4054. this.position++;
  4055. if (last && last.type === types.PSEUDO) {
  4056. var selector$1 = new _selector$1["default"]({
  4057. source: { start: tokenStart(this.tokens[this.position]) },
  4058. sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS]
  4059. });
  4060. var cache = this.current;
  4061. last.append(selector$1);
  4062. this.current = selector$1;
  4063. while (this.position < this.tokens.length && unbalanced) {
  4064. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
  4065. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
  4066. if (unbalanced) this.parse();
  4067. else {
  4068. this.current.source.end = tokenEnd(this.currToken);
  4069. this.current.parent.source.end = tokenEnd(this.currToken);
  4070. this.position++;
  4071. }
  4072. }
  4073. this.current = cache;
  4074. } else {
  4075. var parenStart = this.currToken;
  4076. var parenValue = "(";
  4077. var parenEnd;
  4078. while (this.position < this.tokens.length && unbalanced) {
  4079. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
  4080. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
  4081. parenEnd = this.currToken;
  4082. parenValue += this.parseParenthesisToken(this.currToken);
  4083. this.position++;
  4084. }
  4085. if (last) last.appendToPropertyAndEscape("value", parenValue, parenValue);
  4086. else this.newNode(new _string$1["default"]({
  4087. value: parenValue,
  4088. source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]),
  4089. sourceIndex: parenStart[_tokenize.FIELDS.START_POS]
  4090. }));
  4091. }
  4092. if (unbalanced) return this.expected("closing parenthesis", this.currToken[_tokenize.FIELDS.START_POS]);
  4093. };
  4094. _proto.pseudo = function pseudo$1() {
  4095. var _this4 = this;
  4096. var pseudoStr = "";
  4097. var startingToken = this.currToken;
  4098. while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) {
  4099. pseudoStr += this.content();
  4100. this.position++;
  4101. }
  4102. if (!this.currToken) return this.expected(["pseudo-class", "pseudo-element"], this.position - 1);
  4103. if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) this.splitWord(false, function(first, length) {
  4104. pseudoStr += first;
  4105. _this4.newNode(new _pseudo$1["default"]({
  4106. value: pseudoStr,
  4107. source: getTokenSourceSpan(startingToken, _this4.currToken),
  4108. sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
  4109. }));
  4110. if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) _this4.error("Misplaced parenthesis.", { index: _this4.nextToken[_tokenize.FIELDS.START_POS] });
  4111. });
  4112. else return this.expected(["pseudo-class", "pseudo-element"], this.currToken[_tokenize.FIELDS.START_POS]);
  4113. };
  4114. _proto.space = function space$1() {
  4115. var content = this.content();
  4116. if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function(node) {
  4117. return node.type === "comment";
  4118. })) {
  4119. this.spaces = this.optionalSpace(content);
  4120. this.position++;
  4121. } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
  4122. this.current.last.spaces.after = this.optionalSpace(content);
  4123. this.position++;
  4124. } else this.combinator();
  4125. };
  4126. _proto.string = function string$1() {
  4127. var current = this.currToken;
  4128. this.newNode(new _string$1["default"]({
  4129. value: this.content(),
  4130. source: getTokenSource(current),
  4131. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4132. }));
  4133. this.position++;
  4134. };
  4135. _proto.universal = function universal$1(namespace) {
  4136. var nextToken = this.nextToken;
  4137. if (nextToken && this.content(nextToken) === "|") {
  4138. this.position++;
  4139. return this.namespace();
  4140. }
  4141. var current = this.currToken;
  4142. this.newNode(new _universal$1["default"]({
  4143. value: this.content(),
  4144. source: getTokenSource(current),
  4145. sourceIndex: current[_tokenize.FIELDS.START_POS]
  4146. }), namespace);
  4147. this.position++;
  4148. };
  4149. _proto.splitWord = function splitWord(namespace, firstCallback) {
  4150. var _this5 = this;
  4151. var nextToken = this.nextToken;
  4152. var word$1 = this.content();
  4153. while (nextToken && ~[
  4154. tokens.dollar,
  4155. tokens.caret,
  4156. tokens.equals,
  4157. tokens.word
  4158. ].indexOf(nextToken[_tokenize.FIELDS.TYPE])) {
  4159. this.position++;
  4160. var current = this.content();
  4161. word$1 += current;
  4162. if (current.lastIndexOf("\\") === current.length - 1) {
  4163. var next = this.nextToken;
  4164. if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) {
  4165. word$1 += this.requiredSpace(this.content(next));
  4166. this.position++;
  4167. }
  4168. }
  4169. nextToken = this.nextToken;
  4170. }
  4171. var hasClass = indexesOf(word$1, ".").filter(function(i$1) {
  4172. var escapedDot = word$1[i$1 - 1] === "\\";
  4173. var isKeyframesPercent = /^\d+\.\d+%$/.test(word$1);
  4174. return !escapedDot && !isKeyframesPercent;
  4175. });
  4176. var hasId = indexesOf(word$1, "#").filter(function(i$1) {
  4177. return word$1[i$1 - 1] !== "\\";
  4178. });
  4179. var interpolations = indexesOf(word$1, "#{");
  4180. if (interpolations.length) hasId = hasId.filter(function(hashIndex) {
  4181. return !~interpolations.indexOf(hashIndex);
  4182. });
  4183. var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId)));
  4184. indices.forEach(function(ind, i$1) {
  4185. var index = indices[i$1 + 1] || word$1.length;
  4186. var value = word$1.slice(ind, index);
  4187. if (i$1 === 0 && firstCallback) return firstCallback.call(_this5, value, indices.length);
  4188. var node;
  4189. var current$1 = _this5.currToken;
  4190. var sourceIndex = current$1[_tokenize.FIELDS.START_POS] + indices[i$1];
  4191. var source = getSource(current$1[1], current$1[2] + ind, current$1[3], current$1[2] + (index - 1));
  4192. if (~hasClass.indexOf(ind)) {
  4193. var classNameOpts = {
  4194. value: value.slice(1),
  4195. source,
  4196. sourceIndex
  4197. };
  4198. node = new _className$1["default"](unescapeProp(classNameOpts, "value"));
  4199. } else if (~hasId.indexOf(ind)) {
  4200. var idOpts = {
  4201. value: value.slice(1),
  4202. source,
  4203. sourceIndex
  4204. };
  4205. node = new _id$1["default"](unescapeProp(idOpts, "value"));
  4206. } else {
  4207. var tagOpts = {
  4208. value,
  4209. source,
  4210. sourceIndex
  4211. };
  4212. unescapeProp(tagOpts, "value");
  4213. node = new _tag$1["default"](tagOpts);
  4214. }
  4215. _this5.newNode(node, namespace);
  4216. namespace = null;
  4217. });
  4218. this.position++;
  4219. };
  4220. _proto.word = function word$1(namespace) {
  4221. var nextToken = this.nextToken;
  4222. if (nextToken && this.content(nextToken) === "|") {
  4223. this.position++;
  4224. return this.namespace();
  4225. }
  4226. return this.splitWord(namespace);
  4227. };
  4228. _proto.loop = function loop() {
  4229. while (this.position < this.tokens.length) this.parse(true);
  4230. this.current._inferEndPosition();
  4231. return this.root;
  4232. };
  4233. _proto.parse = function parse(throwOnParenthesis) {
  4234. switch (this.currToken[_tokenize.FIELDS.TYPE]) {
  4235. case tokens.space:
  4236. this.space();
  4237. break;
  4238. case tokens.comment:
  4239. this.comment();
  4240. break;
  4241. case tokens.openParenthesis:
  4242. this.parentheses();
  4243. break;
  4244. case tokens.closeParenthesis:
  4245. if (throwOnParenthesis) this.missingParenthesis();
  4246. break;
  4247. case tokens.openSquare:
  4248. this.attribute();
  4249. break;
  4250. case tokens.dollar:
  4251. case tokens.caret:
  4252. case tokens.equals:
  4253. case tokens.word:
  4254. this.word();
  4255. break;
  4256. case tokens.colon:
  4257. this.pseudo();
  4258. break;
  4259. case tokens.comma:
  4260. this.comma();
  4261. break;
  4262. case tokens.asterisk:
  4263. this.universal();
  4264. break;
  4265. case tokens.ampersand:
  4266. this.nesting();
  4267. break;
  4268. case tokens.slash:
  4269. case tokens.combinator:
  4270. this.combinator();
  4271. break;
  4272. case tokens.str:
  4273. this.string();
  4274. break;
  4275. case tokens.closeSquare: this.missingSquareBracket();
  4276. case tokens.semicolon: this.missingBackslash();
  4277. default: this.unexpected();
  4278. }
  4279. };
  4280. _proto.expected = function expected(description, index, found) {
  4281. if (Array.isArray(description)) {
  4282. var last = description.pop();
  4283. description = description.join(", ") + " or " + last;
  4284. }
  4285. var an = /^[aeiou]/.test(description[0]) ? "an" : "a";
  4286. if (!found) return this.error("Expected " + an + " " + description + ".", { index });
  4287. return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { index });
  4288. };
  4289. _proto.requiredSpace = function requiredSpace(space$1) {
  4290. return this.options.lossy ? " " : space$1;
  4291. };
  4292. _proto.optionalSpace = function optionalSpace(space$1) {
  4293. return this.options.lossy ? "" : space$1;
  4294. };
  4295. _proto.lossySpace = function lossySpace(space$1, required) {
  4296. if (this.options.lossy) return required ? " " : "";
  4297. else return space$1;
  4298. };
  4299. _proto.parseParenthesisToken = function parseParenthesisToken(token) {
  4300. var content = this.content(token);
  4301. if (token[_tokenize.FIELDS.TYPE] === tokens.space) return this.requiredSpace(content);
  4302. else return content;
  4303. };
  4304. _proto.newNode = function newNode(node, namespace) {
  4305. if (namespace) {
  4306. if (/^ +$/.test(namespace)) {
  4307. if (!this.options.lossy) this.spaces = (this.spaces || "") + namespace;
  4308. namespace = true;
  4309. }
  4310. node.namespace = namespace;
  4311. unescapeProp(node, "namespace");
  4312. }
  4313. if (this.spaces) {
  4314. node.spaces.before = this.spaces;
  4315. this.spaces = "";
  4316. }
  4317. return this.current.append(node);
  4318. };
  4319. _proto.content = function content(token) {
  4320. if (token === void 0) token = this.currToken;
  4321. return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]);
  4322. };
  4323. /**
  4324. * returns the index of the next non-whitespace, non-comment token.
  4325. * returns -1 if no meaningful token is found.
  4326. */
  4327. _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) {
  4328. if (startPosition === void 0) startPosition = this.position + 1;
  4329. var searchPosition = startPosition;
  4330. while (searchPosition < this.tokens.length) if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) {
  4331. searchPosition++;
  4332. continue;
  4333. } else return searchPosition;
  4334. return -1;
  4335. };
  4336. _createClass(Parser$2, [
  4337. {
  4338. key: "currToken",
  4339. get: function get() {
  4340. return this.tokens[this.position];
  4341. }
  4342. },
  4343. {
  4344. key: "nextToken",
  4345. get: function get() {
  4346. return this.tokens[this.position + 1];
  4347. }
  4348. },
  4349. {
  4350. key: "prevToken",
  4351. get: function get() {
  4352. return this.tokens[this.position - 1];
  4353. }
  4354. }
  4355. ]);
  4356. return Parser$2;
  4357. }();
  4358. exports["default"] = Parser;
  4359. module.exports = exports.default;
  4360. }));
  4361. //#endregion
  4362. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/processor.js
  4363. var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  4364. exports.__esModule = true;
  4365. exports["default"] = void 0;
  4366. var _parser = _interopRequireDefault$4(require_parser());
  4367. function _interopRequireDefault$4(obj) {
  4368. return obj && obj.__esModule ? obj : { "default": obj };
  4369. }
  4370. var Processor = /* @__PURE__ */ function() {
  4371. function Processor$1(func, options) {
  4372. this.func = func || function noop() {};
  4373. this.funcRes = null;
  4374. this.options = options;
  4375. }
  4376. var _proto = Processor$1.prototype;
  4377. _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
  4378. if (options === void 0) options = {};
  4379. if (Object.assign({}, this.options, options).updateSelector === false) return false;
  4380. else return typeof rule !== "string";
  4381. };
  4382. _proto._isLossy = function _isLossy(options) {
  4383. if (options === void 0) options = {};
  4384. if (Object.assign({}, this.options, options).lossless === false) return true;
  4385. else return false;
  4386. };
  4387. _proto._root = function _root$2(rule, options) {
  4388. if (options === void 0) options = {};
  4389. return new _parser["default"](rule, this._parseOptions(options)).root;
  4390. };
  4391. _proto._parseOptions = function _parseOptions(options) {
  4392. return { lossy: this._isLossy(options) };
  4393. };
  4394. _proto._run = function _run(rule, options) {
  4395. var _this = this;
  4396. if (options === void 0) options = {};
  4397. return new Promise(function(resolve, reject) {
  4398. try {
  4399. var root$2 = _this._root(rule, options);
  4400. Promise.resolve(_this.func(root$2)).then(function(transform) {
  4401. var string$1 = void 0;
  4402. if (_this._shouldUpdateSelector(rule, options)) {
  4403. string$1 = root$2.toString();
  4404. rule.selector = string$1;
  4405. }
  4406. return {
  4407. transform,
  4408. root: root$2,
  4409. string: string$1
  4410. };
  4411. }).then(resolve, reject);
  4412. } catch (e) {
  4413. reject(e);
  4414. return;
  4415. }
  4416. });
  4417. };
  4418. _proto._runSync = function _runSync(rule, options) {
  4419. if (options === void 0) options = {};
  4420. var root$2 = this._root(rule, options);
  4421. var transform = this.func(root$2);
  4422. if (transform && typeof transform.then === "function") throw new Error("Selector processor returned a promise to a synchronous call.");
  4423. var string$1 = void 0;
  4424. if (options.updateSelector && typeof rule !== "string") {
  4425. string$1 = root$2.toString();
  4426. rule.selector = string$1;
  4427. }
  4428. return {
  4429. transform,
  4430. root: root$2,
  4431. string: string$1
  4432. };
  4433. };
  4434. _proto.ast = function ast(rule, options) {
  4435. return this._run(rule, options).then(function(result) {
  4436. return result.root;
  4437. });
  4438. };
  4439. _proto.astSync = function astSync(rule, options) {
  4440. return this._runSync(rule, options).root;
  4441. };
  4442. _proto.transform = function transform(rule, options) {
  4443. return this._run(rule, options).then(function(result) {
  4444. return result.transform;
  4445. });
  4446. };
  4447. _proto.transformSync = function transformSync(rule, options) {
  4448. return this._runSync(rule, options).transform;
  4449. };
  4450. _proto.process = function process$1(rule, options) {
  4451. return this._run(rule, options).then(function(result) {
  4452. return result.string || result.root.toString();
  4453. });
  4454. };
  4455. _proto.processSync = function processSync(rule, options) {
  4456. var result = this._runSync(rule, options);
  4457. return result.string || result.root.toString();
  4458. };
  4459. return Processor$1;
  4460. }();
  4461. exports["default"] = Processor;
  4462. module.exports = exports.default;
  4463. }));
  4464. //#endregion
  4465. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/constructors.js
  4466. var require_constructors = /* @__PURE__ */ __commonJSMin(((exports) => {
  4467. exports.__esModule = true;
  4468. exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0;
  4469. var _attribute = _interopRequireDefault$3(require_attribute());
  4470. var _className = _interopRequireDefault$3(require_className());
  4471. var _combinator = _interopRequireDefault$3(require_combinator());
  4472. var _comment = _interopRequireDefault$3(require_comment());
  4473. var _id = _interopRequireDefault$3(require_id());
  4474. var _nesting = _interopRequireDefault$3(require_nesting());
  4475. var _pseudo = _interopRequireDefault$3(require_pseudo());
  4476. var _root = _interopRequireDefault$3(require_root());
  4477. var _selector = _interopRequireDefault$3(require_selector());
  4478. var _string = _interopRequireDefault$3(require_string());
  4479. var _tag = _interopRequireDefault$3(require_tag());
  4480. var _universal = _interopRequireDefault$3(require_universal());
  4481. function _interopRequireDefault$3(obj) {
  4482. return obj && obj.__esModule ? obj : { "default": obj };
  4483. }
  4484. var attribute = function attribute$1(opts) {
  4485. return new _attribute["default"](opts);
  4486. };
  4487. exports.attribute = attribute;
  4488. var className = function className$1(opts) {
  4489. return new _className["default"](opts);
  4490. };
  4491. exports.className = className;
  4492. var combinator = function combinator$2(opts) {
  4493. return new _combinator["default"](opts);
  4494. };
  4495. exports.combinator = combinator;
  4496. var comment = function comment$2(opts) {
  4497. return new _comment["default"](opts);
  4498. };
  4499. exports.comment = comment;
  4500. var id = function id$1(opts) {
  4501. return new _id["default"](opts);
  4502. };
  4503. exports.id = id;
  4504. var nesting = function nesting$1(opts) {
  4505. return new _nesting["default"](opts);
  4506. };
  4507. exports.nesting = nesting;
  4508. var pseudo = function pseudo$1(opts) {
  4509. return new _pseudo["default"](opts);
  4510. };
  4511. exports.pseudo = pseudo;
  4512. var root = function root$2(opts) {
  4513. return new _root["default"](opts);
  4514. };
  4515. exports.root = root;
  4516. var selector = function selector$1(opts) {
  4517. return new _selector["default"](opts);
  4518. };
  4519. exports.selector = selector;
  4520. var string = function string$1(opts) {
  4521. return new _string["default"](opts);
  4522. };
  4523. exports.string = string;
  4524. var tag = function tag$1(opts) {
  4525. return new _tag["default"](opts);
  4526. };
  4527. exports.tag = tag;
  4528. var universal = function universal$1(opts) {
  4529. return new _universal["default"](opts);
  4530. };
  4531. exports.universal = universal;
  4532. }));
  4533. //#endregion
  4534. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/guards.js
  4535. var require_guards = /* @__PURE__ */ __commonJSMin(((exports) => {
  4536. exports.__esModule = true;
  4537. exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0;
  4538. exports.isContainer = isContainer;
  4539. exports.isIdentifier = void 0;
  4540. exports.isNamespace = isNamespace;
  4541. exports.isNesting = void 0;
  4542. exports.isNode = isNode;
  4543. exports.isPseudo = void 0;
  4544. exports.isPseudoClass = isPseudoClass;
  4545. exports.isPseudoElement = isPseudoElement;
  4546. exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = void 0;
  4547. var _types$1 = require_types();
  4548. var _IS_TYPE;
  4549. var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types$1.ATTRIBUTE] = true, _IS_TYPE[_types$1.CLASS] = true, _IS_TYPE[_types$1.COMBINATOR] = true, _IS_TYPE[_types$1.COMMENT] = true, _IS_TYPE[_types$1.ID] = true, _IS_TYPE[_types$1.NESTING] = true, _IS_TYPE[_types$1.PSEUDO] = true, _IS_TYPE[_types$1.ROOT] = true, _IS_TYPE[_types$1.SELECTOR] = true, _IS_TYPE[_types$1.STRING] = true, _IS_TYPE[_types$1.TAG] = true, _IS_TYPE[_types$1.UNIVERSAL] = true, _IS_TYPE);
  4550. function isNode(node) {
  4551. return typeof node === "object" && IS_TYPE[node.type];
  4552. }
  4553. function isNodeType(type, node) {
  4554. return isNode(node) && node.type === type;
  4555. }
  4556. var isAttribute = isNodeType.bind(null, _types$1.ATTRIBUTE);
  4557. exports.isAttribute = isAttribute;
  4558. var isClassName = isNodeType.bind(null, _types$1.CLASS);
  4559. exports.isClassName = isClassName;
  4560. var isCombinator = isNodeType.bind(null, _types$1.COMBINATOR);
  4561. exports.isCombinator = isCombinator;
  4562. var isComment = isNodeType.bind(null, _types$1.COMMENT);
  4563. exports.isComment = isComment;
  4564. var isIdentifier = isNodeType.bind(null, _types$1.ID);
  4565. exports.isIdentifier = isIdentifier;
  4566. var isNesting = isNodeType.bind(null, _types$1.NESTING);
  4567. exports.isNesting = isNesting;
  4568. var isPseudo = isNodeType.bind(null, _types$1.PSEUDO);
  4569. exports.isPseudo = isPseudo;
  4570. var isRoot = isNodeType.bind(null, _types$1.ROOT);
  4571. exports.isRoot = isRoot;
  4572. var isSelector = isNodeType.bind(null, _types$1.SELECTOR);
  4573. exports.isSelector = isSelector;
  4574. var isString = isNodeType.bind(null, _types$1.STRING);
  4575. exports.isString = isString;
  4576. var isTag = isNodeType.bind(null, _types$1.TAG);
  4577. exports.isTag = isTag;
  4578. var isUniversal = isNodeType.bind(null, _types$1.UNIVERSAL);
  4579. exports.isUniversal = isUniversal;
  4580. function isPseudoElement(node) {
  4581. return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line");
  4582. }
  4583. function isPseudoClass(node) {
  4584. return isPseudo(node) && !isPseudoElement(node);
  4585. }
  4586. function isContainer(node) {
  4587. return !!(isNode(node) && node.walk);
  4588. }
  4589. function isNamespace(node) {
  4590. return isAttribute(node) || isTag(node);
  4591. }
  4592. }));
  4593. //#endregion
  4594. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/index.js
  4595. var require_selectors = /* @__PURE__ */ __commonJSMin(((exports) => {
  4596. exports.__esModule = true;
  4597. var _types = require_types();
  4598. Object.keys(_types).forEach(function(key) {
  4599. if (key === "default" || key === "__esModule") return;
  4600. if (key in exports && exports[key] === _types[key]) return;
  4601. exports[key] = _types[key];
  4602. });
  4603. var _constructors = require_constructors();
  4604. Object.keys(_constructors).forEach(function(key) {
  4605. if (key === "default" || key === "__esModule") return;
  4606. if (key in exports && exports[key] === _constructors[key]) return;
  4607. exports[key] = _constructors[key];
  4608. });
  4609. var _guards = require_guards();
  4610. Object.keys(_guards).forEach(function(key) {
  4611. if (key === "default" || key === "__esModule") return;
  4612. if (key in exports && exports[key] === _guards[key]) return;
  4613. exports[key] = _guards[key];
  4614. });
  4615. }));
  4616. //#endregion
  4617. //#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/index.js
  4618. var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  4619. exports.__esModule = true;
  4620. exports["default"] = void 0;
  4621. var _processor = _interopRequireDefault$2(require_processor());
  4622. var selectors = _interopRequireWildcard(require_selectors());
  4623. function _getRequireWildcardCache(nodeInterop) {
  4624. if (typeof WeakMap !== "function") return null;
  4625. var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
  4626. var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
  4627. return (_getRequireWildcardCache = function _getRequireWildcardCache$4(nodeInterop$1) {
  4628. return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
  4629. })(nodeInterop);
  4630. }
  4631. function _interopRequireWildcard(obj, nodeInterop) {
  4632. if (!nodeInterop && obj && obj.__esModule) return obj;
  4633. if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
  4634. var cache = _getRequireWildcardCache(nodeInterop);
  4635. if (cache && cache.has(obj)) return cache.get(obj);
  4636. var newObj = {};
  4637. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  4638. for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  4639. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  4640. if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
  4641. else newObj[key] = obj[key];
  4642. }
  4643. newObj["default"] = obj;
  4644. if (cache) cache.set(obj, newObj);
  4645. return newObj;
  4646. }
  4647. function _interopRequireDefault$2(obj) {
  4648. return obj && obj.__esModule ? obj : { "default": obj };
  4649. }
  4650. var parser = function parser$1(processor) {
  4651. return new _processor["default"](processor);
  4652. };
  4653. Object.assign(parser, selectors);
  4654. var _default = parser;
  4655. exports["default"] = _default;
  4656. module.exports = exports.default;
  4657. }));
  4658. //#endregion
  4659. //#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.6/node_modules/postcss-modules-local-by-default/src/index.js
  4660. var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  4661. const selectorParser$1 = require_dist();
  4662. const valueParser = require_lib();
  4663. const { extractICSS } = require_src$4();
  4664. const IGNORE_FILE_MARKER = "cssmodules-pure-no-check";
  4665. const IGNORE_NEXT_LINE_MARKER = "cssmodules-pure-ignore";
  4666. const isSpacing = (node) => node.type === "combinator" && node.value === " ";
  4667. const isPureCheckDisabled = (root$2) => {
  4668. for (const node of root$2.nodes) {
  4669. if (node.type !== "comment") return false;
  4670. if (node.text.trim().startsWith(IGNORE_FILE_MARKER)) return true;
  4671. }
  4672. return false;
  4673. };
  4674. function getIgnoreComment(node) {
  4675. if (!node.parent) return;
  4676. const indexInParent = node.parent.index(node);
  4677. for (let i$1 = indexInParent - 1; i$1 >= 0; i$1--) {
  4678. const prevNode = node.parent.nodes[i$1];
  4679. if (prevNode.type === "comment") {
  4680. if (prevNode.text.trimStart().startsWith(IGNORE_NEXT_LINE_MARKER)) return prevNode;
  4681. } else break;
  4682. }
  4683. }
  4684. function normalizeNodeArray(nodes) {
  4685. const array = [];
  4686. nodes.forEach((x) => {
  4687. if (Array.isArray(x)) normalizeNodeArray(x).forEach((item) => {
  4688. array.push(item);
  4689. });
  4690. else if (x) array.push(x);
  4691. });
  4692. if (array.length > 0 && isSpacing(array[array.length - 1])) array.pop();
  4693. return array;
  4694. }
  4695. const isPureSelectorSymbol = Symbol("is-pure-selector");
  4696. function localizeNode(rule, mode, localAliasMap) {
  4697. const transform = (node, context) => {
  4698. if (context.ignoreNextSpacing && !isSpacing(node)) throw new Error("Missing whitespace after " + context.ignoreNextSpacing);
  4699. if (context.enforceNoSpacing && isSpacing(node)) throw new Error("Missing whitespace before " + context.enforceNoSpacing);
  4700. let newNodes;
  4701. switch (node.type) {
  4702. case "root": {
  4703. let resultingGlobal;
  4704. context.hasPureGlobals = false;
  4705. newNodes = node.nodes.map((n) => {
  4706. const nContext = {
  4707. global: context.global,
  4708. lastWasSpacing: true,
  4709. hasLocals: false,
  4710. explicit: false
  4711. };
  4712. n = transform(n, nContext);
  4713. if (typeof resultingGlobal === "undefined") resultingGlobal = nContext.global;
  4714. else if (resultingGlobal !== nContext.global) throw new Error("Inconsistent rule global/local result in rule \"" + node + "\" (multiple selectors must result in the same mode for the rule)");
  4715. if (!nContext.hasLocals) context.hasPureGlobals = true;
  4716. return n;
  4717. });
  4718. context.global = resultingGlobal;
  4719. node.nodes = normalizeNodeArray(newNodes);
  4720. break;
  4721. }
  4722. case "selector":
  4723. newNodes = node.map((childNode) => transform(childNode, context));
  4724. node = node.clone();
  4725. node.nodes = normalizeNodeArray(newNodes);
  4726. break;
  4727. case "combinator":
  4728. if (isSpacing(node)) {
  4729. if (context.ignoreNextSpacing) {
  4730. context.ignoreNextSpacing = false;
  4731. context.lastWasSpacing = false;
  4732. context.enforceNoSpacing = false;
  4733. return null;
  4734. }
  4735. context.lastWasSpacing = true;
  4736. return node;
  4737. }
  4738. break;
  4739. case "pseudo": {
  4740. let childContext;
  4741. const isNested = !!node.length;
  4742. const isScoped = node.value === ":local" || node.value === ":global";
  4743. if (node.value === ":import" || node.value === ":export") context.hasLocals = true;
  4744. else if (isNested) {
  4745. if (isScoped) {
  4746. if (node.nodes.length === 0) throw new Error(`${node.value}() can't be empty`);
  4747. if (context.inside) throw new Error(`A ${node.value} is not allowed inside of a ${context.inside}(...)`);
  4748. childContext = {
  4749. global: node.value === ":global",
  4750. inside: node.value,
  4751. hasLocals: false,
  4752. explicit: true
  4753. };
  4754. newNodes = node.map((childNode) => transform(childNode, childContext)).reduce((acc, next) => acc.concat(next.nodes), []);
  4755. if (newNodes.length) {
  4756. const { before, after } = node.spaces;
  4757. const first = newNodes[0];
  4758. const last = newNodes[newNodes.length - 1];
  4759. first.spaces = {
  4760. before,
  4761. after: first.spaces.after
  4762. };
  4763. last.spaces = {
  4764. before: last.spaces.before,
  4765. after
  4766. };
  4767. }
  4768. node = newNodes;
  4769. break;
  4770. } else {
  4771. childContext = {
  4772. global: context.global,
  4773. inside: context.inside,
  4774. lastWasSpacing: true,
  4775. hasLocals: false,
  4776. explicit: context.explicit
  4777. };
  4778. newNodes = node.map((childNode) => {
  4779. const newContext = {
  4780. ...childContext,
  4781. enforceNoSpacing: false
  4782. };
  4783. const result = transform(childNode, newContext);
  4784. childContext.global = newContext.global;
  4785. childContext.hasLocals = newContext.hasLocals;
  4786. return result;
  4787. });
  4788. node = node.clone();
  4789. node.nodes = normalizeNodeArray(newNodes);
  4790. if (childContext.hasLocals) context.hasLocals = true;
  4791. }
  4792. break;
  4793. } else if (isScoped) {
  4794. if (context.inside) throw new Error(`A ${node.value} is not allowed inside of a ${context.inside}(...)`);
  4795. const addBackSpacing = !!node.spaces.before;
  4796. context.ignoreNextSpacing = context.lastWasSpacing ? node.value : false;
  4797. context.enforceNoSpacing = context.lastWasSpacing ? false : node.value;
  4798. context.global = node.value === ":global";
  4799. context.explicit = true;
  4800. return addBackSpacing ? selectorParser$1.combinator({ value: " " }) : null;
  4801. }
  4802. break;
  4803. }
  4804. case "id":
  4805. case "class": {
  4806. if (!node.value) throw new Error("Invalid class or id selector syntax");
  4807. if (context.global) break;
  4808. const isImportedValue = localAliasMap.has(node.value);
  4809. if (!isImportedValue || isImportedValue && context.explicit) {
  4810. const innerNode = node.clone();
  4811. innerNode.spaces = {
  4812. before: "",
  4813. after: ""
  4814. };
  4815. node = selectorParser$1.pseudo({
  4816. value: ":local",
  4817. nodes: [innerNode],
  4818. spaces: node.spaces
  4819. });
  4820. context.hasLocals = true;
  4821. }
  4822. break;
  4823. }
  4824. case "nesting": if (node.value === "&") context.hasLocals = rule.parent[isPureSelectorSymbol];
  4825. }
  4826. context.lastWasSpacing = false;
  4827. context.ignoreNextSpacing = false;
  4828. context.enforceNoSpacing = false;
  4829. return node;
  4830. };
  4831. const rootContext = {
  4832. global: mode === "global",
  4833. hasPureGlobals: false
  4834. };
  4835. rootContext.selector = selectorParser$1((root$2) => {
  4836. transform(root$2, rootContext);
  4837. }).processSync(rule, {
  4838. updateSelector: false,
  4839. lossless: true
  4840. });
  4841. return rootContext;
  4842. }
  4843. function localizeDeclNode(node, context) {
  4844. switch (node.type) {
  4845. case "word":
  4846. if (context.localizeNextItem) {
  4847. if (!context.localAliasMap.has(node.value)) {
  4848. node.value = ":local(" + node.value + ")";
  4849. context.localizeNextItem = false;
  4850. }
  4851. }
  4852. break;
  4853. case "function":
  4854. if (context.options && context.options.rewriteUrl && node.value.toLowerCase() === "url") node.nodes.map((nestedNode) => {
  4855. if (nestedNode.type !== "string" && nestedNode.type !== "word") return;
  4856. let newUrl = context.options.rewriteUrl(context.global, nestedNode.value);
  4857. switch (nestedNode.type) {
  4858. case "string":
  4859. if (nestedNode.quote === "'") newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/'/g, "\\'");
  4860. if (nestedNode.quote === "\"") newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/"/g, "\\\"");
  4861. break;
  4862. case "word":
  4863. newUrl = newUrl.replace(/("|'|\)|\\)/g, "\\$1");
  4864. break;
  4865. }
  4866. nestedNode.value = newUrl;
  4867. });
  4868. break;
  4869. }
  4870. return node;
  4871. }
  4872. const specialKeywords = [
  4873. "none",
  4874. "inherit",
  4875. "initial",
  4876. "revert",
  4877. "revert-layer",
  4878. "unset"
  4879. ];
  4880. function localizeDeclarationValues(localize, declaration, context) {
  4881. const valueNodes = valueParser(declaration.value);
  4882. valueNodes.walk((node, index, nodes) => {
  4883. if (node.type === "function" && (node.value.toLowerCase() === "var" || node.value.toLowerCase() === "env")) return false;
  4884. if (node.type === "word" && specialKeywords.includes(node.value.toLowerCase())) return;
  4885. nodes[index] = localizeDeclNode(node, {
  4886. options: context.options,
  4887. global: context.global,
  4888. localizeNextItem: localize && !context.global,
  4889. localAliasMap: context.localAliasMap
  4890. });
  4891. });
  4892. declaration.value = valueNodes.toString();
  4893. }
  4894. const validIdent = /^-?([a-z\u0080-\uFFFF_]|(\\[^\r\n\f])|-(?![0-9]))((\\[^\r\n\f])|[a-z\u0080-\uFFFF_0-9-])*$/i;
  4895. const animationKeywords = {
  4896. $normal: 1,
  4897. $reverse: 1,
  4898. $alternate: 1,
  4899. "$alternate-reverse": 1,
  4900. $forwards: 1,
  4901. $backwards: 1,
  4902. $both: 1,
  4903. $infinite: 1,
  4904. $paused: 1,
  4905. $running: 1,
  4906. $ease: 1,
  4907. "$ease-in": 1,
  4908. "$ease-out": 1,
  4909. "$ease-in-out": 1,
  4910. $linear: 1,
  4911. "$step-end": 1,
  4912. "$step-start": 1,
  4913. $none: Infinity,
  4914. $initial: Infinity,
  4915. $inherit: Infinity,
  4916. $unset: Infinity,
  4917. $revert: Infinity,
  4918. "$revert-layer": Infinity
  4919. };
  4920. function localizeDeclaration(declaration, context) {
  4921. if (/animation(-name)?$/i.test(declaration.prop)) {
  4922. let parsedAnimationKeywords = {};
  4923. declaration.value = valueParser(declaration.value).walk((node) => {
  4924. if (node.type === "div") {
  4925. parsedAnimationKeywords = {};
  4926. return;
  4927. } else if (node.type === "function" && node.value.toLowerCase() === "local" && node.nodes.length === 1) {
  4928. node.type = "word";
  4929. node.value = node.nodes[0].value;
  4930. return localizeDeclNode(node, {
  4931. options: context.options,
  4932. global: context.global,
  4933. localizeNextItem: true,
  4934. localAliasMap: context.localAliasMap
  4935. });
  4936. } else if (node.type === "function") {
  4937. if (node.value.toLowerCase() === "global" && node.nodes.length === 1) {
  4938. node.type = "word";
  4939. node.value = node.nodes[0].value;
  4940. }
  4941. return false;
  4942. } else if (node.type !== "word") return;
  4943. const value = node.type === "word" ? node.value.toLowerCase() : null;
  4944. let shouldParseAnimationName = false;
  4945. if (value && validIdent.test(value)) if ("$" + value in animationKeywords) {
  4946. parsedAnimationKeywords["$" + value] = "$" + value in parsedAnimationKeywords ? parsedAnimationKeywords["$" + value] + 1 : 0;
  4947. shouldParseAnimationName = parsedAnimationKeywords["$" + value] >= animationKeywords["$" + value];
  4948. } else shouldParseAnimationName = true;
  4949. return localizeDeclNode(node, {
  4950. options: context.options,
  4951. global: context.global,
  4952. localizeNextItem: shouldParseAnimationName && !context.global,
  4953. localAliasMap: context.localAliasMap
  4954. });
  4955. }).toString();
  4956. return;
  4957. }
  4958. if (/url\(/i.test(declaration.value)) return localizeDeclarationValues(false, declaration, context);
  4959. }
  4960. const isPureSelector = (context, rule) => {
  4961. if (!rule.parent || rule.type === "root") return !context.hasPureGlobals;
  4962. if (rule.type === "rule" && rule[isPureSelectorSymbol]) return rule[isPureSelectorSymbol] || isPureSelector(context, rule.parent);
  4963. return !context.hasPureGlobals || isPureSelector(context, rule.parent);
  4964. };
  4965. const isNodeWithoutDeclarations = (rule) => {
  4966. if (rule.nodes.length > 0) return !rule.nodes.every((item) => item.type === "rule" || item.type === "atrule" && !isNodeWithoutDeclarations(item));
  4967. return true;
  4968. };
  4969. module.exports = (options = {}) => {
  4970. if (options && options.mode && options.mode !== "global" && options.mode !== "local" && options.mode !== "pure") throw new Error("options.mode must be either \"global\", \"local\" or \"pure\" (default \"local\")");
  4971. const pureMode = options && options.mode === "pure";
  4972. const globalMode = options && options.mode === "global";
  4973. return {
  4974. postcssPlugin: "postcss-modules-local-by-default",
  4975. prepare() {
  4976. const localAliasMap = /* @__PURE__ */ new Map();
  4977. return { Once(root$2) {
  4978. const { icssImports } = extractICSS(root$2, false);
  4979. const enforcePureMode = pureMode && !isPureCheckDisabled(root$2);
  4980. Object.keys(icssImports).forEach((key) => {
  4981. Object.keys(icssImports[key]).forEach((prop) => {
  4982. localAliasMap.set(prop, icssImports[key][prop]);
  4983. });
  4984. });
  4985. root$2.walkAtRules((atRule) => {
  4986. if (/keyframes$/i.test(atRule.name)) {
  4987. const globalMatch = /^\s*:global\s*\((.+)\)\s*$/.exec(atRule.params);
  4988. const localMatch = /^\s*:local\s*\((.+)\)\s*$/.exec(atRule.params);
  4989. let globalKeyframes = globalMode;
  4990. if (globalMatch) {
  4991. if (enforcePureMode) {
  4992. const ignoreComment = getIgnoreComment(atRule);
  4993. if (!ignoreComment) throw atRule.error("@keyframes :global(...) is not allowed in pure mode");
  4994. else ignoreComment.remove();
  4995. }
  4996. atRule.params = globalMatch[1];
  4997. globalKeyframes = true;
  4998. } else if (localMatch) {
  4999. atRule.params = localMatch[0];
  5000. globalKeyframes = false;
  5001. } else if (atRule.params && !globalMode && !localAliasMap.has(atRule.params)) atRule.params = ":local(" + atRule.params + ")";
  5002. atRule.walkDecls((declaration) => {
  5003. localizeDeclaration(declaration, {
  5004. localAliasMap,
  5005. options,
  5006. global: globalKeyframes
  5007. });
  5008. });
  5009. } else if (/scope$/i.test(atRule.name)) {
  5010. if (atRule.params) {
  5011. const ignoreComment = pureMode ? getIgnoreComment(atRule) : void 0;
  5012. if (ignoreComment) ignoreComment.remove();
  5013. atRule.params = atRule.params.split("to").map((item) => {
  5014. const selector$1 = item.trim().slice(1, -1).trim();
  5015. const context = localizeNode(selector$1, options.mode, localAliasMap);
  5016. context.options = options;
  5017. context.localAliasMap = localAliasMap;
  5018. if (enforcePureMode && context.hasPureGlobals && !ignoreComment) throw atRule.error("Selector in at-rule\"" + selector$1 + "\" is not pure (pure selectors must contain at least one local class or id)");
  5019. return `(${context.selector})`;
  5020. }).join(" to ");
  5021. }
  5022. atRule.nodes.forEach((declaration) => {
  5023. if (declaration.type === "decl") localizeDeclaration(declaration, {
  5024. localAliasMap,
  5025. options,
  5026. global: globalMode
  5027. });
  5028. });
  5029. } else if (atRule.nodes) atRule.nodes.forEach((declaration) => {
  5030. if (declaration.type === "decl") localizeDeclaration(declaration, {
  5031. localAliasMap,
  5032. options,
  5033. global: globalMode
  5034. });
  5035. });
  5036. });
  5037. root$2.walkRules((rule) => {
  5038. if (rule.parent && rule.parent.type === "atrule" && /keyframes$/i.test(rule.parent.name)) return;
  5039. const context = localizeNode(rule, options.mode, localAliasMap);
  5040. context.options = options;
  5041. context.localAliasMap = localAliasMap;
  5042. const ignoreComment = enforcePureMode ? getIgnoreComment(rule) : void 0;
  5043. const isNotPure = enforcePureMode && !isPureSelector(context, rule);
  5044. if (isNotPure && isNodeWithoutDeclarations(rule) && !ignoreComment) throw rule.error("Selector \"" + rule.selector + "\" is not pure (pure selectors must contain at least one local class or id)");
  5045. else if (ignoreComment) ignoreComment.remove();
  5046. if (pureMode) rule[isPureSelectorSymbol] = !isNotPure;
  5047. rule.selector = context.selector;
  5048. if (rule.nodes) rule.nodes.forEach((declaration) => localizeDeclaration(declaration, context));
  5049. });
  5050. } };
  5051. }
  5052. };
  5053. };
  5054. module.exports.postcss = true;
  5055. }));
  5056. //#endregion
  5057. //#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.6/node_modules/postcss-modules-scope/src/index.js
  5058. var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  5059. const selectorParser = require_dist();
  5060. const hasOwnProperty = Object.prototype.hasOwnProperty;
  5061. function isNestedRule(rule) {
  5062. if (!rule.parent || rule.parent.type === "root") return false;
  5063. if (rule.parent.type === "rule") return true;
  5064. return isNestedRule(rule.parent);
  5065. }
  5066. function getSingleLocalNamesForComposes(root$2, rule) {
  5067. if (isNestedRule(rule)) throw new Error(`composition is not allowed in nested rule \n\n${rule}`);
  5068. return root$2.nodes.map((node) => {
  5069. if (node.type !== "selector" || node.nodes.length !== 1) throw new Error(`composition is only allowed when selector is single :local class name not in "${root$2}"`);
  5070. node = node.nodes[0];
  5071. if (node.type !== "pseudo" || node.value !== ":local" || node.nodes.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root$2 + "\", \"" + node + "\" is weird");
  5072. node = node.first;
  5073. if (node.type !== "selector" || node.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root$2 + "\", \"" + node + "\" is weird");
  5074. node = node.first;
  5075. if (node.type !== "class") throw new Error("composition is only allowed when selector is single :local class name not in \"" + root$2 + "\", \"" + node + "\" is weird");
  5076. return node.value;
  5077. });
  5078. }
  5079. const unescapeRegExp = new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)", "ig");
  5080. function unescape(str$1) {
  5081. return str$1.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => {
  5082. const high = "0x" + escaped - 65536;
  5083. return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
  5084. });
  5085. }
  5086. const plugin = (options = {}) => {
  5087. const generateScopedName = options && options.generateScopedName || plugin.generateScopedName;
  5088. const generateExportEntry = options && options.generateExportEntry || plugin.generateExportEntry;
  5089. const exportGlobals = options && options.exportGlobals;
  5090. return {
  5091. postcssPlugin: "postcss-modules-scope",
  5092. Once(root$2, { rule }) {
  5093. const exports$1 = Object.create(null);
  5094. function exportScopedName(name, rawName, node) {
  5095. const scopedName = generateScopedName(rawName ? rawName : name, root$2.source.input.from, root$2.source.input.css, node);
  5096. const { key, value } = generateExportEntry(rawName ? rawName : name, scopedName, root$2.source.input.from, root$2.source.input.css, node);
  5097. exports$1[key] = exports$1[key] || [];
  5098. if (exports$1[key].indexOf(value) < 0) exports$1[key].push(value);
  5099. return scopedName;
  5100. }
  5101. function localizeNode$1(node) {
  5102. switch (node.type) {
  5103. case "selector":
  5104. node.nodes = node.map((item) => localizeNode$1(item));
  5105. return node;
  5106. case "class": return selectorParser.className({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) });
  5107. case "id": return selectorParser.id({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) });
  5108. case "attribute": if (node.attribute === "class" && node.operator === "=") return selectorParser.attribute({
  5109. attribute: node.attribute,
  5110. operator: node.operator,
  5111. quoteMark: "'",
  5112. value: exportScopedName(node.value, null, null)
  5113. });
  5114. }
  5115. throw new Error(`${node.type} ("${node}") is not allowed in a :local block`);
  5116. }
  5117. function traverseNode(node) {
  5118. switch (node.type) {
  5119. case "pseudo": if (node.value === ":local") {
  5120. if (node.nodes.length !== 1) throw new Error("Unexpected comma (\",\") in :local block");
  5121. const selector$1 = localizeNode$1(node.first);
  5122. selector$1.first.spaces = node.spaces;
  5123. const nextNode = node.next();
  5124. if (nextNode && nextNode.type === "combinator" && nextNode.value === " " && /\\[A-F0-9]{1,6}$/.test(selector$1.last.value)) selector$1.last.spaces.after = " ";
  5125. node.replaceWith(selector$1);
  5126. return;
  5127. }
  5128. case "root":
  5129. case "selector":
  5130. node.each((item) => traverseNode(item));
  5131. break;
  5132. case "id":
  5133. case "class":
  5134. if (exportGlobals) exports$1[node.value] = [node.value];
  5135. break;
  5136. }
  5137. return node;
  5138. }
  5139. const importedNames = {};
  5140. root$2.walkRules(/^:import\(.+\)$/, (rule$1) => {
  5141. rule$1.walkDecls((decl) => {
  5142. importedNames[decl.prop] = true;
  5143. });
  5144. });
  5145. root$2.walkRules((rule$1) => {
  5146. let parsedSelector = selectorParser().astSync(rule$1);
  5147. rule$1.selector = traverseNode(parsedSelector.clone()).toString();
  5148. rule$1.walkDecls(/^(composes|compose-with)$/i, (decl) => {
  5149. const localNames = getSingleLocalNamesForComposes(parsedSelector, decl.parent);
  5150. decl.value.split(",").forEach((value) => {
  5151. value.trim().split(/\s+/).forEach((className$1) => {
  5152. const global$1 = /^global\(([^)]+)\)$/.exec(className$1);
  5153. if (global$1) localNames.forEach((exportedName) => {
  5154. exports$1[exportedName].push(global$1[1]);
  5155. });
  5156. else if (hasOwnProperty.call(importedNames, className$1)) localNames.forEach((exportedName) => {
  5157. exports$1[exportedName].push(className$1);
  5158. });
  5159. else if (hasOwnProperty.call(exports$1, className$1)) localNames.forEach((exportedName) => {
  5160. exports$1[className$1].forEach((item) => {
  5161. exports$1[exportedName].push(item);
  5162. });
  5163. });
  5164. else throw decl.error(`referenced class name "${className$1}" in ${decl.prop} not found`);
  5165. });
  5166. });
  5167. decl.remove();
  5168. });
  5169. rule$1.walkDecls((decl) => {
  5170. if (!/:local\s*\((.+?)\)/.test(decl.value)) return;
  5171. let tokens$1 = decl.value.split(/(,|'[^']*'|"[^"]*")/);
  5172. tokens$1 = tokens$1.map((token, idx) => {
  5173. if (idx === 0 || tokens$1[idx - 1] === ",") {
  5174. let result = token;
  5175. const localMatch = /:local\s*\((.+?)\)/.exec(token);
  5176. if (localMatch) {
  5177. const input = localMatch.input;
  5178. const matchPattern = localMatch[0];
  5179. const matchVal = localMatch[1];
  5180. const newVal = exportScopedName(matchVal);
  5181. result = input.replace(matchPattern, newVal);
  5182. } else return token;
  5183. return result;
  5184. } else return token;
  5185. });
  5186. decl.value = tokens$1.join("");
  5187. });
  5188. });
  5189. root$2.walkAtRules(/keyframes$/i, (atRule) => {
  5190. const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(atRule.params);
  5191. if (!localMatch) return;
  5192. atRule.params = exportScopedName(localMatch[1]);
  5193. });
  5194. root$2.walkAtRules(/scope$/i, (atRule) => {
  5195. if (atRule.params) atRule.params = atRule.params.split("to").map((item) => {
  5196. const selector$1 = item.trim().slice(1, -1).trim();
  5197. if (!/^\s*:local\s*\((.+?)\)\s*$/.exec(selector$1)) return `(${selector$1})`;
  5198. return `(${traverseNode(selectorParser().astSync(selector$1)).toString()})`;
  5199. }).join(" to ");
  5200. });
  5201. const exportedNames = Object.keys(exports$1);
  5202. if (exportedNames.length > 0) {
  5203. const exportRule = rule({ selector: ":export" });
  5204. exportedNames.forEach((exportedName) => exportRule.append({
  5205. prop: exportedName,
  5206. value: exports$1[exportedName].join(" "),
  5207. raws: { before: "\n " }
  5208. }));
  5209. root$2.append(exportRule);
  5210. }
  5211. }
  5212. };
  5213. };
  5214. plugin.postcss = true;
  5215. plugin.generateScopedName = function(name, path$2) {
  5216. return `_${path$2.replace(/\.[^./\\]+$/, "").replace(/[\W_]+/g, "_").replace(/^_|_$/g, "")}__${name}`.trim();
  5217. };
  5218. plugin.generateExportEntry = function(name, scopedName) {
  5219. return {
  5220. key: unescape(name),
  5221. value: unescape(scopedName)
  5222. };
  5223. };
  5224. module.exports = plugin;
  5225. }));
  5226. //#endregion
  5227. //#region ../../node_modules/.pnpm/string-hash@1.1.3/node_modules/string-hash/index.js
  5228. var require_string_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  5229. function hash(str$1) {
  5230. var hash$1 = 5381, i$1 = str$1.length;
  5231. while (i$1) hash$1 = hash$1 * 33 ^ str$1.charCodeAt(--i$1);
  5232. return hash$1 >>> 0;
  5233. }
  5234. module.exports = hash;
  5235. }));
  5236. //#endregion
  5237. //#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.6/node_modules/postcss-modules-values/src/index.js
  5238. var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  5239. const ICSSUtils = require_src$4();
  5240. const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
  5241. const matchValueDefinition = /(?:\s+|^)([\w-]+):?(.*?)$/;
  5242. const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/;
  5243. module.exports = (options) => {
  5244. let importIndex = 0;
  5245. const createImportedName = options && options.createImportedName || ((importName) => `i__const_${importName.replace(/\W/g, "_")}_${importIndex++}`);
  5246. return {
  5247. postcssPlugin: "postcss-modules-values",
  5248. prepare(result) {
  5249. const importAliases = [];
  5250. const definitions = {};
  5251. return { Once(root$2, postcss) {
  5252. root$2.walkAtRules(/value/i, (atRule) => {
  5253. const matches = atRule.params.match(matchImports);
  5254. if (matches) {
  5255. let [, aliases, path$2] = matches;
  5256. if (definitions[path$2]) path$2 = definitions[path$2];
  5257. const imports = aliases.replace(/^\(\s*([\s\S]+)\s*\)$/, "$1").split(/\s*,\s*/).map((alias) => {
  5258. const tokens$1 = matchImport.exec(alias);
  5259. if (tokens$1) {
  5260. const [, theirName, myName = theirName] = tokens$1;
  5261. const importedName = createImportedName(myName);
  5262. definitions[myName] = importedName;
  5263. return {
  5264. theirName,
  5265. importedName
  5266. };
  5267. } else throw new Error(`@import statement "${alias}" is invalid!`);
  5268. });
  5269. importAliases.push({
  5270. path: path$2,
  5271. imports
  5272. });
  5273. atRule.remove();
  5274. return;
  5275. }
  5276. if (atRule.params.indexOf("@value") !== -1) result.warn("Invalid value definition: " + atRule.params);
  5277. let [, key, value] = `${atRule.params}${atRule.raws.between}`.match(matchValueDefinition);
  5278. const normalizedValue = value.replace(/\/\*((?!\*\/).*?)\*\//g, "");
  5279. if (normalizedValue.length === 0) {
  5280. result.warn("Invalid value definition: " + atRule.params);
  5281. atRule.remove();
  5282. return;
  5283. }
  5284. if (!/^\s+$/.test(normalizedValue)) value = value.trim();
  5285. definitions[key] = ICSSUtils.replaceValueSymbols(value, definitions);
  5286. atRule.remove();
  5287. });
  5288. if (!Object.keys(definitions).length) return;
  5289. ICSSUtils.replaceSymbols(root$2, definitions);
  5290. const exportDeclarations = Object.keys(definitions).map((key) => postcss.decl({
  5291. value: definitions[key],
  5292. prop: key,
  5293. raws: { before: "\n " }
  5294. }));
  5295. if (exportDeclarations.length > 0) {
  5296. const exportRule = postcss.rule({
  5297. selector: ":export",
  5298. raws: { after: "\n" }
  5299. });
  5300. exportRule.append(exportDeclarations);
  5301. root$2.prepend(exportRule);
  5302. }
  5303. importAliases.reverse().forEach(({ path: path$2, imports }) => {
  5304. const importRule = postcss.rule({
  5305. selector: `:import(${path$2})`,
  5306. raws: { after: "\n" }
  5307. });
  5308. imports.forEach(({ theirName, importedName }) => {
  5309. importRule.append({
  5310. value: theirName,
  5311. prop: importedName,
  5312. raws: { before: "\n " }
  5313. });
  5314. });
  5315. root$2.prepend(importRule);
  5316. });
  5317. } };
  5318. }
  5319. };
  5320. };
  5321. module.exports.postcss = true;
  5322. }));
  5323. //#endregion
  5324. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/scoping.js
  5325. var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
  5326. Object.defineProperty(exports, "__esModule", { value: true });
  5327. exports.behaviours = void 0;
  5328. exports.getDefaultPlugins = getDefaultPlugins;
  5329. exports.getDefaultScopeBehaviour = getDefaultScopeBehaviour;
  5330. exports.getScopedNameGenerator = getScopedNameGenerator;
  5331. var _postcssModulesExtractImports = _interopRequireDefault$1(require_src$3());
  5332. var _genericNames = _interopRequireDefault$1(require_generic_names());
  5333. var _postcssModulesLocalByDefault = _interopRequireDefault$1(require_src$2());
  5334. var _postcssModulesScope = _interopRequireDefault$1(require_src$1());
  5335. var _stringHash = _interopRequireDefault$1(require_string_hash());
  5336. var _postcssModulesValues = _interopRequireDefault$1(require_src());
  5337. function _interopRequireDefault$1(obj) {
  5338. return obj && obj.__esModule ? obj : { default: obj };
  5339. }
  5340. const behaviours = {
  5341. LOCAL: "local",
  5342. GLOBAL: "global"
  5343. };
  5344. exports.behaviours = behaviours;
  5345. function getDefaultPlugins({ behaviour, generateScopedName, exportGlobals }) {
  5346. const scope = (0, _postcssModulesScope.default)({
  5347. generateScopedName,
  5348. exportGlobals
  5349. });
  5350. return {
  5351. [behaviours.LOCAL]: [
  5352. _postcssModulesValues.default,
  5353. (0, _postcssModulesLocalByDefault.default)({ mode: "local" }),
  5354. _postcssModulesExtractImports.default,
  5355. scope
  5356. ],
  5357. [behaviours.GLOBAL]: [
  5358. _postcssModulesValues.default,
  5359. (0, _postcssModulesLocalByDefault.default)({ mode: "global" }),
  5360. _postcssModulesExtractImports.default,
  5361. scope
  5362. ]
  5363. }[behaviour];
  5364. }
  5365. function isValidBehaviour(behaviour) {
  5366. return Object.keys(behaviours).map((key) => behaviours[key]).indexOf(behaviour) > -1;
  5367. }
  5368. function getDefaultScopeBehaviour(scopeBehaviour) {
  5369. return scopeBehaviour && isValidBehaviour(scopeBehaviour) ? scopeBehaviour : behaviours.LOCAL;
  5370. }
  5371. function generateScopedNameDefault(name, filename, css) {
  5372. const i$1 = css.indexOf(`.${name}`);
  5373. const lineNumber = css.substr(0, i$1).split(/[\r\n]/).length;
  5374. return `_${name}_${(0, _stringHash.default)(css).toString(36).substr(0, 5)}_${lineNumber}`;
  5375. }
  5376. function getScopedNameGenerator(generateScopedName, hashPrefix) {
  5377. const scopedNameGenerator = generateScopedName || generateScopedNameDefault;
  5378. if (typeof scopedNameGenerator === "function") return scopedNameGenerator;
  5379. return (0, _genericNames.default)(scopedNameGenerator, {
  5380. context: process.cwd(),
  5381. hashPrefix
  5382. });
  5383. }
  5384. }));
  5385. //#endregion
  5386. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/pluginFactory.js
  5387. var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
  5388. Object.defineProperty(exports, "__esModule", { value: true });
  5389. exports.makePlugin = makePlugin;
  5390. var _postcss = _interopRequireDefault(__require("postcss"));
  5391. var _unquote = _interopRequireDefault(require_unquote());
  5392. var _Parser = _interopRequireDefault(require_Parser());
  5393. var _saveJSON = _interopRequireDefault(require_saveJSON());
  5394. var _localsConvention = require_localsConvention();
  5395. var _FileSystemLoader = _interopRequireDefault(require_FileSystemLoader());
  5396. var _scoping = require_scoping();
  5397. function _interopRequireDefault(obj) {
  5398. return obj && obj.__esModule ? obj : { default: obj };
  5399. }
  5400. const PLUGIN_NAME = "postcss-modules";
  5401. function isGlobalModule(globalModules, inputFile) {
  5402. return globalModules.some((regex) => inputFile.match(regex));
  5403. }
  5404. function getDefaultPluginsList(opts, inputFile) {
  5405. const globalModulesList = opts.globalModulePaths || null;
  5406. const exportGlobals = opts.exportGlobals || false;
  5407. const defaultBehaviour = (0, _scoping.getDefaultScopeBehaviour)(opts.scopeBehaviour);
  5408. const generateScopedName = (0, _scoping.getScopedNameGenerator)(opts.generateScopedName, opts.hashPrefix);
  5409. if (globalModulesList && isGlobalModule(globalModulesList, inputFile)) return (0, _scoping.getDefaultPlugins)({
  5410. behaviour: _scoping.behaviours.GLOBAL,
  5411. generateScopedName,
  5412. exportGlobals
  5413. });
  5414. return (0, _scoping.getDefaultPlugins)({
  5415. behaviour: defaultBehaviour,
  5416. generateScopedName,
  5417. exportGlobals
  5418. });
  5419. }
  5420. function getLoader(opts, plugins) {
  5421. const root$2 = typeof opts.root === "undefined" ? "/" : opts.root;
  5422. return typeof opts.Loader === "function" ? new opts.Loader(root$2, plugins, opts.resolve) : new _FileSystemLoader.default(root$2, plugins, opts.resolve);
  5423. }
  5424. function isOurPlugin(plugin$1) {
  5425. return plugin$1.postcssPlugin === PLUGIN_NAME;
  5426. }
  5427. function makePlugin(opts) {
  5428. return {
  5429. postcssPlugin: PLUGIN_NAME,
  5430. async OnceExit(css, { result }) {
  5431. const getJSON = opts.getJSON || _saveJSON.default;
  5432. const inputFile = css.source.input.file;
  5433. const pluginList = getDefaultPluginsList(opts, inputFile);
  5434. const resultPluginIndex = result.processor.plugins.findIndex((plugin$1) => isOurPlugin(plugin$1));
  5435. if (resultPluginIndex === -1) throw new Error("Plugin missing from options.");
  5436. const loader = getLoader(opts, [...result.processor.plugins.slice(0, resultPluginIndex), ...pluginList]);
  5437. const fetcher = async (file, relativeTo, depTrace) => {
  5438. const unquoteFile = (0, _unquote.default)(file);
  5439. return loader.fetch.call(loader, unquoteFile, relativeTo, depTrace);
  5440. };
  5441. const parser$1 = new _Parser.default(fetcher);
  5442. await (0, _postcss.default)([...pluginList, parser$1.plugin()]).process(css, { from: inputFile });
  5443. const out = loader.finalSource;
  5444. if (out) css.prepend(out);
  5445. if (opts.localsConvention) {
  5446. const reducer = (0, _localsConvention.makeLocalsConventionReducer)(opts.localsConvention, inputFile);
  5447. parser$1.exportTokens = Object.entries(parser$1.exportTokens).reduce(reducer, {});
  5448. }
  5449. result.messages.push({
  5450. type: "export",
  5451. plugin: "postcss-modules",
  5452. exportTokens: parser$1.exportTokens
  5453. });
  5454. return getJSON(css.source.input.file, parser$1.exportTokens, result.opts.to);
  5455. }
  5456. };
  5457. }
  5458. }));
  5459. //#endregion
  5460. //#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/index.js
  5461. var require_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  5462. var _fs = __require("fs");
  5463. var _fs2 = require_fs();
  5464. var _pluginFactory = require_pluginFactory();
  5465. (0, _fs2.setFileSystem)({
  5466. readFile: _fs.readFile,
  5467. writeFile: _fs.writeFile
  5468. });
  5469. module.exports = (opts = {}) => (0, _pluginFactory.makePlugin)(opts);
  5470. module.exports.postcss = true;
  5471. }));
  5472. //#endregion
  5473. export default require_build();
  5474. export { };