build.js 201 KB

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